/* Word Tiles. Everything lives inside .wt (no fixed positioning); sizes come from --S (board side), --cell and --tile,
   which game.js sets from the room it has. */
.wt { --S: 345px; --cell: 23px; --tile: 46px; --colw: 100%; --sideW: 320px; --colH: 600px;
  --line: #1c2b4a; --ink: #dfe9ff; --mut: #8aa3c4; --acc: #55d6ff; --warm: #ffd166; --pink: #ff6b81; --ok: #6fe39a;
  position: relative; box-sizing: border-box; color: var(--ink); font-size: 14px; line-height: 1.35;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  display: grid; gap: 8px; margin: 0 auto; width: var(--colw); max-width: 100%; align-content: start; }
.wt *, .wt *::before, .wt *::after { box-sizing: border-box; }
.wt [hidden] { display: none !important; }
.wt button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
.wt button:focus-visible, .wt input:focus-visible, .wt.is-keys .wt-view:focus { outline: 2px solid var(--warm); outline-offset: 2px; }
.wt-view:focus { outline: none; }
.wt svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---- layout: tall (phones, narrow windows) */
.wt[data-layout="tall"] { grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "scores" "status" "view" "rack" "acts" "play"; }
.wt[data-layout="tall"] .wt-side { display: contents; }
.wt[data-layout="tall"] .wt-log { display: none; }
.wt-top { grid-area: top; } .wt-scores { grid-area: scores; } .wt-status { grid-area: status; } .wt-view { grid-area: view; }
.wt-rackrow { grid-area: rack; } .wt-acts { grid-area: acts; } .wt-play { grid-area: play; }

/* ---- layout: wide (desktop): board on the left, a panel on the right */
.wt[data-layout="wide"] { width: auto; grid-template-columns: calc(var(--S) - 158px) 150px var(--sideW); column-gap: 8px; justify-content: center;
  grid-template-areas: "status status side" "view view side" "rack play side"; }
.wt[data-layout="wide"] .wt-side { grid-area: side; margin-left: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 0; max-height: var(--colH); }
.wt[data-layout="wide"] .wt-log { flex: 1 1 0; min-height: 70px; }
.wt[data-layout="wide"] .wt-scores { flex-wrap: wrap; }
.wt[data-layout="wide"] .wt-sc { flex: 1 1 40%; padding: 10px 12px; }
.wt[data-layout="wide"] .wt-sc b { font-size: 24px; }
.wt[data-layout="wide"] .wt-scores[data-n="3"] .wt-sc b, .wt[data-layout="wide"] .wt-scores[data-n="4"] .wt-sc b { font-size: 20px; }
.wt[data-layout="wide"] .wt-play { height: auto; min-height: 52px; }

