/* HypeStage website. One stylesheet, no framework.
   Order: tokens, base, buttons, navigation, hero, sections, components, pages, footer. */

:root {
  --bg: #fbf6ee;
  --paper: #ffffff;
  --ink: #18163a;
  --ink-2: #57547a;
  --line: #e8dfd0;
  --violet: #5b3df5;
  --violet-deep: #3f25c7;
  --violet-soft: #ece8ff;
  --sun: #ffc531;
  --sun-deep: #d99a00;
  --like: #ff4f7b;
  --chat: #1397d6;
  --gift: #f08a00;
  --free: #0f9a63;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(24, 22, 58, 0.06), 0 12px 32px -12px rgba(24, 22, 58, 0.18);
  --font: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Noto Sans", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.3rem, 5.4vw, 4rem);
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
}
h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: var(--violet-deep);
  text-underline-offset: 3px;
}
img,
video,
svg {
  display: block;
  max-width: 100%;
}
.icon {
  flex: none;
}
:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip {
  /* Kept above the page until it has keyboard focus. (Moving it far to the left
     would make a right-to-left page scroll sideways.) */
  position: absolute;
  inset-inline-start: 8px;
  top: 8px;
  transform: translateY(-300%);
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
}
.skip:focus {
  transform: none;
}
main {
  flex: 1;
}
.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}
.wrap-narrow {
  width: min(760px, 100% - 40px);
}
.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  color: var(--ink-2);
  line-height: 1.5;
}
.muted {
  color: var(--ink-2);
  font-size: 0.95rem;
}

/* A decision that has not been made yet. Must not reach the public site. */
.ph {
  display: inline;
  padding: 1px 8px;
  border: 2px dashed #c98a00;
  border-radius: 8px;
  background: #fff3c4;
  color: #6b4700;
  font-size: 0.86em;
  font-weight: 700;
  letter-spacing: 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font: 800 1rem/1.2 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn-cta {
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--sun-deep);
}
.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--sun-deep);
}
.btn-cta:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--sun-deep);
}
.btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 4px 0 var(--violet-deep);
}
.btn-primary:hover {
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
}
.btn-disabled {
  background: #ece7dd;
  color: var(--ink-2);
  cursor: default;
}
.btn-sm {
  padding: 9px 16px;
  font-size: 0.92rem;
  box-shadow: 0 3px 0 var(--sun-deep);
}
.btn-lg {
  padding: 15px 28px;
  font-size: 1.08rem;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 246, 238, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  gap: 8px 28px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-inline-end: auto;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a[aria-current] {
  background: rgba(24, 22, 58, 0.07);
}
.nav-end {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang {
  position: relative;
}
.lang summary {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
}
.lang summary::-webkit-details-marker {
  display: none;
}
.lang summary:hover,
.lang[open] summary {
  background: rgba(24, 22, 58, 0.07);
}
.lang ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  z-index: 60;
  min-width: 220px;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.lang li > * {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.lang a:hover {
  background: var(--violet-soft);
}
.lang a[aria-current] {
  color: var(--violet-deep);
}
.lang-soon {
  color: var(--ink-2) !important;
}
.lang-soon small {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 6vw, 80px) 0 clamp(48px, 7vw, 96px);
  background:
    radial-gradient(520px 420px at 82% 38%, rgba(91, 61, 245, 0.16), transparent 70%),
    radial-gradient(420px 360px at 68% 88%, rgba(255, 197, 49, 0.28), transparent 70%),
    radial-gradient(360px 300px at 6% 4%, rgba(255, 79, 123, 0.1), transparent 70%);
}
.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.hero-text .lead {
  margin-top: 22px;
  max-width: 33em;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 600;
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-points .icon {
  color: var(--free);
}
.hero-stage {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(320px, 74vw);
}
.phone {
  position: relative;
  padding: 9px;
  border-radius: 44px;
  background: var(--ink);
  box-shadow: 0 2px 0 #2c2a55 inset, 0 40px 60px -28px rgba(24, 22, 58, 0.55);
  transform: rotate(2deg);
}
.phone .clip {
  border-radius: 36px;
}
.clip {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #1d2b3a;
}
.hero-stage figcaption {
  margin-top: 22px;
  text-align: center;
  color: var(--ink-2);
  font-size: 0.86rem;
}
.bubble {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(24, 22, 58, 0.5);
  animation: float 5s ease-in-out infinite;
}
.bubble-like {
  left: -30px;
  top: 16%;
  background: var(--like);
}
.bubble-chat {
  right: -32px;
  top: 40%;
  background: var(--chat);
  animation-delay: -1.6s;
}
.bubble-gift {
  left: -22px;
  bottom: 22%;
  background: var(--gift);
  animation-delay: -3.2s;
}
@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(56px, 8vw, 104px) 0;
}
.section-tight {
  padding-top: clamp(20px, 3vw, 36px);
}
.section-paper {
  background: var(--paper);
}
.section-head {
  max-width: 720px;
  margin: 0 auto clamp(32px, 5vw, 56px);
  text-align: center;
}
.section-head p {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 1.1rem;
}
.section-foot {
  margin-top: 36px;
  text-align: center;
  color: var(--ink-2);
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  text-decoration: none;
}
.more:hover {
  text-decoration: underline;
}

/* Three reactions */
.reactions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}
.reaction {
  --tone: var(--like);
  padding: 14px 14px 26px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
}
.reaction-chat {
  --tone: var(--chat);
}
.reaction-gift {
  --tone: var(--gift);
}
.reaction-clip .clip {
  aspect-ratio: 1;
  border-radius: 14px;
}
.reaction-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 18px 10px 10px;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  background: var(--tone);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}
.reaction h3,
.reaction > p:last-child {
  margin-inline: 10px;
}
.reaction > p:last-child {
  margin-top: 8px;
  color: var(--ink-2);
}

