:root {
  --ink: #111015;
  --panel: #201b23;
  --paper: #f4f0e7;
  --red: #f13238;
  --muted: #b8afb9;
  --line: #ffffff24;
  --sans: 'Noto Sans KR', sans-serif;
  --latin: 'Barlow Condensed', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 15px/1.9 var(--sans); word-break: keep-all; overflow-wrap: break-word; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--paper); outline-offset: 5px; }
button[aria-pressed=true]:focus-visible { outline-color: var(--red); }
::selection { background: var(--red); color: white; }
.shell { width: min(1240px, calc(100% - 112px)); margin-inline: auto; }
.section { padding-block: 112px; }
.eyebrow { font: 600 15px/1.4 var(--latin); letter-spacing: .16em; }
.mono { font: 400 12px/1.5 var(--mono); }
h2 { font-size: clamp(32px, 4vw, 56px); font-weight: 800; letter-spacing: -.055em; line-height: 1.35; }
h2 em { font-style: normal; color: var(--red); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--paper); color: var(--ink); }
.skip-link:focus { top: 12px; }
.header { position: sticky; top: 0; height: 78px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--line); background: #111015f5; z-index: 20; backdrop-filter: blur(12px); }
.brand { font: 600 25px/1 var(--latin); letter-spacing: .025em; white-space: nowrap; }
.brand b { color: var(--red); font-weight: 600; }
.brand > span { font: 500 11px var(--sans); margin-left: 18px; color: var(--muted); }
.header nav { display: flex; gap: 30px; align-items: center; }
.header nav a { font-size: 12px; padding: 12px 0; }
.header nav a:hover { color: var(--red); }
.menu-button { display: none; }
.hero { height: min(900px, calc(100svh - 78px)); min-height: 660px; position: relative; overflow: hidden; isolation: isolate; background: #151017; }
.hero-art { position: absolute; top: 0; right: 0; bottom: 0; width: 67%; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 23%; }
.hero-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #151017 0%, #15101738 30%, transparent 60%), linear-gradient(0deg, #151017 0%, transparent 24%); }
.hero-copy { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; position: relative; padding-block: 45px 90px; }
.hero-copy .eyebrow { color: #d9a1a8; margin-bottom: 27px; }
.hero h1 { width: min(590px, 50%); filter: drop-shadow(0 3px 18px #111015aa); }
.hero h1 img { width: 100%; height: auto; }
.hero-hook { font-size: clamp(26px, 3.2vw, 44px); line-height: 1.55; letter-spacing: -.055em; font-weight: 700; margin-top: 34px; }
.hero-hook strong { color: #ff555b; font-weight: 800; }
.hero-description { margin-top: 23px; font-size: 14px; color: #d3c9d3; }
.button { display: inline-flex; gap: 50px; align-items: center; justify-content: space-between; padding: 15px 22px; font-size: 13px; font-weight: 700; min-height: 52px; }
.primary { background: var(--red); color: white; margin-top: 32px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); }
.primary:hover { background: #d92029; }
.button span { font-size: 22px; }
.scroll-cue { position: absolute; bottom: 28px; left: 40px; display: flex; align-items: center; gap: 24px; font: 500 11px var(--mono); letter-spacing: .05em; color: var(--muted); }
.scroll-cue span { color: var(--red); font-size: 20px; }
.world { background: var(--paper); color: var(--ink); padding-bottom: 0; }
.world-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 72px; padding-bottom: 55px; }
.world .eyebrow { color: #963a43; margin-bottom: 20px; }
.world-copy { font-size: 14px; color: #504750; }
.world-copy p + p { margin-top: 18px; }
.world-copy strong { color: #b62933; }
.world-panorama { position: relative; }
.world-panorama img { width: 100%; height: clamp(200px, 23vw, 350px); object-fit: cover; }
.world-panorama figcaption { position: absolute; inset: auto 0 0; padding: 40px 56px 20px; display: flex; justify-content: space-between; color: white; background: linear-gradient(transparent, #111015c9); font-size: 12px; }
.world-facts { display: grid; grid-template-columns: repeat(3, 1fr); padding-block: 28px; }
.world-facts p { padding: 5px 28px; border-right: 1px solid #11101525; }
.world-facts p:first-child { padding-left: 0; }
.world-facts p:last-child { border: 0; }
.world-facts b { display: block; font-size: 19px; letter-spacing: -.03em; }
.world-facts span { font-size: 11px; color: #6b6167; }
.growth { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: center; }
.growth-copy .eyebrow { color: var(--red); margin-bottom: 20px; }
.growth-copy > p:not(.eyebrow) { color: var(--muted); font-size: 14px; margin-top: 23px; max-width: 370px; }
.demo-note { color: var(--paper); border-top: 1px solid var(--line); padding-top: 20px; margin-top: 32px; font-size: 12px; }
.demo-note span { color: var(--red); padding-right: 10px; font-size: 20px; }
.panel { position: relative; background: var(--panel); border: 1px solid #73616f66; border-top: 2px solid var(--red); padding: 30px; box-shadow: 0 20px 70px #0002; }
.panel::after { content: ''; position: absolute; right: 8px; bottom: 8px; width: 7px; height: 7px; border-bottom: 1px solid #9c7e8c; border-right: 1px solid #9c7e8c; pointer-events: none; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-heading .eyebrow { color: #d699a5; }
.demo-label { color: var(--muted); font-size: 10px; border: 1px solid var(--line); padding: 2px 7px; }
.status-identity { display: flex; align-items: baseline; gap: 14px; margin-top: 24px; }
.status-identity h3 { font-size: 24px; }
.status-identity > span { font-size: 11px; color: var(--muted); }
.level-line { display: flex; justify-content: space-between; align-items: baseline; margin-top: 24px; }
.level-line b { font: 500 28px var(--mono); }
.level-line span { color: var(--muted); }
.exp-bar { height: 3px; background: #ffffff18; margin-top: 12px; }
.exp-bar span { display: block; height: 100%; width: 0%; background: var(--red); transition: width .2s; }
.point-count { margin-block: 20px 10px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.point-count strong { color: #ff6878; font: 500 22px var(--mono); }
.stat-row { display: grid; grid-template-columns: 1fr 44px 36px 44px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stat-label { font-size: 14px; }
.stat-label small { color: #ae9eac; font: 11px var(--mono); padding-left: 10px; }
.stat-row output { text-align: center; font: 500 20px var(--mono); }
.stat-row button { height: 44px; border: 1px solid #8c6f7e; background: transparent; font-size: 20px; line-height: 1; }
.stat-row button:hover:not(:disabled) { background: var(--red); border-color: var(--red); }
.stat-row button:disabled { opacity: .22; }
.tutorial { margin-top: 23px; background: #110d13; padding: 13px 14px; border-left: 2px solid #9a7b8d; }
.tutorial > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tutorial b { font-size: 12px; font-weight: 500; }
.tutorial > div span { font-size: 10px; color: var(--muted); }
.tutorial > p { font-size: 10px; color: var(--muted); display: flex; gap: 5px; margin-top: 5px; }
.tutorial > p > span:last-child { margin-left: auto; }
.tutorial.complete { border-color: #83cbb4; }
.tutorial.complete > div span { color: #83cbb4; }
.reset-button { border: 0; background: none; display: block; margin: 13px 0 -8px auto; padding: 6px 0 6px 15px; color: var(--muted); font-size: 11px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 50px; margin-bottom: 40px; }
.section-heading .eyebrow { color: var(--red); margin-bottom: 18px; }
.section-heading > p { font-size: 13px; color: var(--muted); }
.quests { background: #19131b; border-block: 1px solid var(--line); }
.quest-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.quest-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 15px 20px; font-size: 13px; color: var(--muted); }
.quest-tabs button span { font: 11px var(--mono); margin-right: 12px; color: #987d89; }
.quest-tabs button[aria-pressed=true] { color: var(--paper); border-bottom-color: var(--red); }
.quest-panel { max-width: 900px; margin-left: auto; min-height: 320px; padding: 35px 42px; transition: border-color .2s, background .2s; }
.quest-panel h3 { font-size: clamp(22px, 2.5vw, 32px); line-height: 1.5; margin-block: 28px 22px; letter-spacing: -.04em; }
.quest-panel dl > div { display: grid; grid-template-columns: 45px 1fr; gap: 15px; font-size: 13px; padding-block: 8px; }
.quest-panel dt { color: #a89aa8; }
.quest-panel dd { color: #ded2dc; }
.quest-note { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; color: #a99eab; font-size: 12px; }
.quest-panel[data-tone=danger] { background: #321821; border-color: #a63649; border-top-color: #ff3a4e; }
.quest-panel[data-tone=danger] h3 { color: #ff7783; }
.quest-panel[data-tone=warning] { background: #291b24; }
.example-note { margin-top: 16px; text-align: right; font-size: 11px; color: #ab9ba8; }
.faction-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.faction-filters button { border: 1px solid #63515f; background: none; color: var(--muted); padding: 8px 15px; font-size: 12px; min-height: 44px; display: inline-flex; gap: 9px; align-items: center; }
.faction-filters img { width: 22px; height: 22px; object-fit: contain; }
.faction-filters button[aria-pressed=true] { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.faction-filters button[aria-pressed=true] img { filter: invert(1); }
.faction-description { min-height: 48px; margin-block: 19px 25px; color: var(--muted); font-size: 12px; }
.character-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 31px 23px; }
.character-card { padding: 0; border: 0; text-align: left; background: none; width: 100%; }
.card-image { overflow: hidden; display: block; border: 1px solid var(--line); aspect-ratio: 16/9; background: var(--panel); }
.card-image img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s; }
.character-card:hover .card-image { border-color: var(--red); }
.character-card:hover img { transform: scale(1.025); }
.card-caption { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-top: 12px; }
.card-caption b { font-size: 18px; letter-spacing: -.03em; }
.card-caption small { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 10px; }
.card-caption > span { color: #bba3b3; font-size: 18px; }
.unknown { position: relative; margin-top: 65px; height: 280px; overflow: hidden; background: radial-gradient(ellipse at 73% 70%, #563043 0%, #241923 35%, #171219 70%); border-block: 1px solid var(--line); display: flex; align-items: center; }
.unknown > img { position: absolute; height: 330px; width: auto; right: -10px; top: 0; object-fit: contain; opacity: .94; }
.unknown > div { position: relative; z-index: 1; padding: 35px; }
.unknown .eyebrow { color: #cf8095; }
.unknown h3 { font-size: 27px; margin-top: 15px; letter-spacing: -.04em; }
.unknown p:last-child { font-size: 12px; color: var(--muted); margin-top: 12px; }
.gates { background: #f4f0e7; color: var(--ink); }
.gates .section-heading > p { color: #655964; }
.environment-controls { display: flex; border-bottom: 1px solid #11101538; gap: 25px; }
.environment-controls button { background: none; color: #756776; border: 0; border-bottom: 2px solid transparent; padding: 12px 15px; font-size: 13px; }
.environment-controls button[aria-pressed=true] { border-color: #b22b35; color: #ac2831; font-weight: 700; }
.environment { margin-top: 25px; }
.environment > img { width: 100%; height: auto; aspect-ratio: 4/1; object-fit: contain; background: #29232a; }
.environment figcaption { display: grid; grid-template-columns: 150px 1fr; gap: 25px; align-items: baseline; padding-block: 20px; border-bottom: 1px solid #11101526; }
.environment h3 { font-size: 25px; }
.environment p { font-size: 13px; color: #635664; }
.monster-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 15px; margin-top: 40px; }
.monster-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; object-position: center; }
.monster-grid figcaption { margin-top: 10px; font-size: 12px; font-weight: 600; }
.gate-warning { margin-top: 35px; padding-top: 20px; border-top: 1px solid #11101526; color: #6e4149; font-size: 12px; }
.gate-warning span { display: inline-grid; place-items: center; height: 20px; width: 20px; border: 1px solid #9b4750; margin-right: 8px; font: 600 13px var(--mono); }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 36px; }
.footer p, .back-top { font-size: 11px; color: var(--muted); }
dialog { padding: 0; width: min(1250px, calc(100% - 64px)); max-height: 90svh; overflow: auto; border: 1px solid #6d4a5e; background: #1c171f; color: var(--paper); }
dialog::backdrop { background: #09070ce8; backdrop-filter: blur(7px); }
body.dialog-open { overflow: hidden; }
.dialog-header { position: sticky; top: 0; background: #1c171ff5; padding: 14px 25px; display: flex; justify-content: space-between; align-items: center; z-index: 2; border-bottom: 1px solid var(--line); }
.dialog-header .eyebrow { color: #c79aaf; }
.dialog-header button { border: 0; background: none; padding: 10px 0 10px 25px; font-size: 13px; }
.dialog-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; padding: 28px; align-items: start; }
.dialog-art > img { width: 100%; height: auto; background: var(--ink); }
.mood-buttons { display: flex; gap: 16px; }
.mood-buttons button { border: 0; border-bottom: 1px solid transparent; background: none; padding: 12px 5px; color: var(--muted); font-size: 12px; }
.mood-buttons button[aria-pressed=true] { color: var(--paper); border-color: var(--red); }
.dialog-copy .eyebrow { color: #d591a9; margin-block: 4px 15px; font-family: var(--sans); font-size: 11px; }
.dialog-copy h2 { font-size: 35px; }
#dialog-role { font-size: 12px; margin-top: 10px; color: #baadbb; }
#dialog-personality { font-size: 13px; margin-top: 24px; color: #e2d7e1; }
.dialog-copy dl { margin-top: 25px; border-top: 1px solid var(--line); }
.dialog-copy dl > div { padding-top: 15px; }
.dialog-copy dt { font-size: 10px; color: #b89dad; margin-bottom: 5px; }
.dialog-copy dd { font-size: 13px; color: #e2d7e1; }
@media (max-width: 1000px) {
  .shell { width: calc(100% - 64px); }
  .header { padding-inline: 28px; }
  .brand > span { display: none; }
  .header nav { gap: 22px; }
  .section { padding-block: 85px; }
  .hero { min-height: 680px; height: 760px; }
  .hero-art { width: 72%; }
  .hero h1 { width: 54%; }
  .hero-hook { font-size: 32px; }
  .growth { gap: 42px; }
  .world-heading { gap: 35px; }
  .world { padding-bottom: 0; }
  .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px 20px; }
  .dialog-layout { grid-template-columns: 1.1fr 1fr; gap: 24px; padding: 22px; }
  .footer { flex-wrap: wrap; }
}
@media (max-width: 650px) {
  html { scroll-padding-top: 70px; }
  .shell { width: calc(100% - 40px); }
  .section { padding-block: 68px; }
  .header { height: 64px; padding-inline: 20px; }
  .brand { font-size: 23px; }
  .menu-button { display: inline-flex; gap: 18px; align-items: center; min-height: 44px; background: none; border: 0; padding: 0 0 0 15px; font-size: 12px; }
  .menu-button span { color: var(--red); font-size: 23px; }
  .header nav { display: none; position: absolute; top: 64px; left: 0; right: 0; padding: 15px 20px 22px; background: #19131bf7; border-bottom: 1px solid #744050; }
  .header nav.open { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .header nav a { padding: 11px 0; text-align: center; }
  .hero { height: auto; min-height: 0; padding-bottom: 0; display: flex; flex-direction: column; }
  .hero-copy { padding: 43px 0 0; order: 0; height: auto; }
  .hero h1 { width: min(100%, 450px); }
  .hero-copy .eyebrow { margin-bottom: 20px; font-size: 12px; }
  .hero-hook { font-size: 29px; margin-top: 22px; line-height: 1.5; }
  .hero-description { font-size: 12px; margin-top: 14px; }
  .primary { margin-top: 22px; min-height: 48px; font-size: 12px; padding: 11px 17px; gap: 35px; }
  .hero-art { position: relative; z-index: 0; width: 100%; height: 430px; margin-top: 18px; order: 1; }
  .hero-art img { object-position: 50% 18%; }
  .hero-art::after { background: linear-gradient(0deg, #151017 0%, transparent 18%, transparent 88%, #151017 100%); }
  .scroll-cue { display: none; }
  .world { padding-bottom: 0; }
  .world-heading { grid-template-columns: 1fr; gap: 24px; padding-bottom: 30px; }
  .world-copy { font-size: 12px; }
  .world-panorama img { height: 210px; }
  .world-panorama figcaption { padding: 35px 20px 15px; font-size: 10px; }
  .world-panorama .mono { font-size: 9px; }
  .world-facts { grid-template-columns: 1fr; padding-block: 12px; }
  .world-facts p, .world-facts p:first-child { padding: 13px 0; border-right: 0; border-bottom: 1px solid #11101520; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .world-facts b { font-size: 14px; }
  .world-facts span { font-size: 10px; text-align: right; }
  .growth { grid-template-columns: 1fr; gap: 32px; }
  .growth-copy > p:not(.eyebrow) { font-size: 13px; margin-top: 18px; }
  .demo-note { font-size: 11px; margin-top: 23px; }
  .panel { padding: 23px 20px; }
  .status-identity h3 { font-size: 21px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 23px; margin-bottom: 28px; }
  .section-heading > p { font-size: 12px; }
  .eyebrow { font-size: 13px; }
  h2 { font-size: 34px; }
  .quest-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .quest-tabs button { padding: 12px 6px; text-align: left; font-size: 12px; }
  .quest-tabs button span { font-size: 10px; margin-right: 8px; }
  .quest-panel { min-height: 365px; }
  .quest-panel h3 { margin-top: 24px; font-size: 25px; }
  .quest-panel dl > div { font-size: 12px; grid-template-columns: 32px 1fr; gap: 12px; }
  .quest-note { font-size: 11px; }
  .example-note { font-size: 10px; text-align: left; }
  .faction-filters { gap: 7px; }
  .faction-filters button { font-size: 11px; padding: 6px 10px; gap: 6px; }
  .faction-filters img { height: 19px; width: 19px; }
  .faction-description { font-size: 11px; min-height: 52px; margin-bottom: 16px; }
  .character-grid { grid-template-columns: 1fr; gap: 27px; }
  .card-caption b { font-size: 17px; }
  .unknown { height: 260px; margin-top: 44px; }
  .unknown > div { padding: 22px; }
  .unknown > img { right: -150px; opacity: .8; }
  .unknown h3 { font-size: 22px; }
  .unknown p:last-child { font-size: 11px; }
  .environment-controls { justify-content: space-between; gap: 0; }
  .environment-controls button { padding: 11px 15px; font-size: 12px; }
  .environment { margin-top: 18px; }
  .environment figcaption { grid-template-columns: 1fr; gap: 10px; padding-block: 17px; }
  .environment h3 { font-size: 21px; }
  .environment p { font-size: 12px; }
  .monster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 15px; margin-top: 25px; }
  .monster-grid figcaption { font-size: 11px; }
  .gate-warning { font-size: 11px; display: flex; align-items: baseline; }
  .gate-warning span { flex-shrink: 0; }
  .footer { gap: 18px; padding-block: 30px; }
  .footer p { order: 2; width: 100%; font-size: 10px; }
  .back-top { font-size: 10px; margin-left: auto; }
  dialog { width: calc(100% - 24px); max-height: 92svh; }
  .dialog-header { padding: 8px 16px; }
  .dialog-layout { grid-template-columns: 1fr; gap: 23px; padding: 16px; }
  .dialog-copy h2 { font-size: 30px; }
  .dialog-copy { padding-bottom: 18px; }
  #dialog-personality { margin-top: 18px; }
  .mood-buttons button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
