/* ==========================================================================
   Bidiocy: a market of mythical beasts.
   Tavern table, stitched leather mat, parchment, wax and well-thumbed cards.
   ========================================================================== */

:root {
    --ink: #2b1d14;
    --ink-soft: rgba(43, 29, 20, 0.72);
    --parch: #efe2c3;
    --parch-2: #e0cb9f;
    --parch-3: #c9ae7a;
    --oak: #1a110b;
    --oak-2: #3a2616;
    --gold: #d4a24a;
    --gold-hi: #f3d488;
    --gold-lo: #8a5f1c;
    --wax: #8f1d17;
    --wax-hi: #c8412f;
    --moss: #24443a;
    --light: #f3e8cf;
    --light-soft: rgba(243, 232, 207, 0.7);

    --f-display: 'Pirata One', 'IM Fell English SC', serif;
    --f-label: 'IM Fell English SC', 'EB Garamond', serif;
    --f-body: 'EB Garamond', Georgia, serif;

    --table: url('../img/oak.jpg');
    --mat: url('../img/leather.jpg');
    --parchment: url('../img/parchment.jpg');
    --wear: url('../img/wear.png');

    --ease-out: cubic-bezier(.2, .8, .2, 1);
    --ease-quint: cubic-bezier(.22, 1, .36, 1);
    /* Small overshoot, only for physical objects landing: a card dropped, a seal pressed, a shield set down */
    --ease-land: cubic-bezier(.3, 1.3, .6, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: var(--f-body);
    font-size: 18px;
    line-height: 1.35;
    color: var(--light);
    background: var(--oak) var(--table) center / cover fixed;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: lining-nums;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Candlelight: two warm pools that breathe slightly */
.candlelight {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(60% 55% at 30% 40%, rgba(255, 176, 80, 0.13), transparent 70%),
        radial-gradient(50% 50% at 75% 60%, rgba(255, 150, 60, 0.10), transparent 70%),
        radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55));
    animation: candle-breathe 5.3s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}
.candlelight::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(120% 90% at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.6));
    mix-blend-mode: multiply;
}
@keyframes candle-breathe {
    0% { opacity: .85; } 35% { opacity: 1; } 50% { opacity: .9; } 80% { opacity: 1; } 100% { opacity: .92; }
}

/* ---------- Type ---------- */
.logo {
    font-family: var(--f-display);
    font-weight: 400;
    margin: 0;
    line-height: .9;
    color: var(--gold-hi);
    background: linear-gradient(180deg, #fbe7a8 0%, #e3b457 45%, #a8741f 55%, #f0cf7c 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 rgba(40, 20, 5, .9)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5));
    letter-spacing: .01em;
}
.display { font-family: var(--f-display); font-weight: 400; letter-spacing: .01em; }
.label { font-family: var(--f-label); letter-spacing: .06em; }
.ink { color: var(--ink); }

/* ---------- Coins ---------- */
.coin-ico { width: .95em; height: .95em; display: inline-block; vertical-align: -0.12em; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35)); }
.purse { display: inline-flex; align-items: center; gap: .28em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
    --w: 240px;
    --tilt: 0deg;
    position: relative;
    width: var(--w);
    aspect-ratio: 2 / 3;
    flex: none;
    font-size: calc(var(--w) / 15);
    color: var(--ink);
    border-radius: calc(var(--w) * .06) calc(var(--w) * .052) calc(var(--w) * .058) calc(var(--w) * .05);
    background: #efe3c6 var(--parchment) center / 180%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .45),
        inset 0 0 calc(var(--w) * .05) rgba(120, 80, 30, .35),
        0 0 0 1px rgba(60, 38, 18, .45),
        0 1px 1px rgba(0, 0, 0, .35),
        0 calc(var(--w) * .03) calc(var(--w) * .06) -2px rgba(0, 0, 0, .55),
        0 calc(var(--w) * .08) calc(var(--w) * .16) -8px rgba(0, 0, 0, .45);
    transform: rotate(var(--tilt));
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
    user-select: none;
    -webkit-user-select: none;
    isolation: isolate;
}
.card.flat { --tilt: 0deg; }
.card-face { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }

/* The painting. Its own deckled paper edge sits inside the card's paper. */
.card-art {
    position: absolute;
    inset: 2.4%;
    border-radius: 3.5% / 2.4%;
    overflow: hidden;
    background: #d9c79f;
    box-shadow: inset 0 0 0 1px rgba(60, 38, 18, .25), 0 1px 0 rgba(255, 255, 255, .5);
}
.card-art img, .card-art svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-art::after {
    /* Faint varnish + ink-darkened edge */
    content: ''; position: absolute; inset: 0; pointer-events: none;
    box-shadow: inset 0 0 calc(var(--w) * .06) rgba(70, 40, 10, .35);
    background: linear-gradient(160deg, rgba(255, 240, 200, .12), transparent 40%, rgba(60, 30, 5, .12));
}

/* Rank I-IV: from bare paper to gilt edges */
.card::before {
    content: ''; position: absolute; inset: 1.6%; z-index: 3; pointer-events: none;
    border-radius: inherit;
    border: 1px solid rgba(60, 38, 18, .28);
}
.card.rank-2::before { border: 2px double #9aa3a8; }
.card.rank-3::before { border: 2px solid var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 230, 160, .5); }
.card.rank-4::before, .card.card-goose::before {
    border: 3px double var(--gold);
    box-shadow: inset 0 0 0 1px rgba(255, 236, 170, .7), 0 0 0 1px rgba(138, 95, 28, .6);
}

/* Wear: creases, scuffs, stains. Offset per card so no two look alike. */
.card::after {
    content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
    border-radius: inherit;
    background: var(--wear) var(--wx, 0%) var(--wy, 0%) / 150% 150% no-repeat;
    transform: scale(var(--wsx, 1), var(--wsy, 1));
    opacity: .9;
}

.card-numeral {
    position: absolute; z-index: 2;
    top: 1.4%; left: 2%;
    min-width: 2.1em; height: 2.1em; padding: 0 .35em;
    display: grid; place-items: center;
    font-family: var(--f-label); font-size: .78em; line-height: 1;
    color: var(--ink);
    background: #f1e4c4 var(--parchment) center / 400%;
    border-radius: 50%;
    box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 3px #efe0bd, 0 2px 4px rgba(0, 0, 0, .4);
}
.card.rank-3 .card-numeral, .card.rank-4 .card-numeral { box-shadow: 0 0 0 1.5px var(--gold-lo), 0 0 0 3px var(--gold), 0 2px 4px rgba(0, 0, 0, .4); }

