:root {
    color-scheme: dark;
    --background: #0e151b;
    --panel: #151f28;
    --line: #34424c;
    --text: #fff0d4;
    --muted: #c7c4b9;
    --gold: #e5ba70;
    --ink: #191007;
    font: 16px/1.55 system-ui, sans-serif;
    color: var(--text);
    background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #bedaf2; outline-offset: 4px; }
.wrap { width: min(100% - 48px, 1140px); margin-inline: auto; }
.header { border-bottom: 1px solid var(--line); background: #10171d; }
.header-inner, .footer-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.header nav, .language { display: flex; gap: 16px; align-items: center; }
.header a, .footer a { text-decoration: none; }
.header nav a, .language a, .footer a { display: inline-flex; align-items: center; min-height: 44px; }
.header a:hover, .footer a:hover { color: var(--gold); }
.brand { font-weight: 850; font-size: 20px; letter-spacing: .045em; white-space: nowrap; }
.brand strong, .language [aria-current] { color: var(--gold); }
.language { margin-inline-start: auto; color: var(--muted); font-size: 14px; gap: 12px; }
.language a { justify-content: center; min-width: 36px; }

.hero { position: relative; display: grid; isolation: isolate; align-items: end; min-height: clamp(430px, 53vw, 660px); }
.hero picture, .hero::after { position: absolute; inset: 0; z-index: -1; }
.hero picture img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 46%; }
.hero::after { content: ""; background: linear-gradient(0deg, #0e151b, transparent 52%), linear-gradient(90deg, #0e151bf5, #0e151bd9 23%, #0e151b45 58%, transparent 86%); }
.hero-content { padding-block: 112px 64px; }
h1, h2, h3, p { margin: 0; }
.hero h1 { max-width: 680px; font: 700 clamp(3rem, 7vw, 6.5rem)/.98 Georgia, serif; letter-spacing: -.052em; text-wrap: balance; }
.hero h1 span { display: block; color: var(--gold); font-size: .4em; letter-spacing: -.025em; line-height: 1.25; margin-block-start: .45em; }
.hero p { max-width: 38ch; margin-block: 24px; color: #f1e9d9; font-size: clamp(1rem, 2vw, 1.2rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; text-decoration: none; font-weight: 720; padding: 10px 20px; border: 1px solid transparent; border-radius: 5px; }
button.button { font: inherit; font-weight: 720; cursor: pointer; }
button.button:disabled { cursor: progress; opacity: .75; }
.hero p.create-status { margin: 10px 0 0; font-size: 1rem; }
.hero p.create-status:empty { display: none; }
.primary { color: var(--ink); background: var(--gold); }
.primary:hover { background: #f7ce87; }
.secondary { color: var(--text); background: #111b23c9; border-color: #637381; }
.secondary:hover { background: #263541; }

.content { padding-block: 10px 56px; display: grid; gap: 16px; }
.section, .rooms-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: clamp(18px, 4vw, 34px); }
.section { scroll-margin-top: 18px; }
.section h2, .rooms-panel h1 { font: 700 clamp(1.5rem, 3.8vw, 2.2rem)/1.15 Georgia, serif; }
.section p, .rooms-panel p { margin-top: 8px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 22px 0; padding: 0; }
.steps li { padding: 18px; border-left: 3px solid var(--gold); background: #10191f; border-radius: 4px; }
.steps h3 { font-size: 1.1rem; }
.dota { max-width: 77ch; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-inner { flex-wrap: wrap; }
.room-page { width: min(100% - 48px, 780px); margin: 54px auto; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 10px; text-decoration: none; color: var(--gold); }
.rooms-panel .button { margin-top: 20px; }

@media (max-width: 620px) {
    .wrap { width: calc(100% - 32px); }
    .header-inner { gap: 8px 15px; flex-wrap: wrap; padding: 4px 0; }
    .header nav, .language { gap: 12px; font-size: 13px; }
    .language a { min-width: 30px; }
    .hero { min-height: clamp(430px, 132vw, 610px); }
    .hero picture img { object-position: center 22%; }
    .hero::after { background: linear-gradient(0deg, #0e151b 5%, #0e151bf0 22%, #0e151b66 58%, transparent 82%); }
    .hero-content { padding-block: 122px 32px; }
    .hero p { margin-block: 15px 20px; }
    .actions { gap: 8px; }
    .button { padding-inline: 12px; }
    .steps { grid-template-columns: 1fr; gap: 10px; }
    .footer-inner { gap: 0 16px; }
}

@media (max-width: 355px) {
    .header nav { order: 3; flex-basis: 100%; }
}
.room-actions { margin-top: 16px; }
.room-actions .button { margin-top: 0; cursor: pointer; font: inherit; font-weight: 720; }
.room-actions [hidden], .room-list[hidden] { display: none; }
.room-list { padding: 0; list-style: none; }
.room-list a { display: flex; min-height: 48px; align-items: center; color: var(--gold); }
.room-download { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); }
.room-setup { margin-top: 20px; scroll-margin-top: 16px; }
.room-setup summary { cursor: pointer; }
.room-setup summary::-webkit-details-marker { display: none; }
.room-setup[open] summary { display: none; }
.room-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 0; padding: 0; border: 0; }
.room-fields label { display: grid; gap: 4px; color: var(--muted); font-weight: 600; }
.room-fields input, .room-fields select { width: 100%; min-width: 0; min-height: 48px; padding: 8px 11px; color: var(--text); background: #10191f; border: 1px solid #637381; border-radius: 5px; font: inherit; }
.room-fields :focus-visible, .room-setup summary:focus-visible { outline: 2px solid #bedaf2; outline-offset: 2px; }
#room-form-status:empty { display: none; }
@media (max-width: 480px) {
    .room-page { width: calc(100% - 32px); margin-block: 24px; }
    .room-fields { grid-template-columns: 1fr; gap: 10px; }
}
#qr-panel:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 18px; }
#room-qr-image { width: min(208px, 100%, 65vh); height: auto; image-rendering: pixelated; }
#qr-panel p { max-width: 30ch; }
#qr-panel .button { cursor: pointer; font: inherit; }
#qr-panel [hidden] { display: none; }

.quick-match {margin:1rem 0;padding:1rem;border:1px solid #917448;border-radius:10px;background:linear-gradient(100deg,#202838,#101924);color:#fff4df}
.quick-match h2,.quick-match p {margin:0 0 .55rem}
.quick-match [role=status]:empty {display:none}
.quick-actions,.quick-formats {display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.quick-actions {justify-content:space-between}
.quick-formats button {min-height:44px;padding:0 1rem;border-radius:6px;border:1px solid #546072;background:#182232;color:#eee;font:inherit;cursor:pointer}
.quick-formats button[aria-pressed=true] {color:#211708;border-color:#f0cc8f;background:#e4bd78;font-weight:bold}
