/* =========================================================================
   УКРИТТЯ — прототип інтерфейсу
   Базовий макет: 1920×1080 (Figma). Усі розміри з макета записані як
   calc(N * var(--u)), де N — пікселі з Figma. На екранах ≥1920×1080 --u
   пропорційно збільшується, на менших — дорівнює 1px.
   Нижче 1200px ширини або 640px висоти вмикається компактна (мобільна)
   композиція — див. розділ «КОМПАКТНИЙ РЕЖИМ».
   ========================================================================= */

/* ---------- Токени ---------- */
:root {
  --u: max(1px, min(100vw / 1920, 100vh / 1080));

  /* кольори з макета */
  --c-black: #010101;
  --c-glow: #20140B;
  --c-panel: #121212;
  --c-field: #141414;
  --c-btn: #1A1A1A;
  --c-corner: rgba(25, 25, 25, .9);
  --c-track: #2A2A2A;
  --c-line: #333333;
  --c-line-soft: rgba(255, 255, 255, .08);
  --c-line-title: rgba(255, 255, 255, .10);
  --c-white: #FFFFFF;
  --c-text: #D9D9D9;
  --c-text-hi: #EEEEEE;
  --c-muted: #888888;
  --c-muted-2: #AAAAAA;
  --c-dim: #555555;
  --c-orange: #FF5500;
  --c-orange-2: #FF6600;
  --c-orange-hi: #FF7722;
  --c-orange-lite: #FFAA55;
  --c-red: #992200;
  --glow: rgba(255, 85, 0, .40);
  --glow-strong: rgba(255, 85, 0, .70);

  /* шрифти */
  --font-ui: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-accent: "Oswald", "Arial Narrow", "Roboto Condensed", "DejaVu Sans Condensed", sans-serif;
  --font-chat: "Roboto", "Onest", system-ui, sans-serif;

  /* рух */
  --t: 250ms;                 /* швидкість переходу між станами (з Figma) */
  --ease: cubic-bezier(.25, .1, .25, 1);

  /* фон зі знаком (прозорість підібрано під PDF-експорт) */
  --sign-opacity: .05;
  --sign-size: max(86.4vw, 153.6vh);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--c-orange-lite); outline-offset: 3px; }
.noscript { position: fixed; inset: auto 0 40% 0; text-align: center; color: var(--c-muted); z-index: 200; }

/* ---------- Фон ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg__glow { position: absolute; inset: 0; background: radial-gradient(ellipse 50% 50% at 50% 50%, var(--c-glow) 0%, var(--c-black) 100%); }
.bg__sign {
  position: absolute; left: 50%; top: 50%;
  width: var(--sign-size); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  opacity: var(--sign-opacity);
  transition: opacity 800ms var(--ease);
}
.bg__pulse { width: 100%; height: 100%; animation: sign-pulse 9s ease-in-out infinite alternate; }
.bg__pulse img { display: block; width: 100%; height: 100%; animation: sign-spin 60s linear infinite; will-change: transform; user-select: none; }
body[data-screen="loading"] { --sign-opacity: .025; } /* на завантаженні знак удвічі тьмяніший (Frame 4/5) */

@keyframes sign-spin { to { transform: rotate(360deg); } }
@keyframes sign-pulse { from { opacity: 1; } to { opacity: .6; } }

/* ---------- Екрани ---------- */
/* .stage навмисно без position/z-index: тоді мобільний чат може піднятися над оверлеєм */
.stage { display: contents; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: calc(24 * var(--u));
  padding: min(calc(96 * var(--u)), 8.9vh) calc(64 * var(--u)) calc(64 * var(--u));
  overflow-x: hidden; overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity var(--t) var(--ease), visibility 0s linear var(--t);
}
.screen.is-active { opacity: 1; visibility: visible; transition: opacity var(--t) var(--ease); }
.screen:focus { outline: none; }

.screen__body { flex: 1 0 auto; width: 100%; display: flex; flex-direction: column; align-items: center; padding-block: calc(32 * var(--u)); }
.screen__body--center { justify-content: center; gap: calc(32 * var(--u)); padding-bottom: calc(94 * var(--u)); }

/* ---------- Лого (текстове, легко замінити) ---------- */
.logo-wrap {
  flex: none; width: 100%;
  height: min(calc(155.56 * var(--u)), 14.4vh);
  display: flex; align-items: center; justify-content: center;
  padding: calc(10 * var(--u)) calc(20 * var(--u));
}
.logo {
  margin: 0; padding-left: .08em;
  font-family: var(--font-accent); font-weight: 700;
  font-size: min(calc(88 * var(--u)), 8.2vh);
  line-height: 1; letter-spacing: .08em; text-transform: uppercase;
  color: #E9E9E9;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .6);
  user-select: none;
}
.logo-wrap--xl { height: min(calc(240 * var(--u)), 22.2vh); }
.logo--xl { font-size: min(calc(150 * var(--u)), 13.9vh); }

/* ---------- Кнопки ---------- */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0; padding: calc(10 * var(--u));
  border: 1px solid transparent; border-radius: 0;
  background: none; cursor: pointer;
  text-align: center; text-transform: uppercase; user-select: none;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease),
              background-color var(--t) var(--ease), box-shadow var(--t) var(--ease), filter var(--t) var(--ease);
}
.btn[aria-disabled="true"] { cursor: not-allowed; }

/* помаранчева (контур) */
.btn--accent, .btn--ghost {
  width: calc(485 * var(--u)); height: calc(48 * var(--u));
  background: var(--c-panel);
  font-family: var(--font-accent); font-weight: 500; font-size: calc(16 * var(--u)); letter-spacing: .03em;
}
.btn--accent { border-color: var(--c-orange); color: var(--c-orange); }
.btn--wide { width: calc(545 * var(--u)); height: calc(54 * var(--u)); }
.btn--block { width: 100%; height: auto; }

/* сіра */
.btn--ghost { border-color: var(--c-line); color: var(--c-muted); }

/* кутові (Друзі / Вихід) */
.btn--corner {
  min-width: calc(100 * var(--u));
  padding: calc(10 * var(--u)) calc(29 * var(--u));
  background: var(--c-corner); border-color: var(--c-line); color: var(--c-muted);
  font-family: var(--font-accent); font-weight: 400; font-size: calc(14 * var(--u)); letter-spacing: 1px;
}

/* головна (Почати гру / Підключитися / Створити лобі)
   ::before — заливка-градієнт, ::after — світіння. Обидва мерехтять при наведенні (Frame 24),
   текст лишається рівним. */
.btn--primary {
  width: calc(220 * var(--u)); height: calc(48 * var(--u));
  background: var(--c-btn); border-color: var(--c-orange-lite); color: var(--c-white);
  font-family: var(--font-accent); font-weight: 600; font-size: calc(20 * var(--u)); letter-spacing: 2px;
}
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--c-orange-2) 0%, var(--c-red) 100%);
  transition: opacity var(--t) var(--ease);
}
.btn--primary::after {
  content: ""; position: absolute; inset: -1px; z-index: -2; pointer-events: none;
  box-shadow: 0 0 calc(16 * var(--u)) var(--glow);
  transition: opacity var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.btn--primary[aria-disabled="true"] { border-color: var(--c-line); color: var(--c-dim); }
.btn--primary[aria-disabled="true"]::before,
.btn--primary[aria-disabled="true"]::after { opacity: 0; }

/* Мерехтіння з Frame 24 (Figma Motion): 120 кадрів × 60 fps = 2 с, повтор, поки курсор на кнопці */
@keyframes neon-flicker {
  0%     { opacity: 1; }
  3.4%   { opacity: .30; }
  5.55%  { opacity: .77; }
  8.05%  { opacity: .60; }
  11.3%  { opacity: 1; }
  17.65% { opacity: .90; }
  20.88% { opacity: 1; }
  29.4%  { opacity: 1; }
  31.3%  { opacity: .90; }
  33.25% { opacity: 1; }
  36.55% { opacity: .33; }
  42.15% { opacity: .80; }
  47.4%  { opacity: .65; }
  50.6%  { opacity: 1; }
  55.25% { opacity: 1; }
  58.6%  { opacity: .80; }
  60.55% { opacity: 1; }
  63.2%  { opacity: .90; }
  67.8%  { opacity: 1; }
  100%   { opacity: 1; }
}

/* Ховери: сірі → білі (лише активні), білі → помаранчеві, помаранчеві → світіння */
@media (hover: hover) {
  .btn--ghost:not([aria-disabled="true"]):hover,
  .btn--corner:hover { border-color: var(--c-text); color: var(--c-white); }
  .btn--accent:not([aria-disabled="true"]):hover { box-shadow: 0 0 calc(16 * var(--u)) var(--glow), inset 0 0 calc(12 * var(--u)) rgba(255, 85, 0, .15); }
  .btn--primary:not([aria-disabled="true"]):hover::after { box-shadow: 0 0 calc(28 * var(--u)) var(--glow-strong); }
  .btn--primary:not([aria-disabled="true"]):hover::before,
  .btn--primary:not([aria-disabled="true"]):hover::after { animation: neon-flicker 2s cubic-bezier(.5, 0, .5, 1) infinite; }
}
.btn--corner[aria-expanded="true"] { border-color: var(--c-text); color: var(--c-white); }
.btn:not([aria-disabled="true"]):active { filter: brightness(.92); }

/* кнопки-іконки (чат / надіслати) */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: calc(40 * var(--u)); height: calc(28 * var(--u)); padding: 0; flex: none;
  background: var(--c-btn); border: 1px solid var(--c-line); color: var(--c-line);
  font-size: calc(18 * var(--u)); cursor: pointer;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.icon-btn[aria-disabled="true"] { cursor: default; }
.icon-btn--plain { width: calc(28 * var(--u)); background: none; border-color: transparent; color: var(--c-muted); font-size: calc(20 * var(--u)); }
@media (hover: hover) {
  .icon-btn:not([aria-disabled="true"]):hover { border-color: var(--c-text); color: var(--c-white); }
  .icon-btn--plain:hover { border-color: transparent !important; }
}
.icon-btn[aria-expanded="true"] { border-color: var(--c-text); color: var(--c-white); }

/* ---------- Меню ---------- */
.menu { gap: calc(32 * var(--u)); }

/* ---------- Нижня панель (кути екрана) ---------- */
.bottom-bar {
  position: fixed; z-index: 5;
  left: calc(64 * var(--u)); right: calc(64 * var(--u)); bottom: calc(64 * var(--u));
  display: flex; justify-content: space-between; align-items: flex-end;
  pointer-events: none;
}
.bottom-bar > * { pointer-events: auto; }
.bottom-bar--end { justify-content: flex-end; }
.corner-actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: calc(10 * var(--u)); }
.chat-mobile-btn { display: none; }
body.chat-open .bottom-bar { z-index: 52; }

