/* Pink daylight and neutral grey: shared library and memory palette. */
html[data-space-theme=dark]{
  --space-ink:#4e4e4e;
  --space-muted:#797979;
  --space-accent:#c99ba8;
  --space-line:rgba(110,110,110,.16);
  --space-paper:rgba(253,253,253,.84);
  --space-soft:rgba(248,248,248,.74);
  --space-panel:rgba(183,183,183,.94);
  --space-shadow:0 12px 36px rgba(80,80,80,.06),inset 0 1px rgba(255,255,255,.05);
  --workspace-veil-start:rgba(202,202,202,.59);--workspace-veil-mid:rgba(214,214,214,.54);--workspace-veil-end:rgba(198,198,198,.59);
  --qiyu-workspace-surface:linear-gradient(125deg,var(--workspace-veil-start),var(--workspace-veil-mid) 58%,var(--workspace-veil-end));
  --cover-neutral:linear-gradient(135deg,#e3e3e3,#d7d7d7);
  color-scheme:light;
}
html[data-space-theme=dark] body.video-entry-page .space-sidebar,
html[data-space-theme=dark] .workspace-header{background:var(--space-panel);border-color:var(--space-line)}
html[data-space-theme=dark] .space-file{background:var(--space-paper);border-color:var(--space-line);box-shadow:var(--space-shadow)}
html[data-space-theme=dark] .space-file:hover{border-color:rgba(201,155,168,.32);box-shadow:0 12px 30px rgba(8,8,8,.12)}
html[data-space-theme=dark] #spacePage .collection-image{border-color:rgba(110,110,110,.16);box-shadow:0 8px 24px rgba(80,80,80,.06)}
html[data-space-theme=dark] .collection-more,
html[data-space-theme=dark] .collection-menu,
html[data-space-theme=dark] .space-sort-menu{background:#f8f8f8;color:var(--space-ink);border-color:var(--space-line);box-shadow:0 12px 32px rgba(8,8,8,.12)}
html[data-space-theme=dark] .collection-menu button{color:var(--space-ink)}
html[data-space-theme=dark] .collection-menu button:hover,
html[data-space-theme=dark] .space-sort-menu [role=option]:hover,
html[data-space-theme=dark] .space-sort-menu [aria-selected=true]{background:rgba(201,155,168,.13);color:#795e68}
html[data-space-theme=dark] .space-nav-item.active{background:rgba(201,155,168,.13);border-color:rgba(201,155,168,.13);color:#795e68}
html[data-space-theme=dark] .space-nav-item:hover{background:rgba(201,155,168,.08)}
html[data-space-theme=dark] body.video-entry-page .workspace-switcher a[aria-current=page]{background:rgba(201,155,168,.17);color:#795e68}
html[data-space-theme=dark] body.video-entry-page .workspace-switcher a:hover{background:rgba(201,155,168,.1)}
html[data-space-theme=dark] .space-primary{background:#9b7581;border-color:rgba(235,215,222,.12);color:#fff8fa;box-shadow:0 5px 16px rgba(8,8,8,.10)}
html[data-space-theme=dark] .space-primary:hover{background:#ac8390}
html[data-space-theme=dark] .space-secondary,
html[data-space-theme=dark] .space-empty .space-button{background:var(--space-paper);border-color:var(--space-line);color:var(--space-ink)}
html[data-space-theme=dark] .space-danger,
html[data-space-theme=dark] .space-form-message.error{color:#b05c77}
html[data-space-theme=dark] .space-file-art{background:rgba(201,155,168,.1);color:#9b7c87}
html[data-space-theme=dark] .space-dialog{background:#f8f8f8;border-color:rgba(110,110,110,.16);color:var(--space-ink);box-shadow:0 28px 90px rgba(6,6,6,.18)}
html[data-space-theme=dark] .space-dialog::backdrop{background:rgba(10,10,10,.6);backdrop-filter:blur(8px)}
html[data-space-theme=dark] .space-dialog input:not([type=radio]):not([type=checkbox]):not([type=file]),
html[data-space-theme=dark] .space-dialog textarea,
html[data-space-theme=dark] .space-dialog select{background:#fdfdfd;color:var(--space-ink);border-color:rgba(110,110,110,.18)}
html[data-space-theme=dark] .space-dialog input::placeholder,
html[data-space-theme=dark] .space-dialog textarea::placeholder{color:#8e8e8e;opacity:1}
html[data-space-theme=dark] .space-dialog input:focus,
html[data-space-theme=dark] .space-dialog textarea:focus,
html[data-space-theme=dark] .space-dialog select:focus{border-color:#bd919e;box-shadow:0 0 0 3px rgba(201,155,168,.12)}
html[data-space-theme=dark] .space-dialog option{background:#f8f8f8;color:var(--space-ink)}
html[data-space-theme=dark] #deleteCategoryDialog .delete-choice{background:rgba(255,255,255,.025);border-color:var(--space-line)}
html[data-space-theme=dark] #deleteCategoryDialog .delete-choice:has(input:checked){background:rgba(201,155,168,.12);border-color:rgba(201,155,168,.35)}
html[data-space-theme=dark] body.video-entry-page .space-account #userAvatar,
html[data-space-theme=dark] #profileAvatarPreview{background:#e5d8dc;color:#795e68}
html[data-space-theme=dark] .space-toast{background:#f8f8f8;color:var(--space-ink);border-color:var(--space-line);box-shadow:0 10px 30px rgba(6,6,6,.12)}
html[data-space-theme=dark] .house-anniversary,
html[data-space-theme=dark] body.viewing-memories .house-modes{background:var(--space-paper);border-color:var(--space-line);box-shadow:var(--space-shadow)}
html[data-space-theme=dark] body.viewing-memories .house-modes button[aria-pressed=true]{background:rgba(201,155,168,.17);color:#795e68}
html[data-space-theme=dark] .space-breadcrumb,
html[data-space-theme=dark] .collection-meta,
html[data-space-theme=dark] .space-footer{color:var(--space-muted)}

/* A light grey sidebar with its own readable text palette. */
html[data-space-theme=dark] body.video-entry-page .space-sidebar{
  --space-ink:#4c4c4c;--space-muted:#737373;--space-line:rgba(90,90,90,.16);
  color:var(--space-ink);color-scheme:light;
}
html[data-space-theme=dark] .space-sidebar .space-nav-item.active{background:rgba(174,135,148,.14);border-color:rgba(174,135,148,.15);color:#765c65}
html[data-space-theme=dark] .space-sidebar .space-nav-item:hover{background:rgba(174,135,148,.1);color:#594c50}
html[data-space-theme=dark] body.video-entry-page .space-sidebar .space-account #userAvatar{background:#d9cbd0;color:#755c66}
/* Daylight stays blush pink; both pages share the same subtle sakura veil. */
html:not([data-space-theme=dark]){
  --space-ink:#5b4b50;
  --space-muted:#8c797f;
  --space-accent:#ba7e93;
  --space-line:rgba(162,121,139,.16);
  --space-paper:rgba(255,249,251,.88);
  --space-soft:rgba(255,242,247,.74);
  --space-panel:rgba(255,245,248,.92);
  --space-shadow:0 12px 36px rgba(117,76,93,.07),inset 0 1px rgba(255,255,255,.7);
  --workspace-veil-start:rgba(255,242,246,.61);--workspace-veil-mid:rgba(255,249,251,.56);--workspace-veil-end:rgba(252,237,244,.61);
  --qiyu-workspace-surface:linear-gradient(125deg,var(--workspace-veil-start),var(--workspace-veil-mid) 58%,var(--workspace-veil-end));
  --cover-neutral:linear-gradient(135deg,#f0dde4,#e7d1db);
  color-scheme:light;
}
html:not([data-space-theme=dark]) body.video-entry-page .space-sidebar,
html:not([data-space-theme=dark]) .workspace-header{background:var(--space-panel);border-color:var(--space-line)}
html:not([data-space-theme=dark]) .space-file,
html:not([data-space-theme=dark]) .space-secondary{background:var(--space-paper);border-color:var(--space-line)}
html:not([data-space-theme=dark]) .space-dialog,
html:not([data-space-theme=dark]) .collection-menu,
html:not([data-space-theme=dark]) .space-sort-menu{background:#fff8fa;color:var(--space-ink);border-color:var(--space-line)}
html:not([data-space-theme=dark]) .space-dialog input:not([type=radio]):not([type=checkbox]):not([type=file]),
html:not([data-space-theme=dark]) .space-dialog textarea,
html:not([data-space-theme=dark]) .space-dialog select{background:#fffcfd;color:var(--space-ink);border-color:var(--space-line)}
html:not([data-space-theme=dark]) .space-file-art{background:rgba(186,126,147,.09);color:#ad7388}

/* Reveal the animated tree equally in both pastel appearances. */
body.video-entry-page.is-authenticated .entry-video-host{opacity:.34!important}

/* Softer sidebar surface, independent of the accepted main background. */
html[data-space-theme=dark] body.video-entry-page .space-sidebar{
  background:#c4c4c4;
  border-right-color:rgba(105,105,105,.10);
}

/* Animate only the background tint; the live video and layout stay in place. */
@property --workspace-veil-start{syntax:'<color>';inherits:true;initial-value:rgba(255,242,246,.61)}
@property --workspace-veil-mid{syntax:'<color>';inherits:true;initial-value:rgba(255,249,251,.56)}
@property --workspace-veil-end{syntax:'<color>';inherits:true;initial-value:rgba(252,237,244,.61)}
html{transition:--workspace-veil-start 140ms ease,--workspace-veil-mid 140ms ease,--workspace-veil-end 140ms ease}
body.video-entry-page .space-sidebar,body.video-entry-page .workspace-header{transition:background-color 140ms ease,color 140ms ease,border-color 140ms ease}
html[data-space-theme=dark] body.video-entry-page .space-sidebar{
  --space-ink:#454545;--space-muted:#676767;--space-line:rgba(80,80,80,.13);
  box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;
}
html[data-space-theme=dark] .space-sidebar .space-nav-item{color:#5c5c5c;transform:none}
html[data-space-theme=dark] .space-sidebar .space-nav-item.active{background:rgba(255,255,255,.32);border-color:rgba(255,255,255,.25);color:#424242}
html[data-space-theme=dark] .space-sidebar .space-nav-item:hover{background:rgba(255,255,255,.22);color:#424242;transform:none}
html[data-space-theme=dark] .space-sidebar .space-icon-button{color:#606060}
html[data-space-theme=dark] .space-sidebar .space-icon-button:hover{background:rgba(255,255,255,.25);transform:none}
html[data-space-theme=dark] body.video-entry-page .space-sidebar .space-account #userAvatar{background:#dedede;color:#626262}
@media(prefers-reduced-motion:reduce){html,body.video-entry-page .space-sidebar,body.video-entry-page .workspace-header{transition:none!important}}
