/*!
 * Tesla Dealer System — front-end + admin styles.
 * Cinematic UI: Light Blue-Grey Gatsby variant.
 */

:root {
  /* Color palette */
  --color-bg:               #ECEFF3;
  --color-surface:          #DDE3EB;
  --color-surface-raised:   #F4F6F9;
  --color-accent:           #3E5C7E;
  --color-accent-deep:      #1F3148;
  --color-lighthouse:       #7FA89A;
  --color-blush:            #D9C0B0;
  --color-text:             #1B2A3E;
  --color-text-body:        #2A3340;
  /* 4.6:1 on --color-bg — the old #6B7689 was 3.98:1 and failed WCAG AA
     at the 10-13px sizes this token is used at. */
  --color-text-muted:       #5A6578;
  --color-divider:          #C9D1DB;

  --color-accent-rgb:       62, 92, 126;
  --color-blush-rgb:        217, 192, 176;
  --color-lighthouse-rgb:   127, 168, 154;
  --color-bg-rgb:           236, 239, 243;

  /* Typography */
  --font-display:           'Roboto', system-ui, sans-serif;
  --font-body:              'Noto Sans TC', 'Roboto', system-ui, sans-serif;

  --tracking-deco:          0.32em;
  --tracking-sub:           0.18em;
  --tracking-label:         0.12em;
  --tracking-roman:         0.20em;
  --tracking-name:          0.06em;
  --tracking-name-en:       0.04em;

  /* Spacing */
  --space-mansion-edge:     64px;
  --space-content-max:      1180px;
  --space-card-max:         880px;
  --space-quote-max:        760px;
  --space-narrow-max:       720px;

  /* Sizes */
  --bracket-size:           20px;
  --bracket-stroke:         1px;
  --hairline:               1px solid var(--color-accent);
  --hairline-soft:          1px solid var(--color-divider);
  --rhombus-size:           8px;

  /* Motion */
  --ease-cinematic:         cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:               cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-back:          cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:               200ms;
  --dur-mid:                500ms;
  --dur-slow:               900ms;
  /* Consumed by the tvd explorer (compare bar etc.) — was undefined,
     which silently invalidated whole transition declarations. */
  --duration-normal:        200ms;
  --font-ui:                var(--font-body);

  --grain-overlay:          url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24  0 0 0 0 0.36  0 0 0 0 0.49  0 0 0 0.28 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

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

/* Keyboard focus — one consistent ring across both design systems. */
:where(.tds-page, .tds-admin, .tvd-app) :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ============================================================
   Page shell + global cool grain overlay
   ============================================================ */
.tds-page {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  position: relative;
  margin: 0;
  padding: 0 var(--space-mansion-edge) var(--space-mansion-edge);
}
.tds-page::before {
  content: '';
  position: fixed; inset: 0;
  background-image: var(--grain-overlay);
  background-size: 160px 160px;
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}
.tds-content {
  max-width: var(--space-content-max);
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
@media (max-width: 768px) {
  .tds-page { padding: 0 16px 24px; }
}

/* ============================================================
   Top Navigation
   ============================================================ */
.tds-nav {
  position: sticky; top: 0; z-index: 50;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 calc(-1 * var(--space-mansion-edge)) 0;
  padding: 0 var(--space-mansion-edge);
  background: rgba(var(--color-bg-rgb), 0.92);
  -webkit-backdrop-filter: saturate(120%) blur(2px);
  backdrop-filter: saturate(120%) blur(2px);
  border-bottom: var(--hairline-soft);
}
.tds-nav__brand { color: var(--color-accent); display: inline-flex; }
.tds-monogram { width: 60px; height: 24px; display: block; }
.tds-nav__links {
  list-style: none; display: flex; gap: 32px; padding: 0; margin: 0;
}
.tds-nav__links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
}
.tds-nav__links a::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--color-accent);
  transition: width 0.4s var(--ease-out);
}
.tds-nav__links a:hover::after { width: 100%; }
@media (max-width: 768px) {
  .tds-nav { margin: 0 -16px; padding: 0 16px; }
  .tds-nav__links { gap: 12px; font-size: 10px; letter-spacing: 0.08em; flex-wrap: wrap; justify-content: flex-end; }
}

/* ============================================================
   Frame brackets (corner brackets primitive)
   ============================================================ */
.tds-frame { position: relative; }
.tds-frame__bracket {
  position: absolute;
  width: var(--bracket-size); height: var(--bracket-size);
  pointer-events: none;
}
.tds-frame__bracket--tl { top: 0; left: 0;
  border-top: var(--bracket-stroke) solid var(--color-accent);
  border-left: var(--bracket-stroke) solid var(--color-accent);
}
.tds-frame__bracket--tr { top: 0; right: 0;
  border-top: var(--bracket-stroke) solid var(--color-accent);
  border-right: var(--bracket-stroke) solid var(--color-accent);
}
.tds-frame__bracket--bl { bottom: 0; left: 0;
  border-bottom: var(--bracket-stroke) solid var(--color-accent);
  border-left: var(--bracket-stroke) solid var(--color-accent);
}
.tds-frame__bracket--br { bottom: 0; right: 0;
  border-bottom: var(--bracket-stroke) solid var(--color-accent);
  border-right: var(--bracket-stroke) solid var(--color-accent);
}
.tds-frame--thick .tds-frame__bracket {
  width: 28px; height: 28px;
  border-width: 2px;
}

/* ============================================================
   Rhombus divider
   ============================================================ */
.tds-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 64px 0;
}
.tds-divider__line { flex: 1; height: 1px; background: var(--color-divider); }
.tds-divider__rhombus {
  font-size: var(--rhombus-size);
  color: var(--color-accent);
  letter-spacing: 0.2em;
}

/* ============================================================
   Chapter Plate Hero
   ============================================================ */
.tds-chapter {
  position: relative;
  min-height: calc(100dvh - 56px);
  display: flex; align-items: center; justify-content: center;
  padding: 56px 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.tds-chapter::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-divider), transparent);
}
.tds-chapter__fog {
  position: absolute; inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 50%,
    rgba(var(--color-accent-rgb), 0.16),
    transparent 70%
  );
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
  transition: transform 1s var(--ease-out);
}
.tds-deco-fan {
  position: absolute;
  width: 200px; height: 200px;
  color: var(--color-accent);
  opacity: 0.06;
  pointer-events: none;
}
.tds-deco-fan--tl { top: 0; left: 0; }
.tds-deco-fan--br { bottom: 0; right: 0; transform: rotate(180deg); }
.tds-chapter__metadata {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.tds-chapter__metadata--bl { bottom: 24px; left: 32px; }
.tds-chapter__metadata--tr { top: 24px; right: 32px; }

.tds-chapter__plate {
  width: 720px; max-width: 100%;
  padding: 64px 56px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.62), transparent 42%),
    linear-gradient(180deg, var(--color-surface-raised), rgba(var(--color-bg-rgb), 0.88));
  border: var(--hairline);
  text-align: center;
  position: relative;
  clip-path: inset(50% 0 50% 0);
  opacity: 0;
  transition:
    clip-path var(--dur-slow) var(--ease-cinematic),
    opacity var(--dur-slow) var(--ease-cinematic);
}
.tds-chapter__plate::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: var(--hairline-soft);
  pointer-events: none;
}
.tds-chapter__plate.is-revealed {
  clip-path: inset(0);
  opacity: 1;
}
.tds-chapter__rhombus-row {
  font-size: 8px;
  letter-spacing: 0.4em;
  color: var(--color-accent);
  margin: 0 0 32px;
}
.tds-chapter__plate .tds-chapter__rhombus-row:last-child { margin: 32px 0 0; }
.tds-chapter__title {
  font-family: var(--font-display);
  font-weight: 100;
  font-size: clamp(48px, 8vw, 96px);
  letter-spacing: var(--tracking-deco);
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 24px;
  line-height: 1;
}
.tds-chapter__sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 24px;
  letter-spacing: var(--tracking-name);
  color: var(--color-text-body);
  margin: 0 0 8px;
}
.tds-chapter__sub-en {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: var(--tracking-sub);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0;
}
@media (max-width: 768px) {
  .tds-chapter { min-height: auto; padding: 48px 0 56px; }
  .tds-chapter__plate { padding: 40px 24px; }
  .tds-deco-fan { width: 120px; height: 120px; }
  .tds-chapter__metadata { font-size: 9px; }
}

/* ============================================================
   Section header
   ============================================================ */
.tds-section { padding: 56px 0; }
.tds-section--region { padding-bottom: 32px; }
.tds-section--type { padding-top: 28px; padding-bottom: 28px; }
.tds-section--grid { padding-top: 28px; }
.tds-section__head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
}
.tds-section__head::before,
.tds-section__head::after {
  content: '';
  width: min(120px, 18vw);
  height: 1px;
  background: var(--color-divider);
}
.tds-section__rhombus { font-size: 8px; color: var(--color-accent); letter-spacing: 0.4em; }
.tds-section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0;
}

/* ============================================================
   Region Stamps
   ============================================================ */
.tds-stamp-row {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  padding: 28px 32px 30px;
  border-top: var(--hairline-soft);
  border-bottom: var(--hairline-soft);
  background: rgba(244, 246, 249, 0.42);
  position: relative;
  justify-items: center;
}
.tds-stamp-row::before, .tds-stamp-row::after {
  content: '◆';
  position: absolute; top: 50%;
  transform: translateY(-50%);
  font-size: 8px; color: var(--color-accent);
}
.tds-stamp-row::before { left: -16px; }
.tds-stamp-row::after  { right: -16px; }
@media (max-width: 1024px) {
  .tds-stamp-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .tds-stamp-row { grid-template-columns: repeat(2, 1fr); }
}

.tds-stamp {
  --stamp-size: 90px;
  position: relative;
  width: var(--stamp-size);
  display: inline-flex; flex-direction: column; align-items: center;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  color: var(--color-accent);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.tds-stamp__ring { width: var(--stamp-size); height: var(--stamp-size); display: block; transition: fill 0.2s; }
.tds-stamp__char {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 36px;
  color: var(--color-text);
  transition: color var(--dur-fast);
}
.tds-stamp__dot {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, 18px);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-lighthouse);
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.tds-stamp__name {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.tds-stamp:hover { transform: rotate(1deg); }
.tds-stamp:hover .tds-stamp__dot { opacity: 1; }
.tds-stamp[aria-pressed="true"] .tds-stamp__ring circle {
  fill: var(--color-accent); stroke: var(--color-accent);
}
.tds-stamp[aria-pressed="true"] .tds-stamp__char { color: var(--color-bg); }
.tds-stamp[aria-pressed="true"] .tds-stamp__name { color: var(--color-text); }
.tds-stamp-row.has-selection .tds-stamp:not([aria-pressed="true"]) { opacity: 0.45; }

/* mini stamp (in cards / breadcrumbs) */
.tds-stamp-mini {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ============================================================
   Type Chips
   ============================================================ */
.tds-chip-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  max-width: 960px; margin: 24px auto 16px;
}
.tds-chip-row--admin { gap: 8px; margin: 0 0 16px; justify-content: flex-start; max-width: none; }
.tds-chip-row__count {
  text-align: center;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: var(--tracking-name);
  color: var(--color-text-body);
  margin: 0 0 48px;
}

.tds-chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  background: var(--color-surface-raised);
  border: var(--hairline-soft);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  position: relative;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.tds-chip__icon {
  width: 20px; height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.tds-chip:hover {
  background: rgba(var(--color-blush-rgb), 0.18);
  border-color: var(--color-accent);
}
.tds-chip[aria-pressed="true"] {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
  transform: rotate(1deg);
}
.tds-chip[aria-pressed="true"] .tds-chip__icon { color: var(--color-bg); }

.tds-chip-mini {
  padding: 3px 8px;
  border: 1px solid var(--color-divider);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  color: var(--color-text-body);
  display: inline-block;
}
.tds-chip-mini--more { color: var(--color-text-muted); border-style: dashed; }

/* ============================================================
   Dealer Card
   ============================================================ */
.tds-card-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
}
.tds-card-grid .tds-card { grid-column: span 4; }
.tds-card-grid .tds-card:nth-child(1),
.tds-card-grid .tds-card:nth-child(2) { grid-column: span 6; }
@media (max-width: 1024px) {
  .tds-card-grid .tds-card,
  .tds-card-grid .tds-card:nth-child(1),
  .tds-card-grid .tds-card:nth-child(2) { grid-column: span 6; }
}
@media (max-width: 640px)  {
  .tds-card-grid { grid-template-columns: 1fr; }
  .tds-card-grid .tds-card,
  .tds-card-grid .tds-card:nth-child(1),
  .tds-card-grid .tds-card:nth-child(2) { grid-column: 1; }
}

.tds-card-grid .tds-card {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 500ms var(--ease-out),
    transform 500ms var(--ease-out);
}
.tds-card-grid.is-staggered .tds-card { opacity: 1; transform: translateY(0); }
.tds-card-grid.is-staggered .tds-card:nth-child(1) { transition-delay: 0ms; }
.tds-card-grid.is-staggered .tds-card:nth-child(2) { transition-delay: 60ms; }
.tds-card-grid.is-staggered .tds-card:nth-child(3) { transition-delay: 120ms; }
.tds-card-grid.is-staggered .tds-card:nth-child(4) { transition-delay: 180ms; }
.tds-card-grid.is-staggered .tds-card:nth-child(5) { transition-delay: 240ms; }
.tds-card-grid.is-staggered .tds-card:nth-child(6) { transition-delay: 300ms; }

.tds-card {
  display: flex; flex-direction: column;
  background: var(--color-surface-raised);
  border: var(--hairline);
  position: relative;
  overflow: hidden;
  min-height: 100%;
}
.tds-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(
    300px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--color-blush-rgb), 0.18),
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--dur-fast);
  pointer-events: none;
  z-index: 1;
}
.tds-card:hover::before { opacity: 1; }
.tds-card > :not(.tds-frame__bracket) { position: relative; z-index: 2; }
.tds-card > .tds-frame__bracket { z-index: 3; }
.tds-card:hover { background: #FAFBFD; }

.tds-card__cover {
  display: block;
  aspect-ratio: 16 / 11;
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  text-decoration: none;
}
.tds-card__cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.tds-card__photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(var(--color-accent-rgb), 0.14), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,0.68), transparent 38%),
    var(--color-surface);
  color: var(--color-accent);
}
.tds-card__photo-fallback::before,
.tds-card__photo-fallback::after {
  content: '';
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(var(--color-accent-rgb), 0.22);
  transform: rotate(45deg);
}
.tds-card__photo-fallback::after {
  width: 46%;
  border-color: rgba(var(--color-lighthouse-rgb), 0.42);
}
.tds-card__photo-code,
.tds-card__photo-line {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.tds-card__photo-code { top: 18px; left: 20px; font-size: 10px; }
.tds-card__photo-line {
  right: 20px; bottom: 18px;
  max-width: 68%;
  text-align: right;
  font-size: 10px;
  line-height: 1.5;
}
.tds-card__photo-mark {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--hairline);
  border-radius: 50%;
  background: rgba(var(--color-bg-rgb), 0.55);
  font-family: var(--font-body);
  font-size: 36px;
  font-weight: 300;
  color: var(--color-text);
}
.tds-card__cover-grain {
  position: absolute; inset: 0;
  background-image: var(--grain-overlay);
  background-size: 160px 160px;
  opacity: 0.4;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.tds-card__body { padding: 24px 24px 20px; }
.tds-card-grid .tds-card:nth-child(1) .tds-card__body,
.tds-card-grid .tds-card:nth-child(2) .tds-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  align-items: start;
}
.tds-card-grid .tds-card:nth-child(1) .tds-card__name-en,
.tds-card-grid .tds-card:nth-child(2) .tds-card__name-en,
.tds-card-grid .tds-card:nth-child(1) .tds-card__meta,
.tds-card-grid .tds-card:nth-child(2) .tds-card__meta {
  grid-column: 1;
}
.tds-card-grid .tds-card:nth-child(1) .tds-card__foot,
.tds-card-grid .tds-card:nth-child(2) .tds-card__foot {
  grid-column: 2;
  grid-row: 1 / span 3;
  min-width: 150px;
  height: 100%;
  padding-top: 0;
  border-top: 0;
  border-left: var(--hairline-soft);
  padding-left: 20px;
  flex-direction: column;
  align-items: flex-start;
}
.tds-card__name {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: var(--tracking-name);
  color: var(--color-text);
  margin: 0 0 4px;
}
.tds-card__name-en {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: var(--tracking-sub);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 16px;
}
.tds-card__meta {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-bottom: 20px;
}
.tds-card__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px;
  border-top: var(--hairline-soft);
}
.tds-card__owner {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  color: var(--color-text-muted);
}
.tds-card__cta {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap var(--dur-fast);
}
.tds-card:hover .tds-card__cta { gap: 10px; }
@media (max-width: 720px) {
  .tds-card-grid .tds-card:nth-child(1) .tds-card__body,
  .tds-card-grid .tds-card:nth-child(2) .tds-card__body {
    display: block;
  }
  .tds-card-grid .tds-card:nth-child(1) .tds-card__foot,
  .tds-card-grid .tds-card:nth-child(2) .tds-card__foot {
    min-width: 0;
    height: auto;
    padding-top: 16px;
    border-top: var(--hairline-soft);
    border-left: 0;
    padding-left: 0;
    flex-direction: row;
    align-items: center;
  }
}

/* ============================================================
   Pagination
   ============================================================ */
