/* ===== BASE ===== */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ja);   /* 기본(일본어) — 아래에서 언어별로 전환 */
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* 현재 언어에 따른 기본 글꼴 (html lang 속성으로 전환) */
html[lang="ja"] body { font-family: var(--font-ja); }
html[lang="en"] body { font-family: var(--font-en-desc); }
html[lang="ko"] body { font-family: var(--font-ko); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

/* ===== 상단 바 (브랜드 + 언어 전환 + 뒤로) ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 12px var(--pad-page);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.topbar__brand {
  font-family: var(--font-en-title);   /* Cinzel */
  font-weight: 600; font-size: 20px; letter-spacing: .14em;
  color: var(--indigo); white-space: nowrap;
}
.topbar__brand small {
  display: block; font-family: var(--font-en-desc);  /* Poppins */
  font-size: 10px; letter-spacing: .3em; color: var(--ink-soft);
  text-transform: uppercase; margin-top: 0; font-weight: 500;
}
.topbar__spacer { flex: 1; }

.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--hairline); background: transparent;
  color: var(--ink); padding: 8px 14px; border-radius: 999px;
  font-size: 13px; letter-spacing: .04em;
  transition: background .15s, border-color .15s;
}
.back-btn:hover { background: var(--paper-2); border-color: var(--indigo); }

/* 언어 전환 */
.lang-switch { display: inline-flex; gap: 4px; background: var(--paper-2);
  border-radius: 999px; padding: 4px; }
.lang-switch button {
  border: 0; background: transparent; color: var(--ink-soft);
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  letter-spacing: .04em; transition: all .15s;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--indigo); color: #fff; box-shadow: 0 2px 8px var(--shadow);
}

@media (max-width: 560px) {
  .topbar__brand { font-size: 17px; }
  .topbar__brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}