
:root {
  color-scheme: dark;
  font-family: Inter, Arial, sans-serif;
  --page:#10191d; --chrome:#111a1e; --board:#172329; --line:#3a5055;
  --ink:#f6f2e6; --muted:#bac9c8; --lime:#c6ee67; --gold:#ffdd76; --on-gold:#282009;
  --gutter:40px; --shell-gutter:28px;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; color:var(--ink); background:var(--page); }
a { text-decoration:none; color:inherit; }
button,input { font:inherit; }
button { cursor:pointer; }
button:disabled { opacity:.6; cursor:wait; }
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
p,h1,h2,h3,dd,dl,figure { margin:0; }
p { line-height:1.58; }
img { display:block; max-width:100%; }
.skip { position:absolute; z-index:5; padding:10px 14px; background:var(--gold); color:var(--on-gold); transform:translateY(-110%); }
.skip:focus { transform:none; }
.shell { width:min(1200px,calc(100% - var(--shell-gutter) * 2)); margin-inline:auto; }
.platform-head,.platform-foot { background:var(--chrome); color:#f4f6f7; border:solid #ffffff20; border-width:0; }
.platform-head { position:relative; z-index:2; border-bottom-width:1px; }
.header-inner { height:87px; display:flex; align-items:center; gap:42px; }
.brand { font-size:26px; font-weight:900; letter-spacing:-.8px; white-space:nowrap; }
.brand strong { color:var(--lime); }
.desktop-nav { display:flex; align-self:stretch; gap:32px; }
.desktop-nav a { display:grid; place-items:center; border-bottom:3px solid transparent; color:#c8cdd0; white-space:nowrap; }
.desktop-nav .current { border-color:var(--lime); color:#f4f6f7; }
.locale { margin-left:auto; display:flex; gap:2px; }
.locale > * { display:grid; place-items:center; border-radius:6px; min-width:40px; min-height:44px; font-size:13px; font-weight:750; }
.locale span { background:#adf96f17; color:var(--lime); }
.mobile-nav { display:none; }
.platform-foot { border-top-width:1px; }
.footer-inner { min-height:83px; display:flex; align-items:center; justify-content:space-between; gap:24px; color:#c8cdd0; font-size:14px; }
.footer-inner nav { display:flex; flex-wrap:wrap; gap:8px 24px; }
.platform-foot a:hover,.platform-head a:hover { color:#fff; }

main { width:min(100%,1280px); margin-inline:auto; }
.content { padding-inline:var(--gutter); }
.hero { isolation:isolate; position:relative; overflow:clip; }
.stadium-art { position:absolute; inset:0; z-index:-2; }
.stadium-art img { width:100%; height:100%; object-fit:cover; object-position:64% 44%; }
.hero::after { content:''; position:absolute; inset:0; z-index:-1;
  background:linear-gradient(180deg,var(--chrome),transparent 14%,transparent 75%,var(--page)),
    linear-gradient(90deg,var(--page),#10191d50 20%,#10191d00 64%,var(--page)); }
.hero-layout { display:grid; grid-template-columns:minmax(0,1.09fr) minmax(0,.91fr); grid-template-areas:"intro shot" "play shot";
  align-items:center; align-content:center; gap:26px 45px; min-height:598px; padding-block:54px 50px; }
.intro { grid-area:intro; align-self:end; min-width:0; }
.eyebrow { font:730 13px/1.3 ui-monospace,monospace; letter-spacing:.095em; text-transform:uppercase; color:var(--gold); }
h1 { margin-top:13px; margin-left:-.045em; font-size:clamp(63px,6.9vw,110px); font-weight:900; line-height:.9; letter-spacing:-.064em; }
h1 span,h1 em { display:block; }
h1 em { color:var(--gold); font-size:.77em; margin-top:.13em; font-style:normal; letter-spacing:-.052em; word-spacing:.03em; }
.lead { color:var(--ink); margin-top:21px; max-width:41ch; font-size:clamp(16px,1.7vw,21px); line-height:1.42; }

.match-shot { grid-area:shot; width:min(100%,445px); justify-self:center; position:relative; isolation:isolate; }
.match-shot::before { content:''; position:absolute; z-index:-1; inset:-8px -8px 25px 14px; border-top:2px solid var(--gold); border-right:2px solid var(--gold); }
.match-shot-inner { padding:8px; background:#0c1718; border:1px solid #b6c092; box-shadow:0 16px 42px #010a0cb7; }
.match-shot img { width:100%; height:auto; image-rendering:pixelated; }
.match-shot figcaption { color:#d9e3dd; font-size:12px; margin-top:9px; }

.play { grid-area:play; align-self:start; width:min(100%,510px); border:1px solid #69868a; border-radius:8px; overflow:hidden;
  background:#142226; box-shadow:0 14px 35px #070d12a6; scroll-margin-top:14px; }
.play-heading { padding:13px 14px 8px; display:flex; justify-content:space-between; align-items:center; gap:8px; }
.play-heading h2 { font-size:15px; line-height:1.25; letter-spacing:0; }
.play-heading > span { font-size:12px; color:var(--muted); white-space:nowrap; }
.play-buttons { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:2px 14px 14px; }
.button { background:var(--board); color:var(--ink); min-height:48px; border:1px solid var(--line); border-radius:5px; padding:9px 13px;
  display:inline-flex; align-items:center; justify-content:center; gap:8px; font-size:14px; font-weight:780; text-align:center; }
.button.primary { background:var(--gold); border-color:var(--gold); color:var(--on-gold); }
.button.primary:hover { background:#ffe696; border-color:#ffe696; }
.button.secondary:hover { background:#253a41; border-color:#5d797c; }
.play-icon { width:0; height:0; border:solid transparent; border-width:5px 0 5px 8px; border-left-color:currentColor; }
.installs { display:grid; grid-template-columns:1fr 1fr; border-top:1px solid var(--line); background:#1a2b30; }
.install,.android-status { padding:10px 14px; min-width:0; min-height:59px; text-align:left; display:flex; justify-content:center; flex-direction:column; }
.install { flex-direction:row; align-items:center; justify-content:space-between; gap:7px; background:none; border:0; color:var(--ink); }
.install:hover { background:#263b40; }
.install:focus-visible { outline-offset:-4px; }
.install-arrow { color:var(--gold); font-size:17px; }
.android-status { border-left:1px solid var(--line); }
.installs strong,.installs small { display:block; }
.installs strong { font-size:13px; font-weight:780; }
.installs small { color:var(--muted); margin-top:3px; font-size:12px; }

h2 { font-size:clamp(29px,4vw,44px); letter-spacing:-.052em; line-height:1.04; font-weight:870; }
h3 { font-size:19px; letter-spacing:-.025em; line-height:1.25; }
.multiplayer,.controls { padding-block:37px 44px; border-top:1px solid var(--line); scroll-margin-top:12px; }
.multiplayer { background:#142327; }
.section-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:17px; }
.section-head p,.match-help,.invite-content p,.control-note { color:var(--muted); font-size:15px; }
.section-head p { margin-top:8px; }
.section-head .create { flex-shrink:0; }
.room-grid { display:grid; grid-template-columns:1.45fr 1fr; gap:14px; }
.room-list,.invite-card { min-width:0; background:var(--board); border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.room-list { display:flex; flex-direction:column; }
.room-head { border-bottom:1px solid var(--line); min-height:57px; display:flex; align-items:center; justify-content:space-between; gap:6px; padding:6px 10px 6px 16px; }
.room-head h3 { font-size:16px; }
.icon-button { width:44px; height:44px; display:grid; place-items:center; background:#26383d; border:1px solid var(--line); color:var(--ink); border-radius:5px;
  padding:0; font-size:21px; line-height:1; }
.icon-button:hover { background:#344b51; }
.room-results { flex:1; min-height:110px; display:grid; align-content:center; }
.room-results > p { padding:16px; color:var(--muted); font-size:14px; }
.room-results > p strong,.room-results > p small { display:block; }
.room-results > p strong { color:var(--ink); font-size:15px; }
.room-results > p a { display:block; margin-top:4px; width:fit-content; color:var(--gold); }
.room-results > p a:hover { text-decoration:underline; }
.room-results ul { list-style:none; padding:0; margin:0; }
.room-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; align-items:center; padding:10px 14px; font-size:14px; }
.room-row + .room-row { border-top:1px solid var(--line); }
.room-row strong { overflow-wrap:anywhere; }
.room-row .occupied { white-space:nowrap; color:var(--muted); }
.room-row .button { min-height:44px; }
.invite-card { background:#1d3035; }
.pitch { min-height:68px; display:grid; grid-template-columns:1fr 40px 1fr; align-items:center; justify-items:center; border-bottom:1px solid #4a6360;
  background:linear-gradient(90deg,#365747 50%,#2d4d44 50%); position:relative; isolation:isolate; overflow:hidden; }
.pitch::before { content:''; position:absolute; inset:0 50% 0 8%; width:84%; background:linear-gradient(90deg,transparent calc(50% - .5px),#d2ead555 50%,transparent calc(50% + .5px));
  border-left:1px solid #d2ead538; border-right:1px solid #d2ead538; z-index:-1; }
.pitch span { font-size:14px; font-weight:770; display:flex; align-items:center; gap:7px; }
.pitch .versus { font:750 12px/1 ui-monospace,monospace; width:40px; height:40px; justify-content:center; border:1px solid #d2ead555; border-radius:50%; background:#345247; }
.team-mark { width:9px; height:13px; border-radius:2px; }
.team-mark.home { background:var(--gold); }
.team-mark.away { background:#add5e6; }
.invite-content { padding:14px 16px 16px; }
.invite-content p { margin-top:3px; font-size:14px; }
.invite-content .button { margin-top:10px; justify-content:space-between; }
.match-help { margin-top:14px; font-size:14px; }

.controls { display:grid; min-height:382px; grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr); align-items:center; gap:30px; }
.control-choice { display:flex; gap:7px; margin-top:15px; }
.control-choice button { min-height:44px; border:1px solid var(--line); border-radius:5px; padding:7px 11px; color:var(--muted); background:var(--board); font-size:13px; font-weight:720; }
.control-choice button[aria-pressed="true"] { background:#33423a; border-color:#7c8053; color:var(--gold); }
.control-choice button:hover { color:var(--ink); }
.control-keys { width:min(100%,420px); margin-top:12px; }
.control-keys > div { display:grid; grid-template-columns:1.2fr .8fr; align-items:center; gap:6px; min-height:40px; border-bottom:1px solid var(--line); font-size:14px; }
.control-keys dt { font-weight:700; }
.control-keys dt small { margin-left:6px; color:var(--muted); }
.control-keys dd { color:var(--muted); }
kbd { display:inline-grid; place-items:center; padding:0 5px; min-height:24px; min-width:23px; border:1px solid var(--line); border-bottom-width:2px; border-radius:4px;
  background:#1d2d34; font:730 12px/1 ui-monospace,monospace; }
.control-note { margin-top:10px; font-size:14px; max-width:49ch; }
.control-shot { justify-self:center; min-width:0; width:100%; padding:7px 7px 0; background:#0b161a; border:1px solid var(--line); border-radius:6px; }
.solo-shot { width:min(100%,340px); }
.control-shot img { width:100%; height:auto; }
.solo-shot img { image-rendering:pixelated; }
.control-shot figcaption { padding:8px 0; color:var(--muted); font-size:12px; }

dialog { width:min(calc(100% - 24px),490px); max-height:calc(100% - 24px); background:var(--board); border:1px solid #719098; border-radius:9px; padding:0; color:var(--ink); }
dialog::backdrop { background:#070e11df; }
.dialog-content { padding:21px; position:relative; }
.dialog-content h2 { font-size:clamp(26px,5vw,34px); padding-right:43px; }
.dialog-content > p,.devices p { margin-top:8px; color:var(--muted); font-size:14px; }
.close { position:absolute; top:12px; right:12px; }
.devices { margin:15px 0; }
.devices details { border-top:1px solid var(--line); }
.devices details:last-child { border-bottom:1px solid var(--line); }
.devices summary { list-style:none; display:flex; align-items:center; padding:9px 23px 9px 0; gap:7px; justify-content:space-between; min-height:46px; position:relative; font-size:15px; font-weight:740; cursor:pointer; }
.devices summary::-webkit-details-marker { display:none; }
.devices summary::after { content:'+'; position:absolute; right:5px; color:var(--gold); }
.devices details[open] summary::after { content:'−'; }
.devices summary small { color:var(--muted); }
.devices p { margin:0; padding:0 11px 12px 0; }
.wide { width:100%; justify-content:space-between; }
#invite-form { margin-top:14px; }
#invite-form label { display:block; margin-bottom:5px; font-size:14px; font-weight:735; }
#invite-code { display:block; width:100%; min-height:48px; color:var(--ink); border:1px solid #78918f; background:var(--page); border-radius:5px; padding:10px; }
#invite-error:not(:empty) { color:#ffc49d; margin-top:5px; font-size:14px; }
#invite-form .wide { margin-top:12px; }

@media (max-width:960px) {
  :root { --gutter:28px; }
  .header-inner { gap:24px; }
  .desktop-nav { gap:20px; }
  .footer-inner { min-height:81px; }
  .hero-layout { min-height:530px; column-gap:23px; padding-block:46px 38px; }
  h1 { font-size:clamp(52px,8.15vw,76px); }
}

@media (max-width:740px) {
  .desktop-nav { display:none; }
  .header-inner { height:71px; gap:10px; }
  .brand { font-size:23px; }
  .locale > * { min-width:34px; }
  .mobile-nav { display:block; }
  .mobile-nav summary { min-width:44px; min-height:44px; display:grid; place-content:center; gap:4px; list-style:none;
    border:1px solid #ffffff25; border-radius:6px; cursor:pointer; }
  .mobile-nav summary::-webkit-details-marker { display:none; }
  .mobile-nav summary span { width:18px; height:2px; background:currentColor; }
  .mobile-nav nav { position:absolute; inset:100% 0 auto; display:grid; padding:7px var(--shell-gutter); background:var(--chrome); border-bottom:1px solid var(--line); }
  .mobile-nav nav a { padding:12px 0; min-height:44px; }
  .mobile-nav .current { color:var(--lime); }
}

@media (max-width:620px) {
  :root { --gutter:20px; --shell-gutter:20px; }
  .hero-layout { display:grid; grid-template-columns:1fr; grid-template-areas:"intro" "play" "shot"; min-height:0; padding-block:30px 22px; row-gap:18px; }
  .stadium-art { bottom:auto; height:470px; }
  .stadium-art img { object-position:55% 40%; }
  .hero::after { background:linear-gradient(180deg,#111a1e90 0%,#10191d99 20%,var(--page) 65%); }
  h1 { margin-top:9px; font-size:clamp(48px,14vw,77px); }
  h1 em { margin-top:.115em; }
  .lead { margin-top:13px; }
  .play { width:100%; }
  .match-shot { width:min(75%,310px); }
  .match-shot::before { inset:-4px -4px 21px 11px; }
  .match-shot-inner { padding:5px; }
  .match-shot figcaption { margin-top:6px; }
  .section-head { display:grid; align-items:start; gap:12px; }
  .section-head .create { justify-self:start; }
  .room-grid,.controls { grid-template-columns:1fr; gap:12px; }
  .multiplayer,.controls { padding-block:25px 29px; }
  .invite-content .button { width:100%; }
  .controls { row-gap:20px; }
  .footer-inner { min-height:121px; flex-direction:column; align-items:start; justify-content:center; gap:8px; padding-block:16px; }
  .footer-inner nav { gap:8px 20px; }
}
@media (max-width:359px) {
  .play-buttons { gap:6px; padding-inline:10px; }
  .play-buttons .button { font-size:12px; gap:5px; padding-inline:5px; }
  .install,.android-status { padding-inline:10px; }
  .installs small { font-size:11px; }
  .room-row { grid-template-columns:minmax(0,1fr) auto; }
  .room-row strong { grid-column:1 / -1; }
}

/* Present the existing room controller's panels in the selected landing style. */
.locale a[aria-current="true"] { background: #adf96f17; color: var(--platform-accent); }
.room-results { display: grid; align-content: center; }
.room-results > p { display: block; min-height: auto; }
#rooms-list { padding-inline: 18px; }
#rooms-list:not(:empty) { padding-bottom: 10px; }
.room-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 8px 0; }
.room-card h3 { font-size: 15px; overflow-wrap: anywhere; }
.room-card > p { font-size: 13px; color: var(--muted); }
.room-card .button, .room-dialogs .button {
  display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 5px;
  padding: 8px 12px; background: var(--board); color: var(--ink); font-size: 14px; font-weight: 760; text-align: center;
}
.room-dialogs .button.primary { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.room-card .button:hover, .room-dialogs .button:hover { filter: brightness(1.12); }
.room-dialogs dialog { width: min(550px, calc(100% - 26px)); }
.room-dialogs .dialog-body { padding: 23px; display: grid; gap: 14px; }
.room-dialogs .dialog-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.room-dialogs .dialog-head h2 { font-size: clamp(25px, 4vw, 33px); }
.room-dialogs .close-modal { background: var(--board); border: 1px solid var(--line); border-radius: 5px; min-width: 44px; min-height: 44px; color: var(--ink); font-size: 22px; }
.room-dialogs .dialog-brand, .room-dialogs .room-actions, .room-dialogs .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.room-dialogs .dialog-brand { color: var(--muted); font-size: 13px; justify-content: space-between; }
.room-dialogs .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.room-dialogs label { display: grid; gap: 5px; font-size: 14px; font-weight: 660; }
.room-dialogs input, .room-dialogs select { width: 100%; min-width: 0; padding: 8px; min-height: 44px; color: var(--ink); background: var(--page); border: 1px solid var(--line); border-radius: 5px; font: inherit; }
.room-dialogs .share-area, .room-dialogs .qr-box { display: grid; gap: 10px; }
.room-dialogs .qr-box img { background: #fff; width: min(180px, 100%); padding: 6px; height: auto; image-rendering: pixelated; }
.room-dialogs .hint { color: var(--muted); font-size: 14px; }
.room-dialogs .form-error:not(:empty) { color: #ffc399; font-size: 14px; }
@media (max-width: 620px) {
  .room-card { grid-template-columns: minmax(0, 1fr) auto; }
  .room-card > h3 { grid-column: 1 / -1; }
  .room-dialogs .field-row { grid-template-columns: 1fr; }
}
