/* {{NAME}} 공통 색. 밝은 화면은 흰 바탕, 휴대폰이 다크 모드면 어두운 바탕으로 자동 전환 */
:root{color-scheme:light dark;
  --bg:#FFFFFF;--card:#FFFFFF;--ink:#17171A;--soft:#6B6B74;--faint:#A0A0A8;--line:#E8E8EC;
  --fill:#F2F2F4;--ph:#ECECEF;--field:#FFFFFF;--grab:#D6D6DC;--on-ink:#FFFFFF;--glow:#F5F5F7;
  --accent:{{ACCENT}};--bad:#C0473B;--ok:#3E8E64;
  --warn-bg:#FBEEE4;--warn:#9A4B25;--info-bg:#E6EEFB;--info:#3557A8;
  --ok-bg:#E4F3EA;--ok-ink:#2F6E4F;--bad-bg:#FAE6E3;--bad-ink:#8E3329;
  --shadow:rgba(16,16,24,.18)}
@media (prefers-color-scheme:dark){:root{
  --bg:#0E0E10;--card:#19191C;--ink:#F1F1F3;--soft:#A3A3AC;--faint:#6E6E78;--line:#2A2A2F;
  --fill:#232327;--ph:#242428;--field:#1C1C20;--grab:#3A3A40;--on-ink:#111113;--glow:#17171B;
  --accent:{{ACCENT_DARK}};--bad:#E26A5E;--ok:#5FB585;
  --warn-bg:#3A251A;--warn:#F2A982;--info-bg:#1B2540;--info:#98B4F2;
  --ok-bg:#15291F;--ok-ink:#82CDA3;--bad-bg:#3A1C19;--bad-ink:#F2A097;
  --shadow:rgba(0,0,0,.6)}}

/* PC 브라우저: 내용이 짧아 스크롤바가 없는 화면에서도 스크롤바 자리를 비워 둔다
   (화면마다 폭이 달라져 가운데 정렬된 메뉴·내용이 옆으로 움직이지 않게) */
html{scrollbar-gutter:stable}

/* 아래 메뉴 (각 페이지 안에 들어 있음) */
.gnav{position:fixed;left:0;right:0;bottom:0;z-index:9;display:flex;justify-content:space-around;
  padding:6px 6px calc(6px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--card) 92%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:1px solid var(--line)}
.gnav a{flex:1;min-width:0;position:relative;white-space:nowrap;display:flex;flex-direction:column;align-items:center;gap:2px;padding:5px 0;font:600 calc(11px * var(--fs,1)) var(--f,"Malgun Gothic","Apple SD Gothic Neo",sans-serif);color:var(--faint);text-decoration:none;-webkit-tap-highlight-color:transparent}
.gnav a.on{color:var(--ink)}
.gnav svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.gnav a.on svg{stroke-width:2.2}
.gnav a[data-dot]::after{content:"";position:absolute;top:4px;left:calc(50% + 8px);width:7px;height:7px;border-radius:50%;background:var(--accent)}
body{padding-bottom:var(--gnav,calc(64px + env(safe-area-inset-bottom)))}
@media(min-width:900px){.gnav{left:50%;right:auto;transform:translateX(-50%);bottom:16px;border:1px solid var(--line);border-radius:99px;padding:4px 10px;gap:4px;box-shadow:0 20px 40px -24px rgba(20,14,8,.5)}.gnav a{padding:6px 16px}}
.gi{width:1.2em;height:1.2em;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.22em;flex:none}
/* 글꼴 설정(설정 화면): 명조·손글씨를 고르면 모든 화면의 글꼴 변수를 바꾼다. 글자 크기는 --fs 배율 */
html[data-font="serif"]{--f:"Noto Serif KR","Noto Serif CJK KR","Source Han Serif K","Nanum Myeongjo","나눔명조","Batang","바탕","AppleMyungjo",serif;--f-display:"Noto Serif KR","Noto Serif CJK KR","Source Han Serif K","Nanum Myeongjo","나눔명조","Batang","바탕","AppleMyungjo",serif;--f-body:"Noto Serif KR","Noto Serif CJK KR","Source Han Serif K","Nanum Myeongjo","나눔명조","Batang","바탕","AppleMyungjo",serif;--f-mono:"Noto Serif KR","Noto Serif CJK KR","Source Han Serif K","Nanum Myeongjo","나눔명조","Batang","바탕","AppleMyungjo",serif}
html[data-font="serif"] body{font-family:"Noto Serif KR","Noto Serif CJK KR","Source Han Serif K","Nanum Myeongjo","나눔명조","Batang","바탕","AppleMyungjo",serif}
html[data-font="pen"]{--f:"Nanum Pen Script","Malgun Gothic","Apple SD Gothic Neo",cursive;--f-display:"Nanum Pen Script","Malgun Gothic","Apple SD Gothic Neo",cursive;--f-body:"Nanum Pen Script","Malgun Gothic","Apple SD Gothic Neo",cursive;--f-mono:"Nanum Pen Script","Malgun Gothic","Apple SD Gothic Neo",cursive}
html[data-font="pen"] body{font-family:"Nanum Pen Script","Malgun Gothic","Apple SD Gothic Neo",cursive}
