.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ---------------- Dice Goblinz (phase C) ----------------
   Every material has a colour AND an icon AND its size in text; panels show clan art over a clan colour, so
   the table still reads if an image is missing. Laptop and tablet widths first (Chris, Q5). */
:root {
    --ink: #1c1c1c;
    --paper: #f6f1e7;
    --felt: #2f3b2f;
    --accent: #8a5a0b;
    /* M4 colourblind pass (web only, Chris Q7): every pair stays ΔE2000 >= 20 apart with protanopia, deuteranopia
       and tritanopia as well as normal vision (PaletteTests reads these values). */
    --wood: #d68b4e;  --wood-ink: #3b2412;
    --stone: #95a5a5; --stone-ink: #1f2326;
    --metal: #4f6b8a; --metal-ink: #f4f7fa;
    --gem: #ba86ff;   --gem-ink: #2c1240;
    --mismatched: #ffffff; --mismatched-ink: #1c1c1c;
}

/* The felt is on html only: the table art (.art-table, z-index -1) shows through body when it exists. */
html { background: var(--felt); }
body { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; }
h1, h2, h3 { margin: 0 0 .5rem; }
button { font: inherit; }
.panel { background: var(--paper); max-width: 60rem; margin: 1.5rem auto; padding: 1.25rem 1.5rem; border-radius: .75rem; box-shadow: 0 .25rem 1rem rgba(0,0,0,.35); }
.hint { color: #555; margin-top: 0; }
.error { color: #9b1c1c; font-weight: bold; }

/* new game */
.new-game h1 { font-size: 2.2rem; color: var(--accent); }
.field { display: flex; flex-direction: column; gap: .25rem; margin: .6rem 0; max-width: 24rem; }
.field.check { flex-direction: row; align-items: center; gap: .5rem; }
.field input, .field select { font: inherit; padding: .4rem .5rem; border: 1px solid #999; border-radius: .35rem; }
.field input[aria-invalid=true] { border-color: #9b1c1c; outline: 2px solid #9b1c1c; }
button.primary { background: var(--accent); color: white; border: 0; border-radius: .5rem; padding: .6rem 1.4rem; font-weight: bold; cursor: pointer; margin-top: .75rem; }
button.primary:disabled { background: #999; cursor: not-allowed; }
button:focus-visible { outline: 3px solid #1b6ec2; outline-offset: 2px; }

/* clan draft */
.clan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.clan-card { border: 3px solid rgba(0,0,0,.4); border-radius: .75rem; padding: 0; cursor: pointer; text-align: left;
             background-size: cover; background-position: center; min-height: 13rem; display: flex; flex-direction: column; }
.clan-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.clan-card-body { margin: .75rem; padding: .75rem; background: rgba(246,241,231,.92); border-radius: .5rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.clan-card-head { font-size: 1.25rem; font-weight: bold; }
.clan-advantage { font-style: italic; color: var(--accent); font-weight: bold; }
.clan-text { font-size: .95rem; }

/* clan colours: the fallback under the art */
.clan-wood { background-color: var(--wood); }
.clan-stone { background-color: var(--stone); }
.clan-metal { background-color: var(--metal); }
.clan-gem { background-color: var(--gem); }
.clan-none { background-color: #d9d2c3; }

/* table */
.table { max-width: 80rem; margin: 0 auto; padding: 1rem; }
/* Paper text over the table art needs its own dark backing (art drop review [1]). */
.table-head { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; color: var(--paper); font-size: 1.1rem; margin-bottom: .75rem;
              background: rgba(20,28,20,.78); border-radius: .4rem; padding: .3rem .7rem; width: fit-content; }
.round { font-weight: bold; font-size: 1.3rem; }
.countdown { background: #9b1c1c; color: white; padding: .15rem .6rem; border-radius: 1rem; }
.market { background: var(--paper); border-radius: .75rem; padding: .75rem 1rem; margin-bottom: 1rem; }
.players { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
.player { border-radius: .75rem; background-size: cover; background-position: center; padding: .6rem; border: 3px solid transparent; }
.player.is-current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138,90,11,.45); }
.player-body { background: rgba(246,241,231,.93); border-radius: .5rem; padding: .6rem .75rem; }
.player header { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; margin-bottom: .4rem; }
.player-name { font-weight: bold; font-size: 1.15rem; }
.turn-flag { color: var(--accent); font-weight: bold; }
.player-clan { font-size: .9rem; color: #444; }
.zone h3 { font-size: .9rem; color: #555; margin: .25rem 0; }
.player footer { display: flex; justify-content: space-between; margin-top: .5rem; font-size: .9rem; }
.empty { color: #777; font-style: italic; }

/* dice: colour + icon + size text, always */
.dice { display: flex; flex-wrap: wrap; gap: .4rem; }
.die { display: inline-flex; align-items: center; gap: .2rem; padding: .2rem .5rem; border-radius: .45rem; border: 2px solid rgba(0,0,0,.45);
       font-weight: bold; font-family: system-ui, sans-serif; min-width: 3.2rem; justify-content: center; }
.die-size { font-size: 1rem; }
/* A faint pattern per material, a second channel besides colour: grain, speckle, rivets, facets, hazard stripes. */
.mat-wood { background-color: var(--wood); color: var(--wood-ink);
            background-image: repeating-linear-gradient(100deg, rgba(59,36,18,.13) 0 2px, transparent 2px 7px); }
.mat-stone { background-color: var(--stone); color: var(--stone-ink);
             background-image: radial-gradient(rgba(31,35,38,.22) 1px, transparent 1.5px); background-size: 6px 6px; }
.mat-metal { background-color: var(--metal); color: var(--metal-ink);
             background-image: radial-gradient(circle at 5px 50%, rgba(244,247,250,.6) 1.6px, transparent 2.2px),
                               radial-gradient(circle at calc(100% - 5px) 50%, rgba(244,247,250,.6) 1.6px, transparent 2.2px); }
.mat-gem { background-color: var(--gem); color: var(--gem-ink);
           background-image: linear-gradient(135deg, rgba(255,255,255,.3) 25%, transparent 25% 50%, rgba(44,18,64,.08) 50% 75%, transparent 75%);
           background-size: 10px 10px; }
.mat-mismatched { background-color: var(--mismatched); color: var(--mismatched-ink); border-style: dashed;
                  background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(28,28,28,.12) 6px 12px); }
.die--blocked { outline: 3px dashed #9b1c1c; outline-offset: 1px; }
.die-blocked { font-size: .75rem; color: #9b1c1c; margin-left: .25rem; }

/* tablet */
@media (max-width: 900px) {
    .players { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
    .panel { margin: 1rem; }
}

h1:focus { outline: none; } /* FocusOnNavigate focuses the page heading for screen readers; no ring needed */

/* review M1 fixes: visible material label, card faces, the draft curtain, tap-to-expand clan rule */
.die-mat { font-size: .8rem; letter-spacing: .02em; }
.advanced { margin: .6rem 0; }
.advanced summary { cursor: pointer; color: #444; }
.clan-rule { font-size: .9rem; margin: 0 0 .3rem; }
.clan-rule summary { cursor: pointer; color: #333; }
.clan-rule p { margin: .25rem 0 0; }
.sr-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.curtain { text-align: center; padding: 2rem 1rem; }
.curtain h2 { font-size: 1.8rem; }
.curtain h2:focus { outline: none; }
.private { background: #fffaf0; border: 2px dashed #8a5a0b; border-radius: .6rem; padding: .6rem .8rem; margin-bottom: 1rem; }
.cards { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .5rem; }
.card { width: 12rem; border-radius: .6rem; padding: .5rem .6rem; border: 2px solid #6b6b6b; background: #fff; font-size: .85rem; }
/* Review M4 [2] (Chris: option A): the category is a filled band across the header, not a thin border. */
.card-head { display: flex; justify-content: space-between; align-items: center; font-weight: bold; font-size: 1rem;
             background: var(--cat, #555); color: var(--cat-ink, #fff); margin: -.5rem -.6rem .4rem; padding: .4rem .6rem;
             border-radius: .45rem .45rem 0 0; }
.card-meta { font-style: italic; color: #444; margin-bottom: .25rem; text-transform: capitalize; }
.card-art { width: 100%; border-radius: .3rem; margin-bottom: .3rem; }
/* Category bands: ΔE2000 >= 30 between every pair in all four visions, and the name on each band in its ink meets
   WCAG AA (PaletteTests, docs/colourblind.md). */
.cat-theft { --cat: #300006; --cat-ink: #ffffff; } .cat-disruption { --cat: #bd3c0e; --cat-ink: #ffffff; }
.cat-defensive { --cat: #39019c; --cat-ink: #ffffff; } .cat-utility { --cat: #6af9ef; --cat-ink: #000000; }
.cat-gamble { --cat: #8676ff; --cat-ink: #000000; } .card.goal { --cat: #ffcd1d; --cat-ink: #000000; }
.cat-icon { margin-right: .3rem; }

/* M2: the play area, picker, log and game over */
.game-table { max-width: 80rem; margin: 0 auto; }
.game-table .table { padding-bottom: 0; }
.play, .log, .game-over { max-width: none; margin: 1rem; }
.menu { display: flex; flex-wrap: wrap; gap: 1rem; }
.menu-group h3 { font-size: .9rem; color: #555; margin: .2rem 0; }
button.act, button.option, button.back, button.cancel, button.undo {
    font: inherit; padding: .45rem .8rem; margin: .2rem .3rem .2rem 0; border-radius: .45rem; cursor: pointer;
    border: 2px solid #5a4a32; background: #fffaf0; color: var(--ink); }
button.act:hover, button.option:hover { background: #f3e3c3; }
button.undo { border-style: dashed; }
.picker { border: 2px solid var(--accent); border-radius: .6rem; padding: .6rem .8rem; background: #fffdf6; margin: .5rem 0; }
.picker .question { font-weight: bold; }
.picker .summary { font-weight: bold; }
.goals summary { cursor: pointer; font-weight: bold; margin: .3rem 0; }
.log ol { margin: 0; padding-left: 2rem; max-height: 16rem; overflow-y: auto; }
.log li { margin: .1rem 0; }
.game-over table.summary { border-collapse: collapse; min-width: 20rem; }
.game-over .summary td, .game-over .summary th { padding: .3rem .8rem; border-bottom: 1px solid #ccc; text-align: left; }
.game-over .summary tr.winner { font-weight: bold; }

/* M3: scoring screen, assignment and Polish panels */
.scoring .step-title { font-weight: bold; color: #444; }
.reveal-buttons button, .end-buttons button { margin: .3rem .4rem .3rem 0; }
button.show-all, button.replay, button.new-game, button.next-step { font: inherit; padding: .45rem .9rem; border-radius: .45rem; cursor: pointer; }
button.show-all, button.replay { border: 2px solid #5a4a32; background: #fffaf0; color: var(--ink); }
.hoard-boss { font-size: 1.4rem; font-weight: bold; color: var(--accent); margin: .5rem 0; }
.score-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin-top: .8rem; }
.player-score { background: #fffdf6; border: 2px solid #c9b48a; border-radius: .6rem; padding: .6rem .8rem; }
.player-score h3 { margin: 0 0 .3rem; }
.player-score h4 { margin: .5rem 0 .2rem; font-size: .95rem; color: #5a4a32; }
.player-score ul { margin: 0; padding-left: 1.1rem; }
.player-score li { margin: .15rem 0; }
.player-score li.shattered { color: #9b1c1c; }
.player-score table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.player-score td { padding: .1rem .3rem; border-bottom: 1px solid #eadfc7; }
.player-score td.pts, .goal-result .pts { font-weight: bold; text-align: right; }
.goal-result { font-size: .9rem; margin: .25rem 0; }
.goal-result.achieved .mark { color: #1e6b34; font-weight: bold; }
.goal-result.missed .mark { color: #9b1c1c; font-weight: bold; }
.end-buttons { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.end-buttons .seed { margin: 0 1rem 0 0; color: #444; }
.assign, .polish { border: 2px solid var(--accent); border-radius: .6rem; padding: .6rem .8rem; background: #fffdf6; margin: .5rem 0; }
.assign select { font: inherit; padding: .2rem .4rem; }
.polish button.option { display: flex; align-items: center; gap: .5rem; }
.polish button.option.chosen { background: #f3e3c3; border-color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.score-columns { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.player-score { min-width: 0; overflow-wrap: anywhere; }
.player-score table { table-layout: fixed; }
.player-score td.what { width: 34%; }
.player-score td.pts { width: 2.6rem; }

/* M4: bot seats */
.seat { display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: end; }
.bot-turn { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.bot-turn h2 { margin: 0; }
button.skip { border: 2px solid #5a4a32; background: #fffaf0; color: var(--ink); border-radius: .5rem; padding: .4rem 1rem; cursor: pointer; }

/* M4: save and resume */
.save-menu { max-width: 60rem; margin: .75rem auto 0; display: flex; justify-content: flex-end; }
button.save-game, .spoiler-warning button.cancel { border: 2px solid #5a4a32; background: #fffaf0; color: var(--ink); border-radius: .5rem; padding: .4rem 1rem; cursor: pointer; }
.spoiler-warning { background: #fff4d6; border: 2px solid var(--accent); border-radius: .6rem; padding: .6rem .9rem; }
.spoiler-warning button { margin-right: .5rem; }
.resume .resumed, .log .resumed { font-style: italic; }

/* M4: card tips */
.card-tip { position: relative; display: inline-block; }
button.tip { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1.5px solid #5a4a32; background: #fffaf0; color: var(--ink);
             font-size: .8rem; font-weight: bold; line-height: 1; padding: 0; margin-left: .2rem; cursor: help; vertical-align: middle; }
button.tip:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
/* On a category band the ring is drawn in the band's ink (AA against the band), so it shows on every band. */
.card-head button.tip:focus-visible { outline: 3px solid var(--cat-ink, #fff); }
.tip-pop { position: absolute; z-index: 20; left: 0; top: 1.8rem; width: 18rem; max-width: 80vw; background: #fffdf6; color: var(--ink);
           border: 2px solid var(--accent); border-radius: .5rem; padding: .5rem .6rem; font-size: .85rem; font-weight: normal;
           box-shadow: 0 .2rem .6rem rgba(0,0,0,.3); text-align: left; white-space: normal; font-style: normal; }
.tip-ruling { display: block; margin-top: .35rem; font-style: italic; }
.menu-item, .option-item { display: inline-flex; align-items: center; margin: 0 .35rem .35rem 0; }

/* M4: art by slug (docs/art-list.md). Every image is decoration over the existing look. */
.art-table { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.art-title { display: block; width: 100%; max-height: 12rem; object-fit: cover; border-radius: .6rem; margin-bottom: .5rem; }
.art-curtain { display: block; max-width: 22rem; width: 100%; margin: 0 auto .75rem; border-radius: .6rem; }
.art-clan { display: block; width: 100%; height: auto; flex-shrink: 0; border-radius: .6rem .6rem 0 0; }
.art-portrait { width: 2.4rem; height: 2.4rem; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: .4rem; }
.art-back { width: 1.1rem; height: 1.6rem; object-fit: cover; border-radius: .15rem; vertical-align: middle; margin-right: .25rem; }
.art-hoard-boss { display: block; max-width: 28rem; width: 100%; margin: 0 auto .5rem; border-radius: .6rem; }

/* M4 step 7: phones. Wider screens never fold the board or page the scores. */
.board-summary, .board-toggle, .player-pager { display: none; }

@media (max-width: 640px) {
    html { scroll-padding-bottom: 37vh; }                      /* a focused control scrolls clear of the sticky menu */
    .panel { margin: .5rem 0; padding: .9rem 1rem; border-radius: .5rem; }
    .game-table { display: flex; flex-direction: column; }
    .game-table .play { order: -1; margin: .5rem 0; }          /* your own area first */
    .game-table .log, .game-table .game-over { margin: .5rem 0; }
    .game-table .game-over { order: -1; }                        /* the result first, once the game is over */
    .save-menu { margin: .5rem 1rem 0; }

    .board-summary { display: block; color: var(--paper); font-size: .95rem; margin: .25rem 1rem;
                     background: rgba(20,28,20,.78); border-radius: .4rem; padding: .25rem .6rem; width: fit-content; }
    .board-toggle { display: inline-block; margin: 0 1rem .5rem; }
    .table.folded .market, .table.folded .players { display: none; }
    .table-head { gap: .6rem 1rem; font-size: 1rem; margin: 0 1rem .5rem; }
    .players { grid-template-columns: 1fr; }

    .cards:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
    .cards { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; }
    .cards .card { flex: 0 0 75%; scroll-snap-align: start; }

    .menu { position: sticky; bottom: 0; z-index: 10; background: var(--paper); padding: .5rem 0; border-top: 2px solid var(--accent); max-height: 35vh; overflow-y: auto; }
    button { min-height: 44px; }
    button.tip { min-width: 44px; min-height: 44px; border-radius: 22px; }
    .tip-pop { position: fixed; left: 1rem; right: 1rem; top: auto; bottom: 1rem; width: auto; max-width: none; }

    .player-pager { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem; }
    .player-score:not(.current) { display: none; }
    .score-columns { grid-template-columns: 1fr; }

    .new-game h1 { font-size: 1.8rem; }
    .seat { flex-direction: column; align-items: stretch; }
    input, select { max-width: 100%; }
}

/* M5 step 1: which build this is (rules version and commit), and the between-games update notice. */
footer.build { width: fit-content; margin: 1.5rem auto 1rem; padding: .2rem .6rem; border-radius: .4rem; font-size: .8rem;
    color: var(--paper); background: rgba(20,28,20,.78); }
.update-ready { max-width: 60rem; margin: 1rem auto 0; padding: .6rem 1rem; border-radius: .75rem; background: var(--paper);
    border: 2px solid var(--accent); display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* M5 step 3: the playtest notes after scoring, and the names note on the new-game form. */
.names-note { font-size: .9rem; margin: .25rem 0 .75rem; }
.playtest { margin-top: 1.5rem; border-top: 2px solid var(--accent); padding-top: 1rem; }
.playtest .table-scroll { overflow-x: auto; }
.playtest table.filled-in { border-collapse: collapse; font-size: .9rem; min-width: 40rem; }
.playtest table.filled-in th, .playtest table.filled-in td { border: 1px solid #b9ad97; padding: .3rem .45rem; text-align: left; vertical-align: top; }
.playtest table.filled-in tr.winner td { font-weight: 600; }
.playtest fieldset.feel { border: none; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; }
.playtest fieldset.feel legend { font-weight: 600; margin-bottom: .25rem; }
.playtest fieldset.feel label { min-height: 44px; display: inline-flex; align-items: center; gap: .3rem; }
.playtest textarea { width: 100%; box-sizing: border-box; font: inherit; margin-bottom: .5rem; }
.playtest .note { font-size: .9rem; }

/* M5 step 5: How to play, on its own page and opened over the table during a game. */
.how-to-play-home { max-width: 60rem; margin: 1rem auto 0; color: var(--paper); background: rgba(20,28,20,.78); padding: .4rem .8rem; border-radius: .4rem; width: fit-content; }
.how-to-play-home a { color: var(--paper); font-weight: 600; }
.open-how-to-play { margin: .5rem 1rem; min-height: 44px; }
.how-to-play-overlay { background: var(--paper); max-width: 60rem; margin: .5rem auto 1rem; padding: 1rem 1.25rem; border-radius: .75rem; border: 2px solid var(--accent); }
.how-to-play .source { font-size: .9rem; }
.how-to-play details { margin: .4rem 0; }
.how-to-play summary { font-weight: 700; font-size: 1.05rem; cursor: pointer; padding: .6rem 0; } /* list-item display keeps the open/closed marker */
.how-to-play ul { margin: .25rem 0 .75rem; padding-left: 1.25rem; }
.how-to-play li { margin: .25rem 0; line-height: 1.4; }
.how-to-play-page .back { display: inline-block; min-height: 44px; line-height: 44px; }

/* M5 step 6 (D7): the clan card back on the draft curtain. */
.art-back-clan { display: block; width: 5rem; height: auto; margin: .5rem auto; border-radius: .4rem; box-shadow: 0 .15rem .5rem rgba(0,0,0,.35); }
