@font-face {
  font-family: 'Zen Maru Gothic';
  src: url('assets/fonts/zen-maru-gothic-400.woff2?v=score-1') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Zen Maru Gothic';
  src: url('assets/fonts/zen-maru-gothic-500.woff2?v=score-1') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Zen Maru Gothic';
  src: url('assets/fonts/zen-maru-gothic-700.woff2?v=score-1') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* Japanese uses one rounded family; the wordmark and typing targets keep their Latin faces. */
html[lang='ja'] {
  --sans: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  --serif: var(--sans);
}
html[lang='ja'] body {
  font-weight: 500;
  letter-spacing: .025em;
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}
.wordmark { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
html[lang='ja'] :is(h1, h2, h3, strong, .primary-button, .hub-play) {
  font-weight: 700;
  font-style: normal;
  letter-spacing: .015em;
}
html[lang='ja'] :is(.eyebrow, .section-label, .hub-eyebrow, .hub-picture-label, .hub-game-tag, .stat-label, .practice-topline, .result-eyebrow, .adventure-toolbar, .scene-topline, .scene-bottomline) {
  letter-spacing: .035em;
  font-weight: 500;
}
html[lang='ja'] :is(.hub-greeting > span, .hub-next-title, .scene-message, .stats-note, .site-footer) {
  font-style: normal;
  letter-spacing: .025em;
}
html[lang='ja'] :is(.site-header nav a, .site-header nav button, .language-picker select) {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .015em;
}
html[lang='ja'] .world-hub h1 {
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.5;
  text-wrap: balance;
}
html[lang='ja'] .world-hub h2 {
  font-size: clamp(23px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: .025em;
}
html[lang='ja'] .world-hub :is(.hub-eyebrow, .hub-game-tag) { font-size: 12px; }
html[lang='ja'] .world-hub .hub-intro { font-size: 16px; line-height: 1.9; color: #6a795f; }
html[lang='ja'] .world-hub .hub-description { font-size: 15px; line-height: 1.95; color: #6d785f; }
html[lang='ja'] .world-hub .hub-greeting > span { font-size: 13px; line-height: 1.6; }
html[lang='ja'] .world-hub .hub-picture-label { font-size: 11px; line-height: 1.5; padding: 7px 12px; }
html[lang='ja'] .world-hub .hub-play { font-size: 16px; font-weight: 700; }
html[lang='ja'] .world-hub .hub-progress { font-size: 12px; }
html[lang='ja'] .world-hub .hub-next-title { font-size: 13px; }
html[lang='ja'] .world-hub .hub-future h3 { font-size: 14px; font-weight: 700; }
html[lang='ja'] .world-hub .hub-future span { font-size: 11px; }
html[lang='ja'] .world-hub .hub-footnote { font-size: 12px; }
html[lang='ja'] #adventure-panel .intro h1 {
  font-size: clamp(29px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: .02em;
}
html[lang='ja'] #adventure-panel .intro-note p { font-size: 14px; line-height: 1.95; }
html[lang='ja'] .intro-note > span { font-size: 11px; letter-spacing: .02em; }
html[lang='ja'] .mission-card h2 { font-size: 21px; font-weight: 700; line-height: 1.5; letter-spacing: .015em; }
html[lang='ja'] .mission-card p { font-size: 13px; line-height: 1.9; }
html[lang='ja'] :is(.mission-card > span, .friend-row div span, .daily-note div > span) { font-size: 11px; line-height: 1.7; }
html[lang='ja'] :is(.friend-row strong, .order-list li strong) { font-size: 13px; }
html[lang='ja'] .order-list li div > span { font-size: 11px; line-height: 1.7; }
html[lang='ja'] .scene-message { font-size: 14px; font-weight: 500; line-height: 1.75; }
html[lang='ja'] .scene-bottomline { font-size: 10px; }
html[lang='ja'] .typing-area p { font-size: 14px; line-height: 1.8; }
html[lang='ja'] .typing-area .order-prompt { font-size: 16px; font-weight: 700; }
html[lang='ja'] .word-reading { font-size: 25px; font-weight: 700; line-height: 1.7; letter-spacing: .055em; }
html[lang='ja'] .practice-footer > span { font-size: 11px; letter-spacing: .015em; }
html[lang='ja'] .practice-footer button { font-size: 11px; }
html[lang='ja'] :is(.stat-label, .stats-note) { font-size: 11px; line-height: 1.7; }
html[lang='ja'] :is(.game-stats strong, .result-stats strong) { font-family: var(--mono); font-weight: 500; letter-spacing: -.02em; }
html[lang='ja'] :is(.result-card h2, .pause-layer h2, #dialog-content h2) { font-size: 28px; line-height: 1.55; letter-spacing: .015em; }
html[lang='ja'] :is(.result-card > p, .pause-layer p, #dialog-content p, #dialog-content li) { font-size: 14px; line-height: 1.9; }
html[lang='ja'] .how-strip p { font-size: 12px; line-height: 1.8; }
html[lang='ja'] .sound-heading h2 { font-size: 23px; font-weight: 700; letter-spacing: .02em; }
html[lang='ja'] .sound-panel > p { font-size: 12px; line-height: 1.8; }
html[lang='ja'] .sound-toggle { font-size: 14px; font-weight: 700; }
html[lang='ja'] .sound-panel .sound-status { font-size: 11px; }
html[lang='ja'] .sound-actions .text-button { font-size: 12px; }

@media (max-width: 800px) {
  html[lang='ja'] .order-list li { padding: 10px 8px; }
  html[lang='ja'] #adventure-panel .order-list li div > span { font-size: 11px; }
  html[lang='ja'] .order-list li strong { font-size: 12px; }
}
@media (max-width: 520px) {
  html[lang='ja'] :is(.site-header nav button, .language-picker select) { font-size: 11px; }
  html[lang='ja'] .world-hub h1 { font-size: clamp(24px, 6.7vw, 29px); letter-spacing: 0; }
  html[lang='ja'] .world-hub h2 { font-size: 24px; }
  html[lang='ja'] .world-hub .hub-eyebrow { font-size: 11px; }
  html[lang='ja'] .world-hub .hub-intro { font-size: 14px; }
  html[lang='ja'] .world-hub .hub-description { font-size: 14px; }
  html[lang='ja'] .world-hub .hub-picture-label { font-size: 10px; }
  html[lang='ja'] #adventure-panel .intro h1 { font-size: 29px; }
  html[lang='ja'] #adventure-panel .order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
  html[lang='ja'] #adventure-panel .order-list li { flex-direction: row; align-items: center; gap: 8px; padding: 9px 7px; }
  html[lang='ja'] .scene-topline { font-size: 9px; }
  html[lang='ja'] #adventure-panel .scene-message { font-size: 12px; width: max-content; max-width: 90%; line-height: 1.65; }
  html[lang='ja'] #adventure-panel .scene-bottomline { font-size: 10px; }
  html[lang='ja'] #adventure-panel .scene-bottomline > span:first-child { display: none; }
  html[lang='ja'] #adventure-panel .typing-area p { font-size: 12px; }
  html[lang='ja'] #adventure-panel .typing-area .order-prompt { font-size: 13px; }
  html[lang='ja'] .word-reading { font-size: 23px; }
  html[lang='ja'] #adventure-panel .current-token { font-size: clamp(23px, 7.2vw, 32px); }
  html[lang='ja'] #adventure-panel .practice-footer > span { font-size: 11px; }
  html[lang='ja'] #adventure-panel .practice-footer button { font-size: 11px; }
  html[lang='ja'] .stat-label { font-size: 10px; letter-spacing: 0; }
  html[lang='ja'] :is(.result-card h2, .pause-layer h2, #dialog-content h2) { font-size: 25px; }
  html[lang='ja'] .sound-heading h2 { font-size: 22px; }
}