.tds-pagination {
  display: flex; justify-content: space-between; align-items: center;
  padding: 32px 0;
  border-top: var(--hairline-soft);
  border-bottom: var(--hairline-soft);
  margin: 64px 0;
}
.tds-pagination__nav {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
}
.tds-pagination__numbers { display: flex; gap: 16px; }
.tds-pagination__numbers a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: var(--tracking-roman);
  color: var(--color-text);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  position: relative; padding: 4px 0;
}
.tds-pagination__numbers a::after {
  content: '';
  position: absolute; left: 50%; right: 50%; bottom: 0;
  height: 1px; background: var(--color-accent);
  transition: left var(--dur-fast), right var(--dur-fast);
}
.tds-pagination__numbers a:hover::after,
.tds-pagination__numbers a.is-current::after { left: 0; right: 0; }

/* ============================================================
   Curator Quote
   ============================================================ */
.tds-quote {
  position: relative;
  max-width: var(--space-quote-max);
  margin: 80px auto;
  padding: 24px 56px;
  text-align: center;
  opacity: 0;
  transform: scale(0.98);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
}
.tds-quote.is-revealed { opacity: 1; transform: scale(1); }
.tds-quote blockquote {
  margin: 0 0 24px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: var(--color-text);
}
.tds-quote cite {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-style: normal;
}
.tds-quote__rhombus { position: absolute; font-size: 12px; color: var(--color-accent); }
.tds-quote__rhombus--tl { top: 0; left: 16px; }
.tds-quote__rhombus--br { bottom: 0; right: 16px; }

/* ============================================================
   CTA Card + buttons
   ============================================================ */
.tds-cta {
  max-width: var(--space-card-max);
  margin: 80px auto 96px;
  padding: 80px 64px;
  background: var(--color-surface-raised);
  border: 2px solid var(--color-accent);
  text-align: center;
  clip-path: inset(50% 0 50% 0);
  opacity: 0;
  transition:
    clip-path var(--dur-slow) var(--ease-cinematic),
    opacity var(--dur-slow) var(--ease-cinematic);
}
.tds-cta.is-revealed { clip-path: inset(0); opacity: 1; }
.tds-cta__title {
  font-family: var(--font-display);
  font-weight: 100;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 16px;
}
.tds-cta__sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 20px;
  color: var(--color-text-body);
  margin: 0 0 40px;
}

.tds-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 32px;
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.tds-btn:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  outline: 8px solid rgba(var(--color-blush-rgb), 0.25);
}
.tds-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tds-btn--primary { border-width: 2px; }
.tds-btn--solid {
  background: var(--color-accent); color: var(--color-bg);
}
.tds-btn--solid:hover {
  background: var(--color-accent-deep); border-color: var(--color-accent-deep);
}
.tds-link {
  background: transparent; border: 0;
  color: var(--color-accent);
  font: inherit;
  border-bottom: 1px solid var(--color-accent);
  padding: 0 0 2px;
  cursor: pointer;
}

/* ============================================================
   Footer
   ============================================================ */
.tds-footer {
  text-align: center;
  padding: 64px 0 32px;
  color: var(--color-text-muted);
  position: relative;
  z-index: 2;
}
.tds-footer__brand { color: var(--color-accent); margin-bottom: 16px; }
.tds-footer__brand p {
  margin: 8px 0 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: var(--tracking-name);
}
.tds-footer__links {
  list-style: none; padding: 0; margin: 24px 0;
  display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
}
.tds-footer__links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative; padding: 4px 0;
}
.tds-footer__links a::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--color-accent);
  transition: width 0.4s var(--ease-out);
}
.tds-footer__links a:hover::after { width: 100%; }
.tds-footer__colophon {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: var(--tracking-sub);
  text-transform: uppercase;
  margin: 0;
}

/* ============================================================
   Detail page — Breadcrumb / Portrait / Story / Services / Gallery / Reviews / Contact
   ============================================================ */
.tds-breadcrumb {
  display: flex; gap: 12px; align-items: center;
  padding: 24px 0;
  border-bottom: var(--hairline-soft);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}
.tds-breadcrumb a {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
}
.tds-breadcrumb__sep { font-size: 6px; color: var(--color-divider); }

.tds-portrait {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 64px;
  margin: 64px 0 96px;
  align-items: stretch;
}
.tds-portrait__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--hairline-soft);
}
.tds-portrait__photo img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.6s; }
.tds-portrait__photo-grain {
  position: absolute; inset: 0;
  background-image: var(--grain-overlay);
  background-size: 160px 160px;
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity 0.6s;
}
.tds-portrait__photo:hover .tds-portrait__photo-grain { opacity: 0.7; }

.tds-portrait__plate {
  display: flex; flex-direction: column;
  padding: 32px 0;
}
.tds-portrait__plate .tds-stamp-mini { width: 32px; height: 32px; font-size: 16px; }
.tds-portrait__name {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(48px, 5vw, 72px);
  letter-spacing: var(--tracking-name);
  color: var(--color-text);
  margin: 16px 0 4px;
  line-height: 1.1;
  clip-path: inset(50% 0 50% 0);
  opacity: 0;
  transition: clip-path var(--dur-slow) var(--ease-cinematic), opacity var(--dur-slow) var(--ease-cinematic);
}
.tds-portrait__name.is-revealed { clip-path: inset(0); opacity: 1; }
.tds-portrait__name-en {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: var(--tracking-sub);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 24px;
}
.tds-portrait__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tds-portrait__intro {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 20px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: var(--color-text-body);
}
.tds-portrait__contact {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent);
  align-self: flex-start;
  padding-bottom: 4px;
  margin-top: 16px;
}
.tds-portrait__joined {
  margin-top: auto;
  padding-top: 32px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.tds-portrait__plate > * {
  opacity: 0; transform: translateX(20px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.tds-portrait__plate.is-staggered > * { opacity: 1; transform: translateX(0); }
.tds-portrait__plate.is-staggered > *:nth-child(1) { transition-delay: 0ms; }
.tds-portrait__plate.is-staggered > *:nth-child(2) { transition-delay: 100ms; }
.tds-portrait__plate.is-staggered > *:nth-child(3) { transition-delay: 200ms; }
.tds-portrait__plate.is-staggered > *:nth-child(4) { transition-delay: 300ms; }
.tds-portrait__plate.is-staggered > *:nth-child(5) { transition-delay: 400ms; }
.tds-portrait__plate.is-staggered > *:nth-child(6) { transition-delay: 500ms; }
.tds-portrait__plate.is-staggered > *:nth-child(7) { transition-delay: 600ms; }
.tds-portrait__plate.is-staggered > *:nth-child(8) { transition-delay: 700ms; }
.tds-portrait__plate.is-staggered .tds-portrait__name { transform: none; }

@media (max-width: 900px) {
  .tds-portrait { grid-template-columns: 1fr; gap: 32px; }
  .tds-portrait__photo { aspect-ratio: 3 / 4; }
}

.tds-story {
  max-width: var(--space-narrow-max);
  margin: 80px auto;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.85;
  color: var(--color-text-body);
}
.tds-story p { margin: 0 0 1.5em; position: relative; }
.tds-story p:hover::before {
  content: '';
  position: absolute; left: -16px; top: 0.4em; bottom: 0.4em;
  width: 1px; background: var(--color-accent);
}
.tds-story__droplabel {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 2em 0 1em;
  opacity: 0; transform: translateX(-12px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.tds-story__droplabel.is-revealed { opacity: 1; transform: translateX(0); }

.tds-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none; padding: 0; margin: 0;
}
.tds-services li {
  padding: 24px;
  border-top: var(--hairline-soft);
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
  font-family: var(--font-body);
  opacity: 0; transform: translateY(16px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.tds-services.is-staggered li { opacity: 1; transform: translateY(0); }
.tds-services.is-staggered li:nth-child(1) { transition-delay: 0ms; }
.tds-services.is-staggered li:nth-child(2) { transition-delay: 60ms; }
.tds-services.is-staggered li:nth-child(3) { transition-delay: 120ms; }
.tds-services.is-staggered li:nth-child(4) { transition-delay: 180ms; }
.tds-services.is-staggered li:nth-child(5) { transition-delay: 240ms; }
.tds-services.is-staggered li:nth-child(6) { transition-delay: 300ms; }
.tds-services li:hover::before {
  content: '◆';
  position: absolute; left: 4px; top: 26px;
  font-size: 8px; color: var(--color-accent);
}
.tds-services li strong { font-weight: 400; font-size: 16px; color: var(--color-text); }
.tds-services li span { font-weight: 400; font-size: 13px; color: var(--color-text-muted); letter-spacing: 0.04em; }
@media (max-width: 768px) { .tds-services { grid-template-columns: 1fr; } }

.tds-gallery {
  columns: 4 240px;
  column-gap: 16px;
}
.tds-gallery > figure {
  break-inside: avoid;
  margin: 0 0 16px;
  position: relative;
  border: var(--hairline-soft);
  opacity: 0; transform: scale(0.92);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.tds-gallery.is-staggered > figure { opacity: 1; transform: scale(1); }
.tds-gallery > figure img { width: 100%; display: block; }
.tds-gallery > figure::before, .tds-gallery > figure::after,
.tds-gallery > figure > .bl, .tds-gallery > figure > .br {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  pointer-events: none;
}
.tds-gallery > figure::before { top: 0; left: 0; border-top: 1px solid var(--color-accent); border-left: 1px solid var(--color-accent); }
.tds-gallery > figure::after  { top: 0; right: 0; border-top: 1px solid var(--color-accent); border-right: 1px solid var(--color-accent); }
.tds-gallery > figure > .bl { bottom: 0; left: 0; border-bottom: 1px solid var(--color-accent); border-left: 1px solid var(--color-accent); }
.tds-gallery > figure > .br { bottom: 0; right: 0; border-bottom: 1px solid var(--color-accent); border-right: 1px solid var(--color-accent); }

.tds-contact {
  display: grid;
  grid-template-columns: 60% 40%;
  background: var(--color-surface-raised);
  border: var(--hairline);
  margin: 64px 0;
  min-height: 480px;
}
.tds-contact__map { height: 100%; min-height: 360px; filter: url(#cool-sepia); }
.tds-contact__info { padding: 48px 40px; border-left: var(--hairline-soft); display: flex; flex-direction: column; }
.tds-contact__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 24px;
}
.tds-contact__list { margin: 0 0 32px; padding: 0; }
.tds-contact__list dt {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 16px;
}
.tds-contact__list dt:first-child { margin-top: 0; }
.tds-contact__list dd {
  margin: 4px 0 0; padding: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  color: var(--color-text);
}
.tds-contact__list dd a { color: var(--color-accent); text-decoration: none; border-bottom: 1px solid var(--color-divider); }
@media (max-width: 900px) {
  .tds-contact { grid-template-columns: 1fr; }
  .tds-contact__map { min-height: 320px; }
  .tds-contact__info { border-left: 0; border-top: var(--hairline-soft); }
}

/* ============================================================
   Submission Form
   ============================================================ */
.tds-form-layout {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 32px;
  margin: 64px 0;
}
@media (max-width: 1024px) {
  .tds-form-layout { grid-template-columns: 1fr; }
  .tds-form-outline { display: none; }
}
.tds-form-outline { position: sticky; top: 88px; align-self: start; }
.tds-form-outline ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 24px;
}
.tds-form-outline a {
  display: block; padding: 8px 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: var(--tracking-roman);
  color: var(--color-text-muted);
  text-decoration: none;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-left: 2px solid transparent;
  padding-left: 16px;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.tds-form-outline a:hover, .tds-form-outline a.is-current {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
}

.tds-form-card {
  background: var(--color-surface-raised);
  border: 2px solid var(--color-accent);
  padding: 80px 64px;
  position: relative;
}
.tds-form-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--grain-overlay);
  background-size: 160px 160px;
  opacity: 0.7;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.tds-form-card > * { position: relative; }

.tds-form-card__hero {
  text-align: center;
  margin-bottom: 64px;
  clip-path: inset(50% 0 50% 0);
  opacity: 0;
  transition: clip-path var(--dur-slow) var(--ease-cinematic), opacity var(--dur-slow) var(--ease-cinematic);
}
.tds-form-card__hero.is-revealed { clip-path: inset(0); opacity: 1; }
.tds-form-card__hero .tds-monogram { color: var(--color-accent); margin: 0 auto 24px; }
.tds-form-card__rhombus {
  font-size: 8px; letter-spacing: 0.4em; color: var(--color-accent);
  margin: 16px 0;
}
.tds-form-card__hero h1 {
  font-family: var(--font-display);
  font-weight: 100;
  font-size: clamp(32px, 5vw, 64px);
  letter-spacing: var(--tracking-deco);
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 16px;
}
.tds-form-card__hero p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px;
  color: var(--color-text-body);
  margin: 0;
}

.tds-form-chapter {
  margin: 64px 0;
  padding-top: 48px;
  border-top: var(--hairline-soft);
}
.tds-form-chapter:first-of-type { border-top: 0; padding-top: 0; }
.tds-form-chapter > header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 32px;
}
.tds-chapter-mark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: var(--tracking-roman);
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}
.tds-form-chapter > header h2 {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 24px;
  letter-spacing: var(--tracking-name);
  color: var(--color-text);
  margin: 0;
}

.tds-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
}
.tds-field--full { grid-column: 1 / -1; }
.tds-field {
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.tds-field__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-body);
}
.tds-field input,
.tds-field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-divider);
  padding: 8px 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  color: var(--color-text);
  outline: none;
  transition: border-color var(--dur-fast);
}
.tds-field input:focus, .tds-field textarea:focus { border-bottom-color: var(--color-accent); }
.tds-field input:focus-visible, .tds-field textarea:focus-visible,
.tds-modal__card textarea:focus-visible,
.tds-richtext__editor:focus-visible,
.tvd-search-box input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.tds-field::before, .tds-field::after {
  content: '◆';
  position: absolute; bottom: 8px;
  font-size: 6px; color: var(--color-accent);
  opacity: 0; transition: opacity var(--dur-fast);
}
.tds-field::before { left: -10px; }
.tds-field::after  { right: -10px; }
.tds-field:focus-within::before, .tds-field:focus-within::after { opacity: 1; }

@media (max-width: 600px) {
  .tds-form-grid { grid-template-columns: 1fr; }
  .tds-form-card { padding: 48px 24px; }
}

.tds-auth-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin: 0 0 24px;
}
.tds-auth-card {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--color-accent);
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  position: relative;
  transition: all var(--dur-fast) var(--ease-out);
  opacity: 0; transform: translateY(-12px);
  overflow: hidden;
}
.tds-auth-row.is-staggered .tds-auth-card { opacity: 1; transform: translateY(0); }
.tds-auth-row.is-staggered .tds-auth-card:nth-child(1) { transition-delay: 0ms; }
.tds-auth-row.is-staggered .tds-auth-card:nth-child(2) { transition-delay: 100ms; }
.tds-auth-card__icon { width: 28px; height: 28px; color: var(--color-accent); }
.tds-auth-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--color-blush-rgb), 0.18),
    transparent 60%
  );
  opacity: 0; transition: opacity var(--dur-fast); pointer-events: none;
}
.tds-auth-card:hover { transform: rotate(-1deg); }
.tds-auth-card:hover::before { opacity: 1; }
.tds-auth-card > * { position: relative; }
@media (max-width: 600px) { .tds-auth-row { grid-template-columns: 1fr; } }

.tds-form-note {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  margin: 16px 0 0;
}
.tds-form-note a { color: var(--color-accent); text-decoration: underline; text-decoration-thickness: 0.5px; text-underline-offset: 3px; }

.tds-form-map {
  height: 360px;
  margin: 24px 0;
  filter: url(#cool-sepia);
  border: var(--hairline-soft);
}

.tds-richtext { border: var(--hairline-soft); }
.tds-richtext__toolbar {
  display: flex;
  border-bottom: var(--hairline-soft);
}
.tds-richtext__toolbar button {
  background: transparent; border: 0; padding: 12px 16px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text-muted);
  cursor: pointer;
  border-right: var(--hairline-soft);
  transition: color var(--dur-fast);
}
.tds-richtext__toolbar button:hover { color: var(--color-accent); }
.tds-richtext__editor {
  min-height: 240px;
  padding: 24px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.85;
  color: var(--color-text);
  outline: none;
}
.tds-richtext__editor:empty::before {
  content: '請描述您的服務專長、團隊故事⋯';
  color: var(--color-text-muted);
}
.tds-richtext__count {
  text-align: right;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  border-top: var(--hairline-soft);
  margin: 0;
}

.tds-upload__drop {
  border: 1px dashed var(--color-accent);
  padding: 64px 32px;
  text-align: center;
  cursor: pointer;
  opacity: 0; transform: scale(0.96);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out), border-style 0.2s, background 0.2s;
}
.tds-upload__drop.is-revealed { opacity: 1; transform: scale(1); }
.tds-upload__drop.is-dragging {
  border-style: solid;
  background: rgba(var(--color-blush-rgb), 0.15);
}
.tds-upload__rhombus {
  display: block;
  font-size: 24px;
  color: var(--color-accent);
  margin-bottom: 16px;
  transition: transform var(--dur-fast);
}
.tds-upload__drop.is-dragging .tds-upload__rhombus { transform: scale(1.4); color: var(--color-accent-deep); }
.tds-upload__drop p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text-body);
  margin: 0;
}
.tds-upload__drop button {
  background: transparent; border: 0;
  color: var(--color-accent);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.tds-upload__previews {
  margin-top: 24px;
  columns: 4 160px;
  column-gap: 12px;
}
.tds-upload__previews figure {
  break-inside: avoid;
  margin: 0 0 12px;
  position: relative;
  border: var(--hairline-soft);
}
.tds-upload__previews img { width: 100%; display: block; }

.tds-form-submit {
  margin-top: 64px;
  text-align: center;
  display: flex; flex-direction: column; gap: 24px; align-items: center;
}
.tds-form-submit__aux {
  display: flex; gap: 24px; align-items: center;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: var(--color-text-muted);
}

.tds-form-confirm { text-align: center; padding: 64px 32px; }
.tds-form-confirm__rhombus { font-size: 8px; color: var(--color-accent); margin-bottom: 24px; letter-spacing: 0.4em; }
.tds-form-confirm h2 {
  font-family: var(--font-display);
  font-weight: 100;
  font-size: 48px;
  letter-spacing: var(--tracking-deco);
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 16px;
}

/* ============================================================
   My Submissions Dashboard
   ============================================================ */
.tds-page-header {
  text-align: center;
  margin: 64px 0;
  clip-path: inset(50% 0 50% 0);
  opacity: 0;
  transition: clip-path var(--dur-slow) var(--ease-cinematic), opacity var(--dur-slow) var(--ease-cinematic);
}
.tds-page-header.is-revealed { clip-path: inset(0); opacity: 1; }
.tds-page-header h1 {
  font-family: var(--font-display);
  font-weight: 100;
  font-size: 32px;
  letter-spacing: var(--tracking-deco);
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 8px;
}
.tds-page-header p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  color: var(--color-text-body);
  margin: 0;
}

