@media (prefers-color-scheme: light) {
  :root {
    --surface: #fff8f1;
    --surface-raised: #ffedda;
    --surface-deep: #e8cdbd;
    --accent: #754d3e;
    --accent-hover: #603b30;
    --line: #dac2b5;
    --header: rgb(255 248 241 / 0.96);
  }
}
:root { --vi-brown: #a47864; }
.language-options { display: flex; gap: 0.2rem; }
.language-options button {
  min-width: 35px; min-height: 44px; padding: 0 0.35rem; border: 0;
  background: transparent; color: var(--text); cursor: pointer;
  font-size: 0.8rem;
}
.language-options [aria-pressed="true"] { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 0.35em; font-weight: 700; }
.route-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 2rem; }
.route-card { border-top: 2px solid var(--vi-brown); padding-top: 1rem; }
.route-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 1rem; }
.route-card h3 { font-size: clamp(1.2rem, 2vw, 1.7rem); }
.route-card p { margin: 0.6rem 0 0.95rem; color: var(--muted); }
.route-card a, .press-section a, .service-page > a:not(.button) { color: var(--accent-hover); text-underline-offset: 0.25em; }
.press-section { background: var(--surface-raised); }
.press-section > h2:not(:first-child) { margin: 2.7rem 0 0.55rem; }
.service-page { min-height: 75dvh; padding-top: calc(var(--header-height) + clamp(2.5rem, 6vw, 5rem)); }
.service-page h1 { max-width: 21ch; margin-top: 1rem; font-size: clamp(2.2rem, 6vw, 5rem); line-height: 1.05; letter-spacing: -0.045em; }
.service-label { margin-top: 1.35rem; color: var(--accent-hover); font-weight: 650; }
.service-page h2 { margin-top: 1.6rem; font-size: clamp(1.5rem, 3vw, 2.6rem); }
.service-page .lead { max-width: 64ch; margin-top: 1rem; color: var(--muted); }
.route-details { max-width: 780px; margin: 2rem 0; }
.route-details details { border-top: 1px solid var(--line); }
.route-details summary { padding: 0.85rem 0; min-height: 44px; cursor: pointer; font-weight: 650; }
.route-details p { margin-bottom: 1rem; color: var(--muted); }
.route-equipment p { margin-top: 0.75rem; }
.service-page > .button { margin-top: 2rem; }
@media (min-width: 1081px) {
  .site-nav { gap: clamp(0.65rem, 1.55vw, 1.4rem); }
}
@media (max-width: 767px) {
  .route-grid { grid-template-columns: minmax(0, 1fr); }
}

.route-section { padding-top: clamp(2rem, 4vw, 3.5rem); }
.route-section > h2 { border-top: 1px solid var(--line); padding-top: clamp(1.5rem, 3vw, 2.6rem); }
.route-section .route-grid {
  grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.3vw, 1.25rem);
}
.service-panel a {
  display: grid;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(20rem, 33vw, 32rem);
  align-items: end;
  color: #fff9f4;
  background: #3e2c25;
  text-decoration: none;
}
.service-panel img, .service-panel a::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.service-panel img { object-fit: cover; }
.service-panel--skincare img { object-position: 51% 51%; }
.service-panel--medical img { object-position: 52% 12%; }
.service-panel--hair-removal img { object-position: 69% center; }
.service-panel a::after {
  content: "";
  background: linear-gradient(180deg, transparent 25%, rgb(28 19 16 / 0.32) 53%, rgb(28 19 16 / 0.92) 100%);
  pointer-events: none;
}
.service-panel-label {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.35rem 0.8rem;
  padding: clamp(1rem, 2.25vw, 2rem);
}
.service-panel-index { grid-column: 1 / -1; font-size: 0.78rem; letter-spacing: 0.12em; }
.service-panel h3 { font-size: clamp(1.35rem, 2.3vw, 2.4rem); font-weight: 550; line-height: 1.12; overflow-wrap: anywhere; }
.service-panel-arrow { line-height: 0; }
.link-arrow { display: inline-block; width: 1.25rem; height: 1.25rem; flex: none; vertical-align: middle; }
.service-panel a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

@media (max-width: 767px) {
  .route-section .route-grid { grid-template-columns: minmax(0, 1fr); gap: 0.85rem; }
  .service-panel a { min-height: clamp(11rem, 56vw, 19rem); }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .service-panel img { transition: transform 650ms cubic-bezier(.2,.7,.3,1); }
  .service-panel a:is(:hover, :focus-visible) img { transform: scale(1.055); }
}

