.text-unit {
  display: inline-block;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  text-indent: 0;
}

:root {
  color-scheme: light;
  --scene-ratio: 3 / 2;
  --scene-max-width: 150vh;
  --scene-width: 100vw;
  --backdrop-image: url("./assets/home-ui.png");
  background: #9cc5ee;
}

/* Visa reading order: entry, compact overview, materials, steps, result and use. */
.visa-readable-layout .visa-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid #d1e1f2;
  border-radius: 18px;
  background: #ffffffc2;
}
.guide-content .visa-readable-layout .visa-panel > h2 {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  font-size: 20px;
  line-height: 1.5;
}
.visa-readable-layout .visa-directory {
  position: static;
  max-height: none;
  overflow: visible;
  margin: 0 0 22px;
}
.visa-readable-layout .visa-directory .guide-navigation {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
}
.visa-readable-layout .visa-directory .guide-section-link {
  padding: 7px 12px;
  border: 1px solid #d7e5f5;
  border-radius: 8px;
  font-size: 13px;
}
.visa-readable-layout .visa-directory-toggle { display: none; }
.visa-readable-layout .visa-application { margin-bottom: 18px; scroll-margin-top: 125px; }
.guide-content .visa-readable-layout .visa-location-content > p:first-child {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.9;
}
.visa-readable-layout .visa-entry-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 20px;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
  counter-reset: application-stage;
}
.visa-readable-layout .visa-entry-steps > li {
  position: relative;
  margin: 0;
  padding-left: 36px;
  font-size: 15px;
  line-height: 1.9;
  counter-increment: application-stage;
}
.visa-readable-layout .visa-entry-steps > li::before {
  content: counter(application-stage);
  position: absolute;
  top: 2px;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e5f0fc;
  color: #4278aa;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 26px;
}
.visa-readable-layout .visa-location-filter { margin: 12px 0; }
.visa-readable-layout .visa-location-filter select { flex: 0 1 360px; }
.visa-readable-layout .visa-location-directory {
  padding: 8px 0 0;
  border: 0;
  background: transparent;
}
.visa-readable-layout .visa-overview-grid {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,1fr);
  align-items: start;
  gap: 18px;
  margin: 0 0 22px;
  scroll-margin-top: 125px;
}
.guide-content .visa-readable-layout .visa-fee-summary {
  display: table;
  width: 100%;
  max-width: none;
  margin: 0;
  table-layout: fixed;
  border-collapse: collapse;
}
.guide-content .visa-readable-layout .visa-fee-summary th,
.guide-content .visa-readable-layout .visa-fee-summary td {
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #d7e5f5;
  background: transparent;
  text-align: left;
  overflow-wrap: anywhere;
}
.guide-content .visa-readable-layout .visa-fee-summary thead th {
  padding-top: 0;
  color: #6d86a0;
  font-size: 12px;
  font-weight: 400;
}
.visa-readable-layout .visa-fee-summary th:first-child { width: 55%; padding-right: 16px; }
.guide-content .visa-readable-layout .visa-fee-summary tbody th {
  color: #2b527d;
  font-size: 14px;
  font-weight: 500;
}
.guide-content .visa-readable-layout .visa-fee-summary-amount {
  color: #204b83;
  font-size: 15px;
  font-weight: 600;
}
.guide-content .visa-readable-layout .visa-fee-summary tr:last-child > * { border-bottom: 0; padding-bottom: 0; }
.visa-readable-layout .visa-fee-summary-note {
  display: block;
  margin-top: 4px;
  color: #6d86a0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
}
.guide-content .visa-readable-layout .visa-time-excerpt { margin: 0; font-size: 15px; line-height: 1.9; }
.visa-readable-layout .visa-details { display: grid; gap: 22px; border: 0; }
.visa-readable-layout .visa-details .visa-main-topic { margin: 0; border: 1px solid #d1e1f2; border-radius: 18px; background: #ffffffc2; }
.visa-readable-layout .visa-main-topic > .visa-topic-body { padding: 0; }
.visa-readable-layout .visa-material-list { padding: 0; margin: 0; list-style: none; }
.visa-readable-layout .visa-material-item {
  display: grid;
  grid-template-columns: 170px minmax(0,1fr);
  gap: 20px;
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid #d7e5f5;
}
.visa-readable-layout .visa-material-item:last-child { border-bottom: 0; }
.guide-content .visa-readable-layout .visa-material-name { margin: 2px 0 0; font-size: 15px; line-height: 1.8; }
.visa-readable-layout .visa-material-instructions > :first-child { margin-top: 0; }
.visa-readable-layout .visa-material-instructions > :last-child { margin-bottom: 0; }
.visa-readable-layout .visa-material-instructions ul { padding-left: 18px; }
.visa-readable-layout .visa-process-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: visa-step;
}
.visa-readable-layout .visa-process-steps > li {
  position: relative;
  margin: 0;
  padding: 0 0 22px 42px;
  counter-increment: visa-step;
}
.visa-readable-layout .visa-process-steps > li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 32px;
  bottom: 6px;
  left: 14px;
  border-left: 1px solid #d1e1f2;
}
.visa-readable-layout .visa-process-steps > li::before {
  content: counter(visa-step);
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #4278aa;
  background: #e5f0fc;
  line-height: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.visa-readable-layout .visa-process-steps > li:last-child { padding-bottom: 0; }
.visa-readable-layout .visa-approved { border-top: 1px solid #d7e5f5; padding-top: 24px; margin-top: 18px; }
.visa-readable-layout .visa-supplements { margin-top: 22px; }
.visa-readable-layout .visa-supplement,
.visa-readable-layout .visa-inline-details {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #d7e5f5;
  border-radius: 0;
  background: transparent;
}
.visa-readable-layout .visa-supplement:last-child { border-bottom: 0; }
.visa-readable-layout .visa-supplement > summary { padding: 16px 0; }
.guide-content .visa-readable-layout .visa-supplement > summary h2 { font-size: 16px; }
.visa-readable-layout .visa-supplement > .visa-topic-body { padding: 0 0 18px; }
.visa-readable-layout .visa-inline-details { margin-top: 18px; border-top: 1px solid #d7e5f5; }
.guide-content .visa-readable-layout .visa-inline-details > summary h2 { font-size: 14px; }
.visa-readable-layout .visa-inline-details > summary { padding: 14px 0 0; }
.visa-readable-layout .visa-inline-details[open] > summary { padding-bottom: 16px; }
.visa-readable-layout .visa-inline-details > .visa-topic-body { padding-bottom: 0; }
@media (max-width: 700px) {
  .visa-readable-layout .visa-panel { padding: 18px; }
  .guide-content .visa-readable-layout .visa-panel > h2 { font-size: 19px; margin-bottom: 16px; }
  .visa-readable-layout .visa-directory { margin-bottom: 18px; }
  .visa-readable-layout .visa-directory-toggle { display: flex; padding: 10px 14px; font-size: 13px; }
  .visa-readable-layout .visa-directory .guide-navigation { display: none; }
  .visa-readable-layout .visa-directory.is-expanded .guide-navigation { display: flex; padding-top: 10px; }
  .visa-readable-layout .visa-entry-steps { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .visa-readable-layout .visa-entry-steps > li { font-size: 14px; }
  .visa-readable-layout .visa-location-filter { flex-direction: column; align-items: stretch; gap: 6px; }
  .visa-readable-layout .visa-location-filter select { flex: auto; width: 100%; }
  .visa-readable-layout .visa-overview-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .visa-readable-layout .visa-material-item { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .visa-readable-layout .visa-material-name { font-size: 15px; }
  .visa-readable-layout .visa-details { gap: 18px; }
  .visa-readable-layout .visa-supplements { margin-top: 18px; }
}


* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow: hidden;
}

.home {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  place-items: center;
  overflow: hidden;
}

/* Preserve the approved artwork's proportions while filling the viewport width. */
.home::before {
  position: absolute;
  z-index: -1;
  inset: -40px;
  background-image: var(--backdrop-image);
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(28px);
}

.scene {
  position: relative;
  width: var(--scene-width);
  aspect-ratio: var(--scene-ratio);
}

.scene-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* A real link follows the circular Start control already present in the artwork. */
.start-link {
  position: absolute;
  top: 70.45%;
  left: 50%;
  display: block;
  width: 14.1%;
  min-width: 44px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
  z-index: 3;
}

.motion-backdrop,
.motion-static,
.ribbon-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}

.motion-static {
  z-index: 1;
}

.ribbon-canvas {
  z-index: 2;
}

.motion-ready .scene-art {
  visibility: hidden;
}

.motion-ready .motion-backdrop,
.motion-ready .motion-static,
.motion-ready .ribbon-canvas {
  opacity: 1;
}

.orb-visual {
  position: absolute;
  inset: 0;
  display: none;
  border-radius: 50%;
  pointer-events: none;
}

.motion-ready .orb-visual {
  display: block;
  animation: orb-breathe 5.8s ease-in-out infinite;
}

.orb-art,
.orb-sheen,
.orb-glow {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 50%;
}

/* Reuse the original orb pixels, including its Start lettering. */
.orb-art {
  background-image: url("./assets/home-ui.png");
  background-size: 709.219858% auto;
  background-position: 50% 75.9352%;
}

.orb-sheen {
  inset: 3%;
  background: radial-gradient(ellipse at 23% 18%, #fff9, #c3eaff30 15%, transparent 37%);
  mix-blend-mode: screen;
  opacity: 0.65;
  animation: orb-highlight 11s linear infinite;
}

.orb-glow {
  inset: -5%;
  background: conic-gradient(from 0deg, transparent 5%, #c8f8ffb0 17%, transparent 31%, #d8c7ff98 49%, transparent 67%, #ffe9bf9c 81%, transparent 96%);
  mask-image: radial-gradient(closest-side, transparent 84%, #000 89%, #0009 94%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side, transparent 84%, #000 89%, #0009 94%, transparent 100%);
  filter: blur(1px);
  mix-blend-mode: screen;
  opacity: 0.8;
  animation: orb-highlight 8s linear infinite reverse;
  transition: opacity 240ms ease;
}

.start-link:hover .orb-glow,
.start-link:focus-visible .orb-glow {
  opacity: 1;
}

.start-link:active .orb-visual {
  animation-play-state: paused;
}

/* The click has its own feedback, followed by a glow that covers the next load. */
.start-link.is-activating .orb-visual {
  display: block;
  animation: orb-depart 700ms cubic-bezier(.22,.7,.25,1) both;
}

.is-leaving .start-link {
  pointer-events: none;
}

.is-leaving .scene {
  animation: home-depart 620ms 80ms ease-in both;
}

.page-transition {
  position: fixed;
  z-index: 10;
  inset: 0;
  background: #fff;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
}

.page-transition::before {
  position: absolute;
  left: var(--departure-x, 50%);
  top: var(--departure-y, 70.45%);
  width: calc(var(--departure-radius, 100vmax) * 2);
  height: calc(var(--departure-radius, 100vmax) * 2);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #fff 45%, #ffffffd9 57%, #ffffff80 67%, transparent 74%);
  content: "";
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.is-leaving .page-transition {
  background: transparent;
  animation: departure-glow 620ms 100ms cubic-bezier(.25,.65,.35,1) both;
}

.is-leaving .page-transition::before {
  animation: departure-disc 620ms 100ms cubic-bezier(.25,.65,.35,1) both;
}

.page-arriving .page-transition {
  opacity: 1;
}

.page-arriving .scene {
  opacity: 0;
}

.page-arrived .page-transition {
  animation: arrival-unveil 460ms ease-out both;
}

.page-arrived .scene {
  animation: country-arrive 460ms cubic-bezier(.2,.65,.3,1) both;
}

@keyframes orb-depart {
  0% { transform: scale(1); filter: brightness(1); }
  18% { transform: scale(.92); filter: brightness(1.08); }
  48% { transform: scale(1.07); filter: brightness(1.3); opacity: 1; }
  100% { transform: scale(1.18); filter: brightness(1.55); opacity: 0; }
}

@keyframes home-depart {
  to { transform: scale(1.025); opacity: .15; }
}

@keyframes departure-glow {
  0% { opacity: 0; }
  20%, 100% { opacity: 1; }
}

@keyframes departure-disc {
  from { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  20% { opacity: 1; }
  to { transform: translate(-50%, -50%) scale(2); opacity: 1; }
}

@keyframes arrival-unveil {
  to { opacity: 0; }
}

@keyframes country-arrive {
  from { transform: scale(1.025); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes orb-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1.5%) scale(1.025); }
}

@keyframes orb-highlight {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .orb-visual,
  .orb-sheen,
  .orb-glow {
    animation: none;
  }

  .start-link.is-activating .orb-visual,
  .is-leaving .scene {
    animation: none;
  }

  .is-leaving .page-transition {
    background: #fff;
    animation: reduced-departure 140ms linear both;
  }

  .is-leaving .page-transition::before {
    animation: none;
  }

  .page-arrived .page-transition {
    animation-duration: 140ms;
  }

  .page-arrived .scene {
    transform: none;
    opacity: 1;
    animation: none;
  }
}

@keyframes reduced-departure {
  to { opacity: 1; }
}

.start-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 5px;
  box-shadow: 0 0 0 8px #1d609f80;
}

.start-link[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@supports (height: 100svh) {
  :root {
    --scene-max-width: 150svh;
  }

  body {
    min-height: 100svh;
  }

  .home {
    height: 100svh;
  }
}

/* Country selection follows the approved sky, glass, flag and landscape layout. */
html:has(.country-page) {
  scrollbar-gutter: stable;
}

.country-page {
  overflow-x: hidden;
  overflow-y: auto;
  color: #103775;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #b5d6f4;
}

.country-page .home {
  display: block;
  height: auto;
  min-height: 100svh;
  overflow: visible;
}

.country-page .home::before,
.country-ready > .scene-art {
  display: none;
}

.country-page .scene {
  width: 100%;
  min-height: 100svh;
  aspect-ratio: auto;
}

.country-backdrop {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: #bdd9f3;
}

.country-backdrop > svg {
  width: 100%;
  height: 100%;
  display: block;
}

.country-content {
  width: 86.84%;
  max-width: 1452px;
  margin: 0 auto;
  padding: clamp(92px, 9.5vw, 159px) 0 48px;
}

.country-home {
  position: absolute;
  top: 26px;
  left: max(26px, calc((100vw - 1550px) / 2));
  padding: 9px 13px;
  border: 1px solid #ffffff8c;
  border-radius: 30px;
  background: #ffffff45;
  color: #23528a;
  text-decoration: none;
  font-size: 14px;
  backdrop-filter: blur(8px);
  transition: background 180ms ease;
}

.country-home:hover {
  background: #ffffffb3;
}

.country-header {
  text-align: center;
}

.country-title {
  margin: 0;
  color: #0e397b;
  font-size: clamp(36px, 3.83vw, 64px);
  font-weight: 650;
  letter-spacing: .055em;
  line-height: 1.4;
  text-shadow: 0 2px 12px #fff9;
}

.country-search {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(660px, 75%);
  height: 64px;
  margin: 8px auto 20px;
  padding: 0 24px 0 32px;
  border: 2px solid #ffffffe0;
  border-radius: 40px;
  background: linear-gradient(120deg, #ffffffbd, #f4f9ffad);
  box-shadow: inset 0 1px 10px #fffd, 0 6px 24px #91b5dc15;
  backdrop-filter: blur(18px);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.country-search:focus-within {
  background: #ffffffd9;
  box-shadow: 0 0 0 4px #5489cc2e, inset 0 1px 10px #fff;
}

.search-icon {
  position: relative;
  flex: 0 0 22px;
  height: 22px;
  border: 2.5px solid #879bb8;
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  right: -7px;
  bottom: -4px;
  width: 10px;
  height: 2.5px;
  background: #879bb8;
  border-radius: 2px;
  transform: rotate(48deg);
  content: "";
}

.country-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: 0;
  color: #184577;
  background: transparent;
  font: inherit;
  font-size: 20px;
}

.country-search input::placeholder {
  color: #8397b4;
  opacity: 1;
}

.country-search input::-webkit-search-cancel-button {
  appearance: none;
}

.search-clear,
.guide-close {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #e8f2ffb0;
  color: #426a9b;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.search-clear[hidden],
.country-card[hidden],
.country-message[hidden] {
  display: none;
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px 24px;
}

.country-card {
  position: relative;
  display: block;
  container-type: inline-size;
  aspect-ratio: 346 / 159;
  overflow: hidden;
  border: 1.5px solid #ffffffe6;
  border-radius: 22px;
  background: #d7e9fa;
  box-shadow: inset 0 1px 6px #fff, 0 4px 16px #6e91b220;
  color: #0f3676;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.country-card:hover {
  z-index: 1;
  transform: translateY(-4px);
  border-color: #fff;
  box-shadow: 0 10px 25px #305e963b, inset 0 1px 6px #fff;
}

.country-card:active {
  transform: translateY(-1px) scale(.985);
}

.country-card:focus-visible,
.country-home:focus-visible,
.country-page button:focus-visible {
  outline: 3px solid #2e76cc;
  outline-offset: 4px;
}

.country-card[aria-current="true"] {
  border-color: #fafdff;
  box-shadow: 0 0 0 3px #4f9be9b0, 0 6px 20px #305e9633;
}

.country-art,
.country-card-glass {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.country-photo {
  object-fit: cover;
}

.country-card-glass {
  background: linear-gradient(180deg, #f3f8ffed 0%, #eff6ffe0 22%, #edf6ff80 45%, transparent 77%);
  box-shadow: inset 0 1px 8px #fff;
}

.country-card-flag {
  position: absolute;
  top: 13%;
  left: 7%;
  width: 17.4%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 2px 5px #304b6412;
}

.country-card-names {
  position: absolute;
  top: 13.4%;
  left: 29.7%;
  right: 4%;
  display: grid;
  gap: 2px;
}

.country-name-zh {
  font-size: clamp(14px, 5.8cqw, 22px);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.country-name-en {
  font-size: clamp(10px, 3.55cqw, 13px);
  line-height: 1.3;
  text-transform: uppercase;
}

/* These eleven cards reuse their exact approved art, including the original labels. */
.country-card-reference .country-card-flag,
.country-card-reference .country-card-names {
  opacity: 0;
}

.country-message {
  width: min(660px, 100%);
  margin: 16px auto;
  padding: 44px 28px;
  border: 1px solid #fffd;
  border-radius: 24px;
  background: #f6fbffb8;
  text-align: center;
  backdrop-filter: blur(18px);
}

.country-message h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.country-message p {
  color: #54749a;
  line-height: 1.7;
}

.glass-button {
  padding: 12px 22px;
  border: 1px solid #fff;
  border-radius: 28px;
  background: linear-gradient(110deg, #6dbaff, #357cef);
  box-shadow: 0 4px 14px #3e83c930;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.country-footer {
  margin-top: 30px;
  color: #355f91;
  font-size: 14px;
  text-align: center;
  text-shadow: 0 1px 8px #fff;
}

.country-guide {
  width: min(1100px, calc(100% - 64px));
  max-height: calc(100svh - 64px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #fff;
  border-radius: 28px;
  background: linear-gradient(135deg, #f9fcfff7, #edf6fffa);
  box-shadow: 0 25px 90px #13375f55, inset 0 1px 2px #fff;
  color: #214573;
}

.country-guide[open] {
  animation: guide-arrive 260ms cubic-bezier(.2,.7,.3,1) both;
}

.country-guide::backdrop {
  background: #25497166;
  backdrop-filter: blur(8px);
}

.country-page.guide-is-open {
  overflow: hidden;
}

.guide-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 32px 22px;
  border-bottom: 1px solid #b6cfec70;
  background: #f2f8fff5;
  backdrop-filter: blur(20px);
}

.guide-flag {
  flex: 0 0 auto;
  width: 58px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.guide-names {
  flex: 1;
  min-width: 0;
}

.guide-title {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.45;
}

.guide-subtitle {
  margin: 5px 0 0;
  color: #6682a5;
  font-size: 13px;
  line-height: 1.5;
}
.guide-subtitle-country,.guide-subtitle-scope{display:inline-block;max-width:100%;text-wrap:pretty}
.guide-content :is(p,li,dd){text-wrap:pretty}
@media(max-width:700px){
  .guide-header{display:grid;grid-template-columns:40px minmax(0,1fr) 36px;align-items:center}
  .guide-header .guide-names{display:contents}
  .guide-header .guide-flag{grid-column:1;grid-row:1}
  .guide-header .guide-title{grid-column:2;grid-row:1;text-wrap:balance}
  .guide-header .guide-close{grid-column:3;grid-row:1}
  .guide-header .guide-subtitle{grid-column:1/-1;grid-row:2;margin:0}
}

.guide-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 32px 0;
}

.guide-section-link {
  padding: 8px 13px;
  border: 1px solid #cedff4;
  border-radius: 24px;
  background: #ffffffb8;
  color: #3569a3;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.guide-section-link:hover {
  background: #e1efff;
}

.guide-content {
  padding: 28px 40px 36px;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.guide-content h2 {
  margin: 30px 0 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #c7dcf2;
  color: #133c77;
  font-size: 23px;
  line-height: 1.5;
  scroll-margin-top: 140px;
}

.guide-content h3 {
  margin: 26px 0 10px;
  color: #204b83;
  font-size: 18px;
}

.guide-content p {
  margin: 12px 0;
}

.guide-content ul,
.guide-content ol {
  padding-left: 24px;
}

.guide-content li {
  margin: 6px 0;
}

.guide-content a {
  color: #1d6ecb;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.guide-content table {
  width: 100%;
  border-spacing: 0;
  border: 1px solid #c9dcef;
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}

.guide-content th,
.guide-content td {
  padding: 10px 14px;
  border-bottom: 1px solid #dbe7f4;
  text-align: left;
  vertical-align: top;
}

.guide-content th {
  background: #e1eeff;
  color: #204b83;
  font-weight: 600;
}

.guide-content tr:last-child td {
  border-bottom: 0;
}

.guide-content .footnote {
  font-size: 13px;
  color: #5e7797;
}

.guide-content .footnote hr {
  border: 0;
  border-top: 1px solid #c9dcef;
  margin-top: 24px;
}

.guide-content sup {
  font-size: .75em;
  scroll-margin-top: 140px;
}

@keyframes guide-arrive {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1100px) {
  .country-content { width: 90%; }
  .country-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .country-card { border-radius: 18px; }
}

@media (max-width: 700px) {
  .country-content { width: calc(100% - 32px); padding-top: 96px; }
  .country-title { font-size: clamp(28px, 7vw, 42px); letter-spacing: .025em; }
  .country-home { top: 18px; left: 16px; padding: 8px 12px; font-size: 12px; }
  .country-search { width: 100%; height: 54px; margin: 14px auto 24px; gap: 16px; padding: 0 12px 0 22px; }
  .country-search input { font-size: 16px; }
  .search-icon { flex-basis: 19px; height: 19px; }
  .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .country-card { border-radius: 13px; }
  .country-card-flag { width: 20%; left: 6%; top: 12%; border-radius: 4px; }
  .country-card-names { left: 30%; top: 12%; right: 3%; gap: 1px; }
  .country-name-zh { font-size: 14px; }
  .country-name-en { font-size: 8px; }
  .country-footer { font-size: 12px; }
  .country-guide { width: calc(100% - 20px); max-height: calc(100svh - 24px); border-radius: 20px; }
  .guide-header { padding: 18px 16px; gap: 10px; }
  .guide-flag { width: 40px; height: 30px; border-radius: 5px; }
  .guide-title { font-size: 18px; }
  .guide-subtitle { font-size: 10px; }
  .guide-close { width: 36px; height: 36px; flex-basis: 36px; font-size: 24px; }
  .guide-navigation { padding: 14px 16px 0; gap: 6px; }
  .guide-section-link { font-size: 12px; padding: 7px 10px; }
  .guide-content { padding: 22px 20px 26px; font-size: 14px; }
  .guide-content h2 { font-size: 20px; scroll-margin-top: 120px; }
  .guide-content h3 { font-size: 17px; }
  .guide-content table { font-size: 12px; }
  .guide-content th, .guide-content td { padding: 8px; }
}

@media (max-width: 360px) {
  .country-grid { grid-template-columns: minmax(0, 1fr); }
  .country-card { aspect-ratio: 346 / 159; }
  .country-name-zh { font-size: 20px; }
  .country-name-en { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .country-card,
  .country-home,
  .country-search { transition: none; }
  .country-card:hover { transform: none; }
  .country-guide[open] { animation: none; }
}

/* Visa information uses the existing blue-and-white guide surface. */
.visa-information { --visa-line: #d7e5f5; --visa-blue: #235ea1; }
.visa-information [hidden] { display: none !important; }
.visa-information button, .visa-information select, .visa-information input { font: inherit; }
.visa-information button { cursor: pointer; }
.visa-information button:focus-visible, .visa-information select:focus-visible, .visa-information input:focus-visible, .visa-information summary:focus-visible { outline: 3px solid #82b8ef; outline-offset: 3px; }
.visa-options { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 24px; }
.visa-option, .visa-secondary, .visa-trip-remove { border: 1px solid #c2d9f0; border-radius: 12px; background: #f5faff; color: #305984; padding: 10px 15px; }
.visa-option[aria-pressed="true"] { color: white; background: #326fac; border-color: #326fac; }
.visa-scope { border: 1px solid var(--visa-line); background: #edf5ff; border-radius: 18px; padding: 18px 22px; margin-bottom: 26px; }
.visa-scope > summary { cursor: pointer; font-weight: 600; color: #244e7e; }
.visa-condition-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.visa-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 14px; }
.visa-field select, .visa-field input { width: 100%; min-width: 0; border: 1px solid #bdd1e6; color: #24476e; border-radius: 10px; padding: 11px 9px; background: white; box-sizing: border-box; }
.visa-field:has([name="destination"]) { grid-column: 1 / -1; }
.visa-primary { color: white; border: 0; border-radius: 12px; padding: 12px 20px; background: #326fac; margin-top: 12px; }
.visa-primary:disabled { opacity: .45; cursor: default; }
.visa-official-help { display: block; }
.visa-schengen-helper { padding-top: 12px; }
.visa-trip-row { display: grid; grid-template-columns: 2fr 1fr auto; align-items: end; gap: 12px; margin: 12px 0; }
.visa-schengen-helper > .visa-field { margin-top: 18px; }
.visa-eyebrow { color: #577fa9; font-size: 13px; letter-spacing: .08em; margin-bottom: 0; }
.guide-content .visa-overview > h2 { margin: 0 0 8px; border: 0; padding: 0; font-size: 26px; }
.visa-highlights { margin: 22px 0 30px; border: 1px solid var(--visa-line); border-radius: 18px; overflow: hidden; background: #fff; }
.visa-highlight { display: grid; grid-template-columns: 148px minmax(0,1fr) 112px; align-items: start; gap: 24px; min-width: 0; padding: 22px 24px; border-bottom: 1px solid var(--visa-line); }
.visa-highlight:last-child { border-bottom: 0; }
.visa-location-highlight { background: #f0f7ff; scroll-margin-top: 125px; }
.visa-location-highlight > .visa-highlight-answer { grid-column: 2 / -1; }
.guide-content .visa-location-content > p:first-child { margin-bottom: 18px; }
.guide-content .visa-location-content > p:not(:first-child) { font-size: 13px; font-weight: 400; }
.guide-content .visa-location-content h3 { margin: 18px 0 10px; color: #305984; }
.visa-location-group { min-width: 0; margin: 12px 0; }
.visa-location-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13px; color: #537295; }
.visa-location-filter select { min-width: 0; max-width: 100%; flex: 1; border: 1px solid #c2d9f0; border-radius: 8px; padding: 9px 12px; color: #244e7e; background: #fff; }
.guide-content .visa-location-table { display: table; table-layout: fixed; background: #fff; }
.guide-content .visa-location-table th:nth-child(1) { width: 24%; }
.guide-content .visa-location-table th:nth-child(2) { width: 10%; }
.guide-content .visa-location-table th:nth-child(4) { width: 22%; }
.visa-location-table td { overflow-wrap: anywhere; }
.visa-location-table .visa-url-control { margin: 0 0 8px; }
.visa-location-directory { padding: 8px 12px; border: 1px solid var(--visa-line); border-top: 0; background: #fff; }
.guide-content .visa-highlight h3 { margin: 2px 0 0; font-size: 15px; color: #537295; }
.visa-highlight-answer { min-width: 0; }
.guide-content .visa-highlight p { margin: 0 0 8px; font-size: 15px; color: #224b77; }
.guide-content .visa-location-highlight p { font-size: 18px; font-weight: 500; }
.visa-highlight small { display: block; font-size: 12px; line-height: 1.7; color: #67809b; }
.visa-text-action { justify-self: end; padding: 2px 0 8px; border: 0; color: #2464a5; background: transparent; text-align: left; font-size: 13px !important; }
.visa-text-action:hover { text-decoration: underline; text-underline-offset: 4px; }
.visa-detail-layout { display: grid; grid-template-columns: 152px minmax(0,1fr); align-items: start; gap: 32px; }
.visa-directory { position: sticky; top: 132px; max-height: calc(100svh - 200px); overflow: auto; }
.guide-content .visa-directory-title { margin: 0 0 14px; color: #6682a5; font-size: 12px; letter-spacing: .08em; }
.visa-directory-toggle { display: none; }
.visa-directory .guide-navigation { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 0; }
.visa-directory .guide-section-link { padding: 8px 12px; border: 0; border-left: 2px solid #d7e5f5; border-radius: 0; background: transparent; text-align: left; line-height: 1.6; }
.visa-directory .guide-section-link:hover, .visa-directory .guide-section-link:focus-visible { border-left-color: #326fac; background: #e8f2ff; }
.visa-details { min-width: 0; border-top: 1px solid var(--visa-line); }
.visa-details .visa-topic { margin: 0; border: 0; border-bottom: 1px solid var(--visa-line); border-radius: 0; background: transparent; }
.visa-details .visa-topic > summary { gap: 16px; padding: 22px 0; }
.visa-details .visa-topic-body { padding: 0 0 24px; }
.visa-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 18px 0; }
.visa-fact { border: 1px solid var(--visa-line); border-radius: 14px; padding: 16px 18px; min-width: 0; overflow-wrap: anywhere; }
.guide-content .visa-fact h3 { margin: 0 0 10px; font-size: 16px; }
.visa-fact p { margin: 8px 0; }
.visa-citations { font-size: 12px; margin-top: 12px; color: #67809b; }
.visa-citations summary { cursor: pointer; }
.visa-citation { margin: 12px 0; }
.visa-topic { border: 1px solid var(--visa-line); border-radius: 16px; margin: 12px 0; scroll-margin-top: 120px; background: #fff; }
.visa-topic > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; padding: 18px 20px; }
.visa-topic > summary::-webkit-details-marker { display: none; }
.visa-topic > summary::after { content: '+'; font-size: 22px; color: #6086ae; }
.visa-topic[open] > summary::after { content: '−'; }
.guide-content .visa-topic > summary h2 { margin: 0; padding: 0; border: 0; font-size: 18px; }
.visa-topic-body { padding: 0 20px 18px; overflow-wrap: anywhere; }
.visa-topic-body > :first-child { margin-top: 0; }
.visa-link-card { border-top: 1px solid var(--visa-line); padding: 22px 0; }
.visa-link-purpose { color: #6282a3; font-size: 12px; }
.guide-content .visa-link-card h3 { margin: 4px 0 12px; }
.visa-url-control { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; font-size: 12px; line-height: 1.5; }
.visa-readable-url { overflow-wrap: anywhere; min-width: 0; }
.visa-copy { border: 1px solid #cbdeef; background: #f5f9ff; color: #3b668f; border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.visa-copy-feedback { color: #36705a; }
@media (max-width: 700px) {
  .visa-condition-fields, .visa-facts { grid-template-columns: minmax(0,1fr); }
  .visa-scope { padding: 16px; }
  .visa-option { text-align: left; width: 100%; }
  .visa-topic > summary { padding: 16px; }
  .visa-topic-body { padding: 0 14px 16px; }
  .visa-trip-row { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
  .visa-trip-remove { grid-column: 1 / -1; justify-self: end; padding: 5px 12px; }
}

.visa-overview { scroll-margin-top: 125px; }

.guide-content .visa-scope-note { margin: 0 0 20px; color: #617f9e; font-size: 13px; line-height: 1.8; }

.visa-fee-group { padding: 16px 0; border-bottom: 1px solid #d7e5f5; }
.guide-content .visa-fee-group h3 { margin: 0 0 10px; }
.visa-fee-line { line-height: 1.9; overflow-wrap: anywhere; }
.visa-fee-note { font-size: 13px; color: #617f9e; }

.guide-content .visa-fee-table { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; }
.visa-fee-table thead th:nth-child(1) { width: 26%; }
.visa-fee-table thead th:nth-child(2) { width: 22%; }
.guide-content .visa-fee-table tbody th { background: #f7faff; color: #305477; font-weight: 500; }
.visa-fee-table td, .visa-fee-table th { overflow-wrap: anywhere; }
.visa-fee-amount { color: #204b83; font-weight: 600; }
.visa-fee-explanation { font-size: 13px; color: #607891; }
.visa-fee-summary { margin: 0 0 10px; max-width: 540px; }
.visa-fee-summary > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 8px 0; border-bottom: 1px solid #d7e5f5; }
.visa-fee-summary > div:first-child { padding-top: 0; }
.visa-fee-summary > div:last-child { border-bottom: 0; padding-bottom: 0; }
.visa-fee-summary dt { font-size: 13px; color: #537295; }
.visa-fee-summary dd { margin: 0; font-size: 15px; font-weight: 600; color: #204b83; }
.visa-fee-summary-note { grid-column: 1 / -1; line-height: 1.7; }
@media (max-width: 700px) {
  .visa-fee-table thead th:nth-child(1) { width: 29%; }
  .visa-fee-table thead th:nth-child(2) { width: 25%; }
  .visa-fee-explanation { font-size: 12px; }
}

/* Explain one question at a time rather than compressing source fields into cards. */
.visa-facts { display: block; }
.visa-fact { border: 0; border-bottom: 1px solid #d7e5f5; border-radius: 0; padding: 22px 0; }
.visa-fact:last-child { border-bottom: 0; }
.visa-fact > p, .visa-fact-points, .visa-readable-points { max-width: 78ch; }
.visa-fact-points li, .visa-readable-points li { margin: 8px 0; }
.visa-fact-points p { margin: 4px 0; }
.visa-fact-points ul { padding-left: 22px; }
.visa-terms-help { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; background: #f0f6ff; font-size: 13px; }
.visa-terms-help summary, .visa-port-list summary { cursor: pointer; color: #2a6199; }
.visa-glossary { display: grid; grid-template-columns: minmax(80px,1fr) 4fr; gap: 10px 18px; margin: 16px 0; }
.visa-glossary dt { font-weight: 600; color: #305477; }
.visa-glossary dd { margin: 0; }
.visa-port-list { margin: 14px 0; padding: 14px; background: #f5f9ff; border-radius: 10px; }
.visa-port-list li { margin: 8px 0; overflow-wrap: anywhere; }
@media(max-width:700px) { .visa-glossary { grid-template-columns: 1fr; gap: 6px; } .visa-glossary dd { margin-bottom: 14px; } }

.visa-country-names { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px 14px; list-style: none; padding: 0 !important; margin: 18px 0; }
.visa-country-names li { padding: 8px 10px; background: #eff6ff; border-radius: 8px; margin: 0; }
@media(max-width:700px) { .visa-country-names { grid-template-columns: repeat(2,minmax(0,1fr)); } }

#visa-materials .visa-topic-body > table { display: table; width: 100%; table-layout: fixed; }
#visa-materials .visa-topic-body > table th:first-child { width: 23%; }
#visa-materials .visa-topic-body > table td { overflow-wrap: anywhere; }
#visa-materials .visa-readable-points { padding-left: 17px; }

/* Keep long province groups readable instead of squeezing three columns on phones. */
.guide-content .visa-jurisdictions { width: 100%; table-layout: fixed; }
.guide-content .visa-jurisdictions th:nth-child(1) { width: 44%; }
.guide-content .visa-jurisdictions th:nth-child(2) { width: 20%; }
.visa-scope-notice { border-left: 3px solid #4e91cf; background: #eaf3ff; padding: 16px; margin: 16px 0; line-height: 1.8; }
@media (max-width: 640px) {
  .guide-content .visa-jurisdictions, .guide-content .visa-jurisdictions tbody,
  .guide-content .visa-jurisdictions tr, .guide-content .visa-jurisdictions td { display: block; width: auto; }
  .guide-content .visa-jurisdictions thead { display: none; }
  .guide-content .visa-jurisdictions tr { padding: 14px 0; border-bottom: 1px solid #d7e5f5; }
  .guide-content .visa-jurisdictions td { padding: 6px 12px; border: 0; }
  .guide-content .visa-jurisdictions td:first-child::before { content: '居住省市：'; font-weight: 600; }
  .guide-content .visa-jurisdictions td:nth-child(2)::before { content: '负责使领馆：'; font-weight: 600; }
}

@media (max-width: 900px) {
  .visa-detail-layout { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .visa-directory { position: static; max-height: none; overflow: visible; }
  .visa-directory-title { display: none; }
  .visa-directory-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 16px; border: 1px solid #d7e5f5; border-radius: 10px; background: #f7fbff; color: #3569a3; text-align: left; }
  .visa-directory-toggle::after { content: '+'; font-size: 20px; }
  .visa-directory.is-expanded .visa-directory-toggle::after { content: '−'; }
  .visa-directory .guide-navigation { display: none; padding: 12px 0 0; }
  .visa-directory.is-expanded .guide-navigation { display: flex; }
}

@media (max-width: 700px) {
  .guide-content .visa-overview > h2 { font-size: 22px; }
  .guide-content .visa-scope-note { font-size: 12px; }
  .visa-highlights { margin: 18px 0 24px; border-radius: 14px; }
  .visa-highlight { grid-template-columns: minmax(0,1fr); gap: 10px; padding: 18px; }
  .guide-content .visa-highlight h3 { margin: 0; font-size: 14px; }
  .guide-content .visa-location-highlight p { font-size: 17px; }
  .visa-location-highlight > .visa-highlight-answer { grid-column: 1; }
  .guide-content .visa-location-table, .guide-content .visa-location-table tbody,
  .guide-content .visa-location-table tr, .guide-content .visa-location-table td { display: block; width: auto; }
  .guide-content .visa-location-table thead { display: none; }
  .guide-content .visa-location-table tr { padding: 10px 0; border-bottom: 1px solid var(--visa-line); }
  .guide-content .visa-location-table tr:last-child { border-bottom: 0; }
  .guide-content .visa-location-table td { padding: 6px 12px; border: 0; }
  .visa-location-table td::before { content: attr(data-label) '：'; display: block; color: #67809b; font-size: 12px; margin-bottom: 3px; }
  .visa-text-action { justify-self: start; padding: 0; min-height: 32px; }
  .visa-details .visa-topic > summary { padding: 20px 0; }
  .guide-content .visa-details .visa-topic > summary h2 { font-size: 16px; }
  .visa-details .visa-topic-body { padding: 0 0 20px; }
}
