/* Shared contrast corrections. Phone retains its classic light app surfaces. */
:root[data-theme=dark]:not(.phone-layout){--ink:#edf4fb;--muted:#bbccdb;--surface:#243a4c;--sidebar:#253d50;--line:#526e84;--pinstripe:repeating-linear-gradient(#304b61 0 2px,#2b4458 2px 4px)}
:root[data-theme=dark]:not(.phone-layout) .app-window>.window-content{background:#213648;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.muted,.fine,.eyebrow,.source-card p){color:#bbccdb;text-shadow:none}
:root[data-theme=dark]:not(.phone-layout) .app-window a{color:#b7ddff}
:root[data-theme=dark]:not(.phone-layout) :is(.rich-toolbar,.finder-toolbar,.mail-compose-head,.mail-bottom,.pdf-find,.document-tabs,.browser-destinations,.cal-toolbar){background:linear-gradient(#38546b,#2a4358);border-color:#526e84;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.button,.setting-row,.wallpaper-options button){color:#edf4fb;background:linear-gradient(#415f79,#2d4a63);border-color:#68839a;text-shadow:none}
:root[data-theme=dark]:not(.phone-layout) :is(.button.primary,.primary-button,.send-button){color:#fff;background:linear-gradient(#537fa7,#355b7e);border-color:#7a9dbd}
:root[data-theme=dark]:not(.phone-layout) :is(input,textarea,select){background:#253f53;color:#f0f6fc;border-color:#7590a7;color-scheme:dark}
:root[data-theme=dark]:not(.phone-layout) :is(input,textarea)::placeholder{color:#b5c8d9;opacity:1}
:root[data-theme=dark]:not(.phone-layout) :is(.conversations,.chat-main,.chat-log){background:#20394b;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) .compact-messages .conversation{color:#edf4fb;background:transparent}
:root[data-theme=dark]:not(.phone-layout) .compact-messages .conversation strong{color:#f0f6fc;text-shadow:none}
:root[data-theme=dark]:not(.phone-layout) .compact-messages .conversation small{color:#bdcddd}
:root[data-theme=dark]:not(.phone-layout) .compact-messages .conversation.selected{background:#3a5773;border-color:#91abc3}
:root[data-theme=dark]:not(.phone-layout) .conversation-title{color:#edf4fb;text-shadow:none}
:root[data-theme=dark]:not(.phone-layout) .chat-header{background:var(--pinstripe);border-color:#526e84;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) .chat-header strong{color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.chat-header small,.chat-day){color:#c0d0de}
:root[data-theme=dark]:not(.phone-layout) .compact-messages .message{color:#f0f6fc;background:linear-gradient(#3a607a,#304e64);border-color:#7997ad}
:root[data-theme=dark]:not(.phone-layout) .compact-messages .message.user{color:#f2fff7;background:linear-gradient(#3c6653,#2f5142);border-color:#83a892}
:root[data-theme=dark]:not(.phone-layout) .compact-messages .message :is(small,p){color:inherit}
:root[data-theme=dark]:not(.phone-layout) :is(.compose,.compose-row){background:#2b4257;color:#f0f6fc;border-color:#698299}
:root[data-theme=dark]:not(.phone-layout) #message-input{color:#f0f6fc;background:transparent}
:root[data-theme=dark]:not(.phone-layout) :is(.reaction-add,.reaction-add:before){color:#d2e1ed;border-color:#8ba1b3}
:root[data-theme=dark]:not(.phone-layout) :is(.mail-app,.mail-reading,.mail-letter,.email-compose-form){background:#213648;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.mail-folders,.mail-list){background:#273f52;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.mail-folders button,.mail-list>button,.mail-list strong,.mail-subject h2){color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.mail-list small,.mail-subject small,.email-compose-form>label){color:#bfd0df}
:root[data-theme=dark]:not(.phone-layout) :is(.mail-list>button.selected,.mail-folders button.selected){background:#3a5773}
:root[data-theme=dark]:not(.phone-layout) .email-compose-form #mail-body{background:#213648!important;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) .email-verification{background:#273f52;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.verified-chip,.mail-wire-state){background:#345746;color:#dff6e9;border-color:#7fae93}
:root[data-theme=dark]:not(.phone-layout) .journey-app{background:#213c39;color:#edf6f0}
:root[data-theme=dark]:not(.phone-layout) .journey-hero{background:linear-gradient(#34564c,#263f3b)}
:root[data-theme=dark]:not(.phone-layout) :is(.journey-hero h1,.journey-hero h1 em,.journey-body h2,.journey-body h3,.journey-facts strong){color:#e1f1df}
:root[data-theme=dark]:not(.phone-layout) :is(.journey-lead,.journey-hero p:last-child,.journey-facts span,.journey-timeline p,.journey-timeline li,.journey-education p:not(.eyebrow)){color:#c3d7c9}
:root[data-theme=dark]:not(.phone-layout) :is(.journey-overview-grid>button,.journey-projects article,.journey-perspective){background:#2e4b44;border-color:#65836e;color:#edf6f0}
:root[data-theme=dark]:not(.phone-layout) :is(.journey-overview-grid strong,.journey-projects h3,.journey-timeline h3){color:#e7f4e5}
:root[data-theme=dark]:not(.phone-layout) :is(.journey-overview-grid small,.journey-overview-grid span,.journey-projects article>small,.journey-projects p,.journey-footer,.journey-footer a){color:#c1d5c4}
:root[data-theme=dark]:not(.phone-layout) .journey-nav button{color:#c8dbcd}
:root[data-theme=dark]:not(.phone-layout) .journey-nav [aria-pressed=true]{background:#496d5d;color:#fff;border-color:#8daa96}
:root[data-theme=dark]:not(.phone-layout) .journey-perspective .audience-switch button{background:#314f45;color:#d4e6d7;border-color:#7c9984}
:root[data-theme=dark]:not(.phone-layout) .journey-perspective .audience-switch [aria-pressed=true]{background:#537b65;color:#fff;border-color:#94b29f}
:root[data-theme=dark]:not(.phone-layout) :is(.settings-main,.settings-layout,.finder-main,.shared-file-manager){background:#213648;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.settings-main h2,.settings-main h3,.settings-owner strong,.settings-about-brand h3,.setting-row strong){color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.setting-group,.source-card){background:#2b455a;border-color:#5c778d;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.settings-sidebar,.finder-sidebar){background:#263e52;color:#d7e5f1}
:root[data-theme=dark]:not(.phone-layout) :is(.settings-sidebar button,.settings-owner small,.finder-sidebar button,.finder-sidebar small){color:#d7e5f1}
:root[data-theme=dark]:not(.phone-layout) :is(.catalog-card,.catalog-open){background:#2b455a;color:#edf4fb;border-color:#698196}
:root[data-theme=dark]:not(.phone-layout) .catalog-open strong{color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.catalog-open small,.finder-location-note,.trash-row small){color:#bfceda}
:root[data-theme=dark]:not(.phone-layout) :is(.trash-app,.trash-row){background:#213648;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.document-tab,.document-tab button){background:#2d465c;color:#e5eff7;border-color:#688198}
:root[data-theme=dark]:not(.phone-layout) .document-tab:has([aria-selected=true]){background:#456786;border-color:#98b1c8}
:root[data-theme=dark]:not(.phone-layout) :is(.pdf-status,.preview-app>footer){background:#2c4358;color:#ccdae5}
:root[data-theme=dark]:not(.phone-layout) :is(.pdf-find span,.pdf-thumbnails small){color:#c5d5e3}
:root[data-theme=dark]:not(.phone-layout) :is(.photos-main,.photos-sidebar){background:#213648;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.photos-main h2,.photos-sidebar button,.photo-grid span){color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) .album-placeholder{background:#2a4358;border-color:#658097;color:#d6e4ef}
:root[data-theme=dark]:not(.phone-layout) :is(.fixed-browser,.profile-site-view){background:#213648;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) .profile-site-view h1{color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.profile-site-view small,.profile-site-view p,.browser-fallback){color:#bfd1e1}
:root[data-theme=dark]:not(.phone-layout) .browser-destinations button{color:#d6e5f2}
:root[data-theme=dark]:not(.phone-layout) .browser-destinations [aria-pressed=true]{background:#486c8d;color:#fff;border-color:#8eadc9}
:root[data-theme=dark]:not(.phone-layout) :is(.calendar-six,.planner-timeline,.planner-column){background:#213648;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.planner-sidebar,.planner-day-head,.planner-hours){background:#294255;color:#d5e5ef;border-color:#5c758b}
:root[data-theme=dark]:not(.phone-layout) :is(.planner-day-head strong,.planner-sidebar h2){color:#e1f0e6}
:root[data-theme=dark]:not(.phone-layout) :is(.planner-day-head small,.planner-hours>span,.calendar-booking-footer){color:#bacddd}
:root[data-theme=dark]:not(.phone-layout) .planner-day-head button.weekend{background:#344552;opacity:1}
:root[data-theme=dark]:not(.phone-layout) .planner-day-head button.holiday{background:#584b32}
:root[data-theme=dark]:not(.phone-layout) :is(.planner-day-head button.holiday strong,.planner-day-head em){color:#ffe4ad}
:root[data-theme=dark]:not(.phone-layout) .planner-column.weekend{background:repeating-linear-gradient(135deg,#293d4b 0 5px,#304655 5px 6px)}
:root[data-theme=dark]:not(.phone-layout) .planner-column.holiday-column{background:#413f31}
:root[data-theme=dark]:not(.phone-layout) .planner-hour{border-color:#486072;background:repeating-linear-gradient(0deg,transparent 0 25px,#344e61 25px 26px)}
:root[data-theme=dark]:not(.phone-layout) .planner-hour.outside-work{background:repeating-linear-gradient(135deg,#344653 0 6px,#2e414f 6px 7px)}
:root[data-theme=dark]:not(.phone-layout) .calendar-time-slot{background:linear-gradient(#355e4d,#294a3d);color:#e6f7eb;border-color:#739d86}
:root[data-theme=dark]:not(.phone-layout) .calendar-time-slot.outside-slot{opacity:1;background:#344753;color:#c1cfda;border-color:#607584}
:root[data-theme=dark]:not(.phone-layout) :is(.voice-stage,.video-stage,.contact-gate,.about-website){background:#233d50;color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.voice-stage h1,.voice-stage h2,.video-stage h2,.contact-gate h2,.about-website h1){color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(dialog,.floating-panel,.menu-popover,.file-context,.control-panel){background:#294357;color:#edf4fb;border-color:#69859b}
:root[data-theme=dark]:not(.phone-layout) :is(dialog h2,.panel-heading,.control-panel strong,.search-result strong){color:#edf4fb}
:root[data-theme=dark]:not(.phone-layout) :is(.search-result small,.control-panel small,.file-context strong){color:#c1d3e1}
:root[data-theme=dark]:not(.phone-layout) .search-result:hover{background:#45617b}
/* Home wallpaper is a website preference on both presentations. */
.phone-layout .wallpaper{display:block!important}
.phone-layout .phone-home{background:linear-gradient(#07141b24,#07141b45);text-shadow:0 1px 4px #000}
.phone-layout .phone-home-name{color:#fff;text-shadow:0 1px 4px #000}
input[type=range]{touch-action:none;cursor:ew-resize;accent-color:#638fb5}
.interaction-previews{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
/* Both kinds of message reaction belong to the bottom-right of their bubble. */
.compact-messages .auto-reaction{left:auto;right:-9px;bottom:-12px}
.compact-messages .message:has(.auto-reaction):has(.visitor-reaction){min-width:90px}
.compact-messages .message:has(.visitor-reaction) .auto-reaction{right:24px}
.compact-messages .message:is(:has(.auto-reaction),:has(.visitor-reaction)) .reaction-add{right:-34px;bottom:4px}
.phone-layout .compact-messages .message:is(:has(.auto-reaction),:has(.visitor-reaction)) .reaction-add{right:-44px;bottom:-7px}
