/* 실크로드 말길 — 정거장 카드 공통 스타일
   사이트(style.css v5)의 토큰을 그대로 따른다: 흰 바탕, #191f28 글자, #08786e 청록, Pretendard. */
:root{
  --bg:#ffffff; --surface:#f5f6f8; --line:#e5e8eb;
  --text:#191f28; --secondary:#4e5968; --muted:#626d7b;
  --teal:#08786e; --teal-soft:#e3f2f0;
  --sand:#a8661c; --sand-soft:#f7ecdf;
  --red:#c0392b; --red-soft:#fbeae8;
  --radius:28px;
  --font:Pretendard,"Noto Sans KR",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color-scheme:light;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:17px;line-height:1.65;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
a{color:var(--teal)}
h1,h2,h3{margin:0;line-height:1.3;text-wrap:balance}
p{margin:0}
button{font:inherit}
button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--teal);outline-offset:3px}

.top{max-width:760px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:16px;flex-wrap:wrap}
.top a{text-decoration:none;font-weight:700;color:var(--text)}
.top .crumb{font-size:.85rem;color:var(--muted)}

.card{max-width:760px;margin:0 auto 64px;display:flex;flex-direction:column;gap:20px}
.head{display:flex;flex-direction:column;gap:6px}
.eyebrow{font-size:.78rem;font-weight:700;letter-spacing:.1em;color:var(--teal)}
.head h1{font-size:clamp(1.7rem,4.5vw,2.4rem);font-weight:800;letter-spacing:-.02em}
.head .sub{color:var(--secondary)}

.progress{display:flex;gap:6px}
.progress button{flex:1;height:10px;border:0;border-radius:5px;background:var(--line);cursor:pointer;padding:0}
.progress button.done{background:var(--teal)}
.progress button.now{background:var(--teal);opacity:.45}
.steplabel{font-size:.85rem;color:var(--muted);display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}

.panel{background:var(--surface);border-radius:var(--radius);padding:24px;display:flex;flex-direction:column;gap:16px;min-width:0}
.panel h2{font-size:1.35rem;font-weight:800}
.badge{display:inline-flex;align-self:flex-start;font-size:.75rem;font-weight:700;border-radius:999px;padding:3px 10px}
.b-story{background:var(--sand-soft);color:var(--sand)}
.b-fact{background:var(--teal-soft);color:var(--teal)}
.b-check{background:var(--sand-soft);color:var(--sand)}

.scene{display:grid;grid-template-columns:120px 1fr;gap:16px;align-items:start}
.scene img{width:120px;height:auto;border-radius:20px;background:var(--bg)}
.scene .lines{display:flex;flex-direction:column;gap:10px}
.say{background:var(--bg);border-radius:18px;padding:10px 14px}
.say b{color:var(--teal);margin-right:6px}
.say.bori b{color:var(--sand)}
@media (max-width:520px){.scene{grid-template-columns:1fr}.scene img{width:96px}}

.dir{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--secondary)}
.dir .arrow{font-size:1.4rem;color:var(--teal)}
.letters{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px}
.letter{background:var(--bg);border-radius:20px;padding:14px;display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;border:2px solid transparent;cursor:pointer}
.letter[aria-pressed="true"]{border-color:var(--teal)}
.letter .g{font-size:2.6rem;line-height:1.2;min-height:3.4rem;display:flex;align-items:center;justify-content:center}
.letter .s{font-weight:800;font-size:1.05rem}
.letter .n{font-size:.78rem;color:var(--muted)}

.words{display:flex;flex-direction:column;gap:12px}
.word{background:var(--bg);border-radius:20px;padding:16px;display:grid;grid-template-columns:minmax(90px,auto) 1fr;gap:4px 16px;align-items:center}
.word .f{font-size:2rem;line-height:1.2;grid-row:span 2;text-align:center}
.word .r{font-weight:800;font-size:1.1rem}
.word .k{color:var(--secondary)}
.word .cmp{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.word .cmp span{font-size:.8rem;background:var(--surface);border-radius:999px;padding:2px 10px;color:var(--secondary)}

.artifact{display:flex;flex-direction:column;gap:12px}
.artimg{background:var(--bg);border-radius:20px;min-height:160px;display:flex;align-items:center;justify-content:center;text-align:center;padding:16px;color:var(--muted);font-size:.9rem;overflow:hidden}
.artimg figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:8px}
.artimg img{max-width:100%;max-height:min(70vh,640px);width:auto;height:auto;object-fit:contain;border-radius:12px}
.artimg figcaption{font-size:.8rem}
.meta{font-size:.85rem;color:var(--muted)}

