#footy-hub[hidden], #footy-hub section[hidden], #footy-hub form[hidden] { display: none; }
#footy-hub {
  width: min(100%, 680px);
  margin: auto;
  min-height: 100svh;
  padding: max(22px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: linear-gradient(180deg, #0d0e11 0%, #141012eb 38%, #111316 100%), url("footy-title.webp") center 40% / cover;
}
.hub-brand { display: block; width: 112px; margin: 0 auto 9px; }
.hub-menu-title { text-align: center; color: #ff8745; }
#footy-hub h1 { margin: 10px 0 20px; font-size: clamp(34px, 9vw, 59px); line-height: 1; }
#footy-hub h2 { margin: 0 0 6px; font-size: 19px; }
#footy-hub p { color: #d8d0cb; line-height: 1.5; margin: 0 0 12px; }
#footy-hub .hub-back { margin-bottom: 10px; }
.hub-grid, .hub-trophies { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.hub-grid button, .hub-card, .hub-trophies li {
  background: #211c1a; border: 1px solid #584334; border-radius: 12px; padding: 11px; color: #fff4e9;
}
.hub-grid button { text-align: left; min-height: 66px; }
.hub-grid button:hover, .hub-link:hover { background: #35251e; }
.hub-grid button strong, .hub-grid button small { display: block; }
.hub-grid button small { color: #dec0ae; margin-top: 4px; font-weight: 500; }
.hub-grid button[data-hub-destination="single"] { border-color: #ff8745; }
.hub-card + .hub-card { margin-top: 10px; }
/* Timber surround, lit display bays and engraved trophy plaques. */
#footy-trophies-title { text-align: center; }
#footy-hub #footy-trophy-count { text-align: center; color: #e5c89c; }
.hub-trophies {
  margin: 0;
  padding: 14px;
  list-style: none;
  gap: 0;
  border: 7px solid #4b3023;
  border-radius: 8px;
  background: repeating-linear-gradient(94deg, #291b16 0 3px, #35221a 4px 8px, #2a1b16 9px 13px);
  box-shadow: 0 0 0 2px #9f7851, inset 0 0 0 2px #bd95624d, 0 15px 35px #0008;
}
.hub-trophies li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 0 8px 14px;
  border: 0;
  border-bottom: 12px solid #5e3c29;
  border-radius: 0;
  background: linear-gradient(90deg, #0007, transparent 25% 75%, #0007), #171b1b;
  box-shadow: inset 0 -3px 0 #c99c6255, 0 5px 7px #0009;
}
.hub-trophies li:nth-child(odd) { border-right: 3px solid #513728; }
.hub-trophy-display {
  position: relative;
  display: grid;
  place-items: end center;
  height: clamp(148px, 36vw, 205px);
  padding: 22px 8px 16px;
  background: radial-gradient(ellipse at 50% 0, #ffe0a74a, transparent 70%);
  isolation: isolate;
}
.hub-trophy-display::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 33%;
  width: 34%;
  height: 3px;
  border-radius: 100%;
  background: #ffe8bd;
  box-shadow: 0 2px 15px 4px #ffcc8555;
}
.hub-trophy-display::after {
  content: "";
  position: absolute;
  bottom: 12px;
  width: 88%;
  height: 14px;
  border-radius: 50%;
  background: #0008;
  filter: blur(5px);
  z-index: -1;
}
.hub-trophies svg {
  display: block;
  width: 104px;
  height: 114px;
  max-width: 100%;
  filter: drop-shadow(0 5px 5px #0009) drop-shadow(0 0 10px #ffd08a22);
}
.hub-trophies li[data-earned="false"] svg {
  filter: brightness(0) drop-shadow(0 1px 1px #ffffff18);
  opacity: 1;
}
.hub-trophy-plaque {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-height: 86px;
  padding: 9px 5px;
  border: 1px solid #a88450;
  border-radius: 3px;
  background: linear-gradient(118deg, #493421, #8e6b3c 48%, #513b24);
  box-shadow: inset 0 0 0 2px #2a20188c, 0 2px 4px #0008;
  text-align: center;
}
.hub-trophy-plaque strong { font-size: clamp(12px, 3.2vw, 15px); line-height: 1.25; color: #fff1ca; }
.hub-trophy-state { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ffe6b0; }
.hub-trophies li[data-earned="false"] .hub-trophy-plaque { background: linear-gradient(118deg, #2f2b25, #484238, #302b25); border-color: #6b6050; }
.hub-trophies li[data-earned="false"] .hub-trophy-state { color: #c8bba9; }
.hub-trophies details { margin-top: 9px; }
.hub-trophies summary { padding: 7px 0; font-size: 11px; color: #d8c5ab; cursor: pointer; text-align: center; }
.hub-trophies summary:focus-visible { outline: 2px solid #ff8745; outline-offset: 2px; }
#footy-hub .hub-trophies li p { padding: 3px 2px; font-size: 12px; line-height: 1.45; margin: 0; color: #e1d1bd; }
@media (min-width: 580px) {
  .hub-trophies { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hub-trophies li:nth-child(odd) { border-right: 0; }
  .hub-trophies li:not(:nth-child(3n)) { border-right: 3px solid #513728; }
}
.hub-link { display: inline-flex; align-items: center; min-height: 42px; padding: 8px; border: 1px solid #ab6741; border-radius: 8px; color: #ffcbad; font-size: 13px; font-weight: 800; }
.hub-sponsor-placement { margin: 10px 0; border: 1px solid #5b463b; background: #131516; padding: 8px; color: #ffe3d0; text-align: center; }
.hub-sponsor-placement span { display: block; padding: 8px; border: 1px dashed #ff9c63; margin-top: 6px; }
#footy-sponsor-form { display: grid; gap: 10px; }
#footy-sponsor-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 750; }
#footy-sponsor-form input, #footy-sponsor-form textarea { width: 100%; padding: 9px; border: 1px solid #76513b; border-radius: 6px; background: #161312; color: #fff4e9; font: 16px system-ui; }
#footy-sponsor-form textarea { min-height: 88px; }
#footy-sponsor-form button { justify-self: start; }
#footy-clear-confirm { margin-top: 8px; }
#footy-clear-status:empty, #summary-trophies:empty { display: none; }
#summary-menu { grid-column: 1/-1; }
#summary-trophies { text-align: center; color: #ffbc8f; margin: 0; font-weight: 800; }
#tutorial-lessons { margin: 12px 0; }
#footy-help .tutorial-rules p { margin-top: 8px; }
#tutorial-coach[hidden], #tutorial-result[hidden] { display: none; }
#tutorial-coach {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  background: #211c19;
  border-bottom: 2px solid #b76c49;
}
#tutorial-progress { margin: 0; color: #ffab6c; font-size: 11px; font-weight: 800; }
#tutorial-title { margin: 0; font-size: clamp(17px, 5vw, 25px); line-height: 1.1; }
#tutorial-instruction { grid-column: 1/-1; margin: 0; color: #f3e9df; font-size: 13px; line-height: 1.3; }
#tutorial-exit { min-height: 37px; padding: 5px 9px; }
body.tutorial-view .score { display: none; }
#tutorial-result { z-index: 6; background: #101810b8; }
#tutorial-result .card { width: min(100%, 380px); }
#tutorial-result-copy { line-height: 1.45; }
.tutorial-view #mark-screen { box-shadow: none; }
.league-picker button { display:grid; grid-template-columns: 47px minmax(0, 1fr); column-gap:8px; align-items:center; }
.league-picker button img { grid-row:1/3; width:100%; aspect-ratio:1; object-fit:contain; border-radius:7px; }
.league-picker button small { margin:0; }
.league-club-hero { display:grid; grid-template-columns: minmax(85px,125px) minmax(0,1fr); align-items:center; gap:12px; }
.league-club-hero img { width:100%; aspect-ratio:1; display:block; object-fit:contain; border-radius:8px; }
.league-table { overflow-x:auto; }
.league-table table { width:100%; text-align:right; border-collapse:collapse; font-size:12px; }
.league-table td, .league-table th { padding:6px 4px; border-bottom:1px solid #554337; }
.league-table th[scope="row"] { text-align:left; }
.league-selected { color:#ffc596; background:#38251a; }
#league-roster { margin-top:8px; }
#league-roster img { float:right; margin:0 0 8px 8px; width:48px; border-radius:5px; }
#league-roster .league-table { clear:both; }


#footy-league-preview { text-align:center; }
#footy-league-preview .hub-back { display:block; }
#footy-league-preview h1 { font-size:clamp(26px,6.6vw,48px); letter-spacing:-.055em; margin:4px 0 8px; }
#footy-hub #league-preview-round { color:#ffab6c; font-size:13px; font-weight:800; margin-bottom:4px; }
#footy-hub #league-preview-stadium { font-weight:750; }
.league-preview-kits { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:12px auto; width:min(100%,510px); }
.league-preview-kit { display:grid; justify-items:center; gap:8px; padding:12px 8px; background:#1c2129; border-radius:10px; border-top:3px solid var(--club-colour); }
.league-preview-kit img { display:block; width:100%; object-fit:contain; }
.league-preview-logo { max-width:80px; aspect-ratio:1; }
.league-preview-jumper { max-width:160px; height:clamp(100px,33vw,200px); }
#league-start-game { width:min(100%,320px); min-height:48px; margin-top:4px; }

.league-navigation { margin-top:12px; }
.league-controls { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.league-controls button { min-width:40px; min-height:40px; font-size:13px; }
.league-controls button[aria-pressed="true"] { background:#ffab6c; color:#24160d; border-color:#ffab6c; }
.league-squad-picker { display:grid; grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); }
.league-squad-picker button { display:flex; align-items:center; text-align:left; gap:6px; }
.league-squad-picker img { width:25px; height:25px; object-fit:contain; border-radius:4px; }
.league-fixtures,.league-leaders { padding:0; margin:0; list-style:none; }
.league-fixtures li,.league-leaders li { padding:9px 6px; border-top:1px solid #534034; }
.league-fixtures li div,.league-leaders li { display:flex; justify-content:space-between; gap:8px; }
.league-fixtures small,.league-leaders small { display:block; color:#ddd0c3; margin-top:3px; }
#league-reset-confirm { margin-top:12px; }

/* Edge masks preserve the original club colours and white kit details. */
img[src^="assets/league/"] { mask:var(--club-art-mask, none) center / contain no-repeat; }
img[src="assets/league/adelaide-hoppers-jumper.webp"] { --club-art-mask:url("league/adelaide-hoppers-jumper-mask.png"); }
img[src="assets/league/adelaide-hoppers-logo.webp"] { --club-art-mask:url("league/adelaide-hoppers-logo-mask.png"); }
img[src="assets/league/brisbane-stingrays-jumper.webp"] { --club-art-mask:url("league/brisbane-stingrays-jumper-mask.png"); }
img[src="assets/league/brisbane-stingrays-logo.webp"] { --club-art-mask:url("league/brisbane-stingrays-logo-mask.png"); }
img[src="assets/league/bunbury-breakers-jumper.webp"] { --club-art-mask:url("league/bunbury-breakers-jumper-mask.png"); }
img[src="assets/league/bunbury-breakers-logo.webp"] { --club-art-mask:url("league/bunbury-breakers-logo-mask.png"); }
img[src="assets/league/canberra-captains-jumper.webp"] { --club-art-mask:url("league/canberra-captains-jumper-mask.png"); }
img[src="assets/league/canberra-captains-logo.webp"] { --club-art-mask:url("league/canberra-captains-logo-mask.png"); }
img[src="assets/league/darwin-crocodiles-jumper.webp"] { --club-art-mask:url("league/darwin-crocodiles-jumper-mask.png"); }
img[src="assets/league/darwin-crocodiles-logo.webp"] { --club-art-mask:url("league/darwin-crocodiles-logo-mask.png"); }
img[src="assets/league/geelong-wallabies-jumper.webp"] { --club-art-mask:url("league/geelong-wallabies-jumper-mask.png"); }
img[src="assets/league/geelong-wallabies-logo.webp"] { --club-art-mask:url("league/geelong-wallabies-logo-mask.png"); }
img[src="assets/league/hobart-tigers-jumper.webp"] { --club-art-mask:url("league/hobart-tigers-jumper-mask.png"); }
img[src="assets/league/hobart-tigers-logo.webp"] { --club-art-mask:url("league/hobart-tigers-logo-mask.png"); }
img[src="assets/league/melbourne-rams-jumper.webp"] { --club-art-mask:url("league/melbourne-rams-jumper-mask.png"); }
img[src="assets/league/melbourne-rams-logo.webp"] { --club-art-mask:url("league/melbourne-rams-logo-mask.png"); }
img[src="assets/league/perth-kestrels-jumper.webp"] { --club-art-mask:url("league/perth-kestrels-jumper-mask.png"); }
img[src="assets/league/perth-kestrels-logo.webp"] { --club-art-mask:url("league/perth-kestrels-logo-mask.png"); }
img[src="assets/league/sydney-sharks-jumper.webp"] { --club-art-mask:url("league/sydney-sharks-jumper-mask.png"); }
img[src="assets/league/sydney-sharks-logo.webp"] { --club-art-mask:url("league/sydney-sharks-logo-mask.png"); }

.origin-grid { display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); }
.origin-card { padding:14px; border:1px solid #3e4651; border-radius:12px; background:#1b2028; }
#footy-hub .origin-card h2 { margin-bottom:2px; }
#footy-hub .origin-card p { margin-bottom:6px; font-size:13px; }
.origin-art { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; align-items:center; }
.origin-art img { width:100%; height:auto; display:block; }

#origin-content h2 { margin-top:0; }
.origin-picker button { display:flex; align-items:center; gap:8px; }
.origin-picker img { width:42px; height:48px; object-fit:contain; flex:none; }
.origin-bracket {
  --bracket-line:#8c6953;
  display:grid;
  grid-template-columns:minmax(0,1fr) clamp(10px,4vw,32px) minmax(0,1fr) clamp(10px,4vw,32px) minmax(0,1fr);
  grid-template-rows:auto repeat(4,minmax(104px,1fr));
  margin-block:16px;
  align-items:center;
}
#footy-hub .origin-bracket h2 { grid-row:1; margin:0 0 9px; font-size:clamp(12px,3.5vw,19px); }
.origin-match { border:1px solid #554337; border-radius:8px; background:#191e25; }
.origin-slot { display:grid; gap:2px; padding:5px 6px; font-size:clamp(11px,3.1vw,15px); line-height:1.14; overflow-wrap:anywhere; }
.origin-slot + .origin-slot { border-top:1px solid #554337; }
.origin-slot b { font-variant-numeric:tabular-nums; }
.origin-pending { color:#c3b9ae; }
.origin-winner { font-weight:700; }
.origin-user-team { color:#ffad77; }
.origin-connector { position:relative; height:100%; }
.origin-connector::before,.origin-connector::after { content:""; position:absolute; }
.origin-connector::before { inset:25% 50% 25% 0; border:1px solid var(--bracket-line); border-left:0; }
.origin-connector::after { top:50%; right:0; width:50%; border-top:1px solid var(--bracket-line); }
#origin-squad-teams button[aria-pressed="true"] { border-color:#ffad77; }
#footy-origin-teams .origin-roster,#footy-origin-teams .origin-grid { margin-top:12px; }
.origin-match-preview { text-align:center; }
.origin-match-preview .hub-back { display:block; }
#footy-hub .origin-match-preview h1 { font-size:clamp(27px,6.6vw,48px); }
#origin-start-game { width:min(100%,320px); min-height:48px; margin-top:4px; }
#origin-restart-confirm { margin-top:8px; }

.career-roster-jumper { display:block; width:130px; max-height:190px; object-fit:contain; margin:8px auto; }
.career-offer-logo { display:block; width:100px; max-height:110px; object-fit:contain; margin:8px 0; }
.career-finals { display:grid; grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr); align-items:center; margin-block:20px; }
.career-finals section { min-width:0; }
.career-finals .league-fixtures { margin:0; padding:0; list-style:none; }
.career-finals .league-fixtures li { border:1px solid #7d5841; border-radius:8px; padding:10px; background:#211c1a; overflow-wrap:anywhere; }
.career-finals .league-fixtures li+li { margin-top:20px; }
.career-finals .league-fixtures li div { display:grid; gap:4px; padding:4px 0; }
.career-final-link { height:100px; border:1px solid #b37d54; border-left:0; position:relative; margin-right:11px; }
.career-final-link::after { content:""; position:absolute; top:50%; left:100%; width:12px; border-top:1px solid #b37d54; }
#career-start-game { min-height:48px; width:min(100%,320px); }
/* The whole badge-and-jumper display is the selection target. */
.hub-grid:has(> .team-selection-tile) { grid-template-columns: 1fr; gap: 14px; }
.hub-grid button.team-selection-tile {
  display: flex; flex-direction: column; align-items: stretch; gap: 7px;
  padding: 20px; border: 1px solid #404a56; border-radius: 18px;
  background: #1b232b; text-align: left; color: #fff8ef;
}
.hub-grid button.team-selection-tile strong { font-size: clamp(22px,6vw,30px); }
.hub-grid button.team-selection-tile small { color: #c8c6c4; margin: 0; font-size: 14px; }
.team-selection-art { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding-top: 12px; pointer-events: none; }
.hub-grid button.team-selection-tile img { width: 100%; height: clamp(130px,38vw,220px); object-fit: contain; aspect-ratio: auto; border-radius: 0; }
.hub-grid button.team-selection-tile:hover,
.hub-grid button.team-selection-tile:focus-visible,
.hub-grid button.team-selection-tile[aria-pressed="true"] { border-color: #ff8745; box-shadow: 0 0 0 2px #ff8745; background: #252b30; }
.game-plan-controls { display: grid; gap: 7px; margin: 10px 0; text-align: left; }
.game-plan-controls select { width:100%; min-height:44px; padding:8px; border:1px solid #af754c; border-radius:7px; background:#1b232b; color:#fff4e8; font:inherit; font-size:16px; }
.game-plan-controls p { font-size:12px; line-height:1.4; margin:0; color:#d8c5ab; }
#opponent-game-plan { color:#ffab6c; font-weight:700; }
#cover .card { max-height:90dvh; overflow-y:auto; }
.sponsor-preview-grid { display:grid; gap:18px; margin:16px 0 24px; }
.sponsor-preview-grid figure { margin:0; min-width:0; }
.sponsor-preview-grid canvas { display:block; width:100%; height:auto; border:1px solid #657164; border-radius:12px; background:#14251a; }
#sponsor-oval-preview { max-height:65svh; object-fit:contain; }
.sponsor-preview-grid figcaption { margin-top:8px; color:#ffbc8f; font-weight:750; text-align:center; }
.sponsor-match-preview { padding:20px 12px; border:1px solid #657164; border-radius:12px; background:linear-gradient(150deg,#1c222a,#101215); text-align:center; }
.sponsor-match-preview h3 { margin:6px 0 16px; font-size:clamp(20px,5vw,30px); line-height:1.2; }
#footy-hub .sponsor-match-round { font-size:12px; color:#ffbc8f; }
#footy-hub .sponsor-stadium-name { font-weight:800; color:#fff4e8; }
.sponsor-match-logo { max-width:220px; margin:10px auto 22px; padding:18px 10px; border:2px dashed #ff8745; background:#13191c; color:#ffb482; text-transform:uppercase; font-weight:800; }
.sponsor-match-preview .league-preview-kits { margin-bottom:18px; }
.sponsor-match-preview .league-preview-kit { min-width:0; }
.sponsor-match-preview .league-preview-kit strong { font-size:12px; color:#f9efe8; }
.sponsor-start-preview { display:block; padding:13px 16px; background:#ff742e; border-radius:8px; color:#24140b; font-weight:850; }
.career-player-form { display:grid; gap:14px; }
.career-player-form label { display:grid; gap:6px; }
.career-player-form input,.career-player-form select { width:100%; min-height:44px; padding:10px; font:inherit; font-size:16px; color:#fff4e8; background:#1b232b; border:1px solid #81634f; border-radius:8px; }
.career-upgrades { display:grid; gap:10px; }
.career-upgrades>div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; padding-top:10px; border-top:1px solid #584334; }
.career-upgrades button { grid-column:1/-1; min-height:44px; }
#grand-final-intro { width:min(94vw,650px); box-sizing:border-box; max-height:94dvh; overflow:auto; padding:30px 18px; border:1px solid #bd8b44; border-radius:20px; color:#fff4e8; background:radial-gradient(ellipse at 50% 45%,#59401f,#13171d 70%); text-align:center; }
#grand-final-intro::backdrop { background:#05080bef; }
#grand-final-intro h2 { font-size:clamp(32px,8vw,54px); color:#ffba63; margin:10px 0 28px; }
.grand-final-lineup { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; align-items:center; }
.grand-final-lineup img,.grand-final-lineup svg { display:block; width:100%; height:clamp(90px,26vw,170px); object-fit:contain; }
#grand-final-cup { filter:drop-shadow(0 0 16px #ffc15b55); }
#grand-final-teams { margin:24px 0; font-weight:800; font-size:20px; }
#season-presentation { width:min(96vw,700px); max-height:94dvh; overflow-y:auto; box-sizing:border-box; padding:28px 20px; border:2px solid #b99048; border-radius:18px; background:radial-gradient(ellipse at top,#443523,#10131b 70%); color:#fff5df; text-align:center; }
#season-presentation::backdrop { background:#04060bf5; }
#season-presentation-title { font-size:clamp(28px,7vw,46px); font-family:Georgia,serif; color:#f3d48e; margin:12px 0 22px; }
#presentation-medal svg { width:110px; height:110px; filter:drop-shadow(0 0 18px #e9bc6266); }
#presentation-results { position:relative; z-index:1; }
.presentation-place { margin:12px 0; padding:16px; background:#0b0e18b0; border:1px solid #aa884d80; border-radius:10px; animation:awards-reveal .9s ease both; }
.presentation-place img { width:62px; height:62px; object-fit:contain; }
.presentation-place h3 { margin:5px 0; color:#f3ce86; font-size:16px; }
.presentation-place strong { display:block; font-size:23px; }
.presentation-place p { margin:7px 0; color:#e9e0cf; font-size:14px; }
#presentation-continue { position:relative; z-index:1; margin-top:15px; }
#presentation-confetti { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
#presentation-confetti i { position:absolute; top:-20px; width:8px; height:15px; animation:awards-confetti 4s linear both; }
@keyframes awards-reveal { from { opacity:0;transform:translateY(16px); } to { opacity:1;transform:translateY(0); } }
@keyframes awards-confetti { to { top:110%;rotate:540deg; } }
@media(prefers-reduced-motion:reduce) { .presentation-place { animation:none; } #presentation-confetti i { animation:none;top:5%; } }

/* Stadium cards use native horizontal scrolling so touch swipes stay responsive. */
.stadium-picker{min-width:0;margin:20px 0}
.stadium-picker h2{font-size:1.2rem;margin-bottom:4px}
.stadium-picker>p{margin:0 0 12px;color:#d4c8be}
.stadium-slides{display:flex;position:relative;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;touch-action:pan-x pan-y;border-radius:14px}
.stadium-slide{box-sizing:border-box;flex:0 0 100%;min-width:0;scroll-snap-align:start;scroll-snap-stop:always;padding:12px;background:#17221d;border:1px solid #584334;border-radius:14px;text-align:center}
.stadium-slide canvas{display:block;width:auto;max-width:100%;height:260px;margin:auto}
.stadium-slide h3{font-size:1.05rem;margin:12px 0 4px}
.stadium-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}
.stadium-navigation button{min-height:44px}
.stadium-navigation p{margin:0;font-variant-numeric:tabular-nums}

#home-screen-guide{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,520px);max-height:90svh;overflow-y:auto;border:1px solid #695044;border-bottom:0;border-radius:24px 24px 0 0;background:linear-gradient(160deg,#25201e,#101416);color:#fff4e9;padding:28px 22px max(24px,env(safe-area-inset-bottom));text-align:center;box-shadow:0 -12px 60px #0008}
#home-screen-guide::backdrop{background:#000a;backdrop-filter:blur(7px)}
#home-screen-guide-close{position:absolute;right:14px;top:14px;width:44px;height:44px;padding:0;border-radius:50%;font-size:28px}
.home-screen-app-icon{border-radius:20px;box-shadow:0 0 28px #ff742e35}
#home-screen-guide h2{font-size:1.65rem;margin:14px 0 8px}
.home-screen-subtitle{color:#d8c8bc;margin:0 12px 20px}
.home-screen-platforms{display:flex;gap:10px;justify-content:center;margin-bottom:18px}
.home-screen-platforms button{flex:1;min-height:44px}
.home-screen-platforms button[aria-pressed="true"]{background:#ff742e;border-color:#ff742e;color:#15100d}
#home-screen-steps{list-style:none;padding:0;display:grid;gap:10px;text-align:left}
#home-screen-steps li{display:flex;align-items:center;gap:16px;padding:16px;background:#ffffff08;border:1px solid #ff874533;border-radius:12px}
#home-screen-steps strong{display:block;font-size:1rem}
#home-screen-steps p{margin:5px 0 0;color:#d8c8bc;font-size:.9rem;line-height:1.5}
.home-screen-step-symbol{flex:0 0 44px;color:#ff8745}
.home-screen-step-symbol svg{width:38px;height:38px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.home-screen-step-symbol img{border-radius:11px;display:block}
#home-screen-guide .home-screen-browser-note{font-size:.875rem;color:#c5b7ab;line-height:1.5}
#home-screen-guide-done{width:100%;min-height:48px}

#footy-settings .settings-intro{color:#c6bbb3;margin:-8px 0 26px;font-size:1rem}
.audio-settings-card{border:1px solid #ffffff1c;border-radius:18px;background:linear-gradient(135deg,#232321f0,#171a1df0);padding:6px 20px;overflow:hidden}
.audio-settings-card>h2{font-size:.8rem;letter-spacing:.13em;text-transform:uppercase;color:#ff9b66;margin:18px 0 4px}
.audio-setting-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:23px 0}
.audio-setting-row+.audio-setting-row{border-top:1px solid #ffffff12}
.audio-setting-copy{min-width:0}
.audio-setting-copy strong{font-size:1.05rem;color:#fff8f1}
.audio-setting-copy p{font-size:.875rem;line-height:1.5;color:#b9b6b0;margin:6px 0 0}
.audio-setting-control{display:flex;flex-direction:column;align-items:center;gap:6px;flex-shrink:0}
.audio-setting-control>span{font-size:.75rem;color:#bab7b1;min-width:26px;text-align:center}
#footy-settings .audio-switch{position:relative;display:block;flex:none;width:60px;height:36px;min-height:36px;padding:0;border-radius:22px;border:1px solid #ffffff30;background:#454a48;box-shadow:inset 0 1px 3px #0004;cursor:pointer;transition:background .18s,border-color .18s}
#footy-settings .audio-switch::after{content:"";position:absolute;top:4px;left:4px;width:26px;height:26px;border-radius:50%;background:#fff9f1;box-shadow:0 2px 5px #0004;transition:transform .18s}
#footy-settings .audio-switch[aria-checked="true"]{background:#ff742e;border-color:#ff955e}
#footy-settings .audio-switch[aria-checked="true"]::after{transform:translateX(24px)}
#footy-settings .audio-switch:focus-visible{outline:3px solid #fff0cf;outline-offset:5px}
#footy-settings .audio-switch:disabled{opacity:.4;cursor:default}
.settings-voice-card{margin-top:18px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px;border:1px solid #ffffff14;border-radius:18px;background:#171b1dbf}
.settings-voice-card h2{font-size:.95rem;margin:0 0 7px;color:#fff5eb}
.settings-voice-card p{font-size:.875rem;color:#b9b6b0;margin:5px 0;line-height:1.5}
.settings-voice-card button{flex-shrink:0;min-height:44px}
@media(max-width:360px){.audio-settings-card{padding-inline:15px}.audio-setting-row{gap:12px}.settings-voice-card{align-items:flex-start;flex-direction:column}}
@media(prefers-reduced-motion:reduce){#footy-settings .audio-switch,#footy-settings .audio-switch::after{transition:none}}

#footy-settings .audio-switch::before{content:"";position:absolute;inset:-5px 0;border-radius:24px}

/* Mini-games use direct touch. The oval controller is only for open play. */
.mark-view .match-controls{display:none!important}
body.ruck-view #ruck-screen{pointer-events:none;padding-bottom:80px}
#ruck-touch-help{margin:8px auto 16px;max-width:320px;font-size:14px;line-height:1.5;color:#fff4de;text-shadow:0 2px 5px #000}
#ruck-screen:focus-visible{outline:3px solid #ff9b66;outline-offset:-5px}
#mark-zone{pointer-events:auto;touch-action:none;cursor:pointer;padding:0;min-height:0;z-index:2}
#mark-zone:focus-visible{outline:3px solid #ff9b66;outline-offset:7px}
#mark-zone:disabled{opacity:1;cursor:default}
#mark-ball{pointer-events:none;z-index:3}
#mark-screen .mark-drop{pointer-events:none}
#shot-dialog .shot-stage{position:relative;min-height:200px}
#shot-gesture{position:absolute;inset:0;z-index:1;touch-action:none;cursor:grab;border-radius:12px}
#shot-gesture:active{cursor:grabbing}
#shot-gesture:focus-visible{outline:2px solid #ff9b66;outline-offset:-3px}
#shot-dialog .power{pointer-events:none}
#shot-dialog.fullscreen-shot .power{
  position:absolute;right:4px;top:50%;transform:translateY(-50%);z-index:2;
  width:54px;height:min(86%,260px);margin:0;padding:12px 8px;
  display:flex;flex-direction:column;align-items:center;gap:9px;
  border:1px solid #ffffff26;border-radius:18px;background:linear-gradient(160deg,#14211ef2,#0a1213ed);
  box-shadow:0 5px 16px #0004;pointer-events:none
}
.shot-power-label{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:#b9c9c0}
.shot-power-track{position:relative;flex:1;min-height:60px;width:14px;overflow:hidden;border-radius:20px;background:#ffffff12;box-shadow:inset 0 1px 4px #0007}
#shot-power-fill{position:absolute;bottom:0;left:0;right:0;height:0;background:linear-gradient(0deg,#f1662b,#ffae68);border-radius:20px;box-shadow:0 0 12px #ff7a3e66}
.shot-power-ticks{position:absolute;inset:0;background:repeating-linear-gradient(to top,transparent 0 calc(25% - 1px),#08141177 calc(25% - 1px) 25%)}
#shot-dialog #power-readout{font-size:14px;line-height:1.1;font-weight:850;color:#fff5e9;font-variant-numeric:tabular-nums}
#shot-power-meter{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#shot-instructions{font-size:14px!important;line-height:1.45}

/* Reserved ad inventory. No third-party code or ad requests until configured. */
#footy-hub{display:flex;flex-direction:column}
#footy-hub>section:not([hidden]){flex:1}
.menu-ad-banner{flex:none;width:100%;max-width:468px;margin:48px auto 0;text-align:center;user-select:none}
.menu-ad-label{display:block;margin:0 0 6px;font-size:10px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:#999c99}
.menu-ad-slot{display:flex;align-items:center;justify-content:center;min-height:60px;width:100%;border:1px solid #ffffff16;border-radius:4px;background:#101413}
.menu-ad-placeholder{font-size:12px;color:#777f78}
.menu-ad-slot[data-ad-filled="true"] .menu-ad-placeholder{display:none}
#footy-opening>.menu-ad-banner{position:absolute;z-index:2;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);width:calc(100% - 28px);max-width:320px;margin:0}
#footy-opening>.menu-ad-banner .menu-ad-slot{min-height:50px}
#footy-opening #begin-footy{bottom:130px;padding-bottom:30px}
#footy-opening .footy-opening-art{bottom:220px}
@media(max-height:600px){#footy-opening .footy-opening-art{top:22%;bottom:210px}#footy-opening #footy-opening-title{font-size:clamp(34px,8svh,48px)}}

/* Keep the oval geometry stable while a marking overlay is visible. */
body.mark-view .score{display:grid;visibility:hidden;pointer-events:none}
body.mark-view .status-row{display:flex;visibility:hidden;pointer-events:none}
body.mark-view #mark-ball{top:50%;will-change:transform}
body.mark-view #mark-screen{box-shadow:none;contain:layout paint}

body.ruck-view .match-controls{display:grid;z-index:4}
body.ruck-view .match-stick{visibility:visible;pointer-events:auto}

/* Safari must not begin text selection or a long-press callout on game controls. */
body.oval-view,#footy-main,#footy-main *,#shot-dialog,#shot-dialog *{
  -webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important
}
#match-stick,#match-stick *,#oval,#shot-gesture,#mark-zone{
  -webkit-user-drag:none;touch-action:none
}
#footy-main input,#footy-main textarea,#footy-main [contenteditable="true"],
#shot-dialog input:not([type="hidden"]),#shot-dialog textarea{
  -webkit-user-select:text!important;user-select:text!important
}
/* The privacy link stays available without requiring game scripts. */
.hub-grid > a.hub-link { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; min-height: 66px; padding: 14px; text-decoration: none; background: #241e19; border: 1px solid #654b3a; border-radius: 14px; color: #fff; }
.hub-grid > a.hub-link small { display: block; color: #dec0ae; margin-top: 4px; font-weight: 500; }
#match-pause-open,#shot-pause-open { position:fixed; top:max(8px,env(safe-area-inset-top)); right:max(8px,env(safe-area-inset-right)); z-index:70; min-width:38px; min-height:38px; padding:6px 10px; font-size:19px; background:#152019df; border:1px solid #ffffff80; border-radius:9px; }
#match-pause-dialog { width:min(700px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; background:#111710; color:#faf6ef; border:1px solid #69715e; border-radius:16px; padding:20px; }
#match-pause-dialog::backdrop { background:#000b; }
.pause-heading { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.pause-heading h1 { font-size:32px; line-height:1.1; margin:0; letter-spacing:-.04em; }
#pause-settings-host #footy-settings { padding:18px 0; }
#pause-settings-host #footy-settings > h1 { display:none; }
#match-abandon { margin-top:15px; }
.no-effect-flashing .goal-title,.no-effect-flashing .whistle-call { animation:none!important; }
.no-effect-flashing #mark-zone[data-flash="true"] { background:transparent; box-shadow:none; border-color:#d4e8af; }
.no-effect-motion *, .no-effect-motion *::before,.no-effect-motion *::after { animation:none!important; transition:none!important; }
.no-effect-motion #presentation-confetti { display:none; }
