/* Tale Ember 공개 웹사이트(ARCH-103). 글꼴 = 앱과 같은 도트(픽셀) 폰트의 사이트 글자 서브셋(fonts/*.woff2 —
   scripts/prepare_assets.py). 언어별 순서는 앱 기본 폰트(font_catalog)를 따르고, 도트 폰트에 없는 글자(태국 문자·데바나가리 등)는
   시스템 Noto 계열로 넘긴다. 언어별 순서는 prepare_assets.py STACKS 와 같아야 한다(web 테스트가 대조).
   방향 의존 속성은 논리 속성(inline/block)만 써서 아랍어(rtl)에서도 그대로 맞는다. */
:root {
  --bg: #fbf9fe;
  --surface: #ffffff;
  --text: #1d1730;
  --muted: #5b5370;
  --accent: #5b2bd1;
  --accent-text: #ffffff;
  --border: #e3dcf2;
  --notice-bg: #fff4e0;
  --notice-text: #5a3a00;
  --focus: #ff8a00;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14111d;
    --surface: #1d1828;
    --text: #ece8f6;
    --muted: #b3aac8;
    --accent: #b79bff;
    --accent-text: #14111d;
    --border: #352d48;
    --notice-bg: #3a2a10;
    --notice-text: #ffe2b0;
  }
  /* 보라색 로고가 어두운 배경에 묻히지 않게 밝은 바탕을 깐다 */
  .brand img { background: #f3eefc; border-radius: 10px; padding-block: 4px; padding-inline: 8px; }
}
@font-face { font-family: "TE Fusion Latin"; src: url("/fonts/fusion-latin.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "TE Galmuri"; src: url("/fonts/galmuri.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "TE Galmuri"; src: url("/fonts/galmuri-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "TE Fusion Ja"; src: url("/fonts/fusion-ja.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "TE Fusion Zh"; src: url("/fonts/fusion-zh.woff2") format("woff2"); font-display: swap; }
/* VT323 은 같은 font-size 에서 글자가 다른 도트 폰트보다 작게 그려져 크기를 맞춘다 */
@font-face { font-family: "TE VT323"; src: url("/fonts/vt323.woff2") format("woff2"); font-display: swap; size-adjust: 125%; }
@font-face { font-family: "TE Plain"; src: url("/fonts/plain.woff2") format("woff2"); font-display: swap; }
:root { --font-system: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans KR", "Noto Sans JP", "Noto Sans SC", "Noto Sans Thai", "Noto Sans Devanagari", "Noto Sans Arabic", sans-serif; }
html { --font-px: "TE Fusion Latin", "TE Plain", "TE Fusion Zh"; }
html[lang="ko"] { --font-px: "TE Galmuri", "TE Fusion Latin", "TE Plain", "TE Fusion Zh"; }
html[lang="ja"] { --font-px: "TE Fusion Ja", "TE Plain", "TE Fusion Zh"; }
html[lang="zh"] { --font-px: "TE Fusion Zh", "TE Plain"; }
html[lang="vi"] { --font-px: "TE VT323", "TE Plain", "TE Fusion Zh"; }
html[lang="ar"] { --font-px: "TE Plain", "TE Fusion Latin", "TE Fusion Zh"; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-px), var(--font-system);
  /* 도트 폰트는 12px 격자라 1.5배(18px)에서 고해상도 화면은 또렷하다 */
  font-size: 18px;
  line-height: 1.7;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.skip {
  position: absolute; inset-inline-start: 8px; inset-block-start: -48px;
  background: var(--accent); color: var(--accent-text); padding: 8px 12px; border-radius: 6px; z-index: 10;
}
.skip:focus { inset-block-start: 8px; }
.site-header, main, .site-footer { max-inline-size: 52rem; margin-inline: auto; padding-inline: 1rem; }
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding-block: 1rem; border-block-end: 1px solid var(--border);
}
.brand img { display: block; block-size: 64px; inline-size: auto; }
@media (max-width: 30rem) { .brand img { block-size: 52px; } }
.site-nav ul, .langs ul, .doc-links ul, .stores { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.site-nav a { text-decoration: none; font-weight: 600; }
.site-nav a:hover { text-decoration: underline; }
main { padding-block: 1.5rem 3rem; }
h1 { font-size: 1.8rem; line-height: 1.3; margin-block: 0.5rem 1rem; }
h2 { font-size: 1.3rem; margin-block: 2rem 0.75rem; }
h3 { font-size: 1.1rem; margin-block: 1.5rem 0.5rem; }
.hero h1 { font-size: 2.2rem; margin-block-end: 0.25rem; }
.tagline { font-size: 1.2rem; color: var(--muted); margin-block-start: 0; }
.features { padding-inline-start: 1.25rem; }
.store-section, .doc-links { margin-block-start: 2rem; }
.store {
  display: inline-block; padding: 0.6rem 1.1rem; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 700;
}
.notice { background: var(--notice-bg); color: var(--notice-text); padding: 0.75rem 1rem; border-radius: 8px; }
.meta { color: var(--muted); font-size: 0.95rem; }
blockquote { margin: 1rem 0; padding: 0.5rem 1rem; border-inline-start: 4px solid var(--border); color: var(--muted); }
code { font-family: var(--font-px), ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 0 0.25em; }
.table-wrap { overflow-x: auto; margin-block: 1rem; }
table { border-collapse: collapse; inline-size: 100%; font-size: 0.92rem; background: var(--surface); }
th, td { border: 1px solid var(--border); padding: 0.5rem 0.6rem; text-align: start; vertical-align: top; }
th { background: var(--bg); }
.site-footer { border-block-start: 1px solid var(--border); padding-block: 1.5rem 2.5rem; color: var(--muted); font-size: 0.95rem; }
.langs-title { font-size: 0.95rem; margin-block: 0 0.5rem; }
.langs a[aria-current="true"] { font-weight: 700; text-decoration: none; color: var(--text); }
.fonts { font-size: 0.8rem; }
.copy { margin-block-end: 0; }
@media (max-width: 30rem) {
  h1 { font-size: 1.5rem; }
  .hero h1 { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
