:root {
  color-scheme: light;
  --page: #f2eee5;
  --surface: #fffdf8;
  --surface-alt: #e9e3d8;
  --ink: #242c29;
  --muted: #657068;
  --border: #d4d6ca;
  --accent: #325d4b;
  --accent-soft: #dce8de;
  --accent-ink: #fff;
  --map: #ece7dc;
  --hover: #e8eee5;
  --shadow: 0 14px 40px #252c2910;
  --mist: #e5e9e0;
  font-family: Inter, "Noto Sans KR", "Segoe UI", system-ui, sans-serif;
}
:root[data-theme="black"] {
  color-scheme: dark;
  --page: #111615;
  --surface: #1a211f;
  --surface-alt: #222c28;
  --ink: #e9eee8;
  --muted: #a4b2a8;
  --border: #38473e;
  --accent: #a3cbb1;
  --accent-soft: #293e32;
  --accent-ink: #172b20;
  --map: #151d19;
  --hover: #2b3b31;
  --shadow: 0 14px 40px #00000020;
  --mist: #263d31;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 30px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.7 Inter, "Noto Sans KR", "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent); text-underline-offset: 4px; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: .15em; font-weight: 750; }
.global-header { max-width: 1480px; margin: auto; padding: 24px 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; border-bottom: 1px solid var(--border); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 800; line-height: 1.1; letter-spacing: .1em; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 24px; letter-spacing: -.1em; padding-right: 3px; }
.wordmark-small { display: block; font-size: 9px; letter-spacing: .17em; margin-top: 6px; color: var(--muted); }
.global-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; font-size: 13px; }
.global-header nav > a { text-decoration: none; color: var(--muted); }
.global-header nav > a:hover { color: var(--accent); }
.theme-control { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); }
.theme-control select, .quiet-button { border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--ink); padding: 6px 10px; width: auto; margin: 0; font-size: 12px; }
.global-header form { margin: 0; }
.global-footer { max-width: 1408px; margin: 48px auto 0; padding: 24px 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; letter-spacing: .07em; }
.global-live { max-width: 1408px; margin: 18px auto 0; }
.global-live, .global-footer { width: calc(100% - 72px); }
.primary-link, .secondary-link { display: inline-block; padding: 12px 18px; border-radius: 8px; text-decoration: none; font-weight: 650; font-size: 13px; }
.primary-link { background: var(--accent); color: var(--accent-ink); }
.secondary-link { color: var(--ink); background: var(--surface); border: 1px solid var(--border); }
.skip-link { position: absolute; top: -80px; left: 20px; padding: 10px; background: var(--surface); z-index: 100; }
.skip-link:focus { top: 10px; }
.lesson-note { color: var(--muted); font-size: 12px; }
body::after { content: ''; position: fixed; inset: -5%; z-index: 1000; pointer-events: none; background: radial-gradient(ellipse at 30% 35%, var(--mist), transparent 75%), radial-gradient(ellipse at 70% 70%, var(--surface), var(--mist)); opacity: 0; transform: scale(1.04); transition: opacity 600ms ease, transform 600ms ease; }
body.page-leaving::after { opacity: .98; transform: scale(1); }
body.page-arriving::after { animation: mist-arrival 700ms ease-out both; }
@keyframes mist-arrival { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { body::after { display: none; } *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 1000px) { .global-header { padding: 18px 22px; flex-wrap: wrap; } .global-header nav { gap: 14px; } .global-live, .global-footer { width: calc(100% - 44px); margin-left: 22px; margin-right: 22px; } }
@media (max-width: 600px) { .global-header nav { width: 100%; gap: 12px; } .global-header { gap: 18px; } .global-header nav > a { font-size: 12px; } }

/* 0.16 shared visual system */
:root{--page:#f3f1eb;--surface:#fffefb;--surface-alt:#eaece5;--ink:#223339;--muted:#65756e;--border:#d8dfd7;--accent:#32675b;--accent-soft:#e3eee5;--map:#f4f6f0;--hover:#e9f0e7;--shadow:0 16px 36px #253b2c0b;--mist:#e9eee7}
:root[data-theme="black"]{--page:#111b20;--surface:#19272d;--surface-alt:#213239;--ink:#e4ebe7;--muted:#a3b5b2;--border:#33484e;--accent:#a2cbbb;--accent-soft:#2a423e;--map:#142328;--hover:#2b3f43;--shadow:0 16px 36px #0002;--mist:#263b3b}
.global-header{padding-top:20px;padding-bottom:20px}.brand-mark{border-radius:9px}.global-footer{font-size:10px}.global-header nav>a{transition:color .2s ease}

body.page-leaving::before, body.page-arriving::before {
  content: "Created By ReneAcademy";
  position: fixed; inset: 0; z-index: 1001; display: grid; place-items: center;
  pointer-events: none; color: var(--ink); font-size: clamp(17px, 3vw, 29px);
  font-weight: 650; letter-spacing: .09em; text-align: center;
}
body.page-leaving::before { animation: credit-in 600ms ease both; }
body.page-arriving::before { animation: mist-arrival 700ms ease-out both; }
@keyframes credit-in { from { opacity: 0; filter: blur(5px); } to { opacity: 1; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { body.page-leaving::before, body.page-arriving::before { display: none; } }
