@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap");

:root {
  --ink: #0b0c1e;
  --navy: #090a1c;
  --navy-2: #11142e;
  --panel: rgba(18, 20, 48, 0.88);
  --panel-solid: #171a3a;
  --white: #ffffff;
  --muted: #aeb4d1;
  --line: rgba(255, 255, 255, 0.12);
  --pink: #f036cf;
  --violet: #8d63ff;
  --blue: #1683ff;
  --cyan: #62d9ff;
  --yellow: #ffd65a;
  --success: #48e2a8;
  --danger: #ff617e;
  --gradient: linear-gradient(115deg, var(--pink), var(--violet) 52%, var(--blue));
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--white);
  background:
    radial-gradient(circle at 12% 12%, rgba(240, 54, 207, 0.18), transparent 31rem),
    radial-gradient(circle at 88% 22%, rgba(22, 131, 255, 0.2), transparent 34rem),
    linear-gradient(180deg, #0d0e27 0%, #080917 70%, #060611 100%);
  font-family: "DM Sans", "Noto Sans KR", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(100% - 36px, 1240px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.site-header,
footer {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  color: #9298b8;
  font-size: 13px;
}

.site-header { border-bottom: 1px solid rgba(255,255,255,.07); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.global-sound-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; color: white; background: rgba(255,255,255,.06); cursor: pointer; box-shadow: 0 0 0 0 rgba(141,99,255,0); transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.global-sound-button:hover { border-color: rgba(98,217,255,.5); background: rgba(98,217,255,.12); box-shadow: 0 0 20px rgba(98,217,255,.14); }
.global-sound-button.is-muted { opacity: .66; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: white; text-decoration: none; }
.brand-mark {
  position: relative;
  display: flex;
  width: 42px;
  height: 38px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 13px;
  background: linear-gradient(125deg, var(--pink), var(--violet) 53%, var(--blue));
  box-shadow: 0 0 22px rgba(141,99,255,.38);
  letter-spacing: -.09em;
}
.brand-mark::after { content: ""; position: absolute; inset: 1px; border-radius: 11px; background: linear-gradient(145deg, rgba(255,255,255,.4), transparent 46%); }
.brand-mark b, .brand-mark i { position: relative; z-index: 1; font-style: normal; font-weight: 900; }
.brand-mark i { margin-left: 1px; font-size: 14px; }
.brand-copy { font-size: 15px; font-weight: 800; letter-spacing: -.03em; }
.brand-copy strong { color: #adb4d3; font-weight: 600; }

#app { width: 100%; padding: 30px 0 64px; }
footer { border-top: 1px solid rgba(255,255,255,.07); }

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 24px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button { border: 1px solid rgba(255,255,255,.26); color: #080918; background: white; box-shadow: 0 14px 34px rgba(0,0,0,.25); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 18px 45px rgba(62,104,255,.27); }
.secondary-button { border: 1px solid rgba(255,255,255,.3); color: white; background: transparent; }
.secondary-button:hover { transform: translateY(-2px); background: rgba(255,255,255,.08); }
.primary-button:focus-visible, .secondary-button:focus-visible, .option-button:focus-visible, .sound-button:focus-visible, .global-sound-button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* Start world */
.game-start { display: grid; grid-template-columns: .8fr 1.2fr; min-height: 660px; overflow: hidden; border: 1px solid var(--line); border-radius: 34px; background: rgba(12,14,36,.82); box-shadow: var(--shadow); }
.start-panel { position: relative; z-index: 2; padding: clamp(34px, 5vw, 68px); background: linear-gradient(145deg, rgba(19,21,51,.98), rgba(12,14,35,.94)); }
.start-panel::after { content: ""; position: absolute; right: -1px; top: 10%; width: 1px; height: 80%; background: linear-gradient(transparent, rgba(255,255,255,.2), transparent); }
.mission-code { margin: 0 0 26px; color: #9da7d3; font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.danger-code { color: #ff9fbc; }
.start-panel h1 { margin: 0; font-size: clamp(46px, 6vw, 76px); font-weight: 800; line-height: 1.02; letter-spacing: -.07em; }
.start-panel h1 span { color: transparent; background: var(--gradient); -webkit-background-clip: text; background-clip: text; }
.start-copy { max-width: 450px; margin: 25px 0; color: #bac0da; font-size: 16px; line-height: 1.75; word-break: keep-all; }
.start-copy b { color: #fff; }
.stolen-treasures { display: flex; flex-wrap: wrap; gap: 7px; max-width: 470px; margin: -7px 0 20px; }
.stolen-treasures span { padding: 7px 10px; border: 1px solid rgba(255,97,126,.22); border-radius: 999px; color: #d8cce8; background: rgba(255,97,126,.075); font-size: 11px; font-weight: 800; }
.player-brief { display: flex; align-items: center; gap: 13px; margin: 24px 0 28px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.055); }
.player-brief img { width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 7px 14px rgba(89,99,255,.35)); }
.player-brief div { display: grid; gap: 3px; }
.player-brief b { font-size: 14px; }
.player-brief span { color: #9ea5c4; font-size: 13px; line-height: 1.4; }
.game-cta { width: 100%; min-height: 58px; justify-content: space-between; padding-left: 28px; }
.game-cta b { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: white; background: #11142e; }
.play-meta { margin: 13px 0 0; color: #7f86a7; font-size: 12px; text-align: center; }
.resume-quest { display: flex; width: 100%; min-height: 64px; align-items: center; justify-content: space-between; gap: 16px; margin: -9px 0 12px; padding: 10px 14px 10px 17px; border: 1px solid rgba(98,217,255,.38); border-radius: 18px; color: white; background: linear-gradient(135deg, rgba(22,131,255,.2), rgba(141,99,255,.24)); box-shadow: inset 0 0 24px rgba(98,217,255,.07), 0 10px 24px rgba(3,4,18,.18); cursor: pointer; text-align: left; }
.resume-quest > span { display: grid; gap: 3px; }
.resume-quest small { color: #75dcff; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.resume-quest b { font-size: 14px; }
.resume-quest strong { flex: 0 0 auto; padding: 9px 11px; border-radius: 12px; color: #0b0c1e; background: white; font-size: 12px; }
.resume-quest:hover { border-color: rgba(98,217,255,.7); transform: translateY(-1px); }

.world-card { position: relative; min-height: 660px; overflow: hidden; background: #17183b; }
.world-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,9,24,.06), rgba(8,9,24,.12) 55%, rgba(8,9,24,.9)); pointer-events: none; }
.world-art { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.map-status { position: absolute; z-index: 2; left: 24px; top: 24px; display: flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(10,11,30,.55); backdrop-filter: blur(10px); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(72,226,168,.16), 0 0 16px var(--success); }
.map-route { position: absolute; z-index: 3; left: 22px; right: 22px; bottom: 22px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0; padding: 10px; list-style: none; border: 1px solid rgba(255,255,255,.18); border-radius: 20px; background: rgba(8,9,24,.66); backdrop-filter: blur(15px); }
.map-node { position: relative; display: grid; min-width: 0; place-items: center; gap: 2px; padding: 8px 2px; color: #c7cce2; text-align: center; }
.map-node:not(:last-child)::after { content: ""; position: absolute; right: -5px; top: 50%; width: 10px; height: 1px; background: rgba(255,255,255,.24); }
.map-node span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: linear-gradient(135deg, rgba(240,54,207,.28), rgba(22,131,255,.34)); font-size: 15px; }
.map-node b { font-size: 11px; }
.map-node em { overflow: hidden; max-width: 100%; color: #9198b9; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.map-callout { position: absolute; z-index: 3; right: 24px; top: 24px; display: flex; align-items: baseline; gap: 7px; padding: 9px 13px; border-radius: 14px; background: rgba(10,11,30,.62); backdrop-filter: blur(10px); }
.map-callout b { font-size: 24px; }
.map-callout span { color: #a8aecb; font-size: 11px; }
.threat-status { color: #ffd7e1; border-color: rgba(255,97,126,.35); }
.threat-status .live-dot { background: var(--danger); box-shadow: 0 0 0 5px rgba(255,97,126,.16), 0 0 16px var(--danger); }
.intro-villain { position: absolute; z-index: 2; left: 50%; top: 46%; width: min(67%, 560px); max-height: 68%; object-fit: contain; filter: saturate(.82) drop-shadow(0 26px 45px rgba(64,22,142,.8)); transform: translate(-50%, -50%); animation: bossFloat 3.5s ease-in-out infinite; }
.world-threat { position: absolute; z-index: 4; left: 24px; right: 24px; bottom: 118px; display: grid; gap: 3px; padding: 13px 15px; border: 1px solid rgba(255,97,126,.25); border-radius: 16px; background: rgba(14,8,30,.7); backdrop-filter: blur(13px); }
.world-threat b { color: #ff9fbc; font-size: 10px; letter-spacing: .14em; }
.world-threat span { color: #d2d6e8; font-size: 13px; line-height: 1.45; }

/* Three-scene opening cinematic */
.opening-cinematic { display: grid; grid-template-columns: 1.16fr .84fr; min-height: 680px; overflow: hidden; border: 1px solid var(--line); border-radius: 34px; background: #0d0f2a; box-shadow: var(--shadow); }
.opening-visual { position: relative; min-height: 680px; overflow: hidden; background: radial-gradient(circle at 50% 48%, #28225f, #090a1c 72%); }
.opening-visual > img { position: absolute; width: 100%; height: 100%; object-fit: cover; animation: cinematicReveal .8s ease both; }
.opening-cinematic.is-villain .opening-visual > img { left: 50%; top: 52%; width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 28px 55px rgba(103,48,210,.72)); transform: translate(-50%, -50%); }
.opening-cinematic.is-guide .opening-visual > img { left: 50%; top: 53%; width: 77%; height: 88%; object-fit: contain; filter: drop-shadow(0 28px 50px rgba(22,131,255,.44)); transform: translate(-50%, -50%); }
.opening-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,6,20,.12), rgba(5,6,20,.08) 48%, rgba(5,6,20,.92)); }
.opening-cinematic.is-villain .opening-veil { background: radial-gradient(circle at 50% 44%, rgba(185,45,213,.05), rgba(5,6,20,.22) 45%, rgba(5,6,20,.95)); }
.opening-signal { position: absolute; z-index: 2; left: 24px; top: 24px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: #d9deef; background: rgba(6,7,23,.56); font-size: 10px; font-weight: 900; letter-spacing: .13em; backdrop-filter: blur(12px); }
.is-villain .opening-signal { color: #ffd0df; border-color: rgba(255,97,126,.42); }
.opening-cores { position: absolute; z-index: 3; left: 50%; bottom: 34px; display: flex; gap: 10px; transform: translateX(-50%); }
.opening-cores span { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.38); border-radius: 15px; color: white; background: linear-gradient(135deg, rgba(240,54,207,.88), rgba(22,131,255,.88)); box-shadow: 0 0 28px rgba(98,217,255,.36); font-size: 21px; animation: corePulse 1.8s ease-in-out infinite; }
.opening-cores span:nth-child(2) { animation-delay: .12s; }.opening-cores span:nth-child(3) { animation-delay: .24s; }.opening-cores span:nth-child(4) { animation-delay: .36s; }.opening-cores span:nth-child(5) { animation-delay: .48s; }
.opening-cores.is-stolen span { color: #7d7696; background: rgba(15,16,39,.75); box-shadow: none; animation: coreFlicker 1.4s ease-in-out infinite; }
.opening-copy { display: flex; min-height: 680px; flex-direction: column; justify-content: center; padding: clamp(38px, 5vw, 68px); background: linear-gradient(145deg, rgba(19,21,51,.99), rgba(10,11,29,.98)); }
.opening-progress { display: flex; gap: 7px; margin-bottom: 30px; }
.opening-progress i { width: 28px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.12); }
.opening-progress i.is-on { background: var(--gradient); box-shadow: 0 0 12px rgba(141,99,255,.5); }
.opening-copy > p { margin: 0 0 15px; color: #aab2d1; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.opening-copy h1 { margin: 0; font-size: clamp(38px, 4.7vw, 62px); line-height: 1.08; letter-spacing: -.06em; word-break: keep-all; }
.opening-copy h1 span { display: block; }
.opening-copy h1 span:last-child { color: transparent; background: var(--gradient); -webkit-background-clip: text; background-clip: text; }
.opening-copy h2 { margin: 23px 0 30px; color: #bdc4dd; font-size: 16px; font-weight: 500; line-height: 1.8; word-break: keep-all; }
.opening-actions { display: grid; gap: 11px; }
.opening-actions .primary-button { width: 100%; justify-content: space-between; }
.opening-actions > span { color: #707895; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-align: center; }

/* Gameplay */
.play-screen { width: 100%; }
.game-hud { display: grid; grid-template-columns: auto minmax(90px, 1fr) auto auto auto; gap: 14px; align-items: center; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(17,19,47,.82); backdrop-filter: blur(16px); }
.hud-player { display: flex; min-width: 178px; align-items: center; gap: 10px; }
.hud-player img { width: 42px; height: 42px; object-fit: contain; border-radius: 12px; background: linear-gradient(135deg, rgba(240,54,207,.17), rgba(22,131,255,.2)); }
.hud-player div { display: grid; }
.hud-player span { color: #9da4c1; font-size: 11px; font-weight: 700; }
.hud-player b { font-size: 15px; }
.xp-track { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.09); }
.xp-track i, .mission-progress i { display: block; height: 100%; border-radius: inherit; background: var(--gradient); box-shadow: 0 0 15px rgba(141,99,255,.45); transition: width .35s ease; }
.hud-stat { display: grid; min-width: 64px; padding-left: 14px; border-left: 1px solid var(--line); text-align: center; }
.hud-stat span { color: #858dac; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.hud-stat b { font-size: 17px; }
.sound-button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: white; background: rgba(255,255,255,.06); cursor: pointer; }
.mission-progress { height: 4px; margin: 0 9px 14px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.07); }

.quest-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin: 0 9px 12px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(15,17,44,.8); box-shadow: inset 0 0 24px rgba(141,99,255,.045); }
.quest-route > span, .quest-route > b { color: #929ab9; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.quest-route > b { justify-self: end; color: #c8cee5; }
.quest-route > div { display: flex; align-items: center; gap: 12px; }
.quest-route i { position: relative; display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; color: #68708f; background: #11142f; font-size: 9px; font-style: normal; font-weight: 900; }
.quest-route i:not(:last-child)::after { content: ""; position: absolute; left: 24px; top: 50%; width: 13px; height: 1px; background: rgba(255,255,255,.13); }
.quest-route i.is-cleared { border-color: rgba(72,226,168,.48); color: #071a14; background: #48e2a8; box-shadow: 0 0 13px rgba(72,226,168,.3); }
.quest-route i.is-active { border-color: rgba(255,255,255,.75); color: white; background: linear-gradient(135deg, var(--pink), var(--blue)); box-shadow: 0 0 0 5px rgba(141,99,255,.11), 0 0 22px rgba(141,99,255,.5); animation: routePulse 1.25s ease-in-out infinite; }
.quest-route i.is-boss-node { border-radius: 8px; transform: rotate(45deg); }
.quest-route i.is-boss-node::first-letter { transform: rotate(-45deg); }
.quest-layout { position: relative; display: grid; grid-template-columns: minmax(300px, .78fr) minmax(480px, 1.22fr); overflow: hidden; border: 1px solid var(--line); border-radius: 30px; background: #11132c; box-shadow: var(--shadow); animation: questEnter .45s cubic-bezier(.2,.75,.3,1) both; }
.quest-layout::after { content: ""; position: absolute; z-index: 10; inset: 0; pointer-events: none; opacity: 0; }
.quest-layout.impact-win::after { background: radial-gradient(circle, rgba(133,255,214,.7), transparent 65%); animation: impactFlash .72s ease-out; }
.quest-layout.impact-hit { animation: screenHit .38s ease both; }
.quest-layout.impact-hit::after { background: rgba(255,53,94,.32); animation: impactFlash .55s ease-out; }
.scene-card { position: relative; min-height: 640px; overflow: hidden; }
.scene-art { position: absolute; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: chamberDrift 12s ease-in-out infinite alternate; }
.stage-1 .scene-art { filter: hue-rotate(-8deg) saturate(1.08); }
.stage-2 .scene-art { filter: hue-rotate(34deg) saturate(1.18); }
.stage-3 .scene-art { filter: hue-rotate(78deg) saturate(1.12); }
.stage-4 .scene-art { filter: hue-rotate(145deg) saturate(1.2); }
.stage-5 .scene-art { filter: hue-rotate(205deg) saturate(1.28); }
.scene-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,7,22,.17), rgba(6,7,22,.1) 45%, rgba(6,7,22,.94)); }
.is-boss .scene-shade { background: radial-gradient(circle at 50% 45%, rgba(116,53,214,.08), rgba(6,7,22,.2) 48%, rgba(6,7,22,.97)); }
.scene-grid { position: absolute; inset: 0; opacity: .2; background-image: linear-gradient(rgba(98,217,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(98,217,255,.2) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, transparent, #000 30%, transparent 83%); transform: perspective(420px) rotateX(58deg) scale(1.5) translateY(28%); animation: gridMove 5s linear infinite; }
.scene-scan { position: absolute; z-index: 1; left: 0; right: 0; height: 2px; opacity: .66; background: linear-gradient(90deg, transparent, #62d9ff, white, transparent); box-shadow: 0 0 17px #62d9ff; animation: scanScene 3.4s linear infinite; }
.ambient-particles { position: absolute; z-index: 1; inset: 0; overflow: hidden; }
.ambient-particles i { position: absolute; left: var(--x); top: var(--y); width: 5px; height: 5px; border-radius: 50%; background: #9deaff; box-shadow: 0 0 10px #62d9ff; animation: particleLift 3.8s ease-in-out var(--particle-delay) infinite; }
.stage-fx { position: absolute; z-index: 1; inset: 0; overflow: hidden; pointer-events: none; }
.stage-fx i { position: absolute; left: var(--fx-x); top: var(--fx-y); display: grid; min-width: 34px; min-height: 34px; place-items: center; padding: 6px; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.68); background: rgba(12,14,42,.38); font-size: 11px; font-style: normal; font-weight: 900; letter-spacing: .05em; text-shadow: 0 0 11px currentColor; backdrop-filter: blur(3px); animation-delay: var(--fx-delay) !important; }
.stage-1 .stage-fx i { border-radius: 3px; color: #ff8be1; animation: fxGlitch 2.3s steps(2) infinite; }
.stage-2 .stage-fx i { border-radius: 50% 10px 50% 10px; color: #b59cff; animation: fxWhisper 4.8s ease-in-out infinite; }
.stage-3 .stage-fx i { border-radius: 50%; color: #77e7ff; background: rgba(28,90,143,.16); animation: fxRipple 4.2s ease-out infinite; }
.stage-4 .stage-fx i { border-radius: 50%; color: #ffc45c; animation: fxGear 5s linear infinite; }
.stage-5 .stage-fx i { border-color: rgba(255,73,132,.36); border-radius: 5px; color: #ff6f9f; background: rgba(50,6,37,.36); animation: fxShadow 3s ease-in-out infinite; }
.scene-topline { position: absolute; left: 20px; right: 20px; top: 20px; display: flex; justify-content: space-between; padding: 10px 13px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(8,9,26,.42); backdrop-filter: blur(10px); font-size: 11px; letter-spacing: .1em; }
.scene-topline span { font-weight: 800; }
.scene-topline b { color: #c7cce5; }
.scene-dialog { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(255,255,255,.19); border-radius: 20px; background: rgba(9,10,29,.72); backdrop-filter: blur(14px); }
.dialog-avatar { display: grid; flex: 0 0 58px; width: 58px; height: 58px; place-items: center; border-radius: 17px; background: var(--gradient); }
.dialog-avatar img { width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 6px 9px rgba(0,0,0,.25)); }
.scene-dialog p { display: grid; gap: 3px; margin: 0; color: #aeb5d1; font-size: 13px; line-height: 1.4; }
.scene-dialog b { color: white; font-size: 15px; }
.combo-orb { position: absolute; right: 22px; top: 86px; z-index: 2; display: grid; width: 82px; height: 82px; place-items: center; align-content: center; border: 1px solid rgba(255,255,255,.26); border-radius: 50%; background: rgba(9,10,29,.66); backdrop-filter: blur(10px); box-shadow: 0 0 25px rgba(22,131,255,.2); }
.combo-orb strong { font-size: 26px; line-height: 1; }
.combo-orb span { margin-top: 4px; color: #949cbd; font-size: 8px; letter-spacing: .12em; }
.combo-orb.is-hot { animation: pulse 1.2s ease-in-out infinite; border-color: rgba(240,54,207,.7); box-shadow: 0 0 30px rgba(240,54,207,.4); }
.boss-figure { position: absolute; z-index: 1; left: 50%; top: 46%; width: min(84%, 430px); max-height: 68%; object-fit: contain; filter: drop-shadow(0 18px 34px rgba(85,36,190,.7)); transform: translate(-50%, -50%); animation: bossFloat 3.2s ease-in-out infinite; transition: opacity .45s ease, filter .45s ease, transform .45s ease; }
.boss-figure.final-boss { width: min(96%, 500px); filter: drop-shadow(0 20px 42px rgba(240,54,207,.75)); }
.boss-figure.is-defeated { opacity: .18; filter: saturate(.15) blur(3px); transform: translate(-50%, -43%) scale(.76); animation: none; }
.boss-life { position: absolute; z-index: 3; left: 20px; right: 20px; top: 72px; display: grid; gap: 7px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: rgba(7,8,24,.72); backdrop-filter: blur(13px); }
.boss-life > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.boss-life span { font-size: 12px; font-weight: 900; }
.boss-life b { color: #b5bddb; font-size: 8px; letter-spacing: .12em; }
.boss-life > i { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.11); }
.boss-life em { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff406d, var(--pink), var(--violet)); box-shadow: 0 0 14px rgba(240,54,207,.75); transition: width .8s ease; }

.encounter-figure { --enemy:#62d9ff; --enemy2:#8d63ff; position: absolute; z-index: 2; left: 50%; top: 45%; width: 280px; height: 280px; color: white; transform: translate(-50%, -50%); animation: enemyHover 3s ease-in-out infinite; transition: opacity .55s ease, filter .55s ease, transform .55s ease; }
.encounter-figure.encounter-1 { --enemy:#ff65d8; --enemy2:#8d63ff; }
.encounter-figure.encounter-2 { --enemy:#8d63ff; --enemy2:#62d9ff; }
.encounter-figure.encounter-3 { --enemy:#62d9ff; --enemy2:#33edbd; }
.encounter-figure.encounter-4 { --enemy:#ffbe55; --enemy2:#f036cf; }
.encounter-figure.encounter-5 { --enemy:#ff557d; --enemy2:#8d63ff; }
.enemy-core { position: absolute; z-index: 3; left: 50%; top: 43%; display: grid; width: 112px; height: 112px; place-items: center; border: 1px solid rgba(255,255,255,.58); border-radius: 34% 66% 62% 38% / 45% 35% 65% 55%; background: radial-gradient(circle at 36% 28%, rgba(255,255,255,.9), var(--enemy) 21%, var(--enemy2) 72%, rgba(12,13,39,.94)); box-shadow: inset 0 0 27px rgba(255,255,255,.28), 0 0 22px var(--enemy), 0 0 70px color-mix(in srgb, var(--enemy2), transparent 50%); transform: translate(-50%, -50%) rotate(-8deg); animation: enemyMorph 4.2s ease-in-out infinite; }
.enemy-core i { color: white; font-size: 43px; font-style: normal; text-shadow: 0 0 17px white; transform: rotate(8deg); }
.enemy-core em { position: absolute; right: 19px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: white; box-shadow: 0 0 12px white; }
.enemy-ring { position: absolute; z-index: 1; left: 50%; top: 43%; border: 1px solid color-mix(in srgb, var(--enemy), transparent 30%); border-radius: 50%; transform: translate(-50%, -50%); }
.ring-one { width: 166px; height: 166px; border-style: dashed; animation: ringSpin 8s linear infinite; }
.ring-two { width: 205px; height: 96px; border-color: color-mix(in srgb, var(--enemy2), transparent 28%); transform: translate(-50%, -50%) rotate(-23deg); animation: ringTilt 4s ease-in-out infinite alternate; }
.enemy-wing { position: absolute; z-index: 2; top: 40%; width: 72px; height: 40px; opacity: .72; background: linear-gradient(90deg, transparent, var(--enemy)); clip-path: polygon(0 50%, 100% 0, 82% 100%); filter: drop-shadow(0 0 10px var(--enemy)); animation: wingBeat .9s ease-in-out infinite alternate; }
.wing-left { left: 9px; transform-origin: right center; }
.wing-right { right: 9px; background: linear-gradient(90deg, var(--enemy), transparent); clip-path: polygon(18% 0, 100% 50%, 18% 100%); transform-origin: left center; }
.encounter-figure > strong { position: absolute; left: 0; right: 0; bottom: 24px; color: white; font-size: 21px; letter-spacing: -.02em; text-align: center; text-shadow: 0 3px 18px #08091d; }
.encounter-figure > small { position: absolute; left: 12px; right: 12px; bottom: 4px; overflow: hidden; color: #bfc7e4; font-size: 10px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.encounter-figure.is-defeated { animation: enemyDefeat .68s ease forwards; }
.encounter-figure.is-struck { animation: enemyStruck .48s ease; }
.encounter-signal { position: absolute; z-index: 4; left: 20px; top: 82px; display: flex; align-items: center; gap: 9px; }
.encounter-signal > span, .encounter-signal > b { padding: 7px 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; color: #c3cae5; background: rgba(8,9,26,.58); font-size: 8px; font-weight: 900; letter-spacing: .1em; backdrop-filter: blur(8px); }
.encounter-signal > span { display: flex; align-items: center; gap: 6px; }
.encounter-signal i { width: 6px; height: 6px; border-radius: 50%; background: #ff4c78; box-shadow: 0 0 9px #ff4c78; animation: signalBlink 1s ease-in-out infinite; }
.encounter-signal > b { color: white; background: linear-gradient(135deg, rgba(240,54,207,.42), rgba(22,131,255,.42)); }

.question-card { position: relative; min-height: 640px; padding: clamp(30px, 4vw, 54px); background: rgba(251,251,255,.985); color: var(--ink); }
.battle-brief { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; margin: -11px 0 18px; padding: 11px 13px; border: 1px solid #e4e6f2; border-radius: 14px; background: linear-gradient(135deg, #f3f1ff, #eef9ff); animation: rise .36s .08s ease both; }
.battle-brief > span { grid-row: 1 / 3; padding: 6px 8px; border-radius: 8px; color: white; background: linear-gradient(135deg, #725cf2, #1683ff); font-size: 8px; font-weight: 900; letter-spacing: .08em; writing-mode: vertical-rl; transform: rotate(180deg); }
.battle-brief > b { align-self: end; font-size: 14px; }
.battle-brief > em { align-self: start; overflow: hidden; color: #7e849a; font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 25px; }
.meta-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.type-badge, .no-timer { padding: 8px 12px; border-radius: 999px; color: #384694; background: #eef0ff; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.boost-badge { padding: 8px 10px; border-radius: 999px; color: #a72886; background: #ffe9fa; font-size: 9px; font-weight: 900; letter-spacing: .06em; box-shadow: inset 0 0 0 1px rgba(240,54,207,.13); }
.no-timer { color: #6d7391; background: #f0f1f6; letter-spacing: .1em; }
.timer { display: flex; align-items: center; gap: 6px; color: #424967; }
.timer-ring { position: relative; display: block; width: 24px; height: 24px; border-radius: 50%; background: #e9eaf1; }
.timer-ring i { --timer: 100%; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--pink) var(--timer), #e9eaf1 0); mask: radial-gradient(circle, transparent 52%, black 54%); }
.timer b { min-width: 18px; font-size: 17px; font-variant-numeric: tabular-nums; }
.timer em { color: #8b91a8; font-size: 9px; font-style: normal; font-weight: 800; }
.question-title { margin: 0; font-size: clamp(25px, 3.1vw, 40px); font-weight: 800; line-height: 1.35; letter-spacing: -.045em; word-break: keep-all; animation: questionReveal .42s .12s ease both; }
.question-help { margin: 13px 0 0; color: #7e849a; font-size: 14px; }
.options { display: grid; gap: 11px; margin-top: 27px; }
.option-button { display: grid; grid-template-columns: 38px 1fr 24px; gap: 13px; align-items: center; width: 100%; min-height: 64px; padding: 11px 16px; border: 1px solid #e3e4ec; border-radius: 17px; color: #181a2c; background: white; cursor: pointer; text-align: left; line-height: 1.45; animation: optionEnter .38s calc(.18s + var(--delay)) ease both; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.option-button:hover:not(:disabled) { transform: translateX(4px); border-color: #9da4ff; box-shadow: 0 9px 20px rgba(63,70,130,.09); }
.option-key { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; color: #535a99; background: #eff0ff; font-size: 12px; font-weight: 900; }
.option-button > i { color: #adb1c2; font-style: normal; text-align: center; }
.option-button:disabled { cursor: default; }
.option-button.correct { border-color: #53cfa4; background: #edfff8; }
.option-button.correct .option-key { color: white; background: #28b682; }
.option-button.wrong { border-color: #ff879c; background: #fff1f4; }
.option-button.wrong .option-key { color: white; background: #e94d6b; }

.feedback { margin-top: 18px; padding: 18px; border-radius: 17px; animation: rise .24s ease both; }
.feedback.is-correct { border: 1px solid #bcebdc; background: #effcf7; }
.feedback.is-wrong { border: 1px solid #f5c4ce; background: #fff3f5; }
.feedback-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.feedback-head strong { font-size: 17px; }
.feedback-head span { padding: 5px 9px; border-radius: 999px; color: #2d7b60; background: #dff8ef; font-size: 10px; font-weight: 900; letter-spacing: .07em; }
.is-wrong .feedback-head span { color: #aa3c51; background: #ffe0e6; }
.feedback > p { margin: 0; color: #4e5369; font-size: 14px; line-height: 1.6; }
.feedback .fact { display: grid; gap: 4px; margin-top: 11px; padding-top: 11px; border-top: 1px solid rgba(15,17,42,.09); font-size: 12px; }
.fact b { color: #5d64a0; font-size: 9px; letter-spacing: .12em; }
.card-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.card-actions .primary-button { color: white; background: var(--ink); }
.reward-burst { position: absolute; left: 50%; top: 45%; pointer-events: none; }
.reward-burst i { position: absolute; width: 7px; height: 7px; border-radius: 2px; background: var(--pink); animation: burst .7s ease-out both; transform: rotate(calc(var(--i) * 45deg)) translateY(-70px); }
.reward-burst i:nth-child(even) { background: var(--blue); }
.reward-burst.miss { display: none; }

/* Stage transition */
.stage-gate { position: relative; min-height: 680px; overflow: hidden; border: 1px solid var(--line); border-radius: 34px; box-shadow: var(--shadow); }
.gate-map { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.gate-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,8,23,.95) 0%, rgba(7,8,23,.72) 44%, rgba(7,8,23,.16)); }
.gate-content { position: relative; z-index: 2; display: flex; width: min(600px, 70%); min-height: 680px; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(36px, 7vw, 90px); }
.gate-icon { display: grid; width: 68px; height: 68px; place-items: center; border: 1px solid rgba(255,255,255,.33); border-radius: 21px; background: var(--gradient); box-shadow: 0 0 35px rgba(141,99,255,.45); font-size: 32px; }
.gate-content > p { margin: 24px 0 10px; color: #abb3d2; font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.gate-content h1 { margin: 0; font-size: clamp(42px, 7vw, 78px); line-height: 1; letter-spacing: -.06em; }
.gate-content h2 { margin: 13px 0 18px; color: #d0d5e8; font-size: clamp(18px, 2vw, 24px); font-weight: 600; line-height: 1.45; word-break: keep-all; }
.stage-story { display: grid; gap: 6px; max-width: 530px; margin-bottom: 18px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.18); border-left: 3px solid #8d63ff; border-radius: 4px 16px 16px 4px; background: rgba(9,10,30,.63); box-shadow: inset 0 0 25px rgba(141,99,255,.06); backdrop-filter: blur(12px); }
.stage-story > span { color: #82dfff; font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.stage-story > b { font-size: 14px; line-height: 1.45; word-break: keep-all; }
.stage-story > em { color: #afb7d3; font-size: 12px; font-style: normal; line-height: 1.5; word-break: keep-all; }
.stage-story > small { margin-top: 3px; color: #8d95b7; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.gate-reward { display: flex; gap: 10px; margin-bottom: 28px; }
.gate-reward span { padding: 10px 13px; border: 1px solid var(--line); border-radius: 13px; color: #a7aecb; background: rgba(10,11,30,.48); font-size: 12px; }
.gate-reward b { margin-left: 6px; color: white; }
.gate-mascot { position: absolute; z-index: 2; right: 2%; bottom: -4%; width: min(36vw, 400px); max-height: 70%; object-fit: contain; filter: drop-shadow(0 25px 35px rgba(5,5,20,.55)); animation: float 3s ease-in-out infinite; }

/* Boss and random-event encounters */
.boss-warning, .event-screen { position: relative; min-height: 680px; overflow: hidden; border: 1px solid var(--line); border-radius: 34px; background: #10112c; box-shadow: var(--shadow); }
.boss-arena, .event-art { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.boss-warning-shade { position: absolute; inset: 0; background: radial-gradient(circle at 70% 48%, rgba(116,53,214,.08), rgba(7,8,24,.47) 45%, rgba(7,8,24,.97)); }
.warning-stripe { position: absolute; z-index: 4; left: 0; right: 0; top: 25px; padding: 11px; border-block: 1px solid rgba(255,105,181,.45); color: #ffd2ec; background: rgba(166,24,123,.44); font-size: 10px; font-weight: 900; letter-spacing: .25em; text-align: center; backdrop-filter: blur(12px); }
.warning-boss { position: absolute; z-index: 2; right: 2%; bottom: -3%; width: min(55%, 620px); height: 88%; object-fit: contain; filter: drop-shadow(0 28px 45px rgba(77,35,178,.72)); animation: bossHover 3.2s ease-in-out infinite; }
.boss-warning.is-final .warning-boss { width: min(62%, 690px); filter: drop-shadow(0 28px 55px rgba(240,54,207,.78)); }
.warning-content { position: relative; z-index: 3; display: flex; width: min(560px, 55%); min-height: 680px; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(38px, 7vw, 88px); }
.warning-content p { margin: 0 0 12px; color: #f0a8db; font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.warning-content h1 { margin: 0; font-size: clamp(52px, 8vw, 94px); line-height: .95; letter-spacing: -.07em; text-shadow: 0 0 34px rgba(240,54,207,.3); }
.warning-content blockquote { max-width: 440px; margin: 18px 0 0; padding: 13px 15px; border-left: 3px solid #f036cf; color: #f4dcf1; background: rgba(240,54,207,.08); font-size: 15px; font-weight: 700; line-height: 1.55; word-break: keep-all; }
.warning-content > span { max-width: 430px; margin: 12px 0 17px; color: #bdc4df; font-size: 15px; line-height: 1.6; }
.boss-theme { display: grid; grid-template-columns: 8px auto 1fr; align-items: center; gap: 8px; min-width: 250px; margin-bottom: 22px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: rgba(8,9,26,.58); backdrop-filter: blur(10px); }
.boss-theme i { width: 8px; height: 8px; border-radius: 50%; background: #f036cf; box-shadow: 0 0 12px #f036cf; animation: signalBlink .7s ease-in-out infinite; }
.boss-theme span { color: #8f98b8; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.boss-theme b { justify-self: end; color: white; font-size: 10px; letter-spacing: .09em; }
.event-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,9,27,.96), rgba(8,9,27,.62) 52%, rgba(8,9,27,.15)); }
.event-alert { position: absolute; z-index: 3; left: 30px; top: 28px; display: flex; align-items: center; gap: 10px; color: #e8dcff; font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.event-alert span { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 6px rgba(240,54,207,.15), 0 0 20px var(--pink); animation: pulse 1.25s ease-in-out infinite; }
.event-content { position: relative; z-index: 2; display: flex; width: min(650px, 67%); min-height: 680px; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(36px, 7vw, 86px); }
.event-icon { display: grid; width: 70px; height: 70px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 22px; background: linear-gradient(135deg, rgba(240,54,207,.77), rgba(22,131,255,.77)); box-shadow: 0 0 34px rgba(141,99,255,.45); font-size: 32px; }
.event-content p { margin: 22px 0 8px; color: #c7b9ee; font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.event-content h1 { margin: 0; font-size: clamp(48px, 7vw, 82px); line-height: 1; letter-spacing: -.065em; }
.event-content h2 { max-width: 530px; margin: 14px 0 22px; color: #c7cde3; font-size: clamp(17px, 2vw, 22px); font-weight: 500; line-height: 1.55; }
.event-effect { margin-bottom: 28px; padding: 12px 16px; border: 1px solid rgba(240,54,207,.35); border-radius: 14px; color: white; background: rgba(106,51,182,.32); box-shadow: inset 0 0 25px rgba(240,54,207,.08); font-size: 13px; font-weight: 800; }
.event-guide { position: absolute; z-index: 2; right: 3%; bottom: -7%; width: min(31vw, 340px); max-height: 58%; object-fit: contain; filter: drop-shadow(0 22px 34px rgba(7,8,25,.65)); animation: float 3s ease-in-out infinite; }

/* Optional story checkpoints and consent-based progress capture */
.checkpoint-screen { display: grid; grid-template-columns: minmax(330px, .92fr) minmax(500px, 1.08fr); overflow: hidden; border: 1px solid var(--line); border-radius: 34px; background: #11132d; box-shadow: var(--shadow); }
.checkpoint-visual { position: relative; min-height: 700px; overflow: hidden; }
.checkpoint-visual > img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.checkpoint-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,9,27,.24), rgba(8,9,27,.3) 42%, rgba(8,9,27,.95)); }
.checkpoint-code { position: absolute; z-index: 2; left: 24px; top: 24px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #d8dcf0; background: rgba(8,9,27,.55); font-size: 9px; font-weight: 900; letter-spacing: .12em; backdrop-filter: blur(12px); }
.core-recovery { position: absolute; z-index: 2; left: 50%; top: 42%; display: grid; place-items: center; align-content: center; width: 190px; height: 190px; border: 1px solid rgba(255,255,255,.36); border-radius: 50%; background: radial-gradient(circle, rgba(113,81,232,.83), rgba(31,27,80,.76) 68%); box-shadow: 0 0 0 15px rgba(141,99,255,.08), 0 0 70px rgba(98,217,255,.28); transform: translate(-50%, -50%); }
.core-recovery i { font-size: 42px; font-style: normal; text-shadow: 0 0 24px #fff; }
.core-recovery b { margin-top: 5px; font-size: 34px; }
.core-recovery span { color: #c4c9e0; font-size: 11px; }
.checkpoint-story { position: absolute; z-index: 2; left: 24px; right: 24px; bottom: 26px; display: grid; gap: 7px; padding: 17px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(8,9,27,.72); backdrop-filter: blur(14px); }
.checkpoint-story b { font-size: 17px; }
.checkpoint-story span { color: #aeb5d0; font-size: 13px; }
.checkpoint-panel { min-height: 700px; padding: clamp(34px, 5vw, 64px); color: var(--ink); background: #fbfbff; }
.checkpoint-panel > p { margin: 0 0 9px; color: #6d64be; font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.checkpoint-panel > h1 { margin: 0; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.055em; }
.checkpoint-panel > h2 { max-width: 600px; margin: 12px 0 24px; color: #71768d; font-size: 15px; font-weight: 500; line-height: 1.65; word-break: keep-all; }
.checkpoint-form { display: grid; gap: 13px; }
.checkpoint-form label { display: grid; gap: 7px; }
.checkpoint-form label > span { color: #484d64; font-size: 13px; font-weight: 800; }
.checkpoint-form label > span b { color: #d33d68; }
.checkpoint-form input:not([type="checkbox"]), .checkpoint-form select { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid #dfe1ea; border-radius: 13px; color: var(--ink); background: #fff; font: inherit; font-size: 15px; outline: 0; }
.checkpoint-form input:focus, .checkpoint-form select:focus { border-color: #7b7ee9; box-shadow: 0 0 0 4px rgba(123,126,233,.12); }
.checkpoint-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.checkpoint-consent { grid-template-columns: 20px 1fr !important; gap: 10px !important; align-items: flex-start; margin-top: 2px; padding: 13px; border-radius: 14px; color: #686d84; background: #eff0f7; font-size: 12px; font-weight: 500; line-height: 1.55; cursor: pointer; }
.checkpoint-consent input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--violet); }
.checkpoint-consent span { color: #686d84 !important; font-size: 12px !important; font-weight: 500 !important; }
.checkpoint-error { min-height: 18px; margin: -3px 0; color: #c33856; font-size: 13px; }
.checkpoint-submit { width: 100%; }
.checkpoint-submit:disabled { opacity: .68; cursor: wait; }
.checkpoint-skip { justify-self: center; padding: 8px; border: 0; color: #727890; background: transparent; font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* Results */
.result-screen { overflow: hidden; border: 1px solid var(--line); border-radius: 34px; background: #11132d; box-shadow: var(--shadow); }
.result-hero { position: relative; min-height: 410px; overflow: hidden; }
.result-hero > img:first-child { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.result-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,8,22,.94), rgba(7,8,22,.5) 55%, rgba(7,8,22,.18)); }
.result-mascot { position: absolute; z-index: 2; right: 7%; bottom: -16%; width: min(34vw, 330px); max-height: 110%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0,0,0,.45)); }
.rank-seal { position: absolute; z-index: 3; right: 7%; top: 30px; display: grid; width: 100px; height: 100px; place-items: center; align-content: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; background: var(--gradient); box-shadow: 0 0 40px rgba(141,99,255,.45); }
.rank-seal span { font-size: 9px; font-weight: 800; letter-spacing: .17em; }
.rank-seal b { font-size: 48px; line-height: 1; }
.result-copy-top { position: absolute; z-index: 2; left: clamp(30px, 7vw, 80px); bottom: 65px; }
.result-copy-top p { margin: 0 0 12px; color: #aab2d3; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.result-copy-top h1 { margin: 0; font-size: clamp(48px, 8vw, 82px); line-height: 1; letter-spacing: -.07em; }
.result-copy-top > span { display: block; margin-top: 12px; color: #c4cae1; }
.result-board { position: relative; padding: 38px clamp(28px, 6vw, 70px) 52px; }
.score-orbit { position: absolute; right: 7%; top: -67px; display: grid; width: 136px; height: 136px; place-items: center; align-content: center; border: 8px solid #151736; border-radius: 50%; background: white; color: var(--ink); box-shadow: 0 16px 30px rgba(0,0,0,.25); }
.score-orbit span { color: #6e7490; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.score-orbit strong { font-size: 48px; line-height: 1; }
.score-orbit em { color: #858aa0; font-size: 11px; font-style: normal; }
.result-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: calc(100% - 160px); }
.result-stats > div { display: grid; gap: 4px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.045); }
.result-stats span { color: #858dab; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.result-stats b { font-size: 22px; }
.stage-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-top: 28px; }
.stage-result { display: grid; place-items: center; gap: 4px; padding: 17px 8px; border: 1px solid var(--line); border-radius: 17px; color: #858dab; background: rgba(255,255,255,.035); }
.stage-result.passed { border-color: rgba(72,226,168,.35); color: white; background: rgba(72,226,168,.09); }
.stage-result > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: rgba(255,255,255,.08); }
.stage-result strong, .stage-result em { font-size: 9px; letter-spacing: .1em; }
.stage-result b { font-size: 16px; }
.stage-result em { color: var(--success); font-style: normal; }
.result-message { margin: 25px 0 0; padding: 20px; border-radius: 17px; color: #b5bcd7; background: rgba(255,255,255,.045); line-height: 1.7; }
.result-actions { display: flex; gap: 10px; margin-top: 22px; }
.result-actions .text-button { margin-left: auto; }
.ending-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 24px; overflow: hidden; border: 1px solid rgba(98,217,255,.24); border-radius: 21px; background: radial-gradient(circle at 92% 20%, rgba(98,217,255,.2), transparent 25%), linear-gradient(135deg, rgba(82,61,174,.28), rgba(22,131,255,.12)); }
.ending-card > div { display: grid; gap: 5px; }
.ending-card span { color: #72ddff; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.ending-card h2 { margin: 0; font-size: clamp(23px, 3vw, 34px); letter-spacing: -.045em; }
.ending-card p { max-width: 720px; margin: 2px 0 0; color: #b8c1df; font-size: 14px; line-height: 1.6; }
.ending-card > strong { display: grid; flex: 0 0 84px; width: 84px; height: 84px; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: var(--gradient); box-shadow: 0 0 32px rgba(141,99,255,.4); font-size: 38px; }
.ending-card.ending-true { border-color: rgba(255,214,90,.46); background: radial-gradient(circle at 90% 20%, rgba(255,214,90,.23), transparent 28%), linear-gradient(135deg, rgba(116,63,191,.34), rgba(22,131,255,.13)); }
.ending-card.ending-true > strong { background: linear-gradient(135deg, #ffd65a, #f036cf 53%, #1683ff); }
.achievement-section { margin-top: 25px; }
.achievement-section > p { margin: 0 0 10px; color: #8f98bb; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.achievement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.achievement-grid > div { display: grid; min-height: 116px; place-items: center; align-content: center; gap: 4px; padding: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 17px; background: rgba(255,255,255,.045); text-align: center; }
.achievement-grid span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: #11142e; background: linear-gradient(135deg, #a9f2ff, #b9a8ff); font-size: 17px; }
.achievement-grid b { font-size: 14px; }
.achievement-grid small { color: #8f98b8; font-size: 11px; }

/* Native business card and inquiry DB */
.internal-card-page { display: grid; grid-template-columns: minmax(360px, .88fr) minmax(520px, 1.12fr); overflow: hidden; border: 1px solid var(--line); border-radius: 34px; background: #11132d; box-shadow: var(--shadow); }
.profile-card { position: relative; min-height: 860px; overflow: hidden; padding: 28px; background: radial-gradient(circle at 80% 18%, rgba(22,131,255,.3), transparent 31%), radial-gradient(circle at 28% 30%, rgba(240,54,207,.28), transparent 33%), #090a1d; }
.profile-card::before { content: ""; position: absolute; inset: 0; opacity: .2; background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(to bottom, #000, transparent 70%); }
.profile-card-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.profile-logo { width: 58px; height: 58px; object-fit: contain; }
.profile-status { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #d1d6eb; background: rgba(7,8,24,.45); font-size: 12px; }
.profile-status i { width: 7px; height: 7px; border-radius: 50%; background: #49e0a6; box-shadow: 0 0 13px #49e0a6; }
.profile-photo { position: absolute; z-index: 1; right: -7%; top: 60px; width: 85%; height: 440px; object-fit: contain; object-position: right bottom; filter: drop-shadow(0 25px 45px rgba(0,0,0,.55)); }
.profile-copy { position: relative; z-index: 2; margin-top: 360px; }
.profile-copy > p { margin: 0 0 6px; color: #74c6ff; font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.profile-copy h1 { margin: 0; font-size: 50px; letter-spacing: -.06em; }
.profile-copy h1 span { color: #aeb5d1; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.profile-copy h2 { margin: 7px 0 0; color: #c6cce2; font-size: 17px; font-weight: 600; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.profile-tags span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; color: #cbd1e6; background: rgba(255,255,255,.05); font-size: 12px; }
.profile-quick { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 25px; }
.profile-quick a, .profile-quick button { display: grid; min-height: 76px; place-items: center; align-content: center; gap: 5px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; color: white; background: rgba(255,255,255,.055); font: inherit; text-decoration: none; cursor: pointer; }
.profile-quick b { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; background: linear-gradient(135deg, rgba(240,54,207,.7), rgba(22,131,255,.8)); font-size: 14px; }
.profile-quick span { color: #b7bed7; font-size: 12px; }
.profile-contact { position: relative; z-index: 2; display: grid; gap: 9px; margin-top: 16px; padding: 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: rgba(7,8,24,.5); }
.profile-contact > div { display: grid; grid-template-columns: 72px 1fr; align-items: center; }
.profile-contact span { color: #737d9f; font-size: 11px; font-weight: 900; letter-spacing: .11em; }
.profile-contact a { overflow: hidden; color: #eef0fa; font-size: 14px; text-decoration: none; text-overflow: ellipsis; }
.profile-contact button { justify-self: start; margin-top: 4px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: #cbd1e5; background: rgba(255,255,255,.06); font: inherit; font-size: 12px; cursor: pointer; }
.profile-services { position: relative; z-index: 2; margin-top: 17px; }
.profile-services > p { margin: 0 0 9px; color: #8e97b7; font-size: 12px; font-weight: 800; }
.profile-services > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.profile-services span { padding: 10px; border-radius: 12px; color: #c8cee2; background: rgba(255,255,255,.055); font-size: 12px; line-height: 1.4; }
.profile-services b { margin-right: 5px; color: #8d95ff; }
.inquiry-panel { min-height: 860px; padding: clamp(32px, 5vw, 62px); background: #fbfbff; color: var(--ink); }
.inquiry-result { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 34px; padding: 18px; border-radius: 18px; color: white; background: linear-gradient(135deg, #151735, #29235b); box-shadow: 0 16px 30px rgba(35,34,84,.18); }
.inquiry-result p { margin: 0 0 5px; color: #aeb6d7; font-size: 11px; font-weight: 900; letter-spacing: .13em; }
.inquiry-result h2 { margin: 0; font-size: 20px; }
.inquiry-result span { display: block; margin-top: 4px; color: #aeb5cd; font-size: 13px; }
.inquiry-result > strong { flex: 0 0 auto; font-size: 43px; line-height: 1; }
.inquiry-result em { color: #9fa7c8; font-size: 12px; font-style: normal; }
.inquiry-heading > p { margin: 0 0 8px; color: #686fba; font-size: 12px; font-weight: 900; letter-spacing: .14em; }
.inquiry-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 43px); letter-spacing: -.045em; }
.inquiry-heading > span { display: block; margin-top: 11px; color: #70768d; font-size: 15px; line-height: 1.6; }
.inquiry-form { display: grid; gap: 14px; margin-top: 26px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row label, .field-block { display: grid; gap: 7px; }
.field-row label > span, .field-block > span { color: #4b5068; font-size: 13px; font-weight: 800; }
.field-row label b, .field-block b { color: #d33d68; }
.field-row input, .field-row select, .field-block select, .field-block textarea { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid #dfe1ea; border-radius: 13px; color: var(--ink); background: white; font: inherit; font-size: 15px; outline: none; transition: border-color .18s ease, box-shadow .18s ease; }
.field-block textarea { min-height: 116px; padding-block: 12px; resize: vertical; line-height: 1.55; }
.field-row input:focus, .field-row select:focus, .field-block select:focus, .field-block textarea:focus { border-color: #7b7ee9; box-shadow: 0 0 0 4px rgba(123,126,233,.12); }
.consent-check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: flex-start; margin-top: 4px; padding: 14px; border-radius: 14px; background: #f0f1f8; color: #6b7086; font-size: 13px; line-height: 1.55; cursor: pointer; }
.consent-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--violet); }
.consent-check b { display: block; margin-bottom: 2px; color: #31364d; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { min-height: 20px; margin: -3px 0 0; color: #c33856; font-size: 13px; }
.submit-result { width: 100%; justify-content: center; }
.submit-result:disabled { opacity: .65; cursor: wait; }
.text-button { border: 0; color: #747b98; background: transparent; font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.inquiry-home { display: block; margin: 20px auto 0; }
.inquiry-success { display: grid; min-height: 360px; place-items: center; align-content: center; padding: 38px; border: 1px solid #cce9df; border-radius: 22px; background: #f0fbf7; text-align: center; }
.inquiry-success > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; color: white; background: #28b682; font-size: 28px; }
.inquiry-success p { margin: 18px 0 7px; color: #27765b; font-size: 13px; font-weight: 900; letter-spacing: .08em; }
.inquiry-success h2 { max-width: 430px; margin: 0 0 23px; font-size: 20px; line-height: 1.55; }

.error-card { max-width: 620px; margin: 10vh auto; padding: 50px; border: 1px solid var(--line); border-radius: 28px; background: var(--panel); text-align: center; }
.error-card h1 { margin: 16px 0 8px; font-size: 30px; }
.error-card p { color: var(--muted); line-height: 1.6; }
.error-icon { display: grid; width: 60px; height: 60px; margin: auto; place-items: center; border-radius: 18px; background: var(--gradient); font-size: 30px; font-weight: 900; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes float { 50% { transform: translateY(-11px); } }
@keyframes pulse { 50% { transform: scale(1.07); } }
@keyframes burst { from { opacity: 1; transform: rotate(calc(var(--i) * 45deg)) translateY(-10px); } to { opacity: 0; transform: rotate(calc(var(--i) * 45deg)) translateY(-90px) scale(.3); } }
@keyframes bossHover { 50% { transform: translateY(-10px); } }
@keyframes bossFloat { 50% { transform: translate(-50%, calc(-50% - 10px)); } }
@keyframes cinematicReveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes corePulse { 50% { transform: translateY(-6px); box-shadow: 0 0 38px rgba(98,217,255,.6); } }
@keyframes coreFlicker { 50% { opacity: .36; transform: scale(.9); } }
@keyframes questEnter { from { opacity: 0; transform: translateY(14px) scale(.992); } }
@keyframes questionReveal { from { opacity: 0; transform: translateY(12px); filter: blur(5px); } }
@keyframes optionEnter { from { opacity: 0; transform: translateX(18px); } }
@keyframes routePulse { 50% { box-shadow: 0 0 0 8px rgba(141,99,255,.03), 0 0 28px rgba(141,99,255,.7); } }
@keyframes chamberDrift { to { transform: scale(1.09) translate3d(-1.2%, -1%, 0); } }
@keyframes gridMove { to { background-position: 0 42px, 42px 0; } }
@keyframes scanScene { 0% { top: 9%; opacity: 0; } 12%, 88% { opacity: .65; } 100% { top: 88%; opacity: 0; } }
@keyframes particleLift { 0%, 100% { opacity: .14; transform: translateY(20px) scale(.65); } 50% { opacity: .9; transform: translateY(-32px) scale(1.2); } }
@keyframes enemyHover { 0%, 100% { transform: translate(-50%, -50%) rotate(-1deg); } 50% { transform: translate(-50%, calc(-50% - 12px)) rotate(1deg); } }
@keyframes enemyMorph { 0%, 100% { border-radius: 34% 66% 62% 38% / 45% 35% 65% 55%; transform: translate(-50%, -50%) rotate(-8deg); } 50% { border-radius: 58% 42% 35% 65% / 38% 61% 39% 62%; transform: translate(-50%, -50%) rotate(7deg) scale(1.06); } }
@keyframes ringSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes ringTilt { to { transform: translate(-50%, -50%) rotate(18deg) scaleX(.88); } }
@keyframes wingBeat { to { opacity: .38; transform: scaleX(.75) scaleY(.62); } }
@keyframes signalBlink { 50% { opacity: .25; } }
@keyframes enemyDefeat { 35% { filter: brightness(2.1); transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: .08; filter: blur(8px) saturate(.2); transform: translate(-50%, -28%) scale(.45) rotate(22deg); } }
@keyframes enemyStruck { 20% { transform: translate(calc(-50% - 13px), -50%); filter: hue-rotate(140deg) brightness(1.7); } 40% { transform: translate(calc(-50% + 12px), -50%); } 65% { transform: translate(calc(-50% - 7px), -50%); } }
@keyframes impactFlash { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@keyframes screenHit { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes fxGlitch { 0%, 86%, 100% { opacity: .18; transform: translate(0) scale(.8); } 88% { opacity: .85; transform: translate(-8px, 3px) scale(1.12); } 92% { opacity: .35; transform: translate(7px, -3px); } }
@keyframes fxWhisper { 0%, 100% { opacity: .15; transform: translate(-18px, 8px) rotate(-9deg); } 50% { opacity: .72; transform: translate(24px, -14px) rotate(7deg); } }
@keyframes fxRipple { 0% { opacity: .7; transform: scale(.45); box-shadow: 0 0 0 0 rgba(98,217,255,.4); } 100% { opacity: 0; transform: scale(1.65); box-shadow: 0 0 0 22px rgba(98,217,255,0); } }
@keyframes fxGear { to { transform: rotate(360deg); } }
@keyframes fxShadow { 0%, 100% { opacity: .12; transform: skewX(-8deg) scaleY(.7); filter: blur(2px); } 50% { opacity: .72; transform: skewX(8deg) scaleY(1.2); filter: blur(0); } }

@media (max-width: 920px) {
  .game-start { grid-template-columns: 1fr; }
  .opening-cinematic { grid-template-columns: 1fr; }
  .opening-visual { min-height: 430px; }
  .opening-copy { min-height: 0; }
  .world-card { min-height: 520px; order: -1; }
  .start-panel::after { display: none; }
  .quest-layout { grid-template-columns: 1fr; }
  .quest-route { grid-template-columns: auto 1fr auto; }
  .scene-card { min-height: 320px; }
  .question-card { min-height: 0; }
  .scene-dialog { max-width: 470px; }
  .gate-content { width: 78%; }
  .warning-content { width: 58%; }
  .warning-boss { right: -5%; width: 58%; }
  .checkpoint-screen { grid-template-columns: 1fr; }
  .checkpoint-visual { min-height: 420px; }
  .checkpoint-panel { min-height: 0; }
  .result-stats { grid-template-columns: repeat(3, 1fr); }
  .internal-card-page { grid-template-columns: 1fr; }
  .profile-card { min-height: 820px; }
  .inquiry-panel { min-height: 0; }
}

@media (max-width: 660px) {
  .page-shell { width: min(100% - 16px, 1240px); padding-right: env(safe-area-inset-right); padding-left: env(safe-area-inset-left); }
  .site-header { min-height: 56px; }
  .brand { gap: 8px; }
  .brand-mark { width: 38px; height: 36px; border-radius: 12px; }
  .brand-copy { font-size: 14px; }
  .global-sound-button { width: 36px; height: 36px; }
  .header-note { display: none; }
  #app { padding: 10px 0 36px; }
  .game-start, .opening-cinematic, .quest-layout, .stage-gate, .boss-warning, .event-screen, .checkpoint-screen, .result-screen { border-radius: 20px; }
  .start-panel { order: -2; padding: 28px 20px 30px; }
  .world-card { order: initial; min-height: 330px; }
  .mission-code { margin-bottom: 18px; font-size: 10px; }
  .start-panel h1 { font-size: clamp(42px, 13vw, 49px); }
  .start-copy { margin: 18px 0; font-size: 14px; line-height: 1.65; }
  .stolen-treasures { margin-bottom: 16px; }
  .player-brief { gap: 9px; margin: 16px 0 19px; padding: 10px 11px; }
  .player-brief img { width: 48px; height: 48px; }
  .player-brief b { font-size: 12px; }
  .player-brief span { font-size: 11px; }
  .game-cta { min-height: 54px; padding-left: 20px; }
  .resume-quest { min-height: 60px; margin-top: -4px; padding-left: 13px; border-radius: 15px; }
  .resume-quest strong { padding: 8px 9px; }
  .play-meta { font-size: 10px; }
  .map-route { left: 10px; right: 10px; bottom: 10px; gap: 1px; padding: 7px 3px; }
  .map-node em { display: none; }
  .map-node:not(:last-child)::after { display: none; }
  .map-callout { right: 12px; top: 12px; }
  .map-status { left: 12px; top: 12px; }
  .world-threat { left: 12px; right: 12px; bottom: 80px; padding: 9px 11px; }
  .world-threat span { font-size: 12px; }
  .intro-villain { width: 75%; max-height: 61%; }
  .opening-visual { min-height: 300px; }
  .opening-signal { left: 14px; top: 14px; }
  .opening-cores { bottom: 18px; gap: 6px; }
  .opening-cores span { width: 39px; height: 39px; border-radius: 12px; font-size: 17px; }
  .opening-copy { padding: 28px 20px 32px; }
  .opening-progress { margin-bottom: 23px; }
  .opening-copy h1 { font-size: 36px; }
  .opening-copy h2 { margin: 16px 0 21px; font-size: 14px; line-height: 1.65; }
  .game-hud { grid-template-columns: 1fr auto auto; gap: 6px; margin-bottom: 7px; padding: 8px 9px; border-radius: 15px; }
  .xp-track { grid-column: 1 / -1; grid-row: 2; }
  .hud-player { gap: 7px; }
  .hud-player img { width: 34px; height: 34px; border-radius: 10px; }
  .hud-player b { font-size: 13px; }
  .hud-stat { min-width: 48px; padding-left: 6px; }
  .hud-stat b { font-size: 15px; }
  .hud-stat:nth-of-type(4) { display: none; }
  .hud-player { min-width: 0; }
  .hud-player span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sound-button { width: 34px; height: 34px; }
  .mission-progress { height: 3px; margin: 0 6px 8px; }
  .quest-route { gap: 6px; margin: 0 0 8px; padding: 7px 9px; border-radius: 13px; }
  .quest-route > span, .quest-route > b { display: none; }
  .quest-route > div { justify-content: center; gap: 15px; }
  .quest-route i:not(:last-child)::after { width: 16px; }
  .scene-card { min-height: 210px; }
  .combo-orb { width: 54px; height: 54px; top: 51px; right: 10px; }
  .combo-orb strong { font-size: 18px; }
  .combo-orb span { font-size: 6px; }
  .scene-topline { left: 9px; right: 9px; top: 9px; padding: 7px 10px; font-size: 9px; }
  .encounter-figure { top: 47%; width: 166px; height: 166px; }
  .enemy-core { width: 68px; height: 68px; }
  .enemy-core i { font-size: 26px; }
  .ring-one { width: 104px; height: 104px; }
  .ring-two { width: 132px; height: 62px; }
  .enemy-wing { top: 38%; width: 54px; }
  .encounter-figure > strong { bottom: 7px; font-size: 15px; }
  .encounter-figure > small { display: none; }
  .encounter-signal { left: 9px; top: 48px; }
  .encounter-signal > b { display: none; }
  .scene-dialog { left: 9px; right: 9px; bottom: 9px; gap: 8px; padding: 8px 9px; border-radius: 15px; }
  .scene-dialog p { font-size: 11px; }
  .scene-dialog b { font-size: 12px; }
  .boss-life { left: 9px; right: 9px; top: 48px; padding: 7px 10px; }
  .boss-figure { top: 48%; width: 64%; max-height: 52%; }
  .dialog-avatar { flex-basis: 38px; width: 38px; height: 38px; border-radius: 12px; }
  .dialog-avatar img { width: 42px; height: 42px; }
  .question-card { padding: 18px 16px 24px; }
  .battle-brief { margin: 0 0 12px; padding: 8px 10px; }
  .battle-brief > span { padding: 5px 6px; }
  .question-meta { margin-bottom: 14px; }
  .type-badge, .no-timer { padding: 7px 10px; font-size: 10px; }
  .question-title { font-size: 23px; line-height: 1.32; }
  .question-help { margin-top: 9px; font-size: 12px; }
  .options { gap: 8px; margin-top: 15px; }
  .option-button { min-height: 56px; grid-template-columns: 34px 1fr 18px; gap: 10px; padding: 9px 11px; border-radius: 15px; font-size: 14px; }
  .option-key { width: 32px; height: 32px; border-radius: 10px; }
  .gate-content { width: 100%; min-height: 580px; justify-content: flex-start; padding: 46px 20px; background: linear-gradient(180deg, rgba(7,8,23,.92), rgba(7,8,23,.25) 70%); }
  .gate-map { object-position: 57% center; }
  .gate-mascot { width: 68vw; right: -5%; }
  .gate-content h1 { font-size: 43px; }
  .stage-story { padding: 12px 13px; }
  .boss-warning, .event-screen { min-height: 580px; }
  .warning-content, .event-content { width: 100%; min-height: 580px; justify-content: flex-start; padding: 76px 20px 30px; background: linear-gradient(180deg, rgba(7,8,24,.94), rgba(7,8,24,.52) 55%, rgba(7,8,24,.85)); }
  .warning-content h1, .event-content h1 { font-size: 43px; }
  .warning-content > span { margin-top: 13px; font-size: 15px; }
  .warning-content blockquote { margin-top: 14px; font-size: 13px; }
  .boss-theme { margin-bottom: 16px; }
  .warning-boss { right: -10%; bottom: -4%; width: 82%; height: 55%; opacity: .9; }
  .boss-warning.is-final .warning-boss { width: 92%; }
  .event-alert { left: 24px; top: 26px; }
  .event-icon { width: 58px; height: 58px; border-radius: 18px; font-size: 27px; }
  .event-content h2 { margin-bottom: 14px; font-size: 16px; }
  .event-guide { right: -8%; width: 56vw; max-height: 38%; opacity: .76; }
  .checkpoint-visual { min-height: 310px; }
  .checkpoint-code { left: 14px; top: 14px; }
  .core-recovery { top: 43%; width: 145px; height: 145px; }
  .core-recovery i { font-size: 32px; }
  .core-recovery b { font-size: 28px; }
  .checkpoint-story { left: 14px; right: 14px; bottom: 14px; padding: 13px; }
  .checkpoint-story b { font-size: 15px; }
  .checkpoint-panel { padding: 26px 18px; }
  .checkpoint-field-row { grid-template-columns: 1fr; }
  .result-hero { min-height: 420px; }
  .result-copy-top { left: 24px; right: 24px; bottom: 35px; }
  .result-copy-top h1 { font-size: 48px; }
  .result-mascot { width: 64vw; right: -10%; bottom: 13%; opacity: .75; }
  .rank-seal { width: 78px; height: 78px; top: 18px; right: 18px; }
  .rank-seal b { font-size: 36px; }
  .score-orbit { position: relative; right: auto; top: auto; margin: -75px auto 24px; }
  .result-stats { grid-template-columns: repeat(2, 1fr); width: 100%; }
  .result-stats > div:last-child { grid-column: 1 / -1; }
  .stage-grid { grid-template-columns: repeat(2, 1fr); }
  .stage-result:last-child { grid-column: 1 / -1; }
  .result-actions > * { flex: 1; }
  .result-actions { flex-wrap: wrap; }
  .result-actions .text-button { flex-basis: 100%; margin-left: 0; }
  .ending-card { gap: 12px; margin-top: 18px; padding: 18px 16px; border-radius: 18px; }
  .ending-card h2 { font-size: 23px; }
  .ending-card p { font-size: 12px; }
  .ending-card > strong { flex-basis: 58px; width: 58px; height: 58px; font-size: 27px; }
  .achievement-grid { grid-template-columns: 1fr; }
  .achievement-grid > div { min-height: 0; grid-template-columns: 36px 1fr; justify-items: start; gap: 2px 10px; padding: 12px; text-align: left; }
  .achievement-grid span { grid-row: 1 / 3; }
  .internal-card-page { border-radius: 23px; }
  .profile-card { min-height: 790px; padding: 20px; }
  .profile-card-top { align-items: flex-start; }
  .profile-logo { width: 50px; height: 50px; }
  .profile-status { max-width: 190px; border-radius: 14px; line-height: 1.35; }
  .profile-photo { right: -13%; top: 50px; width: 105%; height: 390px; }
  .profile-copy { margin-top: 330px; }
  .profile-copy h1 { font-size: 43px; }
  .profile-quick { gap: 5px; }
  .profile-quick a, .profile-quick button { min-height: 70px; border-radius: 13px; }
  .profile-quick span { font-size: 11px; }
  .profile-services > div { grid-template-columns: 1fr; }
  .inquiry-panel { padding: 28px 20px; }
  .inquiry-result { align-items: flex-start; }
  .inquiry-result > strong { font-size: 36px; }
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
