/* Language chooser modal (built by lang.js on a first visit). Uses the tokens from styles.css; no inline styles.
   Phone first: 320 px wide still fits, choices are 64 px tall, the sheet never scrolls sideways. */
dialog.lang-modal {
  box-sizing: border-box; width: min(420px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: auto;
  margin: auto; padding: 30px 24px 22px; border: 1px solid var(--line); border-radius: 22px;
  color: var(--ink); background: var(--cream); box-shadow: 0 40px 90px -30px rgba(52, 34, 43, .55);
  text-align: center; font-family: var(--body);
}
dialog.lang-modal::backdrop { background: rgba(52, 34, 43, .5); }
dialog.lang-modal *, dialog.lang-modal *::before, dialog.lang-modal *::after { box-sizing: border-box; }
.lang-mark { display: block; width: 56px; height: 45px; margin: 0 auto 14px; background: url("brand-lotus.svg") center / contain no-repeat; }
.lang-title { margin: 0 0 22px; font: 500 clamp(24px, 7vw, 30px)/1.15 var(--serif); color: var(--ink); text-wrap: balance; }
.lang-title span { display: block; }
.lang-title .lang-sep { display: none; }
.lang-title span:last-child { margin-top: 4px; font-style: italic; color: var(--pink-deep); }
.lang-choices { display: grid; gap: 12px; }
.lang-choice {
  display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 18px;
  font: 600 19px/1.2 var(--body); color: var(--white); background: var(--ink); border: 2px solid var(--ink); border-radius: 999px;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lang-choice + .lang-choice { color: var(--ink); background: var(--white); }
.lang-choice:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 3px; }
.lang-code { font: 600 12px/1 var(--caps); letter-spacing: .16em; opacity: .85; }
.lang-note { margin: 18px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.lang-note span { display: block; }
@media (hover: hover) and (pointer: fine) {
  .lang-choice:hover { background: var(--ink-2); border-color: var(--ink-2); }
  .lang-choice + .lang-choice:hover { background: var(--cream-2); border-color: var(--ink); }
}
@media (prefers-reduced-motion: no-preference) {
  dialog.lang-modal[open] { animation: lang-in 220ms cubic-bezier(.2, .8, .2, 1); }
  dialog.lang-modal[open]::backdrop { animation: lang-fade 220ms ease-out; }
}
@keyframes lang-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes lang-fade { from { opacity: 0; } to { opacity: 1; } }