/* Wax seal with the collection's value */
.card-seal {
    position: absolute; z-index: 2;
    top: .6%; right: 1%;
    width: 2.9em; height: 2.9em;
    display: grid; place-items: center;
    border-radius: 47% 53% 50% 46% / 52% 45% 55% 48%;
    background:
        radial-gradient(circle at 34% 30%, rgba(255, 170, 140, .55), transparent 38%),
        radial-gradient(circle at 50% 55%, var(--wax-hi), var(--wax) 62%, #5a0f0b 100%);
    box-shadow:
        inset 0 -2px 3px rgba(0, 0, 0, .45),
        inset 0 2px 2px rgba(255, 200, 180, .25),
        0 2px 3px rgba(0, 0, 0, .5);
    transform: rotate(-8deg);
}
.card-seal::before {
    content: ''; position: absolute; inset: 16%; border-radius: 50%;
    border: 1.5px solid rgba(60, 5, 3, .55);
    box-shadow: 0 1px 0 rgba(255, 170, 150, .3);
}
.card-seal span {
    position: relative;
    font-family: var(--f-body); font-weight: 700; font-size: .95em;
    color: #f7d9c8;
    text-shadow: 0 -1px 0 rgba(60, 0, 0, .8), 0 1px 0 rgba(255, 180, 160, .35);
    letter-spacing: -.02em;
}
.card-seal.gold {
    width: 3.2em; height: 3.2em;
    background:
        radial-gradient(circle at 34% 30%, rgba(255, 250, 210, .8), transparent 40%),
        radial-gradient(circle at 50% 55%, #f2cd6d, #c18a2c 62%, #7a5214 100%);
}
.card-seal.gold::before { border-color: rgba(100, 60, 10, .55); }
.card-seal.gold span { color: #5a3508; text-shadow: 0 1px 0 rgba(255, 240, 190, .7); font-size: .9em; }

/* Name ribbon, laid over the painting's lower edge */
.card-banner {
    position: absolute; z-index: 2;
    left: -1.5%; right: -1.5%; bottom: 4.5%;
    padding: .38em 1.5em .42em;
    display: flex; flex-direction: column; align-items: center; gap: .12em;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .4), transparent 30%, rgba(90, 55, 20, .2)),
        #ead9b2 var(--parchment) center / 300%;
    clip-path: polygon(0 0, 100% 0, 95.5% 50%, 100% 100%, 0 100%, 4.5% 50%);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45));
}
.card-banner::before, .card-banner::after {
    content: ''; position: absolute; left: 4%; right: 4%; height: 1px; background: rgba(60, 38, 18, .45);
}
.card-banner::before { top: 7%; }
.card-banner::after { bottom: 7%; }
.card-name {
    font-family: var(--f-label);
    font-size: 1.02em;
    line-height: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
    color: var(--ink);
}
.card-sub {
    display: flex; gap: .4em;
    font-family: var(--f-label);
    font-size: .54em; letter-spacing: .08em; line-height: 1;
    color: var(--ink-soft);
    white-space: nowrap;
}
.card-sub i { font-style: normal; opacity: .6; }

/* Royal cards and goose eggs catch the candlelight */
.card-foil { display: none; }
.card.rank-4 .card-foil, .card.card-goose .card-foil {
    display: block; position: absolute; inset: 0; z-index: 3; pointer-events: none;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 226, 150, .28) 45%, rgba(255, 250, 225, .45) 50%, rgba(255, 226, 150, .28) 55%, transparent 65%);
    background-size: 300% 100%;
    background-position: 120% 0;
    mix-blend-mode: soft-light;
    animation: foil-sweep 6s ease-in-out infinite;
}
@keyframes foil-sweep { 0%, 55% { background-position: 120% 0; } 100% { background-position: -40% 0; } }

