/* The Table companion: shared look. Hong Kong neon at night, 1970s-80s. Mobile first.
   Design system in one file: palette (tube colours with fixed roles), type, the night backdrop, sign-board cards,
   glass-tube buttons, segmented controls, chips, inputs, tables, felt-and-wood tile areas, the top bar and Tools menu.

   Tube roles (use the role, not the colour, when you add something):
     amber   --c-amber    primary action (Play, the main button on a tool), the brand, scoreboards
     cyan    --c-cyan     navigation, links, focus rings, ordinary buttons
     jade    --c-jade     right / you can win / money in
     red     --c-red      wrong / limit / money out / the dealer
     magenta --c-magenta  categories, chips, small accents
     white   --c-white    the warm white of sign lettering
   Each tool page also has one sign colour, --acc (set by shell.js on <body data-page>), for its header sign,
   card frames and the felt's rim light.
   Glow is for headings, labels and controls. Paragraphs stay plain, high-contrast text. */

:root {
  /* Tube colours as RGB triplets so they take any alpha: rgb(var(--c-cyan) / .4) */
  --c-red:255 64 96; --c-jade:46 226 158; --c-cyan:70 222 255; --c-magenta:255 84 214; --c-amber:255 182 72; --c-white:255 240 220;
  --acc:var(--c-amber);
  /* Legacy names used by the page stylesheets, mapped into the palette */
  --red:rgb(var(--c-red)); --jade:rgb(var(--c-jade)); --gold:rgb(var(--c-amber)); --pale:#ffe6c2; --ink:#f4effa; --dim:#b7b0c6; --night:#030207;
  --panel:rgba(12,9,19,.92); --edge:rgba(255,255,255,.13); --felt:#13563f; --felt-2:#062219;
  --tile-w:44px;
  /* Type: system fonts only */
  --f-body:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","PingFang HK","PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif;
  --f-display:"Avenir Next Condensed","DIN Condensed","Roboto Condensed","Arial Narrow","Helvetica Neue",-apple-system,sans-serif;
  --f-han:"Songti TC","STSongti-TC-Bold","Noto Serif CJK TC","Noto Serif TC","Source Han Serif TC","PMingLiU","MingLiU",serif;
  --f-brush:"Kaiti TC","STKaiti","BiauKai","DFKai-SB","Kaiti SC",var(--f-han);
  /* Type scale (px): 13 · 15 · 17 · 20 · 26 · 34 · 48 */
  --fs-xs:13px; --fs-s:15px; --fs-m:17px; --fs-l:20px; --fs-xl:26px; --fs-2xl:34px; --fs-3xl:48px;
  --bar-h:58px;
  font-family:var(--f-body); color:var(--ink); background:var(--night); color-scheme:dark;
}
body[data-page="learn"] { --acc:var(--c-amber); }
body[data-page="phrases"] { --acc:var(--c-magenta); }
body[data-page="ear"] { --acc:var(--c-cyan); }
body[data-page="daily"] { --acc:var(--c-red); }
body[data-page="calculator"] { --acc:var(--c-jade); }
body[data-page="score"] { --acc:var(--c-white); }

* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; overflow-x:clip; }
body { margin:0; min-height:100svh; background:transparent; position:relative; overflow-x:clip; font-size:var(--fs-m); }

/* The night: an out-of-focus street of signs (one 8 KB pre-rendered image, art/street.webp), darkened so text
   always reads, drifting very slowly. Fixed pseudo-elements, so no background-attachment trouble on iOS. */
body::before { content:""; position:fixed; inset:-4%; z-index:-2; pointer-events:none;
  background:url("/table/art/street.webp") center 30% / cover no-repeat, var(--night);
  opacity:.85; transform-origin:50% 40%; animation:t-drift 70s ease-in-out infinite alternate; }
body::after { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    linear-gradient(90deg, rgba(3,2,7,0), rgba(3,2,7,.5) 18%, rgba(3,2,7,.82) 30%, rgba(3,2,7,.86) 50%, rgba(3,2,7,.82) 70%, rgba(3,2,7,.5) 82%, rgba(3,2,7,0)),
    linear-gradient(180deg, rgba(3,2,7,.1), rgba(3,2,7,.35) 45%, rgba(3,2,7,.2)); }
