:root {
  --teal-900: #5b1530;
  --teal-700: #d9294f;
  --teal-600: #be2445;
  --teal-500: #e44867;
  --teal-100: #f6d4dd;
  --teal-50: #fdf5f7;
  --cyan-600: #2d8fdd;
  --slate-600: #475569;
  --slate-200: #e2e8f0;
  --orange: #ea580c;
  --green: #059669;
  --green-dark: #166534;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(217, 41, 79, 0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--teal-900);
  background: linear-gradient(180deg, var(--teal-50) 0%, #fff 280px);
  min-height: 100vh;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

.site-header {
  background: linear-gradient(135deg, var(--teal-700) 0%, var(--cyan-600) 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.4);
}
.brand-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: #fff; padding: 4px; }
.brand h1 { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-sub { font-size: 0.7rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.08em; }
.header-nav { display: flex; align-items: center; gap: 20px; }
.header-nav a { color: #fff; text-decoration: none; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; opacity: 0.9; }
.header-nav a:hover { opacity: 1; }
.btn-login {
  background: #fff !important; color: var(--teal-700) !important;
  padding: 8px 20px !important; border-radius: 8px; opacity: 1 !important;
}

.search-section { padding: 28px 0 8px; }
.search-panel {
  background: #fff; border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); border: 1px solid var(--teal-100);
}
.search-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.search-row-dates {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  margin-bottom: 0;
}
.search-row-dates .search-actions { padding-bottom: 1px; white-space: nowrap; }
.field label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--slate-600); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--slate-200);
  border-radius: 10px; font-size: 0.95rem; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus,
.field .date-display:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}
.field .flatpickr-wrapper { display: block; width: 100%; position: relative; }
.field .flatpickr-wrapper::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0.55;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314b8a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
.field input[type="date"] { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.field .date-display {
  width: 100%; padding: 11px 40px 11px 14px; border: 1px solid var(--slate-200);
  border-radius: 10px; font-size: 0.95rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s; background: #fff; cursor: pointer;
}
.field .date-display::placeholder { color: #94a3b8; }
.search-actions { display: flex; align-items: flex-end; gap: 10px; }
.btn-search {
  background: linear-gradient(135deg, #d9294f, #1d4f91);
  color: #fff; border: none; padding: 12px 28px; border-radius: 10px;
  font-weight: 600; cursor: pointer; font-size: 0.9rem;
}
.btn-reset {
  background: #fff; color: var(--teal-700); border: 1px solid var(--teal-500);
  padding: 12px 24px; border-radius: 10px; font-weight: 600; cursor: pointer;
}

.dest-tabs {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-bottom: 8px;
  align-items: center;
}
.dest-pill {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--slate-200);
  background: #fff; color: var(--teal-900); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: all .2s;
}
.dest-pill:not([data-code]):hover { border-color: var(--teal-500); color: var(--teal-600); }
.dest-pill.active:not([data-code]) {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal-700), var(--cyan-600));
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.35);
}

.dest-tabs-divider {
  width: 1px;
  height: 26px;
  margin: 0 2px;
  background: linear-gradient(180deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
  flex-shrink: 0;
}
.tag-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: #fff;
  color: var(--slate-600);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.tag-filter-pill[hidden],
.dest-tabs-divider[hidden] {
  display: none !important;
}
.tag-filter-pill svg { flex-shrink: 0; opacity: 0.85; }

/* Special Promotion — ribbon banner (filter tab only) */
.tag-filter-promo {
  position: relative;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
  margin: 2px 0 0 4px;
}
.tag-filter-promo .promo-ribbon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px 14px 5px 22px;
  background: linear-gradient(135deg, #ff1a5c 0%, #e8004a 55%, #d40045 100%);
  color: #fff;
  transform: rotate(-4deg);
  transform-origin: center center;
  box-shadow: 0 4px 14px rgba(232, 0, 74, 0.38), 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform .2s, box-shadow .2s, filter .2s;
  cursor: pointer;
}
.tag-filter-promo .promo-ribbon::before {
  content: '';
  position: absolute;
  top: -4px;
  right: 6px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 4px 5px 4px;
  border-color: transparent transparent #ff6b93 transparent;
  transform: rotate(35deg);
  pointer-events: none;
}
.tag-filter-promo .promo-ribbon__megaphone {
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%) rotate(6deg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}
.tag-filter-promo .promo-ribbon__megaphone svg { opacity: 1; }
.tag-filter-promo .promo-ribbon__burst {
  position: absolute;
  left: -14px;
  top: -5px;
  width: 10px;
  height: 10px;
  pointer-events: none;
}
.tag-filter-promo .promo-ribbon__burst::before,
.tag-filter-promo .promo-ribbon__burst::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}
.tag-filter-promo .promo-ribbon__burst::before {
  top: 0;
  left: 2px;
  border-width: 0 4px 6px 4px;
  border-color: transparent transparent #ff4d7d transparent;
  transform: rotate(-25deg);
}
.tag-filter-promo .promo-ribbon__burst::after {
  top: 2px;
  left: 6px;
  border-width: 0 3px 5px 3px;
  border-color: transparent transparent #ff6b93 transparent;
  transform: rotate(15deg);
}
.tag-filter-promo .promo-ribbon__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.tag-filter-promo .promo-ribbon__line1 {
  font-size: 0.52rem;
  font-weight: 800;
  text-transform: uppercase;
  opacity: 0.95;
}
.tag-filter-promo .promo-ribbon__line2 {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1px;
}
.tag-filter-promo .promo-ribbon__fold {
  position: absolute;
  right: -7px;
  bottom: -1px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 9px 9px;
  border-color: transparent transparent #a80038 transparent;
  filter: brightness(0.85);
}
.tag-filter-promo:hover .promo-ribbon {
  transform: rotate(-4deg) scale(1.04);
  box-shadow: 0 6px 18px rgba(232, 0, 74, 0.45), 0 2px 4px rgba(0, 0, 0, 0.14);
  filter: brightness(1.06);
}
.tag-filter-promo.active .promo-ribbon {
  transform: rotate(-4deg) scale(1.06);
  box-shadow: 0 0 0 3px rgba(255, 26, 92, 0.35), 0 6px 20px rgba(232, 0, 74, 0.5);
  filter: brightness(1.1);
}
.tag-filter-promo.active .promo-ribbon__line1,
.tag-filter-promo.active .promo-ribbon__line2 {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tag-filter-adjust:hover {
  border-color: #8b5cf6;
  color: #6d28d9;
  background: #f5f3ff;
}
.tag-filter-adjust.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.32);
}

