/* Window materials: depth and light without filtering editable/composited containers. */
:root {
  --zg-window-fill: radial-gradient(ellipse at 0% 0%, #d7bafc38, transparent 58%), radial-gradient(ellipse at 100% 100%, #f4c4df28, transparent 60%), linear-gradient(150deg,#ffffff,#fbf9fe 55%,#f5f1fa);
  --zg-window-edge: #ffffffdd;
  --zg-window-line: #dcd3e8;
  --zg-window-shadow: 0 28px 80px #39264f26, 0 8px 24px #39264f12, inset 0 1px 0 #ffffff, inset 0 0 0 1px #ffffff60;
  --zg-window-header: linear-gradient(125deg,#faf6fff5,#fffcfef5);
  --zg-window-well: linear-gradient(145deg,#eae2f480,#f3edf780);
  --zg-window-input: linear-gradient(160deg,#fffffffa,#faf7fdfa);
  --zg-window-inset: inset 0 2px 5px #3e275b06, 0 1px 0 #ffffffb3;
  --zg-window-button-shadow: 0 7px 18px #8d5ec026, inset 0 1px 0 #ffffff88;
}
:root[data-zg-theme="dark"] {
  --zg-window-fill: radial-gradient(ellipse at 0% 0%,#cbb0ff1a,transparent 58%), radial-gradient(ellipse at 100% 100%,#84d8cd10,transparent 62%), linear-gradient(150deg,#24454b,#19373c 55%,#142e34);
  --zg-window-edge: #d4efff2e;
  --zg-window-line: #64818a80;
  --zg-window-shadow: 0 28px 80px #020f1666, 0 8px 24px #020f1638, inset 0 1px 0 #dcefff30, inset 0 0 0 1px #e9f5ff06;
  --zg-window-header: linear-gradient(125deg,#29464df5,#203c42f5);
  --zg-window-well: linear-gradient(145deg,#9dbcd61a,#d6e5ff08);
  --zg-window-input: linear-gradient(160deg,#122d32bd,#203d438c);
  --zg-window-inset: inset 0 2px 6px #000d1526, 0 1px 0 #dbf0ff12;
  --zg-window-button-shadow: 0 7px 20px #02171d40, inset 0 1px 0 #ffffff38;
}
:root :is(#wish-modal .wish-modal-card, #collections-modal .collection-editor-card,
  #collection-picker-modal .modal-card, #feedback-modal .modal-card, #notifications-modal .modal-card,
  #user-profile-modal .friend-profile-modal-card, .profile-dialog, .account-settings-dialog,
  .discovery-dialog, .service-confirm-card) {
  background: var(--zg-window-fill);
  border-color: var(--zg-window-line);
  box-shadow: var(--zg-window-shadow);
}
:root :is(#wish-modal .wish-modal-header, #collections-modal .collection-editor-header) { background: transparent; }
:root :is(#wish-modal .wish-editor-footer, #collections-modal .collection-editor-footer) {
  background: linear-gradient(180deg,transparent,color-mix(in srgb,var(--zg-surface) 65%,transparent));
  border-top-color: color-mix(in srgb,var(--zg-window-line) 65%,transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb,var(--zg-window-edge) 42%,transparent);
}
:root :is(.account-dialog-header, .account-screen-header) {
  background: transparent;
  box-shadow: none;
}
/* The main settings header spans the viewport; only its contents have gutters. */
:root .account-screen-header {
  max-width: none;
  margin-left: calc(-1 * max(16px,env(safe-area-inset-left)));
  margin-right: calc(-1 * max(16px,env(safe-area-inset-right)));
  padding-left: max(16px,env(safe-area-inset-left),calc((100vw - 760px) / 2));
  padding-right: max(16px,env(safe-area-inset-right),calc((100vw - 760px) / 2));
}
/* At rest the header reveals the same uninterrupted material as the window.
   During scrolling it becomes a frosted cover so rows do not run under the title. */
:root :is(.account-settings-screen, .account-settings-dialog, .discovery-dialog)[data-window-scrolled]
  > :is(.account-dialog-header, .account-screen-header) {
  background: var(--zg-window-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 16px #0000000a;
}
:root .account-settings-screen {
  background: radial-gradient(ellipse at 0% 0%,color-mix(in srgb,var(--zg-accent) 10%,transparent),transparent 55%),var(--zg-bg);
}
:root :is(.account-settings-sections, .account-settings-group-body, #wish-modal .wish-editor-settings) {
  background: var(--zg-window-well);
  box-shadow: inset 0 1px 0 var(--zg-window-edge), 0 4px 12px #00000005;
}
:root :is(#wish-modal, #collections-modal, #feedback-modal, .profile-dialog, .account-settings-dialog)
  :is(input[type="text"],input[type="url"],input[type="password"],input[type="date"],input[type="email"],textarea) {
  background: var(--zg-window-input);
  box-shadow: var(--zg-window-inset);
  border-color: var(--zg-window-line);
}
:root :is(#wish-modal #wish-next-btn, #wish-modal #save-btn, #collection-save-btn,
 .profile-dialog .creation-btn, .account-settings-dialog .creation-btn, .discovery-dialog .creation-btn,
 .service-confirm-actions [data-answer="false"]) { box-shadow: var(--zg-window-button-shadow); }
:root :is(.account-settings-dialog, .profile-dialog, .discovery-dialog)::backdrop {
  backdrop-filter: blur(7px) saturate(110%);
  -webkit-backdrop-filter: blur(7px) saturate(110%);
}
:root .account-choice-option[aria-pressed="true"] {
  background: linear-gradient(120deg,color-mix(in srgb,var(--zg-accent) 16%,var(--zg-surface)),color-mix(in srgb,var(--zg-accent) 7%,var(--zg-surface)));
  box-shadow: inset 0 1px 0 var(--zg-window-edge);
}
:root .service-confirm-card .service-confirm-danger {
  background: color-mix(in srgb,var(--zg-bad) 6%,transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb,var(--zg-bad) 12%,transparent);
}