.tds-mysub-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  margin: 64px 0;
}
@media (max-width: 900px) { .tds-mysub-layout { grid-template-columns: 1fr; } }

.tds-mysub-side {
  position: sticky; top: 88px;
  align-self: start;
  background: var(--color-surface-raised);
  border-right: var(--hairline-soft);
  padding: 32px 24px;
  text-align: center;
}
.tds-user-monogram {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  margin: 0 auto 16px;
  overflow: hidden;
}
.tds-user-monogram img { width: 100%; height: 100%; object-fit: cover; }
.tds-user-name {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 28px;
  letter-spacing: var(--tracking-name);
  color: var(--color-text);
  margin: 0 0 4px;
}
.tds-user-via {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 24px;
}
.tds-mysub-stats {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 24px;
  text-align: center;
}
.tds-mysub-stats__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.tds-mysub-stats__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 100;
  font-size: 48px;
  letter-spacing: 0.04em;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.tds-lighthouse-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-lighthouse);
  vertical-align: middle;
  margin-right: 8px;
}
.tds-mysub-joined {
  margin-top: 32px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.tds-mysub-list {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: flex; flex-direction: column; gap: 16px;
}
.tds-mysub-row {
  display: grid;
  grid-template-columns: 96px 1fr 96px 80px;
  gap: 24px;
  align-items: center;
  padding: 16px;
  background: var(--color-surface-raised);
  border: var(--hairline-soft);
  position: relative;
  overflow: hidden;
  opacity: 0; transform: translateY(12px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out), background 0.2s;
}
.tds-mysub-list.is-staggered .tds-mysub-row { opacity: 1; transform: translateY(0); }
.tds-mysub-list.is-staggered .tds-mysub-row:nth-child(1) { transition-delay: 0ms; }
.tds-mysub-list.is-staggered .tds-mysub-row:nth-child(2) { transition-delay: 60ms; }
.tds-mysub-list.is-staggered .tds-mysub-row:nth-child(3) { transition-delay: 120ms; }
.tds-mysub-list.is-staggered .tds-mysub-row:nth-child(4) { transition-delay: 180ms; }
.tds-mysub-list.is-staggered .tds-mysub-row:nth-child(5) { transition-delay: 240ms; }
.tds-mysub-list.is-staggered .tds-mysub-row:nth-child(6) { transition-delay: 300ms; }
.tds-mysub-row::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--color-blush-rgb), 0.15), transparent 60%);
  opacity: 0; transition: opacity var(--dur-fast); pointer-events: none;
}
.tds-mysub-row:hover { background: rgba(var(--color-blush-rgb), 0.10); }
.tds-mysub-row:hover::before { opacity: 1; }
.tds-mysub-row > * { position: relative; }
.tds-mysub-row__cover img { width: 96px; height: 72px; object-fit: cover; display: block; }
.tds-mysub-row__body h3 {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 20px;
  letter-spacing: var(--tracking-name);
  color: var(--color-text);
  margin: 0 0 8px;
}
.tds-mysub-row__meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tds-mysub-row__reason {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 8px 0 0;
}
.tds-mysub-row__action {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  text-align: right;
}

.tds-status-stamp {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--color-accent);
}
.tds-status-stamp svg { width: 64px; height: 64px; }
.tds-status-stamp span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tds-status-stamp--draft { color: var(--color-divider); }
.tds-status-stamp--draft span { color: var(--color-text-muted); }
.tds-status-stamp--rejected { color: var(--color-blush); }
.tds-status-stamp--rejected span { color: var(--color-text-body); }
.tds-status-stamp--pending svg circle:first-child {
  animation: tdsPulse 1.5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes tdsPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.06); }
}
.tds-status-stamp--mini svg { width: 24px; height: 24px; color: var(--color-accent); }

@media (max-width: 600px) {
  .tds-mysub-row {
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "cover body"
      "stamp action";
    gap: 12px;
  }
  .tds-mysub-row__cover { grid-area: cover; }
  .tds-mysub-row__cover img { width: 64px; height: 48px; }
  .tds-mysub-row__body { grid-area: body; }
  .tds-status-stamp { grid-area: stamp; flex-direction: row; gap: 8px; }
  .tds-status-stamp svg { width: 32px; height: 32px; }
  .tds-mysub-row__action { grid-area: action; text-align: right; }
}

/* ============================================================
   Empty / utility
   ============================================================ */
.tds-empty {
  text-align: center;
  padding: 64px;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.06em;
}

/* ============================================================
   Admin Editor's Desk (wp-admin)
   ============================================================ */
#wpcontent .tds-admin {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0 -20px -10px -20px;
  min-height: calc(100vh - 32px);
  position: relative;
}
.tds-admin::before {
  content: '';
  position: fixed; inset: 0;
  background-image: var(--grain-overlay);
  background-size: 160px 160px;
  opacity: 0.4;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}
.tds-admin > * { position: relative; z-index: 2; }

.tds-admin__top {
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  border-bottom: var(--hairline);
  background: var(--color-bg);
  z-index: 5;
}
.tds-admin__brand { display: flex; align-items: center; gap: 16px; color: var(--color-accent); }
.tds-admin__brand h1 {
  font-family: var(--font-display);
  font-weight: 100;
  font-size: 18px;
  letter-spacing: var(--tracking-deco);
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0;
}
.tds-admin__counts {
  display: flex; align-items: center; gap: 24px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  color: var(--color-text-body);
}
.tds-admin__counts strong { font-weight: 500; color: var(--color-text); margin-left: 4px; }

.tds-admin__bisect {
  display: grid;
  grid-template-columns: 35% 65%;
  height: calc(100vh - 56px - 64px - 32px);
}
.tds-admin__list {
  border-right: 1px solid var(--color-accent);
  overflow-y: auto;
  padding: 16px 24px;
  background: var(--color-bg);
}
.tds-admin__rows { list-style: none; padding: 0; margin: 0; }
.tds-admin__row {
  display: grid;
  grid-template-columns: 64px 1fr 32px;
  gap: 16px;
  align-items: center;
  padding: 16px 8px;
  border-bottom: var(--hairline-soft);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast);
}
.tds-admin__row:hover { background: rgba(var(--color-blush-rgb), 0.18); }
.tds-admin__row.is-selected { background: var(--color-surface-raised); }
.tds-admin__row.is-selected::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--color-accent);
}
.tds-admin__row-thumb { width: 64px; height: 64px; object-fit: cover; display: block; }
.tds-admin__row-body h2,
.tds-admin__row-body h3 {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  margin: 0 0 4px;
  color: var(--color-text);
}
.tds-admin__row[hidden] { display: none; }
.tds-admin__row-thumb--empty { background: var(--color-surface); }
.tds-admin__rows-empty {
  padding: 32px;
  text-align: center;
  color: var(--color-text-muted);
}
.tds-admin__rows-empty-rhombus {
  display: block;
  margin-bottom: 8px;
  font-size: 8px;
  letter-spacing: 0.4em;
  color: var(--color-accent);
}
.tds-admin__preview-label {
  margin-left: auto;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.tds-admin__preview-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-text-muted);
}
.tds-admin__preview-empty span {
  font-size: 8px;
  letter-spacing: 0.4em;
  color: var(--color-accent);
}
.tds-admin__preview-empty p { margin: 0; }
.tds-admin__preview-empty-hint {
  font-size: 12px;
  letter-spacing: var(--tracking-label);
}
.tds-admin__row-body time {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.tds-admin__preview {
  display: flex; flex-direction: column;
  background: var(--color-surface);
}
.tds-admin__preview-toolbar {
  display: flex;
  padding: 8px 16px;
  border-bottom: var(--hairline-soft);
  background: var(--color-bg);
  align-items: center;
}
.tds-admin__preview-toolbar button {
  background: transparent; border: 0;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
  cursor: pointer;
}
.tds-admin__preview-toolbar button.is-active { color: var(--color-accent); }
.tds-admin__preview-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--color-bg);
  transition: opacity 350ms ease-in-out;
}
.tds-admin__preview-frame.is-loading { opacity: 0; }
.tds-admin__preview[data-viewport="mobile"] .tds-admin__preview-frame {
  width: 390px;
  margin: 24px auto;
  height: calc(100% - 48px);
  border: 1px solid var(--color-divider);
}

.tds-admin__actions {
  position: fixed; bottom: 0; left: 160px;
  right: 0;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 32px;
  background: var(--color-surface-raised);
  border-top: var(--hairline);
  z-index: 10;
  transform: translateY(100%);
  transition: transform 500ms var(--ease-out);
}
.tds-admin__actions.is-revealed { transform: translateY(0); }
.tds-admin__actions [data-action="approve"]         { justify-self: start; }
.tds-admin__actions [data-action="reject"]          { justify-self: center; }
.tds-admin__actions [data-action="request-changes"] { justify-self: end; }

@media (max-width: 782px) {
  .tds-admin__actions { left: 0; }
}

/* ============================================================
   Modal
   ============================================================ */
.tds-modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.tds-modal[hidden] { display: none; }
.tds-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(var(--color-bg-rgb), 0.85);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.tds-modal__card {
  position: relative; z-index: 1;
  width: 600px; max-width: calc(100vw - 32px);
  background: var(--color-surface-raised);
  border: 2px solid var(--color-accent);
  padding: 64px 48px;
  text-align: center;
  opacity: 0; transform: scale(0.96);
  animation: tdsModalIn 350ms var(--ease-out) forwards;
}
.tds-modal__card::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--grain-overlay);
  background-size: 160px 160px;
  opacity: 0.6;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.tds-modal__card > * { position: relative; }
@keyframes tdsModalIn { to { opacity: 1; transform: scale(1); } }
.tds-modal__rhombus { font-size: 8px; color: var(--color-accent); letter-spacing: 0.4em; margin-bottom: 16px; }
.tds-modal__card h2 {
  font-family: var(--font-display);
  font-weight: 100;
  font-size: 32px;
  letter-spacing: var(--tracking-deco);
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 16px;
}
.tds-modal__card textarea {
  width: 100%;
  margin: 24px 0;
  background: transparent;
  border: 1px solid var(--color-divider);
  padding: 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  resize: vertical;
  min-height: 120px;
}
.tds-modal__card textarea:focus { border-color: var(--color-accent); outline: none; }

/* ==========================================================================
   Tesla Vendor Directory prototype implementation
   Scoped to the new map explorer and detail templates.
   ========================================================================== */

.tvd-explorer-page,
.tvd-detail-page {
  margin: 0;
  padding: 0;
  background: var(--ink-50);
  color: var(--ink-900);
  font-family: var(--font-zh);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.tvd-explorer-page::before,
.tvd-detail-page::before { display: none; }
.tvd-explorer-page button,
.tvd-detail-page button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  text-transform: none;
}
.tvd-app,
.tvd-app *,
.tvd-app *::before,
.tvd-app *::after,
.tvd-detail,
.tvd-detail *,
.tvd-detail *::before,
.tvd-detail *::after {
  box-sizing: border-box;
}
.tvd-app button,
.tvd-detail button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  min-width: 0;
  margin: 0;
  box-shadow: none;
  line-height: 1.2;
  text-transform: none;
}
.tvd-icon {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}
.num {
  font-family: var(--font-en);
  font-variant-numeric: tabular-nums;
}

.tvd-app {
  display: grid;
  grid-template-columns: var(--nav-rail-width) var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  background: var(--ink-50);
}
.tvd-nav-rail {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(180deg, var(--brand-700), var(--brand-800));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 0 12px;
  color: #fff;
}
.tvd-nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.tvd-nav-item {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: grid !important;
  place-items: center;
  color: rgba(255,255,255,.66);
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  transition: background var(--duration-base), color var(--duration-base);
}
.tvd-nav-item:hover,
.tvd-nav-item.is-active {
  background: rgba(255,255,255,.14) !important;
  color: #fff;
}
.tvd-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  width: 3px;
  height: 20px;
  transform: translateY(-50%);
  border-radius: 0 3px 3px 0;
  background: #fff;
}
.tvd-nav-spacer { flex: 1; }
.tvd-nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  border: 2px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.tvd-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border-right: 1px solid var(--ink-200);
}
.tvd-sidebar-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--ink-100);
}
.tvd-sidebar-title {
  font-size: var(--text-h4);
  font-weight: var(--weight-bold);
  color: var(--ink-900);
  letter-spacing: var(--tracking-snug);
}
.tvd-sidebar-sub {
  margin-top: 2px;
  color: var(--ink-500);
  font-size: var(--text-xs);
}
.tvd-search-box {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 12px;
}
.tvd-search-box input {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px 0 40px !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: var(--r-md) !important;
  background: var(--ink-50) !important;
  color: var(--ink-900) !important;
  font-size: var(--text-sm) !important;
  line-height: 38px !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  outline: none;
  transition: border-color var(--duration-base), background var(--duration-base), box-shadow var(--duration-base);
}
.tvd-search-box input:focus {
  border-color: var(--brand-500) !important;
  background: #fff !important;
  box-shadow: var(--shadow-focus);
}
.tvd-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: var(--ink-400);
  pointer-events: none;
}
/* AI ask entry — the search box restyled as an "AI 詢問" port. It still does
   live text filtering today; the markup/hook is ready to wire to an AI endpoint
   (natural-language → filters) later. */
.tvd-ai-ask { position: relative; }
.tvd-ai-ask-icon { color: var(--brand-600) !important; }
.tvd-ai-ask input {
  padding-right: 48px !important;
  border-color: var(--brand-200) !important;
  background: linear-gradient(180deg, var(--brand-50), var(--ink-50)) !important;
}
.tvd-ai-ask input:focus {
  border-color: var(--brand-500) !important;
  background: #fff !important;
}
.tvd-ai-ask-badge {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
  color: #fff;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: .04em;
  pointer-events: none;
}
.tvd-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0 20px;
}
.tvd-sidebar-scroll::-webkit-scrollbar,
.tvd-list-scroll::-webkit-scrollbar,
.tvd-drawer-body::-webkit-scrollbar { width: 6px; }
.tvd-sidebar-scroll::-webkit-scrollbar-thumb,
.tvd-list-scroll::-webkit-scrollbar-thumb,
.tvd-drawer-body::-webkit-scrollbar-thumb {
  background: var(--ink-200);
  border-radius: 3px;
}
.tvd-filter-section {
  padding: 14px 20px;
  border-bottom: 1px solid var(--ink-100);
}
.tvd-filter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--ink-500);
  font-size: var(--text-tiny);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.tvd-filter-label button {
  border: 0;
  background: transparent;
  color: var(--brand-700);
  cursor: pointer;
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
}
.tvd-region-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  margin-bottom: 12px;
  border-radius: var(--r-md);
  background: var(--ink-100);
}
.tvd-region-tab {
  min-width: 0;
  min-height: 34px;
  display: grid !important;
  place-items: center;
  padding: 7px 4px !important;
  border: 0 !important;
  border-radius: 7px;
  background: transparent !important;
  color: var(--ink-600);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1 !important;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  cursor: pointer;
  transition: background var(--duration-base), color var(--duration-base), box-shadow var(--duration-base);
}
.tvd-region-tab:hover { color: var(--ink-900); }
.tvd-region-tab.is-active {
  background: #fff !important;
  color: var(--brand-700);
  box-shadow: var(--shadow-sm);
}
.tvd-city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tvd-city-chips.is-hidden {
  display: none;
}
.tvd-city-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-pill);
  background: var(--ink-50);
  color: var(--ink-700);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--duration-base);
}
.tvd-city-chip:hover {
  border-color: var(--brand-400);
  color: var(--brand-700);
}
.tvd-city-chip.is-active {
  background: var(--brand-700);
  color: #fff;
  border-color: var(--brand-700);
}
.tvd-city-chip .num { font-size: 11px; opacity: .72; }

.tvd-cat-list { display: flex; flex-direction: column; gap: 2px; }
.tvd-cat-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px !important;
  border: 0 !important;
  border-radius: var(--r-sm);
  background: transparent !important;
  color: var(--ink-800) !important;
  text-align: left;
  cursor: pointer;
  transition: background var(--duration-fast);
}
.tvd-cat-item:hover { background: var(--ink-50); }
.tvd-cat-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ink-300);
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  transition: all var(--duration-base);
}
.tvd-cat-check svg { opacity: 0; }
.tvd-cat-item.is-active .tvd-cat-check {
  background: var(--brand-700);
  border-color: var(--brand-700);
}
.tvd-cat-item.is-active .tvd-cat-check svg { opacity: 1; }
.tvd-cat-swatch {
  width: 22px;
  height: 22px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}
