/* «100 к 1»: the show's board, one look on the shared screen (/tv/) and on a PC player's stage (owner 2026-10-29:
   «версии некоторых экранов в ПК и ТВ почти не отличаются» → one code for both). The markup and the moving part are
   shared/client/hundred-board.ts; the page supplies the palette (--hk-yellow, --hk-red, --hk-deep, --hk-ink,
   --hk-surface or --tv-surface, --text-secondary).

   The question on a navy card with the yellow edge, the answers face down in two columns (number, dots, points);
   a find flips its card over (flat, scaleY) to the yellow side with the red diamond and who found it; a miss stamps
   the big red cross with the guess crossed out. At the round end the answers nobody found flip to the navy side. */
.hk-board-root {
    --font-display: 'Unbounded', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* The /tv/ hand-cut corners (tv/style.css .tv). */
    --cut-1: 26px 12px 22px 16px / 16px 24px 12px 22px;
    --cut-2: 14px 24px 14px 26px / 24px 14px 22px 12px;
    --cut-3: 22px 16px 28px 12px / 12px 20px 16px 26px;
    --cut-4: 12px 26px 16px 22px / 22px 12px 26px 16px;
    --cut-shadow: 5px 6px 0 rgb(0 0 0 / 34%);
}
.hk-board-root .hidden { display: none; }
@keyframes hk-cut-in { from { opacity: 0; transform: translateY(-26px) rotate(-5deg) scale(1.06); } }
@keyframes hk-in { from { opacity: 0; transform: translateY(14px); } }
.tv-hk-main { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 22px; padding: 0 10px; }
.tv-hk-question {
    align-self: center; max-width: 1120px; padding: 18px 40px;
    background: var(--hk-deep); border: 2px solid var(--hk-yellow); color: #fff;
    font-weight: 700; font-size: 34px; line-height: 1.25; text-align: center; text-wrap: balance;
    border-radius: var(--cut-2); box-shadow: 8px 10px 0 rgb(0 0 0 / 30%); rotate: -.8deg;
    animation: hk-cut-in .6s cubic-bezier(.3, 1.45, .5, 1) both;
}
.tv-hk-board {
    position: relative; z-index: 0; isolation: isolate;
    flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column;
    grid-template-rows: repeat(var(--hk-rows, 3), minmax(0, 96px)); align-content: center; gap: 18px 28px; padding: 4px 8px 10px;
}
.tv-hk-tile {
    min-height: 0; rotate: -.6deg; translate: -3px 0;
    animation: hk-cut-in .55s cubic-bezier(.3, 1.45, .5, 1) both; animation-delay: calc(150ms + var(--i, 0) * 90ms);
}
.tv-hk-tile:nth-child(4n + 2) { rotate: .7deg; translate: 5px 2px; }
.tv-hk-tile:nth-child(4n + 3) { rotate: -.3deg; translate: 2px -1px; }
.tv-hk-tile:nth-child(4n + 4) { rotate: .5deg; translate: -5px 1px; }
/* The flip is flat (the card folds to a line and opens on its other side): no 3D layers, so the miss stamp and
   the round's overlays always stay on top of the board. */