.city-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 0 4px;
  border-top: 1px dashed var(--slate-200);
  align-items: center;
}
.city-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: #fff;
  color: var(--slate-600);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.city-pill:hover {
  border-color: #e44867;
  color: #9f1239;
  background: #fff8fa;
}
.city-pill.active {
  border-color: #e44867;
  color: #9f1239;
  background: linear-gradient(135deg, #fff5f7 0%, #fff 100%);
  box-shadow: 0 2px 8px rgba(217, 41, 79, 0.12);
}

.results-section { padding: 24px 0 48px; }

.reserve-sign {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--teal-100);
  overflow: hidden;
  position: relative;
}
.reserve-sign::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--teal-700) 0%, var(--cyan-600) 100%);
}
.reserve-sign-marker {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  margin-left: 5px;
  background: linear-gradient(135deg, #fff5f7 0%, #eff6ff 100%);
  border-right: 1px solid var(--teal-100);
  color: var(--teal-700);
}
.reserve-sign-marker svg {
  width: 28px;
  height: 28px;
  opacity: 0.9;
}
.reserve-sign-body {
  flex: 1;
  padding: 18px 22px 20px;
  min-width: 0;
}
.reserve-sign-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-700);
  margin-bottom: 8px;
}
.reserve-sign-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--slate-600);
  margin-bottom: 14px;
  max-width: 640px;
}
.reserve-sign-desc strong {
  color: var(--teal-900);
  font-weight: 700;
}
.reserve-sign-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.reserve-sign-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform .15s, box-shadow .2s, opacity .2s;
}
.reserve-sign-action svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.95;
}
.reserve-sign-action--email {
  background: linear-gradient(135deg, var(--teal-700) 0%, var(--cyan-600) 100%);
  box-shadow: 0 4px 14px rgba(217, 41, 79, 0.28);
}
.reserve-sign-action--email:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(217, 41, 79, 0.35);
  opacity: 0.96;
}
.reserve-sign-action--facebook {
  background: linear-gradient(135deg, #1877f2 0%, #0d5dc7 100%);
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.28);
}
.reserve-sign-action--facebook:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(24, 119, 242, 0.38);
  opacity: 0.96;
}