/* ---------- Панель (лобі / код) ---------- */
.panel {
  position: relative;
  width: calc(480 * var(--u)); padding: calc(32 * var(--u));
  display: flex; flex-direction: column; align-items: center; gap: calc(24 * var(--u));
  background: var(--c-panel);
  border: 1px solid var(--c-line-soft); border-radius: 2px;
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.panel > * { width: 100%; }
.panel__title {
  margin: 0; padding-bottom: calc(12 * var(--u));
  border-bottom: 1px solid var(--c-line-title);
  text-align: center; font-size: calc(24 * var(--u)); font-weight: 700; line-height: 1.3; color: var(--c-white);
}
.panel__text { margin: calc(-4 * var(--u)) 0 0; text-align: center; color: var(--c-muted); font-size: calc(14 * var(--u)); line-height: 1.5; }
.panel__cta { display: flex; justify-content: center; padding-top: calc(16 * var(--u)); }

/* ---------- Поля ---------- */
.field { display: flex; flex-direction: column; gap: calc(10 * var(--u)); }
.field__row { display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--u)); }
.field__value-wrap { display: flex; align-items: center; gap: calc(8 * var(--u)); }
.field__label {
  font-family: var(--font-accent); font-weight: 400; font-size: calc(14 * var(--u));
  letter-spacing: 1px; text-transform: uppercase; color: var(--c-muted);
}
.field__label--ui { font-family: var(--font-ui); font-weight: 500; letter-spacing: 0; color: var(--c-muted-2); }
.field__value { font-family: var(--font-accent); font-weight: 700; font-size: calc(16 * var(--u)); letter-spacing: 1px; color: var(--c-orange); }
.field--select { gap: calc(10 * var(--u)); padding: calc(4 * var(--u)) 0 calc(19 * var(--u)); }

