/* ---------- tokens ---------- */
:root {
  --desk: #DCDDD8;
  --ground: #EEEFEC;
  --surface: #FFFFFF;
  --surface-2: #E4E6E2;
  --ink: #17191A;
  --ink-2: #5D6361;
  --ink-3: #939895;
  --line: #DADDD8;
  --accent: #2C5A4B;
  --accent-ink: #FFFFFF;
  --accent-soft: #DCE8E2;
  --tape: #CFE3D7;
  --tape-ink: #1F3B30;
  --warn: #3D6B58;
  --warn-soft: #E6F0EA;
  --sealed: #2C5A4B;
  --sealed-soft: #DCE8E2;
  --packing: #3D6B58;
  --packing-soft: #E6F0EA;
  --unpacked: #7A7F7C;
  --unpacked-soft: #E4E6E2;
  --danger: #B3402F;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 8px 24px rgba(20, 30, 25, .07);
  --display: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --body: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --stencil: "Big Shoulders Stencil Display", "Manrope", Impact, sans-serif;
  --top: max(env(safe-area-inset-top), 14px);
  --bottom: max(env(safe-area-inset-bottom), 12px);
  --ease: cubic-bezier(.2, .85, .25, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --desk: #0B0C0C; --ground: #121414; --surface: #1B1E1D; --surface-2: #262A28;
    --ink: #EEF0ED; --ink-2: #A5ABA8; --ink-3: #6F7572; --line: #2C302E;
    --accent: #86BFA7; --accent-ink: #0E1A15; --accent-soft: #1D2E27;
    --tape: #9FD0B5; --tape-ink: #10241B;
    --warn: #9FD0B5; --warn-soft: #1F2E27;
    --sealed: #86BFA7; --sealed-soft: #1D2E27; --packing: #9FD0B5; --packing-soft: #1F2E27;
    --unpacked: #8E9491; --unpacked-soft: #262A28; --danger: #F09A88;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  --desk: #0B0C0C; --ground: #121414; --surface: #1B1E1D; --surface-2: #262A28;
  --ink: #EEF0ED; --ink-2: #A5ABA8; --ink-3: #6F7572; --line: #2C302E;
  --accent: #86BFA7; --accent-ink: #0E1A15; --accent-soft: #1D2E27;
  --tape: #9FD0B5; --tape-ink: #10241B;
  --warn: #9FD0B5; --warn-soft: #1F2E27;
  --sealed: #86BFA7; --sealed-soft: #1D2E27; --packing: #9FD0B5; --packing-soft: #1F2E27;
  --unpacked: #8E9491; --unpacked-soft: #262A28; --danger: #F09A88;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
}

/* ---------- base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 15px/1.4 var(--body); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.ic { flex-shrink: 0; display: block; }
h1, h2, h3, p { margin: 0; }
mark { background: var(--tape); color: var(--tape-ink); border-radius: 3px; padding: 0 2px; }

/* ---------- desk + device ---------- */
.desk { height: 100dvh; display: flex; align-items: center; justify-content: center; gap: 72px; }
.desk-note { display: none; }
.phone { position: relative; width: 100vw; height: 100dvh; overflow: hidden; background: var(--ground); isolation: isolate; }
.device-status { display: none; }

@media (min-width: 560px) {
  .desk { padding-inline: 24px; }
  .phone {
    width: 390px; height: min(844px, calc(100dvh - 40px)); border-radius: 56px; flex-shrink: 0;
    box-shadow: 0 0 0 10px #151716, 0 0 0 11.5px #3A3D3B, 0 50px 90px -20px rgba(0,0,0,.35);
    --top: 54px; --bottom: 24px;
  }
  .device-status {
    display: flex; position: absolute; z-index: 90; inset: 0 0 auto; height: 50px; padding: 0 34px 0 44px;
    align-items: center; justify-content: space-between; font: 600 15px/1 var(--body); pointer-events: none; color: var(--ink);
  }
  .device-status.on-dark { color: #fff; }
  .island { width: 118px; height: 34px; border-radius: 20px; background: #0A0A0A; margin-top: 2px; }
  .device-icons { display: flex; gap: 5px; align-items: center; }
  .device-icons i { width: 16px; height: 10px; border-radius: 3px; background: currentColor; opacity: .9; }
  .device-icons i:last-child { width: 24px; border-radius: 4px; }
}
@media (min-width: 980px) {
  .desk-note { display: block; max-width: 320px; color: var(--ink-2); }
  .desk-name { font: 700 22px/1 var(--display); color: var(--ink); letter-spacing: -.02em; }
  .desk-name span { font: 500 13px/1 var(--body); color: var(--ink-3); margin-left: 8px; }
  .desk-note h1 { font: 600 30px/1.08 var(--display); color: var(--ink); letter-spacing: -.02em; margin: 18px 0 20px; text-wrap: balance; }
  .desk-note ol { padding-left: 20px; margin: 10px 0 20px; display: grid; gap: 8px; }
  .desk-note b { color: var(--ink); font-weight: 600; }
  .desk-fine { font-size: 13px; color: var(--ink-3); }
}

/* ---------- screens + transitions ---------- */
#stack { position: absolute; inset: 0; }
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--ground); overflow: hidden; isolation: isolate;
  transition: transform .46s var(--ease), filter .46s var(--ease), opacity .3s ease;
}
.screen.pre, .screen.out { transform: translateX(100%); }
.screen.behind { transform: translateX(-22%); filter: brightness(.92); }
.screen.is-modal { transition: transform .4s var(--ease), opacity .28s ease; }
.screen.is-modal.pre, .screen.is-modal.out { transform: translateY(5%); opacity: 0; }
.screen.fade.pre, .screen.fade.out { transform: none; opacity: 0; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--top) 20px 132px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .screen, .sheet, .scrim, #toast { transition-duration: .01s !important; } }

/* ---------- type ---------- */
.display { font: 800 34px/1.04 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.display.xl { font-size: 42px; line-height: 1; letter-spacing: -.04em; }
.stencil { font-family: var(--stencil); font-weight: 800; }
.eyebrow, .kicker { font: 500 14px/1.25 var(--body); color: var(--ink-3); }
.meta { color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.micro { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 12px; }
.section-label { font: 700 15px/1.2 var(--body); color: var(--ink); }
.section-head .count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); font-size: 13px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 20px; border-radius: 18px; font-weight: 600; font-size: 16px; transition: transform .15s ease, background .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn-primary { background: var(--ink); color: var(--ground); }
.btn-camera { background: var(--accent); color: var(--accent-ink); flex: 1; }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost { color: var(--ink-2); height: 48px; }
.btn-light { background: #fff; color: #111; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.icon-btn:active { background: var(--surface-2); }
.glass { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(18, 20, 19, .42); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.link { color: var(--accent); font-weight: 600; padding: 10px 4px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--ink); }
.chip.on { background: var(--ink); color: var(--ground); box-shadow: none; }
.chip.tag { background: var(--surface-2); box-shadow: none; height: 30px; font-size: 13.5px; padding: 0 11px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding-inline: 20px; }
.chips.row::-webkit-scrollbar { display: none; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font: 600 12px/1 var(--body); }
.pill.packing { background: var(--packing-soft); color: var(--packing); }
.pill.sealed { background: var(--sealed); color: var(--accent-ink); }
.pill.unpacked { background: var(--unpacked-soft); color: var(--unpacked); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.packing { background: var(--packing); } .dot.sealed { background: var(--sealed); } .dot.unpacked { background: var(--unpacked); }

.dock { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 28px 16px calc(var(--bottom) + 6px); background: linear-gradient(to top, var(--ground) 62%, transparent); }
.searchpill { flex: 1; height: 54px; border-radius: 18px; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 15px; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin: -6px -10px 10px; min-height: 44px; }
.back { display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 10px 0 4px; color: var(--ink); font-weight: 500; max-width: 70%; }
.back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; }

/* ---------- nudges ---------- */
.nudges { display: grid; gap: 8px; margin-top: 22px; }
.nudge { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--warn-soft); color: var(--ink); }
.nudge > .ic { color: var(--warn); }
.nudge-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.nudge-text small { display: block; color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.nudge-btn { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 12px; background: var(--ink); color: var(--ground); font-weight: 600; font-size: 13.5px; }
.nudge.quiet { background: var(--surface-2); }
.nudge.backup { background: var(--accent-soft); }
.nudge.backup > .ic { color: var(--accent); }
.nudge-actions { flex-shrink: 0; display: grid; justify-items: center; gap: 2px; }
.nudge-later { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 4px 8px; }
.nudge.quiet > .ic { color: var(--ink-2); }
.nudge.fresh { animation: nudgeIn .5s var(--ease) both; }
@keyframes nudgeIn { from { transform: translateY(8px); opacity: .2; } }

/* ---------- home ---------- */
.home-head { padding-top: 10px; }
.brand { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.wordmark { font: 700 21px/1 var(--display); letter-spacing: -.03em; }
.wordmark::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--tape); margin-left: 3px; }
.home-head .eyebrow { margin-bottom: 10px; }
.home-sub { margin-top: 12px; font: 600 13px/1.3 var(--body); color: var(--ink-3); }
.searchbar { margin-top: 24px; width: 100%; height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink-3); font-size: 16px; transition: transform .15s; }
.searchbar .ic { color: var(--ink); }
.searchbar:active { transform: scale(.985); }
.try { display: flex; align-items: center; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding-inline: 20px; }
.try::-webkit-scrollbar { display: none; }
.try > span { font-size: 13px; color: var(--ink-3); margin-right: 2px; }
.try .chip { height: 32px; background: transparent; }

.sessions { display: grid; gap: 28px; }
.session { display: block; width: 100%; }
.cover-wrap { position: relative; }
.cover { height: 196px; border-radius: 22px; overflow: hidden; display: grid; gap: 3px; background: var(--surface-2); transition: transform .2s var(--ease); }
.session:active .cover { transform: scale(.985); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.c3 { grid-template-columns: 1.7fr 1fr; grid-template-rows: 1fr 1fr; }
.cover.c3 img:first-child { grid-row: span 2; }
.cover.c2 { grid-template-columns: 1fr 1fr; }
.cover-empty { place-items: center; align-content: center; gap: 8px; color: var(--ink-3); font-size: 13px; background: repeating-linear-gradient(-45deg, var(--surface-2) 0 10px, transparent 10px 20px), var(--ground); box-shadow: inset 0 0 0 1.5px var(--line); }
.type-tag { position: absolute; top: 12px; left: 12px; height: 26px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; background: rgba(18,20,19,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font: 600 12.5px/1 var(--body); }
.session-info { padding: 14px 2px 0; }
.session-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.session-name { font: 600 24px/1.1 var(--display); letter-spacing: -.02em; }
.session-top .ic { color: var(--ink-3); }
.session-info .meta { margin-top: 4px; }
.mini-progress { height: 4px; border-radius: 4px; background: var(--surface-2); margin: 12px 0 8px; overflow: hidden; }
.mini-progress span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* ---------- session ---------- */
.page-head { margin-top: 8px; }
.page-head .kicker { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.page-head .meta { margin-top: 8px; }
.progress { margin-top: 20px; }
.bar { display: flex; gap: 3px; height: 8px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.bar span { border-radius: 2px; transition: flex .5s var(--ease); }
.seg-packing { background: var(--tape); } .seg-sealed { background: var(--sealed); } .seg-unpacked { background: var(--unpacked); opacity: .45; }
.legend { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot.packing { background: var(--tape); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 12px; }
.tile { display: block; width: 100%; min-width: 0; }
.tile-photo { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--surface-2); transition: transform .2s var(--ease); }
.tile:active .tile-photo { transform: scale(.97); }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.tile-photo .pill { position: absolute; top: 9px; left: 9px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.tile-photo.is-empty { display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--ink-3); font-size: 12.5px; box-shadow: inset 0 0 0 1.5px var(--line); background: repeating-linear-gradient(-45deg, var(--surface-2) 0 8px, transparent 8px 16px), var(--ground); }
.tile-body { padding: 10px 2px 0; }
.tile-name { font: 600 17px/1.15 var(--display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-name.stencil { font-family: var(--stencil); font-size: 22px; line-height: 1; }
.tile-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-counts { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.tile.is-unpacked .tile-photo img { filter: grayscale(1) contrast(.9); opacity: .55; }
.tile.is-unpacked .tile-name, .tile.is-unpacked .tile-sub { color: var(--ink-3); }
.tile.is-new .tile-photo { animation: pop .6s var(--ease); }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.03); opacity: 1; } }
.add-tile .tile-photo { display: grid; place-content: center; justify-items: center; gap: 8px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); font-weight: 600; font-size: 14px; }
.add-tile .tile-photo .ic { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); }
.history-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; margin: 34px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.history-toggle .ic { color: var(--ink-3); transition: transform .3s var(--ease); }
.history-toggle[aria-expanded="true"] .ic { transform: rotate(90deg); }
.history-note { font-size: 13px; color: var(--ink-3); margin: -4px 0 14px; }

.empty { text-align: center; padding: 36px 12px 10px; display: grid; justify-items: center; gap: 8px; }
.empty-art { width: 132px; height: 132px; border-radius: 30px; display: grid; place-items: center; margin-bottom: 10px; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); background: repeating-linear-gradient(-45deg, var(--surface-2) 0 8px, transparent 8px 16px), var(--ground); }
.empty h3 { font: 600 22px/1.15 var(--display); letter-spacing: -.02em; }
.empty p { color: var(--ink-2); max-width: 30ch; text-wrap: balance; }
.empty .btn { margin-top: 14px; }

/* ---------- container ---------- */
.c-head { margin-top: 6px; }
.c-head .kicker { margin-bottom: 12px; display: block; }
.box-label { display: inline-flex; align-items: baseline; gap: 12px; padding: 8px 16px 6px; background: var(--tape); color: var(--tape-ink); border-radius: 3px; transform: rotate(-1.2deg); box-shadow: 0 1px 0 rgba(0,0,0,.08); position: relative; }
.box-label::before, .box-label::after { content: ""; position: absolute; top: 0; bottom: 0; width: 8px; background: inherit; clip-path: polygon(0 0, 100% 10%, 30% 25%, 100% 42%, 20% 60%, 100% 78%, 40% 90%, 100% 100%, 0 100%); }
.box-label::before { left: -7px; transform: scaleX(-1); } .box-label::after { right: -7px; }
.box-label .stencil { font-size: 46px; line-height: .9; }
.box-label small { font: 600 14px/1 var(--body); }
.c-head .meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.c-head .meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta .ok { color: var(--sealed); font-weight: 600; } .meta .todo { color: var(--warn); font-weight: 600; }

.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 18px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.seg button { position: relative; z-index: 1; height: 42px; border-radius: 12px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; transition: color .25s; }
.seg button.on { color: var(--ink); }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); transform: translateX(calc(var(--i) * 100%)); background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); transition: transform .32s var(--ease); }
.c-nudges { display: grid; gap: 8px; margin-top: 14px; }