/* Editor-supplied line-art category icons sit on a white tile (not the colored
   swatch). !important on the .tvd-app variant beats the mobile size overrides. */
.tvd-cat-swatch.has-icon {
  background: #fff;
  border: 1px solid var(--ink-200);
  padding: 2px;
  overflow: hidden;
}
.tvd-app .tvd-cat-swatch.has-icon {
  width: 26px !important;
  height: 26px !important;
  background: #fff !important;
  border: 1px solid var(--ink-200) !important;
  padding: 2px !important;
}
.tvd-cat-swatch.has-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.tvd-cat-name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.tvd-cat-item.is-active .tvd-cat-name {
  color: var(--ink-900);
  font-weight: var(--weight-semibold);
}
.tvd-cat-count {
  color: var(--ink-500);
  font-size: var(--text-tiny);
}
.tvd-sort-select {
  width: 100%;
  height: 36px;
  min-height: 36px !important;
  padding: 0 32px 0 12px !important;
  margin-bottom: 10px;
  border: 1px solid var(--ink-200) !important;
  border-radius: var(--r-md);
  background: #fff !important;
  color: var(--ink-800) !important;
  font-size: var(--text-sm) !important;
  box-shadow: none !important;
}
.tvd-toggle-row {
  width: 100%;
  min-height: 36px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ink-800) !important;
  font-size: var(--text-sm);
  cursor: pointer;
}
.tvd-toggle {
  width: 36px;
  height: 20px;
  border-radius: var(--r-pill);
  background: var(--ink-200);
  position: relative;
  transition: background var(--duration-base);
}
.tvd-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform var(--duration-base);
}
.tvd-toggle-row.is-on .tvd-toggle { background: var(--brand-700); }
.tvd-toggle-row.is-on .tvd-toggle::after { transform: translateX(16px); }
.tvd-sidebar-footer {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--ink-100);
  background: var(--ink-50);
}
.tvd-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all var(--duration-base);
}
.tvd-btn-primary {
  flex: 1;
  border: 1px solid var(--brand-700);
  background: var(--brand-700);
  color: #fff;
}
.tvd-btn-primary:hover { background: var(--brand-800); }
.tvd-btn-ghost {
  border: 1px solid var(--ink-200);
  background: transparent;
  color: var(--ink-700);
}
.tvd-btn-ghost:hover {
  background: #fff;
  border-color: var(--ink-300);
}

.tvd-stage {
  position: relative;
  overflow: hidden;
  background: var(--map-bg);
}
.tvd-topbar {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.tvd-topbar > * { pointer-events: auto; }
.tvd-results-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: var(--shadow-lg);
  color: var(--ink-800);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.tvd-results-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-700);
}
.tvd-results-pill strong {
  color: var(--brand-700);
  font-family: var(--font-en);
  font-weight: var(--weight-bold);
}
.tvd-result-extra { color: var(--ink-500); }
.tvd-show-list { cursor: pointer; }
/* No flex spacer — the three pills stay a left-aligned group with the topbar's own
   uniform 12px gap between each (was: spacer pushed tools+CTA right, making the
   count→tools gap inconsistent with the tools→CTA gap). */
.tvd-topbar-spacer { display: none; }
.tvd-map-tools {
  display: flex;
  align-items: center;   /* don't let WoodMart's button min-height stretch them */
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.tvd-map-tools button {
  flex: 0 0 auto;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 0 !important;   /* beat the theme's button min-height → stays square */
  display: grid !important;
  place-items: center;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;   /* square → a true circle, concentric with the capsule end */
  background: transparent !important;
  color: var(--ink-600) !important;
}
.tvd-map-tools button:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}
.tvd-map-tools button.is-active {
  background: var(--brand-700) !important;
  color: #fff !important;
}

/* "我想刊登" topbar CTA + application modal. Scoped under .tvd-app + button
   reset so WoodMart's global button styling doesn't leak in. */
.tvd-app .tvd-list-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  height: 38px;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: var(--r-pill) !important;
  background: var(--brand-700) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: normal !important;
  text-transform: none !important;
  box-shadow: 0 4px 14px rgba(15,76,129,.32) !important;
  cursor: pointer;
  white-space: nowrap;
}
.tvd-app .tvd-list-cta:hover { background: #0c3e6a !important; }
.tvd-app .tvd-list-cta .tvd-icon { width: 15px; height: 15px; }

.tvd-listing-modal { display: none; }
.tvd-listing-modal.is-open {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 410;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15,23,35,.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.tvd-listing-modal__panel {
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 22px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 24px 64px rgba(15,30,50,.4);
}
.tvd-listing-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tvd-listing-modal__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-900);
  font-size: 18px;
  font-weight: 700;
}
.tvd-listing-modal__title .tvd-icon { color: var(--brand-600); }
.tvd-app .tvd-listing-modal__close {
  width: 34px;
  height: 34px;
  display: grid !important;
  place-items: center;
  padding: 0 !important;
  border: 0 !important;
  border-radius: var(--r-md) !important;
  background: var(--ink-100) !important;
  color: var(--ink-700) !important;
  cursor: pointer;
}
.tvd-app .tvd-listing-modal__close:hover { background: var(--ink-200) !important; }
.tvd-listing-modal__intro {
  margin: 0 0 14px;
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.5;
}
.tvd-listing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tvd-listing-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tvd-listing-grid .full { grid-column: 1 / -1; }
.tvd-listing-grid label > span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
}
.tvd-listing-grid label > span i {
  color: #d63638;
  font-style: normal;
}
.tvd-app .tvd-listing-grid input,
.tvd-app .tvd-listing-grid select,
.tvd-app .tvd-listing-grid textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: var(--r-md) !important;
  background: #fff !important;
  color: var(--ink-900) !important;
  font-size: 14px;
  line-height: 1.4;
  font-family: var(--font-zh);
}
/* input + select share an identical box height (textarea stays auto/min-height). */
.tvd-app .tvd-listing-grid input,
.tvd-app .tvd-listing-grid select {
  height: 40px !important;
}
.tvd-app .tvd-listing-grid select { cursor: pointer; }
.tvd-app .tvd-listing-grid input:focus,
.tvd-app .tvd-listing-grid select:focus,
.tvd-app .tvd-listing-grid textarea:focus {
  outline: none;
  border-color: var(--brand-600) !important;
  box-shadow: 0 0 0 3px rgba(15,76,129,.13) !important;
}
.tvd-listing-grid textarea { resize: vertical; min-height: 64px; }

/* 提供服務 — single-select pills (free listing = 1 category) + a ? help hint. */
.tvd-svc-field { display: flex; flex-direction: column; gap: 8px; }
.tvd-svc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.tvd-svc-title { font-size: 12.5px; font-weight: 600; color: var(--ink-700); }
.tvd-svc-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-200);
  color: var(--ink-600);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
}
.tvd-svc-note { font-size: 11.5px; color: var(--ink-500); }
.tvd-svc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tvd-svc-pill { position: relative; margin: 0; cursor: pointer; }
.tvd-svc-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.tvd-app .tvd-svc-pill span {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  background: var(--ink-50);
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 500;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.tvd-app .tvd-svc-pill:hover span { border-color: var(--brand-600); }
.tvd-app .tvd-svc-pill input:checked + span {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: #fff;
}
.tvd-app .tvd-svc-pill input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(15,76,129,.2);
}
.tvd-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}
.tvd-listing-form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.tvd-listing-form__msg {
  margin: 0;
  font-size: 13px;
  color: var(--ink-500);
}
.tvd-listing-form__msg.is-error { color: #d63638; }
.tvd-listing-form__msg.is-ok { color: #1a7f37; font-weight: 600; }
.tvd-app .tvd-listing-form__submit {
  flex: 0 0 auto;
  height: 42px;
  margin: 0 !important;
  padding: 0 24px !important;
  border: 0 !important;
  border-radius: var(--r-pill) !important;
  background: var(--brand-700) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.tvd-app .tvd-listing-form__submit:hover { background: #0c3e6a !important; }
.tvd-app .tvd-listing-form__submit:disabled { opacity: .6; cursor: default; }

@media (max-width: 560px) {
  /* Full-screen on phones (no top gap at all) — dismiss with the × button. The
     form keeps its compact 2-column layout and the submit stays pinned at the
     bottom while the fields scroll within if they ever overflow. */
  .tvd-listing-modal.is-open { align-items: stretch; padding: 0; }
  .tvd-listing-modal__panel {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }
  .tvd-listing-modal__head { margin: 0; padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 4px; }
  .tvd-listing-modal__title { font-size: 16px; }
  .tvd-listing-form {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 16px;
  }
  .tvd-listing-modal__intro { margin: 6px 0 10px; font-size: 12.5px; }
  /* Keep two columns on phones — pairing the short fields halves the height. */
  .tvd-listing-grid {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    gap: 9px 10px;
  }
  .tvd-listing-grid label { gap: 3px; }
  .tvd-listing-grid label > span { font-size: 12px; }
  .tvd-app .tvd-listing-grid input,
  .tvd-app .tvd-listing-grid textarea { padding: 8px 11px !important; font-size: 14px; }
  .tvd-listing-grid textarea { min-height: 44px; }
  .tvd-listing-form__foot {
    margin-top: auto;
    padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .tvd-app .tvd-listing-form__submit { height: 44px; }
}

.tvd-map-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--map-bg);
}
.tvd-google-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  background: var(--map-bg);
  transition: opacity var(--duration-slow);
}
.tvd-app.has-google-map .tvd-google-map {
  opacity: 1;
  pointer-events: auto;
}
/* The active theme sets a global `img { border-radius: 20px }`, which leaks
   onto every Google Maps tile + marker image and produces rounded-corner
   seams across the whole map grid. Neutralize it inside the map only. */
.tvd-map-canvas img,
.tvd-google-map img,
.tvd-google-map .gm-style img {
  border-radius: 0 !important;
}
.tvd-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  opacity: .98;
}
.tvd-app.has-google-map .tvd-map-svg,
.tvd-app.has-google-map .tvd-pin-layer,
.tvd-app.has-google-map .tvd-zoom-indicator,
.tvd-app.has-google-map .tvd-map-controls {
  display: none;
}
.tvd-pin-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.tvd-pin {
  position: absolute;
  width: 44px;
  height: 52px;
  min-width: 44px;
  display: grid !important;
  place-items: start center;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  color: #fff;
  cursor: pointer;
  transform: translate(-50%, -100%);
  z-index: var(--z-pin);
  transition: transform var(--duration-base), opacity var(--duration-base);
}
.tvd-pin:hover,
.tvd-pin.is-active {
  z-index: 25;
  transform: translate(-50%, -100%) scale(1.08);
}
.tvd-pin.is-active { transform: translate(-50%, -100%) scale(1.15); }
.tvd-pin.is-hidden,
.tvd-v-card.is-hidden { display: none; }
.tvd-pin-drop {
  width: 36px;
  height: 44px;
  display: block;
  position: relative;
  margin: 0 auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
}
.tvd-pin-drop-body {
  width: 36px;
  height: 36px;
  display: block;
  border: 2.5px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}
.tvd-pin.is-active .tvd-pin-drop-body { background: var(--red) !important; }
.tvd-pin-drop-icon {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: var(--weight-black);
}
.tvd-pin-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: max-content;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink-950);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base);
  text-align: left;
}
.tvd-pin-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--ink-950);
}
.tvd-pin-tooltip strong {
  display: block;
  font-size: var(--text-xs);
}
.tvd-pin-tooltip small {
  display: block;
  margin-top: 1px;
  opacity: .72;
  font-size: 10px;
}
.tvd-pin:hover .tvd-pin-tooltip { opacity: 1; }
.tvd-zoom-indicator {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(13,27,42,.85);
  color: #fff;
  font-family: var(--font-en);
  font-size: var(--text-xs);
  backdrop-filter: blur(8px);
}
.tvd-zoom-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-400);
  animation: tvdPulse 2s ease-in-out infinite;
}
@keyframes tvdPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}
.tvd-map-controls {
  position: absolute;
  right: 24px;
  bottom: 32px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tvd-zoom-stack {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.tvd-zoom-stack button,
.tvd-locate-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: #fff;
  color: var(--ink-700);
}
.tvd-zoom-stack button:hover { background: var(--ink-100); }
.tvd-zoom-stack span {
  height: 1px;
  background: var(--ink-100);
}
.tvd-locate-btn {
  border-radius: var(--r-md);
  color: var(--brand-700);
  box-shadow: var(--shadow-md);
}

.tvd-list-panel {
  position: absolute;
  top: 76px;
  left: 16px;
  bottom: 16px;
  z-index: 15;
  width: var(--list-panel-width);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
  transition: transform var(--duration-slow), opacity var(--duration-slow);
}
.tvd-list-panel.is-hidden {
  transform: translateX(-380px);
  opacity: 0;
  pointer-events: none;
}
.tvd-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--ink-100);
}
/* Title + count merged onto one line. */
.tvd-list-header > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}
.tvd-list-header h2 {
  margin: 0;
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  line-height: 1.2;
  white-space: nowrap;
}
.tvd-list-header p {
  margin: 0;
  color: var(--ink-500);
  font-size: 13px;
  white-space: nowrap;
}
.tvd-list-header p .num { font-weight: 700; color: var(--ink-700); }
.tvd-list-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
/* Scoped + !important + explicit reset so the theme / control-normalization can't
   reshape this pill into a generic box (see the anti-pollution guide in memory). */
.tvd-app .tvd-list-clear {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  border: 1px solid var(--brand-200, #cdd9e8) !important;
  border-radius: 999px !important;
  background: var(--brand-50, #eef3f9) !important;
  color: var(--brand-700, #2b4a6f) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: .01em !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
.tvd-app .tvd-list-clear:hover {
  background: var(--brand-100, #dde7f2) !important;
  border-color: var(--brand-300, #aebfd6) !important;
}
.tvd-app .tvd-list-clear[hidden] { display: none !important; }
.tvd-list-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-500);
  cursor: pointer;
}
.tvd-list-close:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}
.tvd-list-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}
.tvd-empty {
  margin: 0;
  padding: 40px 20px;
  color: var(--ink-500);
  text-align: center;
}
.tvd-v-card {
  position: relative;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: background var(--duration-base), border-color var(--duration-base);
}
.tvd-v-card:hover,
.tvd-v-card.is-active {
  background: var(--brand-50);
  border-color: var(--brand-100);
}
.tvd-v-card.is-active { border-color: var(--brand-300); }
.tvd-v-card-main {
  width: 100%;
  display: flex !important;
  align-items: center;
  gap: 13px;
  padding: 13px 14px !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  text-align: left;
  cursor: pointer;
}
.tvd-v-thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  border-radius: 15px;
  background: var(--ink-100);
}
.tvd-v-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tvd-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, var(--ink-100), var(--ink-100) 4px, var(--ink-50) 4px, var(--ink-50) 8px);
}
.tvd-thumb-placeholder span {
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,.85);
  color: var(--ink-500);
  font-family: var(--font-mono);
  font-size: 9px;
}
.tvd-v-badge-featured {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--gold);
  color: #fff;
  font-size: 9px;
  font-weight: var(--weight-bold);
}
.tvd-v-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.tvd-v-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: var(--tracking-snug);
}
.tvd-v-name-text {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tvd-v-verified {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--brand-600);
  color: #fff;
  flex-shrink: 0;
}
.tvd-v-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink-500);
  font-size: 14px;
  justify-content: flex-start;
  text-align: left;
}
.tvd-v-meta > span:not(.tvd-v-rating):not(.num):not(.tvd-v-status) {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--ink-300);
}
.tvd-v-rating {
  margin-left: auto;       /* pushed to the right end of the name row */
  flex: 0 0 auto;
  color: var(--ink-800);
  font-family: var(--font-en);
  font-size: 13.5px;
  font-weight: 600;
}
.tvd-v-rating::first-letter { color: var(--gold); }
.tvd-v-rating small {
  color: var(--ink-500);
  font-weight: var(--weight-regular);
}
.tvd-v-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
  flex-shrink: 0;
  white-space: nowrap;
}
.tvd-v-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.tvd-v-status.is-open { color: oklch(50% 0.13 150); }
.tvd-v-status.is-closed { color: oklch(55% 0.05 30); }
.tvd-v-place {
  display: block;
  margin: 0;
  color: var(--ink-500);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tvd-v-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.tvd-v-tags span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink-50);
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 500;
}
.tvd-v-tags i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.tvd-v-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--duration-base);
}
.tvd-v-card:hover .tvd-v-actions { opacity: 1; }
.tvd-v-actions button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.92);
  color: var(--ink-600);
  cursor: pointer;
}
.tvd-v-actions button:hover { color: var(--brand-700); }

.tvd-drawer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 40;
  /* No tint/blur — in the map-first layout this sits over the Street View, and
     dimming/blurring it was making the panorama look soft. Stays transparent;
     it only exists to catch outside-clicks that close the drawer. */
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow);
}
.tvd-drawer-backdrop.is-open {
  opacity: 1;
  /* Let drags/clicks fall through to the Street View so it stays freely
     rotatable; the drawer is closed via its × button, not an outside click. */
  pointer-events: none;
}
.tvd-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: var(--drawer-width);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-drawer);
  transform: translateX(100%);
  transition: transform var(--duration-slowest) var(--ease-in-out);
}
.tvd-drawer.is-open { transform: translateX(0); }
.tvd-drawer-hero {
  position: relative;
  height: 220px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-800), var(--brand-700));
}
.tvd-drawer-hero-img {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.06), rgba(255,255,255,.06) 6px, transparent 6px, transparent 12px),
    linear-gradient(135deg, var(--brand-800), var(--brand-700) 60%, var(--brand-600));
}
.tvd-drawer-hero-img span {
  padding: 4px 8px;
  border-radius: var(--r-xs);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.72);
  font-family: var(--font-mono);
  font-size: var(--text-tiny);
}
.tvd-drawer-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tvd-drawer-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5));
}
.tvd-drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  color: var(--ink-800);
  box-shadow: var(--shadow-md);
}
/* The active theme forces position:relative on buttons, which knocks the close
   button out of its top-right corner and behind the drawer body — pin it back
   (it's the only way to close now that outside-clicks pass through to rotate
   the Street View). */