.opening {
  position: relative;
  margin-top: var(--header-height);
}
.opening-stage { display: flex; flex-direction: column; }
.opening-frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opening-shot { position: relative; min-width: 0; overflow: hidden; background: #392d27; color: #fff8f0; }
.opening-shot picture { display: block; }
.has-film .opening-shot picture { height: 100%; }
.opening-shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.opening-shot figcaption {
  display: flex;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
}
.opening-shot figcaption span:first-child { flex: none; font-variant-numeric: tabular-nums; }
.opening-copy { padding: 2rem clamp(1.2rem, 5vw, 5.5rem); }
.opening-kicker { font-size: 0.75rem; font-weight: 650; letter-spacing: 0.16em; }
.opening-copy h1 {
  margin-top: 0.3rem;
  max-width: 16ch;
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.045em;
  font-size: clamp(2.3rem, 6.1vw, 6rem);
  overflow-wrap: anywhere;
}
.opening-intro { margin-top: 0.7rem; max-width: 44ch; }
.opening-actions { display: flex; flex-wrap: wrap; gap: 0.35rem 1.35rem; margin-top: 0.65rem; }
.opening-actions a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 0.32em; font-weight: 650; }
.opening-track { display: none; }

.opening.has-film { --opening-height: clamp(360px, 66svh, 620px); display: grid; grid-template: auto / minmax(0, 1fr); }
.has-film .opening-stage {
  position: sticky;
  top: var(--header-height);
  height: var(--opening-height);
  grid-area: 1 / 1;
  align-self: start;
  justify-content: end;
  overflow: hidden;
  isolation: isolate;
  background: #392d27;
  color: #fff8f0;
}
.has-film .opening-frames, .has-film .opening-shot, .has-film .opening-shot::after {
  display: block;
  position: absolute;
  inset: 0;
}
.has-film .opening-frames { z-index: -1; }
.has-film .opening-shot {
  opacity: 0;
  transition: opacity 700ms ease-in-out;
}
.has-film .opening-shot.is-outgoing { z-index: 1; }
.has-film .opening-shot.is-current { z-index: 2; opacity: 1; }
.has-film .opening-shot img {
  height: 100%;
  transform: scale(1.095);
  transition: transform 1850ms cubic-bezier(.17,.68,.3,1);
}
.has-film .opening-shot.is-current img { transform: scale(1); }
.has-film .opening-shot:nth-child(1) img { object-position: center 35%; }
.has-film .opening-shot:nth-child(2) img { object-position: center 62%; }
.has-film .opening-shot:nth-child(3) img { object-position: center 31%; }
.has-film .opening-shot::after {
  content: "";
  background:
    linear-gradient(0deg, rgb(20 14 12 / 0.92), rgb(20 14 12 / 0.52) 27%, transparent 64%),
    linear-gradient(95deg, rgb(20 14 12 / 0.27), transparent 73%);
}
.has-film .opening-shot figcaption {
  position: absolute;
  z-index: 1;
  top: clamp(0.85rem, 4vh, 2.25rem);
  left: clamp(1.2rem, 5vw, 5.5rem);
  border: 1px solid rgb(255 248 240 / 0.46);
  background: rgb(25 17 13 / 0.72);
}
.has-film .opening-copy { padding-bottom: clamp(1.25rem, 6vh, 4rem); }
.has-film .opening-kicker, .has-film .opening-intro { color: #fff8f0; }
.has-film .opening-track { display: grid; grid-area: 1 / 1; pointer-events: none; }
.has-film .opening-track > div { height: calc(var(--opening-height) * .32); }
.has-film .opening-track > div:last-child { height: var(--opening-height); }
@media (min-width: 768px) {
  #main {
    --home-inset: clamp(1.5rem, 4vw, 5.5rem);
    --home-width: min(calc(100% - 2 * var(--home-inset)), var(--max));
  }
  .opening, .route-section, .home-gift, .home-locations, .home-links {
    width: var(--home-width);
    margin-inline: auto;
  }
  .route-section, .home-locations, .home-links { padding-inline: 0; }
  .opening {
    margin-top: calc(var(--header-height) + clamp(0.75rem, 2vw, 1.75rem));
  }
  .opening.has-film { --opening-height: clamp(529.2px, 83.16svh, 806.4px); }
  .has-film .opening-track > div:not(:last-child) { height: calc(var(--opening-height) * 0.18); }
  .opening-copy h1 { max-width: 21ch; font-size: clamp(2.4rem, 4.2vw, 4.25rem); }
  .has-film .opening-copy { padding: 1.5rem clamp(1.6rem, 4%, 3.2rem); }
  .has-film .opening-shot figcaption { top: 1.2rem; left: clamp(1.6rem, 4%, 3.2rem); }
}
@media (max-width: 767px) {
  .opening.has-film { --opening-height: clamp(345px, 64svh, 530px); }
  .opening-frames { grid-template-columns: 1fr 1fr; }
  .opening-shot:first-child { grid-column: 1 / -1; }
  .opening-shot figcaption { flex-wrap: wrap; gap: 0.15rem 0.65rem; }
  .has-film .opening-shot:nth-child(1) img { object-position: 20% center; }
  .has-film .opening-shot:nth-child(2) img { object-position: 58% 55%; }
  .has-film .opening-shot:nth-child(3) img { object-position: 63% 45%; }
  .has-film .opening-copy h1 { font-size: clamp(2.2rem, 10.2vw, 4rem); }
}
@media (max-height: 540px) {
  .has-film .opening-copy h1 { font-size: clamp(1.65rem, 6vh, 3rem); }
  .has-film .opening-copy { padding-bottom: 0.75rem; }
}
.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem clamp(1.5rem, 5vw, 5rem);
  padding-top: 0;
  padding-bottom: clamp(2.2rem, 4vw, 4rem);
}
.home-links a, .info-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-hover); text-underline-offset: 0.27em; }
.info-page { padding-top: var(--header-height); }
.info-back { display: flex; width: min(100%, var(--max)); margin: 1rem auto 0; padding: 0 clamp(1.2rem, 5vw, 5.5rem); }
.info-page > section { padding-top: clamp(1.5rem, 4vw, 3rem); }
.info-page h1 { font-size: clamp(2.25rem, 5vw, 4.6rem); letter-spacing: -0.045em; line-height: 1.08; font-weight: 550; }

