/* Nunito (SIL OFL 1.1, see vendor/nunito/OFL.txt) */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 900; font-display: swap; src: url(vendor/nunito/nunito-latin.woff2) format('woff2'); }
:root {
  --cream: rgba(255, 249, 236, 0.92);
  --wood: #c99b6b;
  --wood-dark: #9b6d43;
  --ink: #5b3a1e;
  --ink-soft: #8a6646;
  --accent: #e35b4f;
  --accent-dark: #b9443a;
  --gold: #f2b53a;
  --shadow: 0 3px 0 rgba(120, 80, 40, 0.22), 0 10px 24px rgba(60, 40, 20, 0.16);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #2f8fb8; color: var(--ink); -webkit-tap-highlight-color: transparent;
  font-family: 'Nunito', system-ui, -apple-system, 'PingFang TC', sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus { outline: none; }
button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.card {
  background: var(--cream);
  border: 2px solid var(--wood);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
kbd {
  display: inline-grid; place-items: center;
  min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 6px; border: 1.5px solid var(--wood);
  background: #fffdf6; box-shadow: 0 2px 0 var(--wood);
  font: 800 12px/1 'Nunito', sans-serif; color: var(--ink);
}

/* ---------- HUD ---------- */
#hud {
  position: fixed; top: max(12px, env(safe-area-inset-top)); left: 16px; right: 16px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 10px;
  pointer-events: none; z-index: 5;
  padding-right: 164px; /* room for the corner buttons */
}
#hud > .card { padding: 6px 14px; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.hud-left { justify-self: start; }
.hud-mid { justify-self: center; font-size: 20px; }
.hud-mid small { font-size: 13px; color: var(--ink-soft); margin-left: 3px; font-weight: 800; }
.hud-right { justify-self: end; }
.stat { display: flex; align-items: center; gap: 6px; font-size: 22px; }
.stat svg { width: 28px; height: 28px; }
.chip {
  background: var(--gold); color: #fff; font-weight: 900; font-size: 15px;
  padding: 2px 9px; border-radius: 999px; box-shadow: 0 2px 0 #c98d1c;
}
.chip.pop { animation: pop 0.35s ease-out; }
@keyframes pop { 40% { transform: scale(1.35); } }

.corner {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: 16px;
  /* (above the title, pause and end cards, z-index 10, so sound can be switched there too; under the leaderboard, 20) */
  display: flex; gap: 8px; z-index: 11;
}
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--cream); border: 2px solid var(--wood); border-radius: 12px;
  box-shadow: 0 3px 0 rgba(120, 80, 40, 0.25); color: var(--ink); padding: 0;
}
.icon-btn:hover { background: #fffdf6; }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(120, 80, 40, 0.25); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .off { display: none; }
.icon-btn[aria-pressed="false"] { color: var(--ink-soft); opacity: 0.8; }
.icon-btn[aria-pressed="false"] .off { display: inline; }

.hint {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%); padding: 10px 18px; font-size: 16px; font-weight: 800;
  pointer-events: none; text-align: center; max-width: calc(100vw - 32px);
  animation: hintIn 0.35s ease-out;
}
@keyframes hintIn { from { opacity: 0; transform: translate(-50%, 10px); } }