.tvd-app .tvd-drawer-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 12 !important;
}
.tvd-drawer-hero-actions {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  display: flex;
  gap: 8px;
}
.tvd-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.96);
  color: var(--ink-900);
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
  box-shadow: var(--shadow-sm);
}
.tvd-hero-pill i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
/* Gold metallic gradient + crown — a premium 精選廠商 badge (white text). */
.tvd-hero-featured {
  background: linear-gradient(135deg, #eab94e 0%, #d49a2a 50%, #b97f15 100%);
  color: #fff;
  border: 1px solid rgba(150,105,15,.5);
  box-shadow: 0 2px 7px rgba(150,105,15,.4), inset 0 1px 0 rgba(255,255,255,.45);
  font-weight: var(--weight-bold);
  text-shadow: 0 1px 1px rgba(120,80,0,.35);
}
.tvd-hero-featured .tvd-icon { color: #fff; }
.tvd-drawer-photo-strip {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  gap: 6px;
}
.tvd-drawer-photo-strip span {
  width: 56px;
  height: 40px;
  border: 2px solid rgba(255,255,255,.42);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(4px);
}
.tvd-drawer-photo-strip span.is-active { border-color: #fff; }
.tvd-drawer-photo-strip span:last-child {
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.4);
  color: #fff;
  font-family: var(--font-en);
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
}
.tvd-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
}
.tvd-drawer-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}
.tvd-drawer-title-row h2 {
  flex: 1;
  margin: 0;
  color: var(--ink-900);
  font-size: var(--text-h2);
  font-weight: var(--weight-black);
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
}
.tvd-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--brand-700);
  color: #fff;
  font-size: 10px;
  font-weight: var(--weight-bold);
}
.tvd-drawer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--ink-600);
  font-size: var(--text-sm);
}
.tvd-drawer-meta > span:not(.tvd-v-status) {
  max-width: 100%;
}
.tvd-drawer-meta > span:nth-child(2),
.tvd-drawer-meta > span:nth-child(4) {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-300);
}
.tvd-drawer-stats {
  display: flex;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  background: var(--ink-100);
}
.tvd-drawer-stats > div {
  flex: 1;
  padding: 12px 14px;
  background: #fff;
  text-align: center;
}
.tvd-drawer-stats > div[hidden] { display: none; }
.tvd-drawer-stats strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--brand-700);
  font-family: var(--font-en);
  font-size: 18px;
}
.tvd-drawer-stats em {
  margin-left: 2px;
  color: var(--ink-500);
  font-size: 11px;
  font-style: normal;
}
.tvd-drawer-stats small {
  display: block;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: var(--text-tiny);
}
.tvd-drawer-stats strong.tvd-stat-loc {
  font-family: var(--font-zh);
  font-size: 15px;
  font-weight: var(--weight-semibold);
}
.tvd-drawer-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
/* No secondary CTA (e.g. a store with no phone) → the primary fills the row. */
.tvd-drawer-cta-row.is-single { grid-template-columns: 1fr; }
.tvd-btn-cta {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: var(--text-card);
  font-weight: var(--weight-semibold);
}
.tvd-btn-cta.primary {
  background: var(--brand-700);
  color: #fff;
}
.tvd-btn-cta.primary:hover { background: var(--brand-800); }
.tvd-btn-cta.secondary {
  border: 1px solid var(--brand-100);
  background: var(--brand-50);
  color: var(--brand-700);
}
.tvd-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.tvd-drawer-actions button,
.tvd-drawer-actions a,
.tvd-service-grid span {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px !important;
  border: 1px solid var(--ink-100) !important;
  border-radius: var(--r-pill);
  background: var(--ink-50) !important;
  color: var(--ink-800) !important;
  text-decoration: none;
  font-size: var(--text-xs);
}
.tvd-drawer-section { margin-bottom: 22px; }
.tvd-drawer-section h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 10px;
  color: var(--ink-900);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.tvd-drawer-section h3 span {
  color: var(--brand-700);
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
}
.tvd-service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tvd-service-grid i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.tvd-service-grid span:first-child {
  border-color: var(--brand-100);
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: var(--weight-semibold);
}
.tvd-hours-list {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--ink-50);
}
.tvd-hours-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  color: var(--ink-700);
  font-size: var(--text-sm);
}
.tvd-hours-list strong {
  color: var(--brand-700);
  font-family: var(--font-en);
  font-weight: var(--weight-semibold);
}
.tvd-hours-list strong.is-closed { color: var(--ink-400); }
.tvd-contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-100);
  color: var(--brand-700);
}
.tvd-contact-row:last-child { border-bottom: 0; }
.tvd-contact-row div { min-width: 0; color: var(--ink-900); }
.tvd-contact-row small {
  display: block;
  color: var(--ink-500);
  font-size: var(--text-tiny);
}
.tvd-contact-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-900);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
/* Branded action links inside contact rows (網站 / LINE / FB — 精選店家). */
.tvd-app .tvd-contact-row a.tvd-contact-link,
.tvd-detail .tvd-info-card a.tvd-info-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--brand-700) !important;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}
.tvd-app .tvd-contact-row a.tvd-contact-link:hover,
.tvd-detail .tvd-info-card a.tvd-info-link:hover { text-decoration: underline !important; }
.tvd-review-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--ink-50);
}
.tvd-review-summary strong {
  display: block;
  color: var(--ink-900);
  font-family: var(--font-en);
  font-size: 36px;
  line-height: 1;
}
.tvd-review-summary span {
  display: block;
  margin: 4px 0 2px;
  color: var(--gold);
  font-size: var(--text-xs);
  letter-spacing: 2px;
}
.tvd-review-summary small {
  display: block;
  color: var(--ink-500);
  font-size: var(--text-tiny);
}
.tvd-review-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tvd-review-bars i {
  height: 6px;
  border-radius: 3px;
  background: var(--gold);
}
.tvd-full-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--ink-50);
  color: var(--brand-700);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

@media (max-width: 1100px) {
  .tvd-app {
    grid-template-columns: var(--nav-rail-width) 300px minmax(0, 1fr);
  }
  .tvd-list-panel { width: 320px; }
  .tvd-drawer { width: min(var(--drawer-width), calc(100vw - 64px)); }
}
@media (max-width: 760px) {
  .tvd-app {
    display: block;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }
  .tvd-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--ink-200);
  }
  /* (4) Service categories become compact pill labels. */
  .tvd-cat-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .tvd-cat-item {
    width: auto !important;
    min-height: 32px !important;
    gap: 6px;
    padding: 4px 12px 4px 5px !important;
    border: 1px solid var(--ink-200) !important;
    border-radius: var(--r-pill) !important;
    background: var(--ink-50) !important;
  }
  .tvd-cat-item .tvd-cat-check,
  .tvd-cat-item .tvd-cat-count { display: none; }
  .tvd-cat-swatch { width: 20px; height: 20px; font-size: 9px; }
  .tvd-cat-name { flex: 0 0 auto; font-size: var(--text-xs); }
  .tvd-cat-item.is-active {
    background: var(--brand-700) !important;
    border-color: var(--brand-700) !important;
  }
  .tvd-cat-item.is-active .tvd-cat-name { color: #fff !important; }
  .tvd-topbar {
    left: 12px;
    right: 12px;
    top: 12px;
  }
  .tvd-map-tools { display: none; }
  .tvd-list-panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    width: auto;
    height: 45dvh;
  }
  .tvd-drawer {
    left: 0;
    width: 100%;
  }
}

.tvd-detail {
  min-height: 100vh;
  background: var(--ink-50);
}
.tvd-detail-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--ink-100);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
}
.tvd-nav-back,
.tvd-nav-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  color: var(--ink-700);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.tvd-nav-back:hover,
.tvd-nav-action:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}
.tvd-nav-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink-500);
  font-size: var(--text-sm);
}
.tvd-nav-crumb strong {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-900);
  font-weight: var(--weight-semibold);
}
.tvd-detail-spacer { flex: 1; }
.tvd-detail-nav-actions {
  display: flex;
  gap: 8px;
}
.tvd-nav-action {
  border: 1px solid var(--ink-200);
  background: #fff;
  font-weight: var(--weight-semibold);
}
.tvd-nav-action.is-icon {
  width: 36px;
  padding: 0;
}
.tvd-nav-action.is-primary {
  border-color: var(--brand-700);
  background: var(--brand-700);
  color: #fff;
}
.tvd-nav-action.is-primary:hover { background: var(--brand-800); }

.tvd-detail-hero {
  max-width: var(--detail-max-width);
  margin: 24px auto 0;
  padding: 0 32px;
}
.tvd-hero-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 8px;
  overflow: hidden;
  position: relative;
  border-radius: var(--r-lg);
}
.tvd-hero-tile {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  background: repeating-linear-gradient(45deg, var(--ink-100), var(--ink-100) 6px, var(--ink-50) 6px, var(--ink-50) 12px);
}
.tvd-hero-tile.is-main {
  grid-row: 1 / 3;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.04), rgba(255,255,255,.04) 8px, transparent 8px, transparent 16px),
    linear-gradient(135deg, var(--brand-800), var(--brand-700) 50%, var(--brand-600));
}
.tvd-hero-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ROOT FIX: the WoodMart theme rounds ALL images (border-radius:20px), but our hero
   tiles clip at 14px/8px — the image rounding more than the tile exposes the tile/page
   background at every corner (the reported 圓角誤差 / 白色漏出). Force the hero images
   square + block-filling and let ONLY the tile's overflow:hidden do the rounding. */
.tvd-detail .tvd-hero-tile img,
.tvd-detail-page .tvd-hero-tile img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
}
.tvd-hero-tile span {
  padding: 3px 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.86);
  color: var(--ink-500);
  font-family: var(--font-mono);
  font-size: 10px;
}
.tvd-hero-tile.is-main span {
  background: rgba(0,0,0,.3);
  color: rgba(255,255,255,.85);
}
/* Wrapper is transparent to the gallery grid on desktop; becomes an
   overlaid 4-up thumbnail row on mobile (see media query). */
.tvd-hero-thumbs { display: contents; }
.tvd-hero-more {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--r-md);
  background: rgba(12,17,24,.85);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  backdrop-filter: blur(8px);
}

.tvd-detail-main {
  max-width: var(--detail-max-width);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side-column-width);
  gap: 48px;
  align-items: start;
  margin: 32px auto 0;
  padding: 0 32px 64px;
}
.tvd-detail-content { min-width: 0; }
.tvd-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--ink-100);
}
.tvd-detail-logo {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--brand-700), var(--brand-800));
  color: #fff;
  box-shadow: 0 8px 24px rgba(15,76,129,.25);
  font-family: var(--font-en);
  font-size: 28px;
  font-weight: var(--weight-black);
}
/* Uniform vertical rhythm between badges → 店名/分享 → 評分·地區·照片 (≥10px). */
.tvd-detail-title-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tvd-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}
.tvd-d-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
}
.tvd-d-badge.is-featured {
  background: linear-gradient(135deg, #eab94e 0%, #d49a2a 50%, #b97f15 100%);
  color: #fff;
  border: 1px solid rgba(150,105,15,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
  font-weight: var(--weight-bold);
  text-shadow: 0 1px 1px rgba(120,80,0,.35);
}
.tvd-d-badge.is-featured .tvd-icon { color: #fff; }
.tvd-d-badge.is-verified {
  background: var(--brand-100);
  color: var(--brand-800);
}
.tvd-d-badge.is-open {
  background: var(--green-bg);
  color: oklch(48% 0.13 150);
}
.tvd-d-badge.is-closed {
  background: var(--ink-100);
  color: var(--ink-600);
}
.tvd-d-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.tvd-detail-header h1 {
  margin: 0 0 6px;
  color: var(--ink-900);
  font-size: var(--text-h1);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}
.tvd-detail-subtitle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ink-600);
  font-size: var(--text-card);
}
.tvd-detail-subtitle i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-300);
}
.tvd-detail-rating { color: var(--gold); }
.tvd-detail-rating strong {
  color: var(--ink-900);
  font-family: var(--font-en);
}
.tvd-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.tvd-detail-actions button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink-600);
}
.tvd-detail-actions button:hover {
  border-color: var(--ink-300);
  color: var(--ink-900);
}
/* Store name + inline share trigger sit on one row, share pinned to the end. */
.tvd-detail-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tvd-detail-title-line h1 {
  flex: 1;
  min-width: 0;
}
/* Pill 分享 button next to the title. Scoped under .tvd-detail-page + !important so
   the active theme's <button> styles can't pollute it (it must match the project's
   pill controls, not the rounded-square it used to be). */
.tvd-detail-page .tvd-title-share {
  flex-shrink: 0 !important;
  width: auto !important;
  min-height: 36px !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 14px !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: var(--r-pill) !important;
  background: #fff !important;
  color: var(--ink-600) !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.tvd-detail-page .tvd-title-share .tvd-icon { flex-shrink: 0; }
.tvd-detail-page .tvd-title-share:hover {
  border-color: var(--ink-300) !important;
  background: var(--ink-50) !important;
  color: var(--ink-900) !important;
}
.tvd-detail-tabs {
  position: sticky;
  top: var(--topbar-height);
  z-index: 20;
  display: flex;
  gap: 4px;
  padding: 12px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--ink-100);
  background: var(--ink-50);
}
.tvd-detail-tabs a {
  padding: 8px 16px;
  border-radius: var(--r-md);
  color: var(--ink-600);
  text-decoration: none;
  font-size: var(--text-card);
  font-weight: var(--weight-semibold);
}
.tvd-detail-tabs a:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}
.tvd-detail-tabs a.is-active {
  background: var(--brand-700);
  color: #fff;
}
.tvd-detail-section {
  margin-bottom: 40px;
  scroll-margin-top: 128px;
}
.tvd-detail-section > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.tvd-detail-section h2 {
  margin: 0;
  color: var(--ink-900);
  font-size: var(--text-h3);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-snug);
}
.tvd-detail-section header a,
.tvd-detail-section header button,
.tvd-side-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--brand-700);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.tvd-google-source {
  margin: 12px 0 0;
  color: var(--ink-500);
  font-size: var(--text-tiny);
  line-height: var(--leading-normal);
}
.tvd-review-head a {
  color: inherit;
  text-decoration: none;
}
.tvd-review-head a:hover { color: var(--brand-700); }
.tvd-detail-text,
.tvd-detail-text p {
  color: var(--ink-700);
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
}
.tvd-feature-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  background: #fff;
}
.tvd-feature-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-800);
  font-size: var(--text-sm);
}
.tvd-feature-row i {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-700);
  color: #fff;
  font-style: normal;
}
.tvd-service-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.tvd-service-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  background: #fff;
  transition: border-color var(--duration-base), box-shadow var(--duration-base), transform var(--duration-base);
}
.tvd-service-card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.tvd-service-card > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  color: #fff;
  font-family: var(--font-en);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
}
.tvd-service-card > span.has-icon {
  background: #fff;
  border: 1px solid var(--ink-100);
  padding: 5px;
  overflow: hidden;
}
.tvd-service-card > span.has-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.tvd-service-card strong {
  display: block;
  color: var(--ink-900);
  font-size: var(--text-card);
}
.tvd-service-card small {
  display: block;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: var(--text-tiny);
}
.tvd-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tvd-gallery-grid figure,
.tvd-article-grid figure,
.tvd-related-grid figure {
  margin: 0;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: repeating-linear-gradient(45deg, var(--ink-100), var(--ink-100) 4px, var(--ink-50) 4px, var(--ink-50) 8px);
}
.tvd-gallery-grid figure {
  aspect-ratio: 1;
}
.tvd-gallery-grid img,
.tvd-related-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tvd-gallery-grid span,
.tvd-article-grid figure > span,
.tvd-related-grid figure > span {
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,.86);
  color: var(--ink-500);
  font-family: var(--font-mono);
  font-size: 10px;
}
.tvd-gallery-grid .is-more {
  background: var(--ink-900);
  color: #fff;
}
.tvd-gallery-grid .is-more span {
  background: transparent;
  color: #fff;
  font-family: var(--font-zh);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.tvd-reviews-block {
  padding: 24px;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  background: #fff;
}
.tvd-reviews-summary-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 32px;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--ink-100);
}
.tvd-review-big {
  text-align: center;
}
.tvd-review-big strong {
  display: block;
  color: var(--ink-900);
  font-family: var(--font-en);
  font-size: 48px;
  line-height: 1;
}
.tvd-review-big span {
  display: block;
  margin: 4px 0 2px;
  color: var(--gold);
  letter-spacing: 2px;
}
.tvd-review-big small {
  color: var(--ink-500);
  font-size: var(--text-tiny);
}
.tvd-reviews-summary-row .tvd-review-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tvd-reviews-summary-row .tvd-review-bars i {
  height: 7px;
  border-radius: 4px;
  background: var(--gold);
}
.tvd-reviews-summary-row button,
.tvd-review-filters button {
  padding: 10px 16px;
  border: 1px solid var(--brand-100);
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.tvd-review-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.tvd-review-filters button {
  padding: 6px 12px;
  border-color: var(--ink-200);
  border-radius: var(--r-pill);
  background: var(--ink-50);
  color: var(--ink-700);
  font-size: var(--text-xs);
}
.tvd-review-filters button.is-active {
  border-color: var(--brand-700);
  background: var(--brand-700);
  color: #fff;
}
.tvd-review-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--ink-100);
}
.tvd-review-item:last-child { border-bottom: 0; }
.tvd-review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tvd-review-head > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--brand-700);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}
.tvd-review-head div { flex: 1; }
.tvd-review-head strong {
  display: block;
  color: var(--ink-900);
  font-size: var(--text-sm);
}
.tvd-review-head small {
  display: block;
  color: var(--ink-500);
  font-size: var(--text-tiny);
}
.tvd-review-head em {
  color: var(--gold);
  font-style: normal;
  font-size: var(--text-tiny);
  letter-spacing: 1px;
}
.tvd-review-item p {
  margin: 0;
  color: var(--ink-700);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.tvd-article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.tvd-article-grid article,
.tvd-related-grid a {
  overflow: hidden;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color var(--duration-base), box-shadow var(--duration-base);
}
.tvd-article-grid article:hover,
.tvd-related-grid a:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-sm);
}
.tvd-article-grid figure,
.tvd-related-grid figure {
  aspect-ratio: 16 / 9;
  border-radius: 0;
}
.tvd-article-grid figure i,
.tvd-related-grid figure i {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: var(--r-xs);
  background: rgba(15,76,129,.95);
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: var(--weight-bold);
}
.tvd-article-grid article > div {
  padding: 14px 16px 16px;
}
.tvd-article-grid strong,
.tvd-related-grid strong {
  display: block;
  color: var(--ink-900);
  font-size: var(--text-card);
  line-height: 1.4;
}
.tvd-article-grid small,
.tvd-related-grid small {
  display: block;
  margin-top: 6px;
  color: var(--ink-500);
  font-size: var(--text-tiny);
}
.tvd-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.tvd-related-grid a {
  padding-bottom: 12px;
}
.tvd-related-grid strong,
.tvd-related-grid small {
  padding: 0 12px;
}
.tvd-related-grid figure { margin-bottom: 10px; }
/* Place + service-category pill on one row; pill is right-aligned (consistent
   with the project's tag pills). */
