/* Tease & Reveal word game. Loaded only on /tease-and-reveal-game/. */
.tease-layout { display: grid; gap: var(--sp-6); }
@media (min-width: 960px) { .tease-layout { grid-template-columns: minmax(0, 1fr) 18rem; align-items: start; } }
.play-main.tease-wide { max-width: 72rem; }

.tease-hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-bottom: var(--sp-4); }
.tease-hud > div { background: var(--bg-raised); border: 1px solid var(--border-light); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); text-align: center; }
.tease-hud__label { display: block; font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.tease-hud__val { display: block; font-size: var(--text-xl); font-weight: var(--fw-bold); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.tease-pips { display: flex !important; justify-content: center; gap: 4px; padding-top: 4px; }
.tease-pip { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--brand-glow); font-size: 11px; line-height: 14px; color: #fff; }
.tease-pip.is-used { background: var(--brand); border-color: var(--brand); }

/* Picture with tiles over it. Tiles are nearly opaque, so the picture shows through as a ghost. */
.tease-stage { position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(255,255,255,.18); background: var(--bg-raised); }
.tease-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tease-tiles { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr); }
.tease-tile { background: linear-gradient(145deg, var(--brand-mid), var(--brand-dark)); opacity: .93; border: 1px solid rgba(255,255,255,.08); transition: opacity .45s ease, transform .45s ease; }
.tease-tile.is-gone { opacity: 0; transform: scale(.85); }

.tease-hint { margin: var(--sp-4) 0 var(--sp-1); font-size: var(--text-sm); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-glow); text-align: center; }
.tease-clue { margin: 0 0 var(--sp-3); text-align: center; font-style: italic; color: var(--text-primary); }
.tease-clue span { font-style: normal; font-size: var(--text-sm); color: var(--text-secondary); margin-right: .25em; }
.tease-phrase { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2) var(--sp-5); margin: 0 0 var(--sp-3); }
.tease-word { display: inline-flex; gap: 3px; }
.tease-cell { width: clamp(1.15rem, 5.3vw, 2.4rem); height: clamp(1.7rem, 7vw, 2.9rem); display: grid; place-items: center; border-bottom: 3px solid var(--text-secondary); font-size: clamp(.95rem, 4.2vw, 1.6rem); font-weight: var(--fw-bold); color: var(--text-primary); }
.tease-cell.is-shown { border-color: var(--brand-glow); animation: tease-pop .3s ease-out; }
.tease-cell.is-mark { border-color: transparent; width: auto; }
@keyframes tease-pop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.tease-msg { min-height: 1.6em; text-align: center; color: var(--text-secondary); margin: 0 0 var(--sp-3); }

.tease-keys { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
@media (min-width: 640px) { .tease-keys { grid-template-columns: repeat(13, 1fr); } }
.tease-key { position: relative; min-height: 46px; border-radius: var(--radius); border: 1px solid var(--border-light); background: var(--bg-raised); color: var(--text-primary); font: inherit; font-weight: var(--fw-bold); font-size: var(--text-lg); cursor: pointer; }
.tease-key:hover:not([disabled]) { border-color: var(--brand-glow); }
.tease-key:focus-visible { outline: 3px solid var(--brand-glow); outline-offset: 2px; }
.tease-key[disabled] { cursor: default; }
.tease-key span { position: absolute; top: 1px; right: 4px; font-size: 11px; }
.tease-key.is-hit { background: rgba(95,191,143,.2); border-color: #5fbf8f; }
.tease-key.is-miss { background: transparent; color: var(--text-muted); text-decoration: line-through; }

.tease-result { text-align: center; margin: var(--sp-5) 0 var(--sp-2); font-size: var(--text-2xl); color: var(--text-primary); }
.tease-bonus, .tease-final { text-align: center; }
.tease-final strong { color: var(--text-primary); font-size: var(--text-xl); }
.tease-save { margin-top: var(--sp-5); }
.tease-save label { font-weight: var(--fw-semibold); color: var(--text-primary); }
.tease-intro ul { margin: 0 0 var(--sp-4); }

/* Scoreboard */
.tease-board h2 { font-size: var(--text-xl); }
.tease-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tease-top li { display: grid; grid-template-columns: 2rem 1fr auto; gap: var(--sp-2); align-items: center; padding: var(--sp-2) var(--sp-3); background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); }
.tease-top li.is-me { border-color: var(--brand-glow); }
.tease-top__rank { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.tease-top__name { color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tease-top__score { font-weight: var(--fw-bold); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.tease-top li:nth-child(-n+3) .tease-top__rank { color: var(--brand-glow); font-weight: var(--fw-bold); }
.tease-empty { font-size: var(--text-sm); }

@media (prefers-reduced-motion: reduce) { .tease-tile, .tease-cell.is-shown { transition: none; animation: none; } }

.tease-clue .play-linkbtn { min-height: 36px; padding: 0 var(--sp-2); font-style: normal; }
.tease-clue .play-linkbtn[disabled] { color: var(--text-muted); text-decoration: none; cursor: default; }
.tease-advance { text-align: center; color: var(--text-secondary); margin: var(--sp-3) 0 0; }
.tease-email-label { display: block; margin-top: var(--sp-4); font-weight: var(--fw-semibold); color: var(--text-primary); }
.tease-optin { display: flex; gap: var(--sp-2); align-items: flex-start; margin-top: var(--sp-3); color: var(--text-secondary); font-size: var(--text-sm); cursor: pointer; }
.tease-optin input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; accent-color: var(--brand-glow); }
/* Narrow phones: let grid columns shrink instead of pushing the page sideways */
.tease-layout > * { min-width: 0; }
.tease-hud { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tease-keys { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (min-width: 640px) { .tease-keys { grid-template-columns: repeat(13, minmax(0, 1fr)); } }
@media (max-width: 360px) {
  .tease-hud > div { padding: var(--sp-2); }
  .tease-hud__val { font-size: var(--text-lg); }
  .tease-pip { width: 14px; height: 14px; font-size: 9px; line-height: 10px; }
  .tease-key { font-size: var(--text-base); min-height: 44px; }
  .tease-word { gap: 2px; }
  .tease-cell { width: 5vw; font-size: .9rem; }
  .tease-phrase { column-gap: var(--sp-3); }
}