#popups { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.popup {
  position: absolute; left: 0; top: 0; font-weight: 900; font-size: 22px; white-space: nowrap;
  color: #fff; text-shadow: 0 2px 0 rgba(90, 55, 20, 0.45), 0 0 10px rgba(255, 200, 80, 0.6);
}
.popup.gold { color: #fff3c4; }
.popup.grey { color: #eef0f5; font-size: 16px; text-shadow: 0 2px 0 rgba(40, 40, 60, 0.4); }
.popup.green { color: #e7ffd0; text-shadow: 0 2px 0 rgba(40, 80, 20, 0.5), 0 0 10px rgba(160, 255, 120, 0.6); }

/* ---------- screens ---------- */
.overlay {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(255, 240, 210, 0.15), rgba(60, 40, 20, 0.28));
  z-index: 10; animation: fade 0.3s ease-out; overscroll-behavior: contain;
}
@keyframes fade { from { opacity: 0; } }
.panel {
  width: min(460px, 100%); padding: 26px 28px 22px; text-align: center;
  max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain;
  animation: rise 0.35s cubic-bezier(.2, 1.3, .5, 1);
}
.panel.small { width: min(340px, 100%); }
@keyframes rise { from { transform: translateY(16px) scale(0.97); } }
h1 { margin: 0 0 4px; font-size: 44px; font-weight: 900; letter-spacing: 0.5px; color: var(--ink); }
h1::after { content: ''; display: block; width: 70px; height: 5px; margin: 6px auto 0; border-radius: 4px; background: repeating-linear-gradient(90deg, #e8892c 0 10px, var(--gold) 10px 20px); }
h2 { margin: 0 0 12px; font-size: 26px; font-weight: 900; }
.tag-line { margin: 8px 0 16px; color: var(--ink-soft); font-weight: 700; font-size: 15px; }
.how { list-style: none; margin: 0 0 20px; padding: 0; text-align: left; display: grid; gap: 9px; font-weight: 700; font-size: 14.5px; }
.how li { display: flex; align-items: center; gap: 10px; }
.keys { display: inline-flex; gap: 4px; flex: none; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin: 0 4px; }
.dot.gold { background: #ffd86a; box-shadow: 0 0 10px #ffc94a; }
.dot.warm { background: #ffe7a6; box-shadow: 0 0 10px #ffdf8a; border: 1.5px solid #e8c468; }
.dot.red { background: var(--accent); }
.big-btn {
  min-height: 48px; padding: 10px 34px; border: 0; border-radius: 14px;
  background: var(--accent); color: #fff; font-size: 20px; font-weight: 900;
  box-shadow: 0 4px 0 var(--accent-dark);
}
.big-btn:hover { filter: brightness(1.05); }
.big-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-dark); }
.big-btn.ghost { background: #fffdf6; color: var(--ink); border: 2px solid var(--wood); box-shadow: 0 4px 0 var(--wood); }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.best { margin: 14px 0 0; color: var(--ink-soft); font-weight: 800; font-size: 14px; min-height: 1em; }
.sub { margin: 14px 0 0; color: var(--ink-soft); font-weight: 700; font-size: 13px; }
.newbest { margin: -4px 0 10px; color: var(--accent); font-weight: 900; font-size: 18px; animation: pop 0.6s ease-out; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.stats div { background: #fffdf6; border: 1.5px solid #ecdcc3; border-radius: 12px; padding: 8px; }
.stats dt { font-size: 12px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.6px; }
.stats dd { margin: 2px 0 0; font-size: 24px; font-weight: 900; }
.score { margin: 4px 0 0; font-size: 18px; font-weight: 800; }
.score b { font-size: 30px; color: var(--accent); margin-left: 6px; }

@media (max-width: 640px) {
  #hud { left: 10px; right: 10px; padding-right: 0; top: calc(max(12px, env(safe-area-inset-top)) + 52px); gap: 6px; }
  #hud > .card { padding: 4px 10px; min-height: 40px; }
  .corner { right: 10px; }
  .hud-mid { font-size: 17px; }
  .stat { font-size: 19px; }
  h1 { font-size: 36px; }
  .panel { padding: 20px 18px 18px; }
  .how { font-size: 13.5px; }
}

/* ---------- online leaderboard ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.row-btns .big-btn { padding-left: 24px; padding-right: 24px; }
.post { margin: 12px 0 0; padding: 12px 12px 10px; border-radius: 12px; background: rgba(255, 253, 246, 0.8); border: 1.5px dashed var(--wood); }
.post-rank { margin: 0 0 8px; font-weight: 800; font-size: 15px; }
.post-form { display: flex; gap: 8px; justify-content: center; }
.post-form[hidden] { display: none; }
.post-form input {
  flex: 1; min-width: 0; max-width: 180px; min-height: 44px; padding: 6px 12px; border-radius: 12px;
  border: 2px solid var(--wood); background: #fffdf6; color: var(--ink); font-family: inherit; font-weight: 800; font-size: 16px; line-height: 1.2; text-align: center;
}
.post-form input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.mid-btn {
  min-height: 44px; padding: 6px 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: #fff; font-family: inherit; font-weight: 900; font-size: 16px; line-height: 1; box-shadow: 0 3px 0 var(--accent-dark);
}
.mid-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-dark); }
.mid-btn:disabled { opacity: 0.6; cursor: default; }
.post-msg { margin: 8px 0 0; min-height: 1.2em; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.post-msg:empty { display: none; }
.post-msg.bad { color: var(--accent-dark); }
.overlay.top { z-index: 20; background: rgba(60, 40, 20, 0.42); }
/* solid, not see-through like the other cards: the end card is right behind it */
.board-panel { display: flex; flex-direction: column; padding-bottom: 20px; background: #fff9ec; }
.board-panel .big-btn { align-self: center; }
.board-panel h2 { margin: 0 0 8px; }
.board-state { margin: 0; min-height: 1.4em; color: var(--ink-soft); font-weight: 700; font-size: 14.5px; }
.board-state:empty { display: none; }
.board-list { list-style: none; margin: 6px 0 0; padding: 0; text-align: left; max-height: min(46dvh, 380px); overflow: auto; overscroll-behavior: contain; border-radius: 10px; }
.board-list:empty { display: none; }
.board-list li { display: grid; grid-template-columns: 36px 30px 1fr auto; gap: 8px; align-items: center; padding: 7px 12px; font-weight: 800; font-size: 15px; border-bottom: 1px dashed rgba(155, 109, 67, 0.35); }
.board-list li:last-child { border-bottom: 0; }
.board-list .rk { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.board-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list .sc { font-variant-numeric: tabular-nums; }
.board-list li.me { background: rgba(242, 181, 58, 0.28); border-radius: 8px; }
.board-me { margin: 8px 0 0; padding: 7px 12px; border-radius: 8px; background: rgba(242, 181, 58, 0.28); font-weight: 800; font-size: 14.5px; }
.board-account { margin: 14px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.board-account small { font-size: 12.5px; }
/* (a finger-sized target: the link is small text in a line) */
#board-account .plain-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; vertical-align: middle; margin: -12px 0; }
/* Google's sign-in button, light theme, as its branding guide asks */
.g-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 12px; border-radius: 22px;
  background: #fff; color: #1f1f1f; border: 1px solid #747775; text-decoration: none; font: 500 14px/20px Roboto, Arial, sans-serif;
}
.g-btn:hover { background: #f6f8fa; }
.g-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.g-btn svg { width: 18px; height: 18px; flex: none; }
.link-btn { min-height: 44px; padding: 2px 8px; border: 0; background: none; cursor: pointer; color: var(--accent-dark); font-family: inherit; font-weight: 800; font-size: 14px; line-height: 1; text-decoration: underline; }
.plain-link { color: var(--ink-soft); font-weight: 800; }
.plain-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.post-who { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.post-who[hidden] { display: none; }
.post-who .or { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 13px; }
.post-who .or::before, .post-who .or::after { content: ''; flex: 1; border-top: 1.5px dashed var(--wood); }
.av { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--wood); object-fit: cover; background: #fffdf6; flex: none; display: block; }
.av.dflt { display: grid; place-items: center; }
.av.dflt svg { width: 22px; height: 22px; }
.who { display: inline-flex; align-items: center; gap: 8px; }


/* ---------- Fish Snatch ---------- */
a, button, input { -webkit-tap-highlight-color: transparent; }
html, body { background: #2f8fb8; }
.panel.card { background: rgba(255, 249, 236, 0.97); }
.board-panel.card { background: #fff9ec; }
h1::after { background: repeating-linear-gradient(90deg, #ff8a3c 0 10px, #fdf8ee 10px 20px); box-shadow: 0 0 0 1px rgba(155, 109, 67, 0.35); }
.overlay { background: radial-gradient(ellipse at center, rgba(20, 60, 90, 0.08), rgba(10, 40, 70, 0.42)); }
.overlay.top { background: rgba(10, 40, 70, 0.55); }
/* the end card says all of it */
body[data-card="over"] #hud { visibility: hidden; }
.big-btn, .mid-btn, .icon-btn, .link-btn, .slide-btn { touch-action: manipulation; }
.col-btns { display: grid; gap: 10px; }
.tag { margin: 8px 0 16px; color: var(--ink-soft); font-weight: 700; font-size: 15px; }
.ends { margin: -4px 0 10px; font-weight: 800; font-size: 15px; color: var(--ink-soft); }
.ends:empty { display: none; }

/* a fish, as a sign */
.fi { fill: #ff8a3c; stroke: #a8480f; stroke-width: 1.7; stroke-linejoin: round; flex: none; }
.fi .eye { fill: #14171f; stroke: none; }

/* ---------- HUD: every penguin's nest (left), the match (after it), the sound buttons (right corner) ---------- */
#hud { display: flex; align-items: flex-start; gap: 10px; grid-template-columns: none; left: 16px; right: 180px; padding: 0; }
.chips { display: flex; gap: 8px; }
.chip-p { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 4px 10px 4px 9px; background: var(--cream); border: 2px solid var(--wood); border-radius: 14px;
  box-shadow: var(--shadow); font-weight: 900; font-size: 15px; line-height: 1; white-space: nowrap; }
/* (the player's own: a thick edge in its colour) */
.chip-p.me { border-color: var(--c); box-shadow: 0 0 0 2px var(--c), var(--shadow); }
.chip-p .hat { position: relative; width: 20px; height: 17px; margin-top: 5px; border-radius: 10px 10px 4px 4px; background: var(--c); box-shadow: inset 0 -5px 0 #fff3dc, 0 0 0 1.5px rgba(60, 40, 20, 0.45); flex: none; }
.chip-p .hat::after { content: ''; position: absolute; left: 50%; top: -6px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #fff3dc; box-shadow: 0 0 0 1.5px rgba(60, 40, 20, 0.45); }
.chip-p .nm { display: none; }
.chip-p .fishes { display: flex; gap: 3px; }
.chip-p .fi { width: 25px; height: 16px; fill: rgba(255, 253, 246, 0.6); stroke: #b39d80; stroke-dasharray: 3 2.4; }
.chip-p .fi .eye { display: none; }
.chip-p .fi.on { fill: #ff8a3c; stroke: #a8480f; stroke-dasharray: none; }
.chip-p .fi.on .eye { display: inline; }
.chip-p .fi.pop { animation: pop 0.45s ease-out; }
.chip-p.lead { background: #fff6d6; }
.info { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 5px 14px; font-size: 17px; font-weight: 900; line-height: 1; white-space: nowrap; }
.info > span { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.info svg { width: 22px; height: 22px; flex: none; }
.info .fi { width: 28px; height: 18px; }
.info .time b { min-width: 2.3em; }
.info .time.late { color: var(--accent-dark); }
.info .pile.none { color: var(--accent-dark); }
.info .pile.none .fi { fill: rgba(255, 253, 246, 0.6); stroke: var(--accent-dark); stroke-dasharray: 3 2.4; }
.info .pile.pop { animation: pop 0.45s ease-out; }
@keyframes popSmall { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.info .pts { display: none; }
@media (min-width: 1200px) { .chip-p .nm { display: inline; } }
@media (min-width: 1380px) { .info .pts { display: inline-flex; } }

/* words over the ice: a dark edge all round so they read on snow and on the sea alike */
#popups { z-index: 3; }
.popup { font-size: 22px; color: #fff3c4; letter-spacing: 0.01em; -webkit-text-stroke: 6px #2a1606; paint-order: stroke fill; text-shadow: 0 3px 0 #2a1606, 0 4px 8px rgba(0, 0, 0, 0.45); }
.popup.gold { color: #ffc93a; font-size: 25px; }
.popup.bad { color: #ffd0c8; -webkit-text-stroke-color: #5a1a12; text-shadow: 0 3px 0 #5a1a12, 0 4px 8px rgba(0, 0, 0, 0.45); }
.popup.c1 { color: #bfdcff; } .popup.c2 { color: #c9f2c4; } .popup.c3 { color: #e3cdfb; }

/* names over the penguins while a match is getting ready */
#marks { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.tagname { position: absolute; left: 0; top: 0; translate: -50% -100%; padding: 3px 10px 4px; border-radius: 11px; background: var(--c); color: #fff; border: 2px solid #fffdf6;
  font-weight: 900; font-size: 15px; line-height: 1.1; white-space: nowrap; box-shadow: 0 3px 0 rgba(40, 30, 20, 0.3); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.tagname::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; margin-left: -6px; background: var(--c); border: solid #fffdf6; border-width: 0 2px 2px 0; rotate: 45deg; }

/* messages: one band under the HUD (never over the ice): the banner for what just happened, short hints */
.msgs { position: fixed; left: 50%; top: calc(max(12px, env(safe-area-inset-top)) + 52px); bottom: auto; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; z-index: 4; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.banner { display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 7px 18px; border-radius: 16px; text-align: center; background: rgba(255, 249, 236, 0.96); border: 2px solid var(--wood); box-shadow: var(--shadow);
  animation: bannerIn 0.4s cubic-bezier(.2, 1.4, .5, 1); max-width: calc(100vw - 24px); line-height: 1.2; }
.banner b { font-size: 19px; font-weight: 900; }
.banner span { font-size: 15px; font-weight: 800; color: var(--ink-soft); }
.banner span:empty { display: none; }
.banner.win { border-color: var(--gold); background: #fff6d6; }
@keyframes bannerIn { from { opacity: 0; transform: scale(0.9); } }
.hint { position: static; transform: none; width: auto; max-width: calc(100vw - 24px); padding: 7px 16px; font-size: 15px; line-height: 1.25; animation: hintIn2 0.35s ease-out; }
@keyframes hintIn2 { from { opacity: 0; transform: translateY(-6px); } }

/* the wait before the next belly slide, for keys and the mouse: a small sign in the bottom left corner */
.slide-key { position: fixed; z-index: 4; left: 16px; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-weight: 800; font-size: 15px; pointer-events: none; }
body.touch .slide-key { display: none; }
.slide-key .gauge { position: relative; display: block; width: 64px; height: 12px; border-radius: 999px; background: #f3e7d2; border: 2px solid var(--wood); overflow: hidden; }
.slide-key .gauge i { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: 999px; background: linear-gradient(90deg, #f29a3a, #ffd36a); }
.slide-key.wait { color: var(--ink-soft); }
.slide-key.wait .gauge i { background: #c9b9a6; }

/* the belly-slide button (phones and tablets): bottom right, a ring round it that fills while it waits */
.slide-btn { display: none; position: fixed; z-index: 4; right: calc(max(12px, env(safe-area-inset-right)) + 18px); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 20px);
  width: 88px; height: 88px; border-radius: 50%; border: 0; padding: 0; background: var(--accent); color: #fff; box-shadow: 0 5px 0 var(--accent-dark), 0 8px 18px rgba(0, 0, 30, 0.3); }
body.touch .slide-btn:not([hidden]) { display: grid; place-items: center; }
.slide-btn .ring { position: absolute; inset: -7px; width: calc(100% + 14px); height: calc(100% + 14px); pointer-events: none; }
.ring-bg { fill: none; stroke: rgba(255, 253, 246, 0.92); stroke-width: 6; }
.ring-on { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; }
.slide-btn .ico { width: 52px; height: 35px; margin-top: -14px; pointer-events: none; }
.slide-word { position: absolute; left: 0; right: 0; bottom: 11px; font-weight: 900; font-size: 15px; line-height: 1; pointer-events: none; }
.slide-btn.wait { background: #a99a8e; box-shadow: 0 5px 0 #7d6f64, 0 8px 18px rgba(0, 0, 30, 0.3); }
.slide-btn.wait .ico { opacity: 0.6; }
.slide-btn.down { transform: translateY(3px); }

/* how-to-play lines on the title card */
.how li { align-items: flex-start; line-height: 1.35; }
.how .keys, .how .dot { margin-top: 1px; }
.how .keys { min-width: 150px; flex-wrap: wrap; }
.touch-only { display: none; }
body.touch .touch-only { display: inline-grid; }
body.touch .wide-only { display: none; }
.how .dot { width: 150px; height: 24px; margin: 0; border-radius: 0; display: flex; align-items: center; justify-content: flex-start; padding-left: 4px; }
.how .dot .fi { width: 34px; height: 22px; }
.dot.d-nest::before { content: ''; width: 34px; height: 20px; border-radius: 7px; background: #d9effb; border: 3px solid #e0483f; box-shadow: 0 2px 0 rgba(60, 40, 20, 0.25); }

@media (max-width: 640px) {
  /* a phone held upright: the match beside the sound buttons, the nests in a row under them, then the messages */
  #hud { left: 10px; right: 10px; top: max(12px, env(safe-area-inset-top)); display: block; height: 0; }
  .info { position: absolute; left: 0; top: 0; padding: 4px 9px 4px 8px; gap: 6px; font-size: 16px; max-width: calc(100vw - 20px - 158px); }
  .info svg { width: 17px; height: 17px; } .info .fi { width: 22px; height: 14px; }
  .info > span { gap: 3px; } .info .time b { min-width: 2.05em; }
  .info .pile.pop { animation-name: popSmall; }
  .chips { position: absolute; left: 0; right: 0; top: 52px; gap: 4px; }
  .chip-p { flex: 1 1 0; min-width: 0; justify-content: center; padding: 3px 2px; gap: 4px; border-radius: 12px; }
  .chip-p .hat { width: 16px; height: 14px; }
  .chip-p .hat::after { width: 8px; height: 8px; margin-left: -4px; top: -5px; }
  .chip-p .fishes { gap: 2px; }
  .chip-p .fi { width: clamp(18px, 6vw, 25px); height: auto; aspect-ratio: 28 / 18; }
  /* (four nests in the row from match 3 on: smaller fish, still one row) */
  .chips[data-n="4"] .chip-p .fi { width: clamp(14px, 4.5vw, 22px); }
  .msgs { top: calc(max(12px, env(safe-area-inset-top)) + 102px); max-width: calc(100vw - 16px); }
  .banner { padding: 5px 12px; gap: 2px 8px; max-width: calc(100vw - 16px); } .banner b { font-size: 17px; }
  .hint { padding: 6px 12px; max-width: calc(100vw - 16px); }
  h1 { font-size: 36px; }
  .how { font-size: 14px; }
  .how .keys { min-width: 0; width: 86px; }
  .how .dot { width: 86px; }
  .how kbd { padding: 0 4px; font-size: 11px; }
  .tag { margin-bottom: 12px; } .how { margin-bottom: 14px; gap: 7px; }
  .row-btns .big-btn { padding-left: 16px; padding-right: 16px; font-size: 18px; }
  .stats { gap: 6px; margin-bottom: 8px; } .stats div { padding: 5px 8px; } .stats dd { font-size: 21px; }
  .popup { font-size: 18px; } .popup.gold { font-size: 20px; }
}
/* short screens (a phone held sideways): the nests in a column on the left, the match under the sound buttons on the
   right, the messages between them at the top; the ice has the whole height in the middle */
@media (max-height: 480px) {
  #hud { left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); top: 8px; display: block; height: 0; }
  .corner { top: 8px; right: max(10px, env(safe-area-inset-right)); }
  .chips { position: absolute; left: 0; top: 0; flex-direction: column; gap: 4px; width: 138px; }
  .chip-p { flex: none; min-height: 31px; padding: 1px 8px; gap: 8px; border-radius: 11px; justify-content: flex-start; }
  .chip-p .hat { width: 17px; height: 15px; margin-top: 4px; }
  .chip-p .fi { width: 25px; height: 16px; }
  .info { position: absolute; right: 0; left: auto; top: 52px; max-width: none; flex-direction: column; align-items: flex-start; gap: 5px; padding: 6px 10px; font-size: 16px; }
  .msgs { top: 8px; left: 164px; right: 174px; transform: none; width: auto; max-width: none; grid-template-columns: minmax(0, 1fr); }
  .banner, .hint { max-width: 100%; }
  .banner { padding: 4px 12px; } .banner b { font-size: 17px; }
  .hint { padding: 5px 12px; }
  .slide-key { left: 10px; bottom: 8px; }
  .panel { padding: 14px 18px 12px; }
  h1 { font-size: 30px; } h2 { font-size: 22px; margin-bottom: 6px; }
  h1::after { display: none; }
  .tag { margin: 4px 0 8px; font-size: 15px; }
  .how { font-size: 14px; gap: 4px 14px; margin-bottom: 8px; grid-template-columns: 1fr 1fr; }
  .how .keys { min-width: 0; width: auto; } .how .dot { width: auto; padding-right: 2px; }
  .row-btns { margin-top: 8px; }
  .best { margin-top: 6px; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 6px; } .stats div { padding: 4px 6px; } .stats dd { font-size: 19px; } .stats dt { font-size: 10.5px; }
  #title .panel { width: min(680px, 100%); }
}
/* the end card on a short, wide screen (a phone held sideways): two columns, so nothing is below the fold */
@media (max-height: 480px) and (min-width: 600px) {
  .over-panel { width: min(760px, 100%); display: grid; grid-template-columns: 1fr 1.1fr; gap: 0 18px; align-items: center; padding-top: 10px; padding-bottom: 9px; }
  .over-panel h2 { margin-bottom: 0; font-size: 21px; } .over-panel .stats { gap: 4px 6px; margin-bottom: 2px; } .over-panel .stats div { padding: 1px 6px; }
  .over-panel > * { grid-column: 1; }
  .over-panel h2 { grid-row: 1; } .over-panel .ends { grid-row: 2; margin: 0 0 4px; } .over-panel .newbest { grid-row: 3; margin: 0 0 4px; }
  .over-panel .stats { grid-row: 4; grid-template-columns: 1fr 1fr; } .over-panel .stats dt { font-size: 10px; letter-spacing: 0; }
  .over-panel .score { grid-row: 5; margin: 4px 0 0; } .over-panel .best { grid-row: 6; }
  .over-panel .post { grid-column: 2; grid-row: 1 / 5; margin: 0; padding: 8px 10px 6px; align-self: start; }
  .over-panel .row-btns { grid-column: 2; grid-row: 5 / 7; flex-wrap: nowrap; margin-top: 8px; }
  .over-panel .row-btns .big-btn { padding-left: 14px; padding-right: 14px; font-size: 17px; }
}
/* a laptop-height window (1024 × 700): the end card a little tighter so it fits with the posting box and the link */
@media (max-height: 720px) and (min-width: 641px) { .over-panel { padding-top: 14px; padding-bottom: 12px; } .over-panel h2 { margin-bottom: 6px; } .over-panel .stats { margin-bottom: 8px; } }

/* the thumb stick (phones and tablets only, src/stick.js): faint in the bottom left corner while a run is on, until a finger
   goes down on the game view; then it sits under that finger and the knob follows it (never out of the ring). It takes no
   touches itself: the game view under it does */
.stick { display: none; position: fixed; z-index: 4; left: calc(max(12px, env(safe-area-inset-left)) + 12px); bottom: max(18px, env(safe-area-inset-bottom));
  width: 112px; height: 112px; border-radius: 50%; pointer-events: none; opacity: 0.6; transition: opacity 0.15s ease;
  border: 3px solid rgba(255, 253, 246, 0.9); background: radial-gradient(circle, rgba(255, 240, 210, 0.10), rgba(255, 240, 210, 0.22));
  box-shadow: 0 2px 10px rgba(0, 0, 20, 0.3); }
body.touch .stick:not([hidden]) { display: block; }
.stick.held { bottom: auto; translate: -50% -50%; opacity: 1; transition: none; }
.stick-knob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  background: #fffdf6; border: 2px solid var(--wood); box-shadow: var(--shadow); }
.stick.held .stick-knob { border-color: var(--accent); }
.stick-word { position: absolute; left: 50%; top: calc(100% + 4px); translate: -50% 0; white-space: nowrap; font-family: inherit; font-weight: 800; font-size: 12px; line-height: 1;
  color: #fffdf6; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.stick.held .stick-word, .stick.used .stick-word { display: none; }
@media (prefers-reduced-motion: reduce) { .guide, .way.on { animation: none; } }

/* ---------- the link to the other games (2026-11-27, the owner: no game led back to ossgolab.com) ----------
   Under the buttons of the title, pause and end cards: quiet, but a full-size target. Never on the game view. */
.more-games { display: flex; width: max-content; max-width: 100%; align-items: center; justify-content: center; gap: 5px; min-height: 44px; margin: 2px auto -8px; padding: 0 14px; border-radius: 14px;
  color: var(--ink-soft); font-weight: 800; font-size: 14.5px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.more-games b { color: var(--ink); font-weight: 900; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--wood); }
.more-games svg { width: 16px; height: 16px; flex: none; transition: transform 0.15s; }
.more-games:hover { background: rgba(155, 109, 67, 0.12); color: var(--ink); }
.more-games:hover svg { transform: translateX(3px); }
.more-games:active { background: rgba(155, 109, 67, 0.22); }
.more-games:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* on the title card it is in the row of buttons: under them, or beside them on a short screen (just "More games") */
.row-btns > .more-games { flex: 0 0 100%; margin: -6px 0 -10px; }
@media (max-height: 480px) {
  .more-games { min-height: 44px; margin: 0 auto -8px; font-size: 13.5px; }
  .row-btns > .more-games { flex: 0 1 auto; margin: 0; align-self: center; padding: 0 8px; }
  .row-btns > .more-games .mg-at { display: none; }
  .row-btns > .more-games > span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--wood); }
}
/* a small upright phone: the end card with the posting box already fills the screen (measured 2026-11-30: the link would
   make it scroll), so the link is left to the title and pause cards there */
@media (max-width: 640px) and (max-height: 700px) { #over .more-games { display: none; } }
/* a phone held sideways: the same (measured 2026-12-01: with the "can't reach the leaderboard" line the card would scroll) */
@media (max-height: 480px) { #over .more-games { display: none; } }
@media (prefers-reduced-motion: reduce) { .more-games svg { transition: none; } }

/* a short screen (a phone held sideways): the title, pause and end cards start under the sound buttons in the corner
   (2026-12-01 review: the end card covered them), their bottom + 8px */
@media (max-height: 480px) {
  .overlay:not(.top) { padding-top: calc(max(12px, env(safe-area-inset-top)) + 44px + 8px); padding-bottom: 8px; }
  .overlay:not(.top) .panel { max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - 44px - 16px); }
}
/* a phone held upright: the end card is tall enough to reach the top too, so there as well the cards start under the
   sound buttons (2026-12-01: at 375 × 667 they stood on the end card's heading), and the end card a little tighter */
@media (max-width: 640px) and (min-height: 481px) {
  .overlay:not(.top) { padding-top: calc(max(12px, env(safe-area-inset-top)) + 44px + 8px); padding-bottom: 10px; }
  .overlay:not(.top) .panel { max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - 44px - 18px); }
}
@media (max-width: 640px) and (min-height: 481px) and (max-height: 760px) {
  .over-panel { padding-top: 14px; padding-bottom: 12px; }
  .over-panel h2 { margin-bottom: 4px; font-size: 23px; }
  .over-panel .stats { margin-bottom: 6px; } .over-panel .stats div { padding: 3px 8px; } .over-panel .stats dd { font-size: 19px; }
  .over-panel .post { margin-top: 8px; padding: 8px 10px; } .over-panel .post-rank { margin-bottom: 6px; }
  .over-panel .row-btns { margin-top: 10px; }
}

/* Fish Snatch: the ring stays in its corner while a finger drives it (it never covers the ice), its word is big enough to read */
.stick { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 22px); }
.stick.held { left: calc(max(12px, env(safe-area-inset-left)) + 12px) !important; top: auto !important; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 22px); translate: none; }
.stick-word { font-size: 15px; font-weight: 900; top: calc(100% + 5px); }
.stick.held .stick-word, .stick.used .stick-word { display: block; }
@media (max-height: 480px) { .stick, .stick.held { bottom: calc(max(8px, env(safe-area-inset-bottom)) + 24px); } .slide-btn { bottom: calc(max(8px, env(safe-area-inset-bottom)) + 14px); } }

/* ---------- playing with friends (#net: src/netui.js) ---------- */
.net-panel { width: min(420px, 100%); background: #fff9ec; }
.net-panel h2 { margin: 0 0 12px; overflow-wrap: anywhere; }
.net-view { display: flex; flex-direction: column; gap: 10px; }
.net-view[hidden] { display: none; }
.net-lbl { text-align: left; font-weight: 800; font-size: 14px; color: var(--ink-soft); margin-bottom: -6px; }
.net-row { display: flex; gap: 8px; align-items: center; }
.net-row input {
  flex: 1; min-width: 0; min-height: 44px; padding: 6px 12px; border-radius: 12px; border: 2px solid var(--wood);
  background: #fffdf6; color: var(--ink); font-family: inherit; font-weight: 800; font-size: 16px; line-height: 1.2;
}
.net-row input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.net-row input.code { text-align: center; font-size: 22px; letter-spacing: 0.3em; text-indent: 0.3em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.net-row input.code::placeholder { color: #cdb99d; }
.net-row .mid-btn { flex: none; min-width: 84px; }
.mid-btn.ghost { background: #fffdf6; color: var(--ink); border: 2px solid var(--wood); box-shadow: 0 3px 0 var(--wood); }
.mid-btn.ghost:active { box-shadow: 0 1px 0 var(--wood); }
.net-msg { margin: 0; min-height: 1.3em; font-size: 14px; font-weight: 700; color: var(--ink-soft); overflow-wrap: anywhere; }
.net-msg:empty { display: none; }
.net-msg.bad { color: var(--accent-dark); }
.net-or { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; color: var(--ink-soft); font-weight: 800; font-size: 13.5px; }
.net-or::before, .net-or::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: rgba(155, 109, 67, 0.3); }
.net-view > .big-btn { align-self: stretch; }
/* the can't-reach card: its one sentence is what the card is for — even lines, no last word alone */
#net-down-msg { text-wrap: balance; }
#net-down-msg .nb { white-space: nowrap; font-weight: 900; color: var(--ink); }
.net-view .row-btns { margin-top: 4px; }
.net-code { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; }
.net-code span { font-size: 13.5px; font-weight: 800; color: var(--ink-soft); }
.net-code b { font-size: 44px; line-height: 1; letter-spacing: 0.18em; text-indent: 0.18em; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.net-row.share { padding: 4px 4px 4px 12px; border-radius: 14px; background: rgba(255, 253, 246, 0.9); border: 1.5px dashed var(--wood); }
.net-link { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); user-select: all; -webkit-user-select: all; }
.net-seats { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.net-seats li { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 4px 12px; border-radius: 12px; background: #fffdf6; border: 2px solid rgba(201, 155, 107, 0.55); font-weight: 800; font-size: 16px; }
.net-seats li.won { border-color: var(--gold); background: #fff6d6; box-shadow: 0 0 0 2px var(--gold); }
.net-seats .hat { position: relative; width: 20px; height: 17px; margin-top: 5px; border-radius: 10px 10px 4px 4px; background: var(--c); box-shadow: inset 0 -5px 0 #fff3dc, 0 0 0 1.5px rgba(60, 40, 20, 0.45); flex: none; }
.net-seats .hat::after { content: ''; position: absolute; left: 50%; top: -6px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #fff3dc; box-shadow: 0 0 0 1.5px rgba(60, 40, 20, 0.45); }
.net-seats .nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-seats .tg { flex: none; padding: 2px 7px 3px; border-radius: 8px; background: rgba(155, 109, 67, 0.16); color: var(--ink-soft); font-size: 12px; font-weight: 800; line-height: 1.2; }
.net-seats .tg.you { background: var(--c); color: #fff; }
.net-seats .fishes { display: flex; gap: 3px; margin-left: auto; flex: none; }
.net-seats .fi { width: 25px; height: 16px; fill: rgba(255, 253, 246, 0.6); stroke: #b39d80; stroke-width: 1.6; stroke-dasharray: 3 2.4; }
.net-seats .fi .eye { display: none; }
.net-seats .fi.on { fill: #ff8a3c; stroke: #a8480f; stroke-dasharray: none; }
.net-seats .fi.on .eye { display: inline; fill: #14171f; stroke: none; }
.popup.c0 { color: #ffd0c8; }
/* in a room the match has no run and no score: the HUD says which room instead */
body[data-net] .info .pts { display: none; }
@media (max-width: 640px) {
  .net-code b { font-size: 38px; }
  .net-seats li { padding: 4px 10px; gap: 7px; font-size: 15px; }
  .net-seats .fi { width: 21px; height: 14px; }
}
@media (max-height: 480px) {
  .net-panel { width: min(560px, 100%); }
  .net-panel h2 { margin-bottom: 6px; font-size: 22px; }
  .net-view { gap: 6px; }
  .net-code { flex-direction: row; justify-content: center; align-items: baseline; gap: 10px; }
  .net-code b { font-size: 30px; }
  .net-seats { grid-template-columns: 1fr 1fr; }
}

/* ---------- playing with friends, stage 2: the series' cards, the crown, the emotes ---------- */
.net-sub { margin: -6px 0 0; font-size: 14px; font-weight: 800; color: var(--ink-soft); overflow-wrap: anywhere; text-wrap: balance; }
.net-view .room-top, .net-view .room-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* the little crown: on the hat of whoever leads the series (HUD chips, the cards' lists) */
.hat .cr { display: none; position: absolute; left: 50%; top: -11px; width: 22px; height: 16.5px; translate: -50% 0; filter: drop-shadow(0 1px 0 rgba(60, 40, 20, 0.35)); }
.net-seats .hat.crowned .cr, .chip-p.crowned .hat .cr { display: block; }
.net-seats .hat.crowned::after, .chip-p.crowned .hat::after { display: none; }
.net-seats .hat.crowned { margin-top: 9px; }
.chip-p.crowned .hat { margin-top: 8px; }
/* the series' table: wins as stars out of 3, the fish brought home over the series */
.net-seats .wins { display: flex; gap: 2px; margin-left: auto; flex: none; }
.net-seats .st { width: 22px; height: 22px; fill: rgba(255, 253, 246, 0.6); stroke: #b39d80; stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 3 2.4; }
.net-seats .st.on { fill: #ffc531; stroke: #7a4c00; stroke-dasharray: none; }
.net-seats li.won .st.on:last-of-type { animation: pop 0.5s ease-out; }
.net-seats .fishn { display: flex; align-items: center; gap: 3px; flex: none; min-width: 46px; justify-content: flex-end; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.net-seats .fishn .fi { width: 21px; height: 13.5px; }
.net-seats.table li { padding-right: 9px; }
/* the four emotes: beside the controls, never over the ice. A mouse: a row in the bottom right corner with their keys */
.emotes { position: fixed; z-index: 4; right: 16px; bottom: max(14px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, auto); gap: 6px; }
.emotes[hidden] { display: none; }
.emo-btn { position: relative; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 2px solid var(--wood); background: var(--cream); box-shadow: 0 3px 0 var(--wood), 0 5px 10px rgba(0, 0, 30, 0.22); cursor: pointer; touch-action: manipulation; display: grid; place-items: center; }
.emo-btn .emo { width: 32px; height: 32px; pointer-events: none; }
.emo-btn kbd { position: absolute; right: -5px; top: -7px; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 6px; background: var(--ink); color: #fffdf6; font: 800 11px/17px inherit; font-family: inherit; text-align: center; pointer-events: none; }
.emo-btn:hover { background: #fff6d6; }
.emo-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wood); }
.emo-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.emotes.wait .emo-btn { opacity: 0.45; }
body.touch .emo-btn { width: 44px; height: 44px; }
body.touch .emo-btn kbd { display: none; }
/* fingers, a wide screen: two by two above the Slide button */
body.touch .emotes { grid-template-columns: repeat(2, auto); gap: 6px; right: calc(max(12px, env(safe-area-inset-right)) + 15px); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 132px); }
@media (max-width: 640px) {
  .emotes { right: 8px; gap: 4px; }
  .emo-btn { width: 36px; height: 36px; } .emo-btn .emo { width: 28px; height: 28px; }
  /* a phone held upright: two by two between the stick and the Slide button */
  body.touch .emotes { right: auto; left: calc(50% + 5px); translate: -50% 0; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 26px); gap: 6px; }
  body.touch .emo-btn { width: 44px; height: 44px; } body.touch .emo-btn .emo { width: 32px; height: 32px; }
  .net-seats .st { width: 19px; height: 19px; }
  .net-seats .fishn { min-width: 40px; }
}
@media (max-height: 480px) {
  .emotes { bottom: 8px; right: 10px; }
  /* a phone held sideways: a row of four over the stick, under the nests' column */
  body.touch .emotes { grid-template-columns: repeat(4, auto); gap: 2px; right: auto; left: max(4px, env(safe-area-inset-left)); translate: none; bottom: auto; top: min(156px, calc(100vh - 192px)); }
  body.touch .emo-btn { width: 34px; height: 44px; border-radius: 15px; } body.touch .emo-btn .emo { width: 28px; height: 28px; }
  .net-sub { margin-top: -2px; font-size: 13px; }
  .net-seats.table { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .net-seats li { min-height: 40px; min-width: 0; }
  #net[data-view="score"] .net-panel { width: min(700px, 100%); }
  /* the waiting room: the code, the link and the name on the left, who is in on the right */
  #net[data-view="room"] .net-panel { width: min(700px, 100%); }
  #net-room:not([hidden]) { display: grid; grid-template-columns: 1fr 1.15fr; gap: 0 16px; align-items: start; }
  #net-room .room-top, #net-room .room-list { gap: 6px; }
  #net-room .net-seats { grid-template-columns: 1fr; }
  #net-room .net-seats li { min-height: 34px; }
}
/* an emote over a penguin: a round bubble in that penguin's colour with a little tail */
.emo-bubble { position: absolute; left: 0; top: 0; width: 46px; height: 46px; margin: -58px 0 0 -23px; border-radius: 50%; background: #fffdf6; border: 3px solid var(--c); box-shadow: 0 3px 8px rgba(0, 0, 30, 0.35); display: grid; place-items: center; }
.emo-bubble::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; margin-left: -6px; background: #fffdf6; border: solid var(--c); border-width: 0 3px 3px 0; rotate: 45deg; border-radius: 0 0 3px 0; }
.emo-bubble .emo { position: relative; z-index: 1; width: 36px; height: 36px; animation: emoIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.5) both; }
.emo-bubble.out { opacity: 0; transition: opacity 0.2s ease; }
@keyframes emoIn { from { transform: scale(0.2); } to { transform: none; } }
/* a sideways phone that is at least twice as wide as high (most are): room for full 44 px buttons beside the ice */
@media (max-height: 480px) and (min-aspect-ratio: 2/1) {
  body.touch .emotes { left: max(10px, env(safe-area-inset-left)); }
  body.touch .emo-btn { width: 44px; border-radius: 50%; } body.touch .emo-btn .emo { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .emo-bubble .emo, .net-seats li.won .st.on:last-of-type { animation: none; } }

/* ---------- playing online, stage 3: Quick match (a public room: no code, no link, no name box, a countdown) ---------- */
.on-name { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#net-room[data-pub] .room-top { display: none; }
/* (its countdown is the big number: see "countdowns" at the end) */
@media (max-height: 480px) {
  .on-name { gap: 6px; }
  #net-room[data-pub]:not([hidden]) { display: flex; }
  #net-room[data-pub] .net-seats { grid-template-columns: 1fr 1fr; }
  /* the first card on a phone held sideways: the name and Quick match on the left, the friends' room on the right */
  #net[data-view="friends"] .net-panel { width: min(700px, 100%); }
  #net-friends:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; align-items: start; }
  #net-friends > .on-name, #net-friends > #btn-quick, #net-friends > #net-quick-msg { grid-column: 1; }
  #net-friends > .net-or, #net-friends > #btn-create, #net-friends > .net-row, #net-friends > #net-friends-msg, #net-friends > #btn-net-close { grid-column: 2; }
  #net-friends > .on-name { grid-row: 1 / span 2; }
  #net-friends > #btn-quick { grid-row: 3; }
  #net-friends > #net-quick-msg { grid-row: 4 / span 2; }
  #net-friends > .net-or { grid-row: 1; margin: 0; }
  #net-friends > #btn-create { grid-row: 2; }
  #net-friends > .net-row { grid-row: 3; }
  #net-friends > #net-friends-msg { grid-row: 4; }
  #net-friends > #btn-net-close { grid-row: 5; }
}

/* ---------- five languages (src/i18n.js, src/langmenu.js; 2026-12-06) ---------- */
/* a page that will not be in English waits out of sight until its words are in (index.html's first script) */
html.i18n-wait body { visibility: hidden; }
/* Nunito has only Latin letters: each language names the fonts for its own (the computer's own; nothing is downloaded),
   by <html lang>, so that Japanese is not drawn with Chinese shapes. An element that says its own language (a row of
   the language menu) gets that language's fonts. English is as it was. */
:lang(zh-Hant) { --cjk: 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', 'Noto Sans CJK TC', sans-serif; }
:lang(zh-Hans) { --cjk: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Noto Sans CJK SC', sans-serif; }
:lang(ja) { --cjk: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'YuGothic', 'Noto Sans JP', 'Noto Sans CJK JP', sans-serif; }
:lang(ko) { --cjk: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', 'Noto Sans CJK KR', sans-serif; }
:lang(zh-Hant), :lang(zh-Hans), :lang(ja), :lang(ko) { font-family: 'Nunito', var(--cjk); }
/* (their fonts stand taller than Nunito: with the browser's own "normal" every line would be a pixel higher than in
   English, and a card that just fits a low phone screen would start to scroll. Only where nothing sets a height.) */
html:lang(zh-Hant), html:lang(zh-Hans), html:lang(ja), html:lang(ko) { line-height: 1.33; }
:is(:lang(zh-Hant), :lang(zh-Hans), :lang(ja), :lang(ko)).g-btn, :is(:lang(zh-Hant), :lang(zh-Hans), :lang(ja), :lang(ko)).g-btn * { font-family: Roboto, Arial, var(--cjk); }
/* Korean breaks between words, not inside them; Japanese between phrases where the browser can */
:lang(ko) { word-break: keep-all; }
:lang(ja) { word-break: auto-phrase; }
/* (a row of a room's list may shrink, so that a long typed name ends in … instead of pushing the row out of its card:
   the tags beside it are wider in these languages) */
.net-seats li { min-width: 0; }   /* (every language: an English page can meet a long Chinese name too) */
/* (the stats' labels: capitals and wide spacing are for Latin letters) */
:is(:lang(zh-Hant), :lang(zh-Hans), :lang(ja), :lang(ko)) .stats dt { letter-spacing: 0; }

/* the globe button: the language's own name beside it */
.lang-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 9px 0 10px; background: var(--cream); border: 2px solid var(--wood); border-radius: 12px;
  box-shadow: 0 3px 0 rgba(120, 80, 40, 0.25); color: var(--ink); font-weight: 800; font-size: 15px; line-height: 1; white-space: nowrap; touch-action: manipulation; }
.lang-btn:hover { background: #fffdf6; }
.lang-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(120, 80, 40, 0.25); }
.lang-btn .globe { width: 21px; height: 21px; flex: none; }
.lang-btn .caret { width: 12px; height: 12px; flex: none; color: var(--ink-soft); }
/* on the title: top left of the screen, level with the sound buttons across from it (the card is as it was) */
#title > .lang-btn { position: fixed; top: max(12px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); }
/* on the pause card: under its two buttons */
/* (46px: still 44 while the card is coming up at 97% of its size) */
#pause .lang-btn { display: flex; width: max-content; max-width: 100%; min-height: 46px; margin: 12px auto 0; }
@media (max-width: 640px) { #title > .lang-btn { left: max(10px, env(safe-area-inset-left)); } }
@media (max-height: 480px) { #title > .lang-btn { top: 8px; left: max(10px, env(safe-area-inset-left)); } #pause .lang-btn { margin-top: 8px; } }

/* its menu: over everything (a click outside only closes it), under the button or over it; nothing is marked until a key moves */
.lang-pop { position: fixed; inset: 0; z-index: 30; overscroll-behavior: contain; }
.lang-menu { position: fixed; left: 8px; top: 8px; min-width: 190px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow: auto; overscroll-behavior: contain; padding: 6px; background: #fff9ec; animation: menuIn 0.14s ease-out; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } }
.lang-menu[data-side="over"] { animation-name: menuInUp; }
@keyframes menuInUp { from { opacity: 0; transform: translateY(4px); } }
.lang-list { display: grid; gap: 2px; }
.lang-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 40px; padding: 0 10px 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink);
  font-weight: 700; font-size: 16px; line-height: 1.2; text-align: left; white-space: nowrap; touch-action: manipulation; }
.lang-item:hover { background: rgba(155, 109, 67, 0.14); }
.lang-item:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; background: rgba(155, 109, 67, 0.14); }
.lang-item .check { width: 18px; height: 18px; flex: none; color: var(--ink-soft); visibility: hidden; }
.lang-item[aria-checked="true"] .check { visibility: visible; }
.lang-note { margin: 4px 10px 8px; max-width: 230px; font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--ink-soft); text-align: left; }
/* a phone or a tablet: a sheet from the bottom, rows for a finger */
.lang-pop.sheet { background: rgba(10, 40, 70, 0.5); }
.lang-pop.sheet .lang-menu { left: 0; right: 0; top: auto; bottom: 0; width: min(480px, 100%); max-width: 100%; margin: 0 auto; max-height: calc(100dvh - 24px); border-radius: 18px 18px 0 0; border-bottom: 0;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); animation: sheetIn 0.2s ease-out; }
@keyframes sheetIn { from { transform: translateY(40%); opacity: 0; } }
.lang-pop.sheet .lang-item { min-height: 48px; font-size: 17px; padding: 0 12px 0 14px; }
.lang-pop.sheet .lang-note { max-width: none; margin: 2px 14px 8px; font-size: 14px; }
@media (max-height: 480px) { .lang-pop.sheet .lang-menu { padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); } .lang-pop.sheet .lang-item { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .lang-menu, .lang-pop.sheet .lang-menu { animation: none; } }

/* ---------- the ending of an online series (src/main.js "the ending of a series", src/netui.js "Play again?") ---------- */
/* beat 1, "the game is over": everything of the match slides off the screen… */
body[data-cer] #hud, body[data-cer] .msgs { translate: 0 -240px; opacity: 0; transition: translate 0.5s cubic-bezier(0.5, 0, 0.9, 0.5), opacity 0.45s ease-in; }
body[data-cer] .stick, body[data-cer] .slide-btn, body[data-cer] .slide-key, body[data-cer] .emotes { translate: 0 240px; opacity: 0; pointer-events: none; transition: translate 0.5s cubic-bezier(0.5, 0, 0.9, 0.5), opacity 0.45s ease-in; }
@media (max-width: 640px) { body[data-cer].touch .emotes { translate: -50% 240px; } }
/* …and "GAME SET!" sweeps across the middle: a dark blue band with gold lines, the words in cream with a dark edge */
.gameset { position: fixed; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; pointer-events: none; overflow: hidden; }
.gameset[hidden] { display: none; }
.gs-band { position: relative; width: 130vw; flex: none; display: grid; justify-items: center; padding: 0; rotate: -4deg; background: #1d3f66; border-block: 5px solid #0e2238; box-shadow: 0 9px 0 rgba(10, 30, 55, 0.3); overflow: hidden;
  animation: gsBand 1.5s linear var(--d, 0s) both; }
.gs-line { display: block; width: 100%; height: 6px; margin: 7px 0; background: #ffc531; box-shadow: 0 2px 0 #7a4c00, 0 -2px 0 #ffe9a0; }
#gameset-text { display: block; padding: 0.08em 0.3em 0.12em; font-size: min(92px, 11.5vw, 21vh); font-weight: 900; font-style: italic; letter-spacing: 0.05em; line-height: 1.2; white-space: nowrap; color: #fff6d6;
  text-shadow: 3px 0 #0e2238, -3px 0 #0e2238, 0 3px #0e2238, 0 -3px #0e2238, 2px 2px #0e2238, -2px 2px #0e2238, 2px -2px #0e2238, -2px -2px #0e2238, 0 7px 0 #0e2238;
  animation: gsText 1.5s linear var(--d, 0s) both; }
/* (a light glint runs along the band once) */
.gs-band::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: 0; width: 46px; background: rgba(255, 255, 255, 0.3); rotate: 18deg; animation: gsGlint 1.5s linear var(--d, 0s) both; }
@keyframes gsBand { 0% { clip-path: inset(0 100% 0 0); } 13% { clip-path: inset(0 0 0 0); } 84% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 100%); } }
@keyframes gsText { 0% { translate: 70vw 0; } 16% { translate: 1.6vw 0; } 80% { translate: -1.6vw 0; } 100% { translate: -90vw 0; } }
@keyframes gsGlint { 0%, 30% { translate: 10vw 0; opacity: 0; } 34% { opacity: 1; } 62% { opacity: 1; } 66%, 100% { translate: 120vw 0; opacity: 0; } }
@keyframes gsStill { 0% { opacity: 0; } 6% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
/* beat 2: the champion's name, small, in the upper part of the screen (main.js gives the place: --t, --l, --r). It is laid
   out, unseen, from the start of the ceremony so that the camera knows the room it takes; .on shows it */
.cer-words { position: fixed; left: var(--l, 0px); right: var(--r, 0px); top: var(--t, 16px); z-index: 6; display: grid; justify-items: center; pointer-events: none; visibility: hidden; }
.cer-words[hidden] { display: none; }
.cer-words.on { visibility: visible; }
.cw-card { display: grid; justify-items: center; gap: 1px; min-width: 0; max-width: min(520px, calc(100% - 16px)); padding: 9px 28px 11px; border-radius: 16px; text-align: center; background: #fff6d6; border: 2.5px solid #7a4c00; box-shadow: inset 0 0 0 3px #ffc531, 0 4px 0 rgba(122, 76, 0, 0.3); }
.cer-words.on .cw-card { animation: cwIn 0.5s cubic-bezier(0.2, 1.3, 0.5, 1) both; }
@keyframes cwIn { from { opacity: 0; transform: translateY(-14px) scale(0.94); } }
.cw-label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 900; letter-spacing: 0.2em; text-indent: 0.2em; text-transform: uppercase; color: #a8600a; white-space: nowrap; }
.cw-label::before, .cw-label::after { content: ''; width: 22px; height: 3px; border-radius: 2px; background: #ffc531; box-shadow: 0 0 0 1px #7a4c00; }
.cw-name { max-width: 100%; font-size: 28px; font-weight: 900; line-height: 1.18; color: var(--ink); overflow-wrap: anywhere; }
.cw-titles, .cw-how { font-size: 14px; font-weight: 800; line-height: 1.25; color: var(--ink-soft); overflow-wrap: anywhere; }
.cw-label:empty, .cw-titles:empty, .cw-how:empty { display: none; }
@media (max-width: 640px) { .cw-card { padding: 8px 18px 9px; } .cw-name { font-size: 24px; } .cw-titles, .cw-how { font-size: 13.5px; } }
@media (max-height: 480px) {
  .cw-card { grid-template-columns: auto auto; align-items: baseline; gap: 0 10px; padding: 4px 18px 5px; border-radius: 13px; }
  .cw-name { font-size: 20px; } .cw-label { font-size: 12px; align-self: center; }
  .cw-titles, .cw-how { grid-column: 1 / -1; font-size: 12.5px; }
  .cer-words:not(.shared) .cw-how { display: none; }
}
/* beat 3, "Play again?": not a window over the picture but a strip low on the screen (a phone held sideways: a column on
   the left), so that the champion stays in view. Nothing is dimmed and the picture is not covered */
#net[data-view="again"] { background: none; pointer-events: none; place-items: end center; padding: 12px 12px max(12px, env(safe-area-inset-bottom)); animation: none; }
#net[data-view="again"] .net-panel { pointer-events: auto; width: min(580px, 100%); padding: 12px 16px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; align-items: center; text-align: left;
  border: 2.5px solid #7a4c00; box-shadow: 0 5px 0 rgba(122, 76, 0, 0.35), 0 12px 26px rgba(10, 30, 60, 0.3); animation: stripUp 0.45s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
@keyframes stripUp { from { transform: translateY(110%); } }
#net-again:not([hidden]), #net-again .again-top { display: contents; }
#net[data-view="again"] .net-panel h2 { grid-column: 2; grid-row: 1; margin: 0; font-size: 24px; line-height: 1.15; align-self: end; }
#net-again .again-count { grid-column: 1; grid-row: 1 / 3; }
#net-again .net-msg { grid-column: 2; grid-row: 2; align-self: start; min-height: 2.5em; font-size: 13.5px; line-height: 1.25; }
#net-again .net-seats { grid-column: 1 / -1; margin-top: 8px; }
#net-again .row-btns { grid-column: 1 / -1; margin-top: 10px; flex-wrap: nowrap; }
#net-again .row-btns .big-btn { flex: 1 1 0; min-width: 0; padding-left: 12px; padding-right: 12px; }
#net-again .row-btns #btn-again-go { flex-grow: 1.5; }
/* the countdown: a ring that empties, and the number in it */
.again-count { position: relative; width: 70px; height: 70px; flex: none; }
.again-count svg { display: block; width: 100%; height: 100%; }
.ac-edge { fill: #fffdf6; stroke: #7a4c00; stroke-width: 15; }
.ac-bg { fill: none; stroke: #f1e2c4; stroke-width: 10; }
.ac-on { fill: none; stroke: #ffc531; stroke-width: 10; }
.ac-glint { fill: none; stroke: #fffbe6; stroke-width: 3; stroke-linecap: round; opacity: 0.85; }
.again-count.late .ac-on { stroke: var(--accent); }
#again-num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.again-count.late #again-num { color: var(--accent-dark); }
.again-count.beat #again-num { animation: pop 0.3s ease-out; }
.again-count[hidden] { display: none; }
/* the final table, small: the place, the hat (the champion's with the crown), the name, the wins, the fish, and a tick for
   whoever has said Continue */
.net-seats.final { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px 8px; }
.net-seats.final li { min-height: 36px; padding: 2px 8px 2px 8px; gap: 7px; font-size: 15px; border-radius: 11px; }
.net-seats.final li.me { border-color: var(--c); box-shadow: 0 0 0 1.5px var(--c); }
.net-seats.final li.won { border-color: var(--gold); box-shadow: 0 0 0 1.5px var(--gold); }
.net-seats.final li.won.me { border-color: var(--c); box-shadow: 0 0 0 1.5px var(--c), 0 0 0 3.5px var(--gold); }
.net-seats.final .rk { flex: none; width: 13px; text-align: center; font-size: 14px; font-weight: 900; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.net-seats.final .hat { width: 17px; height: 15px; margin-top: 4px; }
.net-seats.final .hat::after { width: 8px; height: 8px; margin-left: -4px; top: -5px; }
.net-seats.final .hat.crowned { margin-top: 8px; }
.net-seats.final .hat .cr { width: 20px; height: 15px; top: -10px; }
.net-seats.final .st { width: 17px; height: 17px; }
.net-seats.final .fishn { min-width: 36px; font-size: 14px; }
.net-seats.final .fishn .fi { width: 18px; height: 11.5px; }
.net-seats .ok { flex: none; width: 22px; height: 22px; }
.net-seats .ok svg { display: block; width: 22px; height: 22px; }
.net-seats .ok.new svg { animation: pop 0.4s ease-out; }
.big-btn.done { background: #3fae5a; box-shadow: 0 4px 0 #1f6a34; cursor: default; }
.big-btn.done:active { transform: none; box-shadow: 0 4px 0 #1f6a34; }
.big-btn.done::before { content: ''; display: inline-block; width: 0.5em; height: 0.85em; margin: 0 0.5em 0.12em 0; border: solid #fff; border-width: 0 0.2em 0.2em 0; rotate: 42deg; vertical-align: middle; }
@media (max-width: 640px) {
  #net[data-view="again"] { padding: 8px 8px max(8px, env(safe-area-inset-bottom)); }
  #net[data-view="again"] .net-panel { padding: 10px 12px 12px; }
  #net[data-view="again"] .net-panel h2 { font-size: 22px; }
  .again-count { width: 62px; height: 62px; } #again-num { font-size: 25px; }
  .net-seats.final { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .net-seats.final li { min-height: 34px; }
}
@media (max-height: 480px) {
  #net[data-view="again"] { place-items: center start; padding: 8px 8px 8px max(8px, env(safe-area-inset-left)); }
  #net[data-view="again"] .net-panel { width: 268px; padding: 8px 10px 10px; gap: 0 10px; animation-name: stripSide; }
  #net[data-view="again"] .net-panel h2 { font-size: 19px; }
  .again-count { width: 52px; height: 52px; } #again-num { font-size: 21px; }
  #net-again .net-msg { font-size: 12px; min-height: 2.4em; }
  #net-again .net-seats { margin-top: 5px; }
  .net-seats.final { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .net-seats.final li { min-height: 30px; }
  .net-seats.final .fishn { display: none; }
  #net-again .row-btns { margin-top: 7px; gap: 8px; }
  #net-again .row-btns .big-btn { min-height: 44px; padding: 6px 6px; font-size: 16px; }
}
@keyframes stripSide { from { transform: translateX(-110%); } }
@media (prefers-reduced-motion: reduce) {
  body[data-cer] #hud, body[data-cer] .msgs, body[data-cer] .stick, body[data-cer] .slide-btn, body[data-cer] .slide-key, body[data-cer] .emotes { transition: none; }
  .gs-band { animation: gsStill 1.5s linear var(--d, 0s) both; } #gameset-text, .gs-band::after { animation: none; } .gs-band::after { display: none; }
  .cer-words.on .cw-card, #net[data-view="again"] .net-panel, .again-count.beat #again-num, .net-seats .ok.new svg { animation: none; }
}

/* ---------- titles ("幾冠王", 2026-12-06): how many online series a person has won ----------
   A small gold trophy and the number after a name (netui.js titleBadge): the waiting room, the scoreboard, "Play
   again?", and — only where the chips show names, a wide screen — the match's chips. Nothing is added to a phone's HUD. */
.tt { display: inline-flex; align-items: center; gap: 2px; flex: none; font-size: 13px; font-weight: 900; line-height: 1; color: #8a5a00; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt b { font-weight: 900; }
.tp { display: block; flex: none; width: 17px; height: 17px; }
.net-seats .tt { margin-left: -3px; }
.net-seats.final .tt { font-size: 12.5px; margin-left: -2px; } .net-seats.final .tp { width: 15px; height: 15px; }
/* (the "Play again?" strip in two columns: a little wider when somebody on it has a trophy, so that a name keeps the room
   it had — "Penguin" was being cut short. Its height, which is what the camera makes room for, is the same) */
@media (min-width: 700px) and (min-height: 481px) { #net[data-view="again"] .net-panel:has(.net-seats.final .tt) { width: min(660px, 100%); } }
.chip-p .tt { display: none; margin-left: -2px; }
@media (min-width: 1200px) { .chip-p .tt { display: inline-flex; } }
.chips.nott .chip-p .tt { display: none; }   /* (main.js fitChipTitles: the row would not fit with them) */
/* my own count on the Play online card */
.net-mine { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.net-mine[hidden] { display: none; }
.net-mine .tt { font-size: 15px; } .net-mine .tp { width: 19px; height: 19px; }
/* over the podium, under the champion's name: "Ann: 4 titles now" — the number rolls up once from what it was */
.cw-titles { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1px 6px; max-width: 100%; color: #8a5a00; }
.cw-titles:empty { display: none; }
.cw-titles .ct-text { min-width: 0; }
.cw-titles .ct-one { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.cw-titles .ct-one + .ct-one::before { content: '·'; margin-right: 2px; }
.cw-titles .ct-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-titles .tn { position: relative; display: inline-block; font-weight: 900; color: #7a4c00; font-variant-numeric: tabular-nums; }
.cw-titles .tn .was { position: absolute; left: 50%; top: 0; translate: -50% 0; opacity: 0; }
.cw-titles .tn .now { display: inline-block; }
.cer-words.on .cw-titles .tn .was { animation: tnOut 0.3s 0.85s ease-in both; }
.cer-words.on .cw-titles .tn .now { animation: tnIn 0.45s 0.85s cubic-bezier(0.2, 1.5, 0.5, 1) both; }
.cer-words.on .cw-titles > .tp { animation: popSmall 0.5s 1.05s ease-out both; }
@keyframes tnOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-80%); } }
@keyframes tnIn { from { opacity: 0; transform: translateY(80%) scale(0.7); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cer-words.on .cw-titles .tn .was, .cer-words.on .cw-titles .tn .now, .cer-words.on .cw-titles > .tp { animation: none; } }

/* ---------- on one's own: the win streak, the best run, the crown (src/main.js "a run on one's own") ---------- */
/* the crown as a small sign (main.js crownSvg): a dark edge, the metal, a pale glint along the band, three stones.
   Three metals that differ at a glance (not three yellows): brown bronze with green stones, cool white silver with
   blue, yellow gold with a red one. Before three wins there is no crown yet: its outline, dashed like an empty place. */
.crn { width: 20px; height: 15px; flex: none; overflow: visible; }
.crn .cb { stroke-width: 1.7; stroke-linejoin: round; }
.crn .cl { fill: none; stroke-width: 1.5; stroke-linecap: round; }
.crn-gold .cb { fill: #ffc531; stroke: #8a5200; } .crn-gold .cl { stroke: #fff0a8; } .crn-gold .g1 { fill: #e8233c; } .crn-gold .g2 { fill: #2f8fe8; }
.crn-silver .cb { fill: #dfe7f0; stroke: #51657e; } .crn-silver .cl { stroke: #ffffff; } .crn-silver .g1 { fill: #2f7fe0; } .crn-silver .g2 { fill: #8fb4e0; }
.crn-bronze .cb { fill: #d08445; stroke: #6a300c; } .crn-bronze .cl { stroke: #f4c394; } .crn-bronze .g1 { fill: #25a85a; } .crn-bronze .g2 { fill: #ffe6c0; }
.crn-none .cb { fill: rgba(255, 253, 246, 0.6); stroke: #b39d80; stroke-width: 1.5; stroke-dasharray: 3 2.4; }
/* in the HUD: after the match number, in its own small plate */
.info .mwrap { display: inline-flex; align-items: center; gap: 8px; }
.info .streak:not([hidden]) { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px 3px 5px; border-radius: 9px; background: #fffdf6; box-shadow: inset 0 0 0 1.5px #ecdcc3; font-size: 15px; font-variant-numeric: tabular-nums; }
.info .streak .crn { width: 20px; height: 15px; }
.info .streak.pop { animation: pop 0.45s ease-out; }
/* in a banner: a tag after the big words */
.banner .stk-tag:not([hidden]) { display: inline-flex; align-items: center; align-self: center; gap: 5px; padding: 2px 9px 2px 6px; border-radius: 999px; background: #fffdf6; box-shadow: inset 0 0 0 1.5px #e6cf9c; color: var(--ink); font-size: 15px; font-weight: 900; white-space: nowrap; }
.banner .stk-tag span { font-size: inherit; font-weight: inherit; color: inherit; }
/* the best run: on the title card and under the score of the end card */
.best .crn { display: inline-block; vertical-align: -2px; margin-right: 6px; }
/* the end card: the run's streak, big, with its crown; "New record!" with three short strokes on each side */
.ostreak { display: flex; align-items: center; justify-content: center; gap: 9px; margin: -2px 0 8px; font-size: 27px; font-weight: 900; line-height: 1.1; }
.ostreak .crn { width: 36px; height: 27px; }
.ostreak .crn .cb { stroke-width: 1.5; } .ostreak .crn-none .cb { stroke-width: 1.3; }
.newbest:not([hidden]) { display: flex; align-items: center; justify-content: center; gap: 7px; margin: -2px 0 10px; }
.nb-ray { width: 18px; height: 16px; flex: none; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 8; animation: nbRay 0.7s 0.15s ease-out both; }
.nb-ray.l { scale: -1 1; }
@keyframes nbRay { from { stroke-dashoffset: 8; opacity: 0; } 40% { opacity: 1; } to { stroke-dashoffset: 0; } }
@media (max-width: 640px) {
  /* a phone held upright: the mark under the match number, inside the same box (no room beside it) */
  .info .mwrap { flex-direction: column; align-items: flex-start; gap: 2px; }
  .info .streak:not([hidden]) { padding: 0; background: none; box-shadow: none; font-size: 12.5px; gap: 3px; }
  .info .streak .crn { width: 15px; height: 11px; }
  .info .streak.pop { animation-name: popSmall; }
  /* (the box stays as tall as it was: 40px) */
  #hud-info.stk { padding-block: 2px; }
  .banner .stk-tag:not([hidden]) { padding: 1px 8px 1px 5px; }
  .ostreak { font-size: 24px; margin-bottom: 6px; } .ostreak .crn { width: 32px; height: 24px; }
}
@media (max-height: 480px) {
  /* a phone held sideways: the same, and the rows a little closer so the box stays as tall as it was */
  .info .mwrap { flex-direction: column; align-items: center; gap: 2px; }
  .info .streak:not([hidden]) { padding: 0; background: none; box-shadow: none; font-size: 12.5px; gap: 3px; }
  .info .streak .crn { width: 15px; height: 11px; }
  .info .streak.pop { animation-name: popSmall; }
  #hud-info.stk { gap: 4px; padding-block: 4px; min-height: 92px; }
  /* (a banner that needs two lines — a crown earned, in the longer languages — stays above the ice) */
  .banner { gap: 1px 8px; }
  .banner .stk-tag:not([hidden]) { padding: 1px 8px 1px 5px; }
  .ostreak { font-size: 21px; margin: 0 0 2px; } .ostreak .crn { width: 28px; height: 21px; }
  .newbest:not([hidden]) { margin: 0 0 2px; font-size: 16px; }
}
/* (a run of ten wins: "You won all 10 matches" is the news, so it stays on a short screen too, beside "Champion!") */
@media (max-height: 480px) { .cer-words.solo:not(.shared) .cw-how { display: block; grid-column: auto; } }
@media (max-height: 480px) and (min-width: 600px) {
  /* the end card in two columns: title, why, the streak with "New record!" beside it, the numbers, the score */
  .over-panel .ostreak { grid-row: 3; justify-content: flex-start; gap: 7px; margin: 0 0 3px; font-size: 19px; } .over-panel .ostreak .crn { width: 24px; height: 18px; }
  .over-panel .newbest { grid-row: 3; justify-self: end; margin: 0 0 3px; font-size: 15px; } .over-panel .nb-ray { display: none; }
  /* (no room under the score here for the best run of before: it is on the title card; and the rows a little closer,
     so that a card with a two-line "why" and the streak still fits a 360px-high screen) */
  .over-panel .best { display: none; }
  .over-panel .row-btns { margin-top: 2px; } .over-panel .stats dd { font-size: 18px; margin-top: 1px; }
}
/* the champion of a run, after the prize-giving (main.js soloCerCard): on a wide screen the end card stands at the
   left (clear of the sound buttons) and nothing is dimmed, so the crowned champion on the podium is seen beside it
   (the camera makes room) */
@media (min-width: 900px) and (min-height: 481px) {
  body[data-cer] #over { background: none; justify-items: start; padding-left: max(24px, 4vw); }
}
@media (prefers-reduced-motion: reduce) { .info .streak.pop, .newbest, .nb-ray { animation: none; } }


/* ---------- countdowns (src/countdown.js, 2026-12-06): a short line and a big drawn number ----------
   The number: the game's own letters, cream with a dark edge (as the words over the ice), popping once a second. In
   its last three seconds it turns a warm orange and pops harder. On a card it stands on a plate the colour of the sea
   (.plate: the scoreboard between two matches, a quick-match room waiting); over the floe it has no plate (.over: the
   names-up time of a match nobody counted down to). */
.cd { display: grid; justify-items: center; gap: 0; text-align: center; font-variant-numeric: tabular-nums; min-width: 0; }
.cd[hidden] { display: none; }
.cd-line { font-weight: 900; font-size: 18px; line-height: 1.2; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.cd-num { display: block; min-width: 1.2em; padding: 12px 0 16px; font-weight: 900; font-size: 136px; line-height: 0.8; letter-spacing: -0.02em; color: #fff3c4;
  -webkit-text-stroke: 12px #2a1606; paint-order: stroke fill; text-shadow: 0 6px 0 #2a1606; transform-origin: 50% 58%; }
.cd.late .cd-num { color: #ffa21c; }
.cd-num.pop { animation: cdPop 0.3s ease-out; }
.cd.late .cd-num.pop { animation: cdPopLate 0.46s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes cdPop { from { transform: scale(1.14); } }
@keyframes cdPopLate { from { transform: scale(1.5); } }
.cd.none .cd-num { display: none; }
.cd.plate { padding: 10px 14px 4px; border-radius: 16px; background: #1f7198; border: 2px solid #124b66; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2), 0 3px 0 rgba(18, 75, 102, 0.3); }
.cd.plate .cd-line { color: #fff6dc; text-shadow: 0 1px 0 rgba(10, 40, 60, 0.55); }
.cd.plate.none { padding: 16px 14px; }
/* over the floe: the number alone, a little above the fish in the middle (clear of the names over the penguins); its
   line — "Get ready!" — is said by the banner in the band under the HUD, and to a screen reader by the label */
.cd.over { position: fixed; left: 0; top: 0; z-index: 3; translate: -50% -70%; pointer-events: none; }
.cd.over .cd-line { display: none; }
/* phones: still big (the digit itself about 65 px tall) */
@media (max-width: 640px), (max-height: 480px) {
  .cd-num { padding: 9px 0 12px; font-size: 92px; -webkit-text-stroke-width: 9px; text-shadow: 0 5px 0 #2a1606; }
  .cd-line { font-size: 17px; }
  .cd.plate { padding: 8px 12px 3px; }
  .cd.over { translate: -50% -82%; }
}
/* a phone held sideways: the big number beside the table (the scoreboard) or beside who is here (a quick-match room) */
@media (max-height: 480px) {
  #net-score:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 240px; grid-template-areas: "sub sub" "list cd" "list btn"; gap: 6px 14px; align-items: start; }
  #net-score .net-sub { grid-area: sub; }
  #net-score-list { grid-area: list; grid-template-columns: minmax(0, 1fr); }
  #net-score-cd { grid-area: cd; }
  #net-score .row-btns { grid-area: btn; }
  #net-room[data-pub] .room-list { display: grid; grid-template-columns: minmax(0, 1fr) 240px; grid-template-areas: "seats cd" "msg cd" "btns btns"; gap: 6px 14px; align-items: start; }
  #net-room[data-pub] .net-seats { grid-area: seats; }
  #net-room[data-pub] #net-count { grid-area: cd; }
  #net-room[data-pub] #net-room-msg { grid-area: msg; }
  #net-room[data-pub] .row-btns { grid-area: btns; }
}
/* in a match, the last three seconds before the tide and before the match is called: the HUD's clock pulses (its box
   keeps its size) and the line in the band under the HUD is a warning */
.info .time.beat { animation: timeBeat 0.5s ease-out; }
@keyframes timeBeat { 0% { transform: scale(1.28); } 100% { transform: scale(1); } }
.hint[data-kind="warn"] { color: var(--accent-dark); font-weight: 900; border-color: var(--accent); background: #fff4ec; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .cd-num.pop, .cd.late .cd-num.pop, .info .time.beat { animation: none; } }

/* ---------- the run's twists (matches 4 to 10 on one's own: README 「十場的變化」) ----------
   in the match's banner: a tag for each twist, its small drawn sign and a few words (the card between matches: "Next:") */
.banner .tw-row:not([hidden]) { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; align-self: center; gap: 5px 6px; font-size: 15px; color: var(--ink); }
.banner .tw-row span { font-size: inherit; font-weight: inherit; color: inherit; }
.banner .tw-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 6px; border-radius: 999px; background: #fffdf6; box-shadow: inset 0 0 0 1.5px #e6cf9c; font-weight: 900; white-space: nowrap; }
.banner .tw-next { font-weight: 800; color: var(--ink-soft) !important; }
.twm { width: 24px; height: 18px; flex: none; overflow: visible; }
.tw-tag .crn { width: 22px; height: 16.5px; }
.twm-gold .b { fill: #ffc531; stroke: #8a5200; stroke-width: 1.7; stroke-linejoin: round; } .twm-gold .l { fill: none; stroke: #fff0a8; stroke-width: 1.4; stroke-linecap: round; }
.twm-gold .e { fill: #4a2a00; } .twm-gold .s { fill: #fffbe8; stroke: #c98a10; stroke-width: 0.9; stroke-linejoin: round; }
.twm-small .o { fill: none; stroke: #9ab6cf; stroke-width: 1.3; stroke-dasharray: 2.4 2; stroke-linejoin: round; }
.twm-small .b { fill: #f2f9ff; stroke: #3d6f99; stroke-width: 1.7; stroke-linejoin: round; } .twm-small .l { fill: none; stroke: #ffffff; stroke-width: 1.3; stroke-linecap: round; }
.twm-seal .w { fill: none; stroke: #2f7fe0; stroke-width: 1.8; stroke-linecap: round; }
.twm-seal .h { fill: #9aaec2; stroke: #27384c; stroke-width: 1.6; stroke-linejoin: round; } .twm-seal .e, .twm-seal .n { fill: #14171f; }
.twm-seal .m { fill: none; stroke: #27384c; stroke-width: 0.9; stroke-linecap: round; }
.twm-wind .g { fill: none; stroke: #3d6f99; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .twm-wind .f { fill: #ffffff; stroke: #3d6f99; stroke-width: 1; }
@media (max-width: 640px), (max-height: 480px) {
  .banner .tw-row:not([hidden]) { gap: 4px 5px; }
  .banner .tw-tag { padding: 1px 8px 1px 5px; gap: 5px; }
  .twm { width: 21px; height: 16px; } .tw-tag .crn { width: 20px; height: 15px; }
}
/* the King's chip: his crown in place of the little hat (silver in match 5, gold in match 10) */
.chip-p.king .hat { background: none; box-shadow: none; border-radius: 0; margin-top: 2px; }
.chip-p.king .hat::after { display: none; }
.chip-p.king .hat .crn { position: absolute; left: 50%; top: 50%; width: 22px; height: 16.5px; translate: -50% -50%; filter: drop-shadow(0 1px 0 rgba(60, 40, 20, 0.3)); }
/* the golden fish on a plate: its two boxes in the chip are gold */
.chip-p .fi.on.gd { fill: #ffc531; stroke: #8a5200; }
.chip-p .fi.on.gd .eye { fill: #4a2a00; }
.popup.c4 { color: #ffe1a0; }
/* a gust is coming: an arrow the way the wind will blow, before the word, in the band under the HUD */
.hint[data-kind="gust"] { display: flex; align-items: center; justify-content: center; gap: 8px; }
.gust-ar { width: 26px; height: 26px; flex: none; transition: transform 0.2s; }
.gust-ar path { fill: #e8f4ff; stroke: #173a5e; stroke-width: 1.7; stroke-linejoin: round; }
.gust-ar path.l { fill: none; stroke: #ffffff; stroke-width: 1.2; stroke-linecap: round; }
.hint[data-kind="seal"] { color: #173a5e; border-color: #5b8fc0; background: #f1f8ff; font-weight: 900; }
/* the seal is after this nest: a small sign over it (its head in a speech bubble, a red "!"), bobbing; quicker at the end */
.seal-mark { position: absolute; left: 0; top: 0; width: 46px; height: 39px; margin: -39px 0 0 -23px; }
.seal-mark svg { display: block; width: 100%; height: 100%; overflow: visible; animation: sealBob 0.9s ease-in-out infinite alternate; filter: drop-shadow(0 2px 0 rgba(30, 30, 50, 0.25)); }
.seal-mark.late svg { animation-duration: 0.35s; }
.seal-mark .sm-b { fill: #fffdf6; stroke: #27384c; stroke-width: 1.8; stroke-linejoin: round; }
.seal-mark .sm-h { fill: #9aaec2; stroke: #27384c; stroke-width: 1.5; }
.seal-mark .sm-e, .seal-mark .sm-n { fill: #14171f; }
.seal-mark .sm-w { fill: none; stroke: #27384c; stroke-width: 0.9; stroke-linecap: round; }
.seal-mark .sm-x { fill: none; stroke: #e0483f; stroke-width: 3.4; stroke-linecap: round; }
.seal-mark .sm-xd { fill: #e0483f; }
@keyframes sealBob { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .seal-mark svg { animation: none; } }

/* ---------- on one's own: after a match, and the start of every match (main.js "the winner's showcase" and "the time
   between matches", 2026-12-06) ----------
   The showcase: the camera close on the winner at its nest (view.js "the winner's showcase"), the floe round it darker
   (a soft vignette, main.js moves its middle with the winner), and the words drawn on the ice like the countdown's
   numbers — no card: who won (the biggest), the match with a check, the streak with its crown and the points; small at
   the bottom on a dark plate, the next match with its twists' tags and, the first time, what a twist means. An upright
   phone: the words above the winner; anything wider: a column on its left. Under the HUD and the corner buttons. */
.show { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.show[hidden] { display: none; }
.show-vig { position: absolute; inset: 0; opacity: 0; --vx: 50%; --vy: 60%; --vr: 300px;
  background: radial-gradient(circle var(--vr) at var(--vx) var(--vy), rgba(8, 28, 48, 0) 40%, rgba(8, 28, 48, 0.42) 100%); }
.show-txt { position: absolute; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; gap: 2px; text-align: center; }
.show-txt > * { display: block; max-width: 100%; white-space: nowrap; transform-origin: 50% 60%; opacity: 0; }
.show-txt > [hidden] { display: none; }
/* drawn letters: cream with a thick dark edge and a dark drop under them, like the countdown */
.sh-who, .sh-match, .sh-streak { font-weight: 900; line-height: 1.05; color: #fff3c4; -webkit-text-stroke: 9px #2a1606; paint-order: stroke fill; text-shadow: 0 5px 0 #2a1606, 0 0 26px rgba(255, 200, 90, 0.35); }
.sh-who { font-size: 84px; letter-spacing: 0.005em; padding: 6px 10px 4px; }
.sh-match { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 36px; -webkit-text-stroke-width: 7px; text-shadow: 0 4px 0 #2a1606; padding: 2px 8px; color: #e8f6ff; }
.sh-chk { width: 0.9em; height: 0.9em; flex: none; overflow: visible; }
.sh-chk { filter: drop-shadow(0 3px 0 #2a1606); }
.sh-chk path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sh-chk .o { stroke: #2a1606; stroke-width: 7.5; }
.sh-chk .i { stroke: #8ee88a; stroke-width: 3.6; }
.sh-streak { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 25px; -webkit-text-stroke-width: 6px; text-shadow: 0 3px 0 #2a1606; padding: 2px 8px; }
.sh-streak .crn { width: 34px; height: 25.5px; filter: drop-shadow(0 2px 0 #2a1606); }
.sh-streak { flex-wrap: wrap; row-gap: 0; }
.sh-streak small { flex: 0 0 100%; font-size: 0.78em; color: #ffe08a; white-space: nowrap; }
/* the next match: small, on a soft dark plate at the bottom */
.sh-foot { position: absolute; display: grid; justify-items: center; gap: 4px; padding: 7px 14px 8px; border-radius: 14px; background: rgba(16, 40, 60, 0.55); color: #fffdf6; text-align: center; opacity: 0; max-width: calc(100vw - 24px); box-sizing: border-box; }
.sh-foot[hidden] { display: none; }
.sh-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; font-size: 16px; font-weight: 900; line-height: 1.2; white-space: nowrap; max-width: 100%; }
.sh-next .tw-row { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; font-size: 14px; }
.sh-next .tw-tag { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px 1px 5px; border-radius: 999px; background: #fffdf6; color: var(--ink); box-shadow: inset 0 0 0 1.5px #e6cf9c; font-weight: 900; white-space: nowrap; }
.sh-next .tw-tag span { font-size: inherit; }
.sh-hint:not([hidden]) { display: grid; gap: 2px; max-width: 520px; font-size: 13.5px; font-weight: 800; line-height: 1.3; color: #e4f2ff; text-wrap: balance; }
/* an upright phone: the words across the top (under the corner buttons), the winner under them; the plate at the bottom */
.show[data-lay="port"] .show-txt { left: 12px; right: 12px; top: calc(max(12px, env(safe-area-inset-top)) + 58px); }
.show[data-lay="port"] .sh-foot { left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); translate: -50% 0; width: max-content; }
/* wide: a column on the left half (the winner stands right of the middle), the plate under it */
.show[data-lay="wide"] .show-txt { left: 16px; width: calc(52vw - 16px); top: 50%; translate: 0 -62%; }
.show[data-lay="wide"] .sh-foot { left: calc(26vw); bottom: max(14px, env(safe-area-inset-bottom)); translate: -50% 0; width: max-content; max-width: calc(52vw - 24px); }
@media (max-width: 640px), (max-height: 480px) {
  .sh-who { font-size: 54px; -webkit-text-stroke-width: 8px; text-shadow: 0 4px 0 #2a1606, 0 0 20px rgba(255, 200, 90, 0.35); }
  .sh-match { font-size: 26px; -webkit-text-stroke-width: 6px; }
  .sh-streak { font-size: 18px; -webkit-text-stroke-width: 5px; }
  .sh-streak .crn { width: 28px; height: 21px; }
  .sh-next { font-size: 14.5px; }
  .sh-next .tw-row { font-size: 13px; }
  .sh-hint:not([hidden]) { font-size: 12.5px; }
}
@media (max-height: 480px) {
  .show[data-lay="wide"] .show-txt { translate: 0 -66%; }
  .sh-foot { padding: 5px 12px 6px; gap: 2px; }
}
/* the soft white cut from the showcase into the next match's set-up (main.js sets its opacity) */
.cut { position: fixed; inset: 0; z-index: 4; background: #f4fbff; opacity: 0; pointer-events: none; }
.cut[hidden] { display: none; }
/* the countdown over the floe (countdown.js's big number) with "Get ready!" over it; and "GO!" */
.cd.over.solo { translate: -50% -72%; }
.cd.over.solo .cd-line { display: block; margin-bottom: 2px; font-size: 26px; color: #fff6dc; -webkit-text-stroke: 7px #2a1606; paint-order: stroke fill; text-shadow: 0 3px 0 #2a1606; white-space: nowrap; }
.go-big { position: fixed; left: 0; top: 0; z-index: 3; translate: -50% -62%; pointer-events: none; }
.go-big[hidden] { display: none; }
@media (max-width: 640px), (max-height: 480px) {
  .cd.over.solo { translate: -50% -78%; }
  .cd.over.solo .cd-line { font-size: 21px; -webkit-text-stroke-width: 6px; }
}
/* the pause card is over it all: the showcase, the countdown and GO wait under it, out of sight */
body[data-card="pause"] .show, body[data-card="pause"] .cut, body[data-card="pause"] #cd-flow, body[data-card="pause"] .go-big { visibility: hidden; }
/* reduced motion: nothing bobs, the numbers and GO fade in instead of popping */
@media (prefers-reduced-motion: reduce) {
  .cd.solo .cd-num.pop, .cd.solo.late .cd-num.pop { animation: cdFade 0.35s ease-out; }
}
@keyframes cdFade { from { opacity: 0; } }
@keyframes goFade { 0% { opacity: 0; } 20% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- the way back to the title (2026-12-06) ----------
   End card: Play again and Leaderboard, then a slimmer "Back to the title" on one line with "More games" (it takes
   about the room the link had, so the card grows by a few pixels only). Where the link is left off (a short screen)
   the three buttons share one row, the last one on two lines if it must. Pause card on a short screen: wider, its
   three buttons in one row, the language button and the link side by side. */
.big-btn.slim { min-height: 44px; padding: 6px 14px; font-size: 16px; border-radius: 12px; box-shadow: 0 3px 0 var(--wood); }
.big-btn.slim:active { box-shadow: 0 1px 0 var(--wood); }
#over .over-btns { row-gap: 6px; column-gap: 8px; }
#over .over-btns > .brk { flex: 0 0 100%; height: 0; }
#over .over-btns > .more-games { flex: 0 1 auto; margin: 0; padding: 0 8px; }
@media (max-width: 640px) {
  #over .over-btns > .more-games .mg-at { display: none; }
  #over .over-btns > .more-games > span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--wood); }
}
/* (2026-12-06, the owner: 「按鈕排版超醜」) Wherever the screen is not a short one (those are below): one wide "Play
   again", under it Leaderboard and "Back to the title" as two equal halves, the "More games" link centred on its own
   line — instead of two ragged rows of four different sizes. A full card (streak, the leaderboard box with Sign in,
   the name box and Post score) on a low screen has no room for the third line: main.js (fitOver) then adds `.tight`
   — the link is left off and the two rows are a little lower, no taller than the old two rows, so the card still
   shows without scrolling. */
@media (min-width: 641px) and (min-height: 481px), (min-height: 701px) {
  #over .over-btns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 14px; }
  #over .over-btns > .brk { display: none; }
  #over .over-btns #btn-again { grid-column: 1 / -1; min-height: 52px; font-size: 21px; }
  #over .over-btns #btn-board-over, #over .over-btns #btn-over-title { min-height: 48px; padding: 7px 10px; font-size: 17px; line-height: 1.15; border-radius: 14px; box-shadow: 0 4px 0 var(--wood); text-wrap: balance; }
  #over .over-btns #btn-board-over:active, #over .over-btns #btn-over-title:active { box-shadow: 0 1px 0 var(--wood); }
  #over .over-btns > .more-games { grid-column: 1 / -1; justify-self: center; margin: -2px 0 -10px; }
  #over .over-btns.tight { margin-top: 8px; }
  #over .over-btns.tight #btn-again { min-height: 48px; padding-top: 8px; padding-bottom: 8px; font-size: 20px; }
  #over .over-btns.tight #btn-board-over, #over .over-btns.tight #btn-over-title { min-height: 46px; padding: 5px 8px; font-size: 16px; line-height: 1.1; }
  #over .over-btns.tight > .more-games { display: none; }
}
/* (a low phone, the three buttons in one row: 2px less above them, so the fullest card needs no scrolling) */
@media (max-width: 599px) and (max-height: 700px) and (min-height: 481px) { #over .over-btns { margin-top: 12px; } }
@media (max-width: 640px) and (min-height: 701px) {
  #over .over-btns.tight #btn-board-over, #over .over-btns.tight #btn-over-title { padding: 4px 6px; font-size: 15px; }
}
@media (max-width: 640px) and (max-height: 700px), (max-height: 480px) {
  #over .over-btns { flex-wrap: nowrap; gap: 8px; }
  #over .over-btns > .brk { display: none; }
  #over .over-btns .big-btn { min-height: 48px; padding: 5px 10px; font-size: 15px; line-height: 1.1; border-radius: 14px; }
  #over .over-btns #btn-board-over { flex: none; white-space: nowrap; }
  #over .over-btns #btn-again, #over .over-btns #btn-over-title { flex: 1 1 auto; min-width: 0; text-wrap: balance; }
  #over .over-btns #btn-over-title { box-shadow: 0 4px 0 var(--wood); }
  /* (Japanese has no spaces to break at: a little smaller, so that its three labels stay on one line each) */
  :lang(ja) #over .over-btns { gap: 6px; } :lang(ja) #over .over-btns .big-btn { padding-left: 6px; padding-right: 6px; font-size: 14px; }
}
@media (max-height: 480px) {
  #pause .panel { width: min(600px, 100%); display: grid; grid-template-columns: 1fr 1fr; align-items: center; column-gap: 12px; }
  #pause .panel > h2, #pause .col-btns { grid-column: 1 / -1; }
  #pause .col-btns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #pause .col-btns .big-btn { padding: 8px 10px; font-size: 17px; line-height: 1.15; text-wrap: balance; }
  #pause .lang-btn { justify-self: end; margin: 10px 0 0; }
  #pause .more-games { justify-self: start; margin: 10px 0 0; }
}

/* ---------- the sticker kit (src/sticker.js, 2026-12-06: the owner wants every call and effect to look like a designed
   game piece, 「熱血豐富」). A sticker word: the letters themselves are the dark outline (a thick stroke and a dark fill),
   ::before the coloured band (a thinner stroke), ::after the fill on top: light above, the colour below with halftone
   dots on it (three backgrounds clipped to the letters); a block shadow under the lot. A little italic (skew) and tilted. ---------- */
.sk { position: relative; display: inline-block; font-weight: 900; font-style: normal; line-height: 1.04; white-space: nowrap; letter-spacing: 0.03em; padding: 0.06em 0.12em;
  --f1: #ffffff; --f2: #a9e2ff; --band: #1d5bb0; --ink: #0a1630; --dot: rgba(29, 91, 176, 0.42); --bw: 0.15em; --ow: 0.3em;
  color: var(--ink); -webkit-text-stroke: var(--ow) var(--ink); paint-order: stroke fill; transform: skewX(-8deg); filter: drop-shadow(0 0.075em 0 var(--ink)); }
.sk::before, .sk::after { content: attr(data-t); position: absolute; inset: 0; padding: inherit; pointer-events: none; }
.sk::before { color: var(--band); -webkit-text-stroke: var(--bw) var(--band); }
.sk::after { color: transparent; -webkit-text-stroke: 0; -webkit-background-clip: text; background-clip: text;
  background: linear-gradient(180deg, var(--f1) 0 47%, transparent 57%), radial-gradient(circle, var(--dot) 0 34%, transparent 42%) 0 0 / 0.11em 0.11em, var(--f2); -webkit-background-clip: text; background-clip: text; }
.sk-go { --f1: #ffffff; --f2: #ffd21f; --band: #f0402f; --ink: #1c0a10; --dot: rgba(226, 104, 0, 0.5); }
.sk-gold { --f1: #fffbe2; --f2: #ffbf1a; --band: #d86a00; --ink: #2a1606; --dot: rgba(196, 92, 0, 0.5); }
.sk-bad { --f1: #ffffff; --f2: #ffb0bd; --band: #d8283f; --ink: #1d0a12; --dot: rgba(190, 20, 50, 0.4); }
.sk-c0 { --band: #e0483f; --f2: #ffc8bf; --dot: rgba(200, 50, 40, 0.4); }
.sk-c1 { --band: #2f7fe0; --f2: #bfe0ff; }
.sk-c2 { --band: #2f9a4a; --f2: #c9f2c4; --dot: rgba(40, 140, 60, 0.4); }
.sk-c3 { --band: #8a55d6; --f2: #e3cdfb; --dot: rgba(130, 80, 200, 0.4); }
.sk-c4 { --band: #d99a1c; --f2: #ffe08a; --dot: rgba(200, 130, 0, 0.45); }
/* its pop: big and squashed, a little too small, settled (about a quarter of a second); the "impact frame" (my own
   bump) holds the first, biggest moment still for ~60 ms first */
.sk.pop, .sk-plate.pop, .sk-puff.pop { animation: skPop 0.26s cubic-bezier(0.3, 0.9, 0.4, 1) both; }
.sk.imp, .sk-puff.imp { animation: skImp 0.32s cubic-bezier(0.3, 0.9, 0.4, 1) both; }
@keyframes skPop { 0% { scale: 1.55 1.3; opacity: 0; } 20% { opacity: 1; } 48% { scale: 0.88 0.96; } 74% { scale: 1.05 1; } 100% { scale: 1; } }
@keyframes skImp { 0%, 20% { scale: 1.4 1.25; opacity: 1; } 56% { scale: 0.9 0.97; } 80% { scale: 1.04 1; } 100% { scale: 1; } }
/* a badge plate: dark ice-metal, a rivet in each corner, bold light letters */
.sk-plate { position: relative; display: inline-block; padding: 0.28em 0.95em 0.32em; border-radius: 0.5em; font-weight: 900; line-height: 1.1; white-space: nowrap; color: #f4fbff; letter-spacing: 0.02em;
  text-shadow: 0 0.07em 0 #06101f; border: 0.13em solid #0a1630; box-shadow: inset 0 0.12em 0 rgba(255, 255, 255, 0.22), inset 0 -0.14em 0 rgba(0, 0, 0, 0.25), 0 0.16em 0 #0a1630;
  --rv: radial-gradient(circle, #dceaf7 0 0.08em, #5c7a9c 0.09em 0.13em, transparent 0.14em);
  background: var(--rv) 0.15em 0.15em / 0.5em 0.5em no-repeat, var(--rv) calc(100% - 0.15em) 0.15em / 0.5em 0.5em no-repeat, var(--rv) 0.15em calc(100% - 0.15em) / 0.5em 0.5em no-repeat, var(--rv) calc(100% - 0.15em) calc(100% - 0.15em) / 0.5em 0.5em no-repeat, linear-gradient(180deg, #34588a 0%, #1d3a63 52%, #142a4a 100%); }
.sk-plate-gold { color: #2a1606; text-shadow: 0 0.06em 0 rgba(255, 255, 255, 0.6); border-color: #2a1606; box-shadow: inset 0 0.12em 0 rgba(255, 255, 255, 0.5), inset 0 -0.14em 0 rgba(120, 60, 0, 0.3), 0 0.16em 0 #2a1606;
  --rv: radial-gradient(circle, #fff6cf 0 0.08em, #a8670c 0.09em 0.13em, transparent 0.14em);
  background: var(--rv) 0.15em 0.15em / 0.5em 0.5em no-repeat, var(--rv) calc(100% - 0.15em) 0.15em / 0.5em 0.5em no-repeat, var(--rv) 0.15em calc(100% - 0.15em) / 0.5em 0.5em no-repeat, var(--rv) calc(100% - 0.15em) calc(100% - 0.15em) / 0.5em 0.5em no-repeat, linear-gradient(180deg, #ffe58a 0%, #ffc22e 55%, #f0a000 100%); }
.sk-plate-ice { color: #10305a; text-shadow: 0 0.06em 0 #ffffff; box-shadow: inset 0 0.12em 0 #ffffff, inset 0 -0.14em 0 rgba(60, 120, 170, 0.25), 0 0.16em 0 #0a1630;
  --rv: radial-gradient(circle, #ffffff 0 0.08em, #6b93b8 0.09em 0.13em, transparent 0.14em);
  background: var(--rv) 0.15em 0.15em / 0.5em 0.5em no-repeat, var(--rv) calc(100% - 0.15em) 0.15em / 0.5em 0.5em no-repeat, var(--rv) 0.15em calc(100% - 0.15em) / 0.5em 0.5em no-repeat, var(--rv) calc(100% - 0.15em) calc(100% - 0.15em) / 0.5em 0.5em no-repeat, linear-gradient(180deg, #ffffff 0%, #dff2ff 50%, #b8dcf3 100%); }
/* a comic puff */
.sk-puff { display: block; width: 100%; height: 100%; overflow: visible; }
.sk-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
/* the bits in flight */
.fx { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.fx-bit { position: absolute; display: block; translate: -50% -50%; }
.fx-bit[hidden] { display: none; }
.fx-bit svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fx-bit.go { animation: fxFly 0.55s cubic-bezier(0.15, 0.7, 0.35, 1) both; }
@keyframes fxFly { 0% { transform: translate(0, 0) rotate(0) scale(0.4); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); opacity: 0; } }
/* the white flash at GO (80 ms) */
.flash { position: fixed; inset: 0; z-index: 7; pointer-events: none; background: #ffffff; opacity: 0; }
.flash.on { animation: flashOn 0.08s linear both; }
@keyframes flashOn { 0% { opacity: 0.8; } 45% { opacity: 0.8; } 100% { opacity: 0; } }
/* speed lines: thin white streaks round the screen's edges, none in the middle (the floe stays clear) */
.speed { position: fixed; inset: -10%; z-index: 2; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0.95) 0deg 0.7deg, transparent 0.7deg 4.3deg, rgba(220, 240, 255, 0.8) 4.3deg 4.8deg, transparent 4.8deg 9deg);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, transparent 62%, #000 92%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, transparent 62%, #000 92%); }
.speed.run { opacity: 0.32; animation: speedFlick 0.18s steps(2) infinite; }
.speed.burst { animation: speedBurst 0.6s ease-out both; }
@keyframes speedFlick { 50% { rotate: 2deg; } }
@keyframes speedBurst { 0% { opacity: 0; scale: 1.25; } 12% { opacity: 1; } 100% { opacity: 0; scale: 1; rotate: 4deg; } }
@media (prefers-reduced-motion: reduce) {
  .sk.pop, .sk-plate.pop, .sk-puff.pop, .sk.imp, .sk-puff.imp { animation: skFade 0.25s ease-out both; }
  .speed.run, .speed.burst { animation: none; opacity: 0; }
}
@keyframes skFade { from { opacity: 0; } }
/* the words over the ice are stickers now (fx.js Popups): the old outline of .popup must not reach the sticker inside */
.popup { -webkit-text-stroke: 0; text-shadow: none; color: inherit; line-height: 1; }
.popup .sk { font-size: 1.12em; }
.popup.is-plate { font-size: 14px; }
.puffpop { position: absolute; left: 0; top: 0; pointer-events: none; }
@media (max-width: 760px), (max-height: 480px) { .popup.is-plate { font-size: 12px; } }
/* ---------- the countdown over the floe in the kit (#cd-flow on one's own, #cd-ready in a room): the number a big
   sticker (ice for 3 and 2, sun-yellow for 1), tilted one way then the other, popping with each beat; "Get ready!" a
   badge plate over it ---------- */
.cd.over .cd-num.sk { min-width: 0; padding: 0.06em 0.16em; font-size: 150px; line-height: 0.92; letter-spacing: 0; color: var(--ink); -webkit-text-stroke: var(--ow) var(--ink); text-shadow: none; transform: skewX(-8deg); transform-origin: 50% 60%; }
.cd.over .cd-num.sk.tl { rotate: -8deg; }
.cd.over .cd-num.sk.tr { rotate: 7deg; }
.cd.over .cd-num.sk.pop, .cd.over.late .cd-num.sk.pop { animation: skPop 0.28s cubic-bezier(0.3, 0.9, 0.4, 1) both; }
.cd.over.solo .cd-line.sk-plate { display: inline-block; justify-self: center; margin: 0 0 4px; font-size: 22px; color: #f4fbff; -webkit-text-stroke: 0; text-shadow: 0 0.07em 0 #06101f; rotate: -3deg; animation: skPop 0.3s cubic-bezier(0.3, 0.9, 0.4, 1) both; }
@media (max-width: 640px), (max-height: 480px) {
  .cd.over .cd-num.sk { font-size: 100px; }
  .cd.over.solo .cd-line.sk-plate { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .cd.over .cd-num.sk.pop, .cd.over.late .cd-num.sk.pop, .cd.over.solo .cd-line.sk-plate { animation: skFade 0.3s ease-out both; }
}
/* ---------- the start call in the kit (main.js goNow): two stickers, the word big and under it a smaller one with
   "!!", tilted; they squash in (0.2 s), hold, and fly up and away by 0.8 s; a sunburst turns slowly behind them ---------- */
.go-call { position: relative; display: grid; justify-items: center; rotate: -6deg; }
.go-big .sk { display: block; text-transform: uppercase; }
.go-1 { font-size: min(180px, calc(80vw / var(--n, 2))); line-height: 0.95; --ow: 0.26em; --bw: 0.13em; }
.go-2 { font-size: min(64px, calc(78vw / var(--n2, 5))); margin-top: -0.12em; translate: 0.7em 0; rotate: 3deg; --ow: 0.28em; --bw: 0.14em; }
.go-big.on .go-1 { animation: goIn 0.8s linear both; }
.go-big.on .go-2 { animation: goIn2 0.8s linear both; }
@keyframes goIn { 0% { scale: 1.7 1.3; opacity: 0; } 6% { opacity: 1; } 14% { scale: 0.88 1.06; } 21% { scale: 1.05 0.98; } 27% { scale: 1; } 72% { scale: 1; opacity: 1; translate: 0 0; } 100% { scale: 0.55; opacity: 0; translate: 0 -0.6em; } }
@keyframes goIn2 { 0%, 8% { scale: 1.8 1.3; opacity: 0; } 14% { opacity: 1; } 21% { scale: 0.88 1.06; } 28% { scale: 1.05 0.98; } 34% { scale: 1; } 72% { scale: 1; opacity: 1; } 100% { scale: 0.55; opacity: 0; translate: 0.7em -1.6em; } }
.go-rays { position: absolute; left: 50%; top: 50%; width: min(760px, 150vmin); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.9) 0deg 9deg, rgba(120, 200, 255, 0.75) 9deg 18deg);
  -webkit-mask-image: radial-gradient(circle, transparent 12%, #000 22%, rgba(0, 0, 0, 0.55) 46%, transparent 70%); mask-image: radial-gradient(circle, transparent 12%, #000 22%, rgba(0, 0, 0, 0.55) 46%, transparent 70%); }
.go-big.on .go-rays { animation: goRays 0.8s ease-out both; }
@keyframes goRays { 0% { opacity: 0; scale: 0.4; rotate: 0deg; } 12% { opacity: 0.95; } 62% { opacity: 0.75; } 100% { opacity: 0; scale: 1.15; rotate: 24deg; } }
@media (max-width: 640px), (max-height: 480px) {
  .go-1 { font-size: min(118px, calc(80vw / var(--n, 2))); }
  .go-2 { font-size: min(44px, calc(78vw / var(--n2, 5))); }
  .go-rays { width: min(460px, 120vmin); }
}
@media (prefers-reduced-motion: reduce) {
  .go-big.on .go-1, .go-big.on .go-2 { animation: goFade 0.8s ease-out both; }
  .go-rays { display: none; }
}
/* ---------- the band under the HUD in the kit: a dark ice-metal plate with a rivet in each corner ("Match 2", a twist,
   a crown); a won match's a gold one ---------- */
.banner { --rv: radial-gradient(circle, #dceaf7 0 2.5px, #5c7a9c 3px 4px, transparent 4.5px); color: #f4fbff; border: 2.5px solid #0a1630; border-radius: 12px;
  background: var(--rv) 4px 4px / 14px 14px no-repeat, var(--rv) calc(100% - 4px) 4px / 14px 14px no-repeat, var(--rv) 4px calc(100% - 4px) / 14px 14px no-repeat, var(--rv) calc(100% - 4px) calc(100% - 4px) / 14px 14px no-repeat, linear-gradient(180deg, #34588a 0%, #1d3a63 55%, #142a4a 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 4px 0 #0a1630, 0 8px 18px rgba(0, 0, 0, 0.25); }
.banner b { color: #ffffff; text-shadow: 0 2px 0 #06101f; letter-spacing: 0.02em; }
.banner span { color: #cfe6ff; }
.banner.win { --rv: radial-gradient(circle, #fff6cf 0 2.5px, #a8670c 3px 4px, transparent 4.5px); border-color: #2a1606; color: #2a1606; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 0 rgba(120, 60, 0, 0.3), 0 4px 0 #2a1606, 0 8px 18px rgba(0, 0, 0, 0.25);
  background: var(--rv) 4px 4px / 14px 14px no-repeat, var(--rv) calc(100% - 4px) 4px / 14px 14px no-repeat, var(--rv) 4px calc(100% - 4px) / 14px 14px no-repeat, var(--rv) calc(100% - 4px) calc(100% - 4px) / 14px 14px no-repeat, linear-gradient(180deg, #ffe58a 0%, #ffc22e 55%, #f0a000 100%); }
.banner.win b { color: #2a1606; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
.banner.win span { color: #5a3608; }
.banner .stk-tag span, .banner .tw-tag span { color: var(--ink); }
/* the showcase's "You win!" / "… wins!": a big sticker (gold, or ice for a rival) */
.sh-who { -webkit-text-stroke: 0; text-shadow: none; padding: 10px 14px 8px; }
.sh-who .sk { font-size: 1em; --ow: 0.24em; --bw: 0.12em; }
/* STREAK HEAT: flames behind the streak's tag from three wins in a row, hotter at 5 and 8 (main.js heat) */
.heat1, .heat2, .heat3 { position: relative; isolation: isolate; }
.banner .stk-tag.heat1, .banner .stk-tag.heat2, .banner .stk-tag.heat3 { overflow: visible; }
.heat1::before, .heat2::before, .heat3::before { content: ''; position: absolute; left: -6px; right: -6px; bottom: 30%; height: 1.5em; z-index: -1; pointer-events: none; transform-origin: 50% 100%;
  --c1: #ffe14a; --c2: #ff7a1a; --c3: rgba(230, 50, 20, 0);
  background: radial-gradient(ellipse 34% 100% at 50% 100%, var(--c1) 0 22%, var(--c2) 48%, var(--c3) 74%) 0 100% / 0.85em 100% repeat-x,
              radial-gradient(ellipse 34% 100% at 50% 100%, var(--c1) 0 18%, var(--c2) 44%, var(--c3) 70%) 0.42em 100% / 0.85em 78% repeat-x;
  animation: flick 0.32s steps(3) infinite alternate; }
.heat2::before { height: 1.9em; --c1: #fff3a0; --c2: #ff5a14; }
.heat3::before { height: 2.3em; --c1: #ffffff; --c2: #ff3c1e; background: radial-gradient(ellipse 34% 100% at 50% 100%, #ffffff 0 14%, #9fe0ff 24%, #ffd21f 40%, #ff3c1e 58%, rgba(200, 20, 60, 0) 76%) 0 100% / 0.85em 100% repeat-x, radial-gradient(ellipse 34% 100% at 50% 100%, #fff6c0 0 18%, #ff6a1a 46%, rgba(230, 50, 20, 0) 72%) 0.42em 100% / 0.85em 80% repeat-x; }
.sh-streak.heat1::before, .sh-streak.heat2::before, .sh-streak.heat3::before { left: 8%; right: 8%; bottom: 45%; }
@keyframes flick { 0% { scale: 1 0.9; } 50% { scale: 1.02 1.08; } 100% { scale: 0.98 1; } }
@media (prefers-reduced-motion: reduce) { .heat1::before, .heat2::before, .heat3::before { animation: none; } }
.banner .tw-next { color: #cfe6ff !important; }