@media (max-width: 600px) {
  .reserve-sign { flex-direction: column; }
  .reserve-sign-marker {
    width: 100%;
    margin-left: 0;
    padding: 14px;
    border-right: none;
    border-bottom: 1px solid var(--teal-100);
  }
  .reserve-sign-body { padding: 16px 18px 18px; }
  .reserve-sign-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .reserve-sign-action {
    width: 100%;
    justify-content: center;
    font-size: 0.82rem;
  }
  .reserve-sign-action--email {
    word-break: break-all;
  }
}
/* ── Tour card list ── */
.results-card {
  background: transparent;
  border: none;
  box-shadow: none;
}
.tour-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tour-card {
  --card-left-w: 92px;
  --card-right-w: 118px;
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0e4e8;
  box-shadow: 0 1px 6px rgba(91, 21, 48, 0.04);
  overflow: hidden;
  position: relative;
  transition: box-shadow .2s, border-color .2s;
  min-width: 0;
}
.tour-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--teal-700), var(--cyan-600));
  opacity: 0;
  transition: opacity .2s;
}
.tour-card:hover {
  box-shadow: 0 6px 20px rgba(217, 41, 79, 0.09);
  border-color: #f5c2cd;
}
.tour-card:hover::before { opacity: 1; }
.tour-card-hot {
  border-color: #f9a8b4;
  background: linear-gradient(90deg, #fff8fa 0%, #fff 40%);
}
.tour-card-hot::before { opacity: 1; }

/* Left — date & city */
.tour-card-left {
  width: var(--card-left-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 10px;
  background: #faf8f9;
  border-right: 1px solid #f1f5f9;
}
.tour-card-hot .tour-card-left {
  background: linear-gradient(180deg, #fff0f3 0%, #faf8f9 100%);
}
.card-date-wrap { text-align: center; }
.card-date {
  display: block;
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.3;
  color: var(--teal-700);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.card-city {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--teal-900);
  background: #fff;
  border: 1px solid #e2e8f0;
}

/* Mid — 信息靠左，价格在剩余区域自适应居中 */
.tour-card-mid {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0;
}
.tour-card-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 14px 16px 14px 18px;
  min-width: 0;
  flex: 1 1 0;
  max-width: 100%;
}
.tour-card.has-price-zone .tour-card-info {
  flex: 0 1 auto;
  max-width: min(42%, 340px);
}
.tour-card.no-price-zone .tour-card-info {
  max-width: 100%;
}
.tour-card-title {
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--teal-900);
  margin: 0;
  overflow-wrap: anywhere;
}

/* Price — 两栏：主价+分级价 | 定金/佣金 */
.tour-card-price {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px clamp(6px, 1vw, 12px);
  z-index: 1;
}
.card-price-board {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: fit-content;
  max-width: 100%;
}
.card-price-vdivider {
  width: 1px;
  align-self: stretch;
  background: #e2e8f0;
  margin: 4px 16px;
  flex-shrink: 0;
}
.card-price-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.card-price-col--rates {
  align-items: center;
  text-align: center;
  padding: 0 4px;
  gap: 6px;
  min-width: 120px;
  max-width: 200px;
}
.card-price-kids-fold {
  width: 100%;
  margin-top: 1px;
}
.card-price-kids-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 2px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: clamp(0.58rem, 0.92vw, 0.64rem);
  font-weight: 700;
  color: #5b7a9a;
  letter-spacing: 0.02em;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.15s, background 0.15s;
}
.card-price-kids-toggle::-webkit-details-marker,
.card-price-kids-toggle::marker {
  display: none;
}
.card-price-kids-toggle::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4.5px solid #94a3b8;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.card-price-kids-fold[open] .card-price-kids-toggle::after {
  transform: rotate(180deg);
}
.card-price-kids-toggle:hover {
  color: #3a86c8;
  background: #f1f5f9;
}
.card-price-kids-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px dashed #e8edf3;
}
.card-price-alt-rows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}
.card-price-alt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 3px;
  line-height: 1.3;
  max-width: 100%;
}
.card-price-alt-amt {
  font-size: clamp(0.58rem, 0.95vw, 0.64rem);
  font-weight: 700;
  white-space: nowrap;
}
.card-price-alt-amt .card-price-num {
  color: #b22234;
  font-weight: 700;
}
.card-price-alt-sep {
  font-size: clamp(0.56rem, 0.9vw, 0.62rem);
  color: #94a3b8;
  font-weight: 500;
}
.card-price-alt-lbl {
  font-size: clamp(0.54rem, 0.88vw, 0.6rem);
  font-weight: 600;
  color: #64748b;
  line-height: 1.25;
}
.card-price-col--meta {
  align-items: center;
  padding: 0 2px;
  min-width: 108px;
}
.card-price-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.card-price-tier-amt {
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.card-price-tier--hero .card-price-tier-amt {
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
}
.card-price-col--rates .card-price-tier--hero {
  margin-bottom: 2px;
}
.card-price-col--rates .card-price-tier-lbl {
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}
.card-price-tier-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.25;
  max-width: 130px;
}
.tour-card-price.is-empty {
  flex: 0 0 0;
  visibility: hidden;
  padding: 0;
  width: 0;
  min-width: 0;
  overflow: hidden;
}

