body.league-open { overflow: hidden; }
.league-dialog {
  --lg-line: #785283; --lg-ink: #21132e; --lg-dim: #e1ccdf; --lg-gold: #ffdb92; --lg-mint: #a0ffe8;
  width: min(680px, calc(100% - 24px)); max-width: none; max-height: none; margin: auto; padding: 0;
  overflow: hidden; border: 1px solid #b77dba; border-radius: 18px; background: var(--lg-ink); color: #fff5fc;
  box-shadow: 0 24px 80px #0b021cce; color-scheme: dark;
}
.league-dialog::backdrop { background: #13071ec9; backdrop-filter: blur(4px); }
.league-sheet { display: flex; flex-direction: column; max-height: min(88vh, 835px); max-height: min(88dvh, 835px); }
.league-dialog button { font-family: inherit; font-weight: 730; font-size: 14px; line-height: 1.18; min-height: 44px; color: inherit; touch-action: manipulation; }
.league-dialog button:focus-visible, .league-dialog summary:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.league-dialog h2, .league-dialog h3, .league-dialog h4, .league-dialog p, .league-dialog figure, .league-dialog blockquote, .league-dialog dl, .league-dialog dd, .league-dialog ul, .league-dialog ol { margin: 0; }
.league-dialog ol, .league-dialog ul { padding: 0; list-style: none; }
.league-sheet > header, .league-sheet > nav { flex: 0 0 auto; }
.league-sheet > header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 8px;
  background: var(--pride) top / 100% 3px no-repeat, linear-gradient(116deg,#783660,#40284e 66%,#1b3a48);
}
.league-sheet > header h2 { font: italic 750 clamp(29px,5vw,39px)/1.08 Georgia,serif; letter-spacing: -.045em; }
.league-dialog .league-close { width: 44px; padding: 0; border: 1px solid #b282b7; border-radius: 50%; background: #301c40; font: 28px/1 system-ui; }
.league-sheet nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; padding: 3px 16px 0; border-bottom: 1px solid #856087; background: #291932; }
.league-sheet nav button { position: relative; border: 0; background: none; padding: 3px; color: #e3ccdf; }
.league-sheet nav button[aria-pressed=true] { color: #ffdfaa; background: linear-gradient(0deg,#5a354b,transparent); }
.league-sheet nav button[aria-pressed=true]::after { content: ""; position: absolute; bottom: 0; inset-inline: 9px; height: 3px; border-radius: 2px; background: var(--lg-gold); }
.league-body { overflow: auto; overscroll-behavior: contain; scrollbar-color: #8e678c #24162d; padding: clamp(12px,3.6vw,22px); min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.league-body > * { flex: none; min-width: 0; }
.league-notice { color: #bcffe8; background: #26383d; font-size: 14px; line-height: 1.35; }
.league-notice:not(:empty) { border-top: 1px solid #72867e; padding: 9px 16px; }
.league-body section h3, .league-rank h3 { font: italic 730 clamp(23px,4.3vw,31px)/1.12 Georgia,serif; letter-spacing: -.035em; }
.league-section > p, .league-body section p { color: var(--lg-dim); font-size: 14px; line-height: 1.45; }
.league-section > p { margin-top: 5px; }
.league-dialog .league-label { color: var(--lg-gold); font-size: 12px; text-transform: uppercase; font-weight: 800; letter-spacing: .105em; }
.league-rank, .league-cup-hero {
  position: relative; isolation: isolate; overflow: hidden; border: 1px solid #b784aa; border-radius: 14px;
  background: repeating-linear-gradient(-43deg,#ffe9d008 0 2px,transparent 2px 13px), linear-gradient(112deg,#6f294f,#412847 61%,#224650);
  padding: clamp(14px,4vw,24px);
}
.league-rank { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px 12px; }
.league-rank::before { content: ""; position: absolute; width: 68%; height: 160%; top: -114%; right: -29%; z-index: -1; border: 16px double #f3b5a233; border-radius: 50%; }
.league-rank .league-rank-name h3 { color: #ffebbc; margin: 4px 0; font-size: clamp(31px,7.5vw,51px); line-height: .99; text-wrap: balance; }
.league-rank-name > p:last-child { color: #ffecf6; overflow-wrap: break-word; }
.league-rank-portrait { display: grid; place-items: center; width: clamp(64px,16vw,94px); padding: 3px; border-radius: 50%; background: conic-gradient(from 60deg,#ffc77c,#f4f2cc,#b65e9d,#ffe7a7,#7fdbc9,#ffc77c); }
.league-portrait { display: block; width: 44px; height: 44px; object-fit: cover; object-position: center 27%; border-radius: 50%; background: #6d456e; }
.league-rank-portrait img { width: 100%; height: auto; aspect-ratio: 1; border: 2px solid #5e3553; }
.league-rank-score { grid-column: 1/-1; margin-top: 3px; }
.league-rank-score > div, .league-section-line, .league-objective-line, .league-objective-foot { display: flex; justify-content: space-between; align-items: center; gap: 9px; }
.league-rank-score strong { color: #ffebb8; font-weight: 750; font-size: 14px; }
.league-rank-score span { color: #f8dfee; text-align: right; font-size: 13px; }
.league-meter { width: 100%; height: 7px; margin-top: 7px; display: block; appearance: none; border: 0; border-radius: 8px; overflow: hidden; background: #251629; }
.league-meter::-webkit-progress-bar { background: #251629; }
.league-meter::-webkit-progress-value { border-radius: 8px; background: linear-gradient(90deg,#f69cbe,#ffdc8b,#8ef3df); }
.league-meter::-moz-progress-bar { border-radius: 8px; background: linear-gradient(90deg,#f69cbe,#ffdc8b,#8ef3df); }
.league-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.league-dialog .league-jump { color: #ffe7bd; border: 1px solid #ad7a8f; border-radius: 10px; padding: 10px; background: #542c4c; }
.league-dialog .league-jump-cup { color: #b9ffee; border-color: #5c9496; background: #24444c; }
.league-ladder { padding: 0 12px; border: 1px solid var(--lg-line); border-radius: 10px; background: #302038; }
.league-ladder summary { min-height: 44px; padding: 12px 0; font-size: 14px; font-weight: 750; cursor: pointer; }
.league-ladder ol { padding-bottom: 10px; }
.league-ladder p { font-size: 14px; color: var(--lg-dim); margin-bottom: 6px; }
.league-ladder li { display: grid; align-items: center; grid-template-columns: 10px 1fr auto; gap: 9px; padding: 5px 1px; color: var(--lg-dim); font-size: 14px; }
.league-ladder li i { width: 9px; height: 9px; border: 1px solid #ab8dac; border-radius: 50%; }
.league-ladder li[aria-current] { color: var(--lg-gold); font-weight: 750; }
.league-ladder li[aria-current] i { border-color: var(--lg-gold); background: var(--lg-gold); }
.league-section-line b { color: var(--lg-gold); font-size: 14px; }
.league-queens { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.league-section .league-queens, .league-section .league-objectives, .league-section .league-rounds, .league-section .league-awards, .league-section .league-stats, .league-table-wrap { margin-top: 11px; }
.league-queens li { min-width: 0; border: 1px solid #704a7a; border-radius: 10px; padding: 10px; background: #35213e; }
.league-queens strong,.league-queens small,.league-queens span { display: block; }
.league-queens strong { margin-top: 6px; font-size: 15px; }
.league-queens small,.league-queens span { margin: 3px 0; color: var(--lg-dim); font-size: 12px; }
.league-queens li.league-active-queen { border-color: #c58baa; background: #492a46; }
.league-objectives, .league-awards { display: grid; gap: 8px; }
.league-objective { padding: 13px; background: linear-gradient(120deg,#4b294c,#322139); border: 1px solid #8a5d83; border-radius: 11px; }
.league-body h4 { font-size: 16px; line-height: 1.25; }
.league-objective-line b { flex: none; color: var(--lg-gold); font-size: 14px; }
.league-objective > p { margin-top: 4px; }
.league-objective-foot { margin-top: 4px; }
.league-objective-foot > span, .league-count { color: #e4cfe4; font-size: 13px; font-variant-numeric: tabular-nums; }
.league-dialog .league-primary { padding: 6px 14px; border-radius: 9px; border: 1px solid #b5ffeb; color: #172e32; background: linear-gradient(120deg,#abffea,#75decd); }
.league-earned { color: var(--lg-mint); font-size: 14px; }
.league-objective.league-complete { background: #263b3c; border-color: #628980; }
.league-quote { padding: 5px 2px; display: flex; align-items: center; gap: 10px; }
.league-quote img { flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #ba8db1; }
.league-quote blockquote { font: italic 600 17px/1.28 Georgia,serif; color: #ffeaf9; }
.league-quote figcaption { color: #dfbcd7; font-size: 12px; margin-top: 3px; }
.league-cup-hero { border-color: #8881a6; background: repeating-linear-gradient(120deg,#ffdcff07 0 3px,transparent 3px 24px),linear-gradient(118deg,#5a2f60,#342a4b 60%,#265257); }
.league-cup-hero h3 { margin: 4px 0; color: #fff0c3; font-size: clamp(28px,6vw,40px); }
.league-dialog .league-cup-meta { color: #cbece8; font-size: 13px; margin-top: 7px; }
.league-cup-hero .league-primary, .league-cup-hero .league-cup-prize { margin-top: 12px; }
.league-cup-prize strong { color: var(--lg-gold); }
.league-rounds li,.league-awards li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; }
.league-rounds li { padding: 7px 0; border-top: 1px solid #5b3e65; }
.league-rounds li:last-child { border-bottom: 1px solid #5b3e65; }
.league-rounds b,.league-rounds small { display: block; }
.league-rounds small,.league-rounds strong { color: var(--lg-dim); font-size: 13px; }
.league-rounds b { font-size: 15px; }
.league-table-wrap { border: 1px solid #73557d; overflow: auto; border-radius: 8px; }
.league-dialog table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
.league-dialog td,.league-dialog th { padding: 9px 7px; }
.league-dialog thead { background: #44304e; color: #f3d9e9; font-size: 12px; }
.league-dialog tbody tr + tr { border-top: 1px solid #54375c; }
.league-table-you { background: #274247; color: #bcffe9; }
.league-table-you small { font-weight: 500; }
.league-section .league-prizes { color: var(--lg-gold); font-size: 13px; }
.league-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; border: 1px solid #735778; border-radius: 10px; overflow: hidden; background: #654768; }
.league-stats div { background: #39253f; padding: 9px 10px; }
.league-stats dt { color: var(--lg-dim); font-size: 12px; }
.league-stats dd { color: var(--lg-gold); font: 650 20px/1.3 Georgia,serif; }
.league-awards li { padding: 9px; border: 1px solid #62476f; border-radius: 10px; background: #302039; }
.league-foil {
  --shine: #c0a7c4; --shade: #8a738e; --badge: #3e2f48; --rim: #705a76;
  position: relative; display: grid; place-items: center; width: 33px; aspect-ratio: 1;
  color: var(--shine); background: var(--badge); border: 1px solid var(--rim); border-radius: 50%;
  font: 24px/1 Georgia,serif; font-style: normal;
}
.league-award-earned .league-foil { --badge:#422c37; --rim:var(--shade); }
.league-award-earned [data-metal="gold"] { --shine:#fff0a8; --shade:#e8a746; }
.league-award-earned [data-metal="rose"] { --shine:#ffc9e9; --shade:#e875af; }
.league-award-earned [data-metal="bronze"] { --shine:#f2ba91; --shade:#ba764b; }
.league-award-earned [data-metal="silver"] { --shine:#e6effc; --shade:#a1b0c5; }
.league-award-earned [data-metal="ice"] { --shine:#c9fff6; --shade:#59c8d3; }
.league-foil b { position: relative; font: inherit; }
.league-foil::before, .league-foil::after { position:absolute; }
.league-foil[data-shape="rosette"] b { align-self: start; margin-top: 1px; font-size: 24px; }
.league-foil[data-shape="rosette"]::before { content:""; width:15px; height:16px; bottom:3px; background:var(--shade); clip-path:polygon(12% 0,88% 0,100% 100%,65% 80%,57% 100%,44% 57%,30% 100%,22% 79%,0 100%); }
.league-foil[data-shape="pin"]::before { content:""; width:14px; height:24px; background:linear-gradient(155deg,var(--shine) 28%,var(--shade) 29% 36%,var(--shine) 37% 42%,var(--shade) 43% 48%,var(--shine) 49%,var(--shade)); clip-path:polygon(39% 0,61% 0,71% 8%,65% 22%,62% 34%,78% 48%,96% 70%,88% 87%,72% 100%,28% 100%,12% 87%,4% 70%,22% 48%,38% 34%,35% 22%,29% 8%); }
.league-foil[data-shape$="heel"]::before,.league-foil[data-shape="twin-heels"]::before,.league-foil[data-shape="twin-heels"]::after {
  content:""; width:24px; height:19px; background:linear-gradient(140deg,var(--shine),var(--shade));
  clip-path:polygon(6% 7%,23% 25%,41% 51%,62% 68%,84% 67%,100% 81%,100% 91%,56% 91%,31% 63%,17% 54%,13% 100%,8% 100%,7% 56%,1% 30%);
}
.league-foil[data-shape="twin-heels"]::before { transform:translate(-3px,-4px) scale(.75); }
.league-foil[data-shape="twin-heels"]::after { transform:translate(3px,4px) scale(.75); }
.league-foil[data-shape="ball"]::before { content:""; width:22px; height:22px; border-radius:50%; background:radial-gradient(circle at 39% 27%,var(--badge) 0 7%,transparent 8%),radial-gradient(circle at 59% 31%,var(--badge) 0 7%,transparent 8%),radial-gradient(circle at 40% 47%,var(--badge) 0 8%,transparent 9%),conic-gradient(from 25deg,var(--shine),var(--shade),var(--shine),var(--shade),var(--shine)); }
.league-foil[data-shape="cup"]::before { content:""; top:6px; width:21px; height:11px; border:2px solid var(--shade); border-radius:3px 3px 9px 9px; }
.league-foil[data-shape="cup"]::after { content:""; width:23px; height:24px; top:4px; background:linear-gradient(130deg,var(--shine),var(--shade)); clip-path:polygon(16% 1%,84% 1%,79% 39%,67% 54%,55% 60%,55% 78%,64% 84%,78% 85%,78% 97%,22% 97%,22% 85%,36% 84%,45% 78%,45% 60%,33% 54%,21% 39%); }
.league-foil[data-shape="cup"] b { z-index:1; align-self:start; margin-top:6px; color:var(--badge); font:800 9px/1.2 system-ui; letter-spacing:-.07em; }
.league-awards li.league-award-earned { background: #422940; border-color: #a57883; }
.league-award small,.league-title-name { display: block; color: var(--lg-dim); font-size: 12px; }
.league-title-name { color: #ffd89b; }
.league-dialog .league-title-btn { border: 1px solid #ac879b; background: #58334e; border-radius: 8px; padding: 5px 8px; }
@media (max-width: 540px) {
  .league-dialog { width: calc(100% - 12px); border-radius: 13px; }
  .league-sheet { max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .league-sheet > header { padding: 6px 11px 3px; }
  .league-sheet > nav { padding-inline: 5px; }
  .league-queens { grid-template-columns: 1fr; }
  .league-queens li { display: grid; align-items: center; grid-template-columns: auto 1fr; gap: 10px; padding: 7px 9px; }
  .league-queens li > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1px 5px; }
  .league-queens strong,.league-queens small,.league-queens span { margin: 0; }
  .league-queens .league-meter { margin-top: 3px; }
  .league-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .league-awards li { grid-template-columns: auto minmax(0,1fr); }
  .league-awards li > :last-child { grid-column: 2; justify-self: start; }
  .league-dialog td,.league-dialog th { padding: 8px 4px; }
}
@media (max-width: 355px) {
  .league-body { padding: 10px; }
  .league-rank { padding: 12px; }
  .league-rank-portrait { width: 55px; }
  .league-dialog nav button { font-size: 13px; }
  .league-queens li > div { display: block; }
  .league-rank-score > div { align-items: flex-end; }
}

.league-quote .league-listen { margin-inline-start: 4px; padding: 5px 6px; border: 0; background: transparent; color: #ffceef; font: inherit; text-decoration: underline; cursor: pointer; }