/* Scene gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}
.scene {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.scene-body {
  padding: 16px 18px 20px;
}
.scene-body h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.scene-body p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.5;
}
.tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag-free {
  background: #dff6ea;
  color: #0a6a43;
}
.tag-pro {
  background: var(--violet-soft);
  color: var(--violet-deep);
}

/* Three steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
}
.step-n {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
}
.step h3 {
  margin-top: 18px;
}
.step p {
  margin: 8px 0 22px;
  color: var(--ink-2);
}
.mock {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 10px 12px 10px 16px;
  min-height: 52px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.95rem;
}
.mock span {
  margin-right: auto;
}
.mock b {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
}
.mock-file {
  color: var(--ink);
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
  max-width: 860px;
  margin-inline: auto;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 30px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.plan-pro {
  border: 2px solid var(--violet);
}
.plan h3 {
  font-size: 1.35rem;
}
.plan-price b {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.plan-price .ph {
  font-size: 1.1rem;
}
.plan-price span {
  color: var(--ink-2);
}
.plan-options {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.plan-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.plan-option-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
}
.plan-option-name em {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sun);
  font-size: 0.7rem;
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.plan-option-price {
  color: var(--ink-2);
  font-size: 0.92rem;
  text-align: end;
}
.plan-option-price b {
  color: var(--ink);
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}
.plan-option-note {
  grid-column: 1 / -1;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.notice {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--violet-soft);
  color: var(--violet-deep);
  font-size: 0.95rem;
  font-weight: 600;
}
.plan-note {
  color: var(--ink-2);
  font-size: 0.95rem;
}
.plan-list {
  display: grid;
  gap: 10px;
  margin: 4px 0 12px;
  padding: 0;
  list-style: none;
}
.plan-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.plan-list .icon {
  margin-top: 4px;
  color: var(--free);
}
.plan .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Questions */
.faq {
  display: grid;
  gap: 10px;
}
.faq details {
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.section:not(.section-paper) .faq details {
  background: var(--paper);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .icon {
  transition: transform 0.15s ease;
}
.faq details[open] summary .icon {
  transform: rotate(180deg);
}
.faq-a {
  padding: 0 20px 18px;
  color: var(--ink-2);
}

/* Closing band */
.closing {
  padding: clamp(56px, 8vw, 96px) 0;
  background: var(--violet);
  color: #fff;
  text-align: center;
}
.closing h2 {
  margin-bottom: 28px;
}
.closing p {
  margin-top: 18px;
  opacity: 0.8;
  font-size: 0.92rem;
}

/* ---------- Inner pages ---------- */
.page-head {
  padding: clamp(40px, 6vw, 72px) 0 clamp(12px, 2vw, 20px);
}
.page-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
}
.page-head .lead,
.page-head .muted {
  margin-top: 14px;
}
.page-head-center {
  padding-bottom: clamp(64px, 10vw, 120px);
  text-align: center;
}
.page-head-center p + p {
  margin-top: 28px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
}
.section:not(.section-paper) .card {
  background: var(--paper);
}
.card p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 0.97rem;
}
.card-center {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 40px 24px;
  text-align: center;
}
.phone-note {
  display: none;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--violet-soft);
  color: var(--violet-deep);
  font-weight: 600;
}
.prose h2 {
  margin: 44px 0 16px;
  font-size: 1.6rem;
}
.prose > h2:first-child {
  margin-top: 0;
}
.prose p + p,
.prose p + ul,
.prose ul + p,
.prose ol + p {
  margin-top: 12px;
}
.prose ul,
.prose ol {
  margin: 0;
  padding-inline-start: 1.3em;
}
.prose li + li {
  margin-top: 8px;
}
.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(24, 22, 58, 0.07);
  font-size: 0.92em;
}
.prose .note {
  font-size: 0.92rem;
  color: var(--ink-2);
}
.legal h2 {
  font-size: 1.25rem;
  margin-top: 36px;
}
.legal {
  color: #2d2b4d;
}
.guide-steps {
  display: grid;
  gap: 14px;
  padding: 0 !important;
  list-style: none;
}
.guide-steps > li {
  display: flex;
  gap: 18px;
  margin: 0 !important;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}