@media (max-width:700px) { body::before { background-position:28% 0; background-size:auto 120%; } body::after { background:linear-gradient(180deg, rgba(3,2,7,.2) 0, rgba(3,2,7,.55) 18%, rgba(3,2,7,.8) 40%, rgba(3,2,7,.84) 75%, rgba(3,2,7,.6)); } }
@keyframes t-drift { from { transform:scale(1.02) translate3d(0,0,0); } to { transform:scale(1.08) translate3d(-1.5%,1%,0); } }

a { color:#86ecff; text-decoration-thickness:1px; text-underline-offset:3px; }
a:hover { color:#c4f6ff; }
:focus-visible { outline:2px solid rgb(var(--c-cyan)); outline-offset:2px; }
h1 { font-family:var(--f-display); font-weight:700; font-size:clamp(28px,7.4vw,48px); margin:0 0 6px; color:var(--ink); letter-spacing:.005em; line-height:1.04; }
h2 { font-family:var(--f-display); font-weight:700; font-size:clamp(22px,5.4vw,28px); margin:0 0 10px; line-height:1.12; color:#fff6ec; letter-spacing:.01em; }
h3 { font-family:var(--f-display); font-weight:700; letter-spacing:.01em; }
p { line-height:1.55; }
b, strong { color:#fff; }
.dim { color:var(--dim); }
.han { font-family:var(--f-han); font-weight:600; }
.ok { color:rgb(var(--c-jade)); } .no { color:#ff8ea2; }

/* Section headings in content get a short lit tube underneath. */
.t-main section > h2::after, .t-main > h2::after, .t-main article > h2::after { content:""; display:block; width:38px; height:3px; margin-top:8px; border-radius:2px;
  background:rgb(var(--acc)); box-shadow:0 0 6px rgb(var(--acc) / .9), 0 0 16px rgb(var(--acc) / .5); }
.t-main .card > h2::after, .t-main section.card > h2::after { display:none; }

/* ---- Neon helpers ------------------------------------------------------------------------------------------- */
/* Glass tube text: a near-white core and layered glow in the tube colour (set --tube, defaults to the page sign). */
.neon { --tube:var(--acc); color:color-mix(in srgb, rgb(var(--tube)) 30%, #fff);
  text-shadow:0 0 2px rgb(var(--tube) / .9), 0 0 9px rgb(var(--tube) / .75), 0 0 22px rgb(var(--tube) / .5), 0 0 44px rgb(var(--tube) / .3); }
/* Flicker on: two quick dips, then steady. Well under 3 Hz, small areas only, off with reduced motion. */
@keyframes t-flicker { 0% { opacity:.1; } 9% { opacity:.95; } 14% { opacity:.3; } 34% { opacity:1; } 39% { opacity:.6; } 46%,100% { opacity:1; } }

/* ---- Page frame: header.t-top (shell), main.t-main, footer.t-foot ------------------------------------------- */
.t-top { position:sticky; top:0; z-index:40; display:flex; align-items:center; gap:8px; min-height:var(--bar-h);
  padding:7px max(12px,env(safe-area-inset-right)) 7px max(12px,env(safe-area-inset-left)); padding-top:max(7px,env(safe-area-inset-top));
  background:linear-gradient(180deg, rgba(3,2,7,.94), rgba(6,4,12,.86)); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  box-shadow:0 1px 0 rgb(var(--c-magenta) / .35), 0 1px 12px rgb(var(--c-magenta) / .18); }
.t-brand { display:flex; align-items:center; gap:9px; text-decoration:none; margin-right:auto; min-height:44px; min-width:0; color:var(--ink); }
.t-brand-sign { display:grid; place-items:center; width:40px; height:40px; flex:none; border-radius:5px; font-family:var(--f-brush); font-weight:700; font-size:17px; line-height:1;
  writing-mode:vertical-rl; letter-spacing:-.04em; color:#fff1f3;
  border:1.5px solid rgb(var(--c-red)); background:rgba(40,4,12,.6);
  box-shadow:0 0 0 2px #030207, 0 0 0 3px rgb(var(--c-red) / .35), 0 0 12px rgb(var(--c-red) / .55), inset 0 0 8px rgb(var(--c-red) / .5);
  text-shadow:0 0 3px rgb(var(--c-red)), 0 0 10px rgb(var(--c-red) / .8); animation:t-flicker 1.4s .2s both; }
.t-brand-name { display:flex; flex-direction:column; line-height:1; font-family:var(--f-display); font-weight:700; font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--dim); white-space:nowrap; }
.t-brand-name b { font-size:19px; letter-spacing:.16em; margin-top:3px; color:#ffeac8; text-shadow:0 0 6px rgb(var(--c-amber) / .8), 0 0 16px rgb(var(--c-amber) / .45); }
.t-brand:hover .t-brand-name b { color:#fff; }

.t-tools-btn, .t-play { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 14px; border-radius:9px; font:inherit;
  font-family:var(--f-display); font-weight:700; font-size:17px; letter-spacing:.08em; text-transform:uppercase; text-decoration:none; cursor:pointer; white-space:nowrap;
  -webkit-tap-highlight-color:transparent; }
.t-tools-btn { color:#dff9ff; background:rgb(var(--c-cyan) / .06); border:1.5px solid rgb(var(--c-cyan) / .75);
  box-shadow:0 0 10px -2px rgb(var(--c-cyan) / .5), inset 0 0 8px -2px rgb(var(--c-cyan) / .45); text-shadow:0 0 8px rgb(var(--c-cyan) / .6); }
.t-tools-btn[aria-expanded="true"] { background:rgb(var(--c-cyan) / .18); }
.t-burger { position:relative; width:16px; height:2px; background:currentColor; border-radius:2px; box-shadow:0 -5px 0 currentColor, 0 5px 0 currentColor; }
.t-play { color:#fff3dc; background:linear-gradient(180deg, rgb(var(--c-amber) / .28), rgb(var(--c-amber) / .12)); border:2px solid rgb(var(--c-amber));
  box-shadow:0 0 0 2px #030207, 0 0 0 3px rgb(var(--c-amber) / .45), 0 0 16px rgb(var(--c-amber) / .55), inset 0 0 12px rgb(var(--c-amber) / .45);
  text-shadow:0 0 6px rgb(var(--c-amber)), 0 0 14px rgb(var(--c-amber) / .6); }
.t-play::before { content:""; width:0; height:0; border-left:9px solid currentColor; border-top:6px solid transparent; border-bottom:6px solid transparent; filter:drop-shadow(0 0 4px rgb(var(--c-amber))); }
.t-play:hover, .t-tools-btn:hover { filter:brightness(1.15); }
@media (max-width:359px) { .t-brand-name { display:none; } }

/* Tools menu: full screen on phones, a drop-down board on wider screens. */
.t-menu { position:fixed; inset:0; z-index:60; display:flex; flex-direction:column; overflow-y:auto; overscroll-behavior:contain;
  padding:max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
  background:radial-gradient(120% 60% at 50% 0, rgba(40,16,48,.9), transparent 70%), #050309; }
.t-menu[hidden] { display:none; }
.t-menu-head { display:flex; align-items:center; justify-content:space-between; min-height:46px; margin-bottom:8px; }
.t-menu-title { font-family:var(--f-display); font-weight:700; font-size:15px; letter-spacing:.22em; text-transform:uppercase; color:var(--dim); }
.t-menu-close { width:46px; height:46px; border-radius:9px; border:1.5px solid rgb(var(--c-cyan) / .6); background:transparent; color:#dff9ff; font-size:22px; cursor:pointer;
  box-shadow:0 0 10px -3px rgb(var(--c-cyan) / .6); }
.t-menu-list { list-style:none; margin:0; padding:0; display:grid; gap:9px; }
.t-mi { --acc:var(--c-amber); display:grid; grid-template-columns:54px minmax(0,1fr); align-items:center; gap:14px; min-height:70px; padding:8px 14px 8px 8px; border-radius:8px;
  text-decoration:none; color:var(--ink); background:linear-gradient(90deg, rgb(var(--acc) / .08), rgba(12,9,19,.6) 60%); border:1px solid rgb(var(--acc) / .3); }
.t-mi:hover, .t-mi:focus-visible { border-color:rgb(var(--acc) / .85); box-shadow:0 0 16px -4px rgb(var(--acc) / .7); background:linear-gradient(90deg, rgb(var(--acc) / .16), rgba(12,9,19,.7) 70%); }
.t-mi-glyph { display:grid; place-items:center; width:54px; height:54px; border-radius:6px; font-family:var(--f-brush); font-size:32px; line-height:1;
  color:color-mix(in srgb, rgb(var(--acc)) 30%, #fff); border:1.5px solid rgb(var(--acc)); background:rgb(var(--acc) / .07);
  box-shadow:0 0 0 2px #030207, 0 0 0 3px rgb(var(--acc) / .3), 0 0 12px rgb(var(--acc) / .45), inset 0 0 10px rgb(var(--acc) / .35);
  text-shadow:0 0 3px rgb(var(--acc)), 0 0 12px rgb(var(--acc) / .8); }
.t-mi-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.t-mi-text b { font-family:var(--f-display); font-weight:700; font-size:20px; letter-spacing:.03em; color:#fff6ec; }
.t-mi-text span { font-size:14px; color:var(--dim); line-height:1.35; }
.t-mi[aria-current="page"] { border-color:rgb(var(--acc)); background:linear-gradient(90deg, rgb(var(--acc) / .2), rgba(12,9,19,.7) 75%); }
.t-mi[aria-current="page"] .t-mi-text b::after { content:"Here"; margin-left:10px; padding:2px 7px; border-radius:4px; vertical-align:3px;
  font-family:var(--f-body); font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#06040b; background:rgb(var(--acc)); }
.t-menu-foot { display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; margin-top:16px; padding-top:14px; border-top:1px solid var(--edge); }
.t-menu-foot > span { font-size:14px; color:var(--dim); }
.t-menu-play { margin-top:16px; width:100%; min-height:56px; font-size:19px; }
body.t-menu-open { overflow:hidden; }
@media (min-width:760px) {
  .t-menu { inset:auto; top:calc(var(--bar-h) + 8px); right:max(16px, calc((100vw - 1180px) / 2)); width:min(680px, calc(100vw - 32px)); max-height:calc(100svh - var(--bar-h) - 24px);
    padding:14px 16px 16px; border-radius:10px; border:1px solid rgb(var(--c-cyan) / .45);
    background:linear-gradient(180deg, rgba(14,10,24,.98), rgba(6,4,12,.98));
    box-shadow:0 0 0 3px rgba(3,2,7,.9), 0 0 0 4px rgb(var(--c-cyan) / .2), 0 0 30px -6px rgb(var(--c-cyan) / .45), 0 30px 60px rgba(0,0,0,.7); }
  .t-menu-list { grid-template-columns:1fr 1fr; }
  body.t-menu-open { overflow:auto; }
  .t-top { padding-left:max(24px, calc((100vw - 1180px) / 2)); padding-right:max(24px, calc((100vw - 1180px) / 2)); }
}

.t-main { max-width:780px; margin:0 auto; padding:18px 16px 40px; }
.t-foot { max-width:780px; margin:0 auto; padding:18px 16px calc(34px + env(safe-area-inset-bottom)); color:var(--dim); font-size:var(--fs-xs); text-align:center; }
.t-foot a { color:var(--dim); }

/* Page header (shell.js wraps the h1 and its first paragraph): a neon sign glyph beside the title. */
.t-hero { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; column-gap:14px; margin:4px 0 20px; }
.t-hero-sign { grid-row:1; display:grid; place-items:center; width:62px; height:78px; border-radius:6px; font-family:var(--f-brush); font-size:44px; line-height:1;
  color:color-mix(in srgb, rgb(var(--acc)) 28%, #fff); border:2px solid rgb(var(--acc)); background:radial-gradient(circle at 50% 45%, rgb(var(--acc) / .16), rgba(6,4,12,.7) 70%);
  box-shadow:0 0 0 3px #030207, 0 0 0 4px rgb(var(--acc) / .38), 0 0 18px rgb(var(--acc) / .55), 0 0 44px rgb(var(--acc) / .25), inset 0 0 14px rgb(var(--acc) / .45);
  text-shadow:0 0 3px rgb(var(--acc)), 0 0 12px rgb(var(--acc) / .9), 0 0 28px rgb(var(--acc) / .55); animation:t-flicker 1.5s .35s both; }
.t-hero h1 { grid-column:2; margin:0; text-wrap:balance; text-shadow:0 0 18px rgb(var(--acc) / .35); }
.t-hero > p { grid-column:1 / -1; margin:12px 0 0; font-size:var(--fs-m); color:#ddd6e8; max-width:62ch; }
.t-hero > p .han { color:color-mix(in srgb, rgb(var(--acc)) 45%, #fff); }
@media (min-width:700px) { .t-hero { column-gap:20px; margin:14px 0 26px; } .t-hero-sign { width:78px; height:98px; font-size:56px; } .t-hero > p { grid-column:2; margin-top:8px; } }

/* ---- Building blocks ----------------------------------------------------------------------------------------- */
/* Sign-board: dark backing, a thin lit frame, a dark gap, and four corner fixings. Set --frame to change its tube. */
.card { --frame:var(--acc); position:relative; margin:14px 0; padding:18px 16px; border-radius:6px; border:1px solid rgb(var(--frame) / .5);
  background:
    radial-gradient(circle at 9px 9px, #9a93a6 0 1.4px, #3a3442 1.9px, transparent 2.8px),
    radial-gradient(circle at calc(100% - 9px) 9px, #9a93a6 0 1.4px, #3a3442 1.9px, transparent 2.8px),
    radial-gradient(circle at 9px calc(100% - 9px), #9a93a6 0 1.4px, #3a3442 1.9px, transparent 2.8px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), #9a93a6 0 1.4px, #3a3442 1.9px, transparent 2.8px),
    linear-gradient(180deg, rgba(20,15,30,.95), rgba(9,7,15,.95));
  box-shadow:inset 0 0 0 3px rgba(3,2,7,.7), inset 0 0 0 4px rgb(var(--frame) / .14), 0 0 20px -8px rgb(var(--frame) / .55), 0 12px 30px -14px rgba(0,0,0,.95); }

/* Glass-tube buttons. --tube picks the colour (cyan for ordinary, amber for the main action). */
.btn { --tube:var(--c-cyan); display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:10px 18px; border-radius:9px; font:inherit; font-weight:650; font-size:16px;
  color:#f6fdff; text-decoration:none; cursor:pointer; -webkit-tap-highlight-color:transparent;
  background:rgb(var(--tube) / .07); border:1.5px solid rgb(var(--tube) / .8);
  box-shadow:0 0 12px -3px rgb(var(--tube) / .55), inset 0 0 10px -3px rgb(var(--tube) / .5); text-shadow:0 0 8px rgb(var(--tube) / .5);
  transition:box-shadow .15s, background-color .15s, transform .08s; }
.btn:hover { background:rgb(var(--tube) / .14); box-shadow:0 0 18px -3px rgb(var(--tube) / .75), inset 0 0 12px -3px rgb(var(--tube) / .6); }
.btn:active { transform:translateY(1px); }
.btn.gold { --tube:var(--c-amber); color:#fff4de; font-weight:700; border-width:2px; background:linear-gradient(180deg, rgb(var(--c-amber) / .3), rgb(var(--c-amber) / .12));
  box-shadow:0 0 0 2px #030207, 0 0 0 3px rgb(var(--c-amber) / .4), 0 0 18px rgb(var(--c-amber) / .5), inset 0 0 12px rgb(var(--c-amber) / .45);
  text-shadow:0 0 6px rgb(var(--c-amber)), 0 0 14px rgb(var(--c-amber) / .55); }
.btn.gold:hover { background:linear-gradient(180deg, rgb(var(--c-amber) / .42), rgb(var(--c-amber) / .2)); }
.btn.ghost { --tube:var(--c-white); color:var(--ink); border-color:rgb(var(--c-white) / .3); background:rgba(255,255,255,.03); box-shadow:none; text-shadow:none; }
.btn.ghost:hover { border-color:rgb(var(--c-cyan) / .7); background:rgb(var(--c-cyan) / .07); box-shadow:0 0 12px -4px rgb(var(--c-cyan) / .6); }
.btn[disabled] { opacity:.38; cursor:default; box-shadow:none; text-shadow:none; }
.row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }

/* Segmented control: a dark rail, the chosen segment lit as a tube. */
.seg { --tube:var(--c-cyan); display:inline-flex; gap:2px; padding:3px; border-radius:10px; border:1px solid rgba(255,255,255,.14); background:rgba(0,0,0,.45); max-width:100%; }
.seg button { border:0; background:transparent; color:var(--dim); font:inherit; font-weight:650; font-size:14px; padding:7px 13px; border-radius:7px; cursor:pointer; min-height:38px; -webkit-tap-highlight-color:transparent; }
.seg button:hover { color:var(--ink); }
.seg button[aria-pressed="true"] { color:#f3fdff; background:rgb(var(--tube) / .16); box-shadow:inset 0 0 0 1.5px rgb(var(--tube)), 0 0 12px -2px rgb(var(--tube) / .6), inset 0 0 10px rgb(var(--tube) / .3);
  text-shadow:0 0 8px rgb(var(--tube) / .8); }
.chip { --tube:var(--c-magenta); display:inline-flex; align-items:center; gap:6px; border-radius:6px; padding:6px 12px; font-size:14px; color:var(--ink);
  border:1px solid rgb(var(--tube) / .45); background:rgb(var(--tube) / .06); }
.chip.on { color:#fff0fb; border-color:rgb(var(--tube)); background:rgb(var(--tube) / .16); box-shadow:0 0 12px -2px rgb(var(--tube) / .65); text-shadow:0 0 8px rgb(var(--tube) / .8); }

/* The scoreboard number. */
.big { font-family:var(--f-display); font-size:clamp(48px,14vw,76px); font-weight:800; line-height:.95; font-variant-numeric:tabular-nums;
  color:#fff1d8; text-shadow:0 0 3px rgb(var(--c-amber)), 0 0 12px rgb(var(--c-amber) / .85), 0 0 30px rgb(var(--c-amber) / .5); }

/* Forms and tables belong to the same street. */
.t-main input:not([type="checkbox"]):not([type="radio"]), .t-main select, .t-main textarea {
  font:inherit; color:var(--ink); background:rgba(0,0,0,.5); border:1px solid rgb(var(--c-cyan) / .32); border-radius:8px; min-height:44px; padding:8px 12px; }
.t-main input:focus, .t-main select:focus, .t-main textarea:focus { outline:none; border-color:rgb(var(--c-cyan)); box-shadow:0 0 0 1px rgb(var(--c-cyan) / .6), 0 0 14px -2px rgb(var(--c-cyan) / .6); }
.t-main input[type="checkbox"] { accent-color:rgb(var(--c-amber)); }
.t-main table th { font-family:var(--f-display); font-weight:700; text-transform:uppercase; letter-spacing:.08em; font-size:13px; color:#ffd9a3; }
.t-main table td { border-bottom-color:rgba(255,255,255,.08); }

/* Questions: one look for every FAQ. */
.t-main details > summary { cursor:pointer; }
details.sc-faq, .faq details, .calc-faq details, .d-static details { border-bottom:1px solid rgba(255,255,255,.1); border-top:0; }
details.sc-faq > summary, .faq summary, .calc-faq summary, .d-static summary { list-style:none; position:relative; padding:14px 40px 14px 0; min-height:48px; font-weight:650; }
details.sc-faq > summary::-webkit-details-marker, .faq summary::-webkit-details-marker, .calc-faq summary::-webkit-details-marker, .d-static summary::-webkit-details-marker { display:none; }
details.sc-faq > summary::after, .faq summary::after, .calc-faq summary::after, .d-static summary::after {
  content:"+"; position:absolute; right:6px; top:50%; transform:translateY(-50%); font-size:24px; font-weight:400; color:rgb(var(--acc)); text-shadow:0 0 8px rgb(var(--acc) / .8); }
details.sc-faq[open] > summary::after, .faq details[open] summary::after, .calc-faq details[open] summary::after, .d-static details[open] summary::after { content:"−"; }

/* ---- Tiles: ivory with a jade back, lit warm from above. Size with --tile-w on any ancestor. --------------- */
.tile { position:relative; display:inline-block; width:var(--tile-w); aspect-ratio:3/4; padding:0; border:0; flex:none; border-radius:calc(var(--tile-w) * .13); cursor:pointer;
  background:linear-gradient(170deg, #fffdf7 0%, #f8f0de 55%, #e9dcc0 100%);
  box-shadow:inset 0 1px 0 #fff, inset 0 calc(var(--tile-w) * -.03) 0 rgba(120,90,40,.12),
    0 calc(var(--tile-w) * .07) 0 #23a274, 0 calc(var(--tile-w) * .09) 0 #0e5d40, 0 calc(var(--tile-w) * .14) calc(var(--tile-w) * .2) rgba(0,0,0,.6);
  vertical-align:top; -webkit-tap-highlight-color:transparent; transition:transform .08s, box-shadow .15s; }
span.tile { cursor:default; }
.tile svg { position:absolute; left:8%; top:6%; width:84%; height:88%; display:block; pointer-events:none; }
button.tile:active { transform:translateY(calc(var(--tile-w) * .06)); }
@media (hover:hover) { button.tile:not([disabled]):hover, a.tile:hover { transform:translateY(-2px); } }
.tile--s { --tile-w:30px; }
.tile[disabled] { opacity:.28; cursor:default; }
.tile.win { outline:2.5px solid rgb(var(--c-amber)); outline-offset:2px; box-shadow:inset 0 1px 0 #fff, 0 calc(var(--tile-w) * .07) 0 #23a274, 0 calc(var(--tile-w) * .09) 0 #0e5d40, 0 0 16px rgb(var(--c-amber) / .75); }
.tiles { display:flex; flex-wrap:wrap; gap:calc(var(--tile-w) * .18) calc(var(--tile-w) * .1); padding-bottom:calc(var(--tile-w) * .14); }

/* Felt on a wooden rail, a warm lamp overhead and the page's sign colour as rim light. */
.felt { border:6px solid transparent; border-radius:14px; padding:14px 12px;
  background:
    radial-gradient(110% 70% at 50% -8%, rgba(255,226,170,.26), transparent 62%) padding-box,
    radial-gradient(130% 110% at 50% 35%, #15603f, #0b3a29 58%, #052016) padding-box,
    linear-gradient(155deg, #7a4422, #3b1c0c 38%, #63331a 62%, #2a1307) border-box;
  box-shadow:inset 0 3px 12px rgba(0,0,0,.55), inset 0 0 0 1px rgba(0,0,0,.4),
    0 0 0 1px rgb(var(--acc) / .55), 0 -4px 24px -8px rgb(var(--acc) / .55), 0 0 28px -10px rgb(var(--acc) / .6), 0 22px 40px -16px rgba(0,0,0,.9); }

/* The closing link to the paid game: a lit sign. */
.t-cta { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:14px; margin:34px 0 0; padding:16px 18px; border-radius:8px;
  text-decoration:none; color:var(--ink); border:2px solid rgb(var(--c-amber) / .9);
  background:radial-gradient(120% 140% at 0 0, rgb(var(--c-amber) / .16), transparent 60%), linear-gradient(180deg, rgba(24,16,10,.95), rgba(10,7,6,.95));
  box-shadow:0 0 0 3px #030207, 0 0 0 4px rgb(var(--c-amber) / .35), 0 0 26px -4px rgb(var(--c-amber) / .5), inset 0 0 18px rgb(var(--c-amber) / .2); }
.t-cta img { width:56px; height:56px; border-radius:12px; flex:none; box-shadow:0 0 14px rgb(var(--c-amber) / .45); }
.t-cta b { display:block; font-family:var(--f-display); font-size:21px; font-weight:700; letter-spacing:.02em; color:#fff2da; text-shadow:0 0 8px rgb(var(--c-amber) / .8), 0 0 20px rgb(var(--c-amber) / .45); margin-bottom:3px; }
.t-cta span { font-size:15px; color:#dcd4c8; line-height:1.4; }
.t-cta:hover { box-shadow:0 0 0 3px #030207, 0 0 0 4px rgb(var(--c-amber) / .55), 0 0 34px -2px rgb(var(--c-amber) / .65), inset 0 0 22px rgb(var(--c-amber) / .3); }

@media (min-width:560px) { :root { --tile-w:52px; } .t-main { padding-top:24px; } }
@media (prefers-reduced-motion:reduce) {
  body::before, .t-brand-sign, .t-hero-sign { animation:none !important; }
  .btn, .tile { transition:none; }
}
@media print {
  .t-top,.t-foot,.t-cta,.btn,.t-menu,.t-hero-sign { display:none !important; }
  body::before, body::after { display:none !important; }
  body { background:#fff; color:#000; }
  h1, h2, .t-hero h1 { color:#000 !important; text-shadow:none !important; }
  .t-main h2::after { display:none !important; }
  .t-hero { display:block; margin:0; }
}
