/* Single fixed theme: black background, grey lines, light grey text (Twitter "lights out" style). */
:root {
  color-scheme: dark;
  --serif: 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
  --reading: 'Literata', Georgia, 'Times New Roman', serif;
  --caps: 0.12em;
  --bg: #000000;
  --panel: #16181c;
  --hover: #080808;
  --hover-strong: #181818;
  --field: #202327;
  --ink: #e7e9ea;
  --ink-soft: #71767b;
  --line: #2f3336;
  --line-strong: #536471;
  --accent: #eff3f4;
  --on-accent: #0f1419;
  --danger: #f4212e;
  --ok: #00ba7c;
}

@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/CormorantGaramond-618588c6026366f173cd30e38d54cc28.ttf') format('truetype'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Literata'; src: url('/fonts/Literata-9b1571871248cdaf1577d20f2804aadc.ttf') format('truetype'); font-weight: 200 900; font-display: swap; }

* { box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.4; -webkit-font-smoothing: antialiased; font-size: 15px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; line-height: 1.15; }
h1 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.caps { font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: var(--caps); }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 0.8rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }

/* ---------- Layout: sidebar | feed | right column ---------- */
.layout { display: grid; grid-template-columns: 260px 600px 350px; justify-content: center; min-height: 100vh; }
.sidenav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 0.4rem 0.6rem; }
.feed { border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; min-width: 0; }
.rightbar { padding: 0.6rem 1.4rem; position: sticky; top: 0; height: fit-content; max-height: 100vh; overflow-y: auto; }