/* ---- top row, scores, status */
.wt-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wt-ib { min-width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; border: 1px solid #24365f; background: #111c38; color: #cfe0ff; flex: none; }
.wt-ib:hover { border-color: #3b5896; background: #16244a; }
.wt-ib-text { padding: 0 11px 0 9px; font-size: 13px; font-weight: 600; }
.wt-ib[aria-pressed="true"] { border-color: var(--acc); color: var(--acc); }
#wt-mute .wt-off { display: none; }
#wt-mute[aria-pressed="true"] .wt-on { display: none; }
#wt-mute[aria-pressed="true"] .wt-off { display: inline; }
#wt-mute[aria-pressed="true"] { border-color: #24365f; color: var(--mut); }
.wt-mode { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mut); font-size: 12.5px; text-align: center; }
.wt-scores { display: flex; gap: 6px; min-width: 0; }
.wt-sc { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 10px;
  border-radius: 10px; background: #0e1830; border: 1px solid var(--line); min-height: 40px; }
.wt-sc span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mut); font-size: 13px; font-weight: 600; }
.wt-sc b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.wt-sc small { color: var(--mut); font-size: 11px; font-weight: 600; white-space: nowrap; }
.wt-sc.is-turn { border-color: var(--acc); box-shadow: 0 0 0 1px rgba(85,214,255,.35), 0 0 14px rgba(85,214,255,.18); }
.wt-sc.is-turn span { color: var(--acc); }
.wt-sc.is-lead b { color: var(--warm); }
/* three or four players on a narrow screen: the name sits over the score, so both can be read */
@media (max-width: 560px) {
  .wt[data-layout="tall"] .wt-scores[data-n="3"] .wt-sc, .wt[data-layout="tall"] .wt-scores[data-n="4"] .wt-sc { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 4px 9px; }
  .wt[data-layout="tall"] .wt-scores[data-n="3"] .wt-sc span, .wt[data-layout="tall"] .wt-scores[data-n="4"] .wt-sc span { max-width: 100%; font-size: 11.5px; line-height: 14px; }
  .wt[data-layout="tall"] .wt-scores[data-n="3"] .wt-sc b, .wt[data-layout="tall"] .wt-scores[data-n="4"] .wt-sc b { font-size: 18px; line-height: 20px; }
}
.wt-status { height: 36px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 8px; border-radius: 10px;
  background: #0b1328; border: 1px solid var(--line); font-size: 14px; font-weight: 600; overflow: hidden; line-height: 16px; }
.wt-status[data-tone="ok"] { color: var(--ok); border-color: rgba(111,227,154,.45); }
.wt-status[data-tone="warn"] { color: var(--warm); border-color: rgba(255,209,102,.4); }
.wt-status[data-tone="bad"] { color: #ff9aa9; border-color: rgba(255,107,129,.55); }
.wt-status[data-tone="info"] { color: var(--ink); }
.wt-status[data-long="1"] { font-size: 12.5px; line-height: 15px; }
.wt-status.is-shake { animation: wt-shake .32s; }
@keyframes wt-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* ---- the board */
.wt-view { position: relative; width: var(--S); height: var(--S); justify-self: center; overflow: hidden; border-radius: 8px; background: #0a1226;
  border: 0; touch-action: none; box-shadow: 0 0 0 1px #24365f, 0 8px 28px rgba(0,0,0,.45); }
.wt-board { position: absolute; left: 0; top: 0; width: var(--S); height: var(--S); display: grid; grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr); transform-origin: 0 0; }
.wt-board.is-anim { transition: transform .22s ease; }
.wt-sq { position: relative; display: grid; place-items: center; background: #0e1830; box-shadow: inset 0 0 0 1px rgba(64,90,140,.3);
  font-size: calc(var(--cell) * .36); font-weight: 800; letter-spacing: -.02em; color: #5f7397; overflow: visible; }
.wt-sq.k-G { background: #0e4a52; color: #86f2e2; }
.wt-sq.k-F { background: #3c2a82; color: #d2c0ff; }
.wt-sq.k-C { background: #684810; color: #ffd98a; }
.wt-sq.k-N { background: #7a1c47; color: #ffa9c8; }
.wt-sq.k-S { background: #684810; color: var(--warm); font-size: calc(var(--cell) * .6); }
.wt-tile, .wt-rt, .wt-ghost { background: linear-gradient(160deg, #fff7e0 0%, #f3dfae 55%, #e6c98a 100%); color: #23190b; border-radius: 15%;
  box-shadow: inset 0 -2px 0 rgba(120,82,22,.4), inset 0 1px 0 rgba(255,255,255,.7), 0 1px 3px rgba(0,0,0,.55); }
.wt-tile { position: absolute; inset: 4%; display: grid; place-items: center; z-index: 1; }
.wt-tile b, .wt-rt b, .wt-ghost b { font-weight: 800; line-height: 1; letter-spacing: 0; }
.wt-tile b { font-size: calc(var(--cell) * .6); }
.wt-tile i, .wt-rt i, .wt-ghost i { position: absolute; right: 9%; bottom: 6%; font-style: normal; font-weight: 700; line-height: 1; color: #5b4520; }
.wt-tile i { font-size: calc(var(--cell) * .27); }
.wt-tile.is-blank b, .wt-rt.is-blank b, .wt-ghost.is-blank b { color: #7a3fd0; }
.wt-tile.is-new { animation: wt-pop .2s ease-out; }
@keyframes wt-pop { 0% { transform: scale(.5); opacity: .2; } 70% { transform: scale(1.1); } 100% { transform: none; opacity: 1; } }
.wt-tile.is-last { box-shadow: 0 0 0 2px var(--warm), inset 0 -2px 0 rgba(120,82,22,.4), 0 1px 3px rgba(0,0,0,.55); }
.wt-tile.is-pend { box-shadow: 0 0 0 2px var(--acc), 0 0 10px rgba(85,214,255,.65), inset 0 -2px 0 rgba(120,82,22,.4); touch-action: none; cursor: grab; z-index: 2; }
.wt-board[data-ok="1"] .wt-tile.is-pend { box-shadow: 0 0 0 2px var(--ok), 0 0 10px rgba(111,227,154,.6), inset 0 -2px 0 rgba(120,82,22,.4); }
.wt-board[data-ok="0"] .wt-tile.is-pend { box-shadow: 0 0 0 2px var(--warm), 0 0 8px rgba(255,209,102,.45), inset 0 -2px 0 rgba(120,82,22,.4); }
.wt-tile.is-lift { opacity: .25; }
.wt-tile.is-ghosted { background: linear-gradient(160deg, #ffe9a8, #ffcf5c); box-shadow: 0 0 0 2px var(--warm), 0 0 12px rgba(255,209,102,.7); z-index: 2; }
.wt-tile.is-mine { box-shadow: 0 0 0 2px var(--acc), 0 0 10px rgba(85,214,255,.65); z-index: 2; }
.wt-sq.is-cur { box-shadow: inset 0 0 0 2px var(--acc); background-image: linear-gradient(rgba(85,214,255,.2), rgba(85,214,255,.2)); color: transparent; }
.wt-sq.is-cur::after { content: ''; position: absolute; inset: 26%; background: var(--acc); z-index: 3; pointer-events: none;
  clip-path: polygon(0 28%, 52% 28%, 52% 4%, 100% 50%, 52% 96%, 52% 72%, 0 72%); }
.wt-sq.is-cur.is-down::after { transform: rotate(90deg); }
.wt-sq.is-drop { box-shadow: inset 0 0 0 2px #fff; background-image: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.22)); }
.wt-sq.is-hint::before { content: ''; position: absolute; inset: -2px; border-radius: 18%; border: 3px solid var(--warm); z-index: 4; pointer-events: none;
  box-shadow: 0 0 12px rgba(255,209,102,.8); animation: wt-pulse 1s ease-in-out infinite; }
@keyframes wt-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(1.14); } }
.wt-badge { position: absolute; z-index: 6; height: calc(var(--cell) * .66); min-width: calc(var(--cell) * .8); padding: 0 calc(var(--cell) * .16);
  display: grid; place-items: center; border-radius: 99px; font-size: calc(var(--cell) * .42); font-weight: 800; line-height: 1; pointer-events: none;
  background: #23314f; color: #dfe9ff; box-shadow: 0 0 0 1.5px #0a1226, 0 2px 6px rgba(0,0,0,.5); font-variant-numeric: tabular-nums; }
.wt-badge[data-ok="1"] { background: var(--ok); color: #05240f; }
.wt-badge[data-ok="0"] { background: var(--warm); color: #2b1c00; }
.wt-fly { position: absolute; z-index: 8; pointer-events: none; font-size: 22px; font-weight: 900; color: var(--ok); text-shadow: 0 2px 8px rgba(0,0,0,.8), 0 0 2px #000;
  transform: translate(-50%, -50%); animation: wt-fly 1.1s ease-out forwards; white-space: nowrap; }
.wt-fly.is-cpu { color: var(--warm); }
@keyframes wt-fly { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }

/* ---- the rack and the buttons under the board */
.wt-rackrow { min-width: 0; display: flex; align-items: center; justify-content: center; min-height: calc(var(--tile) + 12px); }
.wt-rack { display: flex; gap: 4px; padding: 5px; border-radius: 12px; background: linear-gradient(#1b2848, #101a34); border: 1px solid #2a3f6e; touch-action: none;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.4); }
.wt-rack.is-wait { opacity: .78; }
.wt-slot { position: relative; width: var(--tile); height: var(--tile); border-radius: 15%; background: rgba(6,11,24,.55); box-shadow: inset 0 0 0 1px rgba(64,90,140,.25); flex: none; }
.wt-rt { position: absolute; inset: 0; display: grid; place-items: center; cursor: grab; touch-action: none; transition: transform .12s ease; }
.wt-rt b { font-size: calc(var(--tile) * .56); }
.wt-rt i { font-size: calc(var(--tile) * .25); }
.wt-rt.is-sel { transform: translateY(-7px); box-shadow: 0 0 0 2.5px var(--acc), 0 6px 14px rgba(85,214,255,.4), inset 0 -2px 0 rgba(120,82,22,.4); }
.wt-rt.is-lift { visibility: hidden; }
.wt-rt.is-in { animation: wt-pop .22s ease-out; }
.wt-ghost { position: absolute; left: 0; top: 0; z-index: 30; display: none; place-items: center; pointer-events: none; width: 48px; height: 48px;
  box-shadow: 0 10px 22px rgba(0,0,0,.6), 0 0 0 2px var(--acc); opacity: .96; }
.wt-ghost.is-on { display: grid; }
.wt-ghost b { font-size: 27px; } .wt-ghost i { font-size: 12px; }
.wt-acts { display: flex; gap: 6px; min-width: 0; }
.wt-ab { flex: 1 1 0; min-width: 0; min-height: 46px; padding: 3px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 10px; border: 1px solid #24365f; background: #111c38; color: #cfe0ff; font-size: 12px; font-weight: 600; }
.wt-ab svg { width: 20px; height: 20px; }
.wt-ab:hover { border-color: #3b5896; background: #16244a; }
.wt-ab[aria-disabled="true"] { opacity: .45; }
.wt-ab span { white-space: nowrap; }
.wt-play { height: 52px; border: 0; border-radius: 12px; background: linear-gradient(180deg, #6ee0ff, #2fa8e8); color: #04121f !important; font-size: 17px !important;
  font-weight: 800 !important; letter-spacing: .01em; box-shadow: 0 4px 14px rgba(47,168,232,.35); padding: 0 10px; }
.wt-play:hover { filter: brightness(1.07); }
.wt-play[data-dim="1"] { background: linear-gradient(180deg, #2b4a78, #1f3559); color: #b9cdf0 !important; box-shadow: none; }
.wt-play[data-ok="1"] { background: linear-gradient(180deg, #8ff0b3, #3fc878); box-shadow: 0 4px 16px rgba(63,200,120,.4); }
.wt-rev, .wt-overbar { display: flex; align-items: center; gap: 8px; width: 100%; }
.wt-rev-mid { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wt-rev-mid strong { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wt-rev-tabs { display: flex; gap: 6px; }
.wt-overbar .wt-btn { flex: 1 1 0; }

/* ---- the move list (wide only) */
.wt-log { overflow-y: auto; border-radius: 10px; background: #0b1328; border: 1px solid var(--line); padding: 6px 4px 6px 10px; font-size: 13px; scrollbar-width: thin; scrollbar-color: #2a3f6e transparent; }
.wt-le { display: grid; grid-template-columns: 5.2em minmax(0, 1fr) auto; gap: 8px; padding: 3px 6px 3px 0; align-items: baseline; }
.wt-le span { color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-le b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .03em; }
.wt-le em { font-style: normal; color: var(--ok); font-weight: 700; font-variant-numeric: tabular-nums; }
.wt-le.is-quiet b { color: var(--mut); font-weight: 500; letter-spacing: 0; }
.wt-le.is-quiet em { color: var(--mut); }
/* review: the turn being looked at */
.wt-le.is-now { grid-template-columns: calc(5.2em - 8px) minmax(0, 1fr) auto; padding-left: 8px; background: rgba(255,209,102,.13); box-shadow: inset 3px 0 0 var(--warm); border-radius: 4px; }
.wt-le.is-now span { color: var(--ink); }
.wt-log-empty { color: var(--mut); padding: 4px 6px 4px 0; }
/* the same rows inside the Tiles left sheet, where the side list is not shown */
.wt-moves { flex: none; max-height: 168px; overflow-y: auto; overscroll-behavior: contain; border-radius: 10px; background: #0b1328; border: 1px solid var(--line); padding: 6px 4px 6px 10px; font-size: 13px; scrollbar-width: thin; scrollbar-color: #2a3f6e transparent; }

/* ---- dialogs: laid over the game, inside it */
.wt-ov { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 8px; background: rgba(4,6,15,.8); border-radius: 10px; }
/* the hand-over screen also covers the glow around the board and the score chips */
.wt-curtain { background: #060b18; inset: -5px; padding: 13px; border-radius: 14px; }
.wt-panel { --pt: 12px; --ps: 14px; width: min(100%, 470px); max-height: min(100%, var(--ovh, 100%)); overflow-y: auto; background: #0b1328; border: 1px solid #2a3f6e; border-radius: 14px; padding: var(--pt) var(--ps) 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.65); display: flex; flex-direction: column; gap: 9px; -webkit-user-select: text; user-select: text; transition: translate .22s ease; }
/* a dialog taller than the game scrolls; its parts are never squeezed */
.wt-panel > * { flex: none; }
.wt-panel-s { width: min(100%, 390px); }
.wt[data-layout="wide"] .wt-panel { width: min(100%, 560px); }
.wt[data-layout="wide"] .wt-panel-s { width: min(100%, 420px); }
/* the dialog's heading and its close button stay in sight while a long dialog scrolls */
.wt-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; position: sticky; top: calc(0px - var(--pt)); z-index: 2;
  margin: calc(0px - var(--pt)) calc(0px - var(--ps)) 0; padding: var(--pt) var(--ps) 5px; background: #0b1328; border-radius: 14px 14px 0 0; }
.wt-panel h3 { margin: 0; font-size: 19px; line-height: 1.2; color: #fff; }
.wt-panel h4 { margin: 4px 0 -3px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.wt-sub { margin: 0; color: #b8c9e6; font-size: 13.5px; }
.wt-fine { font-size: 12px; color: var(--mut); }
.wt-kicker { margin: 0; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--acc); font-weight: 700; }
.wt-leave { margin: 0; padding: 7px 10px; border-radius: 9px; background: rgba(255,209,102,.1); border: 1px solid rgba(255,209,102,.35); color: var(--warm); font-size: 13px; }
.wt-btn { min-height: 44px; padding: 8px 14px; border-radius: 11px; border: 1px solid #2c4273; background: #13203f; color: #dfe9ff; font-size: 14.5px; font-weight: 700; }
.wt-btn:hover { border-color: #46659f; background: #1a2b54; }
.wt-btn-main { border: 0; background: linear-gradient(180deg, #6ee0ff, #2fa8e8); color: #04121f !important; }
.wt-btn-main:hover { filter: brightness(1.07); background: linear-gradient(180deg, #6ee0ff, #2fa8e8); }
.wt-btn[disabled] { opacity: .45; cursor: default; filter: none; }
.wt-row { display: flex; gap: 8px; } .wt-row > * { flex: 1 1 0; min-width: 0; }
.wt-col { display: flex; flex-direction: column; gap: 8px; }
.wt-chip { min-height: 40px; min-width: 46px; padding: 6px 14px; border-radius: 99px; border: 1px solid #2c4273; background: #101b36; color: #cfe0ff; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.wt-chip[aria-pressed="true"] { border-color: var(--acc); background: rgba(85,214,255,.16); color: #fff; }
.wt-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wt-lv { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; min-height: 62px; padding: 8px 11px; border-radius: 11px;
  border: 1px solid #2c4273; background: #101b36; color: #dfe9ff; }
.wt-lv:hover { border-color: var(--acc); background: #15244a; }
.wt-lv b { font-size: 15px; color: #fff; }
.wt-lv span { font-size: 12.5px; color: #a9bddd; line-height: 1.3; }
.wt-lv[data-on="1"] { border-color: var(--acc); box-shadow: 0 0 0 1px rgba(85,214,255,.3); }
.wt-lv em { font-style: normal; color: var(--warm); font-weight: 700; }
.wt-daily { width: 100%; border-color: rgba(255,209,102,.5); background: linear-gradient(120deg, rgba(255,209,102,.12), #101b36 60%); }
.wt-daily-meta:empty { display: none; }
.wt-daily-meta, .wt-daily-meta * { color: var(--warm) !important; font-size: 12.5px; }
.wt-pp { display: flex; flex-direction: column; gap: 8px; }
.wt-seg { display: flex; gap: 6px; }
.wt-names { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wt-names input { min-width: 0; width: 100%; height: 42px; padding: 0 10px; border-radius: 10px; border: 1px solid #2c4273; background: #0a1226; color: #fff; font: inherit; font-size: 16px;
  -webkit-user-select: text; user-select: text; }
.wt-recs { color: var(--mut); font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 8px; }
.wt-recs b { color: #dfe9ff; }
.wt-recs:empty { display: none; }
.wt-az { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wt-az button { height: 44px; min-width: 0; padding: 0; border-radius: 9px; border: 0; background: linear-gradient(160deg, #fff7e0, #ecd49a); color: #7a3fd0; font-size: 20px; font-weight: 800; }
.wt-az button:hover { filter: brightness(1.08); box-shadow: 0 0 0 2px var(--acc); }
.wt-swaprack { display: grid; grid-template-columns: repeat(7, minmax(0, 46px)); gap: 4px; justify-content: center; padding-top: 6px; }
@media (max-width: 370px) { .wt-swaprack { grid-template-columns: repeat(4, 44px); } }
.wt-swaprack button { position: relative; width: 100%; aspect-ratio: 1; min-height: 40px; padding: 0; border: 0; border-radius: 8px; background: linear-gradient(160deg, #fff7e0, #ecd49a); color: #23190b; font-size: 24px; font-weight: 800; }
.wt-swaprack button i { position: absolute; right: 4px; bottom: 3px; font-size: 11px; font-style: normal; color: #5b4520; }
.wt-swaprack button[aria-pressed="true"] { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--pink), 0 6px 14px rgba(255,107,129,.4); }
.wt-bagrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.wt-bt { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 9px; background: #0e1830; border: 1px solid var(--line); }
.wt-bt u { position: relative; width: 30px; height: 30px; flex: none; display: grid; place-items: center; text-decoration: none; border-radius: 6px; background: linear-gradient(160deg, #fff7e0, #ecd49a);
  color: #23190b; font-weight: 800; font-size: 16px; }
.wt-bt u i { position: absolute; right: 2px; bottom: 1px; font-size: 8.5px; font-style: normal; color: #5b4520; line-height: 1; }
.wt-bt b { font-size: 15px; font-variant-numeric: tabular-nums; }
.wt-bt.is-zero { opacity: .38; }
.wt-rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: #cdd9f0; }
.wt-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wt-lg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #cdd9f0; }
.wt-lg b { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 6px; font-size: 12px; }
.wt-lg.k-G b { background: #0e4a52; color: #86f2e2; } .wt-lg.k-F b { background: #3c2a82; color: #d2c0ff; }
.wt-lg.k-C b { background: #684810; color: #ffd98a; } .wt-lg.k-N b { background: #7a1c47; color: #ffa9c8; }
.wt-end-body { display: flex; flex-direction: column; gap: 8px; }
.wt-end-big { font-size: 15px; color: #cdd9f0; margin: 0; display: flex; align-items: baseline; gap: 7px; }
.wt-end-big b { font-size: 32px; line-height: 1; color: var(--warm); font-variant-numeric: tabular-nums; }
.wt-final { display: flex; flex-direction: column; gap: 5px; }
.wt-fr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 7px 11px; border-radius: 10px; background: #0e1830; border: 1px solid var(--line); }
.wt-fr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.wt-fr small { color: var(--mut); font-size: 12px; white-space: nowrap; }
.wt-fr b { font-size: 21px; font-variant-numeric: tabular-nums; }
.wt-fr.is-win { border-color: var(--warm); background: rgba(255,209,102,.09); }
.wt-fr.is-win b { color: var(--warm); }
.wt-facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #b8c9e6; }
.wt-facts b { color: #fff; }
.wt-end-daily { color: var(--warm); }
.wt-end-daily:empty { display: none; }
.wt-pass-scores { display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 420px) {
  .wt-panel { --pt: 10px; --ps: 11px; padding: 10px 11px 12px; gap: 8px; }
  .wt-lv { min-height: 56px; padding: 7px 10px; }
  .wt-lv span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .wt-board.is-anim, .wt-rt, .wt-panel { transition: none; }
  .wt-tile.is-new, .wt-rt.is-in, .wt-status.is-shake, .wt-sq.is-hint::before { animation: none; }
  .wt-fly { animation-duration: .01s; }
}

/* a phone on its side: the board on the left, everything else stacked beside it */
.wt[data-layout="land"] { width: auto; grid-template-columns: var(--S) var(--sideW); column-gap: 12px; justify-content: center; grid-template-rows: auto auto auto auto auto 1fr;
  grid-template-areas: "view top" "view scores" "view status" "view rack" "view acts" "view play"; }
.wt[data-layout="land"] .wt-side { display: contents; }
.wt[data-layout="land"] .wt-log { display: none; }
.wt[data-layout="land"] .wt-play { align-self: start; }

/* ---- narrow screens. data-top and data-tight are set by game.js from the room there is. */
.wt[data-top="s"] .wt-top, .wt[data-top="xs"] .wt-top { gap: 4px; }
.wt[data-top="s"] .wt-ib-text, .wt[data-top="xs"] .wt-ib-text { padding: 0 8px 0 7px; gap: 4px; }
.wt[data-top="xs"] #wt-menu { padding: 0; }
.wt[data-top="xs"] #wt-menu span { display: none; }
.wt[data-tight="1"] .wt-rack { gap: 0; padding: 0; border-radius: 8px; }
.wt[data-tight="1"] .wt-acts { gap: 4px; }
/* the board beside a narrow column (a phone on its side): three or four players get the name over the score too */
.wt[data-layout="land"] .wt-scores[data-n="3"] .wt-sc, .wt[data-layout="land"] .wt-scores[data-n="4"] .wt-sc { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 3px 9px; }
.wt[data-layout="land"] .wt-scores[data-n="3"] .wt-sc span, .wt[data-layout="land"] .wt-scores[data-n="4"] .wt-sc span { max-width: 100%; font-size: 11.5px; line-height: 14px; }
.wt[data-layout="land"] .wt-scores[data-n="3"] .wt-sc b, .wt[data-layout="land"] .wt-scores[data-n="4"] .wt-sc b { font-size: 18px; line-height: 20px; }
