/* NEXOREIGN identity and supplied cinematic artwork, local rework 2026-11-11. */
body[data-active-screen="login"] .login-stage .brand-title.nexoreign-title {
  display: flex; flex-direction: column; gap: 0; width: min(420px, 84vw);
  height: auto; min-height: 0; margin: 0; letter-spacing: .28em; line-height: 1.2;
  animation: none; transform: none; filter: none;
}
.nexoreign-title img { display: block; width: 100%; height: auto; max-height: 106px; object-fit: contain; }
.nexoreign-title span { font-size: clamp(18px, 2.6vw, 23px); color: #e5f7ff; padding-left: .28em; }
body[data-active-screen="login"] .login-stage .app-mark { width: 56px; height: 56px; border: 0; background: none; box-shadow: none; }
.app-mark::before, .app-mark::after { display: none; }
body[data-active-screen="login"] .app-mark img, .app-mark.small img { width: 100%; height: 100%; border-radius: 14px; object-fit: contain; filter: none; }
.launch-emblem { background: none; border: 0; box-shadow: none; }
.launch-emblem img { width: 100%; height: 100%; object-fit: contain; }
.launch-splash h2 { font-size: clamp(17px, 4vw, 27px); letter-spacing: .06em; text-indent: 0; text-align: center; padding: 0 16px; line-height: 1.5; }
.remember-login { display: flex; align-items: center; gap: 8px; min-height: 36px; color: #cfe5ed; font-size: 13px; cursor: pointer; }
.remember-login input { width: 18px; height: 18px; accent-color: #7bd9ec; }
.remember-login span { margin-left: auto; color: #8ba4b3; font-size: 11px; }
.story-replay { border: 0; padding: 9px 18px; min-height: 40px; color: #badbe8; background: transparent; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.nexoreign-mail-icon { width: 100%; height: 100%; object-fit: contain; }
.nex-cinema {
  position: fixed; inset: 0; margin: 0; padding: 0; width: 100vw; height: 100dvh;
  max-width: none; max-height: none; border: 0; color: #e8f2f8; background: #030811;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif; overflow: hidden; overscroll-behavior: contain;
}
.nex-cinema[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.nex-cinema::backdrop { background: #030811; }
.nex-cinema::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #030811bb, #03081135 30%, #0308116b 70%, #030811e6), url("../../../assets/cinematics/story-background.png") center/cover; opacity: .84; }
.nex-cinema[data-phase="chapter"]::before { background-image: linear-gradient(180deg, #03081170, #03081130 40%, #030811b0), url("../../../assets/cinematics/chapter-background.png"); opacity: 1; }
.nex-cinema-header, .nex-cinema-controls { z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nex-cinema-header { padding: max(14px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 14px max(24px, env(safe-area-inset-left)); border-bottom: 1px solid #b9dce51a; background: #0308118c; }
.nex-cinema-header > span { font-size: 12px; letter-spacing: .12em; color: #b9d1df; }
.nex-cinema-header i { font-style: normal; opacity: .35; margin: 0 5px; }
.nex-cinema-header > div { display: flex; gap: 8px; }
.nex-cinema button { min-height: 44px; padding: 9px 20px; border: 1px solid #7cc8e642; background: #081a26c9; border-radius: 4px; color: #dceef7; font: inherit; font-size: 13px; cursor: pointer; }
.nex-cinema button:hover { border-color: #9ae1ee; background: #153042; }
.nex-cinema button:focus-visible, .nex-story-scroll:focus-visible, .story-replay:focus-visible { outline: 2px solid #bceaff; outline-offset: 3px; }
.nex-cinema button:disabled { opacity: .35; cursor: default; }
.nex-cinema button.nex-primary { color: #05141e; background: #bee8f5; border-color: #d0f3ff; font-weight: 700; padding-inline: 28px; }
.nex-cinema-scene { z-index: 1; position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.nex-cinema-controls { justify-content: center; flex-wrap: wrap; min-height: 80px; padding: 14px 24px max(18px, env(safe-area-inset-bottom)); background: #030811c9; border-top: 1px solid #b9dce51a; }
.nex-cinema-controls > span { color: #95b3c2; font-size: 12px; }
.nex-title-card { text-align: center; width: min(850px, 90%); text-shadow: 0 3px 20px #000; }
.nex-eyebrow { display: block; color: #b6d3df; font-size: 13px; letter-spacing: .22em; line-height: 2; }
.nex-title-card > img { display: block; width: min(680px, 100%); margin: 16px auto 0; }
.nex-title-card h1 { margin: 0 0 24px; font-size: clamp(26px, 4vw, 46px); letter-spacing: .12em; font-weight: 500; }
.nex-title-card p { line-height: 1.9; color: #c1d4e1; font-size: 15px; }
.nex-story-scroll { width: min(780px, 90%); height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #6a9dab66 transparent; mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.nex-story-scroll article { padding: 26vh 32px 32vh; text-align: center; color: #e8eff6; text-shadow: 0 2px 9px #000, 0 2px 28px #000; font-size: clamp(16px, 1.6vw, 22px); line-height: 2.1; }
.nex-story-scroll p { margin: 0 0 2em; white-space: pre-line; }
.nex-story-scroll .nex-story-end { font-size: 32px; letter-spacing: .3em; margin: 3em 0 0; }
.nex-scene-caption { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); text-align: center; z-index: 3; width: 90%; text-shadow: 0 2px 8px #000; }
.nex-scene-caption span { display: block; font-size: 12px; letter-spacing: .25em; color: #a6cbdc; }
.nex-scene-caption strong { display: block; margin-top: 7px; font-size: 14px; letter-spacing: .08em; font-weight: 400; }
.nex-leaders { display: flex; justify-content: space-between; align-items: flex-end; position: absolute; inset: 60px 8% 135px; }
.nex-leader { display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; width: 42%; height: 100%; margin: 0; opacity: .48; filter: saturate(.45); transition: opacity .35s, filter .35s; }
.nex-leader.speaking { opacity: 1; filter: saturate(1) drop-shadow(0 0 18px #5da6b522); }
.nex-portrait { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center bottom; }
.nex-nameplate { width: min(400px, 100%); height: auto; max-height: 104px; object-fit: contain; margin-top: -15px; z-index: 1; }
.nex-dialogue-text { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(900px, 88%); box-sizing: border-box; padding: 15px 24px; background: linear-gradient(90deg, #06121ee6, #101e2bed, #06121ee6); border-top: 1px solid #a4dcec66; box-shadow: 0 0 35px #0008; }
.nex-dialogue-text strong { font-size: 13px; color: #abd7e9; font-weight: 500; letter-spacing: .1em; }
.nex-dialogue-text p { margin: 9px 0 0; font-size: clamp(16px, 1.6vw, 21px); line-height: 1.7; min-height: 2.8em; }
.nex-chapter-card { text-align: center; padding: 26px; text-shadow: 0 2px 18px #000, 0 2px 40px #000; }
.nex-chapter-card p { font-size: 18px; color: #c7dce7; }
.nex-chapter-card i { display: block; margin: 32px auto; width: 80px; height: 1px; background: #bee1ed; }
.nex-chapter-card h1 { font-size: clamp(36px, 6vw, 66px); letter-spacing: .16em; margin: 0 0 16px; font-weight: 500; }
.nex-chapter-card h2 { font-size: clamp(20px, 3vw, 28px); font-weight: 400; letter-spacing: .25em; }
.nex-cinema[data-phase="battle"]::before { background: linear-gradient(#03081135, #03081122), url("../../../assets/planet-pages/planet_03.png.webp") right center / cover; opacity: 1; }
.nex-battle-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.nex-battle-caption { position: absolute; bottom: 10px; padding: 9px 20px; border: 1px solid #e4ba7533; background: #04101cc2; color: #f9e4c4; font-size: 13px; text-align: center; line-height: 1.8; }
.nex-suspended *, .nex-suspended *::before { animation-play-state: paused !important; }
@keyframes nex-key-press { 0% { transform: scale(.94); box-shadow: 0 0 18px #8cdeff99; } 100% { transform: scale(1); box-shadow: none; } }
.nex-key-feedback { animation: nex-key-press .18s ease-out; }
.nex-cinema button:active { transform: scale(.95); filter: brightness(1.3); }
@media (max-width: 600px) {
  .nex-cinema-header { padding: max(8px, env(safe-area-inset-top)) 12px 8px; gap: 5px; }
  .nex-cinema-header > span { font-size: 10px; letter-spacing: 0; }
  .nex-cinema-header i { margin: 0; }
  .nex-cinema button { padding: 8px 12px; font-size: 12px; }
  .nex-cinema-controls { gap: 8px; padding-inline: 12px; min-height: 70px; }
  .nex-cinema-controls > span { font-size: 10px; }
  .nex-cinema-controls button.nex-primary { padding-inline: 16px; }
  .nex-leaders { inset: 65px 0 190px; }.nex-leader { width: 50%; }
  .nex-nameplate { margin-top: -5px; }
  .nex-dialogue-text { width: 94%; bottom: 8px; padding: 14px; min-height: 145px; }
  .nex-dialogue-text p { font-size: 16px; }
  .nex-story-scroll { width: 96%; }.nex-story-scroll article { padding-inline: 22px; }
}
@media (max-height: 520px) and (min-width: 600px) {
  .nex-cinema-header { padding-block: 5px; }.nex-cinema-controls { min-height: 50px; padding-block: 5px; }
  .nex-leaders { inset: 8px 5% 70px; }.nex-leader { width: 32%; }
  .nex-nameplate { max-height: 58px; }.nex-scene-caption { top: 8px; }
  .nex-dialogue-text { bottom: 0; padding: 9px 18px; width: 80%; }
  .nex-dialogue-text p { font-size: 14px; line-height: 1.5; min-height: 1.5em; margin-top: 5px; }
  .nex-title-card > img { max-height: 100px; width: auto; max-width: 90%; }
  .nex-title-card h1 { margin-bottom: 10px; font-size: 27px; }
  .nex-chapter-card i { margin: 12px auto; }.nex-chapter-card h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .nex-cinema *, .nex-cinema *::before { animation: none !important; transition: none !important; }
}

.nexoreign-title span { font-weight: 500; text-shadow: 0 0 10px #8dd6ed55; }
.nex-portrait { transform: scaleX(-1); }

/* Story keeps a fixed reading pace; skipping unlocks after 30 active seconds. */
.nex-cinema::before { background: linear-gradient(90deg, #03081190 0%, #03081155 48%, #03081110 100%), url("../../../assets/cinematics/story-background.png") right center / cover; opacity: 1; }
.nex-story-scroll { overflow: hidden; touch-action: none; }
.nex-story-scroll article { font-family: "STKaiti", "KaiTi", "Songti SC", "Microsoft YaHei", serif; font-size: clamp(18px, 1.9vw, 24px); line-height: 2.15; color: #e7edf3; letter-spacing: .07em; text-shadow: 0 2px 9px #000, 0 0 20px #0a172c; }
.nex-story-scroll .nex-history-line { color: #ecd9ac; font-size: 1.12em; letter-spacing: .12em; text-shadow: 0 0 15px #dbb76a55, 0 3px 8px #000; }
.nex-story-scroll .nex-quote-line { font-size: 1.25em; color: #b8edff; text-shadow: 0 0 18px #57b6ef88, 0 3px 8px #000; }
.nex-story-scroll .nex-story-end { color: #eedbaa; font-weight: 500; }
.nex-dialogue-actions { display: flex; justify-content: flex-end; align-items: center; gap: 20px; margin-top: 12px; }
.nex-dialogue-actions > span { color: #87a5b5; font-size: 11px; letter-spacing: .12em; }
.nex-leaders { bottom: 192px; }
.nex-dialogue-text { min-height: 155px; }
@media (max-width: 600px) {
  .nex-leaders { bottom: 235px; }
  .nex-dialogue-text { min-height: 205px; }
  .nex-dialogue-text p { min-height: 4.5em; }
  .nex-dialogue-actions { margin-top: 8px; }
  .nex-story-scroll article { padding-inline: 24px; font-size: 18px; }
}
@media (max-height: 520px) and (min-width: 600px) {
  .nex-leaders { inset: 5px 1% 55px; }.nex-leader { width: 24%; }
  .nex-dialogue-text { width: 54%; min-height: 0; bottom: 5px; }
  .nex-dialogue-actions { margin-top: 5px; }
  .nex-dialogue-text p { min-height: 1.5em; font-size: 14px; }
}

.nex-cinema[data-phase="chapter"]::before { background-position: center; }

.nex-cinema [hidden] { display: none !important; }

.nex-replay { position:fixed;inset:0;width:min(1200px,100%);height:min(850px,100dvh);max-width:100vw;max-height:100dvh;margin:auto;padding:18px;box-sizing:border-box;border:1px solid #477884;border-radius:12px;background:#061017;color:#daedf1;overflow:auto; }
.nex-replay::backdrop {background:#02070cf2;}
.nex-replay header,.nex-replay footer {display:flex;align-items:center;gap:12px;justify-content:space-between;}
.nex-replay h2 {font-size:clamp(16px,2.5vw,25px);margin:6px 0;}.nex-replay h2 small {color:#78939c;font-size:13px;}
.nex-replay button {flex-shrink:0;min-height:44px;padding:8px 14px;border:1px solid #477884;border-radius:6px;color:#ecfaff;background:#17303b;cursor:pointer;}
.nex-replay-count,.nex-replay-note {font-size:12px;color:#93b7c2;line-height:1.6;overflow-wrap:anywhere;}
.nex-replay-scene {position:relative;width:100%;height:calc(100% - 195px);min-height:270px;background:radial-gradient(ellipse at 55% 45%,#20445980,transparent 65%),url('../../../assets/planet-pages/planet_03.png.webp') center/cover,#02060b;overflow:hidden;border:1px solid #1b414c;}
.nex-replay canvas {display:block;width:100%;height:100%;}.nex-replay footer {margin-top:14px;flex-wrap:wrap;}.nex-replay progress {flex:1;min-width:55px;accent-color:#6edce7;}.nex-replay [data-time] {font-size:12px;}
.nex-replay-result {position:absolute;inset:auto 0 25%;background:#07101edb;text-align:center;padding:20px;color:#ffe0a1;font-size:clamp(16px,3vw,24px);}.nex-replay [hidden] {display:none!important;}
.mail-battle-actions {flex-wrap:wrap;}.mail-battle-actions>button {min-width:0;flex:1 1 120px;}
@media(max-width:500px){.nex-replay{padding:10px;border-radius:0;}.nex-replay-scene{height:65%;}.nex-replay header{align-items:flex-start;}.nex-replay footer{gap:6px;}}
.nex-replay header > div { min-width:0; overflow-wrap:anywhere; }
.nex-replay-loading { position:absolute;inset:45% 10% auto;text-align:center;color:#c8eaf6;padding:12px;background:#08121bc9; }
.nex-replay button:focus-visible,.nex-cinema button:focus-visible { outline:2px solid #b4ecff;outline-offset:3px; }
.nex-replay button:disabled { opacity:.5;cursor:default; }
.nex-cinema-controls [data-action="skip-story"] { min-height:44px;border-color:#c6b28a;color:#ffe3b2; }
@media(max-height:520px) and (min-width:600px){.nex-replay{padding:8px 14px}.nex-replay-scene{min-height:160px;height:calc(100% - 158px)}.nex-replay h2{font-size:16px}.nex-replay-count,.nex-replay-note{margin:4px 0}.nex-replay footer{margin-top:6px}}

/* Portrait-first replay: the combat view owns all remaining screen space. */
.nex-replay { width: min(1200px,100vw); height: min(900px,100dvh); padding: 12px; overflow: hidden; }
.nex-replay[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 10px; }
.nex-replay header { min-width: 0; }
.nex-replay header > div > span { color: #8ca8b5; font-size: 10px; letter-spacing: .12em; }
.nex-replay h2 { margin: 4px 0; font-size: clamp(14px,2.5vw,23px); line-height: 1.45; }
.nex-replay h2 small { font-size: 11px; white-space: nowrap; }
.nex-replay-scene { height: 100%; min-height: 0; min-width: 0; box-sizing: border-box; }
.nex-replay footer { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; margin: 0; }
.nex-replay progress { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; align-self: start; margin-top: 9px; height: 5px; }
.nex-replay [data-time] { grid-column: 2; grid-row: 1; align-self: end; text-align: center; padding-bottom: 4px; font-size: 10px; }
.nex-replay [data-restart] { grid-column: 3; grid-row: 1; }
.nex-replay-result { inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 20px; background: radial-gradient(ellipse at center,#101924b8,#03080fd9); text-shadow: 0 2px 15px #000; }
.nex-replay-result img { display: block; width: min(60%,280px); max-height: 50%; object-fit: contain; filter: drop-shadow(0 0 22px #c49d4b50); }
.nex-replay-result strong { font-size: clamp(30px,7vw,48px); letter-spacing: .3em; padding-left: .3em; }
.nex-replay-result span { font-size: 12px; color: #c4d2df; overflow-wrap: anywhere; }
.nex-replay-result[data-outcome="defeat"] { color: #edaaa1; }
.nex-replay-result[data-outcome="defeat"] img { filter: drop-shadow(0 0 22px #bc392f50); }
@media(max-width:600px){.nex-replay{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));height:100dvh;border-radius:0;}.nex-replay header{gap:8px;align-items:center;}.nex-replay button{padding:7px 10px;}.nex-replay[open]{gap:7px;}}
