@font-face { font-family: 'Geist'; src: url('fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/geist-mono.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #0B0B0C; --ink-2: #6E6E73; --ink-3: #A1A1A6; --line: #ECECEE; --fill: #F2F2F5; --white: #FFFFFF;
  --pink: #FF2D55; --green: #34C759;
  --yellow: #F6E46E; --lime: #E4F152; --aqua: #A6E5EE; --sky: #B6DBFF; --lilac: #D8CEFF; --peach: #FFCBAE; --rose: #FFC9DC; --mint: #B9F0D2;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
html { background-color: #6FBEFF; }
body { background: transparent; color: var(--ink); font: 400 16px/1.4 var(--sans); letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.small { font-size: 13px; } .tiny { font-size: 11px; } .muted { color: var(--ink-2); } .center { text-align: center; }
.row { display: flex; gap: 8px; align-items: center; } .row.between { justify-content: space-between; } .row.wrap { flex-wrap: wrap; }
.row > input { flex: 1; min-width: 0; }
.row > .btn { flex: 1; }
.btn { white-space: nowrap; }
.btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.btn-grid .btn { min-height: 46px; padding: 0 10px; font-size: 14px; gap: 5px; }
.btn-grid .btn svg { width: 16px; height: 16px; }

/* ── glass (iOS-style, see-through) ─────────── */
.glass {
  background: rgba(255,255,255,0.36);
  -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8);
  border: 0.5px solid rgba(255,255,255,0.6);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.8), inset 0 -1px 1px rgba(255,255,255,0.2), 0 10px 30px rgba(10,10,40,0.16);
  color: var(--ink);
}
body.dark .glass { background: rgba(30,30,44,0.34); border-color: rgba(255,255,255,0.16); box-shadow: inset 0 1px 1px rgba(255,255,255,0.22), 0 10px 30px rgba(0,0,0,0.35); color: #fff; }

/* ── the pocket ─────────────────────────────── */
#pocket { position: fixed; inset: 0; touch-action: none; display: block; }

#label { position: fixed; z-index: 5; top: calc(var(--safe-t) + 16px); left: 22px; right: 80px; color: var(--ink); cursor: pointer; transition: color 0.4s; }
body.dark #label { color: #fff; }
.hd-meta { display: flex; align-items: center; gap: 7px; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-name { font: 600 46px/0.98 var(--sans); letter-spacing: -0.05em; margin-top: 10px; }
.hd-sub { display: flex; align-items: center; gap: 7px; font: 400 15px/1.3 var(--sans); margin-top: 7px; }
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.45; }
.dot.here { background: var(--green); opacity: 1; animation: pulse 1.6s infinite; }
.dot.sleep { background: #9C8FE0; opacity: 1; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,199,89,0.6); } 70% { box-shadow: 0 0 0 7px rgba(52,199,89,0); } 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); } }
#peek { position: fixed; z-index: 5; top: calc(var(--safe-t) + 14px); right: 16px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
#peek svg { width: 22px; height: 22px; }

/* iOS tab bar: floating glass capsule + a round kiss button */
#dock { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 14px calc(var(--safe-b) + 10px); pointer-events: none; }
#dock > * { pointer-events: auto; }
.tabbar { flex: 0 0 256px; width: 256px; height: 64px; box-sizing: border-box; border-radius: 32px; display: flex; align-items: center; padding: 4px; }
.tab { position: relative; flex: 0 0 62px; width: 62px; height: 56px; border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: rgba(0,0,0,0.62); transition: background 0.25s, color 0.25s, transform 0.15s; touch-action: manipulation; }
body.dark .tab { color: rgba(255,255,255,0.68); }
.tab svg { width: 24px; height: 24px; }
.tab .lbl { font: 500 10px/1 var(--sans); letter-spacing: 0; }
.tab.on { color: var(--ink); background: rgba(255,255,255,0.62); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
body.dark .tab.on { color: #fff; background: rgba(255,255,255,0.16); }
.tab:active { transform: scale(0.94); }
.tab .dot { position: absolute; top: 8px; right: calc(50% - 16px); width: 8px; height: 8px; background: var(--pink); opacity: 1; }
.kissbtn { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; touch-action: none; transition: transform 0.15s; }
.kissbtn span { font-size: 30px; line-height: 1; }
.kissbtn:active { transform: scale(0.94); }

#waiting { position: fixed; z-index: 4; inset: 0; display: grid; place-items: center; padding: 150px 24px 140px; pointer-events: none; }
.waiting-card { pointer-events: auto; background: #fff; color: var(--ink); border-radius: 30px; padding: 26px 24px 22px; max-width: 360px; width: 100%; box-shadow: 0 24px 60px rgba(10,10,40,0.25); display: flex; flex-direction: column; gap: 10px; }
.waiting-card h2 { font: 600 30px/1.02 var(--sans); letter-spacing: -0.04em; }
.waiting-card p { margin: 0; color: var(--ink-2); }
.waiting-card .code { margin: 8px 0 6px; }

/* kiss meter */
.kiss-meter { position: fixed; z-index: 20; left: 50%; bottom: calc(var(--safe-b) + 96px); transform: translate(-50%, 16px) scale(0.96); opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.2s; border-radius: 28px; padding: 16px 26px 14px; text-align: center; min-width: 210px; }
.kiss-meter.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.kiss-face { font-size: 64px; line-height: 1; transform-origin: 50% 60%; }
.kiss-name { font: 700 30px/1 var(--sans); letter-spacing: -0.04em; margin-top: 8px; min-height: 30px; }
.kiss-meter[data-level="5"] .kiss-name { color: var(--pink); font-size: 38px; }
.kiss-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.kiss-dots span { position: relative; overflow: hidden; width: 22px; height: 6px; border-radius: 3px; background: rgba(0,0,0,0.12); }
body.dark .kiss-dots span { background: rgba(255,255,255,0.22); }
/* the fill is its own layer, so the night track color can't hide it */
.kiss-dots span i { position: absolute; inset: 0; border-radius: inherit; background: var(--pink); transform: scaleX(0); transform-origin: left center; }
.kiss-dots span.on { animation: kissdot 0.28s cubic-bezier(.2,1.6,.4,1); }
@keyframes kissdot { 0% { transform: scaleY(1); } 40% { transform: scaleY(1.4); } 100% { transform: scaleY(1); } }

.kiss-layer { position: fixed; z-index: 40; inset: 0; background: rgba(255,45,85,0.06); animation: fadein 0.3s; }
.kiss-layer.out { opacity: 0; transition: opacity 0.7s; }
.stamp { position: absolute; opacity: 0; animation: stamp 0.28s cubic-bezier(.2,1.6,.4,1) forwards; filter: drop-shadow(0 2px 3px rgba(120,0,30,0.2)); }
.stamp { line-height: 1; }
@keyframes stamp { from { opacity: 0; scale: 1.9; } to { opacity: 0.92; scale: 1; } }
.kiss-caption { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 110px); transform: translateX(-50%); padding: 12px 22px; border-radius: 24px; text-align: center; white-space: nowrap; }
.kiss-caption .mono { font-size: 11px; text-transform: uppercase; }
.kiss-caption b { display: block; font: 600 22px/1.2 var(--sans); letter-spacing: -0.03em; }
@keyframes fadein { from { opacity: 0; } }

/* emoji tray (tap the kiss button) */
.tray { position: fixed; z-index: 21; right: 12px; bottom: calc(var(--safe-b) + 86px); border-radius: 30px; padding: 8px 10px 9px; transform: translateY(12px) scale(0.92); transform-origin: 90% 100%; opacity: 0; transition: transform 0.22s cubic-bezier(.2,1.4,.4,1), opacity 0.18s; }
.tray.in { transform: none; opacity: 1; }
.tray-row { display: flex; gap: 2px; }
.tray-emo { width: 40px; height: 44px; font-size: 27px; line-height: 1; border-radius: 14px; transition: transform 0.12s; }
.tray-emo:active { transform: scale(1.35) translateY(-6px); }
.tray-hint { text-align: center; font: 500 11px var(--sans); margin-top: 2px; }
.react-row { display: flex; justify-content: space-between; gap: 2px; background: var(--fill); border-radius: 22px; padding: 6px 8px; }
.react-emo { width: 38px; height: 38px; font-size: 24px; line-height: 1; border-radius: 50%; transition: transform 0.15s, background 0.15s; }
.react-emo.on { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.react-emo.pop { animation: reactpop 0.4s cubic-bezier(.2,1.6,.4,1); }
@keyframes reactpop { 0% { transform: scale(1); } 40% { transform: scale(1.5) translateY(-6px); } 100% { transform: scale(1); } }
.answer .react-row { background: rgba(255,255,255,0.7); margin-top: 10px; }
.their-reacts { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--fill); border-radius: 18px; padding: 10px 14px; }
.answer .their-reacts { background: rgba(255,255,255,0.7); margin-top: 10px; }
.their-reacts .emos { font-size: 22px; letter-spacing: 2px; }

/* toasts: glass banners */
.toasts { position: fixed; z-index: 30; top: calc(var(--safe-t) + 10px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; touch-action: pan-x; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 11px 18px 11px 12px; border-radius: 22px; font: 500 15px/1.25 var(--sans); transform: translateY(-14px) scale(0.98); opacity: 0; transition: all 0.35s cubic-bezier(.2,1.2,.4,1);
  background: rgba(255,255,255,0.78); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); color: var(--ink); box-shadow: 0 10px 30px rgba(10,10,40,0.18); }
.toast.in { transform: none; opacity: 1; }
.toast .ti { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; }
.toast.love .ti { background: var(--pink); }
.toast .ti svg { width: 16px; height: 16px; }
.toast.plain-pad { padding-left: 18px; }

/* ── sheets: white, black type ──────────────── */
.sheet { position: fixed; z-index: 25; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,0); transition: background 0.3s; }
.sheet.in { background: rgba(0,0,0,0.28); }
.sheet-card {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100% - var(--safe-t) - 24px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: #fff; color: var(--ink); border-radius: 34px 34px 0 0; padding: 0 20px calc(var(--safe-b) + 28px);
  transform: translateY(100%); transition: transform 0.42s cubic-bezier(.2,.9,.25,1); box-shadow: 0 -20px 60px rgba(0,0,0,0.18);
}
.sheet.in .sheet-card { transform: none; }
.sheet-card.dragging { transition: none; }
.sheet-card.tall { min-height: 80vh; }
.grabber { position: sticky; top: 0; z-index: 3; height: 18px; display: flex; justify-content: center; align-items: flex-end; background: #fff; touch-action: none; }
.grabber::after { content: ''; width: 38px; height: 5px; border-radius: 3px; background: #D5D5DA; }
.sheet-head { position: sticky; top: 18px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 14px; background: #fff; touch-action: none; }
.sheet-head h2 { font: 600 28px/1.05 var(--sans); letter-spacing: -0.04em; }
.sheet-body { display: flex; flex-direction: column; gap: 14px; }
.sheet-body h3 { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); margin-top: 10px; }
.icon-btn { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--fill); color: var(--ink); font: 500 12px var(--sans); }
.icon-btn svg { width: 17px; height: 17px; }
.lede { font-size: 17px; line-height: 1.4; margin: 0; color: var(--ink-2); }
.meta { font: 12px var(--mono); color: var(--ink-3); margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 52px; padding: 0 22px; border-radius: 26px; font: 600 16px/1 var(--sans); letter-spacing: -0.01em; background: var(--fill); color: var(--ink); transition: transform 0.12s, opacity 0.2s; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 19px; height: 19px; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.ghost { background: var(--fill); }
.btn.danger { background: #FFEEF1; color: var(--pink); }
.btn.wide { width: 100%; }
.btn.small { min-height: 38px; padding: 0 15px; font-size: 14px; border-radius: 19px; }
.btn.busy, .btn:disabled { opacity: 0.45; pointer-events: none; }
.link { font: 500 14px var(--sans); color: var(--ink-2); padding: 12px; text-decoration: underline; text-underline-offset: 3px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.field-hint { font-size: 12px; color: var(--ink-3); }
input, textarea { width: 100%; font: 400 17px/1.35 var(--sans); letter-spacing: -0.01em; color: var(--ink); background: var(--fill); border: 0; border-radius: 16px; padding: 15px 16px; outline: none; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow 0.15s; }
input:focus, textarea:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input[type=date] { min-height: 52px; }
textarea { resize: none; }

.seg { display: inline-flex; align-self: flex-start; background: #EEEEF1; border-radius: 12px; padding: 3px; gap: 2px; }
.seg-opt { padding: 8px 13px; border-radius: 9px; font: 500 13px/1 var(--sans); color: var(--ink-2); }
.seg-opt.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 9px 14px; border-radius: 999px; font: 500 14px/1 var(--sans); background: var(--fill); color: var(--ink); transition: background 0.15s; }
.chip.on { background: var(--ink); color: #fff; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; transition: transform 0.15s; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.swatch.on { transform: scale(1.08); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
canvas.preview { width: 100%; height: 200px; border-radius: 26px; display: block; touch-action: none; }
canvas.preview.small { height: 160px; }

/* ── onboarding ─────────────────────────────── */
#onboard { position: fixed; inset: 0; z-index: 50; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; color: var(--ink); }
.ob-card { position: relative; max-width: 460px; margin: 0 auto; min-height: 100%; padding: calc(var(--safe-t) + 48px) 22px calc(var(--safe-b) + 36px); display: flex; flex-direction: column; gap: 18px; animation: rise 0.45s cubic-bezier(.2,.9,.25,1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.ob-card h1 { font: 600 40px/1 var(--sans); letter-spacing: -0.05em; }
.ob-card .step { font: 500 12px var(--mono); color: var(--ink-3); margin: 0; }

/* welcome: denim, a stitched hole, a worm */
#onboard.hero { background: #B7E0FF; }
.hero-card { position: relative; min-height: 100%; padding: calc(var(--safe-t) + 34px) 26px calc(var(--safe-b) + 30px); display: flex; flex-direction: column; color: var(--ink); overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; touch-action: none; }
.hero-card > :not(canvas) { position: relative; z-index: 1; pointer-events: none; }
.hero-card > .start-pill { pointer-events: auto; }
.hero-top { font: 500 15px var(--sans); display: flex; gap: 14px; }
.hero-top span:last-child { font-weight: 400; }
.hero-title { margin-top: auto; font: 600 66px/0.92 var(--sans); letter-spacing: -0.06em; }
.hero-tag { font: 500 18px/1.3 var(--sans); margin: 14px 0 4px; max-width: 320px; }
.hero-list { font: 400 30px/1.12 var(--sans); letter-spacing: -0.04em; margin: 14px 0 30px; }
.hero-list span { display: block; }
.start-pill { align-self: flex-end; display: inline-flex; align-items: center; gap: 12px; padding: 8px 8px 8px 22px; border-radius: 999px; background: var(--ink); color: #fff; font: 500 18px var(--sans); box-shadow: 0 10px 30px rgba(20,40,80,0.2); }
.start-pill i { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.16); display: grid; place-items: center; font-style: normal; }
.start-pill svg { width: 18px; height: 18px; }
.ob-logo .logo-mark img { width: 72px; height: 72px; border-radius: 18px; display: block; }

.steps { margin: 0; padding-left: 22px; font-size: 18px; display: flex; flex-direction: column; gap: 10px; }
.inline-ic svg { width: 18px; height: 18px; vertical-align: -3px; }
.code-box { background: var(--fill); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.code { font: 600 34px/1 var(--mono); letter-spacing: 0.06em; color: var(--ink); }
.code.small { font-size: 15px; }
.choice { border-radius: 30px; padding: 22px; display: flex; flex-direction: column; gap: 12px; background: var(--yellow); }
.choice + .or + .choice { background: var(--aqua); }
.choice h3 { font: 600 24px/1 var(--sans); letter-spacing: -0.04em; }
.choice p { margin: 0; }
.choice input { background: rgba(255,255,255,0.75); }
.or { text-align: center; font: 500 11px var(--mono); color: var(--ink-3); text-transform: uppercase; }
.code-row { display: flex; gap: 8px; }
.code-row input { font: 600 22px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; text-align: center; }
.code-row .icon-btn { width: auto; height: auto; padding: 0 16px; border-radius: 16px; background: rgba(255,255,255,0.75); }
.chosen { font: 600 20px var(--sans); letter-spacing: -0.03em; margin: 0; min-height: 1px; }
.results { display: flex; flex-direction: column; gap: 6px; }
.result { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 13px 16px; border-radius: 16px; background: var(--fill); }
.result b { font-size: 17px; font-weight: 600; } .result span { font: 12px var(--mono); color: var(--ink-2); }
.reclaim { display: flex; flex-direction: column; gap: 8px; }

/* ── feed / drop ───────────────────────────── */
.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.meter { background: var(--fill); border-radius: 20px; padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.meter .mono { font-size: 10.5px; text-transform: uppercase; color: var(--ink-2); }
.meter b { font: 600 20px/1 var(--sans); letter-spacing: -0.03em; }
.meter .bar { height: 6px; border-radius: 3px; background: rgba(0,0,0,0.07); overflow: hidden; }
.meter .bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #FFB86B, #FF6B9A); }
.meter.ok .bar span { background: linear-gradient(90deg, #7FE3B0, #34C759); }
.meter .tag { font: 500 11px var(--sans); color: var(--pink); }
.foods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.food { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px; border-radius: 22px; background: var(--fill); font: 500 12px/1.2 var(--sans); text-align: center; transition: transform 0.12s; }
.food:active, .tile:active, .trinket:active { transform: scale(0.96); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 16px; min-height: 132px; border-radius: 28px; transition: transform 0.12s; color: var(--ink); }
.tile:nth-child(8n+1) { background: var(--yellow); } .tile:nth-child(8n+2) { background: var(--aqua); } .tile:nth-child(8n+3) { background: var(--rose); } .tile:nth-child(8n+4) { background: var(--lilac); }
.tile:nth-child(8n+5) { background: var(--lime); } .tile:nth-child(8n+6) { background: var(--peach); } .tile:nth-child(8n+7) { background: var(--sky); } .tile:nth-child(8n+8) { background: var(--mint); }
.tile b { font: 600 19px/1.05 var(--sans); letter-spacing: -0.03em; margin-top: auto; }
.tile > span:last-child { font: 400 13px/1.2 var(--sans); }
.tile-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); }
.tile-ic svg { width: 20px; height: 20px; }

/* ── composers ─────────────────────────────── */
.paper-card { padding: 18px; border-radius: 24px; box-shadow: inset 0 0 0 1px var(--line); }
.paper-card textarea, .handwriting { font: 400 21px/1.35 var(--sans); letter-spacing: -0.02em; background: transparent; border: 0; padding: 0; color: var(--ink); box-shadow: none !important; }
.paper-card.read p { margin: 0; white-space: pre-wrap; }
.handwriting.center, .handwriting.caption { text-align: center; }
.doodle-wrap { display: flex; justify-content: center; }
canvas.doodle-pad { background: #fff; border-radius: 24px; box-shadow: 0 0 0 1px var(--line); touch-action: none; }
.inks { display: flex; gap: 10px; justify-content: center; }
.ink { width: 32px; height: 32px; border-radius: 50%; }
.ink.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.ink.eraser { display: grid; place-items: center; background: var(--fill); color: var(--ink); }
.ink.eraser svg { width: 17px; height: 17px; }
.polaroid { background: #fff; padding: 10px 10px 12px; border-radius: 26px; box-shadow: 0 14px 40px rgba(10,10,40,0.16), 0 0 0 1px var(--line); align-self: center; width: min(100%, 340px); }
.polaroid.empty .polaroid-img { background: var(--fill); color: var(--ink-3); }
.polaroid-img { aspect-ratio: 1; background: #E9E9EE; border-radius: 18px; display: grid; place-items: center; overflow: hidden; }
.polaroid-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid input.handwriting { margin-top: 10px; text-align: center; font-size: 17px; }
.polaroid .caption { margin: 12px 0 2px; font: 500 17px/1.2 var(--sans); }
.rec { position: relative; display: grid; place-items: center; height: 160px; }
.rec-ring { position: absolute; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,45,85,0.18); transition: transform 0.08s; }
.rec-btn { position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.rec-btn.on { background: var(--pink); }
.rec-btn svg { width: 30px; height: 30px; }
.rec-btn.busy { opacity: 0.5; }
.rec-time { text-align: center; font: 500 30px var(--mono); }
.progress { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--pink); }
.shell-art { display: flex; justify-content: center; }
.tap-pad { height: 180px; border-radius: 30px; background: var(--fill); display: grid; place-items: center; font: 500 15px var(--sans); color: var(--ink-2); touch-action: none; transition: background 0.08s, color 0.08s; }
.tap-pad.on { background: var(--pink); color: #fff; }
.pattern { display: flex; align-items: center; height: 16px; justify-content: center; }
.pattern .beat { height: 14px; background: var(--ink); border-radius: 7px; }
.pattern .gap { height: 2px; }
.big-quote { font: 600 30px/1.08 var(--sans); letter-spacing: -0.04em; text-align: center; margin: 8px 0; }
.trinkets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.trinket { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 18px; font: 500 11px/1.2 var(--sans); text-align: center; background: var(--fill); transition: transform 0.12s; }
.trinket.on { background: var(--ink); color: #fff; }
.trinket-big { display: flex; justify-content: center; }

/* ── today ─────────────────────────────────── */
.today { display: flex; flex-direction: column; gap: 12px; }
.today-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-2); }
.streak { font: 500 13px var(--sans); padding: 7px 12px; border-radius: 999px; background: var(--ink); color: #fff; }
.streak.dim { background: var(--fill); color: var(--ink-2); }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot { position: relative; background: #fff; padding: 7px 7px 34px; border-radius: 24px; box-shadow: 0 10px 28px rgba(10,10,40,0.1), 0 0 0 1px var(--line); }
.slot img, .slot .dirt { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 18px; }
.dirt { display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; font: 500 13px var(--sans); color: #fff; background: linear-gradient(160deg, #8C98E2, #F1B3A8 60%, #FF8B4E); }
.slot.waiting .dirt { background: var(--fill); color: var(--ink-3); }
.slot.empty-me .dirt { background: var(--ink); color: #fff; }
.dirt svg { width: 28px; height: 28px; }
.slot .who { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font: 500 13px/1 var(--sans); color: var(--ink); }
.question { font: 600 27px/1.08 var(--sans); letter-spacing: -0.04em; margin: 0; }
.answer { padding: 16px 18px; border-radius: 22px; background: var(--fill); }
.answer .who { font: 500 11px var(--mono); text-transform: uppercase; color: var(--ink-2); }
.answer p { margin: 6px 0 0; font-size: 17px; line-height: 1.35; }
.answer.buried { background: #0F7A4E; color: #fff; }
.answer.buried .who { color: #FFD84A; }
.answer-form { display: flex; flex-direction: column; gap: 8px; }
.layers { display: flex; flex-direction: column; gap: 6px; }
.layer { padding: 15px 18px; border-radius: 24px; cursor: pointer; color: var(--ink); }
.layer:nth-child(6n+1) { background: var(--yellow); } .layer:nth-child(6n+2) { background: var(--aqua); } .layer:nth-child(6n+3) { background: var(--rose); }
.layer:nth-child(6n+4) { background: var(--lilac); } .layer:nth-child(6n+5) { background: var(--lime); } .layer:nth-child(6n+6) { background: var(--peach); }
.layer-head { display: flex; justify-content: space-between; align-items: center; font: 600 17px var(--sans); letter-spacing: -0.02em; }
.layer-head .dots { font-size: 10px; letter-spacing: 3px; }
.layer-body p { margin: 8px 0 0; font-size: 15px; } .layer-body .q { font-weight: 600; }
.layer img.mini { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; margin-top: 10px; }

/* ── us / peek / jar / settings ────────────── */
.card { background: var(--fill); border-radius: 26px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.card.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: none; padding: 0; }
.card.two > div { border-radius: 26px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.card p { margin: 0; }
.card.night { background: var(--ink); color: #fff; }
.card.night .muted, .card.night .mono { color: #fff; }
.card.night input { background: rgba(255,255,255,0.12); color: #fff; color-scheme: dark; }
.card.night input::placeholder { color: #fff; }
.card.night .btn.ghost { background: #fff; color: var(--ink); }
.tunnel-bar { position: relative; height: 54px; border-radius: 18px; background: #fff; overflow: hidden; margin: 6px 0 2px; }
.tunnel-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #F6E46E, #B6DBFF 70%, #A99BFF); border-radius: 18px; }
.tunnel-bar b { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font: 600 22px var(--sans); letter-spacing: -0.03em; }
.tunnel-bar i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font: 500 12px var(--mono); font-style: normal; color: var(--ink); }
.big-num { font: 600 34px/1 var(--sans); letter-spacing: -0.05em; }
.big-num span { font-size: 15px; font-weight: 400; letter-spacing: -0.01em; color: var(--ink-2); }
.card.night .big-num span { color: #fff; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--fill); border-radius: 20px; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font: 600 26px/1 var(--sans); letter-spacing: -0.04em; } .stat span { font: 400 12px/1.2 var(--sans); color: var(--ink-2); }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.log .mono { color: var(--ink-3); }
.jar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jar-more { margin-top: 14px; }
.jar-item { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px; border-radius: 20px; background: var(--fill); font-size: 13px; }
.jar-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.jar-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; }
.jar-ic svg { width: 22px; height: 22px; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting > div { display: flex; flex-direction: column; gap: 2px; }
.setting b { font-weight: 500; }
.howto { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.howto li { background: var(--fill); border-radius: 18px; padding: 13px 16px; font-size: 15.5px; }
.howto b { font-weight: 600; }

@media (min-width: 700px) { .sheet { align-items: center; } .sheet-card { border-radius: 34px; } }
@media (prefers-reduced-motion: reduce) { .sheet-card, .toast, .hero-card::before { transition: none; animation: none; } }

/* ── the soil: strata, newest on top ───────── */
.btn-grid.four { grid-template-columns: repeat(2, 1fr); }
.seed { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font: 500 12px/1 var(--sans); padding: 6px 10px; border-radius: 999px; background: #EEF7E6; color: #2E5A1C; }
.soil-links { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
.soil-link { text-align: left; padding: 18px 18px 16px; border-radius: 24px; background: #0F7A4E; color: #fff; display: flex; flex-direction: column; gap: 4px; }
.soil-link b { font: 800 24px/1 var(--sans); letter-spacing: -0.04em; text-transform: uppercase; color: #FFD84A; }
.soil-link span { font-size: 14px; }
.plant-link { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 20px; background: var(--fill); font: 500 15px var(--sans); text-align: left; }
.plant-link b { font-size: 20px; }

.soil-card { padding-bottom: 0 !important; }
.soil { display: flex; flex-direction: column; margin: 6px -20px 0; padding-bottom: 0; }
.stratum {
  position: relative; margin-top: -14px; padding: 26px 20px 22px; color: var(--ink);
  background-color: var(--soil); background-image: var(--grain); background-size: 160px;
  -webkit-mask: var(--wave) top / 100% 16px no-repeat, linear-gradient(#000, #000) 0 15px / 100% calc(100% - 15px) no-repeat;
  mask: var(--wave) top / 100% 16px no-repeat, linear-gradient(#000, #000) 0 15px / 100% calc(100% - 15px) no-repeat;
}
.stratum:first-child { margin-top: 0; }
.stratum-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.stratum-head .mono { letter-spacing: 0.06em; }
.stratum .seed { background: rgba(255,255,255,0.6); color: var(--ink); }
.stratum .q { font: 600 18px/1.22 var(--sans); letter-spacing: -0.025em; margin: 10px 0 12px; }
.stratum.month { padding: 30px 20px 26px; }
.stratum.month h4 { font: 600 34px/1 var(--sans); letter-spacing: -0.05em; }
.stratum.month .mono { letter-spacing: 0.08em; text-transform: uppercase; }
.stratum.empty p.small { margin: 0; }
.stratum.bed { padding: 30px 20px calc(var(--safe-b) + 40px); color: #FFF8EE; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stratum.bed .mono { letter-spacing: 0.12em; }
.stratum.bed p { margin: 0; }
.stratum.bed .btn { background: rgba(255,255,255,0.9); color: var(--ink); }
.slips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slip { background: rgba(255,255,255,0.78); border-radius: 18px; padding: 11px 13px 12px; }
.slip b { display: block; font: 500 10px/1 var(--mono); letter-spacing: 0.06em; margin-bottom: 6px; }
.slip p { margin: 0; font-size: 15px; line-height: 1.32; -webkit-user-select: text; user-select: text; }
.slip.faint { background: rgba(255,255,255,0.32); }
.slip.faint p { font-style: italic; }
.finds { display: flex; flex-wrap: wrap; gap: 14px 12px; margin-top: 14px; }
.find { width: 84px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform 0.15s; }
.find:active { transform: scale(0.95); }
.find .who { font: 500 9px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.f-paper { width: 80px; height: 80px; padding: 8px 8px 6px; border-radius: 4px; font: 400 10.5px/1.28 var(--sans); text-align: left; overflow: hidden; color: var(--ink); box-shadow: 0 3px 8px rgba(70,45,20,0.22); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; }
.f-paper.doodle { padding: 0; display: block; background: #fff; }
.f-paper.doodle canvas { width: 80px; height: 80px; }
.f-pol { background: #fff; padding: 5px 5px 0; border-radius: 3px; box-shadow: 0 3px 8px rgba(70,45,20,0.24); width: 80px; display: flex; flex-direction: column; align-items: center; }
.f-pol img { width: 70px; height: 70px; object-fit: cover; display: block; }
.f-pol span, .f-pol::after { font: 400 9px/1 var(--sans); padding: 4px 0 5px; max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-pol:not(:has(span))::after { content: ''; height: 10px; padding: 0; }
.f-pol.day { transform: rotate(-2deg); }
.f-thing { width: 80px; height: 80px; display: grid; place-items: center; }
.f-pebble { width: 76px; height: 64px; margin: 8px 0; border-radius: 50% 46% 52% 48% / 58% 54% 46% 42%; background: rgba(255,255,255,0.55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: inset 0 -3px 6px rgba(70,45,20,0.12); }
.f-pebble b { font-size: 22px; line-height: 1; }
.f-pebble span { font: 500 10px/1.1 var(--sans); max-width: 66px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seeds { display: flex; flex-direction: column; gap: 8px; }
.seed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #EEF7E6; }
.seed-row p { margin: 4px 0 0; font-size: 15px; }
.seed-row .mono { color: #2E5A1C; letter-spacing: 0.05em; }
.zine-pages { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; min-height: 0; scroll-behavior: smooth; }
.zine-pages:empty { display: none; }
.zine-page { flex: none; animation: fadein 0.3s; }
.zine-page canvas { width: 88px; height: 136px; display: block; border-radius: 3px; box-shadow: 0 4px 14px rgba(0,0,0,0.16), 0 0 0 0.5px rgba(0,0,0,0.08); }
.soil-card .grabber, .soil-card .sheet-head { margin: 0 -20px; padding-left: 20px; padding-right: 20px; }

/* ── screens you swipe between ───────────────── */
.screen { position: fixed; inset: 0; z-index: 1; will-change: transform; transform: translate3d(0,0,0); }
#screen-shelf { transform: translate3d(100%,0,0); overflow: hidden; background: #B7E0FF; }
/* a pink tab peeking in from the right edge when something waits on the shelf */
#shelf-tab { position: absolute; z-index: 5; right: 0; top: 50%; width: 30px; height: 84px; margin-top: -42px; padding: 0; border: 0; background: none; display: flex; align-items: center; justify-content: flex-end; opacity: 0; pointer-events: none; transform: translateX(10px); transition: opacity 0.4s, transform 0.5s cubic-bezier(.2,1.2,.4,1); }
#shelf-tab.on { opacity: 1; pointer-events: auto; transform: none; }
#shelf-tab i { display: block; width: 7px; height: 56px; border-radius: 6px 0 0 6px; background: var(--pink); box-shadow: -2px 0 10px rgba(255,45,85,0.35); }
#shelf-tab.on i { animation: shelf-peek 2.8s ease-in-out 0.6s infinite; }
@keyframes shelf-peek { 0%, 70%, 100% { transform: none; } 80% { transform: translateX(-5px); } 90% { transform: none; } }
@media (prefers-reduced-motion: reduce) { #shelf-tab.on i { animation: none; } }
.pager-dots { position: fixed; z-index: 6; left: 50%; bottom: calc(var(--safe-b) + 79px); transform: translateX(-50%); display: flex; align-items: center; gap: 0; padding: 0 4px; border-radius: 999px; }
.pager-dots button { position: relative; width: 30px; height: 22px; display: grid; place-items: center; }
.pager-dots i { width: 6px; height: 6px; border-radius: 3px; background: currentColor; opacity: 0.32; transition: width 0.25s, opacity 0.25s; }
.pager-dots .on i { width: 15px; opacity: 0.9; }
.pager-dots .new::after { content: ''; position: absolute; top: 3px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 1.5px #fff; }

/* ── the shelf ───────────────────────────────── */
.shelf-sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.shelf-scroll { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; padding: calc(var(--safe-t) + 16px) 0 0; display: flex; flex-direction: column; }
.shelf-content { flex: 1; display: flex; flex-direction: column; }
.shelf-head { padding: 0 80px 0 22px; color: var(--ink); }
body.dark .shelf-head, body.dark .shelf-title, body.dark .shelf-empty p { color: #fff; }
.shelf-tabs { display: inline-flex; margin-top: 14px; padding: 3px; border-radius: 999px; gap: 2px; }
.shelf-tabs button { height: 34px; padding: 0 15px; border-radius: 999px; font: 500 14px var(--sans); color: inherit; opacity: 0.7; transition: background 0.2s, opacity 0.2s; }
.shelf-tabs button.on { background: rgba(255,255,255,0.78); opacity: 1; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
body.dark .shelf-tabs button.on { background: rgba(255,255,255,0.2); color: #fff; }
.shelf-add { position: absolute; z-index: 3; top: calc(var(--safe-t) + 14px); right: 16px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.shelf-add span { font: 300 30px/1 var(--sans); margin-top: -3px; }
.shelf-title { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin: 34px 22px 0; }
.shelf-row { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-evenly; gap: 4px; padding: 0 14px; min-height: 104px; margin: 14px 0 -3px; }
.plank { position: relative; height: 15px; margin: 0 12px; border-radius: 3px; background: var(--wood) 0 0 / 512px 48px; box-shadow: inset 0 1.5px 0 rgba(255,236,205,0.65), 0 24px 26px -16px rgba(20,25,60,0.5); }
.plank::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 9px; background: var(--wood) -60px -24px / 512px 48px; filter: brightness(0.7) saturate(1.1); border-radius: 0 0 3px 3px; }
.bracket { position: absolute; top: 24px; width: 0; height: 0; border-top: 19px solid #8E5F33; opacity: 0.85; }
.bracket.l { left: 15%; border-right: 17px solid transparent; }
.bracket.r { right: 15%; border-left: 17px solid transparent; }
.decor-wrap { margin-top: 16px; }
.shelf-row.decor { justify-content: space-between; align-items: flex-end; padding: 0 22px 0 30px; min-height: 70px; }
.decor .plant { font-size: 54px; line-height: 0.82; filter: drop-shadow(0 4px 4px rgba(20,25,60,0.18)); }
.nap { position: relative; line-height: 0; margin-bottom: -1px; }
.nap canvas { width: 220px; height: 110px; cursor: pointer; }
.zz { position: absolute; left: 66px; top: 14px; font: 600 13px var(--sans); color: var(--ink); animation: zz 3.2s ease-in infinite; pointer-events: none; }
.zz.b { animation-delay: 1.6s; left: 74px; }
.nap.awake .zz { display: none; }
body.dark .zz { color: #fff; }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 8px) scale(0.7); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -22px) scale(1.15); } }

.thing { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 104px; min-width: 0; transform: rotate(var(--r)); transform-origin: 50% 100%; transition: transform 0.18s; filter: drop-shadow(0 5px 5px rgba(20,25,60,0.2)); }
.thing:active { transform: rotate(var(--r)) scale(0.94); }
.thing .art { display: block; line-height: 0; }
.thing.sealed .art { animation: sway 6s ease-in-out infinite; transform-origin: 50% 100%; }
.thing.ready .art { animation: jiggle 1.8s ease-in-out infinite; transform-origin: 50% 100%; }
.thing.ready::after { content: '✨'; position: absolute; top: -10px; right: 2px; font-size: 18px; animation: zz 2.4s ease-in infinite; }
@keyframes sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(1.6deg); } }
@keyframes jiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-4deg); } 84% { transform: rotate(4deg); } 92% { transform: rotate(-2deg); } }
.tag { position: absolute; bottom: 6px; right: -6px; max-width: 92px; padding: 4px 7px 4px 12px; border-radius: 4px; background: #fff; color: var(--ink); font: 500 10px/1.15 var(--sans); white-space: normal; text-align: left; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; transform: rotate(6deg); box-shadow: 0 2px 5px rgba(20,25,60,0.18); }
.tag::before { content: ''; position: absolute; left: 4px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #D5D5DA; }
.tag.dim { background: #fff; color: var(--ink); }
.tag.pink { background: var(--pink); color: #fff; }
.tag.pink::before { background: rgba(255,255,255,0.6); }
.k-card { width: 74px; height: 88px; padding: 9px 8px; border-radius: 3px; font: 400 10px/1.28 var(--sans); text-align: left; color: var(--ink); overflow: hidden; background-image: linear-gradient(90deg, rgba(0,0,0,0.05), transparent 28%); margin-bottom: 2px; }
.k-pol { background: #fff; padding: 6px 6px 18px; border-radius: 2px; margin-bottom: 2px; }
.k-pol img { width: 70px; height: 70px; object-fit: cover; display: block; }
.k-frame { background: #fff; padding: 4px; border: 5px solid #B47C46; border-radius: 2px; margin-bottom: 2px; }
.k-frame canvas { width: 64px; height: 64px; display: block; }
.k-thing { line-height: 0; }
.k-emo { font-size: 48px; line-height: 1; margin-bottom: 2px; }
.shelf-empty { margin: 30px 22px 0; display: flex; flex-direction: column; gap: 14px; }
.shelf-empty p { margin: 0; font-size: 16px; line-height: 1.4; color: var(--ink); }

/* opening and leaving things for later */
.later-art { display: grid; place-items: center; padding: 6px 0 2px; line-height: 0; }
.later-art.small { position: relative; width: 150px; margin: 0 auto; padding: 4px 0 8px; }
.later-art.small .tag { bottom: 10px; right: -6px; }
.later-art.pop svg { animation: laterpop 0.55s cubic-bezier(.2,1.5,.4,1); }
@keyframes laterpop { from { transform: scale(0.8) rotate(-6deg); opacity: 0.4; } }
.later-body { display: flex; flex-direction: column; gap: 12px; }
.later-count { text-align: center; margin: 0; font-size: 15px; color: var(--ink-2); }
.later-count b { display: block; font: 600 64px/1 var(--sans); letter-spacing: -0.05em; color: var(--ink); }
.later-photo { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.later-photo:empty { display: none; }

/* Safari tints its bars from what touches the top and bottom edges; keep them the sky's colors */
.edge { position: fixed; left: 0; right: 0; height: 2px; z-index: 2; pointer-events: none; background-color: #6FBEFF; }
#edge-top { top: 0; }
#edge-bottom { bottom: 0; background-color: #EEF6FF; }

/* call them in: only when they're away */
.callin { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; height: 36px; padding: 0 14px 0 11px; border-radius: 999px; font: 500 14px/1 var(--sans); letter-spacing: -0.01em; color: var(--ink); cursor: pointer; transition: transform 0.15s, opacity 0.2s; }
.callin svg { width: 17px; height: 17px; }
.callin:active { transform: scale(0.95); }
.callin.sent { cursor: default; }
body.dark .callin { color: #fff; }

/* shelf objects: the safe and the suitcase */
.shelf-row.objects { justify-content: space-around; min-height: 140px; margin-top: 26px; padding: 0 10px; }
.thing.big { width: 150px; }
.thing .count { position: absolute; top: -6px; right: 10px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--ink); color: #fff; font: 600 13px/24px var(--sans); text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.thing .count.pink { background: var(--pink); }
.thing.big .tag { right: 2px; bottom: 10px; }
.shelf-hint { margin: 22px 26px 0; font-size: 15px; line-height: 1.4; color: var(--ink); }
body.dark .shelf-hint { color: #fff; }
.cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px 12px; border-radius: 20px; background: var(--fill); text-align: center; min-width: 0; transition: transform 0.15s; }
.cell:active { transform: scale(0.96); }
.cell.ready { background: #FFE4EA; }
.cell-art { height: 84px; display: grid; place-items: center; line-height: 0; }
.cell-art .k-card, .cell-art .k-pol, .cell-art .k-frame { transform: scale(0.86); }
.cell b { font: 500 13px/1.2 var(--sans); letter-spacing: -0.01em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell span { font: 400 11px/1.2 var(--sans); color: var(--ink-2); }
.cells-empty { grid-column: 1 / -1; margin: 6px 0; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.thing.big.case .tag { right: auto; left: 0; bottom: 12px; transform: rotate(-6deg); }
.thing.big.case .count { right: 6px; top: 4px; }

/* no gray text on color: anything sitting on a colored surface reads in full black */
.paper-card textarea::placeholder, .paper-card input::placeholder, .handwriting::placeholder { color: var(--ink); opacity: 1; }
.card.two > div .muted, .card.two > div .big-num span, .card.two > div .mono { color: var(--ink); }
.cell.ready span { color: var(--ink); }

/* shelf categories: full-width color bands */
.decor-wrap { margin-top: 6px; }
.shelf-row.decor { justify-content: center; padding: 0 22px; min-height: 0; margin-top: 4px; }
.bands { flex: 1; display: flex; flex-direction: column; margin-top: 30px; background: var(--last); padding-bottom: calc(var(--safe-b) + 48px); }
.band { flex: 1; min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; background: var(--bg); color: var(--fg); text-align: left; transition: filter 0.15s; }
.band:active { filter: brightness(0.95); }
.band-name { font: 800 38px/0.92 var(--sans); letter-spacing: -0.04em; text-transform: uppercase; }
.band-side { display: flex; align-items: center; gap: 10px; flex: none; }
.band-count { font: 700 30px/1 var(--sans); letter-spacing: -0.04em; }
.band-ready { font: 600 12px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.02em; padding: 7px 10px; border-radius: 999px; background: var(--fg); color: var(--bg); }

/* inside a category: white cards on iOS grouped gray */
.cat-sheet, .cat-sheet .grabber, .cat-sheet .sheet-head { background: #F2F2F7; }
.c-sub { margin: -4px 0 4px; font-size: 16px; line-height: 1.35; color: var(--ink); }
.c-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.c-card { position: relative; display: flex; flex-direction: column; min-height: 210px; padding: 14px 16px 16px; border-radius: 26px; background: #fff; text-align: left; transition: transform 0.15s; }
.c-card:active { transform: scale(0.97); }
.c-icon { position: relative; flex: 1; display: grid; place-items: center; min-height: 140px; line-height: 0; }
.c-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.c-foot b { font: 600 16px/1.2 var(--sans); letter-spacing: -0.02em; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.c-foot span { flex: none; font: 400 14px/1.2 var(--sans); color: var(--ink-2); }
.c-foot span.red { color: #FF3B30; font-weight: 500; }
.c-lock { position: absolute; right: 10%; bottom: 8%; width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 3px 10px rgba(28,28,30,0.18); }
.c-empty { grid-column: 1 / -1; margin: 4px 2px 8px; font-size: 16px; line-height: 1.4; color: var(--ink); }
.c-plus { width: 58px; height: 58px; border-radius: 50%; background: #F2F2F7; display: grid; place-items: center; font: 300 36px/1 var(--sans); color: var(--ink); }
.k2 { box-shadow: 0 8px 18px rgba(28,28,30,0.16); }
.k2.photo { border-radius: 18px; overflow: hidden; line-height: 0; }
.k2.photo img { width: 108px; height: 108px; object-fit: cover; }
.k2.note { width: 108px; height: 108px; padding: 11px 10px; border-radius: 16px; font: 400 11px/1.32 var(--sans); color: var(--ink); text-align: left; overflow: hidden; }
.k2.doodle { width: 108px; height: 108px; border-radius: 18px; background: #fff; display: grid; place-items: center; }
.k2.doodle canvas { width: 92px; height: 92px; }
.k2.emoji { font-size: 86px; line-height: 1; box-shadow: none; filter: drop-shadow(0 8px 10px rgba(28,28,30,0.18)); }
.later-art.small { display: flex; flex-direction: column; align-items: center; gap: 2px; width: auto; padding: 0 0 6px; }
.preview-label { font: 600 15px/1.2 var(--sans); letter-spacing: -0.01em; color: var(--ink); }

/* ── soil: the third page, mostly words, on green ── */
#screen-soil { transform: translate3d(200%,0,0); background: linear-gradient(#FFFFFF 50%, #0F7A4E 50%); overflow: hidden; color: #fff; }
.soil-scroll { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; display: flex; flex-direction: column; }
.soil-print { position: absolute; z-index: 3; top: calc(var(--safe-t) + 14px); right: 16px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #F2F2F7; color: var(--ink); }
.s-head { padding-right: 64px; }
.s-meta { font: 500 11px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: #FFD84A; }
.s-title { font: 600 46px/0.98 var(--sans); letter-spacing: -0.05em; margin: 10px 0 0; color: #fff; }
.s-lede { font: 400 17px/1.35 var(--sans); margin: 8px 0 0; color: #fff; }
#screen-soil section { margin-top: 36px; }
.s-label { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #FFD84A; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.28); margin-bottom: 18px; }
.s-planted { font: 500 14px/1.2 var(--sans); color: #fff; margin-bottom: 10px; }
.s-q { font: 700 34px/1.04 var(--sans); letter-spacing: -0.04em; color: #FFD84A; margin: 0 0 18px; }
.s-ans { margin-top: 18px; }
.s-ans p { margin: 7px 0 0; font: 400 19px/1.36 var(--sans); color: #fff; -webkit-user-select: text; user-select: text; }
.s-ans.waiting p { font-style: italic; }
.s-ans .react-row, .s-ans .their-reacts { margin-top: 12px; }
.s-who { font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: #FFD84A; }
.s-form { display: flex; flex-direction: column; gap: 10px; }
.s-input { width: 100%; background: #fff; color: var(--ink); border: 0; border-radius: 18px; padding: 14px 16px; font: 400 17px/1.35 var(--sans); resize: none; -webkit-user-select: text; user-select: text; }
.s-input::placeholder { color: var(--ink); opacity: 1; }
.btn.s-btn { background: #FFD84A; color: #0B0B0C; }
.s-note { margin: 0 0 14px; font: 400 15px/1.4 var(--sans); color: #fff; }
.s-seeds { margin-top: 14px; }
.s-seed { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid rgba(255,255,255,0.2); }
.s-seed p { margin: 5px 0 0; font: 400 17px/1.3 var(--sans); color: #fff; }
.s-when { font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: #FFD84A; }
.s-dig { flex: none; font: 600 14px var(--sans); color: #FFD84A; text-decoration: underline; text-underline-offset: 3px; }
.s-month { font: 800 34px/1 var(--sans); letter-spacing: -0.04em; text-transform: uppercase; color: #FFD84A; margin: 26px 0 2px; }
.s-month span { color: #fff; }
.s-entry { padding: 18px 0 20px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.s-date { font: 500 11px/1 var(--mono); letter-spacing: 0.06em; color: #FFD84A; }
.s-date span { color: #fff; }
.s-eq { font: 600 21px/1.2 var(--sans); letter-spacing: -0.025em; color: #fff; margin: 10px 0 14px; }
.s-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.s-pair p { margin: 7px 0 0; font: 400 16px/1.4 var(--sans); color: #fff; -webkit-user-select: text; user-select: text; }
.s-pair p.none { font-style: italic; }
.s-pair > div { display: flex; flex-direction: column; }
.s-pair p:has(+ .s-pic) { margin-bottom: 12px; }
.s-pic { display: block; width: 100%; aspect-ratio: 1; margin-top: auto; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,0.12); box-shadow: 0 2px 10px rgba(0,0,0,0.18); }
.s-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.s-pic:active { transform: scale(0.97); }
.s-foot { margin-top: 36px; display: flex; flex-direction: column; gap: 12px; }
.s-foot .s-note { margin: 0; text-align: center; }

/* Us: more air in every card */
.us-sheet .sheet-body { gap: 12px; }
.us-sheet .card { padding: 22px; gap: 0; border-radius: 28px; }
.us-sheet .card .big-num { margin-top: 14px; }
.us-sheet .card .card-note { margin-top: 8px; line-height: 1.4; }
.us-sheet .card.tunnel .tunnel-bar { margin: 14px 0 0; }
.us-sheet .card.tunnel .big-num { margin-top: 18px; }
.us-sheet .card.two { gap: 12px; padding: 0; border-radius: 0; }
.us-sheet .worm-card { display: flex; flex-direction: column; min-height: 188px; padding: 20px; border-radius: 28px; }
.us-sheet .worm-card .big-num { margin-top: 14px; }
.us-sheet .worm-name { margin: 6px 0 0; font: 500 15px/1.2 var(--sans); }
.us-sheet .worm-blurb { margin: auto 0 0; padding-top: 14px; line-height: 1.35; }
.us-sheet .card.night .big-num { font-size: 58px; letter-spacing: -0.06em; margin-top: 16px; }
.us-sheet .card.night .big-num span { font-size: 17px; letter-spacing: -0.01em; margin-left: 2px; }
.us-sheet .card.night .big-num.ask { font-size: 28px; line-height: 1.1; letter-spacing: -0.04em; }
.us-sheet .reunion-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.us-sheet .reunion-fields input { min-width: 0; width: 100%; min-height: 54px; height: 54px; padding: 0 14px; border-radius: 16px; }
.us-sheet .card.night .btn { margin-top: 10px; min-height: 54px; }
.us-sheet .stats { gap: 10px; }
.us-sheet .stat { min-height: 104px; padding: 16px 14px 15px; border-radius: 22px; justify-content: space-between; gap: 10px; }
.us-sheet .stat span { font-size: 13px; line-height: 1.25; }
.us-sheet .btn-grid { gap: 10px; }
.us-sheet .btn-grid .btn { min-height: 54px; font-size: 15px; }

/* the shelf's worm, loose in the sky above the bands */
.roam-wrap { height: 176px; margin-top: 2px; }
.roamer { display: block; width: 100%; height: 100%; }
#screen-shelf .bands { margin-top: 0; }

/* soil: today on white, everything earlier on green */
.s-top { background: #fff; color: var(--ink); padding: calc(var(--safe-t) + 16px) 22px 40px; }
.s-bottom { flex: 1; background: #0F7A4E; padding: 8px 22px calc(var(--safe-b) + 64px); }
.s-top .s-meta, .s-top .s-label, .s-top .s-who, .s-top .s-when, .s-top .s-dig { color: #0F7A4E; }
.s-top .s-title, .s-top .s-lede, .s-top .s-planted, .s-top .s-note, .s-top .s-ans p, .s-top .s-seed p { color: var(--ink); }
.s-top .s-label { border-bottom-color: rgba(11,11,12,0.12); }
.s-top .s-q { color: #0F7A4E; }
.s-top .s-input { background: #F2F2F7; }
.s-top .btn.s-btn { background: #0F7A4E; color: #fff; }
.s-top .s-seed { border-top-color: rgba(11,11,12,0.1); }
.s-bottom .s-earlier { margin-top: 28px; }

/* soil top: white page, colored cards (same colors as the shelf bands) */
.s-top .s-meta { color: #D90042; }
.s-top section.s-today, .s-top section.s-plant { margin-top: 18px; padding: 22px 20px 22px; border-radius: 30px; }
.s-top section.s-today { margin-top: 26px; background: #FFC8D7; }
.s-top section.s-plant { background: #A3E6EC; }
.s-top .s-today .s-label, .s-top .s-today .s-who { color: #D90042; }
.s-top .s-today .s-label { border-bottom-color: rgba(217,0,66,0.25); }
.s-top .s-today .s-q { color: #D90042; font-weight: 800; }
.s-top .s-today .s-planted { display: inline-block; padding: 6px 11px; border-radius: 999px; background: #fff; color: #D90042; font-weight: 600; }
.s-top .s-today .s-input, .s-top .s-plant .s-input { background: #fff; }
.s-top .s-today .btn.s-btn { background: #D90042; color: #fff; }
.s-top .s-today .react-row, .s-top .s-today .their-reacts { background: #fff; }
.s-top .s-plant .s-label, .s-top .s-plant .s-note, .s-top .s-plant .s-when, .s-top .s-plant .s-dig { color: #1546A8; }
.s-top .s-plant .s-label { border-bottom-color: rgba(21,70,168,0.25); }
.s-top .s-plant .btn.s-btn { background: #1546A8; color: #fff; }
.s-top .s-plant .s-seed { border-top-color: rgba(21,70,168,0.2); }
.soil-print { background: #FFD84A; }

/* Us countdown: a taller card with room around the fields */
.us-sheet .card.night { padding: 26px 22px 24px; }
.us-sheet .reunion-fields { margin-top: 34px; gap: 12px; }
.us-sheet .rf { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.us-sheet .rf .mono { font-size: 10.5px; letter-spacing: 0.08em; color: #fff; }
.us-sheet .reunion-fields input { min-height: 58px; height: 58px; }
.us-sheet .card.night .btn { margin-top: 18px; min-height: 58px; }

/* Shared object icons outside the shelf: emoji found things, glyph tiles, Jar */
.temoji { display: inline-block; line-height: 1; filter: drop-shadow(0 6px 8px rgba(28,28,30,0.18)); }
.trinket .temoji { margin: 4px 0 2px; }
.trinket.on .temoji { filter: drop-shadow(0 4px 6px rgba(0,0,0,0.35)); }
.trinket-big { padding: 8px 0 4px; }
.trinket-print { text-align: center; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; margin: -2px 0 6px; color: var(--ink); }
.shell-art { padding: 6px 0 4px; }
.jar-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; box-shadow: 0 5px 12px rgba(28,28,30,0.16); }
.jar-art { width: 64px; height: 60px; display: grid; place-items: center; }
.jar-art svg { display: block; }
.jar-doodle { width: 50px; height: 50px; border-radius: 11px; background: #fff; display: grid; place-items: center; box-shadow: 0 5px 12px rgba(28,28,30,0.16); }
.jar-doodle canvas { width: 44px; height: 44px; }

/* Countdown: the number redraws on save with a small pop */
.us-sheet .count-head.pop .big-num { animation: countpop 0.5s cubic-bezier(.2,1.4,.4,1); transform-origin: left center; }
@keyframes countpop { 0% { transform: scale(0.86); opacity: 0.4; } 100% { transform: none; opacity: 1; } }
.us-sheet .card.night .btn svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 2px; }

/* Songs: a record with the cover as its label */
.song-preview { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 24px; background: var(--fill); }
.song-art { flex: none; width: 84px; height: 84px; display: grid; place-items: center; }
.song-art svg { display: block; }
.song-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.song-meta b { font: 600 18px/1.15 var(--sans); letter-spacing: -0.02em; color: var(--ink); overflow-wrap: anywhere; }
.song-meta span { font-size: 14px; line-height: 1.3; color: var(--ink-2); }
.song-meta .song-src { font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-3); margin-top: 4px; }
.song-preview.empty .song-art { opacity: 0.35; }
.song-link { display: flex; gap: 8px; align-items: center; }
.song-link input { flex: 1; min-width: 0; }
.song-link .btn { flex: none; }
.song-big { display: flex; justify-content: center; padding: 6px 0 2px; }
.song-big svg, .song-art svg { overflow: visible; }
svg .spin { animation: recordspin 6s linear infinite; }
@keyframes recordspin { to { transform: rotate(360deg); } }
.song-title { margin-bottom: 0; }
.song-artist { text-align: center; font-size: 16px; color: var(--ink-2); margin: 2px 0 6px; }
.song-player { border-radius: 16px; overflow: hidden; background: var(--fill); }
.song-player iframe { display: block; width: 100%; border: 0; }
.song-player.youtube iframe { aspect-ratio: 16 / 9; height: auto; }
.song-open { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* Countdown: once set it just reads "Same pocket in N days" with a small Edit */
.us-sheet .count-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.us-sheet .count-edit { font: 600 14px/1 var(--sans); letter-spacing: -0.01em; color: #fff; background: rgba(255,255,255,0.16); border-radius: 999px; padding: 9px 16px; transition: transform 0.12s; }
.us-sheet .count-edit:active { transform: scale(0.95); }
.us-sheet .countdown .count-top + .count-head .big-num { margin-top: 10px; }
.us-sheet .countdown .count-bar { margin: 16px 0 0; }
.us-sheet .countdown .count-bar span { background: linear-gradient(90deg, #A3E6EC, #FFC8D7 60%, #FF6482); }
.us-sheet .countdown .count-bar b, .us-sheet .countdown .count-bar i { color: #000; }
.us-sheet .count-when { margin: 14px 0 0; font-size: 11px; letter-spacing: 0.08em; color: #fff; }

/* Welcome: a quiet way back in next to "start" */
.hero-card > .hero-actions { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-actions .start-pill { align-self: auto; }
.back-pill { font: 500 16px/1 var(--sans); letter-spacing: -0.01em; color: var(--ink); background: rgba(255,255,255,0.62); border-radius: 999px; padding: 15px 18px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.choice.plain { background: #F2F2F7; }
.btn svg { width: 19px; height: 19px; vertical-align: -4px; }

/* Backups: Face ID + Save everything */
.backup-status { color: var(--ink); background: #F2F2F7; border-radius: 16px; padding: 12px 14px; margin: 0; }
.backup-card { background: #FFC93C; color: #0B0B0C; border-radius: 28px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.backup-card .mono { color: #0B0B0C; }
.backup-card p { margin: 0; color: #0B0B0C; }
.backup-card .btn { background: #0B0B0C; color: #fff; }
.setting .ok { color: #0F7A4E; font-weight: 600; }

/* Onboarding sits above the app; its sheets (the new-pocket guard) and every toast must sit above it */
#onboard:not([hidden]) ~ .sheet { z-index: 55; }
.toasts { z-index: 60; }