.guide-steps h3 {
  margin: 8px 0 8px;
}
.guide-steps p,
.guide-steps ol {
  color: var(--ink-2);
}

/* ---------- Footer ---------- */
.footer {
  padding: 48px 0 56px;
  background: var(--ink);
  color: #cfcde6;
  font-size: 0.95rem;
}
.footer-in {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px 40px;
  align-items: start;
}
.footer .brand {
  color: #fff;
}
.footer-brand p {
  margin-top: 10px;
  max-width: 30em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  padding-top: 4px;
}
.footer a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-legal {
  grid-column: 1 / -1;
  font-size: 0.86rem;
  opacity: 0.85;
}
.footer-legal + .footer-legal {
  margin-top: -12px;
}

/* ---------- Smaller screens ---------- */
@media (max-width: 980px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .nav {
    position: static;
  }
  .nav-in {
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 10px 0 6px;
  }
  .brand {
    margin-inline-end: auto;
    font-size: 1.1rem;
    gap: 8px;
  }
  .nav-end {
    gap: 4px;
  }
  .lang summary {
    padding: 8px;
  }
  .lang summary .icon:last-child {
    display: none;
  }
  .nav .btn-sm {
    padding: 8px 13px;
    font-size: 0.86rem;
  }
  .hero {
    padding-top: 28px;
  }
  .hero-text .lead {
    margin-top: 14px;
  }
  .hero-cta {
    gap: 10px;
    margin-top: 22px;
  }
  .hero-cta .btn-lg {
    padding: 13px 18px;
    font-size: 0.98rem;
  }
  .hero-points {
    gap: 4px 14px;
    margin-top: 18px;
    font-size: 0.84rem;
  }
  .nav-links {
    order: 3;
    width: 100%;
    margin: 0 -10px;
  }
  .nav-links a {
    padding: 6px 12px;
    font-size: 0.95rem;
  }
  .hero-in {
    grid-template-columns: 1fr;
  }
  .hero-text {
    text-align: center;
  }
  .hero-text .lead {
    margin-inline: auto;
  }
  .hero-cta,
  .hero-points {
    justify-content: center;
  }
  .hero-stage {
    width: min(270px, 66vw);
    margin-top: 12px;
  }
  .reactions,
  .steps {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-inline: auto;
  }
  .reaction-clip .clip {
    aspect-ratio: 4 / 3;
  }
  .plans,
  .cards-2 {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-inline: auto;
  }
  .footer-in {
    grid-template-columns: 1fr;
  }
  .footer-legal + .footer-legal {
    margin-top: 0;
  }
  .phone-note {
    display: block;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .gallery {
    grid-auto-flow: column;
    grid-auto-columns: 68%;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: -20px;
    padding: 4px 20px 18px;
    scrollbar-width: none;
  }
  .gallery::-webkit-scrollbar {
    display: none;
  }
  .scene {
    scroll-snap-align: center;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .guide-steps > li {
    flex-direction: column;
    gap: 6px;
    padding: 20px;
  }
  .btn-lg {
    padding: 14px 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .bubble {
    animation: none;
  }
  .btn {
    transition: none;
  }
}

/* ---------- Languages ---------- */

/* Sixteen languages: two columns in the menu where there is room. */
@media (min-width: 760px) {
  .lang ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 400px;
  }
}

/* English pages: one line offering the visitor's own language (site.js shows it). */
.lang-hint a:not([hidden]) {
  display: block;
  padding: 9px 16px;
  background: var(--violet-soft);
  color: var(--violet-deep);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
}
.lang-hint a:hover {
  text-decoration: underline;
}

/* Each script gets the system font drawn for it. Without this, Windows draws
   Japanese and Simplified Chinese with the Traditional Chinese font. */
:lang(zh-Hans) {
  --font: ui-rounded, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
}
:lang(ja) {
  --font: ui-rounded, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
}
:lang(ko) {
  --font: ui-rounded, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
  word-break: keep-all;
}
:lang(th) {
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Leelawadee UI", "Thonburi", "Noto Sans Thai", sans-serif;
}
:lang(ar) {
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Geeza Pro", "Noto Sans Arabic", "Tahoma", sans-serif;
}
:lang(zh-Hant),
:lang(zh-Hans),
:lang(ja) {
  line-break: strict;
}
/* Tall scripts need more room between lines; joined scripts must not be letter-spaced. */
html:lang(th) body,
html:lang(ar) body {
  line-height: 1.75;
}
html:lang(th) :is(h1, h2, h3),
html:lang(ar) :is(h1, h2, h3) {
  line-height: 1.35;
}
html:lang(ar) *,
html:lang(th) * {
  letter-spacing: 0;
}
html:is(:lang(zh-Hant), :lang(zh-Hans), :lang(ja), :lang(ko)) * {
  letter-spacing: 0;
}

/* Right-to-left pages: arrows that point "onward" point the other way. */
[dir="rtl"] .more .icon {
  transform: scaleX(-1);
}