.tvd-related-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding: 0 12px;
}
.tvd-related-grid .tvd-related-foot small {
  margin: 0;
  padding: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tvd-related-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ink-50);
  color: var(--ink-600);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.tvd-related-tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tvd-detail-side {
  position: sticky;
  top: 88px;
}
.tvd-booking-card,
.tvd-info-card {
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  background: #fff;
}
.tvd-booking-card {
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.tvd-booking-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: oklch(48% 0.13 150);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.tvd-booking-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(60% 0.16 150);
  animation: tvdPulse 2s infinite;
}
.tvd-booking-card h3,
.tvd-info-card h4 {
  margin: 0 0 4px;
  color: var(--ink-900);
  font-size: var(--text-h3);
  font-weight: var(--weight-bold);
}
.tvd-booking-card p {
  margin: 0 0 20px;
  color: var(--ink-600);
  font-size: var(--text-sm);
}
.tvd-btn-book {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--brand-700);
  color: #fff;
  font-size: var(--text-body);
  font-weight: var(--weight-bold);
}
.tvd-contact-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
}
.tvd-contact-quick a {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--brand-100);
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-700);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.tvd-info-card {
  margin-top: 16px;
  padding: 20px;
}
.tvd-info-card h4 {
  margin-bottom: 14px;
  font-size: var(--text-card);
}
.tvd-info-card > div:not(.tvd-mini-map) {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-100);
  color: var(--brand-700);
}
.tvd-info-card > div:last-child { border-bottom: 0; }
.tvd-info-card p {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--ink-900);
}
.tvd-info-card small {
  display: block;
  color: var(--ink-500);
  font-size: var(--text-tiny);
}
.tvd-info-card strong {
  display: block;
  color: var(--ink-900);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.tvd-side-hours {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--ink-700) !important;
}
.tvd-side-hours span.is-today,
.tvd-side-hours strong.is-today {
  color: var(--brand-700);
  font-weight: var(--weight-bold);
}
.tvd-side-hours strong.is-closed { color: var(--ink-400); }
.tvd-mini-map {
  height: 240px;
  position: relative;
  /* z-index:0 makes the map its own stacking context so Leaflet's internal
     panes/controls (which go up to z-index 1000) stay contained and can't
     paint over the fixed mobile action bar. */
  z-index: 0;
  overflow: hidden;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--map-bg);
}
.tvd-mini-map svg {
  width: 100%;
  height: 100%;
}
/* Leaflet detail/form map: fill the box and keep the theme's global
   img{border-radius} off the tiles (same seam bug as the catalog map). */
.tvd-mini-map.leaflet-container,
.tds-form-map.leaflet-container { background: var(--map-bg); }
.tvd-mini-map .leaflet-tile,
.tvd-mini-map img,
.tds-form-map .leaflet-tile,
.tds-form-map img,
.leaflet-container img { border-radius: 0 !important; }
.tvd-detail-text--empty { color: var(--ink-400); font-style: normal; }

/* Clickable photos → lightbox */
.tvd-detail-page [data-tds-lightbox] { cursor: zoom-in; }
.tvd-detail-page [data-tds-lightbox]:focus-visible { outline: 2px solid var(--brand-700); outline-offset: 2px; }

/* Photo lightbox / carousel */
.tds-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 18, .92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.tds-lightbox[hidden] { display: none; }
.tds-lightbox__stage {
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  display: flex;
}
.tds-lightbox__stage img {
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
}
.tds-lightbox__close,
.tds-lightbox__nav {
  position: absolute !important;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  border: 0 !important;
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
  cursor: pointer;
  border-radius: 50% !important;
}
.tds-lightbox__close {
  top: 20px !important;
  right: 24px !important;
  left: auto !important;
  width: 44px !important;
  height: 44px !important;
  font-size: 28px;
  line-height: 1;
}
.tds-lightbox__nav {
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 52px !important;
  height: 52px !important;
  font-size: 34px;
  line-height: 1;
}
.tds-lightbox__nav--prev { left: 24px !important; right: auto !important; }
.tds-lightbox__nav--next { right: 24px !important; left: auto !important; }
.tds-lightbox__close:hover,
.tds-lightbox__nav:hover { background: rgba(255,255,255,.26); }
.tds-lightbox__counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.85);
  font-size: 13px;
  letter-spacing: .08em;
}
@media (max-width: 640px) {
  .tds-lightbox__nav { width: 42px; height: 42px; font-size: 26px; }
  .tds-lightbox__nav--prev { left: 8px; }
  .tds-lightbox__nav--next { right: 8px; }
}

/* Street View host — a dedicated overlay holding a FRESH StreetViewPanorama
   instance per dealer (the map-bound pano only renders on its first show; a
   new instance per open repaints reliably). Sits above the map (z 0), below
   the cloud cover (z 8). */
.tvd-sv-host {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  background: #000;
}
.tvd-sv-host.is-active {
  display: block;
}
.tvd-sv-host .tvd-sv-mount {
  position: absolute;
  inset: 0;
}

/* Map pin preview card — a small tooltip anchored above a tapped pin (JS sets
   left/top to the pin's pixel; the transform lifts it above the pin head).
   Everything is scoped under .tvd-app and hard-reset because the WoodMart theme
   styles bare <button>/<strong>/<small> globally (grey gradient backgrounds,
   min-heights, uppercase, letter-spacing) which otherwise leak into the card. */
.tvd-app .tvd-pin-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 264px;
  z-index: 6;
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 40px -12px rgba(15, 34, 58, .38), 0 2px 8px rgba(15, 34, 58, .12);
  font-family: var(--font-zh);
  line-height: 1.4;
  transform: translate(-50%, calc(-100% - 34px));
  transform-origin: bottom center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.tvd-app .tvd-pin-card.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, calc(-100% - 42px));
}
.tvd-app .tvd-pin-card::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 0 0 4px 0;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 5px 5px 10px -5px rgba(15, 34, 58, .25);
}
/* Kill the theme's global <button> styling inside the card. */
.tvd-app .tvd-pin-card button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: inherit;
  line-height: 1.2;
}
.tvd-app .tvd-pin-card__close {
  position: absolute !important; /* the theme forces position:relative on buttons */
  top: 8px;
  right: 8px;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  background: rgba(15, 34, 58, .07) !important;
  color: #475569 !important;
  cursor: pointer;
}
.tvd-app .tvd-pin-card__close:hover {
  background: rgba(15, 34, 58, .14) !important;
}
.tvd-app .tvd-pin-card__body {
  display: flex;
  gap: 13px;
  align-items: center;
  padding-right: 26px; /* clear the close button */
  cursor: pointer;
}
.tvd-app .tvd-pin-card__thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  background-color: var(--ink-100);
}
.tvd-app .tvd-pin-card__thumb.is-mono {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
}
.tvd-app .tvd-pin-card__info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.tvd-app .tvd-pin-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.3;
  letter-spacing: var(--tracking-snug);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tvd-app .tvd-pin-card__place {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.3;
}
.tvd-app .tvd-pin-card__rating {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold, #c8881d);
}
.tvd-app .tvd-pin-card__rating small {
  color: var(--ink-400, #94a3b8);
  font-weight: 500;
}
.tvd-app .tvd-pin-card__cta {
  width: 100%;
  /* !important: our own `.tvd-app .tvd-pin-card button { margin:0 }` reset has a
     higher specificity (extra `button` type) and would otherwise zero this out. */
  margin-top: 18px !important;
  padding: 12px 0 !important;
  border-radius: 11px !important;
  background: var(--brand-700) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
}
.tvd-app .tvd-pin-card__cta:hover {
  background: #0c3e6a !important;
}

/* Street View entry transition — a cinematic "dive through the clouds" that
   masks the progressive panorama tile load, then clears to reveal the street. */
.tvd-sv-cover {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  background: linear-gradient(180deg, #bcd6f0 0%, #d7e8f7 45%, #f2f8fd 80%, #ffffff 100%);
  /* Snap away once the clouds finish — no lingering hazy fade over the street
     view (the dive is enough; the frosted reveal was redundant). */
  transition: opacity .12s ease;
}
.tvd-sv-cover.is-active {
  opacity: 1;
  transition: opacity .12s ease;
}
.tvd-sv-cover__cloud {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 70vmax;
  height: 70vmax;
  margin: -35vmax 0 0 -35vmax;
  background:
    radial-gradient(closest-side, rgba(255,255,255,.96), rgba(255,255,255,0) 72%) 28% 38% / 58% 58% no-repeat,
    radial-gradient(closest-side, rgba(255,255,255,.92), rgba(255,255,255,0) 72%) 66% 52% / 66% 66% no-repeat,
    radial-gradient(closest-side, rgba(255,255,255,.88), rgba(255,255,255,0) 72%) 48% 70% / 72% 72% no-repeat;
  filter: blur(7px);
  opacity: 0;
  will-change: transform, opacity;
}
.tvd-sv-cover.is-active .tvd-sv-cover__cloud {
  animation: tdsCloudDive 1.6s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}
.tvd-sv-cover.is-active .tvd-sv-cover__cloud:nth-child(2) { animation-delay: .2s; top: 48%; left: 46%; }
.tvd-sv-cover.is-active .tvd-sv-cover__cloud:nth-child(3) { animation-delay: .42s; top: 60%; left: 56%; }
.tvd-sv-cover.is-active .tvd-sv-cover__cloud:nth-child(4) { animation-delay: .64s; top: 50%; left: 52%; }
@keyframes tdsCloudDive {
  0%   { transform: scale(.18) translateZ(0); opacity: 0; }
  22%  { opacity: 1; }
  100% { transform: scale(3.6) translateZ(0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tvd-sv-cover.is-active .tvd-sv-cover__cloud { animation: none; }
}

/* Drawer share button — top-left of the cover image */
.tvd-drawer-share {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 6;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(12,17,24,.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  cursor: pointer;
}
.tvd-drawer-share:hover { background: rgba(12,17,24,.78); }
.tvd-drawer-share.is-copied { background: var(--brand-700); }
.tvd-gallery-count {
  font-size: var(--text-tiny);
  color: var(--ink-500);
  letter-spacing: .04em;
}
.tvd-mini-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2.5px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-en);
  font-size: var(--text-tiny);
  font-weight: var(--weight-bold);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.35));
}
.tvd-side-link {
  margin-top: 12px;
}

/* Floating mobile action bar — hidden on desktop, shown in the 760px query.
   Buttons scoped under .tvd-detail-page with !important so the active theme's
   anchor styles can't repaint them. */
.tvd-mobile-bar { display: none; }
.tvd-detail-page .tvd-mobile-bar__item {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  min-height: 50px !important;
  border: 1px solid var(--ink-100) !important;
  border-radius: 12px !important;
  background: var(--ink-50) !important;
  color: var(--ink-700) !important;
  text-decoration: none !important;
  font-size: 12px !important;
  font-weight: var(--weight-semibold) !important;
  line-height: 1 !important;
}
.tvd-detail-page .tvd-mobile-bar__item .tvd-icon { display: block; }
.tvd-detail-page .tvd-mobile-bar__item.is-primary {
  border-color: var(--brand-700) !important;
  background: var(--brand-700) !important;
  color: #fff !important;
}
.tvd-detail-page .tvd-mobile-bar__item:active { transform: scale(.97); }

@media (max-width: 1000px) {
  .tvd-detail-main {
    grid-template-columns: 1fr;
    /* Stacked: vertical gap between the review block (end of the article) and
       the 聯絡店家 card (start of the aside). Matches the 16px card rhythm. */
    gap: 16px;
  }
  /* When stacked, the last section's 40px bottom margin stacks on top of the
     16px grid gap, leaving a ~56px gap before 聯絡店家. Drop it so the gap is
     just the grid's 16px. */
  .tvd-detail-content > .tvd-detail-section:last-child {
    margin-bottom: 0;
  }
  .tvd-detail-side {
    position: static;
  }
}
@media (max-width: 760px) {
  .tvd-detail-nav {
    padding: 10px 16px;
    flex-wrap: wrap;
  }
  .tvd-nav-crumb,
  .tvd-detail-nav-actions .tvd-nav-action:not(.is-primary) {
    display: none;
  }
  .tvd-detail-hero,
  .tvd-detail-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* (1) Hide the square initial logo on phones. */
  .tvd-detail-logo { display: none; }
  .tvd-detail-header {
    flex-direction: column;
    gap: 0;
  }

  /* (3) Hero: full-bleed main photo, a 4-up thumbnail strip overlaid along
     its lower edge, and the "view all" pill pinned to the top-right. */
  .tvd-hero-gallery {
    display: block;
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    /* Dark fill + own stacking context so the rounded-corner clip never bleeds the
       light page background through at the corners (the reported 外露背景底色). */
    background: #0d1622;
    isolation: isolate;
  }
  .tvd-hero-tile.is-main {
    display: block;
    width: 100%;
    height: 300px;
    grid-column: auto;
    grid-row: auto;
    border-radius: var(--r-lg);
  }
  .tvd-hero-tile.is-main img { border-radius: var(--r-lg); }
  .tvd-hero-gallery::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
    pointer-events: none;
    z-index: 1;
  }
  .tvd-hero-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 2;
  }
  .tvd-hero-thumbs .tvd-hero-tile {
    height: 60px;
    border-radius: 8px;
    /* Was a 1.5px white border that read as "漏出白色"; use a dark fill + subtle
       ring so the thumbnails sit cleanly on the photo with no white bleed. */
    border: 0;
    background: #0d1622;
    box-shadow: 0 2px 8px rgba(0,0,0,.4), 0 0 0 1px rgba(0,0,0,.2);
  }
  .tvd-hero-thumbs .tvd-hero-tile img { border-radius: 8px; }
  .tvd-detail-page .tvd-hero-gallery .tvd-hero-more {
    top: 12px !important;
    bottom: auto !important;
    right: 12px !important;
    left: auto !important;
    z-index: 3 !important;
  }

  .tvd-detail-tabs {
    overflow-x: auto;
  }
  .tvd-service-card-grid,
  .tvd-article-grid,
  .tvd-related-grid {
    grid-template-columns: 1fr;
  }
  .tvd-reviews-summary-row {
    grid-template-columns: 1fr;
  }

  /* (4) 店面照片: masonry brick layout, two bricks per row. */
  .tvd-gallery-grid {
    display: block;
    column-count: 2;
    column-gap: 8px;
  }
  .tvd-gallery-grid figure {
    aspect-ratio: auto;
    display: block;
    width: 100%;
    margin: 0 0 8px;
    break-inside: avoid;
  }
  .tvd-gallery-grid img {
    height: auto;
  }

  /* (5) Floating action bar, sitting just above the WoodMart bottom toolbar. */
  .tvd-mobile-bar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--tds-mobile-bar-offset, 0px);
    z-index: 340;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    /* Solid background — a backdrop-filter(blur) on a position:fixed bar makes iOS Safari
       float/jitter it during scroll and snap it back when scrolling stops. Solid = steady. */
    background: #fff;
    border-top: 1px solid var(--ink-100);
    box-shadow: 0 -6px 24px rgba(15,30,50,.10);
  }
  /* The article's own bottom padding (64px desktop) is too much once the page
     also reserves room for the fixed bar — trim it to the card rhythm. */
  .tvd-detail-main {
    padding-bottom: 16px;
  }
  /* WoodMart already reserves its toolbar height as body padding-bottom, so we
     only add the floating bar's own footprint (~67px) + ~16px breathing. Do NOT
     add the toolbar offset here — that would double-count the body padding. */
  .tvd-detail-page .tvd-detail {
    padding-bottom: 84px;
  }
}
.tds-modal__actions { display: flex; gap: 24px; justify-content: center; align-items: center; }

/* ============================================================
   Leaflet pin override
   ============================================================ */
