/* Floating display-settings button + drawer */
.settings-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: var(--c-accent); color: var(--c-accent-contrast); font-size: 1.5rem; cursor: pointer; box-shadow: var(--shadow);
}
.settings-panel {
  position: fixed; right: 18px; bottom: 82px; z-index: 91; width: min(340px, calc(100vw - 36px)); max-height: calc(100vh - 110px); overflow: auto;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem;
  font-size: 15px; /* fixed so the panel itself stays usable at any zoom */
}
.settings-panel[hidden] { display: none; }
.settings-panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.settings-panel h3 { margin: 0; font-size: 1.25rem; }
.settings-panel section { margin: 1rem 0; }
.settings-panel .lbl { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: .5rem; font-size: 13px; }
.settings-panel .row2 { grid-template-columns: 1fr 1fr; }
.settings-panel input[type=color] { width: 44px; height: 30px; border: 1px solid var(--c-border); border-radius: 6px; padding: 0; background: none; cursor: pointer; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.swatch { border: 1px solid var(--c-border); background: transparent; border-radius: 10px; padding: .45rem; cursor: pointer; display: grid; gap: .3rem; justify-items: center; }
.swatch span { width: 100%; height: 26px; border-radius: 6px; background: linear-gradient(135deg, var(--sw-bg) 60%, var(--sw-accent) 60%); border: 1px solid rgb(127 127 127 / .3); }
.swatch small { font-size: 11px; }
.swatch.active { border-color: var(--c-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-accent) 35%, transparent); }
.zoom-row { display: flex; align-items: center; gap: .6rem; }
.zoom-row input { flex: 1; accent-color: var(--c-accent); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--c-border); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: transparent; padding: .5rem; cursor: pointer; }
.seg button.active { background: var(--c-accent); color: var(--c-accent-contrast); }
.toggles { display: grid; gap: .5rem; }
.toggles label { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.toggles input { accent-color: var(--c-accent); }
.settings-panel footer .btn { width: 100%; }
