/* 다국어판(2026-11-16): 언어 바꾸기 메뉴 + 언어별 글꼴·줄바꿈. 모든 쪽(한국어 잡지형·번역판 옛 틀)이 같이 쓴다.
   다른 스타일 파일을 건드리지 않으려고 따로 둔다(lib/lang-menu.cjs 가 그리는 .lmenu·.lrow). */

/* ---------- 머리: 지구 단추 + 내려오는 목록 (휴대폰에서도 보임, 누를 곳 44px) ---------- */
.lmenu { position: relative; display: inline-flex; flex: none; }
.lmenu__btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; height: 44px; padding: 0 8px; cursor: pointer; list-style: none; font-weight: 700; font-size: 13px; letter-spacing: .04em; color: inherit; border-radius: 6px; user-select: none; -webkit-tap-highlight-color: transparent; }
.lmenu__btn::-webkit-details-marker { display: none; }
.lmenu__btn::marker { content: ''; }
.lmenu__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.lmenu__btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.lmenu[open] > .lmenu__btn { background: rgba(0, 0, 0, .06); }
.lmenu__list { position: absolute; z-index: 1000; top: calc(100% + 6px); right: 0; display: flex; flex-direction: column; min-width: 184px; max-width: calc(100vw - 32px); padding: 6px; background: #fff; color: #111; border: 1px solid #e5e5e5; border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .14); }
.lmenu__list a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 6px; font-size: 15px; font-weight: 500; color: #111; text-decoration: none; white-space: nowrap; letter-spacing: 0; }
.lmenu__list a:hover, .lmenu__list a:focus-visible { background: #f5f5f5; }
.lmenu__list a[aria-current] { font-weight: 800; }
.lmenu__list a[aria-current]::after { content: '✓'; margin-left: auto; padding-left: 12px; }

/* 옛 틀(번역판) 머리: 휴대폰에서 오른쪽 단추가 숨는 규칙(.nav__link)과 상관없이 보인다 */
.nav__right .lmenu__btn { font-size: 14px; }
/* 잡지형(한국어판) 머리 */
.hd__util .lmenu__btn { font-size: 13px; }

/* ---------- 서랍·바닥: 언어 이름 줄 ---------- */
.lrow { display: inline-flex; flex-wrap: wrap; gap: 4px 2px; align-items: center; vertical-align: middle; }
.lrow a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-weight: 500; }
.lrow a[aria-current] { font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.drawer__row .lrow, .drawer__sub .lrow, .ft__row .lrow { flex-basis: 100%; }
.drawer__row .lrow a { padding: 0 10px; }
.drawer__sub .lrow { gap: 8px; }
.drawer__sub .lrow a { padding: 0 12px; }
/* 바닥(잡지형 .ft__nav): 링크마다 margin-inline:-9px(누를 폭 넓히기)라 gap 2px 이면 「한국어English日本語」처럼 붙는다(2026-11-17 대표 지적).
   위 「검색 · 소개…」 줄과 같은 글자 간격 20px 이 되게 gap 을 준다. */
.ft__nav .lrow { gap: 4px 20px; }

/* ---------- 번역판 기사 머리: AI 번역 고지 ---------- */
.art__tr { margin-top: 12px; padding: 10px 12px; border-left: 3px solid #D4AF37; background: #f7f5ee; font-size: 13px; line-height: 1.6; color: #444; }
.art__tr a { display: inline-block; margin-top: 2px; font-weight: 700; color: #111; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 데이터 그래픽(world-*·paper-*, 16:9, 글자가 왼쪽부터) ----------
   사진용 칸(4:3·3:2·정사각에 가까운 홈 목차 칸)에 cover 로 넣으면 양옆이 잘려 「-4」「…ds to Gateshead」처럼 보인다.
   모든 판에서 그래픽은 통째로 보이게(contain) 하고 남는 칸은 그래픽 바탕색(#131313)으로 채운다. */
img[src^="/img/world-"], img[src^="/img/paper-"] { object-fit: contain !important; object-position: center !important; background-color: #131313; }

/* ---------- 언어별 글꼴·줄바꿈 ---------- */
/* 일본어·중국어: 한국어 글꼴(Noto Sans KR)로 그리면 한자 모양이 한국식이 되고 가나가 없다 → 그 나라 글꼴.
   한국어용 word-break:keep-all 은 띄어쓰기 없는 글에서 줄이 안 꺾여 넘치므로 풀어 준다. */
html:lang(ja) {
  --kr: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  --num: "Archivo", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  --display: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
}
html:lang(zh-Hans) {
  --kr: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --num: "Archivo", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
}
html:lang(ja) body, html:lang(zh-Hans) body { word-break: normal; line-break: strict; overflow-wrap: anywhere; }
html:lang(ja) :is(h1, h2, h3, .cover__q, .feature__text b, .phead h1, .mosaic__lead b, .art__title h1, .letter h2, .intro__l, .sh__text h2, .wcard__top b, .phero h1, .pcover__h, .ccard b, .aprof h1),
html:lang(zh-Hans) :is(h1, h2, h3, .cover__q, .feature__text b, .phead h1, .mosaic__lead b, .art__title h1, .letter h2, .intro__l, .sh__text h2, .wcard__top b, .phero h1, .pcover__h, .ccard b, .aprof h1) { font-weight: 800; letter-spacing: 0; }
/* 독일어·프랑스어·스페인어·이탈리아어: 긴 낱말은 음절에서 끊는다(휴대폰 제목 넘침 방지) */
/* 글자 중간 강제 끊기(anywhere·break-all) 대신 음절 하이픈으로 끊는다. 하이픈 사전이 없는 브라우저에서만 넘칠 때 낱말을 자른다(break-word). */
html:is(:lang(de), :lang(fr), :lang(es), :lang(it)) :is(h1, h2, h3, .cover__q, .phead h1, .art__title h1, .sh__text h2, .card b, .card h3, .row b, .index b, .nextup b, .nav__menu a, .rchip, .pill) { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; word-break: normal; }
/* 「Europameisterschaft」 같은 긴 낱말이 기사 머리 칸을 넓히지 않게(휴대폰 375px에서 438px까지 밀던 문제) */
html:is(:lang(de), :lang(fr), :lang(es), :lang(it)) .art__title { min-width: 0; }
/* 독·불·서·이: 제목 글꼴 Black Han Sans 에는 ä·é·ñ 같은 글자가 없어 한 낱말 안에서 글꼴이 섞인다(「scène」「Bühne」).
   그래서 이미 불러오는 Noto Sans KR 900(라틴 확장 글자 있음)으로 제목을 그린다. */
html:is(:lang(de), :lang(fr), :lang(es), :lang(it)) { --display: "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif; }
html:is(:lang(de), :lang(fr), :lang(es), :lang(it)) :is(.sh__text h2, .cover__q, .feature__text b, .phead h1, .mosaic__lead b, .art__title h1, .letter h2, .intro__l, .wcard__top b, .phero h1, .pcover__h, .pcard__ph, .ccard b, .aprof h1) { font-weight: 900; letter-spacing: -.02em; }
/* 번역판(옛 틀) 휴대폰: 기사 칸이 긴 목차·출처 줄 때문에 375px 밖으로 밀리지 않게, 검색 칸이 긴 단추 글자(Recherche·Suche)를 품게 */
@media (max-width: 900px) {
  html:not(:lang(ko)) .art__layout { grid-template-columns: minmax(0, 1fr); }
  html:not(:lang(ko)) .art__layout > * { min-width: 0; }
}
html:not(:lang(ko)) .sform input { min-width: 0; }
html:not(:lang(ko)) .sform .btn { flex: none; padding-inline: 18px; }
/* 일본어·중국어 큰 제목: 낱말(구) 단위로 줄을 바꾼다(「つくられ／ます」처럼 끊기지 않게). 지원 안 하는 브라우저는 기본 줄바꿈. */
html:lang(ja) :is(h1, h2, .intro__l, .cover__q, .art__title h1), html:lang(zh-Hans) :is(h1, h2, .intro__l, .cover__q, .art__title h1) { word-break: auto-phrase; }
html:is(:lang(de), :lang(fr), :lang(es), :lang(it)) .art__body p, html:is(:lang(de), :lang(fr), :lang(es), :lang(it)) .short__note { -webkit-hyphens: auto; hyphens: auto; }
