/* MC Interactive Studio — the site's one look: a dark war room, ember light, glass plates.
   No outside fonts or files (the site allows only its own): the headings are Bahnschrift on Windows, a DIN-like
   condensed face, and the nearest thing elsewhere. */
:root {
  color-scheme: dark;
  --bg: #07080b;
  --ink: #f1eee8;
  --ink-2: #c9c4bb;
  --muted: #8a8780;
  --faint: #5d5b57;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --plate: rgba(18, 20, 27, .72);
  --plate-2: rgba(26, 29, 38, .82);
  --well: rgba(0, 0, 0, .38);
  --ember: #ff7a1f;
  --ember-2: #ffb547;
  --fire: linear-gradient(135deg, #ffcf6b 0%, #ff7a1f 52%, #e2361b 100%);
  --live: #3ddc84;
  --warn: #ffb547;
  --down: #ff5a4a;
  --radius: 14px;
  --head: Bahnschrift, "DIN Alternate", "DIN Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --glow: 0 0 0 1px rgba(255, 122, 31, .5), 0 10px 40px -8px rgba(255, 122, 31, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 15px/1.55 var(--body);
  background:
    radial-gradient(1200px 600px at 78% -10%, rgba(255, 122, 31, .13), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(80, 110, 255, .07), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: var(--ember-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: .01em; margin: 0; line-height: 1.05; }
h1 { font-size: clamp(30px, 4vw, 48px); text-transform: uppercase; }
h2 { font-size: 20px; text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 122, 31, .45); }
.hidden { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.15em; }

/* ---- the animated backdrop (app.js draws it; off when Effects is off) ---- */
.backdrop { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
[data-effects="off"] .backdrop { display: none; }
body::after {
  /* a fine grain over everything, so the dark is not flat */
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- the bar ---- */
.bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  height: 66px; padding: 0 max(20px, calc((100vw - 1320px) / 2));
  background: rgba(7, 8, 11, .62);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none !important; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 0 10px rgba(255, 122, 31, .35)); transition: transform .4s cubic-bezier(.2, .9, .3, 1.4); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-word { font: 600 15px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.brand-word b { color: var(--ink); font-weight: 800; }
.tabs { display: flex; gap: 4px; padding: 4px; margin: 0 auto; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .03); }
.tabs button {
  padding: 8px 15px; border-radius: 999px; white-space: nowrap;
  font: 600 13px var(--head); letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  transition: color .2s, background .2s;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-current="true"] { color: #1a0d04; background: var(--fire); box-shadow: 0 4px 18px -4px rgba(255, 122, 31, .7); }
.bar-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.tabs:not(.hidden) + .bar-end { margin-left: 0; }
.connection { display: inline-flex; align-items: center; gap: 8px; font: 600 12px var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.connection::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.connection.online { color: var(--ink-2); }
.connection.online::before { background: var(--live); animation: ping 2.2s infinite; }
.connection.offline::before { background: var(--down); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } }
.fx-toggle {
  padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  font: 600 11px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.fx-toggle[aria-pressed="true"] { color: var(--ember-2); border-color: rgba(255, 181, 71, .4); }
.fx-toggle:hover { color: var(--ink); }

/* ---- layout ---- */
main { position: relative; z-index: 2; max-width: 1320px; margin: 0 auto; padding: 34px 20px 70px; min-height: calc(100vh - 196px); }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 700 12px var(--head); letter-spacing: .22em; text-transform: uppercase; color: var(--ember-2); }
.note { font-size: 13px; color: var(--muted); }
.panel {
  position: relative; padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)), var(--plate);
  border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
}
.count {
  display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; margin-left: 8px;
  border-radius: 999px; background: rgba(255, 122, 31, .14); color: var(--ember-2);
  font: 700 12px var(--head); letter-spacing: .05em; vertical-align: 3px;
}

/* ---- buttons and fields ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border-radius: 11px;
  font: 700 14px var(--head); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  text-decoration: none !important; transition: transform .18s, box-shadow .25s, background .2s, color .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-fire { color: #1a0d04; background: var(--fire); box-shadow: 0 10px 30px -10px rgba(255, 122, 31, .8), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn-fire:hover { box-shadow: 0 14px 40px -10px rgba(255, 122, 31, 1), inset 0 1px 0 rgba(255, 255, 255, .55); transform: translateY(-1px); }
.btn-fire .ico { transition: transform .2s; }
.btn-fire:hover .ico { transform: translateX(3px); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); }
.btn-ghost:hover { border-color: rgba(255, 181, 71, .55); color: var(--ember-2); }
.btn-quiet { color: var(--muted); }
.btn-quiet:hover { color: var(--down); }
.wide { width: 100%; margin-top: 20px; }
label { display: block; margin: 16px 0 7px; font: 700 11px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
input, select {
  width: 100%; min-height: 46px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--well); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
select {
  appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat;
}
select option { background: #14161c; }
input::placeholder { color: var(--faint); }
input:focus, select:focus { outline: none; border-color: rgba(255, 122, 31, .7); box-shadow: 0 0 0 4px rgba(255, 122, 31, .14); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---- the gate ---- */
.gate { display: grid; place-items: center; min-height: 64vh; }
.gate-card { max-width: 560px; text-align: center; padding: 48px 40px; border: 1px solid var(--line); border-radius: 22px; background: var(--plate); backdrop-filter: blur(16px); box-shadow: 0 40px 100px -40px rgba(255, 122, 31, .35); animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.gate-mark { width: 84px; height: 84px; margin-bottom: 18px; filter: drop-shadow(0 0 24px rgba(255, 122, 31, .5)); }
.gate h1 { margin: 12px 0 14px; font-size: clamp(30px, 5vw, 44px); }
.gate p { color: var(--ink-2); }
.gate .note { margin-top: 12px; color: var(--muted); }

/* ---- the landing page ---- */
.hero { position: relative; display: flex; align-items: center; min-height: min(78vh, 760px); margin: -34px -20px 0; padding: 40px 20px 60px; }
.hero-copy { max-width: 760px; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: ping 2.2s infinite; }
.hero-title {
  margin: 20px 0 22px;
  font: 800 clamp(54px, 9.4vw, 132px)/.86 var(--head); letter-spacing: -.01em; text-transform: uppercase;
  color: var(--ink); text-shadow: 0 10px 60px rgba(0, 0, 0, .6);
}
.hero-title span { background: var(--fire); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 30px rgba(255, 122, 31, .35)); }
.hero-title em { display: block; font-style: normal; background: linear-gradient(180deg, #f6f3ee 0%, #a7a29a 55%, #4d4a46 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.hero-lead { max-width: 520px; font-size: clamp(16px, 1.6vw, 20px); color: var(--ink-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-stats { display: flex; margin: 44px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; width: max-content; max-width: 100%; background: rgba(7, 8, 11, .5); backdrop-filter: blur(10px); }
.hero-stats div { padding: 14px 26px; border-left: 1px solid var(--line); }
.hero-stats div:first-child { border-left: 0; }
.hero-stats dt { font: 700 11px var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.hero-stats dd { margin: 4px 0 0; font: 800 30px/1 var(--head); color: var(--ink); font-variant-numeric: tabular-nums; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.section-head { display: flex; flex-direction: column; gap: 10px; margin: 30px 0 22px; scroll-margin-top: 90px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: .02em; }

.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.game {
  --tilt-x: 0deg; --tilt-y: 0deg;
  position: relative; display: flex; flex-direction: column; min-height: 420px; padding: 0; overflow: hidden; text-align: left;
  border: 1px solid var(--line); border-radius: 18px; background: var(--plate-2);
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform .25s ease-out, box-shadow .3s, border-color .3s;
  animation: rise .8s cubic-bezier(.2, .8, .2, 1) both;
}
.game:nth-child(2) { animation-delay: .08s; }
.game:nth-child(3) { animation-delay: .16s; }
.game:nth-child(4) { animation-delay: .24s; }
button.game:hover, button.game:focus-visible { border-color: rgba(255, 122, 31, .55); box-shadow: var(--glow); }
.game-feature { grid-column: span 2; }
.game-art { position: absolute; inset: 0; display: block; overflow: hidden; background: #0b0d12; }
.game-art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.15) contrast(1.05); transform: scale(1.04); transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
button.game:hover .game-art img { transform: scale(1.12); }
.game-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 8, 11, .1) 0%, rgba(7, 8, 11, .35) 38%, rgba(7, 8, 11, .96) 82%); }
.game-feature .game-art::after { background: linear-gradient(90deg, rgba(7, 8, 11, .96) 18%, rgba(7, 8, 11, .55) 55%, rgba(7, 8, 11, .15)), linear-gradient(0deg, rgba(7, 8, 11, .8), transparent 40%); }
.game-art-doggo { display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #3a2412, #0b0d12 70%); color: var(--ember); }
.game-art-doggo svg { width: 46%; height: 46%; margin-top: -30%; filter: drop-shadow(0 0 40px rgba(255, 122, 31, .55)); transition: transform .6s cubic-bezier(.2, .9, .3, 1.4); }
button.game-doggo:hover .game-art-doggo svg { transform: rotate(-10deg) scale(1.08); }
.game-art-soon { display: grid; place-items: center; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 12px, transparent 12px 24px), #0b0d12; color: var(--faint); font-size: 64px; }
.game-art-soon .ico { margin-top: -30%; }
.game-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding: 24px; }
.game-feature .game-body { max-width: 56%; margin-top: 0; justify-content: flex-end; height: 100%; padding: 34px; }
.game-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(7, 8, 11, .5); font: 700 10px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.tag-hot { border-color: transparent; background: var(--fire); color: #1a0d04; }
.game strong { font: 800 30px/1 var(--head); text-transform: uppercase; letter-spacing: .01em; }
.game-feature strong { font-size: clamp(36px, 4vw, 54px); }
.game-about { font-size: 14px; color: var(--ink-2); }
.game-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.game-now { font: 600 12px var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.game-go { display: inline-flex; align-items: center; gap: 8px; font: 800 14px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--ember-2); }
.game-go .ico { transition: transform .2s; }
button.game:hover .game-go .ico { transform: translateX(4px); }
.game-soon { opacity: .7; grid-column: span 2; min-height: 240px; }
.game-soon strong { color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 60px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .02); }
.steps b { font: 800 30px var(--head); background: var(--fire); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps strong { font: 700 17px var(--head); text-transform: uppercase; letter-spacing: .06em; }
.steps span { font-size: 14px; color: var(--muted); }

/* ---- the lobby ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.page-head h1 { margin-top: 8px; font-size: clamp(40px, 5.4vw, 70px); }
.page-lead { max-width: 440px; color: var(--muted); }
.lobby { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 18px; align-items: start; }
.create h2, .maps-head h2 { margin-bottom: 6px; }
.chosen { display: flex; gap: 14px; align-items: center; margin-top: 20px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--well); }
.chosen img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.chosen div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chosen strong { font: 800 19px var(--head); text-transform: uppercase; }
.chosen span:last-child { font-size: 12px; color: var(--muted); }
.create .note { margin-top: 14px; text-align: center; }
.maps-panel { padding-bottom: 12px; }
.maps-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.maps-head input { max-width: 260px; min-height: 40px; }
.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; max-height: 620px; overflow-y: auto; padding: 2px 6px 12px 2px; scrollbar-width: thin; scrollbar-color: rgba(255, 122, 31, .5) transparent; }
.map-group { grid-column: 1 / -1; margin: 14px 0 0; font: 700 12px var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--ember-2); }
.map-group:first-child { margin-top: 0; }
.map { display: flex; flex-direction: column; gap: 3px; padding: 6px 6px 10px; text-align: left; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .025); transition: border-color .2s, transform .2s, background .2s; }
.map:hover { border-color: var(--line-2); transform: translateY(-2px); background: rgba(255, 255, 255, .05); }
.map img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 7px; margin-bottom: 5px; background: #0b0d12; }
.map strong { padding: 0 4px; font: 700 14px var(--head); text-transform: uppercase; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map span { padding: 0 4px; font-size: 11px; color: var(--muted); }
.map[aria-checked="true"] { border-color: var(--ember); background: rgba(255, 122, 31, .1); box-shadow: 0 0 0 1px var(--ember), 0 8px 26px -10px rgba(255, 122, 31, .7); }
.maps .empty { grid-column: 1 / -1; }
.rooms-head { margin-top: 40px; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.room { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.room div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.room strong { font: 800 19px var(--head); text-transform: uppercase; overflow-wrap: anywhere; }
.room span { font-size: 13px; color: var(--muted); }
.room button { flex: none; min-height: 40px; padding: 0 18px; border-radius: 10px; font: 700 13px var(--head); letter-spacing: .14em; text-transform: uppercase; color: #1a0d04; background: var(--fire); }
.room button:disabled { color: var(--muted); background: rgba(255, 255, 255, .06); }
.empty { padding: 30px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }

/* ---- Grand Theft Doggo's door ---- */
.doggo-page { display: grid; place-items: center; min-height: 60vh; }
.doggo { width: min(480px, 100%); padding: 40px; text-align: center; overflow: hidden; }
.doggo-paw { position: absolute; right: -40px; top: -30px; width: 220px; height: 190px; color: rgba(255, 122, 31, .1); transform: rotate(18deg); }
.doggo h1 { margin: 10px 0 8px; font-size: clamp(34px, 5vw, 48px); }
.doggo .page-lead { margin: 0 auto 8px; }
.doggo label, .doggo input { text-align: left; }
.doggo .note { margin-top: 16px; }

/* ---- the match ---- */
.match-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.match-head h1 { margin-top: 6px; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.waiting { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.room-map { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #0b0d12; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.chips span { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font: 600 12px var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.roster h2 { margin-bottom: 14px; }
.player { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--well); }
.player div { display: flex; flex-direction: column; min-width: 0; }
.player strong { font: 700 16px var(--head); text-transform: uppercase; overflow-wrap: anywhere; }
.player small { font-size: 12px; color: var(--muted); }
.ready, .waiting-status { flex: none; padding: 4px 10px; border-radius: 999px; font: 700 11px var(--head); letter-spacing: .14em; text-transform: uppercase; }
.ready { color: #062612; background: var(--live); box-shadow: 0 0 18px -4px var(--live); }
.waiting-status { color: var(--muted); border: 1px solid var(--line-2); }
.roster .note { margin-top: 12px; }
#readyButton.is-ready { background: linear-gradient(135deg, #8ff0b8, #3ddc84); box-shadow: 0 10px 30px -12px rgba(61, 220, 132, .9); }
#startMatch { margin-top: 10px; }
.ended { max-width: 560px; }
.ended h2 { margin: 8px 0 10px; font-size: 32px; }
.ended p { color: var(--ink-2); margin-bottom: 18px; }

/* Room chat: app.js moves the one box between the waiting room, the play area (a drawer over the map, shown while
   #gameStage has chat-open) and the result. */
.chat { display: flex; flex-direction: column; gap: 10px; }
.chat-log { height: 180px; overflow-y: auto; overflow-wrap: anywhere; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); scrollbar-width: thin; }
.chat-log:empty::before { content: "No messages yet. Say hello."; font-size: 13px; color: var(--faint); }
.chat-line { margin-bottom: 5px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.chat-line strong { color: var(--ember-2); font-family: var(--head); letter-spacing: .04em; }
.chat-line.mine strong { color: var(--live); }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; }
.chat-form .btn { min-height: 46px; padding: 0 18px; }
.waiting .chat { grid-column: 1 / -1; }
#match > .chat { max-width: 560px; margin-top: 16px; }
#gameStage .chat { display: none; position: absolute; left: 10px; bottom: 10px; z-index: 5; width: min(360px, calc(100% - 20px)); padding: 14px; background: rgba(10, 12, 16, .92); }
#gameStage.chat-open .chat { display: flex; }
#gameStage .chat h2 { display: none; }
#gameStage .chat-log { height: 150px; }
.chat-peek {
  position: absolute; left: 10px; top: 40px; z-index: 5;
  max-width: min(420px, calc(100% - 20px)); padding: 7px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 1px solid rgba(255, 122, 31, .4); border-radius: 9px; background: rgba(10, 12, 16, .92); color: var(--ink); font-size: 13px;
}
/* Narrower than this, the game's own controls fill the bottom edge. */
@media (max-width: 1240px) { #gameStage .chat { top: 40px; bottom: auto; } }

/* The play surface is an application, not selectable document text. */
#gameStage, .playing .match-head { -webkit-user-select: none; user-select: none; }
#gameStage { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: 12px; background: #0b0d12; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); }
#gameFrame { display: block; width: 100%; height: calc(100dvh - 112px); min-height: 280px; border: 0; }
.guide { display: flex; align-items: center; justify-content: center; gap: 12px; height: 30px; padding: 0 10px; background: #0d0f14; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 12px; }
.guide span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide button { flex: none; min-height: 22px; padding: 1px 12px; border-radius: 999px; background: rgba(255, 122, 31, .16); color: var(--ember-2); font: 700 11px var(--head); letter-spacing: .14em; text-transform: uppercase; }
.badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--ember); color: #1a0d04; font-size: 11px; }
#gameStage:fullscreen { border: 0; border-radius: 0; }
#gameStage:fullscreen #gameFrame { height: calc(100dvh - 30px); }
.playing .bar, .playing .foot, .playing .backdrop { display: none; }
.playing main { max-width: none; padding: 0 8px; min-height: 0; }
.playing .match-head { align-items: center; margin: 0; padding: 8px 4px; min-height: 56px; }
.playing .match-head h1 { font-size: 18px; }
.playing .match-head .kicker { font-size: 10px; }
.playing .actions .btn { min-height: 34px; padding: 0 12px; font-size: 12px; }

/* ---- footer and toast ---- */
.foot { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 30px; max-width: 1320px; margin: 0 auto; padding: 30px 20px 40px; border-top: 1px solid var(--line); }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand span { display: flex; flex-direction: column; }
.foot-brand b { font: 700 14px var(--head); letter-spacing: .16em; text-transform: uppercase; }
.foot-brand small { font-size: 12px; color: var(--muted); }
.foot-legal { max-width: 640px; font-size: 12px; color: var(--muted); text-align: right; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 20000;
  width: max-content; max-width: 90vw; padding: 13px 20px;
  border: 1px solid rgba(255, 122, 31, .45); border-radius: 12px; background: rgba(14, 16, 21, .94); backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9), 0 0 30px -12px rgba(255, 122, 31, .6);
  font-weight: 600; font-size: 14px;
}

/* ---- narrower screens ---- */
@media (max-width: 1080px) {
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby { grid-template-columns: 1fr; }
  .bar { gap: 14px; }
  .brand-word { display: none; }
}
@media (max-width: 760px) {
  main { padding: 20px 16px 50px; }
  .bar { height: auto; min-height: 60px; flex-wrap: wrap; padding: 8px 16px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs button { flex: 1; padding: 8px 10px; font-size: 11px; }
  .hero { min-height: auto; margin: -20px -16px 0; padding: 40px 16px 40px; }
  .hero-stats { width: 100%; }
  .hero-stats div { flex: 1; padding: 12px 14px; }
  .hero-stats dd { font-size: 24px; }
  .games, .steps, .waiting, .two { grid-template-columns: 1fr; }
  .game-feature, .game-soon { grid-column: auto; }
  .game-feature .game-body { max-width: none; height: auto; margin-top: auto; padding: 24px; }
  .game-feature .game-art::after { background: linear-gradient(180deg, rgba(7, 8, 11, .1) 0%, rgba(7, 8, 11, .96) 80%); }
  .game { min-height: 380px; }
  .page-head, .match-head { flex-direction: column; align-items: flex-start; }
  .maps-head { flex-direction: column; align-items: stretch; }
  .maps-head input { max-width: none; }
  .rooms { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot-legal { text-align: left; }
  .playing .match-head { flex-direction: row; align-items: center; }
  .playing .match-head h1 { max-width: 44vw; font-size: 14px; }
  .playing main { padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
