.site-language-control { display: inline-flex; align-items: center; gap: 8px; color: inherit; font: 500 14px/1.4 Arial, sans-serif; pointer-events: auto; flex-shrink: 0; }
.site-language-control select { font: inherit; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 5px; min-height: 36px; padding: 5px 8px; cursor: pointer; }
.site-language-control option { color: #22242c; background: #fff; }
/* Text metrics and direction are shared by every official website page. */
#locale, [data-site-locale] { font-family: inherit; letter-spacing: normal; text-align: start; field-sizing: content; width: auto; max-width: min(32rem,calc(100vw - 48px)); }
/* Let long two-name selections fit without clipping the header or navigation. */
.header-inner:has(#locale) { flex-wrap: wrap; row-gap: 8px; padding-block: 10px; }
.site-header:has(#locale) { height: auto; }
.header-tools, .contact-header-tools, .header-links { flex-wrap: wrap; }
:is(header,body[data-language-page="artwork01"] > nav):has(> .site-language-control) { flex-wrap: wrap; }
body:is([data-language-page="terms"],[data-language-page="privacy"]) .glass-nav > div { flex-wrap: wrap; gap: 12px; height: auto; min-height: 80px; padding-block: 12px; }
body:is([data-language-page="bakashiyashiki"],[data-language-page="sand_racer"]) .site-header { height: auto; min-height: var(--header); padding-block: 10px; }
body[data-language-page="music"] .header-inner { flex-wrap: wrap; row-gap: 10px; padding-block: 10px; }
/* Supporting browsers can wrap the open list while retaining native select semantics. */
@supports (appearance: base-select) {
  #locale, [data-site-locale] { appearance: base-select; anchor-name: --site-language-menu; gap: 6px; }
  #locale::picker-icon, [data-site-locale]::picker-icon { inline-size: 12px; flex-shrink: 0; }
  #locale::picker(select), [data-site-locale]::picker(select) {
    appearance: base-select; color: #22242c; background: #fff;
    border: 1px solid #adb3be; border-radius: 8px;
    inline-size: min(32rem,calc(100dvw - 24px)); max-inline-size: min(32rem,calc(100dvw - 24px));
    max-block-size: min(28rem,70dvh); overflow-y: auto; font: 400 14px/1.5 system-ui,sans-serif;
  }
  #locale option, [data-site-locale] option { display: block; padding: 8px 12px; white-space: normal; overflow-wrap: anywhere; text-align: start; }
  #locale option:is(:hover,:focus,:checked), [data-site-locale] option:is(:hover,:focus,:checked) { background: #eef1f6; }
  @media (max-width: 760px) {
    #locale::picker(select), [data-site-locale]::picker(select) {
      position-area: none; inset-inline: 12px; inset-block-start: anchor(--site-language-menu bottom); inset-block-end: auto;
      position-try-fallbacks: flip-block; min-inline-size: 0;
    }
  }
}
html:not([lang="ja"]) body { overflow-wrap: break-word; }
html:lang(zh-Hans) body { font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
html:lang(zh-Hant) body { font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; }
html:lang(ko) body { font-family: "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
html:lang(hi) body { font-family: "Nirmala UI", "Noto Sans Devanagari", system-ui, sans-serif; line-height: 1.8; }
html:lang(bn) body { font-family: "Nirmala UI", "Vrinda", "Noto Sans Bengali", system-ui, sans-serif; line-height: 1.8; }
html:lang(th) body { font-family: "Leelawadee UI", "Noto Sans Thai", system-ui, sans-serif; line-height: 1.8; }
html:lang(ar) body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif; line-height: 1.8; }
html:lang(he) body { font-family: "Segoe UI", Arial, "Noto Sans Hebrew", sans-serif; line-height: 1.8; }
html:is(:lang(ar),:lang(he)) :is(h1,h2,h3,p,a,button,label,select) { letter-spacing: normal; }
html[dir="rtl"] :is(input,textarea,.track-row,.sc-analytics-consent,.hero-copy,.product-description,.contact-field,.legal-content,dt,dd) { text-align: start; }
html[dir="rtl"] .contact-trap { left: 0; clip-path: inset(50%); }
html[dir="rtl"] :is(.desktop-nav,.header-tools,.contact-header-tools) { margin-left: 0; margin-inline-start: auto; }
html[dir="rtl"] .footer-tagline { margin-left: 0; margin-inline-start: 48px; }
html[dir="rtl"] .hero-copy { padding-left: 0; padding-inline-start: 24px; }
html[dir="rtl"] .brand > span:has(.brand-dot) { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] :is(.price,.product-price,.work-price,.order-id,#withdrawal-order,input[type="email"],input[type="url"]) { direction: ltr; unicode-bidi: isolate; }
.checkout-language-notice { padding: 12px 16px; border-inline-start: 3px solid currentColor; background: #f4f6fa; line-height: 1.7; }
@media(max-width:760px) {
  html[dir="rtl"] .hero-copy { padding-inline-start: 0; }
  html[dir="rtl"] .footer-tagline { margin-inline-start: 0; }
}
@media(max-width:520px) {
  html[dir="rtl"] .hero-media { left: -9px; right: auto; }
}
.site-language-control select:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.site-language-control .language-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body[data-language-page$="_hp"] > header { gap: 16px; }
body[data-language-page$="_hp"] > header h1 { min-width: 0; }
body[data-language-page$="_hp"] > header nav { margin-left: auto; }
.sketch-language { position: absolute; top: 20px; right: 24px; }
html:not([lang="ja"]) .vertical-text { writing-mode: horizontal-tb; text-orientation: mixed; }
html:not([lang="ja"]) body[data-language-page="artwork01"] header > .z-10 { flex-direction: column; height: auto; max-width: 850px; padding: 0 28px; gap: 24px; }
html:not([lang="ja"]) body[data-language-page="artwork01"] header h1.vertical-text { height: auto; border: 0; padding: 0; line-height: 1.35; letter-spacing: 0; }
html:not([lang="ja"]) body[data-language-page="artwork01"] header p.vertical-text { height: auto; letter-spacing: .04em; }
html:not([lang="ja"]) .hero-content h1, html:not([lang="ja"]) .hero-line { overflow-wrap: normal; }
html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] .brand { font-size: clamp(16px, 1.5vw, 24px); letter-spacing: .025em; white-space: normal; max-width: 340px; }
html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] h1 span { white-space: normal; }
html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] .hero-content h1 { font-size: clamp(36px, 4vw, 62px); }
html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] .hero-tagline { white-space: normal; letter-spacing: .035em; }
html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] .site-nav { letter-spacing: .025em; gap: 24px; }
html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] .information-intro h2 { white-space: normal; font-size: clamp(26px, 2.8vw, 40px); line-height: 1.35; }
body[data-language-page="bakashiyashiki"] .site-header { gap: 20px; }
body[data-language-page="bakashiyashiki"] :is(.information-intro,.information-table,.step-title h3) { min-width: 0; }
body[data-language-page="bakashiyashiki"] .information-table > div { grid-template-columns: 130px minmax(0,1fr); }
body[data-language-page="bakashiyashiki"] .character-tabs { grid-template-columns: repeat(5,minmax(0,1fr)); }
html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] .hero-content h1 { overflow-wrap: anywhere; }
html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] .step-title h3 { overflow-wrap: anywhere; }
body[data-language-page="bakashiyashiki"] .controls summary { gap: 12px; }
body[data-language-page="bakashiyashiki"] .controls summary span { flex: 0 0 18px; }
body[data-language-page="eureka"] .navigation { gap: 20px; }
body[data-language-page="eureka"] .navigation nav { margin-left: auto; gap: 24px; }
html:not([lang="ja"]) body[data-language-page="sand_racer"] .site-header { gap: clamp(12px,1.5vw,24px); }
html:not([lang="ja"]) body[data-language-page="sand_racer"] .site-nav { min-width: 0; gap: clamp(12px,2vw,28px); }
html:not([lang="ja"]) body[data-language-page="sand_racer"] .site-nav a { white-space: normal; line-height: 1.4; }
@media (max-width: 1100px) {
  body[data-language-page="bakashiyashiki"] .information-table > div { grid-template-columns: 100px minmax(0,1fr); }
  body[data-language-page$="_hp"] > header nav { display: none; }
  body[data-language-page$="_hp"] > header .site-language-control { margin-left: auto; }
  body[data-language-page$="_hp"] > header .game-site-nav-toggle { display: block; }
  body[data-language-page$="_hp"] #mobile-menu:not(.hidden) { display: block; }
  body[data-language-page="sand_racer"] .site-header { gap: 20px; }
  body[data-language-page="sand_racer"] .header-status { display: none; }
  body[data-language-page="bakashiyashiki"] .site-nav { gap: 15px; font-size: 14px; }
  body[data-language-page="bakashiyashiki"] .site-nav .nav-info { padding-inline: 12px; }
}
@media (max-width: 760px) {
  body:is([data-language-page="terms"],[data-language-page="privacy"]) .glass-nav > div { min-height: 64px; }
  body:is([data-language-page="terms"],[data-language-page="privacy"]) .site-language-control { order: 3; }
  body[data-language-page="bakashiyashiki"] .information-table > div { grid-template-columns: 91px minmax(0,1fr); }
  body[data-language-page$="_hp"] > header { padding-inline: 16px; gap: 12px; }
  body[data-language-page$="_hp"] > header h1 { font-size: 20px; line-height: 1.25; }
  .site-language-control { font-size: 12px; gap: 4px; }
  .site-language-control select { min-height: 36px; padding-inline: 5px; }
  body[data-language-page="bakashiyashiki"] .site-nav { top: 100%; }
  body[data-language-page="music"] .header-links { gap: 8px; }
  body[data-language-page="music"] .brand-section { font-size: 16px; }
  body[data-language-page="music"] .music-brand { gap: 7px; }
  body[data-language-page="eureka"] .navigation { flex-wrap: wrap; gap: 14px; }
  body[data-language-page="eureka"] .navigation nav { order: 3; width: 100%; justify-content: space-between; }
  html:not([lang="ja"]) body[data-language-page="eureka"] .title-subtitle { font-size: clamp(14px, 4vw, 24px); }
  html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] .hero-content h1 { font-size: clamp(34px, 9vw, 56px); letter-spacing: .02em; line-height: 1.22; }
  html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] .brand { font-size: 13px; max-width: 180px; line-height: 1.3; }
  html:not([lang="ja"]) body[data-language-page="bakashiyashiki"] .character-tabs button { white-space: normal; font-size: 12px; line-height: 1.4; letter-spacing: 0; }
  html:not([lang="ja"]) body[data-language-page="sand_racer"] #hero-title { font-size: clamp(38px, 10vw, 64px); letter-spacing: -.025em; }
  body[data-language-page="sand_racer"] .site-language-control { margin-left: auto; }
  body[data-language-page="sand_racer"] .site-header { gap: 12px; padding-inline: 16px; }
  body[data-language-page="bakashiyashiki"] .site-header { justify-content: space-between; gap: 10px; }
  body[data-language-page="bakashiyashiki"] .brand { margin-right: auto; }
  body[data-language-page="bakashiyashiki"] .site-language-control { order: 1; }
  body[data-language-page="bakashiyashiki"] .menu-toggle { order: 2; }
  body[data-language-page="music"] .header-links > a:first-child { display: none; }
  body[data-language-page="artwork02"] > header { padding-top: 88px; }
}
@media (max-width: 359px) {
  body[data-language-page="music"] .header-inner { gap: 10px; }
  body[data-language-page="music"] .brand-name { font-size: 22px; }
  body[data-language-page="sand_racer"] .site-header { gap: 8px; }
  body[data-language-page="sand_racer"] .site-header .wordmark { font-size: 24px; }
}
