/* Hunchy — pastel sticker style. Bold thing: letter tiles that hop & flip. Everything else stays calm. */
:root {
  --paper: #F7F3FF;
  --card: #FFFFFF;
  --ink: #2E2347;
  --ink-2: #6B6188;
  --line: #2E2347;
  --lavender: #CDBEFF;
  --mint: #A9EBD0;
  --peach: #FFCBB0;
  --butter: #FFE79A;
  --sky: #B8E1FF;
  --blush: #FFC2D6;
  --hit: #5CCB9A;
  --close: #F5C84B;
  --miss: #DCD6E8;
  --brand: #7C5CFF;
  --brand-ink: #FFFFFF;
  --danger: #E5486A;
  --r-tile: 10px;
  --r-card: 22px;
  --shadow: 0 4px 0 var(--line);
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
  --tabbar-h: 68px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 600 16px/1.5 var(--font-body);
  min-height: 100vh; overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
body.landing, body.auth { padding-bottom: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.muted { color: var(--ink-2); font-weight: 600; }
.small, small { font-size: .85rem; }
.center { text-align: center; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 34rem; }
.center .lead { margin-inline: auto; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: .6rem; }
.row.between { justify-content: space-between; flex-wrap: wrap; }
.wrap-gap { flex-wrap: wrap; }
code { background: var(--butter); padding: .1em .35em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* Soft background shapes (static) */
.blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; }
.blobs i:nth-child(1) { width: 340px; height: 340px; background: var(--blush); top: -120px; left: -100px; }
.blobs i:nth-child(2) { width: 300px; height: 300px; background: var(--mint); top: 30%; right: -140px; }
.blobs i:nth-child(3) { width: 260px; height: 260px; background: var(--butter); bottom: -80px; left: 10%; }
.blobs i:nth-child(4) { width: 220px; height: 220px; background: var(--sky); top: 55%; left: -120px; }

/* Layout */
.wrap { max-width: 580px; margin: 0 auto; padding: 0 16px 32px; }
.wrap.wide { max-width: 1120px; }
.narrow { max-width: 440px; margin-inline: auto; }
.stack { display: grid; gap: 12px; }
.section-title { margin: 28px 4px 12px; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; }
.brand { text-decoration: none; }
body.landing .topbar .brand { visibility: hidden; }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.chip { display: inline-block; padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: .9rem; box-shadow: 0 2px 0 var(--line); }
.me-avatar { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; font-size: 1.3rem; text-decoration: none; box-shadow: 0 2px 0 var(--line); }

/* Logo tiles — the signature element */
.logo-tiles { display: inline-flex; gap: 4px; }
.lt { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 7px; font: 700 1.05rem/1 var(--font-display); color: var(--ink); box-shadow: 0 2px 0 var(--line); animation: hop .5s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i) * 70ms); }
.logo-tiles.xl .lt { width: clamp(44px, 12vw, 64px); height: clamp(44px, 12vw, 64px); font-size: clamp(1.5rem, 6vw, 2.2rem); border-width: 3px; border-radius: 12px; box-shadow: 0 5px 0 var(--line); }
.logo-tiles.xs .lt { width: 22px; height: 22px; font-size: .8rem; border-radius: 5px; box-shadow: 0 1.5px 0 var(--line); animation: none; }
@keyframes hop { 0% { transform: translateY(14px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* Pastel fills */
.lavender { background: var(--lavender); } .mint { background: var(--mint); } .peach { background: var(--peach); }
.butter { background: var(--butter); } .sky { background: var(--sky); } .blush { background: var(--blush); }

/* Cards — sticker style: ink outline + solid offset shadow */
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow); margin: 0 0 16px; }
.card > :last-child { margin-bottom: 0; }
.pop { animation: pop .35s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: 12px 20px; border: 2px solid var(--line); border-radius: 14px; background: var(--brand); color: var(--brand-ink); font: 600 1rem/1.1 var(--font-display); text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--line); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn.big { width: 100%; padding: 15px 22px; font-size: 1.12rem; }
.btn.small { padding: 8px 14px; font-size: .9rem; border-radius: 11px; box-shadow: 0 3px 0 var(--line); }
.btn.ghost { background: var(--card); color: var(--ink); }
.btn.danger { background: var(--danger); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.linkish { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
.linkish.danger { color: var(--danger); }

/* Forms */
.form { display: grid; gap: 14px; margin: 0 0 12px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form small { font-weight: 600; color: var(--ink-2); }
input, select, textarea { width: 100%; font: 600 1rem var(--font-body); color: var(--ink); background: #FFF; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--lavender); }
.form label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
.check input { width: 22px; height: 22px; flex: none; padding: 0; border-radius: 7px; margin-top: 1px; }
.check input:checked { background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3 3 7-7' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-2); margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--miss); }

/* Notices */
.toast-inline { padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--mint); margin: 0 0 14px; }
.toast-inline.err { background: var(--blush); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; transition: .25s; pointer-events: none; z-index: 50; max-width: 90vw; text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.err { background: var(--danger); }

/* Avatars */
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--line); border-radius: 50%; font-size: 1.25rem; flex: none; vertical-align: middle; }
.avatar.sm { width: 28px; height: 28px; font-size: .95rem; border-width: 1.5px; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.8rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 2.8rem; border-width: 3px; box-shadow: 0 4px 0 var(--line); }
.avatar.ghost { background: var(--card); border-style: dashed; }

/* Bottom tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around; background: var(--card); border-top: 2px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; display: grid; justify-items: center; gap: 2px; color: var(--ink-2); text-decoration: none; font-size: .78rem; font-weight: 800; padding: 4px; border-radius: 14px; }
.tabbar a span { font-size: 1.35rem; line-height: 1.2; transition: transform .15s; }
.tabbar a.on { color: var(--ink); background: var(--lavender); }
.tabbar a.on span { transform: scale(1.12); }

.foot { text-align: center; padding: 24px 16px 40px; color: var(--ink-2); font-size: .9rem; }
.foot p { margin: .4em 0; }

/* Landing */
.hero { text-align: center; padding: 24px 0 8px; }
.hero-logo { margin: 8px 0 22px; }
.hero h1 { font-size: clamp(2rem, 8vw, 3.2rem); max-width: 14ch; margin-inline: auto; }
.hero .hl { background: var(--butter); border: 2px solid var(--line); border-radius: 12px; padding: 0 .2em; display: inline-block; transform: rotate(-2deg); }
.hero .lead { margin: 0 auto 22px; }
.cta-row { display: grid; gap: 12px; max-width: 360px; margin: 0 auto 28px; }
.demo { margin-top: 8px; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; }
.step { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 16px; }
.step h3 { margin: 8px 0 4px; }
.step p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--line); border-radius: var(--r-tile); font: 700 1.1rem var(--font-display); }
.modes h2 { text-align: center; margin: 32px 0 16px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode { border: 2px solid var(--line); border-radius: 18px; padding: 16px; }
.mode span { font-size: 1.8rem; display: block; }
.mode b { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.mode p { margin: 4px 0 0; font-size: .92rem; }
.final-cta { padding: 40px 0 16px; }
.final-cta .btn { max-width: 360px; width: 100%; }

/* Connect / join */
.hero-mini { padding: 8px 4px 4px; }
.big-emoji { font-size: 4rem; }
.bounce { animation: hop .6s cubic-bezier(.3,1.6,.5,1) both; }
.invite-card { text-align: center; }
.qr-wrap { display: inline-block; padding: 14px; background: #fff; border: 2px solid var(--line); border-radius: 18px; box-shadow: 0 4px 0 var(--line); margin: 6px 0 16px; }
.qr-wrap svg, .qr-wrap img { display: block; width: 200px; height: 200px; }
.copy-row { display: flex; gap: 8px; margin-bottom: 12px; }
.copy-row input { font-size: .9rem; }
.pair-hero { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px 0 16px; }
.pair-hero .plus { font: 700 2rem var(--font-display); }
.person summary { display: flex; align-items: center; gap: 12px; }
.person[open] summary { margin-bottom: 16px; }
.chev { font-size: 1.6rem; transition: transform .2s; }
.person[open] .chev { transform: rotate(90deg); }

/* Today */
.people-pills { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.pill { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 6px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; white-space: nowrap; }
.pill.on { background: var(--lavender); box-shadow: 0 3px 0 var(--line); }
.pill.add { padding: 6px 14px; }
.dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; padding: 16px; }
.vs-side { display: grid; justify-items: center; gap: 2px; }
.vs-side span { font-weight: 700; color: var(--ink-2); font-size: .9rem; }
.vs-side strong { font: 600 1.5rem var(--font-display); }
.vs-mid { display: grid; gap: 6px; justify-items: center; }
.vs { font: 700 1.1rem var(--font-display); background: var(--butter); border: 2px solid var(--line); border-radius: 10px; padding: 4px 10px; transform: rotate(-4deg); }
.streak { font-weight: 800; font-size: .9rem; }
.nudge { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--sky); }
.nudge .x { background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--ink); padding: 0 4px; }
.faceid { display: inline-block; width: 26px; height: 26px; flex: none; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E2347' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 8V5a2 2 0 0 1 2-2h3M16 3h3a2 2 0 0 1 2 2v3M21 16v3a2 2 0 0 1-2 2h-3M8 21H5a2 2 0 0 1-2-2v-3M9 9v1M15 9v1M12 9v4h-1M9 16c1.7 1.3 4.3 1.3 6 0'/%3E%3C/svg%3E"); }
.btn .faceid { filter: invert(1); }
.yesterday { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; color: var(--ink); padding: 12px 16px; background: var(--butter); }
.squares { letter-spacing: 2px; font-size: 1.1rem; }

.game-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.game-head h2 { margin: 6px 0 0; }
.day-tag { display: inline-block; padding: 2px 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--mint); font-weight: 800; font-size: .82rem; }
.game.locked .day-tag { background: var(--lavender); }
.game.revealed .day-tag { background: var(--butter); }
.timer { text-align: right; flex: none; }
.timer small { display: block; color: var(--ink-2); font-weight: 700; }
.timer b { font: 600 1.35rem var(--font-display); font-variant-numeric: tabular-nums; }
.progress { position: relative; height: 26px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); overflow: hidden; margin-bottom: 14px; }
.progress span { position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--mint); transition: width .4s cubic-bezier(.3,1.4,.5,1); }
.progress em { position: relative; display: block; text-align: center; font-style: normal; font-weight: 800; font-size: .85rem; line-height: 22px; }

.qlist { display: grid; gap: 12px; }
.qcard { border: 2px solid var(--line); border-radius: 18px; padding: 14px; background: var(--paper); transition: background .2s; }
.qcard.done { background: #F1FBF6; }
.q-top { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; }
.q-top p { flex: 1; margin: 0; font-weight: 800; font-size: 1.05rem; line-height: 1.35; min-width: 60%; }
.q-emoji { font-size: 1.6rem; line-height: 1; width: 40px; height: 40px; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-tile); flex: none; }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--peach); border: 1.5px solid var(--line); }
.tag.red { background: var(--blush); }
.answers { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.answers.scale[data-mode="guess"], .answers.scale[data-demo] { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ans { border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: 700 1rem var(--font-body); padding: 12px 8px; cursor: pointer; box-shadow: 0 3px 0 var(--line); transition: transform .08s, box-shadow .08s, background .15s; -webkit-tap-highlight-color: transparent; }
.ans:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.ans.bubble { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; font-size: .7rem; line-height: 1.1; border-radius: 16px; }
.ans.bubble .em { font-size: 1.5rem; }
.ans.picked { background: var(--lavender); animation: squish .3s cubic-bezier(.3,1.6,.5,1); }
.ans.yes.picked { background: var(--mint); } .ans.no.picked { background: var(--blush); }
.answers.saving .ans { pointer-events: none; opacity: .7; }
@keyframes squish { 0% { transform: scale(.9); } 100% { transform: none; } }
.locked-guess { margin: 0; font-weight: 800; }
.peek { background: var(--butter); border: 2px dashed var(--line); border-radius: 14px; padding: 10px 14px; }

/* Reveal tiles — the flip */
.tile-card { perspective: 900px; cursor: pointer; }
.tile-inner { position: relative; display: grid; min-height: 130px; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.4,1.3,.5,1); transition-delay: calc(var(--d, 0) * 350ms); }
.tile-card.flipped .tile-inner { transform: rotateX(180deg); }
.tile-front, .tile-back { grid-area: 1 / 1; border: 2px solid var(--line); border-radius: 18px; padding: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; align-content: center; gap: 6px; }
.tile-front { background: var(--paper); justify-items: center; text-align: center; }
.tile-front p { margin: 0; font-weight: 800; }
.tile-back { transform: rotateX(180deg); background: var(--miss); }
.tile-back p { margin: 0; }
.tile-card.hit .tile-back { background: var(--hit); }
.tile-card.close .tile-back { background: var(--close); }
.tile-card.wait .tile-back, .tile-card.none .tile-back { background: var(--card); }
.q-small { font-size: .85rem; opacity: .85; }
.vs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: .9rem; }
.vs-row b { font-size: 1rem; }
.verdict { font: 600 1.15rem var(--font-display); }
.pts { display: inline-block; background: var(--card); border: 2px solid var(--line); border-radius: 8px; padding: 0 8px; margin-left: 4px; }
.share-btn { width: 100%; margin-top: 14px; }