.brand { display: flex; align-items: center; padding: 0.8rem 0.9rem 1rem; width: fit-content; border-radius: 0; }
.brand-logo { width: 56px; height: 56px; display: block; }
.login-logo { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.login-logo .brand-logo { width: 128px; height: 128px; }
.install-hint { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.85rem; text-align: left; line-height: 1.4; }
.install-hint b { color: var(--ink); font-weight: 600; }
.widget .install-hint { margin-top: 0; padding-top: 0; border-top: none; }
@media (display-mode: standalone) { .install-hint { display: none; } }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand:hover { opacity: 0.85; text-decoration: none; }
.nav-item { display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 0.9rem; border-radius: 0; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: var(--caps); color: var(--ink-soft); width: fit-content; min-width: 190px; background: none; border: none; border-left: 2px solid transparent; cursor: pointer; font-family: inherit; margin: 0.1rem 0; }
.nav-item:hover { background: var(--hover-strong); color: var(--ink); text-decoration: none; }
.nav-item.active { color: var(--ink); border-left-color: var(--accent); }
.nav-item svg { width: 22px; height: 22px; flex-shrink: 0; }
.nav-user { margin-top: auto; display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; border-radius: 2px; }
.nav-user:hover { background: var(--hover-strong); text-decoration: none; }
.nav-user .who { min-width: 0; line-height: 1.2; }
.nav-user .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user .who span { color: var(--ink-soft); font-size: 0.9rem; }
.sidenav form { margin: 0; }

.feed-header { position: sticky; top: 0; z-index: 10; background: rgb(0 0 0 / 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.feed-title { display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1rem; }
.feed-title .small.muted { font-family: 'Inter', sans-serif; font-size: 0.72rem; text-transform: uppercase; letter-spacing: var(--caps); margin-top: 0.15rem; }
.feed-title-action { margin-left: auto; display: none; }
.joined-list { display: flex; flex-direction: column; gap: 0.35rem; }
.joined-list a { font-weight: 600; }

/* Dialog (joined journal) */
.dialog { border: 1px solid var(--line-strong); border-radius: 0; background: var(--bg); color: var(--ink); padding: 1rem 1.2rem 1.2rem; width: min(92vw, 440px); }
.dialog::backdrop { background: rgb(91 112 131 / 0.4); }
.dialog-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.dialog-head h3 { margin: 0; }
.dialog .search-results { max-height: 40vh; overflow-y: auto; }
.feed-title .icon-btn { margin-left: -0.3rem; }
.feed-body { padding: 1rem; }
.feed-note { padding: 2rem 1rem; text-align: center; color: var(--ink-soft); }
.feed-note strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin-bottom: 0.3rem; }

/* Tabs */
.tabbar { display: flex; overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar .tab-btn { flex: 1; min-width: 120px; position: relative; background: none; border: none; color: var(--ink-soft); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: var(--caps); padding: 1rem 0.8rem; cursor: pointer; font-family: inherit; white-space: nowrap; text-align: center; }
.tabbar .tab-btn:hover { background: var(--hover-strong); text-decoration: none; }
.tabbar .tab-btn.active { color: var(--ink); font-weight: 800; }
.tabbar .tab-btn.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); }
.tab-panels > .tab-panel { display: none; }
.tab-panels > .tab-panel.active { display: block; }

/* Avatars */
.avatar-circle { width: 40px; height: 40px; border-radius: 3px; background: var(--panel); border: 1px solid var(--line-strong); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.avatar-circle.small { width: 40px; height: 40px; }
.avatar-circle.large { width: 96px; height: 96px; border: 4px solid var(--bg); margin: 0; }
.avatar-circle.xl { width: 128px; height: 128px; }

/* Composer */
.composer { display: flex; gap: 0.8rem; padding: 0.9rem 1rem 0.6rem; border-bottom: 1px solid var(--line); }
.composer form { flex: 1; min-width: 0; margin: 0; }
.composer textarea { width: 100%; border: none; background: transparent; color: var(--ink); font-family: var(--reading); font-weight: 400; font-size: 1.15rem; line-height: 1.5; resize: none; padding: 0.5rem 0; margin: 0; min-height: 3.2rem; outline: none; }
.composer textarea::placeholder { color: var(--ink-soft); font-style: italic; }
.composer-actions { display: flex; justify-content: flex-end; align-items: center; gap: 0.8rem; border-top: 1px solid var(--line); padding-top: 0.6rem; margin-top: 0.4rem; }
.composer-actions .hint { color: var(--ink-soft); font-size: 0.8rem; margin-right: auto; }
.composer-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.composer-attach { cursor: pointer; margin-left: -0.5rem; }
.composer-preview { position: relative; margin: 0.4rem 0; border-radius: 2px; overflow: hidden; border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.composer-preview img { display: block; max-height: 260px; max-width: 100%; }
.composer-preview .composer-remove { position: absolute; top: 6px; right: 6px; background: rgb(0 0 0 / 0.65); color: #fff; width: 30px; height: 30px; font-size: 0.9rem; }

/* Photos on posts */
.post-image { display: block; margin-top: 0.5rem; border-radius: 2px; overflow: hidden; border: 1px solid var(--line); width: fit-content; max-width: 100%; background: #000; }
.post-image img { display: block; max-width: 100%; max-height: 480px; object-fit: contain; }

/* Day pager (Public): one day per page, arrows to the neighbouring days that have posts */
.day-pager { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line-strong); background: var(--bg); position: sticky; top: var(--feed-header-h, 53px); z-index: 6; }
.day-label { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; }
.day-pager .icon-btn.disabled { opacity: 0.3; cursor: default; }
.day-pager a.icon-btn:hover { text-decoration: none; }
.single-day .day-heading { display: none; }

/* One continuous feed: every day under its own heading, which sticks below the page header while scrolling */
.day-journal { display: flex; flex-direction: column; }
.day-heading { position: sticky; top: var(--feed-header-h, 53px); z-index: 5; padding: 0.55rem 1rem 0.4rem; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); background: rgb(0 0 0 / 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-strong); }
.day-blocks .post:last-child { border-bottom: none; }
.jump-top { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 20; padding: 0.5rem 1rem; font-size: 0.85rem; box-shadow: 0 4px 16px rgb(0 0 0 / 0.5); }

/* Posts */
.post { display: flex; gap: 0.8rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); transition: background .12s ease; }
.post:hover { background: var(--hover); }
.post-body { flex: 1; min-width: 0; }
.post-meta { display: flex; gap: 0.3rem; align-items: baseline; flex-wrap: wrap; }
.post-username { font-weight: 700; }
.post-handle, .post-time { font-size: 0.85rem; }
.post-handle, .post-time { color: var(--ink-soft); }
.post-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 0.3rem; font-family: var(--reading); font-size: 1.02rem; font-weight: 400; line-height: 1.55; }
.badge.tiny { font-size: 0.6rem; padding: 0 0.4rem; }
.post-actions { display: flex; gap: 0.4rem; margin-top: 0.5rem; margin-left: -0.5rem; }
.post-actions form { margin: 0; }
.action-btn { background: none; border: none; color: var(--ink-soft); padding: 0.3rem 0.6rem; border-radius: 0; font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; display: inline-flex; align-items: center; gap: 0.35rem; }
.action-btn:hover { background: var(--hover-strong); color: var(--ink); }
.action-btn svg { display: block; }
.like-btn svg { fill: none; }
.like-btn.liked { color: #f91880; }
.like-btn.liked svg { fill: currentColor; }
.like-btn.pop svg { animation: heartPop .25s ease; }
@keyframes heartPop { 0% { transform: scale(1); } 50% { transform: scale(1.35); } 100% { transform: scale(1); } }
.comments { margin-top: 0.3rem; }
.comment { display: flex; gap: 0.5rem; padding: 0.45rem 0 0.2rem; }
.comment-body { flex: 1; min-width: 0; font-size: 0.95rem; }
.comment-meta { display: flex; gap: 0.3rem; align-items: baseline; flex-wrap: wrap; }
.comment-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.avatar-circle.tiny { width: 26px; height: 26px; }
.comment-form { display: flex; gap: 0.5rem; align-items: flex-end; margin-top: 0.4rem; }
.comment-form textarea { margin: 0; padding: 0.5rem 0.9rem; border-radius: 2px; font-size: 1rem; line-height: 1.35; resize: none; min-height: 2.4rem; max-height: 12rem; overflow-y: auto; }
.comment-form button { flex-shrink: 0; }
.comment-form.collapsed { display: none; }
.scroll-panel { }

/* Day pager (private journal) */
.icon-btn { width: 36px; height: 36px; border-radius: 3px; border: none; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; box-shadow: none; font-size: 1.2rem; font-weight: 700; }
.icon-btn:hover { background: var(--hover-strong); transform: none; box-shadow: none; }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Buttons and fields */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); padding: 0.65rem 1.2rem; border-radius: 0; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: var(--caps); cursor: pointer; font-family: 'Inter', sans-serif; text-decoration: none; transition: background .12s ease, opacity .12s ease; }
button:hover, .btn:hover { background: #d7dbdc; text-decoration: none; }
button.secondary, .btn.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
button.secondary:hover, .btn.secondary:hover { background: var(--hover-strong); }
button.danger { background: transparent; color: var(--danger); border-color: var(--line-strong); }
button.danger:hover { background: rgb(244 33 46 / 0.12); border-color: var(--danger); }
button.full, .btn.full { width: 100%; }
button.small, .btn.small { padding: 0.4rem 0.8rem; font-size: 0.68rem; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

input, textarea, select { width: 100%; padding: 0.7rem 0.8rem; margin-bottom: 0.9rem; border: 1px solid var(--line-strong); border-radius: 0; background: var(--bg); color: var(--ink); font-size: 16px; font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--ink-soft); }
label { font-weight: 700; font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--caps); color: var(--ink-soft); }
label.stacked { display: block; margin-bottom: 0.35rem; }
.hint { font-size: 0.78rem; color: var(--ink-soft); margin: -0.5rem 0 0.9rem; }

