/* Shared frame for Tabcade's own games (see kit.js): cards, score and mute button.
   Each game picks its own colours with --tg-* on body (see its index.html). */
* { box-sizing: border-box; }
:root { --tg-card: #ffffff; --tg-ink: #1c2340; --tg-btn: #ffb31a; --tg-btn-ink: #3a2400; --tg-sub: #5d6788; --tg-hud: #ffffff; --tg-hud-edge: #1c2340; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #8fd3ff; color: var(--tg-ink); font: 700 16px/1.4 "Fredoka", Figtree, system-ui, sans-serif; }
canvas { display: block; width: 100vw; height: 100vh; touch-action: none; user-select: none; -webkit-user-select: none; }
/* small pictures inside menus (shop items, flags) keep their own size, not the full-screen game size */
.tg-card canvas { width: auto; height: auto; max-width: 100%; }
[hidden] { display: none !important; }
.tg-hud {
  position: fixed; left: 0; right: 0; top: 14px; text-align: center; pointer-events: none;
  font: 700 54px/1 "Fredoka", system-ui, sans-serif; color: var(--tg-hud);
  -webkit-text-stroke: 7px var(--tg-hud-edge); paint-order: stroke fill;
}
.tg-mute { position: fixed; right: 12px; top: 12px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .22); color: #fff; cursor: pointer; }
.tg-mute svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tg-card { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(10, 20, 50, .35); animation: tg-fade .25s ease both; }
.tg-box { width: min(420px, 100%); padding: 24px 22px 26px; text-align: center; background: var(--tg-card); border-radius: 4px; box-shadow: 0 10px 0 rgba(0, 0, 0, .18); animation: tg-pop .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.tg-box h1 { margin: 0 0 8px; font: 700 46px/1 "Fredoka", system-ui, sans-serif; color: var(--tg-ink); }
.tg-box p { margin: 0 0 8px; color: var(--tg-sub); }
.tg-box .tg-big { font: 700 84px/1 "Fredoka", system-ui, sans-serif; color: var(--tg-ink); margin: 2px 0 4px; }
.tg-btn {
  margin-top: 12px; height: 62px; min-width: 200px; padding: 0 34px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--tg-btn); color: var(--tg-btn-ink); box-shadow: 0 6px 0 rgba(0, 0, 0, .25);
  font: 700 30px/1 "Fredoka", system-ui, sans-serif; transition: transform .08s;
}
.tg-btn:hover { filter: brightness(1.06); }
.tg-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.tg-btn:focus-visible { outline: 4px solid var(--tg-ink); outline-offset: 3px; }
@keyframes tg-fade { from { opacity: 0; } }
@keyframes tg-pop { from { transform: scale(.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tg-card, .tg-box { animation: none; } }

/* coins, streak and daily missions on the cards, and pop-up messages (kit.js, games with missions) */
.tg-box { max-height: calc(100vh - 32px); overflow-y: auto; }
.tg-meta { display: flex; justify-content: center; gap: 10px; margin: 2px 0 8px; }
.tg-coins, .tg-streak { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 4px; font: 700 17px/1.2 "Fredoka", system-ui, sans-serif; }
.tg-coins { background: #fff4cf; color: #8a5a00; }
.tg-coins svg { width: 20px; height: 20px; fill: #ffc531; stroke: #8a5a00; stroke-width: 1.6; stroke-linecap: round; }
.tg-streak { background: #ffe3d6; color: #b33a00; }
.tg-missions { margin: 10px 0 2px; padding: 10px 12px; border-radius: 4px; background: #f2f5fb; text-align: left; }
.tg-mh { font: 700 13px/1 "Fredoka", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--tg-sub); margin-bottom: 6px; }
.tg-mission { display: grid; grid-template-columns: 1fr 70px 46px; align-items: center; gap: 8px; padding: 4px 0; font: 600 14px/1.25 "Fredoka", system-ui, sans-serif; color: var(--tg-ink); }
.tg-mission .tg-bar { height: 9px; border-radius: 4px; background: #dde3ef; overflow: hidden; }
.tg-mission .tg-bar i { display: block; height: 100%; background: #ffb31a; border-radius: 4px; }
.tg-mission .tg-mr { text-align: right; color: #8a5a00; }
.tg-mission.done { color: #2c8a3c; }
.tg-mission.done .tg-bar i { background: #3cc35a; }
.tg-mission.done .tg-mr { color: #2c8a3c; }
.tg-toasts { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; z-index: 5; }
.tg-toast { padding: 10px 18px; border-radius: 4px; background: #1c2340; color: #fff; white-space: nowrap; font: 700 18px/1.2 "Fredoka", system-ui, sans-serif; box-shadow: 0 6px 0 rgba(0, 0, 0, .2); animation: tg-pop .3s cubic-bezier(.2, 1.4, .4, 1) both; transition: opacity .4s, transform .4s; }
.tg-toast.win { background: #2c9a44; }
.tg-toast.out { opacity: 0; transform: translateY(-10px); }

.tg-btn.tg-alt { display: block; margin: 10px auto 0; background: #e8ebf5; color: #1c2340; }

/* player level, XP bar and the reward road */
.tg-lvp { margin: 6px 0 10px; padding: 10px 12px; border-radius: 4px; background: rgba(28, 35, 64, .06); text-align: left; }
.tg-lvh { display: flex; align-items: center; gap: 12px; }
.tg-lv { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--tg-btn); color: var(--tg-btn-ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .22); font-family: "Fredoka", system-ui, sans-serif; line-height: 1; }
.tg-lv small { font-size: 11px; letter-spacing: .08em; }
.tg-lv b { font-size: 22px; }
.tg-lvr { flex: 1; min-width: 0; }
.tg-xpbar { height: 14px; border-radius: 7px; background: rgba(28, 35, 64, .15); overflow: hidden; }
.tg-xpbar i { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, #5ee07a, #26b34a); transition: width 1s cubic-bezier(.3, .8, .3, 1) .2s; }
.tg-xpt { margin-top: 4px; font-size: 13px; color: var(--tg-sub); white-space: pre; }
.tg-gains { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px; }
.tg-gains span { padding: 2px 8px; border-radius: 4px; background: #e3f7e8; color: #1d6b33; font-size: 13px; }
.tg-lvup { margin-top: 8px; padding: 8px 10px; border-radius: 4px; background: #fff4cf; color: #8a5a00; animation: tg-pop .5s cubic-bezier(.2, 1.4, .4, 1) 1s both; }
.tg-next { margin-top: 8px; font-size: 13px; color: var(--tg-sub); }
.tg-link { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--tg-ink); font: 700 13px/1.6 "Fredoka", system-ui, sans-serif; text-decoration: underline; cursor: pointer; }
.tg-road { display: grid; gap: 3px; margin-top: 6px; max-height: 180px; overflow-y: auto; }
.tg-rw { padding: 3px 8px; border-radius: 4px; background: rgba(28, 35, 64, .06); color: var(--tg-sub); font-size: 13px; }
.tg-rw.big { color: var(--tg-ink); }
.tg-rw.got { background: #e3f7e8; color: #1d6b33; }

/* ---------- full-screen menu (start and game-over): hero column + sections ---------- */
.tg-box.tg-full { position: fixed; inset: 0; width: auto; height: auto; max-height: none; background: linear-gradient(155deg, var(--tg-menu-a, #1f2a5c) 0%, var(--tg-menu-b, #0d1230) 100%) !important; display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); padding: 0 !important; border-radius: 0; box-shadow: none; text-align: left; overflow: hidden; animation: tg-fade .2s ease both; }
.tg-hero { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 28px 24px 24px; overflow-y: auto; color: #fff; }
.tg-full .tg-hero h1 { margin: 0; font-size: 50px; line-height: .95; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .25); animation: tg-pop .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.tg-full .tg-hero p { margin: 0; color: rgba(255, 255, 255, .78); }
.tg-full .tg-hero .tg-big { font-size: 76px; color: #fff; text-shadow: 0 5px 0 rgba(0, 0, 0, .25); }
.tg-hero .tg-meta { justify-content: flex-start; margin: 0; }
.tg-hero .tg-btn { width: 100%; min-width: 0; margin-top: auto; height: 68px; font-size: 32px; }
.tg-hero .tg-lvp { margin: 0; background: rgba(255, 255, 255, .1); }
.tg-hero .tg-xpbar { background: rgba(255, 255, 255, .18); }
.tg-hero .tg-xpt, .tg-hero .tg-next { color: rgba(255, 255, 255, .78); }
.tg-hero .tg-gains span { background: rgba(94, 224, 122, .2); color: #b8ffc8; }
.tg-full { --tg-panel: color-mix(in srgb, var(--tg-card) 88%, var(--tg-menu-a, #1f2a5c)); }
.tg-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--tg-panel); }
.tg-tabs { display: flex; flex: none; gap: 4px; padding: 10px 70px 0 10px; background: var(--tg-menu-b, #0d1230); overflow-x: auto; scrollbar-width: none; }
.tg-tab { flex: none; height: 44px; padding: 0 18px; border: 0; border-radius: 4px 4px 0 0; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .8); font: 700 17px/1 "Fredoka", system-ui, sans-serif; cursor: pointer; }
.tg-tab:hover { background: rgba(255, 255, 255, .18); }
.tg-tab.on { background: var(--tg-panel); color: var(--tg-ink); }
.tg-tab:focus-visible { outline: 3px solid var(--tg-btn); outline-offset: -3px; }
.tg-secs { flex: 1; min-height: 0; overflow-y: auto; }
.tg-sec { min-height: 100%; padding: 22px 24px 28px; text-align: center; animation: tg-fade .18s ease both; }
.tg-secin { width: min(860px, 100%); margin: 0 auto; }
.tg-sec .tg-missions { margin: 0; padding: 0; background: none; }
.tg-sec .tg-mission { padding: 10px 12px; margin-bottom: 6px; border-radius: 4px; background: rgba(28, 35, 64, .06); font-size: 16px; grid-template-columns: 1fr 120px 56px; }
.tg-sec .tg-mh { margin: 0 0 12px; font-size: 15px; text-align: left; }
.tg-howto p { margin: 0; font-size: 19px; text-align: left; color: var(--tg-ink); }
.tg-sec .tg-road { max-height: none; gap: 6px; margin: 0; }
.tg-sec .tg-rw { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; font-size: 16px; text-align: left; }
.tg-rw b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(28, 35, 64, .12); font-size: 15px; }
.tg-rw i { font-style: normal; font-size: 13px; }
.tg-rw.big b { background: var(--tg-btn); color: var(--tg-btn-ink); }
.tg-rw.got b { background: #3cc35a; color: #fff; }
.tg-rw.next { outline: 3px solid var(--tg-btn); outline-offset: -3px; color: var(--tg-ink); }
@media (max-width: 760px) {
  .tg-box.tg-full { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); overflow-y: auto; }
  .tg-hero { padding: 16px 16px 14px; gap: 8px; overflow: visible; }
  .tg-full .tg-hero h1 { font-size: 34px; padding-right: 52px; }
  .tg-full .tg-hero .tg-big { font-size: 52px; }
  .tg-hero .tg-btn { height: 58px; font-size: 26px; margin-top: 4px; }
  .tg-panel { min-height: 60vh; }
  .tg-tabs { padding-right: 10px; }
  .tg-tab { height: 40px; padding: 0 14px; font-size: 15px; }
  .tg-sec { padding: 16px 14px 22px; }
  .tg-secs { overflow: visible; }
}
.tg-sec .tg-rw.has-pic { grid-template-columns: 44px 96px 1fr auto; }
.tg-rwpic { display: grid; place-items: center; width: 96px; height: 60px; border-radius: 4px; background: rgba(28, 35, 64, .08); overflow: hidden; }
.tg-rwpic canvas, .tg-rwpic img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.tg-rw:not(.got) .tg-rwpic > * { filter: saturate(.85); }
/* tutorial: a coach bubble under the score and a pointing hand (see kit.js tutorial) */
.tg-coach { position: fixed; left: 50%; top: 78px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 24px)); padding: 10px 10px 10px 12px; border-radius: 14px; background: rgba(16, 22, 44, .9); color: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); font: 700 20px/1.25 "Fredoka", system-ui, sans-serif; animation: tg-pop .3s cubic-bezier(.2, 1.4, .4, 1) both; }
.tg-cnum { flex: none; padding: 4px 8px; border-radius: 8px; background: var(--tg-btn); color: var(--tg-btn-ink); font-size: 14px; }
.tg-csay { flex: 1; }
.tg-cskip { flex: none; padding: 6px 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .16); color: #fff; font: 700 13px/1 "Fredoka", system-ui, sans-serif; cursor: pointer; }
.tg-cskip:hover { background: rgba(255, 255, 255, .28); }
.tg-coach.ok { background: #1f9d55; }
.tg-coach.ok .tg-csay { animation: tg-pop .3s cubic-bezier(.2, 1.4, .4, 1) both; }
body:has(.tg-coach:not([hidden])) .tg-toasts { top: 150px; }
.tg-hand { position: fixed; z-index: 4; width: 0; height: 0; pointer-events: none; }
.tg-hand::before { content: ""; position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 3px rgba(16, 22, 44, .5); animation: tg-ring 1.1s ease-out infinite; }
.tg-hand::after { content: "\1F446"; position: absolute; left: -6px; top: 4px; font-size: 40px; line-height: 1; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); animation: tg-tap 1.1s ease-in-out infinite; }
.tg-hand.h-hold::before { animation: tg-holdring 1.6s ease-in-out infinite; }
.tg-hand.h-hold::after { animation: tg-press 1.6s ease-in-out infinite; }
.tg-hand.h-left::after { animation: tg-swl 1.2s ease-in-out infinite; }
.tg-hand.h-right::after { animation: tg-swr 1.2s ease-in-out infinite; }
.tg-hand.h-up::after { animation: tg-swu 1.2s ease-in-out infinite; }
.tg-hand.h-down::after { animation: tg-swd 1.2s ease-in-out infinite; }
.tg-hand.h-drag::after { animation: tg-drag 1.8s ease-in-out infinite; }
.tg-hand.h-left::before, .tg-hand.h-right::before, .tg-hand.h-up::before, .tg-hand.h-down::before, .tg-hand.h-drag::before { animation: none; opacity: .55; }
@keyframes tg-ring { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes tg-tap { 0%, 100% { transform: translateY(8px); } 45% { transform: translateY(0); } 55% { transform: translateY(0) scale(.92); } }
@keyframes tg-holdring { 0%, 20% { transform: scale(.6); opacity: 0; } 40%, 85% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }
@keyframes tg-press { 0%, 20% { transform: translateY(10px); } 35%, 85% { transform: translateY(0) scale(.92); } 100% { transform: translateY(10px); } }
@keyframes tg-swl { 0% { transform: translateX(40px); opacity: 0; } 20% { opacity: 1; } 80% { transform: translateX(-40px); opacity: 1; } 100% { transform: translateX(-40px); opacity: 0; } }
@keyframes tg-swr { 0% { transform: translateX(-40px); opacity: 0; } 20% { opacity: 1; } 80% { transform: translateX(40px); opacity: 1; } 100% { transform: translateX(40px); opacity: 0; } }
@keyframes tg-swu { 0% { transform: translateY(40px); opacity: 0; } 20% { opacity: 1; } 80% { transform: translateY(-40px); opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
@keyframes tg-swd { 0% { transform: translateY(-40px); opacity: 0; } 20% { opacity: 1; } 80% { transform: translateY(40px); opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
@keyframes tg-drag { 0% { transform: translate(0, 0) scale(.92); } 50% { transform: translate(-60px, 30px) scale(.92); } 70%, 100% { transform: translate(-60px, 30px); opacity: 0; } }
.tg-tutb { margin-top: 10px; }
@media (max-width: 560px) { .tg-coach { top: 70px; font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .tg-hand::before, .tg-hand::after { animation: none !important; } }

/* ---------- online play (net-ui.js): the "Play online" tab, emote bubbles ---------- */
.tn { display: grid; gap: 10px; max-width: 520px; font: 600 15px/1.3 "Fredoka", system-ui, sans-serif; color: var(--tg-ink); text-align: left; }
.tn p { margin: 0; }
.tn-safe { padding: 8px 10px; border-radius: 4px; background: rgba(28, 35, 64, .08); color: var(--tg-ink); font-size: 13px; }
.tn-me, .tn-sub { color: var(--tg-sub); font-size: 13px; }
.tn-note { padding: 8px 10px; border-radius: 4px; background: #ffd9d9; color: #7a1414; }
.tn-big { width: 100%; }
.tn-row { display: flex; gap: 8px; }
.tn-row .tg-btn { flex: 1; margin: 0; }
.tn .tg-btn.tg-alt { margin: 0; }
.tn .tg-btn:disabled { opacity: .55; cursor: default; box-shadow: none; transform: none; }
.tn-join { display: flex; gap: 8px; align-items: stretch; }
.tn-join .tg-btn { flex: 1; }
.tn-code { width: 8.5ch; min-width: 0; padding: 0 12px; border: 2px solid rgba(28, 35, 64, .25); border-radius: 4px; background: #fff; color: #1c2340; font: 700 22px/1 "Fredoka", system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; text-align: center; }
.tn-code:focus-visible { outline: 3px solid var(--tg-btn); outline-offset: 1px; }
.tn-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 4px; background: rgba(28, 35, 64, .08); }
.tn-codel { flex-basis: 100%; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--tg-sub); }
.tn-codev { font: 700 40px/1 "Fredoka", system-ui, sans-serif; letter-spacing: .2em; }
.tn-copy, .tn-block, .tn-mute, .tn-e, .tn-emob { border: 0; border-radius: 4px; background: #e8ebf5; color: #1c2340; font: 700 14px/1 "Fredoka", system-ui, sans-serif; cursor: pointer; padding: 9px 12px; }
.tn-copy:hover, .tn-block:hover, .tn-mute:hover, .tn-e:hover, .tn-emob:hover { filter: brightness(.95); }
.tn-copy:focus-visible, .tn-block:focus-visible, .tn-mute:focus-visible, .tn-e:focus-visible, .tn-emob:focus-visible { outline: 3px solid var(--tg-ink); outline-offset: 2px; }
.tn-list { display: grid; gap: 6px; }
.tn-p { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 4px; background: rgba(28, 35, 64, .06); }
.tn-p.me { background: rgba(28, 35, 64, .12); }
.tn-p.gone { opacity: .55; }
.tn-p b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-tags { display: flex; gap: 6px; }
.tn-tags i { font-style: normal; font-size: 12px; padding: 3px 7px; border-radius: 3px; background: rgba(28, 35, 64, .12); }
.tn-tags i.ok { background: #cdeed5; color: #14502a; }
.tn-block { padding: 6px 9px; font-size: 12px; }
.tn-block.on { background: #ffd9d9; color: #7a1414; }
.tn-emorow { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-mt { margin: 4px 0 0; }
.tn-mute { justify-self: start; font-size: 13px; }
.tn-bubbles { position: fixed; left: 12px; bottom: 70px; z-index: 6; display: grid; gap: 6px; pointer-events: none; }
.tn-bubble { padding: 8px 12px; border-radius: 4px; background: #1c2340; color: #fff; font: 600 15px/1.2 "Fredoka", system-ui, sans-serif; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); animation: tg-pop .25s cubic-bezier(.2, 1.4, .4, 1) both; transition: opacity .4s; }
.tn-bubble b { color: #ffd95a; }
.tn-bubble.me { background: #2c9a44; }
.tn-bubble.me b { color: #fff; }
.tn-bubble.out { opacity: 0; }
.tn-emo { position: fixed; left: 12px; bottom: 12px; z-index: 6; display: flex; flex-direction: column-reverse; gap: 6px; align-items: flex-start; }
.tn-emo .tn-emob { background: rgba(0, 0, 0, .35); color: #fff; padding: 11px 14px; }
.tn-emobar { display: flex; flex-wrap: wrap; gap: 6px; max-width: 280px; }
@media (max-width: 520px) { .tn-codev { font-size: 32px; } .tn-row { flex-direction: column; } }

/* the waiting room (net-ui.js): full screen, room code at the top, one spot per seat */
.tn-inlobby .tg-card { visibility: hidden; }
.tn-lobby { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto 1fr; background: var(--tn-bg, rgba(12, 18, 40, .82)); color: var(--tn-ink, #fff); font: 600 15px/1.3 "Fredoka", system-ui, sans-serif; overflow: auto; }
.tn-ltop { position: sticky; top: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--tn-panel, #141c3a); border-bottom: 3px solid var(--tn-accent, var(--tg-btn, #ffb31a)); }
.tn-lcode { display: flex; align-items: baseline; gap: 10px; }
.tn-lcode .tn-codel { color: #aab3d6; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.tn-lcode .tn-codev { color: var(--tn-ink, #fff); font-size: 36px; }
.tn-lcount { margin-left: auto; color: #cdd4ef; }
.tn-lleave { border: 0; border-radius: 4px; padding: 9px 14px; background: #e8ebf5; color: #1c2340; font: 700 14px/1 "Fredoka", system-ui, sans-serif; cursor: pointer; }
.tn-lleave:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.tn-lmid { width: min(760px, 100%); margin: 0 auto; padding: 18px 16px 28px; display: grid; gap: 14px; align-content: start; }
.tn-lobby .tn-safe { background: rgba(255, 255, 255, .1); color: #e6e9f7; }
.tn-lobby .tn-sub { color: #cdd4ef; }
.tn-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tn-lobby .tn-p { background: rgba(255, 255, 255, .12); color: var(--tn-ink, #fff); min-height: 44px; }
.tn-lobby .tn-p.me { background: rgba(255, 179, 26, .28); }
.tn-lobby .tn-p.tn-open { justify-content: center; background: transparent; border: 2px dashed var(--tn-seat, rgba(255, 255, 255, .28)); color: var(--tn-seat, #aab3d6); }
.tn-lobby .tn-tags i { color: #cdd4ef; }
.tn-lact { display: grid; gap: 10px; max-width: 420px; }
@media (max-width: 560px) { .tn-lcode .tn-codev { font-size: 28px; } .tn-lcount { margin-left: 0; } }
.tn-lset { background: #ffb31a; color: #3a2400; }
.tn-lcount + .tn-lset { margin-left: 0; }

/* a game's own lobby (net: { lobby: {...} }): theme colours arrive as --tn-bg, --tn-panel, --tn-ink, --tn-accent,
   --tn-seat on .tn-lobby; .tn-themed re-derives the soft tones from the ink so light and dark themes both read */
.tn-lbg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.tn-ltitle { flex-basis: 100%; font: 700 20px/1.1 "Fredoka", system-ui, sans-serif; letter-spacing: .02em; color: var(--tn-accent, #ffb31a); }
.tn-themed .tn-safe { background: color-mix(in srgb, var(--tn-ink, #fff) 12%, transparent); color: var(--tn-ink, #fff); }
.tn-themed .tn-sub, .tn-themed .tn-lcount, .tn-themed .tn-lcode .tn-codel, .tn-themed .tn-tags i { color: color-mix(in srgb, var(--tn-ink, #fff) 78%, transparent); }
.tn-themed .tn-p { background: color-mix(in srgb, var(--tn-ink, #fff) 13%, transparent); }
.tn-themed .tn-p.me { background: color-mix(in srgb, var(--tn-accent, #ffb31a) 32%, transparent); }
.tn-themed .tn-p.tn-open { background: transparent; }
.tn-themed .tn-tags i { background: color-mix(in srgb, var(--tn-ink, #fff) 14%, transparent); }
.tn-themed .tn-lmid, .tn-lbg ~ .tn-lmid { background: color-mix(in srgb, var(--tn-bg, #0c1228) 70%, transparent); border-radius: 4px; }
.tn-seatl { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; opacity: .8; white-space: nowrap; }
.tn-lobby .tn-tags i.ok { background: #cdeed5; color: #14502a; }
.tn-kick { background: #ffe3c2; color: #6b3200; }

/* layouts */
.tn-lay-grid .tn-slots { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
.tn-lay-grid .tn-slots .tn-p { flex-direction: column; justify-content: center; text-align: center; min-height: 112px; }
.tn-lay-grid .tn-slots .tn-p b { flex: none; max-width: 100%; white-space: normal; }
.tn-lay-grid .tn-tags { flex-wrap: wrap; justify-content: center; }
.tn-lay-lanes .tn-slots { grid-template-columns: 1fr; gap: 3px; }
.tn-lay-lanes .tn-slots .tn-p { border-radius: 0; padding-left: 0; min-height: 46px; }
.tn-lay-lanes .tn-slots .tn-p.tn-open { justify-content: flex-start; border-width: 2px 0; }
.tn-lane { flex: none; width: 46px; align-self: stretch; display: grid; place-items: center; font: 700 22px/1 "Fredoka", system-ui, sans-serif; border-right: 3px solid var(--tn-accent, #ffb31a); }
.tn-teams { display: grid; grid-template-columns: repeat(var(--tn-k, 2), minmax(0, 1fr)); gap: 12px; align-items: start; }
.tn-team { display: grid; gap: 6px; align-content: start; padding: 10px; border-radius: 4px; background: rgba(255, 255, 255, .06); border-top: 5px solid var(--tn-accent, #ffb31a); }
.tn-team.tn-t0 { border-top-color: var(--tn-t0, #e2504a); }
.tn-team.tn-t1 { border-top-color: var(--tn-t1, #3f8fe0); }
.tn-team.tn-t2 { border-top-color: var(--tn-t2, #3fae5a); }
.tn-team.tn-t3 { border-top-color: var(--tn-t3, #e0a52a); }
.tn-teamh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 18px; }
.tn-teamh span { font-size: 13px; opacity: .8; }
.tn-switch { justify-self: start; }
.tn-tablewrap { position: relative; width: min(100%, 680px); aspect-ratio: 16 / 10; margin: 0 auto; }
.tn-tabletop { position: absolute; inset: 27% 25%; display: grid; place-items: center; border-radius: 50%; background: var(--tn-panel, #141c3a); border: 5px solid var(--tn-accent, #ffb31a); font: 700 18px/1.1 "Fredoka", system-ui, sans-serif; text-align: center; }
.tn-tablewrap .tn-p { position: absolute; transform: translate(-50%, -50%); width: 25%; min-height: 0; flex-wrap: wrap; justify-content: center; padding: 6px 8px; font-size: 13px; text-align: center; }
.tn-tablewrap .tn-p b { flex: 1 0 100%; }
.tn-tablewrap .tn-block { padding: 4px 7px; }

/* countdown, spectators, Ready, the cup and the results board */
.tn-count { display: flex; align-items: baseline; justify-content: center; gap: 12px; padding: 10px 14px; border-radius: 4px; background: var(--tn-accent, #ffb31a); color: #1c2340; font-size: 18px; }
.tn-count b { font: 700 44px/1 "Fredoka", system-ui, sans-serif; min-width: 1.2ch; text-align: center; }
.tn-watch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 2px dashed var(--tn-seat, rgba(255, 255, 255, .28)); }
.tn-watchl { flex-basis: 100%; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.tn-watch .tn-p { flex: 1 1 220px; }
.tn-ready.on { background: #2c9a44; color: #fff; }
.tn-cup, .tn-places { display: grid; gap: 8px; padding: 10px; border-radius: 4px; background: rgba(255, 255, 255, .08); }
.tn-cuph { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.tn-champ { font: 700 22px/1.2 "Fredoka", system-ui, sans-serif; color: var(--tn-accent, #ffb31a); }
.tn-cuprounds { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: center; }
.tn-cupr { display: grid; gap: 8px; }
.tn-cupm { display: grid; gap: 2px; padding: 6px 8px; border-radius: 4px; background: rgba(0, 0, 0, .22); border-left: 4px solid transparent; font-size: 13px; }
.tn-cupm.now { border-left-color: var(--tn-accent, #ffb31a); }
.tn-cupp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-cupp.win { font-weight: 700; }
.tn-cupp.lost { opacity: .55; text-decoration: line-through; }
.tn-cupnow { font-style: normal; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--tn-accent, #ffb31a); }
.tn-place { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; background: rgba(0, 0, 0, .22); }
.tn-place.first { background: var(--tn-accent, #ffb31a); color: #1c2340; }
.tn-place b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-placen { width: 2ch; text-align: right; font-weight: 700; }
/* the same boards inside the menu card (after a match, before the room is back in the lobby) */
.tn .tn-cup, .tn .tn-places { background: rgba(28, 35, 64, .08); }
.tn .tn-cupm, .tn .tn-place { background: rgba(28, 35, 64, .08); }
.tn .tn-teams { gap: 8px; }
.tn .tn-team { background: rgba(28, 35, 64, .05); padding: 8px; }
.tn .tn-tablewrap { aspect-ratio: auto; display: grid; gap: 6px; }
.tn .tn-tablewrap .tn-p { position: static; transform: none; width: auto; }
.tn .tn-tabletop { display: none; }
@media (max-width: 560px) {
  .tn-teams { grid-template-columns: 1fr; }
  .tn-tablewrap { aspect-ratio: auto; display: grid; gap: 6px; }
  .tn-tablewrap .tn-p { position: static; transform: none; width: auto; }
  .tn-tabletop { display: none; }
  .tn-cuprounds { grid-auto-flow: row; }
  .tn-count b { font-size: 34px; }
}

/* per-game skins (games/<id>/skin.css + skin.js, see mountSkin in kit.js) */
.tg-full > canvas.tg-skinbg { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; pointer-events: none; z-index: 0; }
.tg-full > .tg-hero, .tg-full > .tg-panel { position: relative; z-index: 1; }
.tg-acct { display: grid; gap: 1px; padding: 8px 12px; border-radius: 4px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 14px; line-height: 1.3; }
.tg-acct b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-acct span { color: rgba(255, 255, 255, .75); font-weight: 600; }
.tg-acct .tg-link { justify-self: start; color: #fff; font-size: 15px; }
/* The Play button on every menu: never squashed, never small, gently pulses (Jordan 2026-11-14 "always make the play button very visible") */
.tg-full .tg-hero > .tg-btn { flex-shrink: 0 !important; min-height: 56px !important; position: sticky; bottom: 8px; z-index: 2; animation: tg-playpulse 1.6s ease-in-out infinite; }
.tg-full .tg-hero > .tg-btn:hover, .tg-full .tg-hero > .tg-btn:focus-visible { animation-play-state: paused; }
@keyframes tg-playpulse { 0%, 100% { scale: 1; } 50% { scale: 1.045; } }
@media (prefers-reduced-motion: reduce) { .tg-full .tg-hero > .tg-btn { animation: none; } }
/* Play looks the same in every game so it is found at once (Jordan 2026-11-14: "the play buttons are not so obvious
   and took me some long time to find"): bright yellow, black text, a dark ring, a play triangle, big. Each game keeps
   its own button shape and font. */
.tg-full .tg-hero > .tg-btn:not(.tg-alt) {
  background: #ffd60a !important; color: #111111 !important; filter: none !important;
  box-shadow: inset 0 0 0 4px #111111, inset 0 -8px 0 rgba(0, 0, 0, .22) !important;
  min-height: 72px !important; min-width: min(250px, 100%) !important; padding-left: 28px !important; padding-right: 28px !important;
  font-size: 36px !important; line-height: 1.05 !important; font-weight: 800 !important; text-shadow: none !important; letter-spacing: .03em !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 14px !important;
}
.tg-full .tg-hero > .tg-btn:not(.tg-alt):hover { background: #ffe14d !important; }
.tg-full .tg-hero > .tg-btn:not(.tg-alt)::before {
  content: "" !important; display: block !important; flex: none !important; width: 0 !important; height: 0 !important; margin: 0 !important;
  border-radius: 0 !important; background: none !important; box-shadow: none !important;
  border-style: solid !important; border-color: transparent transparent transparent #111111 !important; border-width: 14px 0 14px 22px !important;
}
.tg-full .tg-hero > .tg-btn:not(.tg-alt):focus-visible { outline: 4px solid #ffffff !important; outline-offset: 3px !important; }
.tg-full .tg-hero > .tg-btn:not(.tg-alt) { height: auto !important; max-height: none !important; }
.tg-full .tg-hero > .tg-btn.tg-playlong:not(.tg-alt) { font-size: 25px !important; }

/* revive offer + ad placeholder (kit.js reviveOffer / playAds) */
.tg-revive h1, .tg-adph h1 { font-size: 40px; }
.tg-revive .tg-revive-go { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 72px; margin: 6px 0 10px; background: #ffd60a; color: #111; box-shadow: inset 0 0 0 4px #111, inset 0 -8px 0 rgba(0, 0, 0, .22); font-size: 30px; font-weight: 800; }
.tg-revive .tg-revive-go small { font-size: 15px; font-weight: 700; opacity: .8; }
.tg-revive .tg-btn.tg-alt { width: 100%; }
.tg-adslot { display: grid; place-items: center; height: 180px; margin: 6px 0 10px; border: 3px dashed var(--tg-sub, #888); border-radius: 6px; color: var(--tg-sub, #888); font: 700 18px/1 "Fredoka", system-ui, sans-serif; }
.tg-adleft { font: 800 28px/1 "Fredoka", system-ui, sans-serif; color: var(--tg-ink, #121726); }
