/* ═══════════════════════════════════════════════════════════════════════
   FF Legends — Phase 1 (20261123_legends)
   Today's legend + Robbery Court (Gym › Articles), the Legends shelf
   (Gym › Fighters, third toggle) and the legend sheet. Palette follows the
   Gym navy cards: navy #121a2b, gold #d6b05c, cream #f4efe6, ink #1A1A2E.
   W-L-D always green / red / grey. No portraits: the crest is era + weight.
   ═══════════════════════════════════════════════════════════════════════ */

#lgTodayMount { margin: 0 0 14px; }
#lgTodayMount[hidden] { display: none; }

/* ── Crest ── */
.lg-crest {
    width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto;
    background: #1b2740; box-shadow: inset 0 0 0 2px #d6b05c;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #d6b05c; line-height: 1; text-align: center;
}
.lg-crest b { font-size: 14px; font-weight: 900; letter-spacing: -.01em; }
.lg-crest i { font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; color: #a9b0bd; white-space: nowrap; }
.lg-crest--sm { width: 44px; height: 44px; }
.lg-crest--sm b { font-size: 11.5px; }
.lg-crest--sm i { font-size: 7px; letter-spacing: .05em; }
.lg-crest--lg { width: 64px; height: 64px; }
.lg-crest--lg b { font-size: 16px; }
.lg-crest--lg i { font-size: 9px; }
.lg-crest--hidden { background: transparent; box-shadow: inset 0 0 0 2px rgba(214,176,92,.45); }
.lg-crest--hidden i { font-size: 12px; color: #d6b05c; }

/* ── Record ── */
.lg-rec { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; color: #8a91a0; }
.lg-rec .lg-w { color: #1d8a3e; }
.lg-rec .lg-l { color: #c62828; }
.lg-rec .lg-d { color: #8a91a0; }
.lg-rec .lg-nc { font-weight: 700; font-size: .85em; }
.lg-ko { font-size: 12px; font-weight: 700; color: #8a91a0; white-space: nowrap; }
/* On navy */
.lg-today .lg-rec .lg-w, .lg-sh-top .lg-rec .lg-w { color: #5fd08a; }
.lg-today .lg-rec .lg-l, .lg-sh-top .lg-rec .lg-l { color: #ff7a6e; }
.lg-today .lg-rec .lg-d, .lg-sh-top .lg-rec .lg-d { color: #9aa1ad; }
.lg-today .lg-ko, .lg-sh-top .lg-ko { color: #a9b0bd; }

/* ── Today's legend (navy) ── */
.lg-today { background: #121a2b; color: #f4efe6; border-radius: 18px; padding: 14px 16px 12px; }
.lg-today-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lg-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #d6b05c; white-space: nowrap; }
.lg-dayn { font-size: 12px; color: #a9b0bd; white-space: nowrap; }
.lg-today-main {
    width: 100%; display: flex; align-items: center; gap: 12px; margin: 10px 0 0; padding: 0;
    background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 60px;
}
.lg-today-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lg-today-name { font-size: 19px; font-weight: 900; letter-spacing: -.01em; color: #f4efe6; line-height: 1.15; }
.lg-today-sub { font-size: 12.5px; font-weight: 600; color: #a9b0bd; }
.lg-today-rec { display: flex; align-items: baseline; gap: 8px; font-size: 15px; }
.lg-chev { flex: 0 0 auto; font-size: 24px; color: #d6b05c; line-height: 1; }
.lg-today-lead { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: #d9d3c7; }
.lg-today-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08);
}
.lg-today-next { font-size: 12.5px; font-weight: 700; color: #c9c1b3; white-space: nowrap; }
.lg-today-all {
    flex: 0 0 auto; min-height: 36px; padding: 0 2px; border: 0; background: none;
    color: #d6b05c; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap;
}

/* ── Robbery Court — coming soon ── */
.lg-court {
    margin-top: 10px; background: #fff; border: 1px solid #e8eaef; border-radius: 16px;
    padding: 12px 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.lg-court-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lg-court-title { font-size: 15px; font-weight: 900; color: #1A1A2E; white-space: nowrap; }
.lg-soon {
    flex: 0 0 auto; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: #7a5d1e; background: #f6efdc; border-radius: 999px; padding: 4px 9px; white-space: nowrap;
}
.lg-court-line { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: #5b6170; }

/* ── Fighters toggle with three views ── */
#fdViewToggle .fd-view-btn { padding-left: 8px; padding-right: 8px; }

/* ── Legends shelf ── */
.lg-shelf { margin: 0 auto; max-width: 680px; }
.lg-next {
    display: flex; align-items: center; gap: 12px; background: #121a2b; color: #f4efe6;
    border-radius: 16px; padding: 12px 14px; margin: 0 0 12px;
}
.lg-next-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lg-next-title { font-size: 15px; font-weight: 900; color: #f4efe6; }
.lg-next-sub { font-size: 12.5px; color: #a9b0bd; white-space: nowrap; }
.lg-list { background: #fff; border: 1px solid #e8eaef; border-radius: 16px; overflow: hidden; }
.lg-row {
    width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 0;
    background: none; border: 0; border-top: 1px solid #eef0f3; font: inherit; color: inherit;
    text-align: left; cursor: pointer; min-height: 64px;
}
.lg-row:first-child { border-top: 0; }
.lg-row:active { background: #f7f8fa; }
.lg-row-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lg-row-name { font-size: 15px; font-weight: 800; color: #1A1A2E; line-height: 1.2; }
.lg-row-sub { font-size: 12px; color: #6b7280; white-space: nowrap; }
.lg-row-rec { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14.5px; }
.lg-new {
    display: inline-block; vertical-align: 2px; margin-left: 4px; font-size: 9.5px; font-weight: 800; letter-spacing: .1em;
    text-transform: uppercase; color: #7a5d1e; background: #f6efdc; border-radius: 999px; padding: 2px 7px;
}
.lg-src { margin: 10px 2px 0; font-size: 11.5px; line-height: 1.45; color: #8a91a0; }
.lg-loading { padding: 28px 12px; text-align: center; color: #8a91a0; font-size: 13px; }

/* ── The legend sheet ── */
.lg-ov {
    display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55);
    align-items: center; justify-content: center; padding: 20px;
}
.lg-ov.open { display: flex; animation: lgFade .18s ease; }
@keyframes lgFade { from { opacity: 0; } to { opacity: 1; } }
.lg-sheet {
    width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
    background: #fff; border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.lg-sh-top { position: relative; background: #121a2b; color: #f4efe6; padding: 18px 16px 14px; border-radius: 18px 18px 0 0; }
.lg-sh-close {
    position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0;
    background: rgba(255,255,255,.1); color: #f4efe6; font-size: 14px; cursor: pointer;
}
.lg-sh-id { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.lg-sh-idtxt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lg-sh-name { font-size: 22px; font-weight: 900; letter-spacing: -.01em; line-height: 1.12; color: #f4efe6; }
.lg-sh-sub { font-size: 13px; font-weight: 600; color: #d6b05c; }
.lg-sh-divs { font-size: 12.5px; color: #a9b0bd; }
.lg-sh-rec { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; font-size: 22px; }
.lg-sh-rec .lg-ko { font-size: 13px; }

/* Career strip: one block per fight, oldest first, title fights tall */
.lg-strip { display: flex; align-items: flex-end; gap: 1px; height: 28px; margin-top: 10px; }
.lg-strip--dense { gap: 0; }
.lg-strip--wait { background: rgba(255,255,255,.06); border-radius: 4px; }
.lg-b { display: block; flex: 1 1 0; min-width: 0; height: 62%; border-radius: 1px; }
.lg-b--t { height: 100%; }
.lg-b--w { background: #5fd08a; }
.lg-b--l { background: #ff7a6e; }
.lg-b--d { background: #9aa1ad; }
.lg-b--n { background: #4a5468; }
.lg-strip-key { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 10.5px; color: #8b93a3; white-space: nowrap; }

.lg-sh-body { padding: 14px 16px 22px; }
.lg-cells {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid #e8eaef; border-radius: 12px; background: #fff;
}
.lg-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; }
.lg-cell + .lg-cell { border-left: 1px solid #eef0f3; }
.lg-cell b { font-size: 18px; font-weight: 900; color: #1A1A2E; font-variant-numeric: tabular-nums; }
.lg-cell span { font-size: 11px; font-weight: 700; color: #6b7280; white-space: nowrap; }
.lg-h { margin: 18px 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #9a7a34; }
.lg-bio { margin: 0; font-size: 14.5px; line-height: 1.6; color: #2b2f3a; }
.lg-fights { display: flex; flex-direction: column; gap: 8px; }
.lg-fight { border: 1px solid #eceef2; border-radius: 12px; padding: 10px 12px; }
.lg-fight-label { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9a7a34; margin-bottom: 3px; }
.lg-fight-main { display: flex; align-items: baseline; gap: 8px; }
.lg-fight-opp { font-size: 15px; font-weight: 800; color: #1A1A2E; }
.lg-fight-meta { margin-top: 2px; font-size: 12.5px; color: #6b7280; }
.lg-fight-belts { margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: #4b5160; }
.lg-res { flex: 0 0 auto; font-size: 12px; font-weight: 900; white-space: nowrap; }
.lg-res--w { color: #1d8a3e; }
.lg-res--l { color: #c62828; }
.lg-res--d, .lg-res--n { color: #8a91a0; }

.lg-full { margin-top: 14px; border: 1px solid #eceef2; border-radius: 12px; }
.lg-full summary { cursor: pointer; padding: 12px; font-size: 14px; font-weight: 800; color: #1A1A2E; list-style: none; min-height: 44px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; }
.lg-full summary::-webkit-details-marker { display: none; }
.lg-full summary::after { content: '\203A'; font-size: 20px; color: #9aa1ad; transition: transform .15s; }
.lg-full[open] summary::after { transform: rotate(90deg); }
.lg-fr-list { list-style: none; margin: 0; padding: 0 12px 8px; }
.lg-fr { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid #f1f2f5; font-size: 13px; }
.lg-fr-res { flex: 0 0 22px; font-size: 11.5px; }
.lg-fr-opp { flex: 1 1 auto; min-width: 0; color: #1A1A2E; font-weight: 600; }
.lg-fr-how { flex: 0 0 auto; color: #6b7280; white-space: nowrap; }
.lg-fr-yr { flex: 0 0 34px; text-align: right; color: #8a91a0; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
    .lg-ov { align-items: flex-end; padding: 0; }
    .lg-sheet { max-width: none; max-height: 92vh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
    .lg-sh-top { border-radius: 20px 20px 0 0; padding-top: 22px; }
    .lg-sh-top::before { content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(255,255,255,.25); }
}
@media (max-width: 374px) {
    .lg-today-next { font-size: 11.5px; }
    .lg-today-name { font-size: 17.5px; }
    .lg-row { gap: 10px; padding: 10px 12px; }
}

/* Two-word crest weights (Super light, Super middle, Light heavy) stack */
.lg-crest i.lg-crest-long { white-space: normal; max-width: 40px; line-height: 1.05; letter-spacing: .04em; }
.lg-crest--sm i.lg-crest-long { max-width: 34px; font-size: 6.5px; letter-spacing: .03em; margin-top: 2px; }

/* Link from the sheet to the public legend page (20261123_legend_pages) */
.lg-pagelink {
    display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-top: 14px;
    padding: 0 14px; border: 1px solid #e8eaef; border-radius: 14px; text-decoration: none;
    font-size: 14px; font-weight: 800; color: #1A1A2E;
}
.lg-pagelink span { font-size: 20px; color: #9a7a34; }

/* All-time draft entry on the Legends shelf (20261123_alltime) */
.lg-atlink {
    display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px; min-height: 60px;
    background: #fff; border: 1px solid #e8eaef; border-left: 4px solid #d6b05c; border-radius: 16px;
    text-decoration: none; color: inherit;
}
.lg-atlink-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lg-atlink-title { font-size: 15px; font-weight: 900; color: #1A1A2E; }
.lg-atlink-sub { font-size: 12.5px; color: #6b7280; white-space: nowrap; }
.lg-atlink .lg-chev { color: #9a7a34; }

/* Only on FF + share (20261123_ff_only) */
.lg-ffcells .lg-cell em { font-style: normal; font-size: 11px; font-weight: 700; color: #9a7a34; white-space: nowrap; }
.lg-ffnote { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: #8a91a0; }
.lg-web { border: 1px solid #eceef2; border-radius: 12px; overflow: hidden; }
.lg-web-row {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 46px; padding: 0 12px; margin: 0; border: 0; border-top: 1px solid #f1f2f5; background: #fff;
    font: inherit; color: #1A1A2E; text-align: left;
}
.lg-web-row:first-child { border-top: 0; }
button.lg-web-row { cursor: pointer; }
.lg-web-name { font-size: 14px; font-weight: 700; min-width: 0; }
.lg-web-name .lg-rec { margin-left: 6px; }
.lg-web-row .lg-chev { color: #9aa1ad; font-size: 20px; }
.lg-sharebtn {
    width: 100%; min-height: 50px; margin-top: 14px; border: 0; border-radius: 14px;
    background: #f5c518; color: #1A1A2E; font: inherit; font-size: 15.5px; font-weight: 900; cursor: pointer;
}
.lg-sharebtn[disabled] { opacity: .6; }

/* Favourites (20261123_favourites) */
.lg-favbtn {
    width: 100%; min-height: 48px; margin-top: 8px; border: 1px solid #e8eaef; border-radius: 14px; background: #fff;
    color: #1A1A2E; font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer;
}
.lg-favfight {
    margin-top: 8px; padding: 0; min-height: 32px; border: 0; background: none; color: #9a7a34;
    font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.lg-favbtn[disabled], .lg-favfight[disabled] { color: #1d8a3e; cursor: default; }
.fd-modal button.fx-mfav { width: 100%; background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: #1A1A2E; cursor: pointer; text-align: left; }
.fd-modal button.fx-mfav[disabled] { color: #1d8a3e; cursor: default; }

/* Sheet: all-time draft link (20261123_connect) */
.lg-pagelink--draft { background: #121a2b; border-color: #121a2b; color: #f4efe6; }
.lg-pagelink--draft span { color: #d6b05c; }
/* Fighter card: legend links (20261123_connect) */
.fd-modal .fx-mlegend { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid #e8eaef; border-left: 4px solid #d6b05c; border-radius: 14px; background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: #1A1A2E; text-decoration: none; cursor: pointer; text-align: left; width: 100%; }
.fd-modal .fx-mlegend .lg-rec { margin-left: 6px; }
.fd-modal .fx-mlegend > span[aria-hidden] { color: #9a7a34; font-size: 18px; }

/* ═══ Legends art (20261123_legends_art) ═══════════════════════════════
   GPT set in img/legends/ (originals in _archive/legends-art-2026-11-23/):
   gold medallion crest, FF Legends emblem, ring / hall / gavel / locker
   photos. No portraits: the art is the room, never the fighter. Photos sit
   under a navy gradient layer so every line of text stays on dark. */
.lg-crest {
    background: url('/img/legends/medallion-96.webp?v=20261123_legends_art') center / 100% 100% no-repeat;
    box-shadow: 0 2px 6px rgba(0,0,0,.28);
}
.lg-crest b { font-size: 11.5px; color: #ecd08a; text-shadow: 0 1px 1px rgba(0,0,0,.45); }
.lg-crest i { font-size: 7px; letter-spacing: .06em; margin-top: 2px; color: #cfd4dd; }
.lg-crest--sm { width: 48px; height: 48px; }
.lg-crest--sm b { font-size: 9.5px; }
.lg-crest--sm i { font-size: 6px; letter-spacing: .04em; }
.lg-crest--lg { width: 68px; height: 68px; background-image: url('/img/legends/medallion-192.webp?v=20261123_legends_art'); }
.lg-crest--lg b { font-size: 13.5px; }
.lg-crest--lg i { font-size: 7.5px; }
.lg-crest i.lg-crest-long { max-width: 32px; }
.lg-crest--sm i.lg-crest-long { max-width: 28px; font-size: 5.5px; }
.lg-crest--lg i.lg-crest-long { max-width: 40px; }
.lg-crest--hidden { box-shadow: none; opacity: .55; }
.lg-crest--hidden i { font-size: 11px; color: #ecd08a; }

.lg-emb { display: inline-block; width: 22px; height: 22px; margin-right: 7px; vertical-align: -6px; }

/* Readability (16:02 pass): photos stay at the edges of each card and every
   line of text sits on solid or near-solid navy. */

/* Today's legend: a ring banner over the header row only */
.lg-today {
    background:
        linear-gradient(180deg, rgba(18,26,43,.35) 0, rgba(18,26,43,.85) 44px, #121a2b 78px),
        url('/img/legends/today-ring-720.webp?v=20261123_legends_art') center 30% / 100% auto no-repeat,
        #121a2b;
    padding-top: 14px;
}
.lg-today .lg-eyebrow { text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.lg-today .lg-dayn { color: #d9d3c7; text-shadow: 0 1px 4px rgba(0,0,0,.8); }

/* Robbery Court: text on navy, the gavel fills the right-hand third */
.lg-court {
    border: 0; color: #f4efe6; padding: 14px 16px;
    background:
        linear-gradient(90deg, #121a2b 0%, #121a2b 58%, rgba(18,26,43,.55) 80%, rgba(18,26,43,.15) 100%),
        url('/img/legends/court-720.webp?v=20261123_legends_art') right 60% / auto 100% no-repeat,
        #121a2b;
    box-shadow: 0 1px 2px rgba(16,24,40,.08);
}
.lg-court-title { color: #f4efe6; }
.lg-court-line { color: #d9d3c7; max-width: 64%; }
.lg-court .lg-soon { color: #141b2b; background: #d6b05c; }

/* Shelf hero: the hall as a photo banner, the title on a dark fade, the
   next-legend row on solid navy */
.lg-hero { overflow: hidden; border-radius: 18px; margin: 0 0 12px; color: #f4efe6; background: #121a2b; }
.lg-hero-top {
    display: flex; align-items: center; gap: 12px; padding: 78px 16px 14px;
    background:
        linear-gradient(180deg, rgba(10,15,27,0) 0%, rgba(10,15,27,.55) 45%, rgba(18,26,43,.96) 82%, #121a2b 100%),
        url('/img/legends/hall-720.webp?v=20261123_legends_art') center 40% / cover no-repeat;
}
.lg-hero-emb { width: 56px; height: 56px; flex: 0 0 auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.lg-hero-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lg-hero-title {
    font-family: "Playfair Display","Playfair Display Fallback",Georgia,serif;
    font-size: 26px; font-weight: 900; line-height: 1.05; color: #fff; letter-spacing: -.01em;
    text-shadow: 0 2px 8px rgba(0,0,0,.7);
}
.lg-hero-sub { font-size: 13px; font-weight: 700; color: #f4efe6; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.lg-hero .lg-next { background: #121a2b; margin: 0; border-radius: 0; border-top: 1px solid rgba(255,255,255,.08); }
.lg-hero .lg-next-sub { color: #c3c9d3; }

/* All-time draft door: text on navy, the robes on the right */
.lg-atlink {
    border: 0; min-height: 76px; color: #f4efe6;
    background:
        linear-gradient(90deg, #121a2b 0%, #121a2b 56%, rgba(18,26,43,.6) 76%, rgba(18,26,43,.2) 100%),
        url('/img/legends/locker-720.webp?v=20261123_legends_art') right 40% / auto 100% no-repeat,
        #121a2b;
}
.lg-atlink-title { color: #fff; font-size: 16px; }
.lg-atlink-sub { color: #d9d3c7; white-space: normal; }
.lg-atlink-txt { max-width: 62%; }
.lg-atlink .lg-chev { color: #d6b05c; text-shadow: 0 1px 4px rgba(0,0,0,.8); }

/* Legend sheet: a faint ring behind the name */
.lg-sh-top {
    background:
        linear-gradient(180deg, rgba(18,26,43,.72) 0%, rgba(18,26,43,.93) 50%, #121a2b 100%),
        url('/img/legends/today-ring-720.webp?v=20261123_legends_art') center 30% / cover no-repeat,
        #121a2b;
}
.lg-sh-sub, .lg-sh-name { text-shadow: 0 1px 4px rgba(0,0,0,.5); }

/* ═══ Legends v2 (20261123_legends_v2) ═══════════════════════════════════
   Flags, the story in paragraphs, the career strip rebuilt (whole-pixel
   blocks, gold top = world title fight, layoff gaps), belt chips, star
   favourite-fight button, legend-web chips, compact Robbery Court teaser,
   shelf hero with the photo as a banner. */
.lg-flag {
    display: inline-block; flex: 0 0 auto; width: 15px; height: 15px; margin-right: 6px; border-radius: 50%;
    background: #2a3550 center / cover no-repeat; box-shadow: 0 0 0 1px rgba(0,0,0,.14); vertical-align: -2px;
}
.lg-today-sub, .lg-sh-sub, .lg-row-sub { display: flex; align-items: center; min-width: 0; }
.lg-today-sub > span:last-child, .lg-sh-sub > span:last-child, .lg-row-sub > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Career strip */
.lg-strip { display: flex; align-items: stretch; gap: 2px; height: 26px; margin-top: 12px; }
.lg-strip--dense { gap: 1px; }
.lg-strip.is-laid { gap: 0; }
.lg-b { flex: 1 1 0; min-width: 0; height: auto; border-radius: 1px; }
.lg-b--t { height: auto; box-shadow: inset 0 4px 0 #d6b05c; }
.lg-strip.is-laid .lg-b, .lg-strip.is-laid .lg-gap { flex: 0 0 auto; }
.lg-gap {
    flex: 0 0 10px; align-self: center; height: 12px; box-sizing: border-box;
    border-top: 1px dashed #6b7690; border-bottom: 1px dashed #6b7690;
}
.lg-strip--rows { flex-wrap: wrap; height: auto; row-gap: 3px; }
.lg-strip--rows .lg-b { height: 14px; }
.lg-strip--rows .lg-b--t { box-shadow: inset 0 3px 0 #d6b05c; }
.lg-strip--rows .lg-gap { display: none; }
.lg-strip-key { align-items: center; margin-top: 7px; font-size: 11px; }
.lg-key-t {
    display: inline-block; width: 9px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px;
    background: #5fd08a; box-shadow: inset 0 3px 0 #d6b05c;
}

/* The story */
.lg-bio p { margin: 0 0 12px; font-size: 15px; line-height: 1.65; color: #2b2f3a; }
.lg-bio p:last-child { margin-bottom: 0; }

/* Defining fights: belt chips + favourite star */
.lg-fight-belts { margin-top: 6px; }
.lg-belts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; line-height: 1.4; color: #4b5160; }
.lg-belts-verb { font-weight: 800; color: #1A1A2E; margin-right: 1px; }
.lg-belt { font-size: 11px; font-weight: 800; color: #8a6a1c; background: #fbf3d5; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.lg-belts-wt { color: #6b7280; }
.lg-favfight {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 34px; padding: 0 12px;
    border: 1px solid #eadfbf; border-radius: 999px; background: #fff; color: #9a7a34;
    font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.lg-favfight.is-on, .lg-favfight[disabled].is-on { background: #fbf3d5; color: #7a5d1e; }
.lg-favfight.is-on svg { fill: #d6b05c; }

/* Only on FF: legend web chips */
.lg-web-row { flex-wrap: wrap; padding: 8px 12px; row-gap: 6px; box-sizing: border-box; max-width: 100%; }
.lg-chips { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin-left: auto; }
.lg-chip { font-size: 11px; font-weight: 900; padding: 3px 6px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lg-chip--w { background: #edf7ee; color: #1d6b2e; }
.lg-chip--l { background: #fdeeee; color: #b9292f; }
.lg-chip--d, .lg-chip--more { background: #f1f2f5; color: #6b7280; }
.lg-web-more summary {
    list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: center;
    border-top: 1px solid #f1f2f5; font-size: 13px; font-weight: 800; color: #9a7a34;
}
.lg-web-more summary::-webkit-details-marker { display: none; }
.lg-web-more[open] summary { display: none; }
.lg-web-more .lg-web-row:first-of-type { border-top: 1px solid #f1f2f5; }
.lg-fr-t { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 2px; background: #d6b05c; vertical-align: 1px; }

/* Small crest (draft room feed) */
.lg-crest--xs { width: 30px; height: 30px; }
.lg-crest--xs b { font-size: 6.5px; }
.lg-crest--xs i { display: none; }

/* Robbery Court: one-line teaser until it opens */
.lg-court.lg-court--soon {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 11px 14px;
    background: #fff; border: 1px solid #e8eaef; border-left: 4px solid #d6b05c; border-radius: 14px; color: #1A1A2E;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.lg-court--soon .lg-court-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lg-court--soon .lg-court-title { font-size: 14.5px; color: #1A1A2E; }
.lg-court--soon .lg-court-line { margin: 0; max-width: none; font-size: 12.5px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-court--soon .lg-soon { color: #7a5d1e; background: #f6efdc; }

/* Shelf hero: photo banner, then the title on solid navy */
.lg-hero-photo {
    height: 96px;
    background:
        linear-gradient(180deg, rgba(18,26,43,0) 40%, #121a2b 100%),
        url('/img/legends/hall-720.webp?v=20261123_legends_art') center 40% / cover no-repeat;
}
.lg-hero .lg-hero-top { padding: 4px 16px 14px; background: #121a2b; }
.lg-hero-title, .lg-hero-sub { text-shadow: none; }
.lg-hero-sub { color: #a9b0bd; font-weight: 600; }

/* ═══ My Locker (20261124_legends_locker) ═══════════════════════════════
   Your own legends, earned through play (js/legends.js lgRenderLocker).
   Same grammar as the shelf: navy hero, white cards on the light Gym page,
   gold for anything earned. A card's tier is its edge colour: bronze /
   silver / gold. The walkout takeover follows js/moments.js (.ffm). */
.lg-lk-wrap { max-width: 680px; margin: 0 auto; padding: 12px 14px 28px; box-sizing: border-box; }
/* Gym › Legends tab (20261124_legend_reveal): the shelf on its own page. */
.lg-page-wrap { max-width: 680px; margin: 0 auto; padding: 12px 14px 28px; box-sizing: border-box; }
.lg-lk { --lg-bronze: #b07a4a; --lg-silver: #8f9aab; --lg-gold: #c99a32; }
.lg-lk--bronze { --lg-tier: #b07a4a; --lg-tier-bg: #f7ede4; --lg-tier-ink: #6e4521; }
.lg-lk--silver { --lg-tier: #8f9aab; --lg-tier-bg: #eef1f5; --lg-tier-ink: #3f4a5c; }
.lg-lk--gold   { --lg-tier: #c99a32; --lg-tier-bg: #f8efd6; --lg-tier-ink: #6f5214; }

.lg-hero-photo--locker {
    background:
        linear-gradient(180deg, rgba(18,26,43,0) 40%, #121a2b 100%),
        url('/img/legends/locker-720.webp?v=20261123_legends_art') center 45% / cover no-repeat;
}

/* The walkout card: the checklist, the ready state, the claimed state */
.lg-lk-wo {
    margin: 0 0 14px; padding: 16px; border-radius: 16px; background: #fff;
    border: 1px solid #e8eaef; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.lg-lk-wo.is-ready { background: #121a2b; border-color: #121a2b; color: #f4efe6; box-shadow: inset 0 0 0 2px #d6b05c; }
.lg-lk-kicker { font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #9a7a34; }
.lg-lk-wo.is-ready .lg-lk-kicker { color: #d6b05c; }
.lg-lk-wo-title { margin: 4px 0 0; font-size: 19px; font-weight: 900; line-height: 1.2; color: #1A1A2E; letter-spacing: -.01em; }
.lg-lk-wo.is-ready .lg-lk-wo-title { color: #fff; font-family: "Playfair Display","Playfair Display Fallback",Georgia,serif; font-size: 23px; }
.lg-lk-wo-sub { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: #4b5563; }
.lg-lk-wo.is-ready .lg-lk-wo-sub { color: #d9d3c7; }
.lg-lk-wo-btn {
    display: block; width: 100%; min-height: 52px; margin-top: 14px; border: 0; border-radius: 14px;
    background: #d6b05c; color: #141b2b; font: inherit; font-size: 16px; font-weight: 900; cursor: pointer;
    box-shadow: 0 10px 26px rgba(214,176,92,.28); -webkit-tap-highlight-color: transparent;
}
.lg-lk-wo-btn:disabled { opacity: .7; }
.lg-lk-wo-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lg-lk-err { margin: 8px 0 0; min-height: 0; font-size: 13px; color: #ffb4ab; }
.lg-lk-err:empty { display: none; }
.lg-lk-wo-foot { margin: 12px 0 0; font-size: 12.5px; line-height: 1.45; color: #6b7280; }

.lg-lk-checks { margin-top: 12px; border: 1px solid #eceef2; border-radius: 12px; overflow: hidden; }
.lg-lk-check {
    width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; margin: 0;
    border: 0; border-top: 1px solid #f1f2f5; background: #fff; font: inherit; color: #1A1A2E; text-align: left; cursor: pointer;
}
.lg-lk-check:first-child { border-top: 0; }
.lg-lk-check:active { background: #f7f8fa; }
.lg-lk-tick {
    flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px #d5d9e0;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; color: #fff;
}
.lg-lk-check.is-met .lg-lk-tick { background: #1f9d55; box-shadow: none; }
.lg-lk-check-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lg-lk-check-lbl { font-size: 14px; font-weight: 800; line-height: 1.25; }
.lg-lk-check-sub { font-size: 12px; color: #6b7280; }
.lg-lk-state { flex: 0 0 auto; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a91a0; }
.lg-lk-check.is-met .lg-lk-state { color: #1f9d55; }

.lg-lk-done {
    width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px;
    border: 1px solid #eceef2; border-left: 4px solid var(--lg-tier); border-radius: 12px; background: #fff;
    font: inherit; color: #1A1A2E; text-align: left; cursor: pointer;
}
.lg-lk-done-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lg-lk-done-name { font-size: 15px; font-weight: 800; }
.lg-lk-done-tier { font-size: 12px; font-weight: 800; color: var(--lg-tier-ink); }

/* Your legends: count + tier chips, then the card grid */
.lg-lk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 2px 10px; flex-wrap: wrap; }
.lg-lk-head-title { font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #4b5563; }
.lg-lk-head-title b { margin-left: 4px; color: #1A1A2E; }
.lg-lk-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.lg-lk-chip { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--lg-tier-bg); color: var(--lg-tier-ink); }
.lg-lk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
@media (min-width: 560px) { .lg-lk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lg-lk-card {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0;
    padding: 12px 8px 12px; margin: 0; border: 1px solid #e8eaef; border-top: 4px solid var(--lg-tier); border-radius: 14px;
    background: #fff; font: inherit; color: #1A1A2E; text-align: center; cursor: pointer;
    box-shadow: 0 1px 2px rgba(16,24,40,.04); -webkit-tap-highlight-color: transparent;
}
.lg-lk-card:active { background: #f7f8fa; }
.lg-lk-card.lg-lk--gold { box-shadow: 0 0 0 1px rgba(201,154,50,.35), 0 6px 16px rgba(201,154,50,.16); }
.lg-lk-tier {
    align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--lg-tier-ink);
}
.lg-lk-new { font-size: 9px; letter-spacing: .1em; padding: 1px 6px; border-radius: 999px; color: #fff; background: #e63333; }
.lg-lk-name { width: 100%; font-size: 14px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.lg-lk-sub { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11.5px; color: #6b7280; }
.lg-lk-rec { font-size: 13px; }

/* Shelf row + the draft door */
.lg-atlink.lg-atlink--locker {
    background:
        linear-gradient(90deg, #121a2b 0%, #121a2b 56%, rgba(18,26,43,.6) 76%, rgba(18,26,43,.2) 100%),
        url('/img/legends/hall-720.webp?v=20261123_legends_art') right 40% / auto 100% no-repeat,
        #121a2b;
}
.lg-atlink--locker.is-ready { box-shadow: inset 0 0 0 2px #d6b05c; }
.lg-atlink--locker .lg-new { color: #141b2b; background: #d6b05c; }
.lg-atlink--lkdraft { cursor: pointer; }
.lg-atlink--lkdraft.is-locked { cursor: default; background: #fff; color: #1A1A2E; border: 1px solid #e8eaef; border-left: 4px solid #d5d9e0; }
.lg-atlink--lkdraft.is-locked .lg-atlink-title { color: #1A1A2E; }
.lg-atlink--lkdraft.is-locked .lg-atlink-sub { color: #6b7280; }
.lg-atlink--lkdraft.is-locked .lg-atlink-txt { max-width: none; }
.lg-lk-shelf {
    display: block; width: 100%; min-height: 48px; margin: 0; border: 1px solid #e8eaef; border-radius: 14px;
    background: #fff; font: inherit; font-size: 14px; font-weight: 800; color: #1A1A2E; cursor: pointer;
}
.lg-lk-retry { margin-left: 6px; border: 0; background: none; font: inherit; font-weight: 800; color: #9a7a34; text-decoration: underline; cursor: pointer; }

/* The legend sheet: "Gold · in your Locker" + the ADP chip */
.lg-sh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lg-sh-tags:empty { display: none; }
.lg-sh-tag { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--lg-tier-bg, rgba(255,255,255,.12)); color: var(--lg-tier-ink, #f4efe6); }
.lg-sh-tag--adp { background: rgba(214,176,92,.16); color: #ecd08a; }

/* The walkout takeover (same frame as js/moments.js .ffm) */
.lg-wo {
    position: fixed; inset: 0; z-index: 10000; background: #05070c; color: #fff; overflow: hidden;
    overscroll-behavior: contain; font-family: inherit; animation: lgWoIn .32s ease-out both;
    --lg-tier: #d6b05c;
}
.lg-wo.lg-lk--bronze { --lg-tier: #c08a5a; }
.lg-wo.lg-lk--silver { --lg-tier: #c7cfda; }
.lg-wo.lg-lk--gold { --lg-tier: #e2b84f; }
@keyframes lgWoIn { from { opacity: 0; } to { opacity: 1; } }
.lg-wo-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; opacity: .55; }
.lg-wo::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(5,7,12,.55) 0%, rgba(5,7,12,.2) 30%, rgba(5,7,12,.55) 55%, rgba(5,7,12,.94) 80%, rgba(5,7,12,.98) 100%);
}
.lg-wo-close {
    position: absolute; z-index: 2; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 14px; width: 44px; height: 44px;
    border: none; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer;
}
.lg-wo-body {
    position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 460px; box-sizing: border-box;
    padding: 0 24px calc(env(safe-area-inset-bottom, 0px) + 28px); display: flex; flex-direction: column; align-items: center; text-align: center;
}
.lg-wo-kicker { font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--lg-tier); }
.lg-wo-medal { margin: 16px 0 4px; border-radius: 50%; box-shadow: 0 0 0 4px var(--lg-tier), 0 0 60px rgba(226,184,79,.35); }
.lg-wo.is-waiting .lg-wo-medal { box-shadow: 0 0 0 3px rgba(214,176,92,.5); animation: lgWoPulse 1s ease-in-out infinite; }
.lg-crest--xl { width: 150px; height: 150px; background-image: url('/img/legends/medallion-192.webp?v=20261123_legends_art'); }
.lg-crest--xl b { font-size: 29px; }
.lg-crest--xl i { font-size: 14px; letter-spacing: .1em; margin-top: 5px; }
.lg-crest--xl i.lg-crest-long { max-width: 92px; font-size: 11px; }
.lg-crest--xl.lg-crest--hidden { opacity: 1; background-image: none; background-color: #121a2b; }
.lg-crest--xl.lg-crest--hidden i { font-size: 34px; }
.lg-wo.is-revealed .lg-wo-medal { animation: lgWoMedal .6s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes lgWoPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes lgWoMedal { from { opacity: 0; transform: translateY(18px) scale(.86); } to { opacity: 1; transform: none; } }
.lg-wo-trio { display: flex; gap: 14px; justify-content: center; margin: 18px 0 6px; }
.lg-wo-trio .lg-crest { box-shadow: 0 0 0 3px var(--lg-tier), 0 10px 26px rgba(0,0,0,.5); animation: lgWoMedal .6s cubic-bezier(.2,.9,.3,1.2) both; }
.lg-wo-trio .lg-crest:nth-child(2) { animation-delay: .15s; }
.lg-wo-trio .lg-crest:nth-child(3) { animation-delay: .3s; }
.lg-wo-tier { margin-top: 12px; font-size: 13px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--lg-tier); }
.lg-wo-name { margin: 6px 0 0; font-family: "Playfair Display","Playfair Display Fallback",Georgia,serif; font-size: 32px; font-weight: 900; line-height: 1.08; color: #fff; }
.lg-wo.is-waiting .lg-wo-name { font-family: inherit; font-size: 18px; font-weight: 800; color: rgba(255,255,255,.86); }
.lg-wo-sub { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 0; font-size: 15px; font-weight: 700; color: rgba(255,255,255,.86); }
.lg-wo-sub--names { display: block; line-height: 1.45; }
.lg-wo-rec { margin: 8px 0 0; font-size: 18px; }
.lg-wo-rec .lg-ko { font-size: 13px; color: rgba(255,255,255,.7); }
.lg-wo-up { margin: 10px 0 0; font-size: 14px; font-weight: 700; line-height: 1.4; color: #e9d8ad; }
.lg-wo-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 22px; }
.lg-wo-share, .lg-wo-go {
    appearance: none; width: 100%; min-height: 52px; border: none; border-radius: 14px; font-family: inherit;
    font-size: 16px; font-weight: 900; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.lg-wo-share { background: var(--lg-tier); color: #141b2b; }
.lg-wo-go { background: rgba(255,255,255,.14); color: #fff; }
.lg-wo-share:disabled { opacity: .6; }
.lg-wo-share:focus-visible, .lg-wo-go:focus-visible, .lg-wo-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .lg-wo, .lg-wo-medal, .lg-wo-trio .lg-crest, .lg-wo.is-waiting .lg-wo-medal { animation: none; }
}

/* ═══ The Legend Walkout reveal (20261124_legend_reveal) ═══════════════════
   Sealed "?" medal → tap → a gold charge (rays, a ring that fills, a shake
   that builds) → a flash → sparks in the tier colour → the legend lands in
   steps. Reduced motion: a short fade, no shake or sparks. */
.lg-wo-seal {
    position: relative; display: grid; place-items: center; width: 220px; height: 220px; margin: 14px 0 4px;
    padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.lg-wo-seal:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 50%; }
.lg-wo-q { position: relative; z-index: 2; box-shadow: 0 0 0 3px rgba(214,176,92,.7), 0 0 40px rgba(214,176,92,.25); }
.lg-wo-q b { font-size: 64px; color: #e2b84f; text-shadow: 0 0 18px rgba(226,184,79,.6); }
.lg-wo.is-sealed .lg-wo-q { animation: lgWoBreathe 1.6s ease-in-out infinite; }
.lg-wo-rays {
    position: absolute; inset: -40px; border-radius: 50%; opacity: .35; pointer-events: none;
    background: repeating-conic-gradient(from 0deg, rgba(226,184,79,.0) 0deg 9deg, rgba(226,184,79,.55) 10deg 13deg, rgba(226,184,79,0) 14deg 22deg);
    -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%);
    animation: lgWoSpin 14s linear infinite;
}
.lg-wo-ring {
    position: absolute; inset: 22px; border-radius: 50%; pointer-events: none; opacity: 0;
    background: conic-gradient(#f5d77a var(--lg-fill, 0deg), rgba(255,255,255,.08) 0);
    -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%); mask: radial-gradient(circle, transparent 66%, #000 67%);
}
.lg-wo-hint { margin: 10px 0 0; font-size: 14px; font-weight: 800; letter-spacing: .02em; color: #e9d8ad; animation: lgWoBlink 1.6s ease-in-out infinite; }
@property --lg-fill { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.lg-wo.is-charging .lg-wo-ring { opacity: 1; animation: lgWoFill 2.3s cubic-bezier(.5,0,.9,.6) forwards; }
.lg-wo.is-charging .lg-wo-rays { opacity: .9; animation: lgWoSpin 2.4s cubic-bezier(.6,0,1,1) forwards, lgWoRaysUp 2.4s ease-in forwards; }
.lg-wo.is-charging .lg-wo-q { animation: lgWoShake 2.4s ease-in forwards; }
.lg-wo.is-charging .lg-wo-q b { animation: lgWoQ 2.4s ease-in forwards; }
.lg-wo.is-charging .lg-wo-bg { animation: lgWoDim 2.4s ease-in forwards; }
.lg-wo-flash { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 62%, #fff8dc 0%, #f5d77a 35%, rgba(226,184,79,0) 75%); }
.lg-wo.is-burst .lg-wo-flash { animation: lgWoFlash .9s ease-out both; }
.lg-wo-stage { position: relative; display: grid; place-items: center; }
.lg-wo-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 0; pointer-events: none; }
.lg-wo-burst i {
    position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); margin: calc(var(--s) / -2); border-radius: 50%;
    background: var(--lg-tier); box-shadow: 0 0 10px var(--lg-tier); opacity: 0;
    animation: lgWoSpark var(--t) cubic-bezier(.1,.8,.3,1) .05s forwards;
}
.lg-wo.is-burst .lg-wo-medal { position: relative; z-index: 1; animation: lgWoLand .7s cubic-bezier(.2,1.5,.4,1) both; }
.lg-wo.is-burst .lg-wo-tier { animation: lgWoUp .45s ease-out .55s both; }
.lg-wo.is-burst .lg-wo-name { animation: lgWoUp .55s cubic-bezier(.2,1.3,.4,1) .8s both; }
.lg-wo.is-burst .lg-wo-sub { animation: lgWoUp .45s ease-out 1.05s both; }
.lg-wo.is-burst .lg-wo-rec, .lg-wo.is-burst .lg-wo-up { animation: lgWoUp .45s ease-out 1.25s both; }
.lg-wo.is-burst .lg-wo-actions { animation: lgWoUp .45s ease-out 1.55s both; }
.lg-wo.lg-lk--gold.is-burst .lg-wo-medal { box-shadow: 0 0 0 4px var(--lg-tier), 0 0 90px rgba(245,215,122,.7); }
@keyframes lgWoBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes lgWoBlink { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes lgWoSpin { to { transform: rotate(360deg); } }
@keyframes lgWoRaysUp { from { opacity: .35; } to { opacity: 1; transform: rotate(540deg) scale(1.25); } }
@keyframes lgWoFill { from { --lg-fill: 0deg; } to { --lg-fill: 360deg; } }
@keyframes lgWoShake {
    0% { transform: none; box-shadow: 0 0 0 3px rgba(214,176,92,.7), 0 0 40px rgba(214,176,92,.25); }
    40% { transform: translate(1px, -1px) scale(1.03); }
    55% { transform: translate(-2px, 1px) scale(1.05) rotate(-2deg); }
    70% { transform: translate(3px, -2px) scale(1.08) rotate(3deg); }
    82% { transform: translate(-4px, 2px) scale(1.11) rotate(-4deg); }
    92% { transform: translate(5px, -3px) scale(1.14) rotate(5deg); background-color: #6b5420; }
    100% { transform: scale(1.22); background-color: #f5d77a; box-shadow: 0 0 0 6px #f5d77a, 0 0 120px 30px rgba(245,215,122,.9); }
}
@keyframes lgWoQ { 0% { opacity: 1; } 80% { opacity: 1; color: #fff3c4; } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes lgWoDim { to { opacity: .2; } }
@keyframes lgWoFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lgWoSpark {
    0% { opacity: 1; transform: rotate(var(--a)) translateX(0) scale(1); }
    100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) scale(.3); }
}
@keyframes lgWoLand { 0% { opacity: 0; transform: scale(1.5); } 60% { opacity: 1; transform: scale(.94); } 100% { opacity: 1; transform: none; } }
@keyframes lgWoUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .lg-wo-rays, .lg-wo-hint, .lg-wo.is-sealed .lg-wo-q, .lg-wo.is-charging .lg-wo-q, .lg-wo.is-charging .lg-wo-q b, .lg-wo.is-charging .lg-wo-rays,
    .lg-wo.is-charging .lg-wo-ring, .lg-wo.is-charging .lg-wo-bg, .lg-wo-burst i, .lg-wo.is-burst .lg-wo-flash { animation: none; }
    .lg-wo-burst { display: none; }
    .lg-wo.is-burst .lg-wo-medal, .lg-wo.is-burst .lg-wo-tier, .lg-wo.is-burst .lg-wo-name, .lg-wo.is-burst .lg-wo-sub,
    .lg-wo.is-burst .lg-wo-rec, .lg-wo.is-burst .lg-wo-up, .lg-wo.is-burst .lg-wo-actions { animation: lgWoIn .3s ease-out both; }
}

/* Locker draft gate: five pips */
.lg-lk-pips { display: flex; gap: 6px; margin-top: 8px; }
.lg-lk-pips i { width: 22px; height: 6px; border-radius: 3px; background: #e3e5ea; }
.lg-lk-pips i.is-on { background: #d6b05c; }
/* Locker card: flag and years sit together */
.lg-lk-sub { gap: 0; }

/* 20261124_legend_faces: the portrait in the crest's gold circle. Full file at
   170% of the circle (the 200px square thumb at 124% paints the same pixels),
   centred, 6% down, so head and gloves fill the ring. The era tag sits under
   the circle (see .lg-face-col below). */
.lg-crest.lg-crest--face {
    position: relative; overflow: hidden; display: block;
    background: radial-gradient(circle at 50% 35%, #2a3a5c 0%, #121a2b 100%);
    box-shadow: inset 0 0 0 2px #d6b05c, 0 2px 6px rgba(0,0,0,.28);
}
.lg-crest--face img {
    position: absolute; left: 50%; top: 6%; transform: translateX(-50%);
    width: 170%; max-width: none; height: auto; display: block;
}
.lg-crest--face img.is-thumb { width: 124%; }
.lg-crest--face img.is-cover { top: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.lg-crest--face::after {   /* the gold ring sits above the picture */
    content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px #d6b05c; pointer-events: none;
}
.lg-crest--xl.lg-crest--face::after { box-shadow: inset 0 0 0 4px #d6b05c; }
/* 20261124_era_below (Dom 24-11): the era tag hangs UNDER the circle so the
   face stays clear. .lg-face-col stacks circle + tag and takes the circle's
   place in every row; one navy chip with a gold hairline reads on navy cards
   and white Locker cards alike. The walkout hangs it under the tier ring. */
.lg-face-col { flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.lg-era-tag {
    display: inline-block; white-space: nowrap; padding: 2px 8px; border-radius: 999px;
    background: #121a2b; box-shadow: inset 0 0 0 1px rgba(214,176,92,.55); color: #ecd08a;
    font-style: normal; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; line-height: 1.35;
}
.lg-face-col--lg { gap: 7px; }
.lg-face-col--lg .lg-era-tag { font-size: 9.5px; }
.lg-wo-era { margin-top: 14px; }
.lg-wo-era .lg-era-tag { font-size: 12px; padding: 4px 13px; letter-spacing: .1em; box-shadow: inset 0 0 0 1px var(--lg-tier, #d6b05c); }
.lg-wo-era .lg-era-tag.is-long { font-size: 11px; letter-spacing: .06em; }
.lg-wo.is-burst .lg-wo-era { animation: lgWoUp .45s ease-out .5s both; }
@media (prefers-reduced-motion: reduce) { .lg-wo.is-burst .lg-wo-era { animation: lgWoIn .3s ease-out both; } }

/* ═══ Legends library (20261124_legends_library) ═══════════════════════
   Dom 24-11: every legend open. The hero carries the Legend of the Week
   spotlight on solid navy; the library below lists all of them with a
   search box, sort chips and era chips (one scrolling line each, no wrap). */
.lg-spot { padding: 12px 16px 12px; border-top: 1px solid rgba(255,255,255,.08); background: #121a2b; }
.lg-spot .lg-today-main { margin-top: 8px; }
.lg-spot .lg-rec .lg-w { color: #5fd08a; }
.lg-spot .lg-rec .lg-l { color: #ff7a6e; }
.lg-spot .lg-rec .lg-d { color: #9aa1ad; }
.lg-spot .lg-ko { color: #a9b0bd; }
.lg-spot .lg-today-next { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.lg-lib { margin-top: 18px; }
.lg-lib-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 10px; }
.lg-lib-title {
    margin: 0; font-family: "Playfair Display","Playfair Display Fallback",Georgia,serif;
    font-size: 22px; font-weight: 900; color: #1A1A2E; letter-spacing: -.01em; line-height: 1.1;
}
.lg-lib-count { font-size: 12.5px; font-weight: 700; color: #8a91a0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lg-lib-search {
    display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; margin: 0 0 10px;
    background: #fff; border: 1px solid #e3e6ec; border-radius: 12px;
}
.lg-lib-search:focus-within { border-color: #d6b05c; box-shadow: 0 0 0 3px rgba(214,176,92,.18); }
.lg-lib-search-ic {
    flex: 0 0 auto; width: 14px; height: 14px; border: 2px solid #9aa1ad; border-radius: 50%; position: relative;
}
.lg-lib-search-ic::after {
    content: ''; position: absolute; width: 2px; height: 6px; background: #9aa1ad; border-radius: 1px;
    right: -4px; bottom: -5px; transform: rotate(-45deg);
}
.lg-lib-search input {
    flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
    font: inherit; font-size: 16px; color: #1A1A2E; -webkit-appearance: none; appearance: none;
}
.lg-lib-search input::placeholder { color: #9aa1ad; }
.lg-lib-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.lg-lib-chips {
    display: flex; gap: 6px; overflow-x: auto; margin: 0 -2px 8px; padding: 0 2px 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.lg-lib-chips::-webkit-scrollbar { display: none; }
.lg-lib-chip {
    flex: 0 0 auto; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid #e3e6ec;
    background: #fff; color: #4b5262; font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; cursor: pointer;
}
.lg-lib-chip.is-on { background: #121a2b; border-color: #121a2b; color: #f4efe6; }
.lg-lib .lg-list { margin-top: 4px; }
.lg-lib-empty { padding: 26px 14px; text-align: center; font-size: 13.5px; color: #8a91a0; }
.lg-new--past { color: #5b6170; background: #f1f2f5; }

/* Fight stories (20261125_fight_stories → 20261125_story_pop). The legend
   pages print the story under the fight (.lg-story); the app sheet shows a
   "Read the story" pill on the Favourite row that opens it in a popup. */
.lg-story { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f1f4; }
.lg-story p { margin: 0 0 10px; font-size: 14px; line-height: 1.62; color: #2b2f3a; }
.lg-story p:last-child { margin-bottom: 0; }
.lg-fight-acts { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.lg-fight-acts .lg-favfight { margin-top: 0; }
.lg-readstory {
    display: inline-flex; align-items: center; gap: 5px; margin-left: auto; min-height: 34px; padding: 0 13px;
    border: 0; border-radius: 999px; background: #121a2b; color: #f4efe6;
    font: inherit; font-size: 12.5px; font-weight: 800; white-space: nowrap; cursor: pointer;
}
.lg-readstory span { color: #d6b05c; font-size: 15px; line-height: 1; }
.lg-story-ov {
    display: none; position: fixed; inset: 0; z-index: 1010; background: rgba(0,0,0,.5);
    align-items: center; justify-content: center; padding: 20px;
}
.lg-story-ov.open { display: flex; animation: lgFade .18s ease; }
.lg-story-ov { overscroll-behavior: contain; }
/* 20261125_story_scroll: the legend sheet can't scroll while a story is open. */
.lg-sheet.lg-sheet--frozen { overflow: hidden; touch-action: none; }
.lg-story-pop {
    width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    background: #fff; border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.32);
}
.lg-story-pop-top {
    position: sticky; top: 0; z-index: 1; background: #121a2b; color: #f4efe6;
    padding: 16px 56px 14px 16px; border-radius: 18px 18px 0 0;
}
.lg-story-pop-label { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #d6b05c; margin-bottom: 4px; }
.lg-story-pop-h { font-size: 18px; font-weight: 900; line-height: 1.2; color: #f4efe6; }
.lg-story-pop-m { margin-top: 4px; font-size: 12.5px; color: #a9b0bd; }
.lg-story-pop-body { padding: 16px 16px 20px; }
.lg-story-pop-body p { margin: 0 0 14px; font-size: 15px; line-height: 1.65; color: #2b2f3a; }
.lg-story-pop-body p:last-child { margin-bottom: 0; }
@keyframes lgStoryUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
    .lg-story-ov { align-items: flex-end; padding: 0; }
    .lg-story-pop { max-width: none; max-height: 88vh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); animation: lgStoryUp .22s ease; }
    .lg-story-pop-top { border-radius: 20px 20px 0 0; padding-top: 20px; }
}
