:root {
  color-scheme: dark;
  --ink: #f7f2ff;
  --muted: #b9b0c9;
  --dim: #7d758d;
  --gold: #d9b978;
  --violet: #ad83ff;
  --violet-bright: #d8c6ff;
  --panel: rgba(13, 10, 25, .88);
  --line: rgba(216, 198, 255, .18);
  --card-radius: 22px;
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  --px: 0px;
  --py: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; background: #03030a; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: transparent;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  word-break: keep-all;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 999; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; color: #090511; background: #fff; border: 0; }
.skip-link:focus, .skip-link:focus-visible { width: auto; height: auto; margin: 0; padding: 10px 14px; overflow: visible; clip-path: none; }

.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #03040d;
  pointer-events: none;
}

.cosmos-background {
  position: absolute;
  inset: -3%;
  background:
    linear-gradient(rgba(2, 4, 15, .12), rgba(2, 4, 15, .22)),
    url("assets/cosmos-bg.png") center center / cover no-repeat;
  transform: scale(1.06);
  will-change: transform;
}
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .045; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
main { position: relative; z-index: 2; }

.screen { position: relative; min-height: 100vh; min-height: 100svh; }
.intro { display: grid; place-items: center; padding: calc(var(--safe-top) + 30px) 24px calc(var(--safe-bottom) + 30px); text-align: center; overflow: hidden; }
.intro-copy { position: relative; z-index: 2; width: min(100%, 560px); }
.story-logo { margin: 0 auto 22px; color: #e4c987; opacity: 0; text-align: center; text-shadow: 0 0 12px rgba(217,185,120,.2); animation: boot-in 1s .05s ease forwards; }
.story-logo::before, .story-logo::after { content: ""; display: inline-block; width: 30px; height: 1px; margin: 0 10px 4px; background: linear-gradient(90deg, transparent, rgba(217,185,120,.5)); }
.story-logo::after { transform: scaleX(-1); }
.story-logo span { display: inline; font: 500 10px/1.3 Georgia, "Noto Serif KR", serif; letter-spacing: .12em; }
.story-logo strong { display: block; margin-top: 5px; color: #f0dfb0; font: 500 clamp(19px, 5.6vw, 27px)/1.2 Georgia, "Noto Serif KR", serif; letter-spacing: .04em; }
.system-kicker, .section-index { margin: 0 0 24px; color: var(--gold); font: 600 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .22em; }
.boot-sequence { min-height: 172px; }
.boot-line { opacity: 0; transform: translateY(8px); animation: boot-in .8s ease forwards; }
.line-one { margin: 0 0 9px; color: var(--muted); animation-delay: .2s; }
.line-two { margin: 0 0 26px; color: var(--muted); animation-delay: 1s; }
.line-three { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 10vw, 62px); line-height: 1.14; letter-spacing: -.04em; text-shadow: 0 0 28px rgba(173,131,255,.32); animation-delay: 1.8s; }
.intro-note { margin: 22px auto 26px; color: var(--muted); font-size: 14px; line-height: 1.8; opacity: 0; animation: boot-in .8s 2.55s ease forwards; }
.intro-action, .motion-note { opacity: 0; animation: boot-in .8s 3.05s ease forwards; }
.motion-note { margin: 14px 0 0; color: var(--dim); font-size: 11px; }
.intro-orbit { position: absolute; width: min(104vw, 620px); aspect-ratio: 1; border: 1px solid rgba(214,190,255,.1); border-radius: 50%; animation: slow-spin 28s linear infinite; }
.intro-orbit::before, .intro-orbit::after { content: ""; position: absolute; inset: 13%; border: 1px solid rgba(214,190,255,.08); border-radius: 50%; transform: rotate(30deg) scaleY(.55); }
.intro-orbit::after { inset: 28%; transform: rotate(-45deg) scaleX(.48); }
.intro-orbit i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 15px 4px var(--violet); }
.intro-orbit i:nth-child(1) { left: 11%; top: 36%; }.intro-orbit i:nth-child(2) { right: 14%; top: 24%; }.intro-orbit i:nth-child(3) { right: 22%; bottom: 17%; }
.intro-orbit span { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(216,198,255,.07); font-size: 180px; }