/* попередження «мінімум 4 гравці» — помаранчевий «!» перед значенням */
.warn { position: relative; display: inline-flex; }
.warn__btn {
  display: inline-flex; padding: 0; border: 0; background: none; cursor: help;
  color: var(--c-orange); font-size: calc(20 * var(--u));
  transition: filter var(--t) var(--ease);
  animation: warn-in 300ms var(--ease);
}
.warn__btn .icon { stroke-width: 1.8; }
@media (hover: hover) { .warn__btn:hover { filter: drop-shadow(0 0 calc(6 * var(--u)) var(--glow-strong)); } }
.warn.is-open .warn__btn { filter: drop-shadow(0 0 calc(6 * var(--u)) var(--glow-strong)); }
@keyframes warn-in { from { opacity: 0; transform: scale(.6); } }
.tooltip {
  position: absolute; z-index: 30; bottom: calc(100% + 10 * var(--u)); left: 50%;
  width: max-content; max-width: calc(240 * var(--u));
  padding: calc(8 * var(--u)) calc(10 * var(--u));
  background: var(--c-btn); border: 1px solid rgba(255, 85, 0, .6);
  box-shadow: 0 calc(6 * var(--u)) calc(18 * var(--u)) rgba(0, 0, 0, .6);
  color: var(--c-text); font-size: calc(13 * var(--u)); line-height: 1.4; text-transform: none; letter-spacing: 0;
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t);
  pointer-events: none;
}
.tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; width: 8px; height: 8px;
  background: var(--c-btn); border: solid rgba(255, 85, 0, .6); border-width: 0 1px 1px 0;
  transform: translate(-50%, -4px) rotate(45deg);
}
.warn.is-open .tooltip,
.warn__btn:hover + .tooltip,
.warn__btn:focus-visible + .tooltip { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
/* підказка, вирівняна по правому краю (значок біля правого краю панелі) */
.tooltip--end { left: auto; right: calc(-6 * var(--u)); transform: translateY(4px); }
.tooltip--end::after { left: auto; right: calc(16 * var(--u)); transform: translate(50%, -4px) rotate(45deg); }
.warn.is-open .tooltip--end,
.warn__btn:hover + .tooltip--end,
.warn__btn:focus-visible + .tooltip--end { transform: translateY(0); }

/* перемикач «Події» */
.field--toggle { gap: calc(6 * var(--u)); margin-top: calc(-12 * var(--u)); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: calc(12 * var(--u)); }
.field__hint { margin: 0; color: #6E6E6E; font-size: calc(12 * var(--u)); line-height: 1.4; }
.switch {
  position: relative; flex: none; padding: 0; cursor: pointer;
  width: calc(44 * var(--u)); height: calc(24 * var(--u));
  background: var(--c-field); border: 1px solid var(--c-line); border-radius: 2px;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.switch__knob {
  position: absolute; top: calc(3 * var(--u)); left: calc(3 * var(--u));
  width: calc(16 * var(--u)); height: calc(16 * var(--u)); border-radius: 1px;
  background: var(--c-muted);
  transition: transform var(--t) var(--ease), background-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.switch[aria-checked="true"] { border-color: var(--c-orange); background: rgba(255, 85, 0, .16); }
.switch[aria-checked="true"] .switch__knob { transform: translateX(calc(20 * var(--u))); background: var(--c-orange); }
@media (hover: hover) {
  .switch[aria-checked="false"]:hover { border-color: var(--c-text); }
  .switch[aria-checked="false"]:hover .switch__knob { background: var(--c-white); }
  .switch[aria-checked="true"]:hover .switch__knob { box-shadow: 0 0 calc(10 * var(--u)) var(--glow-strong); }
}

/* слайдер */
.slider { display: flex; align-items: center; gap: calc(12 * var(--u)); }
.slider__edge { min-width: 2ch; text-align: center; font-family: var(--font-accent); font-weight: 700; font-size: calc(16 * var(--u)); letter-spacing: 1px; color: var(--c-white); }
.slider__input {
  flex: 1; min-width: 0; height: calc(22 * var(--u)); margin: 0;
  background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.slider__input:focus { outline: none; }
.slider__input::-webkit-slider-runnable-track { height: calc(6 * var(--u)); background: var(--c-track); border-radius: calc(3 * var(--u)); }
.slider__input::-moz-range-track { height: calc(6 * var(--u)); background: var(--c-track); border-radius: calc(3 * var(--u)); }
.slider__input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: calc(16 * var(--u)); height: calc(22 * var(--u)); margin-top: calc(-8 * var(--u));
  background: var(--c-orange); border: 1px solid var(--c-orange-hi); border-radius: 2px;
  transition: box-shadow var(--t) var(--ease);
}
.slider__input::-moz-range-thumb {
  box-sizing: border-box; width: calc(16 * var(--u)); height: calc(22 * var(--u));
  background: var(--c-orange); border: 1px solid var(--c-orange-hi); border-radius: 2px;
  transition: box-shadow var(--t) var(--ease);
}
.slider__input:hover::-webkit-slider-thumb, .slider__input:active::-webkit-slider-thumb { box-shadow: 0 0 calc(12 * var(--u)) var(--glow-strong); }
.slider__input:hover::-moz-range-thumb, .slider__input:active::-moz-range-thumb { box-shadow: 0 0 calc(12 * var(--u)) var(--glow-strong); }
.slider__input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 calc(12 * var(--u)) var(--glow-strong); outline: 2px solid var(--c-orange-lite); outline-offset: 2px; }
.slider__input:focus-visible::-moz-range-thumb { box-shadow: 0 0 calc(12 * var(--u)) var(--glow-strong); }

/* випадний список складності */
.select { position: relative; }
.select__btn {
  width: 100%; height: calc(38 * var(--u)); margin: 0;
  display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--u));
  padding: calc(10 * var(--u)) calc(12 * var(--u));
  background: var(--c-field); border: 1px solid var(--c-line); border-radius: 0;
  color: var(--c-text); font-size: calc(14 * var(--u)); text-align: left; cursor: pointer;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.select__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select__arrow {
  font-family: "Roboto", sans-serif; font-size: calc(14 * var(--u)); line-height: 1; color: var(--c-text-hi);
  transition: color var(--t) var(--ease), transform var(--t) var(--ease);
}
@media (hover: hover) {
  .select__btn:hover { border-color: rgba(255, 85, 0, .7); }
  .select__btn:hover .select__arrow { color: var(--c-orange); }
}
.select.is-open .select__btn { border-color: var(--c-line); }
.select.is-open .select__arrow { transform: rotate(180deg); color: var(--c-white); }
.select.is-attention .select__btn { border-color: var(--c-orange); box-shadow: 0 0 calc(12 * var(--u)) var(--glow); }
.select__list {
  position: absolute; z-index: 20; top: 100%; left: 0; right: 0;
  margin: 0; padding: calc(4 * var(--u)) 0; list-style: none;
  background: var(--c-panel); border: 1px solid var(--c-line); border-top: 0;
  box-shadow: 0 calc(12 * var(--u)) calc(24 * var(--u)) rgba(0, 0, 0, .6);
  display: none;
}
.select.is-open .select__list { display: block; animation: list-in 160ms var(--ease); }
@keyframes list-in { from { opacity: 0; transform: translateY(-4px); } }
.select__option {
  padding: calc(8 * var(--u)) calc(12 * var(--u)) calc(8 * var(--u)) calc(10 * var(--u));
  border-left: 2px solid transparent;
  color: var(--c-muted); font-size: calc(14 * var(--u)); line-height: 1.15; cursor: pointer;
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.select__option[aria-selected="true"] { color: var(--c-text); }
.select__option.is-active { background: rgba(255, 85, 0, .15); border-left-color: var(--c-orange); color: var(--c-orange-hi); }

/* ---------- Код лобі ---------- */
.code { display: flex; justify-content: center; align-items: center; gap: calc(8 * var(--u)); margin: 0; padding: 0; border: 0; min-width: 0; }
.code__sep { width: calc(12 * var(--u)); height: 2px; background: var(--c-line); flex: none; }
.code__cell {
  width: calc(52 * var(--u)); height: calc(64 * var(--u)); padding: 0; flex: none;
  background: var(--c-field); border: 1px solid var(--c-line); border-radius: 0;
  color: var(--c-white); caret-color: var(--c-orange);
  font-family: var(--font-accent); font-weight: 700; font-size: calc(28 * var(--u));
  text-align: center; -webkit-appearance: none; appearance: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.code__cell.is-filled { border-color: var(--c-dim); }
@media (hover: hover) { .code__cell:hover { border-color: rgba(255, 85, 0, .6); } }
.code__cell:focus { outline: none; border-color: var(--c-orange); box-shadow: 0 0 calc(10 * var(--u)) rgba(255, 85, 0, .35); }
.code.is-complete .code__cell { border-color: rgba(255, 85, 0, .55); }
.code.is-shake { animation: shake 360ms var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ---------- Чат ---------- */
.chat {
  width: calc(280 * var(--u)); padding: calc(12 * var(--u));
  display: flex; flex-direction: column; gap: calc(8 * var(--u));
  background: var(--c-panel); border: 1px solid rgba(51, 51, 51, .25); border-radius: 2px;
  cursor: pointer;
  transition: width var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
@media (hover: hover) { .chat:not(.is-open):hover { border-color: var(--c-line); } }
.chat.is-open { width: calc(360 * var(--u)); cursor: default; border-color: var(--c-line); box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, .7); }
.chat__head { display: none; align-items: center; justify-content: space-between; padding-bottom: calc(8 * var(--u)); border-bottom: 1px solid var(--c-line-title); }
.chat.is-open .chat__head { display: flex; }
.chat__title { font-family: var(--font-accent); font-size: calc(14 * var(--u)); letter-spacing: 1px; text-transform: uppercase; color: var(--c-muted); }
.chat__log {
  height: calc(120 * var(--u)); margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: calc(4 * var(--u));
  overflow: hidden;
  font-family: var(--font-chat); font-size: calc(12 * var(--u)); line-height: 1.14;
  transition: height var(--t) var(--ease);
}
.chat__log > li:first-child { margin-top: auto; }
.chat__msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
/* згасання старих повідомлень у згорнутому стані (кольори з макета) */
.chat:not(.is-open) .chat__msg { color: #888888; }
.chat:not(.is-open) .chat__msg:nth-last-child(n+3) { color: #555555; }
.chat:not(.is-open) .chat__msg:nth-last-child(n+5) { color: #333333; }
.chat:not(.is-open) .chat__msg:nth-last-child(n+7) { color: rgba(51, 51, 51, .25); }
.chat:not(.is-open) .chat__msg:nth-last-child(n+8) { display: none; }
.chat:not(.is-open) .chat__author { color: inherit; }
/* розгорнутий стан */
.chat.is-open .chat__log { height: min(calc(360 * var(--u)), 42vh); overflow-y: auto; gap: calc(8 * var(--u)); padding-right: 4px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.chat.is-open .chat__msg { white-space: normal; color: var(--c-muted-2); line-height: 1.4; animation: msg-in var(--t) var(--ease); }
.chat__author { color: var(--c-text); font-weight: 500; }
.chat__msg--me .chat__author { color: var(--c-orange-hi); }
.chat.is-open .chat__msg--system { color: var(--c-dim); font-style: italic; }
@keyframes msg-in { from { opacity: 0; transform: translateY(4px); } }

.chat__bar { display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--u)); border: 1px solid rgba(51, 51, 51, .25); }
.chat__input {
  flex: 1; min-width: 0; height: calc(28 * var(--u)); padding: 0 calc(4 * var(--u));
  background: transparent; border: 0; outline: none;
  color: var(--c-text); font-family: var(--font-chat); font-size: calc(12 * var(--u));
  opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease);
}
.chat__input::placeholder { color: var(--c-dim); }
.chat.is-open .chat__input { opacity: 1; pointer-events: auto; }

/* ---------- Оверлей і друзі ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .5); } /* Figma: #000 50%, Instant */
.friends {
  position: fixed; z-index: 51;
  right: calc(64 * var(--u)); bottom: calc(64 * var(--u) + 40 * var(--u) + 12 * var(--u));
  width: calc(360 * var(--u)); max-height: calc(100vh - 200 * var(--u));
  display: flex; flex-direction: column; gap: calc(16 * var(--u));
  padding: calc(20 * var(--u));
  background: var(--c-panel); border: 1px solid var(--c-line-soft); border-radius: 2px;
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, .7);
}
.friends__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: calc(12 * var(--u)); border-bottom: 1px solid var(--c-line-title); }
.friends__title { margin: 0; font-family: var(--font-accent); font-weight: 600; font-size: calc(18 * var(--u)); letter-spacing: 1px; text-transform: uppercase; }
.friends__count { margin: calc(4 * var(--u)) 0 0; color: var(--c-muted); font-size: calc(12 * var(--u)); }
.friends__scroll { overflow-y: auto; margin-right: -6px; padding-right: 6px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.friends__label { margin: 0 0 calc(8 * var(--u)); font-family: var(--font-accent); font-size: calc(12 * var(--u)); letter-spacing: 1px; text-transform: uppercase; color: var(--c-dim); }
.friends__list { list-style: none; margin: 0 0 calc(20 * var(--u)); padding: 0; display: flex; flex-direction: column; gap: calc(8 * var(--u)); }
.friends__list:last-child { margin-bottom: 0; }
.friends__empty { padding: calc(12 * var(--u)) 0; color: var(--c-dim); font-size: calc(14 * var(--u)); }

/* рядок гравця / друга — стани з Figma: Default, Hower, Player, Offline, PlayerHower */
.person {
  display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--u));
  height: calc(40 * var(--u)); padding: 0 calc(8 * var(--u)) 0 calc(12 * var(--u));
  background: var(--c-field); border: 1px solid #1E1E1E;
  color: var(--c-muted); font-size: calc(14 * var(--u));
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.person__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__tools { display: flex; align-items: center; gap: calc(4 * var(--u)); }
.person__btn {
  display: inline-flex; padding: calc(2 * var(--u)); border: 0; background: none; cursor: pointer;
  color: var(--c-muted); font-size: calc(20 * var(--u));
  opacity: 0; transition: opacity var(--t) var(--ease), color var(--t) var(--ease);
}
.person__status { display: inline-flex; color: var(--c-muted); font-size: calc(20 * var(--u)); padding: calc(2 * var(--u)); }
.person:hover, .person:focus-within { background: #222222; border-color: #8A8A8A; color: var(--c-text-hi); }
.person:hover .person__btn, .person:focus-within .person__btn { opacity: 1; }
@media (hover: hover) { .person__btn:hover { color: var(--c-white); } }
@media (hover: none) { .person__btn { opacity: 1; } }

.person--offline { color: #444444; }
.person--offline:hover, .person--offline:focus-within { background: #1A1A1A; border-color: var(--c-dim); color: #666666; }

.person--me {
  border-color: var(--c-orange); color: var(--c-white);
  background: linear-gradient(90deg, #4A2614 0%, #2C1A10 62%, #1C1410 100%);
}
.person--me .person__btn { color: var(--c-orange-hi); }
.person--me:hover, .person--me:focus-within {
  border-color: var(--c-orange-hi); color: var(--c-white);
  background: linear-gradient(90deg, #5C2E14 0%, #351E10 62%, #221610 100%);
  box-shadow: 0 0 calc(16 * var(--u)) var(--glow);
}
@media (hover: hover) { .person--me .person__btn:hover { color: var(--c-orange-lite); } }

/* ---------- Екран завантаження ---------- */
.screen--loading { gap: 0; padding-top: min(calc(256 * var(--u)), 23.7vh); }
.trefoil {
  flex: none; width: calc(208 * var(--u)); height: calc(208 * var(--u)); margin-top: calc(28 * var(--u));
  overflow: visible;
  filter: drop-shadow(0 0 calc(6 * var(--u)) rgba(255, 102, 0, .75));
}
.trefoil__core, .trefoil__blade { fill: none; stroke: var(--c-orange-2); stroke-width: 2.3; stroke-linejoin: round; }
.trefoil__blade { animation: blade 1.5s ease-in-out infinite; }
.trefoil__blade:nth-of-type(2) { animation-delay: .5s; }
.trefoil__blade:nth-of-type(3) { animation-delay: 1s; }
.trefoil__core { animation: core 1.5s ease-in-out infinite; }
@keyframes blade { 0%, 100% { opacity: .28; } 35% { opacity: 1; } }
@keyframes core { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

.loader-status {
  margin: calc(32 * var(--u)) 0 0;
  font-family: var(--font-accent); font-size: calc(14 * var(--u)); letter-spacing: 2px; text-transform: uppercase; color: var(--c-muted);
}
.dots::after { content: ""; display: inline-block; width: 1.5em; text-align: left; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- Чорний перехід (Frame 6) ---------- */
.blackout { position: fixed; inset: 0; z-index: 90; background: #000; opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease); }
.blackout.is-on { opacity: 1; pointer-events: auto; }

/* ---------- Повідомлення-підказка ---------- */
.toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(64 * var(--u));
  max-width: calc(100vw - 32px);
  padding: calc(10 * var(--u)) calc(16 * var(--u));
  background: var(--c-panel); border: 1px solid var(--c-line); border-left: 2px solid var(--c-orange);
  box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(0, 0, 0, .6);
  color: var(--c-text); font-size: calc(14 * var(--u));
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t);
  pointer-events: none;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }


/* ---------- Лобі: список гравців ---------- */
.panel--room { width: calc(480 * var(--u)); }
.panel--room-wide { width: calc(720 * var(--u)); }

.params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(8 * var(--u)); margin: 0; }
.param {
  min-width: 0; display: flex; flex-direction: column; gap: calc(4 * var(--u));
  padding: calc(10 * var(--u)) calc(12 * var(--u));
  background: var(--c-field); border: 1px solid var(--c-track);
}
.param dt { font-family: var(--font-accent); font-size: calc(12 * var(--u)); letter-spacing: 1px; text-transform: uppercase; color: var(--c-muted); }
.param dd {
  margin: 0; min-height: calc(24 * var(--u));
  display: flex; align-items: center; justify-content: space-between; gap: calc(6 * var(--u));
  color: var(--c-white); font-size: calc(15 * var(--u)); font-weight: 500; line-height: 1.25;
}
.param--accent dd, .param--code dd { font-family: var(--font-accent); font-weight: 700; font-size: calc(18 * var(--u)); letter-spacing: 1px; }
.param--accent dd { color: var(--c-orange); }
#room-code { white-space: nowrap; }
.icon-btn--sm { width: calc(24 * var(--u)); height: calc(24 * var(--u)); font-size: calc(18 * var(--u)); }

.room-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(8 * var(--u)); }
.room-list--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: calc(12 * var(--u)); }
.room-list .person { min-width: 0; }
.person__tag {
  margin-left: calc(8 * var(--u)); vertical-align: 1px;
  font-family: var(--font-accent); font-size: calc(11 * var(--u)); letter-spacing: 1px; text-transform: uppercase;
  color: var(--c-orange-hi);
}
.person--me .person__tag { color: var(--c-orange-lite); }
.person.is-new { animation: row-in 350ms var(--ease); }
@keyframes row-in { from { opacity: 0; transform: translateY(-6px); background: rgba(255, 85, 0, .18); } }
.slot {
  display: flex; align-items: center; min-width: 0;
  height: calc(40 * var(--u)); padding: 0 calc(12 * var(--u));
  border: 1px dashed var(--c-track); color: #444444; font-size: calc(14 * var(--u));
}
.slot--next { animation: slot-pulse 1.8s ease-in-out infinite; }
@keyframes slot-pulse { 50% { border-color: #444444; color: #666666; } }

/* підказка на неактивній кнопці «Почати гру» */
.cta-hint { position: relative; display: inline-flex; }
.cta-hint.is-blocked:hover .tooltip,
.cta-hint.is-blocked.is-open .tooltip,
.cta-hint.is-blocked .btn:focus-visible + .tooltip { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.cta-hint .tooltip { white-space: nowrap; }

.waiting {
  margin: 0; min-height: calc(48 * var(--u)); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-accent); font-size: calc(16 * var(--u)); letter-spacing: 2px; text-transform: uppercase;
  color: var(--c-muted); text-align: center;
}

/* ---------- Сценарій ---------- */
.screen--scenario { padding-top: min(calc(64 * var(--u)), 6vh); padding-bottom: calc(128 * var(--u)); }
.scenario {
  flex: 0 0 auto; margin-block: auto;
  flex-direction: row; justify-content: center; align-items: stretch;
  gap: calc(32 * var(--u)); padding-block: 0;
}
.scenario__art {
  position: relative; margin: 0; overflow: hidden;
  flex: 0 1 calc(760 * var(--u)); min-width: 0; min-height: calc(480 * var(--u));
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, var(--tint, #3A2A1A) 0%, #0B0B0B 80%);
  border: 1px solid var(--c-line-soft); border-radius: 2px;
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, .7);
}
.scenario__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scenario__ph {
  display: flex; flex-direction: column; align-items: center; gap: calc(20 * var(--u));
  color: rgba(255, 255, 255, .35); font-family: var(--font-accent); font-size: calc(13 * var(--u));
  letter-spacing: 2px; text-transform: uppercase; text-align: center; padding: 0 calc(24 * var(--u));
}
.scenario__ph-icon {
  width: calc(160 * var(--u)); height: calc(160 * var(--u));
  fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 2; stroke-linejoin: round;
}
.scenario__info { flex: 0 0 calc(560 * var(--u)); width: calc(560 * var(--u)); align-items: stretch; gap: calc(16 * var(--u)); }
.scenario__info > * { width: auto; }
.scenario__kicker { margin: 0; font-family: var(--font-accent); font-size: calc(13 * var(--u)); letter-spacing: 2px; text-transform: uppercase; color: var(--c-orange); }
.scenario__title { margin: calc(-8 * var(--u)) 0 0; font-family: var(--font-accent); font-weight: 700; font-size: calc(40 * var(--u)); line-height: 1.1; letter-spacing: 1px; text-transform: uppercase; }
.scenario__desc { margin: 0; color: var(--c-muted-2); font-size: calc(15 * var(--u)); line-height: 1.5; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(8 * var(--u)); margin: calc(4 * var(--u)) 0 0; }
.stat {
  min-width: 0; display: flex; flex-direction: column; gap: calc(6 * var(--u));
  padding: calc(12 * var(--u)) calc(14 * var(--u));
  background: var(--c-field); border: 1px solid var(--c-track);
}
.stat--wide { grid-column: 1 / -1; }
.stat dt { font-family: var(--font-accent); font-size: calc(12 * var(--u)); letter-spacing: 1px; text-transform: uppercase; color: var(--c-muted); }
.stat dd { margin: 0; color: var(--c-white); font-size: calc(16 * var(--u)); font-weight: 500; line-height: 1.35; }
.stat small { color: #6E6E6E; font-size: calc(12 * var(--u)); line-height: 1.4; }
.stat__units { color: var(--c-orange); white-space: nowrap; }

.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(10 * var(--u)); }
.event { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: calc(10 * var(--u)); row-gap: calc(2 * var(--u)); align-items: center; }
.event .icon { font-size: calc(20 * var(--u)); }
.event__title { font-weight: 500; }
.event__text { grid-column: 2; color: var(--c-muted-2); font-size: calc(14 * var(--u)); font-weight: 400; line-height: 1.4; }
.event--pos .icon { color: #9CC27A; }
.event--neg .icon { color: var(--c-orange); }
.event--none { color: var(--c-muted); font-weight: 400; }


/* ---------- Гра: шапка ---------- */
.screen--game {
  gap: calc(14 * var(--u));
  padding: min(calc(40 * var(--u)), 4vh) calc(64 * var(--u)) calc(64 * var(--u) + 60 * var(--u));
  overflow: hidden;
}
body.vote-open .screen--game { padding-bottom: calc(64 * var(--u) + 60 * var(--u)); }
.ghead {
  width: 100%; max-width: calc(1792 * var(--u)); flex: none;
  flex-direction: row; align-items: center; justify-content: space-between; gap: calc(32 * var(--u));
  padding: calc(18 * var(--u)) calc(28 * var(--u));
}
.ghead > * { width: auto; }
.ghead__title { margin: 0; font-family: var(--font-accent); font-weight: 700; font-size: calc(30 * var(--u)); line-height: 1.1; letter-spacing: 1px; text-transform: uppercase; }
.ghead__stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: calc(8 * var(--u)); margin: 0; }
.ghead__stats > div { min-width: calc(112 * var(--u)); padding: calc(8 * var(--u)) calc(14 * var(--u)); background: var(--c-field); border: 1px solid var(--c-track); }
.ghead__stats dt { font-family: var(--font-accent); font-size: calc(11 * var(--u)); letter-spacing: 1px; text-transform: uppercase; color: var(--c-muted); }
.ghead__stats dd { margin: calc(2 * var(--u)) 0 0; font-size: calc(15 * var(--u)); font-weight: 500; white-space: nowrap; }
.ghead__stats dd small { color: #777; font-size: calc(12 * var(--u)); font-weight: 400; }
#g-round { color: var(--c-orange); font-family: var(--font-accent); font-weight: 700; letter-spacing: 1px; }

.gbar { width: 100%; max-width: calc(1792 * var(--u)); flex: none; display: flex; align-items: center; gap: calc(16 * var(--u)); min-height: calc(40 * var(--u)); }
.gbar__status { flex: 1; margin: 0; color: var(--c-muted-2); font-size: calc(15 * var(--u)); }
.gbar__status strong { color: var(--c-white); }
.gbar__warn { color: var(--c-orange-hi); }
.gbar__timer, .vote__timer {
  font-family: var(--font-accent); font-weight: 700; font-size: calc(22 * var(--u)); letter-spacing: 1px;
  color: var(--c-orange); min-width: calc(60 * var(--u)); text-align: right;
}
.gbar__timer.is-low, .vote__timer.is-low { animation: timer-blink 1s steps(2) infinite; }
@keyframes timer-blink { 50% { opacity: .35; } }
.gbar__ability {
  display: inline-flex; align-items: center; gap: calc(8 * var(--u));
  padding: calc(8 * var(--u)) calc(12 * var(--u));
  background: transparent; border: 1px dashed #444; color: var(--c-text); font-size: calc(13 * var(--u)); cursor: help;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.gbar__ability-label { font-family: var(--font-accent); font-size: calc(11 * var(--u)); letter-spacing: 1px; text-transform: uppercase; color: var(--c-muted); }
@media (hover: hover) { .gbar__ability:hover { border-color: var(--c-orange); color: var(--c-orange-hi); } }
.btn--sm { width: auto; height: calc(40 * var(--u)); padding: 0 calc(20 * var(--u)); font-size: calc(14 * var(--u)); }

/* ---------- Гра: таблиця ---------- */
.gtable-wrap {
  width: 100%; max-width: calc(1792 * var(--u)); flex: 1 1 auto; min-height: 0;
  overflow: auto; overscroll-behavior: contain;
  background: var(--c-panel); border: 1px solid var(--c-line-soft); border-radius: 2px;
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, .7);
  scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.gtable { width: 100%; min-width: calc(180 * var(--u) + 10 * 136 * var(--u)); border-collapse: separate; border-spacing: 0; font-size: calc(14 * var(--u)); }
.gtable th {
  position: sticky; top: 0; z-index: 3;
  padding: calc(12 * var(--u)); background: #171717; border-bottom: 1px solid var(--c-track);
  text-align: left; white-space: nowrap;
  font-family: var(--font-accent); font-weight: 400; font-size: calc(12 * var(--u)); letter-spacing: 1px; text-transform: uppercase; color: var(--c-muted);
}
.gtable td { padding: calc(10 * var(--u)) calc(12 * var(--u)); min-width: calc(136 * var(--u)); background: var(--c-panel); border-bottom: 1px solid #1E1E1E; vertical-align: top; transition: background-color 600ms var(--ease); }
.gtable .gt-name { position: sticky; left: 0; z-index: 2; min-width: calc(180 * var(--u)); border-right: 1px solid var(--c-track); }
.gtable th.gt-name { z-index: 4; }
/* ваш рядок — закріплений під заголовком */
.gt-me td { position: sticky; top: var(--th-h, 40px); z-index: 2; background: #1B140E; border-bottom: 2px solid var(--c-orange); }
.gt-me td.gt-name { z-index: 3; }
.gt-others tr:hover td { background: #161616; }

.gname { font-weight: 500; font-size: calc(15 * var(--u)); color: var(--c-white); }
.gprog { display: block; margin-top: calc(3 * var(--u)); font-family: var(--font-accent); font-size: calc(12 * var(--u)); letter-spacing: 1px; color: #666; }
.gprog.is-done { color: var(--c-muted-2); }
.person__tag--out { color: #777; }
.gv { display: block; color: var(--c-text); line-height: 1.35; }
.gv-sub { display: block; margin-top: calc(2 * var(--u)); color: #777; font-size: calc(12 * var(--u)); line-height: 1.35; }
.gt-hidden { color: #3C3C3C; }
.gt-me .gv { color: var(--c-white); }
.gt-me .gv-sub { color: #999; }
.gt-me .is-open .gv { color: var(--c-orange); }
.gt-me .is-open .gv-sub { color: rgba(255, 119, 34, .7); }
.gtable td[data-hint], .ghead__stats [data-hint] { cursor: help; }
.gcell { display: flex; align-items: flex-start; justify-content: space-between; gap: calc(8 * var(--u)); }
.gt-flash { animation: cell-flash 1.4s var(--ease); }
@keyframes cell-flash { 0%, 30% { background: rgba(255, 85, 0, .28); } }
tr.is-out td { opacity: .42; }
tr.is-out .gname { text-decoration: line-through; }

/* кнопка «відкрити» (біла → помаранчева при наведенні) */
.eye-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  height: calc(26 * var(--u)); min-width: calc(30 * var(--u)); padding: 0 calc(6 * var(--u));
  background: var(--c-btn); border: 1px solid #3A3A3A; color: var(--c-text-hi);
  font-size: calc(17 * var(--u)); cursor: pointer;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
@media (hover: hover) { .eye-btn:hover { color: var(--c-orange); border-color: var(--c-orange); } }
.eye-btn.is-confirm {
  color: var(--c-orange); border-color: var(--c-orange); box-shadow: 0 0 calc(10 * var(--u)) var(--glow);
  font-family: var(--font-accent); font-size: calc(12 * var(--u)); letter-spacing: 1px; text-transform: uppercase; white-space: nowrap;
}

/* ---------- Голосування ---------- */
.vote {
  position: fixed; z-index: 60; left: 50%; bottom: calc(40 * var(--u));
  transform: translateX(-50%);
  width: calc(780 * var(--u)); max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; gap: calc(14 * var(--u));
  padding: calc(20 * var(--u)) calc(24 * var(--u));
  background: var(--c-panel); border: 1px solid rgba(255, 85, 0, .45); border-radius: 2px;
  box-shadow: 0 calc(-10 * var(--u)) calc(40 * var(--u)) rgba(0, 0, 0, .85), 0 0 calc(24 * var(--u)) rgba(255, 85, 0, .15);
  animation: vote-in var(--t) var(--ease);
}
@keyframes vote-in { from { opacity: 0; transform: translate(-50%, 16px); } }
.vote__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.vote__title { margin: 0; font-family: var(--font-accent); font-weight: 600; font-size: calc(20 * var(--u)); letter-spacing: 1px; text-transform: uppercase; }
.vote__sub { margin: calc(2 * var(--u)) 0 0; color: var(--c-muted); font-size: calc(13 * var(--u)); }
.vote__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(8 * var(--u)); max-height: 40vh; overflow-y: auto; }
.vote__opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0;
  height: calc(40 * var(--u)); padding: 0 calc(12 * var(--u));
  background: var(--c-field); border: 1px solid var(--c-line); color: var(--c-text);
  font-size: calc(14 * var(--u)); text-align: left; cursor: pointer;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease), background-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.vote__opt > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote__opt:disabled { cursor: default; }
@media (hover: hover) { .vote__opt:not(:disabled):hover { border-color: var(--c-orange); color: var(--c-orange-hi); } }
.vote__opt.is-selected { border-color: var(--c-orange); background: rgba(255, 85, 0, .14); color: var(--c-white); }
.vote__opt.is-top { border-color: var(--c-orange); box-shadow: 0 0 calc(12 * var(--u)) var(--glow); color: var(--c-white); }
.vote__opt.is-lot { background: rgba(255, 85, 0, .38); border-color: var(--c-orange-lite); color: var(--c-white); transition: none; }
.vote__count { font-family: var(--font-accent); font-weight: 700; color: var(--c-orange); }
.vote__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: calc(40 * var(--u)); }
.vote__note { margin: 0; color: var(--c-muted-2); font-size: calc(14 * var(--u)); }
.vote__note strong { color: var(--c-white); }
.vote__decision { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.vote .btn--ghost.btn--sm { width: auto; }

/* ---------- Банер раунду ---------- */
.round-banner {
  position: fixed; z-index: 70; left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: calc(24 * var(--u)) calc(48 * var(--u));
  background: rgba(10, 10, 10, .92); border: 1px solid rgba(255, 85, 0, .5);
  box-shadow: 0 0 calc(40 * var(--u)) rgba(255, 85, 0, .2);
  pointer-events: none; opacity: 0; text-align: center;
}
.round-banner.is-on { animation: banner 2.5s var(--ease) forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -40%); } 15%, 80% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -55%); } }
.round-banner__title { font-family: var(--font-accent); font-weight: 700; font-size: calc(44 * var(--u)); letter-spacing: 2px; text-transform: uppercase; color: var(--c-orange); text-shadow: 0 0 calc(18 * var(--u)) var(--glow); }
.round-banner__sub { color: var(--c-text); font-size: calc(15 * var(--u)); }


/* ---------- v05: дії, журнал, підтвердження ---------- */
.gbar__ability--act { border-style: solid; border-color: rgba(255, 85, 0, .55); color: var(--c-orange-hi); cursor: pointer; font-family: var(--font-accent); letter-spacing: 1px; text-transform: uppercase; }
.gbar__ability--debug { border-style: solid; border-color: #7A5CFF; color: #B7A6FF; cursor: pointer; font-family: var(--font-accent); letter-spacing: 1px; text-transform: uppercase; }
@media (hover: hover) { .gbar__ability--debug:hover { background: rgba(122, 92, 255, .15); color: #fff; } }
.debug-badge { position: fixed; left: 12px; top: 10px; z-index: 90; padding: 2px 8px; background: #7A5CFF; color: #fff; font: 600 11px/1.6 var(--font-accent, sans-serif); letter-spacing: 1px; pointer-events: none; }
#g-log { cursor: pointer; }
.gbar__badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: calc(18 * var(--u)); height: calc(18 * var(--u)); padding: 0 4px;
  background: var(--c-orange); color: var(--c-white); font-size: calc(11 * var(--u)); border-radius: 2px;
}
.gt-me .is-forged .gv-sub { color: var(--c-orange-lite); font-style: italic; }
.vote__opt.is-confirm { border-color: var(--c-orange); color: var(--c-orange); box-shadow: 0 0 calc(10 * var(--u)) var(--glow); font-family: var(--font-accent); letter-spacing: 1px; text-transform: uppercase; }
.btn--ghost.is-confirm { border-color: var(--c-orange); color: var(--c-orange); box-shadow: 0 0 calc(10 * var(--u)) var(--glow); }

body.vote-open .toast { bottom: calc(300 * var(--u)); }

/* ---------- v05: підказки в загальному стилі ---------- */
.gtip {
  position: fixed; z-index: 120; max-width: calc(300 * var(--u));
  padding: calc(10 * var(--u)) calc(12 * var(--u));
  background: var(--c-btn); border: 1px solid rgba(255, 85, 0, .6);
  box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(0, 0, 0, .7);
  color: var(--c-text); font-size: calc(13 * var(--u)); line-height: 1.45;
  pointer-events: none; opacity: 0; transform: translateY(4px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.gtip.is-on { opacity: 1; transform: translateY(0); }
.gtip::after {
  content: ""; position: absolute; top: 100%; left: var(--arrow-x, 50%); width: 8px; height: 8px;
  background: var(--c-btn); border: solid rgba(255, 85, 0, .6); border-width: 0 1px 1px 0;
  transform: translate(-50%, -4px) rotate(45deg);
}
.gtip.is-below::after { top: auto; bottom: 100%; transform: translate(-50%, 4px) rotate(225deg); }

/* ---------- v05: модальна панель ---------- */
.gmodal { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gmodal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.gmodal__panel {
  position: relative; width: calc(520 * var(--u)); max-width: 100%; max-height: calc(100vh - 32px);
  overflow-y: auto; gap: calc(16 * var(--u)); animation: list-in 200ms var(--ease);
}
.gmodal__text { margin: 0; color: var(--c-muted-2); font-size: calc(14 * var(--u)); line-height: 1.5; }
.gmodal__text strong { color: var(--c-white); }
.gmodal__opts { display: flex; flex-direction: column; gap: calc(8 * var(--u)); }
.gmodal__opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: calc(2 * var(--u)); width: 100%;
  padding: calc(10 * var(--u)) calc(12 * var(--u));
  background: var(--c-field); border: 1px solid var(--c-line); border-left: 2px solid transparent;
  color: var(--c-text); text-align: left; cursor: pointer;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.gmodal__opt-label { font-size: calc(15 * var(--u)); font-weight: 500; }
.gmodal__opt-sub { font-size: calc(12 * var(--u)); color: var(--c-muted); line-height: 1.4; }
@media (hover: hover) { .gmodal__opt:not(:disabled):hover { border-color: rgba(255, 85, 0, .7); color: var(--c-orange-hi); } }
.gmodal__opt.is-selected { background: rgba(255, 85, 0, .15); border-color: var(--c-orange); border-left-color: var(--c-orange); color: var(--c-white); }
.gmodal__opt:disabled { opacity: .45; cursor: not-allowed; }
.gmodal__input {
  width: 100%; height: calc(44 * var(--u)); padding: 0 calc(12 * var(--u));
  background: var(--c-field); border: 1px solid var(--c-line); color: var(--c-white); font-size: calc(15 * var(--u)); outline: none;
  transition: border-color var(--t) var(--ease);
}
.gmodal__input:focus { border-color: var(--c-orange); }
.gmodal__stepper { display: flex; align-items: center; gap: calc(10 * var(--u)); }
.gmodal__stepper .icon-btn { width: calc(36 * var(--u)); height: calc(36 * var(--u)); color: var(--c-text); font-size: calc(18 * var(--u)); }
#gmodal-step { min-width: calc(28 * var(--u)); text-align: center; font-family: var(--font-accent); font-weight: 700; font-size: calc(22 * var(--u)); color: var(--c-orange); }
.gmodal__step-label { color: var(--c-muted); font-size: calc(13 * var(--u)); }
.gmodal__actions { display: flex; justify-content: flex-end; gap: calc(8 * var(--u)); width: 100%; }
.gmodal__actions .btn--primary { width: auto; min-width: calc(160 * var(--u)); font-size: calc(16 * var(--u)); }

/* ---------- v05: журнал ---------- */
.glog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(8 * var(--u)); max-height: 50vh; overflow-y: auto; }
.glog--compact { max-height: calc(220 * var(--u)); }
.glog__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: calc(10 * var(--u)); padding: calc(8 * var(--u)) calc(10 * var(--u)); background: var(--c-field); border-left: 2px solid #444; }
.glog__item--pos { border-left-color: #9CC27A; }
.glog__item--neg { border-left-color: var(--c-orange); }
.glog__round { font-family: var(--font-accent); font-size: calc(12 * var(--u)); color: var(--c-muted); letter-spacing: 1px; padding-top: 1px; }
.glog__item strong { display: block; font-size: calc(14 * var(--u)); font-weight: 500; }
.glog__item span:not(.glog__round) { display: block; color: var(--c-muted-2); font-size: calc(13 * var(--u)); line-height: 1.4; }
.glog__empty { color: var(--c-muted); font-size: calc(14 * var(--u)); }

/* ---------- v05: картки подій ---------- */
.gevents { position: fixed; z-index: 80; left: 50%; top: calc(150 * var(--u)); transform: translateX(-50%); width: calc(560 * var(--u)); max-width: calc(100vw - 32px); cursor: pointer; }
.gevent {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: calc(14 * var(--u)); align-items: start;
  padding: calc(16 * var(--u)) calc(20 * var(--u));
  background: rgba(14, 14, 14, .97); border: 1px solid var(--c-line); border-left: 3px solid var(--c-orange);
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, .8);
  animation: event-in 350ms var(--ease);
}
.gevent--pos { border-left-color: #9CC27A; }
@keyframes event-in { from { opacity: 0; transform: translateY(-12px); } }
.gevent__icon { font-size: calc(28 * var(--u)); color: var(--c-orange); padding-top: 2px; }
.gevent--pos .gevent__icon { color: #9CC27A; }
.gevent__kicker { margin: 0; font-family: var(--font-accent); font-size: calc(12 * var(--u)); letter-spacing: 2px; text-transform: uppercase; color: var(--c-orange); }
.gevent--pos .gevent__kicker { color: #9CC27A; }
.gevent__title { margin: calc(2 * var(--u)) 0 0; font-family: var(--font-accent); font-weight: 700; font-size: calc(22 * var(--u)); letter-spacing: 1px; text-transform: uppercase; }
.gevent__text { margin: calc(4 * var(--u)) 0 0; color: var(--c-muted-2); font-size: calc(14 * var(--u)); line-height: 1.45; }
.gevent__lines { margin: calc(6 * var(--u)) 0 0; color: var(--c-text); font-size: calc(13 * var(--u)); }

/* ---------- v05: фінал ---------- */
.screen--results { padding-top: min(calc(48 * var(--u)), 5vh); }
.results { width: 100%; max-width: calc(1600 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(24 * var(--u)); }
.results__hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: calc(6 * var(--u)); }
.results__title {
  margin: 0; font-family: var(--font-accent); font-weight: 700; font-size: calc(88 * var(--u)); line-height: 1; letter-spacing: 4px; text-transform: uppercase;
  color: var(--c-orange); text-shadow: 0 0 calc(30 * var(--u)) var(--glow-strong);
  animation: result-in 900ms var(--ease);
}
.screen--results[data-outcome^="defeat"] .results__title { color: #D9D9D9; text-shadow: 0 0 calc(30 * var(--u)) rgba(255, 85, 0, .35); }
@keyframes result-in { from { opacity: 0; letter-spacing: 24px; } }
.results__sub { margin: 0; color: var(--c-muted-2); font-size: calc(18 * var(--u)); }
.results__grid { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(16 * var(--u)); align-items: start; }
.results__card { width: auto; align-items: stretch; gap: calc(12 * var(--u)); padding: calc(24 * var(--u)); }
.results__card > * { width: auto; }
.results__h { margin: calc(4 * var(--u)) 0 0; font-family: var(--font-accent); font-weight: 400; font-size: calc(13 * var(--u)); letter-spacing: 1px; text-transform: uppercase; color: var(--c-muted); }
.results__score { margin: 0; font-family: var(--font-accent); font-weight: 700; font-size: calc(64 * var(--u)); line-height: 1; color: #9CC27A; }
.results__score[data-tone="neg"] { color: var(--c-orange); }
.results__hint { margin: 0; color: #6E6E6E; font-size: calc(12 * var(--u)); line-height: 1.4; }
.results__list, .results__people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(4 * var(--u)); }
.rline, .rrow { display: flex; justify-content: space-between; gap: 12px; padding: calc(7 * var(--u)) calc(10 * var(--u)); background: var(--c-field); font-size: calc(14 * var(--u)); }
.rline span, .rrow span { color: var(--c-muted-2); }
.rline strong, .rrow strong { font-family: var(--font-accent); font-weight: 600; letter-spacing: .5px; white-space: nowrap; }
.rline--pos strong, .is-pos { color: #9CC27A; }
.rline--neg strong, .is-neg { color: var(--c-orange); }
.rline--zero strong { color: var(--c-muted); }
.results__fert { margin: 0; color: var(--c-muted-2); font-size: calc(14 * var(--u)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rbadge { padding: calc(3 * var(--u)) calc(10 * var(--u)); font-family: var(--font-accent); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: calc(13 * var(--u)); }
.rbadge--pos { background: rgba(156, 194, 122, .15); color: #9CC27A; border: 1px solid rgba(156, 194, 122, .5); }
.rbadge--neg { background: rgba(255, 85, 0, .15); color: var(--c-orange); border: 1px solid rgba(255, 85, 0, .5); }
.rperson { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: calc(8 * var(--u)) calc(10 * var(--u)); background: var(--c-field); }
.rperson__name { font-weight: 500; font-size: calc(14 * var(--u)); }
.rperson__meta { grid-column: 1; color: var(--c-muted); font-size: calc(12 * var(--u)); line-height: 1.4; }
.rperson__fert { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: calc(18 * var(--u)); }
.results__actions { display: flex; gap: calc(10 * var(--u)); align-items: center; justify-content: center; flex-wrap: wrap; padding-bottom: calc(24 * var(--u)); }

/* =========================================================================
   КОМПАКТНИЙ РЕЖИМ — планшети, телефони, низькі вікна
   ========================================================================= */

/* ---------- v06: власний сценарій ---------- */
.panel--custom { width: calc(640 * var(--u)); gap: calc(18 * var(--u)); }
.params--custom { margin-top: calc(-4 * var(--u)); }
.param--wide { grid-column: 1 / -1; }
.param--wide dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.param dd.is-warn, .cfield__note.is-warn { color: var(--c-orange-hi); }
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(16 * var(--u)) calc(16 * var(--u)); }
.cfield { display: flex; flex-direction: column; gap: calc(6 * var(--u)); min-width: 0; }
.cfield__label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-family: var(--font-accent); font-size: calc(13 * var(--u)); letter-spacing: 1px; text-transform: uppercase; color: var(--c-muted);
}
.cfield__count, .cfield__opt { font-family: var(--font-ui); font-size: calc(11 * var(--u)); letter-spacing: 0; text-transform: none; color: var(--c-dim); }
.cfield__input {
  width: 100%; height: calc(44 * var(--u)); padding: 0 calc(12 * var(--u));
  background: var(--c-field); border: 1px solid var(--c-line); border-radius: 0;
  color: var(--c-white); font-size: calc(15 * var(--u)); outline: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  -moz-appearance: textfield; appearance: textfield;
}
.cfield__input::-webkit-outer-spin-button, .cfield__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cfield__input::placeholder { color: rgba(255, 255, 255, .3); opacity: 1; }
@media (hover: hover) { .cfield__input:hover { border-color: rgba(255, 85, 0, .6); } }
.cfield__input:focus { border-color: var(--c-orange); box-shadow: 0 0 calc(10 * var(--u)) rgba(255, 85, 0, .3); }
.cfield__textarea { height: auto; min-height: calc(84 * var(--u)); padding-block: calc(10 * var(--u)); resize: vertical; line-height: 1.45; font-family: var(--font-ui); }
.cfield__note { color: #6E6E6E; font-size: calc(12 * var(--u)); line-height: 1.4; min-height: 1.4em; }
/* v07: «Створити власний сценарій» неактивна без складності */
.btn--accent[aria-disabled="true"] { border-color: var(--c-line); color: var(--c-dim); box-shadow: none; }

/* ---------- v06: відкладені зміни в шапці гри ---------- */
.gdelta { font-family: var(--font-accent); font-weight: 600; letter-spacing: .5px; font-size: .92em; }
.gdelta--neg { color: var(--c-orange-hi); }
.gdelta--pos { color: #9CC27A; }
.gtip { max-width: calc(380 * var(--u)); }

/* ---------- v06: опис підробки ---------- */
.gmodal__note { display: flex; flex-direction: column; gap: calc(6 * var(--u)); }
.gmodal__note-label { display: flex; justify-content: space-between; color: var(--c-muted); font-size: calc(13 * var(--u)); }
.gmodal__note-count { color: var(--c-dim); font-size: calc(12 * var(--u)); }
.gmodal__textarea { height: auto; padding-block: calc(10 * var(--u)); resize: vertical; line-height: 1.45; font-family: var(--font-ui); }

@media (max-width: 1199px), (max-height: 639px) {
  :root { --u: 1px; }
  @media (orientation: portrait) { :root { --sign-size: max(170vw, 80vh); } }

  .screen {
    gap: 16px;
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(92px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }
  .logo-wrap { height: auto; padding: 12px 0 4px; }
  .logo { font-size: clamp(40px, 11vw, 68px); }
  .logo-wrap--xl { height: auto; }
  .logo--xl { font-size: clamp(56px, 17vw, 120px); }

  .screen__body { padding-block: 8px 0; }
  .screen__body--center { padding-bottom: 0; gap: 16px; }
  .screen--lobby .screen__body { justify-content: center; }
  .menu { gap: 16px; }

  .btn--accent, .btn--ghost, .btn--wide { width: 100%; max-width: 485px; height: 52px; font-size: 16px; }
  .btn--block { max-width: none; height: auto; min-height: 48px; }
  .btn--corner { min-height: 44px; min-width: 88px; padding: 10px 18px; }
  .btn--primary { width: 100%; max-width: 260px; height: 52px; }

  .panel { width: 100%; max-width: 480px; padding: 24px 20px; gap: 20px; }
  .panel--custom { max-width: 560px; gap: 16px; }
  .screen--custom .screen__body { justify-content: flex-start; }
  .cgrid { gap: 14px 12px; }
  .cfield__input { height: 44px; font-size: 16px; }
  .cfield__textarea { min-height: 84px; }
  .gtip { max-width: min(380px, calc(100vw - 32px)); }
  .panel__title { font-size: 22px; }

  .slider__input { height: 36px; }
  .switch { width: 52px; height: 30px; }
  .switch__knob { width: 22px; height: 22px; }
  .switch[aria-checked="true"] .switch__knob { transform: translateX(22px); }
  .select__btn { height: 44px; }
  .select__option { padding-block: 12px; }

  .code { gap: 6px; }
  .code__cell { width: min(52px, calc((100vw - 32px - 40px - 5 * 6px - 24px) / 6)); height: 60px; font-size: 26px; }

  /* нижня панель — суцільна смуга внизу */
  .bottom-bar {
    left: 0; right: 0; bottom: 0;
    padding: 24px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    align-items: center;
    background: linear-gradient(to top, rgba(1, 1, 1, .95) 55%, rgba(1, 1, 1, 0));
  }
  .corner-actions { width: 100%; align-items: center; }
  .chat-mobile-btn { display: inline-flex; margin-right: auto; }

  /* чат: згорнутий не показуємо, відкритий — нижня шторка */
  .chat { display: none; }
  .chat.is-open {
    display: flex; position: fixed; z-index: 52; left: 0; right: 0; bottom: 0; width: auto;
    padding: 16px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    border-width: 1px 0 0; border-radius: 0;
    animation: sheet-in var(--t) var(--ease);
  }
  .chat.is-open .chat__log { height: min(50dvh, 420px); font-size: 14px; }
  .chat__input { height: 40px; font-size: 16px; } /* 16px — щоб iOS не збільшував сторінку */
  .chat .icon-btn { width: 44px; height: 40px; font-size: 20px; }
  .chat .icon-btn--plain { width: 36px; }
  .chat__title { font-size: 14px; }

  /* друзі — нижня шторка */
  .friends {
    left: 0; right: 0; bottom: 0; width: auto; max-height: 78dvh;
    padding: 20px max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    border-width: 1px 0 0; border-radius: 0;
    animation: sheet-in var(--t) var(--ease);
  }
  .friends__title { font-size: 18px; }
  .person { height: 48px; font-size: 15px; }
  .person__btn, .person__status { font-size: 22px; padding: 6px; }
  .icon-btn--plain { width: 40px; height: 40px; font-size: 22px; }

  .screen--loading { padding-top: 18vh; }
  .trefoil { width: 150px; height: 150px; margin-top: 32px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); font-size: 14px; padding: 10px 16px; }
  .tooltip { max-width: 220px; font-size: 13px; }

  /* лобі зі списком гравців */
  .panel--room, .panel--room-wide { width: 100%; max-width: 560px; }
  .room-list--cols { grid-template-columns: minmax(0, 1fr); }
  .slot { height: 44px; }
  .room-list .person { height: 48px; }
  .waiting { font-size: 14px; letter-spacing: 1px; }
  .cta-hint { width: 100%; max-width: 260px; }
  .cta-hint .btn--primary { max-width: none; }

  /* сценарій — у стовпчик */
  .screen--scenario { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .scenario { flex-direction: column; align-items: center; gap: 16px; }
  .scenario__art { flex: none; width: 100%; max-width: 640px; min-height: 0; aspect-ratio: 16 / 9; }
  .scenario__ph-icon { width: 96px; height: 96px; }
  .scenario__info { flex: none; width: 100%; max-width: 640px; }
  .scenario__title { font-size: clamp(28px, 8vw, 40px); }
  .stats { grid-template-columns: minmax(0, 1fr); }

  /* гра */
  .screen--game { overflow-y: auto; gap: 12px; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .ghead { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .ghead__title { font-size: 24px; }
  .ghead__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ghead__stats > div { min-width: 0; }
  .ghead__stats dd { white-space: normal; }
  .gbar { flex-wrap: wrap; gap: 10px; }
  .gbar__status { flex-basis: 100%; font-size: 14px; }
  .gbar__ability { flex: 1; justify-content: flex-start; }
  .btn--sm { height: 44px; }
  .gtable-wrap { flex: none; overflow-x: auto; overflow-y: visible; }
  .gtable { font-size: 13px; min-width: calc(120px + 10 * 132px); }
  .gtable .gt-name { width: 120px; min-width: 120px; max-width: 120px; }
  .gname { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gtags { display: block; }
  .gtags .person__tag:first-child { margin-left: 0; }
  .ghead__stats > div { padding: 6px 10px; }
  .gt-me td { position: static; }
  .gt-me td.gt-name { position: sticky; left: 0; }
  .eye-btn { height: 32px; min-width: 36px; font-size: 18px; }
  .vote { left: 0; right: 0; bottom: 0; transform: none; width: auto; max-width: none; border-width: 1px 0 0;
          padding: 16px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
          animation: sheet-in var(--t) var(--ease); }
  .vote__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vote__opt { height: 44px; }
  .vote__actions { flex-wrap: wrap; }
  .round-banner { width: calc(100vw - 32px); padding: 20px; }
  .round-banner__title { font-size: 34px; }

  /* v05 */
  .gmodal { align-items: flex-end; padding: 0; }
  .gmodal__panel { width: 100%; max-height: 85dvh; border-width: 1px 0 0; border-radius: 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); animation: sheet-in var(--t) var(--ease); }
  .gmodal__opt { padding: 12px; }
  .gmodal__actions .btn--primary { min-width: 0; flex: 1; }
  .gmodal__actions .btn--ghost { flex: 1; }
  .gevents { top: max(12px, env(safe-area-inset-top)); }
  body.vote-open .toast { bottom: auto; top: max(12px, env(safe-area-inset-top)); }
  .gtip { max-width: calc(100vw - 32px); font-size: 13px; }
  .results__title { font-size: clamp(48px, 15vw, 88px); letter-spacing: 2px; }
  .results__sub { font-size: 16px; }
  .results__grid { grid-template-columns: minmax(0, 1fr); }
  .results__score { font-size: 56px; }
  .results__actions .btn { flex: 1 1 140px; }
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }

@media (min-width: 760px) and (max-width: 1199px) { .results__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Низькі ландшафтні екрани (телефон горизонтально) */
@media (max-height: 500px) and (orientation: landscape) {
  .screen { gap: 8px; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .logo-wrap { padding: 4px 0 0; }
  .logo { font-size: 36px; }
  .menu, .screen__body--center { gap: 10px; }
  .btn--accent, .btn--ghost, .btn--wide { height: 44px; }
  .bottom-bar { padding-top: 12px; }
  .screen--loading { padding-top: 6vh; }
  .logo--xl { font-size: 56px; }
  .trefoil { width: 110px; height: 110px; margin-top: 16px; }
}

/* Менше руху для тих, хто так налаштував систему */
@media (prefers-reduced-motion: reduce) {
  .bg__pulse, .bg__pulse img { animation: none; }
  .trefoil__blade, .trefoil__core { animation-duration: 3s; }
  .btn--primary::before, .btn--primary::after { animation: none !important; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}

/* v07: довгі назви й описи власного сценарію не вилазять за межі */
#sc-name, #sc-desc, #sc-ph-text, #g-cat, #r-title, #r-sub, #room-custom-name, .cfield__input { overflow-wrap: anywhere; }
#sc-ph-text { max-width: 90%; text-align: center; }

/* =========================================================================
   v10: НАЛАШТУВАННЯ (шестерня в правому верхньому куті)
   ========================================================================= */
.settings-btn {
  position: fixed; z-index: 95;
  top: calc(28 * var(--u)); right: calc(64 * var(--u));
  width: calc(48 * var(--u)); height: calc(48 * var(--u));
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  background: var(--c-corner); border: 1px solid var(--c-line); border-radius: 2px;
  color: var(--c-muted); font-size: calc(26 * var(--u)); cursor: pointer;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.settings-btn .icon { transition: transform 600ms var(--ease); }
.settings-btn[aria-expanded="true"] { border-color: var(--c-orange); color: var(--c-orange); }
.settings-btn[aria-expanded="true"] .icon { transform: rotate(90deg); }
@media (hover: hover) {
  .settings-btn:hover { border-color: var(--c-text); color: var(--c-white); }
  .settings-btn:hover .icon { transform: rotate(45deg); }
}
body[data-screen="loading"] .settings-btn { opacity: .6; }

.settings {
  position: fixed; z-index: 96;
  top: calc(28 * var(--u) + 48 * var(--u) + 10 * var(--u)); right: calc(64 * var(--u));
  width: calc(360 * var(--u)); max-height: calc(100vh - 120 * var(--u)); overflow-y: auto;
  display: flex; flex-direction: column; gap: calc(18 * var(--u));
  padding: calc(20 * var(--u));
  background: var(--c-panel); border: 1px solid var(--c-line-soft); border-radius: 2px;
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, .7);
  scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.settings__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: calc(12 * var(--u)); border-bottom: 1px solid var(--c-line-title); }
.settings__title { margin: 0; font-family: var(--font-accent); font-weight: 600; font-size: calc(18 * var(--u)); letter-spacing: 1px; text-transform: uppercase; }
.settings__group { display: flex; flex-direction: column; gap: calc(10 * var(--u)); padding-bottom: calc(16 * var(--u)); border-bottom: 1px solid var(--c-line-soft); }
.settings__group:last-child { border-bottom: 0; padding-bottom: 0; }
.settings__label { font-family: var(--font-accent); font-size: calc(14 * var(--u)); letter-spacing: 1px; text-transform: uppercase; color: var(--c-text); }
.settings__label--sub { color: var(--c-muted); font-size: calc(12 * var(--u)); }
.settings__value { font-family: var(--font-accent); font-weight: 600; font-size: calc(15 * var(--u)); color: var(--c-orange-lite); white-space: nowrap; }
.settings__value--text { font-family: var(--font-ui); font-weight: 500; font-size: calc(13 * var(--u)); }
.settings .slider__input { width: 100%; }
.settings .slider__input::-webkit-slider-runnable-track { background: linear-gradient(90deg, rgba(255, 85, 0, .55) var(--fill, 0%), var(--c-track) var(--fill, 0%)); }
.settings .slider__input::-moz-range-progress { height: calc(6 * var(--u)); background: rgba(255, 85, 0, .55); border-radius: calc(3 * var(--u)); }
.settings .slider__input:disabled { opacity: .35; cursor: default; }
.settings__ticks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: calc(-4 * var(--u)); }
.settings__ticks span { font-size: calc(10.5 * var(--u)); line-height: 1.25; color: var(--c-dim); text-align: center; cursor: pointer; transition: color var(--t) var(--ease); }
.settings__ticks span:first-child { text-align: left; }
.settings__ticks span:last-child { text-align: right; }
.settings__ticks span.is-on { color: var(--c-orange-lite); }
.settings.is-sfx-off #set-sfx-out { color: var(--c-dim); }

/* сегментний перемикач мови */
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--c-line); border-radius: 2px; overflow: hidden; }
.seg__btn {
  padding: calc(9 * var(--u)) 0; background: var(--c-field); border: 0; cursor: pointer;
  font-family: var(--font-accent); font-weight: 600; font-size: calc(14 * var(--u)); letter-spacing: 2px; color: var(--c-muted);
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.seg__btn + .seg__btn { border-left: 1px solid var(--c-line); }
.seg__btn.is-on { background: rgba(255, 85, 0, .16); color: var(--c-orange-lite); }
@media (hover: hover) { .seg__btn:not(.is-on):hover { color: var(--c-white); } }

/* ігровий екран: шапка не залазить під шестерню */
.screen--game .ghead { margin-right: calc(64 * var(--u)); width: calc(100% - 64 * var(--u)); }

@media (max-width: 1199px), (max-height: 639px) {
  .settings-btn { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 44px; height: 44px; font-size: 24px; }
  .settings {
    top: calc(max(12px, env(safe-area-inset-top)) + 52px); right: max(12px, env(safe-area-inset-right)); left: auto;
    width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 80px); gap: 16px; padding: 16px;
  }
  .settings__title { font-size: 18px; }
  .settings__label { font-size: 14px; }
  .settings__label--sub { font-size: 12px; }
  .settings__value { font-size: 15px; }
  .settings__value--text { font-size: 13px; }
  .settings__ticks span { font-size: 11px; }
  .seg__btn { padding: 11px 0; font-size: 14px; }
  .settings .slider__input { height: 36px; }
  .screen--game .ghead { margin-right: 0; width: 100%; }
  body[data-screen="game"] .screen--game { padding-top: calc(max(12px, env(safe-area-inset-top)) + 52px); }
}
.settings__group .slider__input + .toggle-row { margin-top: calc(6 * var(--u)); }
.ghead__stats dd.is-warn { color: var(--c-orange-hi); }
/* v11: сім показників у шапці гри — компактніше, щоб не переносились */
.ghead { gap: calc(20 * var(--u)); }
.ghead__info { flex: 1 1 auto; min-width: 0; }
.ghead__stats { flex: 0 1 auto; gap: calc(6 * var(--u)); }
.ghead__stats > div { min-width: calc(96 * var(--u)); padding: calc(8 * var(--u)) calc(11 * var(--u)); }

/* =========================================================================
   Онлайн (етап 1): банер зв'язку, вікно ніка, debug у налаштуваннях
   ========================================================================= */
.netbar {
  position: fixed; z-index: 120; left: 50%; top: calc(28 * var(--u));
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; max-width: calc(100vw - 32px);
  background: var(--c-panel); border: 1px solid var(--c-orange); border-radius: 2px;
  color: var(--c-text-hi); font-size: 14px; line-height: 1.3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
}
.netbar[hidden] { display: none; }
.netbar__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c-orange); animation: netbar-pulse 1s ease-in-out infinite alternate; }
@keyframes netbar-pulse { from { opacity: .3; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .netbar__dot { animation: none; } }

.nick-form { display: flex; flex-direction: column; gap: calc(12 * var(--u)); width: 100%; }
.nick-form .cfield__input { width: 100%; }

.debug-login { display: flex; gap: 8px; align-items: stretch; }
.debug-login[hidden], .debug-on[hidden] { display: none; }
.debug-login__input { flex: 1; min-width: 0; }
.debug-on { display: flex; flex-direction: column; gap: calc(10 * var(--u)); }
.debug-on__actions { display: flex; flex-wrap: wrap; gap: 8px; }

#nick-btn span { text-transform: none; }
.person--offline .person__name { opacity: .55; }

/* =========================================================================
   Онлайн (етап 2): офлайн-гравці в таблиці, таймер у вікні, звіт про проблему
   ========================================================================= */
.person__tag--off { color: #C98A3A; border-color: rgba(201, 138, 58, .45); }
tr.is-offline .gname { opacity: .6; }
.gmodal__timer { margin-left: 8px; font-family: var(--font-accent); color: var(--c-orange-lite); font-size: .8em; }
.gmodal__timer[hidden] { display: none; }
.gbar__ability--debug[hidden] { display: none; }
.report-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.report-form__text { width: 100%; min-height: 64px; resize: vertical; font-family: inherit; }
.screen--game .bottom-bar .chat { margin-right: auto; }
.gmodal__panel.is-static { animation: none; }
/* чат на екрані гри: у згорнутому стані — лише останнє повідомлення, щоб не накривати таблицю */
.screen--game .chat:not(.is-open) .chat__log { height: calc(16 * var(--u)); }
.screen--game .chat:not(.is-open) .chat__msg:nth-last-child(n+2) { display: none; }
@media (min-width: 1200px) and (min-height: 640px) {
  /* місце під згорнутий чат унизу ліворуч */
  .screen--game, body.vote-open .screen--game { padding-bottom: calc(64 * var(--u) + 100 * var(--u)); }
}

/* =========================================================================
   Етап 3: акаунт і друзі, рекламні місця
   ========================================================================= */
.acc-badge { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; margin-left: 6px; padding: 0 .35em; border-radius: 999px; background: var(--c-orange); color: var(--c-black); font-size: .8em; line-height: 1; }
.acc-form .cfield__input { width: 100%; }
.acc-form a { color: var(--c-orange); }
.acc-panel { display: flex; flex-direction: column; gap: calc(12 * var(--u)); width: 100%; }
.acc-panel strong { color: var(--c-white); }
.acc-add { display: flex; gap: 8px; }
.acc-add .cfield__input { flex: 1; min-width: 0; }
.acc-body { max-height: min(46vh, 420px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.acc-sec { margin: 8px 0 2px; font-family: var(--font-accent); font-weight: 500; font-size: calc(13 * var(--u)); letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.acc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-field); }
.acc-row__name { display: flex; flex-direction: column; min-width: 0; color: var(--c-white); overflow-wrap: anywhere; }
.acc-row__name small { color: var(--c-muted); font-size: .8em; }
.acc-row__btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.acc-row__btns .btn { width: auto; min-width: 0; padding-inline: 12px; }
.acc-foot { flex-wrap: wrap; align-items: center; }
.acc-foot .btn--ghost { width: auto; min-width: 0; padding-inline: 10px; white-space: nowrap; border-color: transparent; background: transparent; color: var(--c-muted); }
.acc-foot .btn--ghost:hover { color: var(--c-white); }
.acc-foot [data-cancel] { margin-left: auto; }
.acc-confirm { z-index: 1000; }
.person__add { margin-left: auto; margin-right: 6px; padding: 2px 8px; border: 1px solid var(--c-line); border-radius: 999px; background: transparent; color: var(--c-muted); font: inherit; font-size: .75em; cursor: pointer; }
.person__add:hover, .person__add:focus-visible { color: var(--c-white); border-color: var(--c-orange); }
#room-friends[hidden] { display: none; }

/* Рекламні місця (лише меню й лобі; у лобі 18+ — приховано). Порожні, поки реклама вимкнена в data.js → ads. */
.ad-slot { display: none; }
body.ads-on .ad-slot:not([hidden]) { display: block; width: min(100%, 728px); min-height: 90px; margin: 12px auto 0; }
@media (max-width: 767px) { body.ads-on .ad-slot:not([hidden]) { width: min(100%, 320px); min-height: 50px; } }
.menu-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 0; font-size: calc(14 * var(--u)); }
.menu-links a { color: var(--c-muted); text-decoration: none; }
.menu-links a:hover, .menu-links a:focus-visible { color: var(--c-white); }

/* =========================================================================
   Фентезі: перемикач режиму в лобі, закон світу на екрані сценарію
   ========================================================================= */
.field--mode { gap: calc(6 * var(--u)); }
.seg { display: inline-flex; flex: none; border: 1px solid var(--c-line); border-radius: 2px; background: var(--c-field); }
.seg__btn {
  padding: calc(6 * var(--u)) calc(14 * var(--u)); border: 0; background: transparent; cursor: pointer;
  color: var(--c-muted); font-family: var(--font-ui); font-size: calc(14 * var(--u)); line-height: 1.2;
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.seg__btn + .seg__btn { border-left: 1px solid var(--c-line); }
.seg__btn[aria-checked="true"] { color: var(--c-white); background: rgba(255, 85, 0, .16); box-shadow: inset 0 0 0 1px var(--c-orange); }
@media (hover: hover) { .seg__btn[aria-checked="false"]:hover { color: var(--c-white); } }
.seg__btn:focus-visible { outline: 1px solid var(--c-orange); outline-offset: 1px; }
.scenario__law { margin: calc(10 * var(--u)) 0 0; padding: calc(10 * var(--u)) calc(12 * var(--u)); border-left: 2px solid var(--c-orange); background: rgba(255, 85, 0, .06); color: var(--c-text); font-size: calc(14 * var(--u)); line-height: 1.45; }
.scenario__law strong { color: var(--c-orange-lite); font-weight: 600; }
.stat__traits { color: var(--c-orange-lite) !important; }
@media (max-width: 1199px), (max-height: 639px) {
  .seg__btn { padding: 6px 12px; font-size: 14px; }
  .scenario__law { font-size: 14px; padding: 8px 10px; margin-top: 8px; }
}
/* фентезі: на заглушці ілюстрації немає знака радіації; на телефоні перемикач режиму — під підписом */
body[data-mode="fantasy"] .scenario__ph-icon { display: none; }
@media (max-width: 1199px), (max-height: 639px) {
  .field--mode .toggle-row { flex-wrap: wrap; }
}

/* =========================================================================
   Режим «Диверсант»: картка ролі, позначки, шви, шепіт у чаті, «Пропустити»
   ========================================================================= */
.scenario__role { margin: calc(10 * var(--u)) 0 0; padding: calc(10 * var(--u)) calc(12 * var(--u)); border-left: 2px solid var(--c-muted); background: rgba(255, 255, 255, .04); color: var(--c-text); font-size: calc(14 * var(--u)); line-height: 1.45; }
.scenario__role strong { color: var(--c-white); }
.scenario__role--sab { border-left-color: #D0302A; background: rgba(208, 48, 42, .10); }
.scenario__role--sab strong { color: #FF6B5E; }
.person__tag--sab { color: #FF6B5E; border-color: rgba(255, 107, 94, .6); }
td.is-seam { box-shadow: inset 0 0 0 1px rgba(255, 170, 85, .55); }
.gseam { margin-left: calc(6 * var(--u)); color: var(--c-orange-lite); font-size: .9em; }
.chat__msg--whisper { background: rgba(208, 48, 42, .10); border-left: 2px solid #D0302A; padding-left: 6px; }
.chat__whisper { font-size: .75em; text-transform: uppercase; letter-spacing: .5px; color: #FF6B5E; }
.vote__opt--skip { border-style: dashed; color: var(--c-muted-2); }
@media (max-width: 1199px), (max-height: 639px) {
  .scenario__role { font-size: 14px; padding: 8px 10px; margin-top: 8px; }
}

/* debug: статистика партій (settings.js) */
.debug-stats { margin-top: 10px; max-height: 320px; overflow: auto; }
.debug-stats__t { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.debug-stats__t th, .debug-stats__t td { padding: 3px 6px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.debug-stats__t th:first-child, .debug-stats__t td:first-child { text-align: left; }
.debug-stats__t tfoot th { color: var(--accent, #FF6600); }

/* SEO: короткий опис гри на головному меню (видимий текст для пошуку) */
.menu-lead { margin: calc(-8 * var(--u)) auto 0; max-width: calc(420 * var(--u)); padding: 0 calc(16 * var(--u)); text-align: center; color: var(--c-muted); font-size: calc(14 * var(--u)); line-height: 1.5; }

/* Акаунт: око «показати пароль» — пароль видно, поки кнопку утримують */
.cfield__pass { position: relative; display: block; }
.cfield__pass .cfield__input { padding-right: calc(44 * var(--u)); }
.cfield__peek {
  position: absolute; top: 0; right: 0; bottom: 0; width: calc(44 * var(--u));
  display: grid; place-items: center; padding: 0; margin: 0;
  background: transparent; border: 0; color: var(--c-muted); cursor: pointer;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none;
  transition: color var(--t) var(--ease);
}
.cfield__peek .icon { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
@media (hover: hover) { .cfield__peek:hover { color: var(--c-orange); } }
.cfield__peek.is-on { color: var(--c-orange); }
.cfield__peek:focus-visible { outline: 1px solid var(--c-orange); outline-offset: -1px; }

/* Картка характеристики, яку можна відкрити: уся клітинка — як кнопка-око */
.gt-me td.is-openable { cursor: pointer; }
