/* Oneiros Glass: shared surfaces and accessible day/night appearance. Loads last. */
:root {
  --ui-bg:#0b1020;--ui-text:#f4f0fa;--ui-muted:#c0bdd2;--ui-soft:#aaa6bf;
  --ui-surface:rgba(25,30,51,.87);--ui-raised:rgba(36,40,64,.94);--ui-solid:#191e33;
  --ui-input:#111729;--ui-border:rgba(200,190,236,.22);--ui-accent:#d3bdf7;
  --ui-accent-ink:#201a30;--ui-gold:#f2cd9f;--ui-focus:#8de0d7;--ui-danger:#ffb6c3;
  --ui-shadow:0 16px 48px rgba(0,0,0,.18);--ui-glass:blur(18px) saturate(125%);
  --ui-overlay:rgba(4,8,20,.7);--ui-glow:rgba(172,141,230,.1);--ui-rose:#efb5c8;
}
html[data-appearance=light] {
  --ui-bg:#f8f5ef;--ui-text:#20263c;--ui-muted:#515b71;--ui-soft:#606b7d;
  --ui-surface:rgba(255,255,255,.85);--ui-raised:rgba(255,253,249,.96);--ui-solid:#fffdf9;
  --ui-input:#fffcf7;--ui-border:rgba(45,55,86,.19);--ui-accent:#6b4694;
  --ui-accent-ink:#fff;--ui-gold:#86603a;--ui-focus:#126e74;--ui-danger:#a12949;
  --ui-shadow:0 16px 48px rgba(50,46,75,.09);--ui-overlay:rgba(34,40,61,.35);
  --ui-glow:rgba(138,107,173,.07);--ui-rose:#984264;
}
html[data-appearance] body {
  --bg:var(--ui-bg);--bg2:var(--ui-solid);--bg3:var(--ui-input);--cream:var(--ui-bg);
  --surface:var(--ui-solid);--glass:var(--ui-surface);--border:var(--ui-border);--border2:var(--ui-border);
  --text:var(--ui-text);--muted:var(--ui-muted);--muted2:var(--ui-muted);
  --indigo:var(--ui-text);--indigo-mid:var(--ui-muted);--indigo-light:var(--ui-muted);
  --accent:var(--ui-accent);--accent2:var(--ui-accent);--gold:var(--ui-gold);
  --rose:var(--ui-danger);--rose-deep:var(--ui-danger);--lavender:var(--ui-glow);
  --teal:var(--ui-focus);--green-deep:var(--ui-focus);--gold-deep:var(--ui-gold);
  --green:var(--ui-focus);
  background:var(--ui-bg);color:var(--ui-text);font-size:15px;line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
html { scroll-behavior:smooth;scroll-padding-top:110px; }
body { touch-action:manipulation; }
body::before { pointer-events:none; }
html[data-appearance=light] body::after { opacity:.16; }
html[data-appearance] body[data-theme=aurora] { --ui-accent:#92e4cf;--ui-accent-ink:#08241d; }
html[data-appearance] body[data-theme=rose] { --ui-accent:#f3bbcc;--ui-accent-ink:#351426; }
html[data-appearance] body[data-theme=eclipse] { --ui-accent:#ebcb92;--ui-accent-ink:#2f2210; }
html[data-appearance=light] body[data-theme=aurora] { --ui-accent:#187363;--ui-accent-ink:#fff; }
html[data-appearance=light] body[data-theme=rose] { --ui-accent:#994368;--ui-accent-ink:#fff; }
html[data-appearance=light] body[data-theme=eclipse] { --ui-accent:#805b29;--ui-accent-ink:#fff; }
[hidden] { display:none!important; }
button,a,input,textarea,select { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible {
  outline:3px solid var(--ui-focus)!important;outline-offset:4px;
}
html[data-appearance] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select,.form-input,.settings-input,.search-input,.login-input,.chat-input,.dream-title-input) {
  background:var(--ui-input);color:var(--ui-text);border-color:var(--ui-border);
  font-size:16px;font-weight:400;opacity:1;caret-color:var(--ui-accent);line-height:1.5;
}
html[data-appearance] input::placeholder,html[data-appearance] textarea::placeholder {
  color:var(--ui-soft);opacity:1;
}
html[data-appearance] input:-webkit-autofill {
  -webkit-text-fill-color:var(--ui-text)!important;caret-color:var(--ui-text);
  -webkit-box-shadow:0 0 0 1000px var(--ui-input) inset!important;
}
html[data-appearance] :is(.form-label,.settings-label,.login-label,.modal-note-label) { color:var(--ui-muted);font-size:13px;font-weight:500;letter-spacing:.04em; }
html[data-appearance] :is(.btn-primary,.submit-dream,.save-btn,.login-btn,.tour-next,.tour-start-btn,.tour-done-btn,.chat-send,.pwa-install-btn.primary) {
  background:var(--ui-accent);color:var(--ui-accent-ink);border-color:transparent;font-size:14px;font-weight:500;min-height:44px;
  box-shadow:0 5px 16px var(--ui-glow);
}
html[data-appearance] :is(.btn-ghost,.tour-back,.pill,.method-btn,.emotion-choice,.theme-swatch,.lucid-tab,.idea-row button) {
  background:var(--ui-glow);color:var(--ui-text);border-color:var(--ui-border);font-size:13px;min-height:40px;
}
html[data-appearance] :is(.pill.active,.method-btn.active,.emotion-choice.selected,.theme-swatch.active,.lucid-tab.active) { border-color:var(--ui-accent);color:var(--ui-accent); }
html[data-appearance] :is(.danger-btn,.danger-btn:hover) { background:var(--ui-glow);color:var(--ui-danger);border-color:var(--ui-danger);font-size:14px;min-height:44px; }
html[data-appearance] :is(.text-link,.see-all,.hero-explore,.load-more) { color:var(--ui-accent);font-size:14px; }
html[data-appearance] :is(.page-sub,.settings-info,.modal-sub,.modal-footer,.check-row,.auth-perk,.auth-notice,.dash-date,.profile-email,.profile-since,.notif-text,.notif-time,.journal-excerpt,.journal-footer,.match-excerpt,.match-card-excerpt,.match-meta,.card-sub,.resonance-sub,.map-sub,.insights-note,.insight-panel p,.dream-dialog p,.dream-dialog li,.lucid-lead,.lucid-small,.lucid-status,.landing-free-note,.wind-card p,.login-sub,.login-notice,.login-return) { color:var(--ui-muted);font-size:14px;line-height:1.7; }
html[data-appearance] :is(.page-title,.dash-greeting,.section-title,.capture-prompt,.modal-title,.settings-section-title,.profile-name,.journal-title,.match-title,.match-card-title,.map-title,.card-value,.resonance-num,.profile-stat-num,.notif-panel-title,.tour-title,.tour-welcome-title,.tour-done-title,.dream-dialog h2,.dream-dialog h3,.insight-panel h2,.wind-card h2,.lucid-dialog h2,.login-title,.chart-card-title,.section-heading h2) { color:var(--ui-text); }
html[data-appearance] :is(.eyebrow,.card-label,.resonance-label,.stat-label,.sidebar-section,.profile-stat-label,.journal-tag,.map-stat-label,.badge-name,.leaderboard-name,.draft-state) { color:var(--ui-muted);font-size:12px; }
html[data-appearance] :is(.sidebar-item,.bottom-nav-item,.nav-btn,.tab-btn,.nav-role,.convo-preview,.chat-header-sub,.msg-time) { color:var(--ui-muted); }
html[data-appearance] :is(.sidebar-item.active,.sidebar-item:hover,.bottom-nav-item.active,.nav-btn.active,.tab-btn.active) { color:var(--ui-accent);background:var(--ui-glow); }
html[data-appearance] :is(.nav-logo,.topbar-logo,.universe-brand,.convo-name,.chat-header-name,.convo-list-title,.leaderboard-score) { color:var(--ui-text); }
html[data-appearance] :is(.nav-logo span,.topbar-logo span,.logo-star,.universe-brand small,.hero-content h1 em) { color:var(--ui-accent); }
/* Surfaces share one material; readable content stays opaque enough to carry text. */
html[data-appearance] :is(#main-nav,.topbar,.mobile-header,.bottom-nav,.sidebar,.capture-card,.card,.resonance-card,.journal-entry,.match-card,.match-row,.settings-section,.profile-hero,.profile-stat,.insight-panel,.wind-card,.membership-card,.badge-section,.leaderboard,.streak-card,.chart-card,.stat-card,.stats-card,.table-card,.panel-card,.flag-card,.queue-card,.login-card,.login-box,.notif-panel,.notification-row,.notification-detail,.interface-settings,.sound-library,.glass-brand,.ui-player,.pwa-prompt,.ios-install-panel) {
  background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-border);
  box-shadow:var(--ui-shadow),inset 0 1px 0 rgba(255,255,255,.09);
}
@supports (backdrop-filter:blur(1px)) {
  html[data-effects=full] :is(#main-nav,.topbar,.mobile-header,.bottom-nav,.sidebar,.capture-card,.card,.resonance-card,.journal-entry,.match-card,.settings-section,.profile-hero,.insight-panel,.wind-card,.membership-card,.chart-card,.stat-card,.table-card,.login-card,.login-box,.notif-panel,.notification-row,.notification-detail,.interface-settings,.sound-library,.glass-brand,.ui-player) {
    -webkit-backdrop-filter:var(--ui-glass);backdrop-filter:var(--ui-glass);
  }
}
html[data-appearance] :is(.modal,.dream-dialog,.lucid-dialog,.tour-card,.tour-welcome-card,.tour-done-card,#toast,.achievement-toast) { background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-border);box-shadow:var(--ui-shadow); }
html[data-appearance] :is(.modal-overlay,.tour-welcome,.tour-done) { background:var(--ui-overlay); }
html[data-appearance] :is(dialog::backdrop) { background:var(--ui-overlay);backdrop-filter:blur(8px); }
html[data-appearance] :is(.tour-body,.tour-welcome-sub,.tour-done-sub,.tour-welcome-step,.tour-step-label) { color:var(--ui-muted);font-size:14px; }
html[data-appearance] :is(.tour-card::before) { background:var(--ui-raised);border-color:var(--ui-border); }
html[data-appearance] :is(.messages-layout,.chat-pane,.chat-messages,.convo-list,.chat-header,.chat-input-area,.chat-input-area,.msg-bubble) { background:var(--ui-input);color:var(--ui-text);border-color:var(--ui-border); }
html[data-appearance] .msg-row.mine .msg-bubble { background:var(--ui-accent);color:var(--ui-accent-ink);border:0; }
html[data-appearance] :is(.consent-mini,.recorder-ui,.upload-zone,.empty-state,.tour-welcome-step,.map-container) { background:var(--ui-glow);color:var(--ui-muted);border-color:var(--ui-border); }
html[data-appearance] :is(.detail-fields input,.detail-fields textarea,.detail-fields select) { color:var(--ui-text);background:var(--ui-input); }
html[data-appearance] :is(.detail-fields label,.insight-bar>div:first-child,.convo-preview) { color:var(--ui-muted);font-size:13px; }
html[data-appearance] :is(.connect-btn,.request-actions button) { background:var(--ui-accent);color:var(--ui-accent-ink);font-size:13px;min-height:40px; }
html[data-appearance] :is(.journal-tag,.badge-item,.badge-item.locked,.theme-tag,.filter-btn,.stat-pill,.status-badge) { background:var(--ui-glow);color:var(--ui-muted);border-color:var(--ui-border); }
html[data-appearance=light] :is(.hero-scene,.scene-shade) { opacity:.22; }
html[data-appearance=light] .dream-hero { background:linear-gradient(130deg,#f8f5ef,#eee8f7 65%,#eee9e1); }
/* Light hero: a soft day-coloured wash behind the copy so text never sits directly on the mid-tone moon image. */
html[data-appearance=light] .dream-hero .scene-shade { opacity:1;background:linear-gradient(90deg,rgba(248,245,239,.9) 0%,rgba(248,245,239,.72) 40%,rgba(248,245,239,.15) 70%,transparent 100%); }
html[data-appearance=light] :is(.hero-content>p,.hero-note) { color:var(--ui-text);font-weight:400; }
html[data-appearance] :is(.orbit-note,.hero-bottom span,.dream-fragment span) { font-size:11px;letter-spacing:.14em; }
@media (max-width:760px) { html[data-appearance] .dream-hero .orbit-note { display:none; } }
@media (max-width:760px) { html[data-appearance=light] .dream-hero .scene-shade { background:linear-gradient(180deg,rgba(248,245,239,.82),rgba(248,245,239,.7) 70%,rgba(248,245,239,.4)); } }
html[data-appearance=light] :is(.hero-content h1,.hero-content h1 span,.collective-copy h2,.sanctuary-section h2,.last-invitation h2,.journey-card h3,.stat-num,.hero-bottom,.orbit-note,.dream-fragment p,.landing-lucid h2,.landing-plan h3,.landing-price) { color:var(--ui-text); }
html[data-appearance] :is(.hero-content>p,.hero-note,.journey-card p,.collective-copy>p,.trust-grid p,.last-invitation p,.dream-footer p,.landing-lucid>p,.landing-lucid-perks,.landing-per) { color:var(--ui-muted);font-size:15px; }
html[data-appearance] :is(.journey-card,.landing-plan,.dream-fragment,.announcement-banner,.invite-banner) { background:var(--ui-surface);border-color:var(--ui-border);color:var(--ui-text); }
/* Invitation banner: solid themed card so the message never sits pale-on-pale over the page. */
html[data-appearance] .invite-banner { background:var(--ui-solid);border-color:var(--ui-border);box-shadow:0 14px 40px rgba(20,24,44,.22); }
html[data-appearance] .invite-banner p { color:var(--ui-text);font-size:14px;line-height:1.5; }
html[data-appearance] .invite-banner strong { color:var(--ui-gold);font-weight:600; }
html[data-appearance] .invite-banner > span { color:var(--ui-gold); }
html[data-appearance] .invite-banner .invite-close { color:var(--ui-muted);min-width:36px;min-height:36px;border-radius:50%;cursor:pointer; }
html[data-appearance] .invite-banner .invite-close:hover { color:var(--ui-text);background:var(--ui-raised); }
html[data-appearance] :is(.landing-nav a,.landing-nav button,.dream-footer button,.dream-footer>span) { color:var(--ui-muted);font-size:13px; }
html[data-appearance=light] :is(.starfield,.dream-aura,.bg-orbs) { opacity:.45; }
html[data-appearance] .nav-cta { background:var(--ui-accent);color:var(--ui-accent-ink);font-size:13px;min-height:44px; }
html[data-appearance] body #nav-auth-links .nav-btn { color:var(--ui-text);border-color:var(--ui-border);min-height:44px; }
html[data-appearance=light] :is(.hero-content h1 em,.lucid-dialog h2 em) { background:none;-webkit-text-fill-color:var(--ui-accent);color:var(--ui-accent); }
html[data-appearance] body { --lucid-gold:var(--ui-gold);--lucid-lav:var(--ui-accent); }
html[data-appearance] :is(.lucid-plan,.lucid-plan.selected,.lucid-teaser,.membership-card,.pass-card,.symbol-card,.symbol-preview,.book-preview,.calendar-day,.wind-intention,.sound-tile,.breath-controls,.order-card,.lucid-receipt,.code-card) { background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border); }
html[data-appearance] :is(.lucid-plan strong,.lucid-plan-name,.lucid-plan-price,.lucid-teaser strong,.sound-tile strong,.membership-card h3,.symbol-card h3,.lucid-price,.lucid-plan .price,.lucid-plan .plan-name) { color:var(--ui-text); }
html[data-appearance] :is(.lucid-plan small,.lucid-plan-note,.lucid-plan-per,.lucid-teaser p,.sound-tile small,.sound-footer,.lucid-fine,.lucid-perk,.lucid-perk p,.lucid-plan .per-night,.lucid-plan .plan-days,.lucid-checkout p,.lucid-summary,.membership-note,.calendar-header,.breath-label) { color:var(--ui-muted);font-size:13px; }
html[data-appearance] :is(.lucid-tabs button,.lucid-tabs button.active,.lucid-dialog .btn-ghost,.wind-card .btn-ghost) { color:var(--ui-text);border-color:var(--ui-border); }
html[data-appearance] .sidebar-lucid { color:var(--ui-gold)!important; }
html[data-appearance] .lucid-status { color:var(--ui-muted)!important; }
html[data-appearance] :is(.membership,.membership.is-open,.membership-box,.dash-note,.reflection-card,.deep-preview,.resonant-list button,.cal-day,.cal-dreams button,.gift-code code,.lucid-field input,.lucid-code-row input) { background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border); }
html[data-appearance] :is(.membership h2,.membership h3,.membership-title,.reflection-card h3,.cal-head,.cal-day,.lucid-plan-days,.lucid-plan-price,.lucid-plan-title) { color:var(--ui-text); }
html[data-appearance] :is(.membership p,.membership small,.reflection-card p,.dash-note p,.recall-prompts button,.cal-day.empty,.cal-label,.lucid-plan-per,.lucid-per-night,.lucid-summary,.lucid-note,.lucid-fineprint) { color:var(--ui-muted); }
html[data-appearance] .lucid-cta { background:var(--ui-accent);color:var(--ui-accent-ink);font-size:15px;min-height:48px; }
html[data-appearance] :is(.modal-footer a,.trust-grid h3,.lucid-perks strong,.lucid-providers,.lucid-field,.lucid-discount) { color:var(--ui-text)!important; }
html[data-appearance] .lucid-fineprint { color:var(--ui-muted)!important;font-size:13px!important; }
html[data-appearance] .lucid-cta { background:var(--ui-accent)!important;color:var(--ui-accent-ink)!important;border-color:var(--ui-accent)!important; }
html[data-appearance] :is(.section-heading h2 em,.sanctuary-section h2 em,.dash-greeting em,.page-title em,.observatory-intro h1 em,.observatory-intro h2 em,.login-universe h2 em) { color:var(--ui-accent); }
html[data-appearance] :is(.section-heading>p,.card-step,.capture-meta label,.emotion-selector>span,.recall-prompts>span,.landing-price small,.lucid-section-head>p,#landing-lucid-perks>span,.metric-label,.metric-sub,.stat-card-label,.stat-card-sub,.guideline-desc) { color:var(--ui-muted);font-size:13px; }
html[data-appearance] :is(.lucid-section-head h2,.observatory-intro h1,.observatory-intro h2,.login-universe h2,.stat-card-value) { color:var(--ui-text); }
html[data-appearance] .lucid-section-head h2 em { background:none;-webkit-text-fill-color:var(--ui-accent);color:var(--ui-accent); }
html[data-appearance] .lucid-section-head>p strong { color:var(--ui-text); }
html[data-appearance] :is(.observatory-intro,.metric-card,.emotion-cell,.recurring-card,.mod-item,.event-form,.flag-header,.flag-footer,.guidelines-panel,.dream-content,.mod-content) { background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border);box-shadow:var(--ui-shadow); }
html[data-appearance] :is(.observatory-intro p,.observatory-intro .eyebrow,.login-universe p,.guideline-desc) { color:var(--ui-muted);font-size:14px; }
html[data-appearance] #login-screen { background:radial-gradient(ellipse at 20% 20%,var(--ui-glow),transparent 65%),var(--ui-bg); }
html[data-appearance] :is(.metric-card,.guidelines-panel,.observatory-intro) { -webkit-backdrop-filter:var(--ui-glass);backdrop-filter:var(--ui-glass); }
html[data-appearance] .sidebar-item { background:transparent;font-size:14px;min-height:46px;line-height:1.5;text-align:left;width:100%; }
html[data-appearance] .sidebar { overflow-y:auto;overscroll-behavior:contain;max-height:calc(100dvh - 95px);padding-bottom:90px; }
html[data-appearance] .guideline-action { font-size:13px; }
html[data-appearance] .lucid-chip { color:var(--ui-gold);border-color:var(--ui-border);font-size:13px; }
html[data-appearance] .toast { background:var(--ui-raised);color:var(--ui-text); }
html[data-appearance] .dash-main { padding-bottom:70px; }
.brand-mark { width:36px;height:36px;display:inline-block;flex:0 0 auto;aspect-ratio:1;border-radius:50%;background:#faf7f2 url('oneiros-logo.jpg') 50% 24%/380% auto no-repeat;border:1px solid var(--ui-border); }
.nav-logo { display:inline-flex;align-items:center;gap:8px;white-space:nowrap; }
.nav-logo .logo-orbit { display:none; }
.glass-brand { margin:30px auto 60px;max-width:1120px;border-radius:28px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:40px;align-items:center;padding:32px; }
.glass-brand img { display:block;width:100%;max-width:100%;height:auto;object-fit:contain;border-radius:20px; }
.glass-brand h2 { font:400 clamp(30px,4vw,48px)/1.1 'Cormorant Garamond',serif;margin:14px 0; }
.glass-brand p { font-size:16px;color:var(--ui-muted);margin:12px 0 24px; }
.interface-controls { display:inline-flex;align-items:center;gap:6px;flex-shrink:0; }
.interface-icon { display:inline-grid;place-items:center;width:42px;height:42px;background:var(--ui-glow);border:1px solid var(--ui-border);border-radius:50%;color:var(--ui-text);font-size:19px; }
.interface-settings { width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 32px);margin:auto;padding:28px;border-radius:24px;overflow-y:auto;overscroll-behavior:contain; }
.interface-settings h2 { font:400 36px/1.1 'Cormorant Garamond',serif;color:var(--ui-text);margin:8px 0 12px; }
.interface-settings h3 { font-size:16px;color:var(--ui-text);margin:22px 0 12px; }
.interface-settings p { color:var(--ui-muted);font-size:14px; }
.settings-heading { display:flex;align-items:center;justify-content:space-between;gap:15px; }
.appearance-options { display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0; }
.appearance-options button { min-height:48px;border-radius:14px;border:1px solid var(--ui-border);background:var(--ui-input);color:var(--ui-muted);font-size:14px; }
.appearance-options button[aria-pressed=true] { border-color:var(--ui-accent);color:var(--ui-accent);box-shadow:inset 0 0 0 1px var(--ui-accent); }
.preference-row { display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 0;border-bottom:1px solid var(--ui-border);color:var(--ui-text);font-size:14px; }
.preference-row small { display:block;color:var(--ui-muted);font-size:12px;max-width:330px; }
.preference-row input[type=checkbox] { width:22px;height:22px;accent-color:var(--ui-accent);flex-shrink:0; }
.preference-row input[type=range] { width:130px;accent-color:var(--ui-accent); }
.settings-actions { display:flex;gap:10px;flex-wrap:wrap;margin:20px 0 0; }
.settings-actions button { border-radius:12px;padding:10px 16px; }
.password-field { position:relative; }
.password-field input { width:100%;padding-right:64px!important; }
.password-toggle { position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:none;color:var(--ui-muted);min-height:40px;padding:8px;font-size:12px; }
.password-hint { font-size:12px;color:var(--ui-muted);margin-top:8px; }
.password-hint[data-valid=true] { color:var(--ui-focus); }
.ui-player { position:fixed;left:20px;bottom:20px;z-index:180;display:flex;align-items:center;gap:10px;border-radius:50px;padding:8px 14px 8px 8px; }
.ui-player .interface-icon { width:38px;height:38px; }
.ui-player-label { color:var(--ui-muted);font-size:12px; }
.ui-player.active .ui-player-label { color:var(--ui-accent); }
.sound-library { padding:26px;border-radius:20px;grid-column:1/-1; }
.sound-library h2 { font:400 32px 'Cormorant Garamond',serif;color:var(--ui-text); }
.sound-library p { color:var(--ui-muted);font-size:14px; }
.sound-library-actions { display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:18px; }
.sound-library-actions button { padding:12px 20px;border-radius:14px; }
.notification-layout { max-width:1100px;margin:0 auto;padding:125px 30px 120px; }
.notification-heading { display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px; }
.notification-heading h1 { font:400 clamp(38px,5vw,58px)/1.1 'Cormorant Garamond',serif;color:var(--ui-text);margin:10px 0; }
.notification-heading p { color:var(--ui-muted);font-size:15px; }
.notification-toolbar { display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:24px; }
.notification-toolbar .btn-ghost { border-radius:50px;padding:10px 20px; }
.notification-toolbar .btn-ghost[aria-pressed=true] { background:var(--ui-accent);color:var(--ui-accent-ink); }
.notification-toolbar .notification-count { margin-left:auto;font-size:13px;color:var(--ui-muted); }
.notification-list { display:grid;gap:12px; }
.notification-row { display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:16px;padding:22px;border-radius:20px;align-items:start; }
.notification-row.unread { border-left:3px solid var(--ui-accent); }
.notification-row .notification-symbol { width:44px;height:44px;border-radius:15px;background:var(--ui-glow);display:grid;place-items:center;font-size:22px; }
.notification-title { display:inline;text-align:left;padding:0;background:none;border:0;font:500 17px/1.5 'Jost',sans-serif;color:var(--ui-text);overflow-wrap:anywhere; }
.notification-preview { margin:5px 0;color:var(--ui-muted);font-size:14px;overflow-wrap:anywhere; }
.notification-date { color:var(--ui-soft);font-size:12px; }
.notification-actions { display:flex;gap:8px;flex-wrap:wrap; }
.notification-actions button { padding:8px 12px;min-height:40px;border:1px solid var(--ui-border);border-radius:10px;background:var(--ui-glow);color:var(--ui-muted);font-size:12px; }
.notification-actions button[data-action=delete],.notification-actions .delete { color:var(--ui-danger); }
.notification-detail { border-radius:24px;padding:clamp(24px,5vw,48px);margin-top:24px; }
.notification-detail h1 { font:400 clamp(32px,5vw,46px)/1.15 'Cormorant Garamond',serif;margin:15px 0;color:var(--ui-text);overflow-wrap:anywhere; }
.notification-detail .notification-full-body { color:var(--ui-muted);font-size:17px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;margin:24px 0; }
.notification-detail .notification-actions { margin:20px 0; }
.notification-count-badge { display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:50px;color:var(--ui-accent-ink);background:var(--ui-accent);font:500 11px/1 system-ui; }
.notification-detail .request-actions { margin:20px 0; }
.mobile-more { position:fixed;right:12px;bottom:calc(82px + env(safe-area-inset-bottom,0px));z-index:210;background:var(--ui-raised);border:1px solid var(--ui-border);box-shadow:var(--ui-shadow);border-radius:20px;padding:10px;min-width:220px; }
.mobile-more button { display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:none;border:0;color:var(--ui-text);min-height:48px;padding:10px 16px;border-radius:12px;font-size:15px; }
.mobile-more button:hover { background:var(--ui-glow); }
.connection-status { position:fixed;top:100px;left:50%;transform:translateX(-50%);z-index:650;border:1px solid var(--ui-border);border-radius:50px;padding:8px 20px;background:var(--ui-raised);color:var(--ui-muted);font-size:13px;max-width:calc(100vw - 24px);text-align:center; }
.tour-card { max-height:calc(100dvh - 130px);overflow-y:auto;overscroll-behavior:contain;transition:opacity .2s!important;animation:none!important; }
.tour-card.arrow-none { top:50%!important;left:50%!important;transform:translate(-50%,-50%); }
.tour-spotlight { transition:none!important;max-width:100vw; }
.tour-welcome-card,.tour-done-card { max-height:calc(100dvh - 40px);overflow-y:auto; }
.tour-welcome.active,.tour-done.active { overscroll-behavior:contain; }
.bottom-nav-item { min-height:48px; }
html[data-appearance] .bottom-nav-label { font-size:11px; }
html[data-appearance] :is(.table-wrap,.table-container) { overflow-x:auto;overscroll-behavior-x:contain; }
html[data-appearance] :is(table,thead,tbody,tr,th,td) { border-color:var(--ui-border); }
html[data-appearance] th { color:var(--ui-muted);background:var(--ui-input);font-size:12px; }
html[data-appearance] td { color:var(--ui-text);font-size:14px; }
html[data-appearance] :is(.stat-value,.stat-num,.chart-card-value,.section-title,.panel-title,.flag-title,.dream-title,.user-name,.flag-dream-title,.queue-title,.control-text strong) { color:var(--ui-text); }
html[data-appearance] :is(.stat-label,.stat-sub,.section-sub,.chart-card-sub,.panel-sub,.control-text span,.control-row,.flag-meta,.dream-meta,.flag-body,.empty,.user-email,.flag-dream-content,.queue-meta) { color:var(--ui-muted);font-size:13px; }
html[data-appearance=light] :is(.event-tag,.archetype-count,.geo-country,.stat-trend,.login-notice strong) { color:var(--ui-text); }
html[data-appearance=light] :is(.stats-grid,.overview-grid,.data-table,.flag-detail,.user-detail,.email-preview,.main-content,.content-area,.panel,.admin-sidebar) { background:transparent;color:var(--ui-text); }
html[data-effects=reduced] :is(*,::before,::after) { backdrop-filter:none!important;-webkit-backdrop-filter:none!important; }
html[data-effects=reduced] :is(.bg-orbs,.dream-aura,.dream-particles) { display:none; }
html[data-effects=reduced] :is(.capture-card,.card,.settings-section,.sidebar,.notification-row,.interface-settings,.ui-player,.chart-card,.wind-card) { background:var(--ui-solid); }
@media(min-width:769px) { .desktop-hidden { display:none!important; } }
@media(max-width:1100px) and (min-width:769px) { .landing-nav { display:none!important; } #nav-user-links .nav-links .nav-btn:nth-child(n+4) { display:none; } .glass-brand { margin-left:24px;margin-right:24px; } }
@media(max-width:768px) {
  html { scroll-padding-top:85px; }
  #main-nav { padding:0 14px;gap:8px; }
  .nav-logo { font-size:24px!important;gap:6px; }
  .brand-mark { width:30px;height:30px; }
  .nav-logo .logo-star { display:none; }
  .interface-icon { width:38px;height:38px;font-size:18px; }
  #main-nav>.interface-controls { gap:4px; }
  #main-nav .nav-btn { padding:10px 8px;font-size:12px;letter-spacing:0; }
  #main-nav .nav-cta { font-size:12px;padding:10px 12px;letter-spacing:0; }
  #main-nav .nav-cta span { display:none; }
  #main-nav .nav-cta { max-width:112px; }
  #main-nav .nav-cta { font-size:0; }
  #main-nav .nav-cta { display:inline-flex!important;align-items:center;justify-content:center; }
  #main-nav .nav-cta::before { content:'Join free';font-size:12px; }
  #main-nav>.interface-controls .settings-open { display:none; }
  #mobile-header { padding:0 12px;gap:8px; }
  #mobile-header>.interface-controls { margin-left:auto; }
  #mobile-header .avatar { width:32px;height:32px; }
  #mobile-header .notif-btn { font-size:19px;min-width:32px;padding:4px; }
  .mobile-header .nav-logo { font-size:22px!important; }
  html[data-appearance] .dash-main { padding:26px 16px 145px; }
  html[data-appearance] :is(.capture-meta input,.capture-meta select,.modal .form-input) { font-size:16px!important; }
  html[data-appearance] :is(.capture-prompt,.dash-greeting) { font-size:32px;line-height:1.15; }
  .capture-meta { grid-template-columns:1fr!important; }
  html[data-appearance] :is(.card-sub,.card-label,.resonance-sub,.resonance-label) { font-size:11px; }
  .capture-methods { gap:4px;flex-wrap:wrap; }
  .method-btn { padding:8px!important; }
  .glass-brand { grid-template-columns:1fr;gap:18px;padding:22px;margin:0 16px 40px; }
  .glass-brand img { max-width:440px;margin:auto; }
  .glass-brand p { font-size:15px; }
  .ui-player { left:12px;bottom:calc(82px + env(safe-area-inset-bottom,0px));padding:6px 10px 6px 6px; }
  body[data-view=landing] .ui-player { bottom:12px; }
  .ui-player-label { font-size:11px; }
  .notification-layout { padding:98px 16px 150px; }
  .notification-heading { flex-wrap:wrap; }
  .notification-row { grid-template-columns:38px minmax(0,1fr);padding:18px 16px;gap:12px; }
  .notification-row .notification-symbol { width:36px;height:36px; }
  .notification-row>.notification-actions { grid-column:2; }
  .notification-toolbar .notification-count { width:100%;margin:0; }
  .tour-card,.tour-card.arrow-none { top:auto!important;left:12px!important;bottom:calc(84px + env(safe-area-inset-bottom,0px))!important;width:calc(100% - 24px)!important;max-width:none!important;max-height:calc(100dvh - 165px);transform:none; }
  .tour-card::before { display:none!important; }
  .tour-running .ui-player { visibility:hidden; }
  .interface-settings { padding:24px 20px; }
  .sound-library { padding:22px; }
  .sound-library-actions { align-items:flex-start; }
  .topbar .interface-controls { margin-left:8px; }
  .topbar-right .clock,.topbar-right .live-indicator { display:none; }
  html[data-appearance] .dream-hero { min-height:780px;padding-left:22px;padding-right:22px; }
  .connection-status { top:80px; }
}
@media(prefers-reduced-motion:reduce) {
  html,html * { scroll-behavior:auto!important; }
  *,::before,::after { animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important; }
}
@media(forced-colors:active) { button,input,textarea,select,.notification-row { border:1px solid CanvasText!important; } }

/* 2.7 popup notifications: tone colours with WCAG AA contrast in light and dark appearance. */
html[data-appearance] #toast[data-tone],html[data-appearance] .toast[data-tone]{
  --tone-bg:var(--ui-raised);--tone-ink:var(--ui-text);--tone-edge:var(--ui-border);--tone-mark:var(--ui-accent);--tone-mark-ink:var(--ui-accent-ink);
  background:var(--tone-bg)!important;color:var(--tone-ink)!important;border:1px solid var(--tone-edge)!important;border-left:5px solid var(--tone-mark)!important;
  font-size:14px!important;line-height:1.5!important;font-weight:500;text-align:left;padding:12px 18px 12px 46px!important;border-radius:14px!important;
  max-width:min(560px,calc(100vw - 32px));box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;backdrop-filter:none!important;
  box-shadow:0 14px 40px rgba(20,22,40,.22)!important;
}
html[data-appearance] #toast[data-tone]::before,html[data-appearance] .toast[data-tone]::before{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);width:22px;height:22px;border-radius:50%;display:grid;place-items:center;
  font:700 13px/1 system-ui,sans-serif;background:var(--tone-mark);color:var(--tone-mark-ink);
}
html[data-appearance] [data-tone=success]::before{content:'✓'}
html[data-appearance] [data-tone=error]::before{content:'!'}
html[data-appearance] [data-tone=warning]::before{content:'!'}
html[data-appearance] [data-tone=info]::before{content:'i'}
html[data-appearance=light] #toast[data-tone=success],html[data-appearance=light] .toast[data-tone=success]{--tone-bg:#ecf8f1;--tone-ink:#0d3a23;--tone-edge:#9fd3b6;--tone-mark:#17734a;--tone-mark-ink:#fff}
html[data-appearance=light] #toast[data-tone=error],html[data-appearance=light] .toast[data-tone=error]{--tone-bg:#fdeef1;--tone-ink:#5a0d1f;--tone-edge:#f0aab9;--tone-mark:#b3203f;--tone-mark-ink:#fff}
html[data-appearance=light] #toast[data-tone=warning],html[data-appearance=light] .toast[data-tone=warning]{--tone-bg:#fff5e3;--tone-ink:#4a2f00;--tone-edge:#efc77d;--tone-mark:#8a5a00;--tone-mark-ink:#fff}
html[data-appearance=light] #toast[data-tone=info],html[data-appearance=light] .toast[data-tone=info]{--tone-bg:#f0eefb;--tone-ink:#231c4a;--tone-edge:#c5bdea;--tone-mark:#5b45a8;--tone-mark-ink:#fff}
html[data-appearance]:not([data-appearance=light]) #toast[data-tone=success],html[data-appearance]:not([data-appearance=light]) .toast[data-tone=success]{--tone-bg:#10291d;--tone-ink:#d6f7e4;--tone-edge:#2f6e4c;--tone-mark:#5fd49a;--tone-mark-ink:#06200f}
html[data-appearance]:not([data-appearance=light]) #toast[data-tone=error],html[data-appearance]:not([data-appearance=light]) .toast[data-tone=error]{--tone-bg:#331019;--tone-ink:#ffe1e7;--tone-edge:#7c2f42;--tone-mark:#ff8aa2;--tone-mark-ink:#3a0613}
html[data-appearance]:not([data-appearance=light]) #toast[data-tone=warning],html[data-appearance]:not([data-appearance=light]) .toast[data-tone=warning]{--tone-bg:#2f2410;--tone-ink:#ffefcf;--tone-edge:#7a5d22;--tone-mark:#f2c46b;--tone-mark-ink:#2a1c00}
html[data-appearance]:not([data-appearance=light]) #toast[data-tone=info],html[data-appearance]:not([data-appearance=light]) .toast[data-tone=info]{--tone-bg:#1d1b38;--tone-ink:#ece8ff;--tone-edge:#4a4380;--tone-mark:#b7a7ff;--tone-mark-ink:#1b1440}
@media (max-width:700px){html[data-appearance] #toast[data-tone],html[data-appearance] .toast[data-tone]{width:calc(100vw - 24px);max-width:calc(100vw - 24px);font-size:14px!important}}