.q{display:flex;flex-direction:column;gap:10px}
.q .qt{font-weight:700}
.q .qg{font-size:2.6rem;line-height:1.2;text-align:center;background:var(--bg);border-radius:16px;padding:8px}
.opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.opt{background:var(--bg);border:2px solid var(--line);border-radius:16px;padding:12px;cursor:pointer;text-align:center;font-weight:600;color:var(--text)}
.opt:hover{border-color:var(--teal)}
.opt.right{border-color:var(--teal);background:var(--teal-soft)}
.opt.wrong{border-color:var(--red);background:var(--red-soft)}
.opt:disabled{cursor:default}
.explain{font-size:.9rem;color:var(--secondary);background:var(--bg);border-radius:14px;padding:10px 14px}

.nav{display:flex;justify-content:space-between;gap:12px}
.btn{border:0;border-radius:999px;padding:12px 22px;font-weight:700;cursor:pointer;background:var(--teal);color:#fff}
.btn.ghost{background:var(--surface);color:var(--secondary)}
.btn:disabled{opacity:.4;cursor:default}

.stamp{width:150px;height:150px;border-radius:50%;border:5px double var(--red);color:var(--red);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-weight:800;transform:rotate(-8deg);align-self:center;line-height:1.25;padding:10px}
.stamp small{font-size:.7rem;font-weight:700}
.stamp.pending{border-color:var(--line);color:var(--muted);transform:none}
@media (prefers-reduced-motion:no-preference){
  .stamp.fresh{animation:press .5s ease-out}
  @keyframes press{0%{transform:scale(1.6) rotate(-20deg);opacity:0}70%{transform:scale(.95) rotate(-6deg);opacity:1}100%{transform:scale(1) rotate(-8deg)}}
}

.notes{border-top:1px solid var(--line);padding-top:16px;display:flex;flex-direction:column;gap:8px;font-size:.85rem;color:var(--muted)}
.notes ol{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:4px}
.notes a{word-break:break-all}

.vert-lr{writing-mode:vertical-lr}
.vert-rl{writing-mode:vertical-rl}
/* 파스파: Noto Sans PhagsPa는 글자를 똑바로 세운 모양으로 그린다. 세로로 쌓을 때는 upright가 필요하다(2026-11-07 브라우저 확인). */
.vert-up{writing-mode:vertical-lr;text-orientation:upright}
[hidden]{display:none!important}

/* Site integration: locally hosted characters, comfortable touch targets. */
.skip{position:absolute;left:16px;top:-100px;background:white;padding:12px;z-index:10}.skip:focus{top:8px}.pilot-note{padding:10px 14px;border-radius:12px;background:var(--sand-soft);color:#754715;font-size:.85rem}.pilot-note span{font-size:.8rem}.companions{display:flex;flex-wrap:wrap;width:120px;align-items:center}.companion{display:block;width:120px;aspect-ratio:1;background-image:url('/assets/companions.png');background-size:200% 200%;background-repeat:no-repeat}.arin-art{background-position:0 0}.bori-art{background-position:100% 100%}.progress button{height:44px;background:transparent}.progress button:after{content:"";display:block;height:9px;border-radius:5px;background:var(--line)}.progress button.done,.progress button.now{background:transparent}.progress button.done:after,.progress button.now:after{background:var(--teal)}.nav{flex-wrap:wrap}.btn{min-height:48px}.letters{grid-template-columns:repeat(auto-fit,minmax(min(130px,100%),1fr))}.word{min-width:0;overflow-wrap:anywhere}.notes{overflow-wrap:anywhere}@media(max-width:520px){.companions{width:100%;flex-wrap:nowrap}.companion{width:110px}.panel{padding:20px}.top{font-size:.9rem}.nav a{flex:1}.opts{grid-template-columns:1fr}}

/* Three learning stages and a touch-first schematic atlas. */
.hub{max-width:1080px;gap:24px}.hub>.head{max-width:680px}.hub>.head .pilot-note{order:3;margin-top:8px;align-self:flex-start}.hub>.head .pilot-note br,.hub>.head .pilot-note span{display:none}.hub>.head h1{font-size:clamp(2rem,4vw,3rem);line-height:1.18;letter-spacing:-.04em}.top{max-width:1080px}.journey{border:1px solid var(--line);border-radius:28px;padding:22px}.map-top{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:18px}.map-top h2{font-size:1.2rem}.map-top .btn{font-size:.9rem;padding:10px 16px}.map-layout{display:grid;grid-template-columns:1.4fr 1fr;gap:22px;align-items:stretch}.atlas{position:relative;border-radius:22px;overflow:hidden;min-height:390px;background:#f7f2e9}.atlas svg{position:absolute;inset:0;width:100%;height:100%}.map-stop{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;flex-direction:column;background:#fffdf6;border:1px solid #d5c9b7;border-radius:16px;padding:9px 10px;color:var(--text);cursor:pointer;min-width:100px;line-height:1.45;box-shadow:0 4px 12px #78654a0d}.map-stop b{font-size:1rem}.map-stop small{font-size:.73rem;white-space:nowrap;color:var(--secondary)}.map-dot{width:9px;height:9px;border-radius:50%;background:#b89d70;margin-bottom:4px}.map-stop[aria-pressed=true]{border:2px solid var(--teal);background:#edf8f3;box-shadow:0 0 0 4px #08786e10}.map-stop[aria-pressed=true] .map-dot{background:var(--teal)}.dunhuang{left:18%;top:32%}.suzhou{left:50%;top:49%}.ganzhou{left:80%;top:67%}.map-note{position:absolute;font-size:.8rem;letter-spacing:.1em;color:#7d7567}.desert{left:35%;top:15%}.mountains{left:30%;bottom:14%;color:#657e6d}.compass{right:6%;top:7%}.map-caption{position:absolute;bottom:12px;left:12px;right:12px;font-size:.67rem;color:#6d675d;text-align:center}.map-disclaimer{margin-top:14px}.route{min-width:0;justify-content:center}.route .stop{grid-template-columns:1fr;gap:5px}.route .stop .pin{display:none}.lc{padding:16px;border:1px solid transparent;min-height:110px}.lc span{font-size:.8rem}.lc b{font-size:1rem}.lc strong{display:inline-block;color:var(--teal);font-size:.9rem;margin-top:6px}.lc .mini{width:44px;height:44px}.guide{display:flex;align-items:center;gap:12px;min-width:0}.guide .companion{width:82px;min-width:82px}.guide p{font-size:.95rem}.guide h2{font-size:1.15rem}.learning-path{display:flex;align-items:center;justify-content:center;gap:22px;padding:18px;background:#f5f8f7;border-radius:20px;font-size:.9rem}.learning-path span{display:flex;flex-direction:column}.learning-path b{color:var(--teal);font-size:.7rem;letter-spacing:.1em}.learning-path i{font-style:normal;color:#9caea8}.progress{position:sticky;top:0;z-index:2;background:#fff;padding:8px 0}.progress button{height:auto;min-height:52px;border-radius:14px;background:var(--surface);font-size:.95rem;color:var(--secondary);opacity:1;padding:10px 4px;font-weight:700}.progress button:after{display:none}.progress button.now{background:var(--teal);color:#fff;opacity:1}.progress button.done:not(.now){background:var(--teal-soft);color:var(--teal)}.sentence-text{font-size:clamp(1.5rem,4vw,2.2rem);line-height:1.6;overflow-wrap:anywhere}.chunk-gloss{display:flex;flex-wrap:wrap;gap:8px}.chunk-gloss>span{display:flex;flex-direction:column;padding:12px;background:white;border-radius:12px;min-width:80px}.chunk-gloss small{font-size:.85rem;color:var(--muted)}.chunk-options{display:flex;flex-wrap:wrap;gap:8px}.chunk-options button{min-height:48px;flex:1}.assembled{padding:14px;border:1px dashed #8bb8ac;border-radius:12px;min-height:56px;overflow-wrap:anywhere}.extra{border:1px solid var(--line);border-radius:18px;padding:16px}.extra summary{cursor:pointer;min-height:44px;padding:8px;font-weight:600}.extra[open] .panel{margin-top:16px}.extra .notes{border:0}.q{border-top:1px solid var(--line);padding-top:16px}.q .qg{max-width:100%;overflow-wrap:anywhere}#letter-note{min-height:52px}#stage-result{font-weight:700;color:var(--teal)}
@media(max-width:760px){.map-layout{grid-template-columns:1fr;gap:14px}.atlas{min-height:300px}.journey{padding:16px}.map-stop{min-width:92px;padding:8px 6px}.map-stop small{font-size:.68rem}.map-stop b{font-size:.9rem}.map-stop.ganzhou{left:81%}.map-stop.dunhuang{left:19%}.route .guide .companion{width:66px;min-width:66px}.learning-path{gap:12px;padding:16px 10px;font-size:.8rem}.map-top{flex-wrap:wrap}.hub{gap:20px}.sentence-text{font-size:1.5rem}.nb .row{grid-template-columns:1fr auto}.nb .row small:first-child{grid-column:1/-1}.card{gap:14px}.panel{padding:18px}.progress{gap:5px}.progress button{font-size:.9rem}.guide .companion{width:76px;min-width:76px}}
@media(max-width:360px){.map-stop{min-width:84px}.map-stop small{font-size:.62rem}.map-stop.ganzhou{left:81%;top:70%}.map-stop.suzhou{top:44%}.map-stop.dunhuang{top:23%}.learning-path{gap:8px;font-size:.75rem}}
