.theme-picker{--theme-surface:#fff;--theme-track:#f0f5f7;--theme-hover:#e4eef2;--theme-selected:#e5f6f7;--theme-accent:#007e90;--theme-border:#cfdee5;position:relative;flex:0 0 44px;color:var(--ink,#193958);font:14px/1.5 Arial,Helvetica,sans-serif;letter-spacing:0;z-index:115}
.theme-picker>summary{display:flex;align-items:center;justify-content:center;width:44px;height:44px;cursor:pointer;list-style:none;border-radius:6px;color:inherit}
.theme-picker>summary::-webkit-details-marker{display:none}
.theme-picker>summary:hover,.theme-picker[open]>summary{background:var(--theme-hover)}
.theme-picker>summary:focus-visible{outline:3px solid #008b9d;outline-offset:2px}
.theme-picker fieldset{box-sizing:border-box;position:absolute;right:0;top:calc(100% + 8px);transform:translateX(var(--theme-shift,0px));width:280px;min-width:0;max-width:calc(100vw - 32px);margin:0;padding:16px;background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:8px;box-shadow:0 12px 32px #102c3e26;text-align:left}
.theme-picker legend{float:left;width:100%;padding:0;font-size:14px;line-height:20px;font-weight:700;margin:0 0 12px;color:inherit}
.theme-picker .theme-options{clear:both;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;background:var(--theme-track);border-radius:6px}
.theme-picker .theme-choice{position:relative;display:block;min-width:0;margin:0;padding:0;cursor:pointer;color:inherit}
.theme-picker .theme-choice input{position:absolute;inset:0;z-index:1;width:100%;height:100%;min-height:0;margin:0;padding:0;opacity:0;cursor:pointer}
.theme-picker .theme-option{box-sizing:border-box;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;height:76px;padding:8px 4px;border:1px solid transparent;border-radius:4px;font-size:13px;line-height:18px;font-weight:500;color:inherit}
.theme-picker svg{display:block;flex-shrink:0}
.theme-picker .theme-check{position:absolute;right:4px;top:4px;visibility:hidden}
.theme-picker .theme-check svg{width:12px;height:12px;stroke-width:3}
.theme-picker .theme-choice:hover .theme-option{background:var(--theme-hover)}
.theme-picker .theme-choice input:checked+.theme-option{background:var(--theme-selected);color:var(--theme-accent);border-color:var(--theme-accent);font-weight:700}
.theme-picker input:checked+.theme-option .theme-check{visibility:visible}
.theme-picker input:focus-visible+.theme-option{outline:2px solid var(--theme-accent);outline-offset:2px}
.auth-header .theme-picker{margin-left:auto}
.rb-header.ops-top .theme-picker .theme-option{padding:8px 4px;border-width:1px;border-style:solid}
@media(max-width:400px){.auth-header{gap:8px}.auth-header .auth-brand img{width:136px}}
.session-warning{box-sizing:border-box;position:fixed;bottom:calc(16px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);width:min(640px,calc(100% - 32px));z-index:200;display:flex;gap:12px;align-items:center;padding:14px 16px;border:1px solid #d6b775;background:#fff8e6;color:#47300e;border-radius:8px;box-shadow:0 6px 24px #0002;font:14px/1.45 Arial,Helvetica,sans-serif;text-align:left}
.session-warning[hidden],.session-warning [hidden]{display:none!important}
.session-warning-icon{flex:0 0 22px;width:22px;height:22px;background:currentColor;mask:url('/assets/icons/trips-clock.svg') center/contain no-repeat}
.session-warning-copy{flex:1;min-width:0}.session-warning strong{display:block;margin-bottom:3px;font-size:14px;letter-spacing:0}.session-warning p{margin:0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.session-warning-actions{flex:none}.session-warning :is(button,a){display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 12px;border:1px solid currentColor;border-radius:6px;background:transparent;color:inherit;cursor:pointer;font:600 13px/1.4 Arial,Helvetica,sans-serif;text-decoration:none;white-space:nowrap}
.session-warning :is(button,a):hover{background:#b5781914}.session-warning :is(button,a):focus-visible{outline:2px solid currentColor;outline-offset:3px}
dialog.session-timeout-dialog{box-sizing:border-box;width:min(772px,calc(100% - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:48px 50px 50px;border:1px solid #dceaf0;border-radius:20px;background:#fff;color:#0a3350;text-align:center;font-family:Arial,Helvetica,sans-serif;box-shadow:0 24px 90px #061c3540;overflow:auto}
.session-timeout-dialog::backdrop{background:#142c40b3;backdrop-filter:blur(6px)}
.session-timeout-dialog .session-timeout-symbol{position:relative;width:144px;height:144px;margin:0 auto 26px;border-radius:50%;background:#edf6f9;color:#0a3350;display:grid;place-items:center}
.session-timeout-lock{width:72px;height:72px;background:currentColor;mask:url('/assets/icons/auth-lock-keyhole.svg') center/contain no-repeat}
.session-timeout-clock{position:absolute;right:28px;bottom:27px;width:36px;height:36px;border:4px solid #0a3350;border-radius:50%;background:#00879e;color:white;display:grid;place-items:center}
.session-timeout-clock::after{content:'';width:22px;height:22px;background:currentColor;mask:url('/assets/icons/trips-clock.svg') center/contain no-repeat}
.session-timeout-dialog h2{margin:0;font-size:40px;line-height:1.2;font-weight:700;letter-spacing:0;overflow-wrap:anywhere}
.session-timeout-dialog #session-timeout-description{max-width:620px;margin:20px auto 36px;color:#55718a;font-size:24px;line-height:1.5;letter-spacing:0}
.session-timeout-actions{display:grid;grid-template-columns:1fr 1.12fr;gap:20px}
.session-timeout-dialog .session-timeout-actions :is(a,button){box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;min-height:72px;padding:16px 20px;margin:0;border:1px solid #355a78;border-radius:8px;background:transparent;color:inherit;font:500 22px/1.3 Arial,Helvetica,sans-serif;letter-spacing:0;white-space:normal;text-decoration:none;cursor:pointer;transform:none}
.session-timeout-dialog .session-timeout-actions .primary{background:#00849a;border-color:#00849a;color:#fff;font-weight:700}
.session-timeout-dialog .session-timeout-actions .primary:hover{background:#006f83}
.session-timeout-continue:hover{background:#edf7fa!important}
.session-timeout-continue:disabled{cursor:wait;opacity:.75}
.session-timeout-continue[aria-busy=true]::before{content:'';width:18px;height:18px;flex:0 0 18px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:session-timeout-spin .8s linear infinite}
.session-timeout-dialog .session-timeout-status{margin:18px 0 0;color:#55718a;font-size:16px;line-height:1.5}
.session-timeout-dialog .session-timeout-status:empty{display:none}
.session-timeout-explore{display:flex;align-items:center;gap:24px;margin-top:40px}
.session-timeout-explore::before,.session-timeout-explore::after{content:'';height:1px;flex:1;background:#dce7ec}
.session-timeout-explore a{padding:4px 0;color:#007d94;font-size:20px;line-height:1.5;text-decoration:none}
.session-timeout-explore a:hover{text-decoration:underline}
.session-timeout-dialog :is(a,button):focus-visible{outline:3px solid #00a1b5;outline-offset:4px}
html[data-theme=dark] .session-timeout-symbol{background:var(--dm-raised);color:var(--dm-accent)}
html[data-theme=dark] .session-timeout-continue{border-color:var(--dm-control-border)!important;color:var(--dm-text)!important}
html[data-theme=dark] .session-timeout-continue:hover{background:var(--dm-hover)!important}
html[data-theme=dark] .session-timeout-explore::before,html[data-theme=dark] .session-timeout-explore::after{background:var(--dm-border)}
html[data-theme=dark] .session-timeout-explore a{color:var(--dm-accent)}
@keyframes session-timeout-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.session-timeout-continue[aria-busy=true]::before{animation:none}}
@media(max-width:600px){dialog.session-timeout-dialog{padding:28px 20px;border-radius:16px}.session-timeout-dialog .session-timeout-symbol{width:112px;height:112px;margin-bottom:24px}.session-timeout-lock{width:60px;height:60px}.session-timeout-clock{right:13px;bottom:14px}.session-timeout-dialog h2{font-size:28px}.session-timeout-dialog #session-timeout-description{font-size:18px;margin:16px 0 26px}.session-timeout-actions{grid-template-columns:1fr;gap:12px}.session-timeout-dialog .session-timeout-actions :is(a,button){min-height:54px;font-size:18px;padding:14px 12px}.session-timeout-explore{margin-top:26px;gap:12px}.session-timeout-explore a{font-size:17px}}
@media(max-width:600px){.rb-header .rb-brand{max-width:136px;flex-basis:136px!important}.session-warning{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:start;gap:8px 12px}.session-warning-actions{grid-column:2}.session-warning-actions :is(button,a){width:100%}}

@media screen {
 html[data-theme=dark] body .cp-side-nav nav button[aria-current=true] {background:var(--dm-selected);color:var(--dm-accent)}
 html[data-theme=dark] body .cp-side-nav nav button:hover {background:var(--dm-hover)}
}

/* Dark mode uses paired semantic tokens. Literal white and brand colours stay literal. */
@media screen {
  html[data-theme=dark] {
    color-scheme:dark;
    --dm-canvas:#131719;
    --dm-surface:#1d2327;
    --dm-raised:#273035;
    --dm-input:#171c20;
    --dm-hover:#323e44;
    --dm-border:#435159;
    --dm-control-border:#71838c;
    --dm-text:#f0f4f5;
    --dm-muted:#b6c3ca;
    --dm-subtle:#a4b6c0;
    --dm-accent:#80ded1;
    --dm-accent-hover:#a6eee4;
    --dm-on-accent:#102b2b;
    --dm-selected:#214340;
    --dm-focus:#f1c778;
    --dm-danger:#ffb8b2;
    --dm-warning:#f4d394;
    --dm-shadow:0 12px 32px #0005;
    background:var(--dm-canvas);
  }
  html[data-theme=dark],html[data-theme=dark] body {
    --ink:var(--dm-text);--text:var(--dm-text);--navy:var(--dm-text);
    --muted:var(--dm-muted);--teal:var(--dm-accent);
    --line:var(--dm-border);--border:var(--dm-border);
    --bg:var(--dm-canvas);--surface:var(--dm-surface);--paper:var(--dm-surface);--ice:var(--dm-raised);
    --ui-ink:var(--dm-text);--ui-muted:var(--dm-muted);--ui-accent:var(--dm-accent);
    --ui-border:var(--dm-control-border);--ui-surface:var(--dm-surface);--ui-background:var(--dm-canvas);
    --ab-navy:var(--dm-text);--ab-text:var(--dm-muted);
    --ops-ink:var(--dm-text);--ops-teal:var(--dm-accent);--ops-line:var(--dm-border);
    --badge-ink:var(--dm-text);--badge-teal:var(--dm-accent);
  }
  html[data-theme=dark] body,html[data-theme=dark] .home-page main {
    background:var(--dm-canvas)!important;color:var(--dm-text)!important;
  }
  html[data-theme=dark] :is(h1,h2,h3,h4,h5,h6) {letter-spacing:0}
  html[data-theme=dark] main :is(h1,h2,h3,h4,legend,label,dt) {color:var(--dm-text)}
  html[data-theme=dark] main :is(p,small,dd,.muted,.helper,.hint,.add-intro) {color:var(--dm-muted)}
  html[data-theme=dark] :is(main,dialog) a:not([class]) {color:var(--dm-accent)}
  html[data-theme=dark] ::selection {background:var(--dm-accent);color:var(--dm-on-accent)}

  /* Surfaces: canvas, content and elevated controls have distinct luminance. */
  html[data-theme=dark] :is(.site-header,header.header,.ops-top,.auth-header) {
    background:var(--dm-surface)!important;color:var(--dm-text)!important;border-color:var(--dm-border)!important;
  }
  html[data-theme=dark] :is(.panel,.card,.page-state,.cloud-account-empty,.auth-card,.auth-form-panel,
    .add-panel,.add-preview-card,.add-contribute,.account-card,.account-panel,.pref-card,.preference-card,
    .community-card,.social-card,.p1-panel,.p1-card,.filter-box,.trip-card,.mt-card,.vehicle-card,.member-card,
    .account-sidebar,.planner-panel,.planner-card,.planner-preference-card,.saved-pref-card,
    .settings-panel,.settings-row,.pp-panel,.tp-card,.tp-panel,.gr-card,.gr-spec-card,.gr-match,
    .pf-card,.ft-card,.ft-group-card,.ft-traveler-card,.ops-card,.ops-sidebar,.ops-table,.ops-queue-item,
    .support-card,.support-panel,.entity-panel,.contributor-panel,.live-filter-panel,.live-result-card,.live-map-panel,
    .live-empty,.journey-card,.destination-card,.testimonial,.journey-state,.journey-status,.reviews-invitation) {
    background:var(--dm-surface)!important;color:var(--dm-text)!important;border-color:var(--dm-border)!important;
    box-shadow:0 2px 8px #0001;
  }
  html[data-theme=dark] :is(dialog,.rb-navigation.open,.rb-account-panel,.community-menu>div,.member-services>div,
    #cloud-gate>section,.welcome-dialog,.ui-select-menu,.ts-picker,.search-picker,.gr-menu-actions) {
    background:var(--dm-raised)!important;color:var(--dm-text)!important;border-color:var(--dm-border)!important;box-shadow:var(--dm-shadow);
  }
  html[data-theme=dark] dialog {--dm-surface:var(--dm-raised)}
  html[data-theme=dark] dialog::backdrop {background:#080d12b8!important;backdrop-filter:blur(5px)}
  html[data-theme=dark] :is(.pt-subpanel,.pt-group-card,.pt-guest,.pt-pref-cards article,.pt-info,.pt-modal-step,
    .pt-itinerary article,.pt-place,.planning-draft-status,.add-preview-body,.add-alternatives,.add-thanks,
    .add-review-note,.add-upload,.add-preview-heading>div,.auth-footer,.settings-note,.ops-notice,
    .gr-spec-summary,.gr-catalogue,.gr-cost-preview,.gr-detail-estimate,.gr-detail-actions,.gr-selected-catalogue,
    .pf-membership,.pf-quote,.ft-group,.ft-empty,.ft-member-picker label,.ft-bottom blockquote,.pp-tabs,.pp-audience-status,
    .ft-sidebar-note,.pf-sidebar-note,.mt-start,.mt-upcoming-card aside,.mt-encourage,.live-map-empty) {
    background:var(--dm-raised)!important;color:var(--dm-text)!important;border-color:var(--dm-border)!important;
  }
  html[data-theme=dark] :is(.account-save-bar,.tp-save-bar,.pp-save-bar,.settings-actions,.pf-actions,.ap-actions) {
    background:var(--dm-surface)!important;border-color:var(--dm-border)!important;
  }

  /* Do not use a global inversion: photographs, map tiles and semantic icons keep their colours. */
  html[data-theme=dark] :is(.rb-brand img,.auth-brand img,.ab-cycle-brand img) {
    content:url('assets/roamerbook-logo-footer.svg');background:transparent;padding:0;mix-blend-mode:normal;
  }
  html[data-theme=dark] .rb-search img {filter:brightness(0) invert(1)}
  html[data-theme=dark] :is(.rb-navigation>a,.rb-navigation summary,.rb-account,.rb-signin,.rb-account-panel>a,
    .rb-account-panel>button,.community-menu>div a,.member-services a,.rb-menu-toggle,.theme-picker) {color:var(--dm-text)!important}
  html[data-theme=dark] :is(.rb-account-panel>a:hover,.rb-account-panel>button:hover,.community-menu a:hover,
    .rb-account-panel [aria-current=page],.member-services a:hover) {background:var(--dm-hover)!important}
  html[data-theme=dark] :is(.rb-navigation a[aria-current=page],.rb-navigation .rb-community-active) {color:var(--dm-accent)!important}
  html[data-theme=dark] :is(.text-link,.add-intro a,.community-tabs a,.account-text-link,.auth-page a,
    .auth-text-button,.gr-text-button,.gr-catalogue a,.gr-selected-catalogue a,.review-source,.journey-note button) {color:var(--dm-accent)!important}

  html[data-theme=dark] :is(input:where(:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]):not([type=button])),select,textarea) {
    background:var(--dm-input)!important;color:var(--dm-text)!important;border-color:var(--dm-control-border)!important;
  }
  html[data-theme=dark] ::placeholder {color:var(--dm-subtle)!important;opacity:1}
  html[data-theme=dark] :is(input[type=checkbox],input[type=radio],input[type=range],progress) {accent-color:var(--dm-accent)}
  html[data-theme=dark] :is(.button,button.secondary,.ui-select-trigger,.ts-select-trigger,.ts-option,
    .ts-calendar-head button,.ts-calendar-grid button,.tp-choice>span,.tp-chip,.tp-chips label,.tp-options label,
    .pt-choice-row>button,.pt-choice-row>label,.add-alternatives button,.auth-google,.live-mode-tabs button,
    .live-place-choices button,.live-more,.dialog-close,.mt-more) {
    background:var(--dm-raised)!important;color:var(--dm-text)!important;border-color:var(--dm-control-border)!important;
  }
  html[data-theme=dark] :is(.button,button.secondary,.ui-select-trigger,.ts-select-trigger,.auth-google):hover {
    background:var(--dm-hover)!important;border-color:var(--dm-subtle)!important;
  }
  html[data-theme=dark] :is(.primary,.button.primary,.auth-primary,.rb-join,#cloud-import,#cloud-retry) {
    background:var(--dm-accent)!important;color:var(--dm-on-accent)!important;border-color:var(--dm-accent)!important;box-shadow:none;
  }
  html[data-theme=dark] :is(.primary,.button.primary,.auth-primary,.rb-join):hover {
    background:var(--dm-accent-hover)!important;color:var(--dm-on-accent)!important;border-color:var(--dm-accent-hover)!important;
  }
  html[data-theme=dark] :is(.primary,.button,.rb-join) :is(strong,span,small) {color:inherit}
  html[data-theme=dark] :is(button,input,select,textarea):disabled {opacity:.55;cursor:not-allowed}
  html[data-theme=dark] :is(.tp-choice input:checked+span,.tp-chip[aria-pressed=true],.tp-options input:checked+span,
    .ts-option[aria-selected=true],.ts-option:hover,.ts-calendar-grid [aria-pressed=true],.pt-choice-row>button[aria-pressed=true],
    .pt-choice-row>label:has(input:checked),.add-tags input:checked+span,.add-preview-heading [aria-pressed=true],
    .live-mode-tabs button[aria-pressed=true],.pp-tabs button[aria-selected=true],.account-navigation a[aria-current],
    .account-navigation a.active,.mt-navigation [aria-current=page]) {
    background:var(--dm-selected)!important;color:var(--dm-accent)!important;border-color:var(--dm-accent)!important;
  }
  html[data-theme=dark] :focus-visible {outline:2px solid var(--dm-focus)!important;outline-offset:3px}
  html[data-theme=dark] :is(.search-form,.live-search):focus-within {outline:2px solid var(--dm-focus);outline-offset:3px}
  html[data-theme=dark] :is(.search-form,.live-search,.msg-search-box) input {background:transparent!important}
  html[data-theme=dark] .live-search-query>img {filter:brightness(0) saturate(100%) invert(87%) sepia(22%) saturate(688%) hue-rotate(112deg) brightness(94%) contrast(91%)}
  html[data-theme=dark] :is(.search-form,.live-search,.msg-search-box) input:focus-visible {outline:none!important}
  html[data-theme=dark] :is(.ts-calendar-trigger,.pt-pref-heading .icon,.pt-pref-cards .icon,.pt-info .icon) {color:var(--dm-accent)!important}
  html[data-theme=dark] .search-form .field-icon {filter:brightness(0) invert(.85)}
  html[data-theme=dark] :is(.pt-field>b,.rb-account-error) {color:var(--dm-danger)!important}
  html[data-theme=dark] :is(input,select,textarea,.ts-select-trigger)[aria-invalid=true] {border-color:var(--dm-danger)!important}
  html[data-theme=dark] :is(.pt-switch input,.tp-switch input) {background:var(--dm-control-border)}
  html[data-theme=dark] :is(.pt-switch input,.tp-switch input):checked {background:var(--dm-accent)}
  html[data-theme=dark] :is(.pt-switch input,.tp-switch input)::before {background:var(--dm-input)}

  /* Home: preserve the scenery; make every content section readable in its own right. */
  html[data-theme=dark] .home-page>.hero {
    background-image:linear-gradient(90deg,#11191edf,#11191e8c 52%,#11191e1a),url('assets/hero/hero-alpine-lake.webp');
  }
  html[data-theme=dark] .home-page>.hero::before {content:'';position:absolute;inset:0 0 auto;height:var(--site-header-height,90px);background:var(--dm-surface);pointer-events:none}
  html[data-theme=dark] :is(.search-form,.live-search,.search-top,.search-tabs,.search-line form,.current-location,.features,.impact-card,.app-banner) {
    background:var(--dm-surface)!important;color:var(--dm-text)!important;border-color:var(--dm-border)!important;
  }
  html[data-theme=dark] :is(.home-page .card-title,.home-page .app-art .handwritten,.home-page .app-copy h2,
    .home-page .feature strong,.reviews-invitation h3,.testimonial .review-person strong) {color:var(--dm-text)!important}
  html[data-theme=dark] :is(.home-page .country,.home-page .author,.home-page .journey-meta,.home-page .idea-label,
    .home-page .journey-note,.home-page .app-copy p,.home-page .app-benefits,.home-page .feature p,
    .home-page .testimonial blockquote,.home-page .reviews-invitation p) {color:var(--dm-muted)!important}
  html[data-theme=dark] :is(.home-page .journey-meta svg,.home-page .app-copy h2 span,.impact-card .leaf) {color:var(--dm-accent)}
  html[data-theme=dark] :is(.home-page .popular button,.journey-tag,.live-tags span,.pt-tags span,.add-tags span,
    .tags span,.badge,.gr-badge,.gr-filter span,.ft-tags span,.mt-navigation small) {
    background:var(--dm-raised);color:var(--dm-muted);border-color:var(--dm-border);
  }
  html[data-theme=dark] .home-page .popular button:hover {background:var(--dm-selected);color:var(--dm-accent)}
  html[data-theme=dark] :is(.cloud-account-symbol,.journey-state-icon,.reviews-icon,.ao-stats .icon,.ao-cards .icon,
    .mt-totals .icon,.mt-stat-symbol):not(img) {background:var(--dm-selected)!important;color:var(--dm-accent)!important}
  html[data-theme=dark] :is(.journey-no-photo,.live-card-media,.add-preview-photo,.pt-no-photo,.ft-cover-empty,.tw-group-placeholder) {
    background:var(--dm-raised)!important;color:var(--dm-muted)!important;
  }
  html[data-theme=dark] .home-page .app-benefits li::before {background:var(--dm-accent);color:var(--dm-on-accent)}
  html[data-theme=dark] :is(.home-page .store-badge,.home-page .store-badge strong,.home-page .store-badge small) {color:#f0f4f5}
  html[data-theme=dark] .home-page .store-badge {background:#101719;border:1px solid var(--dm-border)}
  html[data-theme=dark] .stars {color:var(--dm-focus)}
  html[data-theme=dark] :is(.avatar,.review-person .avatar) {background:var(--dm-raised);color:var(--dm-text)}
  html[data-theme=dark] .editorial-avatar {background:var(--dm-selected)!important;color:var(--dm-accent)!important}

  /* About: theme the whole band, not just its headings. */
  html[data-theme=dark] .about-page .ab-community {background:var(--dm-surface);border-block:1px solid var(--dm-border)}
  html[data-theme=dark] :is(.ab-cycle strong,.about-page main .ab-small-contributions .handwritten,.ab-impact dt) {color:var(--dm-text)!important}
  html[data-theme=dark] :is(.ab-cycle small,.ab-impact dd,.ab-support cite,.ab-support blockquote p,.ab-note,
    .ab-dialog-note,.ab-join-options span) {color:var(--dm-muted)!important}
  html[data-theme=dark] :is(.ab-section-heading>a,.about-page main .ab-eyebrow) {color:var(--dm-accent)!important}
  html[data-theme=dark] :is(.ab-support blockquote,.ab-note,.ab-join-options a) {background:var(--dm-raised);border-color:var(--dm-border)}
  html[data-theme=dark] .ab-small-contributions {border-color:var(--dm-border)}
  html[data-theme=dark] .ab-problem-icon {background:#28354d;color:#b4cfff}
  html[data-theme=dark] .ab-problem-1 .ab-problem-icon {background:var(--dm-selected);color:var(--dm-accent)}
  html[data-theme=dark] .ab-problem-2 .ab-problem-icon {background:#3e3048;color:#e0b8f4}
  html[data-theme=dark] .ab-support h2>.icon {color:var(--dm-focus)}
  html[data-theme=dark] .ab-actions .button {white-space:normal;min-width:0;line-height:1.4}
  html[data-theme=dark] .ab-actions .button .icon {flex-shrink:0}

  /* Explore, account and planning copy includes many legacy hard-coded colours. */
  html[data-theme=dark] :is(.live-result-card h3 a,.live-results-heading h2,.live-map-heading strong,.mt-start strong,
    .gr-catalogue h3,.gr-selected-catalogue h3) {color:var(--dm-text)!important}
  html[data-theme=dark] :is(.live-kind,.live-eyebrow,.live-map-heading>a) {color:var(--dm-accent)!important}
  html[data-theme=dark] :is(.live-rating,.live-location,.live-description,.live-map-note,.live-map-heading small,#explore-status,
    .pt-subpanel p,.pt-pref-cards small,.pt-pref-cards article>span,.pt-field,.pt-group-card small,.pt-group-card span,
    .pt-group-card em,.pt-guest small,#pt-content>p,#pt-steps button,.auth-divider,.auth-footer,.auth-footer a,#auth-status,
    .account-navigation a,.tp-field,.pf-field,.ap-field,.tp-sliders label,.tp-sliders output,.tp-switches label,
    .mt-badge-example,.filter-value) {color:var(--dm-muted)!important}
  html[data-theme=dark] .live-explore-hero {background-color:var(--dm-canvas);border-color:var(--dm-border)}
  html[data-theme=dark] .live-explore-hero::before {background:linear-gradient(90deg,#11191ef2,#11191ec4 52%,#11191e40)}
  html[data-theme=dark] :is(.hero,.ab-hero,.ab-final,.mt-hero,.mt-bottom-cta,.account-hero,.planner-hero,.entity-hero,.live-explore-hero,.auth-scenery-copy) :is(h1,h2,h3,p,small,.handwritten) {color:#f0f4f5}
  html[data-theme=dark] :is(.live-explore-hero h1,.live-explore-hero>div>p) {color:#f0f4f5!important}
  html[data-theme=dark] :is(.live-explore-hero .live-eyebrow,.hero .eyebrow) {color:var(--dm-accent)!important}
  html[data-theme=dark] :is(.add-steps,.community-tabs,.contribution-tools,fieldset,hr,.live-location-panel) {border-color:var(--dm-border)}
  html[data-theme=dark] :is(.pt-pref-heading .pt-switch,.add-steps button) {color:var(--dm-accent)}
  html[data-theme=dark] #pt-steps button>b {background:var(--dm-raised);color:var(--dm-text);border-color:var(--dm-control-border)}
  html[data-theme=dark] #pt-steps button[aria-current]>b {background:var(--dm-accent);color:var(--dm-on-accent)}
  html[data-theme=dark] :is(.ao-tip,#mt-status) {background:var(--dm-selected)!important;color:var(--dm-accent)!important}

  html[data-theme=dark] .page-footer {background:#10191f;color:var(--dm-muted);border:0}
  html[data-theme=dark] .page-footer::after {opacity:.38}
  html[data-theme=dark] .page-footer .footer-grid .footer-invitation {background:var(--dm-surface);border-color:var(--dm-border);border-radius:8px}
  html[data-theme=dark] .page-footer :is(.footer-grid p,.footer-bottom,.footer-invitation p) {color:var(--dm-muted)}
  html[data-theme=dark] .page-footer .footer-grid a:not(.footer-community-link) {color:var(--dm-muted)}
  html[data-theme=dark] .page-footer .footer-grid a:hover {color:var(--dm-text)}

  /* Appearance and security states are part of the same surface system. */
  html[data-theme=dark] .theme-picker {
    --theme-surface:var(--dm-raised);--theme-track:var(--dm-input);--theme-hover:var(--dm-hover);
    --theme-selected:var(--dm-selected);--theme-accent:var(--dm-accent);--theme-border:var(--dm-border);
  }
  html[data-theme=dark] .theme-picker fieldset {box-shadow:var(--dm-shadow)}
  html[data-theme=dark] .theme-picker :is(input,label,legend) {color:var(--dm-text)}
  html[data-theme=dark] :is(.skip,.skip-link,.auth-skip) {background:var(--dm-raised);color:var(--dm-text)}
  html[data-theme=dark] #cloud-gate:not(.cloud-loading) {background:#131719f2}
  html[data-theme=dark] #cloud-gate :is(h1,p,li) {color:var(--dm-text)}
  html[data-theme=dark] #cloud-gate :is(button,a) {background:var(--dm-raised);color:var(--dm-accent);border-color:var(--dm-control-border)}
  html[data-theme=dark] :is(.session-warning,.account-notice-banner,.planning-draft-status[data-state=error]) {background:#352c1d!important;color:var(--dm-warning)!important;border-color:#9b8053!important}
  html[data-theme=dark] :is(#cloud-status,#toast) {background:var(--dm-raised);color:var(--dm-text);border-color:var(--dm-border)}
  html[data-theme=dark] :is(#cloud-status.cloud-error,#auth-status.error,#pt-error,#pt-modal-error) {background:#3d2528;color:var(--dm-danger)!important;border-color:#b37878}
  html[data-theme=dark] #cloud-import-error {color:var(--dm-danger)!important}
  html[data-theme=dark] dialog :is(p,small,li,dt,dd) {color:var(--dm-muted)!important}
  html[data-theme=dark] dialog :is(h1,h2,h3,h4,legend,label),html[data-theme=dark] dialog>header>button {color:var(--dm-text)!important}
  html[data-theme=dark] dialog footer {background:var(--dm-surface)!important;border-color:var(--dm-border)!important}
  html[data-theme=dark] dialog footer::after {display:none}
}
@media screen and (max-width:640px) {
  html[data-theme=dark] .live-explore-hero::before {background:linear-gradient(180deg,#11191ea8,#11191ee8 70%,#11191ef5)}
  html[data-theme=dark] .home-page>.hero {background-image:linear-gradient(180deg,#11191ecc,#11191ea6 65%,#11191e66),url('assets/hero/hero-alpine-lake.webp')}
}
@media(max-width:600px){.rb-header .rb-join{display:none}}
@media(max-width:360px){.rb-header .rb-brand{max-width:110px;flex-basis:110px!important}}
@media print{.theme-picker,.session-warning{display:none!important}}

/* Shared dark surfaces for the account, library and editor redesigns. Keep
   photographs and map tiles unchanged; only UI surfaces use these tokens. */
@media screen {
  html[data-theme=dark] body {
    --dm-bg:var(--dm-canvas);
    --dm-success:#a1dfba;--dm-success-bg:#203c30;
    --dm-danger-bg:#3d2528;--dm-warning-bg:#352c1d;
    --ap-ink:var(--dm-text);--ap-muted:var(--dm-muted);--ap-line:var(--dm-border);
    --ap-paper:var(--dm-canvas);--ap-accent:var(--dm-accent);
  }
  html[data-theme=dark] body :is(.rb-account-heading,.ops-top-label,.ops-return,.entity-loading,
    .account-nav-heading,.pp-eyebrow,.pp-step-label,.region-preview-label) {color:var(--dm-muted)!important}
  html[data-theme=dark] body [data-shared-header] :is(.main-nav>a,.main-nav summary) {color:var(--dm-text)}
  html[data-theme=dark] body :is(.account-sidebar,.mt-navigation) {background:transparent!important;border-color:var(--dm-border)!important}
  html[data-theme=dark] body .account-hero:after {background:var(--dm-canvas)!important}
  html[data-theme=dark] body :is(.account-workspace,.pp-workspace,.cj-main,.mine-main,.cp-main) {color:var(--dm-text)}
  html[data-theme=dark] body :is(.account-workspace,.pp-workspace) :is(h2,h3,h4,strong,dt,legend,label) {color:var(--dm-text)!important}
  html[data-theme=dark] body :is(.account-workspace,.pp-workspace) :is(p,small,dd,.pp-switch em,.tp-benefits span) {color:var(--dm-muted)!important}

  /* Content surfaces, including live previews and not-yet-populated states. */
  html[data-theme=dark] body :is(.pf-greeting,.pf-structured,.region-section,.ao-stats>a,
    .pp-preview-card,.pp-savebar,.pp-photo-row,.pp-featured-card,.ft-traveler-add,.ft-help-grid>div,
    .achievement-card,.badge-card-body,.badge-art-stage,.achievement-empty,
    .mine-stop,.mine-create,.cj-stop,.entity-related a,.cp-card,.cp-social-counts,.cp-view-counts>div) {
    background:var(--dm-surface)!important;color:var(--dm-text)!important;border-color:var(--dm-border)!important;
  }
  html[data-theme=dark] body :is(.pf-private-note,.region-related,.pp-preview-privacy,.pp-private-boundary,
    .pp-feature-switch,.pp-safety-note,.pp-system-card,.pp-country-empty,.pp-country-more,.pp-input-prefix,
    .ap-info,.ap-good,.ap-off,.ap-quote,.ap-add-pet,.settings-inline-status,.notification-status,#push-controls,
    .achievement-explainer,.mine-empty,.mine-no-image,
    .cj-map-hint,.cj-thanks,.cj-cost-total,.cj-publish-note,.cj-thumbnails .cj-more,
    .cp-owner-preview,.cp-invite,.cp-review,.cp-reputation blockquote,.cp-impact blockquote,
    .drafts-cover small,.drafts-meta>span,.contributions-cover small,.contributions-meta>span,
    .recent-help blockquote,.recent-symbol,.recent-item-image,.pp-cover-editor,.pp-preview-cover,
    .gr-photo,.cj-cover-image,.ch-cover,.ch-no-photo,.drafts-cover,.contributions-cover,.p1-checks) {
    background:var(--dm-raised)!important;color:var(--dm-muted)!important;border-color:var(--dm-border)!important;
  }
  html[data-theme=dark] body :is(.account-side-inspiration,.ft-group-empty,.ft-empty) {
    background-color:var(--dm-raised)!important;background-blend-mode:multiply;
  }
  html[data-theme=dark] body :is(.account-side-inspiration p,.ft-group-empty .handwritten,.ft-empty .handwritten) {color:var(--dm-text)!important}
  html[data-theme=dark] body :is(.account-navigation a:hover,.mine-stop:hover,.recent-item:hover,
    .pp-tabs button:hover,.pp-country-grid label:hover) {background:var(--dm-hover)!important}

  /* Links and small metadata must remain legible on dark cards. */
  html[data-theme=dark] body :is(.recent-back,.recent-kind,.recent-open,.recent-quote-mark,
    .contributions-back,.contributions-info,.contributions-draft-preview>header button,
    .mt-empty>button,.ft-card-actions button,.ft-traveler-actions button,.gr-filter button,
    .tp-trip-link,.add-coordinate-details summary,.pt-traveler-more,.pt-clear-destination) {color:var(--dm-accent)!important}
  html[data-theme=dark] body :is(.sj-help .handwritten,.sj-summary .handwritten,.sp-empty-note,
    .sp-summary-note,.sp-quick-note,.drafts-tip .handwritten,.map-travel-stamp,.ft-bottom cite,
    .td-legend,.td-legend b,.td-legend i,.pp-preview-label span,.pp-input-prefix>span,
    .achievement-results,.achievement-category,.badge-tier-track>span,.achievement-progress,
    .achievement-progress strong,.achievement-explainer summary,.achievement-card details span,
    .tp-why li span,.ap-quote cite) {color:var(--dm-muted)!important}
  html[data-theme=dark] body .achievement-card summary {color:var(--dm-accent)!important}
  html[data-theme=dark] body :is(.entity-prose,.entity-status,.cp-reputation small,.cp-reputation blockquote,
    .cp-impact blockquote,.cp-owner-preview span) {color:var(--dm-muted)!important}
  html[data-theme=dark] body :is(.entity-author a,.cp-public-links a,.mine-recovery button) {color:var(--dm-accent)!important}

  /* Choices, tabs and badges have paired foreground/background colours. */
  html[data-theme=dark] body :is(.pp-tabs button,.pp-choice-grid button,.pp-radio-cards label>span,
    .pp-audience-cards label>span,.cj-choices span,.achievement-filters button,.mine-add-button,
    .mine-stop-actions button,.mine-change>button,.add-photo-navigation button,.add-photo-tile .remove-photo) {
    background:var(--dm-raised)!important;color:var(--dm-text)!important;border-color:var(--dm-control-border)!important;box-shadow:none;
  }
  html[data-theme=dark] body :is(.pp-tabs button>span,.add-steps button>b,.cj-steps button>b,
    .entity-tags span,.pp-preview-tags span,.pp-preview-countries b,.cp-tags span,.cp-public-links a,
    .cp-top-badge,.pp-preview-level,.achievement-state,.achievement-filters button>span,
    .ft-portrait,.pt-initial,.td-marker) {
    background:var(--dm-raised)!important;color:var(--dm-text)!important;border-color:var(--dm-border)!important;
  }
  html[data-theme=dark] body :is(.pp-tabs button b,.pp-tabs button small,.cj-choices span small) {color:inherit!important}
  html[data-theme=dark] body :is(.pp-tabs button[aria-selected=true],.pp-choice-grid .is-selected,
    .pp-radio-cards input:checked+span,.pp-audience-cards input:checked+span,.cj-choices input:checked+span,
    .ap-need:has(input:checked),.pp-featured-card:has(input:checked),.pp-country-grid label.is-selected,
    .help-categories button[aria-pressed=true],.ch-topics button[aria-pressed=true],
    .achievement-filters button[aria-pressed=true],.contribution-tabs button[aria-pressed=true]) {
    background:var(--dm-selected)!important;color:var(--dm-accent)!important;border-color:var(--dm-accent)!important;box-shadow:none;
  }
  html[data-theme=dark] body :is(.contribution-tabs button[aria-pressed=true] span,
    .achievement-filters button[aria-pressed=true]>span) {color:var(--dm-accent)!important;background:transparent!important}
  html[data-theme=dark] body :is(.pp-tabs button[aria-selected=true]>span,.add-steps button[aria-current=step]>b,
    .cj-steps button[aria-current=step]>b,.ao-quick-actions a:first-child,.ao-checklist .complete .ao-check) {
    background:var(--dm-accent)!important;color:var(--dm-on-accent)!important;border-color:var(--dm-accent)!important;
  }
  html[data-theme=dark] body .ao-quick-actions a:first-child :is(strong,small) {color:var(--dm-on-accent)!important}
  html[data-theme=dark] body :is(.achievement-state.is-earned,.mine-status,.cj-thanks strong,.pp-preview-privacy strong) {color:var(--dm-success)!important}
  html[data-theme=dark] body :is(.achievement-state.is-earned,.mine-status) {background:var(--dm-success-bg)!important}
  html[data-theme=dark] body :is(.account-danger-zone,.settings-danger,.mine-error,#tw-error) {background:var(--dm-danger-bg)!important;border-color:#ab737c!important}
  html[data-theme=dark] body :is(.account-danger-zone>h2,.settings-danger h2,.gr-remove,.ap-remove,
    .mine-remove,.pf-field b,.add-editor em,.cj-basic em,.cj-work em) {color:var(--dm-danger)!important}
  html[data-theme=dark] body .mine-recovery {background:var(--dm-warning-bg);color:var(--dm-warning)}
  html[data-theme=dark] body :is(.account-danger-zone,.settings-danger) p {color:var(--dm-muted)!important}
  html[data-theme=dark] body progress {background:var(--dm-raised)!important}
  html[data-theme=dark] body progress::-webkit-progress-bar {background:var(--dm-raised)!important}
  html[data-theme=dark] body progress::-webkit-progress-value {background:var(--dm-accent)!important}
  html[data-theme=dark] body progress::-moz-progress-bar {background:var(--dm-accent)!important}

  /* Editor preview labels sit on opaque UI surfaces, not on the photograph. */
  html[data-theme=dark] body :is(.add-preview-photo>span,.add-story-strip,.add-location-tip,.add-photo-tip) {background:var(--dm-raised)!important;color:var(--dm-muted)!important}
  html[data-theme=dark] body .add-story-strip blockquote {background:transparent!important;color:var(--dm-text)!important}
  html[data-theme=dark] body .add-story-strip p {color:var(--dm-muted)!important}
  html[data-theme=dark] body :is(#pp-cover-empty,.p1-muted) {color:var(--dm-muted)!important}
  html[data-theme=dark] body .account-workspace [role=status]:not(:empty) {background:var(--dm-raised);color:var(--dm-muted)}
  html[data-theme=dark] body .help-search {background:var(--dm-input);color:var(--dm-text);border:1px solid var(--dm-control-border)}
  html[data-theme=dark] body :is(.ch-avatar,.p1-pill) {background:var(--dm-selected);color:var(--dm-accent)}
  html[data-theme=dark] body .add-preview-photo:not(:has(img)) {background:var(--dm-raised)!important}

  /* Only monochrome UI assets are recoloured. Photography and badges stay intact. */
  html[data-theme=dark] body img.icon {filter:brightness(0) invert(.9)!important}
  html[data-theme=dark] body img[src^="assets/icons/"] {filter:brightness(0) invert(.9)!important}
  html[data-theme=dark] body :is(img.icon,img[src^="assets/icons/"]) {background-color:transparent!important}
  html[data-theme=dark] body :is(.primary,.rb-join,.ao-quick-actions a:first-child) img.icon {filter:brightness(0) invert(.12)!important}
  html[data-theme=dark] body :is(.primary,.rb-join,.ao-quick-actions a:first-child) img[src^="assets/icons/"] {filter:brightness(0) invert(.12)!important}
  html[data-theme=dark] body img.account-section-icon {background:transparent;filter:brightness(0) invert(.9)}
  html[data-theme=dark] body .ao-photo-link>span {background:var(--dm-raised)!important;color:var(--dm-accent)!important;border-color:var(--dm-control-border)!important}
  html[data-theme=dark] body [data-shared-header] .brand img {content:url('assets/roamerbook-logo-footer.svg')}
  html[data-theme=dark] body :is(.account-section-icon,.region-number,.recent-symbol,.cp-view-symbol) {color:var(--dm-accent);background-color:var(--dm-selected)}

  /* Preserve white copy on photographic banners, and dark ink on paper captions. */
  html[data-theme=dark] body :is(.account-feature-photo,.ao-recommendations,.achievement-passport,.ap-dog-card,
    .ft-photo,.ft-inspiration,.cp-hero,.cj-hero,.add-hero) :is(h1,h2,h3,p,small,.handwritten) {color:#f0f4f5!important}
  html[data-theme=dark] body .ab-story-photo figcaption {color:#12384d!important}
  html[data-theme=dark] body .page-footer a.footer-community-link span {color:inherit!important}
  html[data-theme=dark] body>.auth-skip {background:var(--dm-raised)!important;color:var(--dm-text)!important}
  html[data-theme=dark] body .auth-methods button[aria-pressed=true] {background:var(--dm-selected);color:var(--dm-accent);box-shadow:inset 0 0 0 1px var(--dm-accent)}
  html[data-theme=dark] body .auth-travel-note {background:#203035;color:#f0f4f5}
  html[data-theme=dark] body .auth-scenery-bottom .auth-handwritten {color:#f0f4f5!important;text-shadow:0 1px 4px #101719}
  html[data-theme=dark] body .auth-input-wrap:before {background:var(--dm-subtle)}

  /* The same controls also appear in modal traveler and group editors. */
  html[data-theme=dark] body dialog :is(.gw-choice>span,.tw-choice>span,.tw-choice,.tw-photo-choices,
    .tw-type label>span,.tw-interests label>span,.tw-activities label>span,.tw-secondary,
    .gw-progress li>span,.tw-progress li>span,.gw-tags small,.tw-groups em,
    .gw-add-traveler,.gw-info,.gw-review>section,.tw-help,.tw-photo,.gw-initial,.tw-review-section,.tw-remove-traveler) {
    background:var(--dm-raised)!important;color:var(--dm-text)!important;border-color:var(--dm-border)!important;
  }
  html[data-theme=dark] body dialog :is(.gw-choice input:checked+span,.tw-type input:checked+span,
    .tw-interests input:checked+span,.tw-activities input:checked+span) {background:var(--dm-selected)!important;color:var(--dm-accent)!important;border-color:var(--dm-accent)!important}
  html[data-theme=dark] body dialog :is(.gw-close,.tw-close,.tw-create-group,.tw-review-section button) {color:var(--dm-accent)!important}
  html[data-theme=dark] body dialog :is(.tw-photo-remove,.tw-remove-traveler) {color:var(--dm-danger)!important}
  html[data-theme=dark] body dialog :is(.tw-photo-choices>button,.tw-avatars>span) {color:var(--dm-accent)!important}
  html[data-theme=dark] body dialog :is(.tw-field>span,.tw-progress li,.gw-progress li,.gw-body legend>span) {color:var(--dm-muted)!important}
  html[data-theme=dark] body dialog :is(.tw-photo,.tw-photo>button) {background:var(--dm-raised)!important}
  html[data-theme=dark] body dialog :is(.gw-member-more,.gw-review-heading button) {color:var(--dm-accent)!important}
  html[data-theme=dark] body dialog .gw-badge {background:var(--dm-selected)!important;color:var(--dm-accent)!important}
  html[data-theme=dark] body dialog :is(#gw-error,#tw-error) {background:var(--dm-danger-bg)!important;color:var(--dm-danger)!important}

  /* Traveler details are mounted in a separate dialog, outside the account workspace. */
  html[data-theme=dark] #traveler-details-dialog :is(.td-panel,.td-trip) {background:var(--dm-surface);border-color:var(--dm-border)}
  html[data-theme=dark] #traveler-details-dialog :is(.td-tags span,.td-info,.td-empty,.td-motto,.td-group-placeholder,.td-portrait button,.td-initial) {background:var(--dm-raised);color:var(--dm-text)}
  html[data-theme=dark] #traveler-details-dialog :is(.td-interest-tiles>div,.td-insights article) {background:var(--dm-selected);color:var(--dm-accent)}
  html[data-theme=dark] #traveler-details-dialog .td-interest-tiles>div:nth-child(3n+2) {background:#382e43;color:#ddc1f2}
  html[data-theme=dark] #traveler-details-dialog .td-insights article:nth-child(2) {background:#3d2c35;color:#f4bed1}
  html[data-theme=dark] #traveler-details-dialog .td-interest-tiles span {color:var(--dm-text);font-size:12px}
  html[data-theme=dark] #traveler-details-dialog :is(.td-heading>button,.td-heading>a,.td-link,.td-facts dd>button,.td-close) {color:var(--dm-accent)}
  html[data-theme=dark] #traveler-details-dialog :is(.compact,.td-group-row) {border-color:var(--dm-border)}
  html[data-theme=dark] #traveler-details-dialog :is(.td-group-row em,.td-trip em,.td-notice) {background:var(--dm-selected);color:var(--dm-accent)}
  html[data-theme=dark] #traveler-details-dialog :is(.td-menu button[data-td=remove],.td-mobile-actions button[data-td=remove],.td-confirm>span,#td-error) {background:var(--dm-danger-bg);color:var(--dm-danger)}
  html[data-theme=dark] #traveler-details-dialog .td-close {width:44px;height:44px}
  html[data-theme=dark] body .cj-summary-row>.icon {background:var(--dm-selected);color:var(--dm-accent);flex-shrink:0}
  html[data-theme=dark].account-root body[data-account-page] .pp-savebar #pp-save {background:var(--dm-accent)!important;color:var(--dm-on-accent)!important;border-color:var(--dm-accent)!important}
  html[data-theme=dark].account-root body[data-account-page] .pp-savebar #pp-save:hover {background:var(--dm-accent-hover)!important}
  html[data-theme=dark].account-root body[data-account-page] .pp-savebar #pp-save-status {background:none;color:var(--dm-muted)}
}
.theme-selection{display:none}
