:root {
  --bg: #14100c;
  --card: #1d1510;
  --lacquer: #42160f;
  --lacquer-rich: #5a1d14;
  --gold: #d4a64a;
  --gold-soft: #e8c98a;
  --gold-bright: #f6e3b4;
  --line: rgba(212, 166, 74, 0.34);
  --line-subtle: rgba(212, 166, 74, 0.16);
  --text: #f3e9d7;
  --muted: #b09f86;
  --ink-on-gold: #1b130b;
  --font-serif:
    'Songti SC', 'Noto Serif SC', 'STSong', 'Source Han Serif SC', 'Baskerville',
    'Palatino Linotype', Georgia, serif;
  --font-sans:
    'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold-soft);
  text-decoration: none;
}

a:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink-on-gold);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 14px;
}

/* Unified header matching homepage */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(20, 16, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-subtle);
}

.header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-subtle);
  background: rgba(29, 21, 16, 0.92);
  -webkit-tap-highlight-color: transparent;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.lang-btn:hover {
  color: var(--gold-bright);
}

.lang-btn:active {
  background: rgba(212, 166, 74, 0.16);
}

.lang-btn:focus {
  outline: none;
}

.lang-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--gold-bright);
}

.lang-btn[aria-pressed='true'] {
  background: var(--lacquer-rich);
  color: var(--gold-bright);
  font-weight: 600;
}

.lang-btn[aria-pressed='true']:active {
  background: var(--lacquer-rich);
}

.shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 22px;
  font-size: 14px;
}

.doc-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
}

.doc-nav a[aria-current='page'] {
  color: var(--gold-bright);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 26px;
  margin-bottom: 16px;
}

.lead-card {
  background: linear-gradient(180deg, rgba(66, 22, 15, 0.52), rgba(29, 21, 16, 0.96));
  border-color: rgba(212, 166, 74, 0.55);
}

h1 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-wrap: balance;
  color: var(--gold-bright);
}

[data-lang='en'] h1 {
  letter-spacing: 0.015em;
}

h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: 0.03em;
  text-wrap: balance;
  color: var(--gold-soft);
}

[data-lang='en'] h2 {
  letter-spacing: 0.01em;
}

.updated {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.04em;
}

p {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text);
  max-width: 60ch;
  text-wrap: pretty;
}

[data-lang='en'] p {
  max-width: 560px;
}

p:last-child {
  margin-bottom: 0;
}

.inline-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line-subtle);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer .inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -10px 0;
}

.js-ready [data-lang] {
  display: none;
}

.js-ready [data-lang].is-active {
  display: block;
}

@media (max-width: 600px) {
  .header-inner {
    padding: 10px 16px;
  }

  .lang-btn {
    min-height: 44px;
    padding: 0 10px;
  }

  .shell {
    padding: 18px 16px 56px;
  }

  .card {
    padding: 20px 18px;
  }
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin: 16px 0 0;
}

.open-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink-on-gold);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.open-app:hover {
  color: var(--ink-on-gold);
  text-decoration: none;
  filter: brightness(1.06);
}

.open-app:focus {
  outline: none;
}

.open-app:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold-bright);
}

.open-app.play {
  background: transparent;
  color: var(--gold-soft);
  border-color: var(--line);
  filter: none;
}

.open-app.play:hover {
  color: var(--gold-bright);
  border-color: var(--gold-soft);
  filter: none;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.review-note {
  color: var(--muted);
  font-size: 14px;
}

.review-fallback {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.review-fallback-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

.review-fallback-link:hover {
  color: var(--gold-soft);
}

.review-fallback-link:focus {
  outline: none;
}

.review-fallback-link:focus-visible {
  outline: none;
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--gold-bright);
}

@media (max-width: 600px) {
  .review-actions {
    flex-direction: column;
  }

  .open-app {
    width: 100%;
  }
}

@media print {
  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  .site-header {
    position: static;
    background: #fff !important;
    border-bottom: 1px solid #ccc;
    backdrop-filter: none;
  }

  .card,
  .lead-card {
    background: #fff !important;
    border-color: #ccc !important;
  }

  h1,
  h2,
  p,
  .updated,
  .brand-name,
  .footer,
  .footer div,
  a {
    color: #111 !important;
  }

  .skip-link,
  .lang-switch,
  .doc-nav {
    display: none !important;
  }
}
