/* app.css — Pookify. A single-column phone app: frosted header, layered
   cards on a soft ground, one accent gradient for the primary action, real
   icons in the chrome (emoji only where they're content). Every text
   container either wraps cleanly or truncates — nothing is allowed to bleed. */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { height: 100%; overscroll-behavior: none; }
body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--ink);
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; touch-action: pan-y;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 40% at 15% 0%, color-mix(in srgb, var(--blush) 22%, transparent), transparent 70%),
              radial-gradient(50% 35% at 100% 20%, color-mix(in srgb, var(--lilac) 18%, transparent), transparent 70%); }
h1, h2, h3, .display { font-family: Quicksand, Nunito, sans-serif; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; margin: 0; overflow-wrap: anywhere; }
p { overflow-wrap: anywhere; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 10px; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--rose-ink); }
svg.i { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -.25em; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrap { overflow-wrap: anywhere; }

/* ---- shell ---- */
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; position: relative; }
.top { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 5;
  background: var(--glass); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand img { width: 30px; height: 30px; }
.brand h1 { font-size: 20px; color: var(--brand); }
.topbtns { display: flex; gap: 8px; flex: none; }
.iconbtn { width: 40px; height: 40px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); position: relative; overflow: hidden; }
.iconbtn svg.i { width: 20px; height: 20px; }
.iconbtn .dot { position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; border-radius: 999px; background: var(--rose); color: #fff; font-size: 9.5px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--surface); box-sizing: content-box; }
main { flex: 1; padding: 12px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }
.screen { display: flex; flex-direction: column; gap: 12px; animation: fadein .2s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }

/* ---- avatars ---- */
.avatar { border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; flex: none; background: var(--surface2); color: var(--ink); font-weight: 800; line-height: 1; border: 1.5px solid var(--line2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.s1 { background: var(--s1-grad); color: var(--s1-text); border-color: transparent; } .avatar.s2 { background: var(--s2-grad); color: var(--s2-text); border-color: transparent; }
.avatar.xs { width: 20px; height: 20px; font-size: 11px; } .avatar.sm { width: 28px; height: 28px; font-size: 15px; } .avatar.md { width: 40px; height: 40px; font-size: 21px; } .avatar.lg { width: 56px; height: 56px; font-size: 30px; } .avatar.xl { width: 96px; height: 96px; font-size: 50px; }
.avatar.ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--rose); }

/* ---- text + bits ---- */
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 4px 0; }
.section-h h2 { font-size: 16px; flex: 1; min-width: 0; }
.section-h .link, .section-h .tiny { flex: none; }
.link { font-size: 13px; font-weight: 800; color: var(--rose-ink); text-decoration: none; }
.card { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card.soft { background: var(--surface2); box-shadow: none; }
.card.warnline { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.card.hero { background: var(--accent-grad); color: #fff; border: 0; box-shadow: 0 16px 40px -14px rgba(216, 106, 138, .6); }
.card.hero .eyebrow, .card.hero .muted { color: rgba(255, 255, 255, .8); }
.card > .empty:only-child { padding: 4px 0; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .b { font-weight: 800; }
.center { text-align: center; }
.empty { color: var(--muted); font-size: 13.5px; padding: 4px 0; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.pill.coin { background: var(--coin-bg); color: var(--coin-ink); }
.pill.s1 { background: var(--s1); color: var(--s1-text); } .pill.s2 { background: var(--s2); color: var(--s2-text); }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.ghost { border: 1px solid var(--line2); color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.hint b { color: var(--ink); }
.info { display: flex; gap: 8px; align-items: flex-start; }
.info > button { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line2); color: var(--muted); display: grid; place-items: center; }
.info > button svg.i { width: 14px; height: 14px; }
.info .hint { display: none; padding: 8px 10px; background: var(--surface2); border-radius: 12px; flex: 1; }
.info.open .hint { display: block; }
.info.open > button { background: var(--rose); color: #fff; border-color: transparent; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 14px; border-radius: 13px; font-weight: 800; font-size: 13.5px; background: var(--accent-grad); color: #fff; transition: transform .12s, filter .12s; white-space: nowrap; min-height: 40px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-decoration: none; box-shadow: 0 6px 16px -6px rgba(216, 106, 138, .55); }
.btn:active { transform: scale(.96); filter: brightness(.96); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 11px; min-height: 32px; }
.btn.ghost { background: var(--surface2); color: var(--ink); border: 1px solid var(--line2); box-shadow: none; }
.btn.good { background: linear-gradient(135deg, #5BBE8E, #3F9B6F); } .btn.warn { background: linear-gradient(135deg, #F0A94A, #D98E2B); } .btn.lilac { background: linear-gradient(135deg, #B9A6E6, #7B63C2); }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.full { width: 100%; padding: 13px; font-size: 14.5px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow .btn { flex: 1 1 auto; }
.tabs { display: flex; gap: 3px; background: var(--surface2); border: 1px solid var(--line); padding: 3px; border-radius: 15px; }
.tabs button { flex: 1; padding: 8px 4px; border-radius: 12px; font-weight: 800; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.fab { position: fixed; right: max(18px, calc(50% - 260px + 18px)); bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 19px; background: var(--accent-grad); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px -6px rgba(216, 106, 138, .6); z-index: 6; }
.fab svg.i { width: 26px; height: 26px; stroke-width: 2.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line2); font-weight: 800; font-size: 13px; background: var(--surface2); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips button.on { background: var(--accent-grad); border-color: transparent; color: #fff; }
.chips button.on.s2 { background: linear-gradient(135deg, #B9A6E6, #7B63C2); }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.seg::-webkit-scrollbar { display: none; }

/* ---- home strip: balances + fairness ---- */
.strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bal { border-radius: var(--radius); padding: 12px 14px; position: relative; overflow: hidden; color: var(--s1-text); display: flex; flex-direction: column; gap: 6px; }
.bal.s1 { background: var(--s1-grad); } .bal.s2 { background: var(--s2-grad); color: var(--s2-text); }
.bal .who { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; min-width: 0; }
.bal .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bal .amt { font-family: Quicksand; font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 5px; }
.bal .amt small { font-size: 12px; font-weight: 800; opacity: .8; }
.bal .wk { font-size: 11.5px; opacity: .85; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal .tag { position: absolute; top: 10px; right: 10px; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 255, 255, .6); color: #3A2630; padding: 2px 7px; border-radius: 999px; }
.meter { height: 10px; border-radius: 999px; background: var(--s2); overflow: hidden; display: flex; }
.meter span { display: block; height: 100%; background: var(--s1); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.meter-legend { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; margin-top: 6px; }
.meter-legend > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter-legend .a { color: var(--s1-ink); } .meter-legend .b2 { color: var(--s2-ink); }

/* ---- today card ---- */
.today .sub { display: flex; align-items: center; gap: 8px; padding: 10px 0 6px; }
.today .sub .eyebrow { flex: 1; }
.today .sub svg.i { width: 16px; height: 16px; color: var(--muted); }

/* ---- lists ---- */
.task { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; padding-top: 2px; } .task:last-child { padding-bottom: 2px; }
.check { width: 28px; height: 28px; border-radius: 10px; border: 2px solid var(--line2); flex: none; margin-top: 1px; display: grid; place-items: center; color: #fff; transition: background .2s, border-color .2s, transform .15s; }
.check svg.i { width: 16px; height: 16px; stroke-width: 3; opacity: 0; transition: opacity .15s; }
.check:not([disabled]):active { transform: scale(.88); }
.task.done .check { background: var(--good); border-color: var(--good); } .task.done .check svg.i { opacity: 1; }
.task.pending .check { background: var(--warn); border-color: var(--warn); } .task.pending .check svg.i { opacity: 1; }
.check.pop { animation: pop .45s cubic-bezier(.3, 1.6, .4, 1); }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.task .t { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.task.done .t { text-decoration: line-through; color: var(--muted); }
.task .m { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; align-items: center; }
.task .meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.task .meta.overdue { color: var(--bad); font-weight: 800; }
.bounty-up { color: var(--rose-ink); font-weight: 800; font-size: 12px; white-space: nowrap; }
.task .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.reward, .recipe, .item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.reward:first-child, .recipe:first-child, .item:first-child { border-top: 0; padding-top: 2px; }
.reward:last-child, .recipe:last-child, .item:last-child { padding-bottom: 2px; }
.reward .e, .recipe .e, .item .e { font-size: 24px; width: 40px; height: 40px; border-radius: 13px; background: var(--surface2); display: grid; place-items: center; flex: none; }
.bar { height: 8px; border-radius: 999px; background: var(--line2); overflow: hidden; margin-top: 8px; }
.bar span { display: block; height: 100%; background: var(--accent-grad); transition: width .5s; }
.bar.s1 span { background: var(--s1-deep); } .bar.s2 span { background: var(--s2-deep); }
.inline { display: flex; gap: 6px; margin-top: 10px; }
.inline input { flex: 1; min-width: 0; }
input.f, select.f, textarea.f { border: 1px solid var(--line2); background: var(--surface2); border-radius: 13px; padding: 11px 12px; width: 100%; font-size: 15px; }
input.f::placeholder { color: var(--faint); }
textarea.f { min-height: 72px; resize: vertical; }
.grocery { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.grocery:first-child { border-top: 0; }
.grocery .check { width: 22px; height: 22px; border-radius: 7px; } .grocery .check svg.i { width: 12px; height: 12px; }
.grocery .g { overflow-wrap: anywhere; }
.grocery.on .g { text-decoration: line-through; color: var(--muted); }
.grocery.on .check { background: var(--good); border-color: var(--good); } .grocery.on .check svg.i { opacity: 1; }
.grocery .x { color: var(--faint); padding: 4px; flex: none; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 8px 0; text-align: center; min-height: 74px; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.day.today { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose), var(--shadow); }
.day .d { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--muted); }
.day .e { font-size: 19px; line-height: 1; }
.day .c { width: 7px; height: 7px; border-radius: 50%; border: 1.5px dashed var(--faint); }
.day .c.s1 { background: var(--s1-deep); border: 0; } .day .c.s2 { background: var(--s2-deep); border: 0; } .day .c.done { background: var(--good); border: 0; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); padding: 0 4px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 700; }
.menu button:first-child { border-top: 0; padding-top: 2px; } .menu button:last-child { padding-bottom: 2px; }
.menu .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface2); flex: none; color: var(--rose-ink); }
.menu .ic svg.i { width: 19px; height: 19px; }
.menu .sub { font-size: 12px; color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.menu .chev { color: var(--faint); flex: none; }
.ledger .l { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; align-items: center; }
.ledger .l:first-child { border-top: 0; }
.trophy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trophy div { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 12px 6px 10px; text-align: center; font-size: 10.5px; font-weight: 800; color: var(--muted); line-height: 1.25; box-shadow: var(--shadow); overflow-wrap: anywhere; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.trophy div b { font-size: 26px; line-height: 1; }
.trophy div.locked { opacity: .4; filter: grayscale(1); box-shadow: none; }
.compete { background: var(--s1-grad); border: 0; color: #3A2630; box-shadow: 0 16px 40px -14px rgba(216, 106, 138, .5); }
.compete .eyebrow { color: #7A4A5C; }
.compete .lead { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.compete .lead .nm { width: 88px; font-size: 13px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.compete .lead .bar { flex: 1; margin: 0; background: rgba(255, 255, 255, .5); }
.compete .lead .bar span { background: var(--s1-deep); } .compete .lead .bar.s2 span { background: var(--s2-deep); }
.compete .tiny { color: #6A4050; }
.notif { padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.notif:first-child { border-top: 0; }
.notif.unread { font-weight: 800; }
.notif .when { color: var(--faint); font-size: 11px; white-space: nowrap; flex: none; padding-top: 2px; }
.notif .grow { overflow-wrap: anywhere; }
.statgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface2); border-radius: var(--radius-sm); padding: 10px 12px; }
.stat .v { font-family: Quicksand; font-weight: 700; font-size: 22px; line-height: 1.1; }
.stat .l { font-size: 11px; color: var(--muted); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- nav ---- */
nav.tabs-bar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 520px; display: flex; background: var(--glass); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 7; }
nav.tabs-bar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 800; color: var(--faint); padding: 6px 0 4px; border-radius: 14px; position: relative; transition: color .15s; }
nav.tabs-bar button svg.i { width: 23px; height: 23px; stroke-width: 1.9; transition: transform .2s; }
nav.tabs-bar button.on { color: var(--rose-ink); }
nav.tabs-bar button.on svg.i { transform: translateY(-1px); stroke-width: 2.4; }
nav.tabs-bar button.on::after { content: ""; position: absolute; top: 0; width: 22px; height: 3px; border-radius: 999px; background: var(--accent-grad); }
nav.tabs-bar .badge { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 16px; height: 16px; border-radius: 999px; background: var(--rose); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }

/* ---- toast / push banner / sheet ---- */
.toast { position: fixed; left: 50%; transform: translate(-50%, 10px); bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); width: min(92vw, 480px); background: var(--ink); color: var(--bg); padding: 11px 14px; border-radius: 14px; font-weight: 700; font-size: 13px; box-shadow: var(--shadow-lg); opacity: 0; transition: .25s; pointer-events: none; z-index: 40; overflow-wrap: anywhere; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }
.push { position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -140%); width: min(94vw, 500px); background: var(--surface); border: 1px solid var(--line2); border-radius: 18px; padding: 10px 14px; display: flex; gap: 10px; align-items: flex-start; box-shadow: var(--shadow-lg); transition: .4s cubic-bezier(.2, .8, .2, 1); z-index: 45; cursor: pointer; }
.push.show { transform: translate(-50%, 0); }
.push .pi { width: 34px; height: 34px; border-radius: 11px; background: var(--accent-grad); color: #fff; display: grid; place-items: center; flex: none; }
.push .app { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.push .msg { font-size: 13px; font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }
.sheet-bg { position: fixed; inset: 0; background: rgba(20, 8, 16, .55); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: .25s; z-index: 30; }
.sheet-bg.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 105%); width: min(100vw, 520px); background: var(--surface); border-radius: 26px 26px 0 0; padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); transition: transform .32s cubic-bezier(.2, .8, .2, 1); z-index: 31; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; box-shadow: var(--shadow-lg); touch-action: pan-y; }
.sheet.show { transform: translate(-50%, 0); }
.sheet.dragging { transition: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 999px; background: var(--line2); margin: 0 auto 6px; }
.sheet .sh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; position: sticky; top: -10px; background: var(--surface); padding: 6px 0; z-index: 1; }
.sheet .sh h2 { font-size: 19px; flex: 1; min-width: 0; }
.sheet .sh .x { width: 34px; height: 34px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line2); display: grid; place-items: center; color: var(--muted); flex: none; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field label { font-size: 12px; font-weight: 800; color: var(--muted); }
.spin { font-size: 52px; text-align: center; padding: 10px; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }

/* ---- splash ---- */
.splash { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; transition: transform .5s cubic-bezier(.7, 0, .3, 1), opacity .35s, visibility 0s .55s; cursor: pointer; }
.splash.out { transform: translateY(-100%); opacity: 0; pointer-events: none; visibility: hidden; }
.splash .bean { width: 140px; height: 140px; animation: drop .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.splash .word { font-family: Quicksand; font-weight: 700; font-size: 38px; color: var(--brand); letter-spacing: -.02em; opacity: 0; transform: translateY(10px); animation: up .5s ease-out .5s forwards; }
.splash .tag { font-size: 13px; font-weight: 700; color: var(--muted); opacity: 0; animation: up .5s ease-out .75s forwards; margin-top: -8px; max-width: 80vw; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes drop { from { opacity: 0; transform: translateY(-40px) scale(.7); } 60% { transform: translateY(6px) scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes up { to { opacity: 1; transform: none; } }
.bean .eye { transform-origin: center; animation: blink 3.6s infinite; }
.bean .body { transform-origin: 50% 90%; animation: bob 2.4s ease-in-out infinite 1s; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes bob { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }

/* ---- login / setup pages ---- */
.auth { max-width: 420px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(28px + env(safe-area-inset-top)) 22px 28px; gap: 16px; }
.auth .bean { width: 104px; height: 104px; margin: 0 auto; }
.auth h1 { font-size: 30px; color: var(--brand); text-align: center; }
.auth .lead { text-align: center; color: var(--muted); margin: 0; }
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seat { border-radius: var(--radius); padding: 16px 10px; text-align: center; font-weight: 800; font-size: 15px; color: var(--s1-text); display: flex; flex-direction: column; gap: 8px; align-items: center; min-width: 0; }
.seat > span:not(.avatar) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat.s1 { background: var(--s1-grad); } .seat.s2 { background: var(--s2-grad); color: var(--s2-text); }
.seat.on { outline: 3px solid var(--rose); outline-offset: 2px; }
.seat.unclaimed { opacity: .55; }
.pinbox { display: flex; justify-content: center; gap: 12px; }
.pinbox span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line2); transition: .15s; }
.pinbox span.on { background: var(--rose); border-color: var(--rose); transform: scale(1.15); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 280px; margin: 0 auto; }
.pad button { height: 60px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); font-family: Quicksand; font-size: 26px; font-weight: 700; }
.pad button:active { transform: scale(.95); }
.pad button.ghost { background: none; box-shadow: none; border: 0; font-size: 15px; font-family: Nunito; font-weight: 800; color: var(--muted); }
.err { color: var(--bad); font-weight: 800; text-align: center; font-size: 13px; min-height: 18px; overflow-wrap: anywhere; }
.emojirow { display: flex; gap: 6px; flex-wrap: wrap; }
.emojirow button { font-size: 22px; width: 42px; height: 42px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); }
.emojirow button.on { background: var(--blush); border-color: var(--rose); }
.copybox { background: var(--surface2); border: 1px dashed var(--line2); border-radius: 12px; padding: 10px 12px; font-size: 12px; word-break: break-all; }
.avatar-pick { display: flex; align-items: center; gap: 14px; }
.avatar-pick .btns { display: flex; flex-direction: column; gap: 6px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } .splash .word, .splash .tag, .splash .bean { opacity: 1; transform: none; } }
