/* Tumble: pixel-classic game screen inside the Elysa shell. */
.tb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .tb-grid { grid-template-columns: 1fr; } }
.tb { --px: "Press Start 2P", ui-monospace, monospace; --tb-bg: #140c2a; --tb-edge: #3a2360; --tb-hi: #5a3a90; --tb-ink: #efe6ff; --tb-mint: #97fce4; --tb-pink: #ff8fc8;
  display: grid; gap: 0; min-width: 0; background: var(--tb-bg); border: 4px solid var(--tb-edge); border-radius: 6px; box-shadow: 0 0 0 4px #0b0618, 0 30px 60px -30px #000; font: 10px/1.4 var(--px); color: var(--tb-ink); }
.tb__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 12px; border-bottom: 4px solid var(--tb-edge); }
.tb__day { color: var(--tb-bg); background: var(--tb-mint); padding: 5px 6px 4px; }
.tb__name { color: var(--tb-mint); }
.tb__spacer { flex: 1; }
.tb__stat b { color: var(--tb-mint); font-weight: 400; font-variant-numeric: tabular-nums; }
.tb__screen { position: relative; background: #0b0618; line-height: 0; overflow: hidden; }
#tb-canvas { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; image-rendering: pixelated; image-rendering: crisp-edges; cursor: crosshair; margin: 0 auto; touch-action: manipulation; }
.tb__card { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 16px; text-align: center; line-height: 1.5;
  background: radial-gradient(ellipse at center, rgba(20, 12, 42, 0.78), rgba(10, 6, 24, 0.94)); }
.tb__card-kicker { margin: 0; color: var(--tb-pink); font-size: 10px; letter-spacing: 0.08em; }
.tb__card-title { margin: 0; font: 400 clamp(16px, 2.6vw, 28px)/1.3 var(--px); color: var(--tb-mint); text-shadow: 3px 3px 0 #3a2360; }
.tb__card-goal { margin: 0; font-size: 11px; color: var(--tb-ink); max-width: 44ch; }
.tb__card-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tb__btn { font: 400 12px/1 var(--px); color: var(--tb-ink); background: #2c1a4d; border: 0; padding: 12px 16px 10px; cursor: pointer; text-decoration: none;
  box-shadow: inset -4px -4px 0 #140a26, inset 4px 4px 0 #4a3079; }
.tb__btn:hover { background: #3a2366; }
.tb__btn--go { background: var(--tb-mint); color: #140c2a; box-shadow: inset -4px -4px 0 #3fb89c, inset 4px 4px 0 #d8fff6; }
.tb__btn--go:hover { background: #b8ffee; }
.tb__btn:focus-visible, .tb__key:focus-visible, .tb__job:focus-visible { outline: 3px solid var(--tb-pink); outline-offset: 2px; }
.tb__paused { position: absolute; inset: 0; display: grid; place-content: center; font: 400 22px/1 var(--px); color: #fff; background: rgba(10, 6, 24, 0.45); pointer-events: none; text-shadow: 3px 3px 0 #3a2360; }
.tb__bar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; padding: 10px; border-top: 4px solid var(--tb-edge); background: #1b1033; }
.tb__rate, .tb__ctl { display: flex; gap: 4px; align-items: stretch; }
.tb__rate-n { display: grid; place-content: center; text-align: center; min-width: 44px; background: #0f0820; padding: 4px; }
.tb__rate-n b { font-weight: 400; font-size: 12px; color: var(--tb-mint); }
.tb__rate-n small { font-size: 7px; color: #9b8cc4; }
.tb__key { font: 400 10px/1 var(--px); padding: 0 8px; color: var(--tb-ink); background: #2c1a4d; border: 0; min-width: 40px; cursor: pointer; box-shadow: inset -3px -3px 0 #140a26, inset 3px 3px 0 #4a3079; }
.tb__key:hover { background: #3a2366; }
.tb__key[aria-pressed="true"] { background: #3d2a70; color: var(--tb-mint); }
.tb__key[aria-pressed="false"]#tb-sound, .tb__key[aria-pressed="false"]#tb-music { color: #6c5a96; }
.tb__key--nuke { color: var(--tb-pink); }
.tb__key--nuke.is-armed { background: var(--tb-pink); color: #140c2a; }
.tb__jobs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.tb__job { position: relative; display: grid; justify-items: center; gap: 3px; min-width: 54px; flex: 1; padding: 6px 4px 5px; background: #2c1a4d; border: 0; color: var(--tb-ink); cursor: pointer;
  font: 400 7px/1 var(--px); box-shadow: inset -3px -3px 0 #140a26, inset 3px 3px 0 #4a3079; }
.tb__job:hover { background: #3a2366; }
.tb__job canvas { width: 30px; height: 36px; image-rendering: pixelated; }
.tb__job .n { font-size: 11px; color: var(--tb-mint); }
.tb__job .k { position: absolute; top: 4px; left: 5px; color: #7d6aa8; }
.tb__job[aria-pressed="true"] { background: var(--tb-mint); color: #140c2a; box-shadow: inset -3px -3px 0 #3fb89c, inset 3px 3px 0 #d8fff6; }
.tb__job[aria-pressed="true"] .n, .tb__job[aria-pressed="true"] .k { color: #140c2a; }
.tb__job:disabled { opacity: 0.35; cursor: default; }
.tb__job.is-flash { animation: tbflash 280ms steps(2) 2; }
@keyframes tbflash { 50% { background: var(--tb-pink); } }
.tb__hint { margin: 0; padding: 8px 12px 10px; font-size: 8px; color: #8d7fb6; }
.tb-facts { display: grid; gap: 10px; margin: 0; }
.tb-facts div { display: flex; justify-content: space-between; gap: 12px; }
.tb-facts dt { color: var(--mist); }
.tb-facts dd { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tb-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--mist); }
.tb-legend li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; }
.tb-legend canvas { width: 20px; height: 24px; image-rendering: pixelated; }
.tb-legend b { color: var(--ink); }
@media (max-width: 640px) { .tb { font-size: 8px; } .tb__job { min-width: 44px; } .tb__hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .tb__job.is-flash { animation: none; } }
.tb__card-link { font-size: 9px; color: #9b8cc4; }
.tb__card-link:hover { color: var(--tb-mint); }
.tb__day--practice { background: var(--tb-pink); }
.tb__card-post { margin: 0; font-size: 9px; color: var(--tb-mint); }
.tb__card-post.is-err { color: var(--tb-pink); }
.tb-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.tb-board li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 8px; align-items: baseline; padding: 4px 6px; border-radius: 8px; }
.tb-board li.is-me { background: rgba(151, 252, 228, 0.1); }
.tb-board .r { color: var(--mist-2); font-variant-numeric: tabular-nums; }
.tb-board .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 700; }
.tb-board .s { color: var(--mint); font-weight: 700; font-variant-numeric: tabular-nums; }
.tb-board .t { color: var(--mist-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.tb-board__empty { display: block !important; color: var(--mist); }
.tb-rules { margin: 12px 0 0; font-size: 12px; color: var(--mist-2); line-height: 1.5; }