.composer { margin-top: 14px; border-top: 2px dashed var(--miss); padding-top: 12px; }
.composer summary { font-weight: 800; color: var(--brand); padding: 4px 0; }
.composer .form { margin-top: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.seg label, .seg a { position: relative; display: block; }
.seg input { position: absolute; opacity: 0; }
.seg span, .seg a { display: block; padding: 8px 12px; font-weight: 700; font-size: .9rem; cursor: pointer; color: var(--ink); text-decoration: none; }
.seg input:checked + span, .seg a.on { background: var(--lavender); }
.seg.small a { padding: 6px 12px; }
.choice-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.mini-results { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.mini-results li { display: grid; gap: 2px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--miss); font-size: .92rem; }
.mini-results li.hit { background: var(--hit); } .mini-results li.close { background: var(--close); } .mini-results li.none { background: var(--card); }
.mini-results em { font-style: normal; font-weight: 800; }

/* History */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat { border: 2px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font: 600 1.8rem var(--font-display); }
.stat span { font-size: .85rem; font-weight: 700; }
.callout { background: var(--card); border: 2px dashed var(--line); border-radius: 16px; padding: 12px 14px; }
.habits { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.habits li { display: grid; grid-template-columns: 9.5rem 1fr 3rem; align-items: center; gap: 10px; font-size: .92rem; }
.habits b { text-align: right; }
.bar { height: 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--mint); }
.day summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; }
.day .date { font: 600 1.05rem var(--font-display); }
.day .squares { text-align: right; }
.day .day-score { grid-column: 1 / -1; color: var(--ink-2); font-size: .9rem; }
.day[open] summary { margin-bottom: 12px; }
.day h4 { margin: 14px 0 8px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin: 12px 0; }

