/* okjy game hub: one look for every game, a dark card table with warm accents.
   Colors are variables at the top; each game adds its own section further down. */
/* The fonts ship with the hub (web/fonts, SIL Open Font License), so it works offline too. */
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("fonts/fredoka-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("fonts/fredoka-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/nunito-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/nunito-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --felt-1: #1d5c58;
  --felt-2: #0f3236;
  --felt-3: #0a1f24;
  --text: #f3efe6;
  --muted: #a9bab8;
  --panel: rgba(255, 255, 255, .06);
  --panel-strong: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .12);
  --gold: #f2b544;
  --gold-dark: #c98a1c;
  --accent: #f2b544;
  --accent-text: #2b1d05;
  --highlight: rgba(242, 181, 68, .16);
  --card-face: #fdf8ec;
  --card-ink: #2a2723;
  --card-muted: #7a7065;
  --red: #e0603f;
  --green: #4caf6a;
  --blue: #3f8fd8;
  --yellow: #e6b52e;
  --grey: #8c8c8c;
  --shadow: 0 6px 18px rgba(0, 0, 0, .35);
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* even for elements whose class sets a display */
html { min-height: 100%; background: var(--felt-3); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 15px/1.5 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 50% -10%, var(--felt-1) 0%, var(--felt-2) 55%, var(--felt-3) 100%) fixed;
}
main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.2; font-family: var(--display); font-weight: 600; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.error { color: #ff9b85; margin-top: 8px; }

header.top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px; background: rgba(0, 0, 0, .25); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
header.top a { color: inherit; text-decoration: none; }
header.top .brand { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .01em; }
header.top .brand::before { content: "🂡"; color: var(--gold); margin-right: 8px; }
header.top .crumb { color: var(--muted); font-family: var(--display); font-size: 17px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; box-shadow: var(--shadow); backdrop-filter: blur(4px);
}

button, select {
  font: inherit; color: var(--text); background: var(--panel-strong);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px;
}
select option { background: #173b3e; color: var(--text); }
button { cursor: pointer; font-weight: 700; transition: transform .08s, filter .15s, box-shadow .15s; }
button:hover:not(:disabled) { filter: brightness(1.12); }
button:active:not(:disabled) { transform: translateY(1px); }
button.primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-dark)); color: var(--accent-text);
  border-color: transparent; box-shadow: 0 3px 0 #8a5d0f, var(--shadow);
}
button:disabled { opacity: .5; cursor: default; }
input[type="checkbox"] { accent-color: var(--gold); width: 18px; height: 18px; margin-top: 2px; }

