/* ✏️ Sketchy Cheese — phone overlay (.sk-*), big screen (.skd-*) and host card (.skh-*).
   Loaded by player.html, host_display.html and enhanced_host_control.html. */

/* ── phone ─────────────────────────────────────────────────────────────────────────────────── */
#sketchGameInterface.sk-root {
  position: fixed; inset: 0; z-index: 55; display: none; flex-direction: column; gap: 5px;
  /* Top: the player info bar (z 100, ~50px). Bottom: the 🏆 records / ℹ️ rules corner buttons step aside
     while the sheet is up (body.sk-open below), so the tools / keyboard may use the bottom of the screen. */
  padding: 52px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(120% 70% at 50% -10%, #3b2a0c, transparent 60%), linear-gradient(170deg, #1d1606, #0c0903);
  color: #fff8e6; overflow: hidden; font-family: inherit;
}
/* One head line: ⏱ timer · the word / mask banner · 🏅 this phone's points (the mode title is not shown). */
.sk-head { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 44px; }
.sk-head .sk-timer, .sk-head .sk-me { flex: 0 0 auto; font-weight: 800; font-size: .9rem; background: rgba(0,0,0,.35); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.sk-head .sk-timer { font-variant-numeric: tabular-nums; min-width: 56px; text-align: center; }
.sk-head .sk-timer:empty, .sk-head .sk-me:empty { display: none; }
.sk-timer.sk-urgent { color: #f87171; animation: skPulse .9s ease-in-out infinite; }
@keyframes skPulse { 50% { transform: scale(1.08); } }
.sk-banner { flex: 1 1 auto; min-width: 0; text-align: center; font-size: 1rem; font-weight: 700; line-height: 1.2; }
.sk-banner b { font-size: 1.3rem; color: #fde047; letter-spacing: .5px; }
.sk-banner small { display: block; font-size: .76rem; font-weight: 600; opacity: .8; margin-top: 1px; }
.sk-banner.big { font-size: 1.25rem; }
/* the corner buttons (minigame-records.js / minigame-rules.js) give the sheet the bottom of the screen */
body.sk-open #mgRecordsBtn, body.sk-open .mg-records-btn, body.sk-open #miniGameInfoBtn { display: none !important; }
.sk-mask { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.sk-mask i { display: inline-block; min-width: 1.05em; height: 1.45em; border-bottom: 3px solid #fde047; text-align: center;
  font-style: normal; font-weight: 900; font-size: 1.35rem; line-height: 1.4em; color: #fde047; }
.sk-mask i.gap { border: 0; min-width: .55em; }
.sk-stage { position: relative; flex: 1 1 auto; min-height: 140px; }
.sk-pad-host { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.sk-canvas { display: block; background: #fff; border-radius: 10px; box-shadow: 0 6px 22px rgba(0,0,0,.5); }
.sk-overlay { position: absolute; inset: 0; z-index: 2; display: none; align-items: center; justify-content: center; padding: 6px; overflow-y: auto; }
.sk-card { max-width: 440px; width: 100%; text-align: center; background: rgba(28, 20, 6, .93); border: 2px solid #c79a2c; border-radius: 16px; padding: 14px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.55); }
.sk-card.sk-reveal { align-self: flex-start; margin-top: 8px; }
.sk-h { font-size: 1.35rem; font-weight: 900; color: #fde047; margin-bottom: 4px; }
.sk-sub { font-size: .95rem; opacity: .9; margin-top: 4px; }
.sk-got { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.sk-got span { background: rgba(74, 222, 128, .15); border: 1px solid #4ade80; border-radius: 999px; padding: 2px 10px; font-size: .9rem; }
.sk-podium div, .sk-results div { padding: 3px 0; font-size: 1.05rem; }
.sk-results .win { color: #fde047; font-weight: 800; }
.sk-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.sk-choice { background: #fde047; color: #1a1408; border: 0; border-radius: 14px; padding: 14px 16px; font-size: 1.4rem; font-weight: 900;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; touch-action: manipulation; }
.sk-choice small { font-size: .82rem; font-weight: 700; white-space: nowrap; }
.sk-choice:disabled { opacity: .6; }
.sk-tools { flex: 0 0 auto; }
.sk-tool-row { display: flex; gap: 5px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 3px; }
.sk-modes { display: inline-flex; border-radius: 12px; overflow: hidden; border: 2px solid #c79a2c; }
.sk-mode { border: 0; background: #3b2f17; color: #fff8e6; padding: 7px 11px; font-weight: 800; font-size: .98rem; touch-action: manipulation; }
.sk-mode.on { background: #fde047; color: #1a1408; }
.sk-btn { min-width: 42px; height: 38px; border-radius: 10px; border: 0; background: #5b4a2e; color: #fff; font-weight: 800; font-size: 1.05rem; padding: 0 10px; touch-action: manipulation; }
.sk-btn.sk-done { background: #16a34a; }
.sk-palette { gap: 5px; }
.sk-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); padding: 0; touch-action: manipulation; }
.sk-swatch.on { outline: 3px solid #fde047; outline-offset: 2px; }
.sk-sizes { display: inline-flex; gap: 5px; margin-left: 4px; }
.sk-size { width: 34px; height: 34px; border-radius: 10px; border: 2px solid transparent; background: #3b2f17; display: inline-flex; align-items: center; justify-content: center; padding: 0; touch-action: manipulation; }
.sk-size.on { border-color: #fde047; }
.sk-size span { display: block; border-radius: 50%; }
.sk-esize span { background: #fff; border: 1px dashed #777; }
.sk-guess { flex: 0 0 auto; }
.sk-note { text-align: center; font-weight: 800; padding: 6px 0; }
.sk-entry { display: flex; gap: 6px; margin: 3px 0 5px; }
.sk-typed { flex: 1; min-height: 44px; background: #fff8e6; color: #241802; border-radius: 10px; padding: 8px 12px; font-size: 1.2rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; overflow: hidden; white-space: nowrap; }
.sk-typed.empty::before { content: attr(data-ph); opacity: .45; font-weight: 600; text-transform: none; letter-spacing: 0; }
.sk-send { background: #f59e0b; color: #1a1408; border: 0; border-radius: 10px; font-weight: 900; padding: 0 14px; font-size: 1.05rem; min-height: 44px; touch-action: manipulation; }
.sk-result { text-align: center; min-height: 1.3em; font-weight: 800; font-size: .98rem; }
.sk-result.good { color: #4ade80; } .sk-result.close { color: #fb923c; } .sk-result.bad { color: #fca5a5; } .sk-result.warn { color: #fde047; }
#sketchGameInterface .ckb-key { height: 40px; font-size: 1.1rem; }
#sketchGameInterface .ckb-row { margin-bottom: 4px; }
.sk-feed { flex: 0 0 auto; font-size: .84rem; line-height: 1.3; max-height: 4em; overflow: hidden; }
.sk-f { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-f.good { color: #86efac; } .sk-f.close { color: #fdba74; } .sk-f.info { color: #fde68a; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; width: 100%; align-content: start; align-self: stretch; padding-bottom: 10px; }
.sk-cell { background: #2a210f; border: 2px solid #5b4a2e; border-radius: 12px; padding: 4px; color: #fff; display: flex; flex-direction: column; gap: 3px; touch-action: manipulation; }
.sk-cell.voted { border-color: #4ade80; box-shadow: 0 0 12px rgba(74,222,128,.5); }
.sk-cell.own { opacity: .5; }
.sk-num { font-weight: 800; font-size: .9rem; }
.sk-mini { width: 100%; aspect-ratio: 3 / 4; position: relative; display: flex; align-items: center; justify-content: center; }
.sk-mini .sk-canvas, .skd-mini .sk-canvas { border-radius: 6px; box-shadow: none; }

/* 🔔 buzz-in */
.sk-buzz { display: block; width: 100%; min-height: 76px; font-size: 1.9rem; font-weight: 900; border: 0; border-radius: 18px;
  background: radial-gradient(circle at 50% 35%, #f87171, #b91c1c); color: #fff; box-shadow: 0 6px 0 #7f1d1d; touch-action: manipulation; }
.sk-buzz:active { transform: translateY(4px); box-shadow: 0 2px 0 #7f1d1d; }
.sk-buzz:disabled { opacity: .5; }
/* 🔤 letter tiles */
.sk-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 4px 0; }
.sk-slots i { width: 30px; height: 38px; border-radius: 8px; border: 2px dashed #c79a2c; display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-weight: 900; font-size: 1.25rem; color: #1a1408; background: rgba(255,248,230,.12); }
.sk-slots i.full { background: #fff8e6; border-style: solid; }
.sk-slots i.fixed { background: #fde047; border-style: solid; }
.sk-slots i.gap { border: 0; width: 10px; background: none; }
.sk-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0; }
.sk-tile { width: 42px; height: 46px; border: 0; border-radius: 10px; background: #fde047; color: #1a1408; font-weight: 900; font-size: 1.3rem;
  box-shadow: 0 3px 0 #a16207; touch-action: manipulation; }
.sk-tile:disabled { opacity: .25; }
.sk-tile-actions { justify-content: center; }
.sk-send:disabled { opacity: .5; }
/* 🎭 Fake-Out */
.sk-titles { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; max-height: 40vh; overflow-y: auto; }
.sk-title { text-align: left; border: 2px solid #c79a2c; background: #2a210f; color: #fff8e6; border-radius: 12px; padding: 10px 12px;
  font-weight: 800; font-size: 1.05rem; touch-action: manipulation; }
.sk-title.on { background: #16a34a; border-color: #4ade80; }
.sk-title.own { opacity: .55; }
.sk-fo-results div { padding: 4px 0; border-bottom: 1px solid rgba(199,154,44,.25); text-align: left; }
.sk-fo-results .real { color: #4ade80; }
.sk-fo-results small { display: block; opacity: .85; font-size: .85rem; }

/* ── big screen ────────────────────────────────────────────────────────────────────────────── */
#sketchDisplay {
  position: fixed; inset: 0; z-index: 60; display: none; flex-direction: column;
  background: radial-gradient(120% 80% at 50% -10%, #3b2a0c, transparent 60%), linear-gradient(170deg, #1d1606, #0c0903);
  color: #fff8e6; padding: 18px 26px; gap: 10px; overflow: hidden;
}
.skd-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex: 0 0 auto; }
.skd-title { font-size: 2rem; font-weight: 900; color: #fde047; }
.skd-sub { font-size: 1.15rem; opacity: .85; }
.skd-timer { font-size: 2.2rem; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 110px; text-align: right; }
.skd-timer.sk-urgent { color: #f87171; }
.skd-banner { text-align: center; font-size: 1.8rem; font-weight: 800; flex: 0 0 auto; }
.skd-banner b { color: #fde047; }
.skd-banner .sk-mask i { font-size: 2.6rem; min-width: 1.1em; border-bottom-width: 5px; }
.skd-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2.4fr) minmax(220px, 1fr); gap: 20px; }
.skd-side { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.skd-panel { background: rgba(0,0,0,.28); border: 1px solid rgba(199,154,44,.4); border-radius: 14px; padding: 12px 14px; }
/* host-display-head.css forces every heading's colour with !important */
#sketchDisplay .skd-panel h4 { margin: 0 0 6px; font-size: 1.15rem; color: #fde047 !important; font-weight: 800; opacity: 1; text-transform: none; letter-spacing: 0; }
.skd-overlay .sk-card img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 4px solid #fde047; }
.skd-drawer { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; font-weight: 800; }
.skd-drawer img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid #fde047; }
.skd-scores div { display: flex; justify-content: space-between; font-size: 1.1rem; padding: 2px 0; }
.skd-feed { font-size: 1.15rem; line-height: 1.45; overflow: hidden; }
.skd-feed .sk-f { white-space: normal; }
.skd-center { position: relative; min-height: 0; }
.skd-pad { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.skd-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; z-index: 2; }
.skd-overlay .sk-card { max-width: 760px; font-size: 1.3rem; }
.skd-overlay .sk-h { font-size: 2.6rem; }
.skd-overlay .sk-sub { font-size: 1.3rem; }
.skd-gallery { position: absolute; inset: 0; display: none; grid-gap: 14px; align-content: center; justify-content: center; }
.skd-tile { background: rgba(0,0,0,.3); border: 2px solid rgba(199,154,44,.5); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.skd-tile.win { border-color: #fde047; box-shadow: 0 0 22px rgba(253,224,71,.55); }
.skd-tile .skd-cap { font-weight: 800; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; overflow: hidden; }
.skd-mini { flex: 1 1 auto; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.skd-hidden { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3rem; }

.skd-buzz { font-size: 1.35rem; margin-top: 6px; color: #fdba74; }
.skd-buzz span { margin-left: 14px; color: #fca5a5; }
.skd-titles div { font-size: 1.45rem; padding: 5px 0; }
.skd-chain div { font-size: 1.05rem; padding: 3px 0; opacity: .75; }
.skd-chain .now { opacity: 1; color: #fde047; }
.skd-overlay .sk-fo-results div { font-size: 1.45rem; }
.skd-overlay .sk-fo-results small { font-size: 1.05rem; }

/* ── host card ─────────────────────────────────────────────────────────────────────────────── */
.skh-live { display: grid; grid-template-columns: 180px 1fr; gap: 12px; margin-top: 8px; }
.skh-pad { width: 180px; height: 240px; position: relative; display: flex; align-items: center; justify-content: center; background: #111; border-radius: 8px; }
.skh-secret { font-size: 1.1rem; font-weight: 800; }
.skh-secret b { color: #b45309; }
.skh-log { max-height: 220px; overflow-y: auto; font-size: .88rem; border-top: 1px solid rgba(148,163,184,.25); margin-top: 6px; }
.skh-log div { display: flex; gap: 6px; align-items: center; padding: 2px 0; }
.skh-log .v-correct { color: #16a34a; font-weight: 700; } .skh-log .v-close { color: #ea580c; } .skh-log .v-wrong { color: #64748b; }
.skh-log button { padding: 0 6px; font-size: .78rem; }
.skh-scores { font-size: .9rem; }
@media (max-width: 640px) { .skh-live { grid-template-columns: 1fr; } }
/* 🎨 who draws · 🔎 who guesses (host card, 2026-10-14) */
.skh-roles { max-width: 460px; font-size: .88rem; }
.skh-roles th, .skh-roles td { padding: 2px 8px; vertical-align: middle; }
.skh-roles tr.off td { opacity: .55; }

/* ── 📺 Spotlight: a kept drawing back on the TV (🖼️ Tonight's drawings → 📺 Show on TV, 2026-10-17) ── */
#sketchSpotlight {
  position: fixed; inset: 0; z-index: 61; display: none; flex-direction: column; gap: 10px;
  background: radial-gradient(120% 80% at 50% -10%, #3b2a0c, transparent 60%), linear-gradient(170deg, #1d1606, #0c0903);
  color: #fff8e6; padding: 18px 26px; overflow: hidden;
}
#sketchSpotlight.on { display: flex; }
.sks-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex: 0 0 auto; }
.sks-title { font-size: 2rem; font-weight: 900; color: #fde047; }
.sks-mode { font-size: 1.15rem; opacity: .85; }
.sks-main { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.sks-pad { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.sks-caption { flex: 0 0 auto; text-align: center; font-size: 1.5rem; font-weight: 800; line-height: 1.3; }
.sks-caption b { color: #fde047; font-size: 2.2rem; }
.sks-caption .sks-who { display: block; font-size: 1.3rem; font-weight: 600; opacity: .92; margin-top: 4px; }