/* Settings */
.avatar-picker, .color-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-picker input, .color-picker input { position: absolute; opacity: 0; }
.avatar-picker label, .color-picker label { display: block !important; cursor: pointer; }
.avatar-picker span { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--miss); border-radius: 12px; font-size: 1.4rem; background: #fff; }
.avatar-picker input:checked + span { border-color: var(--line); background: var(--butter); box-shadow: 0 3px 0 var(--line); }
.color-picker span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--miss); }
.color-picker input:checked + span { border-color: var(--line); box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--line); }
.list { list-style: none; padding: 0; margin: 0 0 14px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 2px solid var(--paper); }
.list li:last-child { border-bottom: 0; }
.danger-zone { margin-top: 16px; }
.danger-zone summary { color: var(--danger); font-weight: 800; }
.prose li { margin-bottom: .5em; }

/* Ads — clearly labelled, never in the way */
.ad-slot { position: relative; margin: 0 0 16px; padding: 18px 10px 10px; border: 2px dashed var(--miss); border-radius: 18px; min-height: 100px; background: rgba(255,255,255,.6); }
.ad-label { position: absolute; top: 4px; left: 12px; font-size: .7rem; font-weight: 800; color: var(--ink-2); }

/* Cookie consent */
.consent { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); z-index: 60; max-width: 520px; margin: 0 auto; background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
body.landing .consent, body.auth .consent { bottom: 12px; }
.consent p { margin: 0 0 10px; }

