/* Soft silver for app chrome, with restrained highlights. Media, system app icons and semantic status colors stay intact. */
:root{
  --silver-accent:#48505c;--silver-soft:#f3f4f6;--silver-label:#353c46;
  --silver-edge:#b9c0cb70;--silver-focus:#767f8d;--silver-ink:#303741;
  --silver-control:linear-gradient(155deg,#ffffff80,#e7ecf21f);
  --silver-strong:linear-gradient(155deg,#ffffffb8,#dfe5ee4d);
  --silver-shadow:inset 0 1px 0 #ffffffa0,0 2px 6px #1d263106;
  --silver-strong-shadow:inset 0 1px 0 #ffffffa0,0 3px 9px #1823310a;
  --silver-switch-off:#e7eaf0;--silver-switch-off-thumb:#697482;
  --silver-switch-on:#96a5b8;--silver-switch-on-thumb:#fff;
  --silver-blue-ink:#255898;--silver-blue-edge:#5b8cc07d;
  --silver-selection:linear-gradient(155deg,#e3f0fdc7,#cfe2f75e);
  --silver-primary:linear-gradient(155deg,#edf6ffde,#cee2f66b);
  --accent:var(--silver-accent);--accent-soft:var(--silver-soft);--accent-ink:var(--silver-ink);
  --soft:var(--silver-soft);--switch-on:#c8ced7;--switch-on-border:var(--silver-edge);
  --editor-accent:var(--silver-accent);--editor-accent-soft:var(--silver-soft);
}
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --silver-accent:#d9dee6;--silver-soft:#35383d;--silver-label:#eef1f5;--silver-ink:#eef1f5;
    --silver-strong:linear-gradient(155deg,#ffffff29,#c9d6ea0e);
    --silver-edge:#d6e1ef29;--silver-focus:#d4dae3;
    --silver-control:linear-gradient(155deg,#ffffff16,#d6e2f005);
    --silver-shadow:inset 0 1px 0 #ffffff21,0 2px 6px #0000000c;
    --silver-strong-shadow:inset 0 1px 0 #ffffff35,0 3px 9px #00000014;
    --silver-switch-off:#3b3e44;--silver-switch-off-thumb:#b2bbc7;
    --silver-switch-on:#dae4f0;--silver-switch-on-thumb:#303945;
    --silver-blue-ink:#a2c5ef;--silver-blue-edge:#8bb7e64a;
    --silver-selection:linear-gradient(155deg,#b2d3ff24,#769dca12);
    --silver-primary:linear-gradient(155deg,#bbd8ff36,#7ca5d621);
  }
}
:root[data-theme="dark"],:root[data-silver-surface="panel"]:not([data-theme="light"]){
  --silver-accent:#d9dee6;--silver-soft:#35383d;--silver-label:#eef1f5;--silver-ink:#eef1f5;
    --silver-strong:linear-gradient(155deg,#ffffff29,#c9d6ea0e);
  --silver-edge:#d6e1ef29;--silver-focus:#d4dae3;
  --silver-control:linear-gradient(155deg,#ffffff16,#d6e2f005);
  --silver-shadow:inset 0 1px 0 #ffffff21,0 2px 6px #0000000c;
    --silver-strong-shadow:inset 0 1px 0 #ffffff35,0 3px 9px #00000014;
  --silver-switch-off:#3b3e44;--silver-switch-off-thumb:#b2bbc7;
  --silver-switch-on:#dae4f0;--silver-switch-on-thumb:#303945;
  --silver-blue-ink:#a2c5ef;--silver-blue-edge:#8bb7e64a;
  --silver-selection:linear-gradient(155deg,#b2d3ff24,#769dca12);
  --silver-primary:linear-gradient(155deg,#bbd8ff36,#7ca5d621);
}
/* Alias at every appearance boundary: local dialog tokens must not restore a blue accent. */
:root,:root[data-theme="light"],:root[data-theme="dark"]{
  --accent:var(--silver-accent);--accent-ink:var(--silver-ink);--accent-soft:var(--silver-soft);
  --soft:var(--silver-soft);--switch-on:#c8ced7;--switch-on-border:var(--silver-edge);
  --editor-accent:var(--silver-accent);--editor-accent-soft:var(--silver-soft);
}
/* Text selection must remain distinct from the silver focused-input surface. */
::selection{background:#476e9e;color:#fff;text-shadow:none}
:root :is(button,input,textarea,select,[contenteditable="true"]):focus-visible{outline-color:var(--silver-focus)}
:root :is(.task-form button,#new-note,#add-apps,#app-picker-add,#install-update,.primary,.save-button,#text-done,.task-check.done,.feature-detail-action:not(.feature-detail-close),.lan-compose-actions button:not(#lan-add-files)){
  background:var(--silver-primary);color:var(--silver-ink);border-color:var(--silver-blue-edge);box-shadow:var(--silver-strong-shadow);text-shadow:none;
}
:root :is(.clipboard-actions button,.file-send,.file-edit,.feature-detail-close,.note-save-close,#open-note-list,.storage-actions button,.setting-action:not(.liquid-switch),#lan-refresh,.lan-name-row button,.browser-heading-actions>button,.browser-toolbar button,.browser-form-footer button:not(.primary),.text-editor-actions button:not(#text-done)){
  background:var(--silver-control);border-color:var(--silver-edge);color:var(--silver-label);box-shadow:var(--silver-shadow);
}
/* One material under both settled selections and the existing liquid bridge. */
:root :is(.tab.active,.side-nav-button.active,.liquid-selection,.settings-tabs button[aria-selected="true"],.setting-options button.active,.lan-tabs button[aria-selected="true"],.note-mode-controls button[aria-pressed="true"],.browser-location.selected,nav button.active){
  background:var(--silver-selection);border-color:var(--silver-blue-edge);color:var(--silver-blue-ink);box-shadow:var(--silver-shadow);
}
:root .tab.active span{color:var(--silver-blue-ink);background:color-mix(in srgb,var(--silver-soft) 85%,transparent)}
/* Daylight tabs need label text that survives a bright strip. */
:root[data-theme="light"] .tab,
:root[data-theme="light"] .settings-tabs button{color:#3f4650}
:root[data-theme="light"] .tab:hover,:root[data-theme="light"] .settings-tabs button:hover{color:#22262c}
:root[data-theme="light"] .tab span{background:color-mix(in srgb,#3f4650 9%,var(--silver-soft));color:#3f4650}
/* Never paint a second plate over the animated bridge. Keep its geometry and spring intact. */
:root #content-tabs.liquid-moving .tab.active,
:root .side-nav.liquid-options .side-nav-button.active,
:root .settings-tabs.liquid-moving button[aria-selected="true"],
:root .settings-page .liquid-options.liquid-ready button.active,
:root .lan-tabs.liquid-moving button[aria-selected="true"]{background:transparent;border-color:transparent;box-shadow:none}
:root button.liquid-switch{background:var(--silver-switch-off);border-color:var(--silver-edge);box-shadow:inset 0 1px 3px #0002}
:root button.liquid-switch[aria-checked="true"]{background:var(--silver-switch-on);border-color:var(--silver-switch-on);box-shadow:inset 0 1px 0 #ffffff35,0 1px 4px #0002}
:root button.liquid-switch::after{background:var(--silver-switch-off-thumb);box-shadow:0 1px 3px #0004}
:root button.liquid-switch[aria-checked="true"]::after{background:var(--silver-switch-on-thumb);box-shadow:0 1px 3px #0003}
:root .source.selected{border-color:var(--silver-focus);box-shadow:0 0 0 2px var(--silver-soft),inset 0 1px #ffffff25}
:root .source.selected::after{background:var(--silver-strong);color:var(--silver-ink);box-shadow:var(--silver-strong-shadow)}
:root .source-placeholder{color:var(--silver-accent)}
:root .mode:has(input:checked){background:var(--silver-control);border-color:var(--silver-edge);box-shadow:var(--silver-shadow)}
:root .mode:has(input:checked) .choice-dot{border-color:var(--silver-accent)}
:root :is(.audio-mark,.feedback){border-color:var(--silver-edge)}
:root .audio-mark{background:var(--silver-control);box-shadow:var(--silver-shadow)}
:root .tool.active{background:var(--silver-control);border-color:var(--silver-edge);color:var(--silver-label);box-shadow:var(--silver-shadow)}
:root body.inline .canvas-wrap{box-shadow:0 0 0 2px var(--silver-focus),0 16px 36px #0005}
:root body.inline .canvas-wrap::before{background:var(--silver-strong);color:var(--silver-ink);box-shadow:var(--silver-shadow)}
:root body.inline .resize-handle{border-color:var(--silver-focus);background:var(--silver-strong)}
:root #selection{border-color:#e2e6ed;background:#e2e6ed0b;box-shadow:0 0 0 9999px #090b1080,0 0 0 1px #242832}
:root .app-shortcut-icon:not(.has-system-icon){background:var(--silver-control);color:var(--silver-label);box-shadow:var(--silver-shadow)}
:root .collapsed-recording-controls .recording-mini-button:not(.stop){background:var(--silver-control);border-color:var(--silver-edge);color:var(--silver-label)}
:root[data-notch="true"] .collapsed-recording-controls .recording-mini-button:not(.stop){background:#30343b!important;border-color:#737b88!important;color:#e6eaf0!important}
/* Destructive and live-recording states keep their semantic contrast. */
:root :is(.file-delete,.lan-delete,#delete-note,.note-card-delete){color:var(--danger);text-shadow:none}
@media(prefers-reduced-motion:reduce){:root :is(.primary,.save-button,.quick-actions .record-button){transition:none}}
/* Opaque fallback stays in the same paint pass as tab text during panel reveal. */
:root :is(.tab.active,.settings-tabs button[aria-selected="true"],.liquid-selection){background-color:var(--surface,#29292b)}
:root #content-tabs.liquid-options .liquid-selection{background:var(--silver-selection);background-color:var(--surface,#29292b);border-color:var(--silver-blue-edge);box-shadow:var(--silver-shadow)}
:root #content-tabs.liquid-moving .tab.active,:root .settings-tabs.liquid-moving button[aria-selected="true"]{background-color:transparent}
/* Settings categories share the content tabs' selection material. */
:root .settings-tabs button{border:1px solid transparent}
:root .settings-tabs button[aria-selected="true"],
:root .settings-tabs.liquid-options>.liquid-selection{
  background:var(--silver-selection);background-color:var(--surface,#29292b);
  border:1px solid var(--silver-blue-edge);color:var(--silver-blue-ink);
  box-shadow:var(--silver-shadow);
}
:root .settings-tabs.liquid-moving button[aria-selected="true"]{background:transparent;border-color:transparent;box-shadow:none}

/* Small action surfaces can frost their backdrop; navigation stays in its parent paint pass. */
@supports(backdrop-filter:blur(8px)){
  :root :is(.feature-detail-action,.browser-form-footer button,.audio-mark,footer .primary){backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
}

/* The feedback card retains its original blue identity. */
.settings-feedback{--accent:#4fa0ff;--accent-ink:#fff;--accent-soft:#23384f}
:root[data-theme="light"] .settings-feedback{--accent:#1877dd;--accent-soft:#e7f1ff}
