:root {
  color-scheme: dark;
  --bg:#071613; --head:#0a1d19; --panel:#0d221d; --raised:#102a23; --line:#21423a;
  --ink:#f0f6f0; --muted:#a0b7ae; --lime:#c7fa58; --teal:#73c4ad; --error:#ffaaa0;
  --round:16px; font-family:Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); line-height:1.5; min-height:100vh; }
[hidden] { display:none !important; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { cursor:not-allowed; opacity:.45; }
a { color:inherit; text-decoration:none; }
a:hover { color:var(--lime); }
:focus-visible { outline:2px solid var(--lime); outline-offset:4px; }
p { margin:0 0 1rem; }
h1,h2,h3 { margin:0; line-height:1.08; }
h2 { font-size:clamp(1.55rem, 4vw, 2rem); letter-spacing:-.06em; }
h3 { font-size:1.25rem; letter-spacing:-.035em; }
small { font-size:.79rem; }
.shell { width:min(1184px,calc(100% - 64px)); margin-inline:auto; }
.topbar { background:var(--head); border-bottom:1px solid var(--line); }
.toolbar { min-height:75px; display:flex; gap:24px; align-items:center; justify-content:space-between; }
.brand { display:flex; align-items:center; gap:12px; font-size:1.33rem; line-height:1.02; font-weight:950; letter-spacing:-.071em; white-space:nowrap; }
.brand-number { color:var(--lime); margin-left:.15em; }
.brand small { display:block; font-size:.51rem; color:var(--muted); font-weight:800; letter-spacing:.17em; margin-top:5px; }
.brand-icon { background:var(--lime); display:grid; place-items:center; border-radius:10px; width:40px; height:40px; transform:skew(-7deg); }
.brand-icon i { display:block; position:relative; width:21px; height:15px; border:1.5px solid #11302a; border-radius:3px; background:linear-gradient(90deg,transparent 47%,#11302a 47% 53%,transparent 53%); }
.brand-icon i::after { content:""; position:absolute; left:6px; top:3px; width:6px; height:6px; border:1px solid #11302a; border-radius:50%; }
.toolbar nav { display:flex; gap:34px; align-items:stretch; align-self:stretch; font-weight:650; font-size:.88rem; color:var(--muted); }
.toolbar nav a { display:grid; place-items:center; border-bottom:2px solid transparent; white-space:nowrap; }
.toolbar nav a.active { border-color:var(--lime); color:var(--ink); }
.account-area { display:flex; gap:8px; align-items:center; }
.button { display:inline-flex; justify-content:center; align-items:center; gap:9px; border:1px solid transparent; border-radius:9px; min-height:39px; padding:8px 14px; font-weight:800; font-size:.84rem; line-height:1.25; text-align:center; }
.button:hover:not(:disabled) { filter:brightness(1.1); }
.button.primary { color:#142108; background:var(--lime); }
.button.secondary { color:var(--ink); border-color:var(--line); background:#102720; }
.button.ghost { color:var(--muted); background:transparent; border-color:var(--line); }
.button.danger { color:var(--error); border-color:#764944; background:#361f1c; }
.icon-button { color:var(--ink); background:var(--raised); border:1px solid var(--line); border-radius:8px; min-width:36px; min-height:36px; padding:0 7px; }
.icon-button:hover { border-color:var(--teal); }
main.shell { min-height:72vh; padding-top:28px; padding-bottom:62px; }
.hero {
  min-height:385px; overflow:hidden; isolation:isolate; position:relative; display:grid; align-items:center;
  border:1px solid #31584a; border-radius:23px;
  background:#103329 url("/hero.webp") center 45% / cover no-repeat;
}
.hero::before { content:""; z-index:-1; position:absolute; inset:0; background:linear-gradient(90deg,rgba(3,22,17,.97),rgba(4,32,25,.82) 37%,rgba(6,33,26,.05) 76%),linear-gradient(0deg,rgba(3,29,22,.45),transparent 50%); }
.hero-copy { padding:42px 48px; }
.eyebrow { text-transform:uppercase; letter-spacing:.15em; font-weight:850; font-size:.67rem; color:var(--teal); display:flex; gap:9px; align-items:center; margin-bottom:17px; }
.eyebrow b { width:7px; height:7px; border-radius:50%; background:var(--lime); }
.hero h1 { max-width:630px; font-size:clamp(2.65rem,6.4vw,5.15rem); font-weight:950; letter-spacing:-.09em; line-height:.95; }
.hero h1 em { color:var(--lime); font-style:normal; }
.hero p { color:#d3e1d5; margin:19px 0 21px; font-size:.96rem; max-width:320px; }
.hero .button { min-height:46px; padding:10px 18px; }
.hero-meta { position:absolute; right:19px; bottom:18px; color:#e8f5ec; background:#071c17e8; border:1px solid #37594d; padding:8px 12px; border-radius:8px; font-size:.74rem; }
.status { padding:12px 15px; background:#14322b; color:#c2dfd4; border:1px solid #34574b; border-radius:10px; font-size:.84rem; margin:18px 0; }
.status a { color:var(--lime); }
.status.error { background:#3b2220; border-color:#6b4841; color:#ffd1ca; }
.stack { display:grid; gap:14px; }
.page-section { margin-top:29px; }
.page-header { margin:10px 0 25px; }
.page-header h1 { font-size:clamp(2.15rem,5vw,3.6rem); letter-spacing:-.075em; margin-bottom:9px; }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:14px; margin-bottom:17px; }
.section-heading p { color:var(--muted); margin:5px 0 0; font-size:.88rem; }
.chips,.actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.chips { margin-bottom:14px; }
.chip { border:1px solid var(--line); border-radius:7px; color:var(--muted); background:var(--panel); font-size:.79rem; font-weight:750; padding:8px 13px; white-space:nowrap; }
.chip[aria-pressed="true"] { color:var(--lime); border-color:#577e32; background:#203a20; }
.card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.card,.panel { background:var(--panel); border:1px solid var(--line); border-radius:var(--round); }
.league-card { overflow:hidden; display:flex; flex-direction:column; }
.league-card-top { padding:15px 17px 14px; position:relative; background:linear-gradient(125deg,#1a3c30,var(--panel) 72%); min-height:128px; }
.league-type { display:inline-flex; align-items:center; gap:8px; color:#c7e6d6; font-size:.68rem; font-weight:850; letter-spacing:.067em; text-transform:uppercase; margin-bottom:11px; }
.league-type i { font-style:normal; color:var(--lime); border:1px solid #42673e; border-radius:7px; padding:4px 6px; }
.league-card h3 { margin-bottom:7px; }
.league-card p { font-size:.81rem; color:var(--muted); margin:0; }
.card-body { min-height:145px; padding:13px 17px 17px; display:grid; align-content:end; gap:8px; margin-top:auto; }
.card-body .button { width:100%; }
.card-stats { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; justify-content:space-between; }
.card-stats span { color:var(--muted); font-size:.72rem; }
.card-stats strong { color:var(--ink); font-size:.88rem; }
.card-stats .money { color:var(--lime); }
progress { appearance:none; width:100%; height:4px; border:0; border-radius:6px; background:#26493e; accent-color:var(--lime); overflow:hidden; }
progress::-webkit-progress-bar { background:#26493e; }
progress::-webkit-progress-value { background:var(--lime); }
progress::-moz-progress-bar { background:var(--lime); }
.round-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.fixture { border:1px solid var(--line); border-radius:9px; padding:10px 12px; background:var(--panel); display:flex; justify-content:space-between; gap:8px; align-items:center; font-size:.81rem; }
.fixture strong { white-space:nowrap; }
.fixture small { color:var(--muted); text-align:right; }
.footer { background:var(--head); border-top:1px solid var(--line); font-size:.74rem; color:var(--muted); }
.footer-inner { min-height:70px; gap:17px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; padding-block:14px; }
.footer-inner div { display:flex; flex-wrap:wrap; gap:15px; }
.footer-tag { margin-left:8px; }
.muted,.hint { color:var(--muted); }
.hint { font-size:.81rem; }
.empty { text-align:center; color:var(--muted); padding:24px; border:1px dashed var(--line); border-radius:var(--round); grid-column:1/-1; }
.detail { display:flex; flex-wrap:wrap; gap:10px 22px; font-size:.88rem; color:var(--muted); }
.detail strong { color:var(--lime); }
.breadcrumb { display:inline-block; color:var(--teal); margin-bottom:12px; font-size:.82rem; }
.team-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(340px,.87fr); align-items:start; gap:17px; }
.team-controls { display:flex; gap:12px; flex-wrap:wrap; align-items:end; margin:8px 0 12px; }
.team-controls label { flex:1 1 140px; }
label { display:grid; gap:4px; font-size:.81rem; color:var(--muted); font-weight:650; }
input,select,textarea { width:100%; background:#091b17; border:1px solid var(--line); border-radius:8px; color:var(--ink); min-height:41px; padding:8px 10px; }
textarea { resize:vertical; min-height:190px; }
.form { display:grid; gap:13px; }
.form .check { display:flex; align-items:center; }
.check input { width:16px; height:16px; min-height:16px; }
.panel { padding:17px; }
.panel h3 { margin-bottom:9px; }
.pitch { display:grid; grid-template-rows:repeat(4,minmax(61px,1fr)); gap:9px; padding:14px 10px; min-height:320px; align-items:center; overflow:hidden; isolation:isolate; position:relative; border:1px solid #3d7961; border-radius:12px;
  background:repeating-linear-gradient(0deg,#18543e 0 39px,#1d5b44 39px 77px); }
.pitch::before { content:""; position:absolute; z-index:-1; inset:13px; border:1px solid #b3f1bd71; border-radius:3px; background:linear-gradient(0deg,transparent 49.7%,#b3f1bd71 49.7% 50%,transparent 50%); }
.pitch::after { content:""; position:absolute; z-index:-1; width:72px; aspect-ratio:1; border:1px solid #b3f1bd71; border-radius:50%; top:50%; left:50%; transform:translate(-50%,-50%); }
.pitch-row { display:flex; gap:5px; justify-content:space-evenly; position:relative; }
.slot { font-size:.66rem; color:var(--ink); background:#0d3428ed; border:1px dashed #a2d1b788; padding:6px 4px; min-height:46px; width:min(17%,90px); border-radius:7px; line-height:1.14; overflow-wrap:anywhere; }
.slot b { display:block; color:var(--lime); font-size:.77rem; }
.slot.selected { border-style:solid; }
.slot:hover { border-color:var(--lime); }
.bench-list { display:flex; gap:6px; flex-wrap:wrap; }
.bench-list .slot { flex:1 1 58px; width:auto; }
.budget { margin-inline-start:auto; color:var(--lime); font-weight:850; }
.search-line { display:grid; grid-template-columns:1fr 105px; gap:8px; margin:9px 0; }
.market { max-height:510px; overflow:auto; }
.player { display:grid; grid-template-columns:30px minmax(0,1fr) auto auto; align-items:center; gap:10px; border-bottom:1px solid var(--line); padding:8px 0; }
.player-avatar { font-weight:950; font-size:.65rem; border:1px solid #436d5e; border-radius:6px; color:var(--teal); padding:7px 1px; text-align:center; background:#18362e; }
.player span strong,.player small { display:block; }
.player span strong { font-size:.86rem; font-weight:750; }
.player small { color:var(--muted); }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:.87rem; }
th,td { text-align:left; padding:9px; border-bottom:1px solid var(--line); }
th { color:var(--muted); }
.points { color:var(--lime); font-weight:780; white-space:nowrap; }
.current-row { background:#203a20; }
.rules-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.rules-grid p:last-child { margin-bottom:0; }
.stat-big { font-size:1.85rem; font-weight:900; letter-spacing:-.07em; color:var(--lime); }
dialog { width:min(470px,calc(100% - 24px)); max-height:calc(100% - 24px); padding:0; border:1px solid #365c4d; border-radius:18px; background:var(--panel); color:var(--ink); }
dialog::backdrop { background:#020c0abb; backdrop-filter:blur(4px); }
.dialog-panel { position:relative; padding:25px 22px; }
.dialog-panel h2 { margin-bottom:14px; padding-right:30px; }
.dialog-close { position:absolute; right:12px; top:12px; font-size:1.3rem; }
.dialog-panel .actions { margin-top:13px; }
.toast { position:fixed; z-index:10; right:18px; bottom:18px; max-width:min(420px,calc(100vw - 36px)); border:1px solid #6b8f48; border-radius:9px; background:#203820; color:#f3ffe3; box-shadow:0 14px 44px #0006; padding:11px 15px; }
.toast.error { background:#3e2321; color:#ffd1ca; border-color:#b56e64; }
.payment-qr { display:block; width:min(190px,100%); aspect-ratio:1; margin:10px auto; border-radius:8px; padding:8px; background:#fff; }
.admin details { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.admin summary { cursor:pointer; font-weight:800; }
.admin summary + * { margin-top:12px; }
.inline-code { overflow-wrap:anywhere; font-family:ui-monospace,monospace; font-size:.78rem; color:#d0e5d4; }
@media (max-width:900px) {
  .shell { width:calc(100% - 32px); }
  .toolbar { flex-wrap:wrap; padding-top:11px; gap:8px; }
  .toolbar nav { order:3; width:100%; height:44px; justify-content:space-between; gap:8px; }
  .round-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .team-layout { grid-template-columns:1fr; }
}
@media (max-width:600px) {
  .shell { width:calc(100% - 24px); }
  main.shell { padding-top:14px; }
  .card-grid,.rules-grid { grid-template-columns:1fr; }
  .hero { min-height:335px; background-position:58% center; }
  .hero::before { background:linear-gradient(90deg,#031811f5,#071c1599 58%,#06211a40); }
  .hero-copy { padding:25px 18px 49px; }
  .hero-meta { bottom:10px; right:10px; }
  .account-area .button { font-size:.75rem; padding:6px 8px; }
  .toolbar nav a { font-size:.8rem; }
  .footer-inner { align-items:start; flex-direction:column; }
  .card-body { min-height:120px; }
}
@media (prefers-reduced-motion:reduce) { * { scroll-behavior:auto !important; } }

.competition-filter { max-width:360px; margin:0 0 12px; }
.admin .card-stats { margin-bottom:12px; }

/* Matchday identity */
:root {
  --bg:#081611; --panel:#10231b; --lime:#d7fc59; --teal:#91e7c9;
  --ink:#f4faf5; --muted:#a9c0b4; --line:#29463a;
}
body { background:radial-gradient(ellipse at 75% 0,#153426 0,transparent 42rem),var(--bg); }
.topbar { background:#091b14; box-shadow:0 8px 24px #0003; }
.hero { min-height:390px; border-color:#437054; box-shadow:0 18px 44px #030d0790; }
.hero::before { background:linear-gradient(90deg,#081811f5,#081d15c7 43%,#0c2b1900 80%),linear-gradient(0deg,#0a2716ad,transparent 55%); }
.hero::after { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:#d7fc59; pointer-events:none; }
.hero h1 { letter-spacing:-.073em; }
.hero .button.primary { box-shadow:0 7px 25px #c6fc2930; }
.hero-meta { font-size:.82rem; border-color:#579668; }
.league-card { --league:#c9f76b; --league-wash:#335327; }
.league-classic { --league:#ffd074; --league-wash:#5b4729; }
.league-duel { --league:#c9b4ff; --league-wash:#443463; }
.league-private,.league-sponsored { --league:#89dfec; --league-wash:#294c59; }
.league-card-top { background:radial-gradient(ellipse at 100% 10%,var(--league-wash),transparent 75%),var(--panel);
  border-top:3px solid var(--league); padding:17px 18px; min-height:165px; }
.league-card-top::after { content:""; position:absolute; pointer-events:none; inset:0 0 auto auto; width:40%; height:100%;
  background:repeating-linear-gradient(132deg,transparent 0 18px,#fff1 18px 19px,transparent 19px 36px);
  mask-image:linear-gradient(90deg,transparent,#000); }
.league-card-top > * { position:relative; z-index:1; }
.league-type { color:var(--league); font-size:.72rem; }
.league-type i { display:grid; place-items:center; width:27px; height:27px; padding:0; color:#12190d;
  border-color:transparent; background:var(--league); font-size:.88rem; }
.league-card h3 { margin-bottom:5px; font-size:1.35rem; }
.league-card .league-competition { font-size:.75rem; margin-bottom:4px; }
.league-card .league-match { color:var(--ink); font-weight:750; margin-bottom:5px; }
.league-card .money { color:var(--league); }
.league-card .button { border-color:color-mix(in srgb,var(--league),#132419 64%); }
.league-card progress { accent-color:var(--league); }
.league-card progress::-webkit-progress-value { background:var(--league); }
.league-card progress::-moz-progress-bar { background:var(--league); }
.club-mark { --club-bg:#244b44; --club-ink:#a7f7d2; display:grid; place-items:center; flex:none; width:33px; height:33px;
  font-size:.64rem; font-weight:900; color:var(--club-ink); background:var(--club-bg); border:1px solid currentColor;
  border-radius:8px 8px 12px 12px; letter-spacing:.018em; }
.club-mark-1 { --club-bg:#552a37; --club-ink:#ffc1d0; }
.club-mark-2 { --club-bg:#364164; --club-ink:#c3d7ff; }
.club-mark-3 { --club-bg:#523d22; --club-ink:#ffda9b; }
.club-mark-4 { --club-bg:#473761; --club-ink:#e3caff; }
.club-mark-5 { --club-bg:#24465b; --club-ink:#afeaff; }
.fixture { flex-direction:column; align-items:stretch; padding:12px; }
.fixture-match { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:6px; align-items:center; }
.fixture-club { display:grid; justify-items:center; text-align:center; gap:4px; }
.fixture-club strong { white-space:normal; overflow-wrap:anywhere; font-size:.78rem; }
.fixture-score { color:var(--lime); font-weight:900; text-align:center; }
.fixture small { text-align:center; }
.player { grid-template-columns:33px minmax(0,1fr) auto auto; }
.pitch { background:repeating-linear-gradient(0deg,#175d47 0 42px,#1e6b50 42px 84px); }
.slot { --pos:#c8e5f3; position:relative; background:#0a3023f2; }
.slot-GOL { --pos:#ffcf77; }
.slot-LAT,.slot-ZAG { --pos:#a9def8; }
.slot-MEI { --pos:#96f4c1; }
.slot-ATA { --pos:#ffb69b; }
.slot-TEC { --pos:#d7c2fa; }
.slot b { color:var(--pos); }
.slot.selected { border-color:var(--pos); }
.role-marker { position:absolute; top:-6px; right:-4px; display:grid; place-items:center; width:16px; height:16px;
  background:#ffda84; color:#241b0c; border-radius:50%; font-size:.67rem; font-style:normal; font-weight:950; }
@media (max-width: 600px) {
  .hero { min-height:330px; background-position:58% 43%; }
  .hero-meta { font-size:.73rem; }
  .league-card-top { min-height:0; }
}
.brand-emblem { width:43px; height:43px; flex:none; object-fit:contain; filter:drop-shadow(0 2px 10px #d7fc5933); }
.league-type img,.lineup-title img,.captain-controls > img { object-fit:contain; }
.league-type img { filter:drop-shadow(0 2px 6px #0008); }
.lineup-title { display:flex; gap:8px; align-items:center; }
.captain-controls > img { margin-bottom:5px; }
.club-mark-image { border-color:#3c5b50; background:#0e211a; }
.club-mark-image img { object-fit:contain; padding:3px; }
.form-error { padding:9px 11px; color:#ffd6d0; background:#3b2523; border:1px solid #8e5149;
  border-radius:7px; overflow-wrap:anywhere; font-size:.86rem; }
.round-group { margin:22px 0 28px; }
.round-header { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:13px 0;
  margin-bottom:9px; border-bottom:1px solid var(--line); }
.round-marks { display:flex; gap:4px; }
.round-heading { flex:1 1 180px; min-width:0; }
.round-heading p { color:var(--teal); margin:0 0 3px; font-size:.8rem; font-weight:750; }
.round-heading h3 { font-size:clamp(1.15rem,3vw,1.48rem); overflow-wrap:anywhere; }
.round-timing { display:flex; flex-wrap:wrap; align-items:center; gap:7px 12px; font-size:.8rem; color:var(--muted); }
.round-state { color:#c4def0; border:1px solid #476175; border-radius:20px; background:#193140; padding:3px 9px; font-weight:750; }
.round-state-open { color:#dcfd97; border-color:#577237; background:#273b18; }
.round-state-live { color:#ffd890; border-color:#7d623b; background:#3f301c; }
.league-card h4 { margin:0 0 6px; font-size:1.2rem; line-height:1.2; letter-spacing:-.03em; }
.league-card-top { min-height:128px; }
@media (max-width:600px) { .round-timing { width:100%; } .league-card-top { min-height:0; } }
.visual-library-link { margin:0 0 6px 9px; }
.asset-filter { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,280px); gap:10px; margin:0 0 12px; }
.asset-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(138px,1fr)); gap:10px; margin-bottom:20px; }
.asset-grid-competitions { grid-template-columns:repeat(auto-fill,minmax(205px,1fr)); }
.asset-card { display:grid; align-content:center; justify-items:center; gap:6px; min-height:102px;
  padding:10px; text-align:center; border-radius:12px; background:var(--panel); border:1px solid var(--line); }
.asset-card img { object-fit:contain; }
.asset-card h2 { font-size:.88rem; font-weight:770; letter-spacing:normal; }
.asset-card p { margin:0; color:var(--muted); font-size:.77rem; }
@media (max-width:520px) { .asset-filter { grid-template-columns:1fr; } }
