/* Port of the game's legend select screen (MainMenu.tsx legends panel) and legend detail view
   (LegendPreview.tsx). Rules below are the game's own, captured from the live build and scoped
   under .ls-game. Regenerate: python3 tools/port/build_css.py. Site-only glue is in styles.css. */
.ls-game {
  --font-ui: "Cinzel", "Times New Roman", Times, serif;
  --font-display: "Cinzel", "Times New Roman", Times, serif;
  --font-prose: "Cormorant Garamond", "Times New Roman", Times, serif;
  --font-body: "Literata", Georgia, "Times New Roman", serif;
  --safe-type-md: calc(clamp(.82rem, 1.2vw, .96rem) * 1);
  --text: #e8e4dc;
  --text-dim: #8a8498;
  --accent: #c9a227;
  --ink-border: rgba(201, 162, 39, .42);
  --ink-panel-bg: linear-gradient(165deg, rgba(28, 22, 14, .94) 0%, rgba(14, 11, 8, .98) 100%);
  --bg-panel: #161922;
  --border: #2a3040;
  --integrity-text: #f0e8dc;
  --integrity-text-shadow: 0 1px 3px rgba(0, 0, 0, .72);
  --ui-action-pad-top: .34rem;
  --ui-action-pad-bottom: .08rem;
  --ui-action-primary-ratio: 1894 / 348;
  --ui-action-primary: url(img/ui-action-primary.webp);
  --ui-action-secondary-ratio: 1893 / 319;
  --ui-action-secondary: url(img/ui-action-secondary.webp);
}
@keyframes legend-panel-enter { 0% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: translateY(0px); } }

