/* Seasonal shell: food photographs keep their original color in both modes. */
html.halloween-season {
  --season-orange: #f39a55;
  --season-marigold: #efc36d;
  --season-plum: #875a86;
  --season-night: #171619;
}

html.halloween-season[data-season-theme="dark"] {
  --ink: #f2e9db;
  --muted: #c1b5a8;
  --paper: #171619;
  --white: #242126;
  --tomato: #ffa468;
  --lime: #efc36d;
  --forest: #efc36d;
  --line: #4b4149;
  --rust: #ffb18c;
  color-scheme: dark;
  background: var(--paper);
  color: var(--ink);
}

/* Quiet, cut-paper bunting above the page and a marigold border below it. */
html.halloween-season .site-header::after {
  content: "";
  display: block;
  height: 7px;
  pointer-events: none;
  opacity: .9;
  background: repeating-linear-gradient(90deg, #d87a3b 0 32px, #875a86 32px 64px, #cda34e 64px 96px);
  clip-path: polygon(0 0,100% 0,100% 35%,98% 100%,96% 35%,94% 100%,92% 35%,90% 100%,88% 35%,86% 100%,84% 35%,82% 100%,80% 35%,78% 100%,76% 35%,74% 100%,72% 35%,70% 100%,68% 35%,66% 100%,64% 35%,62% 100%,60% 35%,58% 100%,56% 35%,54% 100%,52% 35%,50% 100%,48% 35%,46% 100%,44% 35%,42% 100%,40% 35%,38% 100%,36% 35%,34% 100%,32% 35%,30% 100%,28% 35%,26% 100%,24% 35%,22% 100%,20% 35%,18% 100%,16% 35%,14% 100%,12% 35%,10% 100%,8% 35%,6% 100%,4% 35%,2% 100%,0 35%);
}
html.halloween-season .site-footer {
  position: relative;
  border-top: 2px solid #b47642;
  background-image: radial-gradient(ellipse at 3% 0, #c88d3312, transparent 48%);
}
html.halloween-season .site-footer::before {
  content: "";
  position: absolute;
  top: -7px;
  left: max(18px, calc((100% - 1280px) / 2));
  width: 76px;
  height: 12px;
  pointer-events: none;
  background: radial-gradient(circle, #f4bc56 0 3px, #b75e32 3.5px 5px, transparent 5.5px) 0 0 / 19px 12px repeat-x;
}
html.halloween-season .logo-dot {
  position: relative;
  width: 12px;
  height: 10px;
  margin-left: 5px;
  border-radius: 48%;
  background: #d87837;
  box-shadow: inset 3px 0 #b75d2d, inset -2px 0 #eea05b;
}
html.halloween-season .logo-dot::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 6px;
  width: 2px;
  height: 5px;
  border-radius: 1px;
  background: #929867;
  transform: rotate(15deg);
}
html.halloween-season .season-notice {
  background: #f1dfbc;
  color: #39261d;
  border-top: 1px solid #c8a57a;
}
html.halloween-season .season-notice a {
  color: inherit;
  text-underline-offset: 4px;
}
html.halloween-season .season-notice a:hover { text-decoration: underline; }
html.halloween-season [data-season-theme-toggle] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: 600 .75rem/1.35 Arial, Helvetica, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
html.halloween-season [data-season-theme-toggle] svg { width: 19px; height: 19px; flex: none; }
html.halloween-season [data-season-theme-toggle]:hover { background: var(--white); border-color: var(--tomato); }
html.halloween-season [data-season-theme-toggle]:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; }

/* Keep the editorial layout, with warm ink and layered charcoal surfaces. */
html.halloween-season[data-season-theme="dark"] body { background: var(--paper); color: var(--ink); }
html.halloween-season[data-season-theme="dark"] ::selection { background: #efc36d; color: #201a18; }
html.halloween-season[data-season-theme="dark"] .site-header {
  background: #1b181d;
  box-shadow: 0 5px 25px #0002;
}
html.halloween-season[data-season-theme="dark"] .season-notice { background: #31242f; color: #f5d197; border-color: #654758; }
html.halloween-season[data-season-theme="dark"] .catalog-intro,
html.halloween-season[data-season-theme="dark"] .author-hero {
  background-image: radial-gradient(ellipse at 8% 16%, #a64c2512, transparent 55%);
}
html.halloween-season[data-season-theme="dark"] :is(.place-card,.finder-result,.related-place-card,.pending-place-card,.food-tour-promotion) {
  box-shadow: 0 8px 24px #00000015;
}
html.halloween-season[data-season-theme="dark"] :is(.menu-promotion,.author-method) { border-color: #6a4b39; }
html.halloween-season[data-season-theme="dark"] :is(.language>span,.language button) { color: var(--muted); }
html.halloween-season[data-season-theme="dark"] :is(.guide-motto,.journal-tally>strong,.footer-contact a,.contact-email) { color: var(--lime); }
html.halloween-season[data-season-theme="dark"] :is(.button.primary,.newsletter-submit,.comments-submit,.newsletter-context-link) {
  background: var(--tomato);
  border-color: var(--tomato);
  color: #251a16;
}
html.halloween-season[data-season-theme="dark"] :is(.button.primary,.newsletter-submit,.comments-submit,.newsletter-context-link):hover {
  background: #ffc08f;
  border-color: #ffc08f;
  color: #251a16;
}
html.halloween-season[data-season-theme="dark"] .button.secondary { color: var(--ink); border-color: #8f7a6e; }
html.halloween-season[data-season-theme="dark"] .button.secondary:hover { background: #3a3036; }
html.halloween-season[data-season-theme="dark"] :is(.skip,.rank-number,.photo-stamp,.topping-pill,.author-favorite,.food-tour-number,.food-tour-promotion-count,.pending-place-status) {
  background: var(--lime);
  color: #281e18;
}
html.halloween-season[data-season-theme="dark"] :is(.toppings-feature,.counter-checklist) { background: #30272b; color: var(--ink); }
html.halloween-season[data-season-theme="dark"] .topping-tags>span { border-color: #9c7958; }
html.halloween-season[data-season-theme="dark"] :is(.food-tour-promotion-count strong,.photo-stamp strong) { color: #281e18; }

/* Existing green feature panels need explicit colors: the forest token is now an accent. */
html.halloween-season[data-season-theme="dark"] :is(.card-score,.rating-section,.newsletter,.route-promotion,.intro-carousel,.intro-carousel .intro-slide>span,.intro-image>span) {
  background: #30232d;
  color: #f4ebdf;
}
html.halloween-season[data-season-theme="dark"] .rating-section {
  background: linear-gradient(110deg, #30232d, #211e24);
  border-block: 1px solid #5c4351;
}
html.halloween-season[data-season-theme="dark"] .newsletter {
  background: #211d25;
  border-color: #6a4b39;
}
html.halloween-season[data-season-theme="dark"] :is(.card-score>p,.category-scores>small,.rating-intro p,.method,.rating-row>div:first-child>span,.category-score small,.rating-total>span,.pending .category-score) { color: #d2c4b9; }
html.halloween-season[data-season-theme="dark"] :is(.rating-total,.rating-status,.category-scores>span,.card-score>strong,.category-scores>p>strong,.rating-intro>.eyebrow) { color: var(--lime); }
html.halloween-season[data-season-theme="dark"] .bar-track>div { background: #c895c0; }
html.halloween-season[data-season-theme="dark"] .standout .bar-track>div { background: var(--lime); }
html.halloween-season[data-season-theme="dark"] .intro-carousel .intro-controls { background: #251b25eb; }
html.halloween-season[data-season-theme="dark"] .route-promotion .button { background: var(--lime); color: #281e18; border-color: var(--lime); }
html.halloween-season[data-season-theme="dark"] .route-promotion p:not(.eyebrow) { color: #dfcfc5; }
html.halloween-season[data-season-theme="dark"] .card-content>.card-score-explanation { color: #f0c58b; }
html.halloween-season[data-season-theme="dark"] :is(.above-scale-pill,.above-scale-note) { background: #3b2b20; color: #ffe2a0; border-color: #ae7942; }
html.halloween-season[data-season-theme="dark"] .above-scale-fact>strong>small { color: var(--lime); }
html.halloween-season[data-season-theme="dark"] .rating-row.above-scale .bar-track>div { background: var(--lime); }
html.halloween-season[data-season-theme="dark"] .rating-row.above-scale :is(.above-scale-label,.category-score,.category-score small) { color: #ffe2a0; }

/* Filters, saved places, notifications and reader comments. */
html.halloween-season[data-season-theme="dark"] :is(.quick-filters,.finder-empty,.food-route-caution,.newsletter-context,.comments-form,.comment-author-reply,.comments-admin-notice) {
  background: #2b252d;
  border-color: #695264;
  color: var(--ink);
}
html.halloween-season[data-season-theme="dark"] :is(.quick-filter-buttons button,.comments-fields input:not([type="checkbox"]),.comments-fields textarea,.comment-admin-reply-form textarea) { border-color: #8c777e; }
html.halloween-season[data-season-theme="dark"] :is(.quick-filter-buttons button[aria-pressed="true"],.related-place-actions button[aria-pressed="true"],.comments-admin-tabs button[aria-pressed="true"]) {
  background: var(--lime);
  color: #281e18;
  border-color: var(--lime);
}
html.halloween-season[data-season-theme="dark"] .trip-saved-count { background: var(--tomato); color: #281e18; }
html.halloween-season[data-season-theme="dark"] :is(.trip-save-toast,.food-route-marker span) { background: #30232d; color: #f4ebdf; border-color: var(--lime); }
html.halloween-season[data-season-theme="dark"] .trip-save-button[data-save-place]:hover { background: #efc36d15; }
html.halloween-season[data-season-theme="dark"] :is(.trip-saved-dialog,.pancho-panel,.menu-helper-tooltip) { box-shadow: 0 18px 70px #0008; }
html.halloween-season[data-season-theme="dark"] .trip-saved-dialog::backdrop { background: #120f18b8; }
html.halloween-season[data-season-theme="dark"] :is(.newsletter-context-note,.comments-hint,.comments-moderation) { color: var(--muted); }
html.halloween-season[data-season-theme="dark"] .newsletter-context-dismiss:hover { background: #493746; }
html.halloween-season[data-season-theme="dark"] :is(.newsletter-description,.newsletter-confirmation) { color: #e2d4c8; }
html.halloween-season[data-season-theme="dark"] .newsletter-privacy { color: #c0b0a6; }
html.halloween-season[data-season-theme="dark"] .newsletter-status { color: var(--ink); }
html.halloween-season[data-season-theme="dark"] .newsletter-status[data-state="error"] { color: #ffe3c7; }
html.halloween-season[data-season-theme="dark"] :is(.newsletter-fields input::placeholder,.pancho-compose textarea::placeholder) { color: #b9ada6; }
html.halloween-season[data-season-theme="dark"] .newsletter-fields input { border-color: #968275; }
html.halloween-season[data-season-theme="dark"] .reader-comment:target { background: #352a36; outline-color: #352a36; }
html.halloween-season[data-season-theme="dark"] :is(.comments-submit-status[data-state="error"],.comments-load-status[data-state="error"],.comment-admin-card-error) { color: #ffb18c; }
html.halloween-season[data-season-theme="dark"] .comments-admin-notice[data-state="error"] { background: #38242a; }
html.halloween-season[data-season-theme="dark"] .comment-admin-preview { border-color: #8c777e; }

/* Pancho's familiar face remains unchanged, with a new nighttime nameplate. */
html.halloween-season[data-season-theme="dark"] .pancho-nameplate { background: #3b2839; color: #ffe4b3; border-color: #efc36d; box-shadow: 0 4px 16px #0007; }
html.halloween-season[data-season-theme="dark"] .pancho-launcher:hover .pancho-nameplate { background: #553347; }
html.halloween-season[data-season-theme="dark"] .pancho-hint { background: #30232d; color: var(--ink); border-color: #8d6b76; box-shadow: 0 7px 25px #0007; }
html.halloween-season[data-season-theme="dark"] .pancho-hint::after { background: #30232d; border-color: #8d6b76; }
html.halloween-season[data-season-theme="dark"] :is(.pancho-filter-context,.pancho-message.user) { background: #3b2e3d; color: var(--ink); }
html.halloween-season[data-season-theme="dark"] .pancho-suggestion:hover { background: #3c2e3a; }

/* Map tiles and food photographs are deliberately not filtered or dimmed. */
html.halloween-season[data-season-theme="dark"] :is(.map-section,.map-container) { background: #211f24; }
html.halloween-season[data-season-theme="dark"] :is(.map-shell,.food-route-map) { background: #343138; border-color: #796975; }
html.halloween-season[data-season-theme="dark"] #map-message { background: #28222b; color: var(--ink); border: 1px solid var(--line); }
html.halloween-season[data-season-theme="dark"] .leaflet-popup-content-wrapper,
html.halloween-season[data-season-theme="dark"] .leaflet-popup-tip { background: #28222b; color: var(--ink); }
html.halloween-season[data-season-theme="dark"] :is(.place-popup a,.food-route-map .leaflet-popup-content a) { color: #ffb184; }
html.halloween-season[data-season-theme="dark"] .leaflet-control-zoom a { background: #28222b; color: var(--ink)!important; border-color: #796975; }
html.halloween-season[data-season-theme="dark"] .leaflet-control-zoom a:hover { background: #493746; }
html.halloween-season[data-season-theme="dark"] .leaflet-control-attribution { background: #28222be8; color: #e0d3c8; }
html.halloween-season[data-season-theme="dark"] .leaflet-control-attribution a { color: #ffd492; }
html.halloween-season[data-season-theme="dark"] .food-marker { background: #c96b35; color: #fff; border-color: #f2d2aa; }

/* Long-form tour comparisons also work in the dark palette. */
html.halloween-season[data-season-theme="dark"] .food-tour-comparison thead { background: #3b2a38; color: #fff0df; }
html.halloween-season[data-season-theme="dark"] .food-tour-comparison tbody td:nth-child(3) { color: var(--lime); }

@media (max-width: 1100px) {
  html.halloween-season [data-season-theme-toggle] { width: fit-content; min-height: 44px; }
}
@media (max-width: 740px) {
  html.halloween-season[data-season-theme="dark"] .place-card:not(.category-card)>.card-score { background: transparent; color: var(--ink); }
  html.halloween-season[data-season-theme="dark"] .place-card:not(.category-card)>.card-score>strong { color: var(--tomato); }
}
@media (max-width: 600px) {
  html.halloween-season[data-season-theme="dark"] .food-tour-comparison tbody th { background: #3b2a38; color: #fff0df; }
  html.halloween-season[data-season-theme="dark"] .food-tour-comparison .food-tour-table-booking { color: #f5cc8c; }
}
@media (prefers-reduced-motion: reduce) {
  html.halloween-season [data-season-theme-toggle] { transition: none; }
}
@media print {
  html.halloween-season[data-season-theme] { --ink:#222;--muted:#555;--paper:#fff;--white:#fff;--line:#ccc;--tomato:#993a1d;--forest:#333;--lime:#eee;color-scheme:light; }
  html.halloween-season [data-season-theme-toggle],html.halloween-season .site-header::after { display: none; }
}
