:root {
  --ink: #17211f;
  --porcelain: #f7f7f4;
  --mist: #dfe7e2;
  --evergreen: #29584a;
  --vermilion: #d6422b;
  --jade: #b9d6c9;
  --paper: #ffffff;
  --muted: #5f6b66;
  --line: rgba(23, 33, 31, 0.16);
  --soft-line: rgba(23, 33, 31, 0.08);
  --shadow: 0 18px 48px rgba(23, 33, 31, 0.1);
  --radius: 8px;
  color-scheme: light dark;
}

/* Dark palette tokens. Applied automatically for visitors with no explicit
   choice on dark systems (the :not([data-theme]) media block, a no-JS fallback),
   and explicitly when the theme toggle or a stored choice selects dark. JS sets
   data-theme on <html> before paint, so the explicit block covers nearly all
   visitors; the media block keeps no-JS dark-system users readable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink: #f7f7f4;
    --porcelain: #101815;
    --mist: #253631;
    --evergreen: #b9dcca;
    --vermilion: #ef6a52;
    --jade: #263b35;
    --paper: #19241f;
    --muted: #c5d0cc;
    --line: rgba(247, 247, 244, 0.25);
    --soft-line: rgba(247, 247, 244, 0.13);
    --shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
  }
}

:root[data-theme="dark"] {
  --ink: #f7f7f4;
  --porcelain: #101815;
  --mist: #253631;
  --evergreen: #b9dcca;
  --vermilion: #ef6a52;
  --jade: #263b35;
  --paper: #19241f;
  --muted: #c5d0cc;
  --line: rgba(247, 247, 244, 0.25);
  --soft-line: rgba(247, 247, 244, 0.13);
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--porcelain);
  color: var(--ink);
  font-family: "Work Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100dvh;
}

.container {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--porcelain) 94%, transparent);
  backdrop-filter: blur(12px);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: contain;
  background: #f7f7f4;
  padding: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  color: var(--muted);
  font-size: 0.94rem;
  white-space: nowrap;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button {
  background: var(--vermilion);
  color: #fff;
  border: 1px solid var(--vermilion);
}

.button:hover {
  background: #bd3824;
  border-color: #bd3824;
  transform: translateY(-1px);
}

.button:active,
.text-link:active,
.primary-link:active,
.shop-path-card:active,
.route-card:active,
.mini-card:active,
.social-link:active {
  transform: translateY(1px);
}

.text-link {
  color: var(--evergreen);
  border: 1px solid var(--line);
  background: transparent;
}

.text-link:hover {
  border-color: var(--evergreen);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  gap: clamp(36px, 6vw, 76px);
  align-items: center;
  padding: clamp(56px, 8vw, 92px) 0 44px;
}

.hero-text {
  max-width: 720px;
}

.kicker {
  margin: 0 0 14px;
  color: var(--evergreen);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-title {
  margin: 0;
  max-width: 820px;
  font-size: clamp(3rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy,
.section-copy {
  margin: 22px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.hero-actions,
.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-media-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.hero-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f7f7f4;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hero-media-link:hover .hero-media {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--evergreen) 58%, var(--line));
  box-shadow: 0 24px 58px rgba(23, 33, 31, 0.16);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transform: scale(1.14);
  transition: transform 220ms ease;
}

.hero-media-link:hover .hero-media img {
  transform: scale(1.18);
}

.media-caption {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.88rem;
}

.media-caption > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.media-caption strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-caption small {
  color: var(--muted);
  font: inherit;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.caption-action {
  flex: 0 0 auto;
  color: var(--evergreen);
  font-weight: 800;
  white-space: nowrap;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 72px;
}

.proof-item {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.proof-item:last-of-type {
  border-right: 0;
}

.proof-item strong {
  display: block;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.proof-item span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.proof-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 20px;
  border-top: 1px solid var(--soft-line);
  color: var(--muted);
  font-size: 0.88rem;
}

.proof-note a {
  color: var(--evergreen);
  font-weight: 700;
}

.section {
  padding: 72px 0;
}

.section:first-of-type {
  padding-top: 0;
}

.section-header {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-header h2,
.guide-layout h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
}

.section-header p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.signal-list {
  display: grid;
  gap: 12px;
}

.signal-list > div {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.signal-list > div:last-child {
  border-bottom: 1px solid var(--line);
}

.signal-list strong {
  display: block;
  font-size: 1.08rem;
}

.signal-list span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.shop-path-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(250px, auto);
  gap: 14px;
}

.shop-path-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.shop-path-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--evergreen) 55%, var(--line));
  box-shadow: 0 14px 32px rgba(23, 33, 31, 0.08);
}

.shop-path-card.is-wide {
  grid-column: span 2;
  grid-row: span 2;
}

.shop-path-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--mist);
}

.shop-path-card.is-wide img {
  aspect-ratio: 16 / 10;
}

.card-body {
  padding: 18px;
}

.path-meta {
  display: block;
  margin-bottom: 10px;
  color: var(--evergreen);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shop-path-card h3 {
  margin: 0;
  font-size: clamp(1.16rem, 2vw, 1.6rem);
  line-height: 1.16;
}

.shop-path-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.story-band {
  background: var(--ink);
  color: var(--porcelain);
  padding: 78px 0;
  margin: 36px 0;
}

.story-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.story-layout h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1;
}

.story-layout p {
  margin: 0 0 18px;
  color: rgba(247, 247, 244, 0.78);
  font-size: 1.08rem;
}

.story-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.story-line {
  padding-top: 14px;
  border-top: 1px solid rgba(247, 247, 244, 0.18);
  color: rgba(247, 247, 244, 0.86);
}

.customer-grid,
.faq-grid,
.route-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.faq-grid {
  grid-template-columns: repeat(2, 1fr);
}

.customer-card,
.faq-item,
.route-card {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
}

.faq-item {
  min-height: 0;
  justify-content: flex-start;
}

.customer-card strong,
.route-card strong,
.faq-item h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
}

.customer-card span,
.route-card span,
.faq-item p {
  margin: 16px 0 0;
  color: var(--muted);
}

.faq-item a {
  color: var(--evergreen);
  font-weight: 700;
}

.site-footer {
  padding: 48px 0;
  color: rgba(247, 247, 244, 0.78);
  background: #29584a;
}

.site-footer strong {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
}

.site-footer a {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.link-page {
  padding: clamp(40px, 7vw, 84px) 0 72px;
}

.link-page-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) minmax(420px, 1.1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.link-intro {
  position: sticky;
  top: 104px;
}

.link-intro > p {
  max-width: 420px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.link-hero {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  align-items: center;
}

.link-logo {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f7f7f4;
  object-fit: contain;
  padding: 6px;
}

.link-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 0.98;
}

.link-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 520px;
  margin-top: 28px;
  border: 1px solid var(--line);
  background: var(--line);
}

.link-proof span {
  display: block;
  padding: 14px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.9rem;
}

.link-proof strong {
  display: block;
  color: var(--ink);
  font-size: 1.2rem;
}

.link-panel {
  min-width: 0;
}

.primary-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 112px;
  padding: 22px 24px;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 42%),
    var(--vermilion);
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-link:hover {
  background: #bd3824;
}

.primary-mark,
.primary-action,
.social-icon,
.social-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
}

.primary-mark {
  width: 52px;
  height: 52px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  font-size: 1.45rem;
}

.primary-action {
  width: 42px;
  height: 42px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 1.22rem;
}

.primary-link strong {
  display: block;
  font-size: clamp(1.18rem, 2vw, 1.35rem);
  line-height: 1.16;
}

.primary-copy > span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.98rem;
  line-height: 1.35;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.mini-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.mini-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--evergreen) 55%, var(--line));
}

.mini-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  background: #f7f7f4;
  box-shadow: inset 0 0 0 1px rgba(23, 33, 31, 0.1);
}

.mini-card strong {
  display: block;
  line-height: 1.2;
}

.mini-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.social-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.social-link {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.social-link:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--evergreen) 55%, var(--line));
}

.social-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.social-icon {
  width: 44px;
  height: 44px;
  color: var(--evergreen);
  background: color-mix(in srgb, var(--jade) 42%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 1.2rem;
}

.social-action {
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: transparent;
  font-size: 1.05rem;
}

.social-main > span:last-child {
  min-width: 0;
}

.social-main strong {
  display: block;
  color: var(--ink);
  line-height: 1.16;
}

.social-main span span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.25;
}

.social-link:hover .social-action,
.social-link:hover .social-icon {
  color: var(--evergreen);
}

/* Component-level dark refinements. Keyed on the explicit data-theme so the
   manual toggle drives them; JS sets data-theme before paint for all JS
   visitors. (No-JS dark-system users still get the dark token palette above.) */