/* Card back */
.card-back {
    background:
        radial-gradient(circle at 50% 50%, transparent 22%, rgba(0, 0, 0, .25) 23%, transparent 24%),
        repeating-linear-gradient(45deg, rgba(212, 162, 74, .28) 0 1px, transparent 1px 14px),
        repeating-linear-gradient(-45deg, rgba(212, 162, 74, .28) 0 1px, transparent 1px 14px),
        #6a1714 url('../img/cardback.jpg') center / cover;
}
.card-back.painted { background: #6a1714 var(--back) center / cover; }
.card-back::before { border: 2px solid rgba(212, 162, 74, .55); inset: 4%; }
.card-back.painted::before { border: none; }
.back-roundel {
    position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1; transform: translate(-50%, -50%);
    border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(circle, #7a1b17, #4d0e0b);
    box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px #5a100d, 0 0 0 6px rgba(212, 162, 74, .6);
}
.back-roundel span { font-family: var(--f-display); font-size: 2.6em; color: var(--gold-hi); text-shadow: 0 2px 0 #3a0906; }

/* Interaction: a card lifts off the leather when touched */
.card.liftable { cursor: pointer; }
.card.liftable:hover { transform: translateY(-6px) rotate(0deg) scale(1.02); }
.card.liftable:active { transform: translateY(-2px) rotate(0deg) scale(.99); transition-duration: .08s; }

/* 3D flip used when a card is turned over on the mat */
.flipper { position: relative; perspective: 1400px; }
.flipper-inner { position: relative; transform-style: preserve-3d; transition: transform .7s var(--ease-out); }
.flipper-inner > .card:first-child { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flipper-inner > .card.card-back {
    position: absolute; inset: 0; width: 100%;
    transform: rotateY(180deg);
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.flipper.face-down .flipper-inner { transform: rotateY(180deg); }

/* Crest: a round thumbnail of a collection */
.crest {
    --s: 30px;
    width: var(--s); height: var(--s);
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
    flex: none;
    background: var(--tint);
    box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 3px var(--gold), 0 2px 4px rgba(0, 0, 0, .45);
}
.crest img, .crest svg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; transform: scale(1.35); }

/* Shields */
.shield { display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }

/* ==========================================================================
   Tactile controls
   ========================================================================== */
.btn {
    --depth: 5px;
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 56px;
    padding: .55em 1.2em;
    border: 0;
    border-radius: 12px 10px 13px 11px;
    font-family: var(--f-label);
    font-size: 1.15rem;
    letter-spacing: .05em;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform .08s ease, box-shadow .08s ease, filter .2s;
    transform: translateY(0);
}
.btn:disabled { cursor: not-allowed; filter: grayscale(.7) brightness(.8); opacity: .6; }
.btn:not(:disabled):active, .btn.pressed { transform: translateY(calc(var(--depth) - 1px)); }
.btn:focus-visible { outline: 2px dashed var(--gold-hi); outline-offset: 4px; }

/* Worn oak token */
.btn-wood {
    color: #f6e7c5;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 220, 170, .15);
    background:
        linear-gradient(180deg, rgba(255, 220, 170, .18), transparent 40%, rgba(0, 0, 0, .25)),
        #5a3a22 var(--table) 30% 40% / 900px;
    box-shadow:
        inset 0 1px 0 rgba(255, 220, 170, .35),
        inset 0 0 0 1px rgba(20, 10, 5, .6),
        0 var(--depth) 0 #24160c,
        0 calc(var(--depth) + 3px) 8px rgba(0, 0, 0, .5);
}
.btn-wood:not(:disabled):active, .btn-wood.pressed {
    box-shadow: inset 0 1px 0 rgba(255, 220, 170, .2), inset 0 0 0 1px rgba(20, 10, 5, .6), 0 1px 0 #24160c, 0 2px 4px rgba(0, 0, 0, .5);
}

/* Pressed-wax action */
.btn-wax {
    color: #fbe2d2;
    text-shadow: 0 -1px 0 rgba(60, 0, 0, .8);
    background:
        radial-gradient(120% 90% at 30% 20%, rgba(255, 170, 140, .35), transparent 50%),
        linear-gradient(180deg, var(--wax-hi), var(--wax) 70%, #6a130e);
    box-shadow:
        inset 0 1px 0 rgba(255, 190, 170, .4),
        inset 0 -2px 4px rgba(60, 0, 0, .5),
        0 var(--depth) 0 #4a0b08,
        0 calc(var(--depth) + 3px) 8px rgba(0, 0, 0, .5);
}
.btn-wax:not(:disabled):active { box-shadow: inset 0 1px 0 rgba(255, 190, 170, .3), inset 0 -2px 4px rgba(60, 0, 0, .5), 0 1px 0 #4a0b08, 0 2px 4px rgba(0, 0, 0, .5); }

/* Gilt */
.btn-gold {
    color: #4a2c06;
    text-shadow: 0 1px 0 rgba(255, 240, 190, .7);
    background: linear-gradient(180deg, #fbe39a, #e1ad4a 55%, #b9822a);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 230, .8),
        inset 0 0 0 1px rgba(110, 70, 10, .5),
        0 var(--depth) 0 #7a5214,
        0 calc(var(--depth) + 3px) 8px rgba(0, 0, 0, .5);
}
.btn-gold:not(:disabled):active { box-shadow: inset 0 1px 0 rgba(255, 255, 230, .6), inset 0 0 0 1px rgba(110, 70, 10, .5), 0 1px 0 #7a5214, 0 2px 4px rgba(0, 0, 0, .5); }

/* Plain parchment */
.btn-parch {
    color: var(--ink);
    background: #eadbb7 var(--parchment) center / 300%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .6),
        inset 0 0 0 1px rgba(60, 38, 18, .35),
        0 var(--depth) 0 #9b7f4f,
        0 calc(var(--depth) + 3px) 8px rgba(0, 0, 0, .45);
}
.btn-parch:not(:disabled):active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(60, 38, 18, .35), 0 1px 0 #9b7f4f, 0 2px 4px rgba(0, 0, 0, .45); }

.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 64px; font-size: 1.3rem; }
.btn small { display: block; font-family: var(--f-body); font-size: .72em; letter-spacing: 0; opacity: .8; text-transform: none; }

/* Round gold coins for bidding */
.coin-btn {
    --depth: 6px;
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    border: 0; border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--f-body); font-weight: 700;
    font-size: clamp(1.3rem, 6vw, 1.8rem);
    color: #5a3508;
    text-shadow: 0 1px 0 rgba(255, 240, 190, .8);
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 252, 225, .85), transparent 30%),
        radial-gradient(circle, #f3d07a 0 52%, #c89235 53% 56%, #f0c865 57% 72%, #a8741f 73% 100%);
    box-shadow:
        inset 0 0 0 2px rgba(120, 75, 15, .6),
        inset 0 -3px 5px rgba(90, 50, 5, .45),
        0 var(--depth) 0 #7a5214,
        0 calc(var(--depth) + 4px) 10px rgba(0, 0, 0, .55);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform .07s ease, box-shadow .07s ease, filter .2s;
}
.coin-btn span { display: inline-flex; align-items: baseline; }
.coin-btn span::before { content: '+'; font-size: .62em; margin-right: .04em; opacity: .75; }
.coin-btn:not(:disabled):active { transform: translateY(5px) scale(.98); box-shadow: inset 0 0 0 2px rgba(120, 75, 15, .6), inset 0 -3px 5px rgba(90, 50, 5, .45), 0 1px 0 #7a5214, 0 2px 4px rgba(0, 0, 0, .55); }
.coin-btn:disabled { filter: grayscale(.85) brightness(.7); opacity: .55; cursor: not-allowed; }

/* ==========================================================================
   Parchment panels
   ========================================================================== */
.parchment {
    position: relative;
    color: var(--ink);
    background: #ecdcb6 var(--parchment) center / 700px;
    border-radius: 6px 9px 5px 8px;
    box-shadow:
        inset 0 0 40px rgba(120, 80, 30, .35),
        inset 0 0 0 1px rgba(90, 60, 25, .3),
        0 2px 2px rgba(0, 0, 0, .3),
        0 18px 40px -12px rgba(0, 0, 0, .7);
}
.parchment::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: var(--wear) center / 110% 110% no-repeat;
    opacity: .55;
}
.parchment > * { position: relative; z-index: 1; }

/* Stitched leather */
.leather {
    position: relative;
    background: var(--moss) var(--mat) center / cover;
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        inset 0 0 60px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(0, 0, 0, .6),
        0 20px 50px -10px rgba(0, 0, 0, .8);
}
.leather::before {
    content: ''; position: absolute; inset: 10px; pointer-events: none;
    border: 2px dashed rgba(212, 162, 74, .5);
    border-radius: 8px;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .7));
}
.painted-mat .leather.mat { background: var(--moss) var(--mat-painted) center / 100% 100%; }
.painted-mat .leather.mat::before { display: none; }

/* ==========================================================================
   HOST: the tavern table
   ========================================================================== */
body.host {
    height: 100vh; overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 380px);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: 'top top' 'mat ledger' 'crier crier';
    gap: 18px 22px;
    padding: 18px 22px 0;
}
body.host > :is(header, main, aside, footer) { position: relative; z-index: 1; }

.host-top {
    grid-area: top;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: baseline; gap: 18px; }
.brand .logo { font-size: clamp(2.6rem, 4.2vw, 4rem); }
.tagline { font-family: var(--f-label); color: var(--light-soft); font-size: 1.05rem; letter-spacing: .08em; }

.join-plaque {
    display: flex; align-items: center; gap: 16px;
    padding: 8px 12px 8px 20px;
    font-family: var(--f-label);
    color: var(--ink);
    font-size: 1.05rem;
}
.join-plaque strong { font-family: var(--f-body); font-weight: 700; letter-spacing: .02em; }
.room-code {
    font-family: var(--f-display);
    font-size: 2.3rem; line-height: 1;
    padding: 4px 14px 6px;
    letter-spacing: .12em;
    color: #fbe2d2;
    background: radial-gradient(120% 100% at 30% 20%, rgba(255, 170, 140, .35), transparent 50%), linear-gradient(180deg, var(--wax-hi), var(--wax) 70%, #6a130e);
    border-radius: 10px 12px 9px 13px;
    box-shadow: inset 0 -2px 4px rgba(60, 0, 0, .5), 0 2px 4px rgba(0, 0, 0, .4);
    text-shadow: 0 -1px 0 rgba(60, 0, 0, .8);
}

.icon-btn {
    width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center;
    color: var(--gold-hi);
    background: rgba(20, 12, 6, .6);
    box-shadow: inset 0 0 0 1px rgba(212, 162, 74, .4), 0 3px 8px rgba(0, 0, 0, .4);
    transition: transform .1s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn.muted .wave { display: none; }
.icon-btn:not(.muted) .cross { display: none; }

/* The mat */
.mat { grid-area: mat; min-height: 0; overflow: hidden; }
.mat-inner { position: absolute; inset: 0; display: grid; place-items: center; padding: 40px 40px 40px 200px; }
.stage { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.stage-title { font-family: var(--f-display); font-size: clamp(2.6rem, 4.5vw, 4.4rem); line-height: 1; margin: 0; color: var(--light); text-shadow: 0 3px 0 rgba(0, 0, 0, .6), 0 10px 30px rgba(0, 0, 0, .5); }
.stage-sub { font-family: var(--f-label); font-size: 1.3rem; color: var(--light-soft); margin: 14px 0 0; letter-spacing: .04em; }

/* Deck pile, left edge of the mat */
.deck-pile {
    position: absolute; left: 44px; top: 50%;
    transform: translateY(-50%);
    width: 130px;
    z-index: 2;
}
.deck-pile .card { --w: 130px; position: absolute; left: 0; top: 0; transition: none; }
.deck-pile .stack { position: relative; width: 130px; aspect-ratio: 2 / 3; }
.deck-count {
    position: absolute; left: 50%; bottom: -46px; transform: translateX(-50%);
    font-family: var(--f-label); font-size: 1rem; color: var(--light-soft);
    white-space: nowrap; letter-spacing: .06em;
}
.deck-count b { font-family: var(--f-body); color: var(--gold-hi); font-size: 1.25rem; }

/* Lobby */
.lobby-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; max-width: 1100px; width: 100%; }
.join-card { padding: 26px 26px 22px; text-align: center; transform: rotate(-1.5deg); width: 300px; }
.join-card h3 { font-family: var(--f-display); font-size: 2rem; margin: 0 0 12px; font-weight: 400; }
.join-card .qr { width: 220px; height: 220px; margin: 0 auto; mix-blend-mode: multiply; }
.join-card .qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.join-card p { margin: 12px 0 0; font-family: var(--f-label); font-size: 1rem; }
.join-card .code-line { font-size: 1.25rem; }
.join-card .code-line b { font-family: var(--f-display); font-size: 1.9rem; color: var(--wax); letter-spacing: .1em; font-weight: 400; }
.lobby-right { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; text-align: left; }
.lobby-right .stage-title { font-size: clamp(2.4rem, 4vw, 3.8rem); }
.lobby-motto { margin: -14px 0 0; font-family: var(--f-label); font-size: 1.25rem; letter-spacing: .05em; color: var(--gold-hi); }
.crowning { color: var(--gold-hi); font-size: 1.45rem; margin-top: 8px; }
.hero-frame {
    width: 100%; max-width: 640px; aspect-ratio: 3 / 2;
    border-radius: 6px; overflow: hidden;
    transform: rotate(1deg);
    box-shadow: 0 0 0 6px #ecdcb6, 0 0 0 7px rgba(60, 38, 18, .5), 0 20px 40px -10px rgba(0, 0, 0, .8);
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
.seats { display: flex; flex-wrap: wrap; gap: 14px; min-height: 96px; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 104px; animation: seat-drop .55s var(--ease-land) both; }
.seat .shield { width: 62px; height: 62px; }
.seat span { font-family: var(--f-label); font-size: .9rem; line-height: 1.08; max-width: 104px; text-align: center; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.seat.empty { opacity: .35; }
.seat.empty .ghost { width: 56px; height: 62px; border: 2px dashed rgba(243, 232, 207, .5); border-radius: 6px 6px 50% 50% / 6px 6px 60% 60%; }
@keyframes seat-drop { from { transform: translateY(-40px) scale(.7) rotate(-8deg); opacity: 0; } }
.start-row { display: flex; align-items: center; gap: 18px; }
.start-hint { font-family: var(--f-label); color: var(--light-soft); }

/* Turn view */
.turn-shield { width: 150px; height: 150px; margin-bottom: 18px; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(1.5deg); } }
.turn-options { display: flex; gap: 26px; margin-top: 30px; }
.turn-option { display: flex; align-items: center; gap: 12px; font-family: var(--f-label); font-size: 1.15rem; color: var(--light-soft); }
.turn-option svg { width: 34px; height: 34px; color: var(--gold); }

/* Auction */
.auction-layout { display: grid; grid-template-columns: auto auto; gap: clamp(30px, 5vw, 80px); align-items: center; }
.auction-slot { --cw: clamp(230px, 22vw, 330px); width: var(--cw); aspect-ratio: 2 / 3; position: relative; }
.auction-slot .card { --w: var(--cw); }
.auction-slot .slot-ghost { position: absolute; inset: 0; border: 2px dashed rgba(212, 162, 74, .35); border-radius: 14px; }
.bid-board { width: clamp(300px, 26vw, 400px); padding: 26px 30px 24px; text-align: center; transform: rotate(1deg); }
.bid-board .kicker { font-family: var(--f-label); font-size: 1.05rem; letter-spacing: .1em; color: var(--ink-soft); }
.bid-amount { font-family: var(--f-display); font-size: clamp(4rem, 7vw, 6.4rem); line-height: 1; margin: 6px 0 4px; color: var(--ink); display: inline-flex; align-items: center; gap: .15em; transition: transform .2s var(--ease-land); }
.bid-amount .coin-ico { width: .7em; height: .7em; }
.bid-amount.bump { transform: scale(1.14) rotate(-2deg); }
.bidder { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; font-family: var(--f-label); font-size: 1.35rem; }
.bidder .shield { width: 38px; height: 38px; }
.bidder.none { color: var(--ink-soft); font-size: 1.1rem; }
.auctioneer-line { margin-top: 12px; font-family: var(--f-label); color: var(--ink-soft); font-size: .98rem; }

/* Candle timer */
.candle-timer { display: flex; align-items: flex-end; justify-content: center; gap: 16px; margin-top: 18px; height: 110px; }
.candle { position: relative; width: 26px; height: 100px; display: flex; align-items: flex-end; }
.candle .wax {
    width: 100%; height: 90px;
    /* Burn down with a transform, not height, so nothing reflows each second */
    transform-origin: 50% 100%;
    transform: scaleY(calc(var(--burn, 1) * .93 + .07));
    border-radius: 4px 4px 3px 3px;
    background: linear-gradient(90deg, #d8c8a4, #f7ecd2 40%, #e6d6b2 70%, #bca97f);
    box-shadow: inset 0 -4px 6px rgba(0, 0, 0, .15), 0 3px 4px rgba(0, 0, 0, .35);
    transition: transform .95s linear;
    position: relative;
}
.candle .wax::before { content: ''; position: absolute; left: 30%; top: -2px; width: 7px; height: 18px; border-radius: 0 0 6px 6px; background: #f3e7c9; box-shadow: 0 1px 1px rgba(0,0,0,.15); }
.candle .flame {
    position: absolute; left: 50%; bottom: 90px;
    width: 14px; height: 26px;
    transform: translate(-50%, calc((1 - var(--burn, 1)) * 83.7px));
    transition: transform .95s linear;
}
.candle .flame::before {
    content: ''; position: absolute; inset: 0;
    border-radius: 50% 50% 40% 40% / 70% 70% 30% 30%;
    background: radial-gradient(circle at 50% 75%, #fff8d8 0 18%, #ffd26a 35%, #ff8a2a 70%, transparent 72%);
    filter: blur(.3px) drop-shadow(0 0 8px rgba(255, 170, 60, .9));
    transform-origin: 50% 90%;
    animation: flicker .18s infinite alternate;
}
.candle .flame::after { content: ''; position: absolute; left: 50%; bottom: -2px; width: 2px; height: 6px; background: #2b1d14; transform: translateX(-50%); }
.candle.out .flame::before { opacity: 0; }
.candle.out .flame { animation: smoke 1.6s ease-out forwards; }
@keyframes flicker {
    0% { transform: scale(1, 1) rotate(-2deg); }
    50% { transform: scale(.94, 1.06) rotate(1deg); }
    100% { transform: scale(1.04, .96) rotate(2deg); }
}
@keyframes smoke { to { opacity: 0; } }
.call-line { font-family: var(--f-display); font-size: 2.1rem; line-height: 1; color: var(--wax); min-height: 1.1em; margin-top: 8px; }
.call-line.urgent { animation: shake .4s ease-in-out infinite; }
@keyframes shake { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }

/* Sold seal stamped onto the card */
.stamp {
    position: absolute; z-index: 10; left: 50%; top: 45%;
    width: 58%; aspect-ratio: 1;
    display: grid; place-items: center;
    border-radius: 47% 53% 50% 46% / 52% 45% 55% 48%;
    background:
        radial-gradient(circle at 34% 30%, rgba(255, 170, 140, .5), transparent 38%),
        radial-gradient(circle, var(--wax-hi), var(--wax) 60%, #5a0f0b);
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .5), 0 8px 16px rgba(0, 0, 0, .6);
    font-family: var(--f-display); color: #f9dccb;
    text-shadow: 0 -2px 0 rgba(60, 0, 0, .8);
    transform: translate(-50%, -50%) rotate(-14deg);
}
.stamp::before { content: ''; position: absolute; inset: 12%; border-radius: 50%; border: 2px solid rgba(60, 5, 3, .5); }
.stamp span { font-size: calc(var(--cw, 300px) * .16); line-height: 1; }
.stamp.kept { background: radial-gradient(circle at 34% 30%, rgba(255, 250, 210, .7), transparent 40%), radial-gradient(circle, #f2cd6d, #c18a2c 62%, #7a5214); color: #5a3508; text-shadow: 0 1px 0 rgba(255, 240, 190, .6); }
.stamp.kept span { font-size: calc(var(--cw, 300px) * .12); }
.stamp.in { animation: stamp-in .45s cubic-bezier(.5, 0, .7, 1) both; }
@keyframes stamp-in {
    0% { transform: translate(-50%, -50%) rotate(-30deg) scale(2.6); opacity: 0; }
    70% { transform: translate(-50%, -50%) rotate(-12deg) scale(.92); opacity: 1; }
    100% { transform: translate(-50%, -50%) rotate(-14deg) scale(1); }
}

/* Barter (barter) */
.duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 40px; width: 100%; max-width: 980px; }
.duelist { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.duelist .shield { width: 140px; height: 140px; }
.duelist:first-child { animation: lunge-l 1s var(--ease-quint) both; }
.duelist:last-child { animation: lunge-r 1s var(--ease-quint) both; }
@keyframes lunge-l { from { transform: translateX(-120px) rotate(-10deg); opacity: 0; } }
@keyframes lunge-r { from { transform: translateX(120px) rotate(10deg); opacity: 0; } }
.duelist .name { font-family: var(--f-display); font-size: 2.4rem; line-height: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
.duelist .role { font-family: var(--f-label); color: var(--light-soft); letter-spacing: .08em; }
.swords { width: 120px; height: 120px; color: var(--gold-hi); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); animation: clash 1.1s var(--ease-quint) .2s both; }
@keyframes clash { from { transform: scale(.3) rotate(-90deg); opacity: 0; } }
.barter-status { font-family: var(--f-label); color: var(--light-soft); font-size: 1.25rem; margin-top: 22px; min-height: 1.5em; }

/* Game over */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 22px; margin-top: 28px; }
.podium-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; animation: rise .8s var(--ease-quint) both; }
.podium-slot .shield { width: 96px; height: 96px; }
.podium-slot .who { font-family: var(--f-display); font-size: 1.9rem; line-height: 1; }
.podium-slot .score { font-family: var(--f-label); color: var(--gold-hi); font-size: 1.2rem; }
.podium-slot .detail { font-size: .95rem; color: var(--light-soft); }
.plinth {
    width: 170px; border-radius: 6px 6px 0 0;
    display: grid; place-items: start center; padding-top: 10px;
    font-family: var(--f-display); font-size: 2.6rem; color: rgba(255, 240, 200, .9);
    background: linear-gradient(180deg, rgba(255, 220, 170, .18), transparent 30%), #5a3a22 var(--table) center / 900px;
    box-shadow: inset 0 1px 0 rgba(255, 220, 170, .35), 0 10px 20px rgba(0, 0, 0, .6);
}
.podium-slot.p1 .plinth { height: 170px; background-color: #7a5520; }
.podium-slot.p1 .shield { width: 130px; height: 130px; }
.podium-slot.p1 .crown { width: 64px; color: var(--gold-hi); margin-bottom: -10px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); animation: bob 2.6s ease-in-out infinite; }
.podium-slot.p2 .plinth { height: 120px; }
.podium-slot.p3 .plinth { height: 84px; }
@keyframes rise { from { transform: translateY(60px); opacity: 0; } }
.also-ran { display: flex; gap: 22px; justify-content: center; margin-top: 18px; font-family: var(--f-label); color: var(--light-soft); }
.scoring-note { margin-top: 16px; font-family: var(--f-label); color: var(--light-soft); font-size: 1rem; }

/* Ledger (players) */
.ledger { grid-area: ledger; display: flex; flex-direction: column; min-height: 0; padding: 22px 16px 16px; }
.ledger h2 { font-family: var(--f-display); font-weight: 400; margin: 0 0 10px 6px; font-size: 2rem; line-height: 1; }
.ledger-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; padding: 4px; }
.ledger-row {
    display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center;
    padding: 9px 10px 10px;
    border-radius: 8px;
    border: 1px solid rgba(60, 38, 18, .18);
    background: rgba(255, 250, 235, .25);
    transition: background .4s, box-shadow .4s, transform .4s var(--ease-out);
}
.ledger-row .shield { width: 44px; height: 44px; grid-row: span 2; }
.ledger-row .who { font-family: var(--f-label); font-size: 1.08rem; line-height: 1.12; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ledger-row .purse { font-weight: 700; font-size: 1.08rem; }
.ledger-row .holdings { grid-column: 2 / span 2; display: flex; flex-wrap: wrap; gap: 7px; min-height: 24px; }
.ledger-row .holdings .empty { font-style: italic; font-size: .92rem; color: var(--ink-soft); }
.ledger-row.active { background: rgba(212, 162, 74, .28); border-color: rgba(138, 95, 28, .55); box-shadow: 0 0 0 2px rgba(212, 162, 74, .5), 0 6px 14px -6px rgba(0, 0, 0, .5); transform: translateX(-6px); }
.ledger-row.flash { animation: row-flash 1.2s ease-out; }
@keyframes row-flash { 0% { background: rgba(243, 212, 136, .85); } }
.holding { position: relative; display: inline-flex; }
.holding .crest { --s: 26px; }
.holding .pips { position: absolute; right: -5px; bottom: -5px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff4dc; background: var(--ink); box-shadow: 0 0 0 1.5px #efe0bd; }
.holding.complete .crest { box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 3px var(--gold-hi), 0 0 12px rgba(243, 212, 136, .9); }
.holding.complete .pips { background: var(--wax); }
.turn-marker { width: 12px; height: 12px; display: inline-block; margin-right: 6px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff4c8, #ffb347 60%, #c46a12); box-shadow: 0 0 8px rgba(255, 170, 60, .9); vertical-align: 1px; animation: flicker .25s infinite alternate; }

/* Town crier ribbon */
.crier {
    grid-area: crier;
    height: 46px; margin: 0 -22px;
    overflow: hidden;
    display: flex; align-items: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, .15), transparent 30%, rgba(0, 0, 0, .25)), #d9c396 var(--parchment) center / 600px;
    color: var(--ink);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .5);
    border-top: 1px solid rgba(60, 38, 18, .5);
}
.crier-track { display: flex; gap: 60px; white-space: nowrap; padding-left: 100%; animation: crier 110s linear infinite; font-family: var(--f-label); font-size: 1.12rem; letter-spacing: .03em; }
.crier-track span::before { content: '❦'; margin-right: 14px; color: var(--wax); }
@keyframes crier { to { transform: translateX(-100%); } }

/* Big announcement scroll */
.announce { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle, rgba(0, 0, 0, .25), rgba(0, 0, 0, .6)); animation: fade-in .3s ease both; }
.announce.out { animation: fade-out .4s ease both; }
.announce-scroll { min-width: 560px; max-width: 70vw; padding: 34px 60px 30px; text-align: center; animation: unroll .55s var(--ease-quint) both; transform-origin: 50% 50%; }
.announce-scroll h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(3.6rem, 7vw, 6rem); line-height: .95; margin: 0; color: var(--wax); }
.announce-scroll p { font-family: var(--f-label); font-size: 1.6rem; margin: 12px 0 0; }
.announce-scroll::before, .announce-scroll::after {
    content: ''; position: absolute; left: -14px; right: -14px; height: 20px; z-index: 2;
    border-radius: 10px;
    background: linear-gradient(180deg, #8a5d33, #5a3a1e 60%, #3a2412);
    box-shadow: 0 3px 6px rgba(0, 0, 0, .5);
}
.announce-scroll::before { top: -10px; }
.announce-scroll::after { bottom: -10px; }
@keyframes unroll { from { clip-path: inset(48% 0 48% 0); transform: scale(.9); } to { clip-path: inset(-20px -20px -20px -20px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* Flying things */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.flying { position: fixed; left: 0; top: 0; z-index: 45; pointer-events: none; will-change: transform; }
.flying .card { transition: none; }
.coin-fly { position: fixed; left: 0; top: 0; width: 26px; height: 26px; z-index: 46; pointer-events: none; }
.coin-fly svg { width: 100%; height: 100%; }
.coin-rain { position: absolute; top: -40px; width: 30px; height: 30px; animation: coin-fall 2.6s cubic-bezier(.4, 0, .9, .6) forwards; }
.coin-rain svg { width: 100%; height: 100%; animation: coin-spin .6s linear infinite; }
@keyframes coin-fall { to { transform: translateY(112vh) rotate(var(--r, 180deg)); } }
@keyframes coin-spin { 50% { transform: scaleX(.15); } }
.feather { position: absolute; top: -40px; width: 22px; height: 40px; animation: feather-fall 4.5s ease-in forwards; color: #fbf6ea; opacity: .95; }
@keyframes feather-fall {
    25% { transform: translate(30px, 25vh) rotate(40deg); }
    50% { transform: translate(-20px, 50vh) rotate(-30deg); }
    75% { transform: translate(25px, 78vh) rotate(35deg); }
    100% { transform: translate(-10px, 110vh) rotate(-20deg); }
}
.petal { position: absolute; top: -20px; width: 12px; height: 16px; border-radius: 60% 0 60% 0; animation: feather-fall 5s ease-in forwards; }

/* ==========================================================================
   PLAYER: the phone in your hand
   ========================================================================== */
body.phone {
    min-height: 100dvh;
    background: var(--moss) var(--mat) center / cover fixed;
    display: flex; flex-direction: column;
    overscroll-behavior: none;
}
body.phone > .candlelight { position: fixed; }
.phone-head {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: calc(env(safe-area-inset-top) + 10px) 16px 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent), #3a2616 var(--table) center / 700px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(255, 220, 170, .15);
}
.phone-head::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 5px; border-bottom: 2px dashed rgba(212, 162, 74, .45); }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me .shield { width: 40px; height: 40px; flex: none; }
.me-name { font-family: var(--f-label); font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.purse-plate {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px 5px 9px;
    font-family: var(--f-display); font-size: 1.7rem; line-height: 1;
    color: var(--gold-hi);
    background: rgba(0, 0, 0, .35);
    border-radius: 20px;
    box-shadow: inset 0 0 0 1px rgba(212, 162, 74, .35);
}
.purse-plate .coin-ico { width: 22px; height: 22px; }
.purse-plate.flash { animation: purse-flash .9s ease-out; }
.purse-plate.up { color: #b5f0a0; }
.purse-plate.down { color: #ffb4a0; }
@keyframes purse-flash { 0% { transform: scale(1.18); } }

.phone-main { flex: 1; display: flex; flex-direction: column; padding: 14px 14px calc(env(safe-area-inset-bottom) + 16px); position: relative; z-index: 1; }
.page { flex: 1; padding: 22px 18px 24px; display: flex; flex-direction: column; }
.page h2 { font-family: var(--f-display); font-weight: 400; font-size: 2.4rem; line-height: 1; margin: 0; }
.page .sub { font-family: var(--f-label); color: var(--ink-soft); margin: 6px 0 0; font-size: 1.05rem; }
.center { text-align: center; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1; }
.mt-s { margin-top: 10px; } .mt-m { margin-top: 18px; } .mt-l { margin-top: 28px; }

/* Bookmark tabs */
.tabs { display: flex; gap: 8px; padding: 0 8px; margin-bottom: -4px; position: relative; z-index: 2; }
.tab {
    flex: 1; border: 0; cursor: pointer;
    padding: 10px 8px 14px;
    font-family: var(--f-label); font-size: 1.05rem; letter-spacing: .06em;
    color: var(--light-soft);
    background: rgba(0, 0, 0, .35);
    border-radius: 10px 10px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: all .2s;
    -webkit-tap-highlight-color: transparent;
}
.tab.active { color: var(--ink); background: #ecdcb6 var(--parchment) center / 600px; box-shadow: 0 -3px 8px rgba(0, 0, 0, .3); }
.tab .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; border-radius: 10px; font-size: .8rem; background: var(--wax); color: #fbe2d2; padding: 0 5px; }

/* Join */
.join-page { justify-content: center; gap: 0; }
.join-page .logo { font-size: 4.4rem; text-align: center; }
.join-page .tag { text-align: center; font-family: var(--f-label); color: var(--ink-soft); margin: 4px 0 20px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.field label { font-family: var(--f-label); font-size: .95rem; letter-spacing: .08em; color: var(--ink-soft); }
.field input {
    width: 100%;
    font-family: var(--f-body); font-size: 1.6rem;
    padding: 8px 4px 6px;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-bottom: 2px solid rgba(43, 29, 20, .55);
    border-radius: 0;
    outline: none;
}
.field input:focus { border-bottom-color: var(--wax); }
.label-text { font-family: var(--f-label); font-size: .95rem; letter-spacing: .08em; color: var(--ink-soft); }
.title-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 6px; }
.title-chip {
    min-height: 40px; padding: 4px 2px;
    border: 0; border-radius: 8px 10px 7px 9px;
    font-family: var(--f-label); font-size: .98rem;
    color: var(--ink);
    background: rgba(255, 250, 235, .45);
    box-shadow: inset 0 0 0 1px rgba(60, 38, 18, .3), 0 2px 0 rgba(155, 127, 79, .7);
    cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    transition: transform .08s ease, box-shadow .08s ease, background .15s, color .15s;
}
.title-chip:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px rgba(60, 38, 18, .3); }
.title-chip.selected {
    color: #fbe2d2;
    text-shadow: 0 -1px 0 rgba(60, 0, 0, .7);
    background: linear-gradient(180deg, var(--wax-hi), var(--wax) 75%);
    box-shadow: inset 0 1px 0 rgba(255, 190, 170, .4), 0 2px 0 #4a0b08;
}
.title-chip:focus-visible { outline: 2px dashed var(--wax); outline-offset: 2px; }
.herald { min-height: 1.4em; margin: -4px 0 4px; text-align: center; font-family: var(--f-display); font-size: 1.45rem; color: var(--wax); }
.field input.code { font-family: var(--f-display); letter-spacing: .3em; text-transform: uppercase; font-size: 2.3rem; }
.field input::placeholder { color: rgba(43, 29, 20, .3); }
.join-error { min-height: 1.4em; color: var(--wax); font-family: var(--f-label); text-align: center; margin: 12px 0 0; }

/* Waiting states */
.wait-shield { width: 130px; height: 130px; margin: 10px auto 14px; animation: bob 3.2s ease-in-out infinite; }
.idle-msg { font-family: var(--f-label); font-size: 1.3rem; }
.hourglass { width: 54px; height: 54px; color: var(--ink-soft); margin: 18px auto 0; animation: turn 3s ease-in-out infinite; }
@keyframes turn { 0%, 40% { transform: rotate(0); } 50%, 90% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }

/* Your turn */
.choice {
    display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center;
    text-align: left; width: 100%;
    padding: 14px 16px;
    min-height: 96px;
}
.choice svg { width: 56px; height: 56px; }
.choice b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.9rem; line-height: 1; }
.choice small { font-size: .95rem; }
.hint { font-family: var(--f-label); font-size: .98rem; color: var(--ink-soft); text-align: center; }

/* Auction on the phone */
.phone-card-slot { display: flex; justify-content: center; margin: 4px 0 6px; min-height: 0; }
.phone-card-slot .card { --w: min(46vw, 200px); }
.bid-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bid-strip .kicker { font-family: var(--f-label); color: var(--ink-soft); font-size: .92rem; letter-spacing: .08em; }
.bid-strip .amt { font-family: var(--f-display); font-size: 2.4rem; line-height: 1; display: inline-flex; align-items: center; gap: 6px; }
.bid-strip .amt .coin-ico { width: 26px; height: 26px; }
.bid-strip .by { font-family: var(--f-label); font-size: 1.05rem; text-align: right; }
.fuse { height: 10px; border-radius: 6px; background: rgba(43, 29, 20, .15); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3); }
.fuse i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--burn, 1)); background: linear-gradient(90deg, #c46a12, #ffb347 80%, #fff4c8); border-radius: 6px; transition: transform .95s linear; box-shadow: 0 0 8px rgba(255, 170, 60, .8); }
.fuse.urgent i { background: linear-gradient(90deg, var(--wax), var(--wax-hi) 80%, #ffd0b0); }
.status-badge { align-self: center; font-family: var(--f-label); font-size: 1rem; padding: 5px 14px; border-radius: 20px; background: var(--moss); color: #dff3e4; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.status-badge.warn { background: var(--wax); color: #fbe2d2; }
.coin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.coin-grid .coin-btn { font-size: clamp(1.05rem, 5vw, 1.45rem); }
.callout { font-family: var(--f-display); font-size: 1.8rem; color: var(--wax); text-align: center; min-height: 1.1em; line-height: 1; }

/* Resolve */
.verdict { font-size: 1.15rem; text-align: center; }
.verdict b { font-family: var(--f-display); font-weight: 400; font-size: 1.5em; }

/* Barter pickers */
.pick-list { display: flex; flex-direction: column; gap: 10px; }
.pick {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
    width: 100%; padding: 10px 12px; min-height: 64px;
    text-align: left;
    border: 1px solid rgba(60, 38, 18, .3);
    border-radius: 10px;
    background: rgba(255, 250, 235, .35);
    color: var(--ink);
    cursor: pointer;
    transition: transform .1s, background .2s, box-shadow .2s;
    -webkit-tap-highlight-color: transparent;
}
.pick:active { transform: scale(.98); }
.pick.selected { background: rgba(212, 162, 74, .35); border-color: var(--gold-lo); box-shadow: 0 0 0 2px var(--gold); }
.pick .shield { width: 42px; height: 42px; }
.pick .crest { --s: 46px; }
.pick b { display: block; font-family: var(--f-label); font-size: 1.15rem; font-weight: 400; line-height: 1.1; }
.pick small { color: var(--ink-soft); font-size: .92rem; }
.pick .star { color: var(--gold-lo); font-size: 1.3rem; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(43, 29, 20, .2); }
.dots i.on { background: var(--ink); }
.step-label { font-family: var(--f-label); color: var(--ink-soft); letter-spacing: .08em; font-size: .95rem; margin: 6px 0 4px; }

/* Sealed purse (numpad) */
.purse-display {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--f-display); font-size: 3.6rem; line-height: 1;
    min-height: 76px;
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(43, 29, 20, .08);
    box-shadow: inset 0 2px 6px rgba(60, 38, 18, .3);
}
.purse-display .coin-ico { width: 38px; height: 38px; }
.purse-display.over { color: var(--wax); animation: shake .3s 2; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.numpad .btn { min-height: 58px; font-family: var(--f-body); font-weight: 700; font-size: 1.6rem; --depth: 4px; }
.quick-row { display: flex; gap: 8px; }
.quick-row .btn { flex: 1; min-height: 42px; font-size: .95rem; --depth: 3px; padding: .3em .4em; }

/* Satchel (inventory) */
.satchel-summary { display: flex; justify-content: space-between; font-family: var(--f-label); color: var(--ink-soft); margin: 4px 0 14px; }
.satchel { display: flex; flex-direction: column; gap: 22px; }
.set-group h4 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 10px; font-family: var(--f-label); font-weight: 400; font-size: 1.12rem; }
.set-group h4 small { font-family: var(--f-body); color: var(--ink-soft); font-size: .92rem; white-space: nowrap; }
.set-group.complete h4::after { content: 'Complete!'; font-family: var(--f-display); color: var(--wax); font-size: 1.3rem; }
.fan { display: flex; padding-left: 8px; min-height: 0; }
.fan .card { --w: min(26vw, 110px); margin-left: -8px; }
.fan .card:nth-child(odd) { --tilt: -2.5deg; }
.fan .card:nth-child(even) { --tilt: 2deg; }
.fan .slot-empty { width: min(26vw, 110px); aspect-ratio: 2 / 3; margin-left: -8px; border: 2px dashed rgba(43, 29, 20, .25); border-radius: 8px; display: grid; place-items: center; font-family: var(--f-label); color: rgba(43, 29, 20, .35); font-size: 1.4rem; }
.empty-satchel { text-align: center; font-style: italic; color: var(--ink-soft); padding: 30px 0; }

/* Toast: a scrap of parchment */
.toast {
    position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 18px); z-index: 60;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 12px 20px 12px 16px;
    display: flex; align-items: center; gap: 12px;
    font-family: var(--f-label); font-size: 1.08rem;
    color: var(--ink);
    transform: translateX(-50%) rotate(-1deg);
    animation: toast-in .35s var(--ease-quint) both;
}
.toast::before { content: ''; width: 18px; height: 18px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9f8a, var(--wax) 60%); box-shadow: 0 1px 2px rgba(0,0,0,.4); }
@keyframes toast-in { from { transform: translateX(-50%) translateY(40px) rotate(3deg); opacity: 0; } }

/* Entrances */
.enter { animation: enter .45s var(--ease-out) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }
.card-drop { animation: card-drop .6s var(--ease-land) both; }
@keyframes card-drop { from { transform: translateY(-70vh) rotate(-24deg); } }

/* ==========================================================================
   Landing & gallery
   ========================================================================== */
body.landing { min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; }
.landing-inner { position: relative; z-index: 1; width: 100%; max-width: 1060px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.landing .logo { font-size: clamp(4rem, 10vw, 7.5rem); }
.landing .motto { font-family: var(--f-display); font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.05; color: var(--light); margin: 10px 0 0; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.landing .tag { font-style: italic; font-size: 1.2rem; line-height: 1.4; color: var(--light-soft); margin: 10px 0 28px; max-width: 32ch; }
.landing .actions { display: flex; flex-direction: column; gap: 16px; max-width: 360px; }
.landing .fine { margin-top: 22px; font-family: var(--f-label); }
.landing .fine a { color: var(--gold-hi); }
.card-spread { position: relative; height: 440px; }
.card-spread .card { position: absolute; left: 50%; top: 50%; --w: 220px; }
.card-spread .card:nth-child(1) { transform: translate(-115%, -48%) rotate(-14deg); }
.card-spread .card:nth-child(2) { transform: translate(-50%, -56%) rotate(-2deg); z-index: 2; }
.card-spread .card:nth-child(3) { transform: translate(15%, -46%) rotate(11deg); }
.card-spread:hover .card:nth-child(1) { transform: translate(-130%, -50%) rotate(-18deg); }
.card-spread:hover .card:nth-child(3) { transform: translate(30%, -48%) rotate(15deg); }

body.gallery { padding: 32px 24px 60px; }
.gallery-head { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.gallery-head .logo { font-size: 3.4rem; }
.gallery-head a { color: var(--gold-hi); font-family: var(--f-label); }
.gallery-set { position: relative; z-index: 1; margin-bottom: 34px; }
.gallery-set h3 { font-family: var(--f-display); font-weight: 400; font-size: 2rem; margin: 0 0 14px; }
.gallery-set h3 small { font-family: var(--f-label); color: var(--gold-hi); font-size: 1.05rem; margin-left: 10px; }
.gallery-row { display: flex; gap: 22px; flex-wrap: wrap; }
.gallery-row .card { --w: 210px; }

/* ==========================================================================
   Responsive + motion
   ========================================================================== */
@media (max-width: 1100px) {
    body.host { grid-template-columns: 1fr 290px; }
    .mat-inner { padding-left: 170px; }
    .deck-pile { left: 28px; }
    .tagline { display: none; }
}
@media (max-width: 820px) {
    .landing-inner { grid-template-columns: 1fr; text-align: center; }
    .landing .actions { margin: 0 auto; }
    .card-spread { height: 330px; order: -1; }
    .card-spread .card { --w: 160px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .crier-track { animation: none; padding-left: 20px; }
}

a.btn { text-decoration: none; flex-direction: column; gap: 0; }
.btn:has(small) { flex-direction: column; gap: 2px; line-height: 1.1; }
.ledger-empty { font-style: italic; color: var(--ink-soft); padding: 6px 8px; margin: 0; }
.deck-pile .card { transform-origin: 50% 50%; }

/* Title-screen music control */
.music-toggle { position: fixed; top: 18px; right: 18px; z-index: 5; display: flex; align-items: center; gap: 10px; }
.music-label { font-family: var(--f-label); font-size: .98rem; color: var(--light-soft); letter-spacing: .04em; animation: music-hint 2.4s ease-in-out infinite; }
.music-label.playing { animation: none; color: var(--gold-hi); }
@keyframes music-hint { 50% { opacity: .45; } }
.host-top .music-label { white-space: nowrap; }

/* Name dice */
.name-row { display: flex; align-items: flex-end; gap: 10px; }
.name-row input { flex: 1; min-width: 0; }
.dice-btn {
    flex: none; width: 52px; height: 52px; padding: 5px;
    border: 0; border-radius: 12px;
    background: rgba(255, 250, 235, .5);
    box-shadow: inset 0 0 0 1px rgba(60, 38, 18, .3), 0 3px 0 rgba(155, 127, 79, .8), 0 5px 8px rgba(0, 0, 0, .2);
    cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    transition: transform .08s ease, box-shadow .08s ease;
}
.dice-btn svg { width: 100%; height: 100%; display: block; }
.dice-btn:active { transform: translateY(3px); box-shadow: inset 0 0 0 1px rgba(60, 38, 18, .3), 0 0 0 rgba(155, 127, 79, .8); }
.dice-btn:focus-visible { outline: 2px dashed var(--wax); outline-offset: 3px; }
.dice-btn.tumble svg { animation: tumble .62s var(--ease-quint); }
@keyframes tumble {
    0% { transform: rotate(0) translateY(0); }
    30% { transform: rotate(200deg) translateY(-10px); }
    60% { transform: rotate(320deg) translateY(0); }
    100% { transform: rotate(360deg); }
}
.roll-hint { font-style: italic; font-size: .92rem; color: var(--ink-soft); margin-top: 4px; }
.field input.landed { animation: landed .35s var(--ease-land); }
@keyframes landed { 0% { transform: scale(1.06); color: var(--wax); } }

/* ==========================================================================
   Coins, phases and the barter standoff
   ========================================================================== */
.token { --s: 46px; position: relative; display: inline-block; width: var(--s); height: var(--s); flex: none; border-radius: 50%;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .45)) drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.token svg { width: 100%; height: 100%; display: block; }
.token.dud { animation: dud .6s ease-in-out .15s; }
@keyframes dud { 25% { rotate: -14deg; } 50% { rotate: 10deg; } 75% { rotate: -5deg; } }

.ledger-row .purse .token { --s: 20px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); margin-right: 2px; }

.phase-pill { align-self: center; padding: 4px 12px; border-radius: 20px; font-family: var(--f-label); font-size: .98rem; letter-spacing: .06em;
    color: var(--gold-hi); background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px rgba(212, 162, 74, .45); white-space: nowrap; }
.phase-pill.barter { color: #fbe2d2; background: linear-gradient(180deg, var(--wax-hi), var(--wax)); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.deck-pile.spent { opacity: .35; filter: grayscale(.5); }
.skip-note { margin-top: 22px; font-style: italic; color: var(--light-soft); font-size: 1.1rem; }

/* Stakes plaque between the duelists */
.stakes { display: flex; align-items: center; gap: 16px; padding: 14px 22px 14px 16px; transform: rotate(-1deg); max-width: 380px; }
.stakes .what { display: flex; flex-direction: column; text-align: left; }
.stakes .what b { font-family: var(--f-display); font-size: 1.8rem; font-weight: 400; line-height: 1.05; }
.stakes .what span { font-family: var(--f-label); color: var(--ink-soft); }
.round-badge { align-self: flex-start; margin-top: 6px; font-style: normal; font-family: var(--f-label); font-size: .9rem; padding: 2px 10px;
    border-radius: 12px; color: #fbe2d2; background: var(--wax); }
.duelist { transition: filter .5s, opacity .5s, transform .5s var(--ease-quint); }
.duelist.victor { transform: scale(1.08); }
.duelist.victor .shield { filter: drop-shadow(0 0 18px rgba(243, 212, 136, .9)); }
.duelist.vanquished { filter: grayscale(.7) brightness(.75); }

/* The table between them: two heaps of coins */
.piles { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; width: 100%; max-width: 980px; margin-top: 26px; }
.piles .swords { width: 84px; height: 84px; opacity: .7; }
.pile { position: relative; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 260px; }
.pile-coins { position: relative; width: 244px; min-height: 110px; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; padding: 6px; }
.pile-coins .token { position: relative; margin: -5px -7px; }
.pile-count { font-family: var(--f-display); font-size: 1.9rem; line-height: 1; color: var(--light); text-shadow: 0 2px 0 rgba(0, 0, 0, .6); min-height: 1em; }
.pile-total { font-family: var(--f-label); font-size: 1.15rem; color: var(--gold-hi); min-height: 1.3em; text-align: center; max-width: 300px; }
.pile.sealed .pile-count::after { content: ' · sealed'; font-family: var(--f-label); font-size: 1rem; color: var(--wax-hi); letter-spacing: .06em; }
.pile.won .pile-coins { filter: drop-shadow(0 0 16px rgba(243, 212, 136, .85)); }
.pile.lost { opacity: .75; }
.pile.gone { opacity: 0; transition: opacity .6s; }
.token.coin-in { animation: coin-in .42s var(--ease-quint) both; }
.token.coin-in.from-left { --from: -160px; }
.token.coin-in.from-right { --from: 160px; }
@keyframes coin-in { from { translate: var(--from) 30px; opacity: 0; } }
.token.leaving { animation: coin-out .3s ease-in forwards; }
@keyframes coin-out { to { translate: 0 30px; opacity: 0; } }

/* Phone: coin tray and face-down piles */
.tray-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--f-label); color: var(--ink-soft); letter-spacing: .05em; }
.tray-label span:last-child { font-family: var(--f-body); letter-spacing: 0; }
.hint-inline { font-style: italic; font-size: .9rem; }
.coin-table, .coin-purse, .coin-row, .facedown-pile { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.coin-table {
    min-height: 118px; padding: 12px;
    border-radius: 12px;
    background: rgba(30, 20, 12, .82) var(--table) center / 700px;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(212, 162, 74, .25);
}
.coin-table em { color: var(--light-soft); font-size: .95rem; align-self: center; margin: auto; }
.coin-purse { min-height: 64px; }
.coin-purse em, .coin-row em { color: var(--ink-soft); }
.coin-table .token, .coin-purse .token { --s: 52px; cursor: pointer; transition: transform .12s var(--ease-quint); -webkit-tap-highlight-color: transparent; }
.coin-table .token:active, .coin-purse .token:active { transform: scale(.9); }
.coin-row .token { --s: 38px; }
.bluff-hint { font-style: italic; font-size: .92rem; color: var(--ink-soft); margin: 0; text-align: center; }
.purse-shelf { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.facedown-pile { justify-content: center; gap: 4px; min-height: 60px; padding: 8px 0; }
.facedown-pile .token { --s: 48px; margin-left: -10px; animation: coin-drop .35s var(--ease-quint) both; }
@keyframes coin-drop { from { translate: 0 -30px; opacity: 0; } }
.facedown-pile em { color: var(--ink-soft); }
#defendPile { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 64px; padding: 6px 0 0 10px; }
#defendPile .token { --s: 50px; margin-left: -10px; }
.phase-card { width: 90px; height: 90px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%;
    font-family: var(--f-display); font-size: 3rem; color: #fbe2d2; background: radial-gradient(circle at 35% 30%, var(--wax-hi), var(--wax) 60%, #5a0f0b);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .4); }

/* Host on narrower screens (laptops, the preview pane): stack instead of squeezing */
@media (max-width: 1150px) {
    .mat-inner { padding: 22px 18px 22px 118px; }
    .deck-pile { left: 16px; width: 92px; }
    .deck-pile .stack { width: 92px; }
    .deck-pile .card { --w: 92px; }
    .deck-count { bottom: -40px; font-size: .9rem; }
    /* Landscape laptops keep card and bid board side by side, just smaller */
    .auction-layout { gap: 24px; }
    .auction-slot { --cw: clamp(150px, 32vh, 240px); }
    .bid-board { width: min(330px, 100%); padding: 14px 18px 12px; }
    .bid-amount { font-size: 3.4rem; }
    .candle-timer { height: 96px; margin-top: 6px; }
    .lobby-grid { grid-template-columns: 1fr; gap: 20px; justify-items: center; }
    .lobby-right { align-items: center; text-align: center; }
    .hero-frame { display: none; }
    .join-card { width: 260px; padding: 18px; }
    .join-card .qr { width: 170px; height: 170px; }
    .duel { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
    .stakes { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 320px; padding: 10px 16px 10px 12px; }
    .stakes .what b { font-size: 1.4rem; }
    .duelist .shield { width: 88px; height: 88px; }
    .duelist .name { font-size: 1.6rem; }
    .piles { gap: 8px; margin-top: 14px; }
    .piles .swords { width: 48px; height: 48px; }
    .pile { min-width: 0; }
    .pile-coins { width: 180px; min-height: 90px; }
    .pile-coins .token { --s: 36px; }
    .pile-count { font-size: 1.5rem; }
    .stage-title { font-size: clamp(2rem, 5vw, 3rem); }
    .turn-shield { width: 110px; height: 110px; }
    .podium { gap: 10px; }
    .plinth { width: 110px; }
}

/* Tall, narrow host screens: stack the card above the bid board */
@media (max-width: 1150px) and (max-aspect-ratio: 5/4) {
    .auction-layout { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
    .auction-slot { --cw: clamp(150px, 26vh, 230px); }
}