.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 0; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; border: 1px solid var(--line-strong); color: var(--ink-soft); vertical-align: middle; }
.badge.accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.badge.admin { background: #c8102e; color: #fff; border-color: transparent; }
.badge.dev { background: #6f42c1; color: #fff; border-color: transparent; }
.delete-form { margin-left: auto; }
.delete-btn:hover { color: var(--danger); }
.edit-form { margin-top: 0.4rem; }
.edit-form textarea { margin: 0 0 0.5rem; font-family: var(--reading); font-weight: 400; font-size: 1.02rem; line-height: 1.55; }
.edit-actions { display: flex; gap: 0.5rem; }
.feed-title-link { margin-left: auto; }
.search-form { display: flex; gap: 0.5rem; align-items: center; }
.search-form input { margin: 0; border-radius: 2px; }
.search-form.search-page { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.checklist ul { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: 0.35rem 0 0.35rem 1.7rem; position: relative; }
.checklist li::before { content: ''; position: absolute; left: 0; top: 0.5rem; width: 16px; height: 16px; border-radius: 3px; border: 1.5px solid var(--line-strong); }
.checklist li.done::before { background: var(--ok); border-color: var(--ok); }
.checklist li.done::after { content: ''; position: absolute; left: 5px; top: 0.72rem; width: 4px; height: 8px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checklist li.done a { color: var(--ink-soft); text-decoration: line-through; }
.lookback-group { margin-bottom: 0.7rem; }
.lookback-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: var(--caps); color: var(--ink-soft); margin-bottom: 0.25rem; }
.lookback-post { display: block; padding: 0.35rem 0; border-top: 1px solid var(--line); color: var(--ink); font-family: var(--reading); font-size: 0.92rem; white-space: pre-wrap; }
.activity-item { display: flex; gap: 0.7rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.activity-item:hover { background: var(--hover); text-decoration: none; }
.activity-item.fresh { border-left: 3px solid var(--accent); padding-left: calc(1rem - 3px); }
.activity-body { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.activity-line { line-height: 1.35; }
.activity-excerpt { color: var(--ink-soft); font-size: 0.92rem; overflow-wrap: anywhere; }

/* Calendar (My Journal): days with entries are marked and link to their day heading */
.calendar-box { border-bottom: 1px solid var(--line); }
.calendar-box summary { cursor: pointer; display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; font-weight: 700; color: var(--ink); font-size: 0.78rem; text-transform: uppercase; letter-spacing: var(--caps); list-style: none; }
.calendar-box summary:hover { background: var(--hover-strong); }
.calendar-box summary svg { flex-shrink: 0; }
.calendar-box .cal-hint { color: var(--ink-soft); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 0.8rem; margin-left: 0.2rem; }
.calendar-box summary::-webkit-details-marker { display: none; }
.calendar-box summary::after { content: '▾'; margin-left: auto; color: var(--ink-soft); }
.calendar-box[open] summary::after { content: '▴'; }
.calendar { padding: 0 1rem 0.8rem; max-width: 380px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.3rem; }
.cal-label { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 0.7rem; color: var(--ink-soft); padding: 0.2rem 0; text-transform: uppercase; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 3px; font-size: 0.85rem; color: var(--ink-soft); text-decoration: none; }
.cal-day.has { background: transparent; color: var(--ink); font-weight: 700; border: 1px solid var(--ink-soft); }
.cal-day.has:hover { background: var(--hover-strong); text-decoration: none; }
.cal-day.today { outline: 1px dashed var(--ink-soft); }
.cal-day.blank { visibility: hidden; }

/* Prompts */
.prompt-row { margin: -0.2rem 0 0.3rem; }
.prompt-row .hint { margin: 0; }
.prompt-row .link-btn { text-decoration: underline; color: var(--ink-soft); font-size: 0.8rem; }

/* Printable export */
.print-page { background: #fff; color: #111; }
.print-wrap { max-width: 720px; margin: 0 auto; padding: 1.5rem 1rem 3rem; font-size: 15px; line-height: 1.5; }
.print-toolbar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.print-page h1 { font-size: 1.4rem; }
.print-page .muted { color: #666; }
.print-entry { border-top: 1px solid #ddd; padding: 1rem 0; break-inside: avoid; }
.print-entry header { color: #666; font-size: 0.85rem; margin-bottom: 0.4rem; }
.print-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.print-extras { margin-top: 0.6rem; font-size: 0.9rem; color: #444; }
.print-comment { margin-top: 0.4rem; padding-left: 0.8rem; border-left: 2px solid #ddd; white-space: pre-wrap; }
@media print { .print-toolbar { display: none; } .print-wrap { padding: 0; } }
.badge.approved { color: var(--ok); border-color: var(--ok); }
.badge.rejected { color: var(--danger); border-color: var(--danger); }
.error-text { color: var(--danger); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.8rem; }
.notice { margin: 0.8rem 1rem; padding: 0.7rem 1rem; border: 1px solid var(--line-strong); border-left-width: 3px; border-radius: 0; background: transparent; font-size: 0.9rem; }
.notice.error { border-color: var(--danger); color: var(--danger); font-weight: 600; }

/* Panels / widgets (right column, cards) */
.card, .widget { background: transparent; border: 1px solid var(--line); border-radius: 0; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.card > :last-child, .widget > :last-child { margin-bottom: 0; }
.widget-sub { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.45; margin-bottom: 0.8rem; }

/* Collapsible right-column panels: the title is a button, the rest folds away */
.widget > h3.widget-toggle { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; cursor: pointer; user-select: none; margin: 0; }
.widget > h3.widget-toggle::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); transition: transform .15s ease; margin-right: 4px; flex-shrink: 0; }
.widget.collapsed > h3.widget-toggle::after { transform: rotate(-45deg); }
.widget > h3.widget-toggle:hover { color: var(--ink); }
.widget:not(.collapsed) > h3.widget-toggle { margin-bottom: 0.6rem; }
.widget.collapsed > :not(h3) { display: none; }
.widget.collapsed { padding-top: 0.75rem; padding-bottom: 0.75rem; }

/* Username search (joined journals) */
.search { display: flex; align-items: center; gap: 0.6rem; background: transparent; border-radius: 0; padding: 0.15rem 1rem; border: 1px solid var(--line-strong); }
.search:focus-within { border-color: var(--accent); background: var(--bg); }
.search svg { color: var(--ink-soft); flex-shrink: 0; }
.search input { border: none; background: transparent; margin: 0; padding: 0.55rem 0; }
.search input:focus { border: none; }
.search-results { margin: 0.4rem 0 0; padding: 0; list-style: none; }
.search-results li { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.3rem; border-radius: 2px; }
.search-results li:hover { background: var(--hover-strong); }
.search-results .who { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results .who span { display: block; color: var(--ink-soft); font-weight: 400; font-size: 0.85rem; }
.search-empty { color: var(--ink-soft); font-size: 0.85rem; padding: 0.5rem 0.3rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.5rem 0.25rem 0.7rem; border-radius: 2px; border: 1px solid var(--line-strong); font-weight: 600; font-size: 0.9rem; }
.chip button { background: none; border: none; color: var(--ink-soft); padding: 0 0.2rem; font-size: 1rem; line-height: 1; }
.chip button:hover { color: var(--danger); background: none; }

/* Profile header: banner + overlapping avatar */
.profile-head { border-bottom: 1px solid var(--line); }
.profile-banner { position: relative; aspect-ratio: 3 / 1; background: var(--panel); overflow: hidden; }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-edit { position: absolute; right: 0.6rem; bottom: 0.6rem; width: 36px; height: 36px; border-radius: 3px; background: rgb(0 0 0 / 0.6); border: 1px solid rgb(255 255 255 / 0.3); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.banner-edit:hover { background: rgb(0 0 0 / 0.8); }
.profile-body { padding: 0 1rem 1rem; }
.profile-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-top: -48px; margin-bottom: 0.6rem; position: relative; z-index: 1; }
.profile-top .avatar-circle.large { width: 96px; height: 96px; border: 3px solid var(--bg); outline: 1px solid var(--line-strong); background: var(--panel); }
.profile-top-actions { display: flex; gap: 0.5rem; padding-bottom: 0.3rem; }
.avatar-edit { position: relative; background: none; border: none; padding: 0; border-radius: 3px; cursor: pointer; display: inline-block; line-height: 0; }
.avatar-edit:hover { background: none; }
.avatar-edit:hover .avatar-circle img, .avatar-edit:hover .avatar-circle svg { filter: brightness(0.75); }
.avatar-edit-badge { position: absolute; right: 2px; bottom: 2px; width: 32px; height: 32px; border-radius: 3px; background: var(--panel); border: 2px solid var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.profile-name { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1.1; }
.profile-handle { color: var(--ink-soft); }
.profile-facts { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--ink-soft); margin-top: 0.7rem; font-size: 0.95rem; }
.profile-facts b { color: var(--ink); }

/* Crop editor dialogs (profile picture: circle, banner: wide 3:1) */
.crop-dialog { width: min(92vw, 420px); }
.crop-dialog .dialog-head .crop-save { margin-left: auto; }
.crop-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.crop-pick { text-align: center; padding: 1.2rem 0 0.4rem; }
.crop-pick label.btn, .crop-actions label.btn { cursor: pointer; }
.crop-stage { position: relative; margin: 0 auto; border-radius: 2px; overflow: hidden; background: #000; touch-action: none; user-select: none; }
.crop-stage.circle { width: 280px; height: 280px; }
.crop-stage.wide { width: 360px; height: 120px; max-width: 100%; }
.crop-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.crop-canvas:active { cursor: grabbing; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; border: 2px solid rgb(255 255 255 / 0.9); }
.crop-stage.circle .crop-mask { border-radius: 3px; box-shadow: 0 0 0 200px rgb(0 0 0 / 0.62); }
input[type="range"].crop-zoom { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--line-strong); padding: 0; margin: 0.2rem 0 0.8rem; border: none; }
input[type="range"].crop-zoom::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); cursor: pointer; }
input[type="range"].crop-zoom::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer; }
.crop-actions { display: flex; justify-content: center; }

/* Joined journals: picker list and members */
.journal-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.journal-row:hover { background: var(--hover); text-decoration: none; }
.journal-row.has-new { border-left: 3px solid var(--accent); padding-left: calc(1rem - 3px); }
.journal-row .badge.unread { flex-shrink: 0; }
.avatar-stack { display: flex; flex-shrink: 0; }
.avatar-stack .avatar-circle { width: 34px; height: 34px; margin-left: -10px; border: 2px solid var(--bg); outline: 1px solid var(--line-strong); }
.avatar-stack .avatar-circle:first-child { margin-left: 0; }
.avatar-more { width: 34px; height: 34px; margin-left: -10px; border-radius: 3px; background: var(--panel); border: 2px solid var(--bg); outline: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); }
.request-row.invite { border-left: 3px solid var(--accent); padding-left: calc(1rem - 3px); }
/* Inside a joined journal: members as a strip, actions in a small menu */
.member-strip { display: flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.member-strip::-webkit-scrollbar { display: none; }
.member-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.6rem 0.2rem 0.2rem; border: 1px solid var(--line); border-radius: 3px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.member-chip:hover { background: var(--hover-strong); text-decoration: none; }
.member-chip .avatar-circle { width: 26px; height: 26px; }
.member-add { width: 32px; height: 32px; padding: 0; flex-shrink: 0; background: transparent; color: var(--ink); border: 1px dashed var(--line-strong); font-size: 1.1rem; }
.member-add:hover { background: var(--hover-strong); }
.more-menu { position: relative; margin-left: auto; }
.more-menu summary { list-style: none; font-size: 1.3rem; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu-list { position: absolute; right: 0; top: 100%; z-index: 20; min-width: 190px; background: var(--bg); border: 1px solid var(--line-strong); padding: 0.3rem 0; }
.more-menu-list form { margin: 0; }
.more-item { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--ink); padding: 0.6rem 0.9rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: var(--caps); }
.more-item:hover { background: var(--hover-strong); }
.more-item.danger-text { color: var(--danger); }
.waiting-list { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.4rem; }
.waiting-item { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.9rem; }
.multi-author .post-username { font-size: 1rem; }
.multi-author .post.mine { border-left: 3px solid var(--line-strong); padding-left: calc(1rem - 3px); }
.journal-row-main { flex: 1; min-width: 0; }
.journal-row-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal-row-meta { color: var(--ink-soft); font-size: 0.85rem; display: flex; gap: 0.3rem; flex-wrap: wrap; align-items: center; }
.journal-row-arrow { color: var(--ink-soft); font-size: 1.4rem; }
.member-list { display: flex; flex-direction: column; gap: 0.4rem; }
.member-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0.2rem; border-radius: 2px; text-decoration: none; }
.member-item:hover { background: var(--hover-strong); text-decoration: none; }
.member-item .avatar-circle.small { width: 32px; height: 32px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results .state { color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
/* Joined journals */
.journal-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); border-left: 3px solid var(--line-strong); font-size: 0.9rem; }
.journal-bar form { margin: 0; }
.rename-form { display: flex; gap: 0.5rem; align-items: center; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); }
.rename-form input { margin: 0; flex: 1; }
.joined-name-row { margin-top: 0.6rem; }
.joined-name-row input { margin-bottom: 0.8rem; }
.journal-bar-text { flex: 1; min-width: 0; }
.journal-bar-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.link-btn { background: none; border: none; color: var(--ink-soft); padding: 0 0.2rem; font-size: 0.85rem; line-height: 1; }
.link-btn:hover { background: none; color: var(--danger); }
.request-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.request-row.compact { padding: 0.5rem 0; }
.request-row form { margin: 0; }
.request-row-text { flex: 1; min-width: 160px; }
.nav-icon-wrap { position: relative; display: inline-flex; }
.nav-count { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 2px; background: var(--accent); color: var(--on-accent); font-size: 0.7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.post-avatar { line-height: 0; }
.post-username:hover { text-decoration: underline; }
.search-results li button { flex-shrink: 0; }

/* Admin lists */
.user-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.user-row:hover { background: var(--hover); }
.user-main { flex: 1; min-width: 0; }
.user-name { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.user-meta { font-size: 0.88rem; color: var(--ink-soft); display: flex; gap: 0.4rem; flex-wrap: wrap; }
.user-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.user-actions form { margin: 0; }
.user-row.inactive .avatar-circle, .user-row.inactive .user-name > span:first-child { opacity: 0.5; }
.request-card { padding: 1rem; border-bottom: 1px solid var(--line); }
.request-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.request-name { font-weight: 800; font-size: 1.05rem; }
.request-email { margin: 0.2rem 0 0.4rem; font-size: 0.9rem; }
.request-message { margin: 0.5rem 0 0.9rem; padding: 0.6rem 0.9rem; border-left: 3px solid var(--line-strong); background: var(--panel); border-radius: 0 10px 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-message.empty { color: var(--ink-soft); font-style: italic; }
.request-actions { display: flex; gap: 0.7rem; align-items: flex-end; flex-wrap: wrap; }
.request-actions form { margin: 0; }
.request-actions .approve { display: flex; gap: 0.7rem; align-items: flex-end; flex: 1; min-width: 260px; }
.request-actions .approve > div { flex: 1; }
.request-actions input { margin-bottom: 0; }
.request-actions .hint { margin: 0.3rem 0 0; }
.resolved-row { display: flex; gap: 0.8rem; align-items: center; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.resolved-row .who { font-weight: 600; flex: 1; min-width: 140px; }
.resolved-row .meta { color: var(--ink-soft); font-size: 0.85rem; }
.credential { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.8rem 1rem; background: var(--bg); border: 1px dashed var(--line-strong); border-radius: 2px; margin-bottom: 0.8rem; }
.credential code { font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.section-title { padding: 0.9rem 1rem 0.5rem; font-family: var(--serif); font-size: 1.4rem; font-weight: 600; border-bottom: 1px solid var(--line); }

/* Stand-alone pages (login, request, password) */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.login-card { width: 100%; max-width: 400px; text-align: center; background: transparent; border: 1px solid var(--line-strong); border-radius: 0; padding: 2.4rem 2rem; }
.login-card h1 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.login-card form { text-align: left; margin-top: 1.4rem; }
.forgot-row { text-align: right; margin: -0.5rem 0 0.9rem; font-size: 0.85rem; }
.forgot-row a { color: var(--ink-soft); text-decoration: underline; }
.login-card input, .login-card textarea { background: var(--bg); }

.weirdum-toast { position: fixed; bottom: 4.5rem; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--accent); color: var(--on-accent); padding: 0.7rem 1.4rem; border-radius: 2px; font-weight: 700; font-size: 0.9rem; z-index: 100; opacity: 0; transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.weirdum-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ----------
   >=1280px  : full sidebar with labels | feed | right column
   1000-1279 : narrower sidebar, labels kept | feed | narrower right column
   700-999   : icon-only sidebar | feed (right column moves below the feed)
   <700      : bottom bar with icons + small labels; single column            */
@media (max-width: 1279px) {
  .layout { grid-template-columns: 200px minmax(0, 600px) 300px; }
  .nav-item { font-size: 1.05rem; gap: 0.8rem; padding: 0.6rem 0.8rem; }
  .nav-item svg { width: 24px; height: 24px; }
  .brand { font-size: 1.2rem; }
  .rightbar { padding: 0.6rem 1rem; }
}
@media (max-width: 999px) {
  .layout { grid-template-columns: 88px minmax(0, 600px); }
  .sidenav .label, .sidenav .nav-user .who, .brand span { display: none; }
  .nav-item, .brand, .nav-user { padding: 0.8rem; }
  .rightbar { grid-column: 2; position: static; max-height: none; padding: 0.6rem 1rem 1rem; }
  .feed-title-action { display: inline-flex; }
}
@media (max-width: 699px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidenav { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: 60px; flex-direction: row; justify-content: space-around; align-items: stretch; padding: 0; background: var(--bg); border-top: 1px solid var(--line); z-index: 30; }
  .sidenav .brand, .sidenav .nav-user, .sidenav .nav-admin, .sidenav .nav-logout { display: none; }
  .sidenav form { display: contents; }
  .nav-item { margin: 0; padding: 0.4rem 0.6rem 0.3rem; flex-direction: column; gap: 0.15rem; border-radius: 0; flex: 1; justify-content: center; width: auto; }
  .nav-item:hover { background: none; }
  .nav-item svg { width: 24px; height: 24px; }
  .sidenav .label { display: block; font-size: 0.55rem; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-soft); }
  .nav-item { min-width: 0; border-left: none; border-top: 2px solid transparent; letter-spacing: 0.06em; }
  .nav-item.active { border-top-color: var(--accent); }
  .nav-item.active .label { color: var(--ink); }
  .feed { border: none; padding-bottom: 68px; }
  .rightbar { grid-column: 1; padding-bottom: 5rem; }
  .action-btn { min-height: 44px; padding: 0.3rem 0.8rem; }
  .icon-btn { width: 44px; height: 44px; }
  .post-text { font-size: 1.05rem; } .comment-body { font-size: 0.95rem; } .composer textarea { font-size: 1.15rem; }
  .rightbar-about { border-top: 1px solid var(--line); margin-top: 0.5rem; }
  .rightbar-about summary { cursor: pointer; padding: 0.9rem 0.2rem; font-weight: 700; color: var(--ink-soft); list-style: none; }
  .rightbar-about summary::-webkit-details-marker { display: none; }
  .rightbar-about summary::after { content: ' ▾'; }
  .rightbar-about[open] summary::after { content: ' ▴'; }
  .jump-top { bottom: 4.8rem; }
  .login-logo .brand-logo { width: 104px; height: 104px; }
  .calendar { max-width: none; }
  .login-card { padding: 2rem 1.4rem; }
  .post-image img { max-height: 360px; }
  .request-actions { flex-direction: column; align-items: stretch; }
  .request-actions .approve { flex-direction: column; align-items: stretch; min-width: 0; }
  .profile-top { margin-top: -36px; }
  .profile-top .avatar-circle.large { width: 72px; height: 72px; }
  .user-row { flex-wrap: wrap; }
  .user-actions { width: 100%; justify-content: flex-start; }
  .user-actions button { width: auto; }
  .weirdum-toast { bottom: 5rem; }
}

/* ---------- Ledger ---------- */
.me-tabs { display: none; border-bottom: 1px solid var(--line); }
.ledger-tabs { border-bottom: 1px solid var(--line); }
.amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.in { color: var(--ok); }
.amt.neg { color: var(--danger); }
.wealth { padding: 1.4rem 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.wealth-big { font-family: var(--serif); font-size: 2.6rem; font-weight: 600; line-height: 1.1; margin: 0.3rem 0 0.5rem; }
.wealth-sub { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: 0.9rem; color: var(--ink-soft); }
.wealth-sub b { color: var(--ink); font-weight: 600; }
.wealth-sub b.neg { color: var(--danger); }
.acc-row { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 0.6rem; align-items: center; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); }
.acc-row:hover { background: var(--hover); }
.acc-form { display: grid; grid-template-columns: 1fr 110px 130px auto; gap: 0.5rem; align-items: center; margin: 0; }
.acc-form input, .acc-form select { margin: 0; padding: 0.5rem 0.6rem; font-size: 15px; }
.acc-form .amt-input { text-align: right; font-variant-numeric: tabular-nums; }
.amt-wrap { display: flex; min-width: 0; }
.amt-wrap .sign-toggle { padding: 0 0.55rem; font-size: 1rem; font-weight: 600; border-right: none; flex-shrink: 0; }
.amt-wrap input { flex: 1; min-width: 0; }
.acc-row.add { grid-template-columns: 1fr; border-bottom: 1px solid var(--line); background: transparent; }
.acc-row > form:not(.acc-form) { margin: 0; }
.acc-row > form:not(.acc-form) button { width: 36px; padding: 0.5rem 0; }
.acc-hint { grid-column: 1 / -1; }
.acc-hint b { color: var(--ink); font-weight: 600; }
.acc-hint b.neg { color: var(--danger); }
.day-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 0.2rem 0.8rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); align-items: start; }
.day-row.lowest { border-left: 3px solid var(--danger); padding-left: calc(1rem - 3px); }
.day-row-date { line-height: 1.2; }
.day-row-date b { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: var(--caps); color: var(--ink-soft); }
.day-row-date span { font-weight: 600; white-space: nowrap; }
.day-row-after { text-align: right; line-height: 1.2; }
.day-row-after span { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--caps); }
.day-row-after b { font-weight: 600; }
.day-row-after b.neg { color: var(--danger); }
.ev { display: flex; align-items: center; gap: 0.5rem; padding: 0.15rem 0; min-width: 0; }
.ev-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-acc { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .amt { margin-left: auto; }
.ev.skipped .ev-name, .ev.skipped .amt, .ev.skipped .ev-acc { text-decoration: line-through; color: var(--ink-soft); opacity: 0.7; }
.ev-skip { margin: 0; }
.ev-skip button { padding: 0.2rem 0.5rem; font-size: 0.6rem; min-height: 0; }
.flow-row { border-bottom: 1px solid var(--line); }
.flow-row > summary { list-style: none; display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 1rem; cursor: pointer; }
.flow-row > summary::-webkit-details-marker { display: none; }
.flow-row > summary:hover { background: var(--hover); }
.flow-row[open] > summary { background: var(--hover-strong); }
.flow-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.flow-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-next { white-space: nowrap; }
.flow-edit { display: flex; gap: 1rem; padding: 0.6rem 1rem 1rem; align-items: flex-start; flex-wrap: wrap; }
.flow-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem 0.6rem; flex: 1; min-width: 0; margin: 0; }
.flow-form.add { padding: 0.8rem 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.flow-form label.stacked { margin: 0; }
.flow-form input, .flow-form select { margin: 0.25rem 0 0; padding: 0.5rem 0.6rem; font-size: 15px; display: block; }
.flow-form label:nth-child(1) { grid-column: span 2; }
.flow-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-top: 0.3rem; }
.flow-side { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1.35rem; }
.flow-side form { margin: 0; }
.lcal-pager { position: static; }
.lcal-summary { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-soft); }
.lcal-summary b { color: var(--ink); font-weight: 600; }
.lcal-summary b.neg { color: var(--danger); }
.lcal { display: grid; grid-template-columns: repeat(7, 1fr); }
.lcal-head { display: contents; }
.lcal-head span { padding: 0.5rem 0.3rem 0.3rem; text-align: center; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: var(--caps); color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.lcal-cell { min-height: 84px; padding: 0.3rem 0.35rem 0.4rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.lcal-cell:nth-child(7n + 1) { border-right: none; }
.lcal-cell.out { opacity: 0.35; }
.lcal-cell.past:not(.out) { opacity: 0.55; }
.lcal-cell.today { box-shadow: inset 0 0 0 1px var(--accent); }
.lcal-cell.lowest { box-shadow: inset 3px 0 0 var(--danger); }
.lcal-date { font-size: 0.75rem; font-weight: 700; color: var(--ink-soft); }
.lcal-date .full { display: none; }
.lcal-cell.today .lcal-date { color: var(--ink); }
.lcal-events .ev { font-size: 0.72rem; gap: 0.25rem; flex-wrap: wrap; }
.lcal-events .ev .amt { margin-left: 0; }
.lcal-events .ev-skip { display: none; }
.lcal-cell:hover .ev-skip, .lcal-cell:focus-within .ev-skip { display: block; }
.lcal-after { margin-top: auto; font-size: 0.72rem; text-align: right; }
.lcal-after b { font-weight: 600; }
.lcal-after b.neg { color: var(--danger); }
.on-form { padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); margin: 0; }
.on-form-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.35rem; }
.on-form-row input { margin: 0; max-width: 220px; }
.on-shortcuts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.on-shortcuts a { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: var(--caps); color: var(--ink-soft); padding: 0.35rem 0.6rem; border: 1px solid var(--line); }
.on-shortcuts a:hover, .on-shortcuts a.active { color: var(--ink); border-color: var(--line-strong); text-decoration: none; }
.on-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); }
.on-name { flex: 1; min-width: 0; }
.on-row > b { font-weight: 600; }
.on-row > b.neg { color: var(--danger); }
@media (max-width: 699px) {
  .sidenav .nav-ledger { display: none; }
  .nav-item.active-mobile { border-top-color: var(--accent); }
  .nav-item.active-mobile .label { color: var(--ink); }
  .me-tabs { display: flex; }
  .acc-form { grid-template-columns: 1fr 1fr; }
  .acc-form input[name="name"] { grid-column: 1 / -1; }
  .acc-form .amt-wrap { grid-column: 1; }
  .acc-form button { grid-column: 2; }
  .acc-row { grid-template-columns: 1fr auto; }
  .flow-form { grid-template-columns: 1fr 1fr; }
  .flow-form label:nth-child(1) { grid-column: 1 / -1; }
  .flow-row > summary { flex-wrap: wrap; }
  .flow-main { flex-basis: 100%; }
  .day-row { grid-template-columns: 56px 1fr; }
  .day-row-after { grid-column: 2; text-align: left; display: flex; gap: 0.4rem; align-items: baseline; }
  .lcal { display: block; }
  .lcal-head { display: none; }
  .lcal-cell { display: none; border-right: none; min-height: 0; padding: 0.6rem 1rem; }
  .lcal-cell.has, .lcal-cell.today { display: flex; }
  .lcal-cell.out.has { display: none; }
  .lcal-cell.past:not(.out) { opacity: 0.7; }
  .lcal-cell.today { box-shadow: none; border-left: 3px solid var(--accent); padding-left: calc(1rem - 3px); }
  .lcal-cell.lowest { box-shadow: none; border-left: 3px solid var(--danger); padding-left: calc(1rem - 3px); }
  .lcal-date .num { display: none; }
  .lcal-date .full { display: inline; font-size: 0.85rem; color: var(--ink); }
  .lcal-events .ev { font-size: 0.9rem; gap: 0.5rem; }
  .lcal-events .ev .amt { margin-left: auto; }
  .lcal-events .ev-skip { display: block; }
  .lcal-after { font-size: 0.85rem; }
}
