:root {
  --game-bg: #fff8ed;
  --game-ink: #241d2d;
  --game-muted: #716978;
  --game-red: #e83f5b;
  --game-yellow: #ffbd2e;
  --game-blue: #3c91e6;
  --game-green: #26a96c;
  --game-card: rgba(255, 255, 255, 0.94);
  --game-line: rgba(36, 29, 45, 0.12);
  --game-shadow: 0 18px 45px rgba(67, 45, 19, 0.14);
}

* { box-sizing: border-box; }
html {
  color-scheme: light;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  touch-action: manipulation;
  color: var(--game-ink);
  font-family: system-ui, -apple-system, "Noto Sans JP", "Yu Gothic", sans-serif;
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 189, 46, 0.28), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(60, 145, 230, 0.18), transparent 28rem),
    linear-gradient(160deg, #fff9ef, #fff 55%, #fff0f2);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button,
a,
summary,
label,
[role="button"],
input,
select,
textarea {
  touch-action: manipulation;
}
button,
[role="button"],
.clicker-hit-button {
  -webkit-tap-highlight-color: transparent;
}
.game-shell { width: min(1100px, calc(100% - 28px)); margin: auto; padding: 18px 0 64px; }
.game-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; margin-bottom: 18px; border: 1px solid var(--game-line);
  border-radius: 20px; background: rgba(255,255,255,.86); backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(36,29,45,.08);
}
.game-brand { font-weight: 950; text-decoration: none; letter-spacing: .03em; }
.game-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.game-nav a { padding: 8px 11px; border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 800; }
.game-nav a:hover { background: #fff0d2; }
.hero-card, .panel {
  border: 1px solid var(--game-line); border-radius: 24px; background: var(--game-card);
  box-shadow: var(--game-shadow);
}
.hero-card { overflow: hidden; padding: clamp(24px, 6vw, 58px); position: relative; }
.hero-card::after {
  content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -70px;
  border: 26px solid rgba(232,63,91,.1); border-radius: 50%; pointer-events: none;
}
.eyebrow { margin: 0 0 8px; color: var(--game-red); font-weight: 950; letter-spacing: .12em; font-size: 12px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(34px, 8vw, 68px); line-height: 1.02; letter-spacing: -.04em; }
h2 { margin: 0 0 16px; font-size: clamp(22px, 4vw, 32px); }
h3 { margin: 0 0 8px; }
.lead { max-width: 760px; margin: 18px 0 0; color: var(--game-muted); line-height: 1.85; }
.notice { padding: 14px 16px; border-radius: 14px; background: #fff6dc; border-left: 5px solid var(--game-yellow); line-height: 1.7; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.stat { padding: 16px; background: #fff; border: 1px solid var(--game-line); border-radius: 16px; }
.stat span { display: block; color: var(--game-muted); font-size: 12px; font-weight: 800; }
.stat strong { display: block; margin-top: 4px; font-size: 24px; }
.panel { padding: clamp(18px, 4vw, 30px); margin-top: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 11px 18px; border: 1px solid transparent; border-radius: 14px;
  font-weight: 900; text-decoration: none; cursor: pointer; transition: transform .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--game-red), #ff7043); box-shadow: 0 10px 20px rgba(232,63,91,.22); }
.btn-secondary { background: #fff; color: var(--game-ink); border-color: var(--game-line); }
.btn-blue { color: #fff; background: var(--game-blue); }
.btn-green { color: #fff; background: var(--game-green); }
.message { display: none; margin-top: 14px; padding: 13px 15px; border-radius: 13px; font-weight: 800; }
.message.show { display: block; }
.message.error { background: #ffe3e8; color: #8f1d32; }
.message.success { background: #e4f8ed; color: #126a40; }
.message.info { background: #e8f3ff; color: #1f5f9b; }
.card-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.game-card { position: relative; padding: 16px; border: 2px solid transparent; border-radius: 18px; background: #fff; box-shadow: 0 8px 18px rgba(36,29,45,.07); }
.game-card.selected { border-color: var(--game-red); background: #fff8fa; }
.game-card img { display: block; width: 100%; height: 170px; object-fit: contain; border-radius: 14px; background: #fff8ed; }
.game-card p { margin: 6px 0 0; color: var(--game-muted); line-height: 1.6; }
.tag { display: inline-flex; padding: 4px 8px; margin: 6px 5px 0 0; border-radius: 999px; background: #eeeaf2; font-size: 11px; font-weight: 900; }
.tag.premium { background: #fff0c5; color: #805600; }
.locked { opacity: .68; }
.stage-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 18px; }
.character-stage {
  position: relative; display: grid; place-items: center; min-height: 480px; overflow: hidden;
  border-radius: 24px; background: radial-gradient(circle, #fff 0 26%, #ffe4a8 80%);
  border: 2px solid rgba(255,189,46,.4);
}
.character-stage::before {
  content: "COMEDY STAGE"; position: absolute; top: 18px; color: rgba(36,29,45,.13);
  font-size: clamp(22px, 5vw, 58px); font-weight: 950; transform: rotate(-4deg);
}
.character-image { position: relative; z-index: 2; width: min(78%, 430px); max-height: 430px; object-fit: contain; filter: drop-shadow(0 18px 16px rgba(36,29,45,.2)); }
.effect { position: absolute; z-index: 4; pointer-events: none; font-size: 76px; font-weight: 950; opacity: 0; }
.effect.show { opacity: 1; }
.effect-harisen { right: -30px; top: 38%; transform: rotate(-18deg); }
.effect-tarai { top: -20px; }
.effect-essay { bottom: 20px; padding: 16px; font-size: 24px; background: #fff; border: 4px double #333; }
.animate-harisen_hit .character-image { animation: hitShake .55s ease; }
.animate-harisen_hit .effect-harisen { animation: harisen .55s ease; }
.animate-tarai_drop .character-image { animation: squash .7s ease; }
.animate-tarai_drop .effect-tarai { animation: tarai .7s ease; }
.animate-essay_popup .effect-essay { animation: essay .7s ease both; }
.animate-shake .character-image { animation: hitShake .5s ease; }
.animate-bounce .character-image { animation: bounce .7s ease; }
.animate-flash { animation: flash .45s ease; }
@keyframes hitShake { 20%,60% { transform: translateX(-22px) rotate(-4deg); } 40%,80% { transform: translateX(22px) rotate(4deg); } }
@keyframes harisen { from { transform: translateX(180px) rotate(-18deg); } 45% { transform: translateX(-80px) rotate(-18deg); } to { transform: translateX(0) rotate(-18deg); opacity: 0; } }
@keyframes tarai { from { transform: translateY(-160px); } 55% { transform: translateY(250px); } to { transform: translateY(230px); opacity: 0; } }
@keyframes squash { 50% { transform: scaleY(.82) translateY(32px); } }
@keyframes essay { from { transform: translateY(80px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bounce { 40% { transform: translateY(-45px); } 70% { transform: translateY(8px); } }
@keyframes flash { 50% { filter: brightness(1.8); } }
.result-box { min-height: 112px; padding: 16px; border-radius: 16px; background: #f7f3fa; }
.result-score { color: var(--game-red); font-size: 34px; font-weight: 950; }
.clicker { display: grid; place-items: center; min-height: 360px; text-align: center; }
.click-button { width: min(70vw, 250px); height: min(70vw, 250px); border: 0; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #ff7043, var(--game-red)); box-shadow: 0 16px 0 #a9213a, 0 25px 35px rgba(169,33,58,.25); font-size: 28px; font-weight: 950; cursor: pointer; }
.click-button:active:not(:disabled) { transform: translateY(10px); box-shadow: 0 6px 0 #a9213a; }
.click-count { font-size: 54px; font-weight: 950; }
.ranking-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--game-line); text-align: left; }
th { color: var(--game-muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 800; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--game-line); border-radius: 12px; background: #fff; color: var(--game-ink); }
textarea { min-height: 100px; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
.hidden { display: none !important; }
.premium-pitch { background: linear-gradient(135deg, #2d2440, #5e346c); color: #fff; }
.premium-pitch p { color: rgba(255,255,255,.78); }
.footer-note { margin-top: 28px; color: var(--game-muted); font-size: 12px; text-align: center; }

@media (max-width: 760px) {
  .game-header { align-items: flex-start; flex-direction: column; }
  .game-nav { justify-content: flex-start; }
  .grid.two, .grid.three, .dashboard, .stage-wrap, .form-grid { grid-template-columns: 1fr; }
  .dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .character-stage { min-height: 390px; }
  .actions .btn { flex: 1 1 150px; }
}

/* ===== Social game visual shell ===== */
.social-body {
  background:
    radial-gradient(circle at 12px 12px, rgba(255,255,255,.12) 0 2px, transparent 3px) 0 0/24px 24px,
    linear-gradient(145deg, #004ca9 0%, #0878db 42%, #5be2ff 100%);
}
.social-body::before,
.social-body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(12px);
  opacity: .28;
}
.social-body::before { left: -180px; top: 20%; background: #fff; }
.social-body::after { right: -160px; bottom: -120px; background: #d8ff6f; }
.social-shell { width: min(1380px, calc(100% - 24px)); padding-top: 12px; }
.game-console {
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 24px;
  background: #edf8ff;
  box-shadow: 0 0 0 3px #0754a7, 0 24px 70px rgba(0,28,88,.38);
}
.console-topbar {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 10px 18px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08), transparent 35%),
    linear-gradient(135deg, #0758bd, #0e7ddd);
  border-bottom: 4px solid #ffcf36;
}
.console-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: clamp(20px, 3vw, 35px);
  font-weight: 1000;
  font-style: italic;
  letter-spacing: -.07em;
  text-shadow:
    3px 3px 0 #bd203d,
    -2px -2px 0 #bd203d,
    0 5px 0 #6b1732;
}
.console-logo-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #d71945;
  background: linear-gradient(145deg, #fff8a7, #ffbd2e);
  border: 3px solid #fff;
  box-shadow: 0 3px 0 #a96100;
  text-shadow: none;
  transform: rotate(-7deg);
}
.console-statusbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #173d70;
  background: #fff;
  border: 2px solid #a6d4ff;
  box-shadow: inset 0 -3px 0 #e4f1ff;
  font-size: 13px;
  font-weight: 900;
}
.status-chip strong { color: #ed2558; font-size: 19px; }
.status-chip.sound { color: #202b3f; }
.switch-pill {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(#ff5c88, #e92057);
  font-size: 11px;
}
.console-content {
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(222,244,255,.75)),
    repeating-linear-gradient(135deg, transparent 0 16px, rgba(55,154,232,.06) 16px 18px);
}
.home-layout {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(380px, 1.45fr) minmax(220px, .72fr);
  gap: 12px;
}
.home-layout > *,
.expression-row > *,
.item-choice-grid > * { min-width: 0; }
.console-panel {
  overflow: hidden;
  border: 2px solid #59a7ee;
  border-radius: 15px;
  background: rgba(255,255,255,.96);
  box-shadow: inset 0 0 0 3px #e6f4ff, 0 5px 12px rgba(21,81,148,.15);
}
.console-panel + .console-panel { margin-top: 12px; }
.panel-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 13px;
  color: #fff;
  background: linear-gradient(180deg, #288eea, #0870cc);
  font-size: 17px;
  font-weight: 950;
  text-shadow: 0 2px 0 rgba(0,0,0,.16);
}
.panel-ribbon.pink { background: linear-gradient(180deg, #ff759a, #ee2e61); }
.panel-ribbon.gold { background: linear-gradient(180deg, #ffc73b, #e99400); }
.panel-inner { padding: 14px; }
.profile-rank {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 2px dashed #bedaf2;
  color: #1264bc;
  font-weight: 950;
}
.profile-rank-badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffdc49;
  box-shadow: inset 0 -4px 0 #e4a900;
}
.profile-number {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 8px;
  padding: 12px 4px;
  border-bottom: 2px dashed #bedaf2;
  color: #174d83;
  font-weight: 900;
}
.profile-number:last-child { border-bottom: 0; }
.profile-number strong { color: #ec2758; font-size: clamp(28px, 4vw, 42px); line-height: 1; }
.mission-card {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 12px;
  align-items: center;
}
.mission-thumb {
  display: grid;
  place-items: center;
  min-height: 100px;
  overflow: hidden;
  border-radius: 12px;
  background: radial-gradient(circle, #fff56e, #ff7c3e 58%, #db194d);
}
.mission-thumb img { width: 92px; height: 100px; object-fit: contain; }
.mission-card h3 { font-size: 18px; }
.mission-card p { margin: 4px 0; color: #3d4a59; font-size: 12px; line-height: 1.55; }
.mini-cta {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 5px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(#ff6f94, #e92358);
  border: 2px solid #fff;
  box-shadow: 0 3px 0 #b91842;
  text-decoration: none;
  font-size: 12px;
  font-weight: 950;
}
.ranking-mini table { font-size: 12px; }
.ranking-mini td { padding: 7px 5px; }
.rank-medal { color: #f4a900; font-size: 18px; font-weight: 1000; }
.rank-score { color: #1371cb; font-weight: 950; text-align: right; }
.main-stage {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  border: 3px solid #3995e6;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.95) 0 15%, transparent 16%),
    conic-gradient(from -8deg at 50% 48%, #6fb9f5 0 8deg, #f8fdff 8deg 18deg, #ffcf45 18deg 28deg, #f8fdff 28deg 38deg, #73bdf6 38deg 48deg, #f8fdff 48deg 58deg);
  box-shadow: inset 0 0 45px rgba(26,111,199,.25);
}
.main-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 0 38%, rgba(255,255,255,.32) 39% 40%, transparent 41%),
    linear-gradient(transparent 72%, rgba(0,93,185,.16));
  pointer-events: none;
}
.comic-burst {
  position: absolute;
  z-index: 2;
  top: 20%;
  right: 9%;
  color: #111;
  font-size: clamp(54px, 7vw, 100px);
  font-weight: 1000;
  letter-spacing: -.15em;
  transform: rotate(5deg);
  text-shadow: 5px 5px 0 #fff;
}
.stage-character {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  width: min(80%, 500px);
  max-height: 92%;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 12px rgba(5,57,111,.3));
}
.stage-arrow {
  position: absolute;
  z-index: 4;
  top: 46%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 64px;
  border: 0;
  border-radius: 18px;
  color: #3d2b00;
  background: linear-gradient(#ffe764, #ffb800);
  box-shadow: 0 5px 0 #b77800, 0 0 0 4px #fff;
  font-size: 38px;
  font-weight: 1000;
}
.stage-arrow.left { left: 14px; }
.stage-arrow.right { right: 14px; }
.selection-box { margin-top: 10px; }
.selector-title {
  padding: 8px 12px;
  color: #203b5c;
  background: linear-gradient(#f7fcff, #dcefff);
  border-bottom: 2px solid #69abe4;
  text-align: center;
  font-weight: 950;
}
.expression-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 9px;
}
.expression-card {
  position: relative;
  overflow: hidden;
  min-height: 86px;
  padding: 4px;
  border: 2px solid #72ade1;
  border-radius: 12px;
  background: linear-gradient(#fff, #e7f5ff);
  cursor: pointer;
  min-width: 0;
}
.expression-card.selected { border-color: #f12b63; box-shadow: 0 0 0 3px #ffd1de; }
.expression-card img { width: 100%; height: 64px; object-fit: contain; }
.expression-card span {
  display: block;
  color: #244a72;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}
.item-choice {
  min-width: 0;
  padding: 7px;
  border: 3px solid #69abe4;
  border-radius: 14px;
  background: linear-gradient(155deg, #fff, #e4f5ff);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px #fff;
}
.item-choice:nth-child(3n+1) { background: linear-gradient(145deg, #fff5c2, #ffb45b); border-color: #ed8e18; }
.item-choice:nth-child(3n+2) { background: linear-gradient(145deg, #e9fbff, #78d8fa); border-color: #329ed3; }
.item-choice:nth-child(3n) { background: linear-gradient(145deg, #f0ffe4, #8ed882); border-color: #4aab55; }
.item-choice.selected { outline: 4px solid #f3285e; transform: translateY(-2px); }
.item-choice:disabled { filter: grayscale(.5); opacity: .62; }
.item-choice img { width: 100%; height: 88px; object-fit: contain; }
.item-choice strong { display: block; color: #253c58; font-size: 14px; }
.punish-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(92%, 620px);
  min-height: 76px;
  margin: 14px auto 18px;
  border: 5px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ff557c 0%, #e51f50 62%, #b90d37 100%);
  box-shadow: 0 7px 0 #8f0b2c, 0 0 0 3px #ef3764, 0 14px 24px rgba(185,13,55,.25);
  font-size: clamp(25px, 4vw, 40px);
  font-weight: 1000;
  letter-spacing: .04em;
  text-shadow: 0 3px 0 #9e1233;
  cursor: pointer;
}
.punish-cta::before { content: "💥"; margin-right: 10px; filter: drop-shadow(0 2px 0 #9e1233); }
.punish-cta:disabled { filter: grayscale(.75); opacity: .65; }
.right-promo { padding: 10px; }
.right-promo-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  border-radius: 12px;
  background: radial-gradient(circle, #fff46c, #ff9a3d 55%, #e5285b);
}
.right-promo-art img { width: 130px; height: 145px; object-fit: contain; }
.right-promo-art strong {
  position: absolute;
  right: 4px;
  top: 8px;
  color: #122b4d;
  font-size: 26px;
  transform: rotate(-10deg);
  text-shadow: 2px 2px #fff;
}
.console-bottom-nav {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 3px solid #3b96e6;
  background: linear-gradient(#fff, #e6f3ff);
}
.console-bottom-nav a {
  display: grid;
  gap: 2px;
  place-items: center;
  min-height: 64px;
  padding: 7px 4px;
  color: #255a92;
  border-right: 1px solid #b6d9f5;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
}
.console-bottom-nav a:last-child { border-right: 0; }
.console-bottom-nav a:hover { color: #e51f50; background: #fff; }
.nav-icon { font-size: 21px; }
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,34,82,.72);
  backdrop-filter: blur(6px);
}
.game-modal.hidden { display: none; }
.result-modal-card {
  position: relative;
  width: min(620px, 100%);
  padding: 20px;
  border: 5px solid #fff;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #eef9ff);
  box-shadow: 0 0 0 4px #1585db, 0 24px 70px rgba(0,0,0,.35);
  text-align: center;
}
.result-modal-card::before,
.result-modal-card::after {
  content: "★";
  position: absolute;
  top: 18px;
  color: #ffc21c;
  font-size: 42px;
}
.result-modal-card::before { left: 20px; transform: rotate(-16deg); }
.result-modal-card::after { right: 20px; transform: rotate(16deg); }
.modal-close {
  position: absolute;
  right: -12px;
  top: -16px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 4px solid #e92859;
  border-radius: 50%;
  background: #fff;
  color: #202b3f;
  font-size: 28px;
  font-weight: 1000;
  cursor: pointer;
}
.result-visual {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 16px;
  align-items: end;
  margin-top: 10px;
  padding: 16px;
  border: 2px solid #bfdcf2;
  border-radius: 18px;
  background: #fff;
}
.result-visual img { width: 190px; max-height: 230px; object-fit: contain; }
.result-visual .result-score { font-size: clamp(48px, 9vw, 76px); }
.local-preview-note {
  margin: 8px 0 0;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1060px) {
  .home-layout { grid-template-columns: minmax(210px, .7fr) minmax(420px, 1.3fr); }
  .home-layout > .home-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .home-layout > .home-right .console-panel { margin-top: 0; }
}
@media (max-width: 760px) {
  .social-shell { width: min(100% - 20px, 620px); padding-top: 5px; }
  .game-console { border-width: 2px; border-radius: 17px; }
  .console-topbar { grid-template-columns: 1fr; gap: 7px; padding: 8px 10px; }
  .console-logo { font-size: 24px; }
  .console-statusbar { justify-content: flex-start; gap: 5px; }
  .status-chip { min-height: 32px; padding: 5px 8px; font-size: 10px; }
  .status-chip strong { font-size: 16px; }
  .console-content { padding: 7px; }
  .home-layout { display: flex; flex-direction: column; }
  .home-layout > .home-center { order: -1; }
  .home-layout > .home-right { display: grid; grid-template-columns: 1fr; }
  .main-stage { min-height: 430px; }
  .comic-burst { right: 6%; top: 17%; }
  .expression-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 7px; }
  .expression-card { padding: 2px; }
  .expression-card:nth-child(n+4) { display: none; }
  .item-choice img { height: 70px; }
  .punish-cta { min-height: 66px; font-size: 29px; }
  .console-bottom-nav { grid-template-columns: repeat(3, 1fr); }
  .console-bottom-nav a { border-bottom: 1px solid #b6d9f5; }
  .result-visual { grid-template-columns: 1fr; }
  .result-visual img { margin: auto; }
}

/* ===== Nexus UI: modern dark social-game skin ===== */
.nexus-body {
  --nx-bg: #050b14;
  --nx-panel: rgba(13, 25, 43, .74);
  --nx-panel-strong: rgba(10, 19, 34, .92);
  --nx-line: rgba(160, 190, 230, .17);
  --nx-text: #edf5ff;
  --nx-muted: #8294ab;
  --nx-blue: #55a8ff;
  --nx-cyan: #53e0ff;
  --nx-gold: #d9b765;
  --tier-color: #8fa3ba;
  margin: 0;
  min-height: 100vh;
  color: var(--nx-text);
  background: var(--nx-bg);
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  overflow-x: hidden;
}
.nexus-body[data-user-tier="free"] { --tier-color: #52adff; }
.nexus-body[data-user-tier="paid"] { --tier-color: #e5bd61; }
.nexus-body[data-user-tier="admin"] { --tier-color: #b58cff; }
.nexus-bg {
  position: fixed; inset: 0; z-index: -3; overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(35,90,145,.24), transparent 34%),
    linear-gradient(145deg, #06101e 0%, #081525 48%, #030811 100%);
}
.nexus-grid {
  position: absolute; inset: 0; opacity: .18;
  background-image:
    linear-gradient(rgba(90,150,210,.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90,150,210,.11) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 80%, transparent);
  animation: gridDrift 24s linear infinite;
}
.nexus-orb { position: absolute; width: 52vw; aspect-ratio: 1; border-radius: 50%; filter: blur(90px); opacity: .17; }
.orb-a { left: -18%; top: -25%; background: #1c82e8; animation: orbFloat 16s ease-in-out infinite alternate; }
.orb-b { right: -20%; bottom: -35%; background: #20b9ba; animation: orbFloat 20s ease-in-out infinite alternate-reverse; }
.particle { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #a8ddff; box-shadow: 0 0 10px #68bfff; opacity: .5; animation: particleRise 12s linear infinite; }
.p1 { left: 18%; top: 80%; }.p2 { left: 46%; top: 62%; animation-delay: -4s }.p3 { left: 76%; top: 86%; animation-delay: -8s }.p4 { left: 90%; top: 55%; animation-delay: -2s }
@keyframes gridDrift { to { transform: translateY(70px); } }
@keyframes orbFloat { to { transform: translate3d(8vw, 8vh, 0) scale(1.15); } }
@keyframes particleRise { 0% { transform: translateY(20vh); opacity:0 } 20% { opacity:.6 } 100% { transform: translateY(-90vh); opacity:0 } }

.glass { background: var(--nx-panel); border: 1px solid var(--nx-line); box-shadow: 0 18px 60px rgba(0,0,0,.24); backdrop-filter: blur(20px); }
.glass-dark { background: rgba(4,12,23,.72); border: 1px solid rgba(181,207,239,.16); backdrop-filter: blur(14px); }
.nexus-app { width: min(1500px, 100%); min-height: 100vh; margin: auto; padding: 14px clamp(14px, 2vw, 28px) 28px; }
.nexus-header {
  position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 76px; padding: 12px 16px 12px 20px; border-radius: 18px;
}
.nexus-brand { display: flex; align-items: center; gap: 12px; color: var(--nx-text); text-decoration: none; }
.brand-sigil {
  display: grid; place-items: center; width: 46px; height: 46px; overflow:hidden; border-radius: 14px;
  color: #06111f; background: linear-gradient(145deg, #eef8ff, #75c8ff);
  box-shadow: 0 0 0 1px #c8e9ff, 0 8px 28px rgba(62,162,255,.28);
  font-size: 22px; font-weight: 1000;
}
.brand-sigil img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 42%;
}
.nexus-brand b { display:block; font-size: clamp(17px, 2vw, 24px); letter-spacing: .02em; }
.nexus-brand small { display:block; margin-top:2px; color:var(--nx-muted); font-size:9px; letter-spacing:.24em; }
.account-cluster { display:flex; align-items:center; justify-content:flex-end; gap:9px; flex-wrap:wrap; }
.tier-badge {
  display:flex; align-items:center; gap:8px; min-height:38px; padding:7px 12px;
  border:1px solid color-mix(in srgb, var(--tier-color) 55%, transparent); border-radius:999px;
  color:var(--tier-color); background:color-mix(in srgb, var(--tier-color) 9%, rgba(4,12,23,.75));
  font-size:11px; font-weight:950; letter-spacing:.12em;
}
.tier-badge i { width:8px; height:8px; border-radius:50%; background:var(--tier-color); box-shadow:0 0 12px var(--tier-color); }
.account-login-chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:38px;
  padding:7px 12px;
  border:1px solid rgba(255,255,255,.34);
  border-radius:999px;
  color:#fff3f8;
  background:
    linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.035)),
    linear-gradient(180deg,rgba(196,62,118,.82),rgba(99,37,86,.86));
  box-shadow:0 4px 9px rgba(0,20,50,.17),inset 0 1px rgba(255,255,255,.22),inset 0 -1px rgba(31,4,29,.22);
  font-size:11px;
  font-weight:900;
  line-height:1;
  text-decoration:none;
  white-space:nowrap;
}
.account-login-chip i {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#ffd9ec;
  box-shadow:0 0 6px rgba(255,178,218,.68);
}
.resource-pill { display:flex; align-items:baseline; gap:8px; min-height:40px; padding:8px 13px; border:1px solid var(--nx-line); border-radius:12px; background:rgba(4,12,23,.55); }
.resource-pill small { color:var(--nx-muted); font-size:10px; }.resource-pill strong { font-size:18px; }
.resource-pill.accent strong { color:var(--nx-cyan); }
.icon-button { display:grid; place-items:center; width:42px; height:42px; padding:0; border:1px solid var(--nx-line); border-radius:12px; color:var(--nx-text); background:rgba(4,12,23,.62); text-decoration:none; cursor:pointer; font-size:20px; }

.nexus-layout { display:grid; grid-template-columns:82px minmax(520px,1fr) 300px; gap:16px; margin-top:16px; }
.side-rail { display:flex; flex-direction:column; gap:10px; }
.rail-action {
  position:relative; display:grid; place-items:center; gap:6px; min-height:86px; padding:10px 5px;
  color:var(--nx-muted); border:1px solid var(--nx-line); border-radius:16px; background:rgba(10,22,39,.6);
  text-decoration:none; backdrop-filter:blur(14px); transition:.2s ease;
}
.rail-action span { font-size:24px; }.rail-action b { font-size:10px; }.rail-action:hover,.rail-action.active { color:var(--nx-text); border-color:rgba(85,168,255,.5); background:linear-gradient(145deg,rgba(38,113,184,.32),rgba(12,27,47,.78)); transform:translateY(-2px); }
.rail-action em { position:absolute; right:-5px; top:-5px; padding:3px 5px; border-radius:6px; color:#fff; background:#eb456a; font-size:8px; font-style:normal; }
.hero-zone { min-width:0; }
.world-scene {
  position:relative; min-height:clamp(500px,58vh,730px); overflow:hidden;
  border:1px solid var(--nx-line); border-radius:24px; background:
    radial-gradient(ellipse at 50% 78%, rgba(41,134,194,.22), transparent 32%),
    linear-gradient(180deg,rgba(17,40,66,.85),rgba(5,14,26,.96));
  box-shadow:inset 0 0 80px rgba(0,0,0,.5),0 24px 60px rgba(0,0,0,.2);
}
.scene-horizon { position:absolute; inset:45% -10% -35%; border-radius:50% 50% 0 0; background:radial-gradient(ellipse at top,rgba(58,142,206,.28),transparent 50%); }
.scene-rings { position:absolute; left:50%; bottom:-22%; width:95%; aspect-ratio:1; transform:translateX(-50%) rotateX(68deg); border:1px solid rgba(91,181,241,.32); border-radius:50%; box-shadow:0 0 0 60px rgba(56,146,209,.035),0 0 0 120px rgba(56,146,209,.025); animation:ringPulse 5s ease-in-out infinite; }
.scene-light { position:absolute; left:50%; top:4%; width:52%; height:82%; transform:translateX(-50%); background:linear-gradient(to bottom,rgba(109,195,255,.14),transparent); clip-path:polygon(42% 0,58% 0,100% 100%,0 100%); animation:lightSweep 7s ease-in-out infinite alternate; }
.event-card { position:absolute; z-index:5; left:20px; top:20px; width:min(270px,38%); padding:15px; border-radius:14px; }
.overline { display:block; color:var(--nx-blue); font-size:9px; font-weight:950; letter-spacing:.2em; }
.event-card strong { display:block; margin-top:7px; font-size:17px; }.event-card small { display:block; margin-top:5px; color:var(--nx-muted); line-height:1.5; }
.progress-track { height:4px; margin-top:13px; overflow:hidden; border-radius:9px; background:rgba(255,255,255,.1); }.progress-track i { display:block; height:100%; background:linear-gradient(90deg,var(--nx-blue),var(--nx-cyan)); box-shadow:0 0 9px var(--nx-blue); }
.character-aura { position:absolute; z-index:1; left:50%; bottom:10%; width:58%; aspect-ratio:1; transform:translateX(-50%); border-radius:50%; background:radial-gradient(circle,rgba(84,180,248,.22),rgba(38,110,180,.05) 48%,transparent 70%); animation:auraPulse 4s ease-in-out infinite; }
.nexus-character,.battle-character { position:absolute; z-index:3; left:50%; bottom:0; width:min(58%,510px); max-height:86%; object-fit:contain; transform-origin:50% 92%; filter:drop-shadow(0 26px 24px rgba(0,0,0,.45)); }
.nexus-character,.battle-character { left:0; right:0; margin-inline:auto; }
.idle-character { animation:characterIdleCentered 4.5s ease-in-out infinite; }
.character-shadow { position:absolute; z-index:2; left:50%; bottom:2%; width:38%; height:6%; transform:translateX(-50%); border-radius:50%; background:rgba(0,0,0,.55); filter:blur(12px); animation:shadowIdle 4.5s ease-in-out infinite; }
.character-identity { position:absolute; z-index:5; left:22px; bottom:22px; max-width:310px; padding:16px 18px; border-left:2px solid var(--nx-gold); background:linear-gradient(90deg,rgba(4,12,23,.82),transparent); }
.character-identity .rarity { color:var(--nx-gold); font-size:9px; letter-spacing:.2em; }.character-identity h1 { margin:3px 0; font-size:clamp(32px,5vw,58px); font-weight:650; letter-spacing:.08em; }.character-identity p { margin:0; color:#a6b4c5; font-size:12px; }
@keyframes characterIdle { 0%,100% { transform:translateX(-50%) rotate(-.6deg) translateY(0) scale(1) } 50% { transform:translateX(-50%) rotate(.7deg) translateY(-8px) scale(1.012) } }
@keyframes characterIdleCentered { 0%,100% { transform:rotate(-.6deg) translateY(0) scale(1) } 50% { transform:rotate(.7deg) translateY(-8px) scale(1.012) } }
@keyframes shadowIdle { 0%,100% { transform:translateX(-50%) scaleX(1); opacity:.55 } 50% { transform:translateX(-50%) scaleX(.92); opacity:.4 } }
@keyframes auraPulse { 50% { transform:translateX(-50%) scale(1.08); opacity:.72 } }
@keyframes ringPulse { 50% { opacity:.55; transform:translateX(-50%) rotateX(68deg) scale(1.04) } }
@keyframes lightSweep { to { transform:translateX(-45%) skewX(5deg); opacity:.65 } }

.command-deck,.action-console { margin-top:14px; padding:18px; border-radius:20px; }
.deck-head { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-bottom:14px; }
.deck-head h2 { margin:3px 0 0; font-size:20px; }.deck-head a,.intel-card a { color:var(--nx-blue); text-decoration:none; font-size:11px; font-weight:850; }.deck-head small { color:var(--nx-muted); }
.modern-item-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.modern-item {
  position:relative; display:grid; grid-template-columns:72px 1fr; grid-template-rows:auto auto; align-items:center; gap:0 12px;
  min-width:0; min-height:104px; padding:12px; overflow:hidden; color:var(--nx-text); border:1px solid var(--nx-line); border-radius:15px;
  width:100%; font:inherit; text-align:left; background:linear-gradient(145deg,rgba(23,40,62,.92),rgba(8,18,32,.94)); text-decoration:none; cursor:pointer; transition:.2s ease;
}
.modern-item::after { content:""; position:absolute; inset:auto -25px -40px auto; width:100px; height:100px; border-radius:50%; background:var(--item-glow,#4aa8ff); opacity:.09; filter:blur(6px); }
.modern-item.orange { --item-glow:#ff9c55 }.modern-item.cyan { --item-glow:#50d9ff }.modern-item.green { --item-glow:#66d495 }
.modern-item.purple { --item-glow:#b775ff }.modern-item.red { --item-glow:#ff5f55 }
.modern-item.gold { --item-glow:#ffd56a }
.modern-item img { grid-row:1/3; width:72px; height:72px; object-fit:contain; border-radius:12px; background:color-mix(in srgb,var(--item-glow) 10%,rgba(255,255,255,.03)); }
.modern-item strong { align-self:end; font-size:14px; }.modern-item small { align-self:start; margin-top:3px; color:var(--nx-muted); font-size:10px; }
.item-level { position:absolute; right:8px; top:7px; color:color-mix(in srgb,var(--item-glow) 80%,white); font-size:7px; font-weight:950; letter-spacing:.12em; }
.modern-item:hover,.modern-item.selected { border-color:color-mix(in srgb,var(--item-glow) 65%,white); transform:translateY(-3px); box-shadow:0 10px 30px color-mix(in srgb,var(--item-glow) 12%,transparent); }
.modern-item.locked {
  cursor:not-allowed;
  filter:saturate(.6) brightness(.78);
  opacity:.76;
}
.modern-item.locked:hover { transform:none; box-shadow:none; }
.modern-item .tag {
  position:absolute;
  right:8px;
  bottom:7px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  min-height:18px;
  margin:0;
  padding:3px 7px;
  border:1px solid rgba(218,178,96,.45);
  border-radius:2px;
  color:#efd696;
  background:rgba(9,13,19,.86);
  font-size:8px;
  font-weight:900;
  line-height:1;
  letter-spacing:.04em;
  white-space:nowrap;
}
.modern-item .tag.premium { color:#ffe29a; background:rgba(80,53,17,.9); }
.modern-item .tag.member-lock { color:#d8c5ff; border-color:rgba(183,117,255,.45); background:rgba(33,22,48,.9); }
.nexus-primary {
  display:flex; align-items:center; justify-content:space-between; width:100%; min-height:58px; margin-top:14px; padding:0 22px;
  color:#fff; border:1px solid rgba(102,192,255,.55); border-radius:14px; background:linear-gradient(135deg,#176fc0,#1b94d6);
  box-shadow:inset 0 1px rgba(255,255,255,.22),0 12px 32px rgba(18,115,193,.24); text-decoration:none; font-weight:900; cursor:pointer; transition:.2s;
}
.nexus-primary:hover { filter:brightness(1.12); transform:translateY(-2px); }.nexus-primary i { font-style:normal; font-size:20px; }
.stage-punish-button {
  position:absolute;
  z-index:12;
  right:24px;
  bottom:24px;
  display:grid;
  place-content:center;
  justify-items:center;
  width:112px;
  height:112px;
  padding:12px;
  border:1px solid rgba(154,220,255,.72);
  border-radius:50%;
  color:#fff;
  background:
    radial-gradient(circle at 35% 25%,rgba(255,255,255,.28),transparent 24%),
    linear-gradient(145deg,#20a6e6,#1264b4 66%,#0c417e);
  box-shadow:
    inset 0 0 0 5px rgba(5,25,48,.3),
    inset 0 1px 0 rgba(255,255,255,.45),
    0 0 0 4px rgba(47,152,221,.12),
    0 14px 34px rgba(0,65,126,.48);
  font:inherit;
  line-height:1;
  cursor:pointer;
  transition:transform .2s ease,filter .2s ease,box-shadow .2s ease;
}
.stage-punish-button::after {
  content:"";
  position:absolute;
  inset:8px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:inherit;
  pointer-events:none;
}
.stage-punish-button:hover {
  filter:brightness(1.12);
  transform:translateY(-3px) scale(1.025);
  box-shadow:inset 0 0 0 5px rgba(5,25,48,.3),0 18px 42px rgba(0,101,184,.58);
}
.stage-punish-button:active { transform:translateY(1px) scale(.97); }
.stage-punish-button:focus-visible { outline:3px solid #b8e9ff; outline-offset:4px; }
.stage-punish-button:disabled { cursor:wait; filter:saturate(.55); opacity:.78; transform:none; }
.stage-punish-button strong { margin-top:5px; font-size:15px; letter-spacing:.05em; }
.stage-punish-button small { margin-top:3px; color:#d7f2ff; font-size:10px; font-weight:900; letter-spacing:.18em; }
.stage-punish-icon { font-size:22px; text-shadow:0 0 14px rgba(206,243,255,.9); }
#play { scroll-margin-top:16px; }
.intel-column,.battle-intel { display:flex; flex-direction:column; gap:12px; }
.account-card,.intel-card,.battle-sidebar { padding:16px; border-radius:18px; }
.account-top { display:flex; gap:12px; align-items:center; }.tier-emblem { display:grid; place-items:center; min-width:60px; height:60px; padding:0 8px; border:1px solid color-mix(in srgb,var(--tier-color) 60%,transparent); border-radius:16px; color:var(--tier-color); background:color-mix(in srgb,var(--tier-color) 8%,rgba(4,12,23,.8)); font-size:10px; font-weight:950; letter-spacing:.08em; box-shadow:inset 0 0 20px color-mix(in srgb,var(--tier-color) 8%,transparent); }
.account-top span { display:block; font-weight:900; }.account-top small,.battle-tier small { display:block; margin-top:4px; color:var(--nx-muted); font-size:10px; line-height:1.4; }
.account-stats { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:14px; }.account-stats div,.battle-stat { padding:11px; border:1px solid var(--nx-line); border-radius:12px; background:rgba(4,12,23,.42); }.account-stats small,.battle-stat span { display:block; color:var(--nx-muted); font-size:9px; }.account-stats b,.battle-stat strong { display:block; margin-top:3px; color:var(--tier-color); font-size:22px; }
.account-card > p { color:var(--nx-muted); font-size:10px; }.account-cta { display:flex; justify-content:center; padding:10px; border:1px solid color-mix(in srgb,var(--tier-color) 45%,transparent); border-radius:10px; color:var(--tier-color); background:color-mix(in srgb,var(--tier-color) 8%,transparent); text-decoration:none; font-size:11px; font-weight:900; }
.intel-title { display:flex; justify-content:space-between; align-items:center; }.intel-title span { font-size:10px; letter-spacing:.15em; color:var(--nx-muted); }
.modern-ranking { margin:10px 0 0; padding:0; list-style:none; }.modern-ranking li { display:grid; grid-template-columns:24px 1fr auto; gap:8px; align-items:center; padding:9px 0; border-bottom:1px solid rgba(255,255,255,.06); font-size:11px; }.modern-ranking li:last-child { border-bottom:0 }.modern-ranking i { color:var(--nx-gold); font-style:normal }.modern-ranking b { color:var(--nx-blue) }
.intel-card h3 { margin:6px 0; font-size:15px; }.intel-card p { margin:5px 0 10px; color:var(--nx-muted); font-size:11px; line-height:1.6; }
.promo-card { background:linear-gradient(145deg,rgba(26,74,112,.5),rgba(10,23,40,.86)); }.premium-card { border-color:rgba(217,183,101,.28); background:linear-gradient(145deg,rgba(75,56,24,.35),rgba(10,19,34,.88)); }.premium-card .overline,.premium-card a { color:var(--nx-gold); }
.news-ticker { display:grid; grid-template-columns:auto auto 1fr; gap:13px; align-items:center; margin-top:14px; padding:12px 16px; border-radius:14px; font-size:11px; }.news-ticker>span { color:var(--nx-blue); font-weight:950; letter-spacing:.16em }.news-ticker p { margin:0; color:var(--nx-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.nexus-mobile-nav { display:none; }

/* Battle screen */
.battle-layout { display:grid; grid-template-columns:220px minmax(500px,1fr) 260px; gap:16px; margin-top:16px; }
.battle-sidebar { align-self:start; }.battle-tier { display:grid; justify-items:center; gap:8px; padding:18px 0; text-align:center; }.battle-stat { margin-top:8px; }.battle-sidebar .account-cta { margin-top:14px; }
.battle-main { min-width:0; }.battle-stage { position:relative; min-height:clamp(510px,61vh,720px); overflow:hidden; border:1px solid var(--nx-line); border-radius:24px; background:radial-gradient(circle at 50% 70%,rgba(27,101,153,.22),transparent 35%),linear-gradient(180deg,#10253d,#050c16); box-shadow:inset 0 0 90px rgba(0,0,0,.6); }
.battle-character { width:min(62%,520px); max-height:88%; }
.stage-label { position:absolute; z-index:6; left:20px; top:18px; padding:12px 15px; border-left:2px solid var(--nx-blue); background:linear-gradient(90deg,rgba(4,12,23,.8),transparent); }.stage-label span { display:block; color:var(--nx-blue); font-size:8px; letter-spacing:.2em }.stage-label b { display:block; margin-top:3px; font-size:25px; }
.stage-hud { position:absolute; z-index:7; right:18px; bottom:18px; display:flex; align-items:center; gap:9px; padding:9px 12px; border:1px solid rgba(87,184,243,.3); border-radius:999px; background:rgba(4,12,23,.68); color:#a9bed2; font-size:9px }.stage-hud i { width:7px; height:7px; border-radius:50%; background:#5df0c1; box-shadow:0 0 10px #5df0c1; animation:statusBlink 1.5s infinite }.mission-list { display:grid; gap:9px; margin:12px 0 0; padding:0; list-style:none }.mission-list li { display:flex; align-items:center; gap:9px; color:#a9b8c8; font-size:11px }.mission-list i { display:grid; place-items:center; width:22px; height:22px; border:1px solid var(--nx-line); border-radius:7px; color:var(--nx-blue); font-style:normal }
@keyframes statusBlink { 50% { opacity:.35 } }

/* Punishment animations */
.action-stage.animate-harisen_hit::after,.action-stage.animate-tarai_drop::after,.action-stage.animate-essay_popup::after,.action-stage.animate-whip_strike::after,.action-stage.animate-punch_hit::after,.action-stage.animate-surprise_cannon::after {
  content:""; position:absolute; z-index:8; inset:0; pointer-events:none; background:radial-gradient(circle at 50% 48%,rgba(255,255,255,.9),rgba(80,180,255,.28) 12%,transparent 35%); animation:impactFlash .7s ease-out both;
}
.character-stage.animate-harisen_hit .battle-character,.character-stage.animate-harisen_hit .stage-character { animation:nexusHit .72s cubic-bezier(.2,.8,.2,1) }
.character-stage.animate-tarai_drop .battle-character,.character-stage.animate-tarai_drop .stage-character { animation:nexusDrop .85s cubic-bezier(.2,.8,.2,1) }
.character-stage.animate-essay_popup .battle-character,.character-stage.animate-essay_popup .stage-character { animation:nexusReflect .9s ease }
.character-stage.animate-whip_strike .battle-character,.character-stage.animate-whip_strike .stage-character { animation:nexusHit .72s cubic-bezier(.2,.8,.2,1) }
.character-stage.animate-punch_hit .battle-character,.character-stage.animate-punch_hit .stage-character { animation:nexusPunch .8s cubic-bezier(.2,.8,.2,1) }
.character-stage.animate-surprise_cannon .battle-character,.character-stage.animate-surprise_cannon .stage-character { animation:nexusDrop .85s cubic-bezier(.2,.8,.2,1) }
.nexus-body .effect { z-index:10; color:#fff; font-size:clamp(34px,6vw,76px); font-style:italic; letter-spacing:.08em; text-shadow:0 0 25px #4fb9ff,3px 3px 0 #102b48; }
.nexus-body .effect-harisen,.nexus-body .effect-tarai,.nexus-body .effect-essay,.nexus-body .effect-whip,.nexus-body .effect-punch,.nexus-body .effect-surprise { left:50%; right:auto; top:30%; bottom:auto; transform:translateX(-50%); }
@keyframes impactFlash { from { opacity:1; transform:scale(.2) } to { opacity:0; transform:scale(2) } }
@keyframes nexusHit { 0% { transform:translateX(0) rotate(0) } 20% { transform:translateX(4%) rotate(4deg) scale(.96) } 45% { transform:translateX(-5%) rotate(-7deg) scale(1.03) } 70% { transform:translateX(2%) rotate(3deg) } 100% { transform:translateX(0) } }
@keyframes nexusDrop { 0% { transform:translateY(0) scaleY(1) } 38% { transform:translateY(25px) scaleY(.86) } 62% { transform:translateY(-13px) scaleY(1.05) } 100% { transform:translateY(0) } }
@keyframes nexusReflect { 0%,100% { transform:translateY(0) } 35% { transform:rotate(-2deg) translateY(8px) } 65% { transform:rotate(2deg) translateY(8px) } }
@keyframes nexusPunch { 0% { transform:translateX(0) scale(1) } 24% { transform:translateX(-8%) rotate(-6deg) scale(1.04) } 58% { transform:translateX(3%) rotate(3deg) scale(.98) } 100% { transform:translateX(0) scale(1) } }
.nexus-result { color:var(--nx-text); border-color:rgba(91,179,241,.4); background:linear-gradient(145deg,rgba(15,32,52,.98),rgba(5,13,24,.99)); box-shadow:0 0 0 1px rgba(117,199,255,.15),0 30px 100px rgba(0,0,0,.6); }
.nexus-result .result-visual { color:var(--nx-text); border-color:var(--nx-line); background:rgba(255,255,255,.035) }.nexus-result .result-score { color:var(--nx-cyan) }

@media (max-width:1180px) {
  .nexus-layout { grid-template-columns:72px minmax(480px,1fr) 260px }.battle-layout { grid-template-columns:minmax(500px,1fr) 250px }.battle-sidebar { display:none }
}
@media (max-width:900px) {
  .nexus-app { padding:8px 8px 90px }.nexus-header { align-items:flex-start; flex-direction:column; border-radius:15px }.account-cluster { justify-content:flex-start }
  .nexus-layout,.battle-layout { display:block }.side-rail,.intel-column,.battle-intel { display:none }.world-scene,.battle-stage { min-height:620px }
  .event-card { left:14px; top:14px; width:210px; padding:11px 12px }.event-card strong { font-size:14px }.event-card small { font-size:10px }
  .nexus-character,.battle-character { width:min(82%,500px) }.character-identity { max-width:70% }
  .nexus-mobile-nav { position:fixed; z-index:50; left:8px; right:8px; bottom:8px; display:grid; grid-template-columns:repeat(4,1fr); padding:7px; border-radius:17px }
  .nexus-mobile-nav a { display:grid; place-items:center; gap:3px; min-height:52px; color:var(--nx-muted); text-decoration:none; font-size:9px }.nexus-mobile-nav a span { font-size:19px }.nexus-mobile-nav a.active { color:var(--nx-blue) }
}
@media (max-width:620px) {
  .nexus-header { min-height:auto; padding:11px }.nexus-brand b { font-size:16px }.brand-sigil { width:40px; height:40px }
  .tier-badge { min-height:32px; padding:5px 9px }.resource-pill { min-height:34px; padding:5px 9px }.resource-pill small { display:block; font-size:7px }.resource-pill strong { font-size:15px }.icon-button { width:35px; height:35px }
  .world-scene,.battle-stage { min-height:520px; border-radius:18px }
  .event-card { left:9px; top:9px; width:142px; padding:8px 9px; border-radius:10px }
  .event-card .overline { font-size:6px; letter-spacing:.14em }
  .event-card strong { margin-top:4px; font-size:11px; line-height:1.35 }
  .event-card small { display:none }
  .event-card .progress-track { height:3px; margin-top:7px }
  .stage-punish-button {
    right:13px;
    bottom:15px;
    width:84px;
    height:84px;
    padding:8px;
    box-shadow:inset 0 0 0 4px rgba(5,25,48,.3),0 10px 26px rgba(0,65,126,.48);
  }
  .stage-punish-button::after { inset:6px }
  .stage-punish-button strong { margin-top:3px; font-size:11px }
  .stage-punish-button small { margin-top:2px; font-size:8px }
  .stage-punish-icon { font-size:16px }
  .nexus-character,.battle-character { width:min(96%,470px); max-height:78% }.character-identity { left:14px; bottom:13px; max-width:calc(100% - 125px); padding:11px 13px }.character-identity h1 { font-size:34px }.character-identity p { font-size:10px }
  .command-deck,.action-console { padding:12px }.deck-head { align-items:flex-start; flex-direction:column }.modern-item-grid { grid-template-columns:1fr }.modern-item { min-height:88px; grid-template-columns:64px 1fr }.modern-item img { width:60px; height:60px }
  .news-ticker { grid-template-columns:auto 1fr }.news-ticker p { display:none }.battle-character { max-height:82% }
}
@media (prefers-reduced-motion:reduce) {
  .nexus-grid,.nexus-orb,.particle,.idle-character,.character-shadow,.character-aura,.scene-rings,.scene-light,.stage-hud i { animation:none!important }
}

/* ===== Portrait loop video stage ===== */
.video-stage {
  isolation: isolate;
  background: #03101f;
}
.video-stage .scene-horizon { z-index: 1; opacity: .52; }
.video-stage .scene-rings { z-index: 2; opacity: .48; }
.video-stage .scene-light { z-index: 2; opacity: .48; mix-blend-mode: screen; }
.video-backdrop-layer {
  position: absolute;
  z-index: 0;
  inset: -10%;
  overflow: hidden;
  background: #02101f;
}
.video-backdrop-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  filter: blur(42px) brightness(.42) saturate(.9);
  transform: scale(1.18);
  opacity: .88;
}
.video-vignette {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2,9,18,.78), transparent 20%, transparent 80%, rgba(2,9,18,.78)),
    linear-gradient(180deg, rgba(3,12,23,.26), transparent 22%, transparent 72%, rgba(2,8,16,.68)),
    radial-gradient(ellipse at center, transparent 30%, rgba(2,10,20,.34) 78%, rgba(2,8,16,.72));
}
.portrait-video-shell {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0;
  height: min(96%, 760px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(137, 196, 238, .18);
  border-radius: 28px 28px 10px 10px;
  background: #001326;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.025),
    0 28px 70px rgba(0,0,0,.44),
    0 0 70px rgba(40,137,205,.13);
  transform: translateX(-50%);
  transform-origin: 50% 92%;
}
.portrait-video-shell::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 45px rgba(1,15,29,.22);
  background: linear-gradient(180deg, transparent 75%, rgba(2,10,19,.2));
}
.portrait-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #001326;
}
.punishment-hit-image {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 60ms linear;
}
.action-stage.is-punishing .portrait-video,
.action-stage.has-punishment-pose .portrait-video { opacity: 0; }
.action-stage.is-punishing .punishment-hit-image.is-active,
.action-stage.has-punishment-pose .punishment-hit-image.is-active { opacity: 1; }
.video-play-fallback {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 24px;
  display: none;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid rgba(126, 204, 255, .55);
  border-radius: 999px;
  color: #fff;
  background: rgba(3, 18, 34, .78);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.portrait-video-shell.video-blocked .video-play-fallback { display: inline-flex; align-items: center; }
.portrait-video-shell.video-playing .video-play-fallback { display: none; }
.video-shadow {
  z-index: 2;
  width: min(46%, 420px);
  bottom: -1%;
  animation: none;
}
@keyframes videoIdle {
  0%,100% { transform: translateX(-50%) translateY(0) scale(1); }
  50% { transform: translateX(-50%) translateY(-4px) scale(1.004); }
}
@keyframes videoShadowIdle {
  0%,100% { transform: translateX(-50%) scaleX(1); opacity: .52; }
  50% { transform: translateX(-50%) scaleX(.97); opacity: .42; }
}
.action-stage.animate-harisen_hit .portrait-video-shell {
  animation: videoHit .72s cubic-bezier(.2,.8,.2,1);
}
.action-stage.animate-tarai_drop .portrait-video-shell {
  animation: videoDrop .86s cubic-bezier(.2,.8,.2,1);
}
.action-stage.animate-essay_popup .portrait-video-shell {
  animation: videoReflect .95s ease;
}
.action-stage.animate-whip_strike .portrait-video-shell {
  animation: videoHit .72s cubic-bezier(.2,.8,.2,1);
}
.action-stage.animate-punch_hit .portrait-video-shell {
  animation: videoPunch .8s cubic-bezier(.2,.8,.2,1);
}
.action-stage.animate-surprise_cannon .portrait-video-shell {
  animation: videoDrop .86s cubic-bezier(.2,.8,.2,1);
}
@keyframes videoHit {
  0% { transform: translateX(-50%) rotate(0); filter: brightness(1); }
  18% { transform: translateX(-46%) rotate(2.5deg) scale(.985); filter: brightness(1.5); }
  42% { transform: translateX(-55%) rotate(-4deg) scale(1.015); }
  70% { transform: translateX(-48%) rotate(1.5deg); }
  100% { transform: translateX(-50%); filter: brightness(1); }
}
@keyframes videoDrop {
  0% { transform: translateX(-50%) translateY(0) scaleY(1); }
  38% { transform: translateX(-50%) translateY(18px) scaleY(.96); filter: brightness(1.25); }
  62% { transform: translateX(-50%) translateY(-7px) scaleY(1.01); }
  100% { transform: translateX(-50%) translateY(0); filter: brightness(1); }
}
@keyframes videoReflect {
  0%,100% { transform: translateX(-50%) translateY(0); }
  35% { transform: translateX(-50%) rotate(-1deg) translateY(6px); }
  65% { transform: translateX(-50%) rotate(1deg) translateY(6px); }
}
@keyframes videoPunch {
  0% { transform: translateX(-50%) scale(1); filter: brightness(1); }
  24% { transform: translateX(-58%) rotate(-5deg) scale(1.025); filter: brightness(1.42); }
  58% { transform: translateX(-47%) rotate(2deg) scale(.99); }
  100% { transform: translateX(-50%) scale(1); filter: brightness(1); }
}

@media (max-width: 900px) {
  .portrait-video-shell { height: min(94%, 620px); }
  .video-backdrop-layer { inset: -5%; }
  .video-backdrop-layer img { filter: blur(30px) brightness(.4) saturate(.86); }
}
@media (max-width: 620px) {
  .portrait-video-shell {
    width: min(100%, 390px);
    height: auto;
    max-height: 94%;
    aspect-ratio: 3 / 4;
    border-radius: 20px 20px 8px 8px;
  }
  .video-vignette {
    background:
      linear-gradient(180deg, rgba(3,12,23,.16), transparent 20%, transparent 75%, rgba(2,8,16,.58)),
      radial-gradient(ellipse at center, transparent 48%, rgba(2,10,20,.3));
  }
  .video-backdrop-layer img { opacity: .55; filter: blur(26px) brightness(.36); }
}
@media (prefers-reduced-motion: reduce) {
  .video-shadow { animation: none!important; }
}

/* ===== Imperial strategy game skin ===== */
.nexus-body {
  --nx-bg:#05070b;
  --nx-panel:rgba(8,14,23,.94);
  --nx-panel-strong:#080d15;
  --nx-line:rgba(199,160,89,.38);
  --nx-text:#f2eee5;
  --nx-muted:#9d9a94;
  --nx-blue:#70a8dc;
  --nx-cyan:#75c5de;
  --nx-gold:#c9a359;
  background:
    radial-gradient(circle at 50% -15%,rgba(52,82,111,.34),transparent 42%),
    linear-gradient(135deg,#06080d 0%,#0b1119 48%,#06090e 100%);
  font-family:"Noto Sans JP","Yu Gothic",system-ui,sans-serif;
}
.nexus-bg {
  opacity:.52;
  background:
    linear-gradient(90deg,rgba(201,163,89,.025) 1px,transparent 1px) 0 0/64px 64px,
    linear-gradient(rgba(201,163,89,.025) 1px,transparent 1px) 0 0/64px 64px;
}
.nexus-grid { opacity:.12; }
.nexus-orb { opacity:.08; filter:blur(40px); }
.particle { background:#d1ad63; opacity:.22; }
.nexus-app { width:min(1440px,calc(100% - 30px)); padding:14px 0 72px; }
.glass,.glass-dark {
  border:1px solid rgba(201,163,89,.34);
  border-radius:4px;
  background:
    linear-gradient(145deg,rgba(17,26,38,.96),rgba(5,10,17,.96));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.025),
    inset 0 0 28px rgba(32,55,78,.2),
    0 14px 42px rgba(0,0,0,.34);
  backdrop-filter:blur(12px);
}
.nexus-header {
  position:relative;
  min-height:76px;
  padding:10px 14px;
  border-color:rgba(208,169,94,.56);
  border-radius:6px;
  background:
    linear-gradient(180deg,rgba(18,25,33,.98),rgba(5,9,14,.98));
}
.nexus-header::before,.nexus-header::after {
  content:"";
  position:absolute;
  bottom:-4px;
  width:38%;
  height:2px;
  background:linear-gradient(90deg,transparent,#d0a95e);
}
.nexus-header::before { left:3%; }
.nexus-header::after { right:3%; transform:scaleX(-1); }
.nexus-brand { gap:14px; }
.brand-sigil {
  width:52px;
  height:52px;
  overflow:hidden;
  border:1px solid #e0bd72;
  border-radius:50%;
  color:#eed393;
  background:
    radial-gradient(circle,#17304b 0 42%,#07111d 44% 62%,#b28a42 64% 67%,#09111a 69%);
  box-shadow:0 0 0 3px #080d13,0 0 0 4px rgba(206,169,94,.68),0 5px 16px #000;
  font-family:Georgia,serif;
  font-size:23px;
}
.brand-sigil img {
  border-radius:inherit;
}
.nexus-brand b {
  font-family:"Yu Mincho","Hiragino Mincho ProN",serif;
  font-size:clamp(18px,2vw,27px);
  font-weight:700;
  letter-spacing:.08em;
  text-shadow:0 2px 8px #000;
}
.nexus-brand small { color:#bda873; font-size:8px; letter-spacing:.32em; }
.account-cluster { gap:7px; }
.tier-badge,.resource-pill,.icon-button {
  min-height:42px;
  border-color:rgba(201,163,89,.42);
  border-radius:3px;
  background:linear-gradient(180deg,#111a25,#070c13);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 4px 10px #0006;
}
.tier-badge { color:#d8bf83; }
.tier-badge i { background:#d1aa5f; box-shadow:0 0 10px #d1aa5f; }
.resource-pill small { color:#aaa393; }
.resource-pill strong,.resource-pill.accent strong { color:#f0d58e; font-family:Georgia,"Yu Mincho",serif; }
.icon-button { color:#d7bd7e; }
.bgm-control {
  position:fixed;
  z-index:48;
  right:max(14px,env(safe-area-inset-right));
  bottom:max(14px,env(safe-area-inset-bottom));
  display:flex;
  align-items:stretch;
  min-height:34px;
  overflow:hidden;
  border:1px solid rgba(201,163,89,.42);
  border-radius:999px;
  background:rgba(7,12,19,.88);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 5px 18px #0008;
  opacity:.72;
  transition:opacity .18s ease,border-color .18s ease;
}
.bgm-control:hover,
.bgm-control:focus-within {
  border-color:rgba(218,181,105,.7);
  opacity:1;
}
.bgm-toggle {
  display:flex;
  align-items:center;
  gap:5px;
  min-width:76px;
  padding:4px 9px 4px 11px;
  border:0;
  border-right:1px solid rgba(201,163,89,.28);
  color:#ead19a;
  background:transparent;
  font:inherit;
  cursor:pointer;
}
.bgm-toggle span { color:#e3bd6b; font-size:14px; }
.bgm-toggle b { font-size:8px; letter-spacing:.12em; }
.bgm-toggle em {
  min-width:22px;
  padding:2px 4px;
  border:1px solid rgba(215,174,92,.42);
  color:#f2d58e;
  background:#15283a;
  font-size:7px;
  font-style:normal;
  text-align:center;
}
.bgm-control[data-enabled="false"] .bgm-toggle { color:#777; }
.bgm-control[data-enabled="false"] .bgm-toggle span { color:#777; }
.bgm-control[data-enabled="false"] .bgm-toggle em {
  color:#aaa;
  border-color:#4a4a4a;
  background:#17191c;
}
.bgm-control[data-playing="true"] .bgm-toggle span {
  text-shadow:0 0 9px #efc66d;
}
.bgm-volume {
  display:grid;
  align-content:center;
  gap:2px;
  width:0;
  padding:3px 0;
  overflow:hidden;
  opacity:0;
  pointer-events:none;
  transition:width .18s ease,padding .18s ease,opacity .18s ease;
}
.bgm-control:hover .bgm-volume,
.bgm-control:focus-within .bgm-volume {
  width:82px;
  padding:3px 12px 3px 8px;
  opacity:1;
  pointer-events:auto;
}
.bgm-volume span {
  color:#9f9888;
  font-family:Georgia,serif;
  font-size:7px;
  letter-spacing:.14em;
}
.bgm-volume input {
  width:100%;
  height:12px;
  padding:0;
  border:0;
  border-radius:0;
  outline:0;
  background:transparent;
  cursor:pointer;
  accent-color:#cba257;
}
.bgm-volume input::-webkit-slider-runnable-track {
  height:3px;
  background:linear-gradient(90deg,#cba257 var(--bgm-volume,35%),#333a42 var(--bgm-volume,35%));
}
.bgm-volume input::-webkit-slider-thumb {
  width:11px;
  height:11px;
  margin-top:-4px;
  border:1px solid #f2d38d;
  border-radius:50%;
  background:#8d642c;
  -webkit-appearance:none;
}
.bgm-volume input::-moz-range-track { height:3px; background:#333a42; }
.bgm-volume input::-moz-range-progress { height:3px; background:#cba257; }
.bgm-volume input::-moz-range-thumb {
  width:11px;
  height:11px;
  border:1px solid #f2d38d;
  border-radius:50%;
  background:#8d642c;
}

.nexus-layout { grid-template-columns:92px minmax(560px,1fr) 300px; gap:13px; margin-top:13px; }
.side-rail { gap:8px; }
.rail-action {
  min-height:91px;
  border-color:rgba(201,163,89,.3);
  border-radius:4px;
  color:#b8ae99;
  background:
    radial-gradient(circle at 50% 34%,rgba(48,78,108,.28),transparent 34%),
    linear-gradient(180deg,#111a25,#060a10);
  box-shadow:inset 0 0 0 1px #000,0 5px 16px #0005;
}
.rail-action::after {
  content:"";
  position:absolute;
  inset:4px;
  border:1px solid rgba(203,168,98,.15);
  pointer-events:none;
}
.rail-action span {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border:1px solid rgba(214,178,105,.48);
  border-radius:50%;
  color:#d8bd80;
  background:radial-gradient(circle,#19314b,#070c13 68%);
  font-size:20px;
  box-shadow:inset 0 0 10px #000,0 2px 8px #0008;
}
.rail-action b { font-family:"Yu Mincho","Hiragino Mincho ProN",serif; font-size:11px; letter-spacing:.04em; }
.rail-action:hover,.rail-action.active {
  color:#f2dfad;
  border-color:#c69e52;
  background:linear-gradient(180deg,#1d2f43,#09111b);
  box-shadow:inset 3px 0 #d0a65a,inset 0 0 0 1px #000,0 7px 20px #0008;
  transform:none;
}
.rail-action em {
  right:4px;
  top:4px;
  border:1px solid #f0c070;
  border-radius:50%;
  background:#9e2227;
  box-shadow:0 2px 5px #000;
}

.world-scene {
  min-height:clamp(520px,62vh,760px);
  border:1px solid #b88c45;
  border-radius:6px;
  box-shadow:
    inset 0 0 0 3px #05080d,
    inset 0 0 0 4px rgba(211,173,101,.22),
    inset 0 -90px 120px rgba(0,0,0,.55),
    0 14px 35px rgba(0,0,0,.42);
}
.world-scene::before,.world-scene::after {
  content:"";
  position:absolute;
  z-index:11;
  width:44px;
  height:44px;
  pointer-events:none;
}
.world-scene::before {
  left:7px;
  top:7px;
  border-left:2px solid #d2ac63;
  border-top:2px solid #d2ac63;
}
.world-scene::after {
  right:7px;
  bottom:7px;
  border-right:2px solid #d2ac63;
  border-bottom:2px solid #d2ac63;
}
.portrait-video-shell {
  height:min(98%,790px);
  border:1px solid rgba(201,163,89,.38);
  border-radius:4px 4px 0 0;
  box-shadow:0 0 0 3px rgba(3,7,12,.8),0 22px 55px #0009,0 0 65px rgba(35,76,112,.16);
}
.video-vignette {
  background:
    linear-gradient(90deg,rgba(2,5,9,.92),transparent 24%,transparent 76%,rgba(2,5,9,.9)),
    linear-gradient(180deg,rgba(2,5,9,.2),transparent 55%,rgba(2,5,9,.78)),
    radial-gradient(ellipse at center,transparent 30%,rgba(2,6,11,.5) 88%);
}
.event-card {
  left:18px;
  top:18px;
  width:min(278px,39%);
  padding:13px 15px 12px;
  border-color:rgba(210,170,91,.68);
  border-radius:2px;
  background:linear-gradient(135deg,rgba(13,26,42,.96),rgba(5,10,17,.97));
  box-shadow:inset 3px 0 #bd9046,inset 0 0 25px rgba(29,63,96,.32),0 8px 24px #0009;
}
.event-card::after {
  content:"";
  position:absolute;
  right:5px;
  bottom:5px;
  width:18px;
  height:18px;
  border-right:1px solid #d5ad62;
  border-bottom:1px solid #d5ad62;
}
.overline { color:#c8a45e; font-family:Georgia,serif; font-size:8px; letter-spacing:.24em; }
.event-card strong,.deck-head h2,.intel-card h3 {
  font-family:"Yu Mincho","Hiragino Mincho ProN",serif;
  font-weight:700;
}
.event-card strong { color:#f2e8cf; letter-spacing:.04em; }
.event-card small { color:#b3b0aa; }
.progress-track { height:5px; border:1px solid #3a3427; border-radius:0; background:#06090e; }
.progress-track i { background:linear-gradient(90deg,#9c6a24,#e0bb66,#8c5c1d); box-shadow:0 0 8px #b98b42; }
.character-identity {
  left:24px;
  bottom:24px;
  max-width:360px;
  padding:13px 22px 14px;
  border:1px solid rgba(201,163,89,.58);
  border-left:4px solid #caa258;
  border-radius:0;
  background:linear-gradient(90deg,rgba(4,8,14,.94),rgba(8,16,26,.82) 72%,transparent);
  box-shadow:0 8px 25px #0008;
}
.character-identity .rarity { color:#c7a35e; font-family:Georgia,serif; }
.character-identity h1 {
  margin:2px 0;
  color:#ead49b;
  font-family:"Yu Mincho","Hiragino Mincho ProN",serif;
  font-weight:700;
  text-shadow:0 2px 10px #000;
}
.character-identity p { color:#d0ccc4; }
.stage-punish-button {
  width:116px;
  height:116px;
  border:2px solid #e0bc70;
  color:#fff2cb;
  background:
    radial-gradient(circle at 35% 26%,rgba(255,255,255,.2),transparent 22%),
    radial-gradient(circle,#215383 0 42%,#102c4b 44% 61%,#c79b4e 63% 66%,#09111b 68%);
  box-shadow:0 0 0 3px #060b12,0 0 0 4px #8c6a35,0 14px 30px #000c,inset 0 0 18px #0009;
}
.stage-punish-button::after { inset:10px; border-color:rgba(240,208,139,.42); }
.stage-punish-button strong {
  font-family:"Yu Mincho","Hiragino Mincho ProN",serif;
  font-size:16px;
  letter-spacing:.08em;
}
.stage-punish-button small { color:#e6cc90; }
.stage-punish-button:hover { filter:brightness(1.14); box-shadow:0 0 0 3px #060b12,0 0 0 4px #d2a75a,0 0 28px rgba(76,154,218,.4),0 18px 35px #000; }

.command-deck {
  position:relative;
  margin-top:10px;
  padding:14px;
  border-color:rgba(201,163,89,.55);
  border-radius:4px;
  background:linear-gradient(180deg,#101924,#070c13);
}
.command-deck::before {
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  top:-1px;
  height:2px;
  background:linear-gradient(90deg,transparent,#d3aa5e,transparent);
}
.deck-head { margin-bottom:11px; }
.deck-head h2 { color:#ead7a9; font-size:21px; letter-spacing:.06em; }
.deck-head a,.intel-card a { color:#d7b66d; }
.modern-item-grid { gap:9px; }
.modern-item {
  grid-template-columns:78px 1fr;
  min-height:105px;
  padding:10px;
  border-color:rgba(190,156,91,.34);
  border-radius:2px;
  background:
    linear-gradient(180deg,rgba(24,35,49,.98),rgba(7,12,19,.98));
  box-shadow:inset 0 0 0 2px #060a0f,0 5px 13px #0007;
}
.item-choice.modern-item:nth-child(3n+1),
.item-choice.modern-item:nth-child(3n+2),
.item-choice.modern-item:nth-child(3n) {
  border-color:rgba(190,156,91,.34);
  background:linear-gradient(180deg,rgba(24,35,49,.98),rgba(7,12,19,.98));
}
.modern-item::before {
  content:"";
  position:absolute;
  left:3px;
  top:3px;
  width:17px;
  height:17px;
  border-left:1px solid #c49b52;
  border-top:1px solid #c49b52;
}
.modern-item::after {
  inset:auto 3px 3px auto;
  width:17px;
  height:17px;
  border-right:1px solid #c49b52;
  border-bottom:1px solid #c49b52;
  border-radius:0;
  background:none;
  filter:none;
  opacity:.65;
}
.modern-item img {
  width:72px;
  height:78px;
  padding:5px;
  border:1px solid rgba(207,172,102,.45);
  border-radius:1px;
  background:linear-gradient(145deg,#1c2f43,#08111b);
  box-shadow:inset 0 0 15px #0008;
}
.modern-item strong { color:#f0e2bd; font-family:"Yu Mincho","Hiragino Mincho ProN",serif; font-size:15px; }
.modern-item small { color:#9fa5a9; }
.item-level { color:#cfad68; }
.modern-item:hover,.modern-item.selected {
  border-color:#d0a253;
  transform:translateY(-2px);
  background:linear-gradient(180deg,#263d54,#0b1521);
  box-shadow:inset 0 0 0 2px #080d13,0 0 0 1px #705024,0 8px 20px #000a;
}
.item-choice.modern-item.selected {
  border-color:#d0a253;
  border-left:4px solid #d7aa59;
  outline:1px solid rgba(208,162,83,.45);
  outline-offset:2px;
}

.intel-column { gap:9px; }
.account-card,.intel-card {
  position:relative;
  padding:14px;
  border-color:rgba(201,163,89,.42);
  border-radius:3px;
  background:linear-gradient(145deg,#111b27,#070c13);
}
.account-card::before,.intel-card::before {
  content:"";
  position:absolute;
  left:7px;
  right:7px;
  top:5px;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(222,184,108,.45),transparent);
}
.tier-emblem {
  min-width:64px;
  height:64px;
  border-color:#b68d48;
  border-radius:50%;
  color:#e4c57f;
  background:radial-gradient(circle,#1c3c5b,#07101a 70%);
  box-shadow:0 0 0 3px #080d13,0 0 0 4px rgba(187,145,70,.55),inset 0 0 16px #000;
}
.account-top span { color:#f1e7ce; font-family:"Yu Mincho","Hiragino Mincho ProN",serif; font-size:16px; }
.account-stats div,.battle-stat {
  border-color:rgba(201,163,89,.25);
  border-radius:2px;
  background:#070c12;
}
.account-stats b,.battle-stat strong { color:#e2c276; font-family:Georgia,serif; }
.account-cta {
  border-color:#a98446;
  border-radius:2px;
  color:#ebd19a;
  background:linear-gradient(180deg,#253a4e,#101b28);
}
.intel-title span { color:#c9a65f; font-family:Georgia,serif; }
.modern-ranking li { border-color:rgba(201,163,89,.16); }
.modern-ranking i { color:#deb75e; font-family:Georgia,serif; }
.modern-ranking b { color:#d9ba75; }
.promo-card,.premium-card {
  border-color:rgba(201,163,89,.42);
  background:linear-gradient(145deg,#142537,#080d14);
}
.premium-card { background:linear-gradient(145deg,#2b2315,#0b0d10); }
.social-card {
  position:relative;
  overflow:hidden;
  border-color:rgba(201,163,89,.48);
  background:
    radial-gradient(circle at 100% 0,rgba(201,163,89,.13),transparent 42%),
    linear-gradient(145deg,#101c2a,#070c13);
}
.social-card::after {
  content:"";
  position:absolute;
  right:-28px;
  top:-28px;
  width:72px;
  height:72px;
  border:1px solid rgba(201,163,89,.12);
  transform:rotate(45deg);
  pointer-events:none;
}
.social-links {
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
  margin-top:11px;
}
.social-link {
  position:relative;
  display:grid;
  grid-template-columns:34px 1fr auto;
  align-items:center;
  gap:9px;
  min-height:46px;
  padding:6px 10px 6px 7px;
  overflow:hidden;
  border:1px solid rgba(201,163,89,.28);
  color:#ead6a4;
  background:linear-gradient(180deg,#142235,#080e17);
  text-decoration:none;
  transition:transform .15s ease,border-color .15s ease,filter .15s ease;
}
.social-link::after {
  content:"›";
  position:absolute;
  right:8px;
  color:#8d7953;
  font-size:18px;
}
.social-link > span {
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border:1px solid currentColor;
  border-radius:50%;
  color:#f3e6c7;
  background:#060b11;
  box-shadow:inset 0 0 10px rgba(255,255,255,.04);
  font:800 13px/1 Arial,sans-serif;
}
.social-link > b {
  color:#f1e5c8;
  font-size:11px;
  letter-spacing:.05em;
}
.social-link > small {
  margin-right:14px;
  color:#777f87;
  font-size:7px;
  letter-spacing:.05em;
}
.social-link:hover,
.social-link:focus-visible {
  transform:translateX(3px);
  border-color:#d4ad62;
  color:#fff0c9;
  outline:0;
  filter:brightness(1.12);
}
.x-link { --social-color:#d8dce2; border-left:3px solid var(--social-color); }
.youtube-link { --social-color:#e24b4b; border-left:3px solid var(--social-color); }
.discord-link { --social-color:#7289da; border-left:3px solid var(--social-color); }
.social-link > span,
.menu-social-links a > span { border-color:var(--social-color); color:var(--social-color); }
.menu-social {
  margin-top:14px;
  padding-top:13px;
  border-top:1px solid rgba(201,163,89,.2);
}
.menu-social-links {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-top:8px;
}
.menu-social-links a {
  display:flex;
  min-width:0;
  min-height:62px;
  padding:7px 4px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:1px solid rgba(201,163,89,.24);
  color:#d9c59b;
  background:linear-gradient(180deg,#142235,#080e17);
  text-decoration:none;
  transition:transform .12s ease,border-color .12s ease,filter .12s ease;
}
.menu-social-links a > span {
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  border:1px solid;
  border-radius:50%;
  font:800 10px/1 Arial,sans-serif;
}
.menu-social-links a > b {
  overflow:hidden;
  max-width:100%;
  font-size:8px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.menu-social-links a:active {
  transform:translateY(2px) scale(.97);
}
.news-ticker {
  border-radius:3px;
  border-color:rgba(201,163,89,.42);
  background:linear-gradient(90deg,#121c28,#080d14);
}
.news-ticker>span { color:#d4ae62; }

/* ===== In-game full panel ===== */
.game-panel-open { overflow:hidden; }
.game-panel-overlay[hidden] { display:none; }
.game-panel-overlay {
  position:fixed;
  z-index:140;
  inset:0;
  display:block;
  color:#eee4ca;
  background:
    radial-gradient(circle at 50% -10%,rgba(40,78,112,.42),transparent 38%),
    linear-gradient(135deg,#05080d 0%,#0b1119 54%,#05070b 100%);
}
.game-panel-surface {
  position:relative;
  width:100%;
  height:100%;
  overflow:auto;
  padding:clamp(18px,3vw,36px);
}
.game-panel-surface::before {
  content:"";
  position:fixed;
  inset:12px;
  border:1px solid rgba(201,163,89,.34);
  pointer-events:none;
  box-shadow:inset 0 0 0 3px rgba(3,7,12,.78);
}
.game-panel-close {
  position:fixed;
  z-index:3;
  right:clamp(14px,2.2vw,28px);
  top:clamp(14px,2.2vw,28px);
  display:grid;
  place-items:center;
  width:56px;
  height:56px;
  padding:0;
  border:1px solid #d2aa5e;
  border-radius:50%;
  color:#fff0c9;
  background:radial-gradient(circle,#3b1a1f,#080d14 72%);
  box-shadow:0 0 0 3px #05080d,0 10px 28px #000b;
  font:300 34px/1 system-ui,sans-serif;
  cursor:pointer;
}
.game-panel-close:hover,
.game-panel-close:focus-visible {
  filter:brightness(1.18);
  outline:2px solid #f2d898;
  outline-offset:4px;
}
.game-panel-head {
  width:min(1120px,100%);
  margin:0 auto 18px;
  padding-right:72px;
}
.game-panel-head > .overline {
  display:none;
}
.game-panel-head h1 {
  margin:7px 0 0;
  color:#f0dfb4;
  font:600 clamp(34px,5vw,58px)/1.1 "Yu Mincho","Hiragino Mincho ProN",serif;
  letter-spacing:.04em;
}
.game-panel-head p {
  margin:10px 0 0;
  color:#aeb6bd;
}
.game-panel-body {
  position:relative;
  z-index:1;
  width:min(1120px,100%);
  margin:0 auto;
  padding-bottom:46px;
}
.panel-loading {
  display:grid;
  place-items:center;
  min-height:260px;
  border:1px solid rgba(201,163,89,.28);
  color:#d7bd7e;
  background:rgba(7,12,19,.82);
  font-weight:900;
}
.panel-section {
  padding:18px;
  border:1px solid rgba(201,163,89,.34);
  background:linear-gradient(145deg,rgba(17,26,38,.96),rgba(5,10,17,.96));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 14px 42px rgba(0,0,0,.34);
}
.overlay-grid { margin-top:0; }
.overlay-stack { display:grid; gap:12px; }
.overlay-card {
  padding:18px;
  border:1px solid rgba(201,163,89,.28);
  background:#070c12;
}
.overlay-card h2 { color:#f0dfb4; }
.overlay-card p { color:#c0c5ca; line-height:1.75; }
.overlay-items .game-card {
  border-color:rgba(201,163,89,.28);
  background:linear-gradient(180deg,#111a25,#070c13);
}
.game-panel-body .tag {
  min-height:22px;
  align-items:center;
  padding:5px 10px;
  border:1px solid rgba(229,194,121,.62);
  color:#ffe8ad;
  background:linear-gradient(180deg,rgba(98,72,31,.98),rgba(42,31,18,.98));
  box-shadow:inset 0 1px rgba(255,255,255,.12),0 3px 10px rgba(0,0,0,.35);
  text-shadow:0 1px 2px #000;
  letter-spacing:.06em;
}
.game-panel-body .tag.premium {
  border-color:rgba(255,213,117,.82);
  color:#fff4bf;
  background:linear-gradient(180deg,#8a5f22,#3a2712);
}
.overlay-clicker {
  margin-top:0;
  border:1px solid rgba(201,163,89,.34);
  background:linear-gradient(145deg,rgba(17,26,38,.96),rgba(5,10,17,.96));
}
@media (max-width:900px) {
  .game-panel-surface { padding:16px 10px 90px; }
  .game-panel-surface::before { inset:6px; }
  .game-panel-close { width:50px; height:50px; font-size:30px; }
  .game-panel-head { padding-right:62px; }
  .panel-section { padding:12px; }
}

.game-modal { background:rgba(0,3,7,.84); backdrop-filter:blur(8px); }
.nexus-result {
  border:1px solid #c59b4d;
  border-radius:4px;
  background:linear-gradient(145deg,#172536,#070c13);
  box-shadow:0 0 0 4px #05080d,0 0 0 5px rgba(201,163,89,.5),0 30px 100px #000;
}
.nexus-result .result-visual {
  border-color:rgba(201,163,89,.38);
  border-radius:2px;
  background:#080d13;
}
.nexus-result .result-score { color:#e1bb68; font-family:Georgia,serif; }
.nexus-result h2,.nexus-result strong { font-family:"Yu Mincho","Hiragino Mincho ProN",serif; color:#efdfb5; }
.modal-close { border-color:#b88c46; color:#e9d09a; background:#0b121b; }
.nexus-result .btn { border-radius:2px; }
.nexus-result .btn-primary { background:linear-gradient(180deg,#805d27,#4d3518); box-shadow:none; }
.nexus-result .btn-blue { background:linear-gradient(180deg,#294e70,#132a41); border-color:#607f99; }

@media (max-width:1180px) {
  .nexus-layout { grid-template-columns:80px minmax(480px,1fr) 270px; }
}
@media (max-width:900px) {
  .nexus-app { width:calc(100% - 16px); padding-top:8px; }
  .nexus-header { border-radius:4px; }
  .world-scene { min-height:620px; }
  .nexus-mobile-nav {
    border-color:rgba(201,163,89,.6);
    border-radius:3px;
    background:linear-gradient(180deg,rgba(19,29,40,.98),rgba(5,9,14,.98));
    box-shadow:0 -8px 28px #000a;
  }
  .nexus-mobile-nav a { border-right:1px solid rgba(201,163,89,.18); }
  .nexus-mobile-nav a:last-child { border-right:0; }
  .nexus-mobile-nav a.active { color:#e1bd70; background:rgba(201,163,89,.08); }
}
@media (max-width:620px) {
  .nexus-header { padding:10px; }
  .brand-sigil { width:42px; height:42px; font-size:19px; }
  .nexus-brand b { font-size:17px; }
    .account-cluster { width:100%; display:grid; grid-template-columns:auto 1fr 1fr 36px; }
  .account-cluster > .tier-badge { grid-column:1; grid-row:1; }
  .account-cluster > .resource-pill:nth-child(2) { grid-column:2; grid-row:1; }
  .account-cluster > .resource-pill:nth-child(3) { grid-column:3; grid-row:1; }
  .account-cluster > .icon-button { grid-column:4; grid-row:1; width:36px; height:100%; }
  .tier-badge,.resource-pill { min-width:0; padding:5px 7px; }
  .tier-badge { justify-content:center; }
  .resource-pill { display:grid; gap:1px; }
  .resource-pill small { font-size:6px; }
  .resource-pill strong { font-size:14px; }
  .bgm-control {
    position:static;
    width:100%;
    min-height:38px;
    margin:12px 0 4px;
    border-radius:3px;
    box-sizing:border-box;
    opacity:1;
  }
  .bgm-toggle { min-width:86px; padding:5px 10px; }
  .bgm-volume,
  .bgm-control:hover .bgm-volume,
  .bgm-control:focus-within .bgm-volume {
    width:auto;
    flex:1;
    padding:4px 12px 4px 9px;
    opacity:1;
    pointer-events:auto;
  }
  .world-scene { min-height:540px; }
  .event-card {
    left:10px;
    top:10px;
    width:148px;
    padding:8px 9px;
  }
  .portrait-video-shell { width:min(100%,390px); border-radius:2px 2px 0 0; }
  .character-identity {
    left:12px;
    bottom:12px;
    max-width:calc(100% - 118px);
    padding:9px 11px;
  }
  .character-identity h1 { font-size:31px; }
  .character-identity p { font-size:9px; }
  .stage-punish-button {
    right:13px;
    bottom:15px;
    width:88px;
    height:88px;
  }
  .command-deck { padding:10px; }
  .modern-item-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
  .modern-item {
    display:flex;
    flex-direction:column;
    align-items:stretch;
    min-height:142px;
    padding:6px;
    gap:4px;
  }
  .modern-item img {
    width:100%;
    height:76px;
    margin-top:9px;
  }
  .modern-item strong { font-size:11px; line-height:1.25; }
  .modern-item small { display:none; }
  .item-level { right:5px; top:4px; font-size:6px; }
  .modern-item .tag {
    right:5px;
    bottom:5px;
    min-height:15px;
    padding:2px 5px;
    font-size:6px;
  }
  .deck-head { flex-direction:row; align-items:flex-end; }
  .deck-head h2 { font-size:18px; }
}
@media (max-width:620px) and (max-height:780px) {
  .stage-punish-button { bottom:72px; }
}

/* ===== Rendering performance ===== */
.glass,.glass-dark,.rail-action,.video-play-fallback,.game-modal {
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.nexus-orb,.particle { display:none; }
.nexus-grid,.scene-rings,.scene-light { animation:none!important; }
.nexus-grid {
  opacity:.06;
  -webkit-mask-image:none;
  mask-image:none;
}
.scene-light,.video-stage .scene-light {
  opacity:.15;
  mix-blend-mode:normal;
}
.scene-rings { opacity:.18; }
.video-backdrop-layer { inset:0; }
.video-backdrop-layer img {
  filter:none;
  transform:none;
  opacity:1;
}
.world-scene,.portrait-video-shell {
  contain:layout paint;
}
.command-deck,.account-card,.intel-card,.news-ticker {
  contain:layout paint;
}
.nexus-bg { contain:strict; }

@media (max-width:900px) {
  .video-backdrop-layer { inset:0; }
  .video-backdrop-layer img { filter:none; opacity:1; }
}

/* ===== Shared system menu ===== */
.site-menu[hidden] { display:none; }
.site-menu {
  position:fixed;
  z-index:90;
  inset:0;
  display:grid;
  justify-items:end;
}
.menu-backdrop {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:rgba(0,3,8,.72);
  cursor:default;
}
.menu-panel {
  position:relative;
  z-index:1;
  width:min(390px,calc(100vw - 24px));
  height:100%;
  padding:22px;
  overflow-y:auto;
  border-left:1px solid rgba(207,169,94,.58);
  color:#eee4ca;
  background:
    linear-gradient(180deg,rgba(20,31,44,.98),rgba(5,10,16,.99)),
    #07101a;
  box-shadow:-22px 0 70px #000b;
}
.menu-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding-bottom:16px;
  border-bottom:1px solid rgba(201,163,89,.3);
}
.menu-head h2 {
  margin:4px 0 0;
  color:#f0dfb3;
  font:600 25px/1.2 "Yu Mincho","Hiragino Mincho ProN",serif;
  letter-spacing:.08em;
}
.menu-close {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid rgba(201,163,89,.48);
  border-radius:50%;
  color:#e7cd92;
  background:#09111a;
  font:300 24px/1 sans-serif;
  cursor:pointer;
}
.menu-links {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:18px;
}
.menu-links a {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:52px;
  padding:10px 12px;
  border:1px solid rgba(201,163,89,.24);
  color:#d6c8a7;
  background:linear-gradient(145deg,#111c28,#080d14);
  text-decoration:none;
}
.menu-links a:hover,
.menu-links a:focus-visible {
  border-color:#cba55d;
  color:#fff0c9;
  outline:0;
}
.menu-links span {
  display:grid;
  place-items:center;
  width:27px;
  height:27px;
  color:#d8b564;
  font-size:16px;
}
.menu-links b { font-size:11px; letter-spacing:.04em; }
.menu-audio {
  margin-top:20px;
  padding-top:17px;
  border-top:1px solid rgba(201,163,89,.3);
}
.menu-section-title {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:9px;
}
.menu-section-title span { color:#e7d39f; font-size:12px; font-weight:800; }
.menu-section-title small { color:#7e8390; font-size:8px; letter-spacing:.08em; }
.menu-audio .bgm-control {
  position:static;
  width:100%;
  min-height:42px;
  margin:0;
  border-radius:3px;
  box-sizing:border-box;
  opacity:1;
}
.menu-audio .bgm-toggle { min-width:92px; }
.menu-audio .bgm-volume,
.menu-audio .bgm-control:hover .bgm-volume,
.menu-audio .bgm-control:focus-within .bgm-volume {
  width:auto;
  flex:1;
  padding:4px 13px 4px 10px;
  overflow:visible;
  opacity:1;
  pointer-events:auto;
}
.menu-member-card {
  margin-top:14px;
  padding:12px;
  border:1px solid rgba(202,233,255,.46);
  border-radius:16px;
  color:#f4faff;
  background:linear-gradient(180deg,rgba(255,255,255,.11),rgba(8,25,49,.84));
  box-shadow:0 7px 14px rgba(0,19,48,.22),inset 0 1px rgba(255,255,255,.2);
}
.menu-member-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:34px;
  border-top:1px solid rgba(202,233,255,.18);
  font-size:12px;
}
.menu-member-row b {
  color:#fff3a3;
  font-size:15px;
  font-weight:900;
}
.menu-member-card > small {
  display:block;
  margin-top:8px;
  color:#b9cce0;
  font-size:10px;
  line-height:1.55;
}
.menu-logout-button {
  width:100%;
  min-height:38px;
  margin-top:10px;
  border:1px solid rgba(255,145,166,.62);
  border-radius:12px;
  color:#fff;
  background:linear-gradient(180deg,rgba(255,90,126,.95),rgba(168,23,62,.95));
  box-shadow:0 6px 12px rgba(0,19,48,.24),inset 0 1px rgba(255,255,255,.28);
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  cursor:pointer;
}
.menu-logout-button:active:not(:disabled) {
  transform:translateY(2px);
}
.menu-logout-button:disabled {
  cursor:wait;
  opacity:.62;
}
.menu-display-name-form {
  display:grid;
  gap:8px;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(202,233,255,.18);
}
.menu-display-name-form label {
  color:#eaf6ff;
  font-size:11px;
  font-weight:900;
}
.menu-display-name-form div {
  display:grid;
  grid-template-columns:1fr auto;
  gap:7px;
}
.menu-display-name-form input {
  min-width:0;
  min-height:36px;
  padding:8px 10px;
  border:1px solid rgba(202,233,255,.34);
  border-radius:10px;
  color:#fff;
  background:rgba(4,16,35,.58);
  font:inherit;
}
.menu-display-name-form button {
  min-height:36px;
  padding:0 12px;
  border:1px solid rgba(255,232,153,.72);
  border-radius:10px;
  color:#241600;
  background:linear-gradient(180deg,#fff0a6,#d69a38);
  font-size:12px;
  font-weight:950;
  cursor:pointer;
}
.menu-display-name-form button:disabled {
  opacity:.58;
  cursor:wait;
}
.menu-display-name-form p {
  min-height:1.3em;
  margin:0;
  color:#b9cce0;
  font-size:10px;
  line-height:1.35;
}
.menu-display-name-form p[data-type="success"] { color:#8ff0c6; }
.menu-display-name-form p[data-type="error"] { color:#ff9fb7; }
.menu-open { overflow:hidden; }
.icon-button[aria-expanded="true"] {
  border-color:#d1aa5f;
  color:#f2d58e;
  background:#182433;
}

@media (max-width:620px) {
  .menu-panel {
    width:min(330px,calc(100vw - 16px));
    padding:17px;
  }
  .menu-links { grid-template-columns:1fr; gap:6px; }
  .menu-links a { min-height:46px; }
  .menu-audio .bgm-control { min-height:40px; }
  .menu-display-name-form div { grid-template-columns:1fr; }
}

/* ===== First visit start screen ===== */
.game-start-screen {
  display:none;
  position:fixed;
  z-index:120;
  inset:0;
  place-items:center;
  padding:24px;
  overflow:hidden;
  color:#eee2c4;
  background:
    radial-gradient(circle at 50% 42%,rgba(22,43,65,.16),transparent 38%),
    linear-gradient(90deg,rgba(2,6,11,.78),rgba(3,8,14,.42) 48%,rgba(2,6,11,.68));
}
.game-first-visit .game-start-screen { display:grid; }
.game-first-visit .nexus-app {
  filter:brightness(.58) saturate(.82);
  transform:scale(.992);
  transform-origin:center top;
}
.game-start-screen::before {
  content:"";
  position:absolute;
  inset:0;
  opacity:.07;
  background-image:
    linear-gradient(rgba(216,180,104,.13) 1px,transparent 1px),
    linear-gradient(90deg,rgba(216,180,104,.13) 1px,transparent 1px);
  background-size:64px 64px;
  -webkit-mask-image:radial-gradient(circle,#000,transparent 74%);
  mask-image:radial-gradient(circle,#000,transparent 74%);
}
.game-start-screen::after {
  content:"";
  position:absolute;
  width:min(74vw,680px);
  aspect-ratio:1;
  border:1px solid rgba(213,174,94,.16);
  border-radius:50%;
  box-shadow:
    0 0 0 46px rgba(213,174,94,.025),
    0 0 0 92px rgba(213,174,94,.018);
}
.start-screen-card {
  position:relative;
  z-index:1;
  width:min(500px,100%);
  padding:38px 40px 34px;
  border:1px solid rgba(214,175,96,.56);
  text-align:center;
  background:
    linear-gradient(160deg,rgba(18,29,42,.82),rgba(5,10,16,.9));
  box-shadow:
    inset 0 0 0 4px rgba(7,13,20,.88),
    inset 0 0 0 5px rgba(214,175,96,.18),
    0 34px 100px #000c;
}
.start-screen-sigil {
  display:grid;
  place-items:center;
  width:82px;
  height:82px;
  overflow:hidden;
  margin:0 auto 20px;
  border:1px solid #d4ad5d;
  border-radius:50%;
  color:#f1d792;
  background:
    radial-gradient(circle,#19283a 48%,#080e16 49%);
  box-shadow:
    inset 0 0 0 5px #070c12,
    inset 0 0 0 6px rgba(214,175,96,.4),
    0 0 28px rgba(214,175,96,.16);
  font:600 38px/1 Georgia,serif;
}
.start-screen-sigil img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 42%;
  border-radius:inherit;
}
.start-screen-card .overline { color:#caa55d; }
.start-screen-card h1 {
  margin:9px 0 0;
  color:#f0dfb4;
  font:600 clamp(29px,4vw,36px)/1.25 "Yu Mincho","Hiragino Mincho ProN",serif;
  letter-spacing:.04em;
  white-space:nowrap;
}
.start-screen-card p {
  max-width:390px;
  margin:14px auto 15px;
  color:#c1c6cb;
  font-size:12px;
  line-height:1.7;
}
.start-action-preview {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
  margin:0 0 19px;
}
.start-action-preview span {
  padding:8px 5px;
  border:1px solid rgba(214,175,96,.3);
  color:#dbc58f;
  background:rgba(3,8,14,.55);
  font-size:9px;
  letter-spacing:.05em;
}
.game-start-button {
  position:relative;
  width:100%;
  min-height:70px;
  padding:10px 20px;
  border:1px solid #d8b260;
  color:#fff0c7;
  background:
    linear-gradient(180deg,rgba(143,105,42,.96),rgba(77,52,21,.98));
  box-shadow:
    inset 0 1px rgba(255,255,255,.25),
    0 10px 28px rgba(0,0,0,.42);
  cursor:pointer;
}
.game-start-button::before,
.game-start-button::after {
  content:"";
  position:absolute;
  top:50%;
  width:30px;
  height:1px;
  background:#e3c477;
}
.game-start-button::before { left:17px; }
.game-start-button::after { right:17px; }
.game-start-button span {
  display:block;
  color:#ead092;
  font:700 8px/1 Georgia,serif;
  letter-spacing:.24em;
}
.game-start-button strong {
  display:block;
  margin-top:6px;
  font:600 19px/1.2 "Yu Mincho","Hiragino Mincho ProN",serif;
  letter-spacing:.12em;
}
.game-start-button:hover,
.game-start-button:focus-visible {
  filter:brightness(1.13);
  outline:2px solid #f2d898;
  outline-offset:3px;
}
.game-start-button:active { transform:translateY(1px); }
.game-start-button:disabled { cursor:wait; opacity:.78; }
.start-screen-card > small {
  display:block;
  margin-top:16px;
  color:#727b87;
  font-size:9px;
}
.start-screen-open { overflow:hidden; }
.game-start-screen.is-leaving {
  display:grid;
  pointer-events:none;
  animation:startScreenLeave .36s ease both;
}
@keyframes startScreenLeave {
  to { opacity:0; transform:scale(1.025); }
}
@media (max-width:620px) {
  .game-start-screen {
    place-items:end center;
    padding:16px 16px 92px;
    background:linear-gradient(180deg,rgba(2,6,11,.25),rgba(2,6,11,.52) 42%,rgba(2,6,11,.84));
  }
  .game-first-visit .nexus-app {
    filter:brightness(.68) saturate(.86);
    transform:none;
  }
  .start-screen-card { padding:26px 22px 24px; }
  .start-screen-sigil { width:68px; height:68px; font-size:31px; }
  .start-screen-card h1 { font-size:25px; }
  .start-screen-card p { margin:11px auto 12px; font-size:11px; }
  .start-action-preview { margin-bottom:15px; }
  .start-action-preview span { padding:6px 3px; font-size:8px; }
  .game-start-button { min-height:64px; }
}
@media (prefers-reduced-motion:reduce) {
  .game-start-screen.is-leaving { animation-duration:.01ms; }
}
@media (max-width:620px) {
  .video-backdrop-layer img { filter:none; opacity:.82; }
}

/* ===== Mini games ===== */
.minigame-body {
  min-height:100vh;
  color:#eee4ca;
}
.minigame-shell {
  width:min(1180px,calc(100% - 28px));
  margin:auto;
  padding:14px 0 54px;
}
.minigame-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:72px;
  padding:10px 14px;
  border-color:rgba(208,169,94,.56);
}
.minigame-nav {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.minigame-nav a {
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:8px 13px;
  border:1px solid rgba(201,163,89,.28);
  color:#dac48d;
  background:linear-gradient(180deg,#111a25,#070c13);
  text-decoration:none;
  font-size:12px;
  font-weight:800;
}
.minigame-nav a:hover,
.minigame-nav a:focus-visible {
  border-color:#d0a65a;
  color:#fff0c9;
  outline:0;
}
.minigame-hero {
  position:relative;
  margin-top:14px;
  padding:clamp(24px,5vw,48px);
  overflow:hidden;
  border-color:rgba(201,163,89,.52);
}
.minigame-hero::after {
  content:"";
  position:absolute;
  right:-120px;
  top:-160px;
  width:420px;
  aspect-ratio:1;
  border:1px solid rgba(201,163,89,.18);
  border-radius:50%;
  box-shadow:0 0 0 48px rgba(201,163,89,.035),0 0 0 96px rgba(201,163,89,.02);
}
.minigame-hero h1,
.clicker-copy h1 {
  margin:8px 0 0;
  color:#f0dfb4;
  font:600 clamp(34px,6vw,58px)/1.08 "Yu Mincho","Hiragino Mincho ProN",serif;
  letter-spacing:.04em;
}
.minigame-hero p,
.clicker-copy p {
  max-width:720px;
  margin:14px 0 0;
  color:#bfc4c9;
  line-height:1.8;
}
.minigame-list-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
  margin-top:14px;
}
.minigame-card {
  position:relative;
  min-height:330px;
  padding:18px;
  overflow:hidden;
  border-color:rgba(201,163,89,.42);
  transform:translateY(calc(var(--card-index,0) * 0px));
}
.minigame-card::before,
.minigame-card::after {
  content:"";
  position:absolute;
  width:34px;
  height:34px;
  pointer-events:none;
}
.minigame-card::before {
  left:8px;
  top:8px;
  border-left:1px solid #d3aa5e;
  border-top:1px solid #d3aa5e;
}
.minigame-card::after {
  right:8px;
  bottom:8px;
  border-right:1px solid #d3aa5e;
  border-bottom:1px solid #d3aa5e;
}
.minigame-card-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.minigame-badge,
.minigame-number,
.minigame-reward {
  color:#e6c77d;
  font:700 10px/1 Georgia,serif;
  letter-spacing:.14em;
}
.minigame-badge {
  padding:6px 8px;
  border:1px solid rgba(201,163,89,.38);
  background:#142536;
}
.minigame-number { color:#777f8b; }
.minigame-card-icon {
  display:grid;
  place-items:center;
  width:120px;
  height:120px;
  margin:26px auto 20px;
  border:1px solid #c9a359;
  border-radius:50%;
  color:#f0d58e;
  background:
    radial-gradient(circle,#21486c 0 42%,#07111b 44% 62%,#c49b52 64% 67%,#08101a 69%);
  box-shadow:0 0 0 4px #05090e,0 0 0 5px rgba(201,163,89,.42),0 14px 28px #0008;
  font:800 13px/1 Georgia,serif;
  letter-spacing:.12em;
}
.minigame-card-icon img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
}
.minigame-card h2 {
  margin:0;
  color:#f0dfb4;
  font:600 24px/1.3 "Yu Mincho","Hiragino Mincho ProN",serif;
  text-align:center;
}
.minigame-card p {
  min-height:70px;
  margin:10px 0 13px;
  color:#aeb6bd;
  line-height:1.7;
  text-align:center;
}
.minigame-reward {
  text-align:center;
  color:#97c8ef;
}
.minigame-play-link {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  margin-top:16px;
  border:1px solid #d1aa5f;
  color:#fff1c9;
  background:linear-gradient(180deg,#8b672d,#4e3719);
  box-shadow:inset 0 1px rgba(255,255,255,.18),0 9px 24px #0007;
  text-decoration:none;
  font-weight:900;
  letter-spacing:.08em;
}
.minigame-play-link:hover,
.minigame-play-link:focus-visible {
  filter:brightness(1.13);
  outline:2px solid #f2d898;
  outline-offset:3px;
}
.clicker-shell {
  width:min(1280px,calc(100% - 28px));
}
.clicker-game {
  display:grid;
  grid-template-columns:minmax(310px,.9fr) minmax(360px,1.1fr);
  gap:18px;
  margin-top:14px;
  padding:clamp(16px,2.4vw,26px);
  border-color:rgba(201,163,89,.52);
  user-select:none;
  -webkit-user-select:none;
}
.clicker-copy {
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:560px;
  padding:clamp(10px,2vw,22px);
}
.clicker-stats {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-top:22px;
}
.clicker-stats div {
  min-height:76px;
  padding:11px;
  border:1px solid rgba(201,163,89,.26);
  background:#070c12;
}
.clicker-stats small {
  display:block;
  color:#8f948f;
  font-size:10px;
  font-weight:800;
}
.clicker-stats strong {
  display:block;
  margin-top:7px;
  color:#f0d58e;
  font:700 27px/1 Georgia,serif;
}
.clicker-actions {
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:18px;
}
.clicker-actions .btn {
  border-radius:2px;
}
.clicker-arena {
  position:relative;
  display:grid;
  place-items:center;
  min-height:560px;
}
.clicker-stage {
  position:relative;
  display:grid;
  place-items:center;
  width:min(100%,520px);
  height:min(70vh,620px);
  min-height:460px;
  overflow:hidden;
  border:1px solid #b88c45;
  background:
    radial-gradient(circle at 50% 42%,rgba(92,146,190,.26),transparent 28%),
    linear-gradient(180deg,#162638,#05090e 74%);
  box-shadow:inset 0 0 0 3px #05080d,inset 0 0 0 4px rgba(211,173,101,.22),0 18px 40px #0008;
}
.clicker-stage::before,
.clicker-stage::after {
  content:"";
  position:absolute;
  z-index:4;
  width:42px;
  height:42px;
  pointer-events:none;
}
.clicker-stage::before {
  left:8px;
  top:8px;
  border-left:2px solid #d2ac63;
  border-top:2px solid #d2ac63;
}
.clicker-stage::after {
  right:8px;
  bottom:8px;
  border-right:2px solid #d2ac63;
  border-bottom:2px solid #d2ac63;
}
.clicker-speed-lines {
  position:absolute;
  inset:-20%;
  opacity:.16;
  background:
    repeating-conic-gradient(from 0deg at 50% 48%,transparent 0 8deg,rgba(160,204,240,.45) 9deg 10deg);
}
.clicker-character {
  position:relative;
  z-index:2;
  width:min(90%,420px);
  height:min(96%,570px);
  object-fit:contain;
  object-position:center bottom;
  filter:drop-shadow(0 18px 22px rgba(0,0,0,.52));
  transform-origin:center 72%;
  user-select:none;
  -webkit-user-drag:none;
}
.clicker-character.is-hit {
  animation:clickerDamage .34s cubic-bezier(.2,.9,.2,1);
}
.hit-flash {
  position:absolute;
  z-index:3;
  width:220px;
  height:220px;
  border-radius:50%;
  opacity:0;
  background:radial-gradient(circle,rgba(255,239,166,.9),rgba(255,91,62,.58) 34%,transparent 68%);
  mix-blend-mode:screen;
  pointer-events:none;
}
.hit-flash.is-active {
  animation:hitFlash .18s ease-out;
}
.combo-pop {
  position:absolute;
  z-index:5;
  top:18%;
  right:12%;
  color:#fff3c2;
  opacity:0;
  font:900 clamp(28px,5vw,54px)/1 Georgia,serif;
  letter-spacing:.08em;
  text-shadow:0 0 18px #4fb9ff,3px 3px 0 #6a1e1e;
  pointer-events:none;
}
.combo-pop.is-active {
  animation:comboPop .26s ease-out;
}
.clicker-start-button,
.clicker-hit-button {
  position:absolute;
  z-index:8;
  bottom:clamp(10px,3vw,34px);
  display:grid;
  place-items:center;
  width:132px;
  height:132px;
  padding:0;
  border:2px solid #e0bc70;
  border-radius:50%;
  color:#fff2cb;
  box-shadow:0 0 0 3px #060b12,0 0 0 4px #8c6a35,0 16px 32px #000d,inset 0 0 18px #0009;
  cursor:pointer;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
}
.clicker-start-button {
  left:clamp(8px,3vw,42px);
  color:#173353;
  background:
    radial-gradient(circle at 35% 26%,rgba(255,255,255,.65),transparent 22%),
    linear-gradient(180deg,#f8fcff,#8fd8ff 52%,#3c91e6);
  touch-action:manipulation;
}
.clicker-hit-button {
  right:clamp(8px,3vw,42px);
  background:
    radial-gradient(circle at 35% 26%,rgba(255,255,255,.22),transparent 22%),
    radial-gradient(circle,#8a2430 0 40%,#51101b 42% 60%,#c79b4e 62% 65%,#09111b 67%);
  touch-action:none;
}
.clicker-start-button span,
.clicker-hit-button span {
  margin-top:18px;
  font:700 25px/1 "Yu Mincho","Hiragino Mincho ProN",serif;
  letter-spacing:.08em;
}
.clicker-start-button small,
.clicker-hit-button small {
  margin-top:-28px;
  color:#f0d58e;
  font:700 9px/1 Georgia,serif;
  letter-spacing:.18em;
}
.clicker-start-button small {
  color:#10456f;
}
.clicker-start-button:hover:not(:disabled),
.clicker-start-button:focus-visible:not(:disabled),
.clicker-hit-button:hover:not(:disabled),
.clicker-hit-button:focus-visible:not(:disabled) {
  filter:brightness(1.12);
  outline:0;
}
.clicker-start-button:active:not(:disabled),
.clicker-hit-button:active:not(:disabled) {
  transform:translateY(5px) scale(.98);
}
.clicker-start-button:disabled,
.clicker-hit-button:disabled {
  cursor:not-allowed;
  opacity:.48;
  filter:grayscale(.5);
}
@keyframes clickerDamage {
  20%,70% { transform:translateX(-16px) rotate(-2deg) scale(1.03); filter:drop-shadow(0 18px 22px rgba(0,0,0,.52)) brightness(1.28); }
  45% { transform:translateX(18px) rotate(2deg) scale(.99); }
}
@keyframes hitFlash {
  from { opacity:0; transform:scale(.35); }
  48% { opacity:1; }
  to { opacity:0; transform:scale(1.35); }
}
@keyframes comboPop {
  from { opacity:0; transform:translateY(16px) scale(.72) rotate(-8deg); }
  40% { opacity:1; }
  to { opacity:0; transform:translateY(-22px) scale(1.08) rotate(4deg); }
}
@media (max-width:900px) {
  .minigame-header {
    align-items:flex-start;
    flex-direction:column;
  }
  .minigame-nav {
    justify-content:flex-start;
  }
  .clicker-game {
    grid-template-columns:1fr;
  }
  .clicker-copy {
    min-height:auto;
  }
  .clicker-arena {
    min-height:510px;
  }
}
@media (max-width:620px) {
  .minigame-shell,
  .clicker-shell {
    width:calc(100% - 16px);
    padding-top:8px;
  }
  .minigame-hero {
    padding:22px 18px;
  }
  .minigame-hero h1,
  .clicker-copy h1 {
    font-size:32px;
  }
  .minigame-card {
    min-height:300px;
  }
  .clicker-game {
    padding:10px;
  }
  .clicker-stats {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
  }
  .clicker-stats div {
    min-height:62px;
    padding:8px 6px;
  }
  .clicker-stats small {
    font-size:8px;
  }
  .clicker-stats strong {
    font-size:20px;
  }
  .clicker-stage {
    width:100%;
    height:500px;
    min-height:500px;
  }
  .clicker-character {
    width:92%;
    height:92%;
  }
  .clicker-start-button,
  .clicker-hit-button {
    right:12px;
    bottom:14px;
    width:106px;
    height:106px;
  }
  .clicker-start-button {
    left:12px;
    right:auto;
  }
  .clicker-hit-button span,
  .clicker-start-button span {
    font-size:20px;
  }
  .clicker-hit-button small,
  .clicker-start-button small {
    margin-top:-22px;
  }
}

/* ===== Mobile social-game polish ===== */
.mission-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:10px;
  color:#aaa393;
  font-size:9px;
  font-weight:800;
}
.mission-progress-track {
  position:relative;
  height:7px;
}
.mission-progress-track::after {
  content:"";
  position:absolute;
  inset:-3px;
  border:1px solid rgba(226,187,105,.16);
  pointer-events:none;
}
.mission-progress-track i {
  transition:width .4s cubic-bezier(.2,.8,.2,1);
}
.stage-punish-button:not(:disabled) {
  animation:ctaReadyGlow 2.1s ease-in-out infinite;
}
.stage-punish-button:not(:disabled)::before {
  content:"";
  position:absolute;
  inset:-10px;
  z-index:-1;
  border:1px solid rgba(235,202,126,.24);
  border-radius:50%;
  animation:ctaRing 2.1s ease-out infinite;
}
.stage-punish-button:active:not(:disabled) {
  transform:translateY(7px) scale(.94);
  box-shadow:0 0 0 3px #060b12,0 0 0 4px #8c6a35,0 5px 10px #000d,inset 0 7px 18px #000b;
  animation:none;
}
.stage-punish-button:disabled {
  opacity:.42;
  filter:grayscale(.82) brightness(.68);
  box-shadow:0 0 0 3px #060b12,0 0 0 4px #4f473a,0 8px 18px #0009;
  animation:none;
}
.stage-punish-button:disabled::before { display:none; }
.modern-item {
  filter:brightness(1.03);
  transition:transform .16s ease,filter .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.modern-item:not(:disabled):hover {
  filter:brightness(1.15);
}
.item-choice.modern-item.selected {
  border-color:#f1c96f;
  border-left:4px solid #f1c96f;
  outline:1px solid rgba(241,201,111,.78);
  outline-offset:2px;
  filter:brightness(1.18);
  box-shadow:inset 0 0 0 2px #080d13,0 0 0 1px #8c672b,0 0 22px rgba(225,180,91,.28),0 10px 24px #000b;
}
.item-choice.modern-item.selected::before {
  width:23px;
  height:23px;
  border-color:#f2cf80;
}
.modern-item:active:not(:disabled) {
  transform:translateY(2px) scale(.985);
  filter:brightness(1.22);
}
.modern-item.locked,
.modern-item:disabled {
  opacity:.48;
  filter:grayscale(.72) brightness(.62);
  cursor:not-allowed;
}
.modern-item.locked::after,
.modern-item:disabled::after {
  content:"LOCK";
  inset:50% auto auto 50%;
  width:auto;
  height:auto;
  padding:5px 9px;
  border:1px solid rgba(218,191,134,.5);
  color:#d6c7a8;
  background:rgba(4,8,13,.9);
  transform:translate(-50%,-50%) rotate(-7deg);
  opacity:1;
  filter:none;
  font:800 8px/1 Georgia,serif;
  letter-spacing:.14em;
}
.card-reward {
  position:absolute;
  left:91px;
  bottom:8px;
  color:#e3be68;
  font:700 10px/1 Georgia,serif;
  font-style:normal;
}
.item-level {
  min-width:42px;
  padding:3px 6px;
  border:1px solid rgba(201,163,89,.24);
  background:#080d13;
  text-align:center;
}
.rarity-normal .item-level,
.modern-item.orange .item-level,
.modern-item.green .item-level { color:#d2c8b5; }
.rarity-rare .item-level,
.modern-item.cyan .item-level { color:#b7efff; border-color:rgba(80,217,255,.4); background:#092333; }
.rarity-member .item-level,
.modern-item.purple .item-level,
.modern-item.red .item-level { color:#e0c5ff; border-color:rgba(183,117,255,.4); background:#20152e; }
.rarity-premium .item-level,
.modern-item.gold .item-level { color:#ffe599; border-color:rgba(255,213,106,.62); background:#3a2a10; box-shadow:0 0 9px rgba(255,213,106,.15); }
.nexus-mobile-nav a {
  position:relative;
  transition:transform .12s ease,color .12s ease,background .12s ease;
  touch-action:manipulation;
}
.nexus-mobile-nav a:active {
  transform:translateY(3px) scale(.96);
  background:rgba(201,163,89,.16);
}
.nexus-mobile-nav a.active {
  color:#f1d58e;
  background:linear-gradient(180deg,rgba(201,163,89,.16),rgba(201,163,89,.045));
  box-shadow:inset 0 2px #d4aa5a;
}
.nav-badge {
  position:absolute;
  right:5px;
  top:3px;
  padding:2px 4px;
  border:1px solid #ffd38a;
  border-radius:6px;
  color:#fff;
  background:#a92b31;
  box-shadow:0 2px 5px #0009;
  font-size:6px;
  font-style:normal;
  line-height:1;
}
.nav-dot {
  position:absolute;
  right:8px;
  top:7px;
  width:7px;
  height:7px;
  border:1px solid #ffe2a4;
  border-radius:50%;
  background:#e34b4f;
  box-shadow:0 0 8px #e34b4f;
}
.result-reward-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-top:12px;
}
.result-reward-summary div {
  padding:10px 8px;
  border:1px solid rgba(201,163,89,.28);
  background:#070c12;
  text-align:center;
}
.result-reward-summary span {
  display:block;
  color:#8f948f;
  font-size:8px;
}
.result-reward-summary b {
  display:block;
  margin-top:5px;
  color:#f0d58e;
  font:700 15px/1 Georgia,serif;
}
.result-progress {
  height:8px;
  margin-top:8px;
  overflow:hidden;
  border:1px solid #463a25;
  background:#05080c;
}
.result-progress i {
  display:block;
  height:100%;
  background:linear-gradient(90deg,#896020,#f0c96f,#8d6220);
  box-shadow:0 0 10px #d6a94e;
  transition:width .45s ease;
}
.game-modal:not(.hidden) .result-score {
  animation:rewardScorePop .46s cubic-bezier(.2,1.35,.35,1);
}
.game-modal:not(.hidden) .result-visual::after {
  content:"+ REWARD";
  position:absolute;
  right:10px;
  top:8px;
  color:#ffe9a8;
  opacity:0;
  font:800 9px/1 Georgia,serif;
  letter-spacing:.16em;
  animation:rewardFloat 1.15s ease-out .18s;
}
@keyframes ctaReadyGlow {
  0%,100% { filter:brightness(1); box-shadow:0 0 0 3px #060b12,0 0 0 4px #8c6a35,0 14px 30px #000c,inset 0 0 18px #0009; }
  50% { filter:brightness(1.12); box-shadow:0 0 0 3px #060b12,0 0 0 4px #e0bc70,0 0 30px rgba(224,188,112,.34),0 16px 34px #000c,inset 0 0 20px rgba(223,182,94,.18); }
}
@keyframes ctaRing {
  from { opacity:.55; transform:scale(.88); }
  to { opacity:0; transform:scale(1.14); }
}
@keyframes rewardScorePop { from { opacity:0; transform:scale(.65) translateY(12px); } to { opacity:1; transform:none; } }
@keyframes rewardFloat { 0% { opacity:0; transform:translateY(12px); } 35% { opacity:1; } 100% { opacity:0; transform:translateY(-22px); } }
@media (max-width:620px) {
  .game-modal {
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  .result-modal-card {
    margin:16px auto calc(16px + env(safe-area-inset-bottom));
  }
  .stage-punish-button {
    width:94px;
    height:94px;
  }
  .modern-item {
    position:relative;
    min-height:148px;
  }
  .card-reward {
    left:7px;
    bottom:7px;
    font-size:8px;
  }
  .item-level { min-width:0; }
  .nexus-mobile-nav {
    min-height:66px;
    padding:6px calc(5px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(5px + env(safe-area-inset-left));
  }
  .nexus-mobile-nav a {
    min-height:56px;
    font-size:9px;
  }
  .result-reward-summary { gap:4px; }
  .result-reward-summary div { padding:8px 4px; }
  .result-reward-summary b { font-size:12px; }
}
@media (max-width:390px) {
  .event-card { width:138px; }
  .stage-punish-button { right:10px; width:86px; height:86px; }
  .modern-item-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .modern-item { min-height:140px; }
}
@media (max-width:360px) {
  .stage-punish-button { width:80px; height:80px; }
  .nexus-mobile-nav a { min-height:54px; font-size:8px; }
}

/* ===== Variety-show arcade skin ===== */
.nexus-body {
  --nx-blue:#ffeb00;
  --nx-cyan:#00f0ff;
  --nx-gold:#ffdc00;
  --nx-text:#fff9dc;
  --nx-muted:#d4c7b8;
  --nx-line:rgba(255,226,0,.58);
  background:
    repeating-radial-gradient(circle at 10% 15%,rgba(255,226,0,.08) 0 2px,transparent 3px 18px),
    linear-gradient(135deg,#24000f 0 34%,#08000d 34% 67%,#00202a 67%);
}
.nexus-bg {
  background:
    radial-gradient(circle at 12% 18%,rgba(255,45,0,.38),transparent 29%),
    radial-gradient(circle at 88% 22%,rgba(0,229,255,.25),transparent 28%),
    repeating-linear-gradient(118deg,transparent 0 44px,rgba(255,225,0,.035) 45px 48px);
}
.glass,
.glass-dark,
.account-card,
.intel-card,
.command-deck,
.news-ticker {
  border:2px solid #ffd900;
  border-radius:7px 2px 9px 3px;
  background-color:#100815;
  box-shadow:4px 4px 0 #c71941,8px 8px 0 #050207;
}
.nexus-header {
  border-width:3px;
  border-color:#ffe500;
  background:
    repeating-linear-gradient(135deg,rgba(255,255,255,.045) 0 5px,transparent 5px 13px),
    linear-gradient(90deg,#3b0017,#110510 54%,#002f3a);
  box-shadow:inset 0 -5px #c71941,5px 6px 0 #050207;
}
.nexus-header::before,
.nexus-header::after {
  background:#00eaff;
  box-shadow:0 0 0 2px #101010;
}
.nexus-brand b {
  color:#fff000;
  font-weight:950;
  letter-spacing:.055em;
  text-shadow:2px 2px 0 #e0183c,4px 4px 0 #090207;
}
.nexus-brand small,
.overline {
  color:#00efff;
  font-family:Arial,sans-serif;
  font-weight:950;
  text-shadow:1px 1px #000;
}
.brand-sigil {
  border:3px solid #fff000;
  box-shadow:0 0 0 3px #e31b43,4px 4px 0 #000;
}
.tier-badge,
.resource-pill,
.icon-button {
  border:2px solid #ffd900;
  border-radius:2px 9px 2px 9px;
  color:#fff;
  background:#1c071a;
  box-shadow:inset 0 -4px #7f102d,3px 3px 0 #000;
}
.resource-pill strong,
.resource-pill.accent strong {
  color:#fff000;
  text-shadow:1px 1px #e0183c;
}
.icon-button {
  color:#fff000;
  background:#b90f36;
}
.rail-action {
  border:2px solid #ffdc00;
  border-radius:12px 2px;
  color:#fff4cf;
  background:#210817;
  box-shadow:3px 3px 0 #050207;
}
.rail-action:hover,
.rail-action.active {
  border-color:#fff000;
  color:#120008;
  background:#ffe500;
  box-shadow:inset 0 -6px #ff6a00,3px 3px 0 #be1239,6px 6px 0 #000;
}
.rail-action em,
.nav-badge {
  border:2px solid #fff;
  border-radius:2px;
  background:#f00045;
  transform:rotate(5deg);
}
.world-scene {
  border:3px solid #ffdd00;
  box-shadow:inset 0 0 0 5px #b41135,7px 8px 0 #050207;
}
.event-card {
  border:3px solid #111;
  border-radius:3px;
  color:#18000a;
  background:
    repeating-linear-gradient(-45deg,rgba(255,90,0,.15) 0 5px,transparent 5px 11px),
    #ffe800;
  box-shadow:5px 5px 0 #e51d42,9px 9px 0 #070207;
  transform:rotate(-1deg);
}
.event-card .overline {
  color:#fff;
  background:#d5143e;
  padding:4px 7px;
  margin:-8px -4px 5px;
  transform:skewX(-8deg);
}
.event-card strong,
.event-card small,
.event-card .mission-meta {
  color:#16020a;
  text-shadow:none;
}
.mission-progress-track {
  border:2px solid #170109;
  background:#fff;
}
.mission-progress-track i {
  background:repeating-linear-gradient(90deg,#ec174c 0 10px,#ff7800 10px 20px);
  box-shadow:none;
}
.character-identity {
  border:3px solid #fff000;
  border-left:9px solid #00eaff;
  border-radius:0 16px 0 16px;
  background:linear-gradient(90deg,#c70e3c 0 72%,#4f001c);
  box-shadow:5px 5px 0 #080107;
  transform:rotate(-.6deg);
}
.character-identity .rarity {
  color:#00f3ff;
  font-family:Arial,sans-serif;
  font-weight:950;
}
.character-identity h1 {
  color:#fff000;
  font-weight:950;
  text-shadow:3px 3px 0 #180008;
}
.character-identity p { color:#fff; }
.stage-punish-button {
  border:4px solid #fff000;
  border-radius:24% 42% 25% 44%;
  color:#fff;
  background:
    radial-gradient(circle at 35% 26%,#fff 0 4%,transparent 5%),
    repeating-conic-gradient(from 5deg,#ffed00 0 8deg,#e7003f 8deg 16deg);
  box-shadow:0 0 0 4px #101010,7px 8px 0 #00c9df,inset 0 -14px rgba(92,0,28,.55);
  transform:rotate(2deg);
}
.stage-punish-button::after {
  border:3px dashed #fff;
  border-radius:27% 40%;
}
.stage-punish-button strong {
  color:#fff;
  font-weight:950;
  text-shadow:2px 2px 0 #850020,3px 3px 0 #000;
}
.stage-punish-button small {
  color:#fff600;
  text-shadow:1px 1px #000;
}
.stage-punish-button:hover {
  filter:brightness(1.08) saturate(1.15);
  box-shadow:0 0 0 4px #101010,8px 10px 0 #00e7ff,inset 0 -14px rgba(92,0,28,.55);
}
.stage-punish-button:not(:disabled) {
  animation:varietyCtaBounce 1.55s steps(2,end) infinite;
}
.stage-punish-button:not(:disabled)::before {
  border:3px dotted #fff000;
  border-radius:28% 45%;
}
.command-deck {
  border:3px solid #00eaff;
  border-top:8px solid #ffdc00;
  border-radius:5px 18px 5px 18px;
  background:
    repeating-linear-gradient(135deg,rgba(255,255,255,.035) 0 6px,transparent 6px 14px),
    #26091d;
  box-shadow:6px 7px 0 #c30e39,10px 11px 0 #050207;
}
.command-deck::before {
  height:5px;
  background:repeating-linear-gradient(90deg,#ffed00 0 22px,#ed1748 22px 44px,#00e8ff 44px 66px);
}
.deck-head h2 {
  color:#fff000;
  font-weight:950;
  text-shadow:2px 2px #ca123d;
}
.deck-head a,
.intel-card a {
  color:#00efff;
  font-weight:950;
  text-decoration:underline;
  text-decoration-thickness:2px;
}
.modern-item,
.item-choice.modern-item:nth-child(n) {
  border:3px solid var(--card-color,#ffcf00);
  border-radius:4px 15px 4px 15px;
  background:#170b17;
  box-shadow:inset 0 -7px color-mix(in srgb,var(--card-color) 22%,transparent),4px 5px 0 #050207;
  clip-path:polygon(0 0,94% 0,100% 12%,100% 100%,6% 100%,0 88%);
}
.modern-item.orange { --card-color:#ff7a00; }
.modern-item.cyan { --card-color:#00dff2; }
.modern-item.green { --card-color:#8bea00; }
.modern-item.purple { --card-color:#c13cff; }
.modern-item.red { --card-color:#ff244f; }
.modern-item.gold { --card-color:#ffe500; }
.modern-item img {
  border:3px solid #fff;
  border-radius:3px 13px 3px 13px;
  background:#fff5cf;
  box-shadow:3px 3px 0 var(--card-color);
}
.modern-item strong {
  color:#fff;
  font-weight:950;
  text-shadow:2px 2px #000;
}
.modern-item small { color:#ddd1d3; }
.item-level {
  border:2px solid #fff;
  border-radius:2px;
  color:#120009!important;
  background:var(--card-color)!important;
  box-shadow:2px 2px #000!important;
  font-family:Arial,sans-serif;
  font-weight:950;
  transform:rotate(-2deg);
}
.card-reward {
  color:#fff000;
  font-family:Arial,sans-serif;
  font-size:11px;
  font-weight:950;
  text-shadow:2px 2px #b60035;
}
.modern-item:not(:disabled):hover,
.item-choice.modern-item.selected {
  border-color:#fff;
  outline:4px solid #ffe600;
  outline-offset:1px;
  filter:saturate(1.2) brightness(1.08);
  box-shadow:inset 0 -8px color-mix(in srgb,var(--card-color) 38%,transparent),5px 6px 0 var(--card-color),9px 10px 0 #000;
}
.modern-item.locked,
.modern-item:disabled {
  opacity:.5;
  filter:grayscale(.8) contrast(1.1);
}
.account-card,
.intel-card {
  border-color:#ffdc00;
  background:
    repeating-linear-gradient(120deg,rgba(255,255,255,.025) 0 5px,transparent 5px 12px),
    #170a18;
}
.account-card:nth-child(odd),
.promo-card { border-left:7px solid #00eaff; }
.premium-card { border-left:7px solid #ffae00; background:#2c0c18; }
.social-card { border-left:7px solid #e51b4d; }
.account-cta {
  border:2px solid #fff000;
  border-radius:2px 12px;
  color:#fff;
  background:#c5113b;
  box-shadow:inset 0 -5px #76001f,3px 3px #000;
  font-weight:950;
}
.news-ticker {
  border:3px solid #fff000;
  border-radius:2px;
  background:#d51642;
  box-shadow:5px 5px #050207;
}
.news-ticker > span {
  color:#0d0006;
  background:#ffed00;
  font-weight:950;
}
.news-ticker > b,
.news-ticker > p { color:#fff; }
.social-link,
.menu-social-links a {
  border-width:2px;
  border-radius:3px 11px;
  background:#1d0b19;
  box-shadow:3px 3px #050207;
}
.nexus-mobile-nav {
  border:3px solid #ffdf00;
  border-radius:4px 14px 4px 14px;
  background:#210617;
  box-shadow:0 -5px 0 #d1123d,5px 5px #000;
}
.nexus-mobile-nav a {
  color:#fff;
  border-right:2px solid #6d1530;
}
.nexus-mobile-nav a.active {
  color:#160008;
  background:#ffdf00;
  box-shadow:inset 0 -6px #ff7400;
  font-weight:950;
}
.result-modal-card,
.game-panel-surface {
  border-color:#ffdc00;
}
.result-modal-card {
  border:4px solid #ffdc00;
  border-radius:5px 19px;
  background:#210817;
  box-shadow:8px 9px 0 #d01440,13px 14px 0 #000;
}
.result-score {
  color:#fff000!important;
  text-shadow:3px 3px #d0003a;
}
.result-reward-summary div {
  border:2px solid #00dff2;
  border-radius:3px 10px;
  background:#26091d;
}
.game-start-button {
  border:4px solid #fff000;
  border-radius:7px 22px;
  color:#fff;
  background:#dc0e42;
  box-shadow:inset 0 -9px #7d0022,6px 7px 0 #00dceb,10px 11px 0 #000;
  transform:rotate(-1deg);
}
@keyframes varietyCtaBounce {
  0%,100% { transform:rotate(2deg) translateY(0); }
  50% { transform:rotate(-1deg) translateY(-3px); }
}
@media (max-width:620px) {
  .nexus-header { box-shadow:inset 0 -4px #c71941,3px 4px 0 #050207; }
  .event-card { transform:rotate(-.5deg); box-shadow:3px 3px 0 #e51d42,6px 6px 0 #070207; }
  .character-identity { transform:none; border-left-width:6px; }
  .stage-punish-button { box-shadow:0 0 0 3px #101010,5px 6px 0 #00c9df,inset 0 -11px rgba(92,0,28,.55); }
  .command-deck { box-shadow:4px 5px 0 #c30e39,7px 8px 0 #050207; }
  .modern-item,
  .item-choice.modern-item:nth-child(n) {
    border-width:2px;
    box-shadow:inset 0 -6px color-mix(in srgb,var(--card-color) 22%,transparent),2px 3px 0 #050207;
  }
}

/* ===== Bright mobile-gacha skin, tuned down from the yellow arcade pass ===== */
.nexus-body {
  --nx-blue:#53a9ff;
  --nx-cyan:#68e5ff;
  --nx-gold:#ffd87a;
  --nx-text:#fffafd;
  --nx-muted:#d9e4ef;
  --nx-line:rgba(157,211,255,.58);
  background:
    radial-gradient(circle at 18% 6%,rgba(93,176,255,.26),transparent 30%),
    radial-gradient(circle at 82% 12%,rgba(255,111,173,.2),transparent 28%),
    linear-gradient(145deg,#071729 0,#102b47 48%,#1b1030 100%);
}
.nexus-bg {
  background:
    radial-gradient(circle at 18% 16%,rgba(88,174,255,.34),transparent 33%),
    radial-gradient(circle at 84% 24%,rgba(255,118,176,.24),transparent 30%),
    repeating-linear-gradient(90deg,rgba(255,255,255,.035) 0 1px,transparent 1px 36px),
    linear-gradient(180deg,rgba(54,146,232,.16),transparent);
}
.glass,
.glass-dark,
.account-card,
.intel-card,
.command-deck,
.news-ticker {
  border:1px solid rgba(177,224,255,.64);
  border-radius:18px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.035)),
    rgba(10,26,47,.84);
  box-shadow:0 14px 30px rgba(4,15,32,.34),inset 0 1px rgba(255,255,255,.28);
}
.nexus-header {
  border:1px solid rgba(194,229,255,.72);
  border-radius:18px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.06)),
    linear-gradient(90deg,rgba(16,57,98,.96),rgba(28,42,84,.96) 58%,rgba(78,35,91,.94));
  box-shadow:0 10px 24px rgba(0,25,59,.34),inset 0 -3px rgba(55,152,238,.32);
}
.nexus-header::before,
.nexus-header::after {
  background:linear-gradient(90deg,transparent,rgba(255,139,196,.78),rgba(112,207,255,.82),transparent);
  box-shadow:none;
}
.brand-sigil {
  border:3px solid #fff;
  box-shadow:0 0 0 2px #5fb9ff,0 4px 14px rgba(255,106,174,.34);
}
.nexus-brand b {
  color:#fff;
  text-shadow:0 2px 0 #2a5790,0 0 14px rgba(120,205,255,.42);
}
.nexus-brand small,
.overline {
  color:#91dcff;
  font-family:Arial,sans-serif;
  text-shadow:none;
}
.tier-badge,
.resource-pill,
.icon-button {
  border:1px solid rgba(211,236,255,.78);
  border-radius:13px;
  color:#fff;
  background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(12,31,57,.82));
  box-shadow:0 5px 12px rgba(0,18,44,.26),inset 0 1px rgba(255,255,255,.34);
}
.resource-pill strong,
.resource-pill.accent strong {
  color:#fff2a7;
  text-shadow:0 1px 0 #7b4b00;
}
.icon-button {
  background:linear-gradient(180deg,#ff8fc0,#e94686 58%,#b72868);
}
.rail-action {
  border:1px solid rgba(203,233,255,.68);
  border-radius:19px;
  color:#f4faff;
  background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(11,30,56,.86));
  box-shadow:0 7px 14px rgba(0,18,45,.34),inset 0 1px rgba(255,255,255,.26);
}
.rail-action:hover,
.rail-action.active {
  border-color:#fff;
  color:#fff;
  background:linear-gradient(180deg,#80d9ff,#4d95f0 56%,#5e58d5);
  box-shadow:0 8px 18px rgba(37,126,230,.32),inset 0 2px rgba(255,255,255,.34);
}
.rail-action em,
.nav-badge {
  border:2px solid #fff;
  border-radius:999px;
  background:linear-gradient(180deg,#ff86ba,#e53077);
  transform:none;
}
.world-scene {
  border:1px solid rgba(183,224,255,.72);
  border-radius:18px;
  box-shadow:0 18px 38px rgba(0,16,42,.38),inset 0 0 0 1px rgba(255,255,255,.12);
}
.event-card {
  border:1px solid rgba(255,255,255,.72);
  border-radius:14px;
  color:#26344e;
  background:
    linear-gradient(180deg,rgba(255,255,255,.92),rgba(255,255,255,.76)),
    linear-gradient(120deg,#dff4ff,#ffe1ef);
  box-shadow:0 8px 20px rgba(0,22,52,.22);
  transform:none;
}
.event-card .overline {
  display:inline-block;
  color:#fff;
  background:linear-gradient(90deg,#ff7fb6,#ff4f95);
  border-radius:999px;
  padding:4px 9px;
  margin:0 0 5px;
  transform:none;
}
.event-card strong,
.event-card small,
.event-card .mission-meta {
  color:#223450;
}
.mission-progress-track {
  border:1px solid rgba(59,118,183,.26);
  border-radius:999px;
  background:#e9f5ff;
}
.mission-progress-track i {
  border-radius:999px;
  background:linear-gradient(90deg,#5cb9ff,#ff81bb);
  box-shadow:0 0 10px rgba(92,185,255,.32);
}
.character-identity {
  border:1px solid rgba(255,255,255,.72);
  border-left:5px solid #ff78b2;
  border-radius:16px;
  background:linear-gradient(90deg,rgba(28,47,83,.84),rgba(29,36,70,.68));
  box-shadow:0 8px 20px rgba(0,16,46,.3),inset 0 1px rgba(255,255,255,.24);
  transform:none;
}
.character-identity .rarity { color:#91dcff; }
.character-identity h1 {
  color:#fff;
  text-shadow:0 2px 0 #284a7e,0 0 12px rgba(97,190,255,.35);
}
.character-identity p { color:#eef7ff; }
.stage-punish-button {
  width:152px;
  height:76px;
  right:24px;
  bottom:22px;
  display:grid;
  grid-template-columns:36px 1fr;
  grid-template-rows:1fr 1fr;
  align-items:center;
  justify-items:start;
  column-gap:8px;
  padding:8px 18px 8px 14px;
  border:3px solid #fff;
  border-radius:999px;
  color:#fff;
  background:
    radial-gradient(circle at 18% 20%,rgba(255,255,255,.75),transparent 17%),
    linear-gradient(180deg,#ff8abf 0,#ff4f97 48%,#d82c72 49%,#a61652 100%);
  box-shadow:0 0 0 3px rgba(80,175,255,.72),0 9px 18px rgba(2,19,44,.44),inset 0 3px rgba(255,255,255,.34),inset 0 -8px rgba(100,0,43,.25);
  transform:none;
}
.stage-punish-button::before {
  display:none;
}
.stage-punish-button::after {
  inset:6px;
  border:1px solid rgba(255,255,255,.46);
  border-radius:999px;
}
.stage-punish-icon {
  grid-row:1 / 3;
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:50%;
  color:#ff4f95;
  background:#fff;
  box-shadow:0 2px 5px rgba(0,0,0,.2);
  font-size:18px;
}
.stage-punish-button strong {
  margin:0;
  align-self:end;
  color:#fff;
  font-size:17px;
  font-weight:950;
  line-height:1;
  letter-spacing:.04em;
  text-shadow:0 2px 0 #8e1648;
}
.stage-punish-button small {
  margin:0;
  align-self:start;
  color:#ffe9f3;
  font-size:10px;
  font-weight:950;
  letter-spacing:.12em;
  text-shadow:0 1px 0 #8e1648;
}
.stage-punish-button:hover {
  filter:brightness(1.06);
  box-shadow:0 0 0 3px rgba(80,175,255,.86),0 11px 21px rgba(2,19,44,.5),inset 0 3px rgba(255,255,255,.38),inset 0 -8px rgba(100,0,43,.25);
}
.stage-punish-button:active:not(:disabled) {
  transform:translateY(4px) scale(.985);
  box-shadow:0 0 0 3px rgba(80,175,255,.76),0 4px 10px rgba(2,19,44,.42),inset 0 4px rgba(100,0,43,.16);
}
.stage-punish-button:not(:disabled) {
  animation:softCtaPulse 2.2s ease-in-out infinite;
}
.command-deck {
  border:1px solid rgba(183,224,255,.68);
  border-top:1px solid rgba(255,255,255,.6);
  border-radius:18px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.04)),
    rgba(10,29,55,.86);
  box-shadow:0 14px 28px rgba(0,16,43,.3),inset 0 1px rgba(255,255,255,.24);
}
.command-deck::before {
  height:4px;
  left:18px;
  right:18px;
  border-radius:999px;
  background:linear-gradient(90deg,#5cc6ff,#ff7db7,#a997ff);
}
.deck-head h2 {
  color:#fff;
  text-shadow:0 2px 0 #284a7e;
}
.deck-head a,
.intel-card a {
  color:#8fe4ff;
  text-decoration:none;
}
.modern-item,
.item-choice.modern-item:nth-child(n) {
  border:1px solid color-mix(in srgb,var(--card-color,#72c9ff) 62%,white);
  border-radius:16px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.05)),
    rgba(14,32,61,.88);
  box-shadow:0 8px 16px rgba(0,19,47,.28),inset 0 1px rgba(255,255,255,.24);
  clip-path:none;
}
.modern-item.orange { --card-color:#ff9b64; }
.modern-item.cyan { --card-color:#67ddff; }
.modern-item.green { --card-color:#8bdcff; }
.modern-item.purple { --card-color:#b690ff; }
.modern-item.red { --card-color:#ff78a8; }
.modern-item.gold { --card-color:#ffd47e; }
.modern-item img {
  border:1px solid rgba(255,255,255,.82);
  border-radius:15px;
  background:linear-gradient(180deg,#ffffff,#eef7ff);
  box-shadow:0 4px 10px rgba(0,22,55,.2);
}
.modern-item strong {
  color:#fff;
  text-shadow:0 2px 0 #1f416e;
}
.modern-item small { color:#dcecff; }
.item-level {
  border:1px solid rgba(255,255,255,.9);
  border-radius:999px;
  color:#fff!important;
  background:linear-gradient(180deg,var(--card-color),color-mix(in srgb,var(--card-color) 65%,#3a5aa8))!important;
  box-shadow:0 2px 6px rgba(0,19,48,.24)!important;
  transform:none;
}
.card-reward {
  color:#ffe893;
  text-shadow:0 1px 0 #7e4a00;
}
.modern-item:not(:disabled):hover,
.item-choice.modern-item.selected {
  border-color:#fff;
  outline:2px solid color-mix(in srgb,var(--card-color) 55%,white);
  filter:brightness(1.06);
  box-shadow:0 10px 20px color-mix(in srgb,var(--card-color) 22%,transparent),inset 0 1px rgba(255,255,255,.32);
}
.account-card,
.intel-card {
  border-color:rgba(183,224,255,.62);
  background:
    linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.04)),
    rgba(12,30,57,.86);
}
.account-card:nth-child(odd),
.promo-card,
.premium-card,
.social-card {
  border-left:1px solid rgba(183,224,255,.62);
}
.account-cta {
  border:2px solid #fff;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(180deg,#66c6ff,#4088ee 56%,#4d57ce);
  box-shadow:0 6px 12px rgba(0,24,62,.3),inset 0 2px rgba(255,255,255,.3);
}
.news-ticker {
  border:1px solid rgba(183,224,255,.62);
  border-radius:16px;
  background:linear-gradient(90deg,rgba(22,55,96,.9),rgba(55,40,94,.82));
  box-shadow:0 10px 22px rgba(0,17,43,.28);
}
.news-ticker > span {
  color:#fff;
  background:#ff64a2;
  border-radius:999px;
}
.social-link,
.menu-social-links a {
  border:1px solid rgba(202,233,255,.65);
  border-radius:14px;
  background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(11,30,57,.88));
  box-shadow:0 6px 13px rgba(0,20,50,.24);
}
.nexus-mobile-nav {
  border:1px solid rgba(211,236,255,.8);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(12,28,55,.92));
  box-shadow:0 -8px 24px rgba(0,19,50,.28),inset 0 1px rgba(255,255,255,.26);
}
.nexus-mobile-nav a {
  color:#e8f4ff;
  border-right:1px solid rgba(255,255,255,.12);
}
.nexus-mobile-nav a.active {
  color:#fff;
  background:linear-gradient(180deg,#ff8fc0,#ea4f93);
  border-radius:14px;
  box-shadow:0 5px 11px rgba(164,20,86,.25),inset 0 2px rgba(255,255,255,.28);
}
.result-modal-card {
  border:1px solid rgba(211,236,255,.8);
  border-radius:20px;
  background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(10,29,55,.96));
  box-shadow:0 18px 36px rgba(0,18,50,.42);
}
.result-score {
  color:#ff86ba!important;
  text-shadow:0 2px 0 #71163e;
}
.game-start-button {
  border:3px solid #fff;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(180deg,#ff8fc0,#e94f93 56%,#b8296a);
  box-shadow:0 0 0 3px rgba(91,184,255,.7),0 10px 20px rgba(0,24,60,.34),inset 0 3px rgba(255,255,255,.28);
  transform:none;
}
@keyframes softCtaPulse {
  0%,100% { filter:brightness(1); }
  50% { filter:brightness(1.08); }
}
@media (max-width:620px) {
  .nexus-header { box-shadow:0 8px 18px rgba(0,20,52,.3),inset 0 -2px rgba(83,169,255,.28); }
  .event-card { box-shadow:0 6px 16px rgba(0,22,52,.2); }
  .stage-punish-button {
    right:13px;
    bottom:18px;
    width:122px;
    height:66px;
    grid-template-columns:30px 1fr;
    padding:7px 14px 7px 10px;
    border-width:3px;
    box-shadow:0 0 0 3px rgba(80,175,255,.72),0 8px 16px rgba(2,19,44,.38),inset 0 3px rgba(255,255,255,.3),inset 0 -7px rgba(100,0,43,.22);
  }
  .stage-punish-icon {
    width:29px;
    height:29px;
    font-size:15px;
  }
  .stage-punish-button strong { font-size:14px; }
  .stage-punish-button small { font-size:8px; }
  .modern-item,
  .item-choice.modern-item:nth-child(n) {
    border-width:1px;
    box-shadow:0 6px 12px rgba(0,18,48,.24),inset 0 1px rgba(255,255,255,.22);
  }
}
@media (max-width:390px) {
  .stage-punish-button {
    right:10px;
    width:116px;
    height:62px;
  }
  .stage-punish-button strong { font-size:13px; }
}

/* ===== Pop skin coverage for menus, panels, CTA alignment, and stage backdrop ===== */
.video-stage {
  background:
    radial-gradient(circle at 50% 20%,rgba(126,215,255,.34),transparent 28%),
    radial-gradient(circle at 70% 48%,rgba(255,128,186,.16),transparent 33%),
    linear-gradient(180deg,#1e75bd 0,#173d72 46%,#17133a 100%);
}
.video-stage::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    linear-gradient(180deg,rgba(255,255,255,.18),transparent 26%),
    repeating-linear-gradient(90deg,rgba(255,255,255,.045) 0 1px,transparent 1px 30px);
  opacity:.74;
}
.video-backdrop-layer {
  background:
    radial-gradient(circle at 45% 28%,rgba(142,218,255,.34),transparent 31%),
    radial-gradient(circle at 70% 58%,rgba(255,116,181,.18),transparent 34%),
    linear-gradient(180deg,#2b8eda,#163d75 56%,#161740);
}
.video-backdrop-layer img {
  opacity:.44;
  filter:blur(20px) brightness(.92) saturate(1.18);
  mix-blend-mode:screen;
}
.portrait-video-shell {
  background:
    radial-gradient(circle at 50% 22%,rgba(167,228,255,.28),transparent 30%),
    radial-gradient(circle at 50% 72%,rgba(255,105,174,.12),transparent 34%),
    linear-gradient(180deg,#2f87cc 0,#15355f 52%,#141338 100%);
}
.portrait-video-shell::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% 48%,transparent 0 35%,rgba(3,17,41,.32) 72%),
    repeating-linear-gradient(115deg,rgba(255,255,255,.04) 0 7px,transparent 7px 18px);
}
.portrait-video,
.punishment-hit-image {
  position:relative;
  z-index:1;
}
.scene-horizon {
  background:radial-gradient(ellipse at top,rgba(126,215,255,.28),rgba(255,128,186,.08) 38%,transparent 62%);
}
.scene-rings {
  border-color:rgba(168,224,255,.42);
  box-shadow:0 0 0 60px rgba(107,199,255,.045),0 0 0 120px rgba(255,128,186,.025);
}
.scene-light {
  background:linear-gradient(to bottom,rgba(174,232,255,.16),rgba(255,132,190,.08),transparent);
}
.stage-punish-button {
  grid-template-columns:32px minmax(58px,1fr);
  grid-template-rows:auto auto;
  align-content:center;
  justify-content:center;
  justify-items:center;
  text-align:center;
  column-gap:9px;
  row-gap:2px;
  line-height:1;
}
.stage-punish-icon {
  grid-column:1;
  grid-row:1 / 3;
  justify-self:center;
}
.stage-punish-button strong {
  grid-column:2;
  grid-row:1;
  align-self:end;
  justify-self:center;
  width:100%;
  margin:0;
  white-space:nowrap;
}
.stage-punish-button small {
  grid-column:2;
  grid-row:2;
  align-self:start;
  justify-self:center;
  width:100%;
  margin:0;
  white-space:nowrap;
}
.site-menu {
  color:#f8fbff;
}
.menu-backdrop {
  background:rgba(4,15,35,.42);
  backdrop-filter:blur(5px);
}
.menu-panel {
  border-left:1px solid rgba(202,233,255,.72);
  color:#f8fbff;
  background:
    radial-gradient(circle at 16% 0,rgba(114,201,255,.22),transparent 31%),
    radial-gradient(circle at 100% 18%,rgba(255,119,184,.2),transparent 30%),
    linear-gradient(180deg,rgba(17,48,87,.98),rgba(18,24,60,.99));
  box-shadow:-18px 0 50px rgba(0,18,48,.45),inset 1px 0 rgba(255,255,255,.18);
}
.menu-head {
  border-bottom:1px solid rgba(202,233,255,.28);
}
.menu-head h2,
.game-panel-head h1 {
  color:#fff;
  text-shadow:0 2px 0 #28528c,0 0 14px rgba(122,207,255,.3);
}
.menu-close,
.game-panel-close {
  border:2px solid #fff;
  color:#fff;
  background:linear-gradient(180deg,#ff93c3,#e54b8e 58%,#b72a6d);
  box-shadow:0 0 0 3px rgba(99,190,255,.44),0 7px 15px rgba(0,22,54,.3),inset 0 2px rgba(255,255,255,.28);
}
.menu-links a,
.menu-audio .bgm-control,
.menu-social-links a {
  border:1px solid rgba(202,233,255,.68);
  border-radius:16px;
  color:#f3faff;
  background:
    linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.05)),
    rgba(10,30,58,.9);
  box-shadow:0 7px 14px rgba(0,19,48,.22),inset 0 1px rgba(255,255,255,.24);
}
.menu-links a:hover,
.menu-links a:focus-visible {
  border-color:#fff;
  color:#fff;
  background:linear-gradient(180deg,#75d3ff,#4c92ee 58%,#5b55d4);
}
.menu-links span {
  color:#ff86ba;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.28);
  border-radius:50%;
}
.menu-section-title span {
  color:#91dcff;
}
.menu-section-title small,
.game-panel-head p {
  color:#c9ddf0;
}
.menu-audio {
  border-top:1px solid rgba(202,233,255,.28);
}
.menu-audio .bgm-toggle {
  border-color:#fff;
  border-radius:999px;
  background:linear-gradient(180deg,#ff8fc0,#e84d91);
  color:#fff;
}
.menu-audio .bgm-volume {
  border-color:rgba(202,233,255,.45);
  background:rgba(5,18,38,.42);
}
.menu-audio input[type="range"] {
  accent-color:#ff78b2;
}
.icon-button[aria-expanded="true"] {
  border-color:#fff;
  color:#fff;
  background:linear-gradient(180deg,#ff8fc0,#e94686 58%,#b72868);
}
.game-panel-overlay {
  color:#f8fbff;
  background:
    radial-gradient(circle at 18% 8%,rgba(95,190,255,.28),transparent 31%),
    radial-gradient(circle at 85% 18%,rgba(255,116,181,.23),transparent 32%),
    linear-gradient(145deg,rgba(7,24,49,.98),rgba(21,18,57,.98));
}
.game-panel-surface {
  background:
    repeating-linear-gradient(90deg,rgba(255,255,255,.028) 0 1px,transparent 1px 34px),
    linear-gradient(180deg,rgba(255,255,255,.04),transparent 30%);
}
.game-panel-surface::before {
  border:1px solid rgba(202,233,255,.38);
  border-radius:22px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);
}
.panel-section,
.overlay-card,
.game-card,
.minigame-card,
.clicker-game,
.clicker-stage,
.table-wrap {
  border:1px solid rgba(202,233,255,.66);
  border-radius:18px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.045)),
    rgba(9,29,57,.9);
  box-shadow:0 14px 28px rgba(0,18,47,.3),inset 0 1px rgba(255,255,255,.22);
}
.game-panel-body .game-card,
.game-panel-body .overlay-items .game-card,
.game-panel-body .card-list .game-card {
  border-color:rgba(202,233,255,.66);
  border-radius:18px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.045)),
    rgba(9,29,57,.9);
  box-shadow:0 14px 28px rgba(0,18,47,.3),inset 0 1px rgba(255,255,255,.22);
}
.game-panel-body .game-card img {
  border:1px solid rgba(255,255,255,.82);
  border-radius:15px;
  background:linear-gradient(180deg,#fff,#eef7ff);
  box-shadow:0 4px 10px rgba(0,22,55,.2);
}
.panel-section {
  padding:18px;
}
.overlay-card h2,
.game-card h3,
.minigame-card h2,
.clicker-copy h1,
#panel-ranking-title {
  color:#fff;
  text-shadow:0 2px 0 #294b7f;
}
.overlay-card p,
.game-card p,
.minigame-card p,
.clicker-copy p {
  color:#d9ecff;
}
.game-panel-body .tag,
.minigame-badge,
.minigame-number,
.minigame-reward {
  border:1px solid rgba(255,255,255,.72);
  border-radius:999px;
  color:#fff;
  background:linear-gradient(180deg,#ff8fc0,#e84d91);
  font-family:Arial,sans-serif;
  text-shadow:none;
}
.minigame-card::before,
.minigame-card::after,
.clicker-stage::before,
.clicker-stage::after {
  border-color:rgba(142,220,255,.8);
}
.minigame-card-icon {
  border:3px solid #fff;
  color:#fff;
  background:
    radial-gradient(circle at 35% 25%,rgba(255,255,255,.75),transparent 18%),
    linear-gradient(180deg,#6fd0ff,#548ef0 58%,#6a5bd8);
  box-shadow:0 0 0 3px rgba(255,128,186,.55),0 9px 18px rgba(0,18,48,.34),inset 0 3px rgba(255,255,255,.28);
}
.minigame-play-link,
.clicker-actions .btn,
.ranking-tabs .btn,
.btn-primary,
.btn-secondary {
  border:2px solid #fff;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(180deg,#ff8fc0,#e84d91 58%,#b72a6d);
  box-shadow:0 7px 14px rgba(0,21,53,.28),inset 0 2px rgba(255,255,255,.28);
}
.btn-secondary,
.ranking-tabs .btn {
  background:linear-gradient(180deg,#72d0ff,#4b91ef 58%,#5755d1);
}
.ranking-tabs .btn[aria-pressed="true"] {
  color:#241334;
  border-color:#fff1a8;
  background:linear-gradient(180deg,#fff2b7,#e8bd5b);
  box-shadow:inset 0 -4px rgba(95,54,5,.2);
}
.ranking-profile-slot {
  margin:0 0 18px;
}
.ranking-login-note,
.ranking-name-form {
  padding:14px;
  border:1px solid rgba(173,210,255,.5);
  border-radius:14px;
  color:#dceeff;
  background:rgba(7,25,53,.78);
}
.ranking-login-note {
  font-size:13px;
  font-weight:850;
}
.ranking-name-form label {
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
  color:#fff;
}
.ranking-name-form label small {
  color:#a9c9e9;
}
.ranking-name-form > div {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
.ranking-name-form input {
  min-width:0;
  color:#101a2b;
  background:#fff;
}
.table-wrap table {
  border-collapse:separate;
  border-spacing:0 7px;
}
.table-wrap th {
  color:#9ee5ff;
}
.table-wrap td {
  border-top:1px solid rgba(202,233,255,.22);
  border-bottom:1px solid rgba(202,233,255,.22);
  background:rgba(255,255,255,.055);
}
.clicker-stats div {
  border:1px solid rgba(202,233,255,.55);
  border-radius:14px;
  background:rgba(255,255,255,.08);
}
.clicker-stats strong {
  color:#ffe893;
  text-shadow:0 1px 0 #6e4500;
}
.clicker-hit-button {
  border:3px solid #fff;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(180deg,#ff8fc0,#e84d91 58%,#b72a6d);
  box-shadow:0 0 0 3px rgba(99,190,255,.55),0 8px 18px rgba(0,18,48,.32),inset 0 3px rgba(255,255,255,.28);
}
@media (max-width:620px) {
  .menu-panel {
    border-left:1px solid rgba(202,233,255,.72);
    border-radius:18px 0 0 18px;
  }
  .game-panel-surface::before {
    border-radius:16px;
  }
  .panel-section {
    padding:12px;
  }
}

/* ===== Lightweight stage backdrop and readable round CTA ===== */
.video-stage {
  display:grid;
  place-items:end center;
  isolation:isolate;
  background:
    linear-gradient(180deg,rgba(255,255,255,.36),rgba(230,246,255,.16) 34%,rgba(35,73,128,.28)),
    #dff4ff;
  contain:none;
}
.video-stage::before {
  display:none;
}
.video-backdrop-layer {
  inset:0;
  background:#f3fbff;
}
.video-backdrop-layer img {
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  opacity:.95;
  filter:none;
  transform:none;
  mix-blend-mode:normal;
}
.video-vignette {
  background:
    linear-gradient(90deg,rgba(16,43,82,.2),transparent 18%,transparent 82%,rgba(16,43,82,.2)),
    linear-gradient(180deg,rgba(255,255,255,.08),transparent 54%,rgba(11,29,57,.32)),
    radial-gradient(ellipse at center,transparent 38%,rgba(18,46,86,.18) 80%);
}
.portrait-video-shell {
  position:relative;
  left:auto;
  bottom:auto;
  justify-self:center;
  align-self:end;
  width:min(46vw,570px,100%);
  height:auto;
  max-height:98%;
  aspect-ratio:3 / 4;
  transform:none!important;
  background:
    url("../assets/game/ui/stage-backdrop.svg") center/cover no-repeat,
    #f3fbff;
  contain:none;
}
.portrait-video-shell::before {
  display:none;
}
.portrait-video-shell::after {
  z-index:4;
  background:linear-gradient(180deg,rgba(255,255,255,.06),transparent 70%,rgba(18,45,82,.12));
  box-shadow:inset 0 0 28px rgba(28,72,116,.12);
}
.portrait-video {
  position:relative;
  z-index:1;
  background:transparent;
}
.punishment-hit-image {
  position:absolute;
  z-index:3;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  pointer-events:none;
  transition:opacity 60ms linear;
}
.action-stage.is-punishing .portrait-video,
.action-stage.has-punishment-pose .portrait-video {
  opacity:0;
}
.action-stage.is-punishing .portrait-video-shell {
  transform:none!important;
  animation:none!important;
}
.action-stage.is-punishing .punishment-hit-image.is-active,
.action-stage.has-punishment-pose .punishment-hit-image.is-active {
  opacity:1;
}
.stage-punishment-overlay {
  display:none;
}
.action-stage.animate-harisen_hit .portrait-video-shell,
.action-stage.animate-tarai_drop .portrait-video-shell,
.action-stage.animate-essay_popup .portrait-video-shell,
.action-stage.animate-whip_strike .portrait-video-shell,
.action-stage.animate-punch_hit .portrait-video-shell,
.action-stage.animate-surprise_cannon .portrait-video-shell {
  animation:none!important;
}
@keyframes hitImageNudge {
  0% { filter:brightness(1); }
  28% { filter:brightness(1.14) saturate(1.06); }
  100% { filter:brightness(1); }
}
.scene-rings,
.scene-light {
  display:none;
}
.scene-horizon {
  opacity:.42;
  background:radial-gradient(ellipse at top,rgba(255,255,255,.64),rgba(142,212,255,.18) 46%,transparent 70%);
}
.stage-punish-button {
  width:100px;
  height:100px;
  right:24px;
  bottom:24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  padding:0;
  border:4px solid #fff;
  border-radius:50%;
  text-align:center;
  color:#fff;
  background:
    radial-gradient(circle at 35% 24%,rgba(255,255,255,.72),transparent 18%),
    linear-gradient(180deg,#ff96c7 0,#ef4f97 52%,#b82267 100%);
  box-shadow:
    0 0 0 4px rgba(91,184,255,.78),
    0 10px 20px rgba(0,24,60,.34),
    inset 0 4px rgba(255,255,255,.32),
    inset 0 -10px rgba(94,0,45,.25);
  line-height:1;
}
.stage-punish-button::after {
  inset:7px;
  border:1px solid rgba(255,255,255,.58);
  border-radius:50%;
}
.stage-punish-icon {
  display:none;
}
.stage-punish-button strong {
  display:block;
  width:auto;
  margin:0;
  color:#fff;
  font-size:17px;
  font-weight:950;
  line-height:1.08;
  letter-spacing:.02em;
  white-space:nowrap;
  text-shadow:0 2px 0 #8e1648,0 0 8px rgba(83,18,53,.28);
}
.stage-punish-button small {
  display:block;
  width:auto;
  margin:1px 0 0;
  padding:2px 7px;
  border-radius:999px;
  color:#b91f66;
  background:#fff;
  font-size:10px;
  font-weight:950;
  line-height:1;
  letter-spacing:.08em;
  white-space:nowrap;
  text-shadow:none;
}
.stage-punish-button:hover {
  filter:brightness(1.06);
  box-shadow:
    0 0 0 4px rgba(91,184,255,.9),
    0 12px 22px rgba(0,24,60,.38),
    inset 0 4px rgba(255,255,255,.36),
    inset 0 -10px rgba(94,0,45,.25);
}
.stage-punish-button:active:not(:disabled) {
  transform:translateY(4px) scale(.97);
}
.stage-punish-button:not(:disabled) {
  animation:softCtaPulse 2.4s ease-in-out infinite;
}
@media (max-width:620px) {
  .portrait-video-shell {
    width:min(100%,372px);
  }
  .stage-punish-button {
    right:14px;
    bottom:18px;
    width:88px;
    height:88px;
    padding:0;
  }
  .stage-punish-button strong {
    font-size:14px;
  }
  .stage-punish-button small {
    font-size:8px;
    padding:2px 6px;
  }
}
@media (max-width:390px) {
  .stage-punish-button {
    right:11px;
    width:82px;
    height:82px;
  }
  .stage-punish-button strong {
    font-size:13px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .stage-punish-button,
  .stage-punish-button::before,
  .game-modal:not(.hidden) .result-score,
  .game-modal:not(.hidden) .result-visual::after {
    animation:none!important;
  }
}

@-moz-document url-prefix() {
  .nexus-grid,.scene-rings,.scene-light { display:none; }
  .nexus-bg { position:absolute; }
  .world-scene {
    box-shadow:inset 0 0 0 3px #05080d,inset 0 0 0 4px rgba(211,173,101,.22),0 10px 24px rgba(0,0,0,.38);
  }
  .portrait-video-shell {
    box-shadow:0 0 0 3px rgba(3,7,12,.8),0 14px 28px rgba(0,0,0,.58);
  }
  .glass,.glass-dark,.rail-action,.account-card,.intel-card,.command-deck {
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.02),0 8px 20px rgba(0,0,0,.3);
  }
  .stage-punish-button {
    box-shadow:0 0 0 3px #060b12,0 0 0 4px #8c6a35,0 10px 20px rgba(0,0,0,.7);
  }
}

/* ===== Readability and input-lag tuning ===== */
.stage-punish-button {
  border-color:#fff9da;
  color:#fff;
  background:
    radial-gradient(circle at 34% 22%,rgba(255,255,255,.62),transparent 18%),
    linear-gradient(180deg,#ff70af 0,#ec2f80 54%,#9d0f4a 100%);
  box-shadow:
    0 0 0 3px rgba(255,255,255,.95),
    0 0 0 6px rgba(70,172,255,.55),
    0 10px 18px rgba(0,24,60,.34),
    inset 0 3px rgba(255,255,255,.28),
    inset 0 -10px rgba(92,0,45,.24);
  animation:none!important;
  contain:layout paint;
}
.stage-punish-button::before {
  display:none;
}
.stage-punish-button::after {
  inset:8px;
  border-color:rgba(255,255,255,.72);
}
.stage-punish-button strong {
  align-self:center;
  display:inline-grid;
  place-items:center;
  min-width:4.6em;
  min-height:1.45em;
  padding:2px 6px 3px;
  border-radius:999px;
  color:#fff;
  background:rgba(70,8,38,.52);
  font-size:18px;
  font-weight:1000;
  line-height:1;
  letter-spacing:.03em;
  text-shadow:
    0 2px 0 #650723,
    1px 0 0 #650723,
    -1px 0 0 #650723,
    0 0 6px rgba(0,0,0,.36);
}
.stage-punish-button small {
  align-self:center;
  min-width:3.7em;
  padding:3px 8px 4px;
  color:#87073b;
  background:#fff6fb;
  font-size:11px;
  font-weight:1000;
  letter-spacing:.16em;
  box-shadow:inset 0 -1px rgba(149,12,76,.14);
}
.stage-punish-button:hover {
  filter:none;
  box-shadow:
    0 0 0 3px rgba(255,255,255,.95),
    0 0 0 6px rgba(70,172,255,.72),
    0 12px 20px rgba(0,24,60,.36),
    inset 0 3px rgba(255,255,255,.3),
    inset 0 -10px rgba(92,0,45,.24);
}
.stage-punish-button:disabled {
  opacity:.58;
  filter:saturate(.45) brightness(.86);
}
.clicker-speed-lines {
  opacity:.1;
  background:
    repeating-linear-gradient(112deg,transparent 0 22px,rgba(160,204,240,.34) 23px 25px);
}
.hit-flash {
  mix-blend-mode:normal;
  background:radial-gradient(circle,rgba(255,244,186,.72),rgba(255,91,62,.38) 34%,transparent 68%);
}
.clicker-character.is-hit {
  animation:clickerDamageLite .24s cubic-bezier(.2,.9,.2,1);
  will-change:transform;
}
.hit-flash.is-active,
.combo-pop.is-active {
  will-change:opacity,transform;
}
@keyframes clickerDamageLite {
  24% { transform:translateX(-12px) rotate(-1.6deg) scale(1.025); }
  55% { transform:translateX(13px) rotate(1.6deg) scale(.995); }
}
@media (max-width:620px) {
  .stage-punish-button strong { font-size:15px; min-width:4.2em; }
  .stage-punish-button small { font-size:9px; }
}
@media (max-width:390px) {
  .stage-punish-button strong { font-size:14px; min-width:4em; }
  .stage-punish-button small { font-size:8px; padding-inline:7px; }
}

/* ===== Interaction performance pass ===== */
.game-panel-open .nexus-app,
.game-panel-open .nexus-bg {
  display:none!important;
}
.game-panel-performance-mode .portrait-video,
.game-panel-performance-mode .video-backdrop-layer,
.game-panel-performance-mode .video-vignette,
.game-panel-performance-mode .scene-horizon,
.game-panel-performance-mode .character-shadow {
  display:none!important;
}
.modern-item,
.item-choice.modern-item:nth-child(n) {
  transform:none!important;
  filter:none!important;
  transition:border-color .08s linear, background-color .08s linear, box-shadow .08s linear!important;
  box-shadow:0 5px 10px rgba(0,18,48,.24),inset 0 1px rgba(255,255,255,.2)!important;
  will-change:auto;
}
.modern-item::after {
  filter:none!important;
  opacity:.055!important;
}
.modern-item:not(:disabled):hover,
.modern-item:active:not(:disabled),
.item-choice.modern-item.selected,
.item-choice.modern-item[aria-pressed="true"],
.item-choice.modern-item[data-selected="true"] {
  transform:none!important;
  filter:none!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--card-color,var(--item-glow,#67ddff)) 45%,transparent),0 6px 12px rgba(0,18,48,.28),inset 0 1px rgba(255,255,255,.24)!important;
}
.modern-item.locked,
.modern-item:disabled {
  filter:none!important;
  opacity:.58;
}
.clicker-running .game-panel-head,
.clicker-running .clicker-copy p,
.clicker-running .clicker-speed-lines,
.clicker-running .combo-pop {
  contain:layout paint;
}
.clicker-running .clicker-speed-lines {
  display:none;
}
.clicker-running .clicker-game,
.clicker-running .clicker-stage,
.clicker-running .clicker-hit-button,
.clicker-running .clicker-stats div {
  box-shadow:none!important;
}
.clicker-running .clicker-stage {
  border-color:rgba(184,140,69,.8);
}
.clicker-running .clicker-character {
  filter:none!important;
}
.clicker-running .hit-flash {
  display:none;
}
.clicker-running .combo-pop {
  display:block;
  color:#fff7b5;
  text-shadow:0 2px 0 rgba(121,38,65,.9),0 0 8px rgba(255,120,178,.38);
}
.clicker-running .combo-pop.is-active {
  animation:comboPopLite .16s ease-out;
}
.clicker-running .combo-pop.hit-pulse-a {
  animation:comboPopLiteA .16s ease-out;
}
.clicker-running .combo-pop.hit-pulse-b {
  animation:comboPopLiteB .16s ease-out;
}
.clicker-running .game-panel-close {
  z-index:30;
  pointer-events:auto;
}
.clicker-running .clicker-actions {
  position:relative;
  z-index:30;
  pointer-events:auto;
}
@keyframes comboPopLite {
  from { opacity:0; transform:translateY(8px) scale(.88); }
  45% { opacity:1; }
  to { opacity:0; transform:translateY(-12px) scale(1.02); }
}
@keyframes comboPopLiteA {
  from { opacity:0; transform:translateY(8px) scale(.88); }
  45% { opacity:1; }
  to { opacity:0; transform:translateY(-12px) scale(1.02); }
}
@keyframes comboPopLiteB {
  from { opacity:0; transform:translateY(8px) scale(.88); }
  45% { opacity:1; }
  to { opacity:0; transform:translateY(-12px) scale(1.02); }
}

/* ===== Heavier paint reduction without layout redesign ===== */
.nexus-bg,
.nexus-grid,
.nexus-orb,
.particle {
  display:none!important;
}
.glass,
.glass-dark,
.rail-action,
.command-deck,
.account-card,
.intel-card,
.news-ticker,
.game-panel-surface,
.panel-section {
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
.world-scene {
  box-shadow:inset 0 0 0 3px #05080d,inset 0 0 0 4px rgba(211,173,101,.22),0 8px 20px rgba(0,0,0,.32)!important;
}
.portrait-video-shell {
  box-shadow:0 0 0 3px rgba(3,7,12,.78),0 10px 22px rgba(0,0,0,.38)!important;
}
.video-vignette {
  background:
    linear-gradient(90deg,rgba(16,43,82,.16),transparent 18%,transparent 82%,rgba(16,43,82,.16)),
    linear-gradient(180deg,rgba(255,255,255,.06),transparent 62%,rgba(11,29,57,.22))!important;
}
.portrait-video-shell::after,
.modern-item::before,
.world-scene::before,
.world-scene::after {
  box-shadow:none!important;
}
.modern-item,
.item-choice.modern-item:nth-child(n) {
  box-shadow:0 4px 8px rgba(0,18,48,.22),inset 0 1px rgba(255,255,255,.2)!important;
}
.modern-item:not(:disabled):hover,
.modern-item:active:not(:disabled),
.item-choice.modern-item.selected,
.item-choice.modern-item[aria-pressed="true"],
.item-choice.modern-item[data-selected="true"] {
  box-shadow:0 0 0 2px rgba(103,221,255,.38),0 5px 10px rgba(0,18,48,.24),inset 0 1px rgba(255,255,255,.24)!important;
}
.game-panel-overlay {
  background:linear-gradient(135deg,#05080d 0%,#0b1119 54%,#05070b 100%)!important;
}
.game-panel-surface::before,
.game-panel-close,
.minigame-card-icon,
.clicker-hit-button {
  box-shadow:none!important;
}

/* ===== Daily card gacha ===== */
.gacha-promo-card {
  border-left-color:#8d5cff;
  background:linear-gradient(135deg,rgba(46,25,83,.95),rgba(12,13,29,.98));
}
.gacha-shell {
  --gacha-gold:#f5d584;
  --gacha-violet:#8d5cff;
  position:relative;
  color:#f7f1ff;
  contain:layout paint;
}
.gacha-tabs {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  max-width:560px;
  margin:0 auto 16px;
  padding:5px;
  border:1px solid rgba(245,213,132,.4);
  border-radius:12px;
  background:#080b15;
}
.gacha-tabs button {
  min-height:46px;
  border:0;
  border-radius:8px;
  color:#b9bfd0;
  background:transparent;
  font:900 14px/1.2 inherit;
  cursor:pointer;
}
.gacha-tabs button[aria-selected="true"] {
  color:#170d25;
  background:linear-gradient(180deg,#fff1b7,#d9ad52);
  box-shadow:inset 0 -3px rgba(87,47,8,.25);
}
.gacha-tabs button:active { transform:translateY(2px); }
.gacha-summary {
  display:grid;
  grid-template-columns:180px 1fr 1.25fr;
  gap:10px;
  margin-bottom:12px;
}
.gacha-summary > div {
  min-height:76px;
  padding:12px 14px;
  border:1px solid rgba(157,118,235,.42);
  border-radius:10px;
  background:linear-gradient(145deg,#17172a,#0b0d17);
}
.gacha-summary small {
  display:block;
  color:#aeb7cc;
  font-size:11px;
  font-weight:800;
}
.gacha-summary strong {
  color:#fff0a9;
  font:950 36px/1 system-ui,sans-serif;
}
.gacha-summary span { margin-left:4px; color:#d6d9e4; font-weight:900; }
.gacha-summary b {
  display:block;
  margin-top:8px;
  color:#f8eac7;
  font-size:13px;
}
.gacha-progress {
  height:8px;
  margin-top:9px;
  overflow:hidden;
  border-radius:999px;
  background:#03050a;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}
.gacha-progress i {
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#7347db,#e172ff,#ffe39b);
}
.gacha-draw-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 250px;
  gap:16px;
  align-items:stretch;
  margin-top:14px;
}
.gacha-feature {
  display:grid;
  grid-template-columns:minmax(180px,290px) minmax(0,1fr);
  gap:22px;
  align-items:center;
  min-height:470px;
  padding:24px;
  overflow:hidden;
  border:1px solid rgba(245,213,132,.48);
  border-radius:14px;
  background:
    radial-gradient(circle at 22% 45%,rgba(126,73,221,.27),transparent 34%),
    linear-gradient(135deg,#171426,#080b13 62%);
}
.gacha-card-back,
.gacha-reveal-card {
  position:relative;
  width:min(100%,280px);
  aspect-ratio:2/3;
  justify-self:center;
  overflow:hidden;
  border:3px solid #d6aa50;
  border-radius:14px;
  background:linear-gradient(145deg,#29173f,#080911);
  box-shadow:0 0 0 2px #09060e,0 12px 24px rgba(0,0,0,.42);
}
.gacha-card-back {
  display:grid;
  place-items:center;
  align-content:center;
  color:#efd78e;
  background:
    linear-gradient(135deg,transparent 43%,rgba(245,213,132,.13) 44% 46%,transparent 47%),
    radial-gradient(circle,#56338c,#151024 62%,#080810);
}
.gacha-card-back::before {
  content:"";
  position:absolute;
  inset:13px;
  border:1px solid rgba(255,228,157,.58);
  border-radius:9px;
}
.gacha-card-back span { font-size:12px; font-weight:900; letter-spacing:.26em; }
.gacha-card-back b { margin-top:4px; font:900 30px/1 "Yu Mincho",serif; }
.gacha-card-back i { margin-top:30px; font:900 90px/1 system-ui,sans-serif; }
.gacha-reveal-card { animation:gachaReveal .42s cubic-bezier(.2,.8,.2,1); }
.gacha-reveal-card img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.gacha-reveal-card span {
  position:absolute;
  left:10px;
  top:10px;
  padding:5px 9px;
  border:1px solid #ffe99f;
  color:#211128;
  background:#f7d778;
  font-size:10px;
  font-weight:950;
}
@keyframes gachaReveal {
  from { opacity:0; transform:translateY(12px) scale(.94); }
  to { opacity:1; transform:none; }
}
.gacha-feedback {
  position:absolute;
  z-index:9;
  left:50%;
  top:50%;
  display:grid;
  place-items:center;
  min-width:150px;
  min-height:48px;
  padding:10px 18px;
  border:2px solid rgba(255,240,170,.9);
  border-radius:999px;
  color:#2b1235;
  background:
    radial-gradient(circle at 28% 18%,rgba(255,255,255,.95),transparent 22%),
    linear-gradient(180deg,#fff0a8,#f2b74d);
  box-shadow:0 0 0 4px rgba(70,33,105,.72),0 0 32px rgba(255,216,92,.55),0 18px 35px rgba(0,0,0,.38);
  font-size:18px;
  font-weight:1000;
  letter-spacing:.08em;
  pointer-events:none;
  transform:translate(-50%,-50%) scale(.82);
  animation:gachaFeedbackPop .9s ease-out both;
}
.gacha-feedback.is-sacrifice {
  color:#fff5ce;
  border-color:rgba(255,216,124,.75);
  background:
    radial-gradient(circle at 50% 20%,rgba(255,244,187,.35),transparent 28%),
    linear-gradient(180deg,#573b20,#160f0d);
  box-shadow:0 0 0 4px rgba(18,11,13,.82),0 0 24px rgba(255,180,76,.42),0 18px 35px rgba(0,0,0,.42);
}
@keyframes gachaFeedbackPop {
  0% { opacity:0; transform:translate(-50%,-44%) scale(.7); filter:brightness(1.4); }
  18% { opacity:1; transform:translate(-50%,-50%) scale(1.08); }
  72% { opacity:1; transform:translate(-50%,-58%) scale(1); }
  100% { opacity:0; transform:translate(-50%,-70%) scale(.92); }
}
.gacha-result-copy small,
.gacha-gallery-head small {
  color:#b987ff;
  font-weight:950;
  letter-spacing:.16em;
}
.gacha-result-copy h2,
.gacha-gallery-head h2 {
  margin:7px 0 10px;
  color:#fff0b7;
  font:700 clamp(26px,4vw,44px)/1.15 "Yu Mincho","Hiragino Mincho ProN",serif;
}
.gacha-result-copy p,
.gacha-gallery-head p { color:#c7cbd7; line-height:1.75; }
.gacha-result-copy strong {
  display:block;
  margin-top:14px;
  color:#fff1a7;
  font:950 28px/1 system-ui,sans-serif;
}
.gacha-result-copy em {
  display:inline-block;
  margin-top:12px;
  color:#d8c4ff;
  font-size:12px;
  font-style:normal;
  font-weight:850;
}
.gacha-draw-controls {
  display:grid;
  align-content:center;
  gap:10px;
  padding:18px;
  border:1px solid rgba(141,92,255,.45);
  border-radius:14px;
  background:#0a0c16;
  text-align:center;
}
.gacha-draw-controls > span { color:#d9dce8; font-size:13px; font-weight:900; }
.gacha-draw-button {
  display:grid;
  place-items:center;
  min-height:104px;
  padding:12px;
  border:3px solid #fff0aa;
  border-radius:50%;
  color:#fff;
  background:linear-gradient(180deg,#9b4cff,#5a22bf 58%,#30106f);
  box-shadow:0 0 0 5px #150d25,0 8px 0 #260b54,0 14px 22px rgba(0,0,0,.45);
  cursor:pointer;
}
.gacha-draw-button small { font-size:10px; font-weight:850; }
.gacha-draw-button strong { font-size:18px; font-weight:950; }
.gacha-draw-button:active:not(:disabled) { transform:translateY(5px); box-shadow:0 0 0 5px #150d25,0 3px 0 #260b54; }
.gacha-draw-button:disabled { opacity:.42; cursor:not-allowed; }
.gacha-draw-button.is-loading strong { font-size:0; }
.gacha-draw-button.is-loading strong::after { content:"抽選中..."; font-size:16px; }
.gacha-gallery-link,
.gacha-sacrifice-button {
  min-height:42px;
  border:1px solid rgba(245,213,132,.58);
  border-radius:7px;
  color:#f4dfaa;
  background:#15101d;
  font-weight:900;
  cursor:pointer;
}
.gacha-gallery-link:active,
.gacha-sacrifice-button:active { transform:translateY(2px); }
.gacha-gallery-head {
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:end;
  margin:22px 0 14px;
}
.gacha-gallery-head p { max-width:540px; margin:0; }
.gacha-gallery-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:16px;
  align-items:start;
}
.gallery-card {
  position:relative;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  padding:10px;
  overflow:hidden;
  border:1px solid rgba(255,220,128,.42);
  border-radius:18px;
  background:
    linear-gradient(180deg,rgba(255,236,172,.1),transparent 34%),
    radial-gradient(circle at 50% 0,rgba(255,211,102,.18),transparent 42%),
    linear-gradient(145deg,#191323,#070a12 68%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05),0 14px 26px rgba(0,0,0,.34);
  transform:translateZ(0);
}
.gallery-card::before {
  content:"";
  position:absolute;
  inset:7px;
  pointer-events:none;
  border:1px solid rgba(255,220,128,.2);
  border-radius:14px;
}
.gallery-card-visual {
  position:relative;
  display:grid;
  align-items:center;
  min-width:0;
  padding:8px;
  border-radius:14px;
  background:
    linear-gradient(135deg,rgba(255,255,255,.08),transparent 32%),
    linear-gradient(180deg,#241a31,#0d111d);
}
.gallery-card-visual img {
  display:block;
  width:100%;
  aspect-ratio:2/3;
  object-fit:contain;
  object-position:center;
  padding:0;
  box-sizing:border-box;
  border:2px solid #d4ad5a;
  border-radius:11px;
  background:#070a12;
  box-shadow:0 10px 18px rgba(0,0,0,.32);
}
.gacha-rarity,
.gallery-quantity {
  position:absolute;
  left:5px;
  padding:4px 6px;
  color:#130d1c;
  background:#f0ce75;
  font-size:8px;
  font-weight:950;
}
.gacha-rarity { top:14px; left:14px; border-radius:999px; }
.gallery-quantity { bottom:14px; left:14px; border-radius:999px; background:#eee8f7; }
.gacha-paid-only {
  position:absolute;
  right:14px;
  top:14px;
  max-width:calc(100% - 72px);
  padding:4px 6px;
  border:1px solid #fff0a2;
  border-radius:999px;
  color:#fff8cf;
  background:#7a246e;
  font-size:8px;
  font-weight:950;
  text-align:center;
}
.gallery-card.is-paid-locked {
  border-color:rgba(209,128,255,.58);
}
.gallery-card.is-paid-locked .gallery-card-copy::after {
  content:"現在のガチャ対象外";
  display:inline-block;
  margin-top:5px;
  color:#d7b3ff;
  font-size:10px;
  font-weight:900;
}
.gallery-card-copy {
  position:relative;
  z-index:1;
  display:grid;
  grid-template-rows:auto minmax(42px,auto) auto auto;
  min-width:0;
  padding:0 4px 2px;
}
.gallery-card-copy h3 {
  margin:0 0 6px;
  color:#fff0b5;
  font-size:17px;
  line-height:1.25;
  letter-spacing:.04em;
}
.gallery-card-copy p {
  min-height:42px;
  margin:0;
  color:#cfd3df;
  font-size:11px;
  line-height:1.55;
}
.gallery-card-copy > strong {
  display:inline-grid;
  place-items:center;
  justify-self:start;
  min-width:76px;
  margin:9px 0;
  padding:5px 9px;
  border:1px solid rgba(255,226,138,.42);
  border-radius:999px;
  color:#271600;
  background:linear-gradient(180deg,#ffe89b,#d99b36);
  font-size:17px;
  font-weight:950;
  box-shadow:0 5px 0 rgba(78,42,0,.42);
}
.gacha-sacrifice-button {
  width:100%;
  min-height:38px;
  color:#fff;
  background:linear-gradient(180deg,#d24b9d,#752c68);
}
.gallery-card.is-locked { opacity:.76; }
.gallery-card.is-locked img { opacity:.72; filter:saturate(.82) brightness(.86); }
.nexus-mobile-nav { grid-template-columns:repeat(5,minmax(0,1fr))!important; }

@media (max-width:900px) {
  .gacha-summary { grid-template-columns:1fr 1fr; }
  .gacha-mission { grid-column:1/-1; }
  .gacha-draw-layout { grid-template-columns:1fr; }
  .gacha-draw-controls { grid-template-columns:1fr minmax(130px,190px) 1fr; align-items:center; }
  .gacha-draw-button { min-height:92px; }
  .gacha-gallery-grid { grid-template-columns:repeat(auto-fit,minmax(172px,1fr)); gap:14px; }
}
@media (max-width:620px) {
  .gacha-shell { padding:10px; }
  .gacha-summary { grid-template-columns:1fr; gap:7px; }
  .gacha-mission { grid-column:auto; }
  .gacha-feature { grid-template-columns:minmax(124px,42%) minmax(0,1fr); min-height:0; gap:13px; padding:13px; }
  .gacha-result-copy h2 { font-size:23px; }
  .gacha-result-copy p { font-size:12px; line-height:1.55; }
  .gacha-result-copy strong { font-size:22px; }
  .gacha-draw-controls { grid-template-columns:1fr minmax(118px,145px) 1fr; padding:12px; }
  .gacha-draw-button { min-height:84px; }
  .gacha-gallery-head { display:block; }
  .gacha-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .gallery-card { padding:7px; border-radius:14px; }
  .gallery-card::before { inset:5px; border-radius:10px; }
  .gallery-card-visual { padding:5px; border-radius:11px; }
  .gallery-card-visual img { border-radius:8px; }
  .gallery-card-copy h3 { font-size:13px; }
  .gallery-card-copy p { min-height:0; font-size:10px; line-height:1.4; }
  .gallery-card-copy > strong { min-width:58px; margin:7px 0; padding:4px 7px; font-size:14px; box-shadow:0 3px 0 rgba(78,42,0,.42); }
  .gacha-rarity,.gallery-quantity,.gacha-paid-only { font-size:7px; }
  .gacha-rarity { top:10px; left:10px; }
  .gallery-quantity { bottom:10px; left:10px; }
  .gacha-paid-only { top:10px; right:10px; max-width:calc(100% - 58px); }
  .nexus-mobile-nav a { min-width:0; padding-inline:2px; font-size:7px!important; }
  .ranking-name-form > div { grid-template-columns:1fr; }
}
@media (max-width:390px) {
  .gacha-feature { grid-template-columns:112px minmax(0,1fr); padding:10px; }
  .gacha-result-copy p { display:none; }
  .gacha-draw-controls { grid-template-columns:1fr 116px 1fr; gap:6px; padding:9px; }
  .gacha-draw-button strong { font-size:15px; }
  .gacha-gallery-link { font-size:10px; }
  .gacha-gallery-grid { gap:8px; }
  .gallery-card-copy p { display:none; }
  .gallery-card-copy h3 { margin-bottom:4px; }
}
@media (prefers-reduced-motion:reduce) {
  .gacha-reveal-card { animation:none; }
}

/* ===== Card gallery vault layout ===== */
.card-vault-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:18px;
  align-items:start;
}
.card-vault-card {
  position:relative;
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
  padding:12px;
  overflow:hidden;
  border:1px solid rgba(255,221,132,.54);
  border-radius:20px;
  background:
    linear-gradient(180deg,rgba(255,238,184,.14),transparent 32%),
    radial-gradient(circle at 50% -10%,rgba(255,203,82,.25),transparent 45%),
    linear-gradient(145deg,#1c1427,#080b12 68%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06),0 16px 30px rgba(0,0,0,.38);
}
.card-vault-card::before {
  content:"";
  position:absolute;
  inset:8px;
  pointer-events:none;
  border:1px solid rgba(255,226,143,.22);
  border-radius:15px;
}
.card-vault-frame {
  position:relative;
  display:grid;
  place-items:center;
  padding:10px;
  border-radius:16px;
  background:
    linear-gradient(135deg,rgba(255,255,255,.09),transparent 36%),
    linear-gradient(180deg,#2a1d34,#101522);
}
.card-vault-frame img {
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:2/3;
  object-fit:contain!important;
  object-position:center;
  border:2px solid #d5ad58;
  border-radius:12px;
  background:#070a12;
  box-shadow:0 11px 20px rgba(0,0,0,.35);
}
.card-vault-rarity,
.card-vault-frame .gallery-quantity,
.card-vault-frame .gacha-paid-only {
  position:absolute;
  z-index:2;
  max-width:calc(100% - 24px);
  padding:4px 7px;
  border-radius:999px;
  font-size:8px;
  font-weight:950;
  letter-spacing:.05em;
  box-shadow:0 4px 10px rgba(0,0,0,.25);
}
.card-vault-rarity {
  left:16px;
  top:16px;
  color:#201100;
  background:linear-gradient(180deg,#fff0a6,#d69a38);
}
.card-vault-frame .gallery-quantity {
  left:16px;
  bottom:16px;
  color:#130d1c;
  background:#f2edf9;
}
.card-vault-frame .gacha-paid-only {
  right:16px;
  top:16px;
  color:#fff8cf;
  border:1px solid rgba(255,240,162,.8);
  background:#7a246e;
  text-align:center;
}
.card-vault-copy {
  position:relative;
  z-index:1;
  display:grid;
  gap:7px;
  min-width:0;
  padding:0 4px 3px;
}
.card-vault-copy h3 {
  margin:0;
  color:#fff0b5;
  font-size:18px;
  line-height:1.25;
  letter-spacing:.04em;
}
.card-vault-copy p {
  min-height:42px;
  margin:0;
  color:#cfd3df;
  font-size:11px;
  line-height:1.55;
}
.card-vault-copy > strong {
  display:inline-grid;
  place-items:center;
  justify-self:start;
  min-width:80px;
  padding:5px 10px;
  border:1px solid rgba(255,226,138,.5);
  border-radius:999px;
  color:#281700;
  background:linear-gradient(180deg,#fff0a0,#d99b36);
  font-size:17px;
  font-weight:950;
  box-shadow:0 5px 0 rgba(78,42,0,.42);
}
.card-vault-card .gacha-sacrifice-button {
  min-height:38px;
  margin-top:2px;
  color:#fff;
  background:linear-gradient(180deg,#d24b9d,#752c68);
}
.card-vault-card.can-preview {
  cursor:zoom-in;
}
.card-vault-card.can-preview:focus-visible {
  outline:3px solid rgba(255,239,164,.86);
  outline-offset:3px;
}
.card-vault-card.can-preview::after {
  content:"拡大";
  position:absolute;
  right:18px;
  bottom:18px;
  z-index:3;
  padding:4px 8px;
  border:1px solid rgba(255,236,158,.62);
  border-radius:999px;
  color:#211300;
  background:linear-gradient(180deg,#fff0a6,#d59a37);
  font-size:9px;
  font-weight:950;
  letter-spacing:.08em;
  opacity:.92;
  pointer-events:none;
}
.gacha-card-preview-modal[hidden] {
  display:none;
}
.gacha-card-preview-modal {
  position:fixed;
  inset:0;
  z-index:80;
  display:grid;
  place-items:center;
  padding:24px;
}
.gacha-card-preview-backdrop {
  position:absolute;
  inset:0;
  border:0;
  background:rgba(1,4,12,.78);
}
.gacha-card-preview-dialog {
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(220px,430px) minmax(220px,360px);
  gap:18px;
  width:min(92vw,860px);
  max-height:92vh;
  padding:18px;
  overflow:auto;
  border:1px solid rgba(255,223,142,.7);
  border-radius:24px;
  color:#f8f0d6;
  background:
    radial-gradient(circle at 20% 0,rgba(255,217,112,.18),transparent 34%),
    linear-gradient(145deg,#1b1326,#070a12 64%);
  box-shadow:0 24px 70px rgba(0,0,0,.62),inset 0 0 0 1px rgba(255,255,255,.06);
}
.gacha-card-preview-close {
  position:absolute;
  right:12px;
  top:12px;
  z-index:2;
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border:1px solid rgba(255,231,154,.7);
  border-radius:999px;
  color:#fff4c7;
  background:#120d18;
  font-size:24px;
  font-weight:900;
  cursor:pointer;
}
.gacha-card-preview-image-shell {
  display:grid;
  place-items:center;
  min-height:0;
  padding:12px;
  border-radius:18px;
  background:linear-gradient(180deg,#2a1d34,#0d111b);
}
.gacha-card-preview-image-shell img {
  display:block;
  width:auto;
  max-width:100%;
  max-height:min(74vh,680px);
  aspect-ratio:2/3;
  object-fit:contain;
  border:2px solid #d5ad58;
  border-radius:14px;
  background:#070a12;
}
.gacha-card-preview-copy {
  align-self:center;
  display:grid;
  gap:12px;
  padding:8px 8px 8px 0;
}
.gacha-card-preview-copy small {
  justify-self:start;
  padding:5px 9px;
  border-radius:999px;
  color:#221400;
  background:linear-gradient(180deg,#fff0a6,#d69a38);
  font-size:11px;
  font-weight:950;
}
.gacha-card-preview-copy h2 {
  margin:0;
  color:#fff0b5;
  font-size:clamp(22px,4vw,34px);
  line-height:1.2;
}
.gacha-card-preview-copy p {
  margin:0;
  color:#d5d9e4;
  font-size:14px;
  line-height:1.8;
}
.gacha-card-preview-copy strong {
  justify-self:start;
  padding:8px 14px;
  border:1px solid rgba(255,226,138,.6);
  border-radius:999px;
  color:#281700;
  background:linear-gradient(180deg,#fff0a0,#d99b36);
  font-size:22px;
  font-weight:950;
}
.card-vault-card.is-locked { opacity:.78; }
.card-vault-card.is-locked img { opacity:.72; filter:saturate(.82) brightness(.86); }
.card-vault-card.is-paid-locked {
  border-color:rgba(209,128,255,.72);
}
.card-vault-card.is-paid-locked .card-vault-copy::after {
  content:"現在のガチャ対象外";
  display:inline-block;
  color:#d7b3ff;
  font-size:10px;
  font-weight:900;
}
.gacha-reveal-card .card-vault-back {
  display:grid;
  place-items:center;
  width:100%;
  aspect-ratio:2/3;
  border:2px solid #d5ad58;
  border-radius:12px;
  background:radial-gradient(circle at 50% 28%,rgba(255,226,120,.18),transparent 38%),linear-gradient(145deg,#23172d,#070a12);
}
.gacha-reveal-card .card-vault-back span {
  display:grid;
  place-items:center;
  width:68%;
  aspect-ratio:1;
  border:1px solid rgba(255,226,138,.35);
  border-radius:50%;
  color:#ffe9a4;
  font-size:42px;
  font-weight:950;
}
@media (max-width:900px) {
  .card-vault-grid { grid-template-columns:repeat(auto-fit,minmax(172px,1fr)); gap:14px; }
}
@media (max-width:620px) {
  .card-vault-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .card-vault-card { padding:7px; border-radius:14px; }
  .card-vault-card::before { inset:5px; border-radius:10px; }
  .card-vault-frame { padding:5px; border-radius:11px; }
  .card-vault-frame img { border-radius:8px; }
  .card-vault-copy { gap:5px; padding:0 2px 2px; }
  .card-vault-copy h3 { font-size:13px; }
  .card-vault-copy p { min-height:0; font-size:10px; line-height:1.4; }
  .card-vault-copy > strong { min-width:58px; padding:4px 7px; font-size:14px; box-shadow:0 3px 0 rgba(78,42,0,.42); }
  .card-vault-rarity,
  .card-vault-frame .gallery-quantity,
  .card-vault-frame .gacha-paid-only { font-size:7px; }
  .card-vault-rarity { top:10px; left:10px; }
  .card-vault-frame .gallery-quantity { bottom:10px; left:10px; }
  .card-vault-frame .gacha-paid-only { top:10px; right:10px; max-width:calc(100% - 58px); }
  .card-vault-card.can-preview { cursor:default; }
  .card-vault-card.can-preview::after { display:none; right:10px; bottom:10px; font-size:7px; }
  .gacha-card-preview-modal { padding:12px; }
  .gacha-card-preview-dialog {
    grid-template-columns:1fr;
    gap:12px;
    width:min(94vw,420px);
    padding:12px;
    border-radius:18px;
  }
  .gacha-card-preview-image-shell { padding:8px; }
  .gacha-card-preview-image-shell img { max-height:62vh; }
  .gacha-card-preview-copy { padding:0 4px 4px; gap:8px; }
  .gacha-card-preview-copy p { font-size:12px; line-height:1.55; }
  .gacha-card-preview-copy strong { font-size:18px; }
}
@media (max-width:390px) {
  .card-vault-grid { gap:8px; }
  .card-vault-copy p { display:none; }
}

/* ===== Hamburger menu input-latency pass ===== */
.menu-performance-mode .portrait-video,
.menu-performance-mode .scene-rings,
.menu-performance-mode .scene-light,
.menu-performance-mode .video-vignette {
  visibility:hidden!important;
}
.site-menu {
  contain:layout paint;
}
.menu-backdrop {
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  background:rgba(4,15,35,.76)!important;
}
.menu-panel {
  contain:layout paint;
  background:linear-gradient(180deg,#113057,#12183c)!important;
  box-shadow:-8px 0 18px rgba(0,18,48,.38),inset 1px 0 rgba(255,255,255,.16)!important;
}
.menu-links a,
.menu-social-links a,
.menu-audio .bgm-control,
.menu-member-card {
  filter:none!important;
  transition:background-color 40ms linear,border-color 40ms linear,color 40ms linear!important;
  box-shadow:0 3px 7px rgba(0,19,48,.2),inset 0 1px rgba(255,255,255,.18)!important;
}
.menu-links a:hover,
.menu-links a:focus-visible,
.menu-links a.is-pressing,
.menu-links a:active {
  transform:none!important;
  filter:none!important;
  border-color:#fff!important;
  color:#fff!important;
  background:#4d8fe5!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.2)!important;
}
.menu-links a.is-pressing span,
.menu-links a:active span {
  color:#fff;
  background:#e84d91;
}

/* ===== Lightweight selected action indicator ===== */
.deck-head-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}
.selected-item-copy {
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 10px;
  border:1px solid rgba(255,224,135,.82);
  border-radius:999px;
  color:#fff4bf;
  background:#342313;
  font-size:10px;
  font-weight:950;
  line-height:1.2;
  text-shadow:none!important;
}
.item-choice.modern-item[aria-pressed="true"],
.item-choice.modern-item[data-selected="true"] {
  outline:3px solid #fff0a0!important;
  outline-offset:1px;
  border-color:#fff!important;
}
.item-choice.modern-item[aria-pressed="true"] strong::after,
.item-choice.modern-item[data-selected="true"] strong::after {
  content:"選択中";
  display:inline-block;
  margin-left:6px;
  padding:2px 5px;
  border-radius:3px;
  color:#351300;
  background:#ffe279;
  font:950 8px/1.2 system-ui,sans-serif;
  text-shadow:none!important;
  vertical-align:middle;
}

/* ===== 10 second block puzzle ===== */
.clicker-game,
.block-game,
.shooting-game,
.whack-game,
.roach-game,
.clicker-game *,
.block-game *,
.shooting-game *,
.whack-game *,
.roach-game * {
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
.clicker-game img,
.block-game img,
.shooting-game img,
.whack-game img,
.roach-game img,
.clicker-game canvas,
.block-game canvas,
.shooting-game canvas,
.whack-game canvas,
.roach-game canvas {
  -webkit-user-drag:none;
  user-drag:none;
}
.clicker-start-button,
.clicker-hit-button,
.block-controls button,
.shooting-target,
.whack-hole,
.roach-target {
  -webkit-tap-highlight-color:transparent;
}
.block-game {
  display:grid;
  grid-template-columns:minmax(280px,.85fr) minmax(300px,1.15fr);
  gap:18px;
  padding:clamp(14px,2.4vw,24px);
  border:1px solid rgba(202,233,255,.66);
  border-radius:18px;
  background:#091d39;
}
.block-game-copy {
  min-height:500px;
}
.block-arena {
  display:grid;
  place-items:center;
  align-content:center;
  gap:12px;
  min-height:500px;
}
.block-canvas {
  display:block;
  width:min(100%,300px);
  height:auto;
  aspect-ratio:4/7;
  border:3px solid #fff;
  border-radius:10px;
  background:#07101f;
  box-shadow:0 0 0 3px #315b91,0 10px 22px rgba(0,0,0,.32);
  image-rendering:auto;
}
.block-controls {
  display:grid;
  grid-template-columns:repeat(4,56px);
  gap:8px;
}
.block-controls button {
  min-height:48px;
  border:2px solid #fff;
  border-radius:12px;
  color:#fff;
  background:#4b8fe5;
  box-shadow:0 4px 0 #244f91;
  font-size:20px;
  font-weight:950;
  touch-action:manipulation;
}
.block-controls button:active:not(:disabled) {
  transform:translateY(3px);
  box-shadow:0 1px 0 #244f91;
}
.block-controls button:disabled {
  opacity:.42;
}
@media (max-width:900px) {
  .block-game { grid-template-columns:1fr; }
  .block-game-copy,
  .block-arena { min-height:auto; }
}
@media (max-width:620px) {
  .deck-head-actions { width:100%; justify-content:space-between; }
  .selected-item-copy { max-width:70%; }
  .block-game { padding:10px; }
  .block-canvas { width:min(100%,240px); }
  .block-controls { grid-template-columns:repeat(4,52px); }
}

/* ===== Target shooting mini game ===== */
.shooting-game {
  display:grid;
  grid-template-columns:minmax(260px,.8fr) minmax(360px,1.2fr);
  gap:18px;
  padding:clamp(14px,2.4vw,24px);
  border:1px solid rgba(202,233,255,.66);
  border-radius:18px;
  background:#091d39;
}
.shooting-copy h1 { margin:8px 0 10px; color:#fff; }
.shooting-copy p { color:#c9daea; line-height:1.7; }
.shooting-arena {
  position:relative;
  min-height:520px;
  overflow:hidden;
  border:3px solid #fff;
  border-radius:16px;
  cursor:none;
  background:
    linear-gradient(rgba(92,160,222,.12) 1px,transparent 1px),
    linear-gradient(90deg,rgba(92,160,222,.12) 1px,transparent 1px),
    radial-gradient(circle at center,#153b66,#061326 72%);
  background-size:32px 32px,32px 32px,auto;
  box-shadow:0 0 0 3px #315b91,0 12px 28px rgba(0,0,0,.35);
  touch-action:manipulation;
}
.shooting-reticle {
  position:absolute;
  z-index:8;
  left:0;
  top:0;
  width:52px;
  height:52px;
  border:2px solid rgba(255,255,255,.9);
  border-radius:50%;
  opacity:0;
  pointer-events:none;
  box-shadow:0 0 0 2px rgba(0,0,0,.55),inset 0 0 0 1px rgba(0,0,0,.55);
}
.shooting-reticle::before,
.shooting-reticle::after {
  content:"";
  position:absolute;
  background:#fff;
  box-shadow:0 0 2px #000;
}
.shooting-reticle::before { left:50%; top:-9px; bottom:-9px; width:2px; transform:translateX(-50%); }
.shooting-reticle::after { top:50%; left:-9px; right:-9px; height:2px; transform:translateY(-50%); }
.shooting-reticle i {
  position:absolute;
  left:50%;
  top:50%;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#ef2e54;
  transform:translate(-50%,-50%);
  box-shadow:0 0 8px #ef2e54;
}
.shooting-reticle.is-visible { opacity:1; }
.shooting-reticle.is-firing { animation:reticleKick .18s ease-out; }
.shooting-target {
  position:absolute;
  left:0;
  top:0;
  width:clamp(78px,11vw,112px);
  aspect-ratio:1;
  padding:0;
  overflow:visible;
  border:4px solid #fff;
  border-radius:50%;
  background:#e82764;
  box-shadow:0 0 0 5px #e82764,0 8px 18px rgba(0,0,0,.38);
  cursor:none;
  transition:transform 70ms linear;
  touch-action:manipulation;
}
.shooting-target img { display:block; width:100%; height:100%; border-radius:50%; object-fit:cover; pointer-events:none; }
.shooting-target span {
  position:absolute;
  inset:50% auto auto 50%;
  padding:4px 8px;
  border-radius:5px;
  color:#fff;
  background:#e82764;
  font-weight:1000;
  opacity:0;
  transform:translate(-50%,-50%);
  pointer-events:none;
}
.shooting-impact {
  position:absolute;
  z-index:3;
  left:50%;
  top:50%;
  width:20px;
  height:20px;
  border:4px solid #fff4b0;
  border-radius:50%;
  opacity:0;
  transform:translate(-50%,-50%);
  pointer-events:none;
}
.shooting-target.is-hit span { animation:shootingHit .28s ease-out; }
.shooting-target.is-hit .shooting-impact { animation:shootingImpact .28s ease-out; }
.shooting-target.is-hit img { filter:brightness(1.7) contrast(1.2); }
.shooting-arena::after {
  content:"";
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  background:radial-gradient(circle at center,rgba(255,244,176,.65),transparent 24%);
}
.shooting-arena.is-fired::after { animation:muzzleFlash .12s ease-out; }
.shooting-target:disabled { opacity:.45; filter:grayscale(.7); cursor:not-allowed; }
@keyframes shootingHit {
  0% { opacity:1; transform:translate(-50%,-40%) scale(.75) rotate(-7deg); }
  100% { opacity:0; transform:translate(-50%,-150%) scale(1.55) rotate(5deg); }
}
@keyframes shootingImpact { 0% { opacity:1; transform:translate(-50%,-50%) scale(.25); } 100% { opacity:0; transform:translate(-50%,-50%) scale(4.5); } }
@keyframes muzzleFlash { 0% { opacity:.9; } 100% { opacity:0; } }
@keyframes reticleKick { 0% { scale:1; } 45% { scale:.72; } 100% { scale:1; } }

/* ===== Whack-a-Abe mini game ===== */
.whack-game {
  display:grid;
  grid-template-columns:minmax(260px,.78fr) minmax(380px,1.22fr);
  gap:18px;
  padding:clamp(14px,2.4vw,24px);
  border:1px solid rgba(255,225,168,.66);
  border-radius:18px;
  background:#35131d;
}
.whack-copy h1 { margin:8px 0 10px; color:#fff; }
.whack-copy p { color:#f4d9d5; line-height:1.7; }
.whack-board {
  display:grid;
  grid-template-columns:repeat(6,1fr);
  align-content:center;
  gap:clamp(8px,1.3vw,14px);
  min-height:520px;
  padding:clamp(12px,2vw,24px);
  overflow:hidden;
  border:3px solid #ffe3a1;
  border-radius:18px;
  background:
    radial-gradient(circle at 50% 18%,rgba(255,217,128,.22),transparent 30%),
    linear-gradient(150deg,#a44a36,#56202d 58%,#281326);
  box-shadow:0 0 0 3px #9f5e37,0 12px 28px rgba(0,0,0,.35);
}
.whack-hole {
  position:relative;
  grid-column:span 2;
  min-width:0;
  aspect-ratio:1.38;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:50%;
  background:radial-gradient(ellipse at center,#080406 0 44%,#2b1015 47% 58%,#b56b3d 62% 70%,transparent 72%);
  cursor:pointer;
  touch-action:manipulation;
}
.whack-hole:nth-child(4) { grid-column:2 / span 2; }
.whack-face {
  position:absolute;
  left:50%;
  bottom:-108%;
  width:74%;
  aspect-ratio:1;
  transform:translateX(-50%);
  transition:bottom 90ms ease-out,transform 80ms ease-out;
  pointer-events:none;
}
.whack-face img { display:block; width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 5px 3px rgba(0,0,0,.45)); }
.whack-face i {
  position:absolute;
  left:50%;
  top:42%;
  padding:3px 8px;
  border:2px solid #fff;
  border-radius:6px;
  color:#fff;
  background:#ec2258;
  font:1000 14px/1 system-ui,sans-serif;
  opacity:0;
  transform:translate(-50%,-50%) rotate(-8deg);
}
.whack-hole.is-up .whack-face { bottom:-10%; }
.whack-hole.is-hit .whack-face { transform:translateX(-50%) scale(.82); }
.whack-hole.is-hit .whack-face i { animation:whackHit .26s ease-out; }
.whack-hole:disabled { cursor:default; }
@keyframes whackHit {
  0% { opacity:1; transform:translate(-50%,-20%) scale(.8) rotate(-8deg); }
  100% { opacity:0; transform:translate(-50%,-140%) scale(1.35) rotate(5deg); }
}

/* ===== Roach hunt mini game ===== */
.roach-game {
  display:grid;
  grid-template-columns:minmax(260px,.76fr) minmax(380px,1.24fr);
  gap:18px;
  padding:clamp(14px,2.4vw,24px);
  border:1px solid rgba(255,225,168,.66);
  border-radius:18px;
  background:#2e170e;
}
.roach-copy h1 { margin:8px 0 10px; color:#fff; }
.roach-copy p { color:#f2ddc9; line-height:1.7; }
.roach-arena {
  position:relative;
  min-height:520px;
  overflow:hidden;
  border:3px solid #ffe3a1;
  border-radius:18px;
  background:
    radial-gradient(circle at 18% 22%,rgba(255,240,174,.3),transparent 23%),
    radial-gradient(circle at 78% 72%,rgba(236,34,88,.22),transparent 25%),
    linear-gradient(135deg,#fff0c9 0 1px,transparent 1px 28px),
    linear-gradient(155deg,#8a3a22,#371812 58%,#140807);
  box-shadow:0 0 0 3px #9f5e37,0 12px 28px rgba(0,0,0,.35);
  cursor:crosshair;
  touch-action:none;
}
.roach-arena::before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(255,255,255,.08),transparent 1px),
    linear-gradient(0deg,rgba(255,255,255,.06),transparent 1px);
  background-size:38px 38px;
  opacity:.42;
}
.roach-target {
  position:absolute;
  left:0;
  top:0;
  z-index:1;
  width:clamp(44px,7vw,70px);
  aspect-ratio:1;
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
  transition:transform 360ms linear,opacity 80ms ease;
  will-change:transform;
  touch-action:manipulation;
}
.roach-target img {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
  filter:drop-shadow(0 5px 4px rgba(0,0,0,.5));
  animation:roachScuttle .16s steps(2,end) infinite;
}
.roach-target i {
  position:absolute;
  left:50%;
  top:44%;
  padding:3px 8px;
  border:2px solid #fff;
  border-radius:8px;
  color:#fff;
  background:#ec2258;
  font:1000 13px/1 system-ui,sans-serif;
  opacity:0;
  transform:translate(-50%,-50%) rotate(-8deg);
  pointer-events:none;
  white-space:nowrap;
}
.roach-target.is-hit {
  pointer-events:none;
}
.roach-target.is-hit img {
  animation:roachSquash .16s ease-out both;
  filter:brightness(1.5) contrast(1.15) drop-shadow(0 0 8px rgba(255,255,255,.75));
}
.roach-target.is-hit i { animation:roachHitText .28s ease-out; }
.roach-target:disabled {
  opacity:.38;
  cursor:default;
}
@keyframes roachScuttle {
  0% { translate:-1px 0; }
  100% { translate:1px 0; }
}
@keyframes roachSquash {
  0% { transform:scale(1); }
  70% { transform:scale(1.26,.62); }
  100% { transform:scale(.92,.78); }
}
@keyframes roachHitText {
  0% { opacity:1; transform:translate(-50%,-10%) scale(.85) rotate(-8deg); }
  100% { opacity:0; transform:translate(-50%,-155%) scale(1.32) rotate(7deg); }
}

/* ===== In-game authentication ===== */
.game-auth-modal[hidden] { display:none; }
.game-auth-modal {
  position:fixed;
  z-index:220;
  inset:0;
  display:grid;
  place-items:center;
  box-sizing:border-box;
  padding:max(14px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
}
.game-auth-backdrop { position:absolute; inset:0; border:0; background:rgba(2,4,10,.88); }
.game-auth-card {
  position:relative;
  width:min(430px,100%);
  max-height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow:auto;
  padding:28px;
  border:2px solid #e0b65f;
  border-radius:20px;
  color:#f8edce;
  background:linear-gradient(155deg,#231020,#071523 65%,#122c4a);
  box-shadow:0 0 0 5px #09070b,0 28px 80px #000;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.game-auth-card > img {
  display:block;
  width:76px;
  height:76px;
  margin:0 auto 14px;
  border:3px solid #f4cf76;
  border-radius:18px;
  object-fit:cover;
  box-shadow:5px 5px 0 #a31642;
}
.game-auth-card h2 { margin:7px 0 9px; text-align:center; font-size:25px; }
.game-auth-card > p { margin:0 0 18px; color:#c7cfda; font-size:12px; line-height:1.7; }
.game-auth-id-note {
  display:block;
  margin:-8px 0 14px;
  padding:8px 10px;
  border:1px solid rgba(202,233,255,.26);
  border-radius:10px;
  color:#9fb7cc;
  background:rgba(255,255,255,.035);
  font-size:10px;
  line-height:1.55;
  text-align:center;
}
.game-auth-card label { display:block; margin-bottom:6px; color:#f2ce7b; font-size:11px; font-weight:900; }
.game-auth-card input {
  width:100%;
  min-height:48px;
  padding:10px 13px;
  border:2px solid #527baa;
  border-radius:10px;
  color:#fff;
  background:#050c17;
  font:700 16px/1.2 system-ui,sans-serif;
}
.game-auth-code-area {
  margin-top:12px;
}
.game-auth-code-area[hidden] {
  display:none!important;
}
.game-auth-card input#game-auth-token {
  text-align:center;
  letter-spacing:.28em;
  font-size:20px;
  font-weight:1000;
}
.game-auth-submit {
  display:grid;
  width:100%;
  min-height:58px;
  margin-top:12px;
  place-items:center;
  border:2px solid #fff;
  border-radius:13px;
  color:#fff;
  background:linear-gradient(180deg,#ef3e78,#ad123f);
  box-shadow:0 5px 0 #65051f;
  cursor:pointer;
}
.game-auth-submit strong,.game-auth-submit span { font-weight:1000; }
.game-auth-submit small { font-size:8px; letter-spacing:.18em; }
.game-auth-submit:active { transform:translateY(4px); box-shadow:0 1px 0 #65051f; }
.game-auth-submit.secondary {
  background:linear-gradient(180deg,#f7ce6f,#b77716);
  color:#1e1003;
  box-shadow:0 5px 0 #6f3a05;
}
.game-auth-submit.secondary:active { box-shadow:0 1px 0 #6f3a05; }
.game-auth-submit:disabled,
.game-auth-resend:disabled {
  opacity:.55;
  cursor:not-allowed;
  transform:none;
}
.game-auth-resend {
  width:100%;
  margin-top:10px;
  min-height:42px;
  border:1px solid rgba(242,206,123,.6);
  border-radius:12px;
  color:#f8e9b8;
  background:rgba(255,255,255,.06);
  font-weight:900;
  cursor:pointer;
}
.game-auth-resend[hidden] {
  display:none!important;
}
.game-auth-close {
  position:absolute;
  right:10px;
  top:10px;
  width:38px;
  height:38px;
  border:2px solid #fff;
  border-radius:50%;
  color:#fff;
  background:#d91f56;
  font-size:22px;
}
.game-auth-note { display:block; margin-top:12px; color:#aeb9c7; text-align:center; }
.game-auth-open { overflow:hidden; }

/* ===== Mobile information drawer ===== */
.mobile-auth-standalone { display:none; }
.mobile-intel-drawer { display:none; }
@media (max-width:900px) {
  .shooting-game { grid-template-columns:1fr; }
  .shooting-arena { min-height:480px; }
  .whack-game { grid-template-columns:1fr; }
  .whack-board { min-height:auto; }
  .roach-game { grid-template-columns:1fr; }
  .roach-arena { min-height:470px; }
  .mobile-auth-standalone {
    display:grid;
    grid-template-columns:1fr auto;
    align-items:center;
    gap:12px;
    margin:12px 0;
    padding:12px;
    border:2px solid #efbf63;
    border-radius:14px;
    background:linear-gradient(135deg,#251020,#0b2138);
    box-shadow:3px 4px 0 #7d1740;
  }
  .mobile-auth-standalone strong,
  .mobile-auth-standalone small { display:block; }
  .mobile-auth-standalone strong { margin-top:3px; color:#fff; font-size:13px; }
  .mobile-auth-standalone small { margin-top:4px; color:#b8c6d5; font-size:9px; line-height:1.45; }
  .mobile-auth-standalone .account-cta { min-width:126px; padding:11px 9px; color:#fff; border-color:#fff; background:#d72059; }
  .mobile-intel-drawer {
    display:block;
    margin:14px 0 92px;
    border:2px solid #f2c666;
    border-radius:15px;
    color:#fff;
    background:#0b1727;
    box-shadow:4px 5px 0 #7d1740;
  }
  .mobile-intel-drawer > summary {
    display:grid;
    grid-template-columns:34px 1fr auto;
    align-items:center;
    gap:8px;
    min-height:58px;
    padding:10px 13px;
    cursor:pointer;
    list-style:none;
  }
  .mobile-intel-drawer > summary::-webkit-details-marker { display:none; }
  .mobile-intel-drawer > summary span { display:grid; place-items:center; width:30px; height:30px; border-radius:8px; color:#211000; background:#f2c666; }
  .mobile-intel-drawer > summary b { font-size:14px; }
  .mobile-intel-drawer > summary small { color:#a9b9ca; font-size:9px; }
  .mobile-intel-drawer[open] > summary { border-bottom:1px solid rgba(242,198,102,.35); }
  .mobile-intel-content { display:grid; gap:10px; padding:10px; }
  .mobile-intel-content .account-card,
  .mobile-intel-content .intel-card { display:block; }
}
@media (max-width:620px) {
  .shooting-arena { min-height:400px; }
  .shooting-target { width:82px; }
  .whack-board { gap:5px; padding:8px; }
  .whack-face i { font-size:11px; }
  .roach-arena { min-height:390px; }
  .roach-target { width:clamp(42px,13vw,58px); }
  .game-auth-card { padding:24px 18px 20px; }
  .mobile-auth-standalone { grid-template-columns:1fr; }
  .mobile-auth-standalone .account-cta { width:100%; }
}
@media (pointer:coarse) {
  .shooting-arena,
  .shooting-target { cursor:default; }
  .shooting-reticle {
    width:58px;
    height:58px;
    border-width:3px;
    filter:drop-shadow(0 0 4px rgba(0,0,0,.85));
  }
}

@media (max-width:620px) {
  .game-auth-modal {
    place-items:center;
  }
  .game-auth-card {
    max-height:calc(100dvh - 24px);
    padding:20px 16px 18px;
  }
  .game-auth-card > img {
    width:54px;
    height:54px;
    margin-bottom:10px;
    border-radius:14px;
  }
  .game-auth-card h2 {
    margin:4px 0 7px;
    font-size:21px;
  }
  .game-auth-card > p {
    margin-bottom:12px;
    font-size:11px;
    line-height:1.55;
  }
  .game-auth-id-note {
    margin:-4px 0 10px;
    padding:7px 9px;
  }
  .game-auth-submit {
    min-height:52px;
  }
}

/* ===== In-panel mini game play layout ===== */
.game-panel-overlay.is-minigame-playing .game-panel-head {
  display:none;
}
.game-panel-overlay.is-minigame-playing .game-panel-body {
  padding-top:8px;
}
.game-panel-overlay.is-minigame-playing .clicker-copy .message,
.game-panel-overlay.is-minigame-playing .block-game-copy .message,
.game-panel-overlay.is-minigame-playing .shooting-copy .message,
.game-panel-overlay.is-minigame-playing .whack-copy .message,
.game-panel-overlay.is-minigame-playing .roach-copy .message {
  order:20;
  margin-top:auto;
}
.game-panel-overlay.is-minigame-playing .clicker-actions {
  order:10;
}
@media (max-width:620px) {
  .game-panel-overlay.is-minigame-playing .game-panel-body {
    padding-top:44px;
    padding-bottom:18px;
  }
  .game-panel-overlay.is-minigame-playing .clicker-game,
  .game-panel-overlay.is-minigame-playing .block-game,
  .game-panel-overlay.is-minigame-playing .shooting-game,
  .game-panel-overlay.is-minigame-playing .whack-game,
  .game-panel-overlay.is-minigame-playing .roach-game {
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
    margin-top:0;
    padding:10px;
  }
  .game-panel-overlay.is-minigame-playing .clicker-copy,
  .game-panel-overlay.is-minigame-playing .block-game-copy,
  .game-panel-overlay.is-minigame-playing .shooting-copy,
  .game-panel-overlay.is-minigame-playing .whack-copy,
  .game-panel-overlay.is-minigame-playing .roach-copy {
    display:contents;
    min-height:0;
    padding:0;
  }
  .game-panel-overlay.is-minigame-playing .clicker-copy > .overline,
  .game-panel-overlay.is-minigame-playing .block-game-copy > .overline,
  .game-panel-overlay.is-minigame-playing .shooting-copy > .overline,
  .game-panel-overlay.is-minigame-playing .whack-copy > .overline,
  .game-panel-overlay.is-minigame-playing .roach-copy > .overline,
  .game-panel-overlay.is-minigame-playing .clicker-copy > h1,
  .game-panel-overlay.is-minigame-playing .block-game-copy > h1,
  .game-panel-overlay.is-minigame-playing .shooting-copy > h1,
  .game-panel-overlay.is-minigame-playing .whack-copy > h1,
  .game-panel-overlay.is-minigame-playing .roach-copy > h1,
  .game-panel-overlay.is-minigame-playing .clicker-copy > p,
  .game-panel-overlay.is-minigame-playing .block-game-copy > p,
  .game-panel-overlay.is-minigame-playing .shooting-copy > p,
  .game-panel-overlay.is-minigame-playing .whack-copy > p,
  .game-panel-overlay.is-minigame-playing .roach-copy > p {
    order:1;
  }
  .game-panel-overlay.is-minigame-playing .clicker-copy > h1,
  .game-panel-overlay.is-minigame-playing .block-game-copy > h1,
  .game-panel-overlay.is-minigame-playing .shooting-copy > h1,
  .game-panel-overlay.is-minigame-playing .whack-copy > h1,
  .game-panel-overlay.is-minigame-playing .roach-copy > h1 {
    margin:3px 0 0;
    font-size:clamp(23px,7vw,30px);
    line-height:1.08;
  }
  .game-panel-overlay.is-minigame-playing .clicker-copy > p,
  .game-panel-overlay.is-minigame-playing .block-game-copy > p,
  .game-panel-overlay.is-minigame-playing .shooting-copy > p,
  .game-panel-overlay.is-minigame-playing .whack-copy > p,
  .game-panel-overlay.is-minigame-playing .roach-copy > p {
    margin:0 0 3px;
    font-size:11px;
    line-height:1.45;
  }
  .game-panel-overlay.is-minigame-playing .clicker-arena,
  .game-panel-overlay.is-minigame-playing .block-arena,
  .game-panel-overlay.is-minigame-playing .shooting-arena,
  .game-panel-overlay.is-minigame-playing .whack-board,
  .game-panel-overlay.is-minigame-playing .roach-arena {
    order:2;
    margin:0;
  }
  .game-panel-overlay.is-minigame-playing .clicker-stats {
    order:3;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
    margin:0;
  }
  .game-panel-overlay.is-minigame-playing .clicker-stats div {
    min-height:48px;
    padding:6px 5px;
  }
  .game-panel-overlay.is-minigame-playing .clicker-stats small {
    font-size:7px;
  }
  .game-panel-overlay.is-minigame-playing .clicker-stats strong {
    margin-top:4px;
    font-size:17px;
  }
  .game-panel-overlay.is-minigame-playing .message {
    order:6;
    margin-top:2px;
  }
  .game-panel-overlay.is-minigame-playing .clicker-actions {
    order:5;
    margin-top:4px;
  }
}

/* ===== Stage item selector refresh ===== */
.stage-item-selector {
  position:absolute;
  z-index:14;
  right:24px;
  bottom:134px;
  display:grid;
  justify-items:end;
  gap:7px;
  width:min(430px,calc(100% - 48px));
  pointer-events:none;
}
.stage-item-selector > * {
  pointer-events:auto;
}
.stage-selected-item {
  max-width:min(320px,100%);
  min-height:24px;
  padding:5px 10px;
  border:2px solid #fff6b8;
  color:#42192d;
  background:linear-gradient(180deg,#fff6b8,#ffd86c);
  box-shadow:0 4px 10px rgba(0,24,60,.22),inset 0 1px rgba(255,255,255,.6);
  font-size:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.item-menu-toggle {
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:9px;
  min-width:176px;
  min-height:46px;
  padding:8px 14px 8px 17px;
  border:3px solid #fff;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(180deg,#70d1ff,#4d92ef 58%,#5754ce);
  box-shadow:0 0 0 3px rgba(255,132,190,.58),0 8px 16px rgba(0,24,60,.32),inset 0 2px rgba(255,255,255,.32);
  font:inherit;
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.item-menu-toggle span {
  font-size:14px;
  font-weight:1000;
  line-height:1;
  text-shadow:0 2px 0 #25498c;
}
.item-menu-toggle small {
  padding:3px 7px;
  border-radius:999px;
  color:#275098;
  background:#fff;
  font-size:8px;
  font-weight:1000;
  letter-spacing:.14em;
}
.item-menu-toggle:active {
  transform:translateY(2px);
  box-shadow:0 0 0 3px rgba(255,132,190,.5),0 4px 10px rgba(0,24,60,.28),inset 0 3px rgba(48,73,139,.2);
}
.stage-item-selector[data-open="true"] .item-menu-toggle {
  background:linear-gradient(180deg,#ff94c4,#e94f93 58%,#b72a6d);
}
.stage-item-menu {
  position:absolute;
  right:0;
  bottom:calc(100% + 8px);
  width:min(430px,calc(100vw - 28px));
  max-height:min(58vh,430px);
  padding:12px;
  overflow:auto;
  overscroll-behavior:contain;
  border:2px solid rgba(255,255,255,.9);
  border-radius:18px;
  background:
    radial-gradient(circle at 16% 0,rgba(126,215,255,.24),transparent 30%),
    linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.055)),
    rgba(9,29,57,.96);
  box-shadow:0 14px 30px rgba(0,21,54,.42),inset 0 1px rgba(255,255,255,.28);
  opacity:0;
  visibility:hidden;
  transform:translateY(8px) scale(.985);
  transform-origin:right bottom;
  transition:opacity .12s linear, transform .12s ease, visibility .12s linear;
  contain:layout paint;
}
.stage-item-selector[data-open="true"] .stage-item-menu {
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}
.stage-resource-hud {
  display:none;
}
.stage-item-menu-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:9px;
}
.stage-item-menu-head a {
  flex:0 0 auto;
  color:#fff6b8;
  font-size:10px;
  font-weight:950;
  text-decoration:none;
}
.stage-item-grid {
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.stage-item-menu .modern-item,
.stage-item-menu .item-choice.modern-item:nth-child(n) {
  display:grid;
  grid-template-columns:56px minmax(0,1fr) auto;
  grid-template-rows:auto auto auto;
  gap:4px 10px;
  min-height:80px;
  padding:9px 10px;
  overflow:hidden;
}
.stage-item-menu .modern-item img {
  grid-column:1;
  grid-row:1 / 4;
  align-self:center;
  width:54px;
  height:54px;
}
.stage-item-menu .modern-item strong {
  grid-column:2;
  grid-row:1;
  align-self:center;
  min-width:0;
  color:#fff;
  font-size:13px;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.stage-item-menu .modern-item small {
  grid-column:2 / 4;
  grid-row:2;
  display:block;
  min-width:0;
  margin:0;
  padding-right:72px;
  color:#dcecff;
  font-size:10px;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.stage-item-menu .item-level {
  position:static!important;
  grid-column:3;
  grid-row:1;
  justify-self:end;
  align-self:center;
  min-width:52px;
  padding:3px 6px;
  font-size:7px;
  line-height:1;
  white-space:nowrap;
  transform:none!important;
}
.stage-item-menu .card-reward {
  position:static;
  grid-column:3;
  grid-row:2;
  justify-self:end;
  align-self:center;
  color:#fff6b8;
  font:1000 11px/1 system-ui,sans-serif;
  white-space:nowrap;
  text-shadow:0 1px 0 #7e4a00;
}
.stage-item-menu .modern-item .tag {
  position:static;
  grid-column:2 / 4;
  grid-row:3;
  justify-self:start;
  margin-top:2px;
}
.stage-item-menu .item-choice.modern-item[aria-pressed="true"] strong::after,
.stage-item-menu .item-choice.modern-item[data-selected="true"] strong::after {
  margin-left:5px;
  vertical-align:1px;
}
.desktop-command-deck {
  margin-top:14px;
  padding:16px;
  border-color:rgba(202,233,255,.7);
  background:
    radial-gradient(circle at 10% 0,rgba(112,209,255,.16),transparent 28%),
    linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.045)),
    rgba(9,29,57,.9);
}
.desktop-command-deck .deck-head {
  margin-bottom:10px;
}
.desktop-command-deck .deck-head h2 {
  margin:3px 0 0;
}
.desktop-item-grid {
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.desktop-command-deck .modern-item,
.desktop-command-deck .item-choice.modern-item:nth-child(n) {
  min-height:92px;
  padding:10px 11px;
  border-color:rgba(202,233,255,.58);
  background:
    linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.045)),
    rgba(13,33,65,.88);
}
.desktop-command-deck .modern-item img {
  width:60px;
  height:60px;
}
.desktop-command-deck .modern-item strong {
  padding-right:58px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.desktop-command-deck .modern-item small {
  padding-right:58px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.desktop-command-deck .card-reward {
  left:auto;
  right:10px;
  bottom:10px;
  color:#fff6b8;
  font:1000 11px/1 system-ui,sans-serif;
}

@media (max-width:620px) {
  .nexus-app { padding-top:6px; }
  .nexus-header {
    flex-direction:row!important;
    align-items:center!important;
    gap:6px;
    min-height:50px;
    padding:6px 7px;
    border-radius:13px;
  }
  .nexus-brand { gap:7px; min-width:0; }
  .brand-sigil { width:32px; height:32px; border-radius:10px; }
  .nexus-brand b {
    max-width:112px;
    font-size:13px!important;
    line-height:1.1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .nexus-brand small { display:none; }
  .account-cluster {
    flex:1 1 auto;
    flex-wrap:nowrap;
    justify-content:flex-end;
    gap:4px;
    min-width:0;
  }
  .tier-badge {
    min-height:27px;
    padding:4px 6px;
    gap:0;
    font-size:8px;
    letter-spacing:.04em;
  }
  .tier-badge i { display:none; }
  .resource-pill {
    display:none!important;
  }
  .icon-button {
    flex:0 0 auto;
    width:31px;
    height:31px;
    border-radius:9px;
    font-size:17px;
  }
  .stage-resource-hud {
    position:absolute;
    z-index:7;
    top:10px;
    right:10px;
    display:flex;
    align-items:center;
    gap:5px;
    max-width:calc(100% - 172px);
    padding:4px;
    border:1px solid rgba(255,255,255,.64);
    border-radius:999px;
    color:#fff;
    background:rgba(8,24,50,.42);
    box-shadow:0 5px 14px rgba(0,19,48,.18),inset 0 1px rgba(255,255,255,.18);
    backdrop-filter:blur(6px);
  }
  .stage-resource-hud span {
    display:flex;
    align-items:center;
    gap:3px;
    min-width:0;
    padding:3px 6px;
    border-radius:999px;
    background:rgba(255,255,255,.12);
  }
  .stage-resource-hud small {
    color:#d7ecff;
    font-size:7px;
    font-weight:900;
    letter-spacing:.04em;
    white-space:nowrap;
  }
  .stage-resource-hud strong {
    max-width:48px;
    overflow:hidden;
    color:#fff6b8;
    font-size:11px;
    font-weight:1000;
    line-height:1;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .desktop-command-deck {
    display:none;
  }
  .stage-item-selector {
    right:12px;
    bottom:112px;
    gap:5px;
    width:min(342px,calc(100% - 24px));
  }
  .stage-selected-item {
    max-width:190px;
    min-height:22px;
    padding:4px 8px;
    font-size:9px;
  }
  .item-menu-toggle {
    min-width:128px;
    min-height:38px;
    padding:6px 10px 6px 12px;
    border-width:2px;
  }
  .item-menu-toggle span { font-size:12px; }
  .item-menu-toggle small { padding:2px 5px; font-size:7px; }
  .stage-item-menu {
    position:fixed;
    left:12px;
    right:12px;
    bottom:188px;
    width:auto;
    box-sizing:border-box;
    max-height:min(46vh,360px);
    padding:9px;
    border-radius:15px;
    transform-origin:right bottom;
  }
  .stage-item-menu .modern-item,
  .stage-item-menu .item-choice.modern-item:nth-child(n) {
    grid-template-columns:48px minmax(0,1fr) auto;
    min-height:72px;
    padding:8px;
    gap:3px 8px;
  }
  .stage-item-menu .modern-item img {
    width:46px;
    height:46px;
  }
  .stage-item-menu .modern-item strong { font-size:12px; }
  .stage-item-menu .modern-item small {
    padding-right:60px;
    font-size:9px;
  }
  .stage-item-menu .item-level {
    min-width:46px;
    font-size:6px;
  }
  .stage-item-menu .card-reward { font-size:10px; }
}

@media (max-width:390px) {
  .nexus-brand b { max-width:92px; font-size:12px!important; }
  .resource-pill { padding-inline:5px; }
  .resource-pill strong { max-width:34px; font-size:11px; }
  .stage-item-selector { bottom:106px; }
  .stage-selected-item { max-width:172px; }
  .item-menu-toggle { min-width:120px; }
  .stage-item-menu .modern-item small { display:block; }
}

/* ===== Mobile fixed home layout ===== */
.stage-info-drawer,
.stage-login-chip,
.mobile-bottom-ornament {
  display:none;
}
@media (max-width:620px) {
  html,
  body {
    height:100%;
    overflow:hidden;
  }
  .nexus-body {
    --mobile-ornament-h:0px;
    height:100dvh;
    min-height:0;
    overflow:hidden;
  }
  .nexus-app {
    display:grid;
    grid-template-rows:48px minmax(0,1fr) 54px var(--mobile-ornament-h);
    gap:5px;
    width:100%;
    height:100dvh;
    min-height:0;
    padding:5px 7px 6px;
    overflow:hidden;
  }
  .nexus-header {
    min-height:0!important;
    height:48px;
    padding:6px;
    position:relative;
  }
  .nexus-brand {
    flex:1 1 auto;
    max-width:calc(100% - 138px);
    overflow:hidden;
  }
  .nexus-brand b {
    max-width:clamp(150px,52vw,220px)!important;
    font-size:14px!important;
  }
  .account-cluster {
    position:absolute;
    inset:0 6px 0 auto;
    display:block!important;
    width:130px;
    margin-left:0;
  }
  .account-login-chip {
    position:absolute;
    right:38px;
    top:50%;
    transform:translateY(-50%);
    min-width:86px;
    max-width:86px;
    min-height:30px;
    padding:4px 8px;
    border-radius:10px;
    font-size:8px;
    letter-spacing:.01em;
  }
  .account-login-chip i {
    width:5px;
    height:5px;
  }
  .tier-badge {
    position:absolute;
    right:38px;
    top:50%;
    transform:translateY(-50%);
    min-height:clamp(22px,calc(100% - 12px),28px);
    padding:4px 7px;
    border-radius:999px;
    background:rgba(8,24,50,.62);
  }
  .icon-button {
    position:absolute;
    right:0;
    top:50%;
    transform:translateY(-50%);
    width:clamp(30px,calc(100% - 10px),36px);
    height:clamp(30px,calc(100% - 10px),36px);
    border-radius:10px;
    font-size:clamp(15px,4vw,19px);
  }
  .nexus-layout {
    min-height:0;
    height:100%;
    margin-top:0;
    overflow:hidden;
  }
  .hero-zone {
    display:block;
    min-height:0;
    height:100%;
    overflow:hidden;
  }
  .world-scene,
  .battle-stage {
    min-height:0!important;
    height:100%;
    border-radius:16px;
  }
  .nexus-mobile-nav {
    position:relative!important;
    z-index:50;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    display:grid;
    align-self:stretch;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    min-height:0;
    height:54px;
    margin:0;
    padding:5px;
    border-radius:15px;
  }
  .nexus-mobile-nav a {
    min-height:0!important;
    height:44px;
    padding:2px 1px;
    gap:1px;
    font-size:7px!important;
    line-height:1.05;
  }
  .nexus-mobile-nav a span {
    font-size:16px;
  }
  .mobile-bottom-ornament {
    position:relative;
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
    gap:7px;
    height:var(--mobile-ornament-h);
    min-height:0;
    overflow:hidden;
    border:1px solid rgba(242,210,123,.48);
    border-radius:14px 14px 4px 4px;
    padding:0 clamp(8px,2.4vw,12px);
    background:
      linear-gradient(90deg,transparent 0 8%,rgba(255,232,161,.36) 8% 10%,transparent 10% 90%,rgba(255,232,161,.32) 90% 92%,transparent 92%),
      radial-gradient(ellipse at 50% 0,rgba(255,228,149,.18),transparent 55%),
      repeating-linear-gradient(90deg,rgba(242,210,123,.09) 0 1px,transparent 1px 18px),
      linear-gradient(180deg,#151229,#070912);
    box-shadow:inset 0 1px rgba(255,244,199,.18),inset 0 0 18px rgba(242,210,123,.12),0 -6px 16px rgba(0,0,0,.28);
    opacity:1;
    transform:translateY(-1px);
    pointer-events:none;
  }
  .mobile-bottom-ornament::before,
  .mobile-bottom-ornament::after {
    content:"";
    position:absolute;
    top:5px;
    width:34%;
    height:1px;
    background:linear-gradient(90deg,transparent,#ffe8a1,transparent);
    opacity:.62;
  }
  .mobile-bottom-ornament::before { left:7%; }
  .mobile-bottom-ornament::after { right:7%; transform:scaleX(-1); }
  .mobile-bottom-monitor-label {
    position:relative;
    z-index:1;
    display:grid;
    place-items:center;
    min-width:42px;
    height:clamp(18px,calc(var(--mobile-ornament-h) - 9px),26px);
    padding:0 8px;
    border:1px solid rgba(255,232,161,.58);
    border-radius:999px;
    color:#171019;
    background:linear-gradient(180deg,#fff0ac,#c99235);
    box-shadow:0 0 10px rgba(242,210,123,.18),inset 0 1px rgba(255,255,255,.55);
    font:1000 clamp(7px,1.55dvh,10px)/1 "Noto Sans JP","Yu Gothic",system-ui,sans-serif;
    letter-spacing:.12em;
    opacity:0;
  }
  .mobile-bottom-monitor-window {
    position:relative;
    z-index:1;
    min-width:0;
    overflow:hidden;
    height:clamp(18px,calc(var(--mobile-ornament-h) - 9px),26px);
    border-left:1px solid rgba(255,232,161,.25);
    border-right:1px solid rgba(255,232,161,.25);
    background:linear-gradient(180deg,rgba(0,0,0,.18),rgba(255,255,255,.025));
    mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent);
    opacity:0;
  }
  .mobile-bottom-monitor-window span {
    position:absolute;
    top:50%;
    left:0;
    display:inline-block;
    min-width:100%;
    white-space:nowrap;
    color:#fff0bd;
    text-shadow:0 1px 0 #000,0 0 10px rgba(242,210,123,.24);
    font:900 clamp(8px,1.7dvh,11px)/1 "Noto Sans JP","Yu Gothic",system-ui,sans-serif;
    letter-spacing:.05em;
    animation:mobile-news-crawl 14s linear infinite;
    transform:translate(-100%,-50%);
    will-change:transform;
  }
  @keyframes mobile-news-crawl {
    from { transform:translate(-100%,-50%); }
    to { transform:translate(100%,-50%); }
  }
  .news-ticker,
  .mobile-auth-standalone,
  .mobile-intel-drawer,
  #page-message {
    display:none!important;
  }
  .event-card {
    top:8px;
    left:8px;
    width:132px;
    padding:7px 8px;
  }
  .event-card strong {
    font-size:10px;
  }
  .mission-meta {
    margin-top:4px;
    font-size:8px;
  }
  .stage-resource-hud {
    top:8px;
    right:8px;
    max-width:calc(100% - 154px);
    padding:3px;
  }
  .stage-resource-hud span {
    padding:2px 5px;
  }
  .stage-info-drawer {
    position:absolute;
    z-index:18;
    top:47px;
    right:8px;
    display:block;
    width:min(176px,calc(100% - 164px));
    color:#fff;
  }
  .stage-info-drawer > summary {
    display:grid;
    place-items:center;
    width:42px;
    min-height:24px;
    margin-left:auto;
    border:1px solid rgba(255,255,255,.72);
    border-radius:999px;
    color:#17345e;
    background:linear-gradient(180deg,#fff6b8,#ffd86c);
    box-shadow:0 4px 10px rgba(0,20,50,.2);
    font:1000 10px/1 system-ui,sans-serif;
    list-style:none;
    cursor:pointer;
  }
  .stage-info-drawer > summary::-webkit-details-marker {
    display:none;
  }
  .stage-info-content {
    display:grid;
    gap:6px;
    margin-top:5px;
    padding:8px;
    border:1px solid rgba(255,255,255,.72);
    border-radius:12px;
    background:rgba(8,24,50,.76);
    box-shadow:0 8px 18px rgba(0,19,48,.28),inset 0 1px rgba(255,255,255,.18);
    backdrop-filter:blur(8px);
  }
  .stage-info-content p {
    margin:0;
  }
  .stage-info-content b,
  .stage-info-content small {
    display:block;
  }
  .stage-info-content b {
    font-size:10px;
  }
  .stage-info-content small {
    margin-top:2px;
    color:#cfe7ff;
    font-size:8px;
    line-height:1.3;
  }
  .stage-info-content a {
    display:grid;
    place-items:center;
    min-height:25px;
    padding:4px 6px;
    border:1px solid rgba(255,255,255,.62);
    border-radius:999px;
    color:#fff;
    background:linear-gradient(180deg,#70d1ff,#4d92ef);
    font-size:9px;
    font-weight:950;
    text-decoration:none;
  }
  .stage-info-content nav {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:5px;
  }
  .stage-info-content nav a {
    min-height:22px;
    background:rgba(255,255,255,.12);
    font-size:8px;
  }
  .character-identity {
    left:10px;
    bottom:10px;
    max-width:calc(100% - 142px);
    padding:9px 10px;
  }
  .stage-login-chip {
    position:absolute;
    z-index:12;
    top:39px;
    right:8px;
    bottom:auto;
    left:auto;
    display:inline-grid;
    grid-auto-flow:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    min-width:86px;
    max-width:min(98px,calc(100% - 158px));
    margin-bottom:0;
    min-height:24px;
    padding:3px 9px;
    border:1px solid rgba(255,255,255,.42);
    border-radius:9px;
    color:#fff3f8;
    background:
      linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.035)),
      linear-gradient(180deg,rgba(196,62,118,.82),rgba(99,37,86,.86));
    text-decoration:none;
    box-shadow:
      0 4px 8px rgba(0,20,50,.17),
      inset 0 1px rgba(255,255,255,.22),
      inset 0 -1px rgba(31,4,29,.22);
    backdrop-filter:blur(4px);
  }
  .stage-login-chip::before {
    content:"";
    flex:0 0 auto;
    width:5px;
    height:5px;
    border-radius:50%;
    background:#ffd9ec;
    box-shadow:0 0 5px rgba(255,178,218,.65);
  }
  .stage-login-chip small,
  .stage-login-chip b {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .stage-login-chip small {
    display:none;
  }
  .stage-login-chip b {
    color:#fff;
    font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;
    font-size:8px;
    font-weight:900;
    line-height:1;
    letter-spacing:.015em;
    text-shadow:0 1px 1px rgba(44,6,35,.5);
  }
  .character-identity .rarity {
    font-size:7px;
  }
  .character-identity h1 {
    font-size:28px;
  }
  .character-identity p {
    display:block;
    margin-top:2px;
    color:#e7f6ff;
    font-size:9px;
    line-height:1.22;
    text-shadow:0 1px 2px rgba(0,0,0,.65);
  }
  .portrait-video-shell {
    width:min(101vw,calc((100dvh - 106px) * .7),440px);
    max-height:103%;
  }
  .stage-item-selector {
    right:10px;
    bottom:112px;
    width:auto;
  }
  .stage-selected-item {
    max-width:124px;
  }
  .item-menu-toggle {
    min-width:112px;
  }
  .stage-punish-button {
    right:10px;
    bottom:10px;
    width:84px;
    height:84px;
  }
  .stage-punish-button strong {
    min-width:3.8em;
    font-size:14px;
  }
  .stage-punish-button small {
    min-width:3.2em;
    font-size:8px;
  }
  .stage-item-menu {
    position:fixed;
    left:10px;
    right:10px;
    bottom:190px;
    width:auto;
    max-height:min(42vh,330px);
    transform-origin:right bottom;
  }
}

@media (max-width:390px) {
  .nexus-brand b {
    max-width:clamp(132px,50vw,184px)!important;
  }
  .tier-badge {
    padding-inline:6px;
    font-size:7px;
  }
  .stage-info-drawer {
    width:min(160px,calc(100% - 154px));
  }
  .stage-resource-hud strong {
    max-width:38px;
  }
  .stage-item-selector {
    right:8px;
    bottom:104px;
  }
  .stage-selected-item {
    max-width:118px;
  }
  .stage-punish-button {
    width:80px;
    height:80px;
  }
}

@media (max-height:700px) and (max-width:620px) {
  .nexus-app {
    grid-template-rows:44px minmax(0,1fr) 50px;
    gap:4px;
    padding:4px 6px;
  }
  .nexus-header {
    height:44px;
  }
  .brand-sigil {
    width:29px;
    height:29px;
  }
  .nexus-brand b {
    font-size:12px!important;
  }
  .nexus-mobile-nav {
    height:50px;
    padding:4px;
  }
  .nexus-mobile-nav a {
    height:42px;
  }
  .event-card {
    width:122px;
  }
  .stage-resource-hud {
    top:7px;
    right:7px;
  }
  .stage-info-drawer {
    top:42px;
    right:7px;
  }
  .account-login-chip {
    min-height:28px;
    font-size:7px;
  }
  .character-identity {
    max-width:calc(100% - 132px);
    padding:7px 9px;
  }
  .character-identity h1 {
    font-size:24px;
  }
  .stage-login-chip {
    min-width:82px;
    min-height:22px;
    padding:3px 8px;
    top:36px;
  }
  .stage-login-chip b {
    font-size:7px;
  }
  .stage-item-selector {
    right:8px;
    bottom:96px;
  }
  .stage-punish-button {
    width:76px;
    height:76px;
  }
  .stage-punish-button strong {
    font-size:12px;
  }
  .stage-item-menu {
    bottom:174px;
    max-height:40vh;
  }
}

/* ===== Gold gacha lobby polish ===== */
.nexus-body {
  --nx-gold:#f2d27b;
  --nx-gold-deep:#9d6420;
  --nx-purple:#6e3bd1;
  --nx-rose:#e9438d;
  --nx-ink:#070812;
  --nx-panel:rgba(11,13,24,.94);
  --nx-panel-strong:#080914;
  --nx-line:rgba(242,210,123,.52);
  --nx-blue:#f2d27b;
  --nx-cyan:#ffdc86;
}
.nexus-bg {
  background:
    radial-gradient(circle at 50% 18%,rgba(242,210,123,.15),transparent 34%),
    radial-gradient(circle at 8% 16%,rgba(130,78,255,.13),transparent 28%),
    linear-gradient(90deg,rgba(242,210,123,.045) 1px,transparent 1px) 0 0/72px 72px,
    linear-gradient(rgba(242,210,123,.035) 1px,transparent 1px) 0 0/72px 72px,
    linear-gradient(180deg,#090a14,#050611);
}
.glass,
.glass-dark,
.nexus-header,
.world-scene,
.battle-stage,
.intel-card,
.event-card,
.account-card,
.desktop-command-deck,
.nexus-mobile-nav {
  border-color:rgba(242,210,123,.64)!important;
  background:
    linear-gradient(135deg,rgba(255,237,176,.08),transparent 30%),
    radial-gradient(circle at 50% -14%,rgba(242,210,123,.13),transparent 38%),
    linear-gradient(180deg,rgba(19,19,34,.97),rgba(6,8,17,.98))!important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.055),
    inset 0 0 0 2px rgba(104,63,16,.28),
    inset 0 0 30px rgba(242,210,123,.08),
    0 14px 34px rgba(0,0,0,.42)!important;
}
.nexus-header {
  border-width:2px;
  background:
    linear-gradient(90deg,rgba(255,219,126,.18),transparent 18%,transparent 82%,rgba(255,219,126,.16)),
    linear-gradient(180deg,#1a1730,#0a0d1a 72%)!important;
}
.nexus-header::before,
.nexus-header::after {
  height:3px;
  background:linear-gradient(90deg,transparent,#ffe8a1 38%,#a66a24);
  box-shadow:0 0 16px rgba(242,210,123,.36);
}
.brand-sigil {
  border:2px solid #ffe8a1;
  background:
    radial-gradient(circle,#15243d 0 42%,#050713 44% 62%,#f0ce78 64% 67%,#090a13 69%);
  box-shadow:0 0 0 3px #090915,0 0 0 5px rgba(242,210,123,.68),0 8px 22px #000;
}
.nexus-brand b,
.start-screen-card h1 {
  color:#ffe9a6;
  background:linear-gradient(180deg,#fff7cc 0%,#f7d474 43%,#bd7627 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  font-family:"Noto Sans JP","Yu Gothic",system-ui,sans-serif!important;
  font-weight:1000!important;
  letter-spacing:.055em;
  text-shadow:none!important;
  filter:drop-shadow(0 2px 0 rgba(0,0,0,.78)) drop-shadow(0 0 10px rgba(242,210,123,.25));
}
.nexus-brand small {
  color:#ffdf91;
  font-weight:900;
  letter-spacing:.22em;
}
.account-login-chip,
.resource-pill,
.icon-button {
  border:1px solid rgba(255,231,163,.78)!important;
  background:
    linear-gradient(180deg,rgba(255,232,150,.2),transparent 38%),
    linear-gradient(180deg,#211b35,#090b17)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 5px 14px rgba(0,0,0,.42)!important;
}
.account-login-chip {
  color:#fff5c7!important;
  background:
    linear-gradient(180deg,#7b3dd0 0%,#c33280 54%,#7e2354 100%)!important;
  text-shadow:0 1px 0 rgba(59,18,58,.9);
}
.account-cta,
.intel-card a,
.event-card a {
  border:1px solid rgba(255,230,158,.78)!important;
  color:#fff4c2!important;
  background:
    linear-gradient(180deg,rgba(255,245,194,.26),transparent 32%),
    linear-gradient(180deg,#6d3bc7,#b42e7c 58%,#64204d)!important;
  box-shadow:0 0 0 2px rgba(8,8,18,.82),0 7px 18px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.2)!important;
  text-shadow:0 1px 0 rgba(52,16,61,.9);
}
.account-cta:hover,
.intel-card a:hover,
.event-card a:hover {
  filter:brightness(1.08);
}
.account-login-chip i {
  background:#fff0a8!important;
  box-shadow:0 0 12px rgba(255,225,128,.72)!important;
}
.resource-pill strong,
.resource-pill.accent strong,
.stage-resource-hud strong {
  color:#ffe39a!important;
  font-family:"Noto Sans JP","Yu Gothic",system-ui,sans-serif!important;
  font-weight:1000;
}
.world-scene,
.battle-stage {
  border-width:2px;
}
.world-scene::after,
.battle-stage::after {
  border-color:rgba(255,232,161,.5)!important;
  box-shadow:inset 0 0 28px rgba(242,210,123,.1);
}
.event-card,
.account-card,
.intel-card {
  border-radius:18px;
}
.event-card h2,
.event-card h3,
.event-card p,
.event-card strong,
.account-card h2,
.account-card h3,
.account-card p,
.intel-card h2,
.intel-card h3,
.intel-card p {
  color:#f7edcf;
  text-shadow:0 1px 0 rgba(0,0,0,.74);
}
.event-card .overline,
.intel-card .overline {
  color:#ff6fa7;
  text-shadow:0 0 10px rgba(255,105,168,.35);
}
.event-card small,
.event-card li,
.intel-card small,
.account-card small {
  color:#d8caa3;
}
.event-card .mission-progress,
.event-card [class*="progress"] {
  border-color:rgba(255,229,155,.42);
  background:rgba(5,6,14,.42);
}
.event-card::before,
.account-card::before,
.intel-card::before,
.desktop-command-deck::before {
  content:"";
  position:absolute;
  inset:7px;
  border:1px solid rgba(242,210,123,.2);
  border-radius:inherit;
  pointer-events:none;
}
.rail-action,
.nexus-mobile-nav a {
  border-color:rgba(242,210,123,.45)!important;
}
.rail-action span,
.nexus-mobile-nav a span {
  color:#ffe4a0;
  text-shadow:0 0 10px rgba(242,210,123,.42);
}
.rail-action:hover,
.rail-action.active,
.nexus-mobile-nav a.active {
  color:#fff3c7!important;
  background:
    radial-gradient(circle at 50% 0,rgba(242,210,123,.26),transparent 42%),
    linear-gradient(180deg,#2a2242,#0c0d18)!important;
}
.stage-selected-item {
  border:1px solid rgba(255,230,158,.92)!important;
  border-radius:999px;
  color:#fff1be!important;
  background:
    linear-gradient(180deg,rgba(255,238,172,.22),rgba(255,238,172,.08)),
    linear-gradient(180deg,#18132b,#070812)!important;
  box-shadow:0 0 0 2px rgba(7,8,18,.92),0 7px 18px rgba(0,0,0,.4),inset 0 0 18px rgba(242,210,123,.1)!important;
  font-weight:1000;
  text-shadow:0 1px 0 #000;
}
.item-menu-toggle {
  border:2px solid #ffe59a!important;
  color:#fff6ce!important;
  background:
    linear-gradient(180deg,rgba(255,245,194,.34),transparent 30%),
    linear-gradient(180deg,#3a2773 0%,#7e2d86 56%,#361843 100%)!important;
  box-shadow:0 0 0 3px rgba(8,8,18,.95),0 0 0 5px rgba(242,210,123,.48),0 10px 24px rgba(0,0,0,.42),inset 0 2px rgba(255,255,255,.22)!important;
}
.item-menu-toggle span {
  color:#fff7d3;
  text-shadow:0 2px 0 rgba(54,18,72,.9),0 0 12px rgba(255,224,138,.3);
}
.item-menu-toggle small {
  color:#4a2871!important;
  background:linear-gradient(180deg,#fff9d3,#f1c96e)!important;
  box-shadow:inset 0 -1px rgba(117,70,16,.28);
}
.stage-item-selector[data-open="true"] .item-menu-toggle {
  background:
    linear-gradient(180deg,rgba(255,245,194,.34),transparent 30%),
    linear-gradient(180deg,#b72f8a 0%,#7423a4 62%,#32133f 100%)!important;
}
.stage-item-menu,
.desktop-command-deck {
  border:2px solid rgba(255,230,158,.78)!important;
  background:
    radial-gradient(circle at 14% 0,rgba(242,210,123,.2),transparent 30%),
    radial-gradient(circle at 88% 8%,rgba(126,86,255,.18),transparent 26%),
    linear-gradient(180deg,rgba(23,19,42,.98),rgba(7,8,18,.98))!important;
  box-shadow:0 18px 40px rgba(0,0,0,.48),inset 0 0 0 1px rgba(255,255,255,.06),inset 0 0 32px rgba(242,210,123,.08)!important;
}
.stage-item-menu .modern-item,
.stage-item-menu .item-choice.modern-item:nth-child(n),
.desktop-command-deck .modern-item,
.desktop-command-deck .item-choice.modern-item:nth-child(n) {
  border:1px solid rgba(255,226,145,.52)!important;
  background:
    linear-gradient(135deg,rgba(255,229,154,.12),transparent 32%),
    linear-gradient(180deg,#17162c,#090b16)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 8px 18px rgba(0,0,0,.34)!important;
}
.stage-item-menu .item-choice.modern-item[aria-pressed="true"],
.stage-item-menu .item-choice.modern-item[data-selected="true"],
.desktop-command-deck .item-choice.modern-item[aria-pressed="true"],
.desktop-command-deck .item-choice.modern-item[data-selected="true"] {
  border-color:#ffe59a!important;
  background:
    linear-gradient(135deg,rgba(255,232,158,.25),transparent 34%),
    linear-gradient(180deg,#2f2555,#11101f)!important;
  box-shadow:0 0 0 2px rgba(255,226,145,.35),0 0 22px rgba(242,210,123,.22),inset 0 0 24px rgba(242,210,123,.12)!important;
}
.stage-item-menu .card-reward,
.desktop-command-deck .card-reward {
  color:#ffe7a5!important;
  text-shadow:0 1px 0 #000,0 0 10px rgba(242,210,123,.28);
}
.stage-punish-button {
  border:3px solid #fff3bc!important;
  color:#fff8dc!important;
  background:
    radial-gradient(circle at 50% 18%,rgba(255,255,255,.35),transparent 24%),
    radial-gradient(circle at 50% 72%,rgba(255,218,103,.28),transparent 38%),
    linear-gradient(180deg,#ff5b94 0%,#d72462 48%,#8e173f 100%)!important;
  box-shadow:0 0 0 4px #090913,0 0 0 7px rgba(242,210,123,.72),0 0 24px rgba(255,78,145,.42),0 14px 32px rgba(0,0,0,.5),inset 0 4px rgba(255,255,255,.24),inset 0 -7px rgba(93,9,44,.42)!important;
}
.stage-punish-button::after {
  border-color:rgba(255,240,184,.7)!important;
  box-shadow:inset 0 0 16px rgba(255,231,149,.18);
}
.stage-punish-icon {
  color:#fff0a7;
  text-shadow:0 0 14px rgba(255,229,150,.84),0 2px 0 rgba(88,13,52,.8);
}
.stage-punish-button strong {
  color:#fffbe8;
  text-shadow:0 2px 0 rgba(99,13,55,.95),0 0 10px rgba(255,228,149,.35);
}
.stage-punish-button small {
  color:#fff0a8;
  background:rgba(68,13,52,.54);
  border:1px solid rgba(255,235,160,.46);
  border-radius:999px;
}
.stage-punish-button:hover {
  filter:brightness(1.08) saturate(1.05);
  box-shadow:0 0 0 4px #090913,0 0 0 7px rgba(255,229,146,.86),0 0 30px rgba(255,78,145,.5),0 16px 36px rgba(0,0,0,.52),inset 0 4px rgba(255,255,255,.24),inset 0 -7px rgba(93,9,44,.42)!important;
}
.start-screen-card {
  border:2px solid rgba(255,230,158,.8);
  background:
    radial-gradient(circle at 50% -8%,rgba(242,210,123,.22),transparent 34%),
    radial-gradient(circle at 12% 4%,rgba(126,86,255,.18),transparent 28%),
    linear-gradient(180deg,rgba(16,15,30,.98),rgba(6,8,17,.98));
  box-shadow:0 0 0 1px rgba(0,0,0,.9),0 26px 72px rgba(0,0,0,.6),inset 0 0 34px rgba(242,210,123,.09);
}
.game-start-button {
  border:2px solid #fff3bc!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.28),transparent 28%),
    linear-gradient(180deg,#ff5b9f,#d42f7b 58%,#762154)!important;
  box-shadow:0 0 0 4px #080914,0 0 0 7px rgba(242,210,123,.55),0 12px 28px rgba(0,0,0,.45),inset 0 4px rgba(255,255,255,.2)!important;
}

@media (max-width:620px) {
  .nexus-header {
    border-width:1px;
    background:
      linear-gradient(90deg,rgba(255,219,126,.14),transparent 32%,rgba(255,219,126,.1)),
      linear-gradient(180deg,#18152c,#090b17 76%)!important;
  }
  .nexus-brand b {
    color:#ffe9a6;
    letter-spacing:.025em;
    filter:drop-shadow(0 1px 0 rgba(0,0,0,.78));
  }
  .item-menu-toggle {
    border-width:2px!important;
    box-shadow:0 0 0 2px rgba(8,8,18,.95),0 0 0 4px rgba(242,210,123,.48),0 8px 18px rgba(0,0,0,.42),inset 0 2px rgba(255,255,255,.22)!important;
  }
  .stage-selected-item {
    padding-inline:8px;
    font-size:9px;
  }
  .stage-punish-button {
    border-width:2px!important;
    box-shadow:0 0 0 3px #090913,0 0 0 5px rgba(242,210,123,.72),0 0 18px rgba(255,78,145,.42),0 12px 28px rgba(0,0,0,.5),inset 0 3px rgba(255,255,255,.22),inset 0 -6px rgba(93,9,44,.42)!important;
  }
}

/* ===== Gold gacha lobby polish: menu and identity coverage ===== */
.brand-sigil {
  box-sizing:border-box;
  padding:3px;
}
.brand-sigil img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  border-radius:inherit;
}
.site-menu {
  color:#f8ecd0;
}
.menu-backdrop {
  background:
    radial-gradient(circle at 78% 10%,rgba(242,210,123,.12),transparent 30%),
    rgba(3,4,10,.74)!important;
  backdrop-filter:blur(5px);
}
.menu-panel {
  border-left:2px solid rgba(255,230,158,.72)!important;
  color:#f8ecd0!important;
  background:
    radial-gradient(circle at 18% 0,rgba(242,210,123,.2),transparent 32%),
    radial-gradient(circle at 98% 16%,rgba(126,86,255,.2),transparent 30%),
    linear-gradient(180deg,rgba(22,18,39,.99),rgba(7,8,18,.99))!important;
  box-shadow:-22px 0 62px rgba(0,0,0,.58),inset 1px 0 rgba(255,236,172,.14),inset 0 0 34px rgba(242,210,123,.08)!important;
}
.menu-head {
  border-bottom:1px solid rgba(242,210,123,.36)!important;
}
.menu-head .overline,
.menu-section-title span {
  color:#ffe49d!important;
  text-shadow:0 0 10px rgba(242,210,123,.24);
}
.menu-head h2 {
  color:#ffe9a6!important;
  background:linear-gradient(180deg,#fff6c8,#f0c96d 56%,#b77729);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  font-family:"Noto Sans JP","Yu Gothic",system-ui,sans-serif!important;
  font-weight:1000!important;
  text-shadow:none!important;
  filter:drop-shadow(0 2px 0 rgba(0,0,0,.82));
}
.menu-section-title small {
  color:#d1bf8f!important;
}
.menu-close,
.icon-button[aria-expanded="true"] {
  border:2px solid #ffe59a!important;
  color:#fff8d4!important;
  background:
    linear-gradient(180deg,rgba(255,245,194,.3),transparent 30%),
    linear-gradient(180deg,#7a3ed0,#bd2f83 58%,#672051)!important;
  box-shadow:0 0 0 3px #090913,0 0 0 5px rgba(242,210,123,.42),0 8px 18px rgba(0,0,0,.42),inset 0 2px rgba(255,255,255,.2)!important;
}
.menu-links a,
.menu-social-links a,
.menu-audio .bgm-control,
.menu-member-card {
  border:1px solid rgba(255,226,145,.58)!important;
  border-radius:18px;
  color:#f8ecd0!important;
  background:
    linear-gradient(135deg,rgba(255,229,154,.13),transparent 34%),
    linear-gradient(180deg,#17162c,#090b16)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 8px 20px rgba(0,0,0,.34)!important;
}
.menu-links a:hover,
.menu-links a:focus-visible,
.menu-social-links a:hover,
.menu-social-links a:focus-visible {
  border-color:#ffe59a!important;
  color:#fff7d3!important;
  background:
    radial-gradient(circle at 50% 0,rgba(255,226,145,.26),transparent 44%),
    linear-gradient(180deg,#322456,#11101f)!important;
  box-shadow:0 0 0 2px rgba(255,226,145,.28),0 0 20px rgba(242,210,123,.18),inset 0 0 22px rgba(242,210,123,.1)!important;
}
.menu-links span,
.menu-social-links a > span {
  border:1px solid rgba(255,226,145,.54)!important;
  color:#ffe4a0!important;
  background:
    radial-gradient(circle,#2b2445,#090b16 70%)!important;
  box-shadow:inset 0 0 10px rgba(0,0,0,.45),0 0 12px rgba(242,210,123,.16);
}
.menu-links b,
.menu-social-links a > b,
.menu-member-row span,
.menu-display-name-form label {
  color:#f7edcf!important;
}
.menu-member-row {
  border-top-color:rgba(242,210,123,.22)!important;
}
.menu-member-row b,
.menu-display-name-form p {
  color:#ffe39a!important;
}
.menu-display-name-form {
  border-top-color:rgba(242,210,123,.22)!important;
}
.menu-display-name-form input {
  border-color:rgba(255,226,145,.45)!important;
  color:#fff7da!important;
  background:rgba(7,8,18,.7)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04);
}
.menu-display-name-form button,
.menu-logout-button {
  border:1px solid rgba(255,230,158,.78)!important;
  color:#fff5c7!important;
  background:
    linear-gradient(180deg,rgba(255,245,194,.26),transparent 32%),
    linear-gradient(180deg,#6d3bc7,#b42e7c 58%,#64204d)!important;
  box-shadow:0 0 0 2px rgba(8,8,18,.82),0 7px 18px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.2)!important;
  text-shadow:0 1px 0 rgba(52,16,61,.9);
}
.menu-audio {
  border-top-color:rgba(242,210,123,.32)!important;
}
.menu-audio .bgm-toggle {
  border-color:rgba(255,230,158,.72)!important;
  color:#fff5c7!important;
  background:
    linear-gradient(180deg,#6d3bc7,#b42e7c 58%,#64204d)!important;
}
.menu-audio .bgm-volume {
  border-color:rgba(242,210,123,.3)!important;
  background:rgba(7,8,18,.48)!important;
}
.menu-audio input[type="range"] {
  accent-color:#f2d27b!important;
}
.event-card .overline {
  display:inline-grid;
  width:max-content;
  max-width:100%;
  min-height:18px;
  align-items:center;
  padding:4px 10px;
  border:1px solid rgba(255,230,158,.78);
  border-radius:999px;
  color:#171017!important;
  background:linear-gradient(180deg,#fff8cb,#e8be5c 58%,#b27626)!important;
  box-shadow:0 0 0 2px rgba(7,8,18,.78),0 5px 13px rgba(0,0,0,.32),inset 0 1px rgba(255,255,255,.52);
  font-family:"Noto Sans JP","Yu Gothic",system-ui,sans-serif!important;
  font-weight:1000;
  letter-spacing:.13em;
  text-shadow:none!important;
}
.character-identity {
  border:1px solid rgba(255,230,158,.74)!important;
  border-left:5px solid #e8bf65!important;
  border-radius:18px;
  background:
    linear-gradient(135deg,rgba(255,229,154,.15),transparent 34%),
    linear-gradient(180deg,rgba(24,20,43,.92),rgba(7,8,18,.88))!important;
  box-shadow:0 0 0 2px rgba(8,8,18,.85),0 10px 26px rgba(0,0,0,.42),inset 0 0 24px rgba(242,210,123,.08)!important;
}
.character-identity .rarity {
  color:#ffe49d!important;
  font-family:"Noto Sans JP","Yu Gothic",system-ui,sans-serif!important;
  font-weight:1000;
  text-shadow:0 1px 0 #000;
}
.character-identity h1 {
  color:#fff0ad!important;
  background:linear-gradient(180deg,#fff8ce,#f1c96d 58%,#c47b27);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  font-family:"Noto Sans JP","Yu Gothic",system-ui,sans-serif!important;
  font-weight:1000!important;
  filter:drop-shadow(0 2px 0 rgba(0,0,0,.74));
}
.character-identity p {
  color:#f0dfb8!important;
  text-shadow:0 1px 0 rgba(0,0,0,.8)!important;
}

@media (max-width:620px) {
  .brand-sigil {
    flex:0 0 auto;
    width:34px!important;
    height:34px!important;
    padding:2px;
    border-radius:12px!important;
    box-shadow:0 0 0 2px #090913,0 0 0 4px rgba(242,210,123,.58),0 5px 12px #000!important;
  }
  .brand-sigil img {
    object-fit:contain;
    border-radius:9px;
  }
  .event-card .overline {
    min-height:15px;
    padding:3px 7px;
    font-size:6px;
    letter-spacing:.08em;
  }
  .character-identity {
    border-left-width:4px!important;
    border-radius:14px;
  }
}

@media (max-height:700px) and (max-width:620px) {
  .brand-sigil {
    width:31px!important;
    height:31px!important;
  }
}

/* ===== Character name legibility pass ===== */
.character-identity {
  background:
    linear-gradient(135deg,rgba(255,235,170,.12),transparent 36%),
    radial-gradient(circle at 12% 0,rgba(255,255,255,.08),transparent 28%),
    linear-gradient(180deg,rgba(13,14,29,.96),rgba(5,7,15,.9))!important;
}
.character-identity h1 {
  color:#fffaf0!important;
  background:none!important;
  -webkit-background-clip:initial!important;
  background-clip:initial!important;
  -webkit-text-fill-color:#fffaf0!important;
  text-shadow:
    0 2px 0 rgba(0,0,0,.9),
    0 0 10px rgba(255,255,255,.18),
    0 0 18px rgba(242,210,123,.18)!important;
  filter:none!important;
}
.character-identity .rarity {
  color:#f6d984!important;
}
.character-identity p {
  color:#f5e6bf!important;
}

.pwa-install-banner {
  display:none;
}

@media (max-width:620px) {
  .pwa-install-banner:not([hidden]) {
    position:absolute;
    z-index:12;
    top:47px;
    right:8px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:7px;
    width:min(176px,calc(100% - 160px));
    min-height:32px;
    padding:5px 6px 5px 9px;
    border:1px solid rgba(255,230,158,.72);
    border-radius:12px;
    color:#fff3c4;
    background:
      linear-gradient(135deg,rgba(255,235,170,.14),transparent 36%),
      linear-gradient(180deg,rgba(17,15,34,.94),rgba(7,8,18,.9));
    box-shadow:0 0 0 2px rgba(8,8,18,.76),0 7px 15px rgba(0,0,0,.32),inset 0 0 18px rgba(242,210,123,.08);
    pointer-events:auto;
  }
  .pwa-install-banner b,
  .pwa-install-banner small {
    display:block;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
  }
  .pwa-install-banner b {
    font-size:10px;
    font-weight:1000;
    line-height:1.1;
  }
  .pwa-install-banner small {
    margin-top:1px;
    color:#e0c98d;
    font-size:7px;
    line-height:1.1;
  }
  .pwa-install-banner button {
    min-width:40px;
    min-height:22px;
    padding:0 8px;
    border:1px solid rgba(255,230,158,.82);
    border-radius:999px;
    color:#fff7d5;
    background:
      linear-gradient(180deg,rgba(255,245,194,.28),transparent 32%),
      linear-gradient(180deg,#7a3ed0,#bd2f83 58%,#672051);
    box-shadow:0 3px 8px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.22);
    font:900 9px/1 "Noto Sans JP","Yu Gothic",system-ui,sans-serif;
  }
}

@media (display-mode:standalone) {
  .pwa-install-banner {
    display:none!important;
  }
}

@media (max-width:390px) {
  .pwa-install-banner:not([hidden]) {
    width:min(158px,calc(100% - 150px));
    top:45px;
  }
  .pwa-install-banner small {
    display:none;
  }
}

/* ===== Tall mobile viewport balance ===== */
@media (max-width:620px) {
  .nexus-body {
    --mobile-header-h:clamp(44px,calc(44px + (100dvh - 700px) * .16),82px);
    --mobile-nav-h:clamp(50px,calc(50px + (100dvh - 700px) * .08),70px);
    --mobile-stage-gap:clamp(4px,calc(4px + (100dvh - 700px) * .006),8px);
    --mobile-ornament-h:clamp(0px,calc((100dvh - 700px) * .34),42px);
  }
  .nexus-app {
    grid-template-rows:var(--mobile-header-h) minmax(0,1fr) var(--mobile-nav-h) var(--mobile-ornament-h);
    gap:var(--mobile-stage-gap);
  }
  .nexus-header {
    height:var(--mobile-header-h);
    padding:clamp(6px,1.05dvh,10px);
  }
  .brand-sigil {
    width:clamp(34px,5.5dvh,46px)!important;
    height:clamp(34px,5.5dvh,46px)!important;
  }
  .nexus-brand b {
    font-size:clamp(14px,2.2dvh,18px)!important;
  }
  .account-login-chip {
    min-height:clamp(30px,4.7dvh,40px);
  }
  .icon-button {
    width:clamp(34px,5.4dvh,44px);
    height:clamp(34px,5.4dvh,44px);
  }
  .account-cluster > .icon-button {
    width:clamp(34px,5.4dvh,44px)!important;
    height:clamp(34px,5.4dvh,44px)!important;
  }
  .nexus-mobile-nav {
    height:var(--mobile-nav-h);
    padding:clamp(5px,.8dvh,7px);
  }
  .nexus-mobile-nav a {
    height:calc(var(--mobile-nav-h) - clamp(10px,1.6dvh,14px));
    font-size:clamp(7px,1.08dvh,9px)!important;
  }
  .nexus-mobile-nav a span {
    font-size:clamp(16px,2.3dvh,20px);
  }
}

@media (max-width:620px) and (min-height:745px) {
  .mobile-bottom-monitor-label,
  .mobile-bottom-monitor-window {
    opacity:1;
  }
}

@media (max-width:620px) and (min-height:860px) {
  .portrait-video-shell {
    width:min(112vw,calc((100dvh - var(--mobile-header-h) - var(--mobile-nav-h) - 18px) * .78),520px);
    max-height:112%;
  }
  .event-card {
    top:clamp(8px,1.2dvh,13px);
  }
  .stage-resource-hud {
    top:clamp(8px,1.2dvh,13px);
  }
  .stage-item-selector {
    bottom:clamp(112px,13dvh,132px);
  }
}

@media (max-height:700px) and (max-width:620px) {
  .nexus-body {
    --mobile-header-h:44px;
    --mobile-nav-h:50px;
    --mobile-stage-gap:4px;
    --mobile-ornament-h:0px;
  }
}

/* ===== 390px mobile stage tightening ===== */
@media (max-width:620px) {
  .nexus-body {
    --mobile-header-h:clamp(44px,calc(44px + (100dvh - 700px) * .18),78px);
    --mobile-nav-h:clamp(50px,calc(50px + (100dvh - 700px) * .1),70px);
    --mobile-stage-gap:clamp(4px,calc(4px + (100dvh - 700px) * .004),7px);
    --mobile-ornament-h:clamp(0px,calc((100dvh - 700px) * .44),54px);
  }
  .nexus-brand {
    max-width:calc(100% - 156px);
  }
  .account-cluster {
    width:148px;
  }
  .account-login-chip {
    right:52px;
    min-width:78px;
    max-width:82px;
    min-height:clamp(28px,4.4dvh,36px);
    padding-inline:7px;
    font-size:7px;
  }
  .account-cluster > .icon-button {
    width:clamp(34px,5dvh,40px)!important;
    height:clamp(34px,5dvh,40px)!important;
  }
  .portrait-video-shell {
    width:min(106vw,calc((100dvh - var(--mobile-header-h) - var(--mobile-nav-h) - 18px) * .76),500px);
    height:min(calc(100% - 78px),68dvh,620px);
    max-height:calc(100% - 74px);
  }
}

@media (max-width:390px) {
  .nexus-brand {
    max-width:calc(100% - 152px);
  }
  .nexus-brand b {
    max-width:clamp(128px,47vw,178px)!important;
  }
  .account-cluster {
    width:144px;
  }
  .account-login-chip {
    right:50px;
    min-width:76px;
    max-width:80px;
    font-size:7px;
  }
}

@media (max-height:700px) and (max-width:620px) {
  .portrait-video-shell {
    height:auto;
    max-height:103%;
  }
}

/* ===== Narrow mobile header fit ===== */
@media (max-width:349px) {
  .nexus-header {
    padding-inline:5px;
  }
  .brand-sigil {
    width:30px!important;
    height:30px!important;
    padding:1px;
    box-shadow:0 0 0 2px #090913,0 0 0 3px rgba(242,210,123,.55),0 4px 9px #000!important;
  }
  .nexus-brand {
    gap:6px;
    max-width:calc(100% - 114px);
  }
  .nexus-brand b {
    max-width:calc(100vw - 162px)!important;
    font-size:12px!important;
    letter-spacing:.015em;
  }
  .account-cluster {
    right:5px;
    width:106px;
  }
  .account-login-chip {
    right:38px;
    min-width:48px;
    max-width:50px;
    min-height:28px;
    padding:3px 4px;
    border-radius:9px;
    font-size:0;
  }
  .account-login-chip i {
    display:none;
  }
  .account-login-chip span {
    display:grid;
    place-items:center;
    width:100%;
    font-size:6px;
    letter-spacing:0;
    line-height:1;
  }
  .account-login-chip span::before {
    content:"ログイン";
  }
  .account-login-chip span {
    color:transparent;
  }
  .account-login-chip span::before {
    color:#fff5c7;
  }
  .account-cluster > .icon-button {
    width:32px!important;
    height:32px!important;
    border-radius:9px;
    font-size:15px;
  }
}

/* ===== Width-aware title scaling ===== */
@media (max-width:420px) {
  .nexus-brand {
    gap:6px;
    max-width:calc(100% - 140px);
  }
  .brand-sigil {
    width:clamp(30px,8.2vw,34px)!important;
    height:clamp(30px,8.2vw,34px)!important;
  }
  .nexus-brand b {
    max-width:calc(100vw - 196px)!important;
    font-size:clamp(12px,3.55vw,14px)!important;
    letter-spacing:.01em;
    white-space:nowrap;
  }
  .account-cluster {
    width:132px;
  }
  .account-login-chip {
    right:46px;
    min-width:68px;
    max-width:72px;
    padding-inline:6px;
    font-size:6px;
  }
  .account-cluster > .icon-button {
    width:clamp(32px,9vw,38px)!important;
    height:clamp(32px,9vw,38px)!important;
  }
}

@media (max-width:390px) {
  .nexus-brand {
    max-width:calc(100% - 132px);
  }
  .nexus-brand b {
    max-width:calc(100vw - 184px)!important;
    font-size:clamp(11px,3.35vw,13px)!important;
  }
  .account-cluster {
    width:124px;
  }
  .account-login-chip {
    right:42px;
    min-width:60px;
    max-width:64px;
  }
}

/* ===== PWA iOS install guide ===== */
.pwa-guide-open {
  overflow:hidden;
}

.pwa-ios-guide[hidden] {
  display:none!important;
}

.pwa-ios-guide {
  position:fixed;
  inset:0;
  z-index:180;
  display:grid;
  place-items:center;
  box-sizing:border-box;
  padding:max(16px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
  color:#fff4cf;
  text-align:left;
}

.pwa-ios-guide-backdrop {
  position:absolute;
  inset:0;
  border:0;
  background:rgba(4,8,18,.78);
  backdrop-filter:blur(6px);
  cursor:pointer;
}

.pwa-ios-guide-card {
  position:relative;
  z-index:1;
  box-sizing:border-box;
  width:min(390px,100%);
  max-height:min(86dvh,680px);
  overflow:auto;
  padding:22px clamp(16px,4.6vw,22px) 18px;
  border:2px solid rgba(246,216,128,.82);
  border-radius:24px;
  background:
    linear-gradient(150deg,rgba(18,31,58,.98),rgba(10,13,30,.98) 58%,rgba(43,20,35,.96)),
    radial-gradient(circle at 20% 0%,rgba(255,224,132,.24),transparent 34%);
  box-shadow:0 22px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.16);
  -webkit-overflow-scrolling:touch;
}

.pwa-ios-guide-close {
  position:absolute;
  top:10px;
  right:10px;
  width:34px;
  height:34px;
  border:1px solid rgba(255,236,170,.68);
  border-radius:999px;
  color:#fff8df;
  background:linear-gradient(180deg,#26395e,#121a31);
  box-shadow:0 6px 16px rgba(0,0,0,.35);
  font-weight:900;
  line-height:1;
  cursor:pointer;
}

.pwa-ios-guide-card .overline {
  display:inline-grid;
  place-items:center;
  min-height:22px;
  padding:0 10px;
  border:1px solid rgba(255,226,137,.55);
  border-radius:999px;
  color:#ffe49d;
  background:rgba(255,194,65,.12);
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
}

.pwa-ios-guide-card h2 {
  margin:12px 42px 8px 0;
  color:#fffaf0;
  font-size:clamp(22px,6vw,27px);
  line-height:1.2;
  text-shadow:0 2px 0 rgba(0,0,0,.42);
}

.pwa-ios-guide-card p,
.pwa-ios-guide-card small {
  color:#dce9ff;
  line-height:1.65;
}

.pwa-ios-guide-card p {
  margin:0;
  font-size:clamp(13px,3.6vw,15px);
}

.pwa-ios-guide-card ol {
  display:grid;
  gap:10px;
  margin:16px 0 12px;
  padding:0;
  list-style:none;
  counter-reset:pwa-step;
}

.pwa-ios-guide-card li {
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:start;
  padding:11px 12px;
  border:1px solid rgba(255,225,143,.42);
  border-radius:15px;
  background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.03));
}

.pwa-ios-guide-card li::before {
  counter-increment:pwa-step;
  content:counter(pwa-step);
  grid-column:1;
  grid-row:1 / span 2;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:999px;
  color:#261805;
  background:linear-gradient(180deg,#fff0a5,#df9e25);
  box-shadow:inset 0 1px 0 #fff7d3,0 4px 10px rgba(0,0,0,.28);
  font-weight:1000;
}

.pwa-ios-guide-card li b {
  grid-column:2;
  grid-row:1;
  display:block;
  color:#fff7d7;
  font-size:clamp(14px,3.75vw,16px);
  line-height:1.25;
  min-width:0;
}

.pwa-ios-guide-card li span {
  grid-column:2;
  grid-row:2;
  display:block;
  margin-top:3px;
  color:#d8e9ff;
  font-size:clamp(12px,3.25vw,14px);
  line-height:1.45;
  min-width:0;
}

.pwa-ios-guide-card small {
  display:block;
  font-size:clamp(11px,3vw,13px);
  opacity:.9;
}

@media (max-width:360px) {
  .pwa-ios-guide-card {
    border-radius:20px;
    padding:20px 14px 16px;
  }
  .pwa-ios-guide-card ol {
    gap:8px;
  }
  .pwa-ios-guide-card li {
    grid-template-columns:30px minmax(0,1fr);
    padding:10px;
  }
  .pwa-ios-guide-card li::before {
    width:28px;
    height:28px;
  }
}

/* ===== Mobile stage continuity fix ===== */
@media (max-width:620px) {
  .nexus-body {
    --mobile-header-h:clamp(44px,calc(44px + (100dvh - 640px) * .12),68px);
    --mobile-nav-h:54px;
    --mobile-stage-gap:4px;
    --mobile-ornament-h:24px;
  }
  .nexus-app {
    grid-template-rows:var(--mobile-header-h) minmax(0,1fr) var(--mobile-nav-h) var(--mobile-ornament-h)!important;
    gap:var(--mobile-stage-gap)!important;
    padding:4px 6px!important;
  }
  .nexus-header {
    height:var(--mobile-header-h)!important;
  }
  .nexus-mobile-nav {
    height:var(--mobile-nav-h)!important;
    padding:5px!important;
  }
  .nexus-mobile-nav a {
    height:calc(var(--mobile-nav-h) - 10px)!important;
  }
  .world-scene,
  .battle-stage {
    height:100%!important;
  }
  .portrait-video-shell {
    bottom:clamp(-10px,calc((700px - 100dvh) * .035),-3px)!important;
    width:auto!important;
    height:min(calc(100% + clamp(18px,4dvh,36px)),760px)!important;
    max-width:none!important;
    max-height:none!important;
    aspect-ratio:3 / 4;
  }
  .mobile-bottom-ornament {
    height:var(--mobile-ornament-h)!important;
    opacity:1;
    padding:0 8px;
  }
  .mobile-bottom-monitor-label,
  .mobile-bottom-monitor-window {
    height:18px;
    opacity:1;
  }
}