:root[data-theme="dark"] .brand-mark,
:root[data-theme="dark"] .link-logo {
  border-color: rgba(247, 247, 244, 0.28);
  box-shadow: 0 0 0 1px rgba(16, 24, 21, 0.7), 0 8px 22px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .hero-media-link:hover .hero-media {
  box-shadow: 0 26px 62px rgba(0, 0, 0, 0.38);
}

:root[data-theme="dark"] .media-caption {
  border-top: 1px solid var(--line);
}

:root[data-theme="dark"] .shop-path-card,
:root[data-theme="dark"] .customer-card,
:root[data-theme="dark"] .faq-item,
:root[data-theme="dark"] .route-card,
:root[data-theme="dark"] .mini-card,
:root[data-theme="dark"] .social-link,
:root[data-theme="dark"] .gallery-card,
:root[data-theme="dark"] .link-proof span {
  background: #1a2621;
  border-color: rgba(247, 247, 244, 0.24);
}

:root[data-theme="dark"] .shop-path-card:hover,
:root[data-theme="dark"] .mini-card:hover,
:root[data-theme="dark"] .gallery-card:hover,
:root[data-theme="dark"] .social-link:hover {
  border-color: color-mix(in srgb, var(--evergreen) 65%, var(--line));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .shop-path-card img,
:root[data-theme="dark"] .mini-card img {
  background: #f7f7f4;
}

:root[data-theme="dark"] .site-header {
  background: color-mix(in srgb, var(--porcelain) 88%, transparent);
}

:root[data-theme="dark"] .site-footer {
  border-top: 1px solid var(--line);
  background: #17231f;
  color: var(--muted);
}

:focus-visible {
  outline: 3px solid rgba(214, 66, 43, 0.45);
  outline-offset: 3px;
}

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
    gap: 34px;
  }

  .shop-path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-path-card.is-wide {
    grid-column: span 2;
    grid-row: auto;
  }
}

