:root {
  color-scheme: light;
  --forest: #174335;
  --pine: #10251f;
  --brass: #e0bd78;
  --paper: #f5f2e9;
  --ink: #172c24;
  --muted: #50645a;
  --line: #d9ded3;
  --surface: #fffdf8;
  font: 16px/1.5 "DM Sans", "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body, h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
.frame { width: min(calc(100% - 36px), 1136px); margin-inline: auto; }
.site-header { color: #f8f5ed; background: var(--pine); border-bottom: 1px solid #335345; }
.header-inner, .brand, #account-bar, .group-title, .actions, .counts {
  display: flex; align-items: center; gap: 12px;
}
.header-inner, .group-title, .counts { justify-content: space-between; }
.header-inner { min-height: 72px; }
.brand { color: inherit; text-decoration: none; }
.brand strong { display: block; font: bold 1.45rem/1.1 Georgia, "Instrument Serif", serif; }
.brand small { display: block; font-size: .69rem; letter-spacing: .13em; text-transform: uppercase; color: var(--brass); }
.ball { display: block; width: 44px; height: 44px; object-fit: contain; }
#account-bar span { font-size: .83rem; overflow-wrap: anywhere; }
#account-bar button { background: #253f34; border-color: #4c665b; color: white; min-height: 44px; white-space: nowrap; }
.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: 320px; margin-top: 26px; padding: clamp(24px,6vw,68px); overflow: hidden; border-radius: 20px; color: #fffdf7;
  background: linear-gradient(90deg,#10251f 1%,#10251ff5 30%,#10251fb0 56%,#10251f21 100%), url('/match-night.webp') center 57% / cover, var(--pine);
  box-shadow: 0 13px 26px #17392f22; }
.hero-content { max-width: 630px; }
h1,h2 { font-family: Georgia,"Instrument Serif",serif; font-weight: 600; }
h1 { font-size: clamp(2.85rem,8vw,5.9rem); line-height: .98; letter-spacing: -.042em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.85rem,4vw,2.55rem); line-height: 1.05; letter-spacing: -.025em; }
h3 { font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
.hero p { max-width: 35ch; margin-top: 17px; color: #f2eee1; }
.hero .actions { margin-top: 22px; }
.hero button { border-color: #f6e8c69c; color: #fffaf0; background: #10251fa8; }
.hero button.primary, .hero button.primary:hover { color: #211b10; background: var(--brass); border-color: var(--brass); }
.hero button:hover { background: var(--pine); }
button, select, input, textarea { font: inherit; }
button, select, input, textarea, .card-link { min-height: 44px; padding: 9px 13px; border: 1px solid #bcc9bd; border-radius: 9px; background: white; color: var(--ink); }
button { cursor: pointer; font-weight: 700; }
button:hover:not(:disabled) { background: #e8f0e8; }
button:disabled { opacity: .52; cursor: default; }
a { color: var(--forest); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #a16e23; outline-offset: 3px; }
nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; margin-top: 20px; background: #e7ebe2; border: 1px solid var(--line); border-radius: 13px; }
nav button { flex: 0 0 auto; background: transparent; border-color: transparent; }
nav button[aria-current] { color: white; background: var(--forest); }
nav button[aria-current]:hover { background: #225d4a; }
#view { scroll-margin-top: 12px; }
#notice:not(:empty) { padding: 11px 14px; margin-top: 14px; border-radius: 9px; background: #e0ecdf; }
#notice.error:not(:empty) { color: #802817; background: #f9e5dc; }
.section-head { margin: 30px 0 17px; }
.section-head p, .roster, .message small { color: var(--muted); margin-top: 5px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 14px; margin: 12px 0 25px; }
.group-card, .demo-accounts { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 19px; box-shadow: 0 3px 9px #25392e08; }
.group-title, .actions { flex-wrap: wrap; gap: 8px; }
.group-card p, .demo-accounts p { margin: 8px 0; overflow-wrap: anywhere; }
.group-card form { margin-top: 14px; }
form { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; }
form label { display: grid; gap: 4px; flex: 1 1 145px; min-width: 0; font-size: .86rem; font-weight: 650; }
form label.check { display: flex; flex: 1 0 100%; align-items: center; gap: 7px; }
form input[type=checkbox] { min-height: auto; width: auto; accent-color: var(--forest); }
form input, form select, textarea { width: 100%; min-width: 0; }
.card-link, form button { display: inline-flex; align-items: center; background: var(--forest); color: white; border-color: var(--forest); }
form button:hover:not(:disabled), .card-link:hover { background: #225d4a; }
.card-link { justify-content: space-between; gap: 14px; margin-top: 12px; font-weight: 700; text-decoration: none; }
.directory-card { border-top: 3px solid #ad864a; }
.directory-card h3 a { text-decoration: none; }
.directory-card h3 a:hover { text-decoration: underline; }
.group-mark { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; border: 5px solid var(--pine); border-radius: 50%; background: var(--brass); color: var(--pine); font-weight: 900; }
.group-card progress { display: block; width: 100%; height: 9px; margin: 13px 0 9px; accent-color: var(--forest); }
.counts { font-size: .87rem; }
.counts span { color: var(--muted); }
.tag, .entry-status { display: inline-block; padding: 4px 9px; border-radius: 7px; background: #eee8dc; color: #514534; font-size: .8rem; font-weight: 700; }
.tag.active { background: #dcece1; color: #255638; }
.tag.forming { background: #f4e5c3; color: #63491d; }
.preference-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; text-align: left; }
thead { background: #e7ebe2; }
td, th { padding: 11px 13px; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
.hub-links { display: flex; gap: 9px; flex-wrap: wrap; }
.hub-links a { min-height: 44px; padding: 9px 13px; font-weight: 650; }
.message { border-top: 1px solid var(--line); padding: 12px 0; margin-top: 8px; }
.message p { white-space: pre-wrap; }
.scorecard { margin-block: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.scorecard li { margin-block: 4px; }
.group-card details { margin-block: 10px; }
summary { cursor: pointer; color: var(--forest); font-weight: 700; }
.app-loading {
  position:fixed; z-index:100; inset:0; display:grid; place-items:center;
  background:var(--paper);
}
.brand-loader { min-height:8rem; display:grid; place-content:center; justify-items:center; gap:.5rem; color:var(--muted); text-align:center; }
.brand-loader img { width:148px; height:48px; object-fit:contain; }
.app-loading .brand-loader img { width:clamp(148px,48vw,236px); height:auto; }
.placement-list { margin:0; }
.placement-list > div { display:flex; flex-wrap:wrap; justify-content:space-between; column-gap:1rem; padding:.6rem 0; border-bottom:1px solid var(--line); }
.placement-list > div:last-child { border:0; }
.placement-list dd { margin:0; font-weight:750; }
.entry-callout { margin:0 0 1rem; display:flex; flex-wrap:wrap; gap:.6rem 1rem; align-items:center; justify-content:space-between; }
.entry-callout p { margin:.3rem 0; }
.auto-promise { margin:0 0 1rem; }
.auto-signup-list { max-width:48rem; display:grid; gap:1rem; }
.auto-signup-card form > button { flex:1 0 100%; justify-content:center; }
.auto-signup-card > button { margin-top:.65rem; }
.preferred-divisions { flex:1 0 100%; min-width:0; padding:.75rem; }
.preferred-divisions p { margin:0 0 .5rem; color:var(--muted); }
.preferred-divisions > div { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,7.5rem),1fr)); gap:.4rem; }
.preferred-divisions label { display:flex; gap:.4rem; align-items:center; min-height:44px; padding:.4rem .6rem; border:1px solid var(--line); border-radius:9px; cursor:pointer; }
.preferred-divisions label:has(input:checked) { background:var(--paper); border-color:var(--forest); }
.preferred-divisions input { flex:none; margin:0; }
footer { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; padding-block: 21px 30px; border-top: 1px solid var(--line); font-size: .87rem; }
@media (max-width: 540px) {
  .frame { width: calc(100% - 24px); }
  .hero { min-height: 274px; margin-top: 14px; border-radius: 15px; background-position: center, 63% center; }
  .hero p { max-width: 27ch; }
  nav button { flex: 1 0 auto; font-size: .86rem; padding-inline: 9px; }
  .group-card { padding: 16px; }
  td, th { padding-inline: 8px; }
}

@font-face { font-family: Geist; src: url('/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root { font-family: Geist, system-ui, sans-serif; --paper: #f7f6f1; --forest:#174d3e; }
h1,h2 { font-family: Geist, system-ui, sans-serif; font-weight: 740; }
.wordmark { display:block; width:148px; height:auto; max-height:56px; object-fit:contain; }
.site-header { background:#f7f6f1; color:var(--ink); border-bottom:1px solid var(--line); }
.hero { margin-top:14px; box-shadow:none; border-radius:18px; }
#nav { margin-top:12px; background:transparent; border:0; padding:0; gap:7px; }
#nav button { border:1px solid var(--line); background:var(--surface); }
#nav button[aria-current] { background:var(--forest); color:white; border-color:var(--forest); }
.group-card { box-shadow:none; }
.directory-card { border-top:1px solid var(--line); }
.archive { padding:12px 0; border-bottom:1px solid var(--line); }
.etiquette-check { width:100%; }
.hero p { max-width:46ch; }
.explainer p { color:var(--muted); }
.landing-intro { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:24px 0 4px; }
.landing-intro h2 { font-size:clamp(1.25rem,3vw,1.75rem); }
.landing-intro p { max-width:67ch; color:var(--muted); margin-top:7px; }
.landing-intro button { flex-shrink:0; }
@media (max-width:600px) { .landing-intro { display:grid; justify-items:start; gap:10px; } }

:root, :root[data-palette="teal"] {
  --paper:#edf6f4; --surface:#fff; --forest:#08665d; --hover:#07554e; --pine:#17393b;
  --ink:#183237; --muted:#4b6065; --line:#cddfdd; --brass:#b9f0e6; --hero-end:#0c6d65;
}
:root[data-palette="night"] {
  --paper:#f1eef5; --surface:#fffdfd; --forest:#45355c; --hover:#322646; --pine:#282544;
  --ink:#29223a; --muted:#5b5068; --line:#ded5e6; --brass:#efc2a1; --hero-end:#665071;
}
:root[data-palette="slate"] {
  --paper:#f0f3f5; --surface:#fff; --forest:#263b49; --hover:#1b2d39; --pine:#1f303a;
  --ink:#233641; --muted:#4e626b; --line:#d4dfe5; --brass:#d3eb92; --hero-end:#526c7c;
}
.site-header { background:var(--surface); }
#account-bar button { background:var(--forest); border-color:var(--forest); }
#account-bar button:hover { background:var(--hover); }
.hero {
  min-height:255px;
  background:linear-gradient(105deg,var(--pine) 5%,color-mix(in srgb,var(--pine) 94%, transparent) 42%,transparent 130%),
    url('/match-night.webp') center 57% / cover,var(--hero-end);
}
.hero h1 { font-size:clamp(2.45rem,7vw,4.75rem); }
.hero button.primary,.hero button.primary:hover { color:var(--pine); }
#nav { margin:0; padding:0; border-radius:0; background:var(--surface); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:10; }
#nav:empty { display:none; }
.nav-inner { position:relative; display:flex; gap:5px; min-height:58px; align-items:center; }
#nav button { position:relative; border:0; background:transparent; color:var(--muted); }
#nav button:hover { background:var(--paper); }
#nav button[aria-current] { color:var(--forest); background:var(--paper); }
.nav-icon { display:inline-block; margin-right:6px; font-weight:700; font-size:1.12rem; line-height:1; }
.nav-unread { position:absolute; width:8px; height:8px; top:8px; right:10px; border-radius:50%; background:var(--forest); }
.nav-menu {
  position:absolute; top:calc(100% + 7px); right:0; width:min(326px,100%);
  max-height:calc(100dvh - 145px); overflow-y:auto; overscroll-behavior:contain; padding:8px;
  background:var(--surface); border:1px solid var(--line); border-radius:13px;
  box-shadow:0 12px 34px #172c242e;
}
#nav button.more-active,#nav button[aria-expanded="true"] { color:var(--forest); background:var(--paper); }
.nav-menu-section { padding:3px 0; }
.nav-menu-section + .nav-menu-section { border-top:1px solid var(--line); margin-top:4px; padding-top:7px; }
.nav-menu-section h2 { padding:5px 10px 4px; color:var(--muted); font-size:.76rem; font-weight:700; line-height:1.3; letter-spacing:.025em; }
#nav .nav-menu button { display:flex; align-items:center; gap:8px; width:100%; padding:7px 10px; min-height:44px; text-align:left; color:var(--ink); font-size:.92rem; }
.menu-chevron { margin-inline-start:auto; color:var(--muted); font-size:1.25rem; line-height:1; }
.menu-new { padding:2px 6px; border-radius:5px; background:var(--paper); color:var(--forest); font-size:.72rem; }
#view { scroll-margin-top:72px; }
.signup-list,.live-list { display:grid; gap:8px; margin:0 0 12px; }
.signup-row,.empty-state,.live-group { background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.signup-row { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:12px 15px; }
.signup-row h3 { font-size:1rem; }
.signup-row p { margin-top:4px; color:var(--muted); font-size:.87rem; }
.signup-row .card-link { margin:0; text-align:center; flex-shrink:0; font-size:.86rem; }
.empty-state { color:var(--muted); padding:14px; }
.live-group summary { display:flex; justify-content:space-between; gap:12px; align-items:center; min-height:64px; padding:10px 15px; list-style:none; }
.live-group summary::-webkit-details-marker { display:none; }
.live-group summary::after { content:'+'; font-size:1.35rem; flex:none; }
.live-group[open] summary::after { content:'−'; }
.live-group summary small { display:block; margin-top:2px; color:var(--muted); font-weight:500; }
.live-group summary .live-leaders { display:grid; gap:3px; margin-top:5px; }
.live-leaders b { display:inline-block; min-width:2.1em; }
.live-group-body { border-top:1px solid var(--line); padding:12px 15px 15px; }
.live-group-body h4 { margin-top:10px; }
.completed-result { border-left:4px solid var(--forest); padding:14px 15px; }
.completed-result header { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.completed-result h3 { margin:0; }
.completed-result ol { display:grid; gap:5px; margin:10px 0; padding:0; list-style:none; }
.completed-result li > span:first-child { display:inline-block; min-width:2.2em; font-weight:700; }
.completed-result p { color:var(--muted); margin:6px 0; }
.result-badge { display:inline-block; border-radius:6px; padding:2px 8px; font-size:.875rem; font-weight:700; }
.completed-badge { background:var(--forest); color:#fff; }
.champion-badge { background:#f8e5ad; color:#493309; }
.form-card button:hover:not(:disabled), .card-link:hover, form button:hover:not(:disabled) { background:var(--hover); }
.palette-card { display:grid; text-align:left; align-content:start; background:var(--surface); border-color:var(--line); gap:6px; padding:16px; }
.palette-card[aria-pressed="true"] { border-color:var(--forest); outline:1px solid var(--forest); }
.palette-card > span:last-child { color:var(--muted); font-size:.88rem; }
.swatches { display:flex; gap:5px; }
.swatches span { width:42px; height:26px; border:1px solid var(--line); border-radius:5px; }
[data-color="#edf6f4"] { background:#edf6f4; } [data-color="#08665d"] { background:#08665d; } [data-color="#253b47"] { background:#253b47; }
[data-color="#f1eef5"] { background:#f1eef5; } [data-color="#282544"] { background:#282544; } [data-color="#b87749"] { background:#b87749; }
[data-color="#f0f3f5"] { background:#f0f3f5; } [data-color="#263b49"] { background:#263b49; } [data-color="#c1dc6f"] { background:#c1dc6f; }
@media(max-width:700px) {
  body { padding-bottom:calc(68px + env(safe-area-inset-bottom)); }
  #nav { position:fixed; inset:auto 0 0; padding-bottom:env(safe-area-inset-bottom); border-top:1px solid var(--line); border-bottom:0; }
  .nav-inner { min-height:61px; justify-content:space-between; }
  #nav .nav-inner > button { flex:1 1 0; min-width:0; padding:5px 2px; font-size:.72rem; white-space:nowrap; }
  .nav-icon { display:block; margin:0 auto 3px; }
  .nav-menu { top:auto; bottom:calc(100% + 7px); max-height:calc(100dvh - 88px - env(safe-area-inset-bottom)); }
  #view { scroll-margin-top:10px; }
  .hero { min-height:210px; }
  .signup-row { padding:10px 11px; gap:6px; }
  .signup-row .card-link { padding-inline:9px; }
  .hero p { margin-top:9px; }
  .hero .actions { margin-top:12px; }
}

.group-navigation { display: flex; flex-wrap: wrap; gap: .5rem; }
.group-navigation button[aria-current="page"] { outline: 2px solid currentColor; outline-offset: 2px; }
.message-log { max-height: 25rem; overflow-y: auto; overflow-wrap: anywhere; }
.group-card fieldset { border: 1px solid currentColor; border-radius: .65rem; }
.podium-rankings { margin-block: 0 1.15rem; }
.podium-rankings p { margin:4px 0 8px; color:var(--muted); font-size:.85rem; }
.podium-table { max-height:calc(9em + 78px); }
.podium-table thead { position:sticky; top:0; background:var(--surface); }
.podium-table :is(th, td) { padding:6px 9px; }
.prize-cards { margin-bottom:12px; }
.prize-admin { margin-bottom:14px; }
.prize-record { margin:10px 0; padding-bottom:10px; border-bottom:1px solid var(--line); }
.group-card .payout-help { flex-basis:100%; margin:0; color:var(--muted); }
.hero.group-hero { min-height: 0; padding: 1.25rem clamp(1rem,4vw,2.5rem); }
.hero.group-hero h1 { font-size: clamp(1.65rem,4.5vw,2.5rem); }
.hero.group-hero p { margin-top: .5rem; }
.hero.group-hero .actions { margin-top: .9rem; }

#hero-label { margin-top: 0; margin-bottom: .6rem; font-weight: 700; }
.hero:not(.group-hero) #summary { max-width: 55ch; }
.division-overview h4 { margin-top: .4rem; font-size: 1rem; }
.division-overview p, .division-introduction p { margin-top: .5rem; }
.division-overview .division-cap { margin-top: .25rem; color: var(--forest); font-weight: 700; }
.division-introduction { max-width: 67ch; margin-top: 1.5rem; }
.signup-row .signup-description { font-size: .88rem; color: var(--ink); }

.compact-stats :is(th, td) { padding: .55rem .6rem; font-size: .875rem; }
.compact-stats tr > :not(th[scope="row"]) { white-space: nowrap; }
.compact-stats thead { background: var(--paper); }
.stats-detail { margin-top: .75rem; }
.stats-detail dl { margin: .65rem 0 0; }
.stats-detail dl > div { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.stats-detail dd { margin: 0; font-weight: 700; }

.avatar-line, #account-bar .account-profile { display: inline-flex; gap: .55rem; align-items: center; }
.avatar { width: 2.5rem; height: 2.5rem; object-fit: cover; border-radius: 50%; flex: none; }
.avatar-initial { display: inline-grid; place-items: center; background: var(--paper); color: var(--forest); font-weight: 750; }
#account-bar .account-profile { background: transparent; color: var(--ink); border-color: transparent; padding: .2rem .35rem; }
#account-bar .avatar { width: 1.85rem; height: 1.85rem; }
#account-bar .account-profile span:not(.avatar) { max-width: 10ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.performance-row + .performance-row { border-top: 1px solid var(--line); }
.performance-row { padding: .6rem 0; }
.performance-row p { margin-top: .25rem; }
@media (max-width: 400px) {
  #account-bar .account-profile span:not(.avatar) { display: none; }
}
.prize-note { margin: 0 0 .8rem; }

.preference-switch { position: relative; display: inline-flex; align-items: center; min-height: 44px; }
.preference-switch input { position: absolute; inset: 0; margin: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.preference-switch > span { width: 3rem; height: 1.65rem; padding: .2rem; border-radius: 2rem; background: #83898a; pointer-events: none; }
.preference-switch > span::before { content: ''; display: block; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #fff; }
.preference-switch input:checked + span { background: var(--forest); }
.preference-switch input:checked + span::before { transform: translateX(1.3rem); }
.preference-switch input:disabled { cursor:not-allowed; }
.preference-switch input:disabled + span { background:#c3c7c9; }
.preference-row:has(input:disabled) { color:var(--muted); }
.preference-switch input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: 3px; }
.rule-reminder { margin-bottom: .75rem; }
.rule-text { white-space: pre-wrap; }
.report-schedule { margin-top: .8rem; }
.report-schedule ul { max-height: 24rem; overflow-y: auto; padding-inline-start: 1.25rem; }
.report-schedule li { margin-bottom: .45rem; }
.report-schedule li span { display: block; color: var(--muted); }
[id^="match-"] { scroll-margin-top: 72px; }

.table-payment-choices { flex:1 0 100%; min-width:0; padding:.75rem; }
.table-payment-choices > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; }
.table-payment-choices label.check { border:1px solid var(--line); border-radius:.5rem; min-height:4.25rem; padding:.55rem; cursor:pointer; }
.table-payment-choices input[type="radio"] { flex:none; width:1rem; min-height:auto; margin:0; accent-color:var(--forest); }
.table-payment-choices strong, .table-payment-choices small { display:block; }
.table-payment-choices small { color:var(--muted); font-weight:500; }
.table-payment-choices label:has(input:checked) { border-color: var(--forest); background: var(--paper); }
.table-payment-choices p { margin-top: .55rem; }

.league-snapshot { margin-block: clamp(16px,3vw,28px) 12px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.snapshot-overview { padding:clamp(16px,3vw,24px); }
.league-snapshot h2 { font-size:clamp(1rem,2vw,1.2rem); }
.snapshot-headline { margin-top:5px; color:var(--ink); font-size:clamp(1.35rem,4vw,2.35rem); line-height:1.2; letter-spacing:-.03em; }
.snapshot-headline strong { color:var(--forest); font-weight:780; font-variant-numeric:tabular-nums; }
.snapshot-note { margin-top:9px; color:var(--muted); font-size:.82rem; }
.league-snapshot .landing-panel { margin:0; border:none; border-top:1px solid var(--line); border-radius:0 0 16px 16px; }
.league-invite { display:flex; flex-wrap:wrap; align-items:end; gap:10px 16px; margin-top:20px; }
.league-invite > div { flex-basis:100%; }
.league-invite label { display:grid; flex:1 1 240px; gap:4px; min-width:0; font-size:.85rem; font-weight:650; }
.league-invite :is(input, select) { width:100%; }
#invite-group-status { flex-basis:100%; margin:0; color:var(--muted); }
.landing-panel { margin-block:12px; background:var(--surface); border:1px solid var(--line); border-radius:14px; }
#view > .landing-panel { margin-top:20px; }
.landing-panel > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; list-style:none; }
.landing-panel > summary::-webkit-details-marker { display:none; }
.landing-panel > summary strong { display:block; font-size:1.12rem; }
.landing-panel > summary small { display:block; color:var(--muted); font-size:.85rem; font-weight:500; }
.landing-panel > summary::after { content:'+'; flex:none; font-size:1.4rem; }
.landing-panel[open] > summary::after { content:'−'; }
.landing-panel-body { padding:12px 15px 5px; border-top:1px solid var(--line); }
.division-signups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.division-signup .landing-panel { margin-bottom:0; background:var(--paper); }
.division-signup .signup-list { margin:0 0 7px; }
.division-signup .signup-row { padding:8px 10px; background:var(--paper); }
.division-signup .signup-row h4 { font-size:.92rem; }
.division-signup .signup-row p { margin:3px 0 0; }
.feature-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.feature-grid .group-card p { color:var(--muted); }
@media (max-width:800px) {
  .division-signups { grid-template-columns:1fr; }
  .feature-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:540px) {
  .feature-grid { grid-template-columns:1fr; }
}

.stat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.45rem; padding:0; }
.stat-grid { margin:.65rem 0; }
.stat-grid > div { min-width:0; overflow-wrap:anywhere; padding:.55rem .4rem; background:var(--paper); border-radius:9px; display:flex; flex-direction:column-reverse; justify-content:flex-end; }
.stat-grid dt, .stat-note { color:var(--muted); font-size:.8rem; }
.stat-grid dd, .stat-total { margin:0; color:var(--forest); font-weight:800; font-variant-numeric:tabular-nums; }
.stat-grid dd { font-size:1.22rem; }
.group-card .stat-total { font-size:1.95rem; line-height:1.15; margin:.65rem 0; }
.stat-form { display:flex; flex-wrap:wrap; align-items:baseline; gap:.4rem; }
.recent-form { display:flex; flex-wrap:wrap; gap:.45rem; padding:0; margin:.4rem 0 .6rem; list-style:none; }
.recent-form li { min-width:1.7rem; border-radius:6px; background:var(--paper); color:var(--muted); text-align:center; font-weight:700; }
.recent-form li.form-win { background:var(--forest); color:white; }

.about-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:12px; margin-top:20px; max-width:680px; }
.about-actions > :is(button,a.card-link) { display:flex; align-items:center; justify-content:center; width:100%; min-height:48px; margin:0; padding:12px 16px; text-align:center; line-height:1.5; }
@media(max-width:540px) { .about-actions { grid-template-columns:1fr; } }

.preferred-games,.credit-box{flex:1 0 100%;min-width:0}.preferred-games summary{cursor:pointer;padding:.8rem;border:1px solid var(--line);border-radius:9px;font-weight:700}.credit-box{padding:1rem;border:1px solid var(--line);border-radius:12px}.credit-box h4{margin:0 0 .5rem}.credit-box p{color:var(--muted);margin:.5rem 0}.credit-box input{max-width:16rem}

.attendance-clock{border:1px solid var(--line);border-left:4px solid var(--forest);border-radius:10px;padding:1rem;margin:.8rem 0}.attendance-clock h4{margin:0 0 .5rem}.attendance-clock [data-arrival-start]{font-variant-numeric:tabular-nums;font-size:1.5rem;display:block}

/* Consistent player and operator layouts. */
:root, :root[data-palette="teal"] {
  --paper:#f3f7f5; --surface:#ffffff; --forest:#145546; --hover:#104538;
  --pine:#163b34; --ink:#18352e; --muted:#52675f; --line:#d8e3de; --brass:#c4eee1;
}
body { -webkit-font-smoothing:antialiased; }
.frame { width:min(calc(100% - 48px),1120px); }
.header-inner { min-height:88px; }
main.frame { padding-bottom:32px; }
h2 { font-size:clamp(1.65rem,3.2vw,2.3rem); line-height:1.17; letter-spacing:-.035em; }
h3 { line-height:1.35; letter-spacing:-.015em; }
p { line-height:1.65; }
.section-head { margin:36px 0 18px; }
.section-head p { max-width:68ch; margin-top:9px; }
.hero { margin-top:28px; border-radius:24px; padding:clamp(28px,5vw,56px); box-shadow:none; }
.hero h1 { max-width:14ch; font-size:clamp(2.5rem,5.8vw,4.7rem); line-height:1.04; }
.hero p { max-width:48ch; font-size:1.05rem; }
.hero.group-hero { min-height:0; padding:28px 32px; }
.hero.group-hero h1 { max-width:none; font-size:clamp(1.8rem,3.7vw,2.8rem); }
button,.card-link,a.button { min-height:48px; padding:11px 18px; border-radius:10px; line-height:1.35; font-weight:650; transition:background .15s,border-color .15s; }
button { border-color:var(--line); background:var(--surface); }
button:hover:not(:disabled) { background:var(--paper); border-color:var(--forest); }
form button,.card-link,a.button { justify-content:center; text-align:center; background:var(--forest); border-color:var(--forest); color:#fff; }
form button:hover:not(:disabled),.card-link:hover,a.button:hover { background:var(--hover); color:#fff; }
button:disabled { opacity:1; color:#74817b; background:#e7ece9; border-color:#dde4e0; cursor:not-allowed; }
input,select,textarea { min-height:48px; padding:11px 13px; background:var(--surface); border-color:#bdcdc4; border-radius:9px; }
input:disabled { background:var(--paper); color:var(--muted); }
form { gap:16px; }
form label { font-size:.9rem; gap:7px; }
form label.check { line-height:1.5; }
.group-card,.snapshot-card { padding:24px; border-radius:18px; box-shadow:none; }
.group-card p { margin:10px 0; }
.card-grid { gap:20px; margin-block:16px 28px; }
.signup-list,.live-list { gap:12px; }
.signup-row { padding:18px 20px; border-radius:14px; gap:20px; }
.signup-row h3 { font-size:1.05rem; }
.signup-row .card-link { min-width:136px; font-size:.9rem; }
.landing-intro { padding:26px; gap:24px; margin-block:16px; border-radius:18px; }
.landing-intro p { max-width:65ch; margin-top:8px; }
.landing-intro button { min-width:180px; }
.league-snapshot { margin-top:24px; border-radius:18px; }
.snapshot-overview { padding:26px; }
.snapshot-note,.landing-panel > summary small { font-size:.9rem; }
.live-group summary,.landing-panel > summary { padding:18px 20px; }
.live-group-body,.landing-panel-body { padding:20px; }
.group-setup form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.group-setup form > :is(p,.check,button) { grid-column:1/-1; }
.group-name-preview { background:var(--paper); border-radius:10px; padding:14px 16px; color:var(--forest); font-weight:750; }
.form-help,.feed-note { color:var(--muted); }
.group-publish-status,.launch-readiness,.status-note { flex:1 0 100%; padding:16px 18px; background:var(--paper); border:1px solid var(--line); border-radius:12px; }
.group-card.actions { align-items:stretch; gap:20px; }
.group-card.actions > form { flex:1 0 100%; }
.group-card.actions > form[data-action="syncLmsSchedule"] > :is(h3,p) { flex-basis:100%; }
.group-card.actions > form[data-action="syncLmsSchedule"] label { flex-basis:60%; }
.group-card > summary { padding-block:4px; font-size:1.1rem; }
footer { gap:24px; align-items:center; }
@media(max-width:700px) {
 .frame { width:calc(100% - 32px); }
 .header-inner { min-height:80px; }
 .hero { margin-top:20px; border-radius:20px; }
 .hero.group-hero { padding:24px; }
 .group-card,.snapshot-card,.snapshot-overview { padding:20px; }
 .landing-intro { padding:22px; }
 .signup-row { flex-wrap:wrap; padding:18px; gap:14px; }
 .signup-row > div { flex:1 1 100%; }
 .signup-row .card-link { width:100%; }
 .group-setup form { grid-template-columns:1fr; }
 .group-card.actions > form > button { width:100%; justify-content:center; }
 .section-head { margin-top:28px; }
}
@media(prefers-reduced-motion:reduce) { button,.card-link { transition:none; } }
.auth-grid { grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); align-items:start; }
.auth-grid form { display:grid; grid-template-columns:minmax(0,1fr); gap:18px; margin-top:22px; }
.auth-grid form > button { width:100%; margin-top:4px; }
.auth-grid .group-card > button { margin-top:14px; border:0; padding-inline:0; color:var(--forest); text-decoration:underline; text-underline-offset:4px; }
.auth-grid form > details { padding:14px 16px; border:1px solid var(--line); border-radius:10px; }
@media(max-width:760px) { .auth-grid { grid-template-columns:minmax(0,1fr); } }

.about-actions{grid-auto-rows:1fr}
.about-actions > :is(button,a.card-link){height:100%}
.forgot-password-button{margin-top:12px}
#notice:not(:empty){position:sticky;top:12px;z-index:8;box-shadow:0 2px 8px #0002}

.venue-intro{max-width:72ch;margin:0 0 20px}
.venue-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:14px}
.venue-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:18px;border:1px solid #c8d1c6;border-radius:12px;background:#f5f7f1;color:#203f35}
.venue-card h3{margin:0;font-size:1.08rem;line-height:1.3}
.venue-card p{margin:0}
.venue-table-size{padding:3px 9px;border-radius:5px;background:#e1ebdf;color:#21483c;font-weight:700;font-size:.875rem}
.venue-note{font-size:.875rem;line-height:1.45}
.venue-map{display:inline-flex;align-items:center;min-height:44px;margin-top:auto;color:#21483c;font-weight:700;text-underline-offset:3px}
.venue-map:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.venue-footer{margin:18px 0 0}

.password-field{display:flex;align-items:end;gap:8px}
.password-field>label{flex:1;min-width:0}
.password-field .password-toggle{flex:none;margin:0;min-height:42px}

/* Group and opponent conversations */
.messenger{display:grid;grid-template-columns:minmax(205px,30%) minmax(0,1fr);border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--surface);box-shadow:0 8px 28px #142b2410}
.thread-rail{min-width:0;border-right:1px solid var(--line);padding:16px 8px;max-height:680px;overflow:auto}
.thread-rail h3{margin:0 12px 14px;color:var(--muted);font-size:.82rem}
button.thread-row{display:flex;align-items:center;gap:10px;width:100%;background:transparent;color:var(--ink);border:0;text-align:left;border-radius:12px;padding:10px;box-shadow:none}
.thread-row[aria-pressed=true]{background:var(--forest);color:white}.thread-row>span:last-child{min-width:0}.thread-row strong,.thread-row small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.thread-row small{font-weight:400;opacity:.8}
.thread-icon{width:38px;height:38px;flex:none;display:grid;place-items:center;border-radius:12px;color:var(--pine);background:var(--brass);font:bold 1.45rem Georgia,serif}.thread-row .avatar,.thread-heading .avatar{width:38px;height:38px;flex:none}
.thread-main{min-width:0;display:flex;flex-direction:column}.thread-heading{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line)}.thread-heading p,.thread-booking p{font-size:.88rem;color:var(--muted)}
.thread-booking{padding:10px 20px;border-bottom:1px solid var(--line)}.booking-tools summary,.lobby-tools summary{cursor:pointer;padding:8px 0;font-weight:650;color:var(--forest)}.booking-tools .actions{margin-top:8px}
.thread-log{background:color-mix(in srgb,var(--paper) 72%,var(--surface));height:clamp(290px,49vh,540px);overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:7px;padding:16px clamp(12px,3vw,32px)}
.thread-day,.room-older,.thread-empty{align-self:center}.thread-day{position:relative;margin:8px 0 5px;padding:3px 12px;border-radius:12px;background:var(--surface);color:var(--muted);font-size:.76rem;font-weight:650}
.thread-bubble{max-width:min(82%,56ch);padding:8px 12px;box-shadow:0 1px 3px #18332515}.thread-bubble.incoming{align-self:flex-start;background:var(--surface);border:1px solid var(--line);border-radius:4px 15px 15px 15px}.thread-bubble.outgoing{align-self:flex-end;background:var(--forest);color:white;border-radius:15px 4px 15px 15px}.thread-bubble strong{font-size:.78rem;color:var(--forest)}.thread-bubble p{color:inherit;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45}.thread-bubble time{display:block;text-align:right;font-size:.7rem;opacity:.8}
.thread-composer{display:flex;align-items:end;gap:10px;margin:0;padding:12px 16px;border-top:1px solid var(--line)}.thread-composer textarea{min-height:44px;max-height:140px;flex:1;resize:vertical;padding:10px 12px;border-radius:14px}.thread-composer button{background:var(--forest);color:white;border-radius:14px;min-height:44px}
.lobby-tools{margin:16px 0}.thread-empty{color:var(--muted);margin:auto;text-align:center}.thread-row:hover{background:var(--paper);color:var(--ink)}.match-clock{padding:12px 16px;margin:10px 0;border-left:3px solid var(--brass);background:var(--surface)}.match-clock strong{font-variant-numeric:tabular-nums;font-size:1.45rem}
@media(max-width:680px){.messenger{grid-template-columns:1fr;border-radius:14px}.thread-rail{display:flex;align-items:center;gap:5px;padding:6px 8px;overflow-x:auto;border-right:0;border-bottom:1px solid var(--line)}.thread-rail h3,.thread-rail small{display:none}.thread-rail .thread-row{width:auto;max-width:160px;flex:none;min-height:44px;padding:5px 9px;gap:6px}.thread-row .avatar,.thread-row .thread-icon{width:27px;height:27px;font-size:.85rem}.thread-heading,.thread-booking{padding:10px 13px}.thread-log{height:clamp(230px,45dvh,490px);padding:10px}.thread-bubble{max-width:88%}.thread-composer{padding:8px}.thread-composer textarea{min-width:0}}
