/* ==========================================================================
   Tourist Destination Picker — the split-flap departures board (Geography)
   Only page on departures-board-engine.js. A dark airport board: press the
   button, the flaps clatter through letters and lock left-to-right to spell one
   destination, the poster lights up and the gate is called.
   ⚠️ It is a set of tiny per-letter reels reading OUT a name, NOT a pointer on a
   loop — that keeps it from being a wheel in disguise.
   Page chrome is theme-aware (var(--theme-*)); the board, the flaps and the
   amber stay fixed — they are physical objects, not themed surfaces.
   ⚖️ Original artwork only: a generic board + one plain landmark silhouette per
   destination. No photos, no logos.
   ========================================================================== */
.page-tourist-destination-picker {
    --dep-primary: #2f6d80;
    --dep-accent: #e0a43b;
    --dep-grad: linear-gradient(135deg, #eab54a, #2f6d80);
    --dep-ink: var(--theme-text, #1f2430);
    /* ⚠️ --theme-muted, NOT --theme-text-muted (undefined). */
    --dep-muted: var(--theme-muted, #6b7280);
    --dep-surface: var(--theme-surface, #ffffff);
    --dep-border: var(--theme-border, #e5e7eb);
    --dep-display: 'Georgia', 'Times New Roman', serif;
    --dep-mono: 'DejaVu Sans Mono', 'Menlo', 'Consolas', 'Courier New', monospace;
    --dep-plate: #f2ede1;
}

/* ---- Ambient backdrop --------------------------------------------------- */
.page-tourist-destination-picker::before {
    content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(1040px 560px at 8% -6%, rgba(47, 109, 128, 0.16), transparent 60%),
        radial-gradient(920px 520px at 94% 2%, rgba(224, 164, 59, 0.13), transparent 62%),
        radial-gradient(880px 620px at 50% 108%, rgba(16, 28, 40, 0.14), transparent 60%);
}

/* ---- Stage -------------------------------------------------------------- */
.page-tourist-destination-picker .dep-stage { position: relative; max-width: 600px; margin: 0 auto; }
.page-tourist-destination-picker .dep-stage-wrap { position: relative; }
.page-tourist-destination-picker #depStage { display: block; }
.page-tourist-destination-picker .dep-svg {
    width: 100%; height: auto; display: block; max-height: 72vh; border-radius: 16px;
    filter: drop-shadow(0 14px 34px rgba(8, 14, 20, .55));
}
.page-tourist-destination-picker .dep-fx,
.page-tourist-destination-picker .dep-plate { pointer-events: none; }

/* ---- Board text --------------------------------------------------------- */
.page-tourist-destination-picker .dep-head {
    fill: var(--dep-accent); font-family: var(--dep-mono); font-weight: 700;
    font-size: 15px; letter-spacing: .18em; text-anchor: middle;
}
.page-tourist-destination-picker .dep-sub {
    fill: #8aa0ad; font-family: var(--dep-mono); font-size: 10px; letter-spacing: .22em; text-anchor: middle;
}
.page-tourist-destination-picker .dep-ch {
    fill: #f4efe4; font-family: var(--dep-mono); font-weight: 700; font-size: 26px; text-anchor: middle;
}
.page-tourist-destination-picker .dep-status {
    fill: var(--dep-accent); font-family: var(--dep-mono); font-weight: 700; font-size: 15px; letter-spacing: .1em;
}
.page-tourist-destination-picker .dep-gate {
    fill: #cfe0e6; font-family: var(--dep-mono); font-weight: 700; font-size: 15px; letter-spacing: .1em;
}
/* the poster window: dark (off), then cream (lit) so the landmark reads */
.page-tourist-destination-picker .dep-win { fill: #0c1620; transition: fill .4s ease; }
.page-tourist-destination-picker .dep-win.is-lit { fill: #f4efe4; }
.page-tourist-destination-picker .dep-winart { transition: opacity .4s ease; }
.page-tourist-destination-picker .dep-fx-spark { mix-blend-mode: screen; }

/* ---- Boarding-pass name plate ------------------------------------------- */
.page-tourist-destination-picker .dep-plate-bg { fill: #f2ede1; stroke: #243447; stroke-width: 2; }
.page-tourist-destination-picker .dep-plate-dot { fill: #0a1219; }
.page-tourist-destination-picker .dep-plate-t {
    text-anchor: middle; fill: #14232e; font-weight: 700;
    font-family: var(--dep-display); letter-spacing: .02em;
}

/* ---- Start overlay ------------------------------------------------------ */
.page-tourist-destination-picker .dep-start-overlay {
    /* sits low over the empty lower board so the "NOW DEPARTING TO" label and
       the blank flap cells stay visible at idle */
    position: absolute; left: 50%; top: 72%; z-index: 3;
    display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 999px;
    padding: .8rem 1.9rem; font-size: 1.02rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    color: #10222c; background: var(--dep-grad); cursor: pointer; box-shadow: 0 12px 30px -8px rgba(8, 24, 34, .95);
    animation: depStartPulse 1.8s ease-in-out infinite;
}
.page-tourist-destination-picker .dep-start-overlay:hover { filter: brightness(1.08); }
.page-tourist-destination-picker .dep-start-overlay[hidden] { display: none; }
@keyframes depStartPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.page-tourist-destination-picker .dep-count { text-align: center; font-size: .9rem; color: var(--dep-muted); margin: .7rem 0 .25rem; }
.page-tourist-destination-picker .dep-count.is-warn { color: var(--dep-primary); font-weight: 700; }
.page-tourist-destination-picker .dep-effects { display: flex; gap: 1.2rem; justify-content: center; margin-top: .5rem; flex-wrap: wrap; }
.page-tourist-destination-picker .dep-effects label { font-size: .85rem; color: var(--dep-muted); display: inline-flex; align-items: center; gap: .35rem; }

/* ---- Result bar --------------------------------------------------------- */
.page-tourist-destination-picker .wsp-result {
    --wsp-result-accent: var(--dep-primary);
    --wsp-result-grad: var(--dep-grad);
    --wsp-result-btn-ink: #10222c;
    --wsp-result-plate: var(--dep-plate);
    --wsp-result-display: var(--dep-display);
    --wsp-result-tint: linear-gradient(135deg, rgba(224, 164, 59, .15), rgba(47, 109, 128, .10));
}

/* ---- Speed slider ------------------------------------------------------- */
.page-tourist-destination-picker .dep-speed { margin: .9rem auto .2rem; max-width: 420px; }
.page-tourist-destination-picker .dep-speed > label {
    display: flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600;
    color: var(--dep-muted); margin-bottom: .4rem;
}
.page-tourist-destination-picker .dep-speed-val { margin-left: auto; font-weight: 800; color: var(--dep-primary); font-variant-numeric: tabular-nums; }
.page-tourist-destination-picker .dep-range {
    -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
    background: rgba(120, 120, 120, .25); outline: none; cursor: pointer;
}
.page-tourist-destination-picker .dep-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
    background: var(--dep-grad); border: 2px solid #fff; box-shadow: 0 2px 6px -1px rgba(8, 24, 34, .8);
}
.page-tourist-destination-picker .dep-range::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%; background: #2f6d80; border: 2px solid #fff;
}
.page-tourist-destination-picker .dep-range-ends {
    display: flex; justify-content: space-between; font-size: .72rem; color: var(--dep-muted);
    opacity: .75; margin-top: .25rem;
}

/* ---- Winner reveal ------------------------------------------------------ */
.page-tourist-destination-picker .dep-modal-img,
.dep-modal-img {
    width: 168px; height: 168px; display: inline-block; object-fit: contain;
    background: #f2ede1; border-radius: 12px; padding: 14px;
    box-shadow: inset 0 0 0 3px rgba(47, 109, 128, .5);
}
.dep-modal-ink {
    width: 168px; height: 168px; display: inline-block;
    background: #f2ede1; border-radius: 12px; padding: 30px;
    box-shadow: inset 0 0 0 3px rgba(47, 109, 128, .5);
}
.dep-modal-ink svg { width: 100%; height: 100%; display: block; }
.page-tourist-destination-picker #winnerName {
    font-family: var(--dep-display); font-weight: 700; letter-spacing: .01em; font-size: 2rem;
}
.page-tourist-destination-picker h1 { letter-spacing: .01em; }

/* ---- Destination chooser grid (settings) -------------------------------- */
.page-tourist-destination-picker .dep-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.page-tourist-destination-picker .dep-chip {
    --chip-c: #2f6d80; position: relative;
    border: 2px solid var(--dep-border); background: var(--dep-surface); border-radius: 10px; padding: .5rem .3rem .4rem;
    cursor: pointer; text-align: center; transition: transform .1s ease, border-color .1s ease, box-shadow .1s ease; opacity: .55;
}
.page-tourist-destination-picker .dep-chip img,
.page-tourist-destination-picker .dep-chip-ink {
    width: 52px; height: 52px; display: block; margin: 0 auto .25rem; object-fit: contain;
    background: var(--dep-plate); border-radius: 8px; padding: 5px;
    box-shadow: inset 0 0 0 1.5px rgba(47, 109, 128, .35);
}
.page-tourist-destination-picker .dep-chip-ink svg { width: 100%; height: 100%; display: block; }
.page-tourist-destination-picker .dep-chip-t { font-size: .66rem; font-weight: 700; color: var(--dep-ink); display: block; line-height: 1.15; }
.page-tourist-destination-picker .dep-chip:hover { transform: translateY(-2px); border-color: var(--chip-c); }
.page-tourist-destination-picker .dep-chip.is-on { opacity: 1; border-color: var(--chip-c); box-shadow: 0 6px 16px -10px var(--chip-c); }
.page-tourist-destination-picker .dep-chip.is-custom { opacity: 1; border-style: dashed; border-color: var(--chip-c); }
.page-tourist-destination-picker .dep-chip-x {
    position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--dep-primary); color: #fff; font-size: 13px; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 2px 5px -1px rgba(0, 0, 0, .4);
}
.page-tourist-destination-picker .dep-custom-row { display: flex; gap: .4rem; margin-top: .6rem; }
.page-tourist-destination-picker .dep-custom-row input {
    flex: 1 1 auto; border: 1px solid var(--dep-border); border-radius: 10px; padding: .5rem .7rem; font-size: .9rem;
    background: var(--dep-surface); color: var(--dep-ink);
}
.page-tourist-destination-picker .dep-custom-row button { border: 0; border-radius: 10px; padding: .5rem .9rem; font-weight: 700; color: #10222c; background: var(--dep-grad); cursor: pointer; }

/* ---- SEO content section ------------------------------------------------
   Colour + accents ONLY. Type scale comes from .content-guide on the wrapper. */
.page-tourist-destination-picker .dep-content {
    color: var(--dep-ink);
    background: linear-gradient(180deg, #ffffff 0%, #eef4f5 100%);
    padding: 3.5rem 0 3.75rem; margin-top: 1rem;
    border-top: 1px solid var(--dep-border);
}
body[data-theme].page-tourist-destination-picker .dep-content { background: var(--theme-bg); }
.page-tourist-destination-picker .dep-inner { max-width: 860px; margin: 0 auto; padding: 0 1rem; }
.page-tourist-destination-picker .dep-content h2,
.page-tourist-destination-picker .dep-content h3 { color: var(--dep-ink); }
.page-tourist-destination-picker .dep-content p,
.page-tourist-destination-picker .dep-content li { color: var(--dep-muted); }
.page-tourist-destination-picker .dep-content strong { color: var(--dep-ink); }
.page-tourist-destination-picker .dep-content em { color: var(--dep-ink); font-style: italic; }
.page-tourist-destination-picker .dep-content a { color: var(--dep-primary); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.page-tourist-destination-picker .dep-content a:hover { color: #1f4a5a; }

.page-tourist-destination-picker .dep-kicker {
    display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: #10222c; background: var(--dep-grad); border-radius: 999px; padding: .3rem .85rem; margin-bottom: .85rem;
}
.page-tourist-destination-picker .dep-lead { font-size: 1.2rem; line-height: 1.7; color: var(--dep-ink); }
.page-tourist-destination-picker .dep-section { margin-top: 3rem; }
.page-tourist-destination-picker .dep-list { margin: .4rem 0 0; padding-left: 1.15rem; }

/* ---- Signature section shape: a row of boarding-pass "tickets", distinct
   from the HP shapes (ledger / deck / map-stops / shelf / field-guide). ----- */
.page-tourist-destination-picker .dep-tickets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; margin-top: 1.4rem; }
.page-tourist-destination-picker .dep-ticket {
    display: flex; background: var(--dep-surface); border: 1px solid var(--dep-border);
    border-radius: 10px; overflow: hidden;
}
.page-tourist-destination-picker .dep-ticket-stub {
    flex: 0 0 46px; background: var(--dep-grad); color: #10222c;
    display: grid; place-items: center; font-family: var(--dep-mono); font-weight: 800; font-size: 1.1rem;
    border-right: 2px dashed rgba(255,255,255,.55);
}
.page-tourist-destination-picker .dep-ticket-body { padding: .8rem .95rem; }
.page-tourist-destination-picker .dep-ticket-body h3 { margin: 0 0 .25rem !important; font-size: 1.02rem !important; }
.page-tourist-destination-picker .dep-ticket-body p { margin: 0; font-size: .9rem; }

/* signature asset — the 18-row destinations table */
.page-tourist-destination-picker .dep-table-wrap { overflow-x: auto; margin-top: 1.4rem; }
.page-tourist-destination-picker .dep-ctab { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .95rem; }
.page-tourist-destination-picker .dep-ctab thead th {
    text-align: left; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; font-weight: 800;
    color: #10222c; background: var(--dep-accent); padding: .7rem 1rem;
}
.page-tourist-destination-picker .dep-ctab tbody td { padding: .7rem 1rem; border-bottom: 1px solid var(--dep-border); vertical-align: top; }
.page-tourist-destination-picker .dep-ctab tbody tr:nth-child(even) { background: rgba(47, 109, 128, .05); }
.page-tourist-destination-picker .dep-ctab tbody td:first-child { font-weight: 700; color: var(--dep-ink); white-space: nowrap; }

.page-tourist-destination-picker .dep-callout {
    margin-top: 1.4rem; border-left: 4px solid var(--dep-primary); border-radius: 0 12px 12px 0;
    background: rgba(47, 109, 128, .08); padding: 1rem 1.15rem;
}
.page-tourist-destination-picker .dep-callout p { margin: 0; }

.page-tourist-destination-picker .dep-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.4rem; }
.page-tourist-destination-picker .dep-pair-card {
    background: var(--dep-surface); border: 1px solid var(--dep-border); border-radius: 12px;
    padding: 1rem 1.1rem; border-top: 3px solid var(--dep-accent);
}
.page-tourist-destination-picker .dep-pair-card h3 { margin-top: 0 !important; font-size: 1.02rem !important; }
.page-tourist-destination-picker .dep-pair-card p:last-child { margin-bottom: 0; font-size: .9rem; }

@media (max-width: 767.98px) {
    .page-tourist-destination-picker .dep-pair { grid-template-columns: 1fr; }
    .page-tourist-destination-picker .dep-content { padding: 2.5rem 0 2.75rem; }
}
