/* Elysium игровая. Тема «афиша»: чёрный фон, один акцент, прямые углы, крупные заголовки. */

@font-face { font-family: Unbounded; font-weight: 800; font-display: swap; src: url(/fonts/unbounded-cyrillic-800.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; font-weight: 800; font-display: swap; src: url(/fonts/unbounded-latin-800.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 700; font-display: swap; src: url(/fonts/jetbrains-mono-cyrillic-700.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 700; font-display: swap; src: url(/fonts/jetbrains-mono-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-cyrillic-500.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  --a: #c8ff2e;
  --bg: #0d0d0c;
  --s: #181816;
  --l: #30302b;
  --t: #f2f0e6;
  --m: #9c9a8d;
  --bad: #ff6b5e;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: Unbounded, var(--sans);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--t); font: 13px/1.5 var(--sans); }
[hidden] { display: none !important; }
a { color: inherit; }
p { margin: 0; }

.wrap { max-width: 820px; margin: 0 auto; padding: 20px 20px 56px; }

/* ---------- общие кирпичи ---------- */

.d { font-family: var(--display); font-weight: 800; text-transform: uppercase; }
.mono { font-family: var(--mono); font-weight: 700; }
.cap { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--m); }
.muted { color: var(--m); }
.grow { flex: 1; min-width: 0; }
.box { background: var(--s); border: 1px solid var(--l); padding: 12px 14px; }
.lead { font-weight: 500; font-size: 15px; }
.gap { margin-bottom: 14px; }
.cap.head { margin-bottom: 6px; }
.offscreen { position: fixed; left: -999px; top: 0; opacity: 0; }

.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 13px; color: var(--t); text-decoration: none;
  background: transparent; border: 1px solid var(--l); border-radius: 0; padding: 8px 12px; cursor: pointer;
}
button:hover, .btn:hover { border-color: var(--m); }
button:disabled { opacity: .45; cursor: default; }
button:disabled:hover { border-color: var(--l); }
:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }

button.go, .btn.go {
  background: var(--a); color: #0d0d0c; border-color: var(--a);
  font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 13px; padding: 14px 18px;
}
button.go:hover, .btn.go:hover { border-color: var(--t); }
button.go:disabled:hover { border-color: var(--a); }
button.danger:hover { border-color: var(--bad); color: var(--bad); }
button.link { border: 0; padding: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
button.link.muted { color: var(--m); }
button.link:hover { color: var(--a); }

select, input[type=text], input[type=datetime-local] {
  background: var(--bg); color: var(--t); border: 1px solid var(--l); border-radius: 0;
  height: 34px; width: 100%; padding: 0 8px; font: inherit; font-size: 13px;
}
select:hover, input:hover { border-color: var(--m); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1.5; padding: 2px 8px; border: 1px solid var(--l); color: var(--m); white-space: nowrap; background: transparent; }
.on { color: var(--a); border-color: var(--a); }
button.chip { cursor: pointer; }
button.chip.on:hover { border-color: var(--a); }
.chip select { width: auto; height: 20px; padding: 0 2px; border: 0; background: transparent; color: inherit; font-size: 11px; }

.row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--l); min-height: 33px; }
.av { width: 22px; height: 22px; flex: none; background: var(--l); text-align: center; font-size: 12px; line-height: 22px; object-fit: cover; }
.name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- шапка ---------- */

.top { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; min-height: 34px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand .d { font-size: 13px; }
.logo {
  width: 24px; height: 24px; flex: none; background: var(--a);
  -webkit-mask: url(/img/butterfly.png) center / contain no-repeat;
  mask: url(/img/butterfly.png) center / contain no-repeat;
}
.top .me { max-width: 140px; flex: 0 1 auto; }

/* ---------- афиша и лобби ---------- */

.title { font-size: 34px; line-height: 1.05; margin: 6px 0 16px; overflow-wrap: anywhere; }
.title span { display: block; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.st { border-top: 3px solid var(--l); padding-top: 6px; color: var(--m); }
.st.ok { border-color: var(--a); color: var(--t); }

.hero { min-height: 74px; }
.wait { border-style: dashed; display: flex; gap: 14px; align-items: center; }
.wait .icon { width: 24px; height: 24px; color: var(--m); }
.enter { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.enter > div { flex: 1; min-width: 200px; }

/* табло раунда: три блока одной высоты, значения одним шрифтом и размером */
.score { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; border-color: var(--a); }
.score .cell { min-width: 0; }
.score .cell.wide { flex: 1 1 140px; }
.num { font-family: var(--mono); font-weight: 700; font-size: 28px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num.a { color: var(--a); }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.cols .cap { margin-bottom: 4px; }
.cols .cap.sub { margin-top: 18px; }
.note { color: var(--m); margin-top: 8px; }
.foot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 20px; color: var(--m); }

.kick { border: 0; padding: 2px; color: var(--m); }
.kick:hover { color: var(--bad); }

.chat-list { max-height: 320px; overflow-y: auto; }
.msg { align-items: baseline; }
.msg .who { color: var(--m); flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .text { min-width: 0; overflow-wrap: anywhere; }
.msg.sys { color: var(--a); }
.chat-form { display: flex; gap: 8px; margin-top: 8px; }
.chat-form button { height: 34px; padding: 0 12px; }

.list-link { text-decoration: none; }
.list-link:hover .name { color: var(--a); }

/* ---------- пульт ведущего ---------- */

.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
button.mode { display: block; text-align: left; padding: 10px; width: 100%; }
.mode b { display: block; font-weight: 500; }
.mode small { display: block; font-size: 11px; }
.mode.sel { border-color: var(--a); }
.mode.sel small { color: var(--a); }
button.mode.off { color: var(--m); cursor: default; opacity: 1; }
button.mode.off:hover { border-color: var(--l); }

.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.f { display: block; }
.f > span { display: block; color: var(--m); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.server { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.server .hint { flex: 1; min-width: 200px; color: var(--m); }
.manage { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.manage .f { width: 220px; }
.inline { display: flex; gap: 8px; margin-top: 8px; }
.inline input { max-width: 240px; }

/* ---------- сообщения ---------- */

#toasts { position: fixed; left: 0; right: 0; bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 10; padding: 0 16px; }
.toast { background: var(--s); border: 1px solid var(--bad); padding: 10px 14px; max-width: 480px; }
.toast.ok { border-color: var(--a); }

@media (max-width: 640px) {
  .wrap { padding: 16px 16px 48px; }
  .cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .modes, .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top .me, .top > .chip { display: none; }
  .score { gap: 12px 20px; }
  .score button { width: 100%; }
  /* меньше 16px айфон приближает страницу при вводе */
  select, input[type=text], input[type=datetime-local] { font-size: 16px; }
  .chip select { font-size: 12px; }
}

@keyframes breathe { 50% { opacity: .35; } }
@media (prefers-reduced-motion: no-preference) {
  .wait .icon { animation: breathe 2.4s ease-in-out infinite; }
}

/* ---------- главная ---------- */

.steps.how { margin-top: 28px; }
.past { margin-top: 28px; }
.past .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- пульт: мелочи ---------- */
.chips.inner { display: contents; }
.server-main { display: flex; gap: 8px; flex-wrap: wrap; }
.lobby-admin { margin-top: 28px; }
