/* Daylight and forest at night share layout, photography and controls. */
:root {
  color-scheme: light;
  --osa-paper: #faf8ef;
  --osa-header: #fffdf5;
  --osa-surface: #fffdf5;
  --osa-panel: #edf2e2;
  --osa-soft: #e2ebd5;
  --osa-field: #fffef9;
  --osa-ink: #173c2a;
  --osa-muted: #4b634e;
  --osa-line: #cbd6c0;
  --osa-control-line: #8da486;
  --osa-action: #1b5335;
  --osa-action-hover: #246342;
  --osa-action-ink: #fffdf4;
  --osa-accent: #376448;
  --osa-focus: #326d45;
  --osa-shadow: 0 10px 28px #254b2d12;
}
:root[data-theme="night"] {
  color-scheme: dark;
  --osa-paper: #081f18;
  --osa-header: #0b281e;
  --osa-surface: #102d22;
  --osa-panel: #17392b;
  --osa-soft: #234b37;
  --osa-field: #112f24;
  --osa-ink: #faf5e7;
  --osa-muted: #c6d7be;
  --osa-line: #4d6c55;
  --osa-control-line: #779780;
  --osa-action: #bada8d;
  --osa-action-hover: #d1e8aa;
  --osa-action-ink: #132e20;
  --osa-accent: #c7df9e;
  --osa-focus: #cce69a;
  --osa-shadow: 0 12px 32px #00150e46;
}

:root .appearance-site {
  --mag-ink: var(--osa-ink);
  --mag-line: var(--osa-line);
  --cream: var(--osa-ink);
  isolation: isolate;
  background: var(--osa-paper);
  color: var(--osa-ink);
}
:root[data-theme="night"] .appearance-site:not(.forest-atmosphere)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, #081f18fa, #081f18ec 48%, #081f18b5),
    url('/assets/forest-leaves-background.jpg') center 49% / cover no-repeat;
}

/* Keep the partner mark and focus rings legible in each appearance. */
:root:not([data-theme="night"]) .appearance-site .partner-logo { filter: none; }
:root[data-theme="night"] .appearance-site .partner-logo {
  filter: brightness(0) invert(1) sepia(.16);
  background: transparent;
  border: 0;
  box-shadow: none;
}
.appearance-site :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--osa-focus);
  outline-offset: 4px;
}