.tds-map-pin {
  display: flex !important; align-items: center; justify-content: center;
  width: 24px !important; height: 24px !important;
  background: transparent !important; border: 0 !important;
}

/* ============================================================
   Tesla Vendor Directory control normalization
   Keep every interactive control on the same radius/elevation system
   even when the active WordPress theme loads broad button styles later.
   ============================================================ */
.tvd-app :where(button, select),
.tvd-detail :where(button, select) {
  appearance: none !important;
  -webkit-appearance: none !important;
  font-family: var(--font-ui) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}
.tvd-app [hidden],
.tvd-detail [hidden] {
  display: none !important;
}

.tvd-app .tvd-nav-item,
.tvd-app button.tvd-nav-item {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: rgba(255,255,255,.66) !important;
}
.tvd-app .tvd-nav-item:hover,
.tvd-app .tvd-nav-item.is-active {
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
}

.tvd-app .tvd-region-tab,
.tvd-app .tvd-city-chip,
.tvd-app .tvd-cat-item,
.tvd-app .tvd-toggle-row,
.tvd-app .tvd-sort-select,
.tvd-app .tvd-filter-label button {
  border-radius: 8px !important;
}
.tvd-app .tvd-filter-label button {
  min-height: 28px !important;
  padding: 4px 8px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--brand-700) !important;
}
.tvd-app .tvd-region-tab {
  height: 34px !important;
  min-height: 34px !important;
  padding: 7px 4px !important;
  background: transparent !important;
  border: 0 !important;
}
.tvd-app .tvd-region-tab.is-active {
  background: #fff !important;
  color: var(--brand-700) !important;
  box-shadow: var(--shadow-sm) !important;
}
.tvd-app .tvd-city-chip {
  min-height: 30px !important;
  padding: 6px 12px !important;
  border: 1px solid var(--ink-100) !important;
  background: var(--ink-50) !important;
}
.tvd-app .tvd-city-chip.is-active {
  background: var(--brand-700) !important;
  border-color: var(--brand-700) !important;
  color: #fff !important;
}
.tvd-app .tvd-cat-item {
  min-height: 40px !important;
  padding: 8px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ink-800) !important;
}
.tvd-app .tvd-cat-item:hover,
.tvd-app .tvd-cat-item.is-active {
  background: var(--ink-50) !important;
}
.tvd-app .tvd-sort-select {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 32px 0 12px !important;
  border: 1px solid var(--ink-200) !important;
  background: #fff !important;
  color: var(--ink-800) !important;
}
.tvd-app .tvd-toggle-row {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 8px !important;
  border: 0 !important;
  background: transparent !important;
}
.tvd-app .tvd-toggle-row:hover {
  background: var(--ink-50) !important;
}

.tvd-app .tvd-btn,
.tvd-app .tvd-results-pill.tvd-show-list,
.tvd-app .tvd-list-close,
.tvd-app .tvd-drawer-close,
.tvd-app .tvd-locate-btn,
.tvd-detail .tvd-nav-action,
.tvd-detail .tvd-hero-more,
.tvd-detail .tvd-detail-actions button,
.tvd-detail .tvd-btn-book,
.tvd-detail .tvd-contact-quick a,
.tvd-detail .tvd-detail-section header button,
.tvd-detail .tvd-review-filters button,
.tvd-detail .tvd-reviews-summary-row button {
  border-radius: 10px !important;
}

.tvd-app .tvd-results-pill.tvd-show-list {
  min-height: 36px !important;
  padding: 8px 14px !important;
  border: 0 !important;
  border-radius: var(--r-pill) !important;
  background: #fff !important;
  color: var(--ink-800) !important;
  box-shadow: var(--shadow-lg) !important;
}
.tvd-app .tvd-btn-primary {
  background: var(--brand-700) !important;
  border: 1px solid var(--brand-700) !important;
  color: #fff !important;
}
.tvd-app .tvd-btn-primary:hover { background: var(--brand-800) !important; }
.tvd-app .tvd-btn-ghost {
  background: #fff !important;
  border: 1px solid var(--ink-200) !important;
  color: var(--ink-700) !important;
}

.tvd-app .tvd-map-tools button,
.tvd-app .tvd-v-actions button,
.tvd-app .tvd-zoom-stack button,
.tvd-app .tvd-locate-btn,
.tvd-app .tvd-list-close,
.tvd-app .tvd-drawer-close,
.tvd-detail .tvd-nav-action.is-icon,
.tvd-detail .tvd-detail-actions button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
}
.tvd-app .tvd-v-actions button {
  border-radius: 8px !important;
}
/* Circular (not rounded-square) so the active fill sits concentric inside the
   pill-shaped .tvd-map-tools container; 30px so the container compresses to the
   same 38px height as the other topbar pills (was 36px → 44px container). */
.tvd-app .tvd-map-tools button {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  border-radius: 50% !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ink-600) !important;
}

/* The three topbar pills (共有 N 筆 / 地圖工具 / 我想刊登) share one height + width. */
.tvd-app .tvd-results-pill,
.tvd-app .tvd-map-tools,
.tvd-app .tvd-list-cta {
  height: 38px !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  min-width: 118px !important;
  justify-content: center !important;
}
.tvd-app .tvd-map-tools button.is-active {
  background: var(--brand-700) !important;
  color: #fff !important;
}
.tvd-app .tvd-zoom-stack button,
.tvd-app .tvd-locate-btn,
.tvd-app .tvd-list-close,
.tvd-app .tvd-drawer-close {
  border: 0 !important;
  background: #fff !important;
  color: var(--ink-700) !important;
}
.tvd-app .tvd-v-actions button {
  background: rgba(255,255,255,.94) !important;
  color: var(--ink-600) !important;
  border: 0 !important;
}
.tvd-app .tvd-zoom-stack {
  border-radius: 10px !important;
}
.tvd-app .tvd-zoom-stack button:first-child {
  border-radius: 10px 10px 0 0 !important;
}
.tvd-app .tvd-zoom-stack button:last-child {
  border-radius: 0 0 10px 10px !important;
}
.tvd-app .tvd-pin {
  border-radius: 0 !important;
  background: transparent !important;
}

.tvd-app .tvd-v-card-main {
  gap: 13px !important; /* WoodMart's :is(button){gap:5px} otherwise glues the text to the thumb */
  border-radius: 10px !important;
  background: transparent !important;
  border: 0 !important;
}
.tvd-app .tvd-v-card:hover .tvd-v-card-main,
.tvd-app .tvd-v-card.is-active .tvd-v-card-main {
  background: transparent !important;
}

.tvd-app .tvd-drawer-actions button,
.tvd-app .tvd-drawer-actions a,
.tvd-app .tvd-service-grid span {
  border-radius: var(--r-pill) !important;
}

/* Detail page button audit pass: keep every action on one control scale. */
.tvd-detail-page .tvd-detail :where(button, a) {
  touch-action: manipulation;
}
.tvd-detail-page .tvd-nav-back,
.tvd-detail-page .tvd-nav-action {
  min-height: 40px !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  font-size: var(--text-sm) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.tvd-detail-page .tvd-nav-action {
  border: 1px solid var(--ink-200) !important;
  background: #fff !important;
  color: var(--ink-700) !important;
}
.tvd-detail-page .tvd-nav-back {
  border: 0 !important;
  background: transparent !important;
  color: var(--ink-700) !important;
}
.tvd-detail-page .tvd-nav-action.is-icon {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
}
.tvd-detail-page .tvd-nav-action.is-primary {
  border-color: var(--brand-700) !important;
  background: var(--brand-700) !important;
  color: #fff !important;
}
.tvd-detail-page .tvd-nav-back:hover,
.tvd-detail-page .tvd-nav-action:hover {
  border-color: var(--ink-300) !important;
  background: var(--ink-100) !important;
  color: var(--ink-900) !important;
}
.tvd-detail-page .tvd-nav-action.is-primary:hover {
  border-color: var(--brand-800) !important;
  background: var(--brand-800) !important;
  color: #fff !important;
}

.tvd-detail-page .tvd-hero-more {
  width: auto !important;
  min-width: 0 !important;
  min-height: 40px !important;
  height: 40px !important;
  position: absolute !important;
  left: auto !important;
  right: 16px !important;
  bottom: 16px !important;
  top: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: rgba(12,17,24,.86) !important;
  color: #fff !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--weight-semibold) !important;
}

.tvd-detail-page .tvd-detail-actions {
  gap: 8px !important;
}
.tvd-detail-page .tvd-detail-actions button {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--ink-600) !important;
}
.tvd-detail-page .tvd-detail-actions button:hover {
  border-color: var(--ink-300) !important;
  background: var(--ink-50) !important;
  color: var(--ink-900) !important;
}

.tvd-detail-page .tvd-detail-section header button,
.tvd-detail-page .tvd-detail-section header a.tvd-section-action,
.tvd-detail-page .tvd-side-link {
  min-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: var(--brand-700) !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: 1 !important;
  text-decoration: none !important;
}
.tvd-detail-page .tvd-detail-section header button:hover,
.tvd-detail-page .tvd-detail-section header a.tvd-section-action:hover,
.tvd-detail-page .tvd-side-link:hover {
  border-color: var(--brand-100) !important;
  background: var(--brand-50) !important;
}

.tvd-detail-page .tvd-reviews-summary-row button,
.tvd-detail-page .tvd-write-review {
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: center !important;
  gap: 6px !important;
  padding: 0 16px !important;
  border: 1px solid var(--brand-100) !important;
  border-radius: 10px !important;
  background: var(--brand-50) !important;
  color: var(--brand-700) !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--weight-semibold) !important;
  text-decoration: none !important;
}
.tvd-detail-page .tvd-write-review:hover {
  border-color: var(--brand-200) !important;
  background: var(--brand-100) !important;
}
.tvd-detail-page .tvd-review-filters {
  gap: 8px !important;
}
.tvd-detail-page .tvd-review-filters button {
  min-height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: 10px !important;
  background: var(--ink-50) !important;
  color: var(--ink-700) !important;
  font-size: var(--text-xs) !important;
  font-weight: var(--weight-semibold) !important;
}
.tvd-detail-page .tvd-review-filters button.is-active {
  border-color: var(--brand-700) !important;
  background: var(--brand-700) !important;
  color: #fff !important;
}

.tvd-detail-page .tvd-contact-quick {
  display: flex !important;
  gap: 6px !important;
}
.tvd-detail-page .tvd-btn-book {
  width: 100% !important;
  min-height: 48px !important;
  height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 16px !important;
  border: 1px solid var(--brand-700) !important;
  border-radius: 10px !important;
  background: var(--brand-700) !important;
  color: #fff !important;
  font-size: var(--text-body) !important;
  font-weight: var(--weight-bold) !important;
  text-decoration: none !important;
}
.tvd-detail-page .tvd-btn-book:hover {
  border-color: var(--brand-800) !important;
  background: var(--brand-800) !important;
}
/* LINE-first CTA for featured stores — LINE's brand green for instant recognition. */
.tvd-detail-page .tvd-btn-book.is-line {
  border-color: #06c755 !important;
  background: #06c755 !important;
}
.tvd-detail-page .tvd-btn-book.is-line:hover {
  border-color: #05b54c !important;
  background: #05b54c !important;
}
.tvd-detail-page .tvd-contact-quick a {
  flex: 1 1 0 !important;          /* 等分一行，永不換行 */
  min-width: 0 !important;
  gap: 4px !important;            /* 圖示↔文字間距 6→4 */
  padding: 12px 9px !important;
  letter-spacing: -0.02em !important; /* 蓋掉 WoodMart 的字距，收緊 */
  white-space: nowrap !important; /* ← 不換行的關鍵；務必部署 + 清快取才會生效 */
  overflow: hidden !important;
  border: 1px solid var(--brand-100) !important;
  border-radius: 10px !important;
  background: var(--brand-50) !important;
  color: var(--brand-700) !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--weight-semibold) !important;
}