/* ---- select screen ---- */
.ls-game button { font-family: var(--font-ui); }
.ls-game * { box-sizing: border-box; margin: 0px; padding: 0px; }
.ls-game .menu-home-legends { display: flex; flex-direction: column; gap: clamp(0.35rem, 0.75vh, 0.55rem); min-height: 0px; width: 100%; flex: 1 1 auto; height: 100%; }
.ls-game .menu-home-legends.menu-select-main { flex-direction: column; align-items: stretch; }
.ls-game .menu-home-legends-head { display: flex; flex-flow: wrap; align-items: baseline; gap: 0.75rem 1.25rem; flex: 0 0 auto; }
.ls-game .menu-home-back { appearance: none; border: 0px; background: transparent; color: rgba(220, 210, 195, 0.88); font-family: var(--font-ui); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; padding: 0.2rem 0px; }
.ls-game .menu-home-back:hover, .ls-game .menu-home-back:focus-visible { color: rgb(245, 236, 216); outline: none; }
.ls-game .menu-home-legends-kicker { margin: 0px; font-family: var(--font-ui); font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(244, 232, 210, 0.95); text-shadow: rgba(0, 0, 0, 0.65) 0px 2px 10px; }
.ls-game .menu-home-legends .menu-select-btn { display: grid; grid-template-rows: minmax(0px, 1fr) minmax(2.15rem, auto); gap: clamp(0.12rem, 0.35vh, 0.25rem); padding: clamp(0.15rem, 0.35vh, 0.28rem); min-height: 0px; height: 100%; overflow: clip; background: transparent; border-color: rgba(255, 230, 180, 0.14); box-shadow: none; }
.ls-game .menu-home-legends .menu-select-btn.ink-frame::before, .ls-game .menu-home-legends .menu-select-btn.ink-frame::after, .ls-game .menu-home-legends .menu-select-btn::before, .ls-game .menu-home-legends .menu-select-btn::after { opacity: 0.2; }
.ls-game .menu-home-legends .menu-select-list { flex: 1 1 auto; min-height: 0px; height: 100%; grid-template-rows: repeat(2, minmax(0px, 1fr)); gap: clamp(0.3rem, 0.75vh, 0.55rem); align-content: stretch; }
.ls-game .menu-home-legends .menu-select-info { flex-shrink: 0; min-height: 2.15rem; justify-content: flex-end; padding-bottom: 0.05rem; }
.ls-game .menu-home-legends .menu-select-portrait { position: relative; display: block; width: auto; height: 100%; max-width: 100%; max-height: 100%; min-height: 0px; min-width: 0px; aspect-ratio: 1023 / 1537; margin-inline: auto; place-self: center; overflow: hidden; background: rgb(18, 14, 12); isolation: isolate; --legend-frame-inset-top: 6.5%; --legend-frame-inset-right: 7.22%; --legend-frame-inset-bottom: 7.16%; --legend-frame-inset-left: 9.29%; --legend-frame-radius: 4.2%; }
.ls-game .menu-home-legends .menu-select-thumb-clip { position: absolute; z-index: 1; top: var(--legend-frame-inset-top); right: var(--legend-frame-inset-right); bottom: var(--legend-frame-inset-bottom); left: var(--legend-frame-inset-left); overflow: hidden; border-radius: var(--legend-frame-radius); pointer-events: none; }
.ls-game .menu-home-legends .menu-select-thumb { position: absolute; inset: 0px; width: 100%; height: 100%; margin: 0px; object-fit: cover; object-position: center center; border-radius: 0px; pointer-events: none; user-select: none; display: block; transform: scale(1); transform-origin: 50% 44%; max-width: none !important; max-height: none !important; }
.ls-game .menu-select-list { display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); grid-template-rows: repeat(2, minmax(0px, 1fr)); gap: clamp(0.45rem, 1vh, 0.7rem); flex: 1 1 auto; width: 100%; min-width: 0px; min-height: 0px; margin: 0px; align-content: stretch; place-items: stretch; }
.ls-game .menu-select-main { position: relative; display: flex; flex-direction: row; align-items: stretch; gap: clamp(0.45rem, 0.9vw, 0.75rem); width: 100%; flex: 1 1 auto; min-height: 0px; }
.ls-game .menu-select-btn { --plate-accent: rgba(72, 68, 64, .38); --plate-accent-hover: rgba(201, 162, 39, .72); --plate-glow: rgba(0, 0, 0, 0); --plate-name: #e8e0d4; position: relative; display: grid; grid-template-rows: minmax(0px, 1fr) auto; place-items: center; gap: clamp(0.28rem, 0.7vh, 0.45rem); text-align: center; padding: clamp(0.4rem, 0.9vh, 0.65rem) clamp(0.35rem, 0.7vw, 0.55rem) clamp(0.4rem, 0.85vh, 0.6rem); cursor: pointer; color: var(--text); width: 100%; height: 100%; min-height: 0px; overflow: hidden; container-type: size; background: rgba(8, 6, 12, 0.72); border: 1px solid rgba(255, 230, 180, 0.22); box-shadow: rgba(0, 0, 0, 0.35) 0px 0px 0px 1px, rgba(0, 0, 0, 0.45) 0px 8px 22px; transition: border-color 0.35s, box-shadow 0.35s, transform 0.4s, background 0.35s; }
.ls-game .menu-select-btn::before { content: ""; position: absolute; inset: 0px; pointer-events: none; opacity: 0.04; background: repeating-linear-gradient(-12deg, transparent, transparent 3px, rgba(255, 248, 235, 0.04) 3px, rgba(255, 248, 235, 0.04) 4px); }
.ls-game .menu-select-btn::after { content: ""; position: absolute; inset: 3px; pointer-events: none; border: 1px solid rgba(255, 248, 235, 0.02); border-radius: 1px; }
.ls-game .menu-select-btn[data-legend="ironclad"] { --plate-accent: rgba(100, 44, 40, .42); --plate-accent-hover: rgba(118, 52, 46, .62); --plate-glow: rgba(72, 28, 24, .14); --plate-name: #b89890; }
.ls-game .menu-select-btn[data-legend="silent"] { --plate-accent: rgba(118, 98, 52, .4); --plate-accent-hover: rgba(138, 114, 58, .58); --plate-glow: rgba(92, 76, 36, .12); --plate-name: #b8a880; }
.ls-game .menu-select-btn[data-legend="defect"] { --plate-accent: rgba(28, 120, 55, .45); --plate-accent-hover: rgba(234, 120, 40, .55); --plate-glow: rgba(34, 160, 70, .18); --plate-name: #9fd4a8; }
.ls-game .menu-select-btn[data-legend="bastion"] { --plate-accent: rgba(78, 58, 96, .4); --plate-accent-hover: rgba(92, 68, 112, .58); --plate-glow: rgba(52, 36, 68, .14); --plate-name: #a898b0; }
.ls-game .menu-select-btn:hover { transform: translateY(-2px); border-color: var(--plate-accent-hover); box-shadow: inset 0 0 0 1px #fff8eb0f,inset 0 0 36px var(--plate-glow),0 0 28px #c9a22761,0 8px 28px #00000080; }
.ls-game .menu-select-btn:hover .menu-select-name { color: rgb(248, 240, 228); }
.ls-game .menu-select-btn:focus-visible { outline: 1px solid var(--plate-accent-hover); outline-offset: 2px; }
.ls-game .menu-select-btn:active { transform: translateY(0px); transition-duration: 0.15s; }
.ls-game .menu-select-portrait { position: relative; z-index: 1; display: grid; place-items: center; width: 94%; height: 100%; max-width: 100%; max-height: 100%; min-height: 0px; margin: 0px auto; padding: 0px; overflow: hidden; background: transparent; border: 0px; box-shadow: none; }
.ls-game .menu-select-portrait::after { content: none; }
.ls-game .menu-select-thumb { position: relative; z-index: 1; display: block; width: min(70%, 100%); height: min(74%, 100%); max-width: 70%; max-height: 74%; object-fit: contain; object-position: center center; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; border-radius: 0px; flex-shrink: 0; background: transparent; filter: contrast(1.02) saturate(0.92); }
.ls-game .menu-select-info { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.12rem; width: 100%; min-width: 0px; flex: 0 0 auto; padding: 0px 0.2rem; box-sizing: border-box; }
.ls-game .menu-select-name { display: block; width: 100%; max-width: 100%; margin: 0px; font-family: var(--font-ui); font-weight: 700; font-size: clamp(0.62rem, 4.8cqw, 0.95rem); line-height: 1.15; letter-spacing: 0.05em; text-transform: uppercase; text-align: center; color: var(--plate-name); text-shadow: rgba(0, 0, 0, 0.55) 0px 1px 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-game .menu-select-tagline { font-family: var(--font-prose); font-style: italic; font-weight: 600; font-size: clamp(0.95rem, 1.2vw, 1.1rem); line-height: 1.4; margin: 0px; padding: clamp(0.35rem, 0.7vh, 0.5rem) clamp(0.35rem, 0.8vw, 0.65rem); text-align: center; width: 100%; flex: 0 0 auto; color: rgba(248, 228, 168, 0.98); letter-spacing: 0.02em; text-shadow: rgba(0, 0, 0, 0.95) 0px 0px 1px, rgba(0, 0, 0, 0.88) 0px 1px 4px; }
@media (max-width: 420px) {
.ls-game .menu-select-main { flex-direction: column; align-items: stretch; gap: 0.55rem; }
.ls-game .menu-select-list { grid-template-columns: 1fr; grid-template-rows: auto; }
.ls-game .menu-select-btn { flex-direction: row; justify-content: flex-start; text-align: left; padding: 0.55rem 0.7rem; gap: 0.65rem; }
.ls-game .menu-select-info { align-items: flex-start; text-align: left; flex: 1 1 auto; }
.ls-game .menu-select-portrait { flex: unset; width: 94%; height: 100%; max-width: 100%; min-height: 0px; padding: 0px; }
.ls-game .menu-select-thumb { width: min(70%, 100%); height: min(74%, 100%); max-width: 70%; max-height: 74%; }
}
@media (min-width: 769px) and (max-height: 980px) {
.ls-game .menu-select-screen--legends .menu-home-legends-head { gap: 0.35rem 0.85rem; }
.ls-game .menu-select-screen--legends .menu-home-legends-kicker { font-size: clamp(0.92rem, 1.35vw, 1.12rem); }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-list { gap: clamp(0.22rem, 0.55vh, 0.4rem); }
}
@media (min-width: 769px) and (max-height: 860px) {
.ls-game .menu-select-screen--legends .menu-home-legends { gap: 0.28rem; }
.ls-game .menu-select-screen--legends .menu-home-legends-kicker { font-size: clamp(0.82rem, 1.2vw, 0.98rem); }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-btn { grid-template-rows: minmax(0px, 1fr) minmax(1.95rem, auto); padding: clamp(0.1rem, 0.25vh, 0.2rem); }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-info { min-height: 1.95rem; gap: 0.06rem; }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-name { font-size: clamp(0.58rem, 3.8cqw, 0.82rem); line-height: 1.1; }
}
@media (min-width: 769px) and (max-height: 760px) {
.ls-game .menu-select-screen--legends .menu-home-back { font-size: 0.68rem; }
.ls-game .menu-select-screen--legends .menu-home-legends-kicker { font-size: clamp(0.74rem, 1.05vw, 0.88rem); }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-list { gap: 0.18rem; }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-btn { grid-template-rows: minmax(0px, 1fr) minmax(1.8rem, auto); }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-info { min-height: 1.8rem; }
}
@media (min-width: 769px) and (max-height: 720px) {
.ls-game .menu-select-screen--legends .menu-home-legends-head { gap: 0.25rem 0.65rem; }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-list { gap: 0.14rem; }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-btn { grid-template-rows: minmax(0px, 1fr) minmax(1.7rem, auto); gap: 0.08rem; }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-info { min-height: 1.7rem; }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-name { font-size: clamp(0.52rem, 3.4cqw, 0.72rem); }
}
@media (max-height: 860px) {
.ls-game .menu-select-tagline { display: none; }
.ls-game .menu-select-thumb { width: min(70%, 100%); height: min(74%, 100%); max-width: 70%; max-height: 74%; }
.ls-game .menu-select-portrait { min-height: 0px; width: 94%; height: 100%; }
}
.ls-game .menu-home-legends .menu-select-list { display: flex; grid-template-columns: none; grid-template-rows: none; flex-direction: row; align-items: stretch; justify-content: center; gap: clamp(0.35rem, 0.9vw, 0.9rem); }
.ls-game .menu-home-legends .menu-select-btn { flex: 1 1 0px; min-width: 0px; max-width: 21rem; height: 100%; transition: transform 0.18s, filter 0.18s; }
.ls-game .menu-home-legends .menu-select-btn[data-legend="ironclad"] { order: 1; }
.ls-game .menu-home-legends .menu-select-btn[data-legend="silent"] { order: 2; }
.ls-game .menu-home-legends .menu-select-btn[data-legend="bastion"] { order: 4; }
.ls-game .menu-home-legends .menu-select-btn[data-legend="defect"] { order: 5; }
.ls-game .menu-home-legends .menu-select-btn:hover:not(.menu-select-btn--locked), .ls-game .menu-home-legends .menu-select-btn:focus-visible:not(.menu-select-btn--locked) { transform: translateY(-0.7rem) scale(1.035); z-index: 2; }
.ls-game .menu-home-legends .menu-select-info { position: absolute; inset: auto 0px 0px; display: flex; flex-direction: column; align-items: center; gap: 0.32rem; padding: 1.5rem 0.9rem 1.05rem; min-height: 0px; text-align: center; background: linear-gradient(to top, rgba(6, 5, 9, 0.94) 42%, rgba(6, 5, 9, 0)); pointer-events: none; }
.ls-game .menu-home-legends .menu-select-sigil { width: clamp(1.5rem, 3.4vh, 2.1rem); height: auto; opacity: 0.9; font-size: 0px; }
.ls-game .menu-home-legends .menu-select-tagline { max-width: 22ch; font-size: clamp(0.6rem, 1.15vh, 0.74rem); line-height: 1.34; color: rgba(232, 224, 212, 0.74); }
.ls-game .menu-home-legends .menu-select-role { font-family: var(--font-display); font-size: clamp(0.58rem, 1.1vh, 0.72rem); font-weight: 700; letter-spacing: 0.22em; color: rgba(201, 162, 39, 0.92); }
.ls-game .menu-home-legends .menu-select-btn { background: none; border: 0px; box-shadow: none; overflow: hidden; }
.ls-game .menu-home-legends .menu-select-portrait, .ls-game .menu-home-legends .menu-select-thumb-clip { inset: 0px; border-radius: 0px; aspect-ratio: auto; width: 100%; height: 100%; max-width: none; max-height: none; }
.ls-game .menu-home-legends .menu-select-thumb { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92) brightness(0.82); transition: filter 0.18s, transform 0.24s; }
.ls-game .menu-home-legends .menu-select-btn--ready:hover .menu-select-thumb, .ls-game .menu-home-legends .menu-select-btn--ready:focus-visible .menu-select-thumb { filter: saturate(1.02) brightness(1.06); transform: scale(1.04); }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-list { width: min(85vw, 100%); max-width: 85vw; margin-inline: auto; justify-content: center; }
.ls-game .menu-home-legends .menu-select-btn { flex: 1 1 0px; max-width: none; min-width: 0px; }
.ls-game .menu-home-legends .menu-select-sigil { width: clamp(2.4rem, 5.2vh, 3.6rem); height: auto; opacity: 0.95; filter: drop-shadow(rgba(0, 0, 0, 0.6) 0px 2px 5px); transition: transform 0.18s, opacity 0.18s; }
.ls-game .menu-home-legends .menu-select-btn--ready:hover, .ls-game .menu-home-legends .menu-select-btn--ready:focus-visible { transform: translateY(-1.4rem) scale(1.075); z-index: 3; }
.ls-game .menu-home-legends .menu-select-btn--ready:hover .menu-select-thumb, .ls-game .menu-home-legends .menu-select-btn--ready:focus-visible .menu-select-thumb { filter: saturate(1.06) brightness(1.1); }
.ls-game .menu-home-legends .menu-select-btn--ready:hover .menu-select-sigil, .ls-game .menu-home-legends .menu-select-btn--ready:focus-visible .menu-select-sigil { transform: scale(1.12); opacity: 1; }
.ls-game .menu-select-screen--legends .menu-home-legends { flex: 1 1 auto; min-width: 0px; width: auto; max-width: none; }
.ls-game .menu-select-screen--legends .menu-home-legends .menu-select-list { width: 100%; max-width: 85vw; margin-inline: auto; justify-content: center; }
.ls-game .menu-home-legends .menu-select-btn--ready .menu-select-thumb { transform: scale(1.22); }
.ls-game .menu-home-legends .menu-select-btn--ready:hover .menu-select-thumb, .ls-game .menu-home-legends .menu-select-btn--ready:focus-visible .menu-select-thumb { transform: scale(1); }
.ls-game .menu-home-legends .menu-select-btn--ready:hover, .ls-game .menu-home-legends .menu-select-btn--ready:focus-visible { transform: translateY(-1.5rem) scale(1.055); z-index: 4; }
.ls-game .menu-home-legends .menu-select-btn--ready:hover .menu-select-thumb, .ls-game .menu-home-legends .menu-select-btn--ready:focus-visible .menu-select-thumb { transform: scale(1.06); }
.ls-game .menu-home-legends .menu-select-info { position: absolute; inset: auto 0px 0px; display: flex; flex-direction: column; align-items: center; gap: 0.36rem; padding: 2.2rem 0.9rem 1.1rem; min-height: 0px; text-align: center; background: linear-gradient(to top, rgba(3, 2, 5, 0.98), rgba(3, 2, 5, 0.95) 46%, rgba(4, 3, 7, 0.74) 72%, rgba(4, 3, 7, 0)); text-shadow: rgba(0, 0, 0, 0.95) 0px 1px 3px, rgba(0, 0, 0, 0.7) 0px 0px 16px; pointer-events: none; }
.ls-game .menu-home-legends .menu-select-sigil { width: clamp(2.8rem, 6.2vh, 4.1rem); height: auto; opacity: 1; filter: drop-shadow(rgba(0, 0, 0, 0.95) 0px 2px 6px) drop-shadow(rgba(0, 0, 0, 0.55) 0px 0px 16px); }
.ls-game .menu-home-legends .menu-select-name { text-shadow: rgba(0, 0, 0, 0.95) 0px 1px 3px, rgba(0, 0, 0, 0.75) 0px 0px 18px; }
.ls-game .menu-home-legends .menu-select-tagline { max-width: 26ch; font-family: var(--font-prose); font-size: clamp(0.76rem, 1.5vh, 0.96rem); font-style: normal; font-weight: 600; line-height: 1.42; letter-spacing: 0.005em; color: rgb(246, 241, 232); }
.ls-game .menu-home-legends .menu-select-role { margin-top: 0.12rem; padding: 0.16rem 0.52rem; border-radius: 2px; font-size: clamp(0.62rem, 1.2vh, 0.78rem); letter-spacing: 0.24em; color: rgb(242, 205, 114); background: rgba(3, 2, 5, 0.78); box-shadow: rgba(201, 162, 39, 0.4) 0px 0px 0px 1px inset, rgba(0, 0, 0, 0.7) 0px 1px 3px; text-shadow: rgba(0, 0, 0, 0.9) 0px 1px 2px; }
.ls-game .menu-home-legends .menu-select-name { font-size: var(--safe-type-md); }
@media (min-width: 769px) and (max-height: 760px) {
.ls-game .menu-home-legends .menu-select-list { gap: clamp(0.35rem, 0.8vh, 0.55rem); }
}
.ls-game .menu-select-controls > * { position: relative; z-index: 1; }
@media (min-width: 769px) {
.ls-game .menu-select-screen--legends .menu-home-controls--legends, .ls-game .menu-select-screen--legends .menu-home-legends, .ls-game .menu-select-screen--legends .menu-home-legends .menu-select-list { overflow: hidden; }
}

/* ---- detail view ---- */
.ls-game button { font-family: var(--font-ui); }
.ls-game .legend-preview-combat-hook { margin: 0.35rem 0px 0px; font-size: 0.92rem; line-height: 1.4; color: var(--text-muted, #c8c4bc); font-style: italic; max-width: 36rem; }
.ls-game .ink-frame { position: relative; border: 1px solid var(--ink-border); border-radius: 3px 7px 5px 9px / 7px 4px 9px 5px; background: var(--ink-panel-bg); box-shadow: rgba(255, 248, 235, 0.05) 0px 0px 0px 1px inset, rgba(255, 235, 190, 0.06) 0px 1px inset, rgba(0, 0, 0, 0.42) 0px 4px 22px; }
.ls-game .ink-frame::before { content: ""; position: absolute; inset: 0px; pointer-events: none; border-radius: inherit; opacity: 0.35; background: radial-gradient(120% 80% at 0% 0%, rgba(255, 248, 235, 0.06) 0%, transparent 55%), radial-gradient(90% 70% at 100% 100%, rgba(0, 0, 0, 0.18) 0%, transparent 50%); mask-image: linear-gradient(135deg, rgb(0, 0, 0) 0%, rgb(0, 0, 0) 88%, transparent 100%); }
.ls-game .ink-frame::after { content: ""; position: absolute; inset: 2px 3px 3px 2px; pointer-events: none; border: 1px solid rgba(255, 248, 235, 0.03); border-radius: 2px 5px 4px 6px / 5px 3px 6px 4px; }
.ls-game * { box-sizing: border-box; margin: 0px; padding: 0px; }
.ls-game .screen { min-height: 100vh; padding: 1rem; display: flex; flex-direction: column; }
.ls-game .legend-preview-screen { overflow: hidden; justify-content: flex-start; align-items: center; padding: 0.75rem 1rem 2rem; min-height: 100dvh; }
.ls-game .legend-preview-content { position: relative; z-index: 2; width: min(640px, 94vw); max-width: 100%; margin: 0px auto; display: flex; flex-direction: column; align-items: center; box-sizing: border-box; }
.ls-game .legend-preview-panel { min-width: 0px; width: 100%; background: color-mix(in srgb,var(--bg-panel) 88%,transparent); border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem clamp(1rem, 3vw, 1.5rem) 1.35rem; text-align: left; box-shadow: rgba(0, 0, 0, 0.35) 0px 8px 32px; overflow-wrap: anywhere; animation: 0.45s ease-out 0.08s 1 normal both running legend-panel-enter; }
.ls-game .legend-preview-header { margin-bottom: 0.85rem; }
.ls-game .legend-preview-name { font-family: var(--font-ui); font-size: clamp(1.65rem, 5vw, 2.15rem); font-weight: 700; margin: 0px; line-height: 1.15; letter-spacing: 0.05em; text-transform: uppercase; }
.ls-game .legend-preview-integrity { margin: 0.45rem 0px 0px; font-family: var(--font-ui); font-size: clamp(1.05rem, 2.4vw, 1.25rem); font-weight: 700; letter-spacing: 0.1em; color: var(--integrity-text); text-shadow: var(--integrity-text-shadow); font-variant-numeric: tabular-nums; }
.ls-game .legend-preview-playstyle { font-family: var(--font-body); color: rgb(229, 231, 235); line-height: 1.55; margin: 0px 0px 1rem; font-size: 1.05rem; max-width: 100%; overflow-wrap: anywhere; text-transform: none; letter-spacing: 0.01em; }
.ls-game .legend-preview-section { margin-bottom: 0.95rem; }
.ls-game .legend-preview-section-title { font-family: var(--font-ui); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0px 0px 0.4rem; }
.ls-game .legend-preview-relic { margin: 0px; font-family: var(--font-body); color: rgb(209, 213, 219); font-size: 0.98rem; line-height: 1.45; max-width: 100%; overflow-wrap: anywhere; text-transform: none; }
.ls-game .legend-preview-relic strong { color: var(--text); }
.ls-game .legend-preview-deck { list-style: none; margin: 0px; padding: 0px; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.4rem 1rem; }
.ls-game .legend-preview-deck li { display: flex; align-items: baseline; gap: 0.45rem; font-family: var(--font-ui); font-size: 0.92rem; color: var(--text-dim); min-width: 0px; }
.ls-game .legend-deck-count { min-width: 1.75rem; font-family: var(--font-ui); color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.ls-game .legend-deck-name { color: var(--text); overflow-wrap: anywhere; }
.ls-game .legend-preview-actions { display: flex; gap: 0.75rem; margin-top: 1.15rem; flex-wrap: wrap; }
.ls-game .legend-begin-btn { font-family: var(--font-ui); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 520px) {
.ls-game .legend-preview-screen { padding-inline: 0.65rem; }
.ls-game .legend-preview-panel { padding-inline: 0.95rem; }
.ls-game .legend-preview-deck { grid-template-columns: 1fr; }
}
.ls-game .legend-select-detail.legend-preview-screen { overflow: hidden; justify-content: flex-start; align-items: stretch; min-height: 100dvh; height: 100dvh; background: rgb(5, 5, 8); padding: 0px !important; }
.ls-game .legend-select-detail.legend-preview-screen::after { content: ""; position: absolute; inset: 0px; pointer-events: none; z-index: 2; background: radial-gradient(85% 120% at 12% 50%, rgba(18, 14, 10, 0.97) 0%, rgba(24, 19, 13, 0.82) 32%, transparent 58%), radial-gradient(60% 90% at 28% 55%, rgba(30, 24, 16, 0.55) 0%, transparent 48%), linear-gradient(92deg, rgba(18, 14, 10, 0.94) 0%, rgba(24, 19, 13, 0.68) 34%, rgba(30, 24, 16, 0.22) 52%, transparent 68%); mask-image: radial-gradient(120% 100% at 22% 50%, rgb(0, 0, 0) 0%, rgb(0, 0, 0) 42%, transparent 72%); }
.ls-game .legend-select-portrait-ambient { position: absolute; inset: 0px; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--legend-detail-portrait-pos, 68% center); opacity: 0.32; filter: blur(14px) brightness(0.55); transform: scale(1); pointer-events: none; }
.ls-game .legend-select-hero-safe { position: absolute; z-index: 1; inset: 0px; pointer-events: none; }
.ls-game .legend-select-portrait-bg { position: absolute; inset: 0px; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; object-position: var(--legend-detail-portrait-pos, 68% center); pointer-events: none; background: transparent; filter: drop-shadow(rgba(0, 0, 0, 0.68) 0px 14px 32px); }
.ls-game .legend-select-detail .legend-preview-content { position: absolute; z-index: 3; inset: 0px auto 0px 0px; width: clamp(360px, 46vw, 760px); max-width: none; margin: 0px; padding: clamp(1.75rem, 4vh, 3rem) clamp(1.75rem, 3.5vw, 3rem); overflow: hidden auto; overscroll-behavior: contain; display: flex; align-items: stretch; box-sizing: border-box; }
.ls-game .legend-select-detail-panel { --detail-text: #e8dcc8; --detail-text-dim: #b8a890; --detail-accent: #b8944f; --detail-border: rgba(160, 130, 90, .24); width: 100%; flex: 1 1 0%; display: flex; flex-direction: column; justify-content: center; min-height: min(88vh, 100%); padding: clamp(1.75rem, 3.5vh, 2.75rem) clamp(1.5rem, 3vw, 2.5rem); color: var(--detail-text); backdrop-filter: blur(8px); }
.ls-game .legend-select-detail-panel .legend-preview-header { margin-bottom: 1.15rem; }
.ls-game .legend-select-detail-panel .legend-begin-btn { font-size: clamp(0.85rem, 0.9vw, 1.05rem); letter-spacing: 0.05em; box-shadow: rgba(168, 132, 56, 0.35) 0px 0px 18px; }
.ls-game .legend-select-detail-panel .legend-preview-name { font-family: var(--font-ui); font-size: clamp(2rem, 4.8vw, 3rem); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-shadow: rgba(0, 0, 0, 0.45) 0px 2px 8px; }
.ls-game .legend-select-detail-panel .legend-preview-integrity { font-family: var(--font-ui); font-size: clamp(1.12rem, 2vw, 1.35rem); font-weight: 700; margin-top: 0.55rem; letter-spacing: 0.1em; color: var(--integrity-text); text-shadow: var(--integrity-text-shadow); font-variant-numeric: tabular-nums; }
.ls-game .legend-select-detail-panel .legend-preview-curator-hint { margin: 0px 0px 1rem; padding: 0.65rem 0.75rem; border-left: 2px solid rgba(201, 162, 39, 0.45); font-size: clamp(0.88rem, 1.55vw, 0.98rem); line-height: 1.45; color: rgba(232, 220, 196, 0.88); }
.ls-game .legend-select-detail-panel .legend-preview-playstyle { font-family: var(--font-body); font-weight: 400; font-size: clamp(1.08rem, 1.95vw, 1.28rem); line-height: 1.65; margin-bottom: 1.35rem; color: rgb(229, 231, 235); text-transform: none; letter-spacing: 0.01em; }
.ls-game .legend-select-detail-panel .legend-preview-section-title { font-family: var(--font-ui); font-size: clamp(0.9rem, 1.5vw, 1rem); font-weight: 700; margin-bottom: 0.55rem; color: var(--detail-accent); }
.ls-game .legend-select-detail-panel .legend-preview-relic { font-family: var(--font-body); font-weight: 400; font-size: clamp(1.05rem, 1.75vw, 1.18rem); line-height: 1.55; color: rgb(209, 213, 219); text-transform: none; }
.ls-game .legend-select-detail-panel .legend-preview-section { margin-bottom: 1.25rem; }
.ls-game .legend-select-detail-panel .legend-preview-relic strong { color: var(--detail-text); font-weight: 700; }
.ls-game .legend-select-detail-panel .legend-preview-deck li { font-family: var(--font-ui); font-weight: 400; font-size: clamp(1rem, 1.7vw, 1.1rem); color: var(--detail-text-dim); }
.ls-game .legend-select-detail-panel .legend-deck-count { color: var(--detail-accent); font-weight: 700; }
.ls-game .legend-select-detail-panel .legend-deck-name { color: var(--detail-text); }
.ls-game .legend-select-detail-panel .legend-preview-deck { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.55rem 1.35rem; }
.ls-game .legend-preview-actions { margin-top: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.ls-game .legend-preview-reserved { min-height: clamp(2.5rem, 5vh, 3.5rem); flex-shrink: 0; }
@media (max-width: 720px) {
.ls-game .legend-select-hero-safe { inset: 0px 0px auto; height: min(46dvh, 380px); }
.ls-game .legend-select-portrait-bg { object-position: center 28%; }
.ls-game .legend-select-portrait-ambient { object-position: center 28%; opacity: 0.28; }
.ls-game .legend-select-detail .legend-preview-content { position: relative; left: auto; width: 100%; margin-top: auto; padding: 1.25rem; background: linear-gradient(transparent 0%, rgba(5, 5, 8, 0.4) 20%, rgba(5, 5, 8, 0.94) 55%); }
}
@media (min-width: 1400px) {
.ls-game .legend-select-detail .legend-preview-content { width: clamp(420px, 42vw, 760px); padding: clamp(2rem, 5vh, 3.5rem) clamp(2.25rem, 4vw, 4rem); }
.ls-game .legend-select-detail-panel { padding: clamp(2rem, 4vh, 3rem) clamp(2rem, 3.5vw, 3rem); }
.ls-game .legend-select-portrait-bg { object-position: 70% center; }
}
@media (min-aspect-ratio: 21 / 9) {
.ls-game .legend-select-detail .legend-preview-content { width: min(720px, 36vw); }
.ls-game .legend-select-portrait-bg { object-position: 58% center; }
}
.ls-game .ui-action-btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; margin: 0px; background-repeat: no-repeat; background-position: center center; background-size: 100% 100%; cursor: pointer; min-height: clamp(2.55rem, 5.4vh, 3.15rem); height: clamp(2.55rem, 5.4vh, 3.15rem); width: auto; min-width: clamp(8.5rem, 26vw, 13.5rem); aspect-ratio: var(--ui-action-ratio); font-family: var(--font-ui); font-weight: 700; font-size: clamp(0.82rem, 1.45vw, 0.98rem); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.2; text-align: center; white-space: nowrap; -webkit-font-smoothing: antialiased; appearance: none; filter: drop-shadow(rgba(0, 0, 0, 0.45) 0px 3px 10px); transition: filter 0.18s cubic-bezier(0.22, 1, 0.36, 1), transform 0.18s cubic-bezier(0.22, 1, 0.36, 1); border: 0px !important; border-radius: 0px !important; background-color: transparent !important; box-shadow: none !important; padding: var(--ui-action-pad-top) 17% var(--ui-action-pad-bottom) !important; }
.ls-game .ui-action-btn--primary { --ui-action-ratio: var(--ui-action-primary-ratio); --ui-action-pad-top: .38rem; --ui-action-pad-bottom: .06rem; --ui-action-primary-label-shadow: 0 1px 0 rgba(255, 248, 220, .95), 0 -1px 0 rgba(72, 44, 8, .45), -1px 0 1px rgba(0, 0, 0, .42), 1px 0 1px rgba(0, 0, 0, .42), 0 0 3px rgba(0, 0, 0, .5), 0 2px 4px rgba(0, 0, 0, .35); text-shadow: var(--ui-action-primary-label-shadow); background-image: var(--ui-action-primary) !important; color: rgb(10, 6, 4) !important; }
.ls-game .ui-action-btn--secondary { --ui-action-ratio: var(--ui-action-secondary-ratio); --ui-action-pad-top: .3rem; --ui-action-pad-bottom: .08rem; text-shadow: rgba(0, 0, 0, 0.65) 0px 1px 2px; background-image: var(--ui-action-secondary) !important; color: rgb(232, 220, 200) !important; }
.ls-game .ui-action-btn:hover:not(:disabled) { transform: translateY(-3px) scale(1.03); }
.ls-game .ui-action-btn--primary:hover:not(:disabled) { filter: brightness(1.14) saturate(1.12) drop-shadow(rgba(255, 196, 72, 0.62) 0px 0px 22px) drop-shadow(rgba(255, 160, 40, 0.28) 0px 0px 42px) drop-shadow(rgba(0, 0, 0, 0.55) 0px 8px 18px); }
.ls-game .ui-action-btn--secondary:hover:not(:disabled) { filter: brightness(1.18) drop-shadow(rgba(232, 220, 200, 0.5) 0px 0px 18px) drop-shadow(rgba(180, 170, 155, 0.22) 0px 0px 32px) drop-shadow(rgba(0, 0, 0, 0.55) 0px 8px 18px); }
.ls-game .ui-action-btn:active:not(:disabled) { transform: translateY(-1px) scale(1.01); }
.ls-game .ui-action-btn--primary:active:not(:disabled) { filter: brightness(1.06) drop-shadow(rgba(255, 196, 72, 0.4) 0px 0px 12px) drop-shadow(rgba(0, 0, 0, 0.5) 0px 4px 12px); }
.ls-game .ui-action-btn--secondary:active:not(:disabled) { filter: brightness(1.08) drop-shadow(rgba(232, 220, 200, 0.35) 0px 0px 10px) drop-shadow(rgba(0, 0, 0, 0.5) 0px 4px 12px); }
.ls-game .legend-preview-actions .ui-action-btn, .ls-game .legend-select-detail-panel .legend-preview-actions .ui-action-btn { flex: 1 1 auto; min-width: clamp(8.5rem, 24vw, 12.5rem); }
.ls-game .legend-select-detail-panel .legend-preview-actions .ui-action-btn--primary, .ls-game .legend-select-detail-panel .legend-preview-actions .ui-action-btn--secondary { background-color: transparent !important; border: 0px !important; box-shadow: none !important; }
@media (min-width: 769px) {
.ls-game .screen { height: 100dvh; max-height: 100dvh; min-height: 0px; overflow: hidden; box-sizing: border-box; }
.ls-game .legend-select-detail .legend-preview-content { overflow: hidden auto; overscroll-behavior: contain; padding: clamp(0.65rem, 1.6vh, 1.35rem) clamp(0.85rem, 1.8vw, 1.65rem); align-items: stretch; scrollbar-width: thin; scrollbar-color: rgba(201, 162, 39, 0.45) rgba(8, 6, 12, 0.4); }
.ls-game .legend-select-detail-panel { min-height: 0px; justify-content: flex-start; overflow: hidden auto; overscroll-behavior: contain; padding: clamp(0.95rem, 1.8vh, 1.45rem) clamp(0.95rem, 1.6vw, 1.35rem); scrollbar-width: thin; scrollbar-color: rgba(201, 162, 39, 0.45) rgba(8, 6, 12, 0.4); }
.ls-game .legend-select-detail-panel .legend-preview-header { margin-bottom: 0.55rem; }
.ls-game .legend-select-detail-panel .legend-preview-name { font-size: clamp(1.55rem, 2.8vw, 2.35rem); line-height: 1.1; }
.ls-game .legend-select-detail-panel .legend-preview-integrity { margin-top: 0.3rem; font-size: clamp(0.95rem, 1.5vw, 1.15rem); }
.ls-game .legend-select-detail-panel .legend-preview-playstyle { font-size: clamp(0.92rem, 1.35vw, 1.05rem); line-height: 1.45; margin-bottom: 0.65rem; }
.ls-game .legend-select-detail-panel .legend-preview-curator-hint { margin: 0px 0px 0.6rem; padding: 0.45rem 0.55rem; font-size: clamp(0.78rem, 1.1vw, 0.88rem); line-height: 1.35; }
.ls-game .legend-select-detail-panel .legend-preview-section { margin-bottom: 0.65rem; }
.ls-game .legend-select-detail-panel .legend-preview-section-title { margin-bottom: 0.3rem; font-size: clamp(0.78rem, 1.1vw, 0.88rem); }
.ls-game .legend-select-detail-panel .unstable-mode-desc, .ls-game .legend-select-detail-panel .legend-preview-relic { font-size: clamp(0.86rem, 1.2vw, 0.96rem); line-height: 1.4; }
.ls-game .legend-select-detail-panel .legend-preview-deck { grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 0.2rem 0.65rem; }
.ls-game .legend-select-detail-panel .legend-preview-deck li { font-size: clamp(0.82rem, 1.05vw, 0.92rem); }
.ls-game .legend-preview-actions { margin-top: 0.75rem; gap: 0.55rem; }
.ls-game .legend-preview-reserved { display: none; }
.ls-game .legend-select-portrait-bg { transform: scale(0.86); transform-origin: 68% center; }
.ls-game .legend-select-portrait-ambient { transform: scale(1.02); transform-origin: 68% center; }
.ls-game .legend-select-detail .legend-preview-content::-webkit-scrollbar, .ls-game .legend-select-detail-panel::-webkit-scrollbar { width: 8px; }
.ls-game .legend-select-detail .legend-preview-content::-webkit-scrollbar-track, .ls-game .legend-select-detail-panel::-webkit-scrollbar-track { background: rgba(8, 6, 12, 0.35); border-radius: 4px; }
.ls-game .legend-select-detail .legend-preview-content::-webkit-scrollbar-thumb, .ls-game .legend-select-detail-panel::-webkit-scrollbar-thumb { background: rgba(201, 162, 39, 0.42); border-radius: 4px; }
}
@media (min-width: 769px) and (max-height: 900px) {
.ls-game .legend-select-detail .legend-preview-content { padding-block: 0.5rem; }
.ls-game .legend-select-detail-panel { padding: 0.75rem 0.85rem; }
.ls-game .legend-select-detail-panel .legend-preview-name { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
.ls-game .legend-select-detail-panel .legend-preview-playstyle { font-size: 0.88rem; margin-bottom: 0.45rem; }
.ls-game .legend-select-detail-panel .legend-preview-section { margin-bottom: 0.45rem; }
.ls-game .legend-select-detail-panel .legend-preview-deck { grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 0.12rem 0.45rem; }
.ls-game .legend-select-detail-panel .legend-preview-deck li { font-size: 0.78rem; }
.ls-game .legend-preview-actions { margin-top: 0.5rem; }
.ls-game .legend-select-portrait-bg { transform: scale(0.78); }
}
@media (min-width: 769px) and (max-height: 760px) {
.ls-game .legend-select-detail-panel .legend-preview-curator-hint { display: none; }
.ls-game .legend-select-portrait-bg { transform: scale(0.72); }
}
@media (hover: none) and (pointer: coarse) {
.ls-game .legend-select-detail-panel, .ls-game .legend-select-detail .legend-preview-content { overflow: hidden auto; overscroll-behavior: contain; }
}
