:root {
  color-scheme: light;
  --teal: #155e86;
  --teal-deep: #124765;
  --teal-dark: #0d3954;
  --teal-pale: #c9dfea;
  --ink: #243541;
  --muted: #74838c;
  --line: #e3eaed;
  --paper: #ffffff;
  --canvas: #f4f7f8;
  --gold: #f2bf58;
  --shadow: 0 18px 48px rgba(36, 53, 65, .08);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.account-dialog { width: min(460px, calc(100vw - 32px)); padding: 34px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); box-shadow: 0 24px 80px rgba(20,40,50,.25); }
.account-dialog::backdrop { background: rgba(20,36,43,.58); backdrop-filter: blur(3px); }
.account-dialog h2 { margin: 8px 0; font: 700 26px/1.2 "Manrope", sans-serif; }
.account-dialog > p { margin: 0 0 20px; color: var(--muted); line-height: 1.5; }
.account-dialog-close { position: absolute; top: 13px; right: 15px; border: 0; background: transparent; color: var(--muted); font-size: 26px; cursor: pointer; }
.account-dialog-form { display: grid; gap: 14px; }
.account-dialog-form label { display: grid; gap: 7px; color: #52636d; font-size: 12px; font-weight: 700; }
.account-dialog-form input { min-height: 44px; padding: 10px 12px; border: 1px solid #dce5e8; border-radius: 7px; color: var(--ink); font: 500 14px "DM Sans", sans-serif; }
.account-mode-toggle, .account-logout, .account-admin-link { display: block; margin-top: 14px; border: 0; background: transparent; color: var(--teal-deep); font: 700 12px "DM Sans", sans-serif; text-align: center; text-decoration: none; cursor: pointer; }
.account-signed-in { padding: 14px; border-radius: 8px; background: #f4f8f8; color: var(--ink); font-size: 14px; }
.update-notice { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 12px 52px; background: #243541; color: #fff; box-shadow: 0 6px 20px rgba(20,40,50,.16); }
.update-notice > span { display: grid; gap: 2px; }
.update-notice strong { font-size: 13px; }
.update-notice small { color: #d0e1e3; font-size: 11px; }
.update-notice a { padding: 8px 12px; border-radius: 6px; background: #fff; color: var(--teal-deep); font-size: 12px; font-weight: 800; text-decoration: none; }
.update-notice button { position: absolute; right: 16px; top: 50%; border: 0; background: transparent; color: white; font-size: 22px; transform: translateY(-50%); cursor: pointer; }
@media (max-width: 620px) { .update-notice { justify-content: flex-start; gap: 10px; padding: 10px 42px 10px 14px; } .update-notice a { margin-left: auto; white-space: nowrap; } }

.topbar { height: 72px; background: var(--teal); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 8px rgba(27, 89, 92, .08); }
.topbar-inner { max-width: 1200px; padding: 0 30px; height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font: 800 25px/1 "Manrope", sans-serif; letter-spacing: -.9px; white-space: nowrap; }
.brand-mark-image { display: block; width: 38px; height: 34px; object-fit: contain; flex: 0 0 auto; }
.main-nav { height: 100%; display: flex; align-items: center; gap: 36px; margin-left: 90px; margin-right: auto; }
.nav-link { height: 100%; display: inline-flex; align-items: center; color: rgba(255,255,255,.82); font-size: 13px; font-weight: 600; position: relative; transition: color .2s; }
.nav-coming-soon { gap: 7px; cursor: default; opacity: .8; }
.nav-coming-soon small { border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 2px 6px; font-size: 9px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link.active::after { content: ""; position: absolute; height: 2px; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 3px 3px 0 0; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.profile-button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: #fff; font-size: 12px; font-weight: 600; padding: 6px 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.24); border: 1px solid rgba(255,255,255,.4); font-size: 12px; }
.chevron { opacity: .8; font-size: 17px; margin-left: 1px; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; }
.menu-toggle span { display: block; width: 19px; height: 2px; background: #fff; margin: 4px; border-radius: 2px; }

main { min-height: calc(100vh - 150px); }
.page { max-width: 1200px; padding: 0 30px 62px; margin: 0 auto; }
.hero-shell { min-height: 462px; background: #e6f2f2; margin-top: 26px; border-radius: 7px; padding: 65px 72px 45px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; overflow: hidden; position: relative; }
.hero-shell::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; top: -220px; border-radius: 50%; background: rgba(255,255,255,.42); }
.hero-copy { position: relative; z-index: 2; max-width: 510px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-deep); font-size: 10px; line-height: 1.2; font-weight: 800; letter-spacing: 1.25px; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(242,191,88,.19); }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 { font: 800 clamp(38px, 4.5vw, 55px)/1.08 "Manrope", sans-serif; letter-spacing: -2.5px; margin: 20px 0 15px; color: #243943; }
.hero-copy h1 span { color: var(--teal-deep); }
.hero-copy > p { color: #63747d; font-size: 14px; line-height: 1.75; max-width: 415px; margin-bottom: 25px; }
.hero-actions { display: flex; align-items: center; gap: 14px; }
.button { border: 1px solid transparent; border-radius: 5px; padding: 12px 17px; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 15px; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--teal-deep); box-shadow: 0 7px 17px rgba(50,140,145,.18); }
.button-primary:hover { background: #267e83; box-shadow: 0 10px 20px rgba(50,140,145,.22); }
.button-quiet { color: #50616a; border-color: #dce5e8; background: rgba(255,255,255,.7); }
.button-quiet:hover { border-color: #b9cccf; background: #fff; }
.button-light { color: var(--teal-dark); background: #fff; }
.button-light:hover { background: #f7fbfb; }
.hero-proof { display: flex; align-items: center; gap: 12px; margin-top: 29px; color: #72828a; font-size: 11px; }
.hero-proof strong { color: #53656e; }
.avatar-stack { display: flex; padding-left: 3px; }
.avatar-stack span { width: 24px; height: 24px; border-radius: 50%; background: #e0b564; border: 2px solid #e6f2f2; color: #fff; display: grid; place-items: center; margin-left: -4px; font-size: 9px; font-weight: 800; }
.avatar-stack span:nth-child(2) { background: #558d9c; }
.avatar-stack span:nth-child(3) { background: #344e67; }
.avatar-stack span:nth-child(4) { background: #fff; color: var(--teal-deep); }

.hero-art { height: 330px; max-width: 495px; width: 100%; justify-self: end; position: relative; display: grid; place-items: center; }
.art-orbit { position: absolute; border: 1px solid rgba(62,153,157,.18); border-radius: 50%; transform: rotate(-23deg); }
.orbit-one { width: 395px; height: 240px; }
.orbit-two { width: 315px; height: 195px; transform: rotate(33deg); border-color: rgba(242,191,88,.35); }
.match-card { position: relative; z-index: 2; width: 335px; height: 185px; padding: 19px 21px; border-radius: 7px; background: rgba(255,255,255,.94); box-shadow: 0 22px 60px rgba(44,93,103,.17); transform: rotate(-4deg); }
.match-top, .match-bottom { display: flex; justify-content: space-between; align-items: center; }
.live-pill { display: flex; gap: 6px; align-items: center; color: #788991; font-size: 8px; font-weight: 800; letter-spacing: .65px; }
.live-pill i, .preview-live i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #52b98c; box-shadow: 0 0 0 3px rgba(82,185,140,.14); }
.match-date { color: #a0abb0; font-size: 8px; font-weight: 700; letter-spacing: .55px; }
.match-teams { display: flex; justify-content: center; align-items: center; gap: 21px; padding: 24px 0 20px; }
.team-badge { height: 48px; width: 48px; border-radius: 50%; display: grid; place-items: center; font: 800 13px "Manrope", sans-serif; color: #fff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.45), 0 4px 10px rgba(27,58,67,.15); }
.badge-blue { background: linear-gradient(145deg, #53a5bf, #2e637c); }
.badge-gold { background: linear-gradient(145deg, #e4bb67, #b58237); }
.match-score { display: flex; align-items: center; gap: 11px; font: 800 20px "Manrope", sans-serif; color: #374b56; }
.match-score span { font-size: 8px; color: #a0adb2; letter-spacing: 1px; }
.match-bottom { border-top: 1px solid #edf1f2; padding-top: 10px; color: #94a0a6; font-size: 9px; font-weight: 600; }
.match-arrow { font-size: 17px; color: var(--teal-deep); }
.floating-stat { position: absolute; right: -5px; top: 35px; z-index: 3; display: flex; align-items: center; gap: 10px; background: #fff; padding: 11px 13px; border-radius: 6px; box-shadow: 0 9px 28px rgba(44,93,103,.12); transform: rotate(3deg); }
.floating-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; color: #b68131; background: #fbf0d9; font-size: 16px; }
.floating-stat strong, .floating-stat small { display: block; }
.floating-stat strong { color: #30444d; font: 800 12px "Manrope", sans-serif; }
.floating-stat small { color: #8b999e; font-size: 8px; margin-top: 2px; }
.stat-trend { color: #45a37b; font-size: 12px; margin-left: 3px; }
.art-ball { position: absolute; bottom: 22px; right: 32px; height: 48px; width: 48px; border-radius: 50%; background: #fff; border: 6px solid #f3f6f6; box-shadow: 0 9px 25px rgba(42,97,105,.15); }
.art-ball::before, .art-ball::after { content: ""; position: absolute; background: #394e57; }
.art-ball::before { width: 14px; height: 14px; left: 11px; top: 5px; clip-path: polygon(50% 0,100% 35%,80% 100%,20% 100%,0 35%); }
.art-ball::after { width: 40px; height: 1px; top: 17px; left: -3px; transform: rotate(40deg); opacity: .75; }
.art-label { position: absolute; bottom: 40px; left: 10px; display: flex; align-items: center; gap: 8px; color: var(--teal-deep); font: 800 9px/1.25 "Manrope", sans-serif; letter-spacing: 1px; transform: rotate(-8deg); }
.art-label-line { height: 1px; width: 24px; background: var(--gold); }

.stats-strip { background: #fff; border: 1px solid #edf1f3; box-shadow: 0 7px 22px rgba(31,61,69,.03); border-radius: 6px; padding: 18px 34px; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.stat-item { display: flex; align-items: center; gap: 12px; padding: 2px 18px; border-right: 1px solid #edf0f1; }
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: 0; }
.stat-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-pale); color: var(--teal-deep); font-size: 14px; }
.stat-item:nth-child(2) .stat-icon { background: #fdf3df; color: #b7832c; }
.stat-item:nth-child(3) .stat-icon { background: #ecf1f8; color: #657ea0; }
.stat-item:nth-child(4) .stat-icon { background: #f9eaea; color: #d07676; }
.stat-item strong, .stat-item small { display: block; }
.stat-item strong { font: 800 15px "Manrope", sans-serif; letter-spacing: -.35px; }
.stat-item small { color: #8c999f; font-size: 10px; margin-top: 2px; }
.section-block { margin-top: 62px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.section-heading h2 { font: 700 24px "Manrope", sans-serif; letter-spacing: -.8px; margin: 8px 0 0; }
.text-link { border: 0; background: transparent; color: var(--teal-deep); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 9px; padding: 6px 0; }
.text-link:hover { color: #1b7378; }
.text-link span { font-size: 17px; font-weight: 500; }
.game-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.game-card { min-height: 134px; background: #fff; border: 1px solid #e8edef; border-radius: 6px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .18s, box-shadow .18s, border .18s; cursor: pointer; }
.game-card:hover { transform: translateY(-3px); border-color: #b7d9d9; box-shadow: 0 10px 24px rgba(41,94,99,.08); }
.game-card-top { display: flex; align-items: start; justify-content: space-between; }
.game-emblem { width: 39px; height: 39px; border-radius: 9px; display: grid; place-items: center; color: var(--teal-dark); font: 800 11px "Manrope", sans-serif; background: linear-gradient(135deg, #d7e8f2, #b7d2e2); }
.game-card:nth-child(2n) .game-emblem { color: #8c6228; background: linear-gradient(135deg, #fff4df, #f5ddb0); }
.game-card:nth-child(3n) .game-emblem { color: #506c91; background: linear-gradient(135deg, #edf3fb, #d6e0ef); }
.game-arrow { color: #98a8ae; font-size: 16px; }
.game-card h3 { font: 700 12px "Manrope", sans-serif; margin: 12px 0 1px; }
.game-card p { color: #98a4a9; margin: 0; font-size: 9px; }
.organizer-cta { margin-top: 60px; border-radius: 7px; background: #348d92; color: #fff; display: flex; align-items: center; gap: 20px; padding: 30px 37px; position: relative; overflow: hidden; }
.organizer-cta::after { content: ""; position: absolute; width: 310px; height: 310px; right: 70px; top: -200px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 0 0 34px rgba(255,255,255,.04), 0 0 0 72px rgba(255,255,255,.04); }
.organizer-cta .eyebrow { color: #c8eeee; font-size: 9px; }
.organizer-cta h2 { font: 700 21px "Manrope", sans-serif; margin: 6px 0 4px; letter-spacing: -.5px; }
.organizer-cta p { color: rgba(255,255,255,.72); font-size: 11px; margin: 0; }
.organizer-cta .button { margin-left: auto; position: relative; z-index: 1; }
.cta-mark { height: 50px; width: 50px; border: 1px solid rgba(255,255,255,.35); display: grid; place-items: center; border-radius: 50%; position: relative; flex: 0 0 auto; color: #fff; font: 800 14px "Manrope", sans-serif; }
.cta-mark span { z-index: 1; }
.cta-mark i { position: absolute; height: 1px; width: 32px; background: rgba(255,255,255,.35); transform: rotate(45deg); }

.create-view, .list-view, .detail-view, .draw-view, .help-view { padding-top: 25px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: #98a5ab; font-size: 10px; margin-bottom: 27px; }
.breadcrumb button { padding: 0; border: 0; background: transparent; color: #74858d; font-size: inherit; }
.breadcrumb button:hover { color: var(--teal-deep); }
.breadcrumb strong { color: #53656d; font-weight: 700; }
.page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-title-row h1, .help-view > h1 { font: 800 30px/1.2 "Manrope", sans-serif; letter-spacing: -1.1px; margin: 7px 0 6px; }
.page-title-row p { margin: 0; color: var(--muted); font-size: 12px; }
.draft-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 20px; border: 1px solid #dee8e9; background: #fff; color: #849398; font-size: 9px; font-weight: 700; }
.draft-pill span { width: 6px; height: 6px; border-radius: 50%; background: #e7b44f; }
.create-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 20px; }
.tournament-form { display: flex; flex-direction: column; gap: 14px; }
.form-card, .preview-card, .help-card { border: 1px solid #e5ebed; border-radius: 6px; background: #fff; box-shadow: 0 3px 12px rgba(36,53,65,.025); }
.form-card { padding: 22px 24px 23px; }
.card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.number-badge { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 5px; color: var(--teal-deep); background: var(--teal-pale); font: 800 10px "Manrope", sans-serif; }
.card-heading h2 { margin: 0 0 3px; font: 700 16px "Manrope", sans-serif; letter-spacing: -.35px; }
.card-heading p { margin: 0; color: #93a0a5; font-size: 10px; }
.field-label { display: flex; gap: 4px; align-items: baseline; color: #43555e; font-size: 10px; font-weight: 800; margin-bottom: 7px; }
.required-mark { color: #d47867; font-weight: 800; }
.optional-mark { color: #9aa6ab; font-size: 9px; font-weight: 500; margin-left: 4px; }
.text-input, .select-input { display: block; width: 100%; border: 1px solid #dce5e8; border-radius: 4px; background: #fff; color: #384b54; height: 39px; padding: 0 12px; font-size: 11px; outline: none; transition: border .16s, box-shadow .16s; }
.text-input::placeholder { color: #adb8bc; }
.text-input:focus, .select-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(21,94,134,.18); }
.select-input { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2378878f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.field-hint-row { display: flex; justify-content: space-between; margin-top: 5px; color: #a1adb2; font-size: 9px; }
.field-grid { display: grid; gap: 13px; }
.field-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.top-gap { margin-top: 18px; }
.top-gap-small { margin-top: 14px; }
.ranking-box { margin-top: 18px; border-radius: 4px; background: #f8fafb; border: 1px solid #eaf0f1; padding: 12px 13px; }
.switch-row { min-height: 32px; display: flex; align-items: center; gap: 11px; position: relative; cursor: pointer; }
.switch-copy { display: flex; flex-direction: column; gap: 2px; }
.switch-copy strong, .check-row strong { color: #43555e; font-size: 10px; font-weight: 800; }
.switch-copy small, .check-row small { display: block; color: #8e9ca2; font-size: 9px; line-height: 1.5; margin-top: 3px; font-weight: 400; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 30px; height: 17px; background: #d5dfe1; border-radius: 20px; margin-left: auto; position: relative; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; width: 11px; height: 11px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: transform .2s; }
.switch-row input:checked + .switch-ui { background: var(--teal-deep); }
.switch-row input:checked + .switch-ui::after { transform: translateX(13px); }
.ranking-name { margin-top: 13px; }
.format-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.format-choice { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 60px; background: #fff; border: 1px solid #e3e9eb; border-radius: 4px; text-align: left; padding: 9px 11px; transition: border .15s, background .15s, box-shadow .15s; }
.format-choice:hover { border-color: #b5d7d8; background: #fbfefe; }
.format-choice.selected { border-color: var(--teal-deep); background: #edf4f8; box-shadow: inset 0 0 0 1px var(--teal-deep); }
.format-choice:last-child { grid-column: 1 / -1; }
.format-icon { width: 33px; height: 33px; border-radius: 4px; flex: 0 0 auto; display: grid; place-items: center; background: #dce9f0; color: var(--teal-deep); font-size: 17px; }
.format-choice:nth-child(2) .format-icon, .format-choice:nth-child(4) .format-icon { background: #f7f0e3; color: #ae843f; }
.format-choice strong, .format-choice small { display: block; }
.format-choice strong { font-size: 9px; color: #42555e; }
.format-choice small { font-size: 8px; color: #92a0a5; margin-top: 3px; }
.radio-dot { margin-left: auto; width: 13px; height: 13px; flex: 0 0 auto; border-radius: 50%; border: 1px solid #cbd7da; position: relative; }
.format-choice.selected .radio-dot { border-color: var(--teal-deep); }
.format-choice.selected .radio-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; position: absolute; inset: 2px; background: var(--teal-deep); }
.format-config { margin-top: 18px; padding-top: 1px; }
.config-divider { display: flex; align-items: center; gap: 10px; color: #91a0a5; font-size: 8px; font-weight: 800; letter-spacing: .9px; margin: 0 0 15px; }
.config-divider::after { content: ""; height: 1px; background: #e8edef; flex: 1; }
.toggle-list { border: 1px solid #e9eef0; border-radius: 4px; overflow: hidden; }
.check-row { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #edf1f2; }
.check-row:last-child { border-bottom: 0; }
.check-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { width: 14px; height: 14px; flex: 0 0 auto; border: 1px solid #cbd6d9; border-radius: 3px; background: #fff; position: relative; }
.check-row input:checked + .check-box { border-color: var(--teal-deep); background: var(--teal-deep); }
.check-row input:checked + .check-box::after { content: ""; width: 7px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; position: absolute; left: 3px; top: 3px; transform: rotate(-45deg); }
.check-row:focus-within .check-box, .switch-row:focus-within .switch-ui { outline: 3px solid rgba(112,185,187,.25); }
.inline-note { display: flex; align-items: start; gap: 7px; color: #72878d; background: #f3f9f9; border: 1px solid #dbeeee; border-radius: 4px; padding: 9px 11px; font-size: 9px; line-height: 1.55; margin-top: 13px; }
.inline-note > span:first-child { color: var(--teal-deep); font-size: 12px; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; background: #f2f6f7; border-radius: 4px; }
.segmented-control label { cursor: pointer; }
.segmented-control input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented-control span { display: block; text-align: center; color: #87959b; border-radius: 3px; padding: 8px 6px; font-size: 9px; font-weight: 700; }
.segmented-control input:checked + span { color: var(--teal-dark); background: #fff; box-shadow: 0 1px 4px rgba(37,65,72,.1); }
.segmented-control input:focus-visible + span { outline: 2px solid var(--teal); }
.choice-hint { margin: 6px 0 0; color: #a0abb0; font-size: 8px; line-height: 1.5; }
.bordered-list { margin-top: 20px; }
.money-input { display: flex; align-items: center; height: 39px; border: 1px solid #dce5e8; border-radius: 4px; padding: 0 11px; color: #94a2a8; font-size: 10px; }
.money-input:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(21,94,134,.18); }
.money-input input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; padding: 0 6px; color: #384b54; font-size: 11px; background: transparent; }
.textarea-short { min-height: 60px; height: 60px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.form-footer { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 0; color: #98a5aa; font-size: 9px; }
.form-footer > div { display: flex; align-items: center; gap: 8px; }
.form-footer .button { padding: 11px 14px; font-size: 10px; }
.roster-card { overflow: visible; position: relative; z-index: 2; }
.roster-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.roster-list-section { min-width: 0; }
.roster-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 45px; padding-bottom: 10px; border-bottom: 1px solid #e7edef; }
.roster-section-heading > div { display: grid; gap: 3px; }
.roster-section-heading strong, .draw-toolbar strong { color: #29424d; font-size: 12px; }
.roster-section-heading small, .draw-toolbar small { color: #8b9aa0; font-size: 10px; }
.roster-add { padding: 8px 10px; font-size: 10px; gap: 5px; }
.roster-input-list { display: grid; gap: 7px; padding-top: 10px; overflow: visible; }
.roster-entry { display: flex; align-items: center; gap: 8px; }
.roster-entry { display: block; position: relative; }
.roster-entry-main { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; gap: 8px; }
.roster-entry-icon { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 5px; color: #34898d; background: #edf7f6; font-size: 13px; }
.team-entry-logo { width: 22px; height: 22px; object-fit: contain; }
.team-suggestions { position: absolute; z-index: 100; top: calc(100% + 4px); left: 0; width: max(100%, 270px); max-width: min(380px, calc(100vw - 40px)); max-height: 320px; overflow: auto; border: 1px solid #b8cdcf; border-radius: 9px; background: #fff; box-shadow: 0 12px 30px rgba(20,45,53,.25); }
.team-suggestion { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 10px 13px; border: 0; border-bottom: 1px solid #e7eeee; background: #fff; color: #29424d; text-align: left; font-size: 13px; cursor: pointer; }
.team-suggestion:last-child { border-bottom: 0; }
.team-suggestion:hover, .team-suggestion:focus-visible { background: #e8f5f3; outline: 2px solid #348d92; outline-offset: -2px; }
.team-suggestion-crest { width: 38px; height: 38px; flex: 0 0 38px; position: relative; display: grid; place-items: center; font-size: 17px; font-style: normal; }
.team-suggestion-crest img { width: 38px; height: 38px; object-fit: contain; }
.team-suggestion-crest span { position: absolute; inset: 0; display: grid; place-items: center; color: #718b8d; background: #edf4f3; border-radius: 50%; }
.team-suggestion-crest img:not([hidden]) + span { display: none; }
.team-suggestion span { display: grid; gap: 2px; }
.team-suggestion small { color: #637b82; font-size: 10px; }
.roster-entry .text-input { height: 34px; min-width: 0; padding: 7px 9px; font-size: 11px; }
.roster-remove { width: 28px; height: 28px; border: 0; border-radius: 4px; background: #f7f8f8; color: #9aabad; font-size: 18px; }
.roster-remove:hover { color: #c55252; background: #fff0ef; }
.draw-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 0; margin-top: 14px; border-top: 1px solid #e7edef; }
.draw-toolbar > div:first-child { display: grid; gap: 4px; }
.draw-toolbar > div:last-child { display: flex; gap: 7px; }
.draw-toolbar .button { padding: 10px 12px; font-size: 10px; gap: 7px; }
.draw-toolbar .button:disabled { cursor: wait; opacity: .65; }
.draw-stage { min-height: 112px; border: 1px solid #e8edef; border-radius: 5px; background: #fbfcfc; }
.draw-stage-empty { min-height: 112px; display: grid; place-content: center; justify-items: center; gap: 5px; color: #9aabad; }
.draw-stage-empty span { color: #74aaa9; font-size: 22px; }
.draw-stage-empty p { margin: 0; font-size: 10px; }
.draw-result { padding: 13px; animation: draw-reveal .28s ease-out; }
.draw-result.is-drawing { animation: draw-shuffle .14s linear infinite alternate; }
.draw-result-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.draw-result-heading .eyebrow { font-size: 8px; }
.draw-result-heading h3 { margin: 3px 0 0; color: #304a54; font: 700 15px "Manrope", sans-serif; }
.draw-result-check { color: #368967; font-size: 9px; white-space: nowrap; }
.draw-result-table-wrap { max-height: 250px; overflow: auto; }
.draw-result-table { width: 100%; border-collapse: collapse; font-size: 10px; text-align: left; }
.draw-result-table th { padding: 8px; color: #7e8b90; font-size: 9px; font-weight: 600; background: #f3f7f7; }
.draw-result-table td { padding: 8px; color: #435962; border-bottom: 1px solid #e9eeee; }
.draw-page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin: 4px 4px 20px; }
.draw-page-heading h1 { margin: 5px 0 6px; color: #2d4b55; font: 700 27px/1.15 "Manrope", sans-serif; }
.draw-page-heading p { margin: 0; color: #7d8e94; font-size: 12px; }
.draw-page-actions { display: flex; gap: 8px; }
.draw-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.draw-table-card, .draw-controls-card { border: 1px solid #e3eaec; border-radius: 7px; background: #fff; box-shadow: 0 3px 12px rgba(36,53,65,.03); }
.draw-table-card { overflow: hidden; }
.draw-main-table { width: 100%; border-collapse: collapse; text-align: left; }
.draw-main-table th { padding: 12px 14px; color: #73848a; background: #f7f9f9; font-size: 10px; font-weight: 700; }
.draw-main-table td { height: 44px; padding: 8px 14px; color: #405963; border-top: 1px solid #e9eeee; font-size: 11px; }
.draw-main-table tr.is-revealed td { animation: draw-reveal .35s ease-out; background: #f4fbf9; }
.draw-main-table .draw-team-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.draw-team-crest { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #408b8a; background: #edf6f4; font-size: 10px; }
.club-crest-wrap { width: 25px; height: 25px; flex: 0 0 25px; position: relative; display: inline-grid; place-items: center; vertical-align: middle; }
.club-crest { width: 25px; height: 25px; object-fit: contain; }
.club-crest-empty { display: inline-grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; color: #718b8d; background: #edf4f3; font-size: 10px; font-style: normal; }
.club-crest-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #718b8d; background: #edf4f3; border-radius: 50%; font-size: 11px; }
.club-crest-wrap img:not([hidden]) + .club-crest-fallback { display: none; }
.draw-empty-value { color: #a5b0b3; }
.draw-controls-card { padding: 17px; }
.draw-controls-card h2 { margin: 0 0 5px; color: #304b55; font: 700 16px "Manrope", sans-serif; }
.draw-controls-card > p { margin: 0 0 15px; color: #859398; font-size: 10px; line-height: 1.6; }
.draw-progress-list { display: grid; gap: 10px; padding: 12px 0 15px; margin-bottom: 13px; border-top: 1px solid #edf0f0; border-bottom: 1px solid #edf0f0; }
.draw-progress-row { display: flex; justify-content: space-between; align-items: center; color: #5d7078; font-size: 10px; }
.draw-progress-row strong { color: #314e58; font-size: 11px; }
.draw-progress-list[data-spinning]::after { content: attr(data-spinning); display: block; padding: 9px 10px; border-radius: 4px; color: #287e82; background: #eef8f7; font-size: 10px; animation: draw-reveal .2s ease-in-out; }
.draw-controls-card.is-spinning .draw-next-button { opacity: .65; }
.draw-controls-card .draw-next-button { width: 100%; margin-top: 8px; padding: 11px 10px; font-size: 10px; }
.draw-all-button { width: 100%; margin-top: 15px; border-color: #3a8588; }
.draw-controls-note { display: block; margin-top: 8px; color: #96a2a6; font-size: 9px; line-height: 1.45; text-align: center; }
.draw-roster-prompt { padding: 10px; margin: 10px 0; border-radius: 5px; color: #765c1c; background: #fff7df; font-size: 10px; line-height: 1.5; }
.draw-complete { margin-top: 14px; padding: 12px; border-radius: 5px; background: #eff8f3; color: #367850; font-size: 10px; }
.draw-complete strong { display: block; margin-bottom: 3px; }
.draw-player-roster { margin-top: 16px; padding: 18px; border: 1px solid #e3eaec; border-radius: 7px; background: #fff; }
.draw-player-roster h2 { margin: 4px 0 0; color: #304b55; font: 700 16px "Manrope", sans-serif; }
.draw-player-roster ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; padding: 0; margin: 12px 0 0; list-style: none; }
.draw-player-roster li { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 39px; border-top: 1px solid #edf0f0; color: #50656d; font-size: 10px; }
.draw-player-number { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #eff5f4; color: #588481; font-size: 9px; }
.draw-player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draw-player-assignment { color: #8d999d; font-size: 9px; text-align: right; }
.draw-player-roster li.assigned .draw-player-assignment { color: #38845c; }
.draw-roster-empty { display: block !important; padding: 12px 0; color: #8d999d !important; }
.draw-roster-editor { position: relative; z-index: 2; overflow: visible; padding: 19px; margin-bottom: 18px; border: 1px solid #dce7e8; border-radius: 8px; background: #fff; box-shadow: 0 5px 18px rgba(36,53,65,.045); }
.draw-roster-editor-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 1px solid #e8eeee; }
.draw-roster-editor-heading h2 { margin: 4px 0; color: #304b55; font: 700 17px "Manrope", sans-serif; }
.draw-roster-editor-heading p { margin: 0; color: #7d8e94; font-size: 11px; }
.draw-roster-editor .roster-columns { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.draw-roster-editor .roster-input-list { gap: 9px; }
.draw-roster-editor .roster-entry:focus-within { z-index: 10; }
.draw-roster-editor .roster-entry-main { grid-template-columns: 34px minmax(0, min(430px, calc(100vw - 150px))) 32px; }
.draw-roster-editor .roster-entry-icon { width: 34px; height: 34px; }
.draw-roster-editor .team-entry-logo { width: 28px; height: 28px; }
.draw-roster-editor .roster-entry .text-input { height: 40px; font-size: 12px; }
.draw-roster-editor .roster-remove { width: 32px; height: 32px; }
.draw-roster-editor .team-suggestions { position: absolute; z-index: 100; top: calc(100% + 5px); left: 42px; right: auto; width: min(430px, calc(100vw - 100px)); max-width: none; max-height: 420px; overflow-y: auto; margin: 0; border: 1px solid #cbd5d8; border-radius: 2px; box-shadow: 0 4px 12px rgba(20,45,53,.2); }
.draw-roster-editor .team-suggestion { min-height: 40px; gap: 9px; padding: 6px 10px; font-size: 13px; }
.draw-roster-editor .team-suggestion:hover, .draw-roster-editor .team-suggestion:focus-visible { color: #fff; background: #0799c6; outline: 0; }
.draw-roster-editor .team-suggestion:hover small, .draw-roster-editor .team-suggestion:focus-visible small { color: rgba(255,255,255,.88); }
.draw-roster-editor .team-suggestion-crest, .draw-roster-editor .team-suggestion-crest img { width: 27px; height: 27px; }
.draw-roster-editor .team-suggestion-crest { flex-basis: 27px; }
.draw-roster-editor .team-suggestion small { font-size: 9px; }
.draw-roster-editor .roster-list-section { position: relative; }
.draw-roster-editor .roster-section-heading { position: relative; z-index: 1; }
@keyframes draw-shuffle { from { transform: translateY(-2px); filter: blur(.35px); } to { transform: translateY(2px); filter: blur(0); } }
@keyframes draw-reveal { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.preview-column { position: sticky; top: 91px; display: flex; flex-direction: column; gap: 12px; }
.preview-card { overflow: hidden; }
.preview-head { height: 43px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf1f2; }
.preview-kicker { color: #63757d; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.preview-live { display: flex; align-items: center; gap: 6px; color: #7e8d93; font-size: 7px; font-weight: 800; letter-spacing: .6px; }
.preview-live i { width: 5px; height: 5px; }
.preview-cover { height: 98px; display: flex; justify-content: center; align-items: center; background: linear-gradient(135deg,#397fa6 0%,#124765 100%); position: relative; overflow: hidden; }
.cover-lines { width: 170px; height: 120px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; transform: rotate(-25deg); position: absolute; }
.cover-lines::before, .cover-lines::after { content: ""; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; position: absolute; inset: 9px -25px; }
.cover-lines::after { inset: 22px -50px; }
.cover-mark { height: 46px; width: 46px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; position: relative; display: grid; place-items: center; color: #fff; font: 800 13px "Manrope", sans-serif; background: rgba(255,255,255,.1); }
.cover-tag { position: absolute; left: 12px; bottom: 10px; color: rgba(255,255,255,.74); font-size: 7px; font-weight: 800; letter-spacing: .8px; }
.preview-body { padding: 16px 15px; }
.preview-body h3 { margin: 0 0 4px; font: 700 14px "Manrope", sans-serif; color: #344852; overflow-wrap: anywhere; }
.preview-meta { display: flex; gap: 7px; color: #8b999f; font-size: 9px; margin: 0; }
.preview-format { display: flex; align-items: center; gap: 9px; border-top: 1px solid #edf1f2; border-bottom: 1px solid #edf1f2; margin: 14px 0 12px; padding: 11px 0; }
.preview-format-icon { width: 29px; height: 29px; border-radius: 4px; display: grid; place-items: center; color: var(--teal-deep); background: var(--teal-pale); }
.preview-format small, .preview-format strong { display: block; }
.preview-format small { color: #a0adb1; letter-spacing: .7px; font-size: 7px; font-weight: 800; }
.preview-format strong { color: #52656d; font-size: 10px; margin-top: 2px; }
.preview-stats { display: grid; grid-template-columns: repeat(3,1fr); }
.preview-stats div { border-right: 1px solid #edf1f2; text-align: center; }
.preview-stats div:first-child { text-align: left; }
.preview-stats div:last-child { border: 0; text-align: right; }
.preview-stats strong, .preview-stats small { display: block; }
.preview-stats strong { color: #43575f; font: 700 12px "Manrope", sans-serif; }
.preview-stats small { color: #9aa6ab; font-size: 8px; margin-top: 3px; }
.preview-callout { display: flex; gap: 8px; margin-top: 15px; padding: 9px; border-radius: 4px; background: #f6f9fa; color: #8b989e; font-size: 8px; line-height: 1.5; }
.preview-callout span:first-child { color: #c99a44; }
.help-card { display: flex; align-items: flex-start; gap: 10px; padding: 14px; }
.help-icon { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; color: var(--teal-deep); background: var(--teal-pale); font: 700 11px "Manrope", sans-serif; }
.help-card strong { color: #485b63; font-size: 10px; }
.help-card p { margin: 4px 0 5px; color: #8b999f; font-size: 8px; line-height: 1.55; }
.help-card .text-link { font-size: 8px; padding: 2px 0; }

.tournament-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.tournament-list-empty { grid-column: 1 / -1; background: #fff; border: 1px dashed #d8e2e4; border-radius: 6px; min-height: 190px; display: grid; place-items: center; text-align: center; padding: 30px; }
.empty-icon { width: 45px; height: 45px; display: grid; place-items: center; margin: 0 auto 13px; background: var(--teal-pale); color: var(--teal-deep); border-radius: 50%; font-size: 19px; }
.tournament-list-empty h2 { font: 700 15px "Manrope", sans-serif; margin: 0 0 6px; }
.tournament-list-empty p { color: #8d9ba1; font-size: 10px; margin: 0 0 12px; }
.tournament-list-card { background: #fff; border: 1px solid #e5ebed; border-radius: 5px; padding: 17px; display: flex; gap: 12px; cursor: pointer; transition: box-shadow .2s, transform .2s; }
.tournament-list-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.list-card-mark { height: 44px; width: 44px; border-radius: 5px; flex: 0 0 auto; display: grid; place-items: center; background: var(--teal-pale); color: var(--teal-deep); font: 800 12px "Manrope", sans-serif; }
.list-card-content { min-width: 0; flex: 1; }
.list-card-content h2 { color: #324750; font: 700 13px "Manrope", sans-serif; margin: 1px 0 5px; overflow-wrap: anywhere; }
.list-card-content p { color: #8a989e; font-size: 9px; margin: 0; }
.list-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.list-card-tags span { background: #f2f6f7; color: #6d7e85; border-radius: 3px; padding: 4px 6px; font-size: 7px; font-weight: 700; }
.detail-actions { display: flex; gap: 8px; }
.help-view { min-height: 530px; }
.help-view > .eyebrow { margin-top: 20px; }
.help-view > h1 { margin-bottom: 7px; }
.help-intro { color: #7e8d94; font-size: 12px; }
.help-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 30px 0; }
.help-steps article { padding: 21px; background: #fff; border: 1px solid #e5ebed; border-radius: 5px; }
.help-steps article > span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 5px; color: var(--teal-deep); background: var(--teal-pale); font: 800 10px "Manrope", sans-serif; margin-bottom: 18px; }
.help-steps h2 { font: 700 14px "Manrope", sans-serif; margin: 0 0 8px; }
.help-steps p { font-size: 10px; color: #85949a; line-height: 1.65; margin: 0; }
.site-footer { background: #fff; border-top: 1px solid #e7ecee; }
.footer-inner { max-width: 1200px; min-height: 76px; padding: 0 30px; margin: auto; display: flex; align-items: center; gap: 19px; }
.brand-footer { color: var(--teal-deep); font-size: 17px; }
.brand-footer .brand-mark-image { width: 30px; height: 28px; }
.footer-inner p { color: #9aa7ac; font-size: 9px; margin: 0; }
.footer-copy { color: #aab4b8; font-size: 8px; margin-left: auto; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 15px); z-index: 50; background: #263b43; color: #fff; padding: 12px 17px; border-radius: 5px; box-shadow: 0 8px 28px rgba(20,37,43,.18); font-size: 11px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .hero-shell { padding: 48px 44px 40px; grid-template-columns: 1.1fr .9fr; }
  .hero-art { transform: scale(.88); transform-origin: center right; }
  .create-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; }
  .form-card { padding: 20px; }
  .game-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 760px) {
  .topbar { height: 62px; }
  .topbar-inner { padding: 0 18px; }
  .brand { font-size: 22px; }
  .main-nav { display: none; position: absolute; top: 62px; left: 0; right: 0; height: auto; padding: 8px 18px 13px; margin: 0; background: #155e86; flex-direction: column; align-items: stretch; gap: 0; box-shadow: 0 7px 12px rgba(20,72,77,.12); }
  .main-nav.open { display: flex; }
  .nav-link { height: auto; min-height: 39px; }
  .nav-link.active::after { height: 0; }
  .profile-name, .chevron { display: none; }
  .menu-toggle { display: block; }
  .page { padding-left: 16px; padding-right: 16px; }
  .hero-shell { min-height: auto; margin-top: 14px; padding: 38px 25px 25px; grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 42px; }
  .hero-copy > p { max-width: 340px; }
  .hero-art { justify-self: center; transform: scale(.82); height: 240px; margin-top: 5px; margin-bottom: -25px; }
  .stats-strip { grid-template-columns: 1fr 1fr; row-gap: 17px; padding: 17px; }
  .stat-item { padding: 0 10px; border: 0; }
  .stat-item:nth-child(odd) { padding-left: 0; }
  .stat-item strong { font-size: 13px; }
  .section-block { margin-top: 43px; }
  .section-heading { align-items: start; gap: 12px; }
  .section-heading h2 { font-size: 19px; }
  .section-heading > .text-link { font-size: 0; white-space: nowrap; padding-top: 23px; }
  .section-heading > .text-link span { font-size: 19px; }
  .game-grid { grid-template-columns: repeat(2,1fr); }
  .game-card { min-height: 122px; }
  .organizer-cta { padding: 22px; flex-wrap: wrap; gap: 13px; margin-top: 43px; }
  .organizer-cta .cta-mark { width: 40px; height: 40px; }
  .organizer-cta > div:nth-child(2) { flex: 1; min-width: 170px; }
  .organizer-cta h2 { font-size: 16px; }
  .organizer-cta .button { margin-left: 53px; }
  .create-view, .list-view, .detail-view, .draw-view, .help-view { padding-top: 20px; }
  .page-title-row { align-items: flex-start; }
  .page-title-row h1, .help-view > h1 { font-size: 26px; }
  .draft-pill { margin-top: 22px; font-size: 0; padding: 7px; }
  .draft-pill span { margin: 0; }
  .create-layout { grid-template-columns: 1fr; }
  .preview-column { position: static; grid-row: 1; }
  .preview-card { display: grid; grid-template-columns: 120px 1fr; }
  .preview-head { grid-column: 1/-1; }
  .preview-cover { height: auto; min-height: 168px; grid-row: 2; }
  .preview-body { grid-row: 2; }
  .help-card { display: none; }
  .form-card { padding: 18px 16px; }
  .roster-columns { grid-template-columns: 1fr; gap: 12px; }
  .draw-toolbar { align-items: flex-start; flex-direction: column; }
  .draw-toolbar > div:last-child { width: 100%; }
  .draw-toolbar .button { flex: 1; }
  .draw-page-heading { flex-direction: column; }
  .draw-page-heading h1 { font-size: 23px; }
  .draw-page-actions { width: 100%; }
  .draw-page-actions .button { flex: 1; }
  .draw-roster-editor { padding: 15px; }
  .draw-roster-editor-heading { align-items: stretch; flex-direction: column; }
  .draw-roster-editor-heading .button { width: 100%; }
  .draw-workspace { grid-template-columns: 1fr; }
  .draw-player-roster ul { grid-template-columns: 1fr; }
  .draw-table-card { overflow-x: auto; }
  .draw-main-table { min-width: 520px; }
  .card-heading { margin-bottom: 18px; }
  .format-choices { grid-template-columns: 1fr; }
  .format-choice:last-child { grid-column: auto; }
  .field-grid-2 { grid-template-columns: 1fr; }
  .form-footer { align-items: flex-end; gap: 10px; }
  .form-footer > div { gap: 5px; }
  .form-footer .button { padding: 10px 11px; font-size: 9px; }
  .form-footer .button-quiet { display: none; }
  .tournament-list { grid-template-columns: 1fr; }
  .detail-actions { width: 100%; }
  .help-steps { grid-template-columns: 1fr; margin: 21px 0; }
  .help-steps article { padding: 17px; }
  .help-steps article > span { margin-bottom: 12px; }
  .footer-inner { padding: 0 18px; }
}
@media (max-width: 420px) {
  .hero-shell { padding-left: 19px; padding-right: 19px; }
  .hero-copy h1 { font-size: 36px; letter-spacing: -1.7px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
  .hero-proof { margin-top: 21px; }
  .hero-art { transform: scale(.72); margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); }
  .stats-strip { padding: 14px 11px; }
  .stat-item { gap: 8px; }
  .stat-icon { width: 29px; height: 29px; }
  .stat-item strong { font-size: 11px; }
  .stat-item small { font-size: 8px; }
  .page-title-row > .button { padding: 10px; font-size: 0; gap: 0; }
  .page-title-row > .button span { font-size: 15px; }
  .preview-card { grid-template-columns: 86px 1fr; }
  .preview-cover { min-height: 182px; }
  .preview-body { padding: 12px 10px; }
  .preview-body h3 { font-size: 11px; }
  .preview-meta { font-size: 8px; gap: 4px; flex-wrap: wrap; }
  .preview-stats strong { font-size: 10px; }
  .preview-callout { display: none; }
  .footer-inner { gap: 9px; }
  .footer-inner p { display: none; }
  .footer-copy { font-size: 7px; }
}

/* Championship pages follow the reference standings, fixtures and finals layout. */
.championship-page-heading { min-height: 67px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 1px 6px 13px; }
.championship-page-heading .eyebrow { color: #7f9ba8; font-size: 8px; letter-spacing: .55px; margin-bottom: 4px; }
.championship-page-heading h1 { color: #9db4c0; font: 500 27px/1.12 "Manrope", sans-serif; letter-spacing: .75px; text-transform: uppercase; margin: 0; overflow-wrap: anywhere; }
.championship-page-heading .detail-actions { align-items: center; flex: 0 0 auto; }
.championship-page-heading .button { padding: 8px 11px; font-size: 9px; box-shadow: none; }
.championship-tabs { min-height: 39px; display: flex; align-items: stretch; gap: 3px; border-bottom: 1px solid #d8dee0; margin: 0 6px; position: relative; }
.championship-tab { border: 1px solid transparent; border-bottom: 0; background: transparent; color: #2870a7; padding: 0 13px; font-size: 10px; margin-bottom: -1px; white-space: nowrap; }
.championship-tab:hover { color: #164f7f; }
.championship-tab.active { color: #43555e; border-color: #d8dee0; border-radius: 4px 4px 0 0; background: #fff; }
.championship-status { margin-left: auto; align-self: center; background: #5dbb78; color: #fff; border-radius: 3px; padding: 3px 5px; font-size: 7px; font-weight: 800; white-space: nowrap; }
.championship-status i { display: none; }
.detail-content-area { padding: 14px 5px 25px; }
.group-board { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr); align-items: start; gap: 24px; padding: 8px 0 15px; border-bottom: 1px solid #dedfe0; }
.group-board + .group-board { padding-top: 14px; }
.group-table-pane { min-width: 0; overflow: hidden; }
.standings-table-wrap { overflow-x: auto; scrollbar-width: thin; }
.standings-table { width: 100%; border-collapse: collapse; font-size: 10px; color: #24445b; white-space: nowrap; }
.standings-table thead { border-bottom: 1px solid #dfe3e5; }
.standings-table th { padding: 8px 5px; color: #657178; text-align: center; font-size: 9px; font-weight: 600; }
.standings-table th.table-title { text-align: center; color: #687177; font-size: 12px; font-weight: 500; }
.standings-table tbody tr { height: 48px; border-bottom: 1px solid #e8ebec; }
.standings-table td { min-width: 22px; padding: 5px 4px; text-align: center; }
.standings-table .table-rank { min-width: 28px; background: #faf7e8; color: #78838a; font-size: 12px; }
.standings-table .table-team { min-width: 128px; max-width: 205px; display: flex; align-items: center; gap: 7px; padding-left: 9px; text-align: left; color: #415a6b; }
.table-team-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; white-space: normal; }
.table-player-name { display: block; color: #6f8795; opacity: .68; font-size: 8px; line-height: 1.25; white-space: normal; }
.championship-management-panel { margin: 12px 0 18px; border: 1px solid #c7dce6; border-radius: 8px; background: #fff; overflow: hidden; }
.championship-management-panel > summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 16px; cursor: pointer; list-style: none; background: #edf5f8; color: #155e86; }
.championship-management-panel > summary::-webkit-details-marker { display: none; }
.championship-management-panel > summary::after { content: "⌄"; order: 2; font-size: 18px; }
.championship-management-panel[open] > summary::after { content: "⌃"; }
.championship-management-panel > summary > span { display: flex; flex-direction: column; gap: 3px; }
.championship-management-panel > summary strong { font: 700 13px "Manrope", sans-serif; }
.championship-management-panel > summary small { color: #647d8a; font-size: 10px; }
.championship-management-panel > summary > b { margin-left: auto; border-radius: 20px; padding: 5px 8px; background: #dcebf1; font-size: 8px; text-transform: uppercase; }
.championship-management-panel .championship-management { margin: 0; border: 0; border-radius: 0; }
.championship-management { margin: 12px 0 20px; padding: 16px; border: 1px solid #d9e4e8; border-radius: 8px; background: #fff; }
.championship-management-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 12px; }
.championship-management-heading h2 { margin: 3px 0; color: #253d4c; font: 700 16px "Manrope", sans-serif; }
.championship-management-heading p { margin: 0; color: #71838d; font-size: 10px; }
.championship-management-list { display: flex; flex-direction: column; }
.championship-management-row { display: grid; grid-template-columns: minmax(190px,1fr) 130px minmax(190px,1.2fr) 108px; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid #e8edef; }
.championship-management:not(.group-mode) .championship-management-row { grid-template-columns: minmax(190px,1fr) minmax(190px,1.2fr) 108px; }
.management-team-picker { position: relative; display: grid; grid-template-columns: 26px minmax(0,1fr); align-items: center; gap: 7px; min-width: 0; }
.management-team-field { min-width: 0; }
.management-team-picker .roster-entry-icon { display: grid; place-items: center; width: 24px; height: 26px; }
.management-team-picker .team-entry-logo { width: 22px; height: 22px; object-fit: contain; }
.management-team-picker .roster-name { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #d5e0e5; border-radius: 4px; background: #fff; color: #2f4856; font: 500 10px "DM Sans", sans-serif; }
.management-team-picker .team-suggestions { top: calc(100% + 3px); left: 30px; width: min(380px, calc(100vw - 80px)); }
.championship-management-row label { display: flex; flex-direction: column; gap: 3px; color: #788992; font-size: 8px; }
.championship-management-row select, .championship-management-row input:not(.roster-name) { width: 100%; min-width: 0; height: 31px; padding: 0 7px; border: 1px solid #d5e0e5; border-radius: 4px; background: #fff; color: #2f4856; font: 500 10px "DM Sans", sans-serif; }
.management-player-control { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 5px; }
.management-player-control > label:first-child { min-width: 0; }
.management-player-control .management-new-player { grid-column: 1 / -1; }
.management-new-player small { display: block; margin-top: 4px; color: var(--text-muted); line-height: 1.4; }
.management-add-player { min-height: 31px; padding: 0 8px; border: 1px solid #c7dce6; border-radius: 4px; background: #f2f8fa; color: #155e86; font: 700 9px "DM Sans", sans-serif; white-space: nowrap; cursor: pointer; }
.management-add-player:hover { background: #e3f0f5; }
.championship-management-note { margin: 11px 0 0; color: #788992; font-size: 9px; line-height: 1.5; }
.empty-crest { display: inline-block; width: 20px; height: 22px; flex: 0 0 auto; background: #d8dddd; clip-path: polygon(50% 0, 92% 18%, 86% 70%, 50% 100%, 14% 70%, 8% 18%); }
.fixtures-pane { min-width: 0; }
.fixtures-heading { display: flex; align-items: center; justify-content: center; gap: 16px; height: 34px; border-top: 1px solid #dce0e1; border-bottom: 1px solid #dce0e1; color: #9aa0a3; }
.fixtures-heading > div { display: flex; align-items: center; gap: 11px; }
.fixtures-heading > div > span { font-size: 10px; font-weight: 700; }
.fixtures-heading small { font-size: 8px; color: #aab1b4; }
.round-arrow { border: 0; background: transparent; color: #9aa5a9; font-size: 22px; line-height: 1; padding: 0 3px; }
.round-arrow:hover:not(:disabled) { color: var(--teal-deep); }
.round-arrow:disabled { opacity: .25; cursor: default; }
.fixture-list { display: flex; flex-direction: column; }
.fixture-match { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 7px; min-height: 57px; border-bottom: 1px solid #eff1f2; padding: 5px 2px; color: #53616a; font-size: 9px; }
.fixture-side { display: flex; align-items: center; gap: 5px; min-width: 0; }
.fixture-side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixture-side .fixture-team-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow: visible; white-space: normal; }
.fixture-side .table-player-name { font-size: 7px; }
.home-side { justify-content: flex-end; text-align: right; }
.away-side { justify-content: flex-start; }
.fixture-side i { display: inline-block; width: 18px; height: 20px; flex: 0 0 auto; background: #d9dedf; clip-path: polygon(50% 0, 92% 18%, 86% 70%, 50% 100%, 14% 70%, 8% 18%); }
.fixture-score-display, .fixture-score-editor { display: flex; align-items: center; justify-content: center; gap: 5px; }
.fixture-score-display strong { display: grid; width: 26px; height: 27px; place-items: center; background: #eef1f2; color: #334b57; font-size: 12px; }
.fixture-score-display span, .fixture-score-editor > span { color: #91a0a6; font-weight: 800; }
.fixture-score-editor input { width: 33px; height: 29px; padding: 2px; border: 1px solid #ccd9df; border-radius: 4px; background: #fff; color: #253d4c; text-align: center; font: 700 12px "Manrope", sans-serif; }
.fixture-score-editor input:focus { outline: 2px solid #155e86; outline-offset: 1px; }
.fixture-score-editor button { display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 5px; background: #155e86; color: #fff; font-size: 14px; font-weight: 800; }
.fixture-score-editor button:hover { background: #0d3954; }
.fixture-score-editor button:disabled { opacity: .55; cursor: wait; }
.fixture-score-editor input::-webkit-inner-spin-button, .fixture-score-editor input::-webkit-outer-spin-button { margin: 0; }
.fixture-score-editor { gap: 6px; }
.fixture-score-editor label { display: flex; }
.fixture-score-editor input { width: 38px; height: 34px; font-size: 14px; }
.fixture-score-editor input::placeholder { color: #84949d; opacity: 1; }
.fixture-score-editor button { width: auto; min-width: 62px; height: 34px; padding: 0 8px; font-size: 10px; }
.fixture-permission-note { margin: 8px 2px 0; color: #73848d; font-size: 8px; line-height: 1.4; text-align: center; }
.fixture-edit-hint { color: #155e86; font-size: 9px; }
.fixture-empty { color: #a0aaae; text-align: center; font-size: 9px; padding: 14px 4px; }
.table-legend { margin: 14px 0 0; color: #90999d; font-size: 8px; line-height: 1.6; }
.finals-content { max-width: 740px; margin: 0 auto; padding: 18px 14px 38px; }
.finals-unavailable { max-width: 560px; margin: 44px auto; padding: 28px; border: 1px solid #dce5e8; border-radius: 10px; background: #fff; color: #334b57; }
.finals-unavailable h2 { margin: 8px 0; font: 700 20px "Manrope", sans-serif; }
.finals-unavailable p { color: #72838c; line-height: 1.6; }
.finals-progress { display: flex; justify-content: space-between; margin: 18px 0; padding: 12px; border-radius: 6px; background: #edf5f7; }
.finals-stage-note { color: #647985; font-size: 11px; text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.finals-round-header { display: flex; justify-content: center; align-items: center; gap: 18px; text-align: center; color: #9bb5c2; }
.finals-round-header > div > span { color: #9ea9ad; font-size: 8px; font-weight: 800; letter-spacing: .85px; }
.finals-round-header h2 { margin: 2px 0 11px; font: 500 22px "Manrope", sans-serif; text-transform: uppercase; }
.finals-round-header .round-arrow { font-size: 29px; }
.bracket-grid { max-width: 610px; margin: 10px auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.bracket-grid-many { grid-template-columns: repeat(2,minmax(0,1fr)); }
.bracket-match { border: 1px solid #dce1e2; position: relative; background: #fff; }
.bracket-match::before { content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); padding: 2px 12px; color: #9ba5a8; background: #fff; border: 1px solid #e2e6e7; border-radius: 12px; font-size: 7px; }
.bracket-team { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; border-bottom: 1px solid #eef0f0; color: #52616a; font-size: 10px; }
.bracket-team:last-child { border-bottom: 0; }
.bracket-team b { display: grid; place-items: center; width: 22px; height: 24px; background: #f0f2f2; color: #50616a; font-size: 11px; }
.champion-placeholder { width: fit-content; min-width: 230px; margin: 22px auto 0; display: flex; align-items: center; gap: 11px; border-top: 1px solid #eef0f0; padding: 15px 18px 0; color: #73848b; }
.champion-placeholder > span { font-size: 25px; }
.champion-placeholder strong, .champion-placeholder small { display: block; }
.champion-placeholder strong { color: #788d96; font: 500 15px "Manrope", sans-serif; }
.champion-placeholder small { color: #a0aaae; font-size: 8px; margin-top: 3px; }
.detail-info-panel, .point-settings, .stats-panel { padding: 22px 8px; }
.detail-panel-title { margin-bottom: 18px; }
.detail-panel-title > span { color: #8fa6b0; font-size: 8px; letter-spacing: .9px; font-weight: 800; }
.detail-panel-title h2 { color: #687b84; font: 500 20px "Manrope", sans-serif; margin: 5px 0 0; }
.detail-info-panel dl { max-width: 760px; margin: 0; border-top: 1px solid #dfe5e6; }
.detail-info-panel dl > div { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 12px; padding: 12px 8px; border-bottom: 1px solid #e9edee; font-size: 10px; }
.detail-info-panel dt { color: #849198; }
.detail-info-panel dd { color: #465c67; margin: 0; }
.stats-panel-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.stats-panel-grid article { padding: 17px; border: 1px solid #e4e9ea; text-align: center; }
.stats-panel-grid small { display: block; color: #91a0a5; font-size: 8px; letter-spacing: .5px; }
.stats-panel-grid strong { display: block; margin-top: 8px; color: #527080; font: 600 20px "Manrope", sans-serif; }
.empty-stat-note { display: flex; align-items: center; gap: 12px; margin-top: 15px; padding: 17px; background: #f7f9f9; color: #839198; }
.empty-stat-note > span { color: var(--teal-deep); font-size: 20px; }
.empty-stat-note strong { font-size: 10px; color: #60747d; }
.empty-stat-note p { font-size: 9px; margin: 5px 0 0; }
.points-grid { display: flex; gap: 10px; margin-bottom: 22px; }
.points-grid article { width: 100px; display: grid; place-items: center; padding: 14px; border: 1px solid #e4e9ea; }
.points-grid b { color: var(--teal-deep); font: 700 22px "Manrope", sans-serif; }
.points-grid span { margin-top: 4px; color: #87959a; font-size: 9px; }
.tie-break-list { max-width: 420px; border-top: 1px solid #e0e5e6; padding-top: 12px; color: #75858c; font-size: 10px; }
.tie-break-list ol { margin: 10px 0 0; padding-left: 23px; color: #526771; line-height: 2; }

@media (max-width: 760px) {
  .championship-page-heading { align-items: flex-start; flex-direction: column; gap: 10px; padding: 3px 0 14px; }
  .championship-page-heading h1 { font-size: 22px; }
  .championship-page-heading .detail-actions { width: 100%; justify-content: space-between; }
  .championship-tabs { margin: 0; overflow-x: auto; gap: 0; }
  .championship-tab { padding: 0 9px; font-size: 9px; }
  .championship-status { position: sticky; right: 0; margin-left: 8px; }
  .detail-content-area { padding: 8px 0 20px; }
  .group-board { grid-template-columns: 1fr; gap: 8px; padding: 10px 0 15px; }
  .standings-table { min-width: 590px; }
  .fixtures-heading { margin-top: 2px; }
  .fixture-match { min-height: 48px; }
  .finals-content { padding: 16px 0 28px; }
  .bracket-grid, .bracket-grid-many { grid-template-columns: 1fr; max-width: 440px; }
  .detail-info-panel, .point-settings, .stats-panel { padding: 18px 0; }
  .detail-info-panel dl > div { grid-template-columns: 110px minmax(0,1fr); }
  .stats-panel-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .championship-management-heading { align-items: flex-start; flex-direction: column; }
  .championship-management-row, .championship-management:not(.group-mode) .championship-management-row { grid-template-columns: minmax(0,1fr) minmax(125px,1fr); }
  .championship-management-row label { grid-column: auto; }
}
@media (max-width: 420px) {
  .championship-page-heading .eyebrow { font-size: 7px; }
  .championship-page-heading .button { font-size: 8px; }
  .championship-tab { padding: 0 7px; }
  .championship-status { font-size: 0; padding: 5px; }
  .championship-status::after { content: ""; display: block; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
  .finals-round-header h2 { font-size: 18px; }
  .points-grid article { width: 86px; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --teal: #123e59; --teal-deep: #7db0ce; --teal-dark: #5f9abe;
  --teal-pale: #1c3442; --ink: #e5eef0; --muted: #a5b5ba;
  --line: #35474e; --paper: #202d33; --canvas: #172126;
  --shadow: 0 18px 48px rgba(0,0,0,.24);
}
:root[data-theme="dark"] body { background: var(--canvas); color: var(--ink); }
:root[data-theme="dark"] .hero-shell { background: #20383c; }
:root[data-theme="dark"] .hero-copy h1, :root[data-theme="dark"] .section-heading h2, :root[data-theme="dark"] .form-card h2, :root[data-theme="dark"] .championship-title { color: var(--ink); }
:root[data-theme="dark"] .hero-copy > p, :root[data-theme="dark"] .hero-proof, :root[data-theme="dark"] .hero-proof strong { color: #b5c5c9; }
:root[data-theme="dark"] .floating-stat, :root[data-theme="dark"] .stats-strip, :root[data-theme="dark"] .game-card, :root[data-theme="dark"] .form-card, :root[data-theme="dark"] .preview-card, :root[data-theme="dark"] .help-card, :root[data-theme="dark"] .team-suggestions, :root[data-theme="dark"] .team-suggestion, :root[data-theme="dark"] .draw-table-card, :root[data-theme="dark"] .draw-controls-card, :root[data-theme="dark"] .draw-player-roster, :root[data-theme="dark"] .draw-roster-editor, :root[data-theme="dark"] .tournament-list-card, :root[data-theme="dark"] .tournament-list-empty, :root[data-theme="dark"] .championship-tab.active, :root[data-theme="dark"] .bracket-match, :root[data-theme="dark"] .site-footer, :root[data-theme="dark"] .account-dialog { background-color: var(--paper); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .text-input, :root[data-theme="dark"] .select-input, :root[data-theme="dark"] .account-dialog-form input { background: #172126; color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .button-quiet, :root[data-theme="dark"] .format-choice { background: #202d33; color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .format-choice.selected { background: #1c3442; }
:root[data-theme="dark"] .team-suggestion { color: var(--ink); border-bottom-color: var(--line); }
:root[data-theme="dark"] .draw-stage, :root[data-theme="dark"] .draw-result-table th, :root[data-theme="dark"] .draw-main-table th, :root[data-theme="dark"] .ranking-box, :root[data-theme="dark"] .preview-callout, :root[data-theme="dark"] .inline-note, :root[data-theme="dark"] .account-signed-in { background: #1a282e; color: var(--muted); }
:root[data-theme="dark"] .fixture-score-display strong, :root[data-theme="dark"] .bracket-team b { background: #2a3940; color: var(--ink); }
:root[data-theme="dark"] .fixture-score-editor input { background: #172126; border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .championship-management { background: var(--paper); border-color: var(--line); }
:root[data-theme="dark"] .championship-management-panel { background: var(--paper); border-color: var(--line); }
:root[data-theme="dark"] .championship-management-panel > summary { background: #1c3442; color: #d8edf6; }
:root[data-theme="dark"] .championship-management-panel > summary small { color: #b6c8d1; }
:root[data-theme="dark"] .championship-management-panel > summary > b { background: #294859; }
:root[data-theme="dark"] .championship-management-heading h2 { color: var(--ink); }
:root[data-theme="dark"] .championship-management-row select, :root[data-theme="dark"] .championship-management-row input { background: #172126; border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .management-team-picker .roster-name { background: #172126; border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .management-add-player { background: #1c3442; border-color: var(--line); color: #d8edf6; }
:root[data-theme="dark"] .management-add-player:hover { background: #294859; }
:root[data-theme="dark"] .table-player-name { color: #b6c8d1; }
:root[data-theme="dark"] .fixture-permission-note { color: var(--muted); }
:root[data-theme="dark"] .bracket-match::before { background: var(--paper); color: var(--muted); border-color: var(--line); }
:root[data-theme="dark"] .site-footer { background: #141d21; color: var(--muted); border-color: var(--line); }
:root[data-theme="dark"] .account-dialog-form label { color: var(--muted); }
.theme-toggle { min-height: 34px; padding: 0 10px; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; background: rgba(255,255,255,.12); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
@media (max-width: 760px) { .theme-toggle { padding: 0 7px; font-size: 10px; } }

.roster-editor-dialog { width: min(920px, calc(100% - 32px)); max-width: 920px; max-height: min(88vh, 900px); padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px rgba(20,40,50,.24); overflow: auto; }
.roster-editor-dialog::backdrop { background: rgba(18,35,43,.58); backdrop-filter: blur(3px); }
.roster-editor-dialog form { display: grid; gap: 18px; }
.roster-editor-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-right: 34px; }
.roster-editor-dialog-heading h2 { margin: 6px 0; color: var(--ink); font: 700 23px/1.2 "Manrope", sans-serif; }
.roster-editor-dialog-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.roster-editor-dialog .roster-list-section { min-width: 0; }
.roster-editor-dialog .roster-input-list { padding: 10px 4px 10px 0; }
.roster-editor-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.roster-editor-dialog [data-close-admin-roster] { top: 18px; right: 18px; }
.admin-full-edit-dialog { width: min(1000px, calc(100% - 32px)); max-height: min(92vh, 1000px); padding: 0; overflow: auto; }
.admin-full-edit-dialog form { display: grid; gap: 17px; padding: 30px; }
.admin-edit-header { position: relative; padding: 0 38px 16px 0; border-bottom: 1px solid var(--line); }
.admin-edit-header h2 { margin: 7px 0 5px; color: var(--ink); font: 700 25px/1.2 "Manrope", sans-serif; }
.admin-edit-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.admin-edit-header .account-dialog-close { top: 0; right: 0; }
.admin-edit-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-edit-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.admin-edit-card header { margin-bottom: 15px; }
.admin-edit-card h3 { margin: 0; color: var(--ink); font: 700 15px "Manrope", sans-serif; }
.admin-edit-card header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.admin-edit-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: start; }
.admin-edit-field { display: grid; min-width: 0; gap: 6px; color: #52636d; font-size: 11px; font-weight: 700; }
.admin-edit-field input, .admin-edit-field select, .admin-edit-field textarea { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); color: var(--ink); font: 500 12px "DM Sans", "Segoe UI", sans-serif; }
.admin-edit-field textarea { min-height: 83px; resize: vertical; line-height: 1.5; }
.admin-edit-field input:focus, .admin-edit-field select:focus, .admin-edit-field textarea:focus { outline: 2px solid color-mix(in srgb, var(--teal) 45%, transparent); outline-offset: 1px; border-color: var(--teal); }
.admin-edit-field:has(textarea) { grid-column: 1 / -1; }
.admin-edit-switch { display: flex; min-height: 39px; align-items: center; gap: 9px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; color: #52636d; font-size: 11px; font-weight: 700; cursor: pointer; }
.admin-edit-switch input { position: absolute; opacity: 0; pointer-events: none; }
.admin-edit-switch-ui { position: relative; width: 32px; height: 18px; flex: 0 0 auto; border-radius: 99px; background: #aebbc1; transition: background .18s; }
.admin-edit-switch-ui::after { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: white; content: ""; transition: transform .18s; }
.admin-edit-switch input:checked + .admin-edit-switch-ui { background: var(--teal-deep); }
.admin-edit-switch input:checked + .admin-edit-switch-ui::after { transform: translateX(14px); }
.admin-edit-switch input:focus-visible + .admin-edit-switch-ui { outline: 2px solid var(--teal); outline-offset: 2px; }
.admin-edit-advanced { padding: 13px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); }
.admin-edit-advanced summary { color: var(--teal-deep); font-size: 12px; font-weight: 800; cursor: pointer; }
.admin-edit-advanced > p { margin: 7px 0 12px; color: var(--muted); font-size: 11px; }
.admin-edit-advanced .admin-edit-field-grid { margin-top: 12px; }
.admin-participants-callout { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #c9dfea; border-radius: 9px; background: #eff6fa; }
.admin-participants-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #d8e9f3; color: #124765; font-size: 19px; }
.admin-participants-callout strong { color: var(--ink); font-size: 12px; }
.admin-participants-callout p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.admin-participants-callout .button { flex: 0 0 auto; margin-left: auto; }
.admin-draw-callout { background: #f4f6fb; border-color: #d8dfef; }
.admin-draw-callout .admin-participants-icon { color: #42547f; background: #e2e7f4; }
.admin-delete-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 2px 0; border-top: 1px solid var(--line); }
.admin-delete-zone strong { color: #a42c38; font-size: 12px; }
.admin-delete-zone p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.admin-edit-footer { position: sticky; bottom: -30px; display: flex; justify-content: flex-end; gap: 9px; padding: 12px 0 0; border-top: 1px solid var(--line); background: var(--paper); }
.button-danger { min-height: 40px; padding: 0 15px; border: 1px solid #c73b48; border-radius: 6px; background: #c73b48; color: #fff; font-size: 12px; font-weight: 800; }
.button-danger:hover { background: #a92936; }
:root[data-theme="dark"] .admin-edit-field input, :root[data-theme="dark"] .admin-edit-field select, :root[data-theme="dark"] .admin-edit-field textarea { background: #172126; border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .admin-edit-switch { color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .admin-edit-advanced { background: #172126; border-color: var(--line); }
:root[data-theme="dark"] .admin-participants-callout { background: #1c3442; border-color: var(--line); }
:root[data-theme="dark"] .admin-draw-callout { background: #202b40; }
:root[data-theme="dark"] .admin-edit-footer { background: var(--paper); }
@media (max-width: 760px) {
  .admin-full-edit-dialog form { padding: 22px 18px; }
  .admin-edit-sections { grid-template-columns: 1fr; }
  .admin-edit-field-grid { gap: 10px; }
  .admin-participants-callout { align-items: flex-start; flex-wrap: wrap; }
  .admin-participants-callout .button { margin-left: 50px; }
  .admin-edit-footer { bottom: -22px; }
}
@media (max-width: 760px) { .roster-editor-dialog { padding: 22px 16px; } .roster-editor-dialog .roster-columns { grid-template-columns: 1fr; } }
:root[data-theme="dark"] .roster-editor-dialog { background: var(--paper); color: var(--ink); }
