/* TCG 12 Days of Festive: ONE shared UI system for all 12 games ("waybill"). Owner: coordinator. See templates-src/tcg-12-doors/ART-DIRECTION-BIBLE.md §3-5.
   Use: <link rel="stylesheet" href="../../kit/tcg-ui.css"> (from v2/games/<slug>/index.html). Classes are prefixed tcg- so they never clash with an engine. */
@font-face { font-family: 'Montserrat'; src: url('fonts/montserrat-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('fonts/montserrat-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('fonts/montserrat-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('fonts/montserrat-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }
:root {
  --tcg-blue: #264796; --tcg-navy: #212952; --tcg-orange: #ED7D31; --tcg-orange-d: #b9551a; --tcg-paper: #ffffff; --tcg-ink: #1d2a4d;
  --tcg-shadow: 0 10px 30px rgba(12, 28, 72, .25); --tcg-r: 18px;
  --tcg-in: cubic-bezier(.2, .9, .2, 1); --tcg-out: cubic-bezier(.6, 0, .4, 1); --tcg-pop: cubic-bezier(.34, 1.56, .64, 1);
  --tcg-safe-t: env(safe-area-inset-top, 0px); --tcg-safe-b: env(safe-area-inset-bottom, 0px);
}
.tcg, .tcg * { box-sizing: border-box; }
.tcg { font-family: Montserrat, system-ui, -apple-system, sans-serif; color: var(--tcg-ink); -webkit-tap-highlight-color: transparent; }

/* card: white label, blue header strip, optional tape accent */
.tcg-card { background: var(--tcg-paper); border-radius: var(--tcg-r); box-shadow: var(--tcg-shadow); overflow: hidden; }
.tcg-card > .tcg-card-hd { background: var(--tcg-blue); color: #fff; font: 800 12px/1 Montserrat; letter-spacing: .14em; text-transform: uppercase; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; }
.tcg-card > .tcg-card-bd { padding: 14px 16px 16px; }
.tcg-title { font: 900 26px/1.02 Montserrat; letter-spacing: -.01em; color: var(--tcg-navy); margin: 0; }
.tcg-title b { color: var(--tcg-blue); font-weight: 900; }

/* primary button: orange, tactile base, press compresses */
.tcg-btn { appearance: none; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 0 22px;
  border-radius: 16px; background: linear-gradient(180deg, #f39556, var(--tcg-orange) 55%); color: #fff; font: 800 19px/1 Montserrat; letter-spacing: .01em;
  box-shadow: 0 4px 0 var(--tcg-orange-d), 0 10px 22px rgba(185, 85, 26, .35); transition: transform 90ms var(--tcg-out), box-shadow 90ms var(--tcg-out); }
.tcg-btn:active, .tcg-btn.is-down { transform: translateY(2px); box-shadow: 0 2px 0 var(--tcg-orange-d), 0 6px 14px rgba(185, 85, 26, .3); }
/* 13 Nov 03:35 coordinator: the hidden attribute must always win over the kit's display rules (Restart was still visible in-shell in D9/D10 -> second start without finish) */
.tcg-btn[hidden], .tcg-iconbtn[hidden], .tcg-chip[hidden], .tcg-card[hidden], .tcg-tape[hidden] { display: none !important; }
.tcg-btn[disabled] { filter: grayscale(.6) brightness(1.05); opacity: .7; }
.tcg-btn.ghost { background: #fff; color: var(--tcg-blue); box-shadow: 0 4px 0 #c9d3ea, 0 10px 22px rgba(12, 28, 72, .18); }
.tcg-iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--tcg-blue); box-shadow: 0 4px 14px rgba(12, 28, 72, .25); cursor: pointer; }

/* HUD: blue glass chips; top-left objective, top-right time/score */
.tcg-hud { position: absolute; left: 0; right: 0; top: calc(10px + var(--tcg-safe-t)); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 0 12px; pointer-events: none; z-index: 20; }
.tcg-hud > * { pointer-events: auto; }
.tcg-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 14px; border-radius: 999px; background: rgba(38, 71, 150, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font: 800 18px/1 Montserrat; box-shadow: 0 6px 16px rgba(12, 28, 72, .28); }
.tcg-chip small { font: 700 12px/1.1 Montserrat; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.tcg-chip.bump { animation: tcgBump 380ms var(--tcg-pop); }
@keyframes tcgBump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* courier tape: the one orange accent per screen */
.tcg-tape { display: inline-block; background: var(--tcg-orange); color: #fff; font: 800 13px/1 Montserrat; letter-spacing: .18em; text-transform: uppercase; padding: 8px 14px 7px; transform: rotate(-2deg);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .06));
  clip-path: polygon(0 8%, 3% 0, 97% 0, 100% 10%, 98% 30%, 100% 50%, 98% 70%, 100% 90%, 97% 100%, 3% 100%, 0 92%, 2% 70%, 0 50%, 2% 30%); }

/* feedback pop (+1, "Sharp!") */
.tcg-pop { position: absolute; pointer-events: none; font: 900 26px/1 Montserrat; color: #fff; text-shadow: 0 2px 0 var(--tcg-blue), 0 6px 14px rgba(12, 28, 72, .4); animation: tcgPop 900ms var(--tcg-in) forwards; z-index: 30; }
@keyframes tcgPop { 0% { opacity: 0; transform: translate(-50%, 0) scale(.6); } 25% { opacity: 1; transform: translate(-50%, -14px) scale(1.12); } 100% { opacity: 0; transform: translate(-50%, -54px) scale(1); } }

/* tutorial overlay: SEE IT -> TRY IT -> FEEDBACK -> PLAY (driven by tutor.js) */
.tcg-tutor { position: absolute; inset: 0; z-index: 50; pointer-events: auto; }
.tcg-tutor .tcg-dim { position: absolute; inset: 0; background: radial-gradient(ellipse at var(--fx, 50%) var(--fy, 50%), rgba(12, 28, 72, 0) 0, rgba(12, 28, 72, 0) var(--fr, 90px), rgba(12, 28, 72, .45) calc(var(--fr, 90px) + 60px)); transition: background 300ms var(--tcg-in); }
.tcg-hand { position: absolute; left: 0; top: 0; width: 64px; height: 80px; background: url('hand.svg') center/contain no-repeat; transform-origin: 20px 4px; pointer-events: none; z-index: 52; will-change: transform; transition: opacity 200ms; }
.tcg-hand.tap { animation: tcgTap 360ms var(--tcg-out); }
@keyframes tcgTap { 0% { scale: 1; } 45% { scale: .86; } 100% { scale: 1; } }
.tcg-ripple { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid var(--tcg-orange); pointer-events: none; z-index: 51; animation: tcgRipple 600ms var(--tcg-in) forwards; }
@keyframes tcgRipple { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(4.2); } }
.tcg-caption { position: absolute; left: 50%; top: calc(64px + var(--tcg-safe-t)); transform: translateX(-50%); z-index: 53; white-space: nowrap; }   /* under the HUD, never over a game's bottom UI */
.tcg-caption.at-bottom { top: auto; bottom: calc(26px + var(--tcg-safe-b)); }
.tcg-caption .tcg-tape { font-size: 15px; }
.tcg-skip { position: absolute; right: 12px; top: calc(12px + var(--tcg-safe-t)); z-index: 54; border: 0; border-radius: 999px; padding: 9px 14px; background: rgba(255, 255, 255, .92); color: var(--tcg-blue); font: 800 12px/1 Montserrat; letter-spacing: .1em; box-shadow: 0 4px 12px rgba(12, 28, 72, .2); cursor: pointer; }
.tcg-try { position: absolute; border-radius: 14px; box-shadow: 0 0 0 3px var(--tcg-orange), 0 0 0 9px rgba(237, 125, 49, .28); animation: tcgTry 1.1s ease-in-out infinite; pointer-events: none; z-index: 51; }
@keyframes tcgTry { 50% { box-shadow: 0 0 0 3px var(--tcg-orange), 0 0 0 15px rgba(237, 125, 49, .08); } }
@media (prefers-reduced-motion: reduce) { .tcg-hand, .tcg-ripple, .tcg-pop, .tcg-chip.bump, .tcg-try { animation-duration: 1ms !important; } }

/* 13 Nov 05:10 coordinator: the hidden attribute always wins, everywhere (a game ID rule kept #pauseBtn display:grid while hidden) */
[hidden] { display: none !important; }

/* 15 Nov (owner): every game's card is the landing page's W1 waybill: white paper label, orange speed-stripes across the top,
   navy type on white (no blue header slab), dashed tear line under the header, square-ish label corners */
.tcg-card { border-radius: 6px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 14px 30px rgba(12,28,72,.28); }
.tcg-card::before { content: ''; display: block; height: 10px; background: repeating-linear-gradient(90deg, var(--tcg-orange) 0 46px, transparent 46px 54px), linear-gradient(var(--tcg-orange), var(--tcg-orange)); background-size: 100% 3px, 100% 3px; background-position: 0 2px, 0 7px; background-repeat: no-repeat; }
.tcg-card > .tcg-card-hd { background: #fff; color: #7a849c; font: 800 10px/1.2 Montserrat; letter-spacing: .2em; border-bottom: 1.5px dashed #c9d0dc; padding: 9px 16px; }
.tcg-card > .tcg-card-hd b, .tcg-card > .tcg-card-hd strong { color: var(--tcg-navy, #1d2a4d); }

/* 16 Nov: tutorial caption + skip sit clear of the competition HUD (kit/hud.js ~120px tall in portrait); clean level pill, no tape */
.tcg-caption { top: calc(148px + var(--tcg-safe-t)); }
.tcg-capl { display: inline-block; padding: 11px 20px; border-radius: 999px; background: #fff; color: var(--tcg-navy); font: 900 19px/1 Montserrat, system-ui, sans-serif;
  letter-spacing: -.01em; box-shadow: 0 0 0 3px var(--tcg-orange), 0 10px 26px rgba(12, 28, 72, .3); }
.tcg-skip { top: auto !important; bottom: calc(18px + var(--tcg-safe-b)); }
@media (orientation: landscape) and (max-height: 520px) { .tcg-caption { top: calc(96px + var(--tcg-safe-t)); } .tcg-capl { font-size: 16px; padding: 9px 16px; } }
@media (min-width: 900px) and (min-height: 560px) { .tcg-caption { top: 170px; } .tcg-capl { font-size: 22px; } }