@media (max-width: 920px) {
  .hero,
  .guide-layout,
  .story-layout,
  .footer-grid,
  .link-page-grid {
    grid-template-columns: 1fr;
  }

  .link-intro {
    position: static;
  }

  .customer-grid,
  .route-grid {
    grid-template-columns: 1fr;
  }

  .proof-strip,
  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-item:nth-child(2) {
    border-right: 0;
  }

  .proof-item:nth-child(3),
  .proof-item:nth-child(4) {
    border-top: 1px solid var(--soft-line);
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .nav {
    min-height: 64px;
  }

  .brand-link span {
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-links {
    gap: 10px;
    font-size: 0.86rem;
  }

  /* Hide only the direct page links on mobile (gift paths / story / links /
     home). The `>` keeps the language + theme toggles inside .nav-tools
     visible — without it, the 中文/EN switch (an <a>) gets hidden too and
     mobile users can't reach the Chinese site. */
  .nav-links > a:not(.button) {
    display: none;
  }

  .button,
  .text-link {
    padding-inline: 14px;
  }

  .hero {
    padding-top: 38px;
  }

  .hero h1,
  .page-title {
    font-size: clamp(2.6rem, 14vw, 4.4rem);
  }

  .media-caption {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .proof-strip,
  .shop-path-grid,
  .mini-grid,
  .faq-grid,
  .link-proof {
    grid-template-columns: 1fr;
  }

  .proof-item,
  .proof-item:nth-child(2),
  .proof-item:nth-child(3),
  .proof-item:nth-child(4) {
    border-right: 0;
    border-top: 0;
    border-bottom: 1px solid var(--soft-line);
  }

  .proof-item:last-of-type {
    border-bottom: 0;
  }

  .shop-path-card.is-wide {
    grid-column: auto;
  }

  .link-hero {
    grid-template-columns: 72px 1fr;
    gap: 16px;
  }

  .link-logo {
    width: 72px;
    height: 72px;
  }

  .primary-link {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 96px;
    padding: 18px;
  }

  .primary-mark {
    width: 44px;
    height: 44px;
    font-size: 1.22rem;
  }

  .primary-action {
    width: 36px;
    height: 36px;
  }

  .mini-card {
    grid-template-columns: 72px 1fr;
  }

  .mini-card img {
    width: 72px;
    height: 72px;
  }

  .social-link {
    min-height: 72px;
  }
}

@supports not (color: color-mix(in srgb, white, black)) {
  .site-header {
    background: rgba(247, 247, 244, 0.94);
  }

  .shop-path-card:hover,
  .mini-card:hover,
  .social-link:hover {
    border-color: rgba(41, 88, 74, 0.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* ============================================================
   Bilingual (EN / ZH) visibility
   Both languages live in the DOM (crawlable for SEO/GEO); the
   inactive language is hidden per <html data-lang>. Elements
   without a lang attribute are unaffected.
   ============================================================ */
/* All translatable pairs are inline spans. !important keeps this utility above
   component rules that set display on spans (e.g. .proof-item span,
   .social-main span span), which would otherwise unhide the inactive language. */
[lang="zh"] { display: none !important; }            /* default + no-JS: show English */
html[data-lang="zh"] [lang="zh"] { display: inline !important; }
html[data-lang="zh"] [lang="en"] { display: none !important; }

/* ============================================================
   Header tools: theme + language toggles
   ============================================================ */
.nav-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  border-color: var(--evergreen);
  color: var(--evergreen);
}

.icon-button:active {
  transform: translateY(1px);
}

.icon-button svg {
  width: 19px;
  height: 19px;
  display: block;
}

/* Sun/moon swap: show the action you can take. */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.lang-toggle .lang-label {
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ============================================================
   Hero auto-scrolling product gallery
   ============================================================ */
.hero-aside {
  min-width: 0;
}

.hero-gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hero-gallery-head strong {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--evergreen);
}

.hero-gallery-head a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.hero-gallery-head a:hover {
  color: var(--ink);
}

.hero-gallery {
  position: relative;
  height: clamp(440px, 60vh, 620px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-gallery-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hero-gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-card {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px 10px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
}

.gallery-thumb {
  grid-column: 1 / -1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--mist);
  box-shadow: inset 0 0 0 1px var(--soft-line);
}

.gallery-meta {
  grid-column: 1;
  align-self: center;
  min-width: 0;
}

.gallery-cat {
  display: block;
  margin-bottom: 3px;
  color: var(--evergreen);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.gallery-title {
  display: block;
  font-weight: 700;
  line-height: 1.18;
  font-size: 1.08rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-surface {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
}

.gallery-go {
  grid-column: 2;
  align-self: center;
  justify-self: end;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--mist);
  color: var(--evergreen);
  font-weight: 800;
  font-size: 1.05rem;
  transition: background 160ms ease, color 160ms ease;
}

.gallery-card:hover .gallery-go {
  background: var(--evergreen);
  color: #fff;
}

/* Carousel arrows (desktop / pointer devices) */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 160ms ease, transform 160ms ease;
}

.gallery-arrow svg {
  width: 20px;
  height: 20px;
}

.gallery-arrow:hover {
  background: var(--paper);
}

.gallery-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.gallery-arrow-prev { left: 10px; }
.gallery-arrow-next { right: 10px; }

/* Pagination dots */
.gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--soft-line);
  cursor: pointer;
  transition: background 160ms ease, width 160ms ease;
}

.gallery-dot:hover {
  background: var(--muted);
}

.gallery-dot.is-active {
  width: 22px;
  background: var(--evergreen);
}

.gallery-note {
  margin: 10px 2px 0;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}

/* The reinstall tip only matters on phones/tablets, where the Etsy app can be
   the thing that opens. Hidden on pointer devices. */
.gallery-note-mobile {
  display: none;
  margin-top: 6px;
  font-size: 0.74rem;
}

@media (hover: none) and (pointer: coarse) {
  .gallery-note-mobile {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-gallery-track {
    scroll-behavior: auto;
  }
}

@media (max-width: 920px) {
  .hero-gallery {
    height: clamp(360px, 78vw, 520px);
  }
}

/* Touch devices: no hover arrows — swipe + dots drive the carousel. */
@media (hover: none) {
  .gallery-arrow {
    display: none;
  }
}

/* Narrow phones: the brand wordmark + theme + language + Shop Etsy can't all
   fit. Drop the wordmark (logo still links home) and tighten gaps so the row
   never overflows horizontally. */
@media (max-width: 480px) {
  .nav {
    gap: 12px;
  }
  .brand-link span {
    display: none;
  }
  .nav-tools {
    gap: 6px;
  }
}

/* ============================================================
   Reviews band — vertical auto-scroll testimonials
   ============================================================ */
.reviews-band {
  padding: 4px 0;
}

/* Pull the band tight against the stats strip above and the gift paths
   below — the default section spacing leaves it floating in whitespace. */
.proof-strip:has(+ .reviews-band) {
  margin-bottom: 22px;
}

.reviews-band + .section {
  padding-top: 24px;
}

.reviews-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  text-decoration: none;
}

.reviews-head:hover strong,
.reviews-head:focus-visible strong,
.reviews-head:hover span,
.reviews-head:focus-visible span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reviews-head strong {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--evergreen);
}

.reviews-head span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.reviews-viewport {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  height: 76px;
  overflow: hidden;
}

.reviews-track {
  display: flex;
  flex-direction: column;
  animation: reviews-flip 28s infinite;
}

.reviews-viewport:hover .reviews-track,
.reviews-viewport:focus-within .reviews-track {
  animation-play-state: paused;
}

/* One review on screen at a time. The track is 5 reviews + a clone of the
   first (6 slides), so each slide is 1/6 ≈ 16.667% of the track height: one
   flip up = translateY(-16.667%), and -83.333% lands on the clone so the loop
   restarts with no visible jump. Each slide holds ~4.5s, then flips up ~1s. */
@keyframes reviews-flip {
  0%,   16%  { transform: translateY(0); }
  20%,  36%  { transform: translateY(-16.6667%); }
  40%,  56%  { transform: translateY(-33.3333%); }
  60%,  76%  { transform: translateY(-50%); }
  80%,  96%  { transform: translateY(-66.6667%); }
  100%       { transform: translateY(-83.3333%); }
}

.review-card {
  flex: 0 0 76px;
  height: 76px;
  box-sizing: border-box;
  margin: 0;
  padding: 6px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border: 0;
  background: transparent;
}

.review-stars {
  color: #e0a32e;
  letter-spacing: 2px;
  font-size: 0.82rem;
  line-height: 1;
}

.review-card blockquote {
  margin: 6px 0 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* the "on <product>" caption is dropped in the compact wide layout to keep
   the band short; the product is one tap away on Etsy anyway. */
.review-card figcaption {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .reviews-viewport {
    height: auto;
    overflow: visible;
  }
  .reviews-track {
    animation: none;
    gap: 12px;
  }
  .review-card {
    flex: none;
    height: auto;
  }
  /* the clone slide is only needed for the animated loop */
  .review-card[aria-hidden="true"] {
    display: none;
  }
}