/* Tour labels — promotion / adjustment (matches admin form style) */
.tour-tag-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.tour-tag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  cursor: default;
}
.tour-tag-icon--promo {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.32);
}
.tour-tag-icon--adjust {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.32);
}
.tour-tag-notices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}
.tour-tag-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
}
.tour-tag-notice-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.tour-tag-notice-body {
  min-width: 0;
  flex: 1;
}
.tour-tag-notice-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.tour-tag-notice-text {
  margin: 3px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #475569;
  overflow-wrap: anywhere;
}
.tour-tag-notice--promo {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  border: 1px solid #fde68a;
}
.tour-tag-notice--promo .tour-tag-notice-icon {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.24);
}
.tour-tag-notice--promo .tour-tag-notice-label { color: #c2410c; }
.tour-tag-notice--adjust {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1px solid #ddd6fe;
}
.tour-tag-notice--adjust .tour-tag-notice-icon {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.24);
}
.tour-tag-notice--adjust .tour-tag-notice-label { color: #6d28d9; }
.tour-card.has-promo::before,
.tour-card.has-adjust::before { opacity: 1; }
.tour-card.has-promo.has-adjust::before {
  background: linear-gradient(180deg, #f59e0b, #8b5cf6);
}
.tour-card.has-promo:not(.has-adjust)::before {
  background: linear-gradient(180deg, #f59e0b, #ea580c);
}
.tour-card.has-adjust:not(.has-promo)::before {
  background: linear-gradient(180deg, #8b5cf6, #7c3aed);
}
.tour-card.has-promo,
.tour-card.has-adjust {
  border-color: #f0e4f8;
}
.tour-card.has-promo .tour-card-left {
  background: linear-gradient(180deg, #fffbeb 0%, #faf8f9 100%);
}
.tour-card.has-adjust:not(.has-promo) .tour-card-left {
  background: linear-gradient(180deg, #f5f3ff 0%, #faf8f9 100%);
}

/* Right — slots & actions */
.tour-card-right {
  width: var(--card-right-w);
  min-width: var(--card-right-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  background: #fafbfc;
  border-left: 1px solid #f1f5f9;
}
.tour-card-right.is-empty {
  visibility: hidden;
}
.tour-card-hot .tour-card-right {
  background: linear-gradient(180deg, #fff5f7 0%, #fafbfc 100%);
}

/* Slots indicator */
.card-slots {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 8px;
  border-radius: 10px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.card-slots-num {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.card-slots-lbl {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
}
.card-slots.slots-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.card-slots.slots-zero {
  background: #fff7ed;
  color: var(--orange);
  border: 1px solid #fed7aa;
}
.card-slots.slots-overflow {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}
.card-slots-full-text {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* Meta chips — 新增字段只进此区，不影响分区 */
.tour-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  max-width: 100%;
}
.tour-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tour-chip em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.tour-chip-code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #475569;
  background: #fff;
}
.tour-chip-dest {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  font-weight: 600;
}
.tour-chip-airline svg { opacity: 0.65; flex-shrink: 0; }
.tour-chip-img {
  padding: 2px;
  border-radius: 8px;
  overflow: hidden;
}
.tour-chip-img img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.tour-card-price .card-price-currency {
  color: #1b7d54;
  font-weight: 800;
}
.tour-card-price .card-price-tier-amt .card-price-num,
.tour-card-price .card-price-tier--hero .card-price-tier-amt .card-price-num {
  color: #4a5568;
  font-weight: 800;
}
.tour-card-price .card-price-tier--hero .card-price-tier-amt .card-price-num {
  color: #b22234;
}
.tour-card-price .card-price-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}
.tour-card-price .card-price-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  white-space: nowrap;
}
.tour-card-price .card-price-sub-label {
  font-size: clamp(0.7rem, 1.1vw, 0.76rem);
  font-weight: 700;
  color: #3a86c8;
}
.tour-card-price .card-price-sub-amt {
  font-size: clamp(0.74rem, 1.3vw, 0.8rem);
  font-weight: 700;
}
.tour-card-price .card-price-sub-amt .card-price-num {
  color: #3a86c8;
}
.tour-card-price .card-price-sub--commission .card-price-sub-label,
.tour-card-price .card-price-sub--commission .card-price-sub-amt,
.tour-card-price .card-price-sub--commission .card-price-sub-amt .card-price-num {
  color: #1b7d54;
}
.tour-card-price .card-price-note {
  flex: 1 1 100%;
  font-size: 0.72rem;
  color: #94a3b8;
  font-style: italic;
  text-align: center;
  margin-top: 2px;
  white-space: normal;
  max-width: 320px;
}

.tour-card-end {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  flex-shrink: 0;
  width: 100%;
}
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  width: 100%;
}
.card-actions a,
.btn-flyer,
.btn-itinerary {
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity .15s;
  cursor: pointer;
  border: none;
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}
.card-actions a:hover,
.btn-flyer:hover,
.btn-itinerary:hover {
  opacity: 0.85;
}
.btn-flyer { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.btn-itinerary { background: var(--teal-700); color: #fff; border: 1px solid var(--teal-600); }

.cell-empty { color: #cbd5e1; font-size: 0.85rem; font-weight: 400; }

.results-loading { text-align: center; padding: 40px; color: var(--slate-600); }
.results-card .empty-state {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--teal-100);
  box-shadow: var(--shadow);
}
.empty-state { text-align: center; padding: 48px 32px; color: var(--slate-600); }
.results-card .load-more-wrap {
  margin-top: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--teal-100);
  box-shadow: var(--shadow);
}
.empty-title { font-size: 1.1rem; font-weight: 600; color: var(--teal-900); margin-bottom: 10px; }
.empty-desc { font-size: 0.92rem; line-height: 1.65; max-width: 480px; margin: 0 auto 18px; }
.empty-contact-link {
  display: inline-block; padding: 10px 24px; border-radius: 10px;
  background: var(--teal-700); color: #fff; font-weight: 600;
  font-size: 0.9rem; text-decoration: none; transition: opacity .2s;
}
.empty-contact-link:hover { opacity: 0.9; }
.load-error {
  margin: 12px 0; padding: 12px 16px; border-radius: 10px;
  background: #fff1f2; color: #be123c; border: 1px solid #fecdd3;
  font-size: 0.9rem;
}
.load-more-wrap {
  padding: 20px 16px 24px;
  text-align: center;
  border-top: 1px solid var(--slate-200);
  background: linear-gradient(180deg, #fff, var(--teal-50));
}
.load-more-spinner {
  width: 28px; height: 28px; margin: 0 auto 10px;
  border: 3px solid var(--teal-100);
  border-top-color: var(--teal-700);
  border-radius: 50%;
  animation: fe-spin 0.75s linear infinite;
}
.load-more-spinner[hidden] { display: none; }
.load-more-meta {
  margin: 0; font-size: 0.82rem; color: var(--slate-600);
}
.load-sentinel {
  width: 100%; height: 1px;
  pointer-events: none;
}
@keyframes fe-spin { to { transform: rotate(360deg); } }

.site-footer {
  text-align: center; padding: 24px; font-size: 0.8rem; color: var(--slate-600);
  border-top: 1px solid var(--slate-200); margin-top: auto;
}

@media (max-width: 1100px) {
  .tour-card.has-price-zone .tour-card-info {
    max-width: min(36%, 280px);
  }
}
@media (max-width: 900px) {
  .header-nav { width: 100%; justify-content: flex-end; }
  .btn-login { display: none; }

  /* Tour card — stack on tablet / mobile */
  .tour-card {
    flex-direction: column;
    --card-left-w: auto;
    --card-right-w: auto;
    border-radius: 14px;
  }
  .tour-card-left {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-right: none;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
  }
  .card-date { font-size: 0.9rem; }
  .tour-card-mid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .tour-card-info,
  .tour-card.no-price-zone .tour-card-info,
  .tour-card.has-price-zone .tour-card-info {
    flex: 1 1 auto;
    max-width: 100%;
    padding: 16px 16px 10px;
    border-bottom: none;
  }
  .tour-card-title {
    font-size: 0.95rem;
    line-height: 1.45;
  }
  .tour-card-chips {
    gap: 7px;
    margin-top: 2px;
  }
  .tour-chip {
    padding: 4px 10px;
    font-size: 0.76rem;
  }
  .tour-card-price,
  .tour-card-price.is-empty {
    flex: 1 1 auto;
    visibility: visible;
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
    align-items: center;
  }
  .tour-card.no-price-zone .tour-card-price {
    display: none;
  }
  .card-price-board {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 14px;
  }
  .card-price-vdivider {
    display: none;
  }
  .card-price-col--rates,
  .card-price-col--meta {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    flex: none;
    align-items: center;
  }
  .card-price-col--rates {
    gap: 8px;
    padding: 0;
  }
  .card-price-col--meta {
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    gap: 8px;
  }
  .tour-card-price .card-price-tier-amt {
    font-size: 0.92rem;
  }
  .tour-card-price .card-price-tier--hero .card-price-tier-amt {
    font-size: 1.08rem;
  }
  .tour-card-price .card-price-meta {
    gap: 8px;
  }
  .tour-card-price .card-price-sub {
    flex-wrap: wrap;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
  .tour-card-price .card-price-note {
    max-width: 100%;
    margin-top: 4px;
  }
  .tour-tag-notices {
    margin-top: 4px;
  }
  .tour-tag-notice {
    padding: 10px 12px;
  }
  .tour-card-right,
  .tour-card-right.is-empty {
    visibility: visible;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px 16px;
    border-left: none;
    border-top: none;
    background: #f8fafc;
  }
  .tour-card.no-right-data .tour-card-right {
    display: none;
  }
  .card-slots {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }
  .card-slots-full-text { font-size: 0.82rem; }
  .tour-card-end {
    flex: none;
    width: 100%;
    min-width: 0;
  }
  .tour-card-right .card-actions {
    flex-direction: row;
    gap: 10px;
    width: 100%;
  }
  .tour-card-right .card-actions a,
  .tour-card-right .btn-flyer,
  .tour-card-right .btn-itinerary {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    font-size: 0.78rem;
  }
}

@media (max-width: 600px) {
  .container { padding: 0 14px; }
  .header-inner { padding: 12px 14px; gap: 10px; }
  .brand { gap: 10px; min-width: 0; }
  .brand h1 { font-size: 1rem; }
  .brand-sub { font-size: 0.62rem; }
  .brand-logo, .brand-icon { width: 44px; height: 44px; }
  .header-nav { gap: 14px; }
  .header-nav a { font-size: 0.75rem; }

  .search-section { padding: 16px 0 4px; }
  .search-panel { padding: 16px; border-radius: 12px; }
  .search-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }
  .search-row:last-child { margin-bottom: 0; }
  .field input, .field select, .field .date-display {
    padding: 12px 14px;
    font-size: 16px;
  }
  .search-actions {
    flex-direction: row;
    width: 100%;
    gap: 8px;
    padding-top: 4px;
  }
  .btn-search, .btn-reset {
    flex: 1;
    width: auto;
    padding: 13px 16px;
    min-height: 46px;
  }

  .dest-tabs, .city-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    margin-top: 14px;
    padding-bottom: 10px;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .dest-tabs::-webkit-scrollbar,
  .city-tabs::-webkit-scrollbar { display: none; }
  .dest-pill, .city-pill, .tag-filter-pill { flex-shrink: 0; }
  .dest-pill:not([data-code]) { font-size: 0.72rem; padding: 7px 13px; }
  .tag-filter-pill:not(.tag-filter-promo) { font-size: 0.7rem; padding: 7px 12px; }
  .tag-filter-promo .promo-ribbon { padding: 4px 11px 4px 18px; }
  .tag-filter-promo .promo-ribbon__line1 { font-size: 0.46rem; }
  .tag-filter-promo .promo-ribbon__line2 { font-size: 0.68rem; }
  .tag-filter-promo .promo-ribbon__megaphone svg { width: 15px; height: 15px; }
  .dest-tabs-divider { display: none; }
  .city-pill { font-size: 0.7rem; padding: 6px 12px; }

  .results-section { padding: 16px 0 36px; }
  .reserve-sign { margin-bottom: 14px; border-radius: 12px; }
  .tour-list { gap: 16px; }
  .tour-card-left { padding: 14px 16px; }
  .tour-card-info,
  .tour-card.no-price-zone .tour-card-info,
  .tour-card.has-price-zone .tour-card-info {
    padding: 16px 16px 12px;
  }
  .tour-card-title { font-size: 1rem; line-height: 1.45; }
  .tour-card-chips { gap: 8px; }
  .tour-card-price { padding: 16px; }
  .tour-card-right { padding: 14px 16px 16px; gap: 14px; }
  .card-price-board { gap: 16px; }
  .card-price-col--meta { padding-top: 16px; }
  .empty-state { padding: 36px 20px; }
  .empty-title { font-size: 1rem; }
  .empty-desc { font-size: 0.88rem; }
  .load-more-wrap { padding: 16px 12px 20px; }
  .site-footer { padding: 20px 14px; font-size: 0.75rem; }

  .contact-main { padding: 20px 0 36px; }
  .contact-info-card, .contact-form-card { padding: 18px 16px; border-radius: 12px; }
  .section-heading { font-size: 1.15rem; margin-bottom: 16px; }
  .form-actions { justify-content: stretch; }
  .btn-send { width: 100%; min-height: 46px; }
}

@media (max-width: 400px) {
  .container { padding: 0 12px; }
  .tour-list { gap: 14px; }
  .tour-card-info,
  .tour-card.no-price-zone .tour-card-info,
  .tour-card.has-price-zone .tour-card-info {
    padding: 14px 14px 10px;
  }
  .tour-card-title { font-size: 0.94rem; }
  .tour-card-price { padding: 14px; }
  .tour-card-right { padding: 12px 14px 14px; }
  .card-slots-num { font-size: 0.95rem; }
  .card-slots-lbl { font-size: 0.64rem; }
  .tour-card-right .card-actions {
    flex-direction: column;
    gap: 8px;
  }
  .tour-card-right .card-actions a,
  .tour-card-right .btn-flyer,
  .tour-card-right .btn-itinerary {
    min-height: 44px;
    font-size: 0.8rem;
  }
  .card-price-tier-lbl { font-size: 0.62rem; }
  .tour-card-price .card-price-sub-amt { font-size: 0.86rem; }
}

/* Contact / About page */
.contact-page { display: flex; flex-direction: column; min-height: 100vh; }
.header-nav a.nav-active { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.contact-main { padding: 32px 20px 48px; flex: 1; }
.section-heading {
  font-size: 1.35rem; font-weight: 700; color: var(--teal-900);
  margin-bottom: 20px; letter-spacing: 0.01em;
}
.contact-content { color: var(--slate-600); font-size: 0.92rem; line-height: 1.7; }
.contact-content h3 {
  font-size: 1rem; font-weight: 700; color: var(--teal-900);
  margin: 22px 0 10px; letter-spacing: 0.01em;
}
.contact-content h3:first-child { margin-top: 0; }
.contact-content p { margin-bottom: 10px; }
.contact-content ul { list-style: disc; padding-left: 20px; margin-bottom: 14px; }
.contact-content li { margin-bottom: 6px; }
.contact-content a { color: var(--cyan-600); text-decoration: none; }
.contact-content a:hover { text-decoration: underline; }
.contact-content em { color: var(--slate-500); font-style: normal; font-size: 0.88rem; }
.contact-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start;
}
.contact-info-card, .contact-form-card {
  background: #fff; border-radius: var(--radius); padding: 28px 32px;
  box-shadow: var(--shadow); border: 1px solid var(--teal-100);
}
.contact-form .field { margin-bottom: 18px; }
.contact-form .field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--slate-600); margin-bottom: 8px; }
.contact-form .req { color: var(--teal-700); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--slate-200);
  border-radius: 10px; font-size: 0.95rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(217, 41, 79, 0.15);
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.btn-send {
  background: var(--green); color: #fff; border: none;
  padding: 12px 36px; border-radius: 10px; font-weight: 600;
  font-size: 0.95rem; cursor: pointer; transition: opacity .2s;
}
.btn-send:hover { opacity: 0.9; }
.btn-send:disabled { opacity: 0.6; cursor: not-allowed; }
.form-msg { margin-top: 16px; padding: 12px 16px; border-radius: 10px; font-size: 0.9rem; }
.form-msg-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.form-msg-err { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info-card, .contact-form-card { padding: 22px 20px; }
}

/* All Flyers page */
.flyers-page { display: flex; flex-direction: column; min-height: 100vh; }
.flyers-main { padding: 32px 20px 48px; flex: 1; }
.flyers-head { margin-bottom: 24px; }
.flyers-head-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.flyers-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.flyers-sub { color: var(--slate-500); font-size: 0.92rem; margin-top: 6px; max-width: 52ch; }
.flyers-layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start;
}
.flyers-sidebar, .flyers-content {
  background: #fff; border-radius: 14px; padding: 20px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06); border: 1px solid var(--teal-100);
}
.flyers-sidebar-title {
  font-size: 0.82rem; font-weight: 700; color: var(--slate-500);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px;
}
.flyers-sidebar-hint {
  font-size: 0.78rem; color: var(--slate-400); margin: 0 0 14px; line-height: 1.45;
}
.flyers-folder-list { display: flex; flex-direction: column; gap: 10px; }
.flyers-folder-all {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid var(--slate-200); background: #fff; border-radius: 10px;
  padding: 11px 14px; cursor: pointer; text-align: left;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.flyers-folder-all:hover { background: #f8fafc; border-color: #cbd5e1; }
.flyers-folder-all.is-active {
  background: rgba(217, 41, 79, 0.07); border-color: rgba(217, 41, 79, 0.28);
  box-shadow: 0 0 0 1px rgba(217, 41, 79, 0.06);
}
.flyers-folder-group {
  border: 1px solid var(--slate-200); border-radius: 12px; background: #fff;
  overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease;
}
.flyers-folder-group.is-active {
  border-color: rgba(217, 41, 79, 0.28);
  box-shadow: 0 2px 8px rgba(217, 41, 79, 0.06);
}
.flyers-folder-group-header {
  padding: 4px 8px 4px 2px;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  border-bottom: 1px solid transparent;
}
.flyers-folder-group:not(.is-expanded) .flyers-folder-group-header { border-bottom: none; }
.flyers-folder-group.is-expanded > .flyers-folder-group-header { border-bottom-color: #f1f5f9; }
.flyers-folder-group.is-expanded.is-active > .flyers-folder-group-header { border-bottom-color: rgba(217, 41, 79, 0.12); }
.flyers-folder-group-header.is-active {
  background: linear-gradient(180deg, rgba(217, 41, 79, 0.06) 0%, rgba(217, 41, 79, 0.02) 100%);
}
.flyers-folder-row {
  display: flex; align-items: center; gap: 2px; min-width: 0; border-radius: 8px;
}
.flyers-folder-row.is-sub {
  padding: 5px 4px 5px 0; transition: background .12s ease;
}
.flyers-folder-row.is-sub .flyers-folder-item {
  flex: 1; min-width: 0; gap: 6px; padding: 2px 4px 2px 0;
}
.flyers-folder-row.is-sub .flyers-folder-count {
  flex-shrink: 0; margin-right: 2px;
}
.flyers-folder-row.is-sub:hover { background: #f8fafc; }
.flyers-folder-subtree.is-active > .flyers-folder-row.is-sub {
  background: rgba(217, 41, 79, 0.08);
}
.flyers-folder-toggle-spacer {
  flex-shrink: 0; width: 22px; height: 22px;
}
.flyers-folder-toggle {
  flex-shrink: 0; width: 22px; height: 22px; padding: 0;
  border: none; background: transparent; border-radius: 6px;
  color: #94a3b8; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
  transition: color .12s ease, background .12s ease;
}
.flyers-folder-toggle:hover { color: #64748b; background: #f1f5f9; }
.flyers-folder-toggle.is-expanded { color: var(--teal-700); }
.flyers-folder-toggle-svg {
  width: 14px; height: 14px; display: block;
  transition: transform .18s ease;
}
.flyers-folder-toggle.is-expanded .flyers-folder-toggle-svg { transform: rotate(90deg); }
.flyers-folder-children.is-collapsed { display: none; }
.flyers-folder-check {
  flex-shrink: 0; display: flex; align-items: center; padding: 8px 0 8px 8px; cursor: pointer;
}
.flyers-folder-check input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--teal-700); }
.flyers-folder-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex: 1; min-width: 0; border: none; background: transparent; text-align: left;
  padding: 8px 10px 8px 0; border-radius: 8px; cursor: pointer; transition: background .15s;
}
.flyers-folder-item:hover { background: rgba(248, 250, 252, 0.8); }
.flyers-folder-group-header.is-active .flyers-folder-item:hover { background: transparent; }
.flyers-folder-icon {
  flex-shrink: 0; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--teal-700);
}
.flyers-folder-icon--sub { color: #64748b; width: 16px; height: 16px; }
.flyers-folder-icon--all { color: #64748b; }
.flyers-folder-icon-svg { width: 100%; height: 100%; display: block; }
.flyers-folder-name {
  flex: 1; min-width: 0; font-size: 0.9rem; color: var(--slate-700); font-weight: 700;
  line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.flyers-folder-all .flyers-folder-name { font-weight: 600; color: #334155; }
.flyers-folder-row.is-sub .flyers-folder-name {
  font-size: 0.84rem; font-weight: 500; color: #475569;
}
.flyers-folder-count {
  flex-shrink: 0; min-width: 24px; padding: 2px 8px; border-radius: 999px;
  background: #f1f5f9; color: #64748b; font-size: 0.75rem; font-weight: 600; text-align: center;
}
.flyers-folder-group-header.is-active .flyers-folder-count {
  background: rgba(217, 41, 79, 0.1); color: #be123c;
}
.flyers-folder-row.is-sub .flyers-folder-count {
  background: #eef2f6; color: #94a3b8; font-size: 0.7rem; font-weight: 500;
}
.flyers-folder-children {
  padding: 4px 10px 10px; background: #fcfdfe;
  animation: flyers-folder-expand .18s ease;
}
@keyframes flyers-folder-expand {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.flyers-folder-children-label {
  font-size: 0.68rem; color: #94a3b8; font-weight: 600;
  padding: 2px 6px 6px 36px; letter-spacing: 0.02em;
}
.flyers-folder-children--nested {
  margin: 2px 0 4px 14px; padding: 2px 0 4px 8px;
  border-left: 2px solid #e8edf3; background: transparent;
}
.flyers-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--slate-100);
}
.flyers-head-actions .btn,
.flyers-toolbar .btn {
  padding: 8px 14px; border-radius: 8px; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--slate-200); background: #fff; color: var(--slate-700);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.flyers-head-actions .btn-primary {
  background: var(--teal-700); color: #fff; border-color: var(--teal-700);
}
.flyers-head-actions .btn:disabled,
.flyers-toolbar .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.flyers-head-actions .btn:not(:disabled):hover,
.flyers-toolbar .btn:not(:disabled):hover { border-color: var(--teal-500); color: var(--teal-700); }
.flyers-stats { font-size: 0.9rem; color: var(--slate-600); line-height: 1.5; }
.flyers-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px;
  min-height: 160px;
}
.flyers-card {
  border: 1px solid var(--slate-200); border-radius: 14px; overflow: hidden;
  background: #fff; display: flex; flex-direction: column;
  transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}
.flyers-card:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  transform: translateY(-3px);
  border-color: rgba(13, 148, 136, 0.25);
}
.flyers-card-thumb {
  display: block; position: relative; aspect-ratio: 3/4;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); overflow: hidden;
}
.flyers-card-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.flyers-card:hover .flyers-card-thumb img { transform: scale(1.03); }
.flyers-card-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, 0.55) 100%);
  opacity: 0; transition: opacity .22s ease;
}
.flyers-card:hover .flyers-card-overlay { opacity: 1; }
.flyers-card-download-btn {
  padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--slate-800);
  font-size: 0.78rem; font-weight: 700; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}
.flyers-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.flyers-card-name {
  font-size: 0.84rem; font-weight: 600; color: var(--slate-700);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.flyers-card-folder {
  display: inline-flex; align-self: flex-start; font-size: 0.72rem; color: var(--teal-700);
  background: rgba(13, 148, 136, 0.08); padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.btn-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: auto; padding: 8px 14px; border-radius: 8px; font-size: 0.8rem; font-weight: 600;
  text-decoration: none; background: var(--teal-700); color: #fff;
  transition: background .15s ease, transform .15s ease;
}
.btn-download svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-download:hover { background: #0f766e; transform: translateY(-1px); }
.flyers-empty {
  grid-column: 1 / -1; text-align: center; padding: 56px 20px; color: var(--slate-500);
}
.flyers-empty-icon {
  display: block; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  position: relative;
}
.flyers-empty-icon::after {
  content: ''; position: absolute; inset: 12px;
  border: 2px dashed #cbd5e1; border-radius: 8px;
}
.flyers-empty.is-error { color: #be123c; }
.flyers-empty .hint { display: block; margin-top: 8px; font-size: 0.85rem; color: var(--slate-400); }
.flyers-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--slate-200);
  font-size: 0.85rem; color: var(--slate-500);
}
.flyers-foot-actions { display: flex; gap: 8px; }
.flyers-foot .btn {
  padding: 8px 16px; border-radius: 8px; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--slate-200); background: #fff; color: var(--slate-700);
}
.flyers-foot .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.flyers-foot .btn:not(:disabled):hover { border-color: var(--teal-500); color: var(--teal-700); }

@media (max-width: 900px) {
  .flyers-layout { grid-template-columns: 1fr; }
}

/* Login gate modal — download requires sign-in */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.login-gate[hidden] { display: none !important; }
.login-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.login-gate__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(91, 21, 48, 0.18), 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--teal-100);
  padding: 28px 24px 24px;
  text-align: center;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.28s ease;
}
.login-gate.is-open .login-gate__backdrop { opacity: 1; }
.login-gate.is-open .login-gate__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.login-gate__handle { display: none; }
.login-gate__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--slate-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.login-gate__close:hover,
.login-gate__close:focus-visible {
  background: var(--teal-100);
  color: var(--teal-700);
  outline: none;
}
.login-gate__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-700) 0%, var(--cyan-600) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(217, 41, 79, 0.25);
}
.login-gate__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 8px;
  line-height: 1.3;
  padding: 0 8px;
}
.login-gate__desc {
  font-size: 0.9rem;
  color: var(--slate-600);
  line-height: 1.55;
  margin-bottom: 22px;
  padding: 0 4px;
}
.login-gate__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.login-gate__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.login-gate__btn:active { transform: scale(0.98); }
.login-gate__btn--primary {
  background: linear-gradient(135deg, var(--teal-700) 0%, var(--cyan-600) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(217, 41, 79, 0.28);
}
.login-gate__btn--primary:hover,
.login-gate__btn--primary:focus-visible {
  box-shadow: 0 6px 20px rgba(217, 41, 79, 0.35);
  outline: none;
}
.login-gate__btn--ghost {
  background: #fff;
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
}
.login-gate__btn--ghost:hover,
.login-gate__btn--ghost:focus-visible {
  background: var(--teal-50);
  border-color: var(--teal-100);
  color: var(--teal-900);
  outline: none;
}
.login-gate__footer {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--slate-600);
}
.login-gate__footer a {
  color: var(--teal-700);
  font-weight: 600;
  text-decoration: none;
}
.login-gate__footer a:hover { color: var(--cyan-600); }
body.login-gate-open { overflow: hidden; touch-action: none; }

@media (max-width: 600px) {
  .login-gate {
    align-items: flex-end;
    padding: 0;
  }
  .login-gate__panel {
    max-width: none;
    border-radius: 20px 20px 0 0;
    padding: 12px 20px max(24px, env(safe-area-inset-bottom));
    transform: translateY(100%);
  }
  .login-gate.is-open .login-gate__panel {
    transform: translateY(0);
  }
  .login-gate__handle {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--slate-200);
    margin: 0 auto 16px;
  }
  .login-gate__close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
  .login-gate__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
  }
  .login-gate__icon svg { width: 24px; height: 24px; }
  .login-gate__title { font-size: 1.15rem; }
  .login-gate__desc { font-size: 0.875rem; margin-bottom: 20px; }
  .login-gate__btn { min-height: 50px; font-size: 1rem; }
}
