/* Tile Match only (redesign SPEC 2.1, DECISIONS 121/125): "Madder & Khadi" on the page around the board. The lobby keeps the desk family; here the strip, the result card, the setup cover,
   the no-moves panel and the stage surround wear madder, haldi and khadi, never the desk teal. Colours only: no animation lives here. */
[data-game=tile-match] { --fam-mid: #8E2B22; --fam-base: #A8382B; --fam-bright: #F2C14E; --fam-deep: #5A1D16; --fam-trim: #F2C14E; --fam-edge: #A8382B;
  --nc-strip-bg: #FFF8EC; --nc-strip-ink: #27221C; --nc-strip-sub: #5E5547; }
@media (prefers-color-scheme: dark) { [data-game=tile-match] { --nc-strip-bg: #2A1411; --nc-strip-ink: #FFF3DC; --nc-strip-sub: #E0C9AE; } }
/* the khadi surround (light) and a deep madder one (dark) where the stage is wider than the board */
[data-game=tile-match] .stage { background: #FAF6EE; border-color: #E2C9A0; }
@media (prefers-color-scheme: dark) { [data-game=tile-match] .stage { background: #2A100D; border-color: #5A1D16; } }
/* the strip: khadi (light) or madder-brown (dark) with a madder / haldi edge */
[data-game=tile-match] .nc-strip { border-color: #E2C9A0; border-top-color: var(--fam-edge); }
@media (prefers-color-scheme: dark) { [data-game=tile-match] .nc-strip { border-color: #5A1D16; } [data-game=tile-match] .nc-strip:not([data-tone=invalid]) { border-top-color: var(--fam-bright); } }
[data-game=tile-match] .nc-strip[data-tone=invalid] { border-top-color: var(--nc-invalid); }
/* the result card: madder gradient printed with a faint haldi dot (the block-print frame of the tiles); the scroll shadows of the shared card are kept */
[data-game=tile-match] .nc-result-card { border-color: var(--fam-trim);
  background: linear-gradient(to top, var(--fam-deep) 40%, transparent) center bottom / 100% 26px no-repeat local, radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.55), transparent) center bottom / 100% 14px no-repeat scroll,
    radial-gradient(circle, rgba(242,193,78,.16) 1.2px, transparent 1.8px) 0 0 / 9px 9px, linear-gradient(160deg, #9A3328, var(--fam-mid) 45%, var(--fam-deep)); }
[data-game=tile-match] .nc-stat-tile { background: rgba(40,6,4,.34); box-shadow: inset 0 0 0 1px rgba(242,193,78,.22); }
/* the setup cover: woven madder felt (warp, weft, twill) under a haldi inlay */
[data-game=tile-match] .pf-overlay.setup:not(.solid) { color: #FFF6E8; box-shadow: inset 0 0 0 3px rgba(242,193,78,.6);
  background: repeating-linear-gradient(0deg, rgba(255,236,200,.05) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(30,0,0,.07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(64deg, rgba(255,236,200,.05) 0 1px, transparent 1px 6px), radial-gradient(ellipse at 50% 38%, #A33A2C, #6A2018 68%, #3E0F0B); }
[data-game=tile-match] .pf-overlay.setup:not(.solid) h2 { color: #FFF3DC; text-shadow: 0 1px 0 rgba(0,0,0,.45); }
/* no more moves: the loss card (rd-round4: madder over the shared slate, a steel rim, no dots or gold, so it is unlike the win card), docked at the foot of the board so the stuck position stays in view; the buttons apart */
[data-game=tile-match] .pf-overlay.stuck { inset: auto 8px 8px 8px; max-height: calc(100% - 16px); gap: 6px; padding: 12px 14px 14px; border-radius: 20px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--fam-deep) 55%, #454b62), color-mix(in srgb, var(--fam-deep) 55%, #22263a));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fam-base) 40%, #8e94ad), 0 18px 34px -10px rgba(0,0,0,.6); }
[data-game=tile-match] .pf-overlay.stuck p { margin: 0; }
/* the bar: Best and Best chain side by side as stat chips (the second row on a phone holds them with Full) */
[data-game=tile-match] .nc-bar .tm-chain { margin-left: 0; }
[data-game=tile-match] .pf-overlay.stuck h2 { color: #FFF3DC; }
[data-game=tile-match] .pf-overlay.stuck p { color: #F3E2CC; max-width: 30rem; }
[data-game=tile-match] .pf-overlay.stuck .row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
/* the phone toolbar: each button an icon over a short label (as on desktop, where the labels sit beside the icons), 48 px or more */
@media (max-width: 559px) {
  [data-game=tile-match] .nc-bar { gap: 4px; }
  [data-game=tile-match] .nc-bar .nc-ibtn { flex-direction: column; gap: 3px; width: auto; min-width: 48px; min-height: 52px; padding: 5px 5px 4px; border-radius: 14px; }
  [data-game=tile-match] .nc-bar .nc-lbl { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; font-size: 13px; line-height: 1; font-weight: 800; }
  [data-game=tile-match] .nc-bar :is([data-act=sound],[data-act=fullscreen]) .nc-lbl { font-size: 0; visibility: hidden; }
  [data-game=tile-match] .nc-bar [data-act=sound] .nc-lbl::after { content: "Sound"; font-size: 13px; visibility: visible; }
  [data-game=tile-match] .nc-bar [data-act=fullscreen] .nc-lbl::after { content: "Full"; font-size: 13px; visibility: visible; }
}
