/* Original warm atmosphere, shared across the app and account destinations.
   Presentation only: navigation, page structure and business flows stay intact. */
:root {
  color-scheme:light;
  --ui-bg:#fff9f5; --ui-surface:#fffaf6; --ui-surface-raised:#fffefd;
  --ui-ink:#2c211d; --ui-muted:#806b60; --ui-line:#efd8cb;
  --ui-accent:#b44f35; --ui-accent-soft:#fff0e7; --ui-positive:#42725b; --ui-danger:#b33f36;
  --ui-on-accent:#fff; --ui-positive-soft:#eaf2ed; --ui-danger-soft:#f8eae7;
  --ui-page-wash:radial-gradient(ellipse 72% 52% at 12% -8%,rgba(255,173,148,.30),transparent 66%),radial-gradient(ellipse 54% 44% at 96% 92%,rgba(255,218,200,.24),transparent 72%);
  --ui-surface-wash:linear-gradient(145deg,#fffaf6,#fffefd);
  --ui-surface-wash-start:#fffaf6; --ui-surface-wash-end:#fffefd;
  --ui-shadow:0 1px 0 rgba(255,255,255,.7) inset,0 10px 30px -8px rgba(92,54,39,.12),0 4px 10px -4px rgba(255,116,87,.10);
  --glass-bg:var(--ui-surface); --glass-border:var(--ui-line); --glass-shadow:var(--ui-shadow); --glass-blur:0px;
  --shell-coral:var(--ui-accent); --shell-coral-deep:var(--ui-accent); --shell-peach:#ffad94;
  --shell-soft:var(--ui-accent-soft); --shell-paper:var(--ui-surface); --shell-line:var(--ui-line); --shell-ink:var(--ui-ink); --shell-muted:var(--ui-muted);
}
html[data-theme="dark"] {
  color-scheme:dark;
  --ui-bg:#15100e; --ui-surface:#1e1714; --ui-surface-raised:#2e201b;
  --ui-ink:#fff8f4; --ui-muted:#c8b7af; --ui-line:#51382d;
  --ui-accent:#ff9d80; --ui-accent-soft:#402820; --ui-positive:#92c4a6; --ui-danger:#efaca1;
  --ui-on-accent:#241c16; --ui-positive-soft:#25372d; --ui-danger-soft:#3c2926;
  --ui-page-wash:radial-gradient(ellipse 66% 48% at 10% -5%,rgba(183,70,43,.30),transparent 68%),radial-gradient(ellipse 48% 40% at 95% 100%,rgba(141,71,48,.18),transparent 72%);
  --ui-surface-wash:linear-gradient(145deg,#2e201b,#1e1714);
  --ui-surface-wash-start:#2e201b; --ui-surface-wash-end:#1e1714;
  --ui-shadow:0 1px 0 rgba(255,209,183,.05) inset,0 12px 32px -10px rgba(0,0,0,.28);
  --glass-bg:var(--ui-surface); --glass-border:var(--ui-line);
  --shell-coral:var(--ui-accent); --shell-coral-deep:var(--ui-accent); --shell-soft:var(--ui-accent-soft);
  --shell-paper:var(--ui-surface); --shell-line:var(--ui-line); --shell-ink:var(--ui-ink); --shell-muted:var(--ui-muted);
}
html { -webkit-text-size-adjust:100%; scroll-padding-top:80px; }
html body,html[data-theme] body { background:var(--ui-page-wash) var(--ui-bg) fixed!important; color:var(--ui-ink)!important; font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",system-ui,sans-serif; font-size:15px; line-height:1.65; -webkit-font-smoothing:antialiased; }
[hidden],.hidden { display:none!important; }
html[data-theme][data-companion-gender] body[data-character-theme="true"] {
  --role-primary:var(--ui-accent); --role-strong:var(--ui-accent); --role-soft:var(--ui-accent-soft); --role-faint:var(--ui-accent-soft);
  --role-border:var(--ui-line); --role-ink:var(--ui-accent); --role-page:var(--ui-bg); --ink:var(--ui-ink); --ink-mute:var(--ui-muted);
  --glass-bg:var(--ui-surface); --glass-shadow:var(--ui-shadow);
  background:var(--ui-page-wash) var(--ui-bg) fixed!important; color:var(--ui-ink)!important;
}
html[data-theme][data-companion-gender] body[data-character-theme="true"] .bubble-me { background:var(--ui-accent-soft)!important; color:var(--ui-ink)!important; box-shadow:none!important; }
html[data-theme][data-companion-gender] body[data-character-theme="true"] :is(.card,.memory-feature-card,.diary-card,.memory-card) { border-color:var(--ui-line)!important; box-shadow:var(--ui-shadow)!important; }
html[data-theme][data-companion-gender] body[data-character-theme="true"] .app-tab-bar__item.is-active { background:var(--ui-accent-soft)!important; color:var(--ui-accent)!important; }
body::before,body::after,.glass-orb,.petal,.glass-particle { display:none!important; }
*,*::before,*::after { box-sizing:border-box; }
main > *,section,.glass,.shadow-sakura,.shadow-card { animation:none!important; }
.glass,.shadow-card:not([class*="bg-gradient"]),.shadow-sakura:not([class*="bg-gradient"]):not(button) { background:var(--ui-surface)!important; backdrop-filter:none!important; -webkit-backdrop-filter:none!important; border-color:var(--ui-line)!important; box-shadow:var(--ui-shadow)!important; }
html[data-theme] body > header,html[data-theme] header.sticky,html[data-theme] nav.glass-nav { background:var(--ui-surface)!important; border-color:var(--ui-line)!important; box-shadow:none!important; backdrop-filter:none!important; }
html[data-theme] .companion-shell-stack .app-tab-bar { background:var(--ui-surface)!important; border:1px solid var(--ui-line)!important; }
html[data-theme] .card { background:var(--ui-surface)!important; border-color:var(--ui-line)!important; }
h1,h2,h3 { color:var(--ui-ink); font-weight:650; letter-spacing:-.025em; text-wrap:balance; }
p { text-wrap:pretty; }
.text-mute,html[data-theme="dark"] .text-mute { color:var(--ui-muted)!important; }
.text-ink,html[data-theme="dark"] .text-ink { color:var(--ui-ink)!important; }
.text-sakura-deep,.text-sakura,html[data-theme="dark"] .text-sakura-deep { color:var(--ui-accent)!important; }
.border-line,html[data-theme="dark"] .border-line { border-color:var(--ui-line)!important; }
.bg-cloud,html[data-theme="dark"] .bg-cloud { background-color:var(--ui-bg)!important; }
.bg-sakura-soft,html[data-theme="dark"] .bg-sakura-soft { background-color:var(--ui-accent-soft)!important; }
html[data-theme="dark"] [class*="bg-white"] { background-color:var(--ui-surface)!important; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:not-allowed; }
button:not(:disabled):hover,a:hover { transform:none!important; }
:focus-visible { outline:2px solid var(--ui-accent)!important; outline-offset:3px; }
html[data-theme] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),html[data-theme] textarea,html[data-theme] select { color:var(--ui-ink)!important; background-color:var(--ui-surface)!important; border-color:var(--ui-line)!important; border-radius:12px; min-height:44px; font-size:15px; }
html[data-theme] :is(input,textarea,select):focus { box-shadow:none!important; outline:2px solid var(--ui-accent)!important; outline-offset:2px; }
input::placeholder,textarea::placeholder { color:var(--ui-muted)!important; opacity:.8; }
input[type="range"] { accent-color:var(--ui-accent); }
button[class*="bg-gradient"],.btn-primary,.advance-button { background:var(--ui-accent)!important; color:#fff!important; box-shadow:none!important; }
html[data-theme] :is(button,a,.btn):is(.bg-sakura,.bg-sakura-deep),html[data-theme] button[class*="bg-gradient"],html[data-theme] .btn-primary { background:var(--ui-accent)!important; color:#fff!important; box-shadow:none!important; }
html[data-theme="dark"] :is(button,a,.btn):is(.bg-sakura,.bg-sakura-deep),html[data-theme="dark"] button[class*="bg-gradient"],html[data-theme="dark"] .btn-primary { color:#241c16!important; }
html[data-theme][data-companion-gender] body[data-character-theme="true"] :is(button,a,label):is(.bg-sakura,.bg-sakura-deep,[class*="bg-gradient"],.btn-primary) { background:var(--ui-accent)!important; color:#fff!important; box-shadow:none!important; }
html[data-theme="dark"][data-companion-gender] body[data-character-theme="true"] :is(button,a,label):is(.bg-sakura,.bg-sakura-deep,[class*="bg-gradient"],.btn-primary) { color:#241c16!important; }
html[data-theme][data-companion-gender] body[data-character-theme="true"] :is(button,a):is(.bg-sakura-soft,[aria-selected="true"],[aria-pressed="true"]) { background:var(--ui-accent-soft)!important; color:var(--ui-accent)!important; border-color:var(--ui-line)!important; box-shadow:none!important; }
html[data-theme] :is(.chip.selected,.section-tab.active,[aria-selected="true"],[aria-pressed="true"]) { background:var(--ui-accent-soft)!important; border-color:var(--ui-accent)!important; color:var(--ui-accent)!important; }
html[data-theme="dark"] button[class*="bg-gradient"],html[data-theme="dark"] .btn-primary,html[data-theme="dark"] .advance-button { color:#241c16!important; }
.ui-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:10px 18px; border:1px solid var(--ui-line); border-radius:12px; background:var(--ui-surface); color:var(--ui-ink); font-size:14px; font-weight:600; text-decoration:none; }
.ui-button--primary { border-color:transparent; background:var(--ui-accent); color:#fff; }
html[data-theme="dark"] .ui-button--primary { color:#241c16; }
.ui-caption { color:var(--ui-muted); font-size:12px; line-height:1.6; }
.ui-empty { padding:24px 16px; color:var(--ui-muted); text-align:center; }
.ui-error { color:var(--ui-danger); background:var(--ui-surface); border:1px solid var(--ui-line); border-radius:14px; padding:14px 16px; font-size:13px; }
.ui-error button { margin-left:8px; color:var(--ui-accent); text-decoration:underline; min-height:40px; }
.ui-sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.xiyu-theme-toggle,.xiyu-theme-bubble { display:none!important; }
dialog.ui-image-dialog { width:fit-content; max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); padding:12px; border:1px solid var(--ui-line); border-radius:22px; background:var(--ui-surface); color:var(--ui-ink); overflow:auto; }
dialog.ui-image-dialog::backdrop { background:rgba(18,16,14,.72); }
.ui-image-dialog img { display:block; max-width:min(800px,calc(100vw - 58px)); max-height:calc(100dvh - 112px); border-radius:14px; object-fit:contain; cursor:zoom-out; }
.ui-image-dialog button { display:block; min-width:92px; min-height:44px; margin:10px auto 0; border:1px solid var(--ui-line); border-radius:12px; background:var(--ui-surface); }
.nickname-required-card { background:var(--ui-surface)!important; color:var(--ui-ink)!important; border-color:var(--ui-line)!important; border-radius:22px!important; }
.nickname-required-card p { color:var(--ui-muted)!important; }
.nickname-required-card button { background:var(--ui-accent)!important; border-radius:12px!important; }
/* Quiet, static depth from the original cream/coral palette. Keep controls,
   input fields and QR quiet zones solid; only real panels receive this wash. */
html[data-theme] body :is(.app-account-panel,.companion-shell-card,.card,.life-card,.memory-feature-card,.diary-card,.memory-card,.landing-character),
html[data-theme] body[data-entry-page] :is(.account-card,.usage-card,.tier-card,.bind-card,.payment-bubble,.billing-message,.auth-card,.role-card,.wechat-onboarding-card) {
  background-color:var(--ui-surface)!important;
  background-image:var(--ui-surface-wash)!important;
  border-color:var(--ui-line)!important;
  box-shadow:var(--ui-shadow)!important;
}
html[data-theme][data-companion-gender] body[data-character-theme="true"] :is(.card,.life-card,.memory-feature-card,.diary-card,.memory-card) { background-image:var(--ui-surface-wash)!important; }
/* glass.css uses a five-class background shorthand for shadow-card. Match
   that legacy specificity only on these panels, not on inputs or QR frames. */
html[data-theme] body[data-entry-page] .shadow-card:is(.bind-card,.auth-card):not(.btn-primary) { background-image:var(--ui-surface-wash)!important; }
.app-account-panel { box-shadow:0 22px 64px rgba(55,27,16,.24)!important; }
.app-account-head { border-radius:16px; background:var(--ui-accent-soft); border-bottom:0; padding:12px; margin-block:8px; }
.app-account-trigger { border-radius:999px; box-shadow:var(--ui-shadow); }
.companion-shell-stack { background:transparent; border-bottom:0; padding-bottom:8px; }
.companion-shell-card { margin:12px auto 8px; padding-inline:20px; border:1px solid var(--ui-line); border-radius:24px; }
.companion-shell-avatar { border-radius:50%; border:2px solid var(--ui-surface); box-shadow:0 0 0 1px var(--ui-line); }
.companion-shell-stack .app-tab-bar { border-radius:18px; padding-inline:6px; box-shadow:var(--ui-shadow); }
.companion-shell-stack .app-tab-bar__inner { gap:6px; }
.companion-shell-stack .app-tab-bar__item { flex:1; border-bottom:0; border-radius:12px; margin-block:4px; min-height:44px; padding-block:8px; }
.companion-shell-stack .app-tab-bar__item.is-active { background:var(--ui-accent-soft)!important; }
.companion-shell-progress-segment > i { background:linear-gradient(90deg,#ffad94,#ff7457); }
@media(max-width:760px),(max-height:560px) {
  .companion-shell-card { margin-top:8px; padding-inline:12px; border-radius:20px; }
  .companion-shell-relationship > summary { right:12px; }
  .companion-shell-stack .app-tab-bar { border-radius:16px; }
  .companion-shell-stack .app-tab-bar__item { min-height:44px; margin-block:3px; padding-block:7px; }
}
@media(max-height:500px) {
  .companion-shell-card { margin-top:4px; margin-bottom:4px; }
  .companion-shell-stack { padding-bottom:4px; }
}
@media(max-width:680px) { html[data-theme] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),html[data-theme] textarea,html[data-theme] select { font-size:16px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; } }
