/* Play by yourself (solo.html): the game's big-screen half shrunk above the phone half, on one device. */
body.solo { min-height: 100vh; min-height: 100dvh; margin: 0; }
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.sobar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; position: relative; z-index: 5; }
.sobar .logo { font-size: 20px; flex: 0 0 auto; }
.sogame { display: inline-flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; margin-right: auto; font: 400 1.25rem var(--title); color: var(--ink, #10357E); }
.sogame b { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soico { width: 40px; height: 40px; flex: 0 0 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25)); }
.sotime { font: 700 1.1rem var(--head); color: var(--ink, #10357E); background: rgba(255, 255, 255, 0.85); padding: 4px 12px; border-radius: 999px; }
.sotime:empty { display: none; }
.soquit { flex: 0 0 auto; }
html[data-theme] .btn.ghost.soquit { color: var(--ink); }

/* Pre-game card and results */
.sowrap { flex: 1; display: flex; flex-direction: column; }
.socard, .sointro { width: calc(100% - 32px); max-width: 480px; margin: 8px auto 24px; box-sizing: border-box; text-align: center; padding: 18px 20px 22px; border-radius: 26px;
  background: linear-gradient(#FFFFFF, #FFF6E4); color: #3A2200;
  box-shadow: 0 0 0 3px #fff, 0 8px 0 var(--main-edge, #1656A8), 0 20px 36px rgba(10, 30, 80, 0.3); }
.sointro { margin-top: auto; margin-bottom: auto; }
.soart { width: 130px; height: 130px; margin: 0 auto 6px; border-radius: 28px; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #FFE9A8, #FFC94A);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.7), 0 6px 0 #B86A00, 0 12px 20px rgba(0, 0, 0, 0.2); }
.soart svg { width: 104px; height: 104px; filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.25)); }
.socard h1, .sointro h1 { font: 400 2.1rem/1.1 var(--title); color: #3A2200; margin: 10px 0 6px; text-shadow: none; }
.sowho { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 700; color: #5A4020; }
.sowho .av { width: 34px; height: 34px; }
.sohow { text-align: left; margin: 6px 0 12px; padding-left: 20px; font-weight: 600; color: #4A3418; }
.sohow li { margin: 4px 0; }
.sopick { margin: 4px 0 12px; }
.sopick .lbl { display: block; font-weight: 800; color: #5A4020; margin-bottom: 6px; }
.sopick .seg { display: flex; gap: 6px; background: #F1E6CF; border-radius: 999px; padding: 4px; }
.sopick .segbtn { flex: 1; border: 0; border-radius: 999px; padding: 9px 4px; font: 700 0.95rem var(--head); color: #5A4020; background: transparent; cursor: pointer; }
.sopick .seg.levels { flex-wrap: wrap; border-radius: 18px; }
.sopick .seg.levels .segbtn { flex: 1 1 30%; padding: 8px 4px; }
.sopick .segbtn.on { background: linear-gradient(#FFD45E, #F5A00C); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); box-shadow: 0 3px 0 #B86A00; }
.sobest { font-weight: 700; color: #5A4020; margin: 4px 0 14px; }
.socard .btn.block { margin-top: 10px; }
.socard a.btn { text-decoration: none; display: block; }
html[data-theme] .socard .btn.ghost { color: #5A4020; background-color: #F1E6CF; }
.solink { display: inline-block; margin-top: 14px; font-weight: 700; color: #5A4020; }
.socount { font: 400 6rem/1 var(--title); color: var(--main, #2E8FF0); animation: pop 0.4s both; }
.sobig { font: 400 4.5rem/1 var(--title); color: var(--main, #FF8A3C); margin: 6px 0; }
.sobig small { display: block; font: 700 1rem var(--head); color: #5A4020; }
.soline { font-weight: 700; color: #5A4020; margin: 4px 0 8px; }

/* Playing */
.soplay { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sotvbox { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 52vh; overflow: hidden; border-radius: 18px; margin: 0 auto; box-sizing: border-box;
  box-shadow: 0 0 0 3px #fff, 0 6px 0 var(--main-edge, #1656A8), 0 12px 22px rgba(0, 0, 0, 0.25); }
.soplay.withtv .sotvbox { width: calc(100% - 20px); max-width: calc(52vh * 16 / 9); }
.sotvbox #stage { position: absolute; left: 50%; top: 50%; transform-origin: center center; }
.sotvbox #tvmain { top: 0 !important; }
.sophone { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 12px 16px; box-sizing: border-box; }

/* Wide screens: big screen on the left, controls on the right. */
@media (min-width: 640px) and (min-aspect-ratio: 4/3) {
  .soplay.withtv { display: grid; grid-template-columns: 1fr minmax(360px, 440px); grid-template-rows: auto 1fr; }
  .soplay.withtv .sobar { grid-column: 1 / -1; }
  .soplay.withtv .sotvbox { align-self: center; max-height: none; max-width: none; width: calc(100% - 24px); margin: 0 12px; }
  /* Computers: use the height too (up to 4:3), not just a 16:9 strip with empty space above and below */
  .soplay.withtv .sotvbox { aspect-ratio: auto; height: min(calc(100vh - 104px), calc((100vw - 488px) * 0.75)); }
  .soplay.withtv .sophone { margin: 0; }
}

/* Phone held upright: the big screen hides behind a button and opens full screen, turned sideways. */
.sotvbtn, .sotvclose { display: none; }
body.socompact .sotvbtn { display: inline-flex; flex: 0 0 auto; }
html[data-theme] .btn.ghost.sotvbtn { color: var(--ink); padding-left: 10px; padding-right: 10px; }
body.socompact .soplay.withtv .sotvbox { display: none; }
body.socompact.sotvopen .soplay.withtv .sotvbox { display: block; position: fixed; inset: 0; z-index: 60; width: 100vw; height: 100vh; max-width: none; max-height: none; aspect-ratio: auto; border-radius: 0; margin: 0; background: #1A0F3A; }
body.socompact.sotvopen .sotvclose { display: block; position: fixed; z-index: 61; bottom: 16px; left: 50%; transform: translateX(-50%); border: 0; border-radius: 999px; padding: 10px 22px;
  font: 700 1rem var(--head); color: #10357E; background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); cursor: pointer; }
body.socompact .sobar .sogame b { display: none; }

/* ---------- One-person games ---------- */
.soonly { justify-content: center; }
.sg { width: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.sghead { width: 100%; display: flex; align-items: center; gap: 8px; }
.sgstat { flex: 1; min-width: 0; text-align: center; padding: 6px 10px; border-radius: 16px; background: linear-gradient(#FFFFFF, #FFF3DC); color: #3A2200;
  box-shadow: inset 0 0 0 2px rgba(232, 154, 28, 0.5), 0 4px 0 #D9A24A; }
.sgstat small { display: block; font: 700 0.75rem var(--head); color: #8A5A1E; text-transform: uppercase; letter-spacing: 0.5px; }
.sgstat b { font: 400 1.5rem/1.1 var(--title); }
html[data-theme] .sghead .btn.ghost { color: var(--ink); flex: 0 0 auto; }
.sgtip { margin: 0; font-weight: 700; color: var(--t-muted, #5A4020); text-align: center; }

/* 2048 */
.g4board { --gap: 10px; position: relative; width: min(100%, 420px); aspect-ratio: 1; padding: var(--gap); box-sizing: border-box; border-radius: 20px; display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: var(--gap);
  background: linear-gradient(#B98A55, #9A6B3A); box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.3), 0 6px 0 #6E4620, 0 14px 24px rgba(0, 0, 0, 0.25); }
.g4cell { border-radius: 12px; background: rgba(255, 240, 210, 0.35); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); }
.g4tiles { position: absolute; inset: var(--gap); }
.g4tile { --s: calc((100% - (var(--n, 4) - 1) * var(--gap)) / var(--n, 4)); position: absolute; width: var(--s); height: var(--s); left: calc(var(--c) * (var(--s) + var(--gap))); top: calc(var(--r) * (var(--s) + var(--gap)));
  display: grid; place-items: center; border-radius: 12px; font: 400 clamp(22px, 8vw, 44px) var(--title); color: #5E3000; transition: left 0.12s, top 0.12s;
  background: linear-gradient(#FFF8E6, #FFE7B8); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), inset 0 -4px 0 rgba(0, 0, 0, 0.12), 0 3px 0 rgba(0, 0, 0, 0.2); }
.g4tile.fresh { animation: pop 0.2s 0.1s both; }
.g4tile.merged { animation: g4bump 0.2s; z-index: 2; }
.g4tile.gone { z-index: 0; }
@keyframes g4bump { 50% { transform: scale(1.15); } }
.g4tile.v4 { background: linear-gradient(#FFF0C8, #FFD98A); }
.g4tile.v8 { background: linear-gradient(#FFC78A, #FF9A3C); color: #fff; }
.g4tile.v16 { background: linear-gradient(#FFAE7A, #FF7A2E); color: #fff; }
.g4tile.v32 { background: linear-gradient(#FF9CB8, #F0559E); color: #fff; }
.g4tile.v64 { background: linear-gradient(#FF7A9C, #D93070); color: #fff; }
.g4tile.v128 { background: linear-gradient(#C9A6FF, #8B5CF6); color: #fff; font-size: clamp(20px, 7vw, 38px); }
.g4tile.v256 { background: linear-gradient(#A6C8FF, #2E7FE0); color: #fff; font-size: clamp(20px, 7vw, 38px); }
.g4tile.v512 { background: linear-gradient(#8CE8C8, #14B88A); color: #fff; font-size: clamp(20px, 7vw, 38px); }
.g4tile.v1024, .g4tile.v2048, .g4tile.v4096 { background: linear-gradient(#FFE27A, #F2A516); color: #fff; font-size: clamp(16px, 6vw, 32px); box-shadow: 0 0 18px rgba(255, 200, 60, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.8); }
.g4tile:not(.v2):not(.v4) { text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); }

/* Snake */
.snboard { position: relative; width: min(100%, 420px); aspect-ratio: 1; border-radius: 18px; overflow: hidden; touch-action: none;
  box-shadow: 0 0 0 4px #fff, 0 7px 0 4px #0A6E52, 0 14px 24px rgba(0, 0, 0, 0.25); }
.snboard canvas { width: 100%; height: 100%; display: block; }
.snmsg { position: absolute; inset: 0; display: grid; place-items: center; font: 400 1.8rem var(--title); color: #0A6E52; background: rgba(255, 255, 255, 0.72); pointer-events: none; text-align: center; padding: 0 16px; } /* solid enough that the snake underneath does not show through the words */
.snmsg[hidden] { display: none; }
.snpad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 56px); gap: 8px; }
.snpad button { border: 0; border-radius: 16px; font-size: 1.4rem; color: #fff; cursor: pointer; background: linear-gradient(#5CD6A8, #14B88A); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 4px 0 #0A6E52; touch-action: none; }
.snpad button:active { transform: translateY(3px); box-shadow: 0 1px 0 #0A6E52; }
.snpad [data-d="up"] { grid-column: 2; }
.snpad [data-d="left"] { grid-column: 1; grid-row: 2; }
.snpad [data-d="down"] { grid-column: 2; grid-row: 2; }
.snpad [data-d="right"] { grid-column: 3; grid-row: 2; }

/* Test tubes */
.tbrack { width: 100%; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 14px 8px; justify-items: center; padding: 10px 0; }
.tube { width: min(48px, 100%); height: 200px; border: 0; padding: 4px 4px 6px; border-radius: 6px 6px 26px 26px; cursor: pointer; display: flex; flex-direction: column-reverse; gap: 0; overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.25) 40%, rgba(255, 255, 255, 0.6)); transition: transform 0.15s;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.95), inset 0 0 0 5px rgba(80, 60, 140, 0.25), 0 6px 12px rgba(0, 0, 0, 0.15); }
.tube.sel { transform: translateY(-18px); box-shadow: inset 0 0 0 3px #FFD35C, inset 0 0 0 5px rgba(184, 106, 0, 0.5), 0 12px 18px rgba(0, 0, 0, 0.2); }
.tube.full { box-shadow: inset 0 0 0 3px #7FE3BE, inset 0 0 0 5px rgba(10, 110, 82, 0.4), 0 0 14px rgba(20, 184, 138, 0.5); }
.liq { flex: 0 0 25%; background: var(--col); background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.12)); }
.liq:first-child { border-radius: 0 0 22px 22px; }

/* Wood blocks */
.wbboard { --gap: 3px; width: min(100%, 420px); aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--gap); padding: 8px; box-sizing: border-box; border-radius: 18px;
  background: linear-gradient(#7A4A22, #5E3414); box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4), 0 6px 0 #3E2008, 0 14px 24px rgba(0, 0, 0, 0.25); touch-action: none; }
.wbcell { border-radius: 5px; background: rgba(255, 230, 190, 0.16); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3); }
.wbcell.on, .wbpiece i { background: var(--tone); background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.15)), repeating-linear-gradient(90deg, rgba(120, 60, 10, 0.12) 0 2px, transparent 2px 7px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(0, 0, 0, 0.2); border-radius: 5px; }
.wbcell.pv { background: rgba(255, 230, 120, 0.6); }
.wbcell.bad { background: rgba(240, 85, 158, 0.45); }
.wbcell.pop { animation: wbpop 0.18s forwards; }
@keyframes wbpop { to { transform: scale(0.2); opacity: 0; } }
.wbhand { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; min-height: 120px; align-items: center; touch-action: none; }
.wbslot { display: grid; place-items: center; min-height: 110px; }
.wbpiece { --sz: 24px; display: grid; grid-template-columns: repeat(var(--cols), var(--sz)); grid-template-rows: repeat(var(--rows), var(--sz)); gap: 3px; cursor: grab; touch-action: none; }
.wbpiece.lifted { opacity: 0.25; }
.wbpiece.dead { opacity: 0.35; filter: grayscale(0.7); }
.wbpiece.ghost { position: fixed; z-index: 80; pointer-events: none; opacity: 0.95; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.35)); }

/* Tap match */
.tmboard { --t: min(14.5vw, 64px); position: relative; width: calc(var(--t) * 6); height: calc(var(--t) * 6); margin: 6px auto; }
.tmtile { position: absolute; left: calc(var(--x) * var(--t)); top: calc(var(--y) * var(--t)); width: var(--t); height: var(--t); padding: 7px; border: 0; border-radius: 14px; cursor: pointer; box-sizing: border-box;
  background: linear-gradient(#FFFFFF, #F4ECDA); box-shadow: inset 0 0 0 2px rgba(200, 160, 100, 0.5), 0 5px 0 #C9A06A, 0 8px 10px rgba(0, 0, 0, 0.2); transition: filter 0.15s, transform 0.1s; }
.tmtile svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.2)); }
.tmtile.cov { filter: brightness(0.62) saturate(0.6); cursor: default; }
.tmtile:not(.cov):active { transform: translateY(3px); }
.tmtray { display: flex; gap: 5px; padding: 8px; border-radius: 18px; background: linear-gradient(#7A4A22, #5E3414); box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4), 0 5px 0 #3E2008; }
.tmslot { --t: min(11vw, 48px); width: var(--t); height: var(--t); border-radius: 10px; background: rgba(255, 230, 190, 0.18); position: relative; }
.tmtile.intray { position: absolute; inset: 0; width: 100%; height: 100%; left: 0; top: 0; padding: 5px; animation: pop 0.2s both; }

/* Solitaire */
.sgsol { max-width: 560px; }
.soltable { --w: min(calc((100vw - 48px) / 7), 72px); width: calc(var(--w) * 7 + 36px); display: flex; flex-direction: column; gap: 14px; }
.solrow { display: flex; gap: 6px; align-items: flex-start; }
.solgap { width: var(--w); }
.solpile, .solcol { width: var(--w); position: relative; }
.solcol { min-height: calc(var(--w) * 1.4 + var(--w) * 4); }
.solcard { position: absolute; left: 0; top: calc(var(--y) * var(--w) * 0.42); width: 100%; }
.card52 { width: var(--w); height: calc(var(--w) * 1.4); box-sizing: border-box; border-radius: calc(var(--w) * 0.12); background: linear-gradient(#FFFFFF, #F6F1E6); color: #2B1464; position: relative; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(60, 40, 100, 0.25), 0 2px 3px rgba(0, 0, 0, 0.25); font-family: var(--head); font-weight: 700; user-select: none; }
.card52.red { color: #D8305A; }
.card52 .cr { position: absolute; top: 3px; left: 5px; font-size: calc(var(--w) * 0.3); line-height: 1; display: flex; flex-direction: column; align-items: center; }
.card52 .cr i { font-style: normal; font-size: 0.85em; }
.card52 .cbig { position: absolute; right: 5px; bottom: 2px; font-size: calc(var(--w) * 0.52); line-height: 1; opacity: 0.9; }
.card52.back { cursor: default; background: repeating-conic-gradient(from 0deg at 50% 50%, #8B5CF6 0 15deg, #A98BFF 15deg 30deg); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px rgba(60, 30, 140, 0.4), 0 2px 3px rgba(0, 0, 0, 0.25); }
.stock .card52.back { cursor: pointer; }
.card52.empty { background: rgba(255, 255, 255, 0.28); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7); color: rgba(16, 53, 126, 0.45); display: grid; place-items: center; font-size: calc(var(--w) * 0.4); }
.card52.shake { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.sg [hidden] { display: none !important; }
.sobig.bump { animation: soBump 0.45s; }
@keyframes soBump { 50% { scale: 1.2; } }
/* Narrow phones: keep the top bar on one line (smaller logo, no game name, icon-only big screen button) */
@media (max-width: 480px) {
  .sobar { gap: 7px; padding: 8px 10px; }
  .sobar .logo { font-size: 15px; }
  .sogame b { display: none; }
  .soico { width: 34px; height: 34px; flex-basis: 34px; }
  .sotime { font-size: 1rem; padding: 3px 10px; }
  .sobar .btn.small { padding: 6px 11px; font-size: 0.88rem; }
  .sotvbtn .lbl { display: none; }
  .sotvbtn .gi { margin: 0; }
}
.sosnark { margin: 4px auto 10px; max-width: 32ch; font-weight: 700; font-style: italic; color: #8A4A00; }
/* Quiz categories behind a gear */
.sogearrow { display: flex; align-items: center; gap: 10px; }
.sogearrow span { flex: 1; font-weight: 700; font-size: 0.92rem; text-align: left; }
.sogearbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 8px 14px; font: 700 0.9rem var(--head); cursor: pointer; background: #F1E6CF; color: #5A4020; }
.sogearbtn .ic { width: 20px; height: 20px; }
.sogearbtn.on { background: var(--yellow, #FFD23F); color: #3A2200; }
.sochips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sochip { border: 0; border-radius: 999px; padding: 7px 12px; font: 700 0.85rem var(--head); cursor: pointer; background: #F1E6CF; color: #5A4020; }
.sochip.on { background: #14B88A; color: #fff; }
/* 2048 arrows for mice (hidden on touch-only screens) */
.g4wrap { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.g4wrap .g4board { flex: 0 1 auto; }
.g4ud { display: flex; gap: 14px; justify-content: center; }
.g4arrow { flex: none; width: 54px; height: 54px; padding: 10px; border: 0; border-radius: 16px; cursor: pointer; color: #5E3000;
  background: linear-gradient(#FFF8E6, #FFD98A); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 4px 0 #C98A2A, 0 7px 12px rgba(0, 0, 0, 0.18); }
.g4arrow svg { display: block; width: 100%; height: 100%; }
.g4arrow:hover { filter: brightness(1.06); }
.g4arrow:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 1px 0 #C98A2A; }
@media (hover: none) { .g4arrow, .g4ud { display: none; } }
/* No blue text-selection highlight from fast clicking/double-clicking on the one-person games */
.sg, .sophone { -webkit-user-select: none; user-select: none; }
.sophone input, .sophone textarea { -webkit-user-select: text; user-select: text; }
/* Computer screens: solo.js (fitSolo) scales the game up to fill the space; this lets the box size itself to its content. */
body.sofit .soplay.notv .sophone { flex: 0 0 auto; margin: 0 auto; }
body.sofit .soplay.notv #phgame, body.sofit .soplay.notv #phgame > .phgameview { flex: 0 0 auto; }
/* Computer screens: the score boxes stack down the left of the game, so the board itself gets the height. */
body.sofit .sg { max-width: none; width: auto; display: grid; grid-template-columns: 170px auto; column-gap: 26px; row-gap: 12px; align-items: center; justify-items: center; }
body.sofit .sg > .sghead { grid-column: 1; grid-row: 1 / span 6; flex-direction: column; width: 170px; align-self: center; }
body.sofit .sg > .sghead .sgstat { width: 100%; flex: none; }
body.sofit .sg > :not(.sghead) { grid-column: 2; }
body.sofit .sg .g4wrap { width: auto; }
body.sofit .sg .g4board, body.sofit .sg .wbboard, body.sofit .sg .snboard { width: 420px; flex: none; }
body.sofit .sg .wbhand { width: 420px; }
body.sofit .sg .sgtip { max-width: 520px; }
/* 2048 levels: bigger boards (5×5, 6×6) need smaller numbers, the 3×3 board bigger ones */
.g4board[style*="--n:5"] .g4tile.g4tile { font-size: clamp(16px, 6vw, 34px); }
.g4board[style*="--n:6"] .g4tile.g4tile { font-size: clamp(14px, 5vw, 28px); border-radius: 9px; }
.g4board[style*="--n:6"] .g4tile.v1024, .g4board[style*="--n:6"] .g4tile.v2048, .g4board[style*="--n:6"] .g4tile.v4096 { font-size: clamp(11px, 3.6vw, 20px); }
.g4board[style*="--n:3"] .g4tile.g4tile { font-size: clamp(28px, 10vw, 58px); }

/* Big-screen half when playing by yourself: the scores column only ever says "You", so the game gets the whole width to grow into */
.sotvbox .p3-tv { grid-template-columns: 1fr; padding-bottom: 60px; }
.sotvbox .p3-side { display: none; }

/* Start card (premium, 25 Oct): how-to as numbered rows with gold number coins. The owner prefers the card stacked
   (one column) on computers too, so no wide two-column layout. */
.sohowhead { margin: 10px 0 8px; font: 800 0.76rem var(--head); letter-spacing: 0.12em; text-transform: uppercase; color: #9A5A00; text-align: left; }
.sostart .sohow { list-style: none; counter-reset: so; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.sostart .sohow li { position: relative; margin: 0; padding: 10px 12px 10px 48px; border-radius: 14px; font: 600 0.95rem/1.4 var(--body); counter-increment: so;
  background: rgba(150, 100, 20, 0.07); box-shadow: inset 0 0 0 1px rgba(150, 100, 20, 0.1); }
.sostart .sohow li::before { content: counter(so); position: absolute; left: 11px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; font: 800 0.9rem var(--head); color: #5A3000; background: radial-gradient(circle at 35% 30%, #FFF6CF, #FFD45E 50%, #D9900F); box-shadow: 0 2px 0 rgba(120, 70, 0, 0.35); }
html[data-skin="arcade"] .sostart .sohow li { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(51, 240, 255, 0.25); }
html[data-skin="arcade"] .sohowhead { color: #33F0FF; }
