:root {
  color-scheme: dark;
  --bg: #020817;
  --bg-raised: #07172f;
  --panel: rgba(6, 22, 48, .94);
  --panel-soft: rgba(8, 35, 70, .78);
  --line: rgba(104, 174, 232, .24);
  --line-strong: rgba(55, 211, 255, .62);
  --text: #f5fbff;
  --muted: #a9c2d9;
  --blue: #39d5ff;
  --blue-deep: #1267e8;
  --blue-soft: rgba(57, 213, 255, .12);
  --indigo: #5267e8;
  --green: #70f0ce;
  --gold: #ffe39a;
  --white-gold: #fff7d6;
  --danger: #ff7b79;
  --shadow: 0 24px 80px rgba(0, 4, 18, .52);
  --focus-ring: 0 0 0 3px rgba(2, 8, 23, .96), 0 0 0 5px var(--blue);
  --diamond-blue: #77e8ff;
  --diamond-ice: #e8fbff;
  --silver: #d6e2ed;
  --silver-deep: #8298aa;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background:#020817; }
html::before,
html::after {
  position:fixed;
  inset:0 auto 0 0;
  z-index:0;
  width:max(50vw,520px);
  content:"";
  pointer-events:none;
  background-color:#020817;
  background-position:left center;
  background-size:auto 100vh;
  background-repeat:no-repeat;
}
html::before {
  background-image:none;
}
html::after {
  right:0;
  left:auto;
  background-image:none;
  background-position:right center;
}
body {
  position:relative;
  z-index:1;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:linear-gradient(180deg,rgba(1,8,24,.12),rgba(1,7,20,.5));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  font-size: 18px;
}
body.game-active::after {
  position:fixed;
  inset:0;
  z-index:15;
  content:"";
  pointer-events:none;
  background:linear-gradient(rgba(3,14,34,.12),rgba(3,14,34,.12));
}
.game-ambience { display:none; }
.game-active .game-ambience,.entry-splash-active .game-ambience,.saga-landing-active .game-ambience { display:block; }
.side-video-loop { position:fixed; top:0; bottom:0; z-index:-1; width:max(50vw,520px); overflow:hidden; pointer-events:none; background:#020817; }
.side-video-loop-left { left:0; }
.side-video-loop-right { right:0; }
.side-video-loop video { width:100%; height:100%; object-fit:cover; opacity:.82; }
.center-video-loop { position:fixed; top:50%; left:50%; z-index:-1; display:none; width:auto; height:min(100vh,1080px); aspect-ratio:9/16; overflow:hidden; pointer-events:none; transform:translate(-50%,-50%); }
.game-active .center-video-loop { display:block; }
.center-video-loop video { display:block; width:100%; height:100%; object-fit:cover; }
.ambience-controls { position:fixed; right:16px; bottom:16px; z-index:60; display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; max-width:min(680px,calc(100vw - 32px)); padding:10px 12px; border:1px solid rgba(148,227,255,.65); border-radius:14px; color:#eefaff; background:rgba(2,15,43,.88); box-shadow:0 10px 30px rgba(0,0,0,.42); backdrop-filter:blur(10px); }
.entry-splash-active .ambience-controls,.saga-landing-active .ambience-controls { z-index:1001; }
.ambience-controls strong { color:#bcecff; font-size:.88rem; letter-spacing:.08em; }
.ambience-controls audio { width:180px; height:30px; }
.ambience-controls label { display:flex; align-items:center; gap:7px; font-size:.75rem; font-weight:800; }
.ambience-controls input { width:110px; accent-color:#55d7ff; }
.music-rights-proof:disabled { opacity:.45; filter:grayscale(1); cursor:not-allowed; }
@media (max-width:700px) { .side-video-loop { width:50vw; } .ambience-controls { left:10px; right:10px; bottom:10px; justify-content:center; } }
.guided-game .start-playing, .guided-game .run-guide { display:none; }
.guided-game .hero { padding-block:10px; }
.guided-game .hero .subtitle, .guided-game .hero-meta { display:none; }
.guided-game .grid { display:block; }
.guided-game .panel { max-width:900px; margin:18px auto 0; }
.guided-game [hidden] { display:none !important; }

button, select, input { font: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.025em; }
h1 { font-size: clamp(2.45rem, 11vw, 5.4rem); letter-spacing: -.075em; }
h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h3 { font-size: 1rem; }
small { font-size: .82rem; }
code { color: #bdefff; }

.shell { width: min(1220px, calc(100% - 24px)); margin: 0 auto; padding: 24px 0 64px; }
.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 10px 14px;
  color: #031018;
  background: var(--blue);
  border-radius: 10px;
  font-weight: 900;
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.start-playing { display:grid; justify-items:center; gap:8px; margin:0 auto 22px; padding:20px 24px; max-width:720px; text-align:center; border:2px solid var(--line-strong); border-radius:18px; background:linear-gradient(145deg,rgba(18,103,232,.3),rgba(8,35,70,.86)); box-shadow:0 12px 36px rgba(0,0,0,.3); }
.start-playing h2 { margin:0; font-size:clamp(1.4rem,3vw,2rem); }
.start-playing p { margin:0; color:var(--muted); font-size:1rem; }
.start-playing-button { min-width:min(100%,320px); min-height:58px; font-size:1.25rem; font-weight:900; }
.start-playing small { color:var(--muted); font-size:.85rem; }
.hero-copy { max-width: 760px; }
.eyebrow { color: var(--blue); font-size: .68rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.subtitle { max-width: 650px; margin-top: 12px; color: var(--muted); font-size: clamp(.9rem, 2vw, 1rem); }
.hero-meta { display: grid; justify-items: end; gap: 8px; padding-bottom: 4px; }
.hero-note { color: var(--muted); font-size: .72rem; }
.badge, .pill, .count-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge { padding: 8px 11px; }
.pill, .count-badge { padding: 6px 9px; }
.pill.live { border-color: rgba(157, 255, 180, .45); color: var(--green); background: rgba(64, 194, 111, .12); }
.count-badge { color: var(--green); border-color: rgba(157, 255, 180, .42); background: rgba(64, 194, 111, .1); }

.section-nav {
  position: sticky;
  z-index: 10;
  top: 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 18px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(5, 14, 25, .9);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .2);
  scrollbar-width: thin;
}
.nav-tab {
  display: grid;
  flex: 0 0 auto;
  gap: 1px;
  min-width: 88px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 850;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.nav-tab span { color: var(--blue); font-size: .56rem; letter-spacing: .12em; }
.nav-tab:hover, .nav-tab:focus-visible { color: var(--text); border-color: var(--line-strong); background: var(--blue-soft); }

.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(10, 38, 75, .88), rgba(3, 13, 31, .94));
  box-shadow: inset 0 1px 0 rgba(199, 239, 255, .08), inset 0 -18px 42px rgba(1, 7, 20, .22), var(--shadow);
  scroll-margin-top: 78px;
}

/* Keep artwork outside the content cards so faces remain visible. */
.grid > .panel:nth-child(even),
.campaign-panel,
.progression-panel {
  background-image:linear-gradient(145deg,rgba(8,31,66,.9),rgba(2,10,28,.96));
}

.grid > .panel:nth-child(odd),
.status-panel,
.run-guide {
  background-image:linear-gradient(145deg,rgba(8,35,73,.9),rgba(2,11,29,.96));
}
.run-guide { display: grid; gap: 12px; margin-bottom: 18px; padding: 18px; }
.run-guide > div { display: grid; gap: 5px; }
.run-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; counter-reset: run-step; }
.run-steps li { display: grid; gap: 4px; min-height: 68px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.025); font-size: .66rem; }
.run-steps li::before { counter-increment: run-step; content: counter(run-step, decimal-leading-zero); color: var(--blue); font-size: .57rem; font-weight: 900; letter-spacing: .1em; }
.run-steps li.current { border-color: var(--line-strong); color: var(--text); background: var(--blue-soft); }
.run-steps li.done { border-color: rgba(157,255,180,.42); color: var(--green); background: rgba(64,194,111,.08); }
.run-next, .reward-log { padding: 10px 12px; border-left: 3px solid var(--blue); border-radius: 8px; color: #d9f6ff; background: rgba(102,220,255,.08); font-size: .75rem; }
.reward-log { margin-top: 10px; border-left-color: var(--gold); color: #ffe2a0; background: rgba(255,209,107,.08); }
.status-panel { display: grid; gap: 16px; margin-bottom: 18px; padding: 18px; }
.panel-intro { display: grid; gap: 7px; }
.panel-intro .muted { max-width: 740px; }
.muted { color: var(--muted); }
.select-wrap { display: grid; gap: 6px; color: var(--muted); font-size: .72rem; font-weight: 750; }
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: #0a1728;
}
.status-select { max-width: 300px; }
.prime-callout {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 209, 107, .38);
  border-radius: 15px;
  background: linear-gradient(100deg, rgba(255, 185, 75, .1), rgba(186, 121, 255, .1));
}
.prime-callout > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.prime-callout p:not(.eyebrow) { color: #d7c9b7; font-size: .8rem; }
.prime-callout > strong { color: var(--gold); font-size: .82rem; }
.status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { display: grid; gap: 4px; min-height: 74px; padding: 12px; border: 1px solid rgba(155, 198, 228, .14); border-radius: 13px; background: rgba(255, 255, 255, .035); }
.stat span { color: var(--muted); font-size: .68rem; }
.stat strong { font-size: 1.25rem; }
#events-cleared { color: var(--green); }
#ascension-access { color: var(--blue); }
.save-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.save-help, .persistence-status, .save-log { color: var(--muted); font-size: .7rem; }
.persistence-status { padding: 9px 11px; border-left: 3px solid var(--green); border-radius: 7px; background: rgba(64, 194, 111, .08); }
.save-log { min-height: 1em; }

.grid { display: grid; gap: 18px; }
.grid > .panel, .campaign-panel, .progression-panel { padding: 18px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-heading > div:first-child { display: grid; gap: 5px; }
.heading-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.contract-card { display: grid; gap: 5px; margin: 14px 0 12px; padding: 12px; border: 1px solid rgba(102, 220, 255, .26); border-radius: 13px; background: rgba(102, 220, 255, .08); }
.contract-card strong { color: #dff9ff; font-size: .82rem; }
.contract-card span { color: #a6c5d8; font-size: .7rem; }
.rate-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0; }
.rate-grid > div { display: grid; justify-items: center; gap: 5px; padding: 11px 5px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .03); }
.rate-grid strong { font-size: 1.12rem; }
.rate-grid small { color: var(--muted); font-size: .6rem; text-align: center; }
.rarity { font-size: .67rem; font-weight: 950; letter-spacing: .07em; text-align: center; text-transform: uppercase; }
.sr { color: #d8e3ef; }
.ssr { color: #78c9ff; text-shadow: 0 0 9px rgba(34, 140, 255, .65); }
.ur { color: #9cf5ff; text-shadow: 0 0 12px rgba(57, 213, 255, .8); }
.asc { color: var(--white-gold); text-shadow: 0 0 6px #fff, 0 0 18px rgba(255, 218, 116, .72); }

button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, border-color .16s ease;
}
button:hover { transform: translateY(-1px); filter: brightness(1.1); }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: none; box-shadow: var(--focus-ring); }
button:disabled { cursor: not-allowed; opacity: .45; transform: none; filter: none; }
button.primary { background: linear-gradient(110deg, #087cd4, #244ee1); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 8px 24px rgba(12, 100, 232, .24); }
button.special { color: var(--white-gold); border-color: rgba(255, 239, 180, .82); background: #08245c; box-shadow: inset 0 0 18px rgba(45, 207, 255, .28), 0 0 0 1px rgba(69, 202, 255, .3), 0 0 24px rgba(255, 222, 124, .34); }
button.secondary { border-color: var(--line); background: rgba(255, 255, 255, .07); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--white-gold); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(42, 190, 255, .36); }

.result-card { min-height: 112px; margin-top: 14px; padding: 14px; border: 1px dashed var(--line); border-radius: 15px; overflow: hidden; position: relative; }
.result-card.empty { display: grid; place-items: center; color: var(--muted); text-align: center; }
.result-card strong { font-size: 1.15rem; }
.result-card small { display: block; margin-top: 5px; }
.multi-results { display: block; }
.multi-heading { display: grid; gap: 4px; margin-bottom: 11px; }
.multi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.mini-card { display: grid; justify-items: center; gap: 3px; min-width: 0; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.summon-character-card { width:100%; color:inherit; font:inherit; cursor:pointer; }
.summon-character-card:hover, .summon-character-card:focus-visible { border-color:#8edcff; box-shadow:0 0 18px rgba(92,202,255,.58); transform:translateY(-2px); }
.qa-access { display:grid; gap:.7rem; margin-top:1rem; padding:1rem; border:2px solid #48cfff; border-radius:14px; background:linear-gradient(120deg,rgba(17,107,191,.3),rgba(9,24,52,.92)); }
.qa-access[hidden] { display:none; }
.qa-access h3,.qa-access p { margin:0; }
.qa-access strong { color:#8fe4ff; }
.qa-mode::before { content:"QA MODE · TEST COLLECTION · NOT SAVED"; position:fixed; inset:0 0 auto; z-index:100; padding:7px; color:#03111e; background:#6de1ff; font-weight:1000; text-align:center; letter-spacing:.1em; }
.qa-mode { padding-top:34px; }
.qa-roster-pages { display:flex; align-items:center; justify-content:center; gap:1rem; margin:1rem 0; }
.qa-roster-pages[hidden] { display:none; }
.qa-roster-pages strong { color:#9de7ff; }
.mini-card .card-sigil { width: 28px; height: 28px; font-size: .9rem; }
.mini-card b, .mini-card small, .mini-card em { overflow-wrap: anywhere; }
.mini-card b { font-size: .64rem; }
.mini-card small, .mini-card em { color: var(--muted); font-size: .57rem; font-style: normal; }
.card-sigil { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .14); box-shadow: 0 0 24px currentColor; font-size: 1.4rem; }
.card-sr { background: linear-gradient(145deg, rgba(217, 230, 241, .16), rgba(31, 53, 82, .24)); border-color: rgba(199, 216, 232, .52); }
.card-ssr { background: linear-gradient(145deg, rgba(42, 129, 230, .28), rgba(8, 34, 79, .62)); border-color: rgba(69, 162, 255, .78); box-shadow: inset 4px 0 0 #258eff, 0 0 18px rgba(27, 118, 255, .2); }
.card-ur { background: linear-gradient(145deg, rgba(51, 221, 255, .3), rgba(20, 48, 132, .68)); border-color: rgba(93, 235, 255, .92); box-shadow: inset 4px 0 0 #54ebff, 0 0 26px rgba(43, 197, 255, .28); }
.card-asc { background: linear-gradient(145deg, rgba(36, 103, 221, .72), rgba(10, 25, 80, .9)); border-color: rgba(255, 228, 151, .96); box-shadow: inset 4px 0 0 var(--white-gold), inset 0 0 28px rgba(58, 201, 255, .25), 0 0 28px rgba(255, 222, 126, .26); }
.history { display: flex; flex-wrap: wrap; gap: 5px; min-height: 28px; margin-top: 10px; }
.history span { padding: 4px 7px; border-radius: 999px; background: rgba(255, 255, 255, .07); font-size: .62rem; }
.collection-summary { display: grid; gap: 8px; margin-top: 12px; padding: 11px; border: 1px solid rgba(155, 198, 228, .14); border-radius: 13px; background: rgba(0, 0, 0, .14); }
.collection-summary strong { font-size: .78rem; }
.collection-summary small { color: var(--muted); }
.collection-grid { display: flex; flex-wrap: wrap; gap: 5px; max-height: 15rem; overflow: auto; content-visibility: auto; contain: layout paint style; }
.collection-chip { padding: 4px 7px; border-radius: 999px; background: rgba(255, 255, 255, .07); font-size: .58rem; font-weight: 850; }

.puzzle-grid { display: grid; grid-template-columns: repeat(4, minmax(44px, 1fr)); gap: 8px; min-height: 62px; margin: 20px 0 13px; }
.puzzle-start-status { margin: 8px 0 0; padding: 9px 11px; border: 1px solid rgba(255, 227, 154, .35); border-radius: 10px; color: var(--white-gold); background: rgba(255, 227, 154, .07); font-size: .7rem; }
.puzzle-node { min-height: 52px; padding: 7px; border-color: rgba(55, 213, 255, .56); background: radial-gradient(circle, rgba(57, 213, 255, .28), rgba(6, 25, 66, .92)); color: #b5f7ff; box-shadow: inset 0 0 14px rgba(34, 117, 255, .16), 0 0 14px rgba(57, 213, 255, .14); }
.puzzle-node.solved { border-color: rgba(255, 230, 156, .9); background: radial-gradient(circle, #fff9db 0 8%, rgba(255, 218, 112, .48) 9% 28%, rgba(17, 99, 181, .82) 70%); color: #fffbea; box-shadow: 0 0 9px rgba(255,255,255,.72), 0 0 24px rgba(255, 218, 112, .55); }
.battle-log { min-height: 42px; margin-top: 11px; padding: 11px; border-radius: 11px; color: var(--muted); background: rgba(0, 0, 0, .2); font-size: .78rem; }

.roster-controls { display: grid; gap: 8px; margin: 15px 0 11px; }
.roster-preview { display: grid; align-content: center; min-height: 122px; margin-bottom: 10px; padding: 13px; border: 1px solid rgba(102, 220, 255, .24); border-radius: 14px; background: rgba(255, 255, 255, .035); }
.roster-preview > div { display: grid; gap: 5px; }
.roster-preview strong { font-size: 1.05rem; }
.roster-preview span { font-weight: 900; }
.roster-preview small { color: var(--muted); }
.free-animation-preview { margin-top:8px; width:max-content; max-width:100%; }
.free-animation-preview-stage { display:grid; gap:8px; margin-top:8px; }
.free-animation-preview-stage video { display:block; width:min(100%,720px); max-height:72vh; border-radius:12px; background:#020817; }
.owned-roster-heading { display:flex; justify-content:space-between; align-items:center; margin:16px 0 10px; }
.owned-roster-heading span { color:#8ed8ff; font-weight:900; }
.owned-roster-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; margin-bottom:14px; }
.owned-character-card { display:grid; justify-items:center; gap:5px; min-height:218px; padding:11px; border:3px solid #8edcff; border-radius:15px; color:#fff; background:linear-gradient(155deg,#174f8b,#071a38); box-shadow:0 0 18px rgba(92,202,255,.72),0 8px 22px rgba(0,0,0,.3),inset 0 0 14px rgba(113,216,255,.16); text-align:center; }
.owned-character-card:hover:not(:disabled) { transform:translateY(-3px); box-shadow:0 12px 28px rgba(42,153,235,.35); }
.owned-character-card.in-team { border-color:#74ef9d; box-shadow:0 0 18px rgba(82,223,132,.3); }
.owned-character-card span,.owned-character-card small { color:#cce8fb; }
.owned-character-card b { margin-top:auto; color:#ffe36c; }
.owned-character-portrait { width:105px!important; height:105px!important; border:3px solid #a9e7ff; border-radius:13px!important; box-shadow:0 0 16px rgba(94,205,255,.72); }
.owned-roster-empty { grid-column:1/-1; padding:24px; border:1px dashed #39709f; border-radius:13px; color:#b9d5ef; text-align:center; }
.all-characters-browser { margin-top:18px; border:1px solid rgba(102,220,255,.28); border-radius:14px; background:rgba(0,0,0,.14); }
.all-characters-browser summary { padding:16px; color:#dff4ff; font-size:1.05rem; font-weight:950; cursor:pointer; }
.all-characters-browser > :not(summary) { margin-left:14px; margin-right:14px; }
.roster-controls select option { color:#07111f; background:#f7fbff; font-weight:800; }
.roster-controls select option:checked { color:#03101f; background:#89c7ff; }
.legendary-roster-tab { margin-top:14px; padding:14px; border:2px solid rgba(122,220,255,.7); border-radius:16px; background:linear-gradient(145deg,rgba(22,86,160,.32),rgba(221,240,255,.08)); box-shadow:inset 0 0 24px rgba(90,198,255,.16),0 0 18px rgba(92,188,255,.2); }
.legendary-roster-grid { grid-template-columns:repeat(2,minmax(150px,1fr)); margin-top:10px; }
.legendary-diamond-card { border:3px solid #d8f5ff; background:linear-gradient(145deg,rgba(24,101,190,.84),rgba(211,237,255,.22),rgba(10,42,104,.92)); box-shadow:inset 0 0 20px rgba(255,255,255,.2),0 0 24px rgba(93,207,255,.55); }
.legendary-diamond-card > span { color:#eefcff; font-weight:950; text-shadow:0 0 10px #5acfff; }
.king-tier-reward-banner { display:grid; gap:6px; margin:14px 0; padding:16px; border:2px solid #a9eaff; border-radius:16px; text-align:center; background:linear-gradient(145deg,rgba(24,104,196,.75),rgba(223,245,255,.16),rgba(17,47,119,.86)); box-shadow:inset 0 0 25px rgba(255,255,255,.15),0 0 22px rgba(72,195,255,.38); }
.king-tier-reward-banner strong { color:#fff; font-size:1rem; text-shadow:0 2px 0 #174c8c,0 0 14px #70d8ff; }
.king-tier-reward-banner span { color:#dff8ff; font-weight:950; }
.king-tier-reward-banner b { color:#8be4ff; font-size:.78rem; }
.leaderboard-name-list { margin-top:14px; padding:12px; border:1px solid rgba(120,220,255,.38); border-radius:13px; background:rgba(0,10,35,.34); }
.leaderboard-name-list > strong { color:#dff8ff; }
.leaderboard-name-list ol { max-height:420px; overflow:auto; padding-right:8px; }
@media (max-width:560px) { .legendary-roster-grid { grid-template-columns:1fr; } }
.roster-preview.is-unavailable { opacity:1; filter:none; border-color:rgba(155,198,228,.28); box-shadow:none; }
.roster-preview.is-owned { border:3px solid #8edcff; box-shadow:0 0 22px rgba(92,202,255,.72),inset 0 0 16px rgba(113,216,255,.12); }
.inline-feedback { min-height: 1.4em; margin: 9px 0; color: #b7c8d9; font-size: .7rem; }
.team-block { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); scroll-margin-top: 78px; }
.team-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.team-heading > div { display: grid; gap: 4px; }
.team-heading strong { font-size: .82rem; }
.team-heading small { font-size: .63rem; }
.team-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; min-height: 58px; margin-top: 6px; }
.team-member { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 56px; padding: 7px 3px; border: 1px solid rgba(102, 220, 255, .25); border-radius: 10px; background: rgba(102, 220, 255, .08); }
.team-member span, .team-member small { overflow-wrap: anywhere; text-align: center; }
.team-member span { font-size: .58rem; font-weight: 900; }
.team-member small { color: var(--muted); font-size: .53rem; }
.team-quest-actions { display:grid; gap:7px; margin-top:12px; padding:12px; border:2px solid rgba(103,221,255,.7); border-radius:14px; background:linear-gradient(145deg,rgba(10,48,88,.96),rgba(25,100,145,.9)); box-shadow:0 0 18px rgba(52,204,255,.3); text-align:center; }
.team-quest-actions[hidden] { display:none; }
.team-quest-actions button { width:100%; min-height:48px; font-size:1rem; font-weight:950; }
.team-quest-actions small { color:#f2fbff; font-weight:800; }
.team-avatar-wrap { position:relative; display:inline-grid; place-items:center; }
.diamond-remove-member { position:absolute; top:-8px; right:-12px; z-index:2; display:grid; place-items:center; width:34px; min-width:34px; height:34px; min-height:34px; padding:0; border:2px solid #fff; border-radius:10px; color:#fff; background:linear-gradient(145deg,#8ff6ff,#2686de 55%,#7b35d6); box-shadow:0 0 0 2px rgba(21,65,115,.7),0 4px 12px rgba(0,39,91,.45); font-size:1rem; line-height:1; transform:rotate(45deg); }
.diamond-remove-member::first-letter { transform:rotate(-45deg); }
.diamond-remove-member:hover,.diamond-remove-member:focus-visible { filter:brightness(1.18); box-shadow:0 0 0 3px #fff,0 0 18px #5deaff; }
.remove-member { position: absolute; top: 0; right: 1px; min-height: 25px; padding: 0 4px; color: var(--muted); background: transparent; font-size: .8rem; }

.event-select { margin-bottom: 10px; }
.event-profile { margin: 10px 0 8px; padding: 8px 10px; border: 1px solid rgba(255, 207, 112, .27); border-radius: 10px; color: #ffe0a0; background: rgba(255, 188, 82, .08); font-size: .68rem; }
.battle-note { margin-bottom: 12px; color: var(--muted); font-size: .67rem; }
.battle-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 12px; }
.battle-metrics > div { display: grid; gap: 4px; padding: 9px; border: 1px solid rgba(155, 198, 228, .15); border-radius: 11px; background: rgba(0, 0, 0, .12); }
.battle-metrics span { color: var(--muted); font-size: .6rem; }
.battle-metrics strong { font-size: .78rem; }
#enemy-health-summary { color: #ff4d55; text-shadow: 0 0 13px rgba(255,45,55,.72); }
#retaliation-summary { color: #ff7479; text-shadow: 0 0 11px rgba(255,45,55,.5); }
#battle-outcome { color: var(--green); }
.arena { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 7px; min-height: 210px; padding: 14px 6px; overflow: hidden; border: 1px solid rgba(61, 164, 242, .24); border-radius: 17px; background: radial-gradient(ellipse at 50% 115%, rgba(32, 114, 211, .28), transparent 48%), linear-gradient(160deg, rgba(7, 39, 83, .96), rgba(3, 12, 35, .98)), repeating-linear-gradient(0deg, transparent 0 26px, rgba(86, 188, 255, .04) 27px 28px); }
.fighter { display: grid; justify-items: center; gap: 6px; font-weight: 800; text-align: center; }
.fighter small { color: var(--muted); font-size: .67rem; }
.avatar { display: grid; place-items: center; width: 76px; height: 76px; border: 2px solid var(--blue); border-radius: 50%; color: var(--blue); background: radial-gradient(circle, rgba(102, 220, 255, .3), rgba(25, 34, 67, .9)); box-shadow: 0 0 26px rgba(102, 220, 255, .4); font-size: .68rem; }
.avatar.enemy { border-color: #607adf; color: #bdcaff; background: radial-gradient(circle, rgba(67, 101, 213, .32), rgba(5, 15, 45, .94)); box-shadow: inset 0 0 22px rgba(34, 81, 195, .22), 0 0 26px rgba(53, 98, 208, .28); filter: saturate(.76); }
.versus { color: #fff; font-size: 1rem; font-weight: 950; text-shadow: 0 0 14px var(--indigo); }
.bar { width: min(138px, 100%); height: 11px; padding: 2px; overflow: hidden; border: 1px solid rgba(148, 211, 255, .34); border-radius: 999px; background: rgba(0, 3, 14, .72); box-shadow: inset 0 2px 5px rgba(0,0,0,.7); }
.bar i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1594e8, #65f2ff); box-shadow: 0 0 10px rgba(70, 221, 255, .55); transition: width .25s ease; }
.enemy-fighter .bar { border-color: rgba(255,90,97,.65); }
.enemy-fighter .bar i { background: linear-gradient(90deg, #9e0712, #ff2636, #ff727a); box-shadow: 0 0 12px rgba(255,38,54,.75); }
.enemy-fighter small { color:#ff858a; font-weight:950; text-shadow:0 0 10px rgba(255,38,54,.65); }
.smith-damage-impact { color:#ff555e; text-shadow:0 3px 0 #490008,0 0 22px rgba(255,35,49,.9); }
.arena.victory, .arena[data-outcome="victory"] { border-color: rgba(255, 227, 145, .76); box-shadow: inset 0 0 40px rgba(45, 196, 255, .14), 0 0 25px rgba(255, 225, 137, .18); }
.arena.defeat, .arena[data-outcome="defeat"] { border-color: rgba(255, 123, 121, .58); filter: saturate(.62); background-image: repeating-linear-gradient(135deg, rgba(255,123,121,.06) 0 8px, transparent 8px 16px); }
#battle-outcome { color: var(--white-gold); text-shadow: 0 0 12px rgba(255, 222, 120, .42); }
.battle-squad-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 13px; }
.battle-squad-heading strong { font-size: .78rem; }
.battle-squad-heading small { color: var(--muted); font-size: .63rem; text-align: right; }
.battle-squad { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 9px; min-height: 150px; margin-top: 10px; }
.squad-unit { position:relative; display: grid; grid-template-columns:1fr; justify-items:center; align-content:start; gap: 4px; min-width: 0; padding: 8px; overflow:hidden; border: 2px solid rgba(155, 198, 228, .35); border-radius: 14px; background: linear-gradient(160deg,rgba(30,83,142,.65),rgba(4,17,43,.98)); box-shadow:0 8px 20px rgba(0,0,0,.3); text-align:center; }
.squad-unit strong, .squad-unit small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.squad-unit strong { width:100%; font-size: .72rem; }
.squad-unit b { color:#dcecff; font-size:.62rem; }
.squad-unit small { color: var(--muted); font-size: .54rem; }
.squad-rarity { color: var(--blue); font-size: .56rem; font-weight: 900; }
.squad-position { position:absolute; top:5px; left:6px; z-index:2; display:grid; place-items:center; width:24px; height:24px; border-radius:50%; color:#041329; background:#8ed8ff; font-size:.72rem; font-weight:1000; }
.squad-portrait { width:78px!important; height:78px!important; border:3px solid #8ed8ff; border-radius:12px!important; box-shadow:0 0 18px rgba(80,183,255,.35); }
.squad-unit.card-sr { border-color: rgba(218, 226, 238, .5); }
.squad-unit.card-ssr { border-color: rgba(113, 187, 255, .6); }
.squad-unit.card-ur { border-color: rgba(125, 204, 255, .82); }
.squad-unit.card-asc { border-color: rgba(255, 209, 107, .9); }
.squad-empty { display: grid; place-items: center; grid-column: 1 / -1; min-height: 58px; padding: 7px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); font-size: .68rem; text-align: center; }
.cast-timeline { display: grid; gap: 5px; margin-top: 9px; }
#spell-card-select, #spell-inspector, #spell-status, .spell-controls, #cast-timeline { display:none !important; }
.cast-entry { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 8px 9px 8px 13px; overflow: hidden; border: 1px solid rgba(75, 170, 239, .22); border-radius: 9px; background: linear-gradient(90deg, rgba(10, 55, 111, .4), rgba(1, 8, 24, .5)); }
.cast-entry::before { position: absolute; inset: 0 auto 0 0; width: 3px; content: ""; background: var(--blue-deep); }
.cast-entry strong { font-size: .6rem; }
.cast-event { overflow: hidden; color: var(--muted); font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.cast-damage { color: var(--green); font-size: .64rem; font-weight: 900; }
.cast-phases { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 4px; }
.cast-phase { padding: 3px 5px; border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, .06); font-size: .5rem; }
.cast-phase:first-child { color: #9eeaff; background: rgba(102, 220, 255, .12); }
.cast-entry.resolved { border-color: rgba(255, 226, 143, .48); box-shadow: inset 0 0 18px rgba(43, 204, 255, .08); }
.cast-entry.resolved::before { background: var(--white-gold); box-shadow: 0 0 12px rgba(255, 225, 137, .7); }
.cast-empty { padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .62rem; }
.battle-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.controls-help { margin-top: 10px; color: var(--muted); font-size: .68rem; }
.impact { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, #fffef4, rgba(255, 226, 137, .86) 8%, rgba(57, 213, 255, .5) 20%, transparent 48%); }
.impact.flash { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: 0; transform: scale(.6); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }

.campaign-panel, .progression-panel { margin-top: 18px; }
.campaign-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px; border: 1px solid rgba(102, 220, 255, .18); border-radius: 13px; background: rgba(102, 220, 255, .06); }
.campaign-summary > div { display: grid; gap: 5px; }
.campaign-summary strong { font-size: .8rem; }
#campaign-progress { color: var(--green); white-space: nowrap; }
.campaign-feedback { min-height: 2.5em; margin-top: 10px; padding: 10px; border-radius: 10px; color: #c8d7e7; background: rgba(0, 0, 0, .16); font-size: .7rem; }
.quest-browser { display:grid; grid-template-columns:minmax(280px,.8fr) minmax(320px,1.2fr); gap:18px; margin-top:16px; }
.event-catalog { display:grid; gap:10px; margin:0; }
.quest-book { overflow:hidden; border:1px solid rgba(102,220,255,.25); border-radius:12px; background:rgba(0,0,0,.16); }
.quest-book summary { padding:14px 16px; color:#e9f7ff; font-size:1rem; font-weight:900; cursor:pointer; }
.quest-book summary:hover, .quest-book summary:focus-visible { background:rgba(102,220,255,.1); }
.quest-list { display:grid; gap:7px; padding:0 10px 10px; }
.quest-button { width:100%; min-height:48px; padding:10px 14px; border-color:rgba(102,220,255,.28); color:#e8f5ff; background:rgba(77,134,255,.1); font-size:.95rem; text-align:left; }
.quest-button.locked { color:#8f9cae; background:rgba(100,108,150,.06); }
.quest-button.cleared { border-color:rgba(157,255,169,.48); color:#b8ffc5; }
.quest-button.selected { outline:3px solid var(--blue); outline-offset:2px; }
.quest-details { position:sticky; top:90px; align-self:start; min-height:210px; padding:24px; border:2px solid rgba(102,220,255,.38); border-radius:16px; background:linear-gradient(145deg,rgba(20,72,130,.3),rgba(2,12,31,.92)); }
.quest-details h3 { margin:10px 0; font-size:clamp(1.5rem,3vw,2.1rem); }
.quest-details p { margin:0; color:#dcecff; font-size:1.08rem; line-height:1.6; }
.quest-status { color:var(--blue); font-size:.82rem; font-weight:950; letter-spacing:.12em; }
.quest-status.completed { color:var(--green); }
.quest-status.locked { color:#a4afbd; }
.flow-next { width:100%; min-height:58px; margin-top:18px; font-size:1.08rem; }
.result-actions { display:flex; gap:10px; margin-top:16px; }
.result-actions button { flex:1; min-height:54px; font-size:1rem; }
.account-login { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:16px 0; }
.entry-splash,.saga-landing { position:fixed; inset:0; z-index:1000; overflow:auto; background:#020a18; }
.entry-splash { display:grid; place-items:center; cursor:pointer; touch-action:manipulation; }
.entry-splash-media { display:block; width:100%; height:100%; background:#020a18; }
.entry-splash-media img,.entry-splash-media video { display:block; width:100%; height:100%; min-width:0; object-fit:contain; border:0; outline:0; pointer-events:none; user-select:none; background:#000; }
.entry-splash-media video { object-fit:cover; object-position:center; }
.entry-splash-message { position:absolute; top:50%; left:50%; z-index:3; width:min(92vw,1050px); padding:22px 30px; transform:translate(-50%,-50%); color:#fff; font-size:clamp(1.35rem,3vw,3rem); font-weight:950; line-height:1.2; letter-spacing:.025em; text-align:center; text-shadow:0 2px 4px #000,0 0 14px #00152e,0 0 30px #21bfff; background:linear-gradient(90deg,transparent,rgba(0,8,25,.78) 18%,rgba(0,8,25,.82) 82%,transparent); pointer-events:none; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#entry-splash-button { position:absolute; inset:0; z-index:5; display:block; width:100%; height:100%; min-width:100%; min-height:100%; margin:0; padding:0; border:0; border-radius:0; background:rgba(0,0,0,.001); cursor:pointer; touch-action:manipulation; }
#entry-splash-button:hover,#entry-splash-button:active,#entry-splash-button:focus,#entry-splash-button:focus-visible { transform:none; filter:none; border:0; outline:0; outline-offset:0; box-shadow:none; background:rgba(0,0,0,.001); }
.entry-splash-active .shell,.saga-landing-active .shell { display:none; }
.entry-splash-active .saga-landing { display:none; }
.saga-landing-active .entry-splash { display:none; }
.game-active .entry-splash,.game-active .saga-landing { display:none; }
.saga-landing { padding:clamp(20px,4vw,56px); background:linear-gradient(rgba(2,10,28,.22),rgba(2,10,28,.22)),url("../assets/wallpapers/saga-landing-v4.png") center center / cover fixed no-repeat; }
.saga-landing-inner { width:min(1180px,100%); margin:auto; text-align:center; }
.saga-landing h1 { margin:.2em 0; font-size:clamp(2.3rem,6vw,5rem); }
.saga-lead { max-width:760px; margin:0 auto 24px; color:#c7e7ff; font-size:1.15rem; }
.founder-offer { display:flex; flex-direction:column; gap:5px; margin:24px auto; padding:18px; max-width:800px; border:2px solid #ffd873; border-radius:18px; background:linear-gradient(120deg,rgba(151,93,7,.35),rgba(8,31,65,.92)); }
.founder-offer strong { color:#ffe297; font-size:1.35rem; }
.saga-books { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.saga-books article { display:flex; align-items:center; gap:12px; min-height:86px; padding:16px; border:1px solid #43c8ff; border-radius:14px; background:rgba(8,33,70,.9); text-align:left; }
.saga-books span { color:#62d8ff; font-weight:900; }
.exclusive-previews { margin-top:38px; }
.preview-video-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.preview-video-grid figure { margin:0; padding:12px; border:1px solid #43c8ff; border-radius:18px; background:#06172f; }
.preview-video-grid video { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:12px; background:#000; }
.preview-video-grid figcaption { padding:10px 4px 2px; font-weight:800; color:#cceeff; }
.enter-game-button { margin:30px auto 14px; min-width:min(100%,360px); font-size:1.2rem; }
@media(max-width:760px){.saga-books{grid-template-columns:1fr}.preview-video-grid{grid-template-columns:1fr}}

/* Each campaign description carries the matching retail cover as a premium Mission Spellbook panel. */
.mission-spellbook {
  display: grid;
  grid-template-columns: minmax(122px, .68fr) minmax(0, 1.32fr);
  gap: 16px;
  align-items: stretch;
  margin: 16px 0;
  overflow: hidden;
  border: 2px solid #9fe7ff;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(29, 83, 143, .94), rgba(5, 20, 58, .98));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.22), inset 0 -5px 0 rgba(0, 8, 28, .72), 0 6px 0 #061936, 0 14px 26px rgba(0, 0, 0, .4);
}
.mission-spellbook-art {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  border-right: 2px solid rgba(159, 231, 255, .78);
  background: #061634;
}
.mission-spellbook-art::after {
  position: absolute;
  inset: 7px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.58);
  box-shadow: inset 0 0 20px rgba(89, 222, 255, .35);
}
.mission-spellbook-art img,
.book-discovery-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.mission-spellbook-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 18px 20px 18px 0;
}
.mission-spellbook-copy .eyebrow { margin: 0 0 7px; color: #baf5ff; font-size: .72rem; }
.mission-spellbook-copy strong { color: #fff; font-size: clamp(1.12rem, 2vw, 1.48rem); line-height: 1.13; text-shadow: 0 2px 0 #071b3c, 0 0 12px rgba(102,220,255,.48); }
.quest-details .mission-spellbook-copy p { margin: 10px 0 16px; color: #e9f8ff; font-size: .94rem; line-height: 1.48; }
.mission-spellbook-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #dffaff;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(180deg, #4a86c4, #163e78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 3px 0 #061b43;
  font-weight: 900;
  text-decoration: none;
  text-shadow: 0 1px 1px #061b43;
}
.mission-spellbook-link:hover,.mission-spellbook-link:focus-visible { filter: brightness(1.18); transform: translateY(-1px); }
.book-discovery { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(180px, .65fr); gap: 20px; align-items: stretch; }
.book-discovery-copy { align-self: center; }
.book-discovery-cover { position: relative; min-height: 230px; margin: 0; overflow: hidden; border: 2px solid #6d9ab4; border-radius: 12px; background: #082051; box-shadow: inset 0 2px 0 rgba(255,255,255,.55), 0 5px 0 #6d8797; }
.book-discovery-cover::after { position: absolute; inset: 6px; content: ""; pointer-events: none; border: 1px solid rgba(255,255,255,.68); border-radius: 8px; }
@media (max-width: 760px) {
  .mission-spellbook { grid-template-columns: 1fr; }
  .mission-spellbook-art { min-height: 340px; border-right: 0; border-bottom: 2px solid rgba(159,231,255,.78); }
  .mission-spellbook-copy { padding: 18px; }
  .book-discovery { grid-template-columns: 1fr; }
  .book-discovery-cover { min-height: 320px; }
}

/* Premium diamond-blue gacha presentation */
body { background:radial-gradient(circle at 50% -15%,rgba(42,162,255,.18),transparent 42%),linear-gradient(180deg,rgba(1,8,24,.18),rgba(1,7,20,.62)); }
h1,h2,h3,.saga-books strong,.section-nav a strong { text-wrap:balance; }
.saga-landing-inner { position:relative; padding:clamp(12px,3vw,34px); }
.saga-landing-inner::before,.saga-landing-inner::after { position:absolute; top:20px; width:38px; height:38px; content:""; transform:rotate(45deg); border:1px solid rgba(119,232,255,.8); background:linear-gradient(135deg,rgba(232,251,255,.7),rgba(29,143,255,.18) 48%,rgba(6,28,65,.1)); box-shadow:0 0 24px rgba(57,213,255,.55); }
.saga-landing-inner::before { left:4px; }.saga-landing-inner::after { right:4px; }
.saga-landing h1,.hero h1 { color:var(--diamond-ice); text-shadow:0 1px 0 #fff,0 0 15px rgba(89,218,255,.85),0 8px 30px rgba(17,91,205,.5); }
.saga-landing h1 { letter-spacing:-.045em; }
.eyebrow,.saga-books span,.section-nav span { color:var(--diamond-blue); text-shadow:0 0 10px rgba(57,213,255,.55); letter-spacing:.14em; }
.saga-books { counter-reset:saga-book; gap:14px; }
.saga-books article { position:relative; overflow:hidden; min-height:104px; border-color:rgba(164,239,255,.76); background:linear-gradient(145deg,rgba(20,64,111,.94),rgba(5,20,47,.98)); box-shadow:inset 0 1px 0 rgba(255,255,255,.24),0 12px 32px rgba(0,0,0,.28); }
.saga-books article::after { position:absolute; right:-24px; bottom:-34px; width:90px; height:90px; content:""; transform:rotate(45deg); border:1px solid rgba(119,232,255,.2); background:rgba(57,213,255,.05); }
.saga-books article { cursor:pointer; }
.saga-books article:focus-visible,.saga-books article.is-selected { outline:3px solid #8edfff; outline-offset:3px; transform:translateY(-3px); box-shadow:inset 0 1px 0 #fff,0 5px 0 #617f93,0 12px 26px rgba(52,155,209,.32); }
.book-discovery { margin:18px auto 8px; padding:20px; border:2px solid #9ab7c9; border-radius:16px; background:linear-gradient(145deg,#f8fcfd,#d7e6ee 58%,#b5ccd9); color:#183b52; text-align:left; box-shadow:inset 0 1px 0 #fff,0 5px 0 #6f8797,0 12px 24px rgba(15,36,51,.2); }
.book-discovery h2 { margin:.2em 0 .35em; }
.book-discovery p:last-child { margin:0; color:#294e66; line-height:1.6; }
.saga-books span { min-width:44px; font-size:1.4rem; font-weight:950; }
.saga-books strong { color:var(--silver); font-size:1.04rem; text-shadow:0 1px 0 rgba(255,255,255,.22); }
.founder-offer { border-color:#e5f7ff; background:linear-gradient(110deg,rgba(108,140,167,.3),rgba(10,52,99,.94),rgba(40,151,220,.28)); box-shadow:inset 0 1px 0 #fff,0 0 32px rgba(61,201,255,.22); }
.founder-offer strong { color:var(--diamond-ice); text-shadow:0 0 14px rgba(84,222,255,.75); }
.founder-offer { user-select:none; background:linear-gradient(120deg,#527b9b 0%,#1a5785 48%,#2e9ed0 100%); border-color:#f5fdff; box-shadow:inset 0 1px 0 #fff,0 4px 0 #31566d,0 0 34px rgba(70,209,255,.34); }
.founder-offer span { color:#fff; font-weight:800; text-shadow:0 1px 2px #173d57; }
.saga-books article { transform:perspective(900px) rotateX(1deg); background:linear-gradient(145deg,rgba(218,241,250,.98),rgba(144,192,215,.98) 58%,rgba(79,139,172,.98)); border-width:2px; box-shadow:inset 0 2px 0 rgba(255,255,255,.95),inset 0 -10px 18px rgba(39,94,126,.18),0 5px 0 #6b899a,0 14px 24px rgba(0,34,61,.36); }
.saga-books article::before { position:absolute; left:16px; bottom:13px; width:28px; height:28px; content:""; transform:rotate(45deg); border:2px solid rgba(255,255,255,.62); border-radius:6px; background:linear-gradient(135deg,rgba(255,255,255,.75),rgba(65,158,205,.28)); box-shadow:0 0 14px rgba(255,255,255,.42); }
.saga-books article:hover,.saga-books article:focus-visible,.saga-books article.is-selected { transform:perspective(900px) rotateX(0deg) translateY(-6px) scale(1.015); box-shadow:inset 0 2px 0 #fff,0 7px 0 #4f7185,0 18px 30px rgba(39,147,206,.42); }
.saga-books article strong { position:relative; z-index:1; color:#173f59; text-shadow:0 1px 0 #fff,0 2px 0 rgba(67,102,120,.3); }
.preview-video-grid figure { border-color:rgba(185,241,255,.72); background:linear-gradient(155deg,rgba(22,61,105,.96),rgba(3,14,35,.98)); box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 18px 45px rgba(0,0,0,.36); }
.preview-video-grid figcaption { color:var(--diamond-ice); letter-spacing:.04em; }
.entry-splash { background:radial-gradient(circle,#0d3768,#020713 70%); }
.section-nav { position:sticky; top:8px; z-index:50; border:1px solid rgba(165,235,255,.42); background:rgba(3,16,38,.92); box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 16px 38px rgba(0,0,0,.4); backdrop-filter:blur(18px); }
.section-nav a { border-radius:10px; transition:background .18s ease,transform .18s ease,box-shadow .18s ease; }
.section-nav a:hover,.section-nav a[aria-current="location"] { transform:translateY(-1px); background:linear-gradient(145deg,rgba(41,156,230,.28),rgba(24,69,135,.4)); box-shadow:inset 0 0 0 1px rgba(119,232,255,.48),0 0 18px rgba(57,213,255,.16); }
.panel { border-color:rgba(132,210,243,.34); background:linear-gradient(155deg,rgba(9,33,68,.96),rgba(3,17,40,.96)); box-shadow:inset 0 1px 0 rgba(255,255,255,.09),var(--shadow); }
.pill,.badge { border:1px solid rgba(204,245,255,.65); color:var(--diamond-ice); background:linear-gradient(120deg,rgba(95,145,180,.28),rgba(19,100,172,.42)); box-shadow:inset 0 1px 0 rgba(255,255,255,.26); }
button.primary,button.special { border:1px solid rgba(220,250,255,.78); background:linear-gradient(135deg,#34d9ff 0,#1979ed 52%,#514bea 100%); box-shadow:inset 0 1px 0 rgba(255,255,255,.52),0 9px 25px rgba(16,107,229,.38); }
button.primary:hover,button.special:hover { filter:brightness(1.12); transform:translateY(-1px); }
.stat strong,.rate-grid strong { color:var(--diamond-ice); text-shadow:0 0 13px rgba(64,205,255,.5); }
@media(max-width:760px){.section-nav{top:0;overflow-x:auto;justify-content:flex-start}.section-nav a{min-width:96px}.saga-landing-inner::before,.saga-landing-inner::after{width:22px;height:22px}}
.training-target-summary { margin:12px 0; padding:12px 14px; border:1px solid #3ca9e8; border-radius:12px; background:#0b2347; color:#d7efff; }
.diamond-special-upgrade { margin: 14px 0; padding: 18px; border: 1px solid #8deaff; border-radius: 18px; background: radial-gradient(circle at 85% 10%, rgba(107,225,255,.24), transparent 34%), linear-gradient(145deg, #071a38, #123c72); box-shadow: inset 0 1px rgba(255,255,255,.35), 0 10px 28px rgba(0,8,35,.38); }
.visual-picker-fallback { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.training-character-picker { margin: 12px 0 16px; padding: 14px; border: 1px solid rgba(118,220,255,.72); border-radius: 16px; background: linear-gradient(145deg, rgba(5,20,48,.96), rgba(13,53,99,.96)); box-shadow: inset 0 1px rgba(255,255,255,.25), 0 8px 22px rgba(0,5,24,.4); }
.training-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: #edfbff; text-shadow: 0 2px 0 #0b3970, 0 0 12px #54d8ff; }
.training-character-search { display: grid; gap: 6px; margin: 0 4px 12px; color: #d8f6ff; font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.training-character-search input { width: 100%; min-height: 46px; padding: 10px 14px; color: #fff; caret-color: #fff3a5; border: 2px solid #67dfff; border-bottom-color: #1b6fb6; border-radius: 12px; outline: none; background: linear-gradient(180deg, #123d70, #071c3b); box-shadow: inset 0 2px 4px rgba(0,0,0,.38), 0 4px 0 #031329, 0 0 16px rgba(66,207,255,.22); font: inherit; text-transform: none; letter-spacing: normal; }
.training-character-search input::placeholder { color: #a8cce2; }
.training-character-search input:focus { border-color: #fff3a5; box-shadow: inset 0 2px 4px rgba(0,0,0,.38), 0 4px 0 #564d16, 0 0 22px rgba(88,224,255,.65); }
.training-character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 9px; max-height: 430px; overflow: auto; padding: 4px; scrollbar-color: #61d9ff #071a36; }
.training-character-card { position: relative; display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto auto; gap: 1px 8px; min-height: 68px; padding: 7px; overflow: hidden; text-align: left; color: #eaf9ff; border: 1px solid #4eaee8; border-radius: 12px; background: linear-gradient(145deg, #123b6b, #071a35); box-shadow: inset 0 1px rgba(255,255,255,.24), 0 4px 0 #041127, 0 7px 14px rgba(0,0,0,.28); transform: translateY(0); }
.training-character-card:hover, .training-character-card:focus-visible { transform: translateY(-2px); border-color: #b7f4ff; filter: brightness(1.12); }
.training-character-card.selected { border: 2px solid #fff2a5; background: linear-gradient(145deg, #176fab, #172d77); box-shadow: inset 0 1px #fff, 0 0 0 2px #59dfff, 0 4px 0 #092453, 0 0 24px rgba(82,218,255,.7); }
.training-character-avatar { grid-row: 1 / 4; width: 46px; height: 54px; object-fit: cover; border-radius: 9px; border: 2px solid #aeeeff; box-shadow: 0 0 10px #38aeea; }
.training-character-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; font-size: .76rem; color: #fff; text-shadow: 0 2px #0a2c59, 0 0 8px #6ee9ff; }
.training-character-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .61rem; color: #bdeaff; }
.training-character-copy { position: absolute; top: 4px; left: 35px; min-width: 20px; padding: 1px 4px; border-radius: 10px; background: #071225; border: 1px solid #c8f8ff; color: #fff; font-size: .58rem; font-weight: 900; text-align: center; }
.training-picker-empty { grid-column: 1 / -1; padding: 18px; text-align: center; }
.selected-character-stats { display: grid; grid-template-columns: 104px 1fr; gap: 12px 16px; margin: 14px 0; padding: 16px; border: 1px solid #76dcff; border-radius: 17px; background: linear-gradient(145deg, rgba(8,25,57,.98), rgba(14,61,108,.95)); box-shadow: inset 0 1px rgba(255,255,255,.3), 0 7px 0 #04142d, 0 12px 26px rgba(0,0,0,.35); }
.selected-stats-avatar { grid-row: 1 / 3; display: grid; place-items: center; min-height: 112px; }
.selected-character-avatar { width: 96px; height: 112px; object-fit: cover; border: 3px solid #c5f7ff; border-radius: 15px; box-shadow: 0 0 0 2px #1976bd, 0 0 22px #3fd6ff; }
.selected-stats-identity h3 { margin: 1px 0 4px; color: #fff; text-shadow: 0 3px #0a376b, 0 0 12px #6ce8ff; }
.selected-stats-identity span { color: #bcecff; font-size: .78rem; }
.selected-stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.selected-stats-grid > div { padding: 9px 10px; border: 1px solid rgba(151,230,255,.55); border-radius: 10px; background: rgba(2,15,38,.58); }
.selected-stats-grid span { display: block; color: #a9def5; font-size: .63rem; text-transform: uppercase; letter-spacing: .05em; }
.selected-stats-grid strong { display: block; margin-top: 2px; color: #fff; font-size: .85rem; text-shadow: 0 2px #0b3f7c, 0 0 8px #59ddff; }
.selected-xp-track { grid-column: 1 / -1; height: 9px; overflow: hidden; border: 1px solid #8deaff; border-radius: 999px; background: #031124; }
.selected-xp-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #188deb, #79efff, #fff1a2); box-shadow: 0 0 10px #66e5ff; transition: width .25s ease; }
@media (max-width: 600px) { .selected-character-stats { grid-template-columns: 74px 1fr; padding: 12px; } .selected-character-avatar { width: 68px; height: 82px; } .selected-stats-grid { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .training-character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 52vh; } .training-character-card { grid-template-columns: 40px 1fr; padding: 6px; } .training-character-avatar { width: 40px; height: 48px; } }
.diamond-special-upgrade h3 { margin: 2px 0 12px; color: #f7fdff; text-shadow: 0 2px #164a8f, 0 0 14px #58d8ff; }
.diamond-special-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.diamond-special-stats span { padding: 10px; border: 1px solid rgba(174,238,255,.55); border-radius: 12px; background: rgba(2,15,39,.58); color: #bfeeff; }
.diamond-special-stats strong { display: block; color: white; font-size: 1.08rem; }
@media (max-width: 620px) { .diamond-special-stats { grid-template-columns: 1fr; } }
.loot-actions { grid-column:2 / 4; display:flex; gap:8px; flex-wrap:wrap; }
.loot-actions button { min-width:96px; padding:8px 12px; }
.account-provider { min-height:54px; border-color:#72c8ff; background:#102d57; color:#fff; }
.account-email-row { grid-column:1/-1; display:grid; grid-template-columns:auto minmax(180px,1fr) auto; align-items:center; gap:10px; }
.account-email-row input { min-height:48px; padding:0 14px; border:1px solid #39709f; border-radius:10px; color:#fff; background:#07182f; }
.account-summary { margin:12px 0; padding:14px 16px; border:1px solid #39709f; border-radius:12px; color:#d9efff; background:#0a203e; }
@media(max-width:650px){.account-login{grid-template-columns:1fr}.account-email-row{grid-column:auto;grid-template-columns:1fr}.result-actions{flex-direction:column}}
.roster-power { color:var(--gold); font-size:1.25rem; }
.checklist { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: 12px; }
.checklist span { color: var(--muted); font-size: .65rem; }
.progression-target { max-width: 540px; margin-top: 15px; }
.progression-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0 2px; }
.progression-stats > div { display: grid; gap: 4px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .035); }
.progression-stats span { color: var(--muted); font-size: .65rem; }
.progression-stats strong { font-size: 1rem; }
#rainbow-power { color: var(--green); }
.awakening-result { margin-top: 11px; padding: 11px; border: 1px solid rgba(255, 227, 154, .42); border-radius: 11px; color: var(--white-gold); background: linear-gradient(100deg, rgba(20, 89, 184, .2), rgba(255, 220, 124, .08)); font-size: .72rem; }

@media (min-width: 600px) {
  .shell { width: min(1220px, calc(100% - 36px)); padding-top: 34px; }
  .status-panel { grid-template-columns: minmax(0, 1.4fr) minmax(200px, .6fr); align-items: start; padding: 22px; }
  .panel-intro { grid-column: 1 / -1; }
  .prime-callout { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; align-items: center; }
  .status-grid { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .save-actions, .save-help, .persistence-status, .save-log { grid-column: 1 / -1; }
  .rate-grid { grid-template-columns: repeat(4, 1fr); }
  .multi-grid { grid-template-columns: repeat(4, 1fr); }
  .roster-controls { grid-template-columns: 1.3fr .8fr 1fr; }
  .battle-squad { grid-template-columns: repeat(5, 1fr); }
  .team-strip { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .battle-panel { grid-column: 1 / -1; }
  .battle-panel, .campaign-panel, .progression-panel { padding: 22px; }
  .battle-panel .arena { min-height: 244px; }
  .campaign-panel { display: block; }
}

@media (max-width: 599px) {
  .shell { width: min(100% - 20px, 1220px); padding-top: 16px; }
  .hero { align-items: flex-start; flex-direction: column; gap: 13px; }
  .hero-meta { justify-items: start; }
  .nav-tab { min-width: 76px; min-height: 44px; padding-block: 10px; }
  .skip-link { min-height: 44px; }
  .battle-squad-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .battle-squad-heading small { text-align: left; }
  .run-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .puzzle-grid { grid-template-columns: repeat(4, minmax(44px, 1fr)); }
  .battle-metrics { grid-template-columns: 1fr; }
  .arena { grid-template-columns: 1fr; gap: 12px; }
  .versus { font-size: .68rem; }
  .cast-entry { grid-template-columns: 48px minmax(0, 1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
  .impact, .impact.flash { opacity: 0 !important; transform: none !important; }
}
.character-portrait,
.portrait-fallback {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  flex: 0 0 auto;
  border: 1px solid rgba(151, 202, 255, 0.55);
  border-radius: 0.8rem;
  background: linear-gradient(145deg, rgba(42, 65, 92, 0.92), rgba(9, 18, 31, 0.96));
  box-shadow: 0 0 1rem rgba(41, 137, 255, 0.18);
}

.character-portrait { object-fit: cover; object-position: center top; }
.character-portrait.portrait-rainbow { outline: 3px solid transparent; outline-offset: 2px; filter: saturate(1.25) hue-rotate(8deg); }
.portrait-fallback { padding: 0.45rem; overflow: hidden; place-content: center; text-align: center; font-size: 0.62rem; color: #d8e9ff; }
.roster-portrait { width: 7rem; height: 7rem; }
.team-portrait { width: 3.25rem; height: 3.25rem; }
.summon-portrait { width: 100%; height: auto; aspect-ratio: 1; }
.portrait-gallery { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: flex-start; }
.portrait-gallery .roster-portrait { width: 5.5rem; height: 5.5rem; }
.elio-attack-preview {
  display: grid;
  gap: 0.55rem;
}
.special-cast-cinema { position: fixed; inset: 0; z-index: 10000; display: grid; grid-template-rows: auto minmax(0, 1fr); width: 100vw; height: 100dvh; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: radial-gradient(circle at 50% 45%, #1b67bb 0%, #0a3974 48%, #071e48 100%); box-shadow: none; }
.summon-reveal-cinema { position:fixed; inset:0; z-index:11000; display:grid; grid-template-rows:auto minmax(0,1fr); width:100vw; height:100dvh; overflow:hidden; background:#030b1d; }
.summon-reveal-cinema[hidden] { display:none; }
.summon-reveal-heading { position:relative; z-index:3; display:grid; grid-template-columns:1fr auto; align-items:center; gap:7px 12px; min-height:76px; padding:10px 16px; color:#fff; background:rgba(2,12,34,.94); border-bottom:2px solid #60d8ff; }
.summon-reveal-heading > strong { font-size:1.05rem; }
.summon-reveal-heading > span { color:#9de7ff; font-weight:900; }
.summon-reveal-controls { grid-column:1 / -1; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.summon-reveal-controls button { min-height:46px; }
.summon-reveal-stage { position:relative; display:grid; place-items:center; min-height:0; overflow:hidden; background:radial-gradient(circle,#1659a6,#020817 72%); }
.summon-reveal-video { width:100%; height:100%; object-fit:contain; background:#020817; cursor:pointer; animation:summon-cinema-in .45s ease both; }
.summon-inline-cinema { display:grid; gap:8px; margin:12px 0 16px; padding:10px; border:3px solid #6edfff; border-radius:14px; background:linear-gradient(145deg,#173d78,#071a42 70%); box-shadow:inset 0 2px 0 #d8f9ff80, 0 6px 16px #02081780; }
.summon-inline-heading { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 12px; color:#fff; font-weight:900; }
.summon-inline-heading span { color:#b5efff; }
.summon-inline-video { display:block; width:100%; max-height:min(58vh,520px); border:2px solid #b7f4ff; border-radius:10px; background:#020817; object-fit:contain; box-shadow:0 0 24px #4fdcff73; }
.summon-inline-cinema small { color:#fff; font-weight:700; }
@keyframes summon-cinema-in { from { opacity:0; transform:scale(1.035); filter:brightness(1.7) saturate(.7); } to { opacity:1; transform:scale(1); filter:none; } }
.summon-revealed-card { position:absolute; inset:auto 14px 18px; z-index:2; display:grid; grid-template-columns:64px 1fr; align-items:center; gap:4px 12px; padding:12px 14px; border:2px solid #8edcff; border-radius:16px; color:#fff; background:rgba(2,14,39,.9); box-shadow:0 0 28px rgba(72,198,255,.5); }
.summon-revealed-card .summon-reveal-portrait { grid-row:1 / 3; width:64px; height:64px; border-radius:12px; }
.summon-revealed-card strong { font-size:1.05rem; }
.summon-revealed-card span { color:#bfe8ff; font-weight:800; }
.special-cast-cinema[hidden] { display: none; }
.special-cast-cinema-heading { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 12px; min-height: 54px; margin: 0; padding: 14px clamp(16px, 4vw, 52px); color: #f7fcff; background: linear-gradient(90deg, rgba(38, 122, 211, .96), rgba(194, 221, 241, .42), rgba(38, 122, 211, .96)); text-shadow: 0 1px 8px #0a3974; }
.special-cast-intro { display:grid; place-items:center; align-content:center; gap:10px; width:100%; height:100%; color:#fff; text-align:center; background:radial-gradient(circle,rgba(54,145,237,.65),rgba(2,11,31,.98) 68%); animation:cast-intro .9s ease both; }
.special-cast-intro-portrait { width:min(46vw,360px)!important; height:min(46vw,360px)!important; border:6px solid #bce9ff; border-radius:24px!important; box-shadow:0 0 55px rgba(78,184,255,.75); }
.special-cast-intro span { color:#8ed8ff; font-weight:1000; letter-spacing:.18em; }
.special-cast-intro strong { font-size:clamp(2rem,7vw,5rem); }
.special-cast-intro small { color:#dcecff; font-size:clamp(1rem,2vw,1.4rem); }
@keyframes cast-intro { from{opacity:0;transform:scale(.9)} 30%,78%{opacity:1;transform:scale(1)} to{opacity:0;transform:scale(1.05)} }
.fallback-cast-animation { animation:fallback-cast 2.15s ease both; }
.fallback-cast-animation .special-cast-intro-portrait { animation:fallback-portrait-power 1.1s ease-in-out infinite alternate; }
@keyframes fallback-cast { 0%{opacity:0;filter:brightness(.7)} 15%,82%{opacity:1;filter:brightness(1.15)} 100%{opacity:0;filter:brightness(1.8)} }
@keyframes fallback-portrait-power { from{transform:scale(.97);box-shadow:0 0 28px rgba(78,184,255,.55)} to{transform:scale(1.04);box-shadow:0 0 75px rgba(126,220,255,1)} }
@media(max-width:760px){.battle-squad{grid-template-columns:repeat(2,minmax(0,1fr))}.squad-unit:last-child{grid-column:1/-1}}

/* Full premium 3D interface pass */
:root {
  --depth-navy: #020a1b;
  --depth-blue: #073a74;
  --edge-ice: rgba(207, 248, 255, .92);
  --edge-blue: rgba(76, 215, 255, .72);
  --3d-panel-shadow: 0 2px 0 rgba(218, 248, 255, .14), 0 8px 0 rgba(1, 11, 31, .92), 0 18px 38px rgba(0, 2, 13, .55);
}

h1,
h2,
h3,
.section-heading strong,
.founder-offer strong,
.account-summary strong {
  letter-spacing: -.025em;
  color: #eefcff;
  text-shadow:
    0 1px 0 #dffaff,
    0 2px 0 #a5dcea,
    0 3px 0 #579fbd,
    0 4px 0 #236686,
    0 6px 0 #082b50,
    0 9px 13px rgba(0, 0, 0, .72),
    0 0 18px rgba(66, 214, 255, .34);
}

.saga-landing h1,
.hero h1 {
  text-shadow:
    0 1px 0 #ffffff,
    0 2px 0 #c8f3ff,
    0 3px 0 #86c8df,
    0 4px 0 #4991b2,
    0 5px 0 #205d82,
    0 7px 0 #082c53,
    0 11px 16px rgba(0,0,0,.76),
    0 0 22px rgba(66,214,255,.4);
}

.eyebrow,
.pill,
.badge,
.rarity,
.quest-status,
.section-nav a,
.collection-chip,
.loot-count {
  text-shadow: 0 1px 0 rgba(255,255,255,.52), 0 2px 0 rgba(17,77,113,.86), 0 4px 7px rgba(0,0,0,.7);
}

.panel,
.contract-card,
.prime-odds,
.rate-grid > div,
.stat,
.quest-details,
.collection-summary,
.result-card,
.progression-stats > div,
.training-target-summary {
  position: relative;
  border-top-color: var(--edge-ice);
  border-left-color: rgba(145, 229, 255, .68);
  border-right-color: rgba(23, 106, 163, .72);
  border-bottom-color: rgba(3, 31, 68, .96);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.12), inset 0 -3px 8px rgba(0,5,25,.38), var(--3d-panel-shadow);
  transform: translateZ(0);
}

.panel::after,
.contract-card::after,
.quest-details::after {
  position: absolute;
  inset: 5px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(179, 238, 255, .08);
  border-radius: inherit;
}

.section-nav {
  perspective: 900px;
  border-bottom: 4px solid #031936;
  box-shadow: inset 0 2px 0 rgba(230,250,255,.2), 0 6px 0 rgba(0,12,36,.92), 0 18px 34px rgba(0,0,0,.5);
}

.section-nav a {
  border: 1px solid transparent;
  border-bottom: 3px solid transparent;
  transform: translateY(0) rotateX(0deg);
}

.section-nav a:hover,
.section-nav a[aria-current="location"] {
  border-color: rgba(158, 235, 255, .5);
  border-bottom-color: #06264d;
  transform: translateY(-3px) rotateX(4deg);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.22), 0 5px 0 #031934, 0 10px 18px rgba(0,0,0,.38);
}

button,
.account-provider {
  position: relative;
  border-top-color: rgba(235,253,255,.92) !important;
  border-left-color: rgba(164,234,255,.78) !important;
  border-right-color: rgba(19,91,164,.92) !important;
  border-bottom: 5px solid #05275f !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.46), 0 2px 0 rgba(9,55,111,.9), 0 4px 8px rgba(0,0,0,.58);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.38), inset 0 -5px 10px rgba(0,24,88,.26), 0 7px 0 #021536, 0 13px 20px rgba(0,0,0,.38);
  transform: translateY(-2px);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

button:hover:not(:disabled),
.account-provider:hover:not(:disabled) {
  transform: translateY(-4px);
  filter: brightness(1.12) saturate(1.12);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.5), inset 0 -5px 10px rgba(0,24,88,.24), 0 9px 0 #021536, 0 17px 26px rgba(0,0,0,.45);
}

button:active:not(:disabled),
.account-provider:active:not(:disabled) {
  transform: translateY(4px);
  border-bottom-width: 2px !important;
  box-shadow: inset 0 2px 7px rgba(0,0,0,.38), 0 2px 0 #021536, 0 5px 9px rgba(0,0,0,.38);
}

.pill,
.badge,
.rarity,
.quest-status,
.collection-chip {
  border-top: 1px solid rgba(240,253,255,.92);
  border-left: 1px solid rgba(165,230,255,.7);
  border-right: 1px solid rgba(19,92,154,.82);
  border-bottom: 3px solid rgba(2,31,72,.98);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.28), inset 0 -4px 7px rgba(0,17,61,.28), 0 4px 0 rgba(0,13,38,.88), 0 8px 12px rgba(0,0,0,.28);
  transform: translateY(-1px);
}

.saga-books { perspective: 1200px; }
.saga-books article,
.preview-video-grid figure,
.loot-card,
.roster-card,
.team-slot,
.summon-character-card {
  border-top: 2px solid rgba(225,250,255,.88);
  border-left: 2px solid rgba(117,219,255,.7);
  border-right: 2px solid rgba(12,77,143,.9);
  border-bottom: 6px solid #031a3c;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.15), inset 0 -8px 16px rgba(0,8,35,.34), 0 8px 0 rgba(0,10,31,.92), 0 18px 30px rgba(0,0,0,.4);
  transform: translateY(-3px) rotateX(.4deg);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.saga-books article:hover,
.preview-video-grid figure:hover,
.loot-card:hover,
.roster-card:hover,
.summon-character-card:hover {
  z-index: 2;
  transform: translateY(-7px) rotateX(2deg) scale(1.012);
  filter: brightness(1.07);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.2), inset 0 -8px 16px rgba(0,8,35,.3), 0 12px 0 rgba(0,10,31,.94), 0 24px 38px rgba(0,0,0,.5), 0 0 24px rgba(54,201,255,.16);
}

select,
input {
  border-top: 2px solid rgba(222,248,255,.84);
  border-left: 2px solid rgba(120,210,240,.66);
  border-right: 2px solid rgba(13,72,126,.84);
  border-bottom: 4px solid #031a38;
  background: linear-gradient(180deg,#12365f,#071a37);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.28), 0 4px 0 rgba(0,10,30,.84), 0 8px 14px rgba(0,0,0,.25);
}

.hero,
.saga-landing-inner { perspective: 1200px; }
.hero-copy { transform: rotateX(.7deg); }
.hero-meta { filter: drop-shadow(0 7px 5px rgba(0,0,0,.55)); }
.exclusive-previews h2 { margin-bottom:22px; }

@media(max-width:760px) {
  h1,h2,h3 { text-shadow: 0 1px 0 #dffaff,0 2px 0 #579fbd,0 4px 0 #082b50,0 7px 10px rgba(0,0,0,.65),0 0 14px rgba(66,214,255,.3); }
  .panel,.contract-card,.prime-odds,.rate-grid>div,.stat,.quest-details,.collection-summary,.result-card { box-shadow: inset 0 1px 0 rgba(255,255,255,.12),0 5px 0 rgba(1,11,31,.9),0 12px 24px rgba(0,2,13,.48); }
  .saga-books article,.preview-video-grid figure,.loot-card,.roster-card,.team-slot,.summon-character-card { transform:translateY(-2px); box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 5px 0 rgba(0,10,31,.9),0 13px 22px rgba(0,0,0,.38); }
}

@media(prefers-reduced-motion:reduce) {
  button,.account-provider,.saga-books article,.preview-video-grid figure,.loot-card,.roster-card,.team-slot,.summon-character-card { transition:none; }
}

/* Unified training window and editable team controls */
.training-inventory { margin-top:24px; padding:20px; border:1px solid rgba(130,225,255,.55); border-bottom:5px solid #031a3c; border-radius:18px; background:linear-gradient(155deg,rgba(17,58,105,.86),rgba(4,18,43,.94)); box-shadow:inset 0 2px 0 rgba(255,255,255,.12),0 7px 0 rgba(0,10,31,.9),0 16px 28px rgba(0,0,0,.38); }
.training-inventory-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:8px; }
.training-inventory-heading h3,.training-inventory-heading p { margin:0; }
.team-heading-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-wrap:wrap; }
.remove-all-team { min-height:44px; padding:8px 18px; color:#fff; border-radius:12px; background:linear-gradient(135deg,#ff5077,#b71f65 55%,#63155f); box-shadow:inset 0 2px 0 rgba(255,255,255,.42),0 6px 0 #350b39,0 0 24px rgba(255,49,130,.72),0 13px 22px rgba(0,0,0,.42); animation:team-action-glow 1.8s ease-in-out infinite alternate; }
.remove-all-team:disabled { opacity:.45; animation:none; }
.remove-member { position:static; width:100%; min-height:36px; margin-top:5px; padding:6px 10px; border-radius:10px; color:#fff; background:linear-gradient(135deg,#ed4770,#861b57); font-size:.74rem; font-weight:900; }
@keyframes team-action-glow { from { filter:brightness(.95); } to { filter:brightness(1.18); } }
@media(max-width:650px){.training-inventory-heading,.team-heading{align-items:stretch;flex-direction:column}.team-heading-actions{justify-content:space-between}.remove-all-team{flex:1}}
@media(prefers-reduced-motion:reduce){.remove-all-team{animation:none}}
.special-cast-stage { position:relative; display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; overflow: hidden; border-radius: 0; background: linear-gradient(145deg, #0a3974, #277ccb 52%, #b6d3e8); }
.special-cast-video { display: block; width: 100vw; height: calc(100dvh - 54px); max-width: none; max-height: none; object-fit: contain; background: #0a3974; }
.special-cast-fallback { display: grid; place-items: center; align-content: center; gap: 18px; width: 100vw; height: calc(100dvh - 54px); min-height: 0; padding: 24px; color: #f7fcff; text-align: center; background: radial-gradient(circle, rgba(220, 239, 252, .34), rgba(25, 100, 178, .72)); animation: flash .8s ease-out; }
.special-cast-fallback .character-portrait { width: min(60vw, 420px); height: min(60vw, 420px); }
.special-cast-identity { position:absolute; left:clamp(14px,4vw,50px); bottom:clamp(14px,4vw,42px); z-index:3; display:flex; align-items:center; gap:14px; max-width:min(620px,calc(100vw - 28px)); padding:12px 18px; border:2px solid rgba(220,239,252,.75); border-radius:16px; color:#fff; background:rgba(3,18,48,.88); box-shadow:0 0 30px rgba(77,174,255,.45); }
.special-cast-identity > div { display:grid; gap:3px; }
.special-cast-identity span { color:#8ed8ff; font-size:.85rem; font-weight:950; letter-spacing:.12em; }
.special-cast-identity strong { font-size:clamp(1.1rem,3vw,1.65rem); }
.special-cast-identity small { color:#dcecff; font-size:.92rem; }
.special-cast-damage { display:block; margin-top:8px; color:#fff; font-size:clamp(1.3rem,4vw,2.5rem); font-weight:1000; letter-spacing:.04em; text-shadow:0 2px 8px #000,0 0 18px #5ec8ff; }
.special-cast-impact-damage { position:absolute; left:50%; top:42%; z-index:5; transform:translate(-50%,-50%); padding:.18em .38em; color:#fff; font-size:clamp(2.2rem,9vw,7rem); font-weight:1000; line-height:1; white-space:nowrap; text-shadow:0 5px 8px #000,0 0 18px #158cff,0 0 40px #fff; animation:damage-impact .7s ease-out both; pointer-events:none; }
@keyframes damage-impact { from{opacity:0;transform:translate(-50%,-50%) scale(2)} 35%{opacity:1} to{opacity:1;transform:translate(-50%,-50%) scale(1)} }
.loot-card { position:relative; display:grid; grid-template-columns:88px 1fr auto; grid-template-rows:auto auto; align-items:center; gap:3px 12px; min-width:240px; padding:10px 14px; text-align:left; border:2px solid #3ca9e8; border-radius:16px; background:linear-gradient(145deg,#173d70,#0b1f42); box-shadow:0 8px 22px rgba(0,0,0,.3); }
.loot-card img { grid-row:1 / 3; width:88px; height:88px; object-fit:contain; border-radius:14px; }
.loot-card strong { color:#fff; font-size:1.08rem; }
.loot-card small { color:#a9dfff; font-size:.9rem; }
.loot-count { color:#ffe36c; font-size:1.5rem; font-weight:1000; }
.inventory-empty { padding:22px; color:#b9d5ef; border:1px dashed #39709f; border-radius:14px; text-align:center; }
.special-cast-portrait { width:72px !important; height:72px !important; border-radius:50% !important; }
.special-cast-result { display:grid; place-items:center; gap:12px; width:100vw; height:calc(100dvh - 54px); color:#fff; text-align:center; background:radial-gradient(circle,rgba(37,120,215,.8),rgba(2,10,30,.98) 70%); }
.special-cast-result span { color:#fff; font-size:clamp(2rem,7vw,5rem); font-weight:1000; letter-spacing:.04em; text-shadow:0 3px 12px #000,0 0 22px #64bdff; }
.special-cast-result strong { color:#fff; font-size:clamp(7rem,25vw,18rem); line-height:.8; font-style:italic; text-shadow:10px 10px 0 #1675e8,0 0 36px #8ed8ff; animation:prime-ko-impact .45s ease-out both; }
.special-cast-result small { color:#bfe5ff; font-size:clamp(1rem,3vw,1.6rem); font-weight:900; letter-spacing:.18em; text-transform:uppercase; }

.elio-attack-video {
  display: block;
  width: 100%;
  max-height: 26rem;
  border: 1px solid rgba(111, 231, 255, 0.42);
  border-radius: 0.75rem;
  background: #020611;
  object-fit: contain;
}

/* Vertical-slice polish: odds, touch targets, feedback, and responsive hierarchy. */
.section-nav { position: sticky; top: 0; z-index: 20; scrollbar-width: thin; backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0, 4, 18, .34); }
.nav-tab[aria-current="location"] { color: var(--white-gold); border-color: rgba(255, 227, 154, .72); background: rgba(24, 96, 185, .46); }
.nav-tab[aria-current="location"] span { color: var(--white-gold); }
.rate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rate-grid > div { min-height: 9rem; padding: 1rem; border: 1px solid var(--line-strong); background: linear-gradient(145deg, rgba(37, 119, 220, .22), rgba(5, 21, 52, .72)); }
.rate-grid strong { font-size: clamp(2rem, 7vw, 3.6rem); line-height: 1; }
.rate-grid small { max-width: 14rem; font-size: .75rem; line-height: 1.35; }
.prime-odds { display: grid; gap: .35rem; margin: 1rem 0; padding: 1rem; border: 1px solid rgba(255, 227, 154, .56); border-radius: 14px; color: var(--white-gold); background: linear-gradient(105deg, rgba(30, 83, 180, .34), rgba(255, 213, 105, .08)); }
.prime-odds strong { font-size: 1rem; }
.prime-odds span { color: #dce9f6; font-size: .82rem; line-height: 1.55; }
.reward-log { display: grid; gap: .3rem; margin-top: .75rem; padding: 1rem; border: 1px solid rgba(255, 227, 154, .48); border-radius: 12px; background: linear-gradient(100deg, rgba(12, 73, 154, .3), rgba(255, 218, 112, .09)); }
.reward-log strong { color: var(--white-gold); font-size: .85rem; }
.reward-log span { color: #d4e3ef; font-size: .75rem; }
.team-member:focus-within, .mini-card:focus-within { border-color: var(--white-gold); }
.inspect-member { min-height: 36px; padding: 5px 8px; border-color: var(--line); background: rgba(17, 92, 177, .35); font-size: .65rem; }
.remove-member { min-width: 32px; min-height: 32px; color: #fff; border-radius: 999px; background: rgba(124, 22, 37, .82); }
.puzzle-node { min-height: 56px; font-size: 1.2rem; }
.puzzle-node:not(.solved):focus-visible { background: radial-gradient(circle, rgba(255, 244, 194, .35), rgba(8, 42, 94, .96)); }
.battle-actions button { flex: 1 1 10rem; }
.battle-actions .primary, .battle-actions .special { min-height: 52px; }
.inline-feedback, .controls-help, .battle-note, .event-profile, .battle-log { line-height: 1.55; }

@media (max-width: 720px) {
  html::before { width:100vw; background-position:center top; background-size:cover; }
  html::after { display:none; }
  body { font-size: 17px; }
  .section-nav { margin-inline: -10px; padding-inline: 10px; border-radius: 0; }
  .panel { padding: 16px; }
  .rate-grid > div { min-height: 7.5rem; }
  .roster-controls { grid-template-columns: 1fr; }
  .save-actions, .battle-actions { display: grid; grid-template-columns: 1fr; }
  .save-actions button, .battle-actions button, #summon-button, #puzzle-start, #add-to-team, #fill-team, #next-event { width: 100%; }
  .team-strip, .battle-squad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-member { min-height: 9rem; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: clamp(2rem, 14vw, 3rem); }
  .rate-grid { grid-template-columns: 1fr; }
  .multi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .puzzle-grid { grid-template-columns: repeat(3, minmax(52px, 1fr)); }
  .progression-stats, .run-steps { grid-template-columns: 1fr; }
  .campaign-summary { flex-direction: column; }
  .quest-browser { grid-template-columns:1fr; }
  .quest-details { position:static; min-height:0; }
}
.prime-ko-overlay { position:absolute; inset:0; z-index:8; display:grid; place-content:center; justify-items:center; gap:clamp(2px,.7vh,8px); min-width:0; min-height:0; padding:clamp(10px,2.5vw,24px); overflow:hidden; pointer-events:none; background:radial-gradient(circle,rgba(22,91,190,.42),rgba(2,10,30,.88) 68%); text-align:center; text-transform:uppercase; }
.puzzle-node.next { border-color:#67d7ff; background:#164f86; color:#fff; box-shadow:0 0 0 3px rgba(103,215,255,.3),0 0 18px rgba(103,215,255,.8); transform:translateY(-2px); }
.prime-ko-overlay[hidden] { display:none; }
.prime-ko-overlay.is-playing { animation:prime-ko-card 3.7s ease both; }
.prime-ko-overlay audio { display:none; margin-top:1rem; }
.prime-ko-overlay.needs-playback { pointer-events:auto; }
.prime-ko-overlay.needs-playback audio { display:block; }
.prime-ko-damage { display:block; max-width:100%; color:silver; font-weight:900; font-size:clamp(.78rem,2.2vw,1.45rem); line-height:1.15; letter-spacing:clamp(.02em,.3vw,.1em); overflow-wrap:anywhere; text-shadow:0 2px 8px #000,0 0 16px #fff; }
.prime-ko-title { display:block; color:white; font-size:clamp(3.2rem,9vw,6rem); line-height:.78; font-style:italic; text-shadow:clamp(3px,.5vw,7px) clamp(3px,.5vw,7px) 0 #1675e8,0 0 24px #74c9ff; }
.prime-ko-subtitle { display:block; max-width:100%; margin-top:clamp(2px,.5vh,7px); color:#9fd7ff; font-size:clamp(.65rem,1.6vw,1rem); font-weight:900; line-height:1.1; letter-spacing:clamp(.12em,.7vw,.3em); overflow-wrap:anywhere; text-shadow:0 2px 5px #000; }
@keyframes prime-ko-card { 0%,45%{opacity:0;transform:scale(1.16)} 55%,88%{opacity:1;transform:scale(1)} 100%{opacity:0;transform:scale(.98)} }
@keyframes prime-ko-impact { from{opacity:0;transform:scale(1.8)} to{opacity:1;transform:scale(1)} }

/* Pale metallic edition: premium depth without neon bloom. */
:root {
  color-scheme: light;
  --bg:#dce8ef;
  --bg-raised:#eef5f8;
  --panel:rgba(225,237,244,.96);
  --panel-soft:rgba(210,226,237,.94);
  --line:rgba(66,91,111,.34);
  --line-strong:rgba(57,87,111,.62);
  --text:#10283a;
  --muted:#526b7d;
  --blue:#56829f;
  --blue-deep:#315c78;
  --blue-soft:rgba(116,155,181,.18);
  --indigo:#607c94;
  --green:#397665;
  --gold:#8b7240;
  --white-gold:#fffdf5;
  --danger:#a33d45;
  --shadow:0 18px 40px rgba(12,31,45,.22),inset 0 1px 0 rgba(255,255,255,.9);
  --focus-ring:0 0 0 3px rgba(245,250,252,.98),0 0 0 6px #496f89;
  --diamond-blue:#557f9a;
  --diamond-ice:#f5fbfd;
  --silver:#dbe6ec;
  --silver-deep:#718899;
}
html { background:#d5e2e9; }
body { color:var(--text); background:linear-gradient(180deg,rgba(226,237,243,.38),rgba(196,214,225,.7)); }
html::before,html::after { background-image:none; filter:none; }

.panel,.run-guide,.start-playing,.status-panel,.quest-details,.roster-preview,.all-characters-browser,.legendary-roster-tab,.king-tier-leaderboard,.training-card,.progression-card {
  color:var(--text);
  border:1px solid #7893a5;
  background:linear-gradient(145deg,rgba(248,252,253,.97),rgba(204,220,230,.96));
  box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 rgba(61,83,98,.22),0 5px 0 #8096a4,0 14px 28px rgba(18,39,53,.2);
}
.section-nav {
  border:1px solid #738c9c;
  background:linear-gradient(180deg,rgba(247,251,252,.98),rgba(194,211,222,.98));
  box-shadow:inset 0 1px 0 #fff,0 4px 0 #788f9f,0 10px 22px rgba(14,35,49,.2);
  backdrop-filter:blur(10px);
}
.nav-tab { color:#29485d; text-shadow:none; }
.nav-tab span { color:#53758c; text-shadow:none; }
.nav-tab:hover,.nav-tab:focus-visible,.nav-tab[aria-current="location"] { color:#102d42; border-color:#667f90; background:linear-gradient(180deg,#f8fcfd,#b9cfdd); box-shadow:inset 0 1px 0 #fff,0 3px 0 #6e8797; }

button,.account-provider,.enter-game-button {
  color:#17354a;
  border:1px solid #607d91;
  background:linear-gradient(180deg,#f9fcfd 0%,#d7e5ec 45%,#aabfcd 100%);
  box-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 rgba(39,66,84,.28),0 4px 0 #6c8494,0 8px 14px rgba(20,43,58,.2);
  text-shadow:0 1px 0 rgba(255,255,255,.85);
}
button:hover,.account-provider:hover,.enter-game-button:hover { filter:brightness(1.03); transform:translateY(-1px); box-shadow:inset 0 1px 0 #fff,0 5px 0 #627b8b,0 10px 17px rgba(20,43,58,.24); }
button:active,.account-provider:active,.enter-game-button:active { transform:translateY(3px); box-shadow:inset 0 2px 5px rgba(28,51,67,.22),0 1px 0 #627b8b; }
button.primary,button.special,#summon-button,#puzzle-start { color:#fff; border-color:#385d76; background:linear-gradient(180deg,#789cb3,#527b96 52%,#365f7b); text-shadow:0 1px 2px #24475e; }

select,input,.select-wrap select,.training-search input {
  color:#173247;
  border:1px solid #6d8798;
  background:linear-gradient(180deg,#fbfdfe,#dce8ee);
  box-shadow:inset 0 2px 4px rgba(50,77,94,.16),0 1px 0 #fff;
}
select option { color:#173247; background:#edf4f7; }
.eyebrow,.saga-books span,.section-nav span { color:#476c84; text-shadow:0 1px 0 #fff; }
h1,h2,h3,.saga-books strong { color:#15384f; text-shadow:0 1px 0 #fff,0 2px 0 rgba(83,111,128,.28); }
.muted,.subtitle,.battle-note,.controls-help,.save-help,.roster-preview small,.owned-character-card span,.owned-character-card small { color:#506a7c; }

.rate-grid > div,.stat,.prime-callout,.prime-odds,.reward-log,.event-profile,.battle-metrics > div,.quest-book,.loot-card,.mini-card,.team-member,.team-slot,.summon-character-card,.owned-character-card,.saga-books article,.preview-video-grid figure {
  color:#17364b;
  border-color:#829aaa;
  background:linear-gradient(145deg,#f4f9fb,#cbdce6);
  box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 rgba(58,82,98,.2),0 3px 0 #8096a5,0 8px 16px rgba(19,42,57,.16);
}
.owned-character-card span,.owned-character-card small,.loot-card small,.prime-odds span,.reward-log span,.quest-book summary { color:#35566c; }
.owned-character-card b,.loot-count,.reward-log strong { color:#705b31; }
.legendary-diamond-card { border-color:#708b9e; background:linear-gradient(145deg,#f8fcfd,#bccfdb 48%,#8faaba); box-shadow:inset 0 1px 0 #fff,inset 0 0 18px rgba(255,255,255,.65),0 4px 0 #687f8f,0 10px 20px rgba(17,39,54,.2); }
.legendary-first-prize-card { border:4px solid #dff8ff; background:linear-gradient(145deg,#ffffff,#d8f4ff 24%,#91cfe9 55%,#eefcff 78%,#7faec8); box-shadow:inset 0 0 24px rgba(255,255,255,.95),0 0 0 3px rgba(112,207,242,.42),0 0 30px rgba(104,211,255,.8),0 8px 18px rgba(24,63,88,.28); }
.legendary-first-prize-card .character-portrait { filter:saturate(1.16) brightness(1.08) contrast(1.04); box-shadow:0 0 18px rgba(133,225,255,.95); }
.legendary-apex-card { box-shadow:inset 0 0 22px rgba(255,255,255,.82),0 0 22px rgba(104,203,242,.58),0 7px 16px rgba(24,63,88,.24); }
.legendary-diamond-card > span,.king-tier-reward-banner span { color:#244b65; text-shadow:0 1px 0 #fff; }
.king-tier-reward-banner { border-color:#738d9f; background:linear-gradient(145deg,#f7fbfc,#bfd2dd,#91aebe); box-shadow:inset 0 1px 0 #fff,0 4px 0 #6f8797,0 10px 20px rgba(15,36,51,.2); }
.king-tier-reward-banner strong { color:#17384f; text-shadow:0 1px 0 #fff; }
.king-tier-reward-banner b { color:#315e78; }

.arena { border-color:#728c9d; background:radial-gradient(ellipse at 50% 115%,rgba(115,148,169,.24),transparent 48%),linear-gradient(160deg,#e7f0f4,#b9cdd9); box-shadow:inset 0 2px 4px rgba(38,65,82,.17),0 3px 0 #7d94a3; }
.fighter span,.fighter small,.versus { color:#294b61; text-shadow:0 1px 0 #fff; }
.bar { border-color:#718a9b; background:#9db1bd; box-shadow:inset 0 2px 4px rgba(26,48,62,.25); }
.bar i { background:linear-gradient(90deg,#799bb1,#456f8b); box-shadow:none; }
.enemy-fighter .bar i,#enemy-hp { background:linear-gradient(90deg,#b46a6d,#8f3f47); }
.puzzle-node,.puzzle-node.next { color:#17394f; border-color:#718c9e; background:linear-gradient(180deg,#f6fafb,#b8cdd9); box-shadow:inset 0 1px 0 #fff,0 3px 0 #718998; }
.puzzle-panel { background:linear-gradient(150deg,#dceef8 0%,#b9d8e8 55%,#8fb9d0 100%); border-color:#d9f5ff; box-shadow:0 18px 42px rgba(18,73,111,.28), inset 0 1px 0 rgba(255,255,255,.85); }
.puzzle-panel h2,.puzzle-panel .eyebrow,.puzzle-panel .muted,.puzzle-panel .puzzle-start-status,.puzzle-panel .battle-log { color:#fff; text-shadow:0 1px 2px #28536c; }
.puzzle-panel .muted { color:#f8fdff; }
.puzzle-panel .puzzle-start-status,.puzzle-panel .battle-log { background:rgba(27,83,119,.72); border-color:rgba(255,255,255,.58); }
.puzzle-node.solved { color:#335166; border-color:#8296a3; background:linear-gradient(180deg,#fff,#d9e5eb); box-shadow:inset 0 1px 0 #fff,0 3px 0 #7b909e; }
.puzzle-node.next { color:#fff; border-color:#fff; background:linear-gradient(180deg,#3c9fd0,#176597); box-shadow:0 0 0 3px rgba(255,255,255,.52),0 8px 20px rgba(21,75,112,.45); }
#puzzle-start:disabled { opacity:.9; color:#eefaff; background:linear-gradient(180deg,#7c9caf,#5a7d92); }
.panel,.contract-card,.prime-odds,.rate-grid>div,.stat,.event-profile,.battle-metrics>div,.result-card,.collection-summary,.summon-character-card,.owned-character-card,.team-slot,.team-member,.loot-card,.quest-book,.training-card,.progression-card { background:linear-gradient(145deg,#e9f5fa 0%,#c7dfea 52%,#9dbbcd 100%); border-color:#f5fdff; box-shadow:inset 0 2px 0 rgba(255,255,255,.95),inset 0 -10px 18px rgba(43,91,117,.12),0 5px 0 #7893a1,0 14px 28px rgba(21,64,86,.26); }
.panel h2,.panel h3,.panel .section-heading h2,.panel .section-heading h3,.panel .eyebrow,.panel label,.panel p,.panel small,.panel span,.panel strong,.panel .muted { color:#fff; text-shadow:0 1px 2px #31566d; }
.panel h2,.panel h3,.panel .section-heading h2,.panel .section-heading h3 { background:linear-gradient(180deg,#fff 0%,#e8f7ff 45%,#abcddd 100%); -webkit-background-clip:text; background-clip:text; color:transparent; text-shadow:0 1px 0 rgba(255,255,255,.85),0 3px 0 rgba(72,111,132,.35); }
.section-nav { background:linear-gradient(145deg,#f2fbff,#c4dce8 58%,#94b5c7); border-color:#f7feff; box-shadow:inset 0 2px 0 #fff,0 5px 0 #758f9f,0 14px 28px rgba(22,66,89,.3); }
.section-nav a,.section-nav a strong,.section-nav a span { color:#fff; text-shadow:0 1px 2px #31566d; }
button.primary,button.secondary,button.special,#summon-button,#puzzle-start,#flow-to-roster,#flow-to-puzzle,#flow-play-quest,#next-event { background:linear-gradient(180deg,#eaf8ff 0%,#9ec5d9 52%,#5f8fa9 100%); color:#fff; border-color:#f4fdff; box-shadow:inset 0 2px 0 rgba(255,255,255,.95),0 4px 0 #547487,0 10px 18px rgba(25,83,112,.3); text-shadow:0 1px 2px #31566d; }
.panel,.panel p,.panel small,.panel span,.panel strong,.panel label,.panel .muted { color:#173b56; text-shadow:0 1px 0 rgba(255,255,255,.7); }
.panel h2,.panel h3,.panel .section-heading h2,.panel .section-heading h3 { color:#173b56; background:none; -webkit-background-clip:initial; background-clip:initial; text-shadow:0 1px 0 #fff,0 2px 0 rgba(77,112,130,.35); }
.panel h2,.panel h3,.panel .section-heading h2,.panel .section-heading h3 { color:#173b56 !important; -webkit-text-fill-color:#173b56 !important; }
#summon-heading,#puzzle-heading,#roster-heading,#team-heading,#campaign-heading,#battle-heading,#training-heading,#account-heading { color:#173b56 !important; -webkit-text-fill-color:#173b56 !important; background:transparent !important; -webkit-background-clip:border-box !important; background-clip:border-box !important; text-shadow:0 1px 0 #fff,0 2px 0 rgba(77,112,130,.35) !important; }
.summon-panel .section-heading h2,.summon-panel .section-heading .eyebrow,.summon-panel .muted { color:#173b56 !important; -webkit-text-fill-color:#173b56 !important; background:transparent !important; text-shadow:0 1px 0 #fff,0 2px 0 rgba(77,112,130,.35) !important; }
.summon-panel { background:linear-gradient(145deg,#203f73 0%,#142d59 55%,#0a1b3b 100%) !important; border-color:#8edfff !important; box-shadow:inset 0 2px 0 rgba(255,255,255,.28),0 7px 0 #07162f,0 18px 38px rgba(0,10,35,.55) !important; }
.summon-panel .section-heading h2,.summon-panel .section-heading .eyebrow,.summon-panel .muted,.summon-panel .section-heading .pill { color:#fff !important; -webkit-text-fill-color:#fff !important; text-shadow:0 1px 2px #061a3d !important; }
.summon-panel .contract-card,.summon-panel .rate-grid>div,.summon-panel .prime-odds,.summon-panel .result-card,.summon-panel .collection-summary { background:linear-gradient(145deg,#31598b,#1b3e70 58%,#102958) !important; border-color:rgba(164,239,255,.8) !important; color:#fff !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 4px 0 #081b3b,0 10px 18px rgba(0,10,35,.35) !important; }
.summon-panel .contract-card,.summon-panel .rate-grid>div,.summon-panel .prime-odds,.summon-panel .result-card,.summon-panel .collection-summary { border:3px solid #8fe4ff !important; border-radius:16px !important; box-shadow:inset 0 2px 0 rgba(255,255,255,.48),inset 0 -3px 8px rgba(2,18,55,.38),0 5px 0 #071b3c,0 12px 22px rgba(0,10,35,.42) !important; }
.summon-panel .result-card.empty { border-style:solid !important; }
.summon-panel .rate-grid>div { min-height:138px; }
.summon-panel .contract-card strong,.summon-panel .contract-card span,.summon-panel .rate-grid span,.summon-panel .rate-grid strong,.summon-panel .rate-grid small,.summon-panel .prime-odds strong,.summon-panel .prime-odds span,.summon-panel .result-card,.summon-panel .collection-summary strong,.summon-panel .collection-summary small { color:#fff !important; -webkit-text-fill-color:#fff !important; text-shadow:0 1px 2px #061a3d !important; }
.section-nav { background:linear-gradient(145deg,#263f78 0%,#142a58 58%,#0b1b3d 100%) !important; border-color:#75d9ff !important; box-shadow:inset 0 2px 0 rgba(255,255,255,.26),0 6px 0 #07162f,0 16px 30px rgba(0,8,30,.5) !important; }
.section-nav a,.section-nav a strong,.section-nav a span { color:#fff !important; -webkit-text-fill-color:#fff !important; text-shadow:0 1px 2px #061a3d !important; }
.hero-copy > .eyebrow { display:block; color:#173b56 !important; -webkit-text-fill-color:#173b56 !important; font-size:clamp(.9rem,1.7vw,1.18rem); font-weight:950; letter-spacing:.16em; line-height:1.35; text-shadow:0 1px 0 #fff,0 2px 0 rgba(255,255,255,.9),0 3px 0 rgba(62,100,122,.4) !important; }
.panel .eyebrow { color:#24536f; text-shadow:0 1px 0 #fff; }
.panel .pill,.panel .count-badge { color:#173b56; background:linear-gradient(180deg,#f5fcff,#b7d2df); border-color:#fff; text-shadow:0 1px 0 #fff; }
.summon-panel .stat,.summon-panel .rate-grid>div,.summon-panel .prime-callout,.summon-panel .result-card { color:#173b56; }

.prime-ko-overlay { background:radial-gradient(circle,#eaf2f6 0%,rgba(181,201,214,.96) 70%); }
.prime-ko-damage { color:#445c6d; text-shadow:0 1px 0 #fff; }
.prime-ko-title { color:#f8fbfc; text-shadow:5px 5px 0 #617f94,0 1px 0 #fff; }
.prime-ko-subtitle { color:#385e77; text-shadow:0 1px 0 #fff; }

/* The entry hit target is intentionally invisible; isolate it from every UI button skin. */
#entry-splash-button,
#entry-splash-button:hover,
#entry-splash-button:active,
#entry-splash-button:focus,
#entry-splash-button:focus-visible {
  all:unset;
  position:absolute;
  inset:0;
  z-index:5;
  display:block;
  box-sizing:border-box;
  cursor:pointer;
  touch-action:manipulation;
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
}
/* Premium inventory-grade 3D frames */
.panel, .contract-card, .rate-grid > div, .prime-odds, .result-card, .collection-summary, .stat, .book-card, .character-card, .mini-card, .battle-card, .founder-offer { border:2px solid #9fe7ff !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.9), inset 0 -3px 0 rgba(8,35,78,.75), 0 5px 0 #071b3c, 0 10px 22px rgba(3,18,48,.28) !important; border-radius:14px !important; }
.panel button, button.primary, button.secondary, .nav-tab, .book-card { text-shadow:0 1px 0 #fff, 0 2px 0 rgba(9,37,78,.75) !important; transition:transform .16s ease, filter .16s ease; }
.panel button:hover, button.primary:hover, button.secondary:hover, .nav-tab:hover, .book-card:hover { transform:translateY(-2px); filter:brightness(1.08); }
.panel button:active, button.primary:active, button.secondary:active, .nav-tab:active, .book-card:active { transform:translateY(2px); }
.summon-panel .rate-grid > div strong, .summon-panel .pill { color:#fff !important; -webkit-text-fill-color:#fff !important; }
/* Keep pale panels legible: indigo ink and explicit 3D frame on every section. */
main > .panel:not(.summon-panel), main > section.panel:not(.summon-panel) { border:3px solid #8fdfff !important; }
main > .panel:not(.summon-panel) h2, main > .panel:not(.summon-panel) h3,
main > .panel:not(.summon-panel) p, main > .panel:not(.summon-panel) span,
main > .panel:not(.summon-panel) small, main > .panel:not(.summon-panel) strong,
main > .panel:not(.summon-panel) label, main > .panel:not(.summon-panel) summary,
main > .panel:not(.summon-panel) .muted { color:#173b56 !important; -webkit-text-fill-color:#173b56 !important; text-shadow:0 1px 0 #fff !important; }
main > .panel:not(.summon-panel) button { color:#173b56 !important; -webkit-text-fill-color:#173b56 !important; }
.roster-grid > *, .available-characters > *, .quest-browser > *, .campaign-summary > *, .training-card > *, .progression-card > * { border:2px solid #9fe7ff !important; box-shadow:inset 0 1px 0 #fff, inset 0 -3px 0 rgba(8,35,78,.3), 0 4px 0 #7895a6, 0 9px 18px rgba(3,18,48,.22) !important; }

/* One intentionally small store: premium visual treatment, one protected offer. */
.store-panel { display:grid; gap:18px; }
.store-offer { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:clamp(14px,2.5vw,28px); padding:clamp(18px,3vw,30px); border:3px solid #8fe8ff; border-radius:18px; background:linear-gradient(135deg,#315b93 0%,#17376e 55%,#0d2450 100%); box-shadow:inset 0 2px 0 rgba(255,255,255,.48),inset 0 -6px 14px rgba(0,13,43,.45),0 6px 0 #071a3b,0 18px 30px rgba(4,20,60,.36); }
.store-offer h3,.store-offer p,.store-offer .eyebrow { color:#fff !important; -webkit-text-fill-color:#fff !important; text-shadow:0 2px 3px #061735 !important; }
.store-offer h3 { margin:0; font-size:clamp(1.5rem,3.6vw,2.4rem); }
.store-offer p { margin:.35rem 0 0; max-width:56ch; }
.store-offer-icon { display:grid; place-items:center; width:clamp(54px,8vw,78px); aspect-ratio:1; border:3px solid #d8f7ff; border-radius:50%; color:#fff; font-size:clamp(2rem,5vw,3.5rem); background:radial-gradient(circle at 35% 30%,#f8ffff 0%,#8edfff 20%,#2b86c1 53%,#102d63 100%); box-shadow:inset 0 2px 5px #fff,0 0 0 4px rgba(123,221,255,.3),0 8px 18px rgba(0,8,42,.55); text-shadow:0 2px 3px #07245a; }
.store-price { display:grid; justify-items:end; gap:3px; min-width:9rem; padding:14px 16px; border:2px solid #d8f7ff; border-radius:14px; background:linear-gradient(180deg,rgba(247,253,255,.98),rgba(165,215,236,.92)); box-shadow:inset 0 2px 0 #fff,0 4px 0 #0b2d62; }
.store-price strong { color:#173b71 !important; -webkit-text-fill-color:#173b71 !important; font-size:clamp(1.55rem,3vw,2.2rem); line-height:1; text-shadow:0 1px 0 #fff !important; }
.store-price span { color:#264e75 !important; -webkit-text-fill-color:#264e75 !important; font-size:.78rem; font-weight:900; text-transform:uppercase; letter-spacing:.07em; text-align:right; }
.store-actions { display:flex; flex-wrap:wrap; gap:12px; }
.store-actions button { min-height:56px; flex:1 1 17rem; font-size:1rem; font-weight:900; }
.store-status { min-height:1.6em; margin:0; font-weight:800; color:#173b56 !important; -webkit-text-fill-color:#173b56 !important; }
.store-note { color:#355b76 !important; -webkit-text-fill-color:#355b76 !important; }
@media (max-width: 620px) {
  .store-offer { grid-template-columns:auto 1fr; }
  .store-price { grid-column:1 / -1; justify-items:center; width:100%; }
  .store-price span { text-align:center; }
  .store-actions { display:grid; grid-template-columns:1fr; }
}

/* Each playable system remains a separate destination instead of sharing a column. */
.grid { grid-template-columns:minmax(0,1fr) !important; }
.grid > .panel { width:100%; margin:0; }
.temporary-admin-bar { position:fixed; top:76px; right:14px; z-index:1600; display:flex; align-items:center; gap:10px; max-width:min(680px,calc(100vw - 28px)); padding:10px 12px; border:2px solid #fff2a8; border-radius:14px; color:#fff; background:linear-gradient(135deg,rgba(45,20,78,.97),rgba(7,42,80,.97)); box-shadow:0 0 24px rgba(255,231,117,.5); }
.temporary-admin-bar[hidden] { display:none; }
.temporary-admin-bar strong { color:#fff2a8; }
.temporary-admin-bar span { font-size:.85rem; }
@media (max-width:700px) { .temporary-admin-bar { left:8px; right:8px; top:68px; flex-wrap:wrap; } }

.summon-equip { display: grid; gap: 12px; margin-block: 16px; }
.summon-equip h3, .summon-equip p { margin: 0; }
.summon-equip p:empty { display: none; }
.summon-equip-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.summon-equip button { min-width: 0; min-height: 44px; overflow-wrap: anywhere; }
.summon-equip > button { justify-self: start; }
@media (max-width: 650px) {
  .summon-equip > button { width: 100%; }
}

.collection-character { display: grid; align-content: start; gap: .3rem; padding: .65rem; border-radius: .6rem; font-size: .85rem; }
.collection-character .secondary { justify-self: start; margin-top: .2rem; }