/* ----- hub start page ----- */
.hero { text-align: center; margin: 24px 0 8px; }
.hero h1 { font-size: 40px; font-weight: 700; }
.hero h1 span { color: var(--gold); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 24px; }
.game-tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 220px; padding: 20px; color: #fff; text-decoration: none; overflow: hidden;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, .18); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  background: linear-gradient(160deg, #3b4a5a, #1d2630);
}
.game-tile:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 14px 30px rgba(0, 0, 0, .45); }
.game-tile h2 { font-size: 28px; margin: 0; text-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.game-tile .desc { opacity: .92; margin-top: 4px; }
.game-tile .meta { margin-top: 10px; font-size: 13px; opacity: .8; }
.game-tile .art { position: absolute; top: 14px; right: 16px; font-size: 64px; opacity: .9;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.game-tile.faraway { background: linear-gradient(160deg, #e5894b 0%, #b0466b 45%, #3b2a6b 100%); }
.game-tile.flip7 { background: linear-gradient(160deg, #23b2c9 0%, #3d63d6 50%, #7b3fc4 100%); }
.game-tile.soon { background: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 12px, rgba(255,255,255,.02) 12px 24px);
  pointer-events: none; color: var(--muted); }

/* ----- setup ----- */
.setup { max-width: 620px; margin: 0 auto; }
.setup h2 { font-size: 26px; }
.setup .row { display: flex; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.setup label.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin: 8px 0; }
.setup .seat { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; margin: 8px 0; }
.setup .seat small { grid-column: 2; color: var(--muted); margin-top: -4px; }
.setup #start { font-size: 17px; padding: 10px 26px; }
details.rules { margin: 14px 0 6px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .15); }
details.rules summary { cursor: pointer; padding: 10px 14px; font-weight: 800; list-style: none; }
details.rules summary::-webkit-details-marker { display: none; }
details.rules summary::before { content: "📖  "; }
details.rules[open] summary { border-bottom: 1px solid var(--line); }
details.rules .body { padding: 4px 16px 12px; }
details.rules h4 { margin: 12px 0 4px; font-family: var(--display); font-weight: 600; color: var(--gold); font-size: 15px; }
details.rules p, details.rules ul { margin: 4px 0; }
details.rules ul { padding-left: 20px; }

/* ----- a game table (shared) ----- */
.table { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
@media (max-width: 860px) { .table { grid-template-columns: minmax(0, 1fr); } }
.status { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.status .prompt { font-family: var(--display); font-size: 21px; font-weight: 600; }
.status .prompt.waiting { color: var(--muted); }
.zone { margin-top: 14px; }
.zone > h3 { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.zone > h3 .muted { font-family: "Nunito", sans-serif; font-weight: 400; font-size: 13px; }
.cards { display: flex; gap: 10px; flex-wrap: wrap; min-height: 20px; }
.player { margin-top: 14px; }
.player .name { display: flex; justify-content: space-between; gap: 8px; }
.player .fame { font-weight: 800; color: var(--gold); }
.player.me { border-color: rgba(242, 181, 68, .55); }
.player .rows { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.player .label { font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.log { max-height: 78vh; overflow-y: auto; font-size: 13px; position: sticky; top: 16px; }
.log ol { list-style: none; margin: 0; padding: 0; }
.log li { padding: 3px 8px; border-radius: 8px; }
.log li.new { background: var(--highlight); }
.log li.round { margin-top: 10px; font-family: var(--display); font-weight: 600; color: var(--gold); }
.results { margin-top: 14px; overflow-x: auto; }
.results table { border-collapse: collapse; width: 100%; margin-top: 8px; }
.results td, .results th { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.results tr:first-child + tr td { font-weight: 800; color: var(--gold); }

/* ----- Faraway cards ----- */
.card {
  --c: var(--grey);
  position: relative; width: 92px; height: 128px; flex: none; color: var(--card-ink);
  border-radius: 10px; border: 2px solid var(--c);
  background: linear-gradient(180deg, var(--c) 0 34%, var(--card-face) 34%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35); font-size: 12px; user-select: none;
}
.card.red { --c: var(--red); } .card.green { --c: var(--green); } .card.blue { --c: var(--blue); }
.card.yellow { --c: var(--yellow); } .card.grey { --c: var(--grey); }
.card .num { position: absolute; top: 2px; left: 7px; font: 700 26px var(--display); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.card .kind { position: absolute; top: 7px; left: 7px; font-size: 10px; font-weight: 800; color: #fff; letter-spacing: .06em; }
.card .icons { position: absolute; top: 4px; right: 5px; font-size: 14px; text-align: right; line-height: 1.15; }
.card .wonders { position: absolute; top: 47px; left: 0; right: 0; text-align: center; font-size: 15px; letter-spacing: 1px; }
.card .quest {
  position: absolute; bottom: 5px; left: 5px; right: 5px; min-height: 34px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-top: 1px dashed rgba(0, 0, 0, .15); padding-top: 3px; text-align: center; line-height: 1.25;
}
.card .quest .req { font-size: 11px; color: var(--card-muted); }
.card .quest .pts { font-weight: 800; }
.card .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.card .score {
  position: absolute; bottom: -9px; right: -7px; background: var(--gold); color: var(--accent-text);
  font-weight: 800; border-radius: 10px; padding: 0 7px; font-size: 12px; box-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.card.small { width: 64px; height: 90px; font-size: 10px; border-radius: 8px; }
.card.small .num { font-size: 18px; left: 5px; }
.card.small .kind { font-size: 8px; left: 5px; }
.card.small .icons { font-size: 11px; }
.card.small .wonders { top: 33px; font-size: 11px; }
.card.small .quest { min-height: 26px; bottom: 3px; left: 3px; right: 3px; }
.card.small .quest .req { font-size: 9px; }
.card.small .dot { width: 8px; height: 8px; }
.card.sanctuary { border-style: double; border-width: 4px; }
.card.choosable { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.card.choosable:hover, .card.choosable:focus-visible {
  transform: translateY(-6px); box-shadow: 0 0 0 3px var(--gold), 0 10px 20px rgba(0,0,0,.45); outline: none;
}
.card.known::after {
  content: "drafted"; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  font-size: 9px; color: var(--card-ink); background: var(--card-face); border: 1px solid rgba(0,0,0,.2);
  border-radius: 6px; padding: 0 4px;
}
.card.back {
  background: repeating-linear-gradient(45deg, #2c6e69 0 6px, #245b57 6px 12px);
  border-color: rgba(255, 255, 255, .25);
}

/* ----- Flip 7 ----- */
.f7-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.f7-big { font: 600 22px var(--display); padding: 12px 34px; border-radius: 14px; letter-spacing: .02em; }
.f7-big.hit { background: linear-gradient(180deg, #5fd07c, #2f9e52); color: #0c2a15; border-color: transparent;
  box-shadow: 0 4px 0 #1f6e38, var(--shadow); }
.f7-big.stay { background: linear-gradient(180deg, var(--gold), var(--gold-dark)); color: var(--accent-text);
  border-color: transparent; box-shadow: 0 4px 0 #8a5d0f, var(--shadow); }
.f7-target { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; }
.f7-odds { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.chip { font-size: 13px; padding: 2px 10px; border-radius: 20px; background: var(--panel-strong); border: 1px solid var(--line); }
.chip.danger { background: rgba(224, 96, 63, .25); }
.chip.good { background: rgba(76, 175, 106, .25); }

.f7-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-top: 14px; }
.f7-seat { position: relative; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.f7-seat.me { border-color: rgba(242, 181, 68, .55); }
.f7-seat.turn { box-shadow: 0 0 0 2px var(--gold), 0 0 28px rgba(242, 181, 68, .35), var(--shadow); }
.f7-seat.busted .f7-hand { filter: grayscale(.85) brightness(.75); }
.f7-seat.frozen { background: linear-gradient(160deg, rgba(120, 190, 240, .18), var(--panel)); }
.f7-seat.flip7 { box-shadow: 0 0 0 2px var(--gold), 0 0 34px rgba(242, 181, 68, .55), var(--shadow); }
.f7-head { display: flex; align-items: center; gap: 10px; }
.f7-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font: 700 18px var(--display); background: var(--panel-strong); border: 2px solid var(--line);
}
.f7-seat.me .f7-avatar { background: var(--gold); color: var(--accent-text); border-color: transparent; }
.f7-who { flex: 1; min-width: 0; }
.f7-who .nm { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f7-who .sub { font-size: 12px; color: var(--muted); }
.f7-score { text-align: right; }
.f7-score .total { font: 700 26px var(--display); color: var(--gold); line-height: 1; }
.f7-score .round { font-size: 12px; color: var(--muted); }
.f7-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin: 10px 0 0; overflow: hidden; }
.f7-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); border-radius: 3px; }
.f7-hand { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; min-height: 84px; align-items: center; }
.f7-hand.empty::after { content: "no cards yet"; color: var(--muted); font-size: 13px; }
.f7-stamp {
  position: absolute; top: 46%; right: 14px; transform: rotate(-12deg);
  font: 700 22px var(--display); letter-spacing: .08em; padding: 2px 12px; border-radius: 8px;
  border: 3px solid currentColor; opacity: .9; pointer-events: none; background: rgba(0, 0, 0, .25);
}
.f7-stamp.busted { color: #ff7a5c; }
.f7-stamp.frozen { color: #9fd6ff; }
.f7-stamp.stayed { color: #8fe0a6; font-size: 17px; }
.f7-stamp.flip7 { color: var(--gold); font-size: 24px; }

.f7-card {
  --c: #555;
  position: relative; flex: none; width: 58px; height: 82px; border-radius: 9px;
  background: var(--card-face); color: var(--c);
  display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
  border: 2px solid rgba(0, 0, 0, .08); user-select: none;
}
.f7-card::before {  /* inner frame in the card's color */
  content: ""; position: absolute; inset: 4px; border-radius: 6px; border: 2px solid var(--c); opacity: .35;
}
.f7-card .big { font: 700 34px var(--display); line-height: 1; }
.f7-card .corner { position: absolute; font: 700 11px var(--display); line-height: 1; }
.f7-card .corner.tl { top: 6px; left: 7px; }
.f7-card .corner.br { bottom: 6px; right: 7px; }  /* upright: a turned 6 would read as 9 */
.f7-card.modifier { background: linear-gradient(160deg, #ffd27a, #f29a3b); --c: #6b3500; }
.f7-card.modifier .big { font-size: 24px; }
.f7-card.freeze { background: linear-gradient(160deg, #d9f1ff, #7cc4f2); --c: #0d4f80; }
.f7-card.flip3 { background: linear-gradient(160deg, #e5d4ff, #a07ae6); --c: #3d1b7a; }
.f7-card.chance { background: linear-gradient(160deg, #ffd6df, #f07a96); --c: #8a1534; }
.f7-card.action .big { font-size: 28px; }
.f7-card.action .label { position: absolute; bottom: 5px; left: 0; right: 0; text-align: center; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.f7-card.small { width: 32px; height: 46px; border-radius: 6px; }
.f7-card.small::before { inset: 2px; border-width: 1px; border-radius: 4px; }
.f7-card.small .big { font-size: 17px; }
.f7-card.small.modifier .big { font-size: 12px; }
.f7-card.small.action .big { font-size: 15px; }
.f7-card.small .corner, .f7-card.small .label { display: none; }
.f7-card.dup { box-shadow: 0 0 0 3px #ff5a3c, 0 3px 8px rgba(0, 0, 0, .4); }
.f7-card.new { animation: deal .35s ease-out; }
@keyframes deal {
  from { transform: translate(-30px, -24px) rotate(-14deg) scale(.85); opacity: 0; }
  to { transform: none; opacity: 1; }
}
/* number colors, like a rainbow from 0 to 12 */
.f7-card.n0 { --c: #5d6b75; } .f7-card.n1 { --c: #8a5a2b; } .f7-card.n2 { --c: #c0392b; }
.f7-card.n3 { --c: #d35400; } .f7-card.n4 { --c: #c99a06; } .f7-card.n5 { --c: #7a9a01; }
.f7-card.n6 { --c: #27ae60; } .f7-card.n7 { --c: #16a085; } .f7-card.n8 { --c: #2980b9; }
.f7-card.n9 { --c: #3949ab; } .f7-card.n10 { --c: #8e44ad; } .f7-card.n11 { --c: #c2185b; }
.f7-card.n12 { --c: #1f2a33; }

.f7-previous { margin-top: 16px; }
.f7-prev-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.f7-prev-row .f7-hand { margin-top: 0; min-height: 0; gap: 4px; }
.f7-prev-row .f7-hand.empty::after { content: "–"; }
.f7-prev-name { min-width: 110px; font-weight: 700; }
.f7-prev-score { min-width: 44px; font-weight: 800; color: var(--gold); }
.f7-prev-status { min-width: 60px; font-size: 13px; color: var(--muted); }

/* ----- the look switch (top right) ----- */
.look-switch { margin-left: auto; display: flex; padding: 3px; border-radius: 12px;
  background: var(--panel-strong); border: 1px solid var(--line); }
.look-switch button { border: 0; background: transparent; padding: 4px 12px; border-radius: 9px; font-size: 13px;
  color: var(--muted); box-shadow: none; }
.look-switch button[aria-pressed="true"] { background: var(--gold); color: var(--accent-text); }

/* ----- "Classic" look: the hub's original light (or dark, following the system) style ----- */
:root[data-look="classic"] {
  --felt-1: #f4f1ea; --felt-2: #f4f1ea; --felt-3: #f4f1ea;
  --text: #2a2723; --muted: #77706a;
  --panel: #ffffff; --panel-strong: #f0ece4; --line: #e1dbd0;
  --gold: #2f6f6a; --gold-dark: #24575a; --accent: #2f6f6a; --accent-text: #ffffff;
  --highlight: #fff4cc; --card-face: #ffffff;
  --red: #c8553d; --green: #4f9a57; --blue: #3b78c2; --yellow: #d6ab2e;
  --shadow: 0 1px 3px rgba(0, 0, 0, .12);
  --display: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root[data-look="classic"] {
    --felt-1: #1b1a18; --felt-2: #1b1a18; --felt-3: #1b1a18;
    --text: #ece7df; --muted: #a39b91;
    --panel: #262422; --panel-strong: #302d2a; --line: #3a3733;
    --gold: #4fa39b; --gold-dark: #3d8780; --accent: #4fa39b; --accent-text: #10201f;
    --highlight: #3d3620; --card-face: #f6f2ea;
    --shadow: 0 1px 3px rgba(0, 0, 0, .5);
  }
}
:root[data-look="classic"] body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--felt-1); }
:root[data-look="classic"] header.top { background: var(--panel); backdrop-filter: none; }
:root[data-look="classic"] header.top .brand::before { content: none; }
:root[data-look="classic"] .panel { border-radius: 10px; padding: 14px; backdrop-filter: none; }
:root[data-look="classic"] select option { background: var(--panel); }
:root[data-look="classic"] button.primary,
:root[data-look="classic"] .f7-big.hit,
:root[data-look="classic"] .f7-big.stay { background: var(--accent); color: var(--accent-text); box-shadow: none; }
:root[data-look="classic"] .f7-big.stay { background: var(--panel-strong); color: var(--text); border: 1px solid var(--line); }
:root[data-look="classic"] .f7-big { font-size: 18px; padding: 10px 28px; }
:root[data-look="classic"] .hero h1 { font-size: 30px; }
:root[data-look="classic"] .game-tile,
:root[data-look="classic"] .game-tile.faraway,
:root[data-look="classic"] .game-tile.flip7 {
  background: var(--panel); color: var(--text); border-color: var(--line); min-height: 160px; border-radius: 10px;
}
:root[data-look="classic"] .game-tile h2 { text-shadow: none; }
:root[data-look="classic"] .game-tile .art { font-size: 40px; }
:root[data-look="classic"] .game-tile.soon { opacity: .55; }
:root[data-look="classic"] .card .num, :root[data-look="classic"] .f7-score .total { font-family: var(--display); }
:root[data-look="classic"] .card.back { background: repeating-linear-gradient(45deg, var(--line) 0 6px, var(--panel) 6px 12px); border-color: var(--line); }
:root[data-look="classic"] .f7-stamp { background: var(--panel); }
/* Flip 7 cards as the original flat colored chips */
:root[data-look="classic"] .f7-card { width: 42px; height: 58px; border-radius: 7px; background: var(--c); color: #fff;
  border: 0; box-shadow: var(--shadow); text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
:root[data-look="classic"] .f7-card::before,
:root[data-look="classic"] .f7-card .corner,
:root[data-look="classic"] .f7-card .label { display: none; }
:root[data-look="classic"] .f7-card .big { font: 800 20px system-ui, sans-serif; }
:root[data-look="classic"] .f7-card.modifier { --c: #e07b39; background: var(--c); }
:root[data-look="classic"] .f7-card.freeze { --c: #4aa3d8; background: var(--c); }
:root[data-look="classic"] .f7-card.flip3 { --c: #8a5cc7; background: var(--c); }
:root[data-look="classic"] .f7-card.chance { --c: #d2476b; background: var(--c); }
:root[data-look="classic"] .f7-card.small { width: 26px; height: 36px; border-radius: 5px; }
:root[data-look="classic"] .f7-card.small .big { font-size: 13px; }
:root[data-look="classic"] .f7-hand { min-height: 60px; }
:root[data-look="classic"] .f7-card.dup { box-shadow: 0 0 0 3px #ff5a3c, var(--shadow); }

/* ----- setup: seats that can be humans, dropdown options ----- */
.setup .seat-choice { display: flex; gap: 8px; }
.setup .seat-choice select { flex: 1; min-width: 0; }
.chips-input { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.setup .seat-chips { width: 96px; font: inherit; color: var(--text); background: var(--panel-strong);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; }
#same-chips { margin: 2px 0 6px 104px; padding: 2px 0; font-size: 13px; }
.setup .seat-name { width: 130px; font: inherit; color: var(--text); background: var(--panel-strong);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.setup .choice-option { display: grid; gap: 6px; margin: 10px 0; }

/* ----- Kniffel ----- */
.kn-tray { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.kn-dice { display: flex; gap: 14px; flex-wrap: wrap; }
.kn-tray-side { display: grid; gap: 8px; }
.kn-hint { font-size: 13px; max-width: 260px; }
.kn-die {
  width: 64px; height: 64px; border-radius: 14px; padding: 9px; flex: none;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center;
  background: linear-gradient(145deg, #ffffff, #ece4d2); box-shadow: 0 4px 0 #b9ad95, 0 8px 16px rgba(0, 0, 0, .35);
  transition: transform .12s, box-shadow .12s; user-select: none;
}
.kn-die .pip { width: 11px; height: 11px; border-radius: 50%; background: #2a2723; box-shadow: inset 0 1px 1px rgba(0,0,0,.5); }
.kn-die.clickable { cursor: pointer; }
.kn-die.clickable:hover { transform: translateY(-3px); }
.kn-die.held { transform: translateY(-8px); box-shadow: 0 0 0 3px var(--gold), 0 4px 0 #b9ad95, 0 12px 20px rgba(0, 0, 0, .4); }

.kn-die.small { width: 22px; height: 22px; padding: 3px; border-radius: 5px; box-shadow: none; }
.kn-die.small .pip { width: 4px; height: 4px; }
.kn-die.rolling { animation: tumble .45s ease-out; }
@keyframes tumble {
  0% { transform: translateY(-18px) rotate(-30deg); }
  60% { transform: translateY(3px) rotate(8deg); }
  100% { transform: none; }
}
#roll:disabled { filter: grayscale(.6); }

.kn-sheet-box { margin-top: 14px; overflow-x: auto; }
.kn-sheet { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.kn-sheet th, .kn-sheet td { padding: 5px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.kn-sheet th { font-family: var(--display); font-weight: 600; white-space: nowrap; }
.kn-sheet td.box { text-align: left; white-space: nowrap; }
.kn-sheet td.box small { display: block; font-size: 11px; line-height: 1.2; }
.kn-sheet .current { background: rgba(242, 181, 68, .08); }
.kn-sheet th.current { color: var(--gold); }
.kn-sheet .filled { font-weight: 800; }
.kn-sheet .struck { color: var(--muted); }
.kn-sheet tr.sum td { font-size: 13px; color: var(--muted); background: rgba(0, 0, 0, .12); }
.kn-sheet tr.total td { font: 700 18px var(--display); color: var(--gold); border-bottom: 0; }
.kn-sheet button.pick {
  min-width: 52px; padding: 3px 10px; border-radius: 8px; font-weight: 800;
  background: rgba(242, 181, 68, .2); border: 1px dashed var(--gold); color: var(--text);
}
.kn-sheet button.pick:hover { background: var(--gold); color: var(--accent-text); }
.kn-sheet button.pick.zero { background: transparent; border-color: var(--line); color: var(--muted); font-weight: 600; }
.log li.kn-score { font-weight: 700; }
:root[data-look="classic"] .kn-die { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); border: 1px solid #d8d0c2; }
:root[data-look="classic"] .kn-die.held { box-shadow: 0 0 0 3px var(--gold); }
.game-tile.kniffel { background: linear-gradient(160deg, #f25f5c 0%, #c2306b 50%, #5b2a86 100%); }
:root[data-look="classic"] .game-tile.kniffel { background: var(--panel); color: var(--text); border-color: var(--line); min-height: 160px; border-radius: 10px; }
.kn-log-dice { display: inline-flex; gap: 2px; vertical-align: middle; }
.kn-log-dice .kn-die.small { width: 16px; height: 16px; padding: 2px; border-radius: 4px; }
.kn-log-dice .kn-die.small .pip { width: 3px; height: 3px; }
.kn-sheet tr.sum td:first-child, .kn-sheet tr.total td:first-child { text-align: left; }

/* ----- results screen (all games) ----- */
.results-overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 15, 18, .62); backdrop-filter: blur(5px); animation: fade-in .25s ease-out;
}
.results-panel {
  width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: linear-gradient(170deg, #21524f, #13363a); color: var(--text);
  border: 1px solid rgba(242, 181, 68, .35); border-radius: 22px; padding: 26px 26px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55); animation: pop-in .35s cubic-bezier(.2, .9, .3, 1.2);
  text-align: center;
}
.results-kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.results-title { font: 700 34px var(--display); margin: 4px 0 2px; color: var(--gold); }
.results-subtitle { margin: 0 0 14px; color: var(--muted); }
.results-standings { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.results-row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  opacity: 0; animation: row-in .4s ease-out forwards;
}
.results-row.first { background: rgba(242, 181, 68, .16); border-color: rgba(242, 181, 68, .55); }
.results-row.me:not(.first) { border-color: rgba(255, 255, 255, .35); }
.results-medal { font-size: 24px; text-align: center; color: var(--muted); font-weight: 800; }
.results-who { display: grid; min-width: 0; }
.results-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results-who small { color: var(--muted); font-size: 12px; }
.results-points { font: 700 24px var(--display); color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.results-points small { font: 600 12px "Nunito", sans-serif; color: var(--muted); }
.results-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 16px; }
.results-fact { padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .18); display: grid; gap: 2px; }
.results-fact .label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.results-fact .value { font-weight: 800; }
.results-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.results-buttons button { padding: 10px 20px; }
.results-buttons button.link { background: transparent; border-color: transparent; color: var(--muted); text-decoration: underline; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes row-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .results-overlay, .results-panel { animation: none; }
  .results-row { animation: none; opacity: 1; }
}
:root[data-look="classic"] .results-panel { background: var(--panel); border-color: var(--line); }
:root[data-look="classic"] .results-overlay { background: rgba(0, 0, 0, .35); }

/* ----- Faraway pink cards and sacrifices ----- */
.card.pink { box-shadow: 0 0 0 3px #f28ad0, 0 0 14px rgba(242, 138, 208, .75), 0 3px 8px rgba(0, 0, 0, .35); }
.card.pink.choosable:hover, .card.pink.choosable:focus-visible {
  box-shadow: 0 0 0 3px var(--gold), 0 0 16px rgba(242, 138, 208, .9), 0 10px 20px rgba(0, 0, 0, .45); }
.card.gone { opacity: .35; filter: grayscale(1); }
.card.gone::before { content: "🗑️"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; z-index: 1; }
.sacrifice-options { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.sacrifice-option { display: grid; gap: 6px; justify-items: start; text-align: left; padding: 10px 14px; border-radius: 12px; }
.setup label.check.sub-option { margin-left: 28px; }

/* ----- the Top 10 lists (setup form and highscores page) ----- */
.highscores { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.hs-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hs-head h3 { margin: 0; }
.hs-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 8px; }
.hs-board h4 { margin: 6px 0; font-family: var(--display); font-weight: 600; color: var(--gold); font-size: 15px; }
.hs-board p { margin: 4px 0; font-size: 14px; }
.hs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hs-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.hs-table td:first-child { width: 2.2em; }
.hs-table .hs-value { font-weight: 800; text-align: right; white-space: nowrap; }
.hs-table .hs-when { font-size: 12px; text-align: right; white-space: nowrap; }
.hs-game { margin-bottom: 18px; }
.hs-game .hs-head select { margin-left: auto; }
.results-records { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--highlight);
  border: 1px solid var(--gold); font-weight: 700; display: grid; gap: 4px; }
.hero a, .hs-game h2 a { color: var(--gold); }
.hs-game h2 a { text-decoration: none; }

/* ----- Sea Salt & Paper ----- */
.game-tile.seasalt { background: linear-gradient(160deg, #6fc3df 0%, #2f7fb5 45%, #1d3f6e 100%); }
.ss-card {
  --c: #2f5d8a; --ink: #fff;
  position: relative; width: 84px; height: 112px; flex: none; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 10px; border: 2px solid rgba(255, 255, 255, .55); color: var(--ink); text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, .22) 0 50%, transparent 50%), var(--c);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35); font: inherit;
}
.ss-card.small { width: 54px; height: 72px; padding: 3px 2px; border-radius: 8px; }
.ss-card .ss-icon { font-size: 30px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.ss-card.small .ss-icon { font-size: 20px; }
.ss-card .ss-name { font-weight: 800; font-size: 12px; line-height: 1.1; }
.ss-card.small .ss-name { font-size: 9.5px; }
.ss-card .ss-rule { font-size: 10px; line-height: 1.15; opacity: .9; }
.ss-card.back { --c: #1f4f6e; background: repeating-linear-gradient(45deg, #23597c 0 8px, #1c4a68 8px 16px); }
.ss-card.empty { background: transparent; border: 2px dashed var(--line); box-shadow: none; color: var(--muted); }
button.ss-card { cursor: pointer; }
.ss-card.choosable { outline: 3px solid var(--gold); outline-offset: 2px; cursor: pointer; transition: transform .12s; }
.ss-card.choosable:hover { transform: translateY(-4px); }
.c-dark_blue { --c: #234a8c; }
.c-light_blue { --c: #3fa7d6; }
.c-black { --c: #2b2b2e; }
.c-yellow { --c: #e3b53b; --ink: #2b2105; }
.c-green { --c: #4f9a5a; }
.c-white { --c: #f2efe6; --ink: #2a2723; }
.c-purple { --c: #7b52a8; }
.c-grey { --c: #8d949b; }
.c-light_orange { --c: #f2a46b; --ink: #3a1c05; }
.c-pink { --c: #e78fb0; --ink: #3a0c1e; }
.c-orange { --c: #d9622b; }
.ss-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.ss-duos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ss-pair { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(0, 0, 0, .18); }
.ss-others { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.ss-seat.turn { border-color: var(--gold); box-shadow: 0 0 0 2px var(--highlight), var(--shadow); }
.ss-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ss-total { font: 700 26px var(--display); color: var(--gold); }
.ss-points { text-align: right; }
.ss-sea, .ss-me, .ss-previous { margin-top: 14px; }
.ss-piles { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }
.ss-pile { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ss-pick { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.ss-pick h3 { font-size: 16px; }
.ss-hand .ss-card { width: 92px; height: 122px; }
.ss-breakdown { font-size: 13px; }
.ss-label { font-size: 12px; margin-top: 10px; }
.ss-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.ss-actions .f7-big { font-size: 18px; padding: 10px 20px; }
.ss-duo { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; text-align: left; align-items: center; }
.ss-duo .ss-icon { grid-row: span 2; font-size: 22px; }
.ss-duo small { color: var(--muted); }
.ss-prev-row { display: grid; grid-template-columns: 110px 46px 90px 1fr; gap: 8px; align-items: center;
  padding: 4px 0; border-top: 1px solid var(--line); }
.ss-prev-name { font-weight: 700; }
.ss-prev-score { font-weight: 800; color: var(--gold); }
.ss-hidden { visibility: hidden; }
.ss-handoff { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50;
  background: rgba(5, 15, 20, .85); padding: 16px; }
.ss-handoff[hidden] { display: none; }
.ss-handoff .panel { max-width: 420px; text-align: center; background: var(--felt-2); }
.ss-handoff h2 { font-size: 30px; color: var(--gold); }
@media (max-width: 600px) {
  .ss-card { width: 64px; height: 88px; }
  .ss-hand .ss-card { width: 70px; height: 96px; }
  .ss-card .ss-rule { display: none; }
  .ss-prev-row { grid-template-columns: 1fr auto; }
}
:root[data-look="classic"] .game-tile.seasalt { background: var(--panel); color: var(--text); border-color: var(--line); min-height: 160px; border-radius: 10px; }

/* ----- 7 Wonders: a table with you at the bottom edge and an opponent on every other edge ----- */
.game-tile.sevenwonders { background: linear-gradient(160deg, #e2b25a 0%, #b5652e 45%, #4a2a4f 100%); }
:root[data-look="classic"] .game-tile.sevenwonders { background: var(--panel); color: var(--text); border-color: var(--line); min-height: 160px; border-radius: 10px; }
.c-brown { --c: #8a5a2b; } .c-grey { --c: #6f777f; } .c-blue { --c: #2f74c0; } .c-yellow { --c: #c9921a; }
.c-red { --c: #c2412f; } .c-green { --c: #3d8f50; } .c-purple { --c: #7650a8; }

#game.sw-game { max-width: 1500px; margin: 0 auto; }
main:has(#game.sw-game:not([hidden])) { max-width: 1500px; }
.sw-e { font-size: 1.2em; line-height: 1; }          /* an emoji */
.sw-or { color: var(--muted); margin: 0 1px; font-size: .85em; }
.sw-pts { font-weight: 800; color: var(--gold); white-space: nowrap; }
.sw-sq { display: inline-block; width: .8em; height: .8em; border-radius: 2px; background: var(--c); vertical-align: -1px; }

/* top bar: what to do + the legend */
.sw-bar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 8px 14px; }
.sw-bar .prompt { font: 600 19px/1.25 var(--display); flex: 1 1 320px; }
.sw-bar .prompt.waiting { color: var(--muted); }
.sw-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.sw-legend-item { display: flex; flex-direction: column; line-height: 1.15; }
.sw-legend-item .label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sw-legend-item .value { font: 600 16px var(--display); white-space: nowrap; }
.sw-bar-buttons { display: flex; gap: 8px; }
.sw-key { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--muted); padding: 0 4px; margin-top: 6px; }

/* the table */
.sw-table { display: grid; gap: 10px; margin-top: 10px;
  grid-template-columns: minmax(210px, 1fr) minmax(280px, 1.25fr) minmax(210px, 1fr);
  grid-template-areas: "top top top" "left center right" "me me me"; }
.sw-edge-top { grid-area: top; display: flex; gap: 10px; justify-content: center; }
.sw-edge-top > * { flex: 1 1 0; max-width: 440px; }
.sw-edge-left { grid-area: left; display: flex; flex-direction: column-reverse; gap: 10px; justify-content: center; }
.sw-edge-right { grid-area: right; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.sw-felt { grid-area: center; border-radius: 26px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .1), rgba(0, 0, 0, .22));
  border: 3px solid rgba(201, 146, 26, .55); box-shadow: inset 0 0 30px rgba(0, 0, 0, .35); }
.sw-me-edge { grid-area: me; }
.sw-age { font: 700 24px var(--display); color: var(--gold); }
.sw-pass { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.sw-pass .arrow { font-size: 34px; line-height: 1; color: var(--gold); }
.sw-lastturn { font-size: 13px; color: var(--muted); display: grid; gap: 2px; }
.sw-lastturn strong { color: var(--text); }
@media (max-width: 1000px) {
  .sw-table { grid-template-columns: 1fr 1fr; grid-template-areas: "center center" "left right" "top top" "me me"; }
  .sw-edge-top { flex-wrap: wrap; }
  .sw-edge-top > * { flex-basis: 220px; }
}
@media (max-width: 600px) {
  .sw-table { grid-template-columns: 1fr; grid-template-areas: "center" "left" "right" "top" "me"; }
}

/* a seat */
.sw-seat { padding: 8px 11px; display: grid; gap: 4px; align-content: start; min-width: 0; cursor: pointer;
  transition: box-shadow .15s, transform .15s; text-align: left; }
.sw-seat:hover { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.sw-seat.neighbour { border: 2px solid rgba(201, 146, 26, .6); }
.sw-seat-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sw-seat-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-seat-wonder { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.sw-tag-nb { font-size: 11px; font-weight: 800; color: var(--accent-text); background: var(--gold); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.sw-seat-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.sw-seat-stats span { white-space: nowrap; }
.sw-line { display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: center; font-size: 13px; }
.sw-line .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sw-price { display: inline-flex; align-items: center; gap: 1px; padding: 1px 6px; border-radius: 10px; background: var(--panel-strong); white-space: nowrap; }
.sw-price small { color: var(--muted); font-size: 11px; margin-left: 2px; }
/* resources, summed up: one box per resource (with its count), either-or cards in dashed boxes */
.sw-prod { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sw-res { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 8px; white-space: nowrap;
  background: var(--panel-strong); border: 1px solid var(--line); }
.sw-res.choice { border-style: dashed; border-color: var(--muted); background: transparent; }
.sw-rc { display: inline-flex; align-items: center; gap: 1px; }
.sw-n { font-size: 12px; font-weight: 800; }
.sw-pay { color: var(--muted); font-size: 11px; margin-left: 2px; }
/* costs: thin lines between the different resources: 🧱×2 | 📜 | 🧵 */
.sw-cost { display: inline-flex; align-items: center; flex-wrap: wrap; row-gap: 2px; }
.sw-cost .sw-rc + .sw-rc { border-left: 1px solid currentColor; margin-left: 5px; padding-left: 5px; }
.sw-did { font-size: 12.5px; color: var(--gold); }
.sw-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.sw-chip { background: var(--c); color: #fff; border-radius: 6px; padding: 1px 6px; font-size: 12px; font-weight: 700;
  white-space: nowrap; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.sw-chip.new { outline: 2px solid var(--gold); outline-offset: 1px; }
.sw-count { background: var(--c); color: #fff; border-radius: 6px; min-width: 26px; padding: 1px 6px; font-weight: 800; font-size: 12.5px; text-align: center; }
.sw-stagebar { display: inline-flex; gap: 2px; vertical-align: middle; }
.sw-stagebar i { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--gold); }
.sw-stagebar i.on { background: var(--gold); }

/* your edge: wonder, what you make, your buildings */
.sw-mine { padding: 9px 12px; display: grid; gap: 6px; border: 2px solid var(--gold); }
.sw-mine-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; align-items: start; }
.sw-mine-side { display: grid; gap: 6px; }
@media (max-width: 900px) { .sw-mine-row { grid-template-columns: 1fr; } }
.sw-mine-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; align-items: baseline; }
.sw-mine-head strong { font: 600 18px var(--display); }
.sw-wonder { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-stage { display: grid; gap: 2px; align-content: start; padding: 5px 9px; border-radius: 12px; min-width: 100px;
  border: 1.5px dashed var(--line); background: rgba(0, 0, 0, .12); font-size: 14px; }
.sw-stage .what { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sw-stage .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sw-stage .to { color: var(--muted); }
.sw-stage.built { border: 1.5px solid var(--gold); background: var(--highlight); }
.sw-stage.next { border-color: var(--gold); }
.sw-stage.start { min-width: 0; }

/* the hand */
.sw-handrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 340px); gap: 10px; margin-top: 10px; align-items: start; }
@media (max-width: 900px) { .sw-handrow { grid-template-columns: 1fr; } }
.sw-hand-panel { padding: 9px 12px; }
.sw-hand-panel h3 { margin-bottom: 6px; }
.sw-hand { display: flex; flex-wrap: wrap; gap: 10px; }
.sw-card { width: 138px; min-height: 0; display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  border-radius: 12px; border: 2px solid var(--c); background: var(--card-face); color: var(--card-ink);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3); font: inherit; font-weight: 400; }
button.sw-card { cursor: pointer; transition: transform .12s, box-shadow .12s; }
button.sw-card:hover { transform: translateY(-3px); }
.sw-card.chosen { box-shadow: 0 0 0 3px var(--gold), 0 6px 16px rgba(0, 0, 0, .4); transform: translateY(-5px); }
.sw-card-head { background: var(--c); color: #fff; padding: 5px 8px; display: grid; gap: 2px; }
.sw-card-name { font: 600 14.5px/1.15 var(--display); }
.sw-card-cost { font-size: 15px; min-height: 18px; }
.sw-card-cost .free { font-size: 11px; opacity: .85; }
.sw-card-body { padding: 6px 8px; display: grid; gap: 3px; flex: 1; align-content: start; font-size: 14px; }
.sw-card-effect { font-size: 16px; font-weight: 700; }
.sw-chain { color: var(--card-muted); font-size: 11.5px; line-height: 1.2; }
.sw-badge { font-size: 12px; font-weight: 800; padding: 5px 8px; }
.s-free, .s-own { background: #cdeed4; color: #1d5a2a; }
.s-buy { background: #fbe7b5; color: #6b4a00; }
.s-no, .s-duplicate { background: #f6d2cb; color: #7a2316; }
.sw-actions { padding: 10px 12px; display: grid; gap: 8px; align-content: start; }
.sw-actions h4 { margin: 0; font: 600 15px var(--display); }
.sw-actions .group { display: grid; gap: 6px; }
.sw-actions button { text-align: left; }
.sw-actions p { margin: 0; font-size: 13px; }

/* the full log and a city in full: a panel over the page */
.sw-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .5); display: flex; justify-content: flex-end; }
.sw-overlay.center { justify-content: center; align-items: flex-start; padding: 40px 16px; overflow-y: auto; }
.sw-drawer { width: min(420px, 100%); height: 100%; overflow-y: auto; background: var(--felt-2); border-left: 1px solid var(--line); padding: 16px; }
.sw-dialog { width: min(760px, 100%); background: var(--felt-2); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 10px; }
.sw-close { float: right; }
.sw-cardlist { display: grid; gap: 4px; }
.sw-cardline { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 14px; }
.sw-drawer ol { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.sw-drawer li { padding: 3px 6px; border-radius: 8px; }
.sw-drawer li.round { margin-top: 10px; font-family: var(--display); font-weight: 600; color: var(--gold); }

/* ----- Poker: the same table layout as 7 Wonders, a green felt with the shared cards ----- */
.game-tile.poker { background: linear-gradient(160deg, #2e9d5b 0%, #17663f 45%, #0f2e25 100%); }
:root[data-look="classic"] .game-tile.poker { background: var(--panel); color: var(--text); border-color: var(--line); min-height: 160px; border-radius: 10px; }
#game.pk-game { max-width: 1400px; margin: 0 auto; }
main:has(#game.pk-game:not([hidden])) { max-width: 1400px; }
.pk-table { display: grid; gap: 10px; margin-top: 10px;
  grid-template-columns: minmax(190px, 1fr) minmax(320px, 1.6fr) minmax(190px, 1fr);
  grid-template-areas: "top top top" "left center right" "me me me"; }
.pk-edge-top { grid-area: top; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pk-edge-top > * { flex: 1 1 200px; max-width: 300px; }
.pk-edge-left { grid-area: left; display: flex; flex-direction: column-reverse; gap: 10px; justify-content: center; }
.pk-edge-right { grid-area: right; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.pk-felt { grid-area: center; border-radius: 120px / 70px; padding: 16px 28px; display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; text-align: center; min-height: 230px;
  background: radial-gradient(ellipse at 50% 40%, #2f8a55, #1a5537 70%, #123d29);
  border: 8px solid #6b4423; box-shadow: inset 0 0 30px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .4); color: #f3efe6; }
.pk-me-edge, .pk-mine { grid-area: me; }
@media (max-width: 1000px) {
  .pk-table { grid-template-columns: 1fr 1fr; grid-template-areas: "center center" "left right" "top top" "me me"; }
}
@media (max-width: 600px) { .pk-table { grid-template-columns: 1fr; grid-template-areas: "center" "left" "right" "top" "me"; } }
.pk-street { font: 600 15px var(--display); text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.pk-board { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pk-pot { font: 700 20px var(--display); color: #ffd36b; }
.pk-recent, .pk-prev { font-size: 13px; line-height: 1.35; display: grid; gap: 2px; background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 6px 12px; max-width: 520px; }
.pk-recent .label, .pk-prev .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.pk-win { font-weight: 800; color: #ffd36b; }
.pk-bust { color: #ff9b85; font-weight: 700; }
.pk-mini { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* cards: white with a four-colour suit */
.pk-card { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 34px; height: 46px;
  border-radius: 6px; background: #fdfcf8; color: #222; box-shadow: 0 2px 4px rgba(0, 0, 0, .35); line-height: 1; font-weight: 800; }
.pk-card .r { font-size: 15px; }
.pk-card .s { font-size: 15px; }
.pk-card.big { width: 52px; height: 72px; border-radius: 8px; }
.pk-card.big .r { font-size: 22px; } .pk-card.big .s { font-size: 24px; }
.pk-card.s0 { color: #1d7a3a; } .pk-card.s1 { color: #1f5fc0; } .pk-card.s2 { color: #c6262e; } .pk-card.s3 { color: #1b1b1b; }
.pk-card.small { width: 26px; height: 34px; border-radius: 4px; flex-direction: row; gap: 1px; }
.pk-card.small .r, .pk-card.small .s { font-size: 12px; }
.pk-card.back { background: repeating-linear-gradient(45deg, #b33a3a 0 5px, #8f2a2a 5px 10px); border: 2px solid #fdfcf8; }
.pk-card.empty { background: rgba(255, 255, 255, .08); border: 2px dashed rgba(255, 255, 255, .25); box-shadow: none; }
.pk-cards { display: inline-flex; gap: 4px; }

/* seats */
.pk-seat, .pk-mine { padding: 9px 12px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.pk-seat.folded { opacity: .5; }
.pk-seat-head { display: flex; justify-content: space-between; gap: 6px; align-items: center; flex-wrap: wrap; }
.pk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-badges { display: inline-flex; gap: 4px; }
.pk-badge { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 8px; background: var(--panel-strong); border: 1px solid var(--line); }
.pk-badge.dealer { background: #fdfcf8; color: #222; }
.pk-seat-row, .pk-mine-row { display: flex; gap: 12px; align-items: center; }
.pk-money { display: grid; gap: 2px; }
.pk-stack { font-weight: 800; font-size: 15px; }
.pk-bet { color: var(--gold); font-weight: 700; font-size: 13.5px; }
.pk-state { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.pk-state.allin { color: #ff8a5c; }
.pk-state.out { color: #ff9b85; }
.pk-mine { border: 2px solid var(--gold); }
.pk-mine.folded .pk-cards { opacity: .45; }
.pk-facts { display: grid; gap: 3px; }
.pk-last { margin-left: auto; }
.pk-mine .pk-prev { background: rgba(0, 0, 0, .2); }
@media (max-width: 900px) { .pk-mine-row { flex-wrap: wrap; } .pk-last { margin-left: 0; } }
.pk-hand-name { font: 600 18px var(--display); color: var(--gold); }

/* your move */
.pk-controls { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; padding: 12px 16px; }
.pk-buttons { display: flex; gap: 10px; }
.pk-buttons button { font: 600 18px var(--display); padding: 10px 22px; }
.pk-fold { background: rgba(224, 96, 63, .25); }
.pk-call, .pk-check { background: rgba(76, 175, 106, .3); }
.pk-raise { display: grid; gap: 6px; flex: 1 1 380px; }
.pk-raise-label { font-size: 13px; color: var(--muted); }
.pk-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.pk-quick button { padding: 4px 12px; font-size: 13px; }
.pk-raise-line { display: flex; gap: 10px; align-items: center; }
.pk-raise-line input[type="range"] { flex: 1; accent-color: var(--gold); min-width: 120px; }
.pk-number { width: 100px; font: inherit; color: var(--text); background: var(--panel-strong); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; }
.pk-go { font: 600 17px var(--display); padding: 9px 20px; white-space: nowrap; }

/* ----- Qwixx: the score sheet as on paper, real dice ----- */
.game-tile.qwixx { background: linear-gradient(160deg, #e2483d 0%, #e9b630 35%, #3a9d4f 68%, #2f6fc0 100%); }
:root[data-look="classic"] .game-tile.qwixx { background: var(--panel); color: var(--text); border-color: var(--line); min-height: 160px; border-radius: 10px; }
#game.qx-game { max-width: 1400px; margin: 0 auto; }
main:has(#game.qx-game:not([hidden])) { max-width: 1400px; }
.qx-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 12px; margin-top: 10px; align-items: start; }
@media (max-width: 1000px) { .qx-layout { grid-template-columns: 1fr; } }
.qx-main { display: grid; gap: 12px; }
.qx-red { --q: #d8403a; } .qx-yellow { --q: #e7b52c; } .qx-green { --q: #3a9a50; } .qx-blue { --q: #2f6dbe; }

/* dice with pips */
.qx-dice-panel { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding: 12px 16px; }
.qx-dice { display: grid; gap: 10px; }
.qx-whites, .qx-colours { display: flex; gap: 10px; align-items: center; }
.qx-die { width: 48px; height: 48px; border-radius: 10px; display: grid; grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr); padding: 7px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), 0 3px 6px rgba(0, 0, 0, .35); }
.qx-die i { width: 8px; height: 8px; border-radius: 50%; place-self: center; }
.qx-die i.on { background: #fff; }
.qx-die.white { background: #fbfaf6; } .qx-die.white i.on { background: #222; }
.qx-die.red { background: #d8403a; } .qx-die.yellow { background: #e7b52c; } .qx-die.green { background: #3a9a50; } .qx-die.blue { background: #2f6dbe; }
.qx-die.gone { display: grid; place-items: center; opacity: .35; font-size: 20px; grid-template-columns: 1fr; grid-template-rows: 1fr; }
.qx-plus { font: 600 22px var(--display); color: var(--muted); }
.qx-sum { font: 700 30px var(--display); color: var(--gold); }
.qx-help { flex: 1 1 280px; display: grid; gap: 8px; justify-items: start; }
.qx-help p { margin: 0; }
.qx-warn { color: #ffb38a; font-weight: 700; }
button.qx-danger { background: rgba(224, 96, 63, .35); }

/* the score sheet */
.qx-sheet-panel h3 { margin-bottom: 8px; }
.qx-sheet { display: grid; gap: 4px; }
.qx-row { display: flex; gap: 3px; align-items: center; padding: 4px; border-radius: 10px; background: var(--q, #888); }
.qx-row.red { --q: #d8403a; } .qx-row.yellow { --q: #e7b52c; } .qx-row.green { --q: #3a9a50; } .qx-row.blue { --q: #2f6dbe; }
.qx-row.closed { filter: saturate(.35) brightness(.8); }
.qx-box { position: relative; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center;
  background: #fbfaf6; color: var(--q); font: 800 13px "Nunito", sans-serif; padding: 0; border: 0; flex: none; }
.qx-sheet.big .qx-box { width: 44px; height: 44px; font-size: 19px; border-radius: 8px; }
.qx-box .x { position: absolute; inset: 0; display: grid; place-items: center; color: #1b1b1b; font-size: 1.5em; }
.qx-box.crossed .n { opacity: .35; }
.qx-box.skipped { background: rgba(255, 255, 255, .35); }
.qx-box.skipped .n { opacity: .45; }
.qx-box.lock { background: rgba(255, 255, 255, .55); font-size: .9em; }
.qx-box.lock.crossed { background: #fbfaf6; box-shadow: 0 0 0 2px #1b1b1b inset; }
button.qx-box.option { cursor: pointer; background: #ffe27a; color: #1b1b1b; box-shadow: 0 0 0 3px #1b1b1b, 0 0 0 6px var(--gold); animation: qx-glow 1.2s ease-in-out infinite alternate; }
button.qx-box.option:hover { transform: scale(1.08); }
@keyframes qx-glow { from { box-shadow: 0 0 0 3px #1b1b1b, 0 0 0 5px var(--gold); } to { box-shadow: 0 0 0 3px #1b1b1b, 0 0 8px 7px var(--gold); } }
@media (prefers-reduced-motion: reduce) { button.qx-box.option { animation: none; } }
.qx-box.new { box-shadow: 0 0 0 3px var(--gold); }
.qx-rowscore { margin-left: auto; padding: 0 6px; color: #fff; font-weight: 800; font-size: 12px; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.qx-sheet.big .qx-rowscore { font-size: 15px; }
.qx-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.qx-pens { display: flex; gap: 4px; align-items: center; }
.qx-pens .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-right: 4px; }
.qx-pen { width: 30px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  border: 1.5px solid var(--line); color: var(--muted); }
.qx-pen.on { background: rgba(224, 96, 63, .4); color: #fff; border-color: transparent; }
.qx-total { font: 700 18px var(--display); color: var(--gold); }
.qx-others { display: grid; gap: 10px; }
.qx-other { padding: 10px 12px; display: grid; gap: 6px; }
.qx-other.active { border: 2px solid var(--gold); }
.qx-other-head { display: flex; gap: 10px; align-items: baseline; }
.qx-other-head strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qx-rolling { font-size: 12px; color: var(--gold); font-weight: 800; }
.qx-other .qx-box { width: 20px; height: 20px; font-size: 10.5px; border-radius: 4px; }
@media (max-width: 700px) {
  .qx-sheet.big .qx-box { width: 24px; height: 30px; font-size: 13px; border-radius: 5px; }
  .qx-sheet.big .qx-rowscore { font-size: 12px; }
  .qx-row { gap: 2px; padding: 3px; }
  .qx-die { width: 40px; height: 40px; padding: 6px; }
}

/* ----- table view (shared): seats on the edges of a table, the game's middle on the felt ----- */
.view-switch { display: flex; padding: 3px; border-radius: 12px; background: var(--panel-strong); border: 1px solid var(--line); }
.view-switch button { border: 0; background: transparent; padding: 4px 12px; border-radius: 9px; font-size: 13px; color: var(--muted); box-shadow: none; }
.view-switch button[aria-pressed="true"] { background: var(--gold); color: var(--accent-text); }
.tt-table { display: grid; gap: 10px; margin-top: 12px;
  grid-template-columns: minmax(200px, 1fr) minmax(360px, 1.6fr) minmax(200px, 1fr);
  grid-template-areas: "top top top" "left center right" "me me me"; }
.tt-top { grid-area: top; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tt-top > * { flex: 1 1 220px; max-width: 420px; margin: 0 !important; }
.tt-left { grid-area: left; display: flex; flex-direction: column-reverse; gap: 10px; justify-content: center; }
.tt-right { grid-area: right; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.tt-left > *, .tt-right > * { margin: 0 !important; min-width: 0; }
.tt-felt { grid-area: center; border-radius: 26px; padding: 12px; display: grid; gap: 10px; align-content: center; min-width: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .1), rgba(0, 0, 0, .22));
  border: 3px solid rgba(201, 146, 26, .55); box-shadow: inset 0 0 30px rgba(0, 0, 0, .35); }
.tt-felt > .panel { background: transparent; border: 0; box-shadow: none; backdrop-filter: none; margin: 0 !important; }
.tt-felt.sea { background: radial-gradient(ellipse at 50% 40%, rgba(111, 195, 223, .25), rgba(13, 40, 70, .45)); border-color: rgba(111, 195, 223, .55); }
.tt-me { grid-area: me; display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.tt-me > * { flex: 1 1 420px; min-width: 0; }
.tt-me > * { margin: 0 !important; }
@media (max-width: 1000px) {
  .tt-table { grid-template-columns: 1fr 1fr; grid-template-areas: "center center" "left right" "top top" "me me"; }
}
@media (max-width: 600px) {
  .tt-table { grid-template-columns: 1fr; grid-template-areas: "center" "left" "right" "top" "me"; }
}
.status .view-switch { margin-left: auto; }
.tt-felt .ss-piles { flex-wrap: nowrap; justify-content: center; }
.tt-left .f7-stamp, .tt-right .f7-stamp { transform: rotate(-12deg) scale(.7); right: 4px; }
.tt-felt .zone { margin: 0; background: transparent; border: 0; box-shadow: none; padding: 4px; }
.tt-table .player .rows { gap: 8px; }
/* table view: the table gets the full width, "What happened" goes below it */
#game.tt-active > .table { grid-template-columns: minmax(0, 1fr); }
#game.tt-active .log { position: static; max-height: 300px; }
main:has(#game.tt-active:not([hidden])) { max-width: 1500px; }

/* start page: games to continue */
.continue { margin: 0 0 22px; }
.continue h2 { font-size: 20px; }
.continue-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.continue-item { display: grid; gap: 2px; padding: 10px 14px; border-radius: 14px; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--gold); transition: transform .12s; }
.continue-item:hover { transform: translateY(-2px); }
.continue-item span { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.continue-item small { color: var(--muted); font-size: 12px; }
.continue-head { display: flex; align-items: baseline; gap: 12px; }
.continue-head button.link { margin-left: auto; background: transparent; border: 0; box-shadow: none; padding: 0;
  color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; }
.continue-card { position: relative; }
.continue-card .continue-item { height: 100%; padding-right: 40px; }
.continue-delete { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; padding: 0; border-radius: 50%;
  font-size: 18px; line-height: 1; color: var(--muted); background: transparent; border: 1px solid transparent; box-shadow: none; }
.continue-delete:hover, .continue-delete:focus-visible { color: var(--text); background: rgba(224, 96, 63, .3); border-color: var(--red); }

/* ----- Qwinto: the staggered score sheet (dice and panels shared with Qwixx) ----- */
.game-tile.qwinto { background: linear-gradient(160deg, #f08a2c 0%, #e8c22e 45%, #6c3fa0 100%); }
:root[data-look="classic"] .game-tile.qwinto { background: var(--panel); color: var(--text); border-color: var(--line); min-height: 160px; border-radius: 10px; }
.qx-die.orange { background: #ef7d22; } .qx-die.purple { background: #6c3fa0; }
.qx-die.gone, .qx-die.qn-pick:not(.on) { opacity: .3; }
.qn-diebtn { padding: 0; border: 0; background: none; box-shadow: none; border-radius: 12px; }
.qn-diebtn.on { outline: 3px solid var(--gold); outline-offset: 3px; }
.qn-buttons { display: flex; gap: 10px; }
.qn-row.orange { background: #ef7d22; } .qn-row.yellow { background: #e8c22e; } .qn-row.purple { background: #6c3fa0; }
.qn-cell, .qn-gap { width: 26px; height: 26px; flex: none; }
.qn-sheet.big .qn-cell, .qn-sheet.big .qn-gap { width: 46px; height: 46px; }
.qn-cell { display: grid; place-items: center; border-radius: 50%; background: #fbf7ef; color: #1b1b1b; padding: 0; border: 0;
  font: 800 12px "Nunito", sans-serif; }
.qn-sheet.big .qn-cell { font-size: 19px; }
.qn-cell.pent { border-radius: 4px; clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
button.qn-cell.option { cursor: pointer; background: #ffe27a; color: rgba(27, 27, 27, .45);
  box-shadow: 0 0 0 3px #1b1b1b inset; animation: qn-pulse 1.2s ease-in-out infinite alternate; }
button.qn-cell.option:hover { transform: scale(1.08); }
button.qn-cell.option:hover::after, button.qn-cell.option:focus-visible::after { content: attr(data-value); color: #1b1b1b; }
@keyframes qn-pulse { from { filter: brightness(1); } to { filter: brightness(1.18); } }
@media (prefers-reduced-motion: reduce) { button.qn-cell.option { animation: none; } }
.qn-cell.new { box-shadow: 0 0 0 3px var(--gold); }
.qn-gap { border-radius: 6px; background: rgba(0, 0, 0, .28); }
/* rows offset like stairs: one column (a field + the gap between fields) further right each */
.qn-sheet { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.qn-row { display: flex; gap: 4px; padding: 4px; border-radius: 12px; }
.qn-row.yellow { margin-left: 30px; } .qn-row.orange { margin-left: 60px; }
.qn-sheet.big .qn-row.yellow { margin-left: 50px; } .qn-sheet.big .qn-row.orange { margin-left: 100px; }
.qn-row.orange { order: 1; } .qn-row.yellow { order: 2; } .qn-row.purple { order: 3; }
.qn-bottom { order: 4; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 4px; width: 100%; }
.qn-parts { color: var(--muted); font-size: 13px; }
.qn-bottom .qx-total { margin-left: auto; }
@media (max-width: 700px) {
  .qn-sheet.big .qn-cell, .qn-sheet.big .qn-gap { width: 28px; height: 28px; }
  .qn-sheet.big .qn-cell { font-size: 13px; }
  .qn-sheet.big .qn-row.yellow { margin-left: 32px; } .qn-sheet.big .qn-row.orange { margin-left: 64px; }
}

/* ----- play speed: replaying the bots' moves (common.js replaySteps / momentNotes) ----- */
.speed-switch { margin-left: auto; }
.status .speed-switch + .view-switch { margin-left: 8px; }
.replay-banner { position: fixed; top: 6px; left: 50%; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 20px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(20, 28, 30, .92); color: var(--text); box-shadow: var(--shadow); font-size: 16px; }
.replay-banner.big { font-family: var(--display); font-size: 22px; font-weight: 700; padding: 14px 14px 14px 24px;
  border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.replay-banner.bad { border-color: var(--red); box-shadow: 0 0 0 2px var(--red), 0 0 30px rgba(224, 96, 63, .45), var(--shadow); }
.replay-text { animation: pop-in .25s ease-out; }
.replay-skip { flex: none; font-size: 13px; padding: 4px 10px; }
#game [data-player].acting { box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(242, 181, 68, .5), var(--shadow); }
#game [data-player].targeted { box-shadow: 0 0 0 3px var(--red), 0 0 30px rgba(224, 96, 63, .55), var(--shadow);
  animation: shake .4s ease-in-out; }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.moment-notes { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; flex-direction: column;
  gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.moment-note { padding: 12px 16px; border-radius: 12px; cursor: pointer; font-weight: 700;
  background: rgba(20, 28, 30, .94); color: var(--text); border: 1px solid var(--gold); box-shadow: var(--shadow);
  animation: pop-in .3s ease-out; }
.moment-note.bad { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), var(--shadow); }
:root[data-look="classic"] .replay-banner,
:root[data-look="classic"] .moment-note { background: var(--panel); }
@media (prefers-reduced-motion: reduce) {
  .replay-text, .moment-note, #game [data-player].targeted { animation: none; }
}

/* ----- Skat: you at the bottom, the two others left and right, the trick in the middle ----- */
.game-tile.skat { background: linear-gradient(160deg, #3f7d4f 0%, #1f4e79 50%, #2b1f3f 100%); }
:root[data-look="classic"] .game-tile.skat { background: var(--panel); color: var(--text); border-color: var(--line); min-height: 160px; border-radius: 10px; }
#game.sk-game { max-width: 1300px; margin: 0 auto; }
main:has(#game.sk-game:not([hidden])) { max-width: 1300px; }
.sk-table { display: grid; gap: 10px; margin-top: 10px;
  grid-template-columns: minmax(200px, 1fr) minmax(340px, 1.7fr) minmax(200px, 1fr);
  grid-template-areas: "left center right" "me me me"; }
.sk-left { grid-area: left; } .sk-right { grid-area: right; } .sk-mine { grid-area: me; }
@media (max-width: 900px) { .sk-table { grid-template-columns: 1fr 1fr; grid-template-areas: "center center" "left right" "me me"; } }
@media (max-width: 560px) { .sk-table { grid-template-columns: 1fr; grid-template-areas: "center" "left" "right" "me"; } }
.sk-seat, .sk-mine { display: grid; gap: 8px; align-content: start; transition: box-shadow .2s; }
.sk-seat.declarer, .sk-mine.declarer { border-color: var(--gold); }
.sk-mine.turn { box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(242, 181, 68, .3), var(--shadow); }
.sk-seat-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.sk-total { margin-left: auto; font: 700 16px var(--display); color: var(--gold); }
.sk-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sk-chip { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--panel-strong); border: 1px solid var(--line); color: var(--muted); }
.sk-chip.declarer { color: var(--accent-text); background: var(--gold); border-color: transparent; font-weight: 700; }
.sk-backs { display: flex; flex-wrap: wrap; gap: 2px; min-height: 34px; }
.sk-seat-info { display: flex; gap: 10px; align-items: center; font-size: 13px; min-height: 24px; }
.sk-bubble { font: 700 15px var(--display); padding: 2px 12px; border-radius: 14px 14px 14px 4px; background: #fdfcf8; color: #222; }
.sk-bubble.pass { background: var(--panel-strong); color: var(--muted); }
.sk-felt { grid-area: center; border-radius: 120px / 80px; padding: 16px 24px; display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; text-align: center; min-height: 260px;
  background: radial-gradient(ellipse at 50% 40%, #2f8a55, #1a5537 70%, #123d29);
  border: 8px solid #6b4423; box-shadow: inset 0 0 30px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .4); color: #f3efe6; }
.sk-felt .muted { color: rgba(243, 239, 230, .7); }
.sk-game-name { font: 700 20px var(--display); color: #ffd36b; }
.sk-bock { font-size: 13px; font-weight: 700; color: #ffb38a; }
.sk-trick { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: 60px 60px; gap: 2px 14px;
  grid-template-areas: "l . r" ". m ."; justify-content: center; }
.sk-spot { display: flex; justify-content: center; align-items: center; }
.sk-spot.l { grid-area: l; } .sk-spot.r { grid-area: r; } .sk-spot.m { grid-area: m; }
.sk-note { font-weight: 700; color: #ffd36b; }
.sk-last, .sk-mini { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.sk-skat { display: flex; gap: 6px; }
.sk-result { font-size: 13.5px; line-height: 1.35; background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 6px 12px; max-width: 460px; display: grid; gap: 3px; }
.sk-result .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.sk-hand { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sk-actions:empty { display: none; }
.sk-actions button.sk-pass { background: var(--panel-strong); }
.sk-declare { display: grid; gap: 8px; width: 100%; }
.sk-levels { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sk-levels button[aria-pressed="true"] { background: var(--gold); color: var(--accent-text); }
.sk-games { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-game-btn { display: grid; gap: 2px; text-align: left; min-width: 110px; }
.sk-game-btn small { color: var(--muted); font-size: 12px; }
.sk-game-btn.low { opacity: .7; border-color: var(--red); }
.sk-game-btn.low small { color: var(--red); }

/* Skat cards: white, rank on top, suit below. French: four colours (♣ black, ♠ green, ♥ red, ♦ yellow) */
.sk-card { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 34px; height: 48px;
  border-radius: 6px; background: #fdfcf8; color: #222; box-shadow: 0 2px 4px rgba(0, 0, 0, .35); line-height: 1.05;
  font-weight: 800; user-select: none; }
.sk-card .r { font-size: 15px; } .sk-card .s { font-size: 15px; }
.sk-card.big { width: 56px; height: 80px; border-radius: 8px; }
.sk-card.big .r { font-size: 22px; } .sk-card.big .s { font-size: 26px; }
.sk-card.small { width: 24px; height: 34px; border-radius: 4px; }
.sk-card.small .r, .sk-card.small .s { font-size: 11px; }
.sk-card.french.s0 { color: #1b1b1b; } .sk-card.french.s1 { color: #1d7a3a; }
.sk-card.french.s2 { color: #c6262e; } .sk-card.french.s3 { color: #c98a00; }
.sk-card.german.s0 { color: #7a4a12; } .sk-card.german.s1 { color: #1d7a3a; }
.sk-card.german.s2 { color: #c6262e; } .sk-card.german.s3 { color: #c98a00; }
.sk-card.back { background: repeating-linear-gradient(45deg, #2d5aa0 0 5px, #1f4277 5px 10px); border: 2px solid #fdfcf8; }
.sk-card.can { cursor: pointer; transition: transform .12s; }
.sk-card.can:hover, .sk-card.can:focus-visible { transform: translateY(-8px); outline: none; box-shadow: 0 0 0 3px var(--gold), 0 6px 12px rgba(0, 0, 0, .4); }
.sk-card.cannot { opacity: .45; filter: grayscale(.5); }
.sk-card.picked { transform: translateY(-12px); box-shadow: 0 0 0 3px var(--red), 0 6px 12px rgba(0, 0, 0, .4); }
.sk-card.wins { box-shadow: 0 0 0 3px #ffd36b, 0 0 18px rgba(255, 211, 107, .6); }
.sk-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.sk-list th, .sk-list td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.sk-list td.num { text-align: right; white-space: nowrap; }
.sk-list td.game { color: var(--muted); }
.sk-list tr.bock td { background: rgba(255, 179, 138, .08); }
.sk-list small.plus { color: var(--green); } .sk-list small.minus { color: var(--red); }
@media (prefers-reduced-motion: reduce) { .sk-card.can { transition: none; } }

/* ----- the statistics page ----- */
.st-recent, .st-game { margin-bottom: 18px; overflow-x: auto; }
.st-recent h2, .st-game h2 { margin: 0 0 8px; }
.st-game h2 a { color: var(--gold); text-decoration: none; }
.st-count { font-size: 15px; font-weight: 400; }
.st-sub { margin: 14px 0 4px; font-family: var(--display); font-weight: 600; color: var(--gold); font-size: 15px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.st-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.st-human { font-weight: 800; color: var(--gold); }
.st-bar { display: inline-block; width: 110px; height: 10px; border-radius: 5px; background: var(--red); overflow: hidden; vertical-align: middle; }
.st-bar:empty { background: var(--line); }
.st-win { display: block; height: 100%; background: var(--green); }
