:root {
  --ink: #2a2116;
  --parch: #f4ecdb;
  --parch-2: #e9dcc0;
  --gold: #d6b26a;
  --gold-2: #f1d9a0;
  --glass: rgba(22, 18, 13, 0.78);
  --line: rgba(214, 178, 106, 0.35);
  --serif: 'Noto Serif KR', 'AppleMyungjo', 'Nanum Myeongjo', serif;
  --sans: -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --hebrew: 'Noto Serif Hebrew', 'SBL Hebrew', 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1a140e; color: #f2e8d4; font-family: var(--sans); }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }
.small { font-size: 12.5px; opacity: 0.8; line-height: 1.6; }
.he { font-family: var(--hebrew); }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* ---------- 로딩·소개 ---------- */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 50; }
#loading { background: radial-gradient(circle at 50% 40%, #3a2c1b, #120d08); }
.loading-box { text-align: center; font-family: var(--serif); }
.seal {
  width: 74px; height: 74px; margin: 0 auto 18px; border: 2px solid var(--gold); border-radius: 50%;
  display: grid; place-items: center; font: 38px var(--hebrew); color: var(--gold-2);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.08); box-shadow: 0 0 30px rgba(214, 178, 106, 0.45); } }
#intro { background: linear-gradient(180deg, rgba(18, 13, 8, 0.25), rgba(18, 13, 8, 0.82)); }
.intro-card {
  width: min(640px, 92vw); padding: 34px 38px 26px; border-radius: 16px;
  background: linear-gradient(180deg, #f6eedd, #eadcbc); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(120, 90, 40, 0.25);
  font-family: var(--serif);
}
.eyebrow { margin: 0; letter-spacing: 0.08em; font-size: 13px; color: #8a6a35; }
.intro-card h1 { margin: 6px 0 14px; font-size: 38px; font-weight: 700; letter-spacing: -0.01em; }
.lead { margin: 0 0 12px; font-size: 15px; line-height: 1.75; color: #5b4628; border-left: 3px solid var(--gold); padding-left: 12px; }
.desc { margin: 0 0 18px; font: 15px/1.75 var(--sans); }
.keys { display: grid; grid-template-columns: repeat(4, auto); gap: 8px 14px; font: 13px var(--sans); margin-bottom: 20px; }
kbd {
  display: inline-block; min-width: 22px; padding: 2px 6px; margin-right: 3px; text-align: center;
  border: 1px solid #b59a68; border-bottom-width: 2px; border-radius: 5px; background: #fffaf0; font: 12px var(--sans);
}
.primary {
  width: 100%; padding: 14px; border: 0; border-radius: 10px; font: 600 17px var(--serif);
  background: linear-gradient(180deg, #4a3519, #2d2010); color: var(--gold-2);
  box-shadow: inset 0 0 0 1px rgba(241, 217, 160, 0.3);
}
.primary:hover { background: linear-gradient(180deg, #5a4120, #36260f); }
.intro-card .small { color: #6d5634; margin: 10px 0 0; text-align: center; }
.primary small { display: block; font: 13px var(--sans); opacity: 0.85; margin-top: 3px; }
.secondary {
  width: 100%; margin-top: 8px; padding: 11px; border-radius: 10px; font: 600 15px var(--serif);
  background: transparent; color: #3b2a14; border: 1.5px solid #8a6a35;
}
.secondary:hover { background: rgba(138, 106, 53, 0.12); }

/* ---------- HUD ---------- */
#hud { position: fixed; top: 14px; left: 14px; width: min(340px, 70vw); padding: 12px 14px; z-index: 10; }
.brand { font: 600 12px var(--serif); color: var(--gold); letter-spacing: 0.04em; }
.brand .he { margin-right: 4px; }
#loc-name { font: 700 20px var(--serif); margin: 4px 0 2px; color: #fff6e2; }
#loc-note { font-size: 13px; line-height: 1.55; opacity: 0.85; }
#loc-dims { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
#loc-dims span { font-size: 12px; padding: 3px 7px; border-radius: 6px; background: rgba(214, 178, 106, 0.16); border: 1px solid rgba(214, 178, 106, 0.3); }
#loc-dims b { color: var(--gold-2); font-weight: 600; margin-left: 3px; }
#loc-alt { font-size: 11.5px; opacity: 0.55; margin-top: 7px; }
.link { background: none; border: 0; padding: 0; margin-top: 8px; color: var(--gold-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

#toolbar { position: fixed; top: 14px; right: 14px; display: flex; gap: 2px; padding: 5px; z-index: 12; }
#toolbar button {
  background: none; border: 0; border-radius: 8px; padding: 6px 9px; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 50px;
}
#toolbar button span { font-size: 17px; line-height: 1; }
#toolbar button em { font-style: normal; }
#toolbar button:hover, #toolbar button.on { background: rgba(214, 178, 106, 0.2); color: var(--gold-2); }
.menu { position: fixed; top: 76px; right: 14px; padding: 6px; z-index: 13; display: flex; flex-direction: column; min-width: 200px; }
.menu button { background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 14px; }
.menu button:hover { background: rgba(214, 178, 106, 0.2); }

#crosshair { position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255, 250, 235, 0.75); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none; z-index: 5; }
#crosshair.on { background: #ffe071; box-shadow: 0 0 0 5px rgba(0,0,0,.8), 0 0 0 8px #ffe071; }
#spot-tip { position: fixed; z-index: 15; pointer-events: none; padding: 8px 12px; background: #20190f; color: #fff; border: 2px solid #f1d9a0; border-radius: 8px; font: 700 15px var(--sans); }
#spot-card { background: transparent; align-items: flex-end; z-index: 60; }
.spot-card-inner { position: relative; pointer-events: auto; width: min(580px, calc(100vw - 24px)); max-height: min(55vh, 520px); overflow-y: auto; margin: 0 auto 20px; padding: 24px; border: 2px solid #f1d9a0; border-radius: 14px; background: #f4ecdb; color: #2a2116; box-shadow: 0 12px 40px #000a; }
.spot-card-inner h2 { margin: 0 40px 8px 0; font: 700 26px var(--serif); }
.spot-card-inner p { line-height: 1.6; }
.spot-close { position: absolute; right: 15px; top: 12px; background: none; border: 0; font-size: 23px; }
#spot-dims { display: flex; flex-wrap: wrap; gap: 6px; }
#spot-dims span { padding: 4px 8px; background: #e5d5b8; border-radius: 6px; font-size: 14px; }
#spot-verse { margin: 16px 0 5px; padding: 10px 14px; border-left: 4px solid #9b742e; font: 17px/1.7 var(--serif); }
#spot-ref { margin: 0 0 14px; font-size: 13px; }
.spot-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.spot-actions button { min-height: 44px; padding: 8px 12px; border: 1px solid #715427; border-radius: 7px; background: #fffaf0; color: #2a2116; font-weight: 700; }
.spot-actions button:focus-visible, .spot-close:focus-visible { outline: 3px solid #755000; outline-offset: 2px; }
body.pilgrim #spot-card { align-items: flex-start; }
body.pilgrim .spot-card-inner { margin-top: 100px; }
.hc #spot-tip { background: #000; color: #ffff00; border: 3px solid #ffff00; font-size: 19px; }
.hc #crosshair.on { background: #ffff00; box-shadow: 0 0 0 5px #000, 0 0 0 9px #ffff00; }
.hc .spot-card-inner { background: #000; color: #fff; border: 4px solid #ffff00; font-size: 19px; }
.hc .spot-card-inner h2 { color: #ffff00; font-size: 30px; }
.hc #spot-dims span { background: #000; border: 2px solid #fff; font-size: 17px; }
.hc #spot-verse { border-left-color: #ffff00; font-size: 21px; }
.hc .spot-actions button { background: #ffff00; color: #000; border: 2px solid #ffff00; font-size: 18px; }
.hc .spot-close { color: #ffff00; }
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); font-size: 13.5px; z-index: 20; opacity: 0; transition: opacity 0.35s; pointer-events: none; white-space: nowrap;
}
#toast.show { opacity: 1; }

/* ---------- 본문 패널 ---------- */
#text-panel {
  position: fixed; top: 82px; right: 14px; bottom: 14px; width: min(440px, 92vw); z-index: 11;
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, var(--parch), var(--parch-2)); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(120, 90, 40, 0.3);
}
.tp-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 8px; border-bottom: 1px solid rgba(120, 90, 40, 0.2); }
.tp-title { font: 600 17px var(--serif); }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs button { border: 1px solid rgba(120, 90, 40, 0.35); background: transparent; border-radius: 6px; padding: 3px 10px; font: 600 13px var(--serif); }
.tabs button.on { background: #3b2a14; color: var(--gold-2); border-color: #3b2a14; }
.close { background: none; border: 0; font-size: 16px; opacity: 0.6; padding: 4px 6px; }
.close:hover { opacity: 1; }
.tp-opts { padding: 8px 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; border-bottom: 1px solid rgba(120, 90, 40, 0.15); font-size: 12.5px; }
#tr-chips { display: flex; gap: 4px; width: 100%; }
.chip { border: 1px solid rgba(120, 90, 40, 0.4); background: transparent; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; }
.chip.on { background: #6b4e22; color: #fff4dc; border-color: #6b4e22; }
.opt { display: flex; align-items: center; gap: 4px; opacity: 0.85; }
#verses { flex: 1; overflow-y: auto; padding: 6px 14px 20px; scroll-behavior: smooth; }
.verse { display: grid; grid-template-columns: 34px 1fr; gap: 0 8px; padding: 9px 6px; border-radius: 8px; transition: background 0.4s; }
.verse.hl { background: rgba(214, 178, 106, 0.32); box-shadow: inset 3px 0 0 #a87b2e; }
.vnum { font: 700 14px var(--serif); color: #8a6a35; padding-top: 2px; background: none; border: 0; text-align: left; padding-left: 0; }
.vnum.go { color: #7a4a10; }
.vnum.go:hover { text-decoration: underline; }
.vnum small { display: block; font-size: 11px; }
.t { margin: 0 0 4px; grid-column: 2; }
.t.ko { font: 15.5px/1.75 var(--serif); }
.t.en { font: 13.5px/1.6 Georgia, 'Times New Roman', serif; color: #4a3a24; }
.t.en i { font-style: normal; font-size: 10.5px; font-family: var(--sans); color: #9a7c4c; margin-right: 4px; letter-spacing: 0.04em; }
.t.he { font: 21px/1.9 var(--hebrew); direction: rtl; text-align: right; color: #2b1d0c; }
.tp-foot { font-size: 11px; padding: 8px 14px; opacity: 0.7; border-top: 1px solid rgba(120, 90, 40, 0.2); line-height: 1.5; }

/* ---------- 미니맵 ---------- */
#minimap-wrap { position: fixed; left: 14px; bottom: 14px; padding: 8px; z-index: 10; }
#minimap { display: block; width: 260px; height: 260px; border-radius: 8px; cursor: crosshair; }
.mm-cap { font-size: 11px; opacity: 0.65; text-align: center; margin-top: 4px; }

/* ---------- 도면 모달 ---------- */
.modal { background: rgba(10, 8, 5, 0.72); z-index: 60; }
.modal-card {
  position: relative; width: min(960px, 94vw); max-height: 88vh; overflow-y: auto; padding: 24px 26px;
  border-radius: 14px; background: linear-gradient(180deg, var(--parch), var(--parch-2)); color: var(--ink);
}
.modal-card.narrow { width: min(560px, 94vw); }
.modal-card h2 { font: 700 20px var(--serif); margin: 0 0 8px; }
.modal-card .close { position: absolute; top: 12px; right: 14px; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 14px; }
.ref-grid figure { margin: 0; cursor: zoom-in; }
.ref-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid rgba(120, 90, 40, 0.3); }
.ref-grid figcaption { font-size: 12.5px; line-height: 1.5; margin-top: 6px; }
.ref-grid figcaption b { font-family: var(--serif); }
.help-list { padding-left: 18px; line-height: 1.9; font-size: 14px; }
#lightbox { background: rgba(10, 8, 5, 0.92); z-index: 70; flex-direction: column; cursor: zoom-out; }
#lightbox img { max-width: 94vw; max-height: 84vh; background: #fff; border-radius: 6px; }
#lightbox p { font-size: 13px; opacity: 0.8; }

/* ---------- 키보드 초점 ---------- */
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }

/* ---------- 순례 카드 ---------- */
#pilgrim {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 14;
  width: min(620px, 94vw); max-height: 62vh; overflow-y: auto; padding: 16px 20px 18px; border-radius: 16px;
  background: linear-gradient(180deg, #f6eedd, #eadcbc); color: var(--ink); font-family: var(--serif);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(120, 90, 40, 0.3);
}
.pg-top { display: flex; align-items: center; gap: 12px; font: 600 15px var(--sans); color: #6d5634; }
.pg-dots { display: flex; gap: 6px; }
.pg-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #8a6a35; }
.pg-dots i.past { background: #8a6a35; }
.pg-dots i.now { background: #c0392b; border-color: #c0392b; transform: scale(1.25); }
.pg-close { margin-left: auto; background: none; border: 0; font-size: 20px; padding: 2px 6px; color: inherit; }
#pilgrim h2 { font: 700 26px var(--serif); margin: 8px 0 10px; }
.pg-label { margin: 10px 0 0; font: 600 14px var(--sans); color: #8a6a35; }
#pilgrim blockquote { margin: 0 0 8px; padding: 8px 12px; border-left: 4px solid var(--gold); background: rgba(255, 255, 255, 0.4); border-radius: 0 8px 8px 0; }
.pg-verse { font: 18px/1.75 var(--serif); }
.pg-extra { font: 15px/1.7 var(--serif); opacity: 0.85; }
#pilgrim cite { font: normal 600 13px var(--sans); color: #8a6a35; white-space: nowrap; }
.pg-note { margin: 6px 0; font: 15.5px/1.7 var(--sans); }
.pg-todo { margin: 8px 0 12px; font: 700 17px/1.6 var(--sans); color: #7a3a10; }
.pg-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-btns button {
  padding: 11px 16px; border-radius: 10px; font: 600 16px var(--sans);
  background: transparent; color: #3b2a14; border: 1.5px solid #8a6a35;
}
.pg-btns button.pg-primary { background: linear-gradient(180deg, #4a3519, #2d2010); color: var(--gold-2); border-color: #2d2010; }
.pg-btns kbd { font-size: 11px; margin-left: 4px; color: #3b2a14; }
body.pilgrim #minimap-wrap { bottom: auto; top: 200px; }
body.pilgrim #toast { bottom: auto; top: 92px; }
body.third #crosshair { display: none; }
/* 넓은 화면에서는 카드를 오른쪽 아래로 비켜 가운데 시야(제단·성전)를 가리지 않는다 */
@media (min-width: 1100px) { #pilgrim { left: auto; right: 16px; transform: none; width: min(560px, 42vw); } }
@media (max-width: 700px) { body.pilgrim #hud { display: none; } }
@media (pointer: coarse) { #pilgrim { bottom: 156px; max-height: 50vh; } }

/* 캐릭터 머리 위 행동 버튼 (위치는 pilgrim.js 가 매 프레임 정한다. 아래 꼭지가 캐릭터를 가리킨다) */
#pg-fab {
  position: fixed; z-index: 13; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 2px solid var(--gold-2);
  background: linear-gradient(180deg, #4a3519, #2d2010); color: var(--gold-2); font: 700 20px var(--sans);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(241, 217, 160, 0.7); animation: fabPulse 1.8s ease-out infinite;
}
#pg-fab::after { content: ''; position: absolute; left: 50%; bottom: -11px; margin-left: -10px; border: 10px solid transparent; border-bottom: 0; border-top-color: var(--gold-2); }
#pg-fab kbd { font-size: 12px; color: #3b2a14; }
@keyframes fabPulse { 70% { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 0 16px rgba(241, 217, 160, 0); } }
.hc #pg-fab { background: #ffff00; color: #000; border: 4px solid #000; outline: 3px solid #ffff00; font-size: 24px; box-shadow: none; animation: none; }
.hc #pg-fab::after { border-top-color: #ffff00; bottom: -15px; }
.hc #pg-fab kbd { background: #000; color: #ffff00; border-color: #000; font-size: 14px; }

/* 기도할 때 화면에 잠시 번지는 빛 (움직임 줄이기 설정이면 생략) */
#glory { position: fixed; inset: 0; pointer-events: none; z-index: 4; opacity: 0; background: radial-gradient(circle at 50% 40%, rgba(255, 240, 190, 0.9), rgba(255, 240, 190, 0) 70%); }
#glory.on { animation: glory 4.5s ease-in-out; }
@keyframes glory { 40% { opacity: 0.55; } 100% { opacity: 0; } }

/* ---------- 고대비 (html.hc) ----------
   검은 바탕 + 흰 글씨(21:1), 강조는 노랑(19.6:1). 반투명·흐림·그라데이션을 없애고 글씨를 키운다. */
.hc {
  --ink: #fff; --parch: #000; --parch-2: #000;
  --gold: #ffff00; --gold-2: #ffff00;
  --glass: #000; --line: #fff;
}
.hc body { background: #000; color: #fff; font-size: 17px; }
.hc .glass { backdrop-filter: none; -webkit-backdrop-filter: none; border-width: 2px; box-shadow: none; }
.hc .small, .hc #loc-note, .hc #loc-alt, .hc .mm-cap, .hc .opt, .hc .tp-foot, .hc #lightbox p { opacity: 1; color: #fff; }
.hc :focus-visible { outline: 4px solid #ffff00; outline-offset: 3px; }

.hc #loading { background: #000; }
.hc #intro { background: rgba(0, 0, 0, 0.88); }
.hc .intro-card, .hc #text-panel, .hc .modal-card {
  background: #000; color: #fff; border: 2px solid #fff; box-shadow: none;
}
.hc .eyebrow, .hc .lead, .hc .intro-card .small { color: #fff; }
.hc .lead { border-left-color: #ffff00; font-size: 17px; }
.hc .desc { font-size: 17px; }
.hc .keys { font-size: 15px; }
.hc kbd { background: #000; color: #ffff00; border: 2px solid #ffff00; font-size: 14px; }
.hc .primary, .hc .primary:hover { background: #ffff00; color: #000; box-shadow: none; font-size: 19px; font-weight: 700; }

.hc .brand { font-size: 14px; }
.hc #loc-name { color: #ffff00; font-size: 24px; }
.hc #loc-note { font-size: 16px; }
.hc #loc-dims span { background: #000; border: 2px solid #fff; font-size: 14px; }
.hc #loc-alt { font-size: 14px; }
.hc .link { font-size: 16px; text-decoration-thickness: 2px; }

.hc #toolbar button { font-size: 13.5px; color: #fff; border: 2px solid transparent; }
.hc #toolbar button span { font-size: 20px; }
.hc #toolbar button:hover { border-color: #fff; background: #000; color: #fff; }
.hc #toolbar button.on, .hc .tabs button.on, .hc .chip.on { background: #ffff00; color: #000; border-color: #ffff00; }
.hc .menu button { font-size: 17px; color: #fff; }
.hc .menu button:hover { background: #ffff00; color: #000; }
.hc #crosshair { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: #ffff00; box-shadow: 0 0 0 2px #000; }
.hc #toast { background: #000; color: #fff; border: 2px solid #ffff00; font-size: 17px; }

.hc .tp-head, .hc .tp-opts, .hc .tp-foot { border-color: #fff; }
.hc .tp-title { font-size: 20px; }
.hc .tabs button, .hc .chip { border: 2px solid #fff; color: #fff; font-size: 15px; }
.hc .close { opacity: 1; color: #fff; font-size: 20px; }
.hc .tp-opts { font-size: 15px; }
.hc .opt input { width: 18px; height: 18px; accent-color: #ffff00; }
.hc .verse.hl { background: #000; box-shadow: inset 5px 0 0 #ffff00; outline: 2px solid #ffff00; }
.hc .vnum, .hc .vnum.go { color: #ffff00; font-size: 16px; }
.hc .t.ko { font-size: 19px; line-height: 1.8; color: #fff; }
.hc .t.en { font-size: 17px; color: #fff; }
.hc .t.en i { color: #ffff00; font-size: 12.5px; }
.hc .t.he { font-size: 25px; color: #fff; }
.hc .tp-foot { font-size: 13px; }

.hc .modal, .hc #lightbox { background: rgba(0, 0, 0, 0.95); }
.hc .ref-grid img { border: 2px solid #fff; }
.hc .ref-grid figcaption, .hc .help-list { font-size: 16px; }
.hc #minimap { width: 300px; height: 300px; }
.hc #joy { background: #000; border: 2px solid #fff; }
.hc #joy .knob { background: #ffff00; }

.hc .secondary { background: #000; color: #fff; border: 2px solid #fff; font-size: 17px; }
.hc .secondary:hover { border-color: #ffff00; color: #ffff00; }
.hc #pilgrim { background: #000; color: #fff; border: 3px solid #ffff00; box-shadow: none; }
.hc .pg-top, .hc .pg-label, .hc #pilgrim cite { color: #ffff00; font-size: 16px; }
.hc .pg-dots i { border-color: #fff; width: 14px; height: 14px; }
.hc .pg-dots i.past { background: #fff; }
.hc .pg-dots i.now { background: #ffff00; border-color: #ffff00; }
.hc .pg-close { color: #fff; font-size: 24px; }
.hc #pilgrim h2 { color: #ffff00; font-size: 30px; }
.hc #pilgrim blockquote { background: #000; border-left: 5px solid #ffff00; }
.hc .pg-verse { font-size: 21px; color: #fff; }
.hc .pg-extra { font-size: 18px; opacity: 1; color: #fff; }
.hc .pg-note { font-size: 18px; color: #fff; }
.hc .pg-todo { font-size: 20px; color: #00e5ff; }
.hc .pg-btns button { background: #000; color: #fff; border: 2px solid #fff; font-size: 18px; }
.hc .pg-btns button:hover { border-color: #ffff00; color: #ffff00; }
.hc .pg-btns button.pg-primary { background: #ffff00; color: #000; border-color: #ffff00; }
.hc .pg-btns kbd { color: #000; background: #ffff00; border-color: #000; }
.hc .pg-btns button:not(.pg-primary) kbd { color: #ffff00; background: #000; border-color: #ffff00; }
.hc #glory { background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%); }

@media (prefers-reduced-motion: reduce) {
  #glory.on { animation: none; }
  #pg-fab { animation: none; }
  .seal { animation: none; }
  #verses { scroll-behavior: auto; }
}

/* ---------- 터치 조이스틱 ---------- */
#joy { display: none; position: fixed; left: 28px; bottom: 28px; width: 116px; height: 116px; border-radius: 50%; background: rgba(22, 18, 13, 0.45); border: 1px solid var(--line); z-index: 15; touch-action: none; }
#joy .knob { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(241, 217, 160, 0.75); }
@media (pointer: coarse) {
  #joy { display: block; }
  #minimap-wrap { left: auto; right: 14px; bottom: 14px; }
  #minimap { width: 160px; height: 160px; }
  .hc #minimap { width: 180px; height: 180px; }
  .keys { display: none; }
}
@media (max-width: 700px) {
  #toolbar button, .hc #toolbar button { min-width: 38px; padding: 5px 4px; font-size: 11px; }
  #hud { top: auto; bottom: 160px; width: calc(100vw - 28px); }
  .intro-card { padding: 24px 22px; }
  .intro-card h1 { font-size: 30px; }
}
