  :focus-visible { outline:2px solid var(--acc2); outline-offset:4px; }
  [aria-busy="true"] { cursor:progress; }
  @media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none!important; transition-duration:0.01ms!important; scroll-behavior:auto!important; } }
  * { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
  :root {
    --bg:#08090d; --card:#12141d; --card2:#171a26;
    --line:rgba(255,255,255,0.07); --line2:rgba(255,255,255,0.13);
    --ink:#f2f4f8; --mut:#8f97ad;
    --acc:#0066ff; --acc2:#3d8bff; --gold:#f0b429; --red:#ff4d5e; --green:#22c55e;
  }
  html,body { margin:0; }
  button, input, select, textarea { font-family:inherit; }
  body { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
    min-height:100vh; min-height:100dvh; color:var(--ink); background:var(--bg);
    padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);
    background-image:radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1.3px),
                     radial-gradient(900px 500px at 70% -10%, rgba(0,102,255,0.13), transparent 60%),
                     radial-gradient(700px 400px at -10% 30%, rgba(0,102,255,0.06), transparent 55%);
    background-size:26px 26px, auto, auto;
    background-attachment:fixed; }
  .wrap { width:100%; max-width:520px; margin:0 auto; padding:8px 14px 16px;
    min-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
    display:flex; flex-direction:column; }
  .wrap > .tab.active { flex-shrink:0; }
  .wrap > #tab-game.active:has(> #intro.active) { display:flex; flex-direction:column; flex:1; }
  #intro.active { flex:1; padding:24px 0; }
  #miniHead { text-align:center; font-size:12px; font-weight:800; letter-spacing:6px; color:var(--mut);
    cursor:pointer; transition:color .15s; user-select:none; padding:18px 0 48px; }
  #miniHead:hover { color:var(--ink); }
  #miniHead[hidden] { display:none; }
  .card { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:24px; margin-bottom:16px; }
  #intro .card { padding:44px 28px 32px; }
  h2 { font-size:20px; font-weight:800; margin:0 0 6px; letter-spacing:.6px; text-transform:uppercase; }
  .sub { color:var(--mut); font-size:14px; margin:0 0 16px; line-height:1.6; font-weight:500; }
  .logo { font-size:38px; font-weight:800; letter-spacing:7px; text-align:center; margin-top:16px;
    background:linear-gradient(120deg,#fff,var(--acc2)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
  .logotag { text-align:center; font-size:10px; font-weight:800; letter-spacing:3.5px; color:var(--mut); margin:10px 0 0; }
  button { position:relative; background:var(--card2); color:var(--ink); padding:16px; border:1px solid var(--line2);
    border-radius:14px; cursor:pointer; font-size:16px; width:100%; font-weight:800; letter-spacing:.8px;
    margin-bottom:10px; transition:transform .1s, border-color .15s, filter .15s; }
  button:active { transform:scale(.975); }
  button, [role=button] { touch-action:manipulation; }
  button.green { background:linear-gradient(135deg,#0066ff,#0047d6); color:#fff; border:none;
    box-shadow:0 10px 34px -10px rgba(0,102,255,0.65), inset 0 1px 0 rgba(255,255,255,0.18); }
  button.ghost { background:transparent; }
  .linkbtn { width:auto; min-height:44px; background:none; border:none; padding:8px 4px; margin:0; color:var(--mut); font-size:14px; font-weight:700; }
  .linkbtn:hover { color:var(--ink); }
  .ui-icon { width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
  .nav-icon-btn { display:inline-flex; align-items:center; gap:8px; }
  #sndBtn .ui-icon { width:21px; height:21px; }
  #sndBtn .sound-off, #sndBtn[data-muted="true"] .sound-on { display:none; }
  #sndBtn[data-muted="true"] .sound-off { display:block; }
  .shine { overflow:hidden;
    background:linear-gradient(120deg,#0052e0,#3d8bff,#0047d6,#0066ff) !important;
    background-size:300% 300% !important;
    animation:gradShift 5s ease infinite; }
  .shine::after { content:''; position:absolute; top:-60%; bottom:-60%; left:-30%; width:34%;
    background:linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent);
    transform:skewX(-20deg); animation:sweep 3.2s cubic-bezier(.4,0,.2,1) infinite; pointer-events:none; }
  @keyframes gradShift { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
  @keyframes sweep { 0%{left:-40%} 55%{left:130%} 100%{left:130%} }
  /* Keep page text stable; motion belongs to gameplay elements. */
  .screen, .tab { display:none; } .screen.active, .tab.active { display:block; }
  @keyframes fade { from{opacity:0} to{opacity:1} }
  .draft-top { display:flex; gap:8px; justify-content:flex-end; margin-bottom:8px; }
  .mini-btn { width:auto; min-height:44px; padding:12px 18px; font-size:12px; font-weight:900; margin:0; border-radius:11px; letter-spacing:.6px; }
  .mini-btn[disabled] { opacity:.25; }
  .rr-club { background:rgba(0,102,255,0.16); border:1.5px solid var(--acc); color:var(--acc2); }
  .rr-era { background:rgba(240,180,41,0.13); border:1.5px solid var(--gold); color:var(--gold); }
  .start-over { background:transparent; color:var(--mut); }
  @media (max-width:540px) {
    .draft-top { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
    .draft-top .mini-btn { min-width:0; padding:12px 6px; font-size:10px; letter-spacing:.3px; white-space:nowrap; }
    #draft:not(.draft-in-progress) .start-over { grid-column:3; }
  }
  .drawbox { position:relative; border:1px solid var(--line2); border-radius:16px; overflow:hidden; margin-bottom:6px;
    background:var(--card2); display:flex; align-items:stretch;
    box-shadow:0 18px 50px -22px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05); }
  .reels { flex:1; display:flex; align-items:stretch; min-width:0; }
  .reel { position:relative; overflow:hidden; height:72px; flex:1.7; min-width:0; }
  .reel.dec { flex:1; border-left:1px solid var(--line); }
  .reel::before, .reel::after { content:''; position:absolute; left:0; right:0; height:22px; z-index:2; pointer-events:none; }
  .reel::before { top:0; background:linear-gradient(var(--card2), transparent); }
  .reel::after { bottom:0; background:linear-gradient(transparent, var(--card2)); }
  .reelcol { will-change:transform; }
  .reelcol > div { height:72px; display:flex; flex-direction:column; align-items:center; justify-content:center;
    font-weight:800; font-size:20px; line-height:1.1; padding:0 6px; text-align:center; white-space:nowrap; overflow:hidden; width:100%; }
  .reelcol > div small { font-size:10px; color:var(--mut); font-weight:800; letter-spacing:.8px; text-transform:uppercase; margin-top:2px; }
  .reel.dec .reelcol > div { color:var(--acc2); }
  .tierwrap { text-align:center; min-height:16px; margin:6px 0 8px; }
  .tierbadge { display:inline-block; font-size:10px; font-weight:900; letter-spacing:2.5px; text-transform:uppercase; }
  .tier-gold { color:var(--gold); } .tier-mid { color:var(--mut); } .tier-low { color:#6b7186; }
  .draftgrid { display:grid; grid-template-columns:1fr; gap:16px; }
  #spinWrap { padding-top:4px; text-align:center; }
  #spinWrap[hidden] { display:none !important; }
  .fchips { display:flex; gap:6px; margin-bottom:10px; }
  .fchip { flex:1; min-height:44px; padding:8px 0; font-size:12px; font-weight:800; letter-spacing:.6px; background:var(--card);
    border:1px solid var(--line); border-radius:10px; color:var(--mut); margin:0; }
  .fchip.on { background:var(--acc); border-color:var(--acc); color:#fff; }
  .plist { display:flex; flex-direction:column; gap:8px; }
  .prow { display:flex; align-items:center; gap:10px; padding:13px 16px; background:var(--card);
    border:1px solid var(--line); border-radius:13px; cursor:pointer; margin:0; color:var(--ink); text-align:left; width:100%;
    letter-spacing:0; font-size:14px; }
  .prow:is(button,[role="button"]):active { border-color:var(--acc); background:var(--card2); transform:scale(.98); }
  .prow[disabled] { opacity:.3; }
  .pname { font-size:14px; font-weight:800; line-height:1.2; display:block; }
  .pmeta { font-size:12px; color:var(--mut); font-weight:600; margin-top:3px; display:block; }
  .postag { font-size:10px; font-weight:900; letter-spacing:.6px; color:var(--acc2); }
  input[type=text] { width:100%; padding:12px 14px; border:1px solid var(--line2); border-radius:12px; font-size:16px;
    font-weight:700; background:var(--card2); color:var(--ink); outline:none; margin-bottom:8px; }
  input[type=text]:focus { border-color:var(--acc); box-shadow:0 0 0 3px rgba(0,102,255,0.15); }
  .pitch { position:relative; background:linear-gradient(180deg,var(--card2),var(--card)); border:1px solid var(--line2);
    border-radius:18px; height:470px; overflow:hidden; box-shadow:inset 0 0 60px rgba(0,0,0,0.35); }
  .pitch::before { content:''; position:absolute; inset:14px; border:1px solid var(--line2); border-radius:10px; }
  .pitch::after { content:''; position:absolute; left:14px; right:14px; top:50%; height:1px; background:var(--line2); }
  .pitch .circle { position:absolute; left:50%; top:50%; width:92px; height:92px; margin:-46px 0 0 -46px;
    border:1px solid var(--line2); border-radius:50%; }
  .pitch .box { position:absolute; left:50%; transform:translateX(-50%); width:150px; height:54px; border:1px solid var(--line2); }
  .pitch .box.b1 { bottom:14px; border-bottom:none; border-radius:8px 8px 0 0; }
  .pitch .box.b2 { top:14px; border-top:none; border-radius:0 0 8px 8px; }
  .pslot { position:absolute; transform:translate(-50%,-50%); width:110px; text-align:center; cursor:pointer; z-index:3; }
  .pslot .chip { width:58px; height:58px; margin:0 auto 5px; border-radius:17px; background:var(--card);
    border:1.5px solid var(--line2); display:flex; align-items:center; justify-content:center;
    font-weight:800; box-shadow:0 8px 22px rgba(0,0,0,0.45); transition:all .15s; }
  .pslot .chip .rr { font-size:15px; font-weight:900; letter-spacing:.5px; }
  .pslot .nm { font-size:11px; line-height:1.2; font-weight:700; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .pslot .offrole { font-size:10px; font-weight:800; color:var(--mut); }
  .pslot .pstats { font-size:10px; line-height:1.2; color:var(--mut); white-space:nowrap; }
  /* Verified DEF/MID figures share the scope shown directly below the pair. */
  .stat-scope { display:block; margin-top:4px; color:var(--mut); font-size:11px; line-height:1.3; font-weight:600; white-space:normal; overflow-wrap:anywhere; }
  .pslot .stat-scope { margin-top:3px; font-size:9px; line-height:1.25; }
  .pslot.sel .chip { border-color:var(--acc); box-shadow:0 0 0 4px rgba(0,102,255,0.25), 0 8px 22px rgba(0,0,0,0.45); transform:scale(1.08); }
  .pslot.empty .chip { background:transparent; border-style:dashed; opacity:.55; box-shadow:none; font-size:10px; color:var(--mut); }
  .final-head { text-align:center; padding:16px 12px 8px; }
  .final-score { font-size:58px; font-weight:900; letter-spacing:1px; font-variant-numeric:tabular-nums; line-height:1;
    background:linear-gradient(160deg,var(--ink),var(--acc2)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
  .final-tag { display:inline-block; margin-top:11px; padding:6px 16px; border-radius:999px; font-size:10px; font-weight:900;
    letter-spacing:1.4px; text-transform:uppercase; background:var(--card2); border:1px solid var(--line2); }
  .final-tag.gold { background:linear-gradient(135deg,#f0b429,#e6a010); color:#171204; border:none;
    box-shadow:0 8px 30px -8px rgba(240,180,41,0.7); animation:pulse 1.1s infinite; }
  @keyframes pulse { 50%{transform:scale(1.04);} }
  .rbadge { min-width:42px; height:42px; border-radius:11px; background:var(--card2); border:1px solid var(--line2);
    color:var(--ink); font-weight:800; font-size:16px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .rbadge.elite { background:linear-gradient(135deg,#f0b429,#d98e0b); color:#171204; border:none;
    box-shadow:0 4px 16px -4px rgba(240,180,41,0.5); }
  .divider { height:1px; background:var(--line); margin:16px 0; }
  .stat-note { text-align:center; font-size:12px; color:var(--mut); font-weight:600; margin-top:8px; }
  .disclosure { margin-top:14px; border-top:1px solid var(--line); padding-top:12px; }
  .disclosure summary { cursor:pointer; color:var(--mut); font-size:12px; font-weight:700; padding:6px 0; }
  .season-report { font-size:12px; color:var(--mut); line-height:1.5; }
  .season-report .power-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin:12px 0; }
  .season-report .power-grid span { padding:9px 5px; text-align:center; background:var(--card2); border-radius:9px; }
  .season-report .power-grid strong { display:block; color:var(--ink); font-size:18px; }
  .match-scroll { max-height:280px; overflow:auto; }
  .match-table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
  .match-table th,.match-table td { text-align:left; padding:6px 4px; border-bottom:1px solid var(--line); }
  .match-table th:last-child,.match-table td:last-child { text-align:right; white-space:nowrap; }
  .history-row { margin:9px 0; padding:10px; border:1px solid var(--line); border-radius:10px; }
  .history-row summary { color:var(--ink); }
  .profile-notice { color:var(--acc2); font-size:12px; line-height:1.5; }
  .lb-row { display:flex; align-items:center; gap:12px; padding:12px; border-bottom:1px solid var(--line); }
  .lb-row:last-child { border-bottom:none; }
  .lb-row.me { background:rgba(0,102,255,0.08); border-radius:12px; }
  .lb-pos { min-width:30px; font-weight:800; font-size:14px; text-align:center; color:var(--mut); }
  .lb-name { font-size:14px; font-weight:700; flex:1; }
  .lb-name small { display:block; color:var(--mut); font-size:10px; font-weight:600; margin-top:1px; }
  .lb-best { font-weight:800; font-size:18px; font-variant-numeric:tabular-nums; }
  .lb-best small { color:var(--mut); font-size:9px; font-weight:800; }
  .stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-bottom:14px; }
  .stat-box { background:var(--card2); border:1px solid var(--line); border-radius:14px; padding:14px; text-align:center; }
  .stat-box .v { font-size:24px; font-weight:900; font-variant-numeric:tabular-nums; }
  .stat-box .stat-record { display:block; margin-top:3px; font-size:12px; font-weight:600; color:var(--mut); }
  .stat-box .k { font-size:10px; font-weight:800; letter-spacing:1px; color:var(--mut); text-transform:uppercase; margin-top:3px; }
  .modal { position:fixed; inset:0; top:var(--inv-viewport-top,0px); bottom:auto;
    height:100vh; height:var(--inv-viewport-height,100dvh); background:rgba(5,6,10,0.7); backdrop-filter:blur(8px); z-index:50;
    display:none; align-items:center; justify-content:center; overflow-y:auto; overscroll-behavior:contain;
    padding:max(20px,env(safe-area-inset-top,0px)) max(20px,env(safe-area-inset-right,0px)) max(20px,env(safe-area-inset-bottom,0px)) max(20px,env(safe-area-inset-left,0px)); }
  .modal.open { display:flex; }
  .modal .card { width:100%; max-width:380px; max-height:100%; overflow-y:auto; margin:0; animation:fade .25s; }
  [hidden] { display:none!important; }
  .draft-progress { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0 0 14px; font-size:12px; color:var(--mut); }
  .draft-progress strong { color:var(--ink); letter-spacing:1px; }
  #draft:not(.draft-in-progress) .rr-club, #draft:not(.draft-in-progress) .rr-era, #draft:not(.draft-in-progress) .drawbox, #draft:not(.draft-in-progress) .tierwrap { display:none; }
  .pslot.out-of-position .offrole { color:var(--gold); }
  .progress-dots { display:flex; gap:6px; }
  .progress-dots span { width:18px; height:5px; border-radius:3px; background:var(--line2); }
  .progress-dots .filled { background:var(--acc2); }
  .empty-players { padding:24px 12px; text-align:center; color:var(--mut); line-height:1.6; }
  .inline-notice { min-height:20px; font-size:13px; color:var(--mut); line-height:1.5; margin:8px 0; }
  .inline-notice.error { color:#ff8792; }
  .fchip[aria-pressed=true] { background:var(--acc); color:#fff; }
  .disclosure summary { min-height:44px; display:flex; align-items:center; gap:8px; }
  .disclosure summary::before { content:'+'; color:var(--acc2); }
  .disclosure[open]>summary::before, .history-row[open]>summary::before { content:'-'; }
  .lb-row[role=button] { cursor:pointer; }
  .lb-name { min-width:0; overflow-wrap:anywhere; }
  .screen-title:focus { outline:none; }
  .share-close { position:sticky; top:0; z-index:2; display:block; margin:0 0 10px auto; padding:8px 12px; color:var(--ink); background:var(--card); border:1px solid var(--line2); }
  a { color:var(--acc2); text-underline-offset:3px; }
  .privacy-note { margin:16px 0 0; font-size:11px; line-height:1.5; color:var(--mut); text-align:center; }
  .site-footer { margin-top:auto; flex-shrink:0; padding:16px 0 0; }
  .site-footer nav { display:flex; flex-wrap:wrap; justify-content:center; gap:0 18px; }
  .site-footer a { display:inline-flex; align-items:center; min-height:44px; color:var(--mut); font-size:12px; }
  .home-stack { width:100%; min-width:0; max-width:480px; margin:0 auto; }
  #intro .home-stack > .card { margin-bottom:0; }
  .app-download { display:flex; justify-content:center; margin:4px 0 0; }
  .app-download-link { display:inline-flex; align-items:center; justify-content:center; gap:7px; max-width:100%; min-height:44px; padding:10px; border:0; border-radius:8px; background:transparent; color:var(--mut); font-size:13px; font-weight:500; line-height:1.3; text-decoration:none; transition:color .15s; }
  .app-download-link .ui-icon { position:relative; top:-1px; width:16px; height:16px; fill:currentColor; stroke:none; }
  @media (hover:hover) { .app-download-link:hover { color:var(--ink); } }
  .stats-help { display:block; margin:0 auto 6px; font-size:12px; }
  .settings-label { display:block; margin:14px 0 8px; font-size:12px; font-weight:700; color:var(--mut); }
  .career-settings h3 { margin:18px 0 8px; font-size:14px; }
  .career-settings .sub { font-size:12px; }
  .danger-zone { margin-top:20px; padding-top:14px; border-top:1px solid var(--line); }
  .danger-link { margin:0; color:#ff8792; background:none; border:none; font-size:13px; }
  button.danger { color:#fff; background:#a3293b; border-color:#e46173; }
  @media (max-width:899px) {
    #intro.active { display:grid; align-items:center; }
    #miniHead { padding:18px 50px 28px; letter-spacing:4px; }
    #intro .card { padding:32px 20px 24px; }
    .logo { font-size:clamp(24px,7vw,36px); letter-spacing:clamp(3px,1vw,6px); }
    .draft-in-progress .pitch { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; height:auto; min-height:108px; padding:12px 6px; }
    .draft-in-progress .pitch::before,.draft-in-progress .pitch::after,.draft-in-progress .pitch .circle,.draft-in-progress .pitch .box { display:none; }
    .draft-in-progress .pslot { position:static; transform:none; width:auto; min-width:0; }
    .draft-in-progress .pslot .chip { width:42px; height:42px; border-radius:12px; margin-bottom:6px; }
    .draft-in-progress .pslot .nm { font-size:10px; }
    .draft-in-progress .pslot .pstats, .draft-in-progress .pslot .stat-scope { display:none; }
    .draft-in-progress .pslot .offrole { font-size:9px; }
    .draftgrid { gap:12px; }
  }
  @media (hover:hover) {
    button:not([disabled]):hover { border-color:var(--acc); }
    button.green:hover { filter:brightness(1.12); }
    .prow:is(button,[role="button"]):not([disabled]):hover { border-color:var(--acc); background:var(--card2); }
    .fchip:not(.on):hover { color:var(--ink); border-color:var(--line2); }
    .pslot:hover .chip { border-color:var(--acc2); }
    .lb-row:hover { background:var(--card2); }
  }
  @media (max-width:899px) and (max-height:740px) {
    #draft:not(.draft-in-progress) .pitch { height:390px; }
    #draft:not(.draft-in-progress) .pslot .chip { width:42px; height:42px; border-radius:12px; }
    #draft:not(.draft-in-progress) .pslot .nm { font-size:10px; }
  }
  @media (min-width:900px) {
    .wrap { max-width:1020px; padding-top:0; }
    #intro .card, #result .card, #sim .card, #tab-top .card, #tab-profile .card { max-width:680px; margin-left:auto; margin-right:auto; }
    #intro.active { display:flex; align-items:center; }
    #intro .card { width:100%; padding:52px 48px 40px; }
    .draftgrid { grid-template-columns:460px 1fr; gap:22px; align-items:start; }
    .pitch { height:640px; }
    .pslot { width:100px; }
    .pslot .chip { width:74px; height:74px; }
    .pslot .nm { font-size:12px; }
    .final-score { font-size:72px; }
    button { padding:18px; }
    .reelcol > div { font-size:22px; }
  }

/* A short, dismissible result celebration; never blocks the game controls. */
.victory-layer { position:fixed; inset:0; z-index:65; pointer-events:none; overflow:hidden; }
.victory-banner { position:absolute; top:calc(env(safe-area-inset-top,0px) + 106px); left:50%; width:min(90vw,430px); transform:translateX(-50%); padding:22px 16px 14px; text-align:center; border:1px solid rgba(110,166,255,.65); border-radius:20px; background:linear-gradient(145deg,rgba(9,25,59,.97),rgba(13,17,28,.98)); box-shadow:0 16px 70px #0009,0 0 45px #0066ff44; animation:victory-arrive .5s cubic-bezier(.2,.8,.2,1) both; }
.perfect .victory-banner { border-color:#e6b422; background:linear-gradient(145deg,rgba(48,36,11,.98),rgba(15,18,27,.98)); box-shadow:0 16px 70px #0009,0 0 60px #e6b42255; }
.victory-kicker { margin:0 0 8px; color:#b9c9e6; font-size:10px; font-weight:800; letter-spacing:2px; }
.victory-title { display:block; color:#fff; font-size:clamp(25px,7vw,38px); line-height:1.1; font-weight:900; letter-spacing:-1px; }
.perfect .victory-title { color:#f2cc6c; }
.victory-skip { pointer-events:auto; display:inline-block; width:auto; min-height:44px; margin:12px 0 0; padding:8px 20px; font-size:12px; border:1px solid #ffffff35; border-radius:99px; color:#fff; background:#ffffff10; }
.victory-piece { position:absolute; top:-18px; left:var(--x); width:7px; height:13px; background:#73acff; animation:victory-fall 2.4s var(--delay) cubic-bezier(.2,.4,.5,1) both; }
.victory-piece:nth-child(3n) { background:#fff; width:5px; }
.victory-piece:nth-child(4n) { background:#3d8bff; height:7px; border-radius:50%; }
.perfect .victory-piece { background:#e6b422; }
.perfect .victory-piece:nth-child(3n) { background:#fff1c5; }
.victory-score { text-shadow:0 0 32px #3d8bff99; transition:text-shadow .3s; }
.victory-score.perfect { text-shadow:0 0 38px #e6b422aa; }
@keyframes victory-arrive { from { opacity:0; transform:translate(-50%,12px) scale(.94); } to { opacity:1; transform:translate(-50%,0) scale(1); } }
@keyframes victory-fall { to { transform:translate(var(--drift),105vh) rotate(var(--turn)); opacity:0; } }
@media (prefers-reduced-motion:reduce) { .victory-piece { display:none; } .victory-banner { animation:none; } .victory-score { text-shadow:none; } }

/* Shared scope keeps individual stat cards concise. */
.stats-caption{font-size:11px;line-height:1.4;color:var(--mut);margin:2px 0 9px;font-weight:600}.stats-caption[hidden]{display:none}.pmeta{font-variant-numeric:tabular-nums}

/* Public player controls */
.lb-row { gap:4px; padding:10px 0; }
.lb-main { display:flex; align-items:center; gap:10px; flex:1; min-width:0; padding:8px 4px; margin:0; width:auto; background:transparent; border:0; border-radius:8px; text-align:left; letter-spacing:0; }
.lb-main .lb-pos { min-width:24px; }
.lb-main:disabled { opacity:1; cursor:default; }
.lb-menu { flex:none; width:44px; min-height:44px; padding:0; margin:0; border:0; background:none; color:var(--mut); font-size:22px; letter-spacing:1px; }
.community-heading { display:flex; align-items:center; gap:8px; margin:-8px -8px 12px 0; }
.community-heading h2 { flex:1; margin:0; font-size:17px; text-transform:none; letter-spacing:0; }
.community-close { width:44px; height:44px; padding:0; margin:0; border:0; background:none; color:var(--mut); font-size:27px; font-weight:400; }
.community-player { color:var(--mut); overflow-wrap:anywhere; margin:0 0 22px; font-size:14px; }
.community-option { display:flex; align-items:center; justify-content:space-between; text-align:left; font-size:14px; letter-spacing:0; }
.community-note { color:var(--mut); font-size:12px; line-height:1.6; margin:8px 0 18px; }
.community-box label { display:block; font-size:12px; color:var(--mut); margin:10px 0 8px; }
.community-box select { display:block; width:100%; min-height:44px; padding:12px; border:1px solid var(--line2); border-radius:10px; background:var(--card2); color:var(--ink); font:inherit; font-size:14px; }
.community-box button:disabled { opacity:.45; }
.community-box .inline-notice { margin-bottom:0; }
.blocked-player { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.blocked-player span { flex:1; min-width:0; overflow-wrap:anywhere; font-size:14px; }
.blocked-player button { width:auto; min-height:44px; margin:0; padding:10px; font-size:12px; letter-spacing:0; }
.blocked-settings { display:block; margin:16px 0 0 auto; font-size:12px; letter-spacing:0; }
#draft:not(.draft-in-progress) .pslot[data-slot="FWD"],
#draft:not(.draft-in-progress) .pslot[data-slot="DEF"],
#draft:not(.draft-in-progress) .pslot[data-slot="GK"] { width:min(180px,70%); }

#refreshRuleHome { margin-top:24px; }
/* Keep legal navigation on resting screens, outside active gameplay. */
body:has(#tab-game.active #draft.active) .site-footer,
body:has(#tab-game.active #sim.active) .site-footer,
body:has(#tab-duel.active .duel-draft) .site-footer,
body:has(#tab-duel.active > .duel-body > .duel-squad) .site-footer,
body:has(#tab-duel.active .duel-season-clock) .site-footer { display:none; }

/* A small reset icon retains a full touch target. Solo draft only. */
#startOverBtn { display:grid; place-items:center; flex:0 0 44px; width:44px; min-width:44px; height:44px; min-height:44px; padding:0; border:0; background:transparent; color:var(--mut); }
#startOverBtn .start-over-icon { display:grid; place-items:center; width:32px; height:32px; border:1px solid var(--line2); border-radius:10px; background:var(--card2); }
#startOverBtn:hover { color:var(--ink); }
@media (max-width:540px) { .draft-top { grid-template-columns:repeat(2,minmax(0,1fr)) 44px; } }

/* Stable solo actions and compact, readable shared screens. */
.sr-only { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
button.entry-locked { opacity:1; }
.solo-pending { cursor:progress; }
.solo-pending::before { content:''; position:absolute; right:9px; top:calc(50% - 6px); width:12px; height:12px; border:1.5px solid currentColor; border-right-color:transparent; border-radius:50%; opacity:0; pointer-events:none; animation:solo-pending-show 0s .3s forwards,solo-pending-spin .8s .3s linear infinite; }
.start-over.solo-pending::before { right:1px; top:1px; width:9px; height:9px; }
@keyframes solo-pending-show { to { opacity:.7; } }
@keyframes solo-pending-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .solo-pending::before { animation:solo-pending-show 0s .3s forwards!important; } }
.profile-name { margin:0 0 6px; font-size:16px; font-weight:650; color:var(--ink); overflow-wrap:anywhere; }
.career-scope { margin-bottom:12px; font-size:13px; }
.career-scope .linkbtn { min-height:44px; font-size:13px; font-weight:600; color:var(--acc2); letter-spacing:0; }
#profileNotice { min-height:20px; }
.result-leaderboard { display:block; margin:4px auto 0; font-size:12px; letter-spacing:.5px; }
#draft #roundLbl { display:none; }
#draft #refreshRule { display:none; }
#draft .tierwrap:has(.tierbadge[style*="display: none"]),#draft .tierwrap:has(.tierbadge[style*="display:none"]) { display:none; }
#draft .stats-help { min-height:44px; font-size:12px; }
#draft .postag { font-size:11px; }
#draft .stats-caption,#draft .stat-scope { font-size:12px; line-height:1.4; }
#draft .mini-btn[disabled] { opacity:.5; }
@media(max-width:899px) { #draft .draftgrid { gap:10px; } #draft .pslot .nm { font-size:11px; } #draft.draft-in-progress .pslot .offrole { font-size:10px; } }
#miniHead.game-topbar { display:flex; align-items:center; gap:12px; padding:0 52px 0 0; margin:4px 0 12px; min-height:44px; text-align:left; font-size:13px; font-weight:600; letter-spacing:0; cursor:default; }
#miniHead.game-topbar[hidden] { display:none; }
.game-back { display:inline-flex; align-items:center; gap:5px; min-height:44px; padding:8px 4px; color:var(--ink); font-size:14px; }
#miniHead #appNavTitle { color:var(--mut); }

.mini-btn.solo-pending::before { top:3px; right:3px; width:8px; height:8px; }

body:has(#tab-game.active > #intro.active) .site-footer a[href="privacy.html"],body:has(#tab-game.active > #intro.active) .site-footer a[href="terms.html"] { display:none; }

#draft.solo-action-running button { cursor:progress; }
#draft.solo-action-running button:not(.solo-pending):not([disabled]) { animation:solo-control-wait 0s .3s forwards; }
@keyframes solo-control-wait { to { opacity:.55; } }

.linkbtn.entry-locked { opacity:.5; cursor:progress; }

#draft .player-tools { display:grid; grid-template-columns:minmax(0,1fr) 44px; align-items:start; gap:6px; margin-bottom:8px; }
#draft .player-tools:has(#pSearch[style*="display:none"]),#draft .player-tools:has(#pSearch[style*="display: none"]) { display:none; }
#draft .player-tools input { margin:0; min-width:0; }
#draft .player-tools .stats-help { width:44px; min-height:44px; padding:0; margin:0; color:var(--mut); }
@media(max-width:899px) { #draft.draft-in-progress .pitch:not(:has(.pslot:not(.empty))) { min-height:68px; padding-top:8px; padding-bottom:8px; } #draft.draft-in-progress .pslot { min-height:44px; } }

/* Only completed squads receive this short review; the detailed report stays secondary. */
.season-insights { margin:16px 0; text-align:left; }
.season-insights[hidden] { display:none; }
.season-insights p { margin:8px 0; color:var(--mut); font-size:13px; line-height:1.55; }
.season-insights strong { display:block; color:var(--ink); font-size:12px; font-weight:650; margin-bottom:2px; }
.season-insights span { display:block; }

/* Result actions stay beside the score; squad details remain below. */
#result .final-head { padding:10px 0 8px; }
#result .final-score { white-space:nowrap; }
.final-record-label { margin:10px 0 0; color:var(--mut); font-size:10px; font-weight:650; letter-spacing:1.2px; line-height:1.5; }
#result .result-points { margin:14px 0 0; text-align:center; color:var(--ink); font-size:28px; font-weight:750; line-height:1.25; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
#result .final-tag { margin-top:12px; }
.result-actions { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0 12px; }
.result-actions > button { flex:1 1 112px; width:auto; min-width:0; min-height:48px; margin:0; padding:12px 8px; font-size:13px; font-weight:750; letter-spacing:.3px; line-height:1.35; }
.result-actions > .green { flex-grow:1.15; }
#result #shareNotice:empty, #profileNotice:empty { display:none; }
#result .simulation-note { margin:16px 0 4px; font-size:11px; line-height:1.5; }
#finalTeam .prow, .duel-rated-player { cursor:default; }
@media(max-width:359px) { #result .final-score { font-size:42px; letter-spacing:0; } #result .result-points { font-size:25px; } .final-record-label { font-size:9px; letter-spacing:.9px; } .result-actions { flex-direction:column; } .result-actions > button { flex:0 0 auto; width:100%; min-height:48px; } }

/* Recent seasons are a list, rather than cards nested inside the profile card. */
#careerHistory .history-row { margin:0; padding:4px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; }
#careerHistory .history-row:last-child { border-bottom:0; }
#careerHistory .history-row > summary { min-height:44px; padding:10px 0; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }

/* Keep the blue primary action still while waiting for a player. */
.shine { background:linear-gradient(135deg,#0066ff,#0047d6)!important; background-size:100% 100%!important; animation:none; }
.shine::after { display:none; }

/* Original game attributes: wrap at narrow widths; never clip values. */
.player-attributes { display:block; margin-top:3px; font-variant-numeric:tabular-nums; line-height:1.5; overflow-wrap:anywhere; }
.pslot .pstats { white-space:normal; overflow-wrap:anywhere; }

/* Keep the game and its download together; reserve the bottom edge for utilities. */
#intro.active { display:flex; flex-direction:column; align-items:stretch; padding:32px 0 0; }
#intro .home-stack { flex:1; display:flex; align-items:center; justify-content:center; max-width:560px; padding:32px 0 40px; }
#intro .home-stack > .card { width:100%; max-width:none; padding:0; margin:0; background:none; border:0; border-radius:0; box-shadow:none; }
#intro .logo { margin:0; font-size:44px; font-weight:800; letter-spacing:6px; line-height:1.15; }
#intro .logotag { margin:14px 0 0; color:var(--mut); font-size:15px; font-weight:400; letter-spacing:0; line-height:1.6; }
#intro .home-actions { display:flex; flex-direction:column; gap:10px; width:100%; max-width:360px; margin:28px auto 0; }
#intro .home-actions > button { display:flex; align-items:center; justify-content:center; min-height:52px; margin:0; padding:14px 16px; border-radius:12px; font-size:15px; font-weight:650; letter-spacing:0; line-height:1.4; }
#intro #playButton { box-shadow:0 8px 28px -16px rgba(0,102,255,.65), inset 0 1px 0 rgba(255,255,255,.16); }
#intro .friend-entry { background:rgba(255,255,255,.035); border-color:var(--line); box-shadow:none; }
#intro .home-nav { display:flex; justify-content:center; gap:28px; margin-top:20px; }
#intro .home-nav .linkbtn { font-size:13px; font-weight:500; letter-spacing:0; }
#intro .home-nav .ui-icon { width:17px; height:17px; }
#intro #homeNotice { max-width:360px; margin-left:auto; margin-right:auto; }
#intro .app-download { position:static; width:100%; max-width:360px; margin:14px auto 0; }
#intro .app-download-link { width:100%; min-height:44px; gap:9px; padding:11px 16px; border:1px solid rgba(0,102,255,.42); border-radius:12px; background:rgba(0,102,255,.08); color:var(--ink); font-size:14px; font-weight:550; line-height:1.4; transition:background .15s,border-color .15s; }
@media (hover:hover) { #intro .app-download-link:hover { background:rgba(0,102,255,.14); border-color:var(--acc); } }
#intro .app-download-link:focus-visible { outline:2px solid var(--acc2); outline-offset:4px; }
body:has(#tab-game.active > #intro.active) #sndBtn { top:auto!important; bottom:calc(16px + env(safe-area-inset-bottom,0px)); left:auto; right:calc(20px + env(safe-area-inset-right,0px))!important; display:flex; align-items:center; justify-content:center; }
body:has(#tab-game.active > #intro.active) .site-footer { display:none; }
#intro .home-footnote { flex-shrink:0; margin:0; padding:0 44px; text-align:center; font-size:12px; line-height:1.6; color:var(--mut); }
#intro .home-support { display:flex; flex-wrap:wrap; justify-content:center; gap:0 12px; margin:0; }
#intro .home-support a { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; color:var(--mut); font-size:12px; text-decoration:none; }
#intro .home-support a:hover { color:var(--ink); }
#intro .home-support a:hover { text-decoration:underline; }
@media (max-width:540px) {
  #intro.active { padding-top:20px; }
  #intro .home-stack { max-width:360px; padding:24px 0 32px; }
  #intro .logo { font-size:clamp(28px,8.2vw,34px); letter-spacing:clamp(3px,1vw,4px); }
  #intro .logotag { margin-top:12px; font-size:14px; }
  #intro .home-actions { margin-top:24px; }
  #intro .home-nav { gap:24px; margin-top:16px; }
  #intro .app-download { margin-top:14px; }
  #intro .home-footnote { padding:0 36px; }
  #intro .home-support { gap:0 4px; }
  body:has(#tab-game.active > #intro.active) #sndBtn { bottom:calc(16px + env(safe-area-inset-bottom,0px)); right:calc(8px + env(safe-area-inset-right,0px))!important; }
}
@media (max-height:650px) { #intro .home-stack { padding-top:16px; padding-bottom:24px; } }

/* A brief, occasional cue for the iPhone download; keep its label still. */
@keyframes store-nudge {
  0%, 16%, 100% { transform:translateY(0) rotate(0); }
  4% { transform:translateY(-2px) rotate(-8deg); }
  8% { transform:translateY(0) rotate(6deg); }
  12% { transform:translateY(-1px) rotate(-3deg); }
}
@media (prefers-reduced-motion:no-preference) {
  .app-download-link .ui-icon { transform-origin:50% 65%; animation:store-nudge 8s ease-in-out 1s infinite; }
  .app-download-link:is(:hover,:focus-visible) .ui-icon { animation-play-state:paused; }
}