.home-gift {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  background: var(--surface-raised);
  padding-block: clamp(2rem, 5vw, 4.5rem);
  margin-bottom: clamp(1.5rem, 4vw, 3.5rem);
}
.home-gift img { width: 100%; height: auto; }
.home-gift p { margin: 0.75rem 0 1.2rem; color: var(--muted); }
.panel-projects { list-style: none; margin: 0; padding: 0; }
.panel-projects a {
  min-height: 44px;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.panel-projects a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.price-list { max-width: 59rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.price-list > h2 { margin: 0 0 0.5rem; }
.price-list > p { margin-bottom: 1rem; color: var(--muted); }
.price-group { border-top: 1px solid var(--line); }
.price-group > summary { padding-block: 0.8rem; cursor: pointer; font-weight: 650; min-height: 44px; }
.price-table-wrap { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; margin-bottom: 0.95rem; font-size: 0.93rem; }
.price-table th, .price-table td { padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); text-align: right; }
.price-table th:first-child { text-align: left; padding-left: 0; }
.price-table tbody th { font-weight: 500; }
.price-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .home-gift { grid-template-columns: 1fr; }
  .service-panel > a { min-height: clamp(10rem, 44vw, 16rem); }
}
.service-panel > .panel-projects a { min-height: 44px; background: transparent; color: var(--text); }
.service-panel > .panel-projects a::after { content: none; }
.price-jump { margin-top: 0.65rem; }
.price-jump a { display: inline-flex; align-items: center; min-height: 44px; }

.medical-media img { max-height: 34rem; object-fit: cover; object-position: center 12%; }

.home-locations { padding-block: clamp(1rem, 3vw, 2.5rem) clamp(2.3rem, 5vw, 4.5rem); }
.home-locations .location-branches {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem clamp(1rem, 3.5vw, 3rem);
  margin-top: 1.4rem;
}
.home-locations .phone { display: inline-flex; align-items: center; min-height: 44px; }
.home-locations > .button { margin-top: 1.4rem; }
@media (max-width: 680px) {
  .home-locations .location-branches { grid-template-columns: 1fr; gap: 0.8rem; }
}

/* The VI uses Philosopher Bold for Latin display headings. */
@font-face {
  font-family: "Philosopher";
  src: url("assets/fonts/philosopher-bold-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
html:is(:lang(it), :lang(en)) main :is(h1, h2) {
  font-family: "Philosopher", var(--sans);
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Hosted fallbacks keep the typography independent of installed fonts.
   A licensed Utile Display web project can take priority when available. */
@font-face {
  font-family: "Commissioner";
  src: url("assets/fonts/commissioner-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LXGW 975 Yuan SC";
  src: url("assets/fonts/lxgw975yuan-sc-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LXGW 975 Yuan SC";
  src: url("assets/fonts/lxgw975yuan-sc-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html:is(:lang(it), :lang(en)) {
  --sans: "utile-display", "Commissioner", "Helvetica Neue", Arial, sans-serif;
}

html:lang(zh) {
  --sans: "LXGW 975 Yuan SC", "Commissioner", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.brand img, .footer-brand img {
  display: block;
  width: clamp(92px, 11vw, 154px);
  height: auto;
}
.brand { justify-content: center; min-height: 44px; }

.service-equipment-photo { max-width: 38rem; margin-block: 1.25rem 0; }
.service-equipment-photo img { display: block; width: 100%; height: auto; }

/* Keep the mobile navigation usable in short and landscape viewports. */
@media (max-width: 899px) {
  .site-nav { max-height: calc(100dvh - var(--header-height)); overflow-y: auto; overscroll-behavior: contain; }
}