.primary-action, .ghost-action, .copy-action { min-height: 50px; border-radius: 4px; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.primary-action { display: inline-flex; align-items: center; justify-content: center; gap: 22px; padding: 0 24px; border: 1px solid rgba(233,221,255,.52); color: #fff; background: linear-gradient(135deg, rgba(122,77,194,.82), rgba(65,43,115,.9)); box-shadow: 0 10px 35px rgba(54,30,93,.32), inset 0 1px rgba(255,255,255,.15); text-decoration: none; font-weight: 700; }
.primary-action:hover { border-color: var(--violet-bright); box-shadow: 0 12px 42px rgba(95,55,160,.48), inset 0 1px rgba(255,255,255,.2); }
.primary-action:active, .ghost-action:active, .copy-action:active { transform: scale(.98); }
.primary-action:focus-visible, .ghost-action:focus-visible, .copy-action:focus-visible, .choice:focus-visible, .swatch:focus-visible, input:focus-visible, textarea:focus-visible, .map-card:focus-visible, .regions button:focus-visible, .region-detail button:focus-visible, .character-track:focus-visible, .map-toolbar button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.maker { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; height: 100vh; height: 100svh; padding: var(--safe-top) 0 var(--safe-bottom); overflow: hidden; background: transparent; }
.maker-header { z-index: 20; display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 0 20px 12px; }
.maker-header .system-kicker { margin: 0 0 4px; font-size: 8px; }
.maker-header h2 { margin: 0; font: 500 19px/1.1 Georgia, serif; }
.record-index { display: flex; align-items: center; gap: 8px; color: var(--dim); font: 11px ui-monospace, monospace; }
.record-index span:first-child { color: var(--violet-bright); font-size: 15px; }.record-index i { width: 30px; height: 1px; background: var(--line); }
.deck-stage { position: relative; min-height: 0; perspective: 1400px; overflow: visible; background: transparent; }
#profileForm { position: absolute; inset: 0; transform-style: preserve-3d; background: transparent; }
.record-card { position: absolute; top: 50%; left: 50%; width: min(74vw, 420px); height: min(66svh, calc(100% - 56px)); border: 1px solid rgba(217,185,120,.42); border-radius: var(--card-radius); background: linear-gradient(150deg, rgba(28,21,45,.96), rgba(10,8,21,.97)); box-shadow: 0 30px 80px rgba(0,0,0,.52), 0 0 45px rgba(99,55,157,.11), inset 0 0 0 1px rgba(255,255,255,.025); overflow: hidden; transform-origin: center; transition: transform .72s cubic-bezier(.18,.9,.2,1), opacity .58s ease, filter .58s ease, border-color .58s ease, box-shadow .58s ease, background-color .58s ease; }
.record-card::before, .record-card::after { content: ""; position: absolute; z-index: 3; pointer-events: none; }
.record-card::before { inset: 8px; border: 1px solid rgba(217,185,120,.14); border-radius: calc(var(--card-radius) - 7px); }
.record-card::after { left: 50%; top: 12px; width: 54px; height: 1px; transform: translateX(-50%); background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.card-edge { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 0, rgba(173,131,255,.14), transparent 38%); }
.record-card:not(.is-active) { border-color: rgba(216,198,255,.22); background: linear-gradient(150deg, rgba(54,38,84,.22), rgba(7,6,16,.1)); box-shadow: 0 18px 55px rgba(0,0,0,.2), inset 0 0 0 1px rgba(255,255,255,.025); -webkit-backdrop-filter: blur(1.5px) saturate(.82); backdrop-filter: blur(1.5px) saturate(.82); }
.record-card:not(.is-active)::before { border-color: rgba(217,185,120,.08); }
.record-card:not(.is-active)::after { opacity: .35; }
.record-card:not(.is-active) .card-edge { opacity: .45; }
.record-card.is-active { z-index: 10; opacity: 1; filter: none; transform: translate(-50%,-50%) translateZ(0) scale(1); }
.record-card.is-past { z-index: 4; opacity: 1; filter: none; transform: translate(calc(-50% - var(--deck-offset, min(64vw, 690px))),-50%) translateZ(-320px) rotateY(28deg) scale(var(--deck-scale, .58)); }
.record-card.is-future { z-index: 3; opacity: 1; filter: none; transform: translate(calc(-50% + var(--deck-offset, min(64vw, 690px))),-50%) translateZ(-320px) rotateY(-28deg) scale(var(--deck-scale, .58)); }
.record-card.is-far-past { z-index: 2; opacity: 1; filter: none; transform: translate(calc(-50% - var(--deck-offset, min(80vw, 820px))),-50%) translateZ(-480px) rotateY(34deg) scale(var(--deck-scale, .44)); }
.record-card.is-far-future { z-index: 1; opacity: 1; filter: none; transform: translate(calc(-50% + var(--deck-offset, min(80vw, 820px))),-50%) translateZ(-480px) rotateY(-34deg) scale(var(--deck-scale, .44)); }
.card-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(173,131,255,.35) transparent; padding: 25px 18px 36px; transition: opacity .58s ease, filter .58s ease; -webkit-overflow-scrolling: touch; }
.record-card:not(.is-active) .card-scroll { opacity: var(--deck-content-opacity, .34); filter: blur(.65px) saturate(.62); }
.card-heading { padding: 10px 2px 24px; text-align: center; }
.card-heading > span { color: var(--gold); font: 600 9px ui-monospace, monospace; letter-spacing: .18em; }
.card-heading h3 { margin: 10px 0 9px; font: 500 clamp(23px, 6.3vw, 31px)/1.2 Georgia, "Noto Serif KR", serif; }
.card-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.field, .question { display: block; margin: 0 0 22px; padding: 0; border: 0; }
.field > span, .question legend { display: block; width: 100%; margin-bottom: 9px; color: #e6dff0; font-size: 13px; font-weight: 700; }
.field em, .question em { float: right; color: var(--gold); font: 500 9px ui-monospace, monospace; letter-spacing: .08em; }
input, textarea { width: 100%; border: 1px solid rgba(221,210,240,.16); border-radius: 8px; color: #fff; background: rgba(3,3,11,.54); box-shadow: inset 0 1px 5px rgba(0,0,0,.26); }
input { min-height: 46px; padding: 0 13px; }
textarea { min-height: 98px; padding: 13px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #777083; }
input:focus, textarea:focus { border-color: rgba(173,131,255,.72); background: rgba(11,7,22,.78); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 38px; padding: 8px 12px; border: 1px solid rgba(214,202,233,.16); border-radius: 7px; color: #c9c0d6; background: rgba(255,255,255,.035); cursor: pointer; font-size: 12px; line-height: 1.25; transition: .18s ease; }
.choice:hover { border-color: rgba(173,131,255,.5); color: #fff; }
.choice.selected { border-color: rgba(216,198,255,.8); color: #fff; background: linear-gradient(135deg, rgba(122,77,194,.6), rgba(62,41,103,.68)); box-shadow: 0 0 14px rgba(128,78,201,.2), inset 0 0 0 1px rgba(255,255,255,.06); }
.compact .choice { padding: 7px 10px; font-size: 11px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 9px; }
.swatch { position: relative; aspect-ratio: 1; max-height: 52px; min-height: 44px; border: 1px solid rgba(255,255,255,.19); border-radius: 8px; background: var(--color); cursor: pointer; box-shadow: inset 0 0 12px rgba(0,0,0,.14); }
.swatch::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--check, #fff); font-size: 18px; font-weight: 900; opacity: 0; text-shadow: 0 1px 4px rgba(0,0,0,.75); }
.swatch.selected { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 18px rgba(200,176,255,.5), inset 0 0 0 2px rgba(0,0,0,.3); }
.swatch.selected::after { opacity: 1; }
.trait-meter { position: sticky; top: -1px; z-index: 5; display: flex; justify-content: space-between; margin: -3px 0 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: rgba(11,8,22,.94); color: var(--muted); font-size: 11px; backdrop-filter: blur(8px); }
.trait-meter b { color: var(--gold); }
.trait-group { margin-bottom: 18px; }.trait-group h4 { margin: 0 0 8px; color: var(--violet-bright); font-size: 11px; }
.trait-choice { display: flex; flex-direction: column; align-items: flex-start; min-width: calc(33.333% - 6px); }
.trait-choice small { margin-top: 3px; color: var(--dim); font-size: 8px; }.trait-choice.selected small { color: #d5cde1; }
.live-preview { margin: 22px 0; padding: 15px; border-left: 2px solid var(--gold); background: rgba(217,185,120,.055); }
.live-preview span { color: var(--gold); font: 600 9px ui-monospace, monospace; letter-spacing: .12em; }
.live-preview p { margin: 8px 0 0; color: #ddd5e6; font: 13px/1.75 Georgia, "Noto Serif KR", serif; }
.deck-navigation { z-index: 20; display: flex; justify-content: center; gap: 10px; padding: 12px 20px 0; }
.deck-navigation button { min-height: 46px; }
.deck-navigation .primary-action { flex: 1; max-width: 260px; }
.ghost-action { padding: 0 14px; border: 1px solid var(--line); color: var(--muted); background: rgba(10,8,19,.65); }
.ghost-action:disabled { opacity: .3; cursor: default; }
.step-dots { z-index: 20; display: flex; justify-content: center; gap: 7px; padding-top: 10px; }
.step-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.2); transition: .3s; }
.step-dots i.active { width: 22px; border-radius: 3px; background: var(--violet-bright); box-shadow: 0 0 10px var(--violet); }

.merge-screen { display: grid; place-items: center; padding: 30px 24px; text-align: center; overflow: hidden; }
.merge-copy { position: relative; z-index: 3; opacity: 0; animation: merge-copy 1s 1.15s ease forwards; }
.merge-copy h2 { margin: 0 0 20px; font: 500 clamp(36px, 10vw, 58px)/1.15 Georgia, serif; }
.merge-copy > p:last-child { color: var(--muted); font-size: 14px; line-height: 1.8; }
.merge-deck { position: absolute; left: 50%; top: 42%; width: 210px; height: 300px; transform: translate(-50%,-50%); }
.merge-deck i { position: absolute; inset: 0; border: 1px solid rgba(216,198,255,.46); border-radius: 18px; background: rgba(25,16,43,.8); animation: card-merge 1.3s cubic-bezier(.2,.9,.2,1) forwards; }
.merge-deck i:nth-child(1) { --from:-170px; }.merge-deck i:nth-child(2) { --from:-85px; }.merge-deck i:nth-child(3) { --from:0px; }.merge-deck i:nth-child(4) { --from:85px; }.merge-deck i:nth-child(5) { --from:170px; }
.merge-deck span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 60px; opacity: 0; animation: flare .9s 1s ease forwards; }

.restoration { position: relative; }
.restore-status { position: sticky; z-index: 30; top: max(10px, env(safe-area-inset-top)); width: min(calc(100% - 28px), 520px); margin: 0 auto; padding: 10px 12px; border: 1px solid rgba(216,198,255,.18); border-radius: 8px; background: rgba(7,5,15,.78); box-shadow: 0 10px 30px rgba(0,0,0,.25); backdrop-filter: blur(14px); font: 600 9px ui-monospace, monospace; letter-spacing: .1em; }
.restore-status > span { color: var(--muted); }.restore-status > b { float: right; color: var(--gold); }
.restore-status > i { display: block; clear: both; height: 2px; margin-top: 8px; background: rgba(255,255,255,.08); overflow: hidden; }
.restore-status em { display: block; width: 34%; height: 100%; background: linear-gradient(90deg, #8052ce, #e3c985); box-shadow: 0 0 10px var(--violet); transition: width .8s ease; }
.story-section { position: relative; width: min(100%, 1100px); margin: 0 auto; padding: 120px 20px; scroll-margin-top: 64px; }
.section-copy { width: min(100%, 620px); margin: 0 auto 38px; text-align: center; }
.section-copy .small-title { display: block; margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.section-copy h2, .result-heading h2, .portal-section h2 { margin: 0 0 18px; font: 500 clamp(38px, 11vw, 72px)/1.08 Georgia, "Noto Serif KR", serif; letter-spacing: -.045em; }
.section-copy p:last-child, .portal-section > p { margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.85; }
.map-card { position: relative; display: block; width: min(100%, 820px); margin: 0 auto; padding: 0; border: 1px solid rgba(217,185,120,.42); border-radius: 14px; background: #0b0911; overflow: hidden; cursor: zoom-in; box-shadow: 0 28px 80px rgba(0,0,0,.4); }
.map-card img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .6s ease; }.map-card:hover img { transform: scale(1.025); }
.map-shade { position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(3,2,7,.92)); }
.map-label { position: absolute; inset: auto 20px 18px; display: flex; justify-content: space-between; align-items: end; gap: 15px; text-align: left; }
.map-label b { font-family: Georgia, serif; font-size: 18px; }.map-label small { color: var(--muted); font-size: 10px; }
.regions { display: grid; grid-template-columns: repeat(5, 1fr); width: min(100%, 820px); margin: 12px auto 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.regions button { min-height: 62px; padding: 12px 9px; border: 0; border-right: 1px solid var(--line); color: var(--ink); background: rgba(8,6,16,.46); text-align: center; cursor: pointer; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }.regions button:last-child { border-right: 0; }
.regions button:hover { background: rgba(102,66,158,.18); }.regions button[aria-expanded="true"] { color: #fff; background: rgba(112,70,177,.32); box-shadow: inset 0 -2px var(--gold); }
.regions b, .regions small { display: block; }.regions b { font-size: 11px; }.regions small { margin-top: 4px; color: var(--dim); font-size: 8px; }.regions button[aria-expanded="true"] small { color: #cfc4dc; }
.region-detail { position: relative; display: grid; grid-template-columns: minmax(100px,.32fr) 1fr; gap: 18px; width: min(100%,820px); margin: 10px auto 0; padding: 18px 48px 18px 18px; border: 1px solid rgba(216,198,255,.22); border-radius: 10px; background: linear-gradient(135deg,rgba(39,25,65,.7),rgba(8,6,16,.82)); box-shadow: 0 18px 48px rgba(0,0,0,.26); }
.region-detail span { color: var(--gold); font: 600 8px ui-monospace,monospace; letter-spacing: .14em; }.region-detail h3 { margin: 5px 0 0; font: 500 20px Georgia,"Noto Serif KR",serif; }.region-detail p { margin: 0; color: #c7becf; font-size: 12px; line-height: 1.75; }.region-detail > button { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; }
.encounter-section { width: 100%; max-width: none; padding-inline: 0; overflow: hidden; }
.encounter-section .section-copy { padding-inline: 20px; }
.swipe-hint { margin: 0 0 14px; color: var(--dim); text-align: center; font-size: 10px; }
.character-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: calc((100vw - min(82vw, 360px))/2); padding: 0 calc((100vw - min(82vw, 360px))/2) 16px; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y; }
.character-track::-webkit-scrollbar { display: none; }
.character-card { position: relative; flex: 0 0 min(82vw, 360px); height: min(65vh, 610px); min-height: 480px; scroll-snap-align: center; border: 1px solid color-mix(in srgb, var(--accent), transparent 40%); border-radius: 18px; background: #0a0810; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,.4); }
.character-card img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus); user-select: none; }
.character-shade { position: absolute; inset: 0; background: linear-gradient(transparent 28%, rgba(5,3,9,.22) 48%, rgba(5,3,9,.96) 82%); }
.character-copy { position: absolute; inset: auto 22px 24px; }
.character-copy > span { color: var(--accent); font: 600 9px ui-monospace, monospace; letter-spacing: .12em; }
.character-copy h3 { margin: 8px 0 2px; font: 500 30px Georgia, serif; }.character-copy b { color: #c9c0d3; font-size: 11px; }.character-copy p { margin: 12px 0 0; color: #c0b8ca; font-size: 12px; line-height: 1.65; }
.carousel-status { display: flex; align-items: center; justify-content: space-between; width: min(82vw, 360px); margin: 0 auto; color: var(--dim); font: 10px ui-monospace, monospace; }
#characterDots { display: flex; gap: 6px; }#characterDots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.2); }#characterDots i.active { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.climax-section { display: grid; place-items: center; min-height: 100vh; min-height: 100svh; padding: max(78px,calc(env(safe-area-inset-top) + 68px)) 24px max(70px,calc(env(safe-area-inset-bottom) + 54px)); overflow: hidden; text-align: center; }
.climax-core { position: relative; z-index: 1; width: min(100%,620px); }
.climax-core::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 47%; width: min(86vw,520px); aspect-ratio: 1; border: 1px solid rgba(216,198,255,.09); border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 80px rgba(107,63,173,.08), inset 0 0 70px rgba(107,63,173,.05); }
.climax-core .section-index { margin-bottom: 15px; }.climax-number { color: #efe6ff; font: 400 clamp(92px,25vw,156px)/.9 Georgia,serif; letter-spacing: -.08em; text-shadow: 0 0 32px rgba(173,131,255,.34); }.climax-number span { margin-left: 5px; color: var(--gold); font-size: .26em; letter-spacing: 0; }
.climax-core h2 { margin: 25px 0 14px; font: 500 clamp(27px,7.6vw,43px)/1.25 Georgia,"Noto Serif KR",serif; letter-spacing: -.035em; }.climax-core > p:not(.section-index) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.climax-sigil { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 34px; color: var(--violet-bright); }.climax-sigil i { width: 70px; height: 1px; background: linear-gradient(90deg,transparent,rgba(216,198,255,.36)); }.climax-sigil i:last-child { transform: scaleX(-1); }.climax-sigil span { text-shadow: 0 0 15px var(--violet); }
.result-section { padding-top: 80px; padding-bottom: 18px; }
.result-heading { margin-bottom: 42px; text-align: center; }
.profile-result { width: min(100%, 720px); margin: 0 auto; border: 1px solid rgba(217,185,120,.5); border-radius: 18px; background: linear-gradient(145deg, rgba(27,20,42,.96), rgba(8,7,16,.97)); box-shadow: 0 35px 100px rgba(0,0,0,.5), 0 0 80px rgba(105,58,170,.12); overflow: hidden; }
.profile-result > header, .profile-result > footer { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; color: var(--gold); font: 600 9px ui-monospace, monospace; letter-spacing: .14em; }
.profile-result > header { border-bottom: 1px solid var(--line); }.profile-result > footer { border-top: 1px solid var(--line); color: var(--dim); }.profile-result > footer b { color: var(--gold); }
.profile-body { padding: 26px 22px; }
.profile-block { margin-bottom: 26px; }.profile-block:last-child { margin-bottom: 0; }
.profile-block h3 { margin: 0 0 8px; color: #fff; font: 500 18px Georgia, "Noto Serif KR", serif; letter-spacing: -.01em; }.profile-block h3 small { display: block; margin-bottom: 5px; color: var(--gold); font: 600 9px ui-monospace, monospace; letter-spacing: .16em; }.profile-block p { margin: 0; color: #ddd5e5; font: 14px/1.9 Georgia, "Noto Serif KR", serif; }
.profile-identity h3 { color: #fff; font: 500 31px/1.2 Georgia, serif; letter-spacing: -.03em; }.profile-identity p { color: var(--violet-bright); }
.copy-action { display: flex; align-items: center; justify-content: center; gap: 12px; width: min(100%, 480px); margin: 22px auto 0; border: 1px solid rgba(216,198,255,.48); color: #fff; background: rgba(88,54,142,.65); }.copy-action span { font-size: 18px; }
.portal-section { max-width: 780px; padding-top: 42px; padding-bottom: max(140px, calc(100px + env(safe-area-inset-bottom))); text-align: center; }
.portal-section::before { content: ""; position: absolute; left: 50%; top: -72px; width: min(92vw,600px); height: 190px; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 100%,rgba(137,87,214,.22),transparent 68%); pointer-events: none; }
.portal-section > p { margin-bottom: 32px; }
.portal { position: relative; width: 210px; height: 310px; margin: 0 auto 42px; border: 1px solid rgba(216,198,255,.28); border-radius: 50% 50% 8px 8px; box-shadow: inset 0 0 70px rgba(131,83,209,.15), 0 0 60px rgba(100,54,171,.12); }
.portal::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(217,185,120,.18); border-radius: inherit; }.portal i { position: absolute; inset: 25%; border: 1px solid rgba(216,198,255,.1); border-radius: 50%; animation: slow-spin 15s linear infinite; }.portal i:nth-child(2) { inset: 38%; animation-direction: reverse; }.portal span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--violet-bright); font-size: 45px; text-shadow: 0 0 22px var(--violet); }
.unknown-status { width: min(100%, 520px); margin: 34px auto; border: 1px solid var(--line); border-radius: 10px; background: rgba(8,6,16,.64); text-align: left; }
.unknown-status > div { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font: 11px ui-monospace, monospace; }.unknown-status > div:last-child { border-bottom: 0; }.unknown-status b { color: var(--violet-bright); letter-spacing: .15em; }.unknown-status .stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }.unknown-status .stats span { display: flex; justify-content: space-between; }
.portal-action { min-width: min(100%, 300px); }.portal-guide { margin: 17px auto 0 !important; color: var(--muted) !important; font-size: 12px !important; line-height: 1.7 !important; }.portal-guide strong { color: var(--gold); }.portal-note { margin: 8px 0 0 !important; color: var(--dim) !important; font-size: 11px !important; }

.map-dialog { width: min(calc(100% - 18px), 1000px); max-width: none; height: min(90svh, 780px); padding: 0; border: 1px solid rgba(216,198,255,.3); border-radius: 12px; color: #fff; background: #080611; box-shadow: 0 30px 100px #000; overflow: hidden; }
.map-dialog::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(5px); }
.map-toolbar { display: flex; justify-content: space-between; align-items: center; height: 58px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); }.map-toolbar h2 { margin: 0; font: 500 16px Georgia, serif; }.map-toolbar div { display: flex; gap: 5px; }.map-toolbar button { min-width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 6px; color: #fff; background: rgba(255,255,255,.04); cursor: pointer; }.map-toolbar #zoomReset { min-width: 60px; font-size: 10px; }
.map-viewport { height: calc(100% - 94px); overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; }.map-viewport img { display: block; width: 100%; max-width: none; min-height: 100%; object-fit: contain; transform-origin: top left; }
.map-dialog > p { height: 36px; margin: 0; display: grid; place-items: center; color: var(--dim); font-size: 10px; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 30px); padding: 11px 16px; border: 1px solid rgba(216,198,255,.3); border-radius: 8px; color: #fff; background: rgba(15,10,26,.94); box-shadow: 0 12px 36px rgba(0,0,0,.45); font-size: 12px; text-align: center; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: .25s ease; }.toast.show { opacity: 1; transform: translate(-50%,0); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }.reveal.visible { opacity: 1; transform: none; }

@keyframes boot-in { to { opacity: 1; transform: none; } }
@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes card-merge { 0% { opacity: .8; transform: translateX(var(--from)) rotate(calc(var(--from) / 18)); } 70% { opacity: 1; transform: translateX(0) rotate(0); } 100% { opacity: 0; transform: translateX(0) scale(.65); } }
@keyframes flare { 0% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(2.4); text-shadow: 0 0 70px #fff; } 100% { opacity: 0; transform: scale(4); } }
@keyframes merge-copy { to { opacity: 1; transform: translateY(-4px); } }
@keyframes twinkle { 0%, 100% { opacity: calc(var(--alpha) * .26); transform: scale(.68); } 38% { opacity: calc(var(--alpha) * .52); transform: scale(.92); } 57% { opacity: var(--alpha); transform: scale(1.28); } 72% { opacity: calc(var(--alpha) * .42); transform: scale(.82); } }

@media (max-width: 600px) {
  .world-section { padding-top: 86px; padding-bottom: 78px; }
  .map-card { aspect-ratio: 1; }
  .map-card img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
  .regions { grid-template-columns: repeat(2,1fr); }.regions button { min-height: 58px; border-bottom: 1px solid var(--line); }.regions button:nth-child(2n) { border-right: 0; }.regions button:last-child { grid-column: 1/-1; border-bottom: 0; }
  .region-detail { grid-template-columns: 1fr; gap: 8px; padding: 16px 44px 17px 16px; }.region-detail h3 { font-size: 19px; }.region-detail p { font-size: 11px; }
  .map-label { display: block; }.map-label small { display: block; margin-top: 4px; }
  .encounter-section { min-height: 100svh; padding: 70px 0 48px; }
  .encounter-section .section-copy { margin-bottom: 10px; padding-inline: 22px; }
  .encounter-section .section-index { margin-bottom: 10px; }
  .encounter-section .section-copy h2 { margin-bottom: 10px; font-size: clamp(25px,6.9vw,30px); line-height: 1.18; }
  .encounter-section .section-copy p:last-child { max-width: 350px; font-size: 11.5px; line-height: 1.55; }
  .swipe-hint { margin-bottom: 9px; }
  .character-card { height: min(52svh,480px); min-height: 0; }
  .character-copy { inset: auto 19px 20px; }.character-copy h3 { margin-top: 6px; font-size: 27px; }.character-copy p { margin-top: 8px; font-size: 11px; line-height: 1.55; }
  .character-track { padding-bottom: 10px; }
  .unknown-status .stats { grid-template-columns: repeat(2,1fr); }
  .result-section { padding-top: 72px; padding-bottom: 14px; }
  .portal-section { padding-top: 34px; }
  .portal { margin-bottom: 32px; }
}

@media (max-width: 370px) {
  .maker-header { padding-inline: 14px; }.record-card { width: 76vw; }.card-scroll { padding-inline: 16px; }.deck-navigation { padding-inline: 12px; }.ghost-action { font-size: 11px; }.trait-choice { min-width: calc(50% - 4px); }
}

@media (min-width: 800px) {
  .maker-header { padding-inline: 36px; }.record-card { width: 420px; }.card-scroll { padding-inline: 26px; }.profile-body { padding: 38px 42px; }.profile-block p { font-size: 16px; }
}

@media (orientation: landscape) and (max-height: 620px) {
  .intro { padding-block: 18px; }.intro-orbit { width: 70vh; }.boot-sequence { min-height: 110px; }.line-one,.line-two { display: inline-block; margin: 0 7px 12px; }.line-three { font-size: clamp(28px,7vh,42px); }.intro-note { margin-block: 10px 14px; line-height: 1.5; }.motion-note { display: none; }
  .maker-header { padding-bottom: 7px; }.maker-header .system-kicker { display: none; }.maker-header h2 { font-size: 15px; }.record-card { width: min(54vw, 420px); height: calc(100% - 8px); }.deck-navigation { padding-top: 7px; }.deck-navigation button { min-height: 40px; }.step-dots { padding-top: 6px; }.card-scroll { padding-top: 20px; }.card-heading { padding-bottom: 15px; }.card-heading h3 { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
  .nebula, .stars, .twinkle-field, .dust { transform: none !important; }
  .twinkle-star { opacity: calc(var(--alpha) * .7); }
  .reveal { opacity: 1; transform: none; }
}

/* Single-panel past-life flow */
.maker-legacy { display: none !important; }
.maker {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding-inline: clamp(12px, 4vw, 34px);
  overflow: auto;
}
.maker-header {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 10px 4px 8px;
  align-items: center;
}
.maker-header h2 { color: #ead7a0; font-size: clamp(17px, 4.5vw, 21px); }
.memory-progress { display: flex; align-items: center; gap: 5px; padding-left: 12px; }
.memory-progress i {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(214, 222, 236, .18);
  transition: background .28s ease, box-shadow .28s ease;
}
.memory-progress i.active { background: #d9bd78; box-shadow: 0 0 8px rgba(217, 189, 120, .55); }
.glass-panel {
  align-self: center;
  width: min(100%, 720px);
  min-height: min(660px, calc(100svh - 105px - var(--safe-top) - var(--safe-bottom)));
  max-height: calc(100svh - 92px - var(--safe-top) - var(--safe-bottom));
  margin: 0 auto;
  padding: clamp(19px, 5vw, 34px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  border: 1px solid rgba(226, 205, 150, .24);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(10, 15, 29, .36), rgba(4, 7, 18, .25));
  -webkit-backdrop-filter: blur(12px) saturate(1.12);
  backdrop-filter: blur(12px) saturate(1.12);
  box-shadow: 0 24px 75px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .055);
  overflow: hidden;
}
.question-view {
  min-height: 0;
  overflow-y: auto;
  padding: 2px 3px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 189, 120, .38) transparent;
  transition: opacity .17s ease, filter .17s ease, transform .17s ease;
}
.question-view.is-leaving { opacity: 0; filter: blur(7px); transform: translateY(-5px); }
.question-view.is-entering { opacity: 0; filter: blur(6px); transform: translateY(6px); }
.flow-heading { margin-bottom: clamp(22px, 5vh, 38px); text-align: center; }
.flow-heading > span { color: rgba(224, 229, 240, .62); font: 600 9px/1.2 ui-monospace, monospace; letter-spacing: .18em; }
.flow-heading h3 { margin: 9px 0 8px; color: #ead7a0; font: 500 clamp(25px, 7vw, 38px)/1.16 Georgia, serif; text-wrap: balance; }
.flow-heading p { margin: 0; color: rgba(221, 228, 240, .72); font-size: 12px; line-height: 1.55; }
.glass-panel .field { max-width: 540px; margin: 0 auto 18px; }
.glass-panel .field > span { color: rgba(231, 235, 244, .84); }
.glass-panel input, .glass-panel textarea {
  border-color: rgba(221, 226, 237, .18);
  background: rgba(2, 5, 14, .33);
  color: #f2f4f8;
}
.glass-panel input::placeholder, .glass-panel textarea::placeholder { color: rgba(206, 214, 229, .38); }
.glass-panel .choices { justify-content: center; }
.glass-panel .choice {
  color: rgba(226, 231, 241, .82);
  border-color: rgba(217, 224, 236, .16);
  background: rgba(233, 238, 248, .035);
}
.glass-panel .choice:hover { color: #fff; border-color: rgba(226, 205, 150, .52); }
.glass-panel .choice.selected {
  color: #fff8df;
  border-color: #d9bd78;
  background: rgba(127, 99, 42, .22);
  box-shadow: 0 0 18px rgba(217, 189, 120, .2), inset 0 0 0 1px rgba(255, 246, 211, .06);
}
.job-choices { max-width: 570px; margin: 0 auto 22px; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.category-button {
  min-height: 53px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  align-content: center;
  text-align: left;
  border: 1px solid rgba(218, 225, 237, .15);
  border-radius: 9px;
  color: rgba(232, 236, 244, .84);
  background: rgba(237, 241, 249, .03);
  cursor: pointer;
}
.category-button span { font-size: 12px; }
.category-button small { overflow: hidden; color: #d9bd78; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.category-button.has-value { border-color: rgba(217, 189, 120, .48); background: rgba(135, 105, 47, .12); }
.detail-return { display: block; min-height: 42px; margin: 22px auto 0; padding: 9px 16px; border: 1px solid rgba(217, 189, 120, .42); border-radius: 999px; color: #ead7a0; background: rgba(10, 12, 24, .34); cursor: pointer; }
.detail-return.subtle { border-color: rgba(219, 225, 236, .18); color: rgba(220, 226, 238, .68); }
.glass-panel .swatches { grid-template-columns: repeat(5, minmax(42px, 1fr)); max-width: 420px; margin: 0 auto; }
.glass-panel .swatch { overflow: visible; border-radius: 50%; }
.glass-panel .swatch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.glass-panel .swatch.selected { outline: 2px solid #d9bd78; box-shadow: 0 0 20px rgba(217, 189, 120, .62), inset 0 0 0 2px rgba(0, 0, 0, .28); }
.trait-selection { margin-bottom: 13px; padding: 11px; border: 1px solid rgba(219, 225, 236, .1); border-radius: 10px; background: rgba(0, 3, 12, .2); }
.trait-meter { margin: 0 0 8px; }
.trait-meter span { color: rgba(225, 230, 240, .66); }
.trait-meter b { color: #ead7a0; }
.selected-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.selected-chip { padding: 6px 9px; border: 1px solid rgba(217, 189, 120, .38); border-radius: 999px; color: #eee4c6; background: rgba(119, 90, 35, .14); cursor: pointer; font-size: 10px; }
.selected-chip span { color: rgba(255, 255, 255, .62); }
.empty-chips { margin: 0; color: rgba(210, 217, 231, .4); font-size: 10px; }
.trait-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 13px; }
.trait-tab { min-height: 37px; padding: 6px 3px; border: 0; border-bottom: 1px solid rgba(222, 227, 238, .16); color: rgba(219, 225, 236, .55); background: transparent; cursor: pointer; font-size: 11px; }
.trait-tab.active { color: #ead7a0; border-color: #d9bd78; text-shadow: 0 0 10px rgba(217, 189, 120, .36); }
.trait-tab-panel .choices { justify-content: flex-start; }
.tab-note { margin: 0 0 11px; color: rgba(220, 226, 237, .58); font-size: 10px; }
.inline-custom { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 14px; }
.inline-custom button { padding: 0 15px; border: 1px solid rgba(217, 189, 120, .42); border-radius: 7px; color: #ead7a0; background: rgba(106, 80, 31, .14); cursor: pointer; }
.form-error { margin: 5px 0 0; color: #ffd4cf; text-align: center; font-size: 11px; }
.flow-navigation { display: flex; justify-content: flex-end; gap: 8px; padding-top: 15px; border-top: 1px solid rgba(222, 228, 239, .09); }
.flow-navigation button { min-height: 43px; }
.flow-navigation .primary-action { min-width: 132px; }
.flow-navigation .ghost-action:disabled { visibility: hidden; }

@media (max-width: 600px) {
  .maker { padding-inline: 12px; }
  .maker-header { padding-inline: 4px; }
  .maker-header .system-kicker { font-size: 7px; }
  .memory-progress i { width: 12px; }
  .glass-panel { min-height: calc(100svh - 98px - var(--safe-top) - var(--safe-bottom)); max-height: calc(100svh - 92px - var(--safe-top) - var(--safe-bottom)); padding: 19px 16px 15px; border-radius: 14px; }
  .flow-heading { margin-bottom: 24px; }
  .flow-heading h3 { font-size: clamp(24px, 7.5vw, 31px); }
  .category-grid { gap: 7px; }
  .category-button { min-height: 49px; padding: 8px 10px; }
  .glass-panel .choice { min-height: 36px; padding: 7px 9px; font-size: 11px; }
  .trait-tabs { position: sticky; top: 0; z-index: 2; padding-top: 2px; background: rgba(5, 9, 20, .86); }
}

@media (orientation: landscape) and (max-height: 620px) {
  .maker { overflow: auto; }
  .glass-panel { align-self: start; min-height: 480px; max-height: none; }
}

/* Second restoration: a content-sized pane surrounded by visible cosmos. */
.maker { height: auto; min-height: 100svh; grid-template-rows: auto 1fr; gap: 28px; padding-block: max(18px, var(--safe-top)) max(40px, var(--safe-bottom)); overflow: visible; }
.glass-panel { position: relative; min-height: 0; height: auto; max-height: none; grid-template-rows: auto auto auto; }
.question-view { overflow: visible; transition: opacity .24s ease, filter .24s ease; overflow-wrap: anywhere; }
.question-view.is-leaving, .question-view.is-entering { transform: none; }
.question-view.is-entering { animation: memory-focus .26s ease both; }
@keyframes memory-focus { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
.flow-heading { margin-bottom: 24px; }
.appearance-custom-field { margin-top: 16px !important; }
.profile-block p { white-space: pre-line; overflow-wrap: anywhere; }
.memory-particles { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; border-radius: inherit; }
.memory-particles b { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #e6ce98; box-shadow: 0 0 5px #e6ce9880; opacity: 0; }
.memory-particles b:nth-child(even) { background: #dce2ee; box-shadow: 0 0 5px #dce2ee80; }
.portal-section { padding: 66px 20px max(32px, env(safe-area-inset-bottom)); min-height: 100svh; }
.portal-section > .section-index { margin: 0 0 14px; font-size: 10px; }
.portal { width: min(76vw, 300px); height: 320px; margin: 0 auto 18px; border-radius: 48% 48% 12px 12px; display: flex; flex-direction: column; align-items: center; padding: 32px 20px 22px; background: radial-gradient(ellipse at 50% 100%, #65538d26, transparent 80%); }
.portal i, .portal i:nth-child(2) { inset: -8px; border-radius: inherit; animation: none; pointer-events: none; }
.portal i:nth-child(2) { inset: -16px; }
.portal .portal-star { position: static; display: block; font-size: 34px; line-height: 1.5; margin: 0 0 15px; color: #e5d5af; }
.portal h2 { position: relative; margin: 0; font-size: 24px; line-height: 1.4; letter-spacing: -.04em; }
.portal p { margin: 20px 0 0; color: #c2c5d5; font-size: 12px; line-height: 1.8; }
.portal.is-formed { animation: arch-form 1.6s ease both, arch-breathe 5s ease-in-out 1.6s infinite; }
.portal.is-formed i { animation: arch-form 1.4s .25s ease both; }
.portal.is-formed i:nth-child(2) { animation-delay: .45s; }
.portal.is-formed .portal-star { animation: star-form 1.1s ease both, star-breathe 4s 1.1s ease-in-out infinite; }
@keyframes arch-form { from { border-color: transparent; box-shadow: none; } to { border-color: rgba(216,198,255,.28); } }
@keyframes arch-breathe { 0%,100% { box-shadow: inset 0 0 50px #8353d11c, 0 0 35px #6436ab12; } 50% { box-shadow: inset 0 0 65px #8353d129, 0 0 45px #6436ab21; } }
@keyframes star-form { from { opacity: .15; } to { opacity: 1; } }
@keyframes star-breathe { 0%,100% { opacity: .8; } 50% { opacity: 1; } }
.portal-section .unknown-status { margin: 0 auto 16px; }
.portal-section .unknown-status > div { padding: 10px 14px; }
.portal-section .unknown-status .stats { gap: 9px 24px; }
.portal-guide { margin-top: 12px !important; }
@media (max-width: 600px) {
  .maker { gap: 32px; padding-top: max(18px, var(--safe-top)); }
  .glass-panel { min-height: 0; max-height: none; }
  .world-section { padding: 42px 20px 24px; }
  .world-section .section-copy { margin-bottom: 16px; }
  .world-section .section-index { margin-bottom: 10px; }
  .world-section .small-title { font-size: 12px; margin-bottom: 6px; }
  .world-section h2 { font-size: 36px; margin-bottom: 12px; }
  .world-section .section-copy > p:last-child { font-size: 12px; line-height: 1.7; }
  .world-section .map-card { aspect-ratio: auto; height: min(34svh, 285px); }
  .world-section .map-label { inset: auto 12px 10px; }
  .world-section .map-label b { font-size: 13px; }
  .world-section .map-label small { font-size: 9px; }
  .world-section .regions { margin-top: 10px; }
  .world-section .regions button { min-height: 47px; padding: 7px; }
  .portal-section { padding-top: 64px; }
  .portal { width: 254px; height: 306px; padding-inline: 16px; }
  .portal h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .memory-particles { display: none; } }
/* Third entrance: cosmos → opaque veil → soul → typography. */
html.intro-booting { overflow-y: hidden; }
.intro { --veil:1; --v4-opacity:1; --crossfade:0; --soul-opacity:1; --soul-blur:0px; --invitation:0; --invitation-blur:8px; --gate:0; --cue:0; display:block; height:155svh; min-height:155svh; padding:0; overflow:visible; }
.intro-stage { position:sticky; top:0; height:100svh; min-height:480px; overflow:hidden; isolation:isolate; text-align:center; }
.void-veil { position:absolute; inset:0; z-index:0; background:#000; opacity:var(--veil); }
.intro .story-logo { position:absolute; z-index:3; top:max(10svh, calc(env(safe-area-inset-top) + 32px)); left:20px; right:20px; margin:0; animation:void-focus 1.3s .15s both; }
.intro .story-logo::before, .intro .story-logo::after { display:none; }
.intro .story-logo span { display:block; color:#bfae89; font-size:11px; letter-spacing:.18em; }
.intro .story-logo strong { margin:12px 0 18px; color:#e5d0a2; font:400 clamp(30px,8.2vw,42px)/1.3 'Noto Serif KR','Batang',Georgia,serif; letter-spacing:.09em; }
.intro .story-logo i { display:flex; align-items:center; justify-content:center; gap:12px; color:#bba576; font-size:10px; font-style:normal; }
.intro .story-logo i::before,.intro .story-logo i::after { content:''; width:66px; height:1px; background:linear-gradient(90deg,transparent,#a08a59); }
.intro .story-logo i::after { transform:rotate(180deg); }
.intro .boot-sequence {
  position:absolute;
  z-index:3;
  top:50%;
  left:18px;
  right:18px;
  height:96px;
  transform:translateY(-50%);
  opacity:var(--soul-opacity);
  filter:blur(var(--soul-blur));
}
.intro .boot-line {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  margin:0;
  opacity:0;
  transform:none;
  font-size:13px;
  letter-spacing:.09em;
  pointer-events:none;
}
.intro .line-one { color:#adb8cd; animation:intro-message-out 1.9s .15s ease-in-out both; }
.intro .line-two { color:#adb8cd; animation:intro-message-out 1.9s 2.15s ease-in-out both; }
.intro .line-three { color:#e4d0a5; font:400 clamp(21px,5.9vw,29px)/1.45 'Noto Serif KR','Batang',Georgia,serif; letter-spacing:.025em; text-shadow:0 0 24px #d9b97820; animation:intro-message-final 1.15s 4.15s ease-out both; }
.soul-energy { position:absolute; z-index:2; top:64%; left:50%; width:260px; height:160px; transform:translateX(-50%); opacity:var(--soul-opacity); filter:blur(var(--soul-blur)); pointer-events:none; }
.soul-ray { position:absolute; left:50%; bottom:35px; width:1px; height:110px; background:linear-gradient(transparent,#bedfff 35%,#e6dfff); box-shadow:0 0 9px 2px #538eff65; transform-origin:bottom; animation:soul-grow 3.3s 1.15s both; }
.soul-ray::before { content:''; position:absolute; top:5px; left:-2px; width:5px; height:5px; border-radius:50%; background:#e0f2ff; box-shadow:0 0 14px 4px #7cb4ff90; }
.soul-ray::after { content:''; position:absolute; bottom:-9px; left:-22px; width:45px; height:18px; background:radial-gradient(ellipse,#e2deffb0, #778dff40 35%,transparent 70%); }
.soul-ripple { position:absolute; bottom:13px; left:30px; width:200px; height:44px; border:1px solid #83b6ff70; border-radius:50%; box-shadow:0 0 14px #599cff30,inset 0 0 12px #7b9fff20; animation:ripple-grow 3.3s 1.15s both; }
.soul-ripple.second { bottom:3px; left:6px; width:248px; height:64px; border-color:#7198f928; animation-delay:1.45s; }
.soul-energy span { position:absolute; color:#b3cbff; left:35%; top:42%; opacity:0; animation:void-focus 1.3s 2.8s both; }
.soul-energy span:nth-of-type(2) { left:64%;top:60%;animation-delay:3.3s; }
.soul-energy span:nth-of-type(3) { left:58%;top:18%;animation-delay:3.6s; }
.intro-invitation { position:absolute; z-index:4; top:43%; left:20px; right:20px; }
.intro .intro-note { margin:0 0 38px; color:#e4e0f0; font-size:16px; line-height:2; animation:none; opacity:var(--invitation); filter:blur(var(--invitation-blur)); text-shadow:0 2px 15px #060717; }
.intro .intro-note span { font-size:12px; }
.intro-gate { opacity:var(--gate); }
.intro .intro-action { opacity:1; animation:none; background:linear-gradient(135deg,#c5afd51c,#31426666); border-color:#d7cbaa80; font-size:14px; font-weight:400; box-shadow:0 0 28px #bbc4fc12,inset 0 0 18px #ffffff09; }
.intro .motion-note { opacity:1; animation:none; color:#beb8cf; font-size:9px; line-height:1.8; margin:18px auto 0; max-width:290px; }
.scroll-cue { position:absolute; z-index:4; bottom:max(6svh,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); padding:12px 20px; border:0; background:none; color:#a4aabb; letter-spacing:.3em; font-size:9px; opacity:var(--cue); cursor:pointer; }
.scroll-cue:disabled { pointer-events:none; }
.scroll-cue i { display:block; width:1px; height:30px; margin:13px auto 0; background:linear-gradient(#a4aabb,transparent); }
.arrival-particles { position:absolute; z-index:5; left:50%; top:58%; pointer-events:none; }
.arrival-particles i { position:absolute; width:3px; height:3px; border-radius:50%; background:#dfcfaa; opacity:0; box-shadow:0 0 9px currentColor; }
.arrival-particles i:nth-child(3n) { background:#a9cfff; }.arrival-particles i:nth-child(3n + 1) { background:#e4e5ed; }
.intro.is-opening .intro-invitation,.intro.is-opening .story-logo { animation:void-dissolve .65s both; }
.intro.is-opening .arrival-particles i { animation:soul-gather .85s ease-in both; }
.maker.is-materializing .glass-panel { animation:glass-arrival .85s ease-out both; }
@keyframes void-focus { from { opacity:0; filter:blur(7px); } to { opacity:1; filter:blur(0); } }
@keyframes intro-message-out {
  0% { opacity:0; filter:blur(5px); transform:translateY(5px); }
  18%,70% { opacity:.92; filter:blur(0); transform:translateY(0); }
  100% { opacity:0; filter:blur(4px); transform:translateY(-4px); }
}
@keyframes intro-message-final {
  from { opacity:0; filter:blur(5px); transform:translateY(5px); }
  to { opacity:1; filter:blur(0); transform:translateY(0); }
}
@keyframes void-first { 0% {opacity:0;filter:blur(5px)} 24%,35% {opacity:.85;filter:blur(0)} 70% {opacity:.4} 100% {opacity:.28} }
@keyframes void-second { 0% {opacity:0;filter:blur(5px)} 35%,45% {opacity:.85;filter:blur(0)} 100% {opacity:.35} }
@keyframes soul-grow { 0% {opacity:0;transform:scaleY(.25)} 25% {opacity:.45;transform:scaleY(.4)} 60% {opacity:.7;transform:scaleY(.7)} 100% {opacity:1;transform:scaleY(1)} }
@keyframes ripple-grow { 0% {opacity:0;transform:scale(.25)} 25% {opacity:.4;transform:scale(.45)} 60% {opacity:.65;transform:scale(.7)} 100% {opacity:1;transform:scale(1)} }
@keyframes void-dissolve { to {opacity:0;filter:blur(12px)} }
@keyframes soul-gather { 0% {opacity:0;transform:rotate(var(--angle)) translateX(var(--distance))} 25% {opacity:.8} 100% {opacity:0;transform:rotate(var(--angle)) translateX(0)} }
@keyframes glass-arrival { from {opacity:0;filter:blur(8px);box-shadow:0 0 28px #cce0ff60} to {opacity:1;filter:blur(0)} }
@media (prefers-reduced-motion:reduce) {
  .intro .story-logo,.intro .boot-line { animation:none; opacity:1; filter:none; }
  .soul-energy,.arrival-particles { display:none; }
  .intro .boot-sequence,.intro .intro-note { filter:none; }
  .intro.is-opening .intro-invitation,.intro.is-opening .story-logo,.maker.is-materializing .glass-panel { animation:none; }
}

/* Playtest surgery: deliberate entrance, stable glass transitions, compact world and open portal. */
.intro .boot-sequence { opacity:0; visibility:hidden; }
.intro.sequence-started .boot-sequence { visibility:visible; opacity:var(--soul-opacity); }
.intro .soul-energy { display:none !important; }
.intro-start { position:absolute; z-index:5; top:51%; left:50%; width:min(78vw,280px); min-height:64px; transform:translate(-50%,-50%); border:0; color:#d8d5df; background:transparent; cursor:pointer; opacity:0; animation:intro-prompt 1s 1.45s ease forwards; letter-spacing:.16em; }
.intro-start span { display:block; font-size:12px; }
.intro-start small { display:block; margin-top:10px; color:#777a89; font-size:9px; letter-spacing:.08em; }
.intro-start:focus-visible { outline:1px solid #d8c6ff; outline-offset:8px; }
.intro.sequence-started .intro-start { pointer-events:none; animation:prompt-away .55s ease both; }
.intro:not(.sequence-started) .scroll-cue { opacity:0; }
.soul-energy { top:60%; width:320px; height:190px; }
.soul-drop { position:absolute; left:50%; top:30px; width:6px; height:9px; border-radius:50% 50% 55% 55%; background:radial-gradient(circle at 45% 30%,#fff 0 14%,#cfe9ff 32%,#987cf1 70%,transparent 74%); filter:drop-shadow(0 0 8px #75b9ff); opacity:0; }
.sequence-started .soul-drop { animation:water-drop .9s .35s cubic-bezier(.38,.02,.66,1) both; }
.soul-contact { position:absolute; left:50%; top:116px; width:54px; height:16px; transform:translateX(-50%); border-radius:50%; background:radial-gradient(ellipse,rgba(232,247,255,.78),rgba(120,171,255,.22) 38%,transparent 72%); opacity:0; }
.sequence-started .soul-contact { animation:water-contact 4s 1.08s ease-out both; }
.soul-ripple { top:105px; bottom:auto; left:50%; width:80px; height:20px; border:1px solid rgba(183,220,255,.72); border-radius:50%; box-shadow:0 0 10px rgba(105,149,255,.18); transform:translateX(-50%) scale(.25); opacity:0; animation:none; }
.soul-ripple.second,.soul-ripple.third { top:101px; bottom:auto; left:50%; width:80px; height:28px; border-color:rgba(167,198,255,.5); animation:none; }
.soul-ripple.third { top:97px; height:36px; border-color:rgba(202,188,255,.36); }
.sequence-started .soul-ripple { animation:water-ripple 3.5s 1.05s cubic-bezier(.16,.72,.25,1) both; }
.sequence-started .soul-ripple.second { animation-delay:1.38s; }
.sequence-started .soul-ripple.third { animation-delay:1.76s; }
.soul-ray { display:none; }
.intro .line-one,.intro .line-two,.intro .line-three { animation-play-state:paused; }
.intro.sequence-started .line-one,.intro.sequence-started .line-two,.intro.sequence-started .line-three { animation-play-state:running; }
.question-view { transition:opacity .52s ease,filter .52s ease; }
.question-view.is-leaving { opacity:0; filter:blur(9px); }
.question-view.is-entering { animation:memory-focus .58s cubic-bezier(.22,.7,.25,1) both; }
.memory-particles b { width:2px; height:2px; }
.flow-navigation [hidden] { display:none !important; }
.portal-section { isolation:isolate; }
.portal-section::before { display:none; }
.portal { width:min(72vw,280px); height:306px; padding:38px 18px 18px; border:0; border-radius:0; background:none; box-shadow:none; }
.portal::before { content:""; position:absolute; inset:0; border:0; background:radial-gradient(ellipse at 50% 30%,rgba(227,217,255,.12),transparent 46%); pointer-events:none; }
.portal i,.portal i:nth-child(2) { position:absolute; inset:0 8px 0; border:1px solid rgba(239,220,174,.7); border-bottom:0; border-radius:50% 50% 0 0; box-shadow:0 0 13px rgba(173,131,255,.2),inset 0 0 10px rgba(218,202,255,.06); background:none; }
.portal i:nth-child(2) { inset:8px 15px 0; border-color:rgba(218,205,255,.4); }
.portal .portal-star { position:relative; z-index:2; filter:drop-shadow(0 0 12px rgba(213,198,255,.55)); }
.portal h2,.portal p { position:relative; z-index:2; }
.portal.is-formed { animation:arch-breathe 7s ease-in-out infinite; }
.portal.is-formed i { animation:arch-line 2s ease both,arch-flow 9s 2s linear infinite; }
.portal.is-formed i:nth-child(2) { animation-delay:.3s,2.3s; }
@keyframes intro-prompt { from {opacity:0;filter:blur(7px)} to {opacity:1;filter:none} }
@keyframes prompt-away { to {opacity:0;filter:blur(9px);transform:translate(-50%,-54%)} }
@keyframes water-drop { 0% {opacity:0;transform:translate(-50%,-22px) scale(.75)} 20% {opacity:1} 88% {opacity:1;transform:translate(-50%,74px) scale(1)} 100% {opacity:0;transform:translate(-50%,78px) scale(.5)} }
@keyframes water-contact { 0% {opacity:0;transform:translateX(-50%) scale(.25)} 12% {opacity:.8} 42% {opacity:.28;transform:translateX(-50%) scale(1.3)} 100% {opacity:.12;transform:translateX(-50%) scale(1.8)} }
@keyframes water-ripple { 0% {opacity:0;transform:translateX(-50%) scale(.25)} 10% {opacity:.72} 72% {opacity:.2} 100% {opacity:0;transform:translateX(-50%) scale(4.1)} }
@keyframes arch-line { from {opacity:0;filter:blur(5px)} to {opacity:1;filter:none} }
@keyframes arch-flow { 0%,100% {border-color:rgba(227,211,170,.34);box-shadow:0 0 9px rgba(173,131,255,.08)} 50% {border-color:rgba(211,199,255,.58);box-shadow:0 0 16px rgba(173,131,255,.18)} }

@media (max-width:600px) {
  .world-section { min-height:100svh; height:100svh; padding:22px 16px 16px; overflow:hidden; display:flex; flex-direction:column; }
  .world-section .section-copy { flex:0 0 auto; margin-bottom:10px; }
  .world-section .section-index { margin-bottom:5px; font-size:9px; }
  .world-section .small-title { margin-bottom:2px; font-size:11px; }
  .world-section h2 { margin-bottom:6px; font-size:31px; }
  .world-section .section-copy > p:last-child { max-width:355px; font-size:11px; line-height:1.5; }
  .world-section .map-card { flex:1 1 auto; min-height:210px; max-height:320px; height:auto; }
  .world-section .map-card img { width:100%; height:100%; object-fit:cover; object-position:center; background:#080a14; }
  .world-section .regions { flex:0 0 auto; grid-template-columns:repeat(2,1fr); margin-top:7px; }
  .world-section .regions button { min-height:41px; padding:5px 7px; }
  .world-section .regions button b { font-size:11px; }
  .world-section .regions button small { font-size:8px; }
  .world-section .map-label { inset:auto 10px 8px; }
  .portal-section { min-height:100svh; padding:24px 18px max(18px,env(safe-area-inset-bottom)); }
  .portal-section > .section-index { margin-bottom:5px; }
  .portal { width:238px; height:270px; margin-bottom:8px; padding-top:27px; }
  .portal .portal-star { margin-bottom:8px; font-size:29px; }
  .portal h2 { font-size:21px; }
  .portal p { margin-top:12px; font-size:11px; line-height:1.65; }
  .portal-section .unknown-status { margin-bottom:9px; }
  .portal-section .unknown-status > div { padding:7px 12px; }
  .portal-guide { margin-top:7px !important; font-size:10px !important; }
  .portal-note { margin-top:4px !important; font-size:9px !important; }
}

@media (prefers-reduced-motion:reduce) {
  .intro-start { opacity:1; }
  .intro.sequence-started .boot-sequence { opacity:1; }
  .intro.sequence-started .boot-line { opacity:0; }
  .intro.sequence-started .line-three { opacity:1; }
  .question-view.is-leaving { opacity:0; filter:none; }
}


.cosmos-background { transform:translate3d(var(--px),var(--py),0) scale(1.02); }
@media (prefers-reduced-motion:reduce) { .cosmos-background { transform:none; } }

.intro { place-items:normal; }
.intro-stage { width:100%; }
body:has(#intro:not([hidden])) { overflow-x:clip; }

/* ========================================
   1차 수술 : INTRO 첫 화면 배치
   ======================================== */

.intro-stage {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 100svh;
}

/* 제목 */
.intro-stage .story-logo {
  position: absolute;
  z-index: 20;

  top: 29%;
  left: 50%;
  width: 100%;

  margin: 0;
  transform: translate(-50%, -50%);
}

/* 작은 부제 */
.intro-stage .story-logo span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  margin-bottom: 8px;

  font-size: 11px;
  letter-spacing: 0.15em;
}

.intro-stage .story-logo span::after {
  content: "";
  width: 14px;
  height: 1px;
  background: rgba(218, 183, 105, 0.75);
}

/* 이세계 라이프 */
.intro-stage .story-logo strong {
  margin: 0;

  font-size: 27px;
  line-height: 1.15;
  letter-spacing: 0.08em;
  font-weight: 400;
}

/* 제목 아래 장식 ✦ */
.intro-stage .story-logo i {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 190px;
  margin: 13px auto 0;

  font-size: 8px;
  font-style: normal;
  color: #e6cb88;
}

.intro-stage .story-logo i::before,
.intro-stage .story-logo i::after {
  content: "";
  display: block;
  width: 72px;
  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(218, 183, 105, 0.7)
  );
}

.intro-stage .story-logo i::after {
  transform: scaleX(-1);
}

.intro-stage .story-logo i {
  text-shadow:
    0 0 5px rgba(255, 221, 145, 0.8),
    0 0 12px rgba(255, 211, 120, 0.35);
}

/* 화면을 눌러 시작 */
.intro-stage .intro-start {
  position: absolute;
  z-index: 20;

  top: 53%;
  left: 50%;

  width: max-content;
  transform: translate(-50%, -50%);

  text-align: center;
}

/* Intro water-film transplant. Keep the accepted first-screen geometry above intact. */
.water-intro {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .34s ease;
  isolation: isolate;
}
.water-intro.is-playing { opacity: 1; }
.water-intro-video {
  position: absolute;
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  object-fit: cover;
  background: #000;
  opacity: .72;
  filter: brightness(.55) contrast(1.45) saturate(.72);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 78% 58% at 50% 61%, #000 0 42%, rgba(0,0,0,.86) 59%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 58% at 50% 61%, #000 0 42%, rgba(0,0,0,.86) 59%, transparent 100%);
}
.water-ray {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 20%;
  width: 1px;
  height: 35%;
  opacity: 0;
  background: linear-gradient(transparent, rgba(200,232,255,.18) 42%, rgba(224,242,255,.46) 88%, transparent);
  box-shadow: 0 0 7px rgba(127,189,255,.18);
  transform: translateX(-50%);
}
.water-flash {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 60.5%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0;
  background: #edf8ff;
  box-shadow: 0 0 7px 2px rgba(173,220,255,.45);
  transform: translate(-50%,-50%);
}
.water-intro.is-playing .water-ray { animation: water-ray-on 1.2s .08s ease-out both; }
.water-intro.is-playing .water-flash { animation: water-flash-on .32s .92s ease-out both; }
.intro.sequence-started .boot-line { animation: none; opacity: 0; }
.intro.sequence-started .boot-line.is-current { animation: water-message 3.35s ease-in-out both; }
.intro.sequence-complete .scroll-cue { opacity: 1; pointer-events: auto; }
@keyframes water-message {
  0%,8% { opacity:0; filter:blur(5px); transform:translateY(5px); }
  20%,72% { opacity:.94; filter:blur(0); transform:translateY(0); }
  92%,100% { opacity:0; filter:blur(4px); transform:translateY(-4px); }
}
@keyframes water-ray-on { 0%,10%{opacity:0} 35%,76%{opacity:.34} 100%{opacity:0} }
@keyframes water-flash-on { 0%,100%{opacity:0;transform:translate(-50%,-50%) scale(.4)} 36%{opacity:.72;transform:translate(-50%,-50%) scale(1)} }
@media (prefers-reduced-motion: reduce) {
  .water-intro { display:none; }
  .intro.sequence-started .boot-line.is-current { animation:none; opacity:1; filter:none; }
}

/* =========================================
   SOUL RIPPLE WEBGL INTRO
   ========================================= */

.water-intro {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.soul-ripple-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#intro.booting .soul-ripple-canvas {
  opacity: 1;
  visibility: visible;
}
/* =========================================
   SOUL RIPPLE V4 · FINAL INTRO OVERRIDE
   ========================================= */

/* V4 canvas */
#intro .water-intro {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
}

#intro .soul-ripple-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;

  opacity: 1;
  visibility: visible;
  pointer-events: none;

  transition: opacity .65s ease;
}

#intro.booting .soul-ripple-canvas {
  opacity: 1;
  visibility: visible;
}


#intro.booting .intro-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
  transition:
    opacity .45s ease,
    visibility 0s linear .45s;
}


/* =========================================
   V4 BOOT MESSAGES
   ========================================= */

#intro .boot-sequence {
  position: absolute;
  z-index: 4;

  top: 47%;
  left: 50%;

  width: calc(100% - 40px);
  height: 150px;

  transform: translate(-50%, -50%);

  opacity: 1;
  visibility: visible;

  pointer-events: none;
}

#intro .boot-line {
  position: absolute;
  top: 50%;
  left: 0;

  width: 100%;
  margin: 0;

  color: rgba(239, 241, 255, .96);
  text-align: center;

  font-size: 13px;
  font-weight: 400;
  letter-spacing: .16em;
  line-height: 1.7;

  opacity: 0;
  filter: blur(7px);

  transform: translateY(-50%);

  animation: none !important;

  transition:
    opacity .55s ease,
    transform .55s cubic-bezier(.22, .7, .25, 1),
    filter .55s ease;

  text-shadow:
    0 0 12px rgba(178, 202, 255, .18),
    0 2px 16px rgba(0, 0, 0, .65);
}


/* 첫 번째 착수 */
#intro .boot-line.soul-visible {
  opacity: .96;
  filter: blur(0);
}


/* 두 번째 착수 후
   첫 문장이 위로 이동 */
#intro .line-one.soul-up-one {
  opacity: .42;
  filter: blur(.15px);
  transform: translateY(calc(-50% - 38px));
}


/* 세 번째 착수 후
   첫 문장이 한 단계 더 위로 */
#intro .line-one.soul-up-two {
  opacity: .26;
  filter: blur(.35px);
  transform: translateY(calc(-50% - 70px));
}


/* 세 번째 착수 후
   두 번째 문장이 위로 이동 */
#intro .line-two.soul-up-one {
  opacity: .46;
  filter: blur(.1px);
  transform: translateY(calc(-50% - 35px));
}


/* 마지막 문장은 중앙에서 가장 선명 */
#intro .line-three.soul-visible {
  opacity: 1;
  filter: blur(0);
}


/* 아직 시작하지 않았을 때 대사는 완전히 숨김 */
#intro:not(.booting) .boot-line {
  opacity: 0;
  visibility: hidden;
}


/* 시작하면 대사 사용 가능 */
#intro.booting .boot-line {
  visibility: visible;
}


/* 기존 is-current 애니메이션 무력화 */
#intro.booting .boot-line.is-current {
  animation: none !important;
}


/* SCROLL은 아직 숨겨둔다.
   다음 단계에서 최종 착지와 연결 */
#intro.booting:not(.sequence-complete) .scroll-cue {
  opacity: 0;
  pointer-events: none;
}


/* reduced motion에서도 레이아웃은 유지 */
@media (prefers-reduced-motion: reduce) {
  #intro .water-intro {
    display: block;
  }

  #intro .boot-line {
    transition: opacity .2s linear;
  }
}


/* START 이후 V4가 무의 공간 자체가 된다 */
#intro .void-veil {
  transition: opacity .65s ease;
}

#intro.booting .void-veil {
  opacity: 0;
  pointer-events: none;
}

/* V4 무의 공간 레이어 */
#intro .water-intro {
  z-index: 3;
}

/* 대사와 SCROLL은 V4보다 위 */
#intro .boot-sequence,
#intro .scroll-cue {
  z-index: 4;
}
/* START 후 V4 무의 공간 활성화 */
#intro.booting .water-intro {
  opacity: 1;
}
/* SCROLL 구간에서 V4 화면을 viewport에 고정 */
#intro .intro-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 100svh;
}

/* V4 and the cosmos share one sticky viewport. Scroll changes opacity only;
   it never translates either scene. */
#intro.booting .water-intro {
  opacity: var(--v4-opacity);
  will-change: opacity;
}

#intro.booting .story-logo {
  animation: none;
  opacity: var(--v4-opacity);
  transition: opacity .08s linear;
}

#intro.sequence-complete .scroll-cue {
  opacity: var(--cue);
}

#intro.is-crossfaded .water-intro,
#intro.is-crossfaded .story-logo,
#intro.is-crossfaded .boot-sequence,
#intro.is-crossfaded .scroll-cue {
  visibility: hidden;
}

/* Boot lines set visibility on each child, so hide those children as well
   once the crossfade has fully completed. */
#intro.is-crossfaded .boot-line {
  visibility: hidden !important;
  opacity: 0 !important;
}

/* =========================================
   INTRO TITLE → V4 SEQUENCE TRANSITION
   ========================================= */

/* 클릭 전: 제목을 화면 중앙 부근에 배치 */
#intro:not(.booting) .story-logo {
  top: 40%;
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

/* 제목 이동 자체를 부드럽게 */
#intro .story-logo {
  transition:
    top .95s cubic-bezier(.22, .78, .22, 1),
    opacity .55s ease,
    transform .95s cubic-bezier(.22, .78, .22, 1);
  will-change: top, transform, opacity;
}

/* 클릭 후: 제목이 위쪽의 시퀀스 위치로 이동 */
#intro.booting .story-logo {
  top: 15%;
  opacity: 1;
  visibility: visible !important;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: none;
}

/* 클릭 전: 시작 문구는 아래쪽 */
#intro:not(.booting) .intro-start {
  top: 76%;
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

/* 시작 문구 이동/퇴장 */
#intro .intro-start {
  transition:
    opacity .4s ease,
    transform .55s ease,
    top .55s ease;
}

/* 클릭하면 시작 문구만 사라짐 */
#intro.booting .intro-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
  transform: translate(-50%, calc(-50% + 10px));
  transition:
    opacity .4s ease,
    transform .55s ease,
    visibility 0s linear .55s;
}

/* =========================================
   V4 TYPOGRAPHY · CINEMATIC POLISH
   ========================================= */

/* 클릭 후 제목 위치
   너무 천장에 붙지 않도록 살짝 아래로 */
#intro.booting .story-logo {
  top: 18%;
}


/* 대사 무대도 아주 살짝 위쪽으로 */
#intro .boot-sequence {
  top: 45%;
}


/* 세 대사 공통
   시스템 문구 느낌 → 서사적인 명조 느낌 */
#intro .boot-line {
  font-family:
    "Noto Serif KR",
    "Batang",
    Georgia,
    serif;

  font-weight: 400;
  letter-spacing: .055em;

  text-shadow:
    0 0 18px rgba(157, 137, 255, .12),
    0 2px 12px rgba(0, 0, 0, .72);
}


/* 1단계 · 가장 희미한 과거 기록 */
#intro .line-one {
  font-size: 15px;
  color: rgba(188, 190, 210, .76);
}


/* 2단계 · 영혼 확인 */
#intro .line-two {
  font-size: 16px;
  color: rgba(210, 211, 226, .84);
}


/* 3단계 · 복원 시작
   여기서 확실히 클라이맥스 */
#intro .line-three {
  width: 250px;
  left: 50%;
  margin-left: -125px;

  font-size: 22px;
  line-height: 1.55;
  letter-spacing: .035em;

  color: #ead7aa;

  text-shadow:
    0 0 10px rgba(234, 215, 170, .14),
    0 0 26px rgba(145, 111, 255, .18),
    0 2px 14px rgba(0, 0, 0, .78);
}

/* =========================================
   V4 MESSAGE SPACING · FINAL
   ========================================= */

/* 첫 대사: 가장 위 */
#intro .line-one.soul-up-two {
  transform: translateY(calc(-50% - 105px));
}

/* 두 번째 대사: 중간 */
#intro .line-two.soul-up-one {
  transform: translateY(calc(-50% - 62px));
}

/* 마지막 대사: 아래쪽에서 클라이맥스 */
#intro .line-three.soul-visible {
  transform: translateY(calc(-50% + 12px));
}



/* =========================================
   V4 TEXT · SCROLL CROSSFADE
   별무대와 대사가 함께 흐려지며 퇴장
   ========================================= */

#intro .boot-sequence {
  opacity: var(--soul-opacity, 1);
  filter: blur(var(--soul-blur, 0px));

  will-change: opacity, filter;
}

/* 우주 전환이 끝난 뒤에는 V4 대사를 완전히 숨김 */
#intro.is-crossfaded .boot-sequence {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* =========================================
   APPEARANCE DETAIL NAVIGATION
   ========================================= */

.flow-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

#flowBackButton {
  justify-self: start;
}

#appearanceReturnButton {
  justify-self: center;
  min-height: 43px;
  padding: 0 12px;
  border: 0;
  color: rgba(225, 230, 240, .62);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

#flowNextButton {
  justify-self: end;
}

.appearance-detail-custom {
  margin-top: 22px;
}

.appearance-detail-custom > span {
  color: rgba(225, 230, 240, .68);
}

@media (max-width: 600px) {
  .flow-navigation {
    grid-template-columns: minmax(72px, 1fr) auto minmax(108px, 1fr);
    gap: 5px;
  }

  #appearanceReturnButton {
    padding-inline: 7px;
    font-size: 10px;
  }

  #flowNextButton {
    min-width: 108px;
  }
}

/* =========================================
   APPEARANCE MAIN
   ========================================= */

.impression-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

.appearance-detail-launch {
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: 13px 46px 13px 16px;

  display: grid;
  gap: 5px;
  align-content: center;

  text-align: left;

  border: 1px solid rgba(217, 189, 120, .34);
  border-radius: 10px;

  color: rgba(240, 231, 207, .94);
  background:
    linear-gradient(
      135deg,
      rgba(217, 189, 120, .08),
      rgba(128, 96, 205, .08)
    );

  cursor: pointer;
}

.appearance-detail-launch span {
  font-size: 13px;
  font-weight: 600;
  color: #ead7a0;
}

.appearance-detail-launch small {
  font-size: 9px;
  line-height: 1.5;
  color: rgba(218, 224, 237, .48);
}

.appearance-detail-launch b {
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-50%);

  color: rgba(234, 215, 160, .72);
  font-size: 17px;
  font-weight: 400;
}

.appearance-detail-launch:hover {
  border-color: rgba(217, 189, 120, .62);
  background:
    linear-gradient(
      135deg,
      rgba(217, 189, 120, .12),
      rgba(128, 96, 205, .12)
    );
}

@media (max-width: 600px) {
  .impression-choices {
    gap: 7px;
  }

  .impression-choices .choice {
    min-height: 42px;
  }
}

/* 외모 상세 마지막 버튼 컴팩트 */
#flowNextButton {
  white-space: nowrap;
}

/* 외모 상세설정 중 버튼 크기 통일 */
#appearanceReturnButton:not([hidden]) ~ #flowNextButton {
  min-width: 112px;
  width: auto;
  min-height: 44px;
  padding: 0 16px;

  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

/* =========================================
   FLOW NAVIGATION FINAL FIX
   기본 = 양쪽 2버튼
   외모 상세 = 3버튼
   ========================================= */

/* 기본 페이지 */
.flow-navigation {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
}

#flowBackButton {
  margin-right: auto;
  justify-self: auto;
}

#flowNextButton {
  margin-left: auto;
  width: auto;
  min-width: 132px;
  min-height: 44px;
  padding: 0 16px;

  gap: 12px;
  white-space: nowrap;
  font-size: 13px;

  justify-self: auto;
}

/* 외모 상세에서만 3버튼 구조 */
.flow-navigation:has(#appearanceReturnButton:not([hidden])) {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}

.flow-navigation:has(#appearanceReturnButton:not([hidden])) #flowBackButton {
  margin-right: 0;
  justify-self: start;
}

.flow-navigation:has(#appearanceReturnButton:not([hidden])) #appearanceReturnButton {
  justify-self: center;
}

.flow-navigation:has(#appearanceReturnButton:not([hidden])) #flowNextButton {
  margin-left: 0;
  justify-self: end;
  min-width: 112px;
}

/* =========================================
   FLOW NAVIGATION POSITION FIX
   이전 = 왼쪽 / 돌아가기 = 중앙 / 계속 = 오른쪽
   ========================================= */

.flow-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  gap: 8px;
}

#flowBackButton {
  grid-column: 1;
  justify-self: start;
  margin: 0;
}

#appearanceReturnButton {
  grid-column: 2;
  justify-self: center;
  margin: 0;
}

#flowNextButton {
  grid-column: 3;
  justify-self: end;
  margin: 0;
  width: auto;
  white-space: nowrap;
}

/* =========================================
   VELORIA MAP - ORIGINAL RATIO
   이미지와 프레임을 정확히 같은 비율로
   ========================================= */

@media (max-width: 600px) {

  .world-section .map-card {
    flex: 0 0 auto;

    width: 100%;
    height: auto;

    min-height: 0;
    max-height: none;

    aspect-ratio: auto;

    padding: 0;
    overflow: hidden;
  }

  .world-section .map-card img {
    display: block;

    width: 100%;
    height: auto;

    min-height: 0;
    max-height: none;

    aspect-ratio: auto;

    object-fit: initial;
    object-position: initial;
  }
}

/* =========================================
   VELORIA REGION BUTTONS - COMPACT
   모바일에서는 지역명만 표시
   ========================================= */

@media (max-width: 600px) {

  /* 지역 아래 작은 설명 숨기기 */
  .world-section .regions button small {
    display: none;
  }

  /* 버튼 높이 축소 */
  .world-section .regions button {
    min-height: 34px;
    padding: 5px 7px;
  }

  /* 지역명 중앙 정렬 */
  .world-section .regions button b {
    margin: 0;
    font-size: 11px;
    line-height: 1.2;
  }
}