.tv-hk-card { position: relative; height: 100%; }
.tv-hk-tile.is-open .tv-hk-front { opacity: 0; }
.tv-hk-tile.is-open .tv-hk-back { opacity: 1; }
.tv-hk-tile.is-open:not(.no-anim) .tv-hk-card { animation: tv-hk-flip .6s cubic-bezier(.3, 1.3, .5, 1) both; }
.tv-hk-tile.is-open:not(.no-anim) .tv-hk-front { animation: tv-hk-face-out .6s both; }
.tv-hk-tile.is-open:not(.no-anim) .tv-hk-back { animation: tv-hk-face-in .6s both; }
@keyframes tv-hk-flip { 0% { transform: scaleY(1); } 40% { transform: scaleY(.04); } 100% { transform: scaleY(1); } }
@keyframes tv-hk-face-out { 0%, 39% { opacity: 1; } 40%, 100% { opacity: 0; } }
@keyframes tv-hk-face-in { 0%, 39% { opacity: 0; } 40%, 100% { opacity: 1; } }
.tv-hk-face {
    position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 0 20px 0 12px;
    border-radius: var(--cut-1); box-shadow: var(--cut-shadow);
}
.tv-hk-tile:nth-child(4n + 2) .tv-hk-face { border-radius: var(--cut-2); }
.tv-hk-tile:nth-child(4n + 3) .tv-hk-face { border-radius: var(--cut-3); }
.tv-hk-tile:nth-child(4n + 4) .tv-hk-face { border-radius: var(--cut-4); }
.tv-hk-front { background: var(--tv-surface, var(--hk-surface)); border: 2px solid rgb(255 255 255 / 10%); }
.tv-hk-back { opacity: 0; background: var(--hk-yellow); color: var(--hk-ink); box-shadow: 6px 7px 0 color-mix(in srgb, var(--hk-yellow) 45%, #000); }
.tv-hk-tile.is-missed .tv-hk-back { background: var(--hk-deep); color: #fff; border: 2px solid rgb(255 255 255 / 16%); box-shadow: var(--cut-shadow); }
.tv-hk-num {
    flex: none; position: relative; z-index: 0; display: grid; place-items: center; width: 54px; height: 54px;
    font-family: var(--font-display); font-weight: 800; font-size: 24px; color: #fff;
}
.tv-hk-num::before { content: ""; position: absolute; inset: 2px; z-index: -1; border-radius: 46% 54% 50% 50% / 54% 46% 54% 46%; background: rgb(255 255 255 / 14%); rotate: -6deg; }
.tv-hk-back .tv-hk-num::before { inset: 8px; border-radius: 7px; background: var(--hk-red); rotate: 45deg; box-shadow: 2px 3px 0 rgb(0 0 0 / 25%); }
.tv-hk-tile.is-missed .tv-hk-back .tv-hk-num::before { background: rgb(255 255 255 / 16%); box-shadow: none; }
.tv-hk-dots { flex: 1; height: 12px; background: radial-gradient(circle, rgb(255 255 255 / 28%) 4px, transparent 5px) 0 50% / 24px 12px repeat-x; }
/* The answer breaks only between words (owner 2026-11-09: «об апельсинах» went «об / апельсина / х»), at most two
   lines; a longer answer gets a smaller size (hundred-board.ts sets is-long / is-xlong by its length). */
.tv-hk-text {
    flex: 1; min-width: 0; font-size: 26px; font-weight: 800; line-height: 1.15;
    overflow-wrap: break-word; word-break: normal; hyphens: manual; text-wrap: balance;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.tv-hk-text.is-long { font-size: 22px; }
.tv-hk-text.is-xlong { font-size: 19px; }
.tv-hk-pts { flex: none; min-width: 58px; text-align: right; font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--hk-yellow); }
.tv-hk-back .tv-hk-pts { color: var(--hk-ink); }
.tv-hk-tile.is-missed .tv-hk-pts { color: var(--text-secondary); }
.tv-hk-back .rp-player { flex: 0 1 auto; min-width: 0; max-width: 170px; font-size: 17px; font-weight: 700; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgb(23 25 31 / 10%); }
/* The flip lands with a little bounce of the whole tile. */
.tv-hk-tile.is-open:not(.no-anim):not(.is-missed) { animation: tv-hk-land .75s cubic-bezier(.3, 1.45, .5, 1) both; }
@keyframes tv-hk-land { 40% { scale: 1.05; } }

/* A miss: the show's big red cross stamped over the board, the guess crossed out under it. */
.tv-hk-strike {
    position: absolute; z-index: 3; left: 50%; top: 56%; translate: -50% -50%;
    display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none;
}
.tv-hk-x { position: relative; width: 190px; height: 190px; }
.tv-hk-x::before, .tv-hk-x::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 210px; height: 46px; margin: -23px 0 0 -105px;
    border-radius: 14px 8px 16px 10px / 10px 16px 8px 14px; background: var(--hk-red);
    border: 5px solid #fff; box-shadow: 6px 8px 0 rgb(0 0 0 / 35%); rotate: 45deg;
}
.tv-hk-x::after { rotate: -45deg; }
.tv-hk-strike-label {
    padding: 4px 16px; border-radius: 10px 6px 12px 8px / 8px 12px 6px 10px; background: var(--hk-red); color: #fff;
    font-family: var(--font-display); font-weight: 800; font-size: 22px; rotate: -3deg; box-shadow: 3px 4px 0 rgb(0 0 0 / 30%);
}
.tv-hk-guess {
    display: inline-flex; align-items: center; gap: 12px; padding: 8px 20px 8px 8px; max-width: 760px;
    border-radius: var(--cut-1); background: var(--hk-deep); border: 2px solid rgb(255 255 255 / 16%); box-shadow: var(--cut-shadow);
    font-size: 26px; font-weight: 700;
}
.tv-hk-guess-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration-color: var(--hk-red); text-decoration-thickness: 4px; }
.tv-hk-strike.is-on .tv-hk-x { animation: tv-hk-stamp .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.tv-hk-strike.is-on .tv-hk-strike-label, .tv-hk-strike.is-on .tv-hk-guess { animation: hk-in .35s .12s ease both; }
.tv-hk-strike.is-on { animation: tv-hk-fade .3s 1.1s ease forwards; }
/* Already on the board: no cross, just the guess. */
.tv-hk-strike.is-duplicate .tv-hk-x { display: none; }
.tv-hk-strike.is-duplicate .tv-hk-strike-label { background: var(--hk-deep); border: 2px solid var(--hk-yellow); color: var(--hk-yellow); }
@keyframes tv-hk-stamp { from { opacity: 0; scale: 2.2; rotate: -18deg; } }
@keyframes tv-hk-fade { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .hk-board-root :is(.tv-hk-question, .tv-hk-tile, .tv-hk-card, .tv-hk-face, .tv-hk-x, .tv-hk-strike-label, .tv-hk-guess) { animation-duration: .01ms !important; animation-delay: 0s !important; }
}