.feed { display: grid; gap: 30px; }
.shot { margin: 0; }
.shot-img { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: var(--surface-2); }
.shot-img img { width: 100%; height: 100%; object-fit: cover; }
.shot.is-new .shot-img { animation: develop .9s var(--ease); }
@keyframes develop { from { filter: brightness(2.2) saturate(0); transform: scale(.96); } }
.shot figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 12px 2px 10px; }
.shot-n { font-weight: 600; font-variant-numeric: tabular-nums; }
.shot-spot { color: var(--ink-2); font-size: 14px; }


.loose { list-style: none; margin: 0; padding: 0; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.loose li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.loose li + li { border-top: 1px solid var(--line); }
.loose .ic { color: var(--ink-3); }
.empty-shot { margin-top: 26px; display: grid; gap: 8px; }
.empty-shot .shot-img { display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--ink-2); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line); background: repeating-linear-gradient(-45deg, var(--surface-2) 0 10px, transparent 10px 20px), var(--ground); }
.empty-shot .shot-img .ic { width: 64px; height: 64px; padding: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.empty-shot h3 { font: 600 22px/1.15 var(--display); letter-spacing: -.02em; margin-top: 12px; }
.empty-shot p { color: var(--ink-2); }

/* ---------- search ---------- */
.search-top { display: flex; align-items: center; gap: 8px; padding: var(--top) 16px 10px; }
.search-field { flex: 1; height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; }
.search-field input::-webkit-search-cancel-button { display: none; }
.scope { display: flex; gap: 8px; padding: 2px 16px 6px; }
.scope .chip { height: 32px; }
.view-search .scroll { padding-top: 8px; }
.results-count { font-size: 13px; color: var(--ink-3); margin: 10px 0 14px; }
.recent { list-style: none; padding: 0; margin: 0 0 8px; }
.recent button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 2px; font-size: 16px; border-bottom: 1px solid var(--line); }
.recent .ic { color: var(--ink-3); }

