/* Hearth & Clans — a cosy storybook: parchment, ink and watercolour warmth. */
:root {
    --paper: #fbf4e2;
    --paper-2: #f4e7c9;
    --paper-3: #e7d3a8;
    --edge: #d8bf8e;
    --ink: #4a3426;
    --ink-soft: #7d624c;
    --ink-faint: #a88d72;
    --accent: #d5733f;
    --accent-hi: #ee9a5f;
    --accent-lo: #a9512a;
    --good: #3f9a52;
    --good-bg: #e2f2d9;
    --bad: #c8463f;
    --bad-bg: #fbe0da;
    --info-bg: #e9e4f6;
    --fate: #88a83a;
    --fate-2: #d9b648;
    --rule: #4f7fb2;
    --rule-2: #dfe8f1;
    --war: #b3323a;
    --war-2: #6e1d24;
    --power: #8a62c4;
    --omen: #4f3a75;
    --shadow: 0 2px 0 rgba(120, 84, 40, 0.18), 0 8px 22px rgba(90, 60, 30, 0.16);
    --shadow-lg: 0 3px 0 rgba(120, 84, 40, 0.2), 0 18px 40px rgba(80, 50, 20, 0.28);
    --r: 18px;
    --ui: "Fredoka", "Nunito", system-ui, sans-serif;
    --deco: "Cinzel Decorative", Georgia, serif;
    --season-tint: #f6d6e2;
    --sat: env(safe-area-inset-top, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
    --sar: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    color: var(--ink);
    font: 16px/1.35 var(--ui);
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    background-color: var(--paper-2);
    background-image:
        radial-gradient(ellipse at 15% 0%, rgba(255, 214, 160, 0.55), transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(214, 170, 110, 0.35), transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(255, 252, 240, 0.7), transparent 70%),
        repeating-radial-gradient(circle at 30% 40%, rgba(160, 120, 70, 0.025) 0 2px, transparent 2px 5px);
    background-attachment: fixed;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
h1, h2, h3 { margin: 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 48px; padding: 10px 18px; border-radius: 999px;
    border: 2px solid var(--edge); background: var(--paper);
    font-weight: 600; font-size: 16px; cursor: pointer;
    box-shadow: 0 3px 0 var(--edge);
    transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
    touch-action: manipulation;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.btn:disabled, .btn.off { opacity: 0.5; cursor: default; }
.btn-primary {
    color: #fff; border-color: var(--accent-lo);
    background: linear-gradient(180deg, var(--accent-hi), var(--accent));
    box-shadow: 0 3px 0 var(--accent-lo), 0 8px 18px rgba(213, 115, 63, 0.3);
    text-shadow: 0 1px 0 rgba(120, 50, 10, 0.35);
}
.btn-primary:active { box-shadow: 0 1px 0 var(--accent-lo); }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--ink-soft); }
.btn-small { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn-big { min-height: 56px; font-size: 18px; width: 100%; }
.btn-scroll {
    width: 100%; margin-top: 12px; border-style: dashed;
    background: linear-gradient(180deg, #fff8e6, #f2e2bd);
}

/* ------------------------------------------------------- shared portraits */
.art {
    position: relative; display: block; overflow: hidden;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 55%),
                linear-gradient(140deg, var(--art-a, #f3d9a4), var(--art-b, #d99a5b));
}
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.art-emoji {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-style: normal; font-size: 2.6em; filter: drop-shadow(0 3px 4px rgba(80, 40, 10, 0.25));
}
.portrait {
    --size: 64px;
    position: relative; display: inline-block; flex: none;
    width: var(--size); height: var(--size); border-radius: 50%;
    padding: 3px; background: var(--clan, #c9a36a);
    box-shadow: 0 2px 6px rgba(80, 50, 20, 0.3);
}
.portrait > i { position: absolute; inset: 3px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: calc(var(--size) * 0.45); background: radial-gradient(circle at 35% 30%, #fff8e0, #f1d39c); }
.portrait > img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 50%; object-fit: cover; }
.portrait .art { width: 100%; height: 100%; border-radius: 50%; --art-a: #fff3d2; --art-b: color-mix(in srgb, var(--clan, #c9a36a) 55%, #f6dfb0); }
.portrait .art-emoji { font-size: calc(var(--size) * 0.46); }
.portrait.xs { --size: 30px; padding: 2px; }
.portrait.sm { --size: 42px; }
.portrait.md { --size: 56px; }

/* ------------------------------------------------------------- title page */
.screen {
    position: relative; z-index: 1;
    min-height: 100vh; min-height: 100dvh;
    padding: calc(20px + var(--sat)) calc(16px + var(--sar)) calc(24px + var(--sab)) calc(16px + var(--sal));
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    max-width: 520px; margin: 0 auto;
}
.title-screen { justify-content: center; }
.hero { text-align: center; }
.hero-fan { position: relative; height: 150px; width: 300px; margin: 8px auto 4px; }
.hero-fan .portrait { --size: 96px; position: absolute; left: 50%; top: 22px; padding: 4px; box-shadow: 0 6px 18px rgba(80, 50, 20, 0.35); }
.hero-fan .portrait > i { inset: 4px; }
.hero-fan .portrait > img { inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); }
.hero-fan .portrait:nth-child(1) { transform: translateX(-178%) rotate(-14deg) scale(0.74); top: 42px; }
.hero-fan .portrait:nth-child(2) { transform: translateX(-122%) rotate(-7deg) scale(0.86); top: 26px; z-index: 1; }
.hero-fan .portrait:nth-child(3) { transform: translateX(-50%) scale(1.12); top: 6px; z-index: 3; }
.hero-fan .portrait:nth-child(4) { transform: translateX(22%) rotate(7deg) scale(0.86); top: 26px; z-index: 1; }
.hero-fan .portrait:nth-child(5) { transform: translateX(78%) rotate(14deg) scale(0.74); top: 42px; }
.hero-fan .portrait { animation: bob 5s ease-in-out infinite; }
.hero-fan .portrait:nth-child(2n) { animation-delay: -1.7s; }
.hero-fan .portrait:nth-child(3) { animation-delay: -3.1s; }
@keyframes bob { 50% { translate: 0 -5px; } }
.game-title {
    font-family: var(--deco); font-weight: 900; font-size: clamp(34px, 11vw, 50px); line-height: 1.02;
    color: var(--accent-lo); letter-spacing: 0.5px;
    text-shadow: 0 2px 0 #fff6dc, 0 4px 0 rgba(169, 81, 42, 0.18);
}
.game-title span { color: var(--fate); font-size: 0.8em; }
.tagline { margin: 10px auto 0; max-width: 330px; color: var(--ink-soft); font-size: 16px; }
.title-screen > .btn-big { max-width: 360px; }

.howto {
    width: 100%; max-width: 420px;
    background: var(--paper); border: 2px solid var(--edge); border-radius: var(--r);
    box-shadow: var(--shadow);
}
.howto summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; text-align: center; }
.howto summary::-webkit-details-marker { display: none; }
.howto[open] summary { border-bottom: 1px dashed var(--edge); }
.howto-body { padding: 4px 18px 14px; font-size: 15px; }
.howto-body h3 { font-size: 16px; margin: 12px 0 4px; color: var(--accent-lo); }
.howto-body p { margin: 4px 0; }
.howto-body ul, .howto-body ol { margin: 4px 0; padding-left: 20px; }
.howto-body li { margin: 3px 0; }

/* ------------------------------------------------------- setup and lobby */
.setup-screen, .lobby-screen { justify-content: center; }
.panel {
    width: 100%; display: flex; flex-direction: column; gap: 12px;
    background: var(--paper); border: 2px solid var(--edge); border-radius: 22px;
    padding: 20px 16px; box-shadow: var(--shadow-lg);
}
.panel-title { font-size: 24px; font-weight: 700; color: var(--accent-lo); text-align: center; }
.sub-title { font-size: 16px; color: var(--ink-soft); text-align: center; margin-top: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field span { font-size: 14px; color: var(--ink-soft); }
input {
    font: inherit; font-size: 17px; color: var(--ink);
    min-height: 48px; padding: 10px 14px; border-radius: 14px;
    border: 2px solid var(--edge); background: #fffaf0; outline: none; width: 100%; min-width: 0;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(213, 115, 63, 0.18); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--ink-faint); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px dashed var(--edge); }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; text-transform: uppercase; letter-spacing: 3px; text-align: center; font-weight: 700; }
.code-row .btn { flex: none; }
.code-row .btn-ghost { width: 48px; padding: 0; border-color: var(--edge); background: var(--paper-2); font-size: 20px; }
.error { margin: 0; color: var(--bad); text-align: center; font-weight: 600; }

.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lobby-head .panel-title { text-align: left; }
.player-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.player-list li {
    padding: 8px 12px; border-radius: 12px; background: var(--paper-2);
    font-weight: 600; border: 1px solid var(--edge);
}
.player-list li.me { background: #fff1d9; border-color: var(--accent-hi); }
.player-list li.offline { opacity: 0.55; }
.clan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.clan-card {
    position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
    padding: 10px 8px 10px; border-radius: 16px; cursor: pointer;
    background: var(--paper); border: 2px solid color-mix(in srgb, var(--clan-color, #c9a36a) 45%, var(--edge));
    box-shadow: 0 3px 0 color-mix(in srgb, var(--clan-color, #c9a36a) 40%, var(--edge));
    transition: transform 0.12s;
}
.clan-card:active { transform: scale(0.97); }
.clan-card .clan-art {
    width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin-bottom: 4px;
    border: 3px solid var(--clan-color, #c9a36a); background: #fff3d2;
}
.clan-card .clan-emoji { display: grid; place-items: center; font-size: 38px; background: radial-gradient(circle at 35% 30%, #fff8e0, color-mix(in srgb, var(--clan-color, #c9a36a) 45%, #f6dfb0)); }
.clan-card .clan-name { font-weight: 700; font-size: 16px; }
.clan-card .clan-motto {
    font-size: 11.5px; font-style: italic; line-height: 1.2; color: var(--ink-faint); margin: 1px 0 3px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.clan-card .clan-trait { font-size: 13px; font-weight: 600; color: var(--clan-color, var(--accent)); filter: brightness(0.8); }
.clan-card .clan-text { font-size: 12px; color: var(--ink-soft); line-height: 1.25; }
.clan-card .clan-taker:not(:empty) {
    position: absolute; top: 6px; right: 6px; max-width: 70%;
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
    background: var(--clan-color, #c9a36a); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.clan-card.mine { background: color-mix(in srgb, var(--clan-color) 16%, #fffaf0); border-color: var(--clan-color); box-shadow: 0 3px 0 var(--clan-color), 0 0 0 3px color-mix(in srgb, var(--clan-color) 30%, transparent); }
.clan-card.taken { opacity: 0.45; filter: grayscale(0.7); cursor: default; }

.net-banner {
    position: fixed; z-index: 90; top: calc(8px + var(--sat)); left: 50%; transform: translateX(-50%);
    padding: 6px 16px; border-radius: 999px; background: var(--ink); color: #fff3dc;
    font-weight: 600; font-size: 14px; box-shadow: var(--shadow);
}

/* --------------------------------------------------------------- the game */
.game {
    position: fixed; inset: 0; z-index: 5;
    display: flex; flex-direction: column;
    padding: var(--sat) var(--sar) 0 var(--sal);
    overflow: hidden;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--season-tint) 55%, transparent), transparent 40%),
        transparent;
}

/* top bar */
.topbar {
    flex: none; display: flex; align-items: center; gap: 6px;
    padding: 8px 10px 8px;
    background: linear-gradient(180deg, #fffaf0, var(--paper));
    border-bottom: 2px solid var(--edge);
    box-shadow: 0 4px 12px rgba(90, 60, 30, 0.1);
    position: relative; z-index: 3;
}
.me-chip {
    flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px;
    border: 0; background: none; padding: 0; cursor: pointer; width: 50px;
}
.me-chip .me-name { font-size: 10px; font-weight: 600; max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.stats { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; min-width: 0; }
.stat {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 4px 2px 3px; border-radius: 12px; background: var(--paper-2);
    border: 1.5px solid var(--edge); min-width: 0;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.stat .ico { font-size: 15px; line-height: 1; }
.stat b { font-size: 19px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat.up { animation: pop-up 0.8s; }
.stat.down { animation: pop-down 0.8s; }
@keyframes pop-up { 0% { transform: scale(1); } 25% { transform: scale(1.18); background: var(--good-bg); } 100% { transform: scale(1); } }
@keyframes pop-down { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-3px); background: var(--bad-bg); } 40% { transform: translateX(3px); } 60% { transform: translateX(-2px); } }
.stat.glow-good { background: var(--good-bg); border-color: var(--good); box-shadow: 0 0 0 3px rgba(63, 154, 82, 0.25), 0 0 14px rgba(63, 154, 82, 0.45); transform: translateY(-1px); }
.stat.glow-bad { background: var(--bad-bg); border-color: var(--bad); box-shadow: 0 0 0 3px rgba(200, 70, 63, 0.22), 0 0 14px rgba(200, 70, 63, 0.4); transform: translateY(-1px); }
.delta {
    position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
    font-weight: 700; font-size: 14px; pointer-events: none; white-space: nowrap;
    animation: float-up 1.4s ease-out forwards;
}
.delta.good { color: var(--good); }
.delta.bad { color: var(--bad); }
@keyframes float-up { 0% { opacity: 0; transform: translate(-50%, 0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 26px); } }
.clock { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; width: 74px; text-align: right; }
.clock .season { display: flex; flex-direction: column; line-height: 1.1; }
.clock .season b { font-size: 13px; white-space: nowrap; }
.clock .season small { font-size: 10px; color: var(--ink-soft); white-space: nowrap; }
.timer {
    font-weight: 700; font-size: 14px; padding: 1px 8px; border-radius: 999px;
    background: var(--paper-2); border: 1.5px solid var(--edge); font-variant-numeric: tabular-nums;
}
.timer.urgent { background: var(--bad); color: #fff; border-color: var(--bad); animation: tick 1s infinite; }
@keyframes tick { 50% { transform: scale(1.08); } }

.omen-strip {
    flex: none; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
    padding: 6px 10px; background: linear-gradient(90deg, #3e2d5c, #5b437f); color: #f4e9ff;
    font-size: 12.5px;
}
.omen-strip::-webkit-scrollbar { display: none; }
.omen-pill { white-space: nowrap; }
.omen-pill b { color: #ffd98a; }
.omen-pill.now { animation: tick 1.2s infinite; }

/* stage */
.stage {
    flex: 1; min-height: 0; position: relative;
    overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    display: flex; flex-direction: column; align-items: center;
    padding: 10px 14px 12px;
    container-type: size;
}
.stage[data-step="swipe"], .stage[data-step="vote"] { overflow: hidden; }
.step-head { text-align: center; max-width: 420px; margin-bottom: 10px; animation: fade-in 0.3s; }
.step-head h2 { font-size: 21px; font-weight: 700; color: var(--ink); }
.step-head p { margin: 3px 0 0; font-size: 14px; color: var(--ink-soft); }
.step-head b { color: var(--accent-lo); }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } }

/* decks: three wide tiles, art on the left */
.decks { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 440px; flex: 1 1 auto; min-height: 0; max-height: 540px; }
.deck-back {
    position: relative; flex: 1 1 0; min-height: 92px; max-height: 168px;
    display: flex; align-items: stretch; padding: 0; overflow: hidden; cursor: pointer; text-align: left;
    border-radius: 20px; border: 3px solid var(--deck-c);
    background: linear-gradient(120deg, var(--deck-c), var(--deck-d));
    box-shadow: 0 4px 0 var(--deck-d), 0 10px 20px rgba(80, 50, 20, 0.22);
    transition: transform 0.15s;
    animation: deal 0.45s backwards;
}
.deck-back:nth-child(2) { animation-delay: 0.07s; }
.deck-back:nth-child(3) { animation-delay: 0.14s; }
@keyframes deal { from { opacity: 0; transform: translateY(24px) rotate(-2deg); } }
.deck-back:active { transform: translateY(3px) scale(0.98); }
.deck-back:disabled { filter: grayscale(1); opacity: 0.5; }
.deck-back .art {
    flex: none; height: 100%; aspect-ratio: 1; border-radius: 17px 0 0 17px;
    --art-a: var(--deck-a); --art-b: var(--deck-c);
    -webkit-mask-image: linear-gradient(90deg, #000 72%, transparent);
    mask-image: linear-gradient(90deg, #000 72%, transparent);
}
.deck-back .art-emoji { font-size: 46px; }
.deck-back .deck-info {
    flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px;
    padding: 10px 14px 10px 0; color: #fff; margin-left: -10px;
}
.deck-back .deck-info b { font-size: 22px; text-shadow: 0 2px 2px rgba(0, 0, 0, 0.25); }
.deck-back .deck-info small { font-size: 13.5px; line-height: 1.25; opacity: 0.95; }
.deck-back .deck-count {
    position: absolute; right: 10px; top: 8px; white-space: nowrap;
    font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 9px; border-radius: 999px;
    background: rgba(255, 250, 235, 0.92); color: var(--ink);
}
.deck-fate { --deck-a: #f6e7a0; --deck-c: var(--fate); --deck-d: #5e7a24; }
.deck-rule { --deck-a: #e8f0f8; --deck-c: var(--rule); --deck-d: #2f5582; }
.deck-war { --deck-a: #f1b0a4; --deck-c: var(--war); --deck-d: var(--war-2); }
.deck-power { --deck-a: #efe0ff; --deck-c: var(--power); --deck-d: #5b3a8d; }
.deck-omen { --deck-a: #c8b6e8; --deck-c: var(--omen); --deck-d: #2c1f45; }

/* card faces */
.face {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: linear-gradient(180deg, #fffaf0, var(--paper));
    border: 3px solid var(--deck-c); border-radius: var(--r);
    box-shadow: var(--shadow-lg);
    text-align: left;
}
.face-art { position: relative; flex: 1 1 auto; min-height: 0; }
.face-big .face-art { min-height: 26%; }
.face-art .art { position: absolute; inset: 0; --art-a: var(--deck-a); --art-b: var(--deck-c); }
.face-art .art-emoji { font-size: 64px; }
.face-mini .face-art .art-emoji { font-size: 44px; }
.face-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(255, 250, 240, 0.0) 30%, rgba(255, 250, 240, 0.6)); pointer-events: none; }
.deck-tag {
    position: absolute; top: 8px; left: 8px; z-index: 1;
    font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
    background: var(--deck-c); color: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.banner {
    position: relative; margin: -16px 10px 0; z-index: 1;
    padding: 6px 12px; border-radius: 12px; text-align: center;
    background: linear-gradient(180deg, color-mix(in srgb, var(--deck-c) 80%, #fff), var(--deck-c));
    color: #fff; box-shadow: 0 3px 0 var(--deck-d), 0 4px 10px rgba(0, 0, 0, 0.15);
}
.banner h3 { font-size: 17px; font-weight: 700; line-height: 1.15; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); }
.deck-rule .banner { background: linear-gradient(180deg, #6f9ccc, var(--rule)); }
.flavour { margin: 6px 14px 0; font-size: 12.5px; font-style: italic; color: var(--ink-soft); line-height: 1.25; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sides { display: flex; flex-direction: column; gap: 5px; padding: 8px 10px 10px; flex: none; }
.side {
    display: flex; flex-direction: column; gap: 3px; padding: 6px 9px; border-radius: 12px;
    background: var(--paper-2); border: 1.5px solid transparent;
    transition: background 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
}
.side-label { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.arrow { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; flex: none; color: #fff; }
.side-yes .arrow { background: var(--good); }
.side-no .arrow { background: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
    display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 11px;
    font-size: 12.5px; font-weight: 600; background: #fff; border: 1px solid var(--edge); color: var(--ink-soft);
    max-width: 100%;
}
.chip.good { background: var(--good-bg); border-color: #a6d39b; color: #2d6f3b; }
.chip.bad { background: var(--bad-bg); border-color: #efb1a9; color: #9c2f29; }
.chip.lock { background: #f1e9dc; color: var(--ink-soft); border-style: dashed; }
.side.disabled { opacity: 0.7; }
.side.disabled .side-label { text-decoration: line-through; text-decoration-color: rgba(125, 98, 76, 0.5); }

.vs {
    display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px 8px;
    margin: 6px 10px 0; padding: 5px 8px; border-radius: 12px;
    background: color-mix(in srgb, var(--deck-c) 10%, #fff); border: 1px dashed color-mix(in srgb, var(--deck-c) 45%, transparent);
    font-size: 13px;
}
.vs.base { font-size: 12px; }
.odds { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; font-weight: 700; font-size: 13px; }
.odds > span { white-space: nowrap; }

/* big swipe card */
.swipe-zone { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; position: relative; container-type: size; }
.swipe-card {
    position: relative; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
    width: min(100cqw - 12px, 340px, (100cqh - 6px) * 0.72);
    height: min(100cqh - 6px, 500px);
    will-change: transform;
    animation: card-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2) backwards;
}
@keyframes card-in { from { opacity: 0; transform: translateY(30px) scale(0.92) rotate(-3deg); } }
.swipe-card .face { width: 100%; height: 100%; }
.swipe-card.dragging { cursor: grabbing; }
.swipe-card.settling { transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.swipe-card.flying { transition: transform 0.28s ease-in, opacity 0.28s ease-in; opacity: 0; }
.swipe-card.shake { animation: shake 0.4s; }
@keyframes shake { 20% { translate: -8px 0; } 40% { translate: 8px 0; } 60% { translate: -5px 0; } 80% { translate: 4px 0; } }
.swipe-card.lean-yes .side-yes { background: var(--good-bg); border-color: var(--good); transform: scale(1.03); }
.swipe-card.lean-no .side-no { background: var(--bad-bg); border-color: var(--bad); transform: scale(1.03); }
.swipe-card.lean-yes .side-no, .swipe-card.lean-no .side-yes { opacity: 0.45; }
.swipe-card.lean-yes .side-yes.disabled { background: #f1e9dc; border-color: var(--ink-faint); }
.swipe-card.lean-no .side-no.disabled { background: #f1e9dc; border-color: var(--ink-faint); }
.stamp {
    position: absolute; top: 18%; z-index: 4; pointer-events: none;
    padding: 6px 14px; border-radius: 12px; border: 3px solid currentColor;
    font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: 0.5px;
    background: rgba(255, 252, 244, 0.9); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    max-width: 70%; text-align: center; line-height: 1.1;
}
.stamp-yes { left: 14px; color: var(--good); transform: rotate(-12deg); opacity: var(--yes, 0); }
.stamp-no { right: 14px; color: var(--bad); transform: rotate(12deg); opacity: var(--no, 0); }
.swipe-btns { flex: none; display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 12px; }
.swipe-hint { font-size: 12px; color: var(--ink-faint); font-weight: 600; letter-spacing: 0.3px; }
.round-btn {
    width: 56px; height: 56px; border-radius: 50%; border: 3px solid currentColor; background: #fffaf0;
    font-size: 24px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); touch-action: manipulation;
    transition: transform 0.1s;
}
.round-btn:active { transform: scale(0.9); }
.round-btn.yes { color: var(--good); }
.round-btn.no { color: var(--bad); }
.round-btn.off { opacity: 0.35; }

/* pick two */
.pick-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 480px; flex: 1; min-height: 0; max-height: 440px; }
.pick { position: relative; padding: 0; border: 0; background: none; cursor: pointer; min-height: 0; display: flex; animation: deal 0.4s backwards; }
.pick:nth-child(2) { animation-delay: 0.08s; }
.pick .face { width: 100%; height: 100%; transition: transform 0.15s; }
.pick:active .face { transform: scale(0.97) translateY(2px); }
.face-mini .face-art { min-height: 70px; }
.face-mini .banner { margin: -12px 6px 0; padding: 4px 6px; border-radius: 10px; }
.face-mini .banner h3 { font-size: 14px; }
.face-mini .deck-tag { font-size: 10px; padding: 1px 7px; top: 6px; left: 6px; }
.face-mini .sides { padding: 6px; gap: 4px; }
.face-mini .side { padding: 4px 6px; border-radius: 10px; }
.face-mini .side-label { font-size: 12px; gap: 4px; line-height: 1.15; }
.face-mini .arrow { width: 16px; height: 16px; font-size: 10px; }
.face-mini .chip { font-size: 11px; padding: 0 6px; white-space: normal; }
.face-mini .vs { margin: 5px 6px 0; padding: 3px 6px; font-size: 11px; gap: 2px 6px; }
.face-mini .vs .odds { font-size: 12px; }
.face-mini .vs.base .muted { display: none; }
.keep-tag {
    position: absolute; top: -8px; right: -4px; z-index: 2;
    padding: 2px 10px; border-radius: 999px; background: var(--accent); color: #fff;
    font-size: 12px; font-weight: 700; box-shadow: 0 2px 0 var(--accent-lo);
}
.btn-reroll { margin-top: 12px; flex: none; }

/* targets */
.kept-strip {
    display: flex; align-items: center; gap: 10px; width: 100%; max-width: 420px;
    padding: 6px 12px 6px 6px; border-radius: 14px; margin-bottom: 10px;
    background: color-mix(in srgb, var(--deck-c) 12%, #fffaf0); border: 2px solid color-mix(in srgb, var(--deck-c) 50%, transparent);
}
.kept-strip .art.thumb { width: 44px; height: 44px; border-radius: 10px; flex: none; --art-a: var(--deck-a); --art-b: var(--deck-c); }
.kept-strip .art-emoji { font-size: 22px; }
.kept-strip .ks-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.kept-strip small { color: var(--ink-soft); font-size: 12px; }
.kept-strip b { font-size: 15px; }
.targets { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; }
.target-card {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; cursor: pointer;
    border-radius: 16px; background: var(--paper); border: 2px solid color-mix(in srgb, var(--clan) 50%, var(--edge));
    box-shadow: 0 3px 0 color-mix(in srgb, var(--clan) 40%, var(--edge)), 0 6px 14px rgba(80, 50, 20, 0.12);
    animation: deal 0.35s backwards; transition: transform 0.12s;
}
.target-card:nth-child(2) { animation-delay: 0.06s; }
.target-card:nth-child(3) { animation-delay: 0.12s; }
.target-card:active { transform: scale(0.98); }
.t-body { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.t-body b { font-size: 16px; }
.t-body small { color: var(--ink-soft); font-size: 13px; }
.t-body .odds { margin-top: 3px; color: var(--war-2); }
.t-go { font-size: 28px; color: var(--ink-faint); }

/* done / waiting */
.waiting { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 420px; }
.waiting .kept-strip { margin: 0; }
.kept-strip.chosen b { color: var(--ink); }
.btn-ready { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.03); } }
.ready-badge {
    width: 100%; text-align: center; padding: 14px; border-radius: 16px;
    background: var(--good-bg); color: #2d6f3b; font-weight: 700; font-size: 17px; border: 2px solid #a6d39b;
}
.ready-slot { width: 100%; }
.ready-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.ready-list li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 250, 240, 0.7); border: 1px solid var(--edge); }
.ready-list .rl-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ready-list li small { color: var(--ink-faint); font-weight: 500; }
.ready-list em { font-style: normal; font-size: 13px; color: var(--ink-faint); }
.ready-list li.is-ready em { color: var(--good); font-weight: 700; }

/* scoreboard */
.scoreboard { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; }
.score-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.score-row {
    position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: 16px; background: var(--paper); border: 2px solid color-mix(in srgb, var(--clan) 45%, var(--edge));
    box-shadow: var(--shadow); animation: deal 0.5s backwards; animation-delay: calc(var(--i) * 0.12s);
}
.score-row.winner {
    background: linear-gradient(135deg, #fff6d6, #ffe7a8); border-color: #e0a930;
    box-shadow: 0 3px 0 #c58a1c, 0 10px 30px rgba(224, 169, 48, 0.4);
}
.score-row .rank { width: 26px; text-align: center; font-weight: 700; font-size: 18px; color: var(--ink-soft); flex: none; }
.score-row.winner .rank { font-size: 24px; animation: bob 2s ease-in-out infinite; }
.s-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.s-body b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-body small { color: var(--ink-soft); font-size: 12px; }
.vp-parts { display: flex; flex-wrap: wrap; gap: 3px; }
.vp-parts .chip { font-size: 11px; padding: 0 6px; }
.vp { display: flex; flex-direction: column; align-items: center; flex: none; }
.vp b { font-size: 28px; line-height: 1; color: var(--accent-lo); }
.vp small { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.score-btns { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }

/* incoming offers */
.offers-in { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 0 10px; }
.offers-in:empty { display: none; }
.offer-in {
    display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 16px;
    background: #fffaf0; border: 2px solid var(--clan); box-shadow: var(--shadow);
    animation: slide-up 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes slide-up { from { opacity: 0; transform: translateY(20px); } }
.offer-text { flex: 1; font-size: 13px; line-height: 1.25; min-width: 0; }
.offer-text .good { color: var(--good); }
.offer-text .bad { color: var(--bad); }
.mini-btn {
    flex: none; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; cursor: pointer;
    border: 2px solid currentColor; background: #fff; font-weight: 700; font-size: 15px; touch-action: manipulation;
}
.mini-btn.yes { color: var(--good); background: var(--good-bg); }
.mini-btn.no { color: var(--bad); }

/* bottom bar */
.bottombar {
    flex: none; display: flex; align-items: stretch; gap: 8px;
    padding: 8px 10px calc(8px + var(--sab));
    background: linear-gradient(0deg, #fffaf0, var(--paper));
    border-top: 2px solid var(--edge); box-shadow: 0 -4px 12px rgba(90, 60, 30, 0.08);
    margin-top: 8px;
}
.nbrs { flex: 1; display: flex; gap: 4px; min-width: 0; }
.nbr {
    flex: 1 1 0; min-width: 0; max-width: 96px; display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 4px 2px; border: 0; border-radius: 14px; background: transparent; cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.nbr:active { transform: scale(0.95); background: var(--paper-2); }
.nbr-pic { position: relative; }
.nbr .dot { position: absolute; left: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fffaf0; }
.nbr .dot.on { background: #4cc265; }
.nbr .dot.off { background: #b5a48f; }
.nbr .tick {
    position: absolute; right: -4px; top: -4px; width: 20px; height: 20px; border-radius: 50%;
    display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700;
    background: var(--good); color: #fff; border: 2px solid #fffaf0; animation: pop-in 0.3s;
}
.nbr .sent { position: absolute; right: -6px; bottom: -2px; font-style: normal; font-size: 14px; }
@keyframes pop-in { from { transform: scale(0); } }
.nbr-name { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbr-honour { font-size: 11px; color: var(--ink-soft); line-height: 1; }
.tools { flex: none; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.tool {
    position: relative; display: flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 12px 4px 8px; border-radius: 999px;
    border: 2px solid var(--edge); background: var(--paper); box-shadow: 0 2px 0 var(--edge); cursor: pointer;
    touch-action: manipulation;
}
.tool:active { transform: translateY(1px); box-shadow: none; }
.tool span { font-size: 17px; }
.tool small { font-size: 12.5px; font-weight: 600; }
.tool .badge {
    position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
    display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700;
    background: var(--accent); color: #fff; border: 2px solid #fffaf0;
}

/* overlays */
.overlay {
    position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center;
    background: rgba(60, 38, 20, 0.42); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
    animation: fade 0.2s;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
    width: 100%; max-width: 520px; max-height: calc(100% - 40px - var(--sat)); overflow-y: auto; overscroll-behavior: contain;
    padding: 14px 16px calc(18px + var(--sab));
    background: var(--paper); border-radius: 24px 24px 0 0; border: 2px solid var(--edge); border-bottom: 0;
    box-shadow: 0 -10px 40px rgba(60, 30, 10, 0.3);
    animation: sheet-up 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0.4; } }
.ov-report { align-items: center; padding: calc(12px + var(--sat)) 12px calc(12px + var(--sab)); }
.ov-report .sheet { border-radius: 24px; border-bottom: 2px solid var(--edge); max-height: 100%; animation: pop-sheet 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes pop-sheet { from { transform: scale(0.85); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sheet-head h2 { flex: 1; font-size: 21px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.purse { font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); border: 1.5px solid var(--edge); }
.x-btn { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--edge); background: var(--paper-2); cursor: pointer; font-weight: 700; }
.sheet-sub { margin: 0 0 10px; color: var(--ink-soft); font-size: 14px; }
.sheet-sub.small { font-size: 12.5px; text-align: center; margin: 10px 0; }
.list-title { font-size: 16px; margin: 12px 0 6px; }
.power-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.power-row {
    display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px;
    background: #fffaf0; border: 1.5px solid var(--edge); box-shadow: 0 2px 0 var(--edge);
}
.power-row .art.thumb { width: 60px; height: 60px; border-radius: 12px; flex: none; --art-a: #f3e6ff; --art-b: #b597e0; }
.power-row .art-emoji { font-size: 28px; }
.p-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.p-body b { font-size: 15px; }
.p-body small { font-size: 12.5px; color: var(--ink-soft); line-height: 1.25; }
.p-flavour { font-size: 11.5px; color: var(--ink-faint); line-height: 1.2; }
.motto { display: block; margin: 0 0 6px; font-style: italic; font-size: 13.5px; color: var(--ink-soft); }
.trait .motto { margin-bottom: 4px; }
.omen-strike { flex-direction: column; gap: 2px; }
.omen-strike b { color: var(--omen); font-size: 13.5px; }
.p-tag { font-size: 10.5px; font-weight: 600; color: var(--power); }
.p-tag.single { color: var(--accent-lo); }
.price-btn {
    flex: none; min-width: 64px; min-height: 48px; padding: 4px 10px; border-radius: 14px; cursor: pointer;
    border: 2px solid #c58a1c; background: linear-gradient(180deg, #ffe7a3, #f2c24f); box-shadow: 0 2px 0 #c58a1c;
    font-size: 12px; font-weight: 600; line-height: 1.15; touch-action: manipulation;
}
.price-btn b { font-size: 15px; }
.price-btn.play { border-color: var(--accent-lo); background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: #fff; box-shadow: 0 2px 0 var(--accent-lo); font-size: 14px; }
.price-btn.off { filter: grayscale(0.8); opacity: 0.55; }
.price-btn:active { transform: translateY(2px); box-shadow: none; }
.use-targets { display: flex; gap: 4px; flex: none; }
.mini-pick { border: 0; background: none; padding: 2px; cursor: pointer; border-radius: 50%; }
.empty { list-style: none; text-align: center; color: var(--ink-faint); padding: 16px; font-style: italic; }
.trait { padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--clan) 14%, #fffaf0); border: 1.5px solid color-mix(in srgb, var(--clan) 50%, transparent); display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.leave-btn { width: 100%; margin-top: 14px; }
.intel { margin: -4px 0 10px; font-size: 12.5px; color: var(--ink-soft); }

/* trade composer */
.my-offer {
    display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; margin-bottom: 10px; border-radius: 14px;
    background: #fff1d9; border: 1.5px dashed var(--accent-hi); font-size: 13px;
}
.my-offer .mo-text { flex: 1; }
.trade-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: start; }
.trade-col { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 16px; min-width: 0; }
.trade-col h3 { font-size: 14px; text-align: center; }
.trade-col.give { background: var(--bad-bg); }
.trade-col.give h3 { color: var(--bad); }
.trade-col.get { background: var(--good-bg); }
.trade-col.get h3 { color: var(--good); }
.trade-swap { align-self: center; font-size: 22px; color: var(--ink-faint); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 2px; background: #fffaf0; border-radius: 999px; padding: 3px; }
.st-ico { width: 24px; text-align: center; font-size: 16px; flex: none; }
.st-btn {
    width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--edge); background: var(--paper-2);
    font-weight: 700; font-size: 18px; line-height: 1; cursor: pointer; flex: none; touch-action: manipulation;
}
.st-btn:disabled { opacity: 0.35; }
.st-val { min-width: 20px; text-align: center; font-size: 17px; font-variant-numeric: tabular-nums; }

/* old scrolls */
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab {
    flex: 1; min-height: 40px; border-radius: 999px; border: 2px solid var(--edge); background: var(--paper-2);
    font-weight: 600; font-size: 13px; cursor: pointer;
}
.tab small { color: var(--ink-faint); }
.tab.on { background: var(--ink); color: #fff6e0; border-color: var(--ink); }
.tab.on small { color: #e7d3a8; }
.scroll-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.scroll-card {
    display: flex; flex-direction: column; padding: 0; overflow: hidden; cursor: pointer; text-align: center;
    border-radius: 12px; border: 2px solid var(--deck-c); background: #fffaf0; box-shadow: 0 2px 0 var(--deck-d);
}
.scroll-card .art { aspect-ratio: 1; --art-a: var(--deck-a); --art-b: var(--deck-c); }
.scroll-card .art-emoji { font-size: 30px; }
.scroll-card b { font-size: 11.5px; padding: 4px 4px 5px; line-height: 1.15; }
.scroll-grid .empty { grid-column: 1 / -1; }
.scroll-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-preview .face { width: min(240px, 70vw); height: min(380px, 56vh); }
.scroll-preview-btns { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 300px; }

/* round report */
.report { display: flex; flex-direction: column; gap: 10px; }
.report-head { text-align: center; }
.report-season { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.report-head h2 { font-size: 24px; font-weight: 700; color: var(--accent-lo); }
.rep-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rep {
    position: relative; padding: 9px 12px 9px 16px; border-radius: 14px; font-size: 14.5px; font-weight: 500; overflow: hidden;
    background: #fff; border: 1.5px solid var(--edge); box-shadow: 0 2px 0 rgba(120, 84, 40, 0.15);
    animation: deal 0.4s backwards; animation-delay: calc(0.15s + var(--i) * 0.09s);
}
.rep::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--ink-faint); }
.rep.tone-good { background: var(--good-bg); border-color: #a6d39b; }
.rep.tone-good::before { background: var(--good); }
.rep.tone-bad { background: var(--bad-bg); border-color: #efb1a9; }
.rep.tone-bad::before { background: var(--bad); }
.rep.tone-info { background: #f6f0e3; }
.rep.tone-info::before { background: var(--edge); }
.season-sum {
    padding: 10px 14px; border-radius: 16px; background: linear-gradient(180deg, #fff8e6, #f6e8c8);
    border: 2px solid var(--edge); display: flex; flex-direction: column; gap: 3px;
    animation: deal 0.5s backwards; animation-delay: 0.5s;
}
.season-sum h3 { text-align: center; font-size: 17px; margin-bottom: 4px; }
.sl-row { display: flex; justify-content: space-between; font-size: 15px; padding: 2px 0; border-bottom: 1px dashed rgba(168, 141, 114, 0.4); }
.sl-row b { font-variant-numeric: tabular-nums; }
.sl-row.good b { color: var(--good); }
.sl-row.bad b { color: var(--bad); }
.sl-notes { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-soft); }

/* toasts */
.toasts {
    position: fixed; z-index: 100; left: 50%; top: calc(74px + var(--sat)); transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
    width: calc(100% - 32px); max-width: 420px;
}
.toast {
    padding: 9px 16px; border-radius: 999px; background: var(--ink); color: #fff6e0;
    font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-lg); text-align: center;
    animation: toast-in 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3); transition: opacity 0.35s, transform 0.35s;
}
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(0.9); } }

/* short phones: tighten the chrome */
@media (max-height: 680px) {
    .topbar { padding: 6px 8px; }
    .stat b { font-size: 17px; }
    .step-head { margin-bottom: 6px; }
    .step-head h2 { font-size: 18px; }
    .step-head p { font-size: 12.5px; }
    .swipe-btns { padding-top: 6px; }
    .round-btn { width: 48px; height: 48px; font-size: 20px; }
    .flavour { display: none; }
    .bottombar { padding-top: 6px; }
}
@media (min-width: 700px) {
    .stage { padding-top: 20px; }
    .nbrs { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Lobby: turn timer (host picks; others see it read-only) */
.timer-row { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; margin: 10px 0 2px; flex-wrap: wrap; }
.timer-row select { font: inherit; font-size: 15px; padding: 6px 10px; border-radius: 12px; border: 2px solid rgba(90, 60, 30, .35); background: #fffaf0; color: inherit; }
.timer-row select:disabled { opacity: .75; }
