/* Bau im Blick — translucent application windows. The document itself keeps its ink. */
@media screen {
  dialog {
    color: var(--blick-ink, #142b48);
    border: 1px solid var(--blick-border, rgba(255, 255, 255, .9));
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .91), rgba(242, 248, 255, .84));
    box-shadow: inset 0 1px 0 #fff, 0 30px 100px rgba(25, 49, 79, .25), 0 0 0 1px rgba(70, 103, 146, .1);
    -webkit-backdrop-filter: blur(32px) saturate(1.25);
    backdrop-filter: blur(32px) saturate(1.25);
    padding: 30px;
    scrollbar-color: #b5c5d8 transparent;
    scrollbar-width: thin;
  }
  dialog::backdrop {
    background: rgba(32, 54, 82, .24);
    -webkit-backdrop-filter: blur(8px) saturate(.85);
    backdrop-filter: blur(8px) saturate(.85);
  }
  dialog h2 { letter-spacing: -.65px; }
  dialog > .eyebrow { margin-bottom: 12px; color: #637d9b; }
  dialog > .inline-info { margin-bottom: 23px; font-size: 12px; line-height: 1.7; }
  dialog form > .fields { gap: 18px; }
  dialog label { color: #58708b; font-size: 12px; gap: 8px; }
  dialog :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), textarea, select) {
    background: rgba(255, 255, 255, .93);
    border-color: rgba(91, 123, 165, .23);
    border-radius: 11px;
    box-shadow: inset 0 1px 2px rgba(39, 68, 104, .025), 0 1px 0 rgba(255, 255, 255, .8);
  }
  dialog :is(input, textarea, select):focus-visible {
    outline: 3px solid rgba(23, 99, 214, .18);
    border-color: #70a2e4;
  }
  dialog > form > .actions { padding-top: 21px; border-top: 1px solid var(--blick-line, rgba(76, 109, 151, .17)); }
  dialog .actions button { min-height: 39px; border-radius: 11px; }
  dialog :is([data-close], [data-photo-cancel]):not(.primary) { color: #506d8e; }
  dialog :is(.entry-editor-heading, .photo-editor-head, .attendance-dialog>header) > button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(111, 139, 175, .14);
    background: rgba(255, 255, 255, .64);
    color: #637a94;
  }
  dialog :is(.entry-editor-heading, .photo-editor-head, .attendance-dialog>header) > button:hover {
    background: #fff;
    border-color: #bfd2ea;
    color: #1b5eb8;
  }

  /* One spacious editor, with its bound metadata grouped beneath the text. */
  dialog.entry-editor-dialog { padding: 0; border-radius: 27px; background: rgba(249, 252, 255, .9); }
  .entry-editor-heading {
    padding: 28px 34px 24px;
    background: linear-gradient(125deg, rgba(255, 255, 255, .83), rgba(227, 239, 255, .55));
    border-bottom: 1px solid rgba(102, 135, 177, .16);
  }
  .entry-editor-heading .eyebrow { color: #6f88a5; letter-spacing: 1.6px; }
  .entry-editor-title { gap: 13px; }
  .entry-editor-title h2 { font-size: 26px; font-weight: 650; letter-spacing: -.8px; }
  .entry-bb-label {
    border-radius: 10px;
    border-color: rgba(63, 118, 195, .2);
    background: linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(222, 235, 254, .9));
    color: #1a5eb5;
    padding: 8px 11px;
    box-shadow: inset 0 1px #fff, 0 2px 6px rgba(31, 76, 134, .04);
  }
  .entry-editor-heading p { color: #6a819a; font-size: 12px; margin-top: 12px; }
  .entry-editor-content { padding: 29px 34px 27px; }
  .entry-block-title { margin-bottom: 19px; }
  .entry-block-title h3 { color: #203e61; font-size: 14px; font-weight: 650; }
  .entry-block-title > span { color: #7890aa; }
  .entry-body-label { color: #526f90; }
  .entry-body-label textarea {
    border-radius: 16px;
    background: rgba(255, 255, 255, .97);
    border-color: #cbd8e9;
    padding: 20px 22px;
    line-height: 1.8;
    box-shadow: 0 4px 16px rgba(43, 76, 118, .035);
    color: #1b3453;
  }
  .entry-bound-fields {
    padding: 19px;
    margin-top: 23px;
    gap: 16px;
    border-radius: 17px;
    border: 1px solid rgba(255, 255, 255, .98);
    background: rgba(229, 238, 251, .53);
    box-shadow: inset 0 1px #fff, 0 0 0 1px rgba(113, 140, 178, .1);
  }
  .entry-bound-fields label { font-size: 11px; }
  .entry-bound-fields :is(textarea, select) { border-color: #d0dcea; }
  .entry-done-choice {
    border-radius: 12px;
    background: rgba(255, 255, 255, .7);
    border-color: #d9e3ef;
    padding: 12px 15px;
    color: #5b7490;
    margin-top: 18px;
  }
  .entry-done-choice:has(input:checked) { background: #ebf0f6; border-color: #bccbdb; color: #52677f; }
  .entry-editor-footer {
    padding: 18px 34px;
    background: rgba(246, 250, 255, .9);
    border-top: 1px solid rgba(107, 139, 177, .18);
    box-shadow: 0 -8px 26px rgba(39, 66, 104, .025), inset 0 1px rgba(255, 255, 255, .8);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
  }
  .entry-editor-footer p { color: #667f9b; }
  .entry-editor-footer small { color: #7f93ab; }
  .entry-editor-footer .actions { gap: 10px; }
  .entry-editor-footer .actions button { padding: 11px 17px; }
  .entry-field-changed { border-color: #d6ad67 !important; background: #fffcf4 !important; }
  .entry-dictation-feedback { border-radius: 16px; box-shadow: inset 0 1px rgba(255, 255, 255, .9); }
  .entry-text-mic { box-shadow: 0 5px 14px rgba(171, 45, 40, .18), inset 0 1px rgba(255, 255, 255, .2); }

  /* Settings use separate glass groups around a crisp, unmodified paper preview. */
  dialog:has(#settings-form) {
    border-radius: 27px;
    padding: 0;
    background: rgba(245, 250, 255, .88);
    max-width: 1020px;
    width: min(1020px, 95vw);
  }
  .settings-layout { background: transparent; padding: 30px !important; }
  .settings-heading { margin-bottom: 24px; padding: 3px 3px 5px; }
  .settings-heading h2 { font-size: 28px; font-weight: 650; letter-spacing: -.8px; }
  .settings-heading p { color: #66809b; font-size: 12px; }
  .settings-heading-avatar {
    width: 56px;
    height: 56px;
    border: 1px solid #fff;
    background: linear-gradient(140deg, #fff, #dceaff);
    box-shadow: 0 5px 15px rgba(58, 91, 133, .08);
  }
  .workbench-settings-nav {
    padding: 6px;
    gap: 4px;
    background: rgba(220, 231, 246, .6);
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 14px;
    box-shadow: inset 0 1px rgba(255, 255, 255, .6);
    margin-bottom: 24px;
  }
  .workbench-settings-nav button { border-radius: 10px; padding: 10px 13px; color: #627e9d; font-size: 11px; }
  .workbench-settings-nav button[aria-current] {
    background: rgba(255, 255, 255, .95);
    color: #175eb9;
    box-shadow: 0 2px 7px rgba(30, 61, 101, .09), inset 0 1px #fff;
  }
  .settings-columns { gap: 22px; }
  .settings-main { display: grid; gap: 15px; }
  .settings-main > .settings-section,
  .settings-account,
  .network-settings {
    padding: 21px;
    border: 1px solid rgba(255, 255, 255, .96);
    background: rgba(255, 255, 255, .62);
    border-radius: 19px;
    box-shadow: 0 4px 20px rgba(35, 65, 102, .035), 0 0 0 1px rgba(93, 124, 162, .08);
  }
  .settings-main > .settings-section:first-child { padding-top: 21px; border-top: 1px solid rgba(255, 255, 255, .96); }
  .settings-section-title { margin-bottom: 19px; gap: 11px; }
  .settings-section-title h3 { color: #254564; font-size: 14px; }
  .settings-section-title > span {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    padding: 0;
    border-radius: 8px;
    background: #e8f0fc;
    color: #4775ae;
    font-size: 10px;
  }
  .settings-main .settings-help { color: #6b819b !important; }
  .settings-logo-upload { border-radius: 14px; background: rgba(246, 250, 255, .8); border-color: #bacce3; padding: 18px; }
  .settings-logo-upload > span:first-child { background: #fff; border-color: #e0e8f2; border-radius: 11px; }
  .settings-logo-upload b { color: #355e8a; }
  .settings-logo-upload small { color: #7088a2; }
  .settings-color-list { border-radius: 13px; border-color: #dce5f0; }
  .settings-color-row { padding: 13px 14px; border-bottom-color: #e7edf5; }
  .settings-color-row b { color: #4c6888; font-size: 11px; }
  .settings-color-row small { color: #778ca4; }
  .settings-accent-row { border-radius: 13px; }
  .settings-font-sample { border-radius: 13px; padding: 20px; border-color: #dce5f0; }
  .settings-preview-panel {
    background: rgba(220, 233, 250, .49);
    border: 1px solid rgba(255, 255, 255, .92);
    padding: 21px;
    border-radius: 20px;
    box-shadow: inset 0 1px #fff, 0 7px 24px rgba(42, 76, 120, .045);
  }
  .settings-preview-panel > .eyebrow { color: #6c85a1; letter-spacing: 1.3px; }
  .settings-document-preview { box-shadow: 0 8px 24px rgba(45, 75, 112, .1); }
  .settings-preview-app > span:last-child { border-radius: 10px; padding: 11px; }
  .settings-save-scope { border-radius: 18px; border-color: rgba(255, 255, 255, .95); background: rgba(255, 255, 255, .69); margin-top: 20px; padding: 20px 22px; box-shadow: 0 0 0 1px rgba(93, 124, 162, .09); }
  .settings-save-scope h3 { color: #365578; font-size: 13px; }
  .settings-save-scope p { color: #7086a0; }
  .settings-actions { margin-top: 22px !important; padding-top: 20px; border-top: 1px solid rgba(96, 125, 166, .15); }
  .network-settings { margin-top: 18px; }
  .network-address-list { border-radius: 13px; border-color: #d9e4f1; }
  .network-storage-readonly { background: rgba(232, 241, 254, .65); border-radius: 15px; }

  /* Login shares the same material, rather than opening a different-looking app. */
  .auth-screen {
    background: transparent;
    padding-top: 46px;
    padding-bottom: 40px;
  }
  .auth-card {
    width: min(468px, 100%);
    padding: 34px 38px 32px;
    border-radius: 29px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(244, 250, 255, .7));
    border-color: rgba(255, 255, 255, .95);
    box-shadow: inset 0 1px #fff, 0 24px 80px rgba(40, 71, 114, .12), 0 0 0 1px rgba(119, 146, 182, .09);
    -webkit-backdrop-filter: blur(28px) saturate(1.15);
    backdrop-filter: blur(28px) saturate(1.15);
  }
  .auth-brand { margin: -4px 0 25px; }
  .auth-brand img { mix-blend-mode: multiply; }
  .auth-heading h1 { font-size: 28px; color: #183454; font-weight: 650; }
  .auth-heading .eyebrow { color: #69829f; font-size: 9px; }
  .auth-heading p { font-size: 13px; color: #6b829d; margin-bottom: 27px; }
  .auth-card form { gap: 19px; }
  .auth-card label { font-size: 12px; color: #4d6a8b; }
  .auth-card input { padding: 13px 14px; border-radius: 12px; background: rgba(255, 255, 255, .92); border-color: #ccdaeb; }
  .auth-password input { padding-right: 79px; }
  .auth-password button { top: 6px; right: 6px; border-radius: 8px; }
  .auth-card button.auth-submit {
    border-radius: 13px;
    min-height: 46px;
    font-size: 13px;
    background: linear-gradient(150deg, #2878e4, #155bc8);
    border-color: rgba(29, 96, 197, .8);
    box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 5px 15px rgba(24, 94, 196, .18);
  }
  .auth-card button.auth-submit:hover { background: linear-gradient(150deg, #347fe5, #1255bd); }
  .auth-local-note { border-top-color: #dce5f0; color: #6d829c; font-size: 10px; padding-top: 20px; line-height: 1.8; }
  .auth-footer { color: #768ca5; margin-top: 25px; }

  /* Photo and attendance windows have their own work surfaces, within the glass frame. */
  dialog.photo-dialog { padding: 0; border-radius: 26px; background: rgba(246, 250, 255, .94); }
  .photo-editor-head { padding: 23px 27px 20px; background: linear-gradient(125deg, rgba(255, 255, 255, .85), rgba(224, 237, 255, .55)); border-bottom-color: rgba(95, 129, 174, .16); }
  .photo-editor-head h2 { color: #183757; font-weight: 650; font-size: 25px; }
  .photo-editor-head p { color: #6d86a2; font-size: 12px; }
  .photo-upload { padding: 16px 27px; background: rgba(255, 255, 255, .7); gap: 18px; }
  .photo-upload label { color: #43668d; }
  .photo-upload input { background: #fff; border-color: #d3dfed; border-radius: 11px; }
  .photo-upload input::file-selector-button { background: #eaf2fd; color: #416b9d; border: 0; border-radius: 6px; padding: 5px 7px; margin-right: 9px; }
  .photo-toolbar { padding: 12px 19px; background: rgba(230, 239, 252, .65); gap: 12px; border-color: #dce6f2; }
  .photo-tool-group { gap: 3px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(123, 151, 188, .11); }
  .photo-tool-group button { border-radius: 8px; border-color: transparent; background: transparent; padding: 8px 11px; }
  .photo-tool-group button[aria-pressed=true] { background: #fff; color: #185bb2; border-color: #cbdbef; box-shadow: 0 2px 6px rgba(37, 76, 126, .08); }
  .photo-colors { border: 0; padding: 6px 9px; }
  .photo-colors button { padding: 0; border-radius: 50%; border: 3px solid #fff; }
  .photo-colors button[aria-pressed=true] { box-shadow: 0 0 0 2px #44678f; }
  .photo-width-label { margin-left: 8px; }
  .photo-canvas-stage { background: #dee6f0; border-top: 1px solid rgba(255, 255, 255, .7); border-bottom: 1px solid #d2ddea; }
  .photo-canvas-empty { color: #6b86a5; }
  .photo-canvas-empty > span { color: #96afcd; }
  .photo-editor-foot { padding: 18px 27px 21px; background: rgba(255, 255, 255, .7); gap: 15px 18px; }
  .photo-save-row { padding-top: 5px; }
  .photo-save-row > span { color: #7188a3; }
  dialog.attendance-modal { border-radius: 26px; }
  .attendance-dialog > header { padding: 27px 29px 23px; background: linear-gradient(125deg, rgba(255, 255, 255, .8), rgba(224, 237, 255, .57)); border-bottom-color: #dbe6f3; }
  .attendance-dialog h2 { font-weight: 650; letter-spacing: -.7px; }
  .attendance-dialog header p { color: #6b85a3; font-size: 12px; }
  .attendance-tabs { padding: 9px 28px; gap: 5px; background: rgba(234, 242, 254, .45); border-bottom-color: #dce6f2; }
  .attendance-tabs button { padding: 10px 14px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; color: #6c83a0; }
  .attendance-tabs button.active { border-color: rgba(113, 147, 191, .18); background: #fff; color: #155ebd; box-shadow: 0 2px 7px rgba(35, 69, 114, .07); }
  .attendance-summary { padding-bottom: 15px; }
  .attendance-summary > span { color: #6c84a0; }
  .attendance-summary button { font-size: 10px; }
  .attendance-list { background: rgba(255, 255, 255, .55); border-top-color: #dfe7f1; }
  .attendance-list h3 { color: #5e7a9a; font-weight: 650; padding: 20px 0 10px; }
  .attendance-person { padding: 16px 0; border-bottom-color: #e0e8f3; }
  .attendance-person b { color: #305274; }
  .attendance-person small { color: #758ba5; }
  .attendance-person:has(input:checked) { background: rgba(233, 242, 255, .57); box-shadow: -11px 0 rgba(233, 242, 255, .57), 11px 0 rgba(233, 242, 255, .57); }
  .attendance-dialog footer { background: rgba(243, 249, 255, .84); border-top-color: #dce5f0; padding-top: 15px; }
  .attendance-dialog footer > span { color: #7087a1; }

  /* Protocol controls surround the original white sheet; none of these rules touch the table. */
  .meeting-reader {
    border: 1px solid rgba(255, 255, 255, .98);
    border-radius: 23px;
    background: rgba(242, 248, 255, .72);
    box-shadow: inset 0 1px #fff, var(--blick-shadow, 0 12px 38px rgba(31, 60, 99, .075)), 0 0 0 1px rgba(107, 137, 177, .11);
  }
  .meeting-reader-toolbar { padding: 16px 20px; background: rgba(243, 249, 255, .86); border-bottom-color: rgba(109, 140, 178, .14); gap: 18px; }
  .meeting-reader-views { border: 1px solid rgba(255, 255, 255, .96); border-radius: 12px; padding: 4px; background: rgba(218, 231, 248, .55); }
  .meeting-reader-views button { padding: 9px 13px; border-radius: 9px; color: #6380a3; }
  .meeting-reader-views button.active { color: #1c61bc; box-shadow: 0 2px 7px rgba(33, 71, 121, .08); }
  .reader-search input { height: 38px; border-radius: 11px; border-color: #d3dfee; box-shadow: 0 1px 3px rgba(36, 69, 109, .025); }
  .meeting-reader-instructions { padding: 11px 22px; background: rgba(249, 252, 255, .87); color: #6e86a2; border-bottom-color: #dee7f2; font-size: 10px; }
  .meeting-reader-scroll { background: #e4eaf2; }
  .meeting-reader-footer { background: rgba(242, 248, 255, .9); border-top-color: #d5e1ee; padding: 18px 22px; }
  .meeting-reader-footer p { color: #6d84a0; }
  .meeting-reader-footer > .row { flex-wrap: wrap; gap: 10px; }
  .meeting-attendance-strip,
  .meeting-output-toolbar {
    border-radius: 17px;
    border-color: rgba(255, 255, 255, .95);
    background: var(--blick-glass, rgba(255, 255, 255, .64));
    box-shadow: inset 0 1px #fff, 0 4px 18px rgba(32, 64, 105, .04), 0 0 0 1px rgba(106, 137, 177, .09);
    padding: 16px 19px;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
  .meeting-output-export > summary { border-radius: 11px; border-color: #d0dff0; background: rgba(255, 255, 255, .86); }
  .meeting-output-export > div { border-radius: 15px; padding: 7px; background: rgba(251, 253, 255, .97); border-color: rgba(255, 255, 255, .98); box-shadow: 0 12px 35px rgba(28, 60, 102, .16), 0 0 0 1px #d8e4f1; }
  .meeting-output-export button { border-radius: 9px; font-size: 12px; padding: 11px; }
  .protocol-history-navigation { border-bottom: 0; padding-bottom: 0; margin-bottom: 21px; }
  .protocol-history-tablist { gap: 8px; padding: 5px 2px 12px; }
  .protocol-history-tab {
    border-radius: 14px;
    border-color: rgba(255, 255, 255, .95);
    background: rgba(255, 255, 255, .65);
    box-shadow: inset 0 1px #fff, 0 3px 10px rgba(44, 75, 115, .025), 0 0 0 1px rgba(100, 131, 173, .09);
    padding: 13px 16px;
  }
  .protocol-history-tab.active { border-color: #97b9e7; background: linear-gradient(145deg, #fff, #e4efff); box-shadow: inset 0 1px #fff, 0 4px 12px rgba(36, 91, 166, .09); }
  .protocol-history-tab.active::after { content: ''; position: absolute; bottom: 6px; right: 8px; width: 4px; height: 4px; border-radius: 50%; background: #3275cf; }
  .protocol-history-tab > span { color: #748ba5; }
  .protocol-history-tab strong { color: #44668c; }
  .ph-controls { border-radius: 18px; border-color: #fff; background: rgba(245, 250, 255, .72); box-shadow: inset 0 1px #fff, 0 0 0 1px rgba(103, 134, 173, .1); }
  .ph-controls :is(input:not([type=checkbox]), select) { border-radius: 11px; border-color: #cfdded; }

  .preparation-card, .first-protocol-guide {
    background: rgba(255, 255, 255, .72);
    border-color: rgba(255, 255, 255, .97);
    border-radius: 23px;
    box-shadow: inset 0 1px #fff, var(--blick-shadow, 0 12px 38px rgba(31, 60, 99, .075)), 0 0 0 1px rgba(111, 141, 181, .09);
    padding: 28px;
  }
  .preparation-card-head { border-bottom-color: #dce6f2; }
  .preparation-facts { gap: 14px; }
  .preparation-facts button { padding: 21px 18px; border-radius: 16px; border-color: #dfe8f3; background: rgba(237, 245, 255, .61); box-shadow: inset 0 1px #fff; }
  .preparation-facts button:hover { border-color: #a8c4e7; background: #f4f9ff; }
  .preparation-mode-choice { border-radius: 15px; padding: 18px; background: rgba(255, 255, 255, .74); }
  .preparation-mode-choice:has(input:checked) { background: #edf5ff; border-color: #9cbfe9; box-shadow: inset 0 1px #fff, 0 3px 12px rgba(43, 92, 151, .04); }
  .preparation-bottom, .preparation-agenda { border-color: #dce6f2; }
  .first-guide-steps button { border-radius: 15px; border-color: #dce6f2; background: rgba(241, 247, 255, .6); padding: 18px; }
  .first-guide-steps span { background: #fff; color: #7594b7; border-color: #d7e3f3; }
  .creation-toolbar { padding: 13px 17px; border-radius: 15px; border: 1px solid #fff; background: rgba(246, 250, 255, .66); box-shadow: 0 0 0 1px rgba(113, 142, 179, .09); }
  .creation-toolbar input { border-radius: 10px; border-color: #d4e0ee; }
  .creation-footer { padding: 19px 5px; }
  .structure-category { border-radius: 16px; background: rgba(241, 247, 255, .65); border-color: #d9e5f3; }
  .structure-group-choice { border-radius: 11px; border-color: #d5e1ef; background: rgba(255, 255, 255, .84); }
  .structure-group-choice:hover { border-color: #9dbfe8; background: #f4f9ff; }
  .contacts-directory { border-radius: 21px; border-color: #fff; background: rgba(255, 255, 255, .84); box-shadow: var(--blick-shadow, 0 12px 38px rgba(31, 60, 99, .075)), 0 0 0 1px rgba(112, 142, 182, .1); }
  .contacts-directory-filters { background: rgba(234, 243, 255, .6); border-bottom-color: #dce7f3; padding: 20px; }
  .contacts-directory-search { background: rgba(255, 255, 255, .88); border-radius: 11px; border-color: #d0deee; }
  .contacts-directory-filters > select { border-radius: 11px; border-color: #d0deee; }
  .contacts-directory-table .company { background: #edf3fb; color: #5b7596; }
  .contacts-directory-table tbody tr:not(.company):hover { background: #f4f8ff; }

  /* Notifications remain in the top layer; only their surface changes. */
  #toast.operation-toast {
    border-radius: 17px;
    border-color: rgba(206, 225, 255, .28);
    background: rgba(22, 47, 81, .93);
    box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 14px 40px rgba(20, 47, 82, .24);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
  }
  #operation-progress.operation-progress { border-color: #fff; border-radius: 22px; background: rgba(249, 252, 255, .95); box-shadow: inset 0 1px #fff, 0 18px 60px rgba(29, 63, 108, .2), 0 0 0 1px rgba(136, 167, 207, .4); -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px); }

  /* Without Popover, notices are fixed children of the native modal. A filter or
     transform on that modal would make its padding box their coordinate origin.
     Keep those notices in viewport coordinates; the blurred ::backdrop still
     supplies the window's glass depth while a fallback notice is visible. */
  dialog:has(> .operation-toast.feedback-visible, > .operation-progress.feedback-visible) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transform: none;
    animation: none !important;
  }
}

@media screen and (max-width: 900px) {
  dialog { max-height: calc(100dvh - 30px); }
  dialog.entry-editor-dialog { width: calc(100vw - 30px); max-height: calc(100dvh - 30px); }
  .entry-editor-heading, .entry-editor-content { padding-left: 25px; padding-right: 25px; }
  .entry-editor-footer { padding-left: 25px; padding-right: 25px; }
  .entry-bound-fields { grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 15px; }
  .entry-editor-title h2 { font-size: 24px; }
  .settings-layout { padding: 24px !important; }
  .settings-main > .settings-section, .settings-account, .network-settings { padding: 18px; }
  .settings-columns { gap: 17px; grid-template-columns: minmax(0, 1.4fr) minmax(235px, 1fr); }
  .settings-preview-panel { padding: 17px; }
}
@media screen and (max-width: 720px) {
  .settings-columns { grid-template-columns: minmax(0, 1fr); }
  .settings-preview-panel { position: static; }
  .entry-bound-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .entry-bound-fields > label:first-child { grid-column: 1 / -1; }
  .entry-editor-footer { flex-direction: column; align-items: stretch; gap: 13px; }
  .entry-editor-footer .actions { flex-wrap: wrap; justify-content: flex-end; }
  .photo-editor-head, .photo-upload, .photo-editor-foot { padding-left: 20px; padding-right: 20px; }
  .photo-toolbar { gap: 9px; padding: 11px 13px; }
  .photo-tool-group { flex-wrap: wrap; }
  .meeting-reader-toolbar { padding: 13px; }
  .meeting-reader-footer { padding: 15px; }
  .attendance-tabs { padding-left: 18px; padding-right: 18px; }
  .attendance-dialog > header { padding: 22px 21px 20px; }
  .preparation-card, .first-protocol-guide { padding: 21px; }
}
@media screen and (max-width: 480px) {
  dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); padding: 23px 20px; border-radius: 22px; max-height: calc(100dvh - 20px); }
  dialog.entry-editor-dialog, dialog.photo-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 22px; }
  .entry-editor-heading { padding: 21px 20px 18px; gap: 11px; }
  .entry-editor-heading .eyebrow { font-size: 8px; letter-spacing: 1.2px; }
  .entry-editor-heading p { font-size: 11px; }
  .entry-editor-title { gap: 8px; }
  .entry-editor-title h2 { font-size: 21px; }
  .entry-bb-label { padding: 6px 8px; font-size: 11px; }
  .entry-editor-content { padding: 21px 18px; }
  .entry-body-label textarea { padding: 15px; border-radius: 13px; font-size: 16px; }
  .entry-body-input #entry-text { padding-right: 58px; }
  .entry-bound-fields { margin-top: 18px; padding: 13px; grid-template-columns: minmax(0, 1fr); }
  .entry-bound-fields > label:first-child { grid-column: auto; }
  .entry-editor-footer { padding: 15px 18px; }
  .entry-editor-footer .actions button { padding: 10px 12px; font-size: 11px; }
  .entry-editor-footer small { font-size: 8px; }
  .settings-layout { padding: 20px 17px !important; }
  .settings-heading { gap: 12px; }
  .settings-heading h2 { font-size: 24px; }
  .settings-heading p { font-size: 11px; }
  .settings-heading-avatar { width: 42px; height: 42px; font-size: 13px; }
  .workbench-settings-nav { gap: 2px; padding: 4px; border-radius: 12px; }
  .workbench-settings-nav button { padding: 8px 9px; font-size: 10px; }
  .settings-main > .settings-section, .settings-account, .network-settings { padding: 16px; border-radius: 16px; }
  .settings-main .fields { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .settings-logo-upload { gap: 10px; padding: 12px; }
  .settings-logo-upload > span:first-child { width: 68px; min-width: 68px; }
  .settings-color-row { gap: 7px; padding: 12px 10px; grid-template-columns: minmax(0, 1fr) 30px 52px; }
  .settings-color-row input[type=color] { width: 30px; }
  .settings-color-row b { font-size: 10px; }
  .settings-color-row small { font-size: 9px; }
  .settings-color-row output { font-size: 8px; }
  .settings-save-scope { padding: 17px; }
  .settings-actions { gap: 8px; }
  .settings-actions button { padding: 10px; font-size: 11px; }
  .auth-screen { padding: 27px 18px; }
  .auth-card { padding: 27px 24px; border-radius: 24px; }
  .auth-heading h1 { font-size: 25px; }
  .auth-heading p { font-size: 12px; }
  .photo-editor-head, .photo-upload, .photo-editor-foot { padding-left: 17px; padding-right: 17px; }
  .photo-editor-head h2 { font-size: 22px; }
  .photo-editor-head p { font-size: 11px; }
  .photo-tool-group button { font-size: 10px; padding: 7px 9px; }
  .photo-width-label { margin-left: 5px; }
  .photo-editor-foot { grid-template-columns: minmax(0, 1fr); }
  .photo-save-row .actions { flex-wrap: wrap; }
  .photo-save-row button { font-size: 11px; }
  .meeting-reader-views { max-width: 100%; }
  .meeting-reader-views button { font-size: 10px; white-space: normal; text-align: left; }
  .reader-search { min-width: 0; flex-basis: 100%; }
  .reader-search input { width: 100%; }
  .meeting-attendance-strip { padding: 15px; gap: 13px; }
  .meeting-attendance-strip > div { gap: 6px; }
  .meeting-attendance-strip :is(b, span) { font-size: 11px; }
  .meeting-output-toolbar > .row { flex-wrap: wrap; }
  .protocol-history-tab { min-width: 104px; padding: 11px 13px; }
  .protocol-history-total { min-width: 151px; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: blick-window-in .22s cubic-bezier(.18, .75, .2, 1); }
  @keyframes blick-window-in { from { opacity: 0; transform: translateY(9px) scale(.987); } to { opacity: 1; transform: none; } }
}
@media screen and (prefers-reduced-motion: reduce) {
  dialog[open], dialog.entry-editor-dialog[open] { animation: none !important; }
}
@media screen and (prefers-reduced-transparency: reduce), screen and (prefers-contrast: more) {
  dialog, dialog.entry-editor-dialog, dialog.photo-dialog, dialog:has(#settings-form), .auth-card,
  .settings-main > .settings-section, .settings-account, .network-settings, .settings-preview-panel,
  .meeting-reader, .meeting-reader-toolbar, .meeting-reader-footer, .meeting-attendance-strip,
  .meeting-output-toolbar, .entry-editor-heading, .entry-editor-footer, .photo-editor-head, .photo-editor-foot,
  .attendance-dialog>header, .attendance-dialog footer, .preparation-card, .first-protocol-guide {
    background: #f8fbff;
    border-color: #b7cbe2;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  dialog::backdrop { background: rgba(26, 46, 72, .35); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .settings-help, .settings-main .settings-help { color: #4e6b8b !important; }
  #toast.operation-toast { background: #163251; border-color: #8eaed6; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #operation-progress.operation-progress { background: #f8fbff; border-color: #93b3dd; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media screen {
    dialog, dialog.entry-editor-dialog, dialog.photo-dialog, dialog:has(#settings-form), .auth-card { background: #f6faff; }
    .meeting-attendance-strip, .meeting-output-toolbar, .meeting-reader-toolbar, .meeting-reader-footer { background: #f1f7ff; }
    #toast.operation-toast { background: #163251; }
    #operation-progress.operation-progress { background: #f8fbff; }
  }
}
