/* Scoped language support; existing sizing, spacing and control tokens stay authoritative. */
.theme-toggle .moon-icon { display:none; }
html[data-landscape-mode="night"] .theme-toggle .sun-icon { display:none; }
html[data-landscape-mode="night"] .theme-toggle .moon-icon { display:block; }
.language-toggle { text-decoration:none; font:inherit; font-weight:500; }
html:is([lang="zh-Hant"],[lang="zh-Hans"],[lang="ja"]) .poto-main { font-family:Arial,"PingFang TC","Microsoft JhengHei",sans-serif; }
html:is([lang="zh-Hant"],[lang="zh-Hans"],[lang="ja"]) .poto-main :is(h1,h2,h3,h4,p,button,a,dt,dd,.a-hello,.reference-manifesto,.journey-copy,.archive-statement,.ring-form-word) { font-family:Arial,"PingFang TC","Microsoft JhengHei",sans-serif; }
html:is([lang="zh-Hant"],[lang="zh-Hans"],[lang="ja"]) .poto-main :is(h1,h2,h3,h4,.reference-manifesto,.journey-copy) { letter-spacing:normal; }
html:is([lang="zh-Hant"],[lang="zh-Hans"],[lang="ja"]) .poto-main :is(.case-aside p,.archive-description,.blog-description,.case-credits dd) { line-height:1.7; word-break:normal; overflow-wrap:break-word; }
html:is([lang="zh-Hant"],[lang="zh-Hans"],[lang="ja"]) .conversation-word { white-space:normal; }
html:is([lang="zh-Hant"],[lang="zh-Hans"],[lang="ja"]) .poto-main .a-hello { overflow-wrap:anywhere; }
html:is([lang="zh-Hant"],[lang="zh-Hans"],[lang="ja"]) .case-credits dl > div { min-width:0; }

/* Same 44px target, quieter language label at the existing small-text scale. */
.poto-header .language-toggle { font-size:.8125rem; font-weight:400; letter-spacing:normal; }

/* Replay is a native button within the existing H1, preserving its layout. */
.hero-name-replay { appearance:none; display:block; width:100%; padding:0; border:0; border-radius:0; background:none; color:inherit; font:inherit; letter-spacing:inherit; line-height:inherit; text-align:inherit; cursor:pointer; }
.hero-name-replay:focus-visible { outline:2px solid currentColor; outline-offset:var(--poto-space-xs); }

/* Reuse the square control and existing spacing, radius, colour and motion tokens. */
.language-picker { position:relative; flex:none; }
.poto-header .language-picker > summary { list-style:none; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:0; padding:var(--poto-space-xs); }
.language-picker > summary::-webkit-details-marker { display:none; }
.language-options { position:absolute; top:calc(100% + var(--poto-space-sm)); right:0; width:max-content; min-width:calc(var(--poto-control-height) * 4); padding:var(--poto-space-xs); border:0; border-radius:var(--poto-card-radius); background:color-mix(in srgb,var(--poto-paper) 55%,transparent); color:var(--poto-ink); -webkit-backdrop-filter:blur(var(--poto-glass-blur)) saturate(140%); backdrop-filter:blur(var(--poto-glass-blur)) saturate(140%); box-shadow:inset 0 0 0 1px var(--poto-glass-line),var(--poto-shadow); }
.language-options a { display:flex; align-items:center; justify-content:space-between; gap:var(--poto-space-lg); min-height:var(--poto-control-height); padding:var(--poto-space-xs) var(--poto-space-sm); color:inherit; font:400 .875rem/1.4 Arial,"PingFang TC","Microsoft YaHei","Hiragino Kaku Gothic ProN",sans-serif; text-decoration:none; }
.language-options a:is(:hover,:focus-visible) { background:color-mix(in srgb,currentColor 8%,transparent); }
.language-options .language-check { width:var(--poto-space-md); height:var(--poto-space-md); opacity:0; }
.language-options [aria-current="true"] .language-check { opacity:1; }
html[lang="zh-Hans"] .poto-main :is(h1,h2,h3,h4,p,button,a,dt,dd,.a-hello,.reference-manifesto,.journey-copy,.archive-statement,.ring-form-word) { font-family:Arial,"PingFang SC","Microsoft YaHei",sans-serif; }
html[lang="ja"] .poto-main :is(h1,h2,h3,h4,p,button,a,dt,dd,.a-hello,.reference-manifesto,.journey-copy,.archive-statement,.ring-form-word) { font-family:Arial,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif; }

.language-options a { border-radius:calc(var(--poto-card-radius) - var(--poto-space-xs)); }
html[data-landscape-mode="night"] .language-options { background:var(--poto-glass); color:var(--poto-paper); }
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
 .language-options { background:color-mix(in srgb,var(--poto-paper) 92%,transparent); }
 html[data-landscape-mode="night"] .language-options { background:var(--poto-blue-deep); }
}
