* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; font-family: Arial, Helvetica, sans-serif; line-height: 1.45; }
.top-header { position: sticky; z-index: 20; top: 0; display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 20px; padding: 10px clamp(14px, 3vw, 32px); }
.top-header .brand { display: inline-flex; flex: 0 0 auto; align-items: baseline; gap: 7px; color: var(--app-text); white-space: nowrap; }
.top-header .brand { align-items: center; }
.brand-main { font-size: 23px; font-weight: 850; letter-spacing: -.8px; }
.brand-sub { color: var(--app-muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.top-header .app-nav { min-width: 0; gap: 4px; }
.top-header .app-nav a, .top-header .app-nav .quiet-button { font-family: inherit; }
.league-page { width: min(1180px, calc(100% - 40px)); display: grid; gap: 22px; margin: 32px auto 64px; }
.league-hero { position: relative; display: flex; min-height: 190px; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; padding: clamp(26px, 4vw, 42px); border: 1px solid #30383e; border-radius: 17px; background: radial-gradient(ellipse at 90% 10%, rgba(94,171,117,.16), transparent 38%), linear-gradient(120deg, #19221d, #171a1e 64%); }
.league-hero::after { position: absolute; top: -180px; right: -100px; width: 430px; height: 430px; border: 1px solid rgba(131,217,162,.09); border-radius: 50%; box-shadow: 0 0 0 46px rgba(131,217,162,.025), 0 0 0 95px rgba(131,217,162,.018); content: ""; pointer-events: none; }
.league-hero-copy { position: relative; z-index: 1; }
.league-hero-copy { max-width: 720px; }
.league-eyebrow { display: block; color: var(--app-green); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.league-hero h1 { margin: 9px 0 7px; color: var(--app-text); font-size: clamp(34px, 4.3vw, 43px); letter-spacing: -.045em; line-height: 1.04; }
.league-hero-copy > p { max-width: 560px; margin: 0; color: #a8b0b7; font-size: 14px; line-height: 1.6; }
.league-action-toggle { position: relative; z-index: 1; display: inline-flex; min-height: 52px; flex: 0 0 auto; align-items: center; gap: 10px; padding: 0 17px; border: 1px solid var(--app-green); border-radius: 10px; background: var(--app-green); color: #102016; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.league-action-toggle:hover { transform: translateY(-1px); background: #9be4b4; }
.plus-mark { font-size: 18px; line-height: 1; transition: transform .18s ease; }
.button-arrow { margin-left: 9px; font-size: 19px; line-height: 1; transition: transform .15s ease; }
.league-action-toggle:hover .button-arrow { transform: translateX(3px); }
.league-action-toggle.is-open .plus-mark { transform: rotate(45deg); }
.league-forms-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.league-forms-panel[hidden] { display: none; }
.league-form { min-width: 0; padding: 21px; border: 1px solid #30383e; border-radius: 13px; background: var(--app-panel); }
.form-step { display: block; margin-bottom: 11px; color: var(--app-green); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.league-form label { display: block; color: var(--app-text); font-size: 17px; font-weight: 800; }
.league-form p { margin: 5px 0 17px; color: var(--app-muted); font-size: 12px; }
.form-row { display: flex; gap: 8px; }
.form-row input { width: 100%; min-width: 0; min-height: 44px; flex: 1 1 150px; padding: 0 13px; border: 1px solid #363f45; border-radius: 8px; outline: none; background: #111518; color: var(--app-text); font: inherit; font-size: 13px; }
.form-row input:focus { border-color: var(--app-green); box-shadow: 0 0 0 3px rgba(131,217,162,.12); }
.form-row input::placeholder { color: #6f7a82; }
.form-row button { min-height: 44px; flex: 0 0 auto; padding: 0 15px; border: 1px solid #35413a; border-radius: 8px; background: #252d31; color: var(--app-text); font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.form-row .primary-button { border-color: var(--app-green); background: var(--app-green); color: #102016; }
.form-row button:disabled { opacity: .55; cursor: wait; }
.league-notice { margin: -5px 0 0; padding: 12px 15px; border: 1px solid #38674a; border-radius: 9px; background: #17291e; color: #a8e7ba; font-size: 13px; }
.league-notice.error { border-color: #723d3d; background: #2b1b1b; color: #ffbaba; }
.league-section { display: grid; gap: 14px; }
.league-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; padding: 0 2px; }
.league-section-heading h2 { margin: 5px 0 0; color: var(--app-text); font-size: clamp(21px, 3vw, 27px); letter-spacing: -.025em; }
.refresh-button { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid #333d43; border-radius: 9px; background: #1b2024; color: #a8b2b9; font-size: 23px; line-height: 1; cursor: pointer; transition: color .15s ease, transform .3s ease; }
.refresh-button:hover { color: var(--app-green); transform: rotate(45deg); }
.league-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 15px; }
.league-category { display: grid; gap: 9px; min-width: 0; padding: 17px; border: 1px solid #2c3439; border-radius: 14px; background: linear-gradient(145deg, #191d20, #171a1e); }
.league-category-heading { display: flex; align-items: center; gap: 9px; margin: 0 1px 3px; color: #e8ecee; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.league-category-heading span { display: grid; min-width: 22px; height: 22px; place-items: center; border: 1px solid #31513d; border-radius: 50%; background: #1b2a21; color: #96dfad; font-size: 10px; font-variant-numeric: tabular-nums; }
.league-category-empty { margin: 0; padding: 13px 2px 6px; color: #89939a; font-size: 12px; line-height: 1.55; }
.league-entry { overflow: hidden; border: 1px solid #2b343a; border-radius: 10px; background: #14181b; transition: border-color .16s ease, background .16s ease; }
.league-entry:hover, .league-entry.is-open { border-color: #45694f; background: #171e1a; }
.league-list-button { width: 100%; min-height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 13px; padding: 11px 13px 11px 15px; border: 0; background: transparent; color: var(--app-text); text-align: left; cursor: pointer; }
.league-row-name { min-width: 0; display: grid; gap: 5px; }
.league-row-name strong { overflow: hidden; color: #f1f4f2; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.league-row-name small { overflow: hidden; color: #89948e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.league-row-name small i { padding: 0 3px; color: #66716a; font-style: normal; }
.league-rank { display: grid; grid-template-columns: auto 26px; align-items: center; justify-items: end; column-gap: 6px; }
.league-rank small { grid-column: 1 / -1; margin-bottom: 3px; color: #7f8a83; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.league-rank > strong { color: #f1f4f2; font-size: 17px; font-variant-numeric: tabular-nums; }
.league-trend { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 900; line-height: 1; }
.league-trend.up { background: rgba(70,174,112,.17); color: #7fdda0; }
.league-trend.same { background: #2b3034; color: #a6afb6; font-size: 11px; }
.league-trend.down { background: rgba(230,74,74,.15); color: #f07b7b; }
.league-open-label { display: flex; min-width: 103px; align-items: center; justify-content: flex-end; gap: 6px; color: #8edca7; font-size: 10px; font-weight: 800; white-space: nowrap; }
.league-open-label b { font-size: 14px; transition: transform .15s ease; }
.league-list-button:hover .league-open-label b { transform: translate(2px, -2px); }
.league-row-details { margin: 0 9px 9px; padding: 16px; border: 1px solid #2c353a; border-radius: 9px; background: #111517; }
.league-row-details[hidden] { display: none; }
.league-row-details > .empty-state { margin: 0; padding: 12px; color: #aab4ad; font-size: 12px; }
.league-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; padding-bottom: 13px; border-bottom: 1px solid #2a3237; }
.league-heading h3 { margin: 0; color: var(--app-text); font-size: 17px; }
.league-heading p { margin: 4px 0 0; color: var(--app-muted); font-size: 11px; }
.creator-tag { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #31593e; border-radius: 999px; background: #17271d; color: var(--app-green); font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.league-invite { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #31593e; border-radius: 9px; background: #17231b; }
.league-invite .eyebrow { color: var(--app-green); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.league-invite p { margin: 4px 0 0; color: var(--app-muted); font-size: 11px; }
.join-code-chip { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #31593e; border-radius: 7px; background: #111b14; color: var(--app-green); font-size: 14px; font-weight: 850; letter-spacing: .12em; }
.standings-wrap { overflow-x: auto; border: 1px solid #2a3237; border-radius: 8px; }
.standings { width: 100%; min-width: 470px; border-collapse: collapse; }
.standings th, .standings td { padding: 10px 11px; border-bottom: 1px solid #252d31; text-align: left; }
.standings th { background: #1b2023; color: #849089; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.standings td { color: #dce2de; font-size: 11px; }
.standings tbody tr:last-child td { border-bottom: 0; }
.standings .empty-row { padding: 20px; color: #8f9a92; text-align: center; }
.standings tbody tr:hover { background: #1a201d; }
.standings .rank { width: 40px; color: #8e9992; font-weight: 800; font-variant-numeric: tabular-nums; }
.standings .points { color: var(--app-green); font-weight: 850; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.team-link { color: #eef2ef; font-weight: 750; text-decoration-color: #59665e; text-underline-offset: 3px; }
.team-link:hover { color: var(--app-green); }
.no-team { color: #858f89; font-size: 11px; }
.league-share-hint { margin: 10px 0 0; color: #7f8a83; font-size: 10px; }
.league-loading, .league-empty { display: flex; min-height: 88px; align-items: center; gap: 12px; padding: 20px; border: 1px dashed #354039; border-radius: 11px; color: #9ca79f; background: rgba(24,31,27,.55); font-size: 13px; }
.league-empty { justify-content: space-between; border-style: solid; }
.league-loading, .league-empty { grid-column: 1 / -1; }
.league-empty strong { color: var(--app-text); font-size: 14px; }
.league-empty p { margin: 4px 0 0; color: var(--app-muted); font-size: 11px; }
.empty-create-link { flex: 0 0 auto; padding: 9px 12px; border: 1px solid #3a6146; border-radius: 7px; color: #9ee2b4; font-size: 11px; font-weight: 800; }
.loading-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--app-green); box-shadow: 0 0 0 5px rgba(131,217,162,.1); }
.league-page-footer { display: flex; align-items: center; gap: 9px; padding: 12px 2px; border-top: 1px solid #282f34; color: #7c8780; }
.league-page-footer p { margin: 0; font-size: 10px; }
.footer-mark { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #59675d; border-radius: 50%; color: #9ba79f; font-size: 10px; font-weight: 800; }
.league-page button:focus-visible, .league-page a:focus-visible, .league-page input:focus-visible { outline: 2px solid var(--app-green); outline-offset: 3px; }
@media (max-width: 980px) { .league-list { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .top-header { align-items: flex-start; flex-direction: column; gap: 8px; } .top-header .app-nav { width: 100%; overflow-x: auto; padding-bottom: 2px; } }
@media (max-width: 620px) { .top-header { position: relative; min-height: 0; padding: 12px; } .brand-main { font-size: 21px; } .league-page { width: calc(100% - 24px); gap: 15px; margin: 18px auto 40px; } .league-hero { min-height: 0; align-items: stretch; flex-direction: column; gap: 18px; padding: 22px 18px; border-radius: 13px; } .league-hero-copy > p { font-size: 12px; } .league-action-toggle { width: 100%; justify-content: flex-start; } .button-arrow { margin-left: auto; } .league-forms-panel { grid-template-columns: 1fr; gap: 9px; } .league-form { padding: 17px; } .league-list { gap: 10px; } .league-category { gap: 7px; padding: 12px; border-radius: 11px; } .league-category-heading { font-size: 14px; } .league-list-button { min-height: 68px; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 9px 10px 9px 12px; } .league-row-name strong { font-size: 13px; } .league-row-name small { font-size: 9px; } .league-rank { grid-column: 2; grid-row: 1; } .league-open-label { grid-column: 1 / -1; justify-self: end; min-width: 0; padding-top: 2px; } .league-row-details { margin: 0 5px 5px; padding: 10px; } .league-heading { align-items: flex-start; } .league-invite { align-items: flex-start; flex-direction: column; } .league-empty { align-items: flex-start; flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
