/* Pearl / Graphite is the installed phone PWA's shared color contract.
   Keep this after the legacy tool styles. Media, Tarot card artwork, OAuth
   brands and semantic status colors are intentionally independent of chrome. */
@media (max-width:820px), (display-mode:standalone) and (max-width:1024px) and (orientation:landscape) and (hover:none) and (pointer:coarse) {
  html.pwa-standalone {
    --ivio-pearl-bg:#f7f8fa;
    --ivio-pearl-surface:#fff;
    --ivio-pearl-ink:#20242b;
    --ivio-pearl-muted:#66707e;
    --ivio-pearl-soft:#eef1f5;
    --ivio-pearl-line:#e2e6ec;
    --ivio-pearl-focus:#aab4c2;
    --ivio-pearl-danger:#b33c49;
    --ivio-pearl-danger-bg:#fff1f3;
    --ivio-pearl-success:#267554;
    --ivio-pearl-success-bg:#ecf7f0;
  }

  html.pwa-standalone #mobile-lite,
  html.pwa-standalone #mobile-lite :is(.mobile-ai-page,.mobile-ai-chat,.mobile-thread,.mobile-thread-body,.mobile-profile-edit-page,.mobile-price-editor-page,.mobile-article-page),
  html.pwa-standalone #mobile-notifications-page {
    background:var(--ivio-pearl-bg);color:var(--ivio-pearl-ink);
  }
  html.pwa-standalone #mobile-lite :is(.mobile-system-status-bg,.mobile-app-topbar,.mobile-messages-app-head,.mobile-power-card,.mobile-ai-header,.mobile-thread-head,.mobile-profile-edit-head,.mobile-article-header),
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-header,
  html.pwa-standalone #mobile-notifications-page .mobile-notifications-head {
    background:var(--ivio-pearl-surface);background-image:none;color:var(--ivio-pearl-ink);
    border-bottom-color:var(--ivio-pearl-line);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;
  }
  html.pwa-standalone #mobile-lite :is(.mobile-ai-header strong,.mobile-profile-edit-head strong,.mobile-article-header strong,.mobile-power-head strong,.mobile-messages-app-title),
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-header>strong {
    color:var(--ivio-pearl-ink);font-weight:600;
  }
  html.pwa-standalone #mobile-lite .mobile-ai-header {height:calc(64px + env(safe-area-inset-top));}
  html.pwa-standalone #mobile-lite .mobile-ai-page:not(.is-chat) {padding-top:calc(64px + env(safe-area-inset-top));}
  html.pwa-standalone #mobile-lite .mobile-ai-header>strong {font-size:16px;}
  html.pwa-standalone #mobile-lite .mobile-ai-back.ivio-tool-back {
    width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;
    background:transparent!important;color:var(--ivio-pearl-ink)!important;box-shadow:none!important;
  }
  html.pwa-standalone #mobile-lite .mobile-ai-back.ivio-tool-back:hover {background:transparent!important;}
  html.pwa-standalone #mobile-lite .mobile-ai-back.ivio-tool-back:active {background:var(--ivio-pearl-soft)!important;}
  html.pwa-standalone #mobile-lite .mobile-ai-back.ivio-tool-back:focus-visible {outline-color:var(--ivio-pearl-focus)!important;}
  html.pwa-standalone #mobile-lite :is(.mobile-profile-edit-back,.mobile-thread-head button,.mobile-icon-button,.mobile-profile-menu-trigger) {color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-icon-button {background:var(--ivio-pearl-soft);}
  html.pwa-standalone #mobile-lite :is(.mobile-icon-button,.mobile-notification-button):is(:hover,:focus,:active) {background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);}

  /* Content surfaces use the same paper and hairline across every tab. */
  html.pwa-standalone #mobile-lite :is(.mobile-feed-card,.mobile-profile-card,.mobile-search-field,.mobile-creator-row,.mobile-empty,.mobile-profile-edit-card,.mobile-price-card,.mobile-price-item,.mobile-price-editor-service,.mobile-article-card,.mobile-article-setup-card,.mobile-message,.mobile-feed-error-card,.mobile-generation-owner-card),
  html.pwa-standalone #mobile-lite-modal :is(.mobile-lite-dialog,.mobile-tariff-option,.mobile-settings-chat-note,.mobile-settings-video-lock,.mobile-tarot-person-row,.mobile-tarot-history-list button) {
    border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-surface);color:var(--ivio-pearl-ink);
  }
  html.pwa-standalone #mobile-lite :is(.mobile-avatar,.mobile-ai-orb,.mobile-ai-chat-intro-icon,.mobile-message-empty-icon,.mobile-feed-error-visual,.mobile-profile-stat-icon) {
    background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);box-shadow:none;
  }
  html.pwa-standalone #mobile-lite .mobile-profile-cover {background:linear-gradient(135deg,#e8ecf1,#cbd3df);}
  html.pwa-standalone #mobile-lite .mobile-message-empty-visual:before,
  html.pwa-standalone #mobile-lite .mobile-message-empty-visual:after {background:var(--ivio-pearl-soft);box-shadow:inset 0 0 0 1px var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite .mobile-feed-error-visual:after {background:var(--ivio-pearl-danger);box-shadow:none;}
  html.pwa-standalone #mobile-lite :is(.mobile-empty strong,.mobile-feed-error-card strong,.mobile-profile-name,.mobile-blog-title h2,.mobile-ai-hero h1,.mobile-ai-chat-intro h1,.mobile-iva-live-card h1,.mobile-article-intro h1,.mobile-price-title,.mobile-creator-copy strong) {color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite :is(.mobile-feed-author-copy>span,.mobile-blog-summary,.mobile-empty,.mobile-feed-error-card p,.mobile-profile-handle,.mobile-profile-bio,.mobile-profile-biography,.mobile-profile-location,.mobile-profile-stat>span,.mobile-creator-copy>span,.mobile-creator-rank,.mobile-rating,.mobile-ai-hero p,.mobile-ai-chat-intro p,.mobile-iva-live-card p,.mobile-ai-chat-time,.mobile-ai-chat-day span,.mobile-profile-edit-note,.mobile-profile-edit-count,.mobile-profile-social-field>span,.mobile-profile-edit-field,.mobile-price-editor-description-count),
  html.pwa-standalone #mobile-lite-modal :is(.mobile-lite-dialog-text,.mobile-settings-kind-label,.mobile-settings-grid label,.mobile-settings-chat-note,.mobile-settings-tarot-note span,.mobile-tariff-price,.mobile-tarot-person-row small,.mobile-tarot-history-list small),
  html.pwa-standalone #mobile-notifications-page :is(.mobile-notifications-heading p,.mobile-notifications-empty small) {color:var(--ivio-pearl-muted);}
  html.pwa-standalone #mobile-lite :is(.mobile-profile-stats,.mobile-feed-actions,.mobile-conversation-swipe,.mobile-profile-edit-card,.mobile-profile-social-links) {border-color:var(--ivio-pearl-line);}

  /* Native fields keep their validation states, caret, and keyboard behavior. */
  html.pwa-standalone :is(#mobile-lite,#mobile-lite-modal) :where(input:not([type=range]):not([type=file]):not([type=checkbox]):not([type=radio]),textarea,select) {
    border-color:var(--ivio-pearl-line);background-color:var(--ivio-pearl-surface);color:var(--ivio-pearl-ink);caret-color:var(--ivio-pearl-ink);
  }
  html.pwa-standalone :is(#mobile-lite,#mobile-lite-modal) :is(input,textarea)::placeholder {color:var(--ivio-pearl-muted);opacity:1;}
  html.pwa-standalone :is(#mobile-lite,#mobile-lite-modal) :is(input,textarea,select):focus {
    border-color:var(--ivio-pearl-focus);box-shadow:0 0 0 3px rgba(32,36,43,.055);
  }
  html.pwa-standalone :is(#mobile-lite,#mobile-lite-modal) :is(button,a,input,textarea,select):focus-visible {outline:2px solid var(--ivio-pearl-focus);outline-offset:2px;}
  html.pwa-standalone #mobile-lite :is(.mobile-profile-edit-field,.mobile-profile-social-field) input.available {border-color:#9bc5b0;background:var(--ivio-pearl-success-bg);}
  html.pwa-standalone #mobile-lite :is(.mobile-profile-edit-field,.mobile-profile-social-field) input.invalid {border-color:var(--ivio-pearl-danger);background:var(--ivio-pearl-danger-bg);}
  html.pwa-standalone #mobile-lite .mobile-profile-nickname-status.available {color:var(--ivio-pearl-success);}
  html.pwa-standalone #mobile-lite :is(.mobile-profile-nickname-status.invalid,.mobile-profile-nickname-status.taken,.mobile-profile-nickname-status.reserved) {color:var(--ivio-pearl-danger);}
  html.pwa-standalone #mobile-lite :is(input[type=checkbox],input[type=radio],input[type=range]) {accent-color:var(--ivio-pearl-ink);}

  /* The dock geometry and its midpoint blur boundary stay unchanged. */
  html.pwa-standalone #mobile-lite:before {background:linear-gradient(180deg,rgba(247,248,250,0),rgba(247,248,250,.96) 50%,#f7f8fa);}
  html.pwa-standalone #mobile-lite :is(.mobile-profile-tabs button.active,.mobile-choice-row button.active,.mobile-message.mine,.mobile-thread-selection-head,.mobile-message-order-context,.mobile-message-edit-context,.mobile-reference-chip,.mobile-ai-chat-file,.mobile-generation-empty-reward) {
    border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);box-shadow:none;
  }
  html.pwa-standalone #mobile-lite .mobile-profile-tabs button {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-surface);color:var(--ivio-pearl-muted);}
  html.pwa-standalone #mobile-lite .mobile-profile-tabs button.active {background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite :is(.mobile-power-head strong b,.mobile-ai-cost-badge,.mobile-generation-owner-count,.mobile-article-cost) {background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-progress-track {background:var(--ivio-pearl-soft);}
  html.pwa-standalone #mobile-lite .mobile-progress-fill {background:var(--ivio-pearl-ink);box-shadow:none;}
  html.pwa-standalone #mobile-lite .mobile-article-cover.no-cover {background:linear-gradient(145deg,#e8ecf1,#cbd3df);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite :is(.mobile-price-editor-ai,.mobile-price-editor-add,.mobile-profile-avatar-editor button) {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);box-shadow:none;}
  html.pwa-standalone #mobile-lite .mobile-profile-banner-change {background:rgba(32,36,43,.76);color:#fff;}
  html.pwa-standalone #mobile-lite .mobile-price-editor-remove {background:var(--ivio-pearl-danger-bg);color:var(--ivio-pearl-danger);}
  html.pwa-standalone #mobile-lite .mobile-price-editor-intro {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-soft);color:var(--ivio-pearl-muted);}
  html.pwa-standalone #mobile-lite :is(.mobile-generation-owner-publish,.mobile-price-edit,.mobile-iva-live-timer,.mobile-thread-head button:active) {background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite :is(.mobile-pencil,.mobile-pencil:active,.mobile-profile-save,.mobile-price-editor-save,.mobile-feed-error-card button,.mobile-empty button,.mobile-message-input-shell>button,.mobile-comment-compose>button,.mobile-article-generate,.mobile-article-primary,.mobile-article-publish,.mobile-article-save,.mobile-iva-live-stop) {
    border-color:var(--ivio-pearl-ink);background:var(--ivio-pearl-ink);color:var(--ivio-pearl-surface)!important;box-shadow:0 5px 14px rgba(32,36,43,.1);
  }
  html.pwa-standalone #mobile-lite :is(.mobile-message-composer,.mobile-price-editor-footer) {border-color:var(--ivio-pearl-line);background:rgba(247,248,250,.97);box-shadow:none;}
  html.pwa-standalone #mobile-lite .mobile-message-input-shell {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-surface);}
  html.pwa-standalone #mobile-lite :is(.mobile-unread,.mobile-message-select-circle.selected) {border-color:var(--ivio-pearl-ink);background:var(--ivio-pearl-ink);color:#fff;}
  html.pwa-standalone #mobile-lite :is(.mobile-message-status.read,.mobile-conversation-read-state.read) {color:#4e6079;}

  /* Article creation and editing use the same controls as the cabinet. */
  html.pwa-standalone #mobile-lite :is(.mobile-article-topic-card,.mobile-article-options,.mobile-article-cost,.mobile-article-paper,.mobile-form-card,.mobile-price-editor-toggle) {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-surface);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite :is(.mobile-article-spark,.mobile-article-topic-label .creator-icon,.mobile-article-cost-value,.mobile-article-topic-label,.mobile-choice-label,.mobile-article-cost-copy strong) {color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-article-spark {background:var(--ivio-pearl-soft);box-shadow:none;}
  html.pwa-standalone #mobile-lite :is(.mobile-article-intro p,.mobile-article-topic-hint,.mobile-article-choice-help,.mobile-choice-note,.mobile-article-cost-copy small,.mobile-image-style-option small) {color:var(--ivio-pearl-muted);border-color:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite :is(.mobile-choice-row button,.mobile-image-style-option,.mobile-article-tariff,.mobile-replace-button) {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);box-shadow:none;}
  html.pwa-standalone #mobile-lite :is(.mobile-choice-row button.active,.mobile-image-style-option.active) {border-color:var(--ivio-pearl-focus);background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-image-style-option .mobile-image-style-icon {background:var(--ivio-pearl-surface);color:var(--ivio-pearl-ink);box-shadow:none;}
  html.pwa-standalone #mobile-lite :is(.mobile-generate-article,.mobile-publish-button) {background:var(--ivio-pearl-ink);color:#fff!important;box-shadow:0 5px 14px rgba(32,36,43,.1);}
  html.pwa-standalone #mobile-lite .mobile-article-cost.insufficient {border-color:#e5bac0;background:var(--ivio-pearl-danger-bg);}
  html.pwa-standalone #mobile-lite .mobile-article-cost.insufficient .mobile-article-cost-copy strong {color:var(--ivio-pearl-danger);}

  /* All four IVA modes share Pearl bars, composer, neutral actions and fields. */
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-ai-composer {
    padding:11px 10px 9px 12px;border:1px solid var(--ivio-pearl-line);border-radius:26px;
    background:linear-gradient(155deg,#fff,#f0f3f7);color:var(--ivio-pearl-ink);
    box-shadow:0 7px 22px rgba(32,39,56,.08),inset 0 1px 0 #fff;backdrop-filter:none;-webkit-backdrop-filter:none;
  }
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-ai-composer:focus-within {border-color:var(--ivio-pearl-focus);box-shadow:0 0 0 3px rgba(32,36,43,.035),0 7px 22px rgba(32,39,56,.08);}
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-ai-composer textarea {min-height:40px;max-height:116px;padding:5px 4px;background:transparent;color:var(--ivio-pearl-ink);font-size:16px;line-height:1.5;box-shadow:none;}
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-ai-tools {border-color:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-ai-tools :is(.round,.settings),
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-composer :is(.mobile-tarot-plus,.settings,.voice) {
    background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);-webkit-text-fill-color:currentColor;box-shadow:none;
  }
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-ai-tools .settings .creator-icon,
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-composer .settings .creator-icon {color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-ai-tools .send:not(.live):not(.speaking) {background:var(--ivio-pearl-ink);color:#fff;-webkit-text-fill-color:#fff;box-shadow:0 3px 8px rgba(32,39,56,.08);}
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-iva-chat-new {width:44px;height:44px;padding:0;border-radius:15px;background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);box-shadow:none;}
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-iva-chat-new:active {background:var(--ivio-pearl-line);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-iva-chat-new span {display:none;}
  html.pwa-standalone #mobile-lite .mobile-ai-page .mobile-ai-tools :is(.live,.speaking),
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-composer .voice.live {background:var(--ivio-pearl-danger-bg)!important;color:var(--ivio-pearl-danger)!important;-webkit-text-fill-color:currentColor;}
  html.pwa-standalone #mobile-lite .mobile-tarot-mic-live {background:var(--ivio-pearl-danger);}
  html.pwa-standalone #mobile-lite :is(.mobile-ai-error-stage button,.mobile-tarot-load-error button) {background:var(--ivio-pearl-ink);color:#fff;box-shadow:none;}

  /* Shared sheets include settings, tariffs, comments, profile and Tarot. */
  html.pwa-standalone #mobile-lite-modal {background:rgba(32,36,43,.46);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal .mobile-lite-dialog {background:var(--ivio-pearl-surface);color:var(--ivio-pearl-ink);border-color:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite-modal .mobile-lite-dialog-icon {background:var(--ivio-pearl-ink);color:#fff;box-shadow:none;border-color:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite-modal :is(.mobile-lite-dialog-head,.mobile-comment-compose) {background:var(--ivio-pearl-surface);border-color:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite-modal :is(.mobile-lite-dialog-title,.mobile-settings-video-lock strong,.mobile-settings-tarot-note strong,.mobile-tariff-copy small) {color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal :is(.mobile-lite-dialog-close,.mobile-settings-kind,.mobile-settings-kind button small,.mobile-settings-tarot-note b) {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal .mobile-settings-kind button {color:var(--ivio-pearl-muted);font-weight:600;}
  html.pwa-standalone #mobile-lite-modal .mobile-settings-kind button.active {background:var(--ivio-pearl-surface);color:var(--ivio-pearl-ink);box-shadow:0 3px 10px rgba(32,36,43,.06);}
  html.pwa-standalone #mobile-lite-modal .mobile-settings-kind button.active small {background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal :is(.mobile-tariff-option.current,.mobile-tarot-person-row.selected) {border-color:var(--ivio-pearl-focus);background:var(--ivio-pearl-soft);box-shadow:none;}
  html.pwa-standalone #mobile-lite-modal .mobile-lite-btn:not(.mobile-oauth-button):not(.danger):not(.primary) {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal :is(.mobile-lite-btn.primary,.mobile-settings-video-lock button,.mobile-email-auth-button,.mobile-comment-compose button) {border-color:var(--ivio-pearl-ink);background:var(--ivio-pearl-ink);color:#fff;box-shadow:none;}
  html.pwa-standalone #mobile-lite-modal .mobile-profile-menu-item:not(.danger) {color:var(--ivio-pearl-ink);border-color:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite-modal .mobile-profile-menu-item:not(.danger):active {background:var(--ivio-pearl-soft);}
  html.pwa-standalone #mobile-lite-modal .mobile-profile-menu-item.danger {color:var(--ivio-pearl-danger);}
  html.pwa-standalone #mobile-notifications-page .mobile-notifications-empty-icon {background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);}

  /* Tarot is light throughout, including setup and the daily Pulse sheet.
     Real card faces remain artwork and keep their original colors. */
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot {background:var(--ivio-pearl-bg);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-tarot-stage {top:calc(64px + env(safe-area-inset-top));bottom:calc(160px + env(safe-area-inset-bottom));}
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot :is(.mobile-tarot-setup,.mobile-tarot-picker>label,.mobile-tarot-profile-chip,.mobile-tarot-selected button,.mobile-tarot-context button) {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-surface);color:var(--ivio-pearl-ink);box-shadow:none;}
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot :is(.mobile-tarot-setup h1,.mobile-tarot-question h1,.mobile-tarot-preparing h1,.mobile-tarot-reading>header h1,.mobile-tarot-counter b) {color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot :is(.mobile-tarot-setup>span,.mobile-tarot-context legend,.mobile-tarot-question>span,.mobile-tarot-question>p,.mobile-tarot-preparing>p,.mobile-tarot-preparing small,.mobile-tarot-reading>header span,.mobile-tarot-counter span,.mobile-tarot-load-error p,.mobile-tarot-stage>.mobile-loading-state) {color:var(--ivio-pearl-muted);}
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-context button.selected {border-color:var(--ivio-pearl-focus);background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-setup-actions button {border-color:var(--ivio-pearl-line);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-setup-actions button.primary {border-color:var(--ivio-pearl-ink);background:var(--ivio-pearl-ink);color:#fff;box-shadow:none;}
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot :is(.mobile-tarot-history,.mobile-tarot-new,.mobile-tarot-pulse-button) {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-soft);color:var(--ivio-pearl-ink);box-shadow:none;}
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot :is(.mobile-tarot-new span,.mobile-tarot-pulse-button span,.mobile-tarot-selected b,.mobile-tarot-symbol,.mobile-tarot-orbit i,.mobile-tarot-preparing-orb i) {color:var(--ivio-pearl-ink);filter:none;text-shadow:none;}
  html.pwa-standalone #mobile-lite .mobile-ai-page.is-tarot :is(.mobile-tarot-symbol,.mobile-tarot-orbit,.mobile-tarot-orbit:after,.mobile-tarot-preparing-orb b) {border-color:var(--ivio-pearl-line);background:transparent;box-shadow:none;}
  html.pwa-standalone #mobile-lite .mobile-tarot-picker svg {stroke:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-tarot-steps i {background:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite .mobile-tarot-steps i.active {background:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite .mobile-tarot-error {color:var(--ivio-pearl-danger);}
  html.pwa-standalone #mobile-lite .mobile-tarot-voice-error {border-color:#e5bac0;background:var(--ivio-pearl-danger-bg);color:var(--ivio-pearl-danger);}
  html.pwa-standalone #mobile-lite .mobile-tarot-voice-error button {color:var(--ivio-pearl-danger);}
  html.pwa-standalone #mobile-lite-modal.tarot-pulse-mode :is(.mobile-lite-dialog-head,.mobile-tarot-pulse) {background:var(--ivio-pearl-surface);color:var(--ivio-pearl-ink);border-color:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite-modal .mobile-tarot-pulse :is(h2,h3,b,strong,output) {color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal .mobile-tarot-pulse :is(p,span,small,.mobile-tarot-pulse-identity,.mobile-tarot-pulse-disclaimer) {color:var(--ivio-pearl-muted);}
  html.pwa-standalone #mobile-lite-modal .mobile-tarot-pulse :is(.mobile-tarot-pulse-dashboard,.mobile-tarot-pulse-guidance,.mobile-tarot-pulse-tabs,.mobile-tarot-pulse-tags>span) {border-color:var(--ivio-pearl-line);background:var(--ivio-pearl-soft);box-shadow:none;}
  html.pwa-standalone #mobile-lite-modal .mobile-tarot-pulse-overall {background:conic-gradient(var(--ivio-pearl-ink) var(--pulse-overall,0%),var(--ivio-pearl-line) 0);box-shadow:none;}
  html.pwa-standalone #mobile-lite-modal .mobile-tarot-pulse-overall>div {background:var(--ivio-pearl-surface);box-shadow:none;}
  html.pwa-standalone #mobile-lite-modal .mobile-tarot-pulse-tabs button {color:var(--ivio-pearl-muted);}
  html.pwa-standalone #mobile-lite-modal .mobile-tarot-pulse-tabs button.active {background:var(--ivio-pearl-ink);color:#fff;box-shadow:none;}
  html.pwa-standalone #mobile-lite-modal .mobile-tarot-pulse :is(.mobile-tarot-pulse-metrics article>i,.mobile-tarot-pulse-guidance p i,.mobile-tarot-pulse-identity em) {background:var(--ivio-pearl-surface);border-color:var(--ivio-pearl-line);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal .mobile-tarot-pulse-metrics em {background:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite-modal .mobile-tarot-pulse-metrics em b {background:var(--ivio-pearl-ink);}

  /* Fortune shares the neutral shell; the principal prize is distinguished
     by graphite while other sectors retain separate light tones. */
  html.pwa-standalone #mobile-lite-modal.fortune-mode {background:var(--ivio-pearl-surface);}
  html.pwa-standalone #mobile-lite-modal.fortune-mode :is(.fortune-panel,.mobile-lite-dialog-head) {background:var(--ivio-pearl-surface);color:var(--ivio-pearl-ink);border-color:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite-modal .fortune-panel:before {background:radial-gradient(ellipse at 45% 45%,var(--ivio-pearl-soft),var(--ivio-pearl-surface));}
  html.pwa-standalone #mobile-lite-modal :is(.fortune-spin-button,.fortune-retry-button) {background:var(--ivio-pearl-ink);color:#fff;box-shadow:0 5px 15px rgba(32,36,43,.13);}
  html.pwa-standalone #mobile-lite-modal .fortune-spin-button:disabled {background:var(--ivio-pearl-soft);color:var(--ivio-pearl-muted);box-shadow:none;}
  html.pwa-standalone #mobile-lite-modal :is(.fortune-kicker,.fortune-result,.fortune-await,.fortune-next) {background:var(--ivio-pearl-soft);border-color:var(--ivio-pearl-line);color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal :is(.fortune-lead,.fortune-fineprint,.fortune-prizes>small,.fortune-prizes>strong,.fortune-prize-list small,.fortune-result small,.fortune-result span,.fortune-await small,.fortune-await span,.fortune-next small,.fortune-next span) {color:var(--ivio-pearl-muted);}
  html.pwa-standalone #mobile-lite-modal :is(.fortune-prize-list span,.fortune-prize-list>div:last-child small,.fortune-history,.fortune-result .fortune-balance) {color:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal .fortune-prize-list span:before {background:#bac4d1;}
  html.pwa-standalone #mobile-lite-modal .fortune-prize-list>div:last-child span:before {background:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-sector {fill:#e4e9f0;}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-sector-1 {fill:#f0f2f6;}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-sector-2 {fill:#d5dde7;}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-sector-3 {fill:#eef1f5;}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-sector-4 {fill:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-mark text {fill:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-mark.is-plus text {fill:#fff;}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-svg>circle {stroke:var(--ivio-pearl-line);}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-svg>path:not([class]) {stroke:var(--ivio-pearl-ink);}
  html.pwa-standalone #mobile-lite-modal .fortune-pointer {border-top-color:var(--ivio-pearl-ink);filter:drop-shadow(0 3px 5px rgba(32,36,43,.18));}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-wrap {filter:drop-shadow(0 12px 20px rgba(32,36,43,.08));}
  html.pwa-standalone #mobile-lite-modal .fortune-wheel-gold-overlay {stroke:var(--ivio-pearl-ink);}
}

/* The mobile Home feed shares one surface across its existing card types. */
@media (max-width:820px), (display-mode:standalone) and (max-width:1024px) and (orientation:landscape) and (hover:none) and (pointer:coarse) {
  #mobile-lite #mobile-app-view > .mobile-feed {
    --ivio-feed-gutter:14px;
    --ivio-feed-ink:var(--ivio-pearl-ink,#20242b);
    --ivio-feed-muted:var(--ivio-pearl-muted,#66707e);
    --ivio-feed-line:var(--ivio-pearl-line,#e2e6ec);
    gap:0;
    padding-inline:0;
    background:var(--ivio-pearl-surface,#fff);
    color:var(--ivio-feed-ink);
  }

  #mobile-lite #mobile-app-view > .mobile-feed > .mobile-feed-batch {
    gap:0;
  }

  #mobile-lite #mobile-app-view > .mobile-feed > .mobile-feed-batch > :is(.mobile-feed-card,.ivio-community-post-card,.community-album-card) {
    min-width:0;
    margin:0;
    padding:12px var(--ivio-feed-gutter) 6px;
    border:0;
    border-bottom:1px solid var(--ivio-feed-line);
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }

  /* Video styles set the old outer card frame with !important. */
  #mobile-lite #mobile-app-view > .mobile-feed > .mobile-feed-batch > :is(.mobile-video-accent-card,.mobile-project-card) {
    padding:12px var(--ivio-feed-gutter) 6px!important;
    border:0!important;
    border-bottom:1px solid var(--ivio-feed-line)!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }

  #mobile-lite #mobile-app-view > .mobile-feed :is(.mobile-feed-author,.mobile-project-head,.community-album-card-head) {
    gap:10px;
    padding:0 0 9px;
  }

  #mobile-lite #mobile-app-view > .mobile-feed .ivio-post-author {
    margin-bottom:9px;
  }

  #mobile-lite #mobile-app-view > .mobile-feed :is(.mobile-feed-author-copy strong,.mobile-project-author strong,.ivio-post-author strong,.community-album-card-head strong) {
    color:var(--ivio-feed-ink);
    font-size:14px;
    font-weight:600;
    line-height:1.35;
  }

  #mobile-lite #mobile-app-view > .mobile-feed :is(.mobile-feed-author-copy > span,.mobile-project-author small,.ivio-post-author small,.community-album-card-head small) {
    color:var(--ivio-feed-muted);
    font-size:11px;
    line-height:1.45;
  }

  #mobile-lite #mobile-app-view > .mobile-feed :is(.mobile-feed-media,.mobile-photo-group-grid,.mobile-article-cover-wrap,.mobile-feed-price) {
    margin-inline:0;
  }

  #mobile-lite #mobile-app-view > .mobile-feed :is(.mobile-feed-media.tall,.mobile-article-cover-wrap) {
    width:100%;
  }

  #mobile-lite #mobile-app-view > .mobile-feed .community-album-grid {
    border-radius:12px;
    overflow:hidden;
  }

  #mobile-lite #mobile-app-view > .mobile-feed :is(.mobile-blog-title,.mobile-blog-summary,.mobile-feed-copy,.mobile-video-caption,.mobile-project-panel,.community-album-card > h3) {
    padding-inline:0;
  }

  #mobile-lite #mobile-app-view > .mobile-feed :is(.mobile-blog-read,.community-album-card > p) {
    margin-inline:0;
  }

  #mobile-lite #mobile-app-view > .mobile-feed :is(.ivio-post-text,.mobile-blog-summary p,.mobile-feed-copy p,.community-album-card > p) {
    color:var(--ivio-feed-ink);
    font-size:15px;
    line-height:1.54;
  }

  #mobile-lite #mobile-app-view > .mobile-feed :is(.mobile-blog-title h2,.mobile-feed-copy h2,.community-album-card > h3) {
    color:var(--ivio-feed-ink);
    font-size:18px;
    font-weight:600;
    line-height:1.3;
    letter-spacing:normal;
  }

  #mobile-lite #mobile-app-view > .mobile-feed :is(.ivio-post-actions,.mobile-feed-actions,.community-album-actions) {
    padding:2px 0 0;
    border-top:0;
  }

  #mobile-lite #mobile-app-view > .mobile-feed .ivio-post-actions {
    margin-top:5px;
  }
}