.result { width: 100%; display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.result:active { opacity: .7; }
.r-thumb { position: relative; width: 84px; height: 84px; border-radius: 16px; overflow: hidden; flex-shrink: 0; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.r-thumb img { width: 100%; height: 100%; object-fit: cover; }
.r-thumb.dashed { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.r-text { flex: 1; min-width: 0; }
.r-item { font-size: 14px; color: var(--ink-2); }
.r-where { font: 700 23px/1.08 var(--display); letter-spacing: -.02em; margin: 3px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-where.stencil { font-family: var(--stencil); font-size: 28px; line-height: .95; }
.r-where.todo { color: var(--warn); font-size: 19px; }
.r-detail { font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.r-session { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.r-go { color: var(--ink-3); }

.rc { border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 18px; }
.rc-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px; }
.rc-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: 4px; overflow-x: auto; padding: 0 14px; scrollbar-width: none; }
.rc-strip::-webkit-scrollbar { display: none; }
.rc-strip button { aspect-ratio: 4/5; border-radius: 12px; overflow: hidden; position: relative; }
.rc-strip img { width: 100%; height: 100%; object-fit: cover; }
.rc-strip span { position: absolute; left: 6px; bottom: 6px; font: 600 11px/1 var(--body); color: #fff; background: rgba(0,0,0,.45); padding: 4px 6px; border-radius: 6px; }
.rc-items { padding: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.rc-items .chip { height: 30px; font-size: 13.5px; }
.no-results { text-align: center; padding: 56px 20px; }
.no-results h3 { font: 600 22px/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 8px; text-wrap: balance; }
.no-results p { color: var(--ink-2); }

/* ---------- dark full-bleed screens (camera, tagging, viewer) ---------- */
.dark { background: #0C0D0D; color: #fff; }
.dark-top { display: flex; align-items: center; justify-content: space-between; padding: var(--top) 16px 10px; }
.dark-title { text-align: center; font-weight: 600; }
.dark-title small { display: block; font-weight: 500; font-size: 12.5px; color: rgba(255,255,255,.6); margin-top: 1px; }
.spacer-44 { width: 44px; }

.viewfinder { position: relative; flex: 1; min-height: 0; margin: 0 12px; border-radius: 26px; overflow: hidden; background: #000; }
.viewfinder img { width: 100%; height: 100%; object-fit: cover; animation: handheld 5s ease-in-out infinite alternate; transform-origin: 50% 50%; }
.viewfinder video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; }
.viewfinder.is-live video { opacity: 1; }
.viewfinder.is-live .vf-sample { visibility: hidden; }
@keyframes handheld { 0% { transform: scale(1.06) translate(0, 0) rotate(0); } 50% { transform: scale(1.07) translate(-1.2%, .8%) rotate(.4deg); } 100% { transform: scale(1.06) translate(.8%, -.6%) rotate(-.3deg); } }
.vf-grid { position: absolute; inset: 0; background:
  linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.22) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.22) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
  linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255,255,255,.22) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.22) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.vf-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.vf-flash.go { animation: flash .35s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.cam-hint { text-align: center; font-size: 13.5px; color: rgba(255,255,255,.66); padding: 14px 30px 0; }
.cam-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 28px calc(var(--bottom) + 10px); }
.shutter { width: 80px; height: 80px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; }
.shutter span { width: 64px; height: 64px; border-radius: 50%; background: #fff; transition: transform .12s ease; }
.shutter:active span { transform: scale(.86); }
.cam-side { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.72); cursor: pointer; }
.cam-side .ic, .cam-side img { width: 48px; height: 48px; border-radius: 14px; }
.cam-side .ic { padding: 12px; background: rgba(255,255,255,.12); }
.cam-side img { object-fit: cover; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.cam-side.right { justify-self: end; } .cam-side.left { justify-self: start; }

.screen.view-tag { background: var(--ground); }
.tag-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 16px; background: #0C0D0D; }
.tag-frame { position: relative; height: 100%; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 22px; overflow: hidden; }
.tag-frame img { width: 100%; height: 100%; object-fit: cover; }
.screen.view-tag .dark-top { background: #0C0D0D; color: #fff; }
.tag-panel { padding: 16px 20px calc(var(--bottom) + 8px); background: var(--ground); border-radius: 26px 26px 0 0; margin-top: -22px; position: relative; z-index: 2; display: grid; gap: 12px; }
.tag-form { display: flex; gap: 8px; }
.tag-form input { flex: 1; min-width: 0; height: 52px; border-radius: 16px; border: 0; outline: 0; padding: 0 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; }
.tag-form input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.tag-form .btn { height: 52px; padding: 0 18px; border-radius: 16px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.tag-list .chip.tag { padding: 0 4px 0 11px; gap: 0; }
.tag-list .chip.tag.on { background: var(--tape); color: var(--tape-ink); }
.chip-x { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: inherit; opacity: .6; }
.tag-hint { font-size: 13.5px; color: var(--ink-2); }
.tag-hint b { color: var(--ink); font-weight: 600; }
.quick-label { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-bottom: -4px; }
.tag-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.tag-actions .btn { height: 52px; font-size: 15px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 12px; }
.viewer-stage .frame { position: relative; height: 100%; aspect-ratio: 4/5; max-width: 100%; border-radius: 22px; overflow: hidden; }
.viewer-stage .frame img { width: 100%; height: 100%; object-fit: cover; }
.viewer-panel { padding: 18px 20px calc(var(--bottom) + 8px); display: grid; gap: 4px; }
.found-kicker { display: flex; align-items: center; gap: 6px; font-size: 14px; color: rgba(255,255,255,.7); }
.found-where { font: 700 34px/1 var(--display); letter-spacing: -.025em; }
.found-where.stencil { font-family: var(--stencil); font-size: 46px; line-height: .9; color: var(--tape); }
.found-detail { color: rgba(255,255,255,.72); font-size: 15px; margin-bottom: 4px; }
.viewer-panel .chips { margin: 6px 0 14px; }
.viewer-panel .chip.tag { background: rgba(255,255,255,.12); color: #fff; }
.viewer-panel .chip.tag.is-hit { background: var(--tape); color: var(--tape-ink); font-weight: 600; }

/* ---------- sheets ---------- */
#sheet-layer { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
#sheet-layer.open { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(10, 14, 12, .42); opacity: 0; transition: opacity .32s ease; }
.open .scrim { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 90%; overflow-y: auto; background: var(--surface); color: var(--ink); border-radius: 30px 30px 0 0; padding: 10px 20px calc(var(--bottom) + 12px); transform: translateY(104%); transition: transform .46s var(--ease); box-shadow: 0 -10px 40px rgba(0,0,0,.12); }
.open .sheet { transform: none; }
.grabber { width: 38px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 18px; }
.sheet-body { display: grid; gap: 18px; }
.sheet-title { font: 700 26px/1.08 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.sheet-sub { color: var(--ink-2); margin-top: -10px; text-wrap: pretty; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input { height: 52px; border-radius: 16px; border: 0; outline: 0; padding: 0 16px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; }
.field input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.hint { font-size: 12.5px; color: var(--ink-3); }
.sheet .chip { background: var(--ground); }
.sheet .chip.on { background: var(--ink); color: var(--surface); }
.sheet .btn-primary { color: var(--surface); }

.type-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-opt { position: relative; display: grid; gap: 2px; padding: 16px; border-radius: 20px; background: var(--ground); box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .2s, background .2s; }
.type-opt .ic { margin-bottom: 14px; color: var(--ink-2); }
.type-opt b { font: 600 20px/1.1 var(--display); letter-spacing: -.01em; }
.type-opt small { color: var(--ink-2); font-size: 13px; }
.type-opt .radio { position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); }
.type-opt.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.type-opt.on .ic { color: var(--accent); }
.type-opt.on .radio { box-shadow: inset 0 0 0 7px var(--accent); }

.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pick-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; }
.pick-list button:active { background: var(--ground); }
.pick-list .r-thumb { width: 56px; height: 56px; border-radius: 12px; }
.pick-list b { display: block; font: 600 17px/1.2 var(--display); }
.pick-list small { color: var(--ink-2); font-size: 13px; }
.pick-list .chev { margin-left: auto; color: var(--ink-3); }

.added { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.added li { display: flex; align-items: center; gap: 10px; font-size: 15px; animation: nudgeIn .35s var(--ease); }
.added li .ic { color: var(--sealed); }

/* label reminder illustration */
.label-art { height: 170px; border-radius: 20px; display: grid; place-items: center; background: var(--ground); overflow: hidden; }
.la-stage { position: relative; width: 362px; max-width: 100%; height: 170px; }
.la-photo { position: absolute; left: 76px; top: 19px; width: 246px; height: 134px; object-fit: cover; transform: rotate(-2deg); box-shadow: 0 14px 28px -14px rgba(40, 30, 15, .45); }
.la-label { position: absolute; left: 48px; top: 82px; width: 73px; height: 66px; border-radius: 4px; transform: rotate(-2deg); display: grid; place-content: center; text-align: center; border: 2px dashed var(--ink-3); color: var(--ink-2); font-size: 11px; font-weight: 600; line-height: 1.15; }
.la-label .filled { position: absolute; inset: -2px; border-radius: 4px; background: #F6F2E8; display: grid; place-content: center; color: #1E1B16; transform: translateY(-40px) rotate(-8deg); opacity: 0; }
.la-label .filled .stencil { font-size: 22px; line-height: .9; }
.la-check { position: absolute; left: 104px; top: 68px; width: 30px; height: 30px; border-radius: 50%; background: var(--sealed); color: #fff; display: grid; place-items: center; transform: scale(0); }
.la-label .filled small { font: 600 12px/1 var(--body); }
.stamped .la-label .filled { animation: slap .45s var(--ease) forwards; }
.stamped .la-check { animation: popIn .4s .35s var(--ease) forwards; }
@keyframes slap { to { transform: none; opacity: 1; } }
@keyframes popIn { 60% { transform: scale(1.15); } to { transform: scale(1); } }

/* ---------- toast ---------- */
#toast { position: absolute; z-index: 80; left: 50%; bottom: calc(var(--bottom) + 84px); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 40px); padding: 11px 16px; border-radius: 999px; background: var(--ink); color: var(--ground); font-weight: 500; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: transform .35s var(--ease), opacity .25s; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast .ic { color: var(--tape); }
#sheet-layer.open ~ #toast { bottom: auto; top: calc(var(--top) + 6px); transform: translate(-50%, -16px); }
#sheet-layer.open ~ #toast.show { transform: translate(-50%, 0); }

/* ---------- plans ---------- */
.plan-chip { height: 30px; padding: 0 12px; border-radius: 999px; font: 600 12.5px/1 var(--body); color: var(--accent); background: var(--accent-soft); }
.plan-chip.is-paid { background: var(--accent); color: var(--accent-ink); }
.text-btn { height: 44px; padding: 0 10px; font-weight: 600; color: var(--accent); }
.link-quiet { justify-self: center; padding: 4px 8px; font-size: 14px; font-weight: 600; color: var(--accent); }
.plans-reason { justify-self: start; padding: 8px 12px; border-radius: 12px; font: 600 13px/1.3 var(--body); color: var(--accent); background: var(--accent-soft); }
.plan-list { display: grid; gap: 10px; }
.plan-opt { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; background: var(--ground); box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .2s, background .2s; }
.plan-opt.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.plan-opt .radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); }
.plan-opt.on .radio { box-shadow: inset 0 0 0 7px var(--accent); }
.plan-main { display: grid; gap: 3px; min-width: 0; }
.plan-main b { font: 700 17px/1.2 var(--display); }
.plan-main em { justify-self: start; padding: 4px 8px; border-radius: 999px; font: 600 11.5px/1 var(--body); font-style: normal; color: var(--accent-ink); background: var(--accent); }
.plan-main small { font-size: 13px; color: var(--ink-2); }
.plan-price { display: grid; text-align: right; }
.plan-price b { font: 800 20px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 12px; color: var(--ink-3); }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.perks li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.perks .ic { color: var(--accent); }
.plans-fine { font-size: 12px; line-height: 1.45; text-align: center; color: var(--ink-3); }

/* ---------- account, settings, menus ---------- */
.brand-actions { display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font: 700 14px/1 var(--display); color: var(--accent-ink); background: var(--accent); }
.avatar.sm { width: 36px; height: 36px; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; }
.account-head { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.plan-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding: 18px; border-radius: 22px; background: var(--accent-soft); }
.plan-card h3 { margin: 4px 0 2px; font: 800 22px/1.15 var(--display); }
.plan-card .btn { flex-shrink: 0; height: 44px; padding: 0 16px; border-radius: 14px; }
.settings-group { overflow: hidden; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.settings-group > * + * { border-top: 1px solid var(--line); }
.menu-row, .toggle-row { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; }
.menu-row > span:first-child { flex: 1; font-weight: 500; }
.menu-row .count { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.menu-row .ic { color: var(--ink-3); }
.menu-row.danger > span:first-child { color: var(--danger); }
.menu-row.standalone { margin-top: 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.toggle-row > span:first-child { flex: 1; display: grid; gap: 2px; }
.toggle-row b { font-weight: 600; }
.toggle-row small { font-size: 13px; color: var(--ink-2); }
.switch { position: relative; flex-shrink: 0; width: 50px; height: 30px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.toggle-row[aria-checked="true"] .switch { background: var(--accent); box-shadow: none; }
.toggle-row[aria-checked="true"] .switch::after { transform: translateX(20px); }
.fineprint { margin-top: 26px; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.fineprint.warn { text-align: left; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); background: var(--accent-soft); border-radius: 16px; padding: 14px 16px; }
.fineprint.warn b { color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.grow { flex: 1; }
.btn[disabled] { opacity: .6; cursor: default; }
.loose li { padding: 0; }
.loose-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-align: left; }
.loose-row > span { flex: 1; }
.link-quiet.on-dark { margin-top: 6px; color: rgba(255, 255, 255, .7); }

/* ---------- share ---------- */
.share-link { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 16px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--line); }
.share-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ink-2); }
.share-link .btn { height: 42px; padding: 0 16px; border-radius: 12px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.people li { display: flex; align-items: center; gap: 12px; }
.people li > div { flex: 1; display: grid; }
.people small { font-size: 13px; color: var(--ink-2); }

/* ---------- QR label, inventory, unpacking ---------- */
.label-card { margin-top: 22px; padding: 22px; display: grid; justify-items: center; gap: 14px; border-radius: 22px; background: #fff; color: #111; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.lc-name { display: flex; align-items: baseline; gap: 10px; }
.lc-name .stencil { font-size: 54px; line-height: .9; }
.lc-name small { font: 600 15px/1 var(--body); }
.lc-qr { width: 70%; max-width: 240px; aspect-ratio: 1; image-rendering: pixelated; }
.lc-foot { font-size: 13px; color: #555; }
.inventory .page-head { margin-bottom: 10px; }
.inv-box { padding: 14px 0; border-top: 1px solid var(--line); }
.inv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.inv-head b { font: 700 17px/1.2 var(--display); }
.inv-head b.stencil { font-family: var(--stencil); font-size: 22px; }
.inv-head span { font-size: 13px; color: var(--ink-2); text-align: right; }
.inv-photos { display: flex; gap: 6px; margin: 10px 0; overflow-x: auto; }
.inv-photos img { width: 64px; height: 80px; flex-shrink: 0; border-radius: 10px; object-fit: cover; }
.inv-items { font-size: 14px; line-height: 1.5; }
.view-unpack .mini-progress { margin: 16px 0 0; }
.unpack-list { display: grid; gap: 8px; }
.unpack-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.unpack-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.unpack-row .r-thumb { width: 56px; height: 56px; border-radius: 12px; }
.unpack-row .r-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unpack-row.is-done { opacity: .6; }

/* ---------- intro ---------- */
/* Onboarding = the four Figma frames as images (photos/onboarding), with invisible buttons over their buttons.
   Always light, exactly as designed. fitIntro() sets --ob-w and --ob-top. */
.intro { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #EEEFEC; touch-action: pan-y; user-select: none; }
.intro-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.intro-slide.on { opacity: 1; pointer-events: auto; }
.ob-board { position: absolute; left: 50%; top: var(--ob-top, 0); width: var(--ob-w, 100%); aspect-ratio: 402 / 874; transform: translateX(-50%); }
.ob-board img { display: block; width: 100%; height: 100%; -webkit-user-drag: none; }
.ob-hit { position: absolute; border-radius: 999px; background: transparent; -webkit-tap-highlight-color: transparent; }
.ob-hit:active { background: rgba(0, 0, 0, .06); }
.ob-hit:focus-visible { outline: 3px solid #2C5A4B; outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-pill { border-radius: 999px; height: 56px; }
@media (prefers-reduced-motion: reduce) { .intro-slide { transition: none; } }

/* Sign up / log in (prototype only, nothing is sent anywhere) */
.auth-form { display: grid; gap: 16px; margin-top: 26px; }
.auth-form .btn { margin-top: 6px; }
.auth-form .link { justify-self: center; }
.auth-error { color: var(--danger); font-size: 13.5px; font-weight: 500; }

/* ---------- printing (QR labels, inventory) ---------- */
@media print {
  @page { margin: 14mm; }
  body, .desk, .phone, .screen, .scroll, #stack { overflow: visible !important; height: auto !important; background: #fff !important; box-shadow: none !important; transform: none !important; }
  body * { visibility: hidden !important; }
  .print-area, .print-area * { visibility: visible !important; }
  .print-area { position: fixed; left: 0; top: 0; width: 100%; margin: 0; color: #111 !important; box-shadow: none !important; }
}

/* ---------- photo check (after the shutter) ---------- */
.review-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 16px; }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 20px calc(var(--bottom) + 10px); }
.btn-glass { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- example mode + empty home ---------- */
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 12px 12px 12px 16px; border-radius: 18px; background: var(--tape); color: var(--tape-ink); font-size: 14px; line-height: 1.35; }
.demo-bar .btn { height: 40px; padding: 0 16px; font-size: 14px; flex-shrink: 0; }
.home-empty { padding-top: 44px; }

/* Tucks: quick things + notes outside a session */
.tuck-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.tuck-list .result:last-child { border-bottom: 0; }
.tuck-list .r-thumb { width: 64px; height: 64px; border-radius: 14px; }
.tuck-list .r-where { font-size: 20px; }
.note-thumb { background: var(--accent-soft); color: var(--accent); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.view-tucks .scope { padding: 18px 0 4px; }
.field textarea, .field-input { width: 100%; border-radius: 16px; border: 0; outline: 0; padding: 14px 16px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 17px; color: var(--ink); }
.field-input { height: 52px; padding: 0 16px; }
.field textarea { resize: none; line-height: 1.4; min-height: 128px; }
.field textarea:focus, .field-input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.sheet-body .seg { margin-top: 0; }
.tuck-add-photo { cursor: pointer; }
.tuck-photo { position: relative; border-radius: 18px; overflow: hidden; background: var(--surface-2); }
.tuck-photo img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.tuck-photo .glass { position: absolute; top: 10px; right: 10px; }
.sheet-body .found-kicker { color: var(--ink-2); margin-bottom: -12px; }
.tuck-where { font: 700 30px/1.05 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.sheet-body .tuck-where + .meta { margin-top: -10px; }
.note-text { font-size: 18px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.type-opt { padding: 14px 12px; }
.type-opt .radio { top: 14px; right: 12px; }
.type-opt b { font-size: 18px; }
.type-opt small { font-size: 12px; }
.sheet-body .kicker { display: flex; align-items: center; gap: 6px; }

/* Home rail of recent tucks */
.section-head:has(.icon-btn) { align-items: center; margin-bottom: 6px; }
.icon-btn.sm { width: 36px; height: 36px; margin-right: -8px; color: var(--ink); }
.tuck-rail { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding: 0 20px 4px; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; }
.tuck-rail::-webkit-scrollbar { display: none; }
.tuck-card { flex: 0 0 158px; height: 204px; scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 20px; background: var(--accent-soft); text-align: left; overflow: hidden; }
.tuck-card:active, .tuck-tile:active, .session:active { transform: scale(.98); }
.tc-photo, .tt-photo { display: block; width: 100%; flex-shrink: 0; overflow: hidden; background: var(--surface-2); }
.tc-photo { height: 92px; }
.tc-photo img, .tt-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc-text, .tt-text { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.tc-time, .tt-time { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tc-title { font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.has-photo .tc-title { -webkit-line-clamp: 2; }
.tc-body { font-size: 13.5px; line-height: 1.3; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tc-kind { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 13px; color: var(--ink-2); }
.tc-kind .ic { flex-shrink: 0; color: var(--accent); }
.tc-kind { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Everything page: two staggered columns of equal tiles */
.tuck-wall { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 18px; align-items: start; }
.tuck-col { display: grid; gap: 16px; }
.tuck-col + .tuck-col { padding-top: 62px; }
.tuck-tile { aspect-ratio: 3 / 4; display: flex; flex-direction: column; padding: 20px 18px 0; border-radius: 34px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255,255,255,.06); text-align: left; overflow: hidden; }
.tt-time { font-size: 13px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.tt-title { font: 800 20px/1.08 var(--display); letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; flex-shrink: 0; }
.tt-body { margin-top: 8px; font-size: 14px; line-height: 1.2; color: var(--ink-3); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; flex-shrink: 0; }
.tt-photo { display: block; width: 100%; height: 240px; flex: none; margin-top: 12px; border-radius: 22px; object-fit: cover; }
.tuck-tile:has(.tt-photo) { padding-bottom: 0; }

/* Session cards match the tuck cards: photo on top, details below */
.session { border-radius: 22px; overflow: hidden; background: var(--accent-soft); text-align: left; transition: transform .2s var(--ease); }
.session .cover { height: 176px; border-radius: 0; }
.session:active .cover { transform: none; }
.session .cover-empty { box-shadow: none; }
.session-info { padding: 14px 16px 16px; }
.session .mini-progress { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.session-tools { margin-top: 18px; }
