@font-face {
  font-family: Golos;
  src: url('./golos-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: Golos;
  src: url('./golos-cyrillic.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
  color-scheme: dark;
  --bg: #141311;
  --panel: #1c1a17;
  --deep: #10100f;
  --line: #39342d;
  --text: #f7f2eb;
  --muted: #beb3a6;
  --orange: #ff803f;
  --orange-soft: #ffb389;
  --green: #bed4a1;
  --red: #ffc1af;
  --radius: 16px;
  font-family: Golos, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 290px; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); }
.top-inner, .brand, .channel, .nav, .section-head, .filters, .card-foot, .week, .toolbar, .footer { display: flex; align-items: center; }
.top-inner { min-height: 76px; justify-content: space-between; gap: 16px; }
.brand { gap: 11px; font-size: 19px; line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.brand small { color: var(--muted); font-size: 11px; font-weight: 500; display: block; margin-top: 6px; letter-spacing: .035em; }
.brand-mark {
  width: 32px;
  height: 34px;
  background: conic-gradient(from 13deg at 50% 56%, #f57030 0deg 95deg, #c75927 95deg 165deg, #f68449 165deg 232deg, #ffa36d 232deg 302deg, #ff813f 302deg);
  clip-path: polygon(50% 0, 94% 24%, 94% 75%, 50% 100%, 6% 75%, 6% 24%);
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 5px;
  background: #19201b;
  clip-path: polygon(50% 0, 100% 80%, 0 80%, 50% 0, 50% 13%, 12% 73%, 88% 73%, 50% 13%);
}
.channel { gap: 8px; border: 1px solid var(--line); padding: 9px 13px; border-radius: 8px; min-height: 42px; font-size: 13px; }
.channel:hover, .footer a:hover { color: var(--orange); }
.channel span, .footer a span { color: var(--orange); }
.demo { display: flex; gap: 16px; align-items: center; padding: 13px 0 0; color: var(--muted); font-size: 12px; }
.demo a { text-decoration: underline; text-underline-offset: 3px; }
.demo a[aria-current] { color: var(--orange-soft); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 5vw, 58px);
  margin: 28px 0 18px;
  background: #0c0b09 url('./d20.webp') no-repeat calc(100% + 15px) 57% / auto 178%;
  border: 1px solid #403024;
  border-radius: 20px;
}
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #10100fea 1%, #10100f 23%, #10100fec 36%, #10100f30 66%, transparent); }
.hero p { text-transform: uppercase; letter-spacing: .15em; color: var(--orange-soft); font-size: 11px; font-weight: 750; margin-bottom: 14px; }
.hero h1 { font-size: clamp(44px, 7.7vw, 88px); font-weight: 835; line-height: .94; letter-spacing: -.052em; }
.hero h1 span { color: var(--orange); }
.hero-address { font-size: 13px; margin-top: 21px; color: #e0d4c7; }
.hero-address span { color: var(--orange); font-size: 18px; vertical-align: middle; margin-right: 3px; }
.nav { gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; scrollbar-width: thin; }
.nav a { min-height: 51px; padding: 13px 16px 12px; white-space: nowrap; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 650; color: var(--muted); }
.nav a:hover, .nav [aria-current] { color: var(--text); }
.nav [aria-current] { border-color: var(--orange); }
.count { margin-left: 4px; font-size: 11px; background: #3b2b20; color: var(--orange-soft); border-radius: 9px; padding: 2px 6px; }
.section-head { justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 15px; }
h2 { font-size: clamp(23px, 3.5vw, 34px); font-weight: 775; letter-spacing: -.035em; }
.section-note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.filters { gap: 8px; flex-wrap: wrap; margin-bottom: 23px; }
.filter, .secondary, .icon, select, input, textarea {
  border: 1px solid var(--line);
  background: var(--deep);
  color: var(--text);
  border-radius: 9px;
  min-height: 42px;
  padding: 8px 12px;
}
.filter { font-size: 13px; color: var(--muted); }
.filter[aria-pressed='true'] { background: #36261d; border-color: #825034; color: #ffbe98; }
.filter:hover, .secondary:hover, .icon:hover { border-color: var(--orange); }
select { padding-right: 23px; max-width: 100%; }
.date-label { color: var(--muted); font-weight: 650; font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.date-label::after { content: ''; background: var(--line); width: 100%; height: 1px; }
.date-label span { flex: 0 0 auto; }
.day + .day { margin-top: 27px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; }
.game-art {
  width: 56px;
  height: 56px;
  border: 1px solid #66503a;
  border-radius: 9px;
  background: #422619 url('./d20.webp') 86% 44% / 140px auto;
  object-fit: cover;
}
.game-art.cool { filter: hue-rotate(26deg) saturate(.55); }
.status-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; }
.pill { color: var(--green); border-radius: 5px; background: #293222; padding: 3px 6px; font-weight: 640; font-size: 10px; line-height: 1.2; }
.pill.closed, .pill.draft, .pill.started, .pill.full { background: #37312b; color: #d7cabe; }
.pill.beginner { background: #422c1e; color: #ffbd95; }
.pill.cancelled { background: #482824; color: var(--red); }
.card h3 { font-size: clamp(17px, 2.5vw, 22px); line-height: 1.15; font-weight: 760; letter-spacing: -.035em; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 5px; overflow-wrap: anywhere; }
.info { display: flex; align-items: start; gap: 10px 18px; flex-wrap: wrap; font-size: 13px; margin-top: 14px; color: #e4d7cb; }
.info strong { font-weight: 700; }
.card details { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card summary { cursor: pointer; padding: 4px 0; width: fit-content; }
.card details p { padding-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-foot { gap: 10px; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.seats { font-size: 12px; color: var(--muted); }
.seats strong { color: var(--text); }
.seat-dots { display: flex; gap: 4px; margin-bottom: 5px; }
.seat-dots i { width: 10px; height: 4px; border-radius: 2px; background: #51493f; }
.seat-dots i.taken { background: var(--orange); }
.action, .secondary { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 42px; font-size: 13px; font-weight: 680; }
.action { background: var(--orange); color: #231307; padding: 8px 15px; border: 1px solid transparent; border-radius: 9px; }
.action:hover { background: #ff9a61; }
.action:disabled, button:disabled { opacity: .63; cursor: default; }
.secondary.danger { color: var(--red); border-color: #75423a; }
.empty { padding: 27px 19px; border: 1px dashed #504437; border-radius: var(--radius); color: var(--muted); line-height: 1.55; }
.empty a, .text-link { color: var(--orange-soft); text-decoration: underline; text-underline-offset: 3px; }
.notice { padding: 12px 15px; margin-bottom: 16px; background: #2b3424; color: #e0edcd; border-radius: 9px; font-size: 13px; }
.notice.error { background: #472823; color: #ffccbc; }
.footer { min-height: 90px; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-top: 33px; border-top: 1px solid var(--line); }
.footer > span { color: var(--text); font-weight: 740; }

.admin-head { margin: 29px 0 20px; }
.admin-title { font-size: clamp(35px, 5.5vw, 59px); letter-spacing: -.07em; font-weight: 880; }
.admin-grid { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.admin-grid > .panel { min-width: 0; }
.panel { padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.week { gap: 6px; justify-content: space-between; margin-bottom: 13px; font-weight: 670; font-size: 14px; }
.icon { min-width: 42px; padding: 3px 10px; font-weight: 730; font-size: 18px; }
.admin-grid .filters { margin-bottom: 13px; }
.admin-list { display: grid; gap: 7px; }
.admin-list .game-row {
  border: 1px solid var(--line);
  background: #151412;
  color: var(--text);
  border-radius: 9px;
  min-height: 68px;
  padding: 9px 11px;
  text-align: left;
  display: grid;
  align-content: center;
  gap: 4px;
}
.game-row:hover, .game-row[aria-pressed='true'] { border-color: var(--orange); }
.game-row b { overflow-wrap: anywhere; font-size: 14px; }
.game-row small { color: var(--muted); line-height: 1.4; }
.group { border: 0; padding: 0; margin: 15px 0 0; min-width: 0; }
.group legend { font-weight: 720; font-size: 14px; margin-bottom: 8px; padding: 0; }
.form-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 5px; font-size: 12px; color: var(--muted); min-width: 0; align-content: start; }
.field > input, .field > select, .field > textarea { width: 100%; font-size: 14px; min-width: 0; max-width: 100%; }
.field textarea { resize: vertical; }
.wide { grid-column: 1 / -1; }
.checks { margin-top: 12px; display: flex; gap: 9px 17px; flex-wrap: wrap; }
.checks label { display: flex; gap: 7px; align-items: center; font-size: 13px; }
.checks input { min-height: auto; padding: 0; accent-color: var(--orange); width: 17px; height: 17px; }
.toolbar { margin-top: 17px; gap: 8px; flex-wrap: wrap; }
.cover-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.cover-row img { width: 62px; height: 44px; border-radius: 6px; object-fit: cover; }
.roster { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.roster h3 { font-size: 15px; letter-spacing: -.015em; }
.roster ul { margin-top: 6px; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
dialog { width: min(92vw, 510px); max-height: 91dvh; border: 1px solid #655142; background: var(--panel); color: var(--text); padding: 19px; border-radius: var(--radius); }
dialog::backdrop { background: #080706d9; }
.dialog-body > .card { margin-top: 12px; }
.dialog-body > p { line-height: 1.5; color: var(--muted); margin-top: 9px; font-size: 14px; }
@media (max-width: 730px) {
  .wrap { width: calc(100% - 32px); }
  .cards, .admin-grid { grid-template-columns: 1fr; }
  .top-inner { min-height: 66px; }
  .hero { margin-top: 18px; border-radius: 15px; }
  .nav { margin-bottom: 19px; }
  .footer { min-height: 68px; margin-top: 24px; }
}
@media (max-width: 460px) {
  .hero { background-position: calc(100% + 50px) 53%; background-size: auto 148%; }
  .hero::before { background: linear-gradient(90deg,#10100fec,#10100fd4 38%,#10100f75 66%,transparent); }
  .hero p { font-size: 9px; margin-bottom: 12px; }
  .hero-address, .channel { font-size: 11px; }
  .channel { padding-inline: 8px; }
  .hero h1 { font-size: clamp(35px, 11vw, 48px); }
  .nav a { font-size: 12px; padding-inline: 10px; }
  .card { padding: 14px; }
  .game-art { width: 48px; height: 48px; }
  .card-main { gap: 10px; }
  .panel { padding: 13px; }
  .form-grid { gap: 8px; }
  .date-field { grid-column: 1 / -1; }
}
