@font-face {
  font-family: "Fresco Thai";
  src: url("assets/noto-sans-thai.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
.language-switch {
  position: fixed;
  z-index: 120;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 7px;
  border: 1px solid #a4a08280;
  border-radius: 30px;
  background: #fbf7eff0;
  color: var(--ink);
  box-shadow: 0 2px 12px #585b2f0c;
  font: 12px var(--serif);
}
.language-switch button {
  min-width: 40px;
  min-height: 36px;
  padding: 7px 8px;
  color: var(--muted-ink);
  font-family: "Fresco Thai", var(--serif);
  border-radius: 20px;
}
.language-switch button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.language-switch > span {
  opacity: 0.35;
}
html[lang="th"] body {
  font-family: "Fresco Thai", var(--serif);
}
html[lang="th"] .caps,
html[lang="th"] .outline,
html[lang="th"] .open-hint {
  letter-spacing: 0.02em;
}
html[lang="th"] h2 {
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.6;
}
html[lang="th"] .hero h1 {
  line-height: 1.4;
  font-size: 34px;
}
html[lang="th"] .hero .venue {
  font-size: 19px;
  line-height: 1.7;
}
html[lang="th"] .hero .caps {
  font-size: 12px;
  letter-spacing: 0.02em;
}
html[lang="th"] .welcome h2 {
  line-height: 1.55;
}
html[lang="th"] .timeline li div {
  line-height: 1.75;
}
html[lang="th"] .outline {
  font-size: 13px;
}
html[lang="th"] .open-hint {
  white-space: nowrap;
  font-size: 13px;
}
html[lang="th"] .story-copy {
  font-size: 23px;
  line-height: 1.9;
}
.choice > span {
  margin-left: 5px;
}
@media (max-width: 480px) {
  html[lang="th"] .hero .venue {
    font-size: 16px;
  }
  html[lang="th"] .hero h1 {
    font-size: 29px;
  }
  html[lang="th"] .hero-copy {
    width: min(320px, 86vw);
  }
  html[lang="th"] .welcome h2 {
    font-size: 29px;
  }
  html[lang="th"] .welcome-copy > p:not(.caps):not(.welcome-hashtag) {
    font-size: 12px;
  }
}
/* Keep complete Thai venue / ceremony terms readable inside the painted frame. */
@media (max-width: 600px) {
  html[lang="th"] .celebration-copy .venue-full {
    font-size: 16px !important;
    line-height: 1.8 !important;
    max-width: 250px !important;
  }
  html[lang="th"] .celebration .time {
    font-size: 18px;
    line-height: 1.7;
    max-width: 260px;
  }
  html[lang="th"] .celebration .time .ceremony-name {
    white-space: nowrap;
  }
}
@media (max-width: 360px) {
  html[lang="th"] .celebration-copy .venue-full {
    font-size: 14px !important;
    max-width: 225px !important;
  }
  html[lang="th"] .celebration .time {
    font-size: 16px;
    max-width: 230px;
  }
}

/* Modern Thai sans; English retains the original Antic Didone typography. */
[lang="th"] {
  font-family: "Fresco Thai", Arial, sans-serif;
}
html[lang="th"] body {
  font-family: "Fresco Thai", Arial, sans-serif;
  font-weight: 400;
}
.language-switch button[data-language="en"] {
  font-family: var(--serif);
}
html[lang="th"] .hero h1,
html[lang="th"] h2,
html[lang="th"] h3 {
  font-weight: 400;
}

/* Effective touch targets, retaining the existing compact language labels. */
.language-switch button {
  min-width: 44px;
  min-height: 44px;
}

/* Venue stays on the parchment when Safari chrome leaves a short viewport.
   Compress the reading rhythm below the logo, never move/scale the artwork. */
.hero .venue {
  color: #414326;
}
@media (max-width: 600px) and (max-height: 840px) {
  .hero h1.couple-logo-heading {
    margin-bottom: 8px;
  }
  .hero-copy > p.caps:not(.held) {
    margin-bottom: 8px;
  }
  .hero .date .caps {
    line-height: 1.5;
  }
  .hero .held {
    margin: 8px 0 3px;
  }
  .hero .venue {
    width: min(260px, 72vw);
    margin-inline: auto;
    line-height: 1.3;
  }
  html[lang="th"] .hero .venue {
    font-size: 15px;
    line-height: 1.5;
  }
}
/* The narrow logo has a deliberate 22px optical offset; retain its clearance. */
@media (max-width: 360px) and (max-height: 840px) {
  .hero h1.couple-logo-heading {
    margin-bottom: 26px;
  }
}
/* Thai's taller glyph metrics need their own short-screen rhythm, not a
   translated English stack that runs into the painted castle. */
@media (min-width: 361px) and (max-width: 600px) and (max-height: 840px) {
  html[lang="th"] .hero h1.couple-logo-heading {
    margin-bottom: 4px;
  }
  html[lang="th"] .hero-copy > p.caps:not(.held) {
    line-height: 1.5;
    margin-bottom: 4px;
  }
  html[lang="th"] .hero .date .caps {
    line-height: 1.3;
  }
  html[lang="th"] .hero .held {
    margin: 2px 0 0;
  }
}
@media (max-width: 600px) and (min-height: 841px) {
  html[lang="th"] .hero .held {
    margin-top: 12px;
  }
}