/* Admin */
.admin-nav { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; }
.admin-nav a { padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; white-space: nowrap; }
.admin-nav a.on { background: var(--lavender); box-shadow: 0 3px 0 var(--line); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); }
.kpi small { display: block; font-weight: 800; }
.kpi b { display: block; font: 600 1.8rem/1.2 var(--font-display); margin: 4px 0; }
.kpi span { font-size: .82rem; font-weight: 700; color: var(--ink); opacity: .8; }
.grid2, .grid3 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding: 4px 0; border-bottom: 2px solid var(--line); }
.bars span { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bars i { display: block; width: 100%; border: 1.5px solid var(--line); border-bottom: 0; border-radius: 4px 4px 0 0; background: inherit; }
.bars.lavender, .bars.mint, .bars.peach, .bars.sky { background: none; }
.bars.lavender i { background: var(--lavender); } .bars.mint i { background: var(--mint); } .bars.peach i { background: var(--peach); } .bars.sky i { background: var(--sky); }
.bars-axis { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-2); margin-top: 4px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--paper); white-space: nowrap; }
.table th { font-weight: 800; }
.table tr.dim { opacity: .5; }
.search { display: flex; gap: 8px; max-width: 420px; flex: 1; }
.search input { padding: 8px 12px; }
.report { font: 600 .9rem/1.5 var(--font-body); }
.prompt summary { display: grid; gap: 4px; }
.prompt-form { margin-top: 14px; }

@media (max-width: 380px) {
  .answers.scale[data-mode="guess"] .ans.bubble span:not(.em) { font-size: .6rem; }
  .habits li { grid-template-columns: 7rem 1fr 2.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
}
@media (min-width: 700px) { .tabbar { justify-content: center; gap: 8px; } .tabbar a { max-width: 140px; } }
