/* Shared look of the text pages (hub, 길잡이, 도감, 개인정보처리방침). Same dusk palette and typefaces as the game.
   build.mjs (web/pages.mjs) writes this file out as site/site.<hash>.css. */
:root{
  color-scheme:dark;
  --night:#17132b; --dusk:#231c40; --raised:#2f2757; --line:#463c72;
  --ink:#f4ecdb; --dim:#b3a8cc; --lantern:#f4b860; --lantern-deep:#b8742a; --on-lantern:#2a1a05; --ember:#e8604f;
  --display:"Gowun Batang","Nanum Myeongjo","Batang",serif;
  --body:"IBM Plex Sans KR","Apple SD Gothic Neo","Malgun Gothic",sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:16px}
body{margin:0;min-height:100vh;display:flex;flex-direction:column;background:var(--night);color:var(--ink);font:16px/1.75 var(--body);word-break:keep-all;overflow-wrap:anywhere}
img{max-width:100%;height:auto}
a{color:var(--lantern);text-underline-offset:3px}
a:focus-visible,summary:focus-visible{outline:2px solid var(--lantern);outline-offset:2px;border-radius:4px}
.wrap{width:100%;max-width:780px;margin:0 auto;padding-left:max(20px,env(safe-area-inset-left,0px));padding-right:max(20px,env(safe-area-inset-right,0px))}

/* top bar */
/* not pinned to the top while scrolling: the "게임 하기" button must not travel over the 띠 광고 places (AdSense: no ad close to a play button) */
.top{background:var(--night);border-bottom:1px solid var(--line)}
.top .wrap{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-family:var(--display);font-weight:700;font-size:17px;min-width:0}
.brand img{width:32px;height:32px;border-radius:8px;flex:none}
.brand span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.play{flex:none;display:inline-block;padding:8px 16px;border-radius:999px;background:var(--lantern);color:var(--on-lantern);font-weight:700;font-size:14px;text-decoration:none}
.play:hover{background:#ffcc7e}

/* guide menu: one row that scrolls sideways on a phone */
.menu{border-bottom:1px solid var(--line);background:var(--dusk)}
.menu .wrap{display:flex;gap:6px;overflow-x:auto;padding-top:8px;padding-bottom:8px;scrollbar-width:none}
.menu .wrap::-webkit-scrollbar{display:none}
.menu a{flex:none;padding:5px 12px;border-radius:999px;color:var(--dim);text-decoration:none;font-size:14px;font-weight:500;border:1px solid transparent}
.menu a:hover{color:var(--ink)}
.menu a[aria-current="page"]{color:var(--lantern);border-color:var(--lantern-deep)}

/* article */
main{flex:1 0 auto;padding:28px 0 48px}
.hero{position:relative;margin:0 0 28px;border-radius:16px;overflow:hidden;border:1px solid var(--line);background:var(--dusk)}
.hero img{display:block;width:100%;height:210px;object-fit:cover;object-position:center 62%}
.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(23,19,43,.05) 0%,rgba(23,19,43,.2) 45%,rgba(23,19,43,.92) 100%)}
.hero-text{position:absolute;left:20px;right:20px;bottom:16px;z-index:1}
.hero-text .kicker{margin:0}
.hero-text h1{margin:2px 0 0}
.kicker{margin:0 0 4px;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--lantern)}
h1{font-family:var(--display);font-weight:700;font-size:30px;line-height:1.3;margin:0 0 12px;letter-spacing:-.01em}
h2{font-family:var(--display);font-weight:700;font-size:22px;line-height:1.35;margin:44px 0 12px;padding-top:6px}
h3{font-size:17px;font-weight:700;line-height:1.4;margin:28px 0 8px}
p{margin:0 0 14px}
.lead{font-size:17px;color:var(--ink)}
.dim,.note{color:var(--dim)}
.note{font-size:14px}
ul,ol{margin:0 0 14px;padding-left:22px}
li{margin:4px 0}
b,strong{font-weight:700;color:#fff6e4}
.el{font-family:var(--display);font-weight:700}

/* table of contents on long pages */
.toc{margin:0 0 8px;padding:14px 18px;border-radius:12px;background:var(--dusk);border:1px solid var(--line);font-size:15px}
.toc b{display:block;margin-bottom:4px;font-size:13px;letter-spacing:.06em;color:var(--dim);font-weight:600}
.toc ol{margin:0;padding-left:20px;columns:2;column-gap:28px}
.toc a{color:var(--ink);text-decoration:none}
.toc a:hover{color:var(--lantern);text-decoration:underline}

/* tables: scroll sideways inside their own box rather than widening the page */
.tbl{margin:0 0 16px;overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--dusk)}
table{border-collapse:collapse;width:100%;font-size:15px;line-height:1.55}
th,td{padding:9px 12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}
tr:last-child td{border-bottom:0}
th{font-size:13px;font-weight:600;color:var(--dim);white-space:nowrap;background:rgba(255,255,255,.03)}
td.n,th.n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
td.k{white-space:nowrap;font-weight:600}

/* facts as pairs */
dl.facts{display:grid;grid-template-columns:max-content 1fr;gap:6px 18px;margin:0 0 16px;padding:14px 18px;border-radius:12px;background:var(--dusk);border:1px solid var(--line)}
dl.facts dt{color:var(--dim);font-size:14px;white-space:nowrap}
dl.facts dd{margin:0}
h3 + dl.facts{margin-top:8px}

