/* Language switcher (both languages) and the English typography. Served as /lang.css only when a second language is
   enabled in content/languages.json, so that the Japanese-only build stays as it is. */
.lang{position:relative;flex:none}
.bar .lang{order:3}
.lang>summary{display:flex;align-items:center;justify-content:center;gap:8px;min-width:44px;height:44px;padding-inline:12px;border-radius:var(--pill);background:var(--card);box-shadow:var(--sh);font-size:.8125rem;font-weight:700;line-height:1.2;cursor:pointer;list-style:none;white-space:nowrap}
.lang>summary::-webkit-details-marker{display:none}
.lang>ul{position:absolute;z-index:10;inset-inline-end:0;inset-block-start:52px;inline-size:min(336px,calc(100vw - 24px));padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border:1px solid var(--line);border-radius:var(--r);background:var(--card);box-shadow:var(--sh2)}
.lang li>a,.lang li>.cur{display:flex;flex-direction:column;justify-content:center;min-height:56px;block-size:100%;padding:4px 12px;border-radius:var(--ri);background:var(--soft);font-weight:700;line-height:1.5}
.lang li>a{text-decoration:none}
.lang li>a:hover{text-decoration-line:underline}
.lang li>.cur{background:var(--acc);color:#fff}
.lang .now{font-size:var(--t-label)}

/* ---- English pages: Latin faces first ---- */
html:lang(en){--sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Hiragino Sans","Noto Sans JP",sans-serif}
html:lang(en) body{line-break:auto;overflow-wrap:break-word;line-height:1.7}
html:lang(en) .prose{line-height:1.7}
html:lang(en) .disp{font-size:clamp(2.25rem,10vw,3.25rem);word-break:normal;overflow-wrap:break-word;text-wrap:balance}
html:lang(en) .disp em{display:inline}
html:lang(en) .disp i{position:static;width:auto;height:auto;clip-path:none;font-style:normal}
html:lang(en) .wp .tp-wrap td,html:lang(en) .wp .tp-wrap th,html:lang(en) .wp .tbl-wrap td,html:lang(en) .wp .tbl-wrap th,html:lang(en) .wp .tp-wrap td *,html:lang(en) .wp .tbl-wrap td *{overflow-wrap:break-word}
/* picture captions are tables in the old markup: a long address in one must still break, or the picture cannot shrink */
html:lang(en) .wp .wpcap{overflow-wrap:anywhere}
html:lang(en) .wm [lang="ja"]{font-family:"Hiragino Sans","Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic",sans-serif}
html:lang(en) .prose [lang="ja"]{font-family:"Hiragino Sans","Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic",sans-serif}
html:lang(en) .ad::before{content:"Advertisement"}
html:lang(en) .wp details.accordion>summary::after{content:" (click to read more)"}
html:lang(en) .wp details.accordion[open]>summary::after{content:""}