/* Viewport fit pass: keep TDS screens full-width/full-height inside WP themes. */
body.tvd-explorer-page,
body.tvd-detail-page {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* Make the CONTENT wrappers full-bleed. IMPORTANT: do NOT target the generic
   .container / .container-fluid here — the WoodMart header uses .container too, and
   zeroing its max-width + padding flattens the logo against the left edge (theme
   pollution). The content <main> carries .content-layout-wrapper, which is enough to
   make it full-width on its own. */
body.tvd-explorer-page :where(.website-wrapper, .main-page-wrapper, .site-content, .content-layout-wrapper),
body.tvd-detail-page :where(.website-wrapper, .main-page-wrapper, .site-content, .content-layout-wrapper) {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.tvd-explorer-page :where(.main-page-wrapper, .site-content),
body.tvd-detail-page :where(.main-page-wrapper, .site-content) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Both TDS pages drop the content wrapper's top/bottom padding (WoodMart adds ~40px)
   at ALL widths: the explorer map butts against the header, and the detail page sits
   flush top & bottom (user wanted -40px top/bottom on desktop too, not just mobile). */
body.tvd-explorer-page :where(.content-layout-wrapper),
body.tvd-detail-page :where(.content-layout-wrapper) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.tvd-app {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  min-height: 0 !important;
  grid-template-columns: var(--nav-rail-width) clamp(320px, 25vw, var(--sidebar-width)) minmax(0, 1fr) !important;
  overflow: hidden !important;
}

@supports not (height: 100dvh) {
  .tvd-app { height: 100vh !important; }
}

.tvd-nav-rail,
.tvd-sidebar,
.tvd-stage {
  min-height: 0 !important;
}

.tvd-sidebar,
.tvd-stage,
.tvd-map-shell,
.tvd-map-canvas {
  min-width: 0 !important;
}

.tvd-sidebar-scroll {
  min-height: 0 !important;
}

.tvd-stage {
  width: 100% !important;
  max-width: 100% !important;
}

.tvd-detail {
  width: 100% !important;
  min-height: 100dvh !important;
  overflow-x: hidden !important;
}

.tvd-detail-hero,
.tvd-detail-main {
  width: 100% !important;
  max-width: min(var(--detail-max-width), 100%) !important;
  box-sizing: border-box !important;
}

/* The top bar is full-bleed (spans the viewport); its content is padded to line
   up with the centered hero/content container on wide screens. */
.tvd-detail-nav {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  padding-left: max(32px, calc((100% - var(--detail-max-width)) / 2)) !important;
  padding-right: max(32px, calc((100% - var(--detail-max-width)) / 2)) !important;
}

.tvd-detail-main {
  min-width: 0 !important;
}

@media (max-width: 1180px) {
  .tvd-app {
    grid-template-columns: var(--nav-rail-width) clamp(300px, 30vw, 360px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .tvd-app {
    grid-template-columns: var(--nav-rail-width) clamp(280px, 34vw, 320px) minmax(0, 1fr) !important;
  }

  .tvd-sidebar-header,
  .tvd-filter-panel,
  .tvd-sidebar-footer {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

@media (max-width: 760px) {
  .tvd-app {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    /* Nav rail removed on phones — two rows: filters (auto) + map stage. */
    grid-template-rows: auto minmax(560px, 1fr) !important;
    overflow: visible !important;
  }

  /* (1) Remove the top nav rail entirely on phones. */
  .tvd-nav-rail { display: none !important; }

  .tvd-sidebar,
  .tvd-stage {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* (3/4) Filters flow naturally (no inner scroll box) so the page is short up
     top and the user scrolls down to the map. */
  .tvd-sidebar-scroll {
    max-height: none !important;
    overflow: visible !important;
  }

  .tvd-stage {
    min-height: 100dvh !important;
  }

  .tvd-list-panel {
    height: min(50dvh, 480px) !important;
    max-height: calc(100dvh - 96px) !important;
  }

  .tvd-detail {
    min-height: 100dvh !important;
  }

  .tvd-detail-hero,
  .tvd-detail-main {
    max-width: 100% !important;
  }
  .tvd-detail-nav {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ============================================================
   Mobile catalog — map-first layout (v0.4.15)
   The Google map fills the screen; a region bar + circular AI button sit just
   above the WoodMart toolbar; picking a region slides up the category pills,
   and the matching-store list rides above that.
   ============================================================ */
.tvd-ai-fab-wrap { display: none; }   /* desktop: hidden (region-bar pill is used instead); shown on mobile */
.tvd-ai-modal { display: none; }
.tvd-ai-modal.is-open {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 99990;   /* above the WoodMart sticky mobile nav so the sheet can cover it */
  align-items: flex-end;
  justify-content: center;
  /* No dim — the live map stays fully visible/clear behind so it can react (pan /
     highlight) to chip clicks while the chat stays open. */
  background: transparent;
  pointer-events: none;   /* let map gestures through; the panel re-enables itself */
}
.tvd-ai-modal.is-open .tvd-ai-modal__panel { pointer-events: auto; }
.tvd-ai-modal__panel {
  width: 100%;
  max-width: 560px;
  /* Sit flush at the very bottom and cover the WoodMart nav (was offset above it,
     which squeezed the panel so the dealer result fell off-screen on iPhone). */
  margin: 0 8px 8px;
  padding: 16px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 16px 48px rgba(15,30,50,.3);
}
.tvd-ai-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.tvd-ai-modal__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-900);
  font-size: var(--text-body);
  font-weight: var(--weight-bold);
}
.tvd-ai-modal__title .tvd-icon { color: var(--brand-600); }
/* Scoped + !important so the theme/control-normalization can't reshape it into a
   generic box (see the anti-pollution guide in memory). */
.tvd-app .tvd-ai-modal__close,
.tvd-ai-modal__close {
  width: 34px !important;
  height: 34px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--ink-100) !important;
  color: var(--ink-600) !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
.tvd-app .tvd-ai-modal__close:hover,
.tvd-ai-modal__close:hover {
  background: var(--ink-200) !important;
  color: var(--ink-900) !important;
}
.tvd-ai-modal__head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 「清除對話」 pill — scoped + !important + reset per the anti-pollution guide. */
.tvd-app .tvd-ai-modal__clear,
.tvd-ai-modal__clear {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--ink-500) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
.tvd-app .tvd-ai-modal__clear:hover,
.tvd-ai-modal__clear:hover {
  background: var(--ink-100) !important;
  color: var(--ink-900) !important;
}
.tvd-app .tvd-ai-modal__clear[hidden],
.tvd-ai-modal__clear[hidden] { display: none !important; }
.tvd-ai-modal__hint {
  margin: 10px 2px 2px;
  color: var(--ink-500);
  font-size: var(--text-xs);
  line-height: 1.5;
}

/* AI 詢問 conversation */
.tvd-ai-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 54vh;
  overflow-y: auto;
  margin: 4px 0 12px;
  padding: 2px;
}
.tvd-ai-intro {
  color: var(--ink-500);
  font-size: var(--text-sm);
  line-height: 1.6;
  background: var(--ink-50);
  border-radius: 12px;
  padding: 12px 14px;
}
.tvd-ai-msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: var(--text-sm);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.tvd-ai-msg--user {
  align-self: flex-end;
  background: var(--brand-700);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.tvd-ai-msg--ai {
  align-self: flex-start;
  background: var(--ink-50);
  color: var(--ink-900);
  border-bottom-left-radius: 4px;
}
.tvd-ai-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
/* Scoped + !important so the theme/control-normalization button styles can't
   flatten these into generic boxes — they must read as the project's pills. */
.tvd-app .tvd-ai-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 7px 13px !important;
  border: 1px solid var(--brand-100) !important;
  border-radius: var(--r-pill) !important;
  background: var(--brand-50) !important;
  color: var(--brand-700) !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
.tvd-app .tvd-ai-chip svg { width: 13px; height: 13px; flex-shrink: 0; opacity: .8; }
.tvd-app .tvd-ai-chip:hover {
  border-color: var(--brand-300) !important;
  background: var(--brand-100) !important;
}
/* Active = currently focused on the map */
.tvd-app .tvd-ai-chip.is-active {
  border-color: var(--brand-700) !important;
  background: var(--brand-700) !important;
  color: #fff !important;
}
.tvd-app .tvd-ai-viewmap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px 18px !important;
  border: 0 !important;
  border-radius: var(--r-pill) !important;
  background: var(--brand-700) !important;
  color: #fff !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--weight-bold) !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
.tvd-app .tvd-ai-viewmap svg { width: 15px; height: 15px; flex-shrink: 0; }
.tvd-app .tvd-ai-viewmap:hover { background: var(--brand-800) !important; }
.tvd-ai-dots { display: inline-flex; gap: 4px; padding: 2px 0; }
.tvd-ai-dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-400);
  animation: tvdAiDot 1.2s infinite ease-in-out both;
}
.tvd-ai-dots i:nth-child(2) { animation-delay: .15s; }
.tvd-ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tvdAiDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
/* Scoped + !important: the .tvd-app control-normalization forces position:relative
   on buttons, which would knock this out of the input and into flow. */
.tvd-app .tvd-ai-send,
.tvd-ai-send {
  position: absolute !important;
  right: 7px !important;
  top: 50% !important;
  bottom: auto !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--brand-700) !important;
  color: #fff !important;
  cursor: pointer;
}
.tvd-app .tvd-ai-send:hover,
.tvd-ai-send:hover { background: var(--brand-800) !important; }
/* Leave room on the right of the AI input so text never runs under the send button. */
.tvd-ai-ask input { padding-right: 46px !important; }
/* AI-recommended pins on the fallback (non-Google) pin layer */
.tvd-pin.is-ai-hit { z-index: 30; }
.tvd-pin.is-ai-hit .tvd-pin-drop-body { box-shadow: 0 0 0 4px rgba(15,76,129,.35); }

/* Map-first "bottom menu" layout applies at ALL widths now (desktop + mobile);
   the only per-device difference is the click target (desktop → quick-view
   drawer, mobile → detail page, handled in tds.js). */
@media all {
  .tvd-explorer-page { --tds-region-h: 62px; --tds-cat-h: 58px; }

  /* Map = full-screen background; the nav rail and category pills come along too. */
  .tvd-app .tvd-nav-rail { display: none !important; }
  .tvd-app .tvd-stage {
    position: fixed !important;
    inset: 0 !important;
    min-height: 0 !important;
    z-index: 1 !important;
  }
  /* The catalog renders inside the theme now — start the fixed map BELOW the
     theme header (--tds-header-h is measured + set by tds.js) and trim the app
     to the remaining height so the page doesn't scroll past the footer. */
  .tvd-explorer-page .tvd-app .tvd-stage { top: var(--tds-header-h, 0px) !important; }
  .tvd-explorer-page .tvd-app { height: calc(100dvh - var(--tds-header-h, 0px)) !important; }
  .tvd-app .tvd-map-canvas { height: 100% !important; }
  .tvd-app .tvd-map-controls,
  .tvd-app .tvd-zoom-indicator { display: none !important; }

  /* Category section → compact pill labels (was mobile-only). */
  .tvd-app .tvd-cat-list {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .tvd-app .tvd-cat-item {
    width: auto !important;
    min-height: 38px !important;
    gap: 7px !important;
    padding: 5px 15px 5px 6px !important;
    border: 1px solid var(--ink-200) !important;
    border-radius: var(--r-pill) !important;
    background: var(--ink-50) !important;
  }
  .tvd-app .tvd-cat-item .tvd-cat-check,
  .tvd-app .tvd-cat-item .tvd-cat-count { display: none !important; }
  .tvd-app .tvd-cat-swatch { width: 24px !important; height: 24px !important; font-size: 10px !important; }
  .tvd-app .tvd-cat-name { flex: 0 0 auto !important; font-size: 14px !important; }
  /* Service categories are shown by default (no region gate). */

  /* Sidebar stops flowing; its sections are pinned individually. */
  .tvd-app .tvd-sidebar {
    position: static !important;
    background: transparent !important;
    border: 0 !important;
    overflow: visible !important;
  }
  .tvd-app .tvd-sidebar-header,
  .tvd-app .tvd-sidebar-footer,
  .tvd-app .tvd-sec-sort { display: none !important; }
  .tvd-app .tvd-sidebar-scroll {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  /* --- Region bar: pinned directly above the WoodMart toolbar --- */
  .tvd-app .tvd-sec-region {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(var(--tds-mobile-bar-offset, 0px) - 1px) !important;   /* 1px overlap into the nav so no map sliver shows */
    z-index: 62 !important;
    height: var(--tds-region-h) !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 12px !important;   /* AI FAB moved above the bars; no left reserve needed */
    border: 0 !important;
    border-top: 1px solid var(--ink-100) !important;
    background: rgba(255,255,255,.95) !important;
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 -6px 22px rgba(15,30,50,.10) !important;
  }
  .tvd-app .tvd-sec-region .tvd-filter-label { display: none !important; }
  .tvd-app .tvd-sec-region .tvd-region-tabs {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    background: transparent !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }
  .tvd-app .tvd-sec-region .tvd-region-tabs::-webkit-scrollbar { display: none; }
  .tvd-app .tvd-sec-region .tvd-region-tab {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    padding: 9px 16px !important;
    border-radius: var(--r-pill) !important;
    background: var(--ink-100) !important;
    font-size: 14px !important;
    box-shadow: none !important;
  }
  .tvd-app .tvd-sec-region .tvd-region-tab.is-active {
    background: var(--brand-700) !important;
    color: #fff !important;
  }
  .tvd-app .tvd-sec-region .tvd-city-chips { display: none !important; }

  /* --- Category layer: pinned above the region bar, always visible --- */
  .tvd-app .tvd-sec-cats {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(var(--tds-mobile-bar-offset, 0px) + var(--tds-region-h) - 1px) !important;   /* stay flush on the region bar (both shifted 1px) */
    z-index: 61 !important;
    height: var(--tds-cat-h) !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-top: 1px solid var(--ink-100) !important;
    background: rgba(255,255,255,.92) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .tvd-app .tvd-sec-cats .tvd-filter-label { display: none !important; }
  .tvd-app .tvd-sec-cats .tvd-cat-list {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: 100% !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }
  .tvd-app .tvd-sec-cats .tvd-cat-list::-webkit-scrollbar { display: none; }
  .tvd-app .tvd-sec-cats .tvd-cat-item { flex: 0 0 auto !important; }
  /* Active pill: solid dark fill + white text. Specificity (0,4,0) is needed to
     beat the control-normalization rule `.tvd-app .tvd-cat-item.is-active`
     (0,3,0) that otherwise forces a light --ink-50 background. */
  .tvd-app .tvd-sec-cats .tvd-cat-item.is-active {
    background: var(--brand-700) !important;
    border-color: var(--brand-700) !important;
  }
  .tvd-app .tvd-sec-cats .tvd-cat-item.is-active .tvd-cat-name {
    color: #fff !important;
  }
  .tvd-app .tvd-sec-cats .tvd-cat-item.is-active .tvd-cat-swatch {
    box-shadow: 0 0 0 1.5px rgba(255,255,255,.7) !important;
  }

  /* Quick view (drawer) is a floating rounded card that opens WITHOUT covering
     the bottom menu — the region + category bars, list and AI button stay
     visible. It stops above the bottom control band so it never overlaps it. */
  .tvd-app .tvd-drawer {
    top: 12px !important;
    right: 12px !important;
    bottom: calc(var(--tds-mobile-bar-offset, 0px) + var(--tds-region-h) + var(--tds-cat-h) + 12px) !important;
    border-radius: var(--r-lg) !important;
    overflow: hidden !important;
  }
  /* Closed: translateX(100%) alone leaves a sliver peeking (the right:12px offset
     + scrollbar), and the left-side box-shadow bleeds back on-screen — push it
     well past the edge and drop the shadow so nothing shows. */
  .tvd-app .tvd-drawer:not(.is-open) {
    transform: translateX(calc(100% + 48px)) !important;
    box-shadow: none !important;
  }

  /* Escape back to the main map — top-left, over the Street View, only while
     the quick view is open. */
  .tvd-sv-back { display: none !important; }
  .tvd-app.is-drawer-open .tvd-sv-back {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    position: fixed !important;
    top: 14px !important;
    left: 14px !important;
    z-index: 60 !important;
    height: 40px !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: var(--r-pill) !important;
    background: rgba(255,255,255,.96) !important;
    color: var(--ink-800) !important;
    font-size: var(--text-sm) !important;
    font-weight: var(--weight-semibold) !important;
    box-shadow: var(--shadow-md) !important;
    cursor: pointer;
  }

  /* --- Result list: bottom sheet above the category layer (always shown) --- */
  .tvd-app .tvd-list-panel {
    position: fixed !important;
    left: 70px !important;   /* leave the bottom-left gutter clear for the AI FAB */
    right: 8px !important;
    top: auto !important;
    bottom: calc(var(--tds-mobile-bar-offset, 0px) + var(--tds-region-h) + var(--tds-cat-h) + 8px) !important;
    width: auto !important;
    height: auto !important;
    max-height: 40dvh !important;
    z-index: 58 !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: var(--r-lg) !important;
    box-shadow: 0 12px 40px rgba(15,30,50,.22) !important;
  }

  /* --- AI trigger (mobile): a circular "AI" button bottom-left with a white
     「不知怎查？」 hint pill connected right above it (enhances visibility + prompts
     the feature). Floats ABOVE both filter bars (region + service category) and the
     WoodMart nav. The list sheet is inset on the left to leave this gutter clear. --- */
  .tvd-ai-fab-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    position: fixed !important;
    left: 12px !important;
    bottom: calc(var(--tds-mobile-bar-offset, 0px) + var(--tds-region-h) + var(--tds-cat-h) + 12px) !important;
    z-index: 90 !important;
    pointer-events: none;   /* only the hint + button re-enable taps */
  }
  .tvd-ai-fab-hint {
    pointer-events: auto;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(15,30,50,.22);
    cursor: pointer;
  }
  .tvd-ai-fab {
    pointer-events: auto !important;
    display: inline-grid !important;
    place-items: center !important;
    position: static !important;   /* the wrap is the fixed element now */
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800)) !important;
    color: #fff !important;
    font-family: var(--font-en) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    letter-spacing: .04em !important;
    box-shadow: 0 6px 18px rgba(15,76,129,.48) !important;
  }
  .tvd-ai-fab:active { transform: scale(.94); }

  /* Desktop AI trigger: a pill as the FIRST item in the region bar (the floating
     circle overlapped the left-docked list card). Hidden on mobile (circular FAB).
     Scoped + !important per the anti-pollution guide. */
  .tvd-app .tvd-ai-pill {
    display: none !important;            /* shown at >=761px (rule below) */
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    height: 34px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: var(--r-pill) !important;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800)) !important;
    color: #fff !important;
    font-size: var(--text-sm) !important;
    font-weight: var(--weight-bold) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(15,76,129,.3) !important;
    cursor: pointer !important;
  }
  .tvd-app .tvd-ai-pill .tvd-icon { width: 14px !important; height: 14px !important; }

  /* Result pill floats over the top of the map. */
  .tvd-app .tvd-topbar {
    top: 12px !important;
    left: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    gap: 8px !important;
  }
  /* (2) Put 我想刊登 on the right with the topbar's own 12px inset as the gap, so it
     no longer sits flush against the screen edge (info pills stay on the left). */
  .tvd-app .tvd-topbar .tvd-list-cta { margin-left: auto !important; }
  /* The "· N 個分類" suffix has no room on a phone and overflows the topbar (desktop
     lets the pill auto-widen). The highlighted category chip already shows what's
     filtered, so drop the suffix here — the "共有 N 筆" count stays. */
  .tvd-app .tvd-result-extra { display: none !important; }
}

/* Desktop polish for the shared map-first layout (wider screens). */
@media (min-width: 761px) {
  /* The result list is a left-docked panel, not a full-width bottom sheet. */
  .tvd-app .tvd-list-panel {
    left: 12px !important;
    right: auto !important;
    width: 400px !important;
    max-height: 48dvh !important;
  }
  /* The top result pill stays compact on the left, not stretched full width. */
  .tvd-app .tvd-topbar { right: auto !important; }
  /* Desktop AI trigger = the region-bar pill; hide the floating circle (it overlapped
     the list card). */
  .tvd-app .tvd-ai-pill { display: inline-flex !important; }
  .tvd-ai-fab-wrap { display: none !important; }
}

/* ============================================================
   Unified close / icon buttons
   Design spec: square icon buttons, r-md radius, clear hover/active/focus.
   These selectors sit late in the file to neutralize theme button pollution and
   older one-off close styles across drawer, modals, pin cards and lightbox.
   ============================================================ */
.tvd-app .tvd-list-close,
.tvd-app .tvd-drawer-close,
.tvd-app .tvd-ai-modal__close,
.tvd-app .tvd-listing-modal__close,
.tvd-app .tvd-pin-card__close,
.tds-lightbox__close,
.tds-modal__close {
  --tds-icon-btn-size: 36px;
  -webkit-appearance: none !important;
  appearance: none !important;
  width: var(--tds-icon-btn-size) !important;
  height: var(--tds-icon-btn-size) !important;
  min-width: var(--tds-icon-btn-size) !important;
  min-height: var(--tds-icon-btn-size) !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: var(--r-md) !important;
  background: rgba(255, 255, 255, .94) !important;
  color: var(--ink-700) !important;
  box-shadow: var(--shadow-sm) !important;
  font: inherit !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition:
    background-color var(--duration-base, 150ms) var(--ease-out),
    border-color var(--duration-base, 150ms) var(--ease-out),
    color var(--duration-base, 150ms) var(--ease-out),
    box-shadow var(--duration-base, 150ms) var(--ease-out),
    transform var(--duration-fast, 120ms) var(--ease-out) !important;
}
.tvd-app .tvd-list-close:hover,
.tvd-app .tvd-drawer-close:hover,
.tvd-app .tvd-ai-modal__close:hover,
.tvd-app .tvd-listing-modal__close:hover,
.tvd-app .tvd-pin-card__close:hover,
.tds-lightbox__close:hover,
.tds-modal__close:hover {
  background: var(--brand-50) !important;
  border-color: var(--brand-300) !important;
  color: var(--brand-800) !important;
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-1px) !important;
}
.tvd-app .tvd-list-close:active,
.tvd-app .tvd-drawer-close:active,
.tvd-app .tvd-ai-modal__close:active,
.tvd-app .tvd-listing-modal__close:active,
.tvd-app .tvd-pin-card__close:active,
.tds-lightbox__close:active,
.tds-modal__close:active {
  transform: scale(.98) !important;
}
.tvd-app .tvd-list-close .tvd-icon,
.tvd-app .tvd-drawer-close .tvd-icon,
.tvd-app .tvd-ai-modal__close .tvd-icon,
.tvd-app .tvd-listing-modal__close .tvd-icon,
.tvd-app .tvd-pin-card__close .tvd-icon,
.tds-lightbox__close .tvd-icon,
.tds-modal__close .tvd-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 auto !important;
}
.tvd-app .tvd-pin-card__close {
  --tds-icon-btn-size: 32px;
}
.tvd-app .tvd-pin-card__body {
  padding-right: 40px !important;
}
.tds-lightbox__close {
  --tds-icon-btn-size: 44px;
  background: rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .22) !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28) !important;
}
.tds-lightbox__close:hover {
  background: rgba(255, 255, 255, .24) !important;
  border-color: rgba(255, 255, 255, .42) !important;
  color: #fff !important;
}
.tds-modal__close {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  z-index: 4 !important;
}
