/* 6164 language menu, Beta bar and language offer (lang-v1, 2026-11-17; owner design 2026-11-17).
   Shared by every page, loaded in <head> after the page's own <style>:  <link rel="stylesheet" href="lang.css">
   Behaviour lives in lang.js. Uses the page's colour tokens (--ink, --bg, --surface, --line ...), so light and
   dark mode follow the page.
   - >= 1024px (sidebar): an always-visible 2-column grid of 8 text chips (no visible caption, owner 2026-11-17;
     the list carries aria-label "Language" in the page language); the current language is filled. Sidebar spacing is a little tighter so everything fits at 1440x900 without scrolling.
   - < 1024px (top bar): a 44px round globe button just before "Join as Creator"; it opens a full-width sheet
     under the header with the same 8 languages in two columns.
   - Footer: a plain text row of the 8 languages. */

.six-lang-m .vh, .six-lang-d .vh, .six-beta .vh, .six-offer .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- sidebar (>= 1024px) ---------- */
.six-lang-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.six-lang-grid li { margin: 0; min-width: 0; }
.nav .six-lang-grid a {
  display: flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 6px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); text-decoration: none; white-space: nowrap;
  font: 600 .88rem/1.2 var(--font-body);
}
.nav .six-lang-grid a:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); text-decoration: none; }
.nav .six-lang-grid a[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
@media (min-width: 1024px) {
  .nav .side-lang.six-lang-d { display: block; padding: 10px 0 0; font-size: inherit; }
  .nav .six-lang-grid { gap: 5px; }
  /* chips show "Hello" in each language (owner 2026-11-17): .8rem keeps 안녕하세요 and こんにちは on one line in the half column */
  .nav .six-lang-grid a { min-height: 34px; padding: 0 4px; font-size: .8rem; }
  /* owner 2026-11-17: tighter sidebar so the tagline and the language grid fit at 1440x900 without scrolling
     (tap targets stay at least 36px; shorter screens may scroll the sidebar) */
  .nav .side-tag { margin: 16px 0 12px; font-size: .84rem; line-height: 1.35; }
  .nav .side-tag .st-r { margin-top: 6px; }
  .nav .side-tag .st-ico { margin-bottom: 4px; }
  .nav .side-pool, .nav .side-acct { min-height: 40px; margin-top: 6px; }
  .nav .nav-links a { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
  .nav .wordmark { margin-bottom: 20px; }
}

/* ---------- top bar (< 1024px): globe button + sheet ---------- */
.six-lang-m { display: none; }
.six-lang-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 0; padding: 0;
  border: 1px solid var(--line-strong, var(--line)); border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer;
}
.six-lang-btn:hover, .six-lang-btn[aria-expanded="true"] { background: var(--surface-2); }
.six-lang-btn svg { width: 20px; height: 20px; flex: none; }
.six-lang-sheet { list-style: none; margin: 0; }
.six-lang-sheet[hidden] { display: none !important; }
.six-lang-sheet a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font: 500 1rem/1.2 var(--font-body);
}
.six-lang-sheet a:hover { background: var(--surface-2); }
.six-lang-sheet a[aria-current="true"] { background: var(--ink); color: var(--bg); font-weight: 700; }
.six-lang-sheet .six-check { width: 16px; height: 16px; flex: none; }
.six-lang-sheet .six-lang-note { font-size: .75rem; font-weight: 500; color: var(--ink-soft); text-align: right; }
@media (max-width: 1023px) {
  .nav { position: relative; }
  .nav .six-lang-m { display: block; }
  .six-lang-sheet {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 70;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; padding: 8px 12px 12px;
    background: var(--surface); border-bottom: 1px solid var(--line); border-radius: 0 0 14px 14px;
    box-shadow: 0 14px 28px rgba(15, 18, 40, .14);
  }
  .six-lang-sheet li { margin: 0; min-width: 0; }
}
/* phones: the lockup, the globe, "Join as Creator" and the account button share row 1 */
@media (max-width: 560px) {
  .nav .wrap { column-gap: 8px; }
  .nav .six-lang-m { margin-left: auto; }
  .nav .six-lang-m ~ .btn { margin-left: 0; }
}
@media (max-width: 400px) {
  .nav .wrap > .btn-small { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 374px) {
  .nav .wrap { column-gap: 6px; }
  .nav .wrap > .btn-small { padding-left: 10px; padding-right: 10px; }
  .six-lang-btn { width: 40px; }
}

/* Japanese and Korean labels are wider per character: keep row 1 of the phone top bar on one line */
@media (max-width: 400px) {
  html[lang="ja"] .nav .wrap > .btn-small, html[lang="ko"] .nav .wrap > .btn-small { font-size: .82rem; }
}
/* Japanese: break headings and short lines at phrase boundaries where the browser supports it */
html[lang="ja"] :is(h1, h2, h3, .sub, .six-beta) { word-break: auto-phrase; }

/* ---------- footer: a plain text row of the 8 languages ---------- */
footer li.six-lang-foot { flex-basis: 100%; }
.six-lang-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; list-style: none; margin: 0; padding: 0; }
.six-lang-row li { margin: 0; }
footer .six-lang-row a, footer .six-lang-row a[lang] { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); font-weight: 500; text-decoration: none; }
footer .six-lang-row a:hover { color: var(--ink); text-decoration: underline; }
footer .six-lang-row a[aria-current="true"] { color: var(--ink); font-weight: 700; }

/* ---------- Beta bar (static, in Beta pages) and the language offer (added by lang.js) ---------- */
.six-beta, .six-offer {
  margin: 0; padding: 9px 16px;
  background: var(--surface-2); color: var(--ink);
  border-bottom: 1px solid var(--line);
  font: 500 var(--fs-sm, .88rem)/1.55 var(--font-body); text-align: center;
}
.six-beta b { font-weight: 700; }
.six-beta a, .six-offer a { color: var(--ink); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.six-offer { position: relative; padding-right: 52px; }
.six-offer a { margin-left: 8px; white-space: nowrap; }
.six-offer button {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-soft); font: 400 1.25rem/1 var(--font-body); cursor: pointer;
}
.six-offer button:hover { background: var(--surface); color: var(--ink); }
/* a link on a Beta page (text, header navigation, footer) that leads to a page that is only in English: the marker
   sits inline in the link after a no-break space and never wraps on its own line */
.six-en { display: inline; white-space: nowrap; font-size: .82em; font-weight: 500; color: var(--ink-soft); }
.nav .nav-links .six-en { font-size: .7em; letter-spacing: -.01em; }
.six-en-run { display: inline; min-width: 0; }
/* sidebar: a nav label that wraps with its marker (e.g. German) stays compact so the sidebar fits at 1440x900 */
@media (min-width: 1024px) { .nav .nav-links a:has(.six-en) { line-height: 1.2; } }
/* polish-v1: on phones the top bar holds the navigation in one row; the marker there is for screen readers only
   (the link keeps its title, e.g. "Talent (in English)"). Body text and the footer keep the visible marker. */
@media (max-width: 560px) {
  .nav .nav-links .six-en { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  /* longer European labels: one row that scrolls sideways instead of a second row */
  .nav nav { min-width: 0; max-width: 100%; }
  .nav .nav-links { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav .nav-links::-webkit-scrollbar { display: none; }
  .nav .nav-links > li { flex: none; position: relative; }
  .nav .nav-links a { white-space: nowrap; }
}

@media print { .six-lang-m, .six-lang-d, .six-offer { display: none !important; } }
