/* Map + dock layout (js/map-dock.js). Copied from the demo
   /static/app-published-v3-preview.html; everything is under body.md-on, so
   with the switch off nothing changes. */
body.md-on {
    --md-navy: #14213d; --md-gold: #C99A2E; --md-go: #D9483B; --md-soft: #6f6a60; --md-line: #e4dfd4;
    --md-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── the old chrome steps aside ─────────────────────────────────────────── */
body.md-on #tabBar,
body.md-on #fabMenuWrapper,
body.md-on #dep-cadence-rail { display: none !important; }
body.md-on #tab-departures { z-index: 0; }

/* ── the dock: four buttons, Departures first and biggest ──────────────── */
.md-dock { display: none; }
body.md-on .md-dock {
    position: fixed; left: 12px; right: 12px; bottom: max(14px, env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; z-index: 210;
    display: grid; grid-template-columns: 1.9fr 1fr 1fr 1fr; gap: 6px; background: rgba(255, 255, 255, .96); border-radius: 26px; padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22); transition: transform .3s, opacity .3s;
    font-family: var(--font-ui, Figtree, system-ui, sans-serif);
}
.md-dk { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 62px; border-radius: 20px;
    font: 700 11.5px var(--font-ui, Figtree, sans-serif); color: #1a1a1a; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.md-dk .ic { font-size: 22px; line-height: 1; }
.md-dk.dep { background: var(--md-navy); color: #fff; flex-direction: row; justify-content: flex-start; gap: 7px; padding: 0 7px; overflow: hidden; }
.md-dk.dep .ic { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--md-gold); display: grid; place-items: center; font-size: 20px; }
.md-dk.dep .tx { min-width: 0; }
.md-dk.dep b { display: block; font-size: 12px; font-weight: 800; letter-spacing: .01em; text-align: left; }
.md-dk.dep small { display: block; white-space: nowrap; font-size: 11px; opacity: .75; font-weight: 600; text-align: left; }
.md-dk:active { transform: scale(.95); }
.md-dk.on:not(.dep) { background: #efe9dc; }
.md-dk .dot { position: absolute; top: 6px; right: calc(50% - 22px); min-width: 18px; height: 18px; border-radius: 99px; background: var(--md-go); color: #fff;
    font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 0 2px #fff; }
.md-dk .dot[hidden] { display: none; }
.md-dk.dep .dot { left: 30px; right: auto; box-shadow: 0 0 0 2px var(--md-navy); }
body.md-on.md-open .md-dock { transform: translateY(140%); opacity: 0; pointer-events: none; }

/* ── the pop-up: drops in from the top like a notification ─────────────── */
#md-scrim, #md-pop { display: none; }
body.md-on #md-scrim { display: block; position: fixed; inset: 0; background: rgba(10, 15, 30, .3); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 3490; }
body.md-on.md-open #md-scrim { opacity: 1; pointer-events: auto; }
body.md-on #md-pop {
    display: flex; flex-direction: column; overflow: hidden;
    position: fixed; left: 10px; right: 10px; top: max(10px, env(safe-area-inset-top)); bottom: max(16px, env(safe-area-inset-bottom));
    max-width: 560px; margin: 0 auto; background: var(--paper, #F4F1EA); border-radius: 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); z-index: 3500;
    transform: translateY(calc(-100% - 30px)) scale(.96); transition: transform .5s cubic-bezier(.2, 1.25, .4, 1);
    visibility: hidden;
    font-family: var(--font-ui, Figtree, system-ui, sans-serif); color: #1a1a1a;
}
body.md-on.md-open #md-pop { transform: none; visibility: visible; }
body.md-on.md-closing #md-pop { visibility: visible; transition: transform .3s cubic-bezier(.5, 0, .8, .2); }
.md-note { display: flex; align-items: center; gap: 12px; padding: 14px 16px 13px; background: var(--nc, #14213d); color: #fff; flex: none; touch-action: none; position: relative; }
.md-note .ic { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 19px; flex: none; }
.md-note .t { flex: 1; min-width: 0; }
.md-note b { display: block; font-size: 13px; font-weight: 800; letter-spacing: .14em; }
.md-note small { display: block; font-size: 14px; font-weight: 600; opacity: .88; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-note .x { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; flex: none; border: 0; cursor: pointer; font-size: 15px; }
.md-note::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 34px; height: 4px; margin-left: -17px; border-radius: 9px; background: rgba(255, 255, 255, .3); }
.md-body { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; position: relative; }
#md-dep { padding: 6px 16px 26px; }
#md-dep[hidden] { display: none; }
.md-panel { animation: md-in .25s; }
@keyframes md-in { from { opacity: 0; transform: translateX(14px); } }
.md-loading { padding: 30px; text-align: center; color: var(--md-soft); font-size: 14px; }

/* The real Baggage / Duty Free panels, moved inside the pop-up. */
body.md-on #md-body > .tab-panel { position: relative; inset: auto; padding: 8px 14px 26px; overflow: visible; min-height: 100%; background: none !important; }
body.md-on #md-body > .tab-panel:not(.active) { display: none !important; }
body.md-on #md-body #tab-shop .shop-header > h1,
body.md-on #md-body #tab-shop .shop-header > .tech-text { display: none; }

/* ── split-flap board ──────────────────────────────────────────────────── */
#md-dep .board { background: #101418; border-radius: 18px; padding: 12px 10px 10px; margin-top: 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
#md-dep .bhead { display: flex; justify-content: space-between; align-items: center; color: #ffcf5a; font: 800 12px var(--md-mono); letter-spacing: .16em; padding: 0 2px 10px; }
#md-dep .bhead span:last-child { color: #9aa4ad; }
#md-dep .bcols { display: grid; grid-template-columns: 5px 1fr auto; gap: 8px; color: #6c7781; font: 800 9px var(--md-mono); letter-spacing: .14em; padding: 0 2px 6px; border-bottom: 1px solid #222a31; margin-bottom: 6px; }
#md-dep .brow { display: grid; grid-template-columns: 5px 1fr auto; gap: 8px; align-items: center; padding: 4px 2px; width: 100%; text-align: left; border-radius: 8px; cursor: pointer; }
#md-dep .brow:active { background: #1b2229; }
#md-dep .gate { width: 5px; height: 20px; border-radius: 3px; }
#md-dep .cells { display: flex; gap: 1.5px; overflow: hidden; }
#md-dep .c { flex: none; width: 11px; height: 20px; background: #1d242b; border-radius: 2.5px; color: #f4f0e6; font: 800 12.5px/20px var(--md-mono); text-align: center; position: relative; overflow: hidden; }
#md-dep .c::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .55); }
#md-dep .c.f { animation: md-flap .07s linear; }
@keyframes md-flap { 0% { transform: scaleY(1); } 50% { transform: scaleY(.15); filter: brightness(1.6); } 100% { transform: scaleY(1); } }
#md-dep .st .c { color: #ffcf5a; }
#md-dep .st.board-on .c { color: #7ee08f; }
#md-dep .st.arr .c { color: #8fb7ff; }
#md-dep .bkey { display: flex; gap: 12px; color: #8a949d; font: 800 9px var(--md-mono); letter-spacing: .12em; padding: 10px 2px 0; }
#md-dep .bkey .r { margin-left: auto; color: #8fb7ff; }
#md-dep .bkey2 { color: #6c7781; font: 800 9px var(--md-mono); letter-spacing: .12em; padding: 8px 2px 0; }

/* ── collections ───────────────────────────────────────────────────────── */
#md-dep .md-h { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--md-soft); margin: 20px 2px 10px; }
#md-dep .md-h small { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; }
#md-dep .md-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
#md-dep .tile { background: #fff; border-radius: 18px; overflow: hidden; text-align: left; display: flex; flex-direction: column; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
#md-dep .tile .band { height: 74px; background: var(--c); display: flex; align-items: center; justify-content: center; position: relative; }
#md-dep .tile .band img { width: 58px; height: 58px; object-fit: contain; margin: 0 -8px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
#md-dep .tile .band .none { font-size: 30px; font-weight: 900; color: rgba(255, 255, 255, .85); }
#md-dep .tile .flag { position: absolute; top: 7px; right: 7px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; background: #fff; color: var(--md-go); border-radius: 6px; padding: 2px 6px; }
#md-dep .tile .t { padding: 9px 11px 11px; }
#md-dep .tile b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#md-dep .tile small { display: block; font-size: 12px; color: var(--md-soft); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#md-dep .tile small.ct { margin-top: 6px; font-weight: 700; color: #1a1a1a; }
#md-dep .md-more { display: block; width: 100%; margin-top: 12px; padding: 13px; border-radius: 14px; background: #fff; font: 700 14.5px inherit; border: 0; cursor: pointer; color: inherit; }
#md-dep .md-back { display: inline-flex; align-items: center; gap: 6px; font: 700 14.5px inherit; margin: 12px 0 2px; color: var(--md-soft); background: none; border: 0; cursor: pointer; }

/* ── the passport: the real full-screen book, dock still showing ───────── */

/* ── the real header, as the demo's floating chips over the map ────────── */
body.md-on #currency-header,
body.md-on #nv-strip {
    background: transparent !important; border-bottom: 0 !important; box-shadow: none !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    pointer-events: none;
}
body.md-on #currency-header > *, body.md-on #nv-strip > * { pointer-events: auto; }
body.md-on #currency-header .profile-btn,
body.md-on #currency-header .currency-pair,
body.md-on #currency-header .header-help-btn,
body.md-on #currency-header .header-boost-btn {
    background: rgba(255, 255, 255, .95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15) !important;
    border-color: transparent !important;
}
body.md-on #nv-strip .nv-tick { box-shadow: 0 3px 10px rgba(0, 0, 0, .2); }
/* While a pop-up is open the header and ticker step back, as in the demo. */
body.md-on.md-open #currency-header, body.md-on.md-open #nv-strip { opacity: 0; transition: opacity .2s; }

/* Find-me button sits above the dock. */
body.md-on #dep5-locate { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 88px) !important; }
#md-dep .bkey2 { letter-spacing: .06em; }

/* Passport over the map: its own paper, and the book stops above the dock. */
body.md-on:not([data-mdv="map"]) #dep5-locate { display: none !important; }

/* The real passport book inside the pop-up: it fills the space exactly, so
   the book sizes itself to it (passport-tab.js sizeBook). */
body.md-on #md-body > #tab-passport.active { height: 100%; min-height: 0; padding: 6px 8px 10px; display: flex; flex-direction: column; overflow: hidden; }

/* ── every app window (YOUR MILES, your profile, settings…) drops in like the demo's pop-up ── */
body.md-on .dpad-modal { background: rgba(10, 15, 30, .3) !important; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
body.md-on .dpad-modal > .modal-container {
    position: fixed !important; left: 10px; right: 10px; top: max(10px, env(safe-area-inset-top)); bottom: max(16px, env(safe-area-inset-bottom));
    width: auto !important; max-width: 560px !important; height: auto !important; max-height: none !important; margin: 0 auto !important;
    border-radius: 28px !important; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35) !important; border: 0 !important;
    animation: md-modal-drop .5s cubic-bezier(.2, 1.25, .4, 1) both !important;
}
body.md-on .dpad-modal > .modal-container.modal-container--compact { bottom: auto; max-height: calc(100% - 40px) !important; }
@keyframes md-modal-drop { from { transform: translateY(calc(-100% - 30px)) scale(.96); } to { transform: none; } }
body.md-on .dpad-modal .modal-header {
    background: var(--md-nc, #14213d) !important; border-bottom: 0 !important; padding: 14px 16px 13px !important; position: relative; flex: none;
}
body.md-on .dpad-modal .modal-header::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 34px; height: 4px; margin-left: -17px; border-radius: 9px; background: rgba(255, 255, 255, .3); }
body.md-on .dpad-modal .modal-title { color: #fff !important; font: 800 13px var(--font-ui, Figtree, sans-serif) !important; letter-spacing: .14em !important; }
body.md-on .dpad-modal .modal-close {
    width: 32px !important; height: 32px !important; border: 0 !important; border-radius: 50%; background: rgba(255, 255, 255, .16) !important; color: #fff !important; font-size: 20px !important; transform: none !important;
}
body.md-on #history-modal { --md-nc: #1f5f8b; }
body.md-on #passport-id-modal { --md-nc: #2b3a55; }

/* ── Passport in the pop-up like Baggage / Duty Free, WITHOUT shrinking the book
   (2026-11-22, user's ask). The book was small because three headers sat over it:
   the band, the passport's own PASSPORT row and the labelled Share/Add/Edit. The
   band says PASSPORT now, so that row becomes a thin strip of small round buttons. ── */
body.md-on #md-body > #tab-passport.active { padding: 2px 4px 6px; }
body.md-on #md-body #tab-passport .stamp-header { min-height: 0 !important; height: 46px; padding: 0 6px !important; margin: 0 !important; position: relative; display: flex; align-items: center; justify-content: flex-end; }
body.md-on #md-body #tab-passport .stamp-header > h1 { display: none !important; }
body.md-on #md-body #tab-passport .stamp-header .stamp-tool-label { display: none !important; }
body.md-on #md-body #tab-passport .stamp-header .stamp-tool-btn { width: 38px !important; height: 38px !important; min-width: 0 !important; padding: 0 !important; margin: 0 0 0 6px !important; }
body.md-on #md-body #tab-passport .stamp-header .stamp-tool-btn.is-labelled { flex-direction: row !important; }
body.md-on #md-body #tab-passport .stamp-header .pp-share { left: 6px !important; margin: 0 !important; }
body.md-on #md-body #tab-passport .stamp-header .stamp-tool-ico { width: 38px !important; height: 38px !important; }
body.md-on #md-body #tab-passport .stamp-header .stamp-tool-ico svg { width: 20px; height: 20px; }

/* ── No boost strip on the map layout (2026-11-22, user: "too much"): the ×2 tag
   on the Miles chip says a boost is on; the coin chip opens the details. ── */
body.md-on.boost-flight { --header-height: 72px; }
body.md-on .bf-strip { display: none !important; }

/* ── YOUR MILES (2026-11-22, user's call): no D-PAD circle for now; the balance is
   the demo's split-flap (dark board, cells with the hinge line). ── */
body.md-on #history-modal .stmt-ring { display: none !important; }
body.md-on #history-modal #splitFlap { display: none !important; }
body.md-on #history-modal .history-balance { padding-top: 18px !important; min-height: 0 !important; }
.md-mbd { display: none; }
body.md-on .md-mbd { display: inline-flex; align-items: center; gap: 3px; background: #101418; border-radius: 16px; padding: 12px 14px; margin: 8px auto 4px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 0 8px 20px rgba(0, 0, 0, .18); }
body.md-on .md-mbd .c { flex: none; width: 30px; height: 46px; background: #1d242b; border-radius: 5px; color: #f4f0e6; font: 800 30px/46px var(--md-mono, 'JetBrains Mono', monospace);
    text-align: center; position: relative; overflow: hidden; }
body.md-on .md-mbd .c::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .6); }
body.md-on .md-mbd .c.f { animation: md-flap .07s linear; }
body.md-on .md-mbd .sep { color: #6c7781; font: 800 26px var(--md-mono, monospace); margin: 0 1px; align-self: flex-end; }
body.md-on .md-mbd .u { color: #ffcf5a; font: 800 11px var(--md-mono, monospace); letter-spacing: .16em; margin-left: 8px; writing-mode: vertical-rl; transform: rotate(180deg); }

/* ── dock symbols (line-art, not emoji) ── */
.md-svg { width: 26px; height: 26px; display: block; }
.md-dk:not(.dep) .ic { color: #1a2440; }
.md-dk.dep .ic.two { position: relative; width: 42px; height: 42px; color: var(--md-navy, #14213d); }
.md-dk.dep .ic.two .md-svg { position: absolute; width: 21px; height: 21px; }
.md-dk.dep .ic.two .md-svg:first-child { left: 4px; top: 4px; }
.md-dk.dep .ic.two .md-svg:last-child { right: 4px; bottom: 5px; }
body.md-on .md-dk.dep .dot { left: 36px; right: auto; top: 3px; }
body.md-on .md-dk.dep b { font-size: 11.5px; letter-spacing: 0; }
body.md-on[data-mdv="pass"] .md-dk[data-md="pass"] .alt .ic { display: block !important; }

/* ── Passport = JUST the book over the map (2026-11-22, user: "no modal, just the
   book"). The pop-up loses its paper, band and corners; the map dims behind; the
   book drops in on its own with its buttons floating round it. ── */
body.md-on[data-mdv="pass"] #md-pop {
    left: 0; right: 0; max-width: none; background: transparent; box-shadow: none; border-radius: 0;
    top: max(8px, env(safe-area-inset-top)); bottom: max(8px, env(safe-area-inset-bottom));
}
body.md-on[data-mdv="pass"] #md-pop .md-note { display: none; }
body.md-on[data-mdv="pass"] #md-scrim { background: rgba(8, 12, 24, .62); }
body.md-on #md-body > #tab-passport.active { background: transparent !important; padding: 0 6px 4px; }
body.md-on[data-mdv="pass"] #md-body { overflow: hidden; }
body.md-on #md-body #tab-passport .pp-tlbl { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
body.md-on #md-body #tab-passport .stamp-header .md-ppx {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #1a1a1a;
    font: 700 17px var(--font-ui, Figtree, sans-serif); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); cursor: pointer;
}
.md-ppx { display: none; }
body.md-on .md-ppx { display: block; }

/* ── Departures = an airport screen (option B, 2026-11-22, user's pick) ── */
#md-dep .scr { background: #0b1f4d; border-radius: 16px; overflow: hidden; color: #fff; margin-top: 4px; }
#md-dep .scr .top { display: flex; align-items: center; justify-content: space-between; background: #ffd400; color: #0b1f4d; padding: 10px 12px; }
#md-dep .scr .top b { font-size: 19px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
#md-dep .scr .top .md-svg { width: 22px; height: 22px; }
#md-dep .scr .top > span { font: 800 18px var(--md-mono, 'JetBrains Mono', monospace); }
#md-dep .scr .tabs { display: flex; background: #08173a; }
#md-dep .scr .tabs button { flex: 1; padding: 10px 0; font: 800 13px var(--font-ui, Figtree, sans-serif); color: #8ea2cf; background: none; border: 0; cursor: pointer; }
#md-dep .scr .tabs button.on { color: #fff; box-shadow: inset 0 -3px 0 #ffd400; }
#md-dep .scr .hd, #md-dep .scr .r { display: grid; grid-template-columns: 50px minmax(0, 1fr) 50px 78px; gap: 8px; align-items: center; padding: 0 10px; }
#md-dep .scr .hd { font: 800 10px var(--font-ui, Figtree, sans-serif); letter-spacing: .1em; color: #8ea2cf; padding-top: 8px; padding-bottom: 6px; border-bottom: 1px solid #1d3570; }
#md-dep .scr .hd .rt { text-align: right; }
#md-dep .scr .r { padding-top: 9px; padding-bottom: 9px; cursor: pointer; }
#md-dep .scr .r:nth-of-type(even) { background: #0e2558; }
#md-dep .scr .r:active { background: #17306b; }
#md-dep .scr .tm { font: 800 14px var(--md-mono, monospace); color: #ffd400; }
#md-dep .scr .tm small { display: block; font: 700 9.5px var(--font-ui, Figtree, sans-serif); color: #8ea2cf; white-space: nowrap; }
#md-dep .scr .ds { min-width: 0; display: flex; align-items: center; gap: 7px; }
#md-dep .scr .ds img { width: 28px; height: 28px; border-radius: 50%; background: #fff; object-fit: contain; flex: none; }
#md-dep .scr .ds b { font-size: 14px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#md-dep .scr .gt { border-radius: 6px; text-align: center; font: 800 10.5px var(--md-mono, monospace); padding: 5px 0; letter-spacing: .06em; color: #fff; }
#md-dep .scr .rm { font-size: 12px; font-weight: 800; text-align: right; line-height: 1.15; }
#md-dep .scr .rm small { display: block; font-weight: 600; color: #8ea2cf; font-size: 10.5px; }
#md-dep .scr .rm.ok { color: #5be08a; } #md-dep .scr .rm.warn { color: #ffb84d; } #md-dep .scr .rm.arr { color: #8fb7ff; }
#md-dep .scr .foot { display: flex; justify-content: space-between; padding: 9px 12px; font-size: 11px; color: #8ea2cf; font-weight: 700; }

/* ── Departures: the stamp board (2026-11-23; demo of record
   /static/departures-stamp-board-preview.html) ───────────────────────── */
#md-dep .sb { --cw: 11.6px; --ch: 19px; --cf: 13px; --sbm: 'JetBrains Mono', monospace;
  background: #0d1013; border-radius: 18px; overflow: hidden; color: #f4f0e6; margin-top: 4px; box-shadow: 0 10px 26px rgba(0,0,0,.22); }
#md-dep .sb .top { display: flex; align-items: center; justify-content: space-between; background: #ffd400; color: #0b1f4d; padding: 9px 12px; }
#md-dep .sb .top b { font-size: 19px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
#md-dep .sb .top .md-svg { width: 22px; height: 22px; }
#md-dep .sb .top > span { font: 800 16px var(--sbm); background: #0b1f4d; color: #ffd400; border-radius: 6px; padding: 2px 7px; letter-spacing: .06em; }
#md-dep .sb .tabs { display: flex; background: #080a0c; }
#md-dep .sb .tabs button { flex: 1; padding: 10px 0; font: 800 13px var(--font-ui, Figtree, sans-serif); color: #7d8790; background: none; border: 0; cursor: pointer; }
#md-dep .sb .tabs button.on { color: #fff; box-shadow: inset 0 -3px 0 #ffd400; }
#md-dep .sb-none { padding: 40px 16px; text-align: center; color: #7d8790; font-weight: 700; }
#md-dep .sb-scr { position: relative; height: 240px; overflow: hidden; cursor: pointer; background: #111; }
#md-dep .sb-scr .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
#md-dep .sb-scr .slide.on { opacity: 1; }
#md-dep .sb-scr .bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(26px) saturate(1.3) brightness(.75); transform: scale(1.1); }
#md-dep .sb-scr .slide img { position: absolute; left: 50%; top: 50%; width: 190px; height: 190px; object-fit: contain; transform: translate(-50%,-50%) scale(.96);
  filter: drop-shadow(0 12px 22px rgba(0,0,0,.45)); transition: transform 6.5s linear; }
#md-dep .sb-scr .slide.on img { transform: translate(-50%,-50%) scale(1.04); }
#md-dep .sb-scr .badge, #md-dep .sb-scr .cnt { position: absolute; top: 12px; z-index: 2; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 5px 10px; }
#md-dep .sb-scr .badge { left: 12px; letter-spacing: .14em; display: flex; align-items: center; gap: 6px; }
#md-dep .sb-scr .badge i { width: 7px; height: 7px; border-radius: 50%; background: #ffd400; }
#md-dep .sb-scr .cnt { right: 12px; font-size: 11.5px; }
#md-dep .sb-scr .cnt:empty { display: none; }
#md-dep .sb-scr .nav { position: absolute; top: 50%; z-index: 2; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; font-size: 18px; font-weight: 800; border: 0; cursor: pointer; }
#md-dep .sb-scr .nav.l { left: 8px; } #md-dep .sb-scr .nav.r { right: 8px; }
#md-dep .sb-scr .hint { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; z-index: 2; color: rgba(255,255,255,.8); font-size: 11.5px; font-weight: 700; }
#md-dep .sb-scr .timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.12); z-index: 2; }
#md-dep .sb-scr .timer i { display: block; height: 100%; width: 0; background: #ffd400; }
#md-dep .sb-info { padding: 12px; }
#md-dep .sb .ln { display: flex; gap: 1.5px; perspective: 180px; }
#md-dep .sb .ln + .ln { margin-top: 2px; }
#md-dep .sb .ln.gr { max-height: calc(var(--ch) + 1px); transition: max-height .45s ease, opacity .35s ease, margin-top .45s ease; }
#md-dep .sb .ln.gr.hide { max-height: 0; opacity: 0; margin-top: 0; overflow: hidden; }
#md-dep .sb .lab { font: 800 9.5px var(--sbm); letter-spacing: .14em; color: #6c7781; margin: 10px 0 4px; }
#md-dep .sb .lab:first-child { margin-top: 0; }
#md-dep .sb .lab.rt { text-align: right; }
#md-dep .sb .two { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
#md-dep .sb .task { display: flex; gap: 8px; align-items: flex-start; }
#md-dep .sb .fc { position: relative; flex: none; width: var(--cw); height: var(--ch); font: 800 var(--cf)/var(--ch) var(--sbm); color: #f4f0e6; text-align: center; }
#md-dep .sb .fc > span { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: #1e2429; }
#md-dep .sb .fc > span > i { position: absolute; left: 0; right: 0; height: var(--ch); font-style: normal; line-height: var(--ch); }
#md-dep .sb .fc .t, #md-dep .sb .fc .ft { top: 0; border-radius: 3px 3px 0 0; background: #262c33; }
#md-dep .sb .fc .b, #md-dep .sb .fc .fb { bottom: 0; border-radius: 0 0 3px 3px; background: #1c2126; }
#md-dep .sb .fc .t > i, #md-dep .sb .fc .ft > i { top: 0; }
#md-dep .sb .fc .b > i, #md-dep .sb .fc .fb > i { bottom: 0; }
#md-dep .sb .fc .ft { transform-origin: 50% 100%; z-index: 2; display: none; }
#md-dep .sb .fc .fb { transform-origin: 50% 0; z-index: 2; display: none; transform: rotateX(90deg); }
#md-dep .sb .fc::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -.5px; background: rgba(0,0,0,.75); z-index: 3; }
#md-dep .sb .lv .fc { color: #ffb84d; } #md-dep .sb .lv.soon .fc { color: #ff7a6b; } #md-dep .sb .lv.arr .fc { color: #8fb7ff; }
#md-dep .sb .mi .fc { color: #ffcf5a; }
#md-dep .sb .tag .fc { color: #fff; }
#md-dep .sb .tag .fc::after { background: rgba(0,0,0,.28); }
#md-dep .sb-dots { display: flex; gap: 5px; justify-content: center; padding: 0 0 12px; }
#md-dep .sb-dots:empty { display: none; }
#md-dep .sb-dots i { width: 6px; height: 6px; border-radius: 50%; background: #39414a; transition: width .3s; }
#md-dep .sb-dots i.on { background: #ffd400; width: 16px; border-radius: 99px; }
/* the challenges, folded under the board */
#md-dep .md-chal { margin-top: 12px; }
#md-dep .md-chal-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px; background: none; border: 0; color: #fff; cursor: pointer; text-align: left; font-family: var(--font-ui, Figtree, sans-serif); }
#md-dep .md-chal-h b { font-size: 15px; font-weight: 800; }
#md-dep .md-chal-h small { flex: 1; font-size: 12.5px; font-weight: 600; color: #8ea2cf; }
#md-dep .md-chal-h span { font-size: 20px; color: #8ea2cf; transition: transform .2s; }
#md-dep .md-chal.open .md-chal-h span { transform: rotate(90deg); }
#md-dep .md-chal-b { display: none; border-top: 1px solid #1d3570; }
#md-dep .md-chal.open .md-chal-b { display: block; }
/* Daily / Weekly / Monthly headings (2026-11-25) */
#md-dep .md-chal .gh { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px 9px; background: #08173a; border: 0; border-top: 1px solid #1d3570; color: #fff; cursor: pointer; text-align: left; font-family: var(--font-ui, Figtree, sans-serif); }
#md-dep .md-chal .gh:first-child { border-top: 0; }
#md-dep .md-chal .gh .gn { flex: 1; min-width: 0; }
#md-dep .md-chal .gh .gn b { font: 800 13px var(--md-mono, monospace); letter-spacing: .14em; color: #ffd400; }
#md-dep .md-chal .gh .gn small { display: block; color: #8ea2cf; font-size: 11px; font-weight: 700; margin-top: 1px; }
#md-dep .md-chal .gh .tm { text-align: right; }
#md-dep .md-chal .gh .tm.hot { color: #ff8a5c; }
#md-dep .md-chal .gh .chev { color: #8ea2cf; font-size: 16px; width: 14px; text-align: center; transition: transform .2s; }
#md-dep .md-chal .gh.shut .chev { transform: rotate(-90deg); }
#md-dep .scr .r.nt { grid-template-columns: minmax(0, 1fr) 50px 86px; padding-left: 14px; }
#md-dep .md-chal .gb .r:nth-of-type(even) { background: none; }
#md-dep .md-chal .gb .r:nth-of-type(odd) { background: #0e2558; }
/* the app sets Figtree on everything in the pop-up; the flaps must stay monospace */
#md-dep .sb .fc, #md-dep .sb .fc i { font-family: 'JetBrains Mono', ui-monospace, monospace !important; }

/* ── Passport screen tidy (2026-11-25, user's pick A of /static/passport-screen-tidy-preview.html:
   "the buttons, the empty space above and below"). One dark bar on top (✕ · PASSPORT · Share,
   ＋ add a stamp, ⋯ = Edit / Add a page / Remove this page), one dark pill below (‹ COVER 1 of 6 ›),
   and the book takes the space the old tab bar's padding kept empty (index.html's inline
   #tab-passport padding is !important, so this has to be too). Page − / ＋ only show while editing. ── */
body.md-on[data-mdv="pass"] #md-body > #tab-passport.active { padding: 2px 6px 0 !important; }
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header {
    height: 52px; margin: 2px 2px 8px !important; padding: 0 7px !important; border-radius: 100px;
    background: rgba(20, 26, 46, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3); justify-content: flex-start; gap: 6px; flex: none;
}
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header::before {
    content: "PASSPORT"; position: absolute; left: 60px; top: 50%; transform: translateY(-50%);
    color: #fff; font: 800 12px var(--md-mono, 'JetBrains Mono', monospace); letter-spacing: .12em; pointer-events: none;
}
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header .md-ppx {
    position: static; transform: none; order: 0; margin-right: auto; width: 38px; height: 38px; flex: none;
    background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; font-size: 16px;
}
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header .pp-share { position: static !important; transform: none !important; order: 1; }
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header .stamp-toolbar { order: 2; position: static !important; transform: none !important; display: flex; align-items: center; gap: 6px; margin: 0 !important; }
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header { overflow: visible !important; z-index: 30; }
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header .stamp-tool-btn { margin: 0 !important; }
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header .stamp-tool-btn,
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header .stamp-tool-ico {
    background: rgba(255, 255, 255, .12) !important; color: #fff !important; border: 0 !important; box-shadow: none !important; border-radius: 50% !important;
}
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header #stamp-tool-add,
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header #stamp-tool-add .stamp-tool-ico { background: #FFD93D !important; color: #1a1a1a !important; }
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header #stamp-tool-confirm { background: #27ae60 !important; }
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header #stamp-tool-edit { display: none !important; }
.md-ppm { display: none; }
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header .md-ppm {
    display: grid; place-items: center; width: 38px; height: 38px; font: 800 18px var(--font-ui, Figtree, sans-serif); line-height: 1; cursor: pointer;
}
body.md-on[data-mdv="pass"] #md-body #tab-passport[data-stamp-edit="true"] .stamp-header .md-ppm { display: none !important; }
.md-ppmenu { position: absolute; right: 6px; top: calc(100% + 8px); z-index: 20; width: 230px; background: #fff; border-radius: 16px; padding: 6px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .35); }
.md-ppmenu[hidden] { display: none; }
.md-ppmenu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 12px 12px; border-radius: 10px;
    font: 700 14.5px var(--font-ui, Figtree, sans-serif); color: #1a1a1a; cursor: pointer; }
.md-ppmenu button + button { border-top: 1px solid #eee; }
.md-ppmenu button:active { background: #f2efe8; }
.md-ppmenu button:disabled { opacity: .35; }

/* the pill under the book */
body.md-on[data-mdv="pass"] #tab-passport[data-pp="decorate"] .stamp-dots-row { justify-content: center; padding: 8px 0 10px; gap: 10px; }
body.md-on[data-mdv="pass"] #tab-passport[data-pp="decorate"] .stamp-page-ctrl { display: none; }
body.md-on[data-mdv="pass"] #tab-passport[data-pp="decorate"][data-stamp-edit="true"] .stamp-page-ctrl { display: inline-flex; }
body.md-on[data-mdv="pass"] #tab-passport .pp-tbar {
    gap: 6px; padding: 5px; border-radius: 100px; background: rgba(20, 26, 46, .9);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
body.md-on[data-mdv="pass"] #tab-passport .pp-tbar button { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
body.md-on[data-mdv="pass"] #tab-passport .pp-tbar button:disabled { opacity: .3; }
body.md-on[data-mdv="pass"] #md-body #tab-passport .pp-tlbl { min-width: 104px; color: #fff; text-shadow: none; font: 800 12px var(--md-mono, 'JetBrains Mono', monospace); letter-spacing: .08em; line-height: 1.15; }
.pp-tlbl small { display: block; font: 700 10px var(--font-ui, Figtree, sans-serif); letter-spacing: .02em; opacity: .7; margin-top: 1px; }
/* while moving stamps, ✓ / ✕ are the only buttons: hide the pop-up's own ✕ so there aren't two */
body.md-on[data-mdv="pass"] #md-body #tab-passport[data-stamp-edit="true"] .stamp-header .md-ppx { display: none !important; }
body.md-on[data-mdv="pass"] #md-body #tab-passport[data-stamp-edit="true"] .stamp-header::before { left: 18px; }
body.md-on[data-mdv="pass"] #md-body #tab-passport[data-stamp-edit="true"] .stamp-header .stamp-toolbar { margin-left: auto !important; }
/* the Add-a-stamp drawer rises OVER the passport pop-up (z 3500); it used to sit behind it (2026-11-25, user's screenshot) */
body.md-on .stamp-drawer-backdrop { z-index: 3600 !important; }
body.md-on .stamp-drawer { z-index: 3610 !important; }

/* ══ DEPARTURES v6 (2026-12-01; demo of record /static/departures-board-v3-preview.html) ══ */
body.md-on[data-mdv="dep"] #md-pop { background: #14213d; color: #fff; }
body.md-on[data-mdv="dep"] .md-note { background: #14213d; padding-bottom: 10px; }
body.md-on[data-mdv="dep"] .md-note .ic { border-radius: 50%; background: #C99A2E; color: #14213d; }
.md-note .ic svg { width: 21px; height: 21px; }
.md-note .ic.turn { animation: d6ic .4s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes d6ic { 40% { transform: scale(.6) rotate(-20deg); } }
body.md-on[data-mdv="dep"] .md-note b { font-size: 20px; font-weight: 900; letter-spacing: .01em; display: inline-block; transform-origin: 50% 60%; }
body.md-on[data-mdv="dep"] .md-note small { font-size: 12.5px; color: #8ea2cf; opacity: 1; }
.md-note b.out { animation: d6out .16s ease-in forwards; }
.md-note b.inn { animation: d6in .26s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes d6out { to { transform: rotateX(90deg); opacity: .2; } }
@keyframes d6in { from { transform: rotateX(-90deg); opacity: .2; } }
.md-clock { display: none; }
body.md-on[data-mdv="dep"] .md-clock { display: inline-flex; }
body.md-on[data-mdv="dep"] #md-dep { padding: 2px 0 26px; }
body.md-on[data-mdv="dep"] .md-back { color: #fff; }

/* flip characters: the clock and the LEAVES IN countdown */
.flip { display: inline-flex; gap: 2px; align-items: center; vertical-align: middle; }
.flip .sep { font: 800 13px var(--md-mono); opacity: .6; padding: 0 1px; }
.mfd { position: relative; display: block; width: 15px; height: 22px; font: 800 14px/22px var(--md-mono); text-align: center; color: var(--fc, #ffd400); perspective: 120px; }
.mfd > span { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: var(--fb, #0a0f1c); }
.mfd .u, .mfd .fu { top: 0; border-radius: 3px 3px 0 0; }
.mfd .l, .mfd .fl { bottom: 0; border-radius: 0 0 3px 3px; }
.mfd i { display: block; height: 22px; font-style: normal; }
.mfd .l i, .mfd .fl i { position: absolute; left: 0; right: 0; top: -11px; }
.mfd::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .55); z-index: 3; }
.mfd .fu { transform-origin: 50% 100%; z-index: 2; }
.mfd .fl { transform-origin: 50% 0; z-index: 2; transform: rotateX(90deg); }
.mfd.go .fu { animation: mfu .16s ease-in forwards; }
.mfd.go .fl { animation: mfl .16s .16s ease-out forwards; }
@keyframes mfu { to { transform: rotateX(-90deg); } }
@keyframes mfl { to { transform: rotateX(0); } }
.md-clock { margin-right: 4px; }

/* Departures / Arrivals switch */
#md-dep .seg6 { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin: 0 14px 12px; background: #0b1a3f; border-radius: 99px; padding: 4px; }
#md-dep .seg6 button { position: relative; z-index: 1; border: 0; background: none; color: #8ea2cf; font: 800 13.5px var(--font-ui, Figtree, sans-serif); padding: 9px 0; cursor: pointer; transition: color .25s; white-space: nowrap; }
#md-dep .seg6 button svg { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
#md-dep .seg6 button.on { color: #14213d; }
#md-dep .seg6 > i { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 99px; background: #ffd400; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
#md-dep .seg6.arr > i, #md-dep .seg6[data-at="1"] > i { transform: translateX(100%); }

/* the swipe cards */
#md-dep .rail6 { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 13% 8px; scrollbar-width: none; overscroll-behavior-x: contain; }
#md-dep .rail6::-webkit-scrollbar { display: none; }
#md-dep .c6 { --c: #2b3a67; flex: none; width: 100%; scroll-snap-align: center; border-radius: 22px; overflow: hidden; background: #fff; color: #1a1a1a; cursor: pointer;
  transform: scale(var(--s, 1)); opacity: var(--o, 1); box-shadow: 0 10px 24px rgba(0, 0, 0, .28); }
#md-dep .c6 .art { position: relative; height: 196px; background: var(--c); display: grid; place-items: center; overflow: hidden; transition: background .6s; }
#md-dep .c6 .art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .28), transparent 60%); }
#md-dep .c6 .art img { position: relative; width: 156px; height: 156px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35));
  transform: translateX(var(--px, 0)) rotate(var(--rot, 0deg)); -webkit-user-drag: none; }
#md-dep .c6 .rib { position: absolute; left: 12px; top: 12px; z-index: 1; font: 800 10px var(--md-mono); letter-spacing: .12em; background: rgba(0, 0, 0, .35); color: #fff; padding: 5px 9px; border-radius: 99px; }
#md-dep .c6 .rib.gold { background: #ffd400; color: #14213d; }
#md-dep .c6 .rib.ok { background: #2f9e5b; }
#md-dep .c6 .rar { position: absolute; right: 12px; top: 12px; z-index: 1; font: 800 10px var(--md-mono); letter-spacing: .1em; background: #fff; color: #1a1a1a; padding: 5px 9px; border-radius: 99px; }
#md-dep .c6 .tx { padding: 12px 14px 14px; }
#md-dep .c6 h3 { margin: 0; font-size: 19px; font-weight: 900; line-height: 1.15; }
#md-dep .c6 .task { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 13.5px; font-weight: 600; color: #444; }
#md-dep .k6 { font: 800 10px var(--md-mono); letter-spacing: .08em; color: #fff; padding: 3px 7px; border-radius: 6px; flex: none; background: #D9483B; }
#md-dep .k6.move { background: #2f9e5b; } #md-dep .k6.play { background: #2d6fd1; }
#md-dep .c6 .pg { height: 5px; border-radius: 3px; background: #eee8db; margin-top: 9px; overflow: hidden; }
#md-dep .c6 .pg i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
#md-dep .c6 .pgt { display: block; font: 700 11px var(--md-mono); color: #6f6a60; margin-top: 4px; }
#md-dep .c6 .ft { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 11px; border-top: 1px dashed #d8d2c4; }
#md-dep .c6 .lab { display: block; font: 800 9.5px var(--md-mono); letter-spacing: .12em; color: #6f6a60; margin-bottom: 4px; }
#md-dep .c6 .rt { text-align: right; }
#md-dep .c6 .rt b { font: 900 17px var(--font-ui, Figtree, sans-serif); }
#md-dep .c6 .rt small { font-size: 12px; font-weight: 700; color: #6f6a60; }
#md-dep .c6 .mfd { --fc: #ffd400; --fb: #14213d; }
#md-dep .c6 .soon .mfd { --fc: #ff9a7a; }
#md-dep .dots6 { display: flex; justify-content: center; gap: 6px; margin: 8px 0 2px; }
#md-dep .dots6 i { width: 6px; height: 6px; border-radius: 99px; background: #1d3570; transition: width .3s, background .3s; }
#md-dep .dots6 i.on { width: 18px; background: #ffd400; }
#md-dep .none6 { margin: 6px 14px; padding: 30px 16px; border-radius: 20px; background: #0b1a3f; text-align: center; font-weight: 800; }
#md-dep .none6 small { display: block; color: #8ea2cf; font-weight: 600; margin-top: 4px; }

/* sections, timetable */
#md-dep .sec6 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 16px 8px; }
#md-dep .sec6 b { font-size: 16px; font-weight: 900; }
#md-dep .sec6 small { color: #8ea2cf; font-size: 12px; font-weight: 600; text-align: right; }
#md-dep .tt6 { margin: 0 14px; background: #0b1a3f; border-radius: 18px; overflow: hidden; }
#md-dep .tr6 { display: grid; grid-template-columns: 52px 40px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-top: 1px solid #1d3570; background: none;
  color: #fff; text-align: left; font-family: var(--font-ui, Figtree, sans-serif); cursor: pointer; animation: d6row .4s cubic-bezier(.2, 1, .3, 1) both; }
#md-dep .tr6:first-child { border-top: 0; }
@keyframes d6row { from { opacity: 0; transform: translateX(20px); } }
#md-dep .tr6 .d { font: 800 12px var(--md-mono); color: #ffd400; line-height: 1.15; }
#md-dep .tr6 .d small { display: block; color: #8ea2cf; font-size: 10px; }
#md-dep .tr6 img { width: 40px; height: 40px; object-fit: contain; }
#md-dep .tr6 .n { font-size: 14px; font-weight: 800; line-height: 1.2; min-width: 0; }
#md-dep .tr6 .n small { display: block; color: #8ea2cf; font-size: 12px; font-weight: 600; }
#md-dep .tr6 .s { font: 800 10px var(--md-mono); letter-spacing: .08em; color: #8ea2cf; white-space: nowrap; }

/* collections shelf */
#md-dep .shelf6 { display: flex; gap: 10px; overflow-x: auto; padding: 0 14px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
#md-dep .shelf6::-webkit-scrollbar { display: none; }
#md-dep .col6 { --c: #2b3a67; display: block; flex: none; width: 132px; scroll-snap-align: start; border-radius: 18px; overflow: hidden; background: #fff; color: #1a1a1a; cursor: pointer;
  text-align: left; border: 0; padding: 0; font-family: var(--font-ui, Figtree, sans-serif); }
#md-dep .col6 .fan { position: relative; display: block; height: 96px; background: var(--c); overflow: hidden; }
#md-dep .col6 .fan::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, .22), transparent 65%); }
#md-dep .col6 .fan img { position: absolute; left: 50%; top: 54%; width: 58px; height: 58px; margin: -29px; object-fit: contain; z-index: 1;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); transition: transform .6s cubic-bezier(.2, 1.3, .4, 1); }
#md-dep .col6.open .fan img:nth-child(1) { transform: translateX(-32px) rotate(-12deg) scale(.88); }
#md-dep .col6.open .fan img:nth-child(2) { transform: translateX(32px) rotate(12deg) scale(.88); }
#md-dep .col6.open .fan img:nth-child(3) { transform: scale(1.08); z-index: 2; }
#md-dep .col6 .fan .none { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 900; color: rgba(255, 255, 255, .85); }
#md-dep .col6 .on { position: absolute; left: 8px; top: 8px; z-index: 3; font: 800 9px var(--md-mono); letter-spacing: .08em; background: #ffd400; color: #14213d; padding: 3px 7px; border-radius: 99px; }
#md-dep .col6 .t { display: block; padding: 9px 11px 11px; }
#md-dep .col6 b { display: block; font-size: 13.5px; font-weight: 800; line-height: 1.2; min-height: 2.4em; }
#md-dep .col6 small { display: block; color: #6f6a60; font-size: 11.5px; font-weight: 700; margin-top: 3px; }

/* ══ CHALLENGES pill on the map (2026-12-01) ══ */
#md-chal, #md-chscrim, #md-chfan, #md-chsheet { display: none; }
body.md-on #md-chal { display: flex; position: fixed; left: 14px; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 88px); z-index: 215; align-items: center; gap: 9px;
  padding: 6px 14px 6px 6px; border: 0; border-radius: 99px; background: #fff; color: #1a1a1a; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); cursor: pointer;
  font-family: var(--font-ui, Figtree, sans-serif); text-align: left; transition: opacity .2s, transform .2s; -webkit-tap-highlight-color: transparent; }
body.md-on:not(.chal-has) #md-chal,
body.md-on:not([data-mdv="map"]) #md-chal,
body.md-on.hb-sheet-open:not(.chal-fan) #md-chal, body.md-on.us-open #md-chal, body.md-on.ps-open #md-chal, body.md-on.pc-open #md-chal,
body.md-on.mhl-focus #md-chal, body.md-on.dr-on #md-chal, body.md-on.dt-series-active #md-chal { opacity: 0; pointer-events: none; transform: translateY(10px); }
#md-chal:active { transform: scale(.95); }
#md-chal .rg { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(#D9483B 0 32%, transparent 32% 34%, #2f9e5b 34% 65%, transparent 65% 67%, #2d6fd1 67% 98%, transparent 98%); }
#md-chal .rg::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
#md-chal .rg b { position: relative; font: 900 15px var(--font-ui, Figtree, sans-serif); }
#md-chal .tx b { display: block; font-size: 14px; font-weight: 900; line-height: 1.1; }
#md-chal .tx small { display: block; font-size: 11.5px; font-weight: 700; color: #6f6a60; white-space: nowrap; }
#md-chal .ping { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: #D9483B; box-shadow: 0 0 0 2px #fff; }
#md-chal .ping[hidden] { display: none; }
body.chal-fan #md-chal { z-index: 3415; box-shadow: 0 0 0 3px #ffd400, 0 6px 18px rgba(0, 0, 0, .25); }
body.md-on #md-chscrim { display: block; position: fixed; inset: 0; z-index: 3400; background: rgba(8, 16, 36, .5); opacity: 0; pointer-events: none; transition: opacity .25s; }
body.chal-fan #md-chscrim { opacity: 1; pointer-events: auto; }
body.md-on #md-chfan { display: flex; position: fixed; left: 14px; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 150px); z-index: 3410; flex-direction: column-reverse; gap: 10px; pointer-events: none; }
body.chal-fan #md-chfan { pointer-events: auto; }
#md-chfan button { display: flex; align-items: center; gap: 12px; width: 240px; padding: 12px 14px 12px 12px; border: 0; border-radius: 20px; background: #D9483B; color: #fff;
  font-family: var(--font-ui, Figtree, sans-serif); text-align: left; cursor: pointer; box-shadow: 0 6px 0 rgba(0, 0, 0, .22), 0 10px 20px rgba(0, 0, 0, .25);
  transform-origin: 20px 120%; transform: translateY(var(--from)) scale(.2); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.5, .4, 1), opacity .2s; }
#md-chfan button.move { background: #2f9e5b; } #md-chfan button.play { background: #2d6fd1; }
#md-chfan button:disabled { filter: grayscale(.6); opacity: .5; }
body.chal-fan #md-chfan button { transform: none; opacity: 1; }
body.chal-fan #md-chfan button:disabled { opacity: .5; }
body.chal-fan #md-chfan button:nth-child(2) { transition-delay: .06s; } body.chal-fan #md-chfan button:nth-child(3) { transition-delay: .12s; }
body.chal-fan #md-chfan button:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0, 0, 0, .22); }
#md-chfan .e { font-size: 24px; } #md-chfan b { flex: 1; font: 900 22px var(--font-ui, Figtree, sans-serif); letter-spacing: .04em; }
#md-chfan em { font: 800 12.5px var(--md-mono); font-style: normal; background: rgba(0, 0, 0, .2); padding: 5px 9px; border-radius: 99px; white-space: nowrap; }
#md-chfan .rd { font: 800 10px var(--md-mono); background: #ffd400; color: #14213d; padding: 4px 7px; border-radius: 99px; white-space: nowrap; }
body.md-on #md-chsheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; top: max(70px, calc(env(safe-area-inset-top) + 60px)); max-width: 560px; margin: 0 auto;
  z-index: 3420; background: #F4F1EA; color: #1a1a1a; border-radius: 26px 26px 0 0; overflow: hidden; box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
  transform: translateY(105%); transition: transform .4s cubic-bezier(.2, .9, .3, 1); font-family: var(--font-ui, Figtree, sans-serif); }
body.chal-list #md-chsheet { transform: none; }
:is(#md-chsheet, #md-chin) .h { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 14px 22px; background: var(--c); color: #fff; flex: none; }
:is(#md-chsheet, #md-chin) .h .e { font-size: 28px; }
:is(#md-chsheet, #md-chin) .h > div { flex: 1; min-width: 0; }
:is(#md-chsheet, #md-chin) .h b { display: block; font: 900 24px var(--font-ui, Figtree, sans-serif); letter-spacing: .04em; }
:is(#md-chsheet, #md-chin) .h small { font-size: 13px; font-weight: 700; opacity: .9; }
:is(#md-chsheet, #md-chin) .h button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .2); color: #fff; font-size: 17px; font-weight: 800; cursor: pointer; flex: none; }
:is(#md-chsheet, #md-chin) .h .bar { position: absolute; left: 14px; right: 14px; bottom: 10px; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .2); overflow: hidden; }
:is(#md-chsheet, #md-chin) .h .bar i { display: block; height: 100%; background: #fff; border-radius: 3px; transition: width .8s .2s; }
:is(#md-chsheet, #md-chin) .ls { flex: 1; overflow-y: auto; padding: 4px 12px calc(30px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
:is(#md-chsheet, #md-chin) .tier { margin: 14px 4px 6px; font: 800 11.5px var(--md-mono); letter-spacing: .14em; }
:is(#md-chsheet, #md-chin) .tier small { font: 600 12px var(--font-ui, Figtree, sans-serif); letter-spacing: 0; color: #6f6a60; margin-left: 6px; }
:is(#md-chsheet, #md-chin) .row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; width: 100%; background: #fff; border: 1px solid #e4dfd4; border-radius: 16px; padding: 12px 14px; margin-bottom: 8px;
  text-align: left; font-family: inherit; color: inherit; cursor: pointer; animation: d6rise .35s both; }
@keyframes d6rise { from { opacity: 0; transform: translateY(10px); } }
:is(#md-chsheet, #md-chin) .row .tt { font-weight: 800; font-size: 14.5px; line-height: 1.25; }
:is(#md-chsheet, #md-chin) .tg { display: inline-block; font: 800 9.5px var(--md-mono); letter-spacing: .1em; padding: 3px 7px; border-radius: 99px; margin-right: 6px; vertical-align: 2px; }
:is(#md-chsheet, #md-chin) .tg.easy { background: #e3f3e8; color: #1f7a45; } :is(#md-chsheet, #md-chin) .tg.medium { background: #fdf0d2; color: #8a5a00; } :is(#md-chsheet, #md-chin) .tg.hard { background: #fbe1de; color: #a3271c; }
:is(#md-chsheet, #md-chin) .rw { text-align: right; font: 800 13px var(--md-mono); white-space: nowrap; }
:is(#md-chsheet, #md-chin) .rw small { display: block; font: 700 10.5px var(--font-ui, Figtree, sans-serif); color: #6f6a60; }
:is(#md-chsheet, #md-chin) .pg { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
:is(#md-chsheet, #md-chin) .pg .b { flex: 1; height: 6px; background: #eee8db; border-radius: 3px; overflow: hidden; }
:is(#md-chsheet, #md-chin) .pg .b i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
:is(#md-chsheet, #md-chin) .pg > span:last-child { font: 700 11.5px var(--md-mono); color: #6f6a60; white-space: nowrap; }
:is(#md-chsheet, #md-chin) .row.done { background: #f7f5ef; }
:is(#md-chsheet, #md-chin) .row.done .tt { text-decoration: line-through; color: #6f6a60; }
:is(#md-chsheet, #md-chin) .row.done .rw { color: #2f9e5b; }
:is(#md-chsheet, #md-chin) .row.ready { border-color: #C99A2E; box-shadow: 0 0 0 2px rgba(201, 154, 46, .35); }
:is(#md-chsheet, #md-chin) .row .go { grid-column: 1 / -1; background: #C99A2E; color: #fff; font: 800 13px var(--font-ui, Figtree, sans-serif); padding: 8px; border-radius: 12px; text-align: center; }
:is(#md-chsheet, #md-chin) .foot { text-align: center; color: #6f6a60; font-size: 12.5px; margin: 14px 0 4px; }
@media (prefers-reduced-motion: reduce) {
  #md-chfan button, #md-chsheet, #md-dep .seg6 > i, .mfd .fu, .mfd .fl { transition: none !important; animation: none !important; }
}
#md-dep .col6 .fan img:only-of-type { transform: none !important; }
/* The welcome-back / check-in progress card rises where the pill sits: step aside. */
body.md-on:has(#dpad-tu) #md-chal { opacity: 0; pointer-events: none; transform: translateY(10px); }

/* ── THIS WEEK'S STAMPS in the GO / MOVE / PLAY sheet (2026-12-01; demo of record
   /static/gomoveplay-drip-preview.html). The carousel sits on top in the section's colour,
   then Keep going, this month's challenges (tap a row for progress), Near you, Next Monday. ── */
#md-chfan .rd.nw { background: #fff; color: #14213d; }
:is(#md-chsheet, #md-chin) .ls { padding-left: 0; padding-right: 0; }
:is(#md-chsheet, #md-chin) .ls > .tier, :is(#md-chsheet, #md-chin) .ls > .row, :is(#md-chsheet, #md-chin) .ls > .foot { margin-left: 12px; margin-right: 12px; }
:is(#md-chsheet, #md-chin) .wk { background: linear-gradient(var(--c), color-mix(in srgb, var(--c) 0%, #F4F1EA)); padding: 10px 0 6px; margin-top: -1px; }
:is(#md-chsheet, #md-chin) .wk .lb { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 14px 8px; color: #fff; }
:is(#md-chsheet, #md-chin) .wk .lb b { font: 800 11.5px var(--md-mono); letter-spacing: .14em; }
:is(#md-chsheet, #md-chin) .wk .lb small { font: 800 11.5px var(--font-ui, Figtree, sans-serif); background: rgba(0, 0, 0, .22); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
:is(#md-chsheet, #md-chin) .wk.none p { margin: 0 14px 10px; color: #fff; font-weight: 700; font-size: 13.5px; }
:is(#md-chsheet, #md-chin) .car { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 14px 8px; scrollbar-width: none; overscroll-behavior-x: contain; }
:is(#md-chsheet, #md-chin) .car::-webkit-scrollbar { display: none; }
:is(#md-chsheet, #md-chin) .dc { position: relative; flex: none; width: min(300px, 82vw); min-height: 148px; scroll-snap-align: center; display: flex; align-items: center; gap: 12px; padding: 14px; border: 0; border-radius: 22px;
  background: var(--c); color: #fff; text-align: left; font-family: var(--font-ui, Figtree, sans-serif); cursor: pointer; overflow: hidden; box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
  animation: md-deal .55s cubic-bezier(.2, 1.3, .4, 1) both; }
:is(#md-chsheet, #md-chin) .dc::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 25% 50%, rgba(255, 255, 255, .22), transparent 60%), linear-gradient(90deg, transparent 40%, rgba(0, 0, 0, .28)); }
@keyframes md-deal { from { transform: translateX(110px) rotate(6deg) scale(.86); opacity: 0; } }
:is(#md-chsheet, #md-chin) .dc img, :is(#md-chsheet, #md-chin) .dc .noimg { position: relative; width: 108px; height: 108px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
:is(#md-chsheet, #md-chin) .dc .i { position: relative; flex: 1; min-width: 0; display: block; }
:is(#md-chsheet, #md-chin) .dc .w { display: inline-block; font: 800 9.5px var(--md-mono); letter-spacing: .08em; background: #ffd400; color: #14213d; padding: 3px 7px; border-radius: 99px; }
:is(#md-chsheet, #md-chin) .dc .w.ret { background: #fff; color: #7b2fd0; }
:is(#md-chsheet, #md-chin) .dc .sr { display: inline-block; margin: 0 0 0 4px; font: 800 9px var(--md-mono); letter-spacing: .06em; background: rgba(0, 0, 0, .3); padding: 3px 7px; border-radius: 99px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }
:is(#md-chsheet, #md-chin) .dc b { display: block; font-size: 18px; font-weight: 900; line-height: 1.12; margin: 7px 0 4px; }
:is(#md-chsheet, #md-chin) .dc small { display: block; font-size: 12px; font-weight: 700; opacity: .92; line-height: 1.3; }
:is(#md-chsheet, #md-chin) .dc .pb { display: block; margin-top: 9px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
:is(#md-chsheet, #md-chin) .dc .pb i { display: block; height: 100%; background: #ffd400; border-radius: 3px; }
:is(#md-chsheet, #md-chin) .dc .st { display: inline-block; margin-top: 9px; font: 800 10px var(--md-mono); letter-spacing: .08em; padding: 4px 8px; border-radius: 99px; background: #fff; color: #14213d; }
:is(#md-chsheet, #md-chin) .dc .st.gold { background: #C99A2E; color: #fff; }
:is(#md-chsheet, #md-chin) .dc .al, :is(#md-chsheet, #md-chin) .dt .al { position: absolute; right: 10px; bottom: 10px; font: 800 9px var(--md-mono); letter-spacing: .06em; color: #fff; padding: 3px 7px; border-radius: 99px; background: #2d6fd1; }
:is(#md-chsheet, #md-chin) .al.go { background: #D9483B; } :is(#md-chsheet, #md-chin) .al.move { background: #2f9e5b; }
:is(#md-chsheet, #md-chin) .dots { display: flex; gap: 5px; justify-content: center; margin: 2px 0 4px; }
:is(#md-chsheet, #md-chin) .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .2); transition: width .2s, background .2s; }
:is(#md-chsheet, #md-chin) .dots i.on { width: 16px; background: #14213d; }
:is(#md-chsheet, #md-chin) .sec { display: flex; align-items: baseline; gap: 8px; margin: 16px 14px 8px; }
:is(#md-chsheet, #md-chin) .sec b { font: 800 11.5px var(--md-mono); letter-spacing: .14em; }
:is(#md-chsheet, #md-chin) .sec small { flex: 1; font-size: 12px; font-weight: 600; color: #6f6a60; }
:is(#md-chsheet, #md-chin) .lane { display: flex; gap: 9px; overflow-x: auto; padding: 0 14px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
:is(#md-chsheet, #md-chin) .lane::-webkit-scrollbar { display: none; }
:is(#md-chsheet, #md-chin) .dt { flex: none; width: 124px; scroll-snap-align: start; border-radius: 16px; background: #fff; border: 1px solid #e4dfd4; overflow: hidden; cursor: pointer; text-align: left; padding: 0;
  font-family: var(--font-ui, Figtree, sans-serif); color: #1a1a1a; }
:is(#md-chsheet, #md-chin) .dt .ar { display: block; position: relative; height: 92px; background: var(--c); }
:is(#md-chsheet, #md-chin) .dt .ar::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(255, 255, 255, .25), transparent 65%); }
:is(#md-chsheet, #md-chin) .dt img { position: absolute; left: 50%; top: 50%; width: 74px; height: 74px; margin: -37px; object-fit: contain; z-index: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
:is(#md-chsheet, #md-chin) .dt .fl { position: absolute; left: 6px; top: 6px; z-index: 2; font: 800 8.5px var(--md-mono); letter-spacing: .06em; background: #ffd400; color: #14213d; padding: 3px 6px; border-radius: 99px; }
:is(#md-chsheet, #md-chin) .dt .pg2 { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .12); z-index: 2; }
:is(#md-chsheet, #md-chin) .dt .pg2 i { display: block; height: 100%; background: #C99A2E; }
:is(#md-chsheet, #md-chin) .dt .tx { display: block; padding: 8px 9px 9px; }
:is(#md-chsheet, #md-chin) .dt b { display: block; font-size: 12.5px; font-weight: 800; line-height: 1.2; height: 2.4em; overflow: hidden; }
:is(#md-chsheet, #md-chin) .dt small { display: block; font-size: 11px; font-weight: 600; color: #6f6a60; line-height: 1.25; height: 2.5em; overflow: hidden; margin-top: 3px; }
:is(#md-chsheet, #md-chin) .dt.lk { cursor: default; }
:is(#md-chsheet, #md-chin) .dt.lk .ar { background: #9a9488; }
:is(#md-chsheet, #md-chin) .dt.lk img { filter: grayscale(1) brightness(.85); opacity: .7; }
:is(#md-chsheet, #md-chin) .dt.lk .fl { background: #fff; }
:is(#md-chsheet, #md-chin) .dt .lock { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; font-size: 22px; }
:is(#md-chsheet, #md-chin) .wait { margin: 6px 14px 7px; background: #fff; border: 1px dashed #d9d2c3; border-radius: 14px; padding: 10px 12px; font-size: 13px; font-weight: 700; color: #6f6a60; line-height: 1.35; }
:is(#md-chsheet, #md-chin) .wait b { color: #1a1a1a; }
/* a challenge row: tap to open it a little */
:is(#md-chsheet, #md-chin) .row.cx { grid-template-columns: auto 1fr auto; align-items: center; cursor: pointer; transition: box-shadow .2s, border-color .2s; }
:is(#md-chsheet, #md-chin) .row.cx .ck { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #e4dfd4; flex: none; }
:is(#md-chsheet, #md-chin) .row.cx .ck::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), transparent 0); }
:is(#md-chsheet, #md-chin) .row.cx.done .ck { border-color: #2f9e5b; background: #2f9e5b; }
:is(#md-chsheet, #md-chin) .row.cx .go { grid-column: 1 / -1; border: 0; cursor: pointer; }
:is(#md-chsheet, #md-chin) .row.cx .more { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.2, .9, .3, 1); }
:is(#md-chsheet, #md-chin) .row.cx .more > span { overflow: hidden; display: block; }
:is(#md-chsheet, #md-chin) .row.cx.open { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 30%, transparent); }
:is(#md-chsheet, #md-chin) .row.cx.open .more { grid-template-rows: 1fr; }
:is(#md-chsheet, #md-chin) .row.cx .pg { display: block; margin-top: 8px; }
:is(#md-chsheet, #md-chin) .row.cx .pg .b { display: block; height: 8px; }
:is(#md-chsheet, #md-chin) .row.cx .pg .b i { width: 0 !important; transition: width .7s cubic-bezier(.2, .9, .3, 1) .1s; }
:is(#md-chsheet, #md-chin) .row.cx.open .pg .b i { width: calc(var(--p) * 1%) !important; }
:is(#md-chsheet, #md-chin) .row.cx .pl { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #6f6a60; }
:is(#md-chsheet, #md-chin) .row.cx .pl b { color: #1a1a1a; font-weight: 900; }
:is(#md-chsheet, #md-chin) .row.cx .pa { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; }
:is(#md-chsheet, #md-chin) .row.cx .pa button { border: 0; background: var(--c); color: #fff; font: 800 12.5px var(--font-ui, Figtree, sans-serif); padding: 8px 13px; border-radius: 99px; cursor: pointer; }
:is(#md-chsheet, #md-chin) .row.cx .pa span { font: 800 12px var(--font-ui, Figtree, sans-serif); padding: 7px 12px; border-radius: 99px; background: #ece7dc; }
@media (prefers-reduced-motion: reduce) { :is(#md-chsheet, #md-chin) .dc { animation: none; } :is(#md-chsheet, #md-chin) .row.cx .more, :is(#md-chsheet, #md-chin) .row.cx .pg .b i { transition: none; } }
:is(#md-chsheet, #md-chin) .ls > .row { width: auto; }

/* ── Challenges sheet = GO / MOVE / PLAY tabs; Stamps grid in Departures (2026-12-02;
      demo of record /static/three-homes-simple-v4-preview.html) ── */
body.chal-tabs #md-chfan { display: none; }
:is(#md-chsheet, #md-chin) .h.tabs { display: block; padding: 14px 14px 12px; transition: background .25s; }
:is(#md-chsheet, #md-chin) .h.tabs .ti { display: flex; align-items: center; gap: 10px; }
:is(#md-chsheet, #md-chin) .h.tabs .ti > div { flex: 1; min-width: 0; }
:is(#md-chsheet, #md-chin) .h.tabs .tb { display: flex; gap: 4px; margin-top: 12px; background: rgba(0, 0, 0, .2); border-radius: 14px; padding: 4px; }
:is(#md-chsheet, #md-chin) .h.tabs .tb button { flex: 1; width: auto; height: auto; border-radius: 10px; background: transparent; color: #fff; padding: 7px 4px 6px; font-size: inherit; line-height: 1.1; transition: background .2s, color .2s; }
:is(#md-chsheet, #md-chin) .h.tabs .tb button b { font: 900 15px var(--font-ui, Figtree, sans-serif); letter-spacing: .06em; }
:is(#md-chsheet, #md-chin) .h.tabs .tb button small { display: block; font: 800 9.5px var(--md-mono); opacity: .85; margin-top: 2px; }
:is(#md-chsheet, #md-chin) .h.tabs .tb button.on { background: #fff; color: var(--c); }
:is(#md-chsheet, #md-chin) .h.tabs .tb button:active { transform: scale(.97); }

.md-panel.d6 .grid6, #md-dep .grid6 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 0 18px; }
.g6 { position: relative; aspect-ratio: 1; border: 0; border-radius: 20px; background: var(--c); color: #fff; padding: 0; overflow: hidden; text-align: left; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); animation: g6in .34s cubic-bezier(.05, .7, .1, 1) both; animation-delay: calc(var(--i, 0) * 40ms); transition: transform .1s; }
.g6::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 40%, rgba(0, 0, 0, .38)); pointer-events: none; }
.g6:active { transform: scale(.97); }
@keyframes g6in { from { opacity: 0; transform: translateY(10px); } }
.g6 .a { position: absolute; left: 0; right: 0; top: 10%; height: 58%; display: flex; align-items: center; justify-content: center; }
.g6 .a img { max-width: 62%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .3)); }
.g6 .a .none { font: 900 40px var(--font-ui, Figtree, sans-serif); opacity: .5; }
.g6 .t { position: absolute; left: 12px; right: 10px; bottom: 12px; z-index: 1; }
.g6 .t b { display: block; font: 900 17px/1.1 var(--font-ui, Figtree, sans-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g6 .t small { display: block; font-size: 12px; font-weight: 700; opacity: .9; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g6 .pg { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .25); z-index: 1; }
.g6 .pg i { display: block; height: 100%; background: #ffd400; }
.mix6 { position: absolute; top: 8px; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; background: #F4F1EA; border-radius: 99px; padding: 4px 9px;
  font: 900 9.5px var(--md-mono, 'JetBrains Mono', monospace); letter-spacing: .08em; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); white-space: nowrap; }
.mix6 i { font-style: normal; } .mix6 .go { color: #D9483B; } .mix6 .move { color: #2f9e5b; } .mix6 .play { color: #2d6fd1; }
.mix6 s { width: 3px; height: 3px; border-radius: 50%; background: #1a1a1a; opacity: .35; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .g6 { animation: none; } }
#dt-series-mix { margin: 8px 0 2px; }
#dt-series-mix .mix6 { position: static; display: inline-flex; }

/* ── Departures · Arrivals · Challenges (2026-12-02, user: "Could it not all be incorporated into departures?") ── */
#md-dep .seg6.s3 { grid-template-columns: 1fr 1fr 1fr; }
#md-dep .seg6.s3 > i { width: calc(33.333% - 2.67px); }
#md-dep .seg6.s3[data-at="2"] > i { transform: translateX(200%); }
#md-dep .seg6.s3 button { font-size: 12.5px; padding: 9px 2px; }
#md-dep .seg6.s3 button svg { width: 15px; height: 15px; margin-right: 4px; vertical-align: -3px; }
#md-dep .seg6 .nd { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e74c3c; margin-left: 4px; vertical-align: 2px; }
#md-dep .ctab6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 14px 12px; }
#md-dep .ctab6 button { border: 0; border-radius: 14px; padding: 9px 4px 7px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; line-height: 1.1;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12); transition: background .2s, transform .1s; }
#md-dep .ctab6 button b { display: block; font: 900 15px var(--font-ui, Figtree, sans-serif); letter-spacing: .06em; }
#md-dep .ctab6 button small { display: block; font: 800 9.5px var(--md-mono, monospace); opacity: .8; margin-top: 2px; }
#md-dep .ctab6 button.go.on { background: #D9483B; } #md-dep .ctab6 button.move.on { background: #2f9e5b; } #md-dep .ctab6 button.play.on { background: #2d6fd1; }
#md-dep .ctab6 button.on { box-shadow: none; }
#md-dep .ctab6 button:active { transform: scale(.97); }
#md-chin { margin: 0 10px 16px; background: #F4F1EA; color: #1a1a1a; border-radius: 22px; overflow: hidden; padding-top: 6px; animation: chin .3s cubic-bezier(.05, .7, .1, 1) both; }
@keyframes chin { from { opacity: 0; transform: translateY(8px); } }
#md-chin .ls { overflow: visible; flex: none; padding-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { #md-chin { animation: none; } }

/* ── Challenges = the same swipe cards as Departures / Arrivals (2026-12-02; demo
   /static/challenges-and-place-card-preview.html): map-dock.js chalCards / chalCard6 / chalMonth6. */
#md-dep .c6 .rib.new { background: #fff; color: #14213d; }
#md-dep .c6 .ic6 { position: relative; font-size: 84px; line-height: 1; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .3)); }
#md-dep .c6 .ptn6 { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .45); color: #fff; font: 700 11.5px var(--font-ui, Figtree, sans-serif); padding: 6px 12px; }
#md-dep .c6 .ptn6 b { font: 800 9.5px var(--md-mono); letter-spacing: .12em; background: #ffd400; color: #14213d; padding: 2px 6px; border-radius: 5px; }
#md-dep .c6 .val6 { font: 800 15px var(--md-mono); color: #14213d; background: #f1ede2; padding: 3px 7px; border-radius: 6px; }
#md-dep .chal6 .ctab6 { margin-bottom: 6px; }
#md-dep .mo6 .tr6 .d { font-size: 10.5px; letter-spacing: .06em; }
#md-dep .mo6 .tr6 .d.easy { color: #5fd08f; } #md-dep .mo6 .tr6 .d.medium { color: #ffd400; } #md-dep .mo6 .tr6 .d.hard { color: #ff9a7a; }
#md-dep .mo6 .tr6 .ic { width: 40px; height: 40px; border-radius: 50%; background: #f4f1ea; display: grid; place-items: center; font-size: 20px; }
#md-dep .mo6 .tr6 .n .bar { display: block; height: 4px; border-radius: 3px; background: #1d3570; margin-top: 6px; overflow: hidden; }
#md-dep .mo6 .tr6 .n .bar i { display: block; height: 100%; background: #ffd400; border-radius: 3px; }
#md-dep .mo6 .tr6 .s.ok { color: #5fd08f; } #md-dep .mo6 .tr6 .s.gold { color: #ffd400; }
#md-dep .foot6 { margin: 14px 16px 0; color: #8ea2cf; font-size: 12px; font-weight: 600; text-align: center; }

/* Friends + leaderboard button on the passport bar (2026-12-02); the Social modal and QR scanner sit over the pop-up. */
.md-ppf { display: none; }
body.md-on[data-mdv="pass"] #md-body #tab-passport .stamp-header .md-ppf { display: grid; place-items: center; width: 38px; height: 38px; cursor: pointer; }
body.md-on[data-mdv="pass"] #md-body #tab-passport[data-stamp-edit="true"] .stamp-header .md-ppf { display: none !important; }
body.md-on #friends-modal { z-index: 3700; }
body.md-on .qr-scan { z-index: 3800; }
