/* Bà Đen V2.8: dark forest palette. Layout and booking behavior stay in V2.7. */
html[data-theme="dark"] {
  color-scheme: dark;
  --forest: #c3dfca;
  --forest-dark: #0a1c17;
  --green: #acd2b3;
  --mint: #223e31;
  --orange: #e3bc84;
  --orange-light: #403623;
  --ink: #f2efdf;
  --muted: #bdc7b5;
  --border: #3c574b;
  --paper: #10231f;
  --canvas: #0d211b;
  --gold: #d4b17b;
  --gold-dark: #d4b17b;
  --danger: #f0a894;
  --shadow: 0 18px 48px #00000030;
  --surface: #18352d;
  --surface-raised: #1d3d33;
  --mode-track: #0e251e;
  --mode-active-bg: #d4b17b;
  --mode-active-text: #173023;
}
html[data-theme="dark"] body { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] ::selection { background: #d4b17b; color: #163125; }
html[data-theme="dark"] :is(button, a, input, select, textarea):focus-visible { outline-color: #e3be83; }
html[data-theme="dark"] .skip-link { background: #e6cc9e; color: #153627; }

/* Navigation, hero and discovery. The destination photograph is not filtered. */
html[data-theme="dark"] .preview-banner { background: #1b3127; color: #cbd2bb; }
html[data-theme="dark"] .preview-label { border-color: #53644b; }
html[data-theme="dark"] .preview-banner button { color: #dfc28d; text-decoration-color: #9a8c63; }
html[data-theme="dark"] .site-header { background: #10271ff2; border-bottom-color: #8ba17a26; }
html[data-theme="dark"] .brand strong { color: #ecedda; }
html[data-theme="dark"] .brand small { color: #b7c2aa; }
html[data-theme="dark"] .brand-mark { color: #d4b17b; }
html[data-theme="dark"] .site-header nav a { color: #bac9b5; }
html[data-theme="dark"] .site-header nav a:hover,
html[data-theme="dark"] .site-header nav a.active { color: #f4e7c8; }
html[data-theme="dark"] .site-header nav a.active:after { background: #d4b17b; }
html[data-theme="dark"] .site-header nav a:last-child { color: #e7e8d3; border-color: #66826477; }
html[data-theme="dark"] .site-header nav a:last-child.active { background: #284332; border-color: #75885e; }
html[data-theme="dark"] .nav-count { background: #354a32; color: #e9d6a7; }
html[data-theme="dark"] .hero { background: #102b24; }
html[data-theme="dark"] .hero h1 { color: #fff9e9; }
html[data-theme="dark"] .hero h1 em { color: #edc58a; }
html[data-theme="dark"] .hero .eyebrow { color: #ead19f; }
html[data-theme="dark"] .hero-button {
  background: #d4b17b !important;
  border-color: #d4b17b !important;
  color: #173023 !important;
}
html[data-theme="dark"] .hero-button:hover {
  background: #e8c997 !important;
  border-color: #e8c997 !important;
}
html[data-theme="dark"] .hero-meta { color: #e0e5d9; }
html[data-theme="dark"] .hero-meta svg { color: #ddbd84; }
html[data-theme="dark"] .hero-location { color: #fff7df; border-color: #dfbf827a; }
html[data-theme="dark"] .hero-location span { color: #e7cfa0; }
html[data-theme="dark"] .browse-bar { background: #1a352b; border-color: #65724966; box-shadow: 0 12px 42px #00000030; }
html[data-theme="dark"] .browse-intro strong { color: #f0ead4; }
html[data-theme="dark"] .browse-date { border-color: #51654a; }
html[data-theme="dark"] .browse-date input { background: transparent; color: #f4eed9; color-scheme: dark; }
html[data-theme="dark"] .section-note { border-color: #53664c; }
html[data-theme="dark"] .catalog-tools { border-color: #3b5140; }
html[data-theme="dark"] .filter-tab { background: transparent; border-color: #4a6049; color: #c6d1ba; }
html[data-theme="dark"] .filter-tab.active { background: #d4b17b; border-color: #d4b17b; color: #183023; }
html[data-theme="dark"] .filter-tab:hover:not(.active) { background: #263f2e; border-color: #6c7b56; }
html[data-theme="dark"] .selected-date-note,
html[data-theme="dark"] .selected-date-note svg { color: #b9c6ac; }
html[data-theme="dark"] .product-card { background: var(--surface); border-color: #3b5444; }
html[data-theme="dark"] .product-card:hover { border-color: #8d9468; box-shadow: 0 18px 42px #00000036; }
html[data-theme="dark"] .product-image { background: #213e30; }
html[data-theme="dark"] .category-label { background: #132e24ed; color: #e9ead6; border-color: #a1ae8866; }
html[data-theme="dark"] .product-content .product-kicker { color: #d4b986; }
html[data-theme="dark"] .product-content h3 { color: #edf0da; }
html[data-theme="dark"] .product-content p.description { color: #c0cbb7; }
html[data-theme="dark"] .product-features { color: #b8c7aa; }
html[data-theme="dark"] .product-features span:before { background: #bca475; }
html[data-theme="dark"] .product-price-row { border-color: #3d5542; }
html[data-theme="dark"] .product-price small { color: #b2c0a4; }
html[data-theme="dark"] .product-price strong { color: #e5d4ac; }
html[data-theme="dark"] .how-it-works { border-color: #3e5541; }
html[data-theme="dark"] .how-icon { background: #2c4029; color: #ddbd81; }
html[data-theme="dark"] .how-step strong { color: #e5e9d0; }
html[data-theme="dark"] .visit-guide { background: #1d3a2b; border-color: #506548; }
html[data-theme="dark"] .visit-guide:after { opacity: .25; }
html[data-theme="dark"] .visit-guide h3 { color: #f0ecd7; }
html[data-theme="dark"] .visit-guide p { color: #c5d0b8; }

/* Consistent action hierarchy: warm primary actions and outlined secondary actions. */
html[data-theme="dark"] .button { background: #d4b17b; border-color: #d4b17b; color: #173023; }
html[data-theme="dark"] .button:hover:not(:disabled) { background: #e8c997; border-color: #e8c997; box-shadow: 0 6px 18px #00000024; }
html[data-theme="dark"] .button.secondary,
html[data-theme="dark"] .visit-guide > .button { background: #1c382b; color: #ece7cd; border-color: #70815e; }
html[data-theme="dark"] .button.secondary:hover,
html[data-theme="dark"] .visit-guide > .button:hover { background: #2a4934; border-color: #9a9a6b; }
html[data-theme="dark"] .button.ghost { background: transparent; color: #d4d9bd; border-color: transparent; }
html[data-theme="dark"] .button.ghost:hover { background: #273d2c; }
html[data-theme="dark"] .button.danger { background: #392c25; border-color: #875f4a; color: #ffc2a9; }
html[data-theme="dark"] .button.danger:hover { background: #50352c; }
html[data-theme="dark"] .text-button { color: #d8c390; text-decoration-color: #9a9969; }
html[data-theme="dark"] .text-button:hover { color: #f3dfb0; }
html[data-theme="dark"] .button .spinner { border-color: #16302040; border-top-color: #173023; }

/* Cart and checkout. */
html[data-theme="dark"] .page-shell { background: var(--canvas); }
html[data-theme="dark"] .breadcrumbs { color: #b6c3a9; }
html[data-theme="dark"] .breadcrumbs a { color: #d8ddbd; }
html[data-theme="dark"] .page-title { color: #f0edda; }
html[data-theme="dark"] .checkout-steps { color: #a6b59b; }
html[data-theme="dark"] .checkout-steps b { background: #233b2b; border-color: #4a5c3f; color: #b6c3a5; }
html[data-theme="dark"] .checkout-steps .current { color: #e5d7b2; }
html[data-theme="dark"] .checkout-steps .current b { background: #d4b17b; border-color: #d4b17b; color: #183023; }
html[data-theme="dark"] .checkout-steps i { background: #3d5541; }
html[data-theme="dark"] .panel { background: var(--surface); border-color: #3c574b; box-shadow: 0 3px 14px #0000000e; }
html[data-theme="dark"] .summary-panel { background: #1c372b; border-top-color: #d4b17b; }
html[data-theme="dark"] .summary-row strong { color: #f0efdb; }
html[data-theme="dark"] .summary-total { border-color: #4b6046; }
html[data-theme="dark"] .summary-total strong { color: #e5d0a0; }
html[data-theme="dark"] .summary-item,
html[data-theme="dark"] .order-summary-line { border-color: #3b5543; }
html[data-theme="dark"] .notice { background: #253f2c; border-left-color: #92ad72; color: #d1dfbc; }
html[data-theme="dark"] .notice.warm { background: #403623; border-left-color: #c2a163; color: #ead4a6; }
html[data-theme="dark"] .notice.error { background: #442d27; border-left-color: #d89573; color: #ffd0b5; }
html[data-theme="dark"] .cart-line { border-color: #3b5442; }
html[data-theme="dark"] .cart-line h3 { color: #ecebd5; }
html[data-theme="dark"] .remove-button { color: #dec28f; }
html[data-theme="dark"] .line-total { color: #e5d0a1; }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field-mini input[type="date"],
html[data-theme="dark"] .lookup-fields input,
html[data-theme="dark"] .library-search,
html[data-theme="dark"] .access-code input {
  color-scheme: dark;
  background: #10291f;
  border-color: #51674d;
  color: #f0efda;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .lookup-fields input::placeholder,
html[data-theme="dark"] .library-search::placeholder { color: #9aaf94; opacity: 1; }
html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field textarea:focus,
html[data-theme="dark"] .lookup-fields input:focus,
html[data-theme="dark"] .library-search:focus { border-color: #c4af78; box-shadow: 0 0 0 3px #c6b5801c; }
html[data-theme="dark"] .field input:-webkit-autofill,
html[data-theme="dark"] .lookup-fields input:-webkit-autofill { -webkit-text-fill-color: #f0efda; -webkit-box-shadow: 0 0 0 1000px #10291f inset; caret-color: #f0efda; }
html[data-theme="dark"] .quantity-control { background: #10291f; border-color: #51674d; }
html[data-theme="dark"] .quantity-control button { background: #10291f; color: #e8d4a5; }
html[data-theme="dark"] .quantity-control button:hover { background: #2d4934; }
html[data-theme="dark"] .quantity-control input { background: #10291f; color: #f0efda; }
html[data-theme="dark"] .payment-option { background: #152f26; border-color: #3f5b47; }
html[data-theme="dark"] .payment-option:has(input:checked) { background: #2b4530; border-color: #bcaa72; box-shadow: inset 0 0 0 1px #bcaa72; }
html[data-theme="dark"] .payment-option input,
html[data-theme="dark"] .terms input { accent-color: #d4b17b; }
html[data-theme="dark"] .payment-mini-mark { color: #d6c694 !important; }
html[data-theme="dark"] .payment-mini-mark.vnpay { color: #e9b290 !important; }

/* Order states, ticket library and account-free lookup. */
html[data-theme="dark"] .order-status-hero { background: #1c4435; color: #fff3d5; border: 1px solid #5c73514d; }
html[data-theme="dark"] .order-status-hero h1 { color: #fff3d5; }
html[data-theme="dark"] .order-status-hero p,
html[data-theme="dark"] .order-status-hero small { color: #d2dec2; }
html[data-theme="dark"] .status-emblem { background: #ffffff08; color: #e8c48d; border-color: #beae7666; }
html[data-theme="dark"] .order-state-pill { background: #d4b17b; color: #183323; }
html[data-theme="dark"] .order-access { background: #122c21; border-color: #506747; }
html[data-theme="dark"] .access-code button { background: #29422e; border-color: #6c7b55; color: #e5d6ae; }
html[data-theme="dark"] .access-code button:hover { background: #3a5236; }
html[data-theme="dark"] .status-timeline:before { background: #4d6449; }
html[data-theme="dark"] .timeline-step { background: var(--surface); }
html[data-theme="dark"] .timeline-step b { background: #354c35; color: #c1cbb1; border-color: var(--surface); }
html[data-theme="dark"] .timeline-step.done { color: #c7dab3; }
html[data-theme="dark"] .timeline-step.done b { background: #c7b783; color: #1a3424; }
html[data-theme="dark"] .payment-success-block svg { color: #bed3a7; }
html[data-theme="dark"] .ticket-card { background: var(--surface); border-color: #4c6449; }
html[data-theme="dark"] .ticket-card-top { border-color: #5a7251; }
html[data-theme="dark"] .ticket-card-top:before,
html[data-theme="dark"] .ticket-card-top:after { background: var(--surface); border-color: #4c6449; }
html[data-theme="dark"] .ticket-card-top small { color: #d4b887; }
html[data-theme="dark"] .ticket-card-top h3 { color: #edeed7; }
html[data-theme="dark"] .ticket-card-bottom { background: #244230; }
html[data-theme="dark"] .ticket-card-bottom span { color: #d1dbb8; }
html[data-theme="dark"] .ticket-card-bottom button { color: #ebd3a4; }
html[data-theme="dark"] .ticket-mock-watermark { color: #e4bd87; }
html[data-theme="dark"] .order-list-card { background: var(--surface); border-color: #3e5b47; }
html[data-theme="dark"] .order-list-card:hover { border-color: #7d956a; }
html[data-theme="dark"] .order-list-card h3 { color: #ebedd6; }
html[data-theme="dark"] .order-list-card .order-number { color: #b4c4a6; }
html[data-theme="dark"] .order-card-actions { border-color: #425b42; }
html[data-theme="dark"] .order-card-actions strong { color: #e3d2a7; }
html[data-theme="dark"] .status-badge { background: #304e32; color: #d4e1bb; }
html[data-theme="dark"] .status-badge.pending { background: #4a4027; color: #efcf91; }
html[data-theme="dark"] .lookup-panel { background: #1d3a2b; border-color: #4b6447; }
html[data-theme="dark"] .lookup-panel h3 { color: #e9ead3; }
html[data-theme="dark"] .support-confirmation { background: #2b462f; color: #d2ddbb; }
html[data-theme="dark"] .empty-state .empty-icon { background: #2b3e28; border-color: #536447; color: #dec18b; }

/* Dialogs, QR and notices. Never recolor or invert QR data. */
html[data-theme="dark"] dialog { background: var(--surface); color: var(--ink); border-color: #607254; box-shadow: 0 32px 130px #00000080; }
html[data-theme="dark"] dialog::backdrop { background: #061b15bd; }
html[data-theme="dark"] .modal-close { background: #1b3629; color: #f0e2bf; border-color: #7d8a66; box-shadow: 0 3px 12px #00000026; }
html[data-theme="dark"] .modal-close:hover { background: #304a32; }
html[data-theme="dark"] .modal-product-content .eyebrow,
html[data-theme="dark"] .ticket-modal .eyebrow { color: #d5b580; }
html[data-theme="dark"] .variant-row { border-color: #415b42; }
html[data-theme="dark"] .modal-selection-total strong { color: #e5d1a1; }
html[data-theme="dark"] .ticket-modal .ticket-id { color: #e4ead1; }
html[data-theme="dark"] .ticket-qr,
html[data-theme="dark"] .payment-qr { background: #fff; color: #173627; border-color: #c4cdb6; color-scheme: light; }
html[data-theme="dark"] .payment-qr span { color: #52614b; }
html[data-theme="dark"] .toast { background: #243e2b; color: #f2e7ca; border-color: #8d98666b; box-shadow: 0 10px 32px #00000044; }
html[data-theme="dark"] .page-loading { background: var(--paper); }
html[data-theme="dark"] .spinner { border-color: #536b46; border-top-color: #e0c08a; }

/* Footer and compact layouts. */
html[data-theme="dark"] .site-footer { background: #0b1d18; color: #e9e8ce; border-top-color: #a98a54; }
html[data-theme="dark"] .site-footer:before { opacity: .19; }
html[data-theme="dark"] .footer-inner p { color: #b9c8ad; }
html[data-theme="dark"] .footer-inner span { color: #d6bd8b; }
html[data-theme="dark"] .footer-inner a { color: #d7dfc4; }
html[data-theme="dark"] .footer-inner a:hover { color: #f3dcae; }
html[data-theme="dark"] .footer-inner .text-button { color: #dec18b; }
html[data-theme="dark"] .footer-bottom { color: #aabb99; border-color: #5c734339; }
html[data-theme="dark"] .mobile-cart-bar { background: #294530; color: #f4ead0; border-color: #879263; box-shadow: 0 8px 30px #00000055; }
html[data-theme="dark"] .mobile-cart-bar span { color: #cddcba; }
html[data-theme="dark"] .mobile-cart-bar button { background: #d4b17b; color: #173023; }
@media (max-width: 600px) {
  html[data-theme="dark"] .site-header nav a:last-child.active { background: transparent; }
  html[data-theme="dark"] .hero-copy { background: var(--paper); color: var(--ink); }
  html[data-theme="dark"] .hero-copy > p:not(.eyebrow) { color: #c3d0b8; }
  html[data-theme="dark"] .hero-meta { color: #bdcbb1; }
  html[data-theme="dark"] .hero-meta svg { color: #d8b783; }
  html[data-theme="dark"] .hero-location { background: #102b22a8; }
  html[data-theme="dark"] .browse-date { border-top-color: #425b42; }
}

/* The standalone ticket export already uses a light document. Also keep browser printing light. */
@media print {
  html[data-theme="dark"] {
    color-scheme: light;
    --forest: #174c42;
    --forest-dark: #102f2b;
    --green: #286154;
    --mint: #edf2eb;
    --orange: #b87842;
    --orange-light: #f9efdf;
    --ink: #253d35;
    --muted: #66726a;
    --border: #dedfd4;
    --paper: #fff;
    --canvas: #fff;
    --gold: #b68b4f;
    --gold-dark: #876333;
    --danger: #ad3e32;
    --surface: #fff;
    --surface-raised: #fff;
  }
  html[data-theme="dark"] :is(body, .page-shell, .panel, dialog, .ticket-card, .ticket-card-top, .ticket-card-bottom, .ticket-modal, .ticket-qr, .payment-qr, .notice, .summary-panel, .order-list-card, .lookup-panel, .timeline-step, .order-status-hero) {
    background: #fff !important;
    color: #253d35 !important;
    border-color: #a7b19e !important;
    box-shadow: none !important;
  }
  html[data-theme="dark"] :is(h1, h2, h3, h4, p, span, strong, small, label, a, .ticket-id, .ticket-mock-watermark, .eyebrow) { color: #253d35 !important; }
  html[data-theme="dark"] .ticket-card-top:before,
  html[data-theme="dark"] .ticket-card-top:after { background: #fff; border-color: #a7b19e; }
  html[data-theme="dark"] .timeline-step b { background: #edf2eb; color: #253d35; border-color: #fff; }
}