/* A bright opening with an original forest photo, and the existing night parallax. */
:root:not([data-theme="night"]) .appearance-site.jungle-home :is(main, .pencil-scene) {
  background: transparent;
}
:root:not([data-theme="night"]) .appearance-site.jungle-home .jungle-hero {
  min-height: 0;
  padding: clamp(36px, 5vw, 78px) 0;
  background: radial-gradient(ellipse at 75% 28%, #edf3dd, transparent 70%),
    linear-gradient(180deg, #fffdf5, var(--osa-paper));
}
:root:not([data-theme="night"]) .jungle-hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  grid-template-rows: 1fr auto auto auto 1fr;
  column-gap: clamp(28px, 5vw, 78px);
  align-items: start;
}
:root:not([data-theme="night"]) .jungle-hero .wrap::after {
  content: "";
  grid-column: 2;
  grid-row: 1 / 6;
  align-self: stretch;
  min-height: clamp(305px, 34vw, 510px);
  border-radius: 28px;
  background: #dbe8ce url('/assets/jungle-piro.webp') center 51% / cover no-repeat;
  box-shadow: 0 16px 42px #21472f25;
}
:root:not([data-theme="night"]) .jungle-hero .wrap > * { grid-column: 1; justify-self: start; }
:root:not([data-theme="night"]) .jungle-hero .over { grid-row: 1; align-self: end; }
:root:not([data-theme="night"]) .jungle-hero h1 {
  grid-row: 2;
  font-size: clamp(42px, 5.7vw, 82px);
  text-wrap: initial;
  overflow-wrap: anywhere;
  color: var(--osa-ink);
  text-shadow: none;
}
:root:not([data-theme="night"]) .appearance-site .jungle-hero p {
  grid-row: 3;
  color: var(--osa-muted);
}
:root:not([data-theme="night"]) .jungle-hero .btn { grid-row: 4; }
@media (max-width: 750px) {
  :root:not([data-theme="night"]) .jungle-hero .wrap { display: block; }
  :root:not([data-theme="night"]) .jungle-hero .wrap::after {
    display: block;
    min-height: clamp(200px, 53vw, 340px);
    margin-top: 28px;
    border-radius: 20px;
  }
  :root:not([data-theme="night"]) .jungle-hero h1 { font-size: clamp(40px, 9vw, 64px); }
}

/* Shared surfaces and type, including secondary pages and booking controls. */
:root .appearance-site :is(.over, .count, .featured-intro, .theme-footnote, .gallery-note,
  .park-area-note, .park-note, .park-story figcaption, .park-wet figcaption,
  .social-section > p, .chosen-tour > span, .finder-teaser p,
  .finder-note, .finder-intro, .finder-badge, .card-scale-note) { color: var(--osa-muted); }
:root .appearance-site .over::before { background: var(--osa-control-line); }
:root .appearance-site :is(.hero, .park-hero-copy) .over { color: #f9f5e8; }
:root .appearance-site .heading { border-color: var(--osa-line); }
:root .appearance-site :is(.jungle-featured, .secondary-tours) .textlink { color: var(--osa-accent); }
:root .appearance-site :is(.btn, .tour-card-link) {
  background: var(--osa-action);
  border-color: var(--osa-action);
  color: var(--osa-action-ink);
}
:root .appearance-site :is(.btn, .tour-card-link):hover {
  background: var(--osa-action-hover);
  color: var(--osa-action-ink);
}
:root .appearance-site :is(.hero, .park-hero-copy) .btn {
  background: #f5f5df;
  color: #17412a;
}
:root .appearance-site .featured-tours .tour-card-link {
  background: var(--osa-action);
  border-color: var(--osa-action);
  color: var(--osa-action-ink);
}
:root .appearance-site .featured-tours .tour-card-link:hover { background: var(--osa-action-hover); }
:root:not([data-theme="night"]) .appearance-site .featured-tours .magazine-card {
  padding: 0;
  border-radius: 24px;
}
:root:not([data-theme="night"]) .appearance-site .featured-tours .magazine-visual { border-radius: 0; }
:root .appearance-site :is(.grid, .interest-catalog, .featured-tours) .card,
:root .appearance-site :is(.tour-info-card, .park-route, .park-three article, .optional-finder,
  .inquiry-privacy, .chosen-tour, .finder-result, .finder-shell) {
  background: var(--osa-surface);
  color: var(--osa-ink);
  border-color: var(--osa-line);
  box-shadow: var(--osa-shadow);
}
:root .appearance-site :is(.card p, .tour-info-card h2, .jungle-home .partner h3) { color: var(--osa-ink); }
:root .appearance-site .featured-tours .tour-card-body > p { color: var(--osa-ink) !important; }
:root .appearance-site .magazine-card :is(.magazine-category, .tour-card-location, .magazine-disclaimer),
:root .appearance-site .featured-tours :is(.magazine-category, .tour-card-location, .magazine-disclaimer) {
  color: var(--osa-muted) !important;
  border-color: var(--osa-line) !important;
}
:root .appearance-site .catalog .card small { border-color: var(--osa-line); color: var(--osa-muted); }
:root .appearance-site .magazine-highlights { color: var(--osa-ink); }
:root .appearance-site .magazine-highlights li::before { background: var(--osa-accent); }
:root .appearance-site :is(.split, .split article, .partner, .adventure-teaser, .finder-teaser,
  .social-section, .park-seasons, .adventure-note, .availability-box,
  .home-difficulty-guide, .difficulty-guide, .interest-empty, .finder-section,
  .formsect, .difficulty-seasons > div, .difficulty-routes > .seasonal-current) {
  background: var(--osa-panel);
  color: var(--osa-ink);
  border-color: var(--osa-line);
}
:root .appearance-site :is(.partner h3, .adventure-teaser h2, .finder-teaser h2) { color: var(--osa-ink); }
:root .appearance-site .split article { background: transparent; }
:root .appearance-site.tour-faq .home-difficulty-guide { background: var(--osa-panel); }
:root .appearance-site :is(.tour-card-facts dt, .tour-card-facts dd, .difficulty-status,
  .difficulty-description, .seasonal-month, .seasonal-reset, .fact-pending, .home-difficulty-season,
  .difficulty-guide p:last-child) { color: var(--osa-muted); }
:root .appearance-site .tour-card-facts {
  background: var(--osa-panel) !important;
  color: var(--osa-ink);
}
:root .appearance-site .compact-facts .tour-card-facts { background: transparent !important; }
:root .appearance-site .tour-card-facts > div::after { background: var(--osa-line); }
:root .appearance-site .tour-card-facts > div { border-color: var(--osa-line); }
:root .appearance-site .compact-facts .tour-card-facts > div { border-right-color: var(--osa-line) !important; }
:root .appearance-site .difficulty-scale path { stroke: var(--osa-control-line); }
:root .appearance-site :is(.difficulty-info-button, .difficulty-info-button > span) {
  color: var(--osa-accent);
  border-color: var(--osa-control-line);
}
:root .appearance-site .difficulty-info-popup {
  background: var(--osa-surface);
  color: var(--osa-ink);
  border-color: var(--osa-control-line);
}
:root .appearance-site :is(.difficulty-info-close, .gallery-controls button) {
  background: var(--osa-soft);
  color: var(--osa-ink);
}
:root .appearance-site .card-price-panel,
:root .appearance-site .featured-tours .card-price-panel {
  background: var(--osa-panel);
  border-color: var(--osa-line);
  box-shadow: none;
  color: var(--osa-ink);
}
:root .appearance-site .card-price-number strong,
:root .appearance-site .featured-tours .card-price-number strong { color: var(--osa-ink); }
:root .appearance-site :is(.card-price-label, .card-price-context, .price-note, .tour-pricing td span) {
  color: var(--osa-muted) !important;
}
:root .appearance-site :is(.card-price-details > summary, .tour-price-teaser a, .gallery-open,
  .change-tour, .advice-tour, .interest-clear) { color: var(--osa-accent); }
:root .appearance-site .featured-tours .card-price-details > summary { color: var(--osa-accent); }
:root .appearance-site :is(.card-price-popover, .tour-pricing, .difficulty-info-popup, details) {
  background: var(--osa-surface);
  color: var(--osa-ink);
  border-color: var(--osa-line);
}
:root .appearance-site .card-price-panel .card-price-details { background: none; border-color: var(--osa-line); }
:root .appearance-site .detail-price-options .tour-pricing { background: transparent; }
:root .appearance-site summary { color: var(--osa-ink); }
:root .appearance-site .tour-pricing table { color: var(--osa-ink); }
:root .appearance-site :is(.tour-pricing thead, .price-notice) { background: var(--osa-soft); }
:root .appearance-site :is(.tour-pricing th, .tour-pricing td, .park-guide-note, .park-plan, .park-two article + article) {
  border-color: var(--osa-line);
}
:root .appearance-site .availability-form input,
:root .appearance-site :is(input, select, textarea, .guest-arrows button, .category-grid button,
  .interest-buttons button, .tour-categories button, .filters button, .finder-chip span,
  .finder-controls button, .finder-reset, .social-item) {
  background: var(--osa-field);
  color: var(--osa-ink);
  border-color: var(--osa-control-line);
}
:root .appearance-site input[type="checkbox"] { accent-color: var(--osa-action); }
:root .appearance-site :is(.category-grid, .interest-buttons, .tour-categories, .filters) button[aria-pressed="true"],
:root .appearance-site .finder-chip input:checked + span,
:root .appearance-site #tour-finder-dialog .finder-next {
  background: var(--osa-action);
  color: var(--osa-action-ink);
  border-color: var(--osa-action);
}
:root .appearance-site :is(.interest-tags span, .interest-chips button, .gallery-thumbnails button) {
  background: var(--osa-soft);
  color: var(--osa-ink);
  border-color: var(--osa-control-line);
}
:root .appearance-site .social-row > a:hover { background: var(--osa-soft); }
:root .appearance-site :is(.social-row > span, .interest-variant) { color: var(--osa-muted); }
:root .appearance-site #tour-finder-dialog,
:root .appearance-site #tour-finder-dialog :is(.finder-dialog-head, .finder-controls) {
  background: var(--osa-surface);
  color: var(--osa-ink);
  border-color: var(--osa-control-line);
}
:root[data-theme="night"] .appearance-site .finder-warning { color: #f0c993; }

:root[data-theme="night"] .appearance-site .park-history { background: var(--osa-panel); }
:root[data-theme="night"] .appearance-site .park-facts > .park-fact-card {
  background: linear-gradient(145deg, var(--osa-panel), var(--osa-surface));
  border-color: var(--osa-line);
  box-shadow: var(--osa-shadow);
}
:root[data-theme="night"] .appearance-site .park-facts > .park-fact-card:nth-child(3) { background: #153a37; }
:root[data-theme="night"] .appearance-site .park-facts .park-fact-icon {
  background: var(--osa-soft);
  color: var(--osa-accent);
  border-color: var(--osa-line);
}
:root[data-theme="night"] .appearance-site .park-facts span { color: var(--osa-muted); }
:root .appearance-site .booking-bar {
  background: #143c2b;
  color: #fff9e9;
  border-top: 1px solid #6e9271;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
:root[data-theme="night"] .appearance-site .booking-bar { background: var(--osa-header); }
:root .appearance-site .booking-bar .btn { background: #f8f7e8; color: #143c2b; }
:root[data-theme="night"] .appearance-site .booking-bar .btn { background: var(--osa-action); color: var(--osa-action-ink); }
:root .appearance-site footer {
  background: #143c2b;
  color: #f9f5e7;
  border-top: 1px solid #6e9271;
}
:root[data-theme="night"] .appearance-site footer { background: #0a251b; border-color: var(--osa-line); }
:root .appearance-site footer .social-compact .social-item {
  background: transparent;
  color: #e9efdc;
}
:root .appearance-site footer .social-compact > span.social-item { color: #b6c8ae; }
:root .appearance-site footer .social-compact > a:hover { background: #ffffff16; }

/* Theme-aware homepage facts override the earlier dark-only forest palette. */
:root .appearance-site.jungle-home .featured-tours .tour-card-facts dt {
  color: var(--osa-muted) !important;
}
:root .appearance-site.jungle-home .featured-tours .tour-card-facts dd {
  color: var(--osa-ink) !important;
}
:root .appearance-site.jungle-home .featured-tours .difficulty-info-button,
:root .appearance-site.jungle-home .featured-tours .difficulty-info-button > span {
  color: var(--osa-accent) !important;
  border-color: var(--osa-accent) !important;
}
:root .appearance-site.jungle-home .featured-tours .tour-card-facts {
  min-height: 0;
}


/* Inset card facts and align the comparison rows on the homepage. */
:root .appearance-site.jungle-home .featured-tours .tour-card-facts {
  padding:0 18px !important;
}
:root .appearance-site.jungle-home .featured-tours .tour-card-facts > div:last-child {
  border-bottom:0 !important;
}
:root .appearance-site.jungle-home .featured-tours .tour-card-body > p:not(.magazine-disclaimer) {
  min-height:4.5em !important;
}
:root .appearance-site.jungle-home .featured-tours .card-price-top {
  min-height:132px;
}
