@charset "UTF-8";

:root{
  --paper:#f2eee5;
  --paper-light:#faf7f0;
  --ink:#263c34;
  --body:#34473e;
  --muted:#58665d;
  --line:#cecfc1;
  --gold:#7b603b;
  --dark:#172f28;
  --accent:#77815d;
  --serif:"Noto Serif KR","Nanum Myeongjo","Batang",serif;
  --sans:"Pretendard","Noto Sans KR","Malgun Gothic",sans-serif;
  --page-pad:17px;
  --header-h:88px;
}

*{box-sizing:border-box}
html,body{height:100%;overflow:hidden}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.7;word-break:keep-all;overflow-wrap:break-word}
button,a{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;cursor:pointer;border:0;border-radius:0;background:none}
button,a,summary{touch-action:manipulation}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--gold);outline-offset:4px}
button:disabled{opacity:.35;cursor:default}
img{display:block;max-width:100%}
[hidden]{display:none!important}
h1,h2,h3,h4,p{margin:0}
h1,h2,h3,h4{font-weight:500}
ul,ol{margin:0;padding:0;list-style:none}
em{font-style:normal}
::selection{background:#b7c5b1;color:#142b23}

.skip-link{position:fixed;top:8px;left:16px;transform:translateY(-160%);padding:11px 18px;background:var(--ink);color:#fff;z-index:100}
.skip-link:focus{transform:none}

.site-header{
  position:relative;
  z-index:20;
  height:var(--header-h);
  display:grid;
  grid-template-rows:34px 48px;
  padding:6px var(--page-pad) 0;
  background:rgba(242,238,229,.98);
  border-bottom:1px solid var(--line);
}
.brand{display:flex;align-items:center;gap:8px;min-height:34px;font:15px var(--serif);letter-spacing:-.04em}
.brand b{font-size:19px;font-weight:500}
.brand-mark{font-size:23px;color:var(--gold)}
.main-nav{display:flex;gap:4px;min-width:0}
.main-nav a{position:relative;display:flex;flex:1;min-width:0;min-height:48px;align-items:center;justify-content:center;padding:8px 4px;text-align:center;font-size:13px;font-weight:650;white-space:nowrap}
.main-nav a::after{content:"";position:absolute;left:18%;right:18%;bottom:-1px;height:2px;background:var(--ink);transform:scaleX(0);transition:transform .25s ease}
.main-nav a[aria-current]::after{transform:scaleX(1)}
.nav-no{display:none}

.snap-viewport{
  height:calc(100vh - var(--header-h));
  height:calc(100dvh - var(--header-h));
  overflow-x:hidden;
  overflow-y:auto;
  scroll-snap-type:y mandatory;
  scroll-behavior:smooth;
  scroll-padding-block:0;
  overscroll-behavior-y:contain;
  scrollbar-width:thin;
  scrollbar-color:#929a8b transparent;
}
.snap-viewport:focus{outline:none}
.snap-viewport:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}
.section{position:relative;scroll-snap-align:start;scroll-snap-stop:always;min-height:100%;isolation:isolate}
.section-wrap{width:min(1360px,100%);margin:auto;padding-inline:var(--page-pad)}
.eyebrow{font-size:11px;font-weight:650;line-height:1.45;letter-spacing:.13em;color:var(--muted)}
.body-copy{font-size:16px;line-height:1.85;color:var(--body)}
.control-label{font-size:12px;font-weight:650;letter-spacing:.06em;color:var(--muted)}
.art-slot{position:relative;overflow:hidden}
.art-slot img{width:100%;height:100%}
.placeholder{position:absolute;inset:0}
.has-image .placeholder{display:none}
.placeholder-top,.placeholder-bottom{position:absolute;left:16px;font-size:10px;letter-spacing:.13em}
.placeholder-top{top:13px}
.placeholder-bottom{bottom:12px;letter-spacing:.07em}

.world-section{height:auto;min-height:100%;padding:28px 0 38px;background:var(--paper)}
.world-intro{padding-bottom:24px}
.world-intro .eyebrow{display:flex;justify-content:space-between;gap:12px;margin-bottom:18px;font-size:10px}
h1{font-family:var(--serif);font-size:clamp(31px,8vw,54px);letter-spacing:-.07em;line-height:1.38}
h1 em{color:#607864}
.world-lead{margin-top:20px}
.world-lead p:first-child{font-size:17px;line-height:1.7;color:var(--ink);margin-bottom:10px}
.world-lead p:last-child{max-width:44em;font-size:15px;line-height:1.8;color:var(--muted)}
.world-notes{padding-top:25px;border-top:1px solid var(--line)}
.notes-heading h2{font:26px/1.45 var(--serif);margin-top:6px;letter-spacing:-.04em}
.notes-heading>p:last-child{font-size:14px;color:var(--muted);margin-top:4px}
.lore-list{margin-top:17px;border-top:1px solid var(--line)}
details{border-bottom:1px solid var(--line)}
summary{display:flex;justify-content:space-between;gap:16px;align-items:center;min-height:50px;padding:10px 2px;font-size:15px;font-weight:650;cursor:pointer;list-style:none}
summary::-webkit-details-marker{display:none}
summary span{font-size:20px;font-weight:400;color:var(--gold);transition:transform .2s}
details[open] summary span{transform:rotate(45deg)}
.detail-body{padding:0 0 18px;color:var(--body);font-size:15px;line-height:1.8}
.detail-body p+p{margin-top:10px}
.timeline li{display:grid;grid-template-columns:44px 1fr;gap:12px;padding:5px 0}
.timeline b{font:16px/1.7 Georgia,serif;color:var(--gold)}

.section-heading{min-width:0}
.section-heading h2{font:clamp(25px,6.8vw,42px)/1.25 var(--serif);letter-spacing:-.055em;margin-top:3px}
.section-heading>p{display:none;font-size:14px;color:var(--muted);line-height:1.7}

.filter-list{display:flex;gap:6px;min-width:0;overflow-x:auto;padding:3px 2px 6px;margin:5px -2px 0;scrollbar-width:none}
.filter-list::-webkit-scrollbar,.portrait-list::-webkit-scrollbar,.creature-list::-webkit-scrollbar{display:none}
.filter-button{position:relative;flex:0 0 auto;min-height:40px;padding:7px 12px;font-size:12px;border:1px solid var(--line);white-space:nowrap}
.filter-button[aria-pressed=true]{background:var(--ink);color:var(--paper-light);border-color:var(--ink)}

.character-section{height:100%;min-height:100%;overflow-x:hidden;overflow-y:auto;background:var(--paper-light);border-top:1px solid var(--line)}
.character-section .section-wrap{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr);
  padding-top:9px;
  padding-bottom:9px;
}
.character-selection{min-height:0;display:grid;grid-template-rows:31px 65px}
.selection-heading{display:flex;align-items:center;justify-content:space-between}
.pager{display:flex;align-items:center;gap:5px}
.pager>span{font:12px Georgia,serif;letter-spacing:.06em;margin-right:3px;color:var(--muted)}
.arrow-button{width:34px;height:34px;border:1px solid var(--line);font:18px Georgia,serif}
.arrow-button:hover{background:#e7e9df}
.portrait-list{display:flex;gap:7px;min-width:0;overflow-x:auto;padding:4px 2px 5px;margin-left:-2px;scrollbar-width:none}
.portrait-button{flex:0 0 55px;text-align:center;padding:0}
.portrait-thumb{display:flex;align-items:center;justify-content:center;position:relative;height:43px;background:#e9eae0;border:1px solid transparent;overflow:hidden}
.portrait-thumb>span{font:21px Georgia,serif;color:#858d73}
.portrait-thumb img{position:absolute;width:100%;height:100%;object-fit:cover;object-position:50% 18%}
.portrait-button[aria-pressed=true] .portrait-thumb{border:2px solid var(--ink);background:#d7decc}
.portrait-button>span:last-child{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.55;margin-top:2px}
.portrait-button[aria-pressed=true]>span:last-child{font-weight:750}
.portrait-thumb::after{content:"";position:absolute;inset:0;background:linear-gradient(transparent 72%,#1b32251f)}

.character-stage{min-height:220px;margin-top:3px;overflow:hidden}
.portrait-area{height:100%;min-height:0;background:radial-gradient(ellipse at 50% 86%,color-mix(in srgb,var(--accent) 18%,transparent),transparent 69%);border-top:1px solid var(--line)}
.portrait-area>img{position:absolute;z-index:1;inset:0;width:100%;height:106%;object-fit:contain;object-position:center top;filter:drop-shadow(0 12px 18px #23332820)}
.portrait-backdrop{position:absolute;left:0;right:0;top:12px;text-align:center;white-space:nowrap;overflow:hidden;opacity:.11;color:var(--accent);font:clamp(44px,15vw,100px)/1 Georgia,serif}
.portrait-placeholder{display:flex;align-items:center;justify-content:center;flex-direction:column}
.portrait-monogram{font:clamp(95px,31vw,180px)/1 Georgia,serif;color:var(--accent);opacity:.2}
.portrait-caption{display:flex;flex-direction:column;align-items:center;gap:5px;margin-top:12px;color:var(--muted)}
.portrait-caption span{font-size:9px;letter-spacing:.18em}
.portrait-caption b{font-size:12px;font-weight:400}
.character-mark{position:absolute;left:15px;bottom:65px;z-index:3;max-width:72%;text-shadow:0 1px 16px var(--paper-light)}
.character-mark h3{font:clamp(30px,9vw,54px)/1.1 var(--serif);letter-spacing:-.06em;margin-top:3px}
.character-mark>p:last-child{font:italic 15px/1.3 Georgia,serif;color:var(--gold);letter-spacing:.04em;margin-top:2px}
.profile-open{position:absolute;left:15px;bottom:13px;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:15px;min-width:142px;min-height:44px;padding:8px 12px;color:var(--paper-light);background:rgba(30,54,45,.94);border:1px solid color-mix(in srgb,var(--accent) 44%,#d8d2bc);font-size:13px}
.profile-open b{font-size:18px;font-weight:400;color:#d7ca9b}
.portrait-foot{position:absolute;right:14px;bottom:16px;z-index:3;display:flex;gap:12px;font-size:9px;letter-spacing:.11em;color:var(--muted);pointer-events:none}
.portrait-foot span:first-child{display:none}

.profile-dialog{width:min(650px,calc(100% - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:0;border:0;background:transparent;color:var(--ink)}
.profile-dialog::backdrop{background:rgba(8,18,15,.72);backdrop-filter:blur(5px)}
.profile-dialog-shell{position:relative;max-height:calc(100dvh - 24px);overflow-y:auto;padding:20px;background:var(--paper-light);border:1px solid #a7a590;box-shadow:0 24px 80px #07130f80}
.dialog-close{position:sticky;top:0;z-index:3;display:block;width:44px;height:44px;margin-left:auto;margin-bottom:-20px;background:var(--ink);color:var(--paper-light);font-size:26px;line-height:1}
.character-profile{padding:8px 3px 5px}
.character-profile h3{font:42px/1.2 var(--serif);letter-spacing:-.055em;margin-top:7px}
.character-en{font:italic 21px/1.35 Georgia,serif;color:var(--gold);margin-top:3px}
.tag-list{display:flex;flex-wrap:wrap;gap:7px 13px;margin-top:15px;font-size:13px;color:var(--muted)}
.tag-list li{position:relative}
.tag-list li+li::before{content:"·";position:relative;left:-6px;color:#909989}
.character-summary{margin-top:19px}
.character-facts{display:grid;grid-template-columns:1fr 1fr;gap:13px 12px;margin-top:21px;padding:17px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.character-facts>div:last-child{grid-column:1/-1}
.character-facts dt{font-size:12px;color:var(--muted);margin-bottom:3px;letter-spacing:.07em}
.character-facts dd{margin:0;font-size:15px}
.ability-block{margin-top:20px}
.ability-block h4{font:25px/1.35 var(--serif);margin-top:5px}
.ability-block .body-copy{margin-top:7px;font-size:15px}

.creature-section{height:100%;min-height:100%;overflow-x:hidden;overflow-y:auto;background:var(--dark);color:var(--paper);border-top:1px solid #42564b;--line:#42564b;--muted:#b6c0ae;--body:#e3e7d9}
.creature-section .section-wrap{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);padding-top:9px;padding-bottom:9px}
.creature-section .eyebrow{color:#b4c2a4}
.creature-section .filter-button[aria-pressed=true]{background:var(--paper);color:var(--dark);border-color:var(--paper)}
.creature-layout{min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);gap:5px;margin-top:4px}
.creature-index{min-width:0;min-height:0}
.biome-button{display:flex;flex-direction:column;align-items:flex-start;gap:0;min-width:108px;text-align:left}
.biome-button small{font-size:11px;line-height:1.25;opacity:.75}
.creature-list{display:flex;min-width:0;height:43px;overflow-x:auto;border-bottom:1px solid var(--line);scrollbar-width:none}
.creature-button{position:relative;flex:1 0 92px;min-height:42px;padding:7px 8px;border-bottom:2px solid transparent;font-size:13px;white-space:nowrap}
.creature-button[aria-pressed=true]{border-color:#d4c994;color:#eadfa7}
.creature-display{min-width:0;min-height:0;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
.creature-art{min-width:0;width:100%;aspect-ratio:7/4;background:#0e1d18}
.creature-art img{object-fit:contain;background:#0e1d18}
.creature-art.is-eroded{background:#181616}
.creature-art.is-eroded img{background:#181616}
.creature-placeholder{display:flex;align-items:center;justify-content:center;border:1px solid #4a6151;background:radial-gradient(ellipse at 50% 60%,#52744a33,transparent 65%)}
.creature-placeholder-name{max-width:80%;font:clamp(24px,8vw,52px) Georgia,serif;letter-spacing:.04em;color:#91a17c;text-align:center}
.is-eroded .creature-placeholder{border-color:#756256;background:radial-gradient(ellipse at 50% 60%,#65443544,transparent 65%)}
.is-eroded .creature-placeholder-name{color:#bdab95}
.creature-description{min-width:0;min-height:0;overflow-y:auto;padding-top:8px}
.creature-title-row{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:10px}
.creature-title-row h3{font:27px/1.2 var(--serif);letter-spacing:-.04em;margin-top:2px}
.creature-habitat{margin-top:3px;font-size:13px;font-weight:650;color:#c6cdbf}
.variant-switch{display:flex;flex-shrink:0;align-items:center;border:1px solid #7c8a75;padding:2px}
.variant-switch button{min-width:50px;min-height:36px;padding:6px;font-size:12px}
.variant-switch button[aria-pressed=true]{background:#ececdf;color:var(--dark)}
.creature-description>.body-copy{margin-top:7px;font-size:14px;line-height:1.55}

.noscript-note{position:fixed;inset:auto 0 0;padding:14px;color:var(--ink);background:var(--paper);z-index:50}

@media(min-width:600px){
  :root{--page-pad:34px}
  .character-section .section-wrap,.creature-section .section-wrap{padding-top:14px;padding-bottom:14px}
  .section-heading{display:flex;justify-content:space-between;gap:28px;align-items:end}
  .section-heading>p{display:block}
  .portrait-button{flex-basis:68px}
  .portrait-thumb{height:52px}
  .character-selection{grid-template-rows:34px 76px}
  .character-mark{left:24px;bottom:76px}
  .profile-open{left:24px;bottom:20px}
  .portrait-foot{right:22px;bottom:22px}
  .portrait-foot span:first-child{display:inline}
  .creature-layout{gap:8px}
  .creature-display{grid-template-columns:minmax(0,1fr) minmax(220px,260px);grid-template-rows:minmax(0,1fr);gap:18px;align-items:center}
  .creature-art{max-height:100%}
  .creature-description{max-height:100%;padding-top:0}
  .creature-title-row{align-items:flex-start;flex-direction:column;gap:12px}
}

@media(min-width:960px){
  :root{--page-pad:48px;--header-h:76px}
  .site-header{display:flex;align-items:center;justify-content:space-between;grid-template-rows:none;height:var(--header-h);padding:0 var(--page-pad)}
  .brand{font-size:18px;gap:12px}
  .brand b{font-size:24px}
  .brand-mark{font-size:30px}
  .main-nav{height:100%;gap:25px}
  .main-nav a{flex:0 0 auto;min-width:96px;height:100%;gap:8px;padding:0 4px;font-size:14px}
  .main-nav a::after{left:0;right:0}
  .nav-no{display:inline;font:10px Georgia,serif;color:var(--gold)}

  .world-section{padding:34px 0}
  .world-intro{display:grid;grid-template-columns:1.1fr 1fr;gap:70px;align-items:end;padding-bottom:28px}
  .world-intro .eyebrow{justify-content:flex-start;gap:28px;margin-bottom:16px}
  h1{font-size:49px}
  .world-lead{margin-top:0}
  .world-lead p:first-child{font-size:18px}
  .world-notes{display:grid;grid-template-columns:minmax(210px,.72fr) 2fr;gap:50px;padding-top:28px}
  .notes-heading h2{font-size:29px}
  .lore-list{margin-top:0}
  summary{min-height:48px;padding:8px 2px}
  .detail-body{max-width:68ch}

  .section-heading h2{font-size:37px}
  .section-heading>p{font-size:14px}
  .character-section .section-wrap{
    grid-template-columns:minmax(230px,290px) minmax(0,1fr);
    grid-template-rows:auto auto minmax(0,1fr);
    column-gap:30px;
    padding-top:17px;
    padding-bottom:17px;
  }
  .character-section .section-heading{grid-column:1/-1;grid-row:1}
  .faction-list{grid-column:1;grid-row:2;margin-top:10px}
  .character-selection{grid-column:1;grid-row:3;grid-template-rows:40px minmax(0,1fr);margin-top:4px}
  .portrait-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;gap:10px 8px;overflow-x:hidden;overflow-y:auto;padding:5px 3px 12px}
  .portrait-button{width:auto;min-width:0}
  .portrait-thumb{height:64px}
  .portrait-button>span:last-child{font-size:12px;margin-top:3px}
  .character-stage{grid-column:2;grid-row:2/4;margin-top:10px}
  .portrait-area{border:1px solid var(--line)}
  .portrait-backdrop{top:25px;font-size:75px}
  .portrait-monogram{font-size:200px}
  .character-mark{left:29px;bottom:87px}
  .character-mark h3{font-size:54px}
  .character-mark>p:last-child{font-size:19px}
  .profile-open{left:29px;bottom:27px;min-width:158px}
  .portrait-foot{right:27px;bottom:31px;font-size:10px}

  .creature-section .section-wrap{padding-top:17px;padding-bottom:17px}
  .creature-layout{grid-template-columns:190px minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:27px;margin-top:12px}
  .creature-index{display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px;overflow:hidden}
  .creature-section .filter-list{flex-direction:column;overflow:visible;margin:0;padding:0;gap:5px}
  .biome-button{width:100%;min-height:47px;min-width:0;padding:6px 11px}
  .biome-button small{font-size:12px}
  .creature-list{height:auto;min-height:0;flex-direction:column;overflow-y:auto;border:0}
  .creature-button{flex:0 0 auto;min-height:48px;text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);font-size:14px}
  .creature-button[aria-pressed=true]{border-bottom-color:#aaa879;background:#254234}
  .creature-display{grid-template-columns:minmax(0,1fr) minmax(235px,285px);grid-template-rows:minmax(0,1fr);gap:24px;align-items:center}
  .creature-art{justify-self:center;width:100%;max-height:100%;aspect-ratio:7/4}
  .creature-description{max-height:100%;padding:0;overflow-y:auto}
  .creature-title-row{align-items:flex-start;flex-direction:column;gap:16px}
  .creature-title-row h3{font-size:38px}
  .creature-habitat{font-size:14px}
  .variant-switch button{min-width:68px;min-height:42px}
  .creature-description>.body-copy{margin-top:17px;font-size:15px;line-height:1.75}

  .profile-dialog{width:min(690px,calc(100% - 56px))}
  .profile-dialog-shell{padding:33px 38px}
  .dialog-close{margin-bottom:-12px}
  .character-profile{padding:0 4px 4px}
  .character-profile h3{font-size:52px}
}

@media(min-width:1400px){
  :root{--page-pad:58px}
  .character-section .section-wrap{grid-template-columns:320px minmax(0,1fr);column-gap:48px}
  .portrait-thumb{height:72px}
  .portrait-backdrop{font-size:94px}
  .creature-layout{grid-template-columns:210px minmax(0,1fr);gap:38px}
  .creature-display{grid-template-columns:minmax(0,1fr) 300px;gap:34px}
}

@media(max-height:660px) and (max-width:959px){
  .character-section .section-wrap,.creature-section .section-wrap{padding-top:6px;padding-bottom:6px}
  .section-heading h2{font-size:23px}
  .character-selection{grid-template-rows:29px 57px}
  .portrait-thumb{height:38px}
  .portrait-button>span:last-child{font-size:10px}
  .filter-button{min-height:36px;padding-block:5px}
  .character-mark{bottom:60px}
  .creature-list{height:39px}
  .creature-button{min-height:38px}
  .creature-title-row h3{font-size:24px}
  .creature-description>.body-copy{font-size:13px}
}

@media(max-width:599px) and (max-height:660px){
  .portrait-caption{display:none}
}

@media(max-height:520px),(orientation:landscape) and (max-height:520px){
  .snap-viewport{scroll-snap-type:y proximity}
  .character-section,.creature-section{height:auto;min-height:100%;overflow:visible}
  .character-section .section-wrap,.creature-section .section-wrap{height:auto;min-height:100%}
  .character-stage{min-height:300px}
  .creature-display{overflow:visible}
}

@media(prefers-reduced-motion:reduce){
  html,.snap-viewport{scroll-behavior:auto}
  *,*::before,*::after{transition:none!important;animation:none!important}
}
