:root {
    --bg: #f7f8fc;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #4f46e5;
    --brand-2: #06b6d4;
    --brand-ink: #ffffff;
    --danger: #dc2626;
    --ok: #16a34a;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1020;
        --surface: #121a30;
        --text: #e7ecf6;
        --muted: #93a0bb;
        --line: #232d4a;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3vw + 1rem, 2.6rem); }
h2 { font-size: 1.5rem; margin-top: 1.6em; }
h3 { font-size: 1.1rem; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); font-size: 1.15rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.header-search { flex: 1; display: flex; max-width: 520px; margin-left: auto; }
.header-search input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 9px 14px; border-radius: 999px 0 0 999px; font: inherit; }
.header-search button { border: 0; background: var(--brand); color: #fff; padding: 0 18px; border-radius: 0 999px 999px 0; font: inherit; font-weight: 600; cursor: pointer; }
.main-nav { display: flex; gap: 16px; }
.main-nav a { color: var(--text); font-weight: 600; }
.main-nav { align-items: center; }
.dd { position: relative; }
.dd summary { list-style: none; cursor: pointer; font-weight: 600; padding: 8px 2px; display: flex; align-items: center; gap: 6px; }
.dd summary::-webkit-details-marker { display: none; }
.dd summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.dd[open] summary::after { transform: rotate(225deg); }
.dd-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: min(340px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.dd-panel ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; max-height: 60vh; overflow-y: auto; }
.dd-panel li a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
.dd-panel li a:hover { background: var(--bg); text-decoration: none; }
.dd-all { display: block; margin-top: 8px; padding: 8px 10px; border-top: 1px solid var(--line); font-weight: 600; }

.hero { background: radial-gradient(1200px 400px at 80% -10%, rgba(6, 182, 212, .35), transparent), linear-gradient(135deg, #312e81, #4f46e5 55%, #0891b2); color: #fff; padding: clamp(40px, 8vw, 96px) 0; }
.hero-inner { max-width: 820px; }
.hero h1 { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; opacity: .85; margin: 0 0 12px; }
.lead { font-size: 1.15rem; opacity: .92; margin: 0 0 24px; }
.hero-search { display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 999px; box-shadow: var(--shadow); max-width: 680px; }
.hero-search input { flex: 1; min-width: 0; border: 0; padding: 12px 18px; font: inherit; background: transparent; color: #0f172a; outline: none; }
.hero-search .btn { border-radius: 999px; padding-inline: 26px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; }
.chip { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-size: .9rem; border: 1px solid rgba(255, 255, 255, .28); }
.chip:hover { background: rgba(255, 255, 255, .28); text-decoration: none; }
.chip-sm { background: var(--bg); color: var(--brand); border-color: var(--line); padding: 2px 10px; font-size: .8rem; margin-left: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }
.is-disabled { opacity: .45; pointer-events: none; }

.section { padding: 40px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s ease; }
.card:hover { transform: translateY(-3px); }
.card-link { display: block; color: inherit; height: 100%; }
.card-link:hover { text-decoration: none; }
.card-media { position: relative; aspect-ratio: 3 / 2; background: linear-gradient(135deg, #c7d2fe, #a5f3fc); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--line); color: var(--text); }
.badge-deal { position: absolute; left: 10px; top: 10px; background: #f59e0b; color: #111; max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-confirmed { background: #dcfce7; color: #166534; }
.badge-pending, .badge-partial, .badge-refund_requested { background: #fef3c7; color: #78350f; }
.badge-refunded { background: #dbeafe; color: #1e3a8a; }
.badge-cancelled, .badge-failed { background: #fee2e2; color: #991b1b; }
.card-body { padding: 14px 16px 16px; }
.card-place { margin: 0; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.card-title { margin: 4px 0 6px; font-size: 1.05rem; }
.card-text { margin: 0 0 10px; color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin: 0; }
.price { font-weight: 800; font-size: 1.1rem; }
.price small { font-weight: 500; color: var(--muted); font-size: .75rem; }
.price-lg { font-size: 1.7rem; margin: 0 0 8px; }

.dest-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.dest { display: block; padding: 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.dest:hover { text-decoration: none; background: linear-gradient(135deg, rgba(79, 70, 229, .1), rgba(6, 182, 212, .1)); }
.dest-name { display: block; font-weight: 700; }
.dest-count { color: var(--muted); font-size: .85rem; }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 0; }
.steps li { counter-increment: s; background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 10px; }
.steps p { margin: 0; color: var(--muted); }

.page-head { padding: 28px 0 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a + a::before, .crumbs a + span::before { content: "/"; margin-right: 6px; color: var(--muted); }
.layout-sidebar { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding-bottom: 40px; }
.layout-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding-bottom: 48px; align-items: start; }
.filters form, .side-card, .booking section, .error-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.filters label, .form-grid label, .side-card label { display: block; font-size: .85rem; font-weight: 600; margin: 12px 0 4px; }
input, select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.side { position: sticky; top: 76px; }
.side-card img { border-radius: 10px; margin: 8px 0; }
.hero-img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.prose :where(p, ul, ol) { margin: .6em 0; }
.prose img { border-radius: 10px; }
.ticks { list-style: none; padding: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg); }
.notice { background: #fef3c7; color: #78350f; border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.product-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.product-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--surface); padding: 16px 18px; border-radius: var(--radius); box-shadow: var(--shadow); }
.product-row h3 { margin: 0 0 4px; }
.product-row p { margin: 0; }
.product-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.faq { background: var(--surface); border-radius: 10px; padding: 12px 16px; margin: 8px 0; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; word-break: break-word; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 28px; }
.empty { text-align: center; padding: 48px 0; }

.booking { display: grid; gap: 18px; margin-top: 24px; }
.booking section h2 { margin-top: 0; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-head h2 { margin: 0; font-size: 1.2rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-cell { min-height: 68px; border: 1px solid var(--line); border-radius: 10px; padding: 5px 7px; background: var(--surface); display: flex; flex-direction: column; text-align: left; font: inherit; color: var(--text); }
.cal-out { background: transparent; border-color: transparent; }
.cal-off { background: var(--bg); color: var(--muted); opacity: .75; }
.cal-on { cursor: pointer; border-color: var(--brand); }
.cal-on:hover { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.cal-on.is-selected { background: var(--brand); color: #fff; }
.cal-num { font-weight: 700; }
.cal-price { font-size: .75rem; }
.cal-note { font-size: .7rem; }
.slots { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.slots label { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.slots input { width: auto; margin-right: 6px; }
.offer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.offer-row:last-child { border-bottom: 0; }
.offer-row select { width: 84px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.traveller { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 4px; }
.book-bar { position: sticky; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--surface); padding: 14px 18px; border-radius: var(--radius); box-shadow: 0 8px 30px rgba(15, 23, 42, .25); }
.error { color: var(--danger); font-weight: 600; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.error-box pre { background: var(--bg); padding: 12px; border-radius: 10px; overflow: auto; font-size: .8rem; }

.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-row p { margin: 6px 0 0; color: var(--muted); max-width: 420px; }

.main-nav a, .footer-row a, .crumbs a, .section-head a { display: inline-block; padding: 8px 2px; }
.chip-sm { padding: 6px 12px; }
@media (max-width: 900px) {
    .layout-sidebar, .layout-main { grid-template-columns: 1fr; }
    .side { position: static; }
    .header-row { flex-wrap: wrap; }
    .header-search { order: 3; max-width: none; flex-basis: 100%; }
}
@media (max-width: 560px) {
    .cal-cell { min-height: 54px; padding: 3px 4px; }
    .cal-price { font-size: .62rem; }
    .product-row { flex-direction: column; align-items: flex-start; }
    .hero-search { border-radius: 18px; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.header-search, .hero-search { position: relative; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; margin: 0; padding: 6px; list-style: none; background: var(--surface, #fff); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); max-height: 70vh; overflow-y: auto; text-align: left; }
.suggest li a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.suggest li.is-active a, .suggest li a:hover { background: var(--bg); }
.suggest img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; background: var(--line); }
.suggest span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.suggest strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest small { color: var(--muted, #64748b); }
.suggest em { font-style: normal; font-weight: 600; white-space: nowrap; color: var(--brand); }
.suggest .suggest-all a { justify-content: center; color: var(--brand); font-weight: 600; }
.suggest .suggest-empty { padding: 10px; color: var(--muted, #64748b); }

.narrow { max-width: 560px; }
.narrow-wide { max-width: 760px; }
.card-form { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-form label, .setting label { display: grid; gap: 6px; font-weight: 600; }
.card-form input, .setting input:not([type=checkbox]), .setting select { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); width: 100%; }
.settings-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 18px; box-shadow: var(--shadow); }
.settings-group h2 { margin-top: 0; }
.setting { display: grid; gap: 4px; margin-bottom: 14px; }
.setting .check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.setting .help { margin: 0; color: var(--muted); font-size: .88rem; }
.setting.has-error input, .setting.has-error select { border-color: var(--danger); }
.field-error { margin: 0; color: var(--danger); font-size: .9rem; }
.settings-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; gap: 12px; }
.test-result { margin-left: 8px; font-size: .92rem; }
.test-result.is-ok { color: var(--ok); }
.test-result.is-bad { color: var(--danger); }
.notice.ok { background: #dcfce7; color: #14532d; }
.notice.error { background: #fee2e2; color: #7f1d1d; }

.log-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.log-filter input, .log-filter select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.log-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.log-table td { white-space: normal; vertical-align: top; }
.log-table .log-msg { word-break: break-word; min-width: 320px; }
.log-table pre { max-height: 320px; overflow: auto; background: var(--bg); padding: 10px; border-radius: 8px; font-size: .8rem; white-space: pre-wrap; }
.log-error, .log-critical { background: #fee2e2; color: #991b1b; }
.log-warning { background: #fef3c7; color: #78350f; }
.log-notice { background: #dbeafe; color: #1e3a8a; }
.log-row-error, .log-row-critical { background: rgba(254, 226, 226, .35); }

.admin-nav { display: flex; gap: 16px; padding-top: 14px; font-weight: 600; }

.legal { max-width: 760px; padding-bottom: 48px; line-height: 1.7; }
.legal h2 { margin: 28px 0 8px; font-size: 1.2rem; }
.legal p { margin: 0 0 12px; }
.agree { margin: 12px 0; font-size: .95rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; border-radius: 8px; display: block; }
.gallery figcaption { font-size: .85rem; color: var(--muted, #666); margin-top: 4px; }

.status-table { width: 100%; border-collapse: collapse; margin: 16px 0 28px; }
.status-table th, .status-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.pill-ok { background: #dff3e3; color: #14532d; }
.pill-bad { background: #fde2e1; color: #7f1d1d; }
.pill-info { background: #e6edf7; color: #1e3a5f; }

input[type=checkbox], input[type=radio] { width: auto; padding: 0; }
.card-form input[type=checkbox], .card-form input[type=radio] { width: auto; padding: 0; }
