/* 30PICK'EM — Admin / Menu v3 (North Star)
   Scope: #league (League Management), #more (commissioner Control Room) and
   the Menu / App & Support sheets (.amv3Menu inside #modalSheet), plus a
   light, class-scoped polish of commissioner-owned sheets (League Settings,
   League Members). Palette/typography follow Profile v3 and the locked shell:
   deep navy, electric-cyan structure, metallic gold priority, restrained red.
   Masthead, safe area (safe-area-v1.css), bottom nav, Home, Picks, Standings,
   Hub, Player Card, Profile and GOTW are not matched by any selector here. */

#league,#more,#modalSheet{
  --amv3-cyan:#00d2ff;
  --amv3-cyan-lt:#5fe3ff;
  --amv3-cyan-2:#8fdcff;
  --amv3-gold:#ffd24a;
  --amv3-gold-lt:#ffe7a0;
  --amv3-red:#ff6b7d;
  --amv3-green:#3ee08f;
  --amv3-amber:#ffb547;
  --amv3-text:#f6f9ff;
  --amv3-muted:#b3c3da;
  --amv3-dim:#8397b4;
  --amv3-line:rgba(0,210,255,.34);
  --amv3-line-soft:rgba(92,170,230,.18);
  --amv3-card:linear-gradient(180deg,rgba(11,29,62,.94) 0%,rgba(6,17,38,.97) 100%);
  --amv3-tile:linear-gradient(180deg,#0d2a62 0%,#061433 100%);
  --amv3-btn-gold:linear-gradient(180deg,#4a3509 0%,#231904 55%,#140e03 100%);
  --amv3-edge-gold:linear-gradient(90deg,#ffd24a 0%,#ffe9a3 50%,#ffb800 100%);
  --amv3-cond:'PC5 Barlow Condensed','Barlow Condensed','Oswald','Arial Narrow',sans-serif;
  --amv3-sans:'PC5 Inter',Inter,'Helvetica Neue',Arial,sans-serif;
}

/* ============ Host: hide the legacy markup (kept in DOM for renderApp ids) ============ */
#league>.content.amv3Host>:not(.amv3),
#more>.content.amv3Host>:not(.amv3){display:none!important}
#league>.content.amv3Host,#more>.content.amv3Host{background:none!important}
#more .amv3:empty{display:none}

/* ============ Page frame ============ */
#league .amv3,#more .amv3{
  box-sizing:border-box;width:100%;max-width:560px;margin:0 auto;
  padding:12px 14px 22px;display:flex;flex-direction:column;gap:12px;
  color:var(--amv3-text);font-family:var(--amv3-sans);min-width:0;
}
:is(#league,#more) .amv3 *,#modalSheet .amv3Menu *{box-sizing:border-box;min-width:0}
:is(#league,#more) .amv3 :where(button),#modalSheet .amv3Menu :where(button){-webkit-tap-highlight-color:transparent;font:inherit;color:inherit;margin:0;cursor:pointer;text-align:left}
:is(#league,#more) .amv3 :focus-visible,#modalSheet .amv3Menu :focus-visible{outline:2px solid var(--amv3-cyan-2);outline-offset:2px}
:is(#league,#more,#modalSheet) .amv3Ico{width:18px;height:18px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ============ Page header ============ */
:is(#league,#more) .amv3Head{display:flex;align-items:center;gap:11px;padding:2px 0 0}
:is(#league,#more,#modalSheet) .amv3Back{
  flex:0 0 auto;display:grid;place-items:center;width:40px;height:40px;border-radius:11px;padding:0;
  border:1.5px solid rgba(0,210,255,.55);background:linear-gradient(180deg,#0e2352 0%,#050e24 100%);color:var(--amv3-cyan-lt);
  box-shadow:0 0 12px rgba(0,170,255,.14);
}
:is(#league,#more,#modalSheet) .amv3Back .amv3Ico{width:20px;height:20px;stroke-width:2.6}
:is(#league,#more) .amv3HeadText{display:flex;flex-direction:column;gap:3px;min-width:0}
:is(#league,#more,#modalSheet) .amv3Kicker{font-family:var(--amv3-cond);font-weight:700;font-size:12.5px;letter-spacing:1.6px;text-transform:uppercase;color:var(--amv3-gold)}
:is(#league,#more,#modalSheet) .amv3Title{margin:0;font-family:var(--amv3-cond);font-weight:700;font-size:28px;line-height:1;letter-spacing:.5px;text-transform:uppercase;color:var(--amv3-text);text-shadow:0 2px 12px rgba(0,0,0,.45)}
:is(#league,#more,#modalSheet) .amv3Sub{margin:0;font-size:12.5px;line-height:1.35;font-weight:600;color:var(--amv3-muted)}

/* ============ Buttons ============ */
:is(#league,#more,#modalSheet) .amv3Btn{
  position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:1 1 0;
  min-height:44px;padding:0 12px;border-radius:10px;
  font-family:var(--amv3-cond);font-weight:700;font-size:16.5px;letter-spacing:.4px;line-height:1;white-space:nowrap;text-align:center;
  border:1.5px solid rgba(0,210,255,.7);background:linear-gradient(180deg,#0e2352 0%,#050e24 100%);color:var(--amv3-cyan-lt);
  box-shadow:0 0 12px rgba(0,170,255,.14);
}
:is(#league,#more,#modalSheet) .amv3Btn span{overflow:hidden;text-overflow:ellipsis}
:is(#league,#more,#modalSheet) .amv3Btn.gold{border:0;background:var(--amv3-btn-gold);color:var(--amv3-gold);box-shadow:0 0 14px rgba(255,210,74,.22)}
:is(#league,#more,#modalSheet) .amv3Btn.gold:before{
  content:"";position:absolute;inset:0;border-radius:10px;padding:1.5px;pointer-events:none;background:var(--amv3-edge-gold);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;
}
:is(#league,#more,#modalSheet) .amv3Btn.ghost{border-color:rgba(143,220,255,.28);background:rgba(4,14,30,.6);color:#d7e6f7;box-shadow:none}
:is(#league,#more,#modalSheet) .amv3Btn.wide{width:100%;flex:1 1 100%}
:is(#league,#more,#modalSheet) .amv3Btn.slim{flex:0 0 auto;min-height:34px;padding:0 10px;font-size:14.5px;border-radius:9px}
:is(#league,#more,#modalSheet) .amv3Btn.slim .amv3Ico{width:15px;height:15px}
:is(#league,#more,#modalSheet) .amv3Btn.warn{border-color:rgba(255,181,71,.75);background:linear-gradient(180deg,#3a2708 0%,#1c1204 100%);color:#ffd08a;box-shadow:0 0 10px rgba(255,160,40,.16)}
:is(#league,#more,#modalSheet) .amv3Pair{display:flex;gap:9px}
:is(#league,#more,#modalSheet) .amv3Pair.tight{margin-top:10px}

/* ============ Cards / sections / rows ============ */
:is(#league,#more,#modalSheet) .amv3Card,
:is(#league,#more) .amv3Sec{
  position:relative;border-radius:14px;padding:6px 12px;
  border:1px solid var(--amv3-line);background:var(--amv3-card);
  box-shadow:0 0 14px rgba(0,110,255,.14),inset 0 1px 0 rgba(223,249,255,.1);
}
:is(#league,#more) .amv3Sec{padding:10px 12px 6px}
:is(#league,#more) .amv3Sec.gold{border-color:rgba(255,210,74,.5);box-shadow:0 0 16px rgba(255,190,40,.12),inset 0 1px 0 rgba(255,231,160,.12)}
:is(#league,#more) .amv3SecHead{display:flex;align-items:center;gap:8px;padding:0 2px 4px;color:var(--amv3-cyan-lt)}
:is(#league,#more) .amv3Sec.gold .amv3SecHead{color:var(--amv3-gold)}
:is(#league,#more) .amv3SecHead .amv3Ico{width:16px;height:16px}
:is(#league,#more) .amv3SecHead h3{margin:0;flex:1 1 auto;font-family:var(--amv3-cond);font-weight:700;font-size:15px;letter-spacing:1.4px;text-transform:uppercase;color:inherit}
:is(#league,#more) .amv3SecCount{font-family:var(--amv3-cond);font-weight:700;font-size:13px;padding:1px 7px;border-radius:6px;color:var(--amv3-cyan-lt);background:rgba(0,210,255,.12);border:1px solid rgba(0,210,255,.3)}

:is(#league,#more,#modalSheet) .amv3Row{
  display:flex;align-items:center;gap:11px;width:100%;min-height:58px;padding:9px 2px;
  border:0;border-bottom:1px solid var(--amv3-line-soft);background:none;color:var(--amv3-text);
}
:is(#league,#more,#modalSheet) .amv3Rows>.amv3Row:last-child{border-bottom:0}
:is(#league,#more,#modalSheet) .amv3RowIco{
  flex:0 0 auto;display:grid;place-items:center;width:38px;height:38px;border-radius:10px;
  border:1px solid rgba(0,210,255,.4);background:rgba(4,22,48,.85);color:var(--amv3-cyan-lt);
}
:is(#league,#more,#modalSheet) .amv3RowIco .amv3Ico{width:19px;height:19px}
:is(#league,#more,#modalSheet) .amv3RowText{flex:1 1 auto;display:flex;flex-direction:column;gap:2px;min-width:0}
:is(#league,#more,#modalSheet) .amv3RowText b{font-family:var(--amv3-cond);font-weight:700;font-size:18px;line-height:1.1;letter-spacing:.3px;color:var(--amv3-text)}
:is(#league,#more,#modalSheet) .amv3RowText small{font-size:12px;line-height:1.35;color:var(--amv3-muted);overflow-wrap:anywhere}
:is(#league,#more,#modalSheet) .amv3Chev{width:16px;height:16px;color:var(--amv3-cyan-2);stroke-width:2.4;opacity:.85}
:is(#league,#more) .amv3Row.gold .amv3RowIco{border-color:rgba(255,210,74,.65);background:rgba(34,24,4,.85);color:var(--amv3-gold)}
:is(#league,#more) .amv3Row.gold .amv3RowText b{color:var(--amv3-gold)}
:is(#league,#more) .amv3Row.danger .amv3RowIco{border-color:rgba(255,107,125,.45);background:rgba(44,8,14,.7);color:var(--amv3-red)}
:is(#league,#more) .amv3Row.danger .amv3RowText b{color:#ff8b9a}
:is(#league,#more) .amv3Row.busy{opacity:.7;pointer-events:none}
:is(#league,#more) .amv3Row.busy .amv3RowIco .amv3Ico{animation:amv3spin 1s linear infinite}
@keyframes amv3spin{to{transform:rotate(360deg)}}
/* Finalize: irreversible action — restrained red when available, muted when gated */
#more .amv3Row.final .amv3RowIco{border-color:rgba(255,107,125,.35);background:rgba(36,8,14,.6);color:#ff8b9a}
#more .amv3Row.final.ready{margin:4px 0 2px;padding:9px 10px;border:1px solid rgba(255,107,125,.55);border-radius:11px;background:linear-gradient(180deg,rgba(58,15,24,.55),rgba(28,6,9,.55))}
#more .amv3Row.final.ready .amv3RowText b{color:#ffb3bd}
#more .amv3Row.final:disabled{cursor:default}
#more .amv3Row.final:disabled .amv3RowText b{color:#c9d4e4}
#more .amv3Row.final:disabled .amv3RowIco{opacity:.7}

/* Chips */
:is(#league,#more,#modalSheet) .amv3Chip{
  flex:0 0 auto;display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border-radius:6px;white-space:nowrap;
  font-family:var(--amv3-cond);font-weight:700;font-size:12.5px;letter-spacing:.8px;text-transform:uppercase;
  color:#c9d8ec;background:rgba(143,220,255,.08);border:1px solid rgba(143,220,255,.24);
}
:is(#league,#more,#modalSheet) .amv3Chip.cyan{color:#062033;background:var(--amv3-cyan-lt);border-color:transparent}
:is(#league,#more,#modalSheet) .amv3Chip.gold{color:var(--amv3-gold);background:rgba(34,24,4,.85);border-color:rgba(255,210,74,.65)}
:is(#league,#more,#modalSheet) .amv3Chip.ok{color:#9ff5c6;background:rgba(10,48,30,.7);border-color:rgba(62,224,143,.5)}
:is(#league,#more,#modalSheet) .amv3Chip.warn{color:#ffd08a;background:rgba(48,32,6,.7);border-color:rgba(255,181,71,.5)}
:is(#league,#more,#modalSheet) .amv3Chip.red{color:#ffb3bd;background:rgba(48,8,16,.7);border-color:rgba(255,107,125,.55)}
:is(#league,#more,#modalSheet) .amv3Chip.count{min-width:30px;justify-content:center;color:var(--amv3-cyan-lt);background:rgba(0,210,255,.1);border-color:rgba(0,210,255,.4);font-size:14px}
:is(#league,#more) .amv3Chips{display:flex;flex-wrap:wrap;gap:6px}
:is(#modalSheet) .amv3Ok{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--amv3-green);color:#032014;flex:0 0 auto}
:is(#modalSheet) .amv3Ok .amv3Ico{width:15px;height:15px;stroke-width:3}

/* ============ Active league hero ============ */
:is(#league,#more) .amv3Active{
  position:relative;overflow:hidden;display:flex;flex-direction:column;gap:11px;border-radius:14px;padding:13px 12px 12px;
  border:1.5px solid rgba(0,210,255,.55);
  background:linear-gradient(rgba(3,11,29,.62),rgba(3,11,29,.8)),url("assets/player-card/stadium.png") center 30%/cover no-repeat,#061433;
  box-shadow:0 0 18px rgba(0,120,255,.25),inset 0 1px 0 rgba(223,249,255,.22);
}
:is(#league,#more) .amv3Active.comm{border-color:rgba(255,210,74,.7);box-shadow:0 0 18px rgba(255,190,40,.18),inset 0 1px 0 rgba(255,231,160,.2)}
:is(#league,#more) .amv3ActiveTop{display:flex;align-items:center;gap:11px}
:is(#league,#more) .amv3ActiveText{flex:1 1 auto;display:flex;flex-direction:column;gap:3px;min-width:0}
:is(#league,#more) .amv3LeagueName{display:flex;align-items:center;gap:6px;font-family:var(--amv3-cond);font-weight:700;font-size:22px;line-height:1.05;letter-spacing:.3px;color:var(--amv3-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:is(#league,#more) .amv3ActiveText small{font-size:12.5px;font-weight:600;color:var(--amv3-muted)}
:is(#league,#more) .amv3Crown{width:16px;height:16px;color:var(--amv3-gold);flex:0 0 auto}
:is(#league,#more) .amv3Tag{flex:0 0 auto;font-family:var(--amv3-cond);font-weight:700;font-size:12px;letter-spacing:1px;text-transform:uppercase;padding:3px 7px;border-radius:6px;color:#062033;background:var(--amv3-cyan-lt)}
:is(#league,#more) .amv3Crest{
  flex:0 0 auto;display:grid;place-items:center;width:48px;height:48px;border-radius:50%;
  border:2px solid rgba(0,210,255,.7);background:radial-gradient(circle at 50% 30%,#0e2a5e,#050f26);
  font-family:var(--amv3-cond);font-weight:700;font-size:18px;letter-spacing:.5px;color:#dff6ff;
}
:is(#league,#more) .amv3Crest.comm{border-color:rgba(255,210,74,.85);color:var(--amv3-gold-lt);background:radial-gradient(circle at 50% 30%,#4a3509,#140e03)}
:is(#league,#more) .amv3Crest.sm{width:38px;height:38px;font-size:14.5px;border-width:1.5px}
:is(#league,#more) .amv3Code{
  display:flex;align-items:center;gap:8px;width:100%;min-height:38px;padding:0 11px;border-radius:9px;
  border:1px dashed rgba(143,220,255,.35);background:rgba(3,12,28,.7);color:var(--amv3-muted);font-size:12.5px;font-weight:600;
}
:is(#league,#more) .amv3Code b{flex:1 1 auto;font-family:ui-monospace,'SF Mono',Menlo,monospace;font-size:15px;letter-spacing:1.5px;color:var(--amv3-text)}
:is(#league,#more) .amv3Code .amv3Ico{width:16px;height:16px;color:var(--amv3-cyan-lt)}

/* My leagues list */
#league .amv3LgList{display:flex;flex-direction:column;gap:7px;padding:2px 0 2px}
#league .amv3Lg{
  display:flex;align-items:center;gap:10px;width:100%;min-height:56px;padding:8px 10px;border-radius:11px;
  border:1px solid rgba(92,170,230,.22);background:rgba(4,14,32,.6);color:var(--amv3-text);
}
#league .amv3Lg.active{border-color:rgba(0,210,255,.6);background:linear-gradient(180deg,rgba(8,36,74,.8),rgba(4,16,36,.85));box-shadow:inset 3px 0 0 var(--amv3-cyan)}
#league .amv3LgText{flex:1 1 auto;display:flex;flex-direction:column;gap:2px;min-width:0}
#league .amv3LgText b{font-family:var(--amv3-cond);font-weight:700;font-size:17px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#league .amv3LgText small{font-size:12px;color:var(--amv3-muted)}
#league .amv3Switch{flex:0 0 auto;padding:5px 10px;border-radius:8px;border:1.5px solid rgba(0,210,255,.6);font-family:var(--amv3-cond);font-weight:700;font-size:14px;letter-spacing:.4px;color:var(--amv3-cyan-lt);background:rgba(4,20,44,.85)}

/* Empty (no league) */
#league .amv3Empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:20px 14px 16px;text-align:center}
#league .amv3Empty b{font-family:var(--amv3-cond);font-weight:700;font-size:21px;letter-spacing:.3px}
#league .amv3Empty>span:not(.amv3EmptyIco){font-size:13px;line-height:1.45;color:var(--amv3-muted);max-width:320px}
#league .amv3EmptyIco{display:grid;place-items:center;width:56px;height:56px;border-radius:16px;border:1.5px solid rgba(255,210,74,.65);background:rgba(34,24,4,.8);color:var(--amv3-gold)}
#league .amv3EmptyIco .amv3Ico{width:28px;height:28px}
#league .amv3Empty .amv3Pair{width:100%;margin-top:6px}

/* ============ Control Room specifics ============ */
#more .amv3Gotw{display:flex;flex-direction:column;gap:8px;padding:10px 2px 8px}
#more .amv3GotwTop{display:flex;align-items:center;gap:11px}
#more .amv3RowIco.flame{border-color:rgba(255,150,60,.6);background:rgba(48,20,4,.8);color:#ffab5c}
#more .amv3Art{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:11px;border:1px solid rgba(92,170,230,.24);background:rgba(3,12,28,.65)}
#more .amv3ArtIco{flex:0 0 auto;display:grid;place-items:center;width:32px;height:32px;border-radius:9px;border:1px solid rgba(143,220,255,.3);color:var(--amv3-cyan-2)}
#more .amv3ArtIco .amv3Ico{width:17px;height:17px}
#more .amv3ArtText{flex:1 1 auto;display:flex;flex-direction:column;gap:1px;min-width:0}
#more .amv3ArtText b{font-family:var(--amv3-cond);font-weight:700;font-size:15.5px;letter-spacing:.3px}
#more .amv3ArtText small{font-size:12px;line-height:1.3;color:var(--amv3-muted);overflow-wrap:anywhere}
#more .amv3Art.t-ok{border-color:rgba(62,224,143,.4)}
#more .amv3Art.t-ok .amv3ArtIco{border-color:rgba(62,224,143,.55);color:var(--amv3-green)}
#more .amv3Art.t-bad{border-color:rgba(255,107,125,.45)}
#more .amv3Art.t-bad .amv3ArtIco{border-color:rgba(255,107,125,.55);color:var(--amv3-red)}
#more .amv3Art.t-bad small{color:#ffb3bd}
#more .amv3Art.t-warn .amv3ArtIco{border-color:rgba(255,181,71,.5);color:var(--amv3-amber)}
#more .amv3Art.t-live .amv3ArtIco{border-color:rgba(0,210,255,.55);color:var(--amv3-cyan-lt)}

/* ============ Menu / App & Support sheets ============ */
#modalSheet .amv3Menu{display:flex;flex-direction:column;gap:11px;padding:0 2px 6px;color:var(--amv3-text);font-family:var(--amv3-sans)}
#modalSheet .amv3MenuHead{display:flex;flex-direction:column;gap:4px;padding:0 2px}
#modalSheet .amv3MenuHead.withBack{flex-direction:row;align-items:center;gap:11px}
#modalSheet .amv3MenuHead.withBack>div{display:flex;flex-direction:column;gap:3px}
#modalSheet .amv3Title{font-size:30px}
#modalSheet .amv3Id{
  position:relative;overflow:hidden;display:flex;align-items:center;gap:12px;width:100%;padding:12px;border-radius:14px;
  border:1.5px solid rgba(0,210,255,.55);
  background:linear-gradient(rgba(3,11,29,.55),rgba(3,11,29,.74)),url("assets/player-card/stadium.png") center 30%/cover no-repeat,#061433;
  box-shadow:0 0 18px rgba(0,120,255,.25),inset 0 1px 0 rgba(223,249,255,.22);color:var(--amv3-text);
}
#modalSheet .amv3Av{
  --av:66px;position:relative;flex:0 0 auto;width:var(--av);height:var(--av);border-radius:50%;
  background:linear-gradient(135deg,#fff3b8 0%,#ffc94a 30%,#b7650a 70%,#ffc94a 100%);box-shadow:0 0 14px 3px rgba(0,102,255,.32);
}
#modalSheet .amv3Av:before{content:"";position:absolute;inset:3px;border-radius:50%;background:#061433;box-shadow:inset 0 0 0 2px #061433,inset 0 0 0 3.5px var(--amv3-cyan)}
#modalSheet .amv3Av .playerAvatar{
  position:absolute;inset:7px;z-index:1;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;
  width:auto!important;height:auto!important;margin:0!important;border:0!important;padding:0!important;
  background:var(--amv3-tile)!important;font-family:var(--amv3-cond);font-weight:700;font-size:24px;line-height:1;color:#fff!important;box-shadow:none!important;
}
#modalSheet .amv3Av .playerAvatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
#modalSheet .amv3IdText{flex:1 1 auto;display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0}
#modalSheet .amv3IdName{max-width:100%;font-family:var(--amv3-cond);font-weight:700;font-size:23px;line-height:1.05;letter-spacing:.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#modalSheet .amv3IdSub{max-width:100%;font-size:13px;font-weight:600;color:#dbe7f7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#modalSheet .amv3IdLeague{max-width:100%;font-size:12.5px;color:var(--amv3-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#modalSheet .amv3IdLeague.muted{color:var(--amv3-dim)}
:is(#league,#more,#modalSheet) .amv3Role{
  display:inline-flex;align-items:center;gap:5px;margin-top:2px;padding:3px 9px;border-radius:7px;
  font-family:var(--amv3-cond);font-weight:700;font-size:13px;letter-spacing:1.1px;text-transform:uppercase;
  border:1.5px solid rgba(143,220,255,.4);background:rgba(4,20,44,.8);color:var(--amv3-cyan-2);
}
:is(#league,#more,#modalSheet) .amv3Role.comm{border-color:rgba(255,210,74,.8);background:rgba(34,24,4,.85);color:var(--amv3-gold);box-shadow:0 0 10px rgba(255,210,74,.2)}
:is(#league,#more,#modalSheet) .amv3Role .amv3Ico{width:13px;height:13px}
#modalSheet .amv3NavList{display:flex;flex-direction:column;gap:8px}
#modalSheet .amv3Nav{
  display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px 12px;border-radius:13px;
  border:1px solid var(--amv3-line);background:var(--amv3-card);color:var(--amv3-text);
  box-shadow:0 0 12px rgba(0,110,255,.12),inset 0 1px 0 rgba(223,249,255,.08);
}
#modalSheet .amv3NavIco{flex:0 0 auto;display:grid;place-items:center;width:42px;height:42px;border-radius:11px;border:1px solid rgba(0,210,255,.45);background:rgba(4,22,48,.85);color:var(--amv3-cyan-lt)}
#modalSheet .amv3NavIco .amv3Ico{width:21px;height:21px}
#modalSheet .amv3NavText{flex:1 1 auto;display:flex;flex-direction:column;gap:2px;min-width:0}
#modalSheet .amv3NavText b{font-family:var(--amv3-cond);font-weight:700;font-size:19px;line-height:1.1;letter-spacing:.3px}
#modalSheet .amv3NavText small{font-size:12px;line-height:1.3;color:var(--amv3-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#modalSheet .amv3Nav.gold{position:relative;border:0;background:linear-gradient(180deg,rgba(58,42,8,.92) 0%,rgba(24,17,4,.95) 100%);box-shadow:0 0 16px rgba(255,200,60,.22)}
#modalSheet .amv3Nav.gold:before{content:"";position:absolute;inset:0;border-radius:13px;padding:1.5px;pointer-events:none;background:var(--amv3-edge-gold);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}
#modalSheet .amv3Nav.goldSoft{border-color:rgba(255,210,74,.5);background:linear-gradient(180deg,rgba(36,26,6,.9),rgba(14,10,3,.94))}
#modalSheet .amv3Nav:is(.gold,.goldSoft) .amv3NavIco{border-color:rgba(255,210,74,.7);background:rgba(34,24,4,.85);color:var(--amv3-gold)}
#modalSheet .amv3Nav:is(.gold,.goldSoft) .amv3NavText b{color:var(--amv3-gold-lt)}
#modalSheet .amv3Nav:is(.gold,.goldSoft) .amv3Chev{color:var(--amv3-gold)}
#modalSheet .amv3Menu>.amv3Btn.wide{margin-top:3px;min-height:48px;font-size:18px}
#modalSheet .amv3Version{text-align:center;font-size:12px;color:var(--amv3-dim)}
#modalSheet .amv3Foot{margin:2px 4px 0;font-size:12.5px;line-height:1.45;color:var(--amv3-muted)}
#modalSheet .amv3Link{display:inline;padding:0;border:0;background:none;color:var(--amv3-cyan-lt);font-weight:700;text-decoration:underline;text-underline-offset:2px}

/* ============ Commissioner-owned sheets: light polish (behavior untouched) ============ */
#modalSheet .leagueSettingsPanel{border-radius:12px;border:1px solid var(--amv3-line);background:var(--amv3-card)}
#modalSheet .dangerZone{border-radius:12px!important;border:1px solid rgba(255,107,125,.5)!important;background:linear-gradient(180deg,rgba(58,15,24,.45),rgba(28,6,9,.55))!important}
#modalSheet .dangerZone .boardKicker{color:#ff8b9a!important}

/* ============ Narrow phones ============ */
@media(max-width:350px){
  #league .amv3,#more .amv3{padding:10px 11px 20px;gap:10px}
  :is(#league,#more,#modalSheet) .amv3Title{font-size:25px}
  #modalSheet .amv3Title{font-size:27px}
  :is(#league,#more,#modalSheet) .amv3Btn{font-size:15px;padding:0 9px;gap:6px}
  :is(#league,#more,#modalSheet) .amv3RowText b{font-size:16.5px}
  :is(#league,#more) .amv3LeagueName{font-size:20px}
  #modalSheet .amv3Av{--av:58px}
  #modalSheet .amv3IdName{font-size:21px}
  #modalSheet .amv3NavText b{font-size:17.5px}
  #modalSheet .amv3Nav{min-height:60px;padding:9px 10px;gap:10px}
  #modalSheet .amv3NavIco{width:38px;height:38px}
}
/* Paired actions size to their labels so neither truncates. */
:is(#league,#more,#modalSheet) .amv3Pair .amv3Btn{flex:1 1 auto;padding:0 10px}
@media(max-width:380px){:is(#league,#more) .amv3Active .amv3Pair .amv3Btn .amv3Ico{display:none}}
:is(#league,#more) .amv3LeagueName .amv3Ellip{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:350px){:is(#league,#more) .amv3Pair .amv3Btn .amv3Ico{display:none}}
/* Irreversible confirmations owned by league tools (leave / delete league / remove member):
   restrained red primary, unchanged markup and handlers. */
#modalSheet:has(button[onclick^="leaveCurrentLeague"],button[onclick^="deleteLeague"],button[onclick^="removeLeagueMember"]) .btn.danger{
  border:1.5px solid rgba(255,107,125,.8)!important;background:linear-gradient(180deg,#3a0f18 0%,#1c0609 100%)!important;color:#ffb3bd!important;box-shadow:0 0 14px rgba(255,80,100,.18)!important
}
#modalSheet .dangerZone .btn.danger{border:1.5px solid rgba(255,107,125,.8)!important;background:linear-gradient(180deg,#3a0f18 0%,#1c0609 100%)!important;color:#ffb3bd!important}
/* League names wrap to two lines before truncating (narrow phones, long names). */
:is(#league,#more) .amv3LeagueName{white-space:normal;align-items:flex-start}
:is(#league,#more) .amv3LeagueName .amv3Ellip{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow:hidden;overflow-wrap:anywhere}
:is(#league,#more) .amv3LeagueName .amv3Crown{margin-top:3px}
#league .amv3LgText b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:anywhere}
:is(#league,#more) .amv3LeagueName{display:block}
:is(#league,#more) .amv3LeagueName .amv3Crown{display:inline-block;vertical-align:-1px;margin:0 0 0 2px}

/* 0.9.41 — league photo in the league crest. Same circle, size and ring as the
   initials crest; the photo fills it (cover). Commissioners get the crest as a
   button in the league heroes, marked by a small camera badge. */
:is(#league,#more) .amv3Crest{position:relative}
:is(#league,#more) .amv3Crest.hasPhoto{overflow:hidden;padding:0;background:#050f26}
:is(#league,#more) .amv3Crest .leagueCrestImg{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
:is(#league,#more) button.amv3CrestEdit{
  appearance:none;-webkit-appearance:none;margin:0;padding:0;cursor:pointer;overflow:visible;
  -webkit-tap-highlight-color:transparent;transition:transform .12s ease,box-shadow .16s ease;
}
:is(#league,#more) button.amv3CrestEdit.hasPhoto{padding:0;overflow:visible}
:is(#league,#more) button.amv3CrestEdit.hasPhoto .leagueCrestImg{position:absolute;inset:0}
:is(#league,#more) button.amv3CrestEdit:active{transform:scale(.96)}
:is(#league,#more) button.amv3CrestEdit:focus-visible{outline:2px solid var(--amv3-cyan-lt);outline-offset:3px}
@media (hover:hover){:is(#league,#more) button.amv3CrestEdit:hover{box-shadow:0 0 14px rgba(255,210,74,.28)}}
:is(#league,#more) .amv3CrestBadge{
  position:absolute;right:-3px;bottom:-3px;z-index:1;display:grid;place-items:center;width:19px;height:19px;border-radius:50%;
  border:1.5px solid #0a1328;background:linear-gradient(180deg,#ffe08a,#e2a92a);color:#1a1203;box-shadow:0 2px 6px rgba(0,0,0,.45);
}
:is(#league,#more) .amv3CrestBadge .amv3Ico{width:11px;height:11px;stroke-width:2.2}