/* cards: spirits, 흑수, people */
.cards{display:grid;gap:14px;margin:0 0 16px}
.card{display:grid;grid-template-columns:104px 1fr;gap:16px;align-items:start;padding:16px;border-radius:14px;background:var(--dusk);border:1px solid var(--line)}
.card .pic{display:grid;place-items:center;width:104px;height:104px;border-radius:12px;background:radial-gradient(circle at 50% 60%,#3a2f68 0%,#201a3c 70%)}
.card .pic img{max-width:92px;max-height:92px;width:auto;height:auto}
.card .pic.face img{max-width:104px;max-height:104px;border-radius:12px}
.card h3{margin:0 0 4px;font-family:var(--display);font-size:19px}
.card p{margin:0 0 8px;font-size:15px}
.card p:last-child{margin-bottom:0}
.chip{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:999px;border:1px solid var(--line);font:600 12px/1.6 var(--body);color:var(--dim);vertical-align:middle}
.card table{font-size:14px}
.card .tbl{margin:8px 0 0;background:transparent}

/* the three looks of the knight */
.looks{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 16px}
.looks figure{margin:0;padding:12px 6px 10px;border-radius:12px;background:radial-gradient(circle at 50% 70%,#3a2f68 0%,#201a3c 75%);border:1px solid var(--line);text-align:center}
.looks img{height:120px;width:auto;max-width:100%;object-fit:contain}
.looks figcaption{margin-top:6px;font-size:13px;color:var(--dim);line-height:1.4}
.swatch{display:inline-block;width:14px;height:14px;border-radius:50%;margin-right:8px;vertical-align:-2px;border:1px solid rgba(255,255,255,.35)}

/* a boxed aside */
.box{margin:0 0 16px;padding:14px 18px;border-radius:12px;border:1px solid var(--lantern-deep);background:rgba(244,184,96,.07)}
.box p:last-child,.box ul:last-child{margin-bottom:0}
blockquote{margin:0 0 16px;padding:4px 0 4px 18px;border-left:3px solid var(--lantern-deep);font-family:var(--display);font-size:17px;color:var(--ink)}
blockquote p{margin:0 0 10px}
blockquote p:last-child{margin:0}
details{margin:0 0 16px;border:1px solid var(--line);border-radius:12px;background:var(--dusk)}
summary{padding:12px 18px;cursor:pointer;font-weight:600}
details .tbl{margin:0;border:0;border-top:1px solid var(--line);border-radius:0 0 12px 12px}
details > p{padding:0 18px}

/* links to the neighbouring pages at the end of an article */
.next{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin:36px 0 0}
.next a{display:block;padding:12px 16px;border-radius:12px;background:var(--dusk);border:1px solid var(--line);color:var(--ink);text-decoration:none;line-height:1.45}
.next a:hover{border-color:var(--lantern)}
.next small{display:block;color:var(--dim);font-size:13px}
.cta{margin:36px 0 0;padding:22px 20px;border-radius:14px;text-align:center;background:var(--dusk);border:1px solid var(--line)}
.cta p{margin:0 0 12px;font-family:var(--display);font-size:18px}
.cta .play{font-size:16px;padding:11px 26px}

/* 띠 광고: a labelled box between sections. An empty place takes no room; on this computer ?slots=1 shows where the places are. */
.ad{margin:32px 0;text-align:center}
.ad-label{display:block;margin-bottom:6px;font-size:12px;color:var(--dim);letter-spacing:.08em}
.ad-empty{display:none}
.show-slots .ad-empty{display:grid;place-items:center;min-height:120px;border:1px dashed var(--lantern-deep);border-radius:12px;color:var(--dim);font-size:14px}
.show-slots .ad-empty::before{content:"띠 광고 자리"}

/* hub */
.hub{max-width:520px}
.hub h1{font-size:15px;letter-spacing:.3em;color:var(--lantern);font-family:var(--body);font-weight:600;text-align:center;margin:20px 0 6px}
.hub .lead{text-align:center;color:var(--dim);font-size:15px;margin-bottom:26px}
.tiles{display:grid;gap:14px}
.tile{display:flex;gap:16px;align-items:center;padding:16px;border-radius:14px;background:var(--dusk);border:1px solid var(--line);color:inherit;text-decoration:none}
a.tile:hover,a.tile:focus-visible{border-color:var(--lantern)}
.tile img,.tile .mark{width:64px;height:64px;border-radius:14px;flex:none}
.tile .mark{display:grid;place-items:center;border:1px dashed var(--line);color:var(--dim);font-size:13px}
.tile b{display:block;font-size:18px;line-height:1.4}
.tile span{color:var(--dim);font-size:14px;line-height:1.5;display:block}
.tile.soon{opacity:.6}
.hub-links{margin:22px 0 0;text-align:center;font-size:15px}
.hub-links a{margin:0 8px;white-space:nowrap}

footer{flex:none;border-top:1px solid var(--line);padding:22px 0 calc(26px + env(safe-area-inset-bottom,0px));font-size:14px;color:var(--dim)}
footer .wrap{display:flex;flex-wrap:wrap;gap:6px 18px;justify-content:space-between}
footer a{color:var(--dim)}
footer nav{display:flex;flex-wrap:wrap;gap:4px 16px}

@media (max-width:560px){
  body{font-size:16px}
  h1{font-size:26px}
  h2{font-size:20px;margin-top:38px}
  .hero img{height:170px}
  .toc ol{columns:1}
  .card{grid-template-columns:76px 1fr;gap:12px;padding:14px}
  .card .pic{width:76px;height:76px}
  .card .pic img{max-width:66px;max-height:66px}
  .card .pic.face img{max-width:76px;max-height:76px}
  .looks img{height:84px}
  dl.facts{grid-template-columns:1fr;gap:0}
  dl.facts dt{margin-top:8px}
  dl.facts dt:first-child{margin-top:0}
  th,td{padding:8px 10px}
}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
