/* «Кто из нас?» (0.41, who-game.js): its entry in «Игры» («Для компании»), the start dialog and what the card adds to
   the hall game's (hall-game.css gives the card, the countdown, the board and the podium; write-games.css the «Играю /
   Смотрю» buttons). The faces: a picture over the person's initial (a guest, a picture that did not load). */
.wh-entry { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.wh-entry[hidden], .wh-entry-btn[hidden] { display: none; }
.wh-entry-btn { width: 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; min-height: 56px; margin-top: 8px; padding: 8px 12px; text-align: left; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; cursor: pointer; }
.hg-others > .wh-entry-btn { margin-top: 0; } /* the dialog's grid spaces its buttons */
.wh-entry-btn:hover { border-color: rgba(229, 160, 13, .6); }
.wh-entry-ico { font-size: 26px; line-height: 1; }
.wh-entry-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wh-entry-text small { color: var(--muted); font-size: 12px; line-height: 1.3; }

body.wh-on.lobby-on .video-wrap { overflow: hidden; } /* the lobby does not scroll away under the game */
.wh-card { background: #101218; } /* opaque: the lobby must not show through (game-cards.test.js) */
.wh-card .hg-body { gap: 12px; }
.wh-lead-s { font-size: 13px; color: var(--muted); }
/* The question. */
.wh-q { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.wh-qe { flex: none; font-size: 34px; line-height: 1.1; }
.wh-qt { min-width: 0; font-size: 20px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.wh-q-small { padding: 10px 12px; gap: 10px; }
.wh-q-small .wh-qe { font-size: 24px; }
.wh-q-small .wh-qt { font-size: 15.5px; }
.wh-ask { font-size: 14px; font-weight: 600; color: var(--muted); }
.wh-ask small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 500; }
.wh-ask.wh-fan { color: var(--accent); }
/* The faces. */
.wh-face { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--fs, 40px); height: var(--fs, 40px); border-radius: 50%; overflow: hidden; background: #2a2e38; color: var(--muted); font-weight: 700; font-size: calc(var(--fs, 40px) * .42); line-height: 1; }
.wh-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wh-face i { font-style: normal; }
.wh-big { --fs: 42px; }
.wh-mini { --fs: 26px; box-shadow: 0 0 0 2px #101218; }
.wh-mini.me { box-shadow: 0 0 0 2px var(--accent); }
/* The vote: everybody of the round as a face to tap; one's own is there but cannot be picked. */
.wh-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.wh-pick { --fs: 40px; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 56px; padding: 7px 10px; text-align: left; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.wh-pick:hover:not(:disabled) { border-color: var(--accent); }
.wh-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wh-pick:disabled { cursor: default; }
.wh-pick:disabled:not(.on) { opacity: .55; }
.wh-pick.on { border-color: var(--accent); background: rgba(229, 160, 13, .16); }
.wh-pick.me { border-style: dashed; }
.wh-pname, .wh-sname { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.wh-pname small, .wh-sname small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.wh-fans { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* The reveal: the voters' faces drop onto whom they picked — every stack at once, the tallest done last — then the
   pick lights up, its votes show and the title of the evening comes (--done: when the last face is down). */
.wh-reveal { display: flex; flex-direction: column; gap: 10px; }
.wh-stacks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wh-stack { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 11px; background: rgba(255, 255, 255, .04); border: 1px solid transparent; }
.wh-sbody { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wh-sname { font-size: 14.5px; font-weight: 700; }
.wh-pile { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; min-height: 26px; padding-right: 5px; }
.wh-drop { display: inline-flex; margin-right: -5px; animation: wh-drop .38s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: var(--d, 0ms); }
.wh-votes { min-width: 1.4em; font-size: 20px; text-align: right; font-variant-numeric: tabular-nums; animation: wh-show .3s ease-out both; animation-delay: var(--done, 0ms); }
.wh-stack.chosen { border-color: var(--accent); background: rgba(229, 160, 13, .14); animation: wh-win .45s ease-out both; animation-delay: var(--done, 0ms); }
.wh-stack.chosen .wh-votes { color: var(--accent); }
.wh-stack.voted { box-shadow: inset 3px 0 0 rgba(255, 255, 255, .35); }
.wh-stack.me .wh-big { box-shadow: 0 0 0 2px var(--accent); }
.wh-rfans { font-size: 12px; color: var(--muted); }
.wh-rfans b { color: var(--accent); }
.wh-title { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 14px; border-radius: 12px; text-align: center; background: rgba(229, 160, 13, .12); border: 1px solid rgba(229, 160, 13, .55); animation: wh-pop .5s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--done, 0ms) + 150ms); }
.wh-tk { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.wh-tt { font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
.wh-tw { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.wh-title.wh-none { background: rgba(255, 255, 255, .05); border-color: var(--line); }
.wh-title.wh-none .wh-tk { font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.wh-after { animation: wh-show .3s ease-out both; animation-delay: calc(var(--done, 0ms) + 300ms); }
.wh-after:empty { display: none; }
.wh-mine { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.wh-good { font-weight: 700; color: var(--ok); }
.wh-mine.chosen .wh-good { color: var(--accent); }
/* The podium: the titles of the evening, «Приз зрителей». */
.wh-titles { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.wh-titles ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wh-titles li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 6px 10px; border-radius: 9px; background: rgba(255, 255, 255, .04); font-size: 13.5px; }
.wh-titles li.me { background: rgba(229, 160, 13, .14); }
.wh-titles b { overflow-wrap: anywhere; }
.wh-te { grid-row: span 2; font-size: 18px; }
.wh-tn { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.wh-fans-podium { margin-top: 6px; font-size: 13.5px; color: inherit; }
.wh-fans-podium b { color: var(--accent); }
.wh-fans-podium .me { font-weight: 700; }
@keyframes wh-drop { from { opacity: 0; transform: translateY(-14px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes wh-show { from { opacity: 0; } to { opacity: 1; } }
@keyframes wh-win { from { border-color: transparent; background: rgba(255, 255, 255, .04); } to { border-color: var(--accent); background: rgba(229, 160, 13, .14); } }
@keyframes wh-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .wh-q { padding: 12px 13px; gap: 10px; }
  .wh-qe { font-size: 28px; }
  .wh-qt { font-size: 17.5px; }
  .wh-q-small .wh-qt { font-size: 15px; }
  .wh-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wh-pick { --fs: 34px; min-height: 52px; gap: 8px; padding: 6px 8px; font-size: 14px; }
  .wh-tt { font-size: 18px; }
  .wh-card .hg-btn, .wh-card .hg-min { min-height: 44px; } /* phones first: 44-px targets (the hall game's are 40 / 36) */
  .wh-card .hg-min { width: 44px; }
}
@media (prefers-reduced-motion: reduce) { .wh-drop, .wh-votes, .wh-stack.chosen, .wh-title, .wh-after { animation: none; } }

/* 0.66 «Свой вопрос»: before the first round — «Кто из нас [ … ]?» typed by each player, «Добавить» / «Без вопроса», the
   count; the author named at the reveal. Phones: the input takes the row, the buttons share the next one. */
.wh-own { display: flex; flex-direction: column; gap: 10px; }
.wh-own-s { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.wh-own-f { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.wh-own-f:focus-within { border-color: var(--accent); }
.wh-own-k { flex: none; font-weight: 700; font-size: 16px; }
.wh-own-in { flex: 1; min-width: 0; min-height: 44px; padding: 0 6px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.wh-own-q { flex: none; font-weight: 700; font-size: 18px; padding-right: 8px; }
.wh-own-b { display: flex; gap: 8px; flex-wrap: wrap; }
.wh-own-b .hg-btn { min-height: 44px; flex: 1 1 140px; }
.wh-own-go { background: var(--accent); border-color: var(--accent); color: #14171e; font-weight: 700; }
.wh-own-mine { margin: 0; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.wh-by { margin: -4px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
