/* Settings dialog (Relay enamel dialog) and the "calmer motion" switch. Loaded after home.css. */
dialog.settings { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; overflow: hidden; display: none; }
dialog.settings[open] { display: flex; flex-direction: column; }
.settings .dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px 10px; }
.settings .dialog-heading h2 { margin: 0; }
.st-tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--edge); flex-wrap: wrap; }
.st-tab { border-radius: 5px 5px 0 0 !important; border-bottom: 0 !important; min-height: 38px; padding: 0 14px; font-weight: 700; }
.st-tab[aria-selected=true] { background: var(--mod) !important; color: #202D2C !important; border-color: #202D2C !important; }
.st-body { padding: 14px 22px 8px; overflow-y: auto; flex: 1; min-height: 0; display: grid; gap: 4px; align-content: start; }
.st-foot { margin: 0; padding: 10px 22px 14px; border-top: 1px solid var(--edge); color: var(--muted); font: 600 11.5px var(--font-mono); letter-spacing: .03em; }
.st-lead { margin: 2px 0 8px; color: var(--muted); line-height: 1.5; max-width: 64ch; }
.st-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--edge); }
.st-row:last-child { border-bottom: 0; }
.st-label { font: 700 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.st-hint { grid-column: 2; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.st-field { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.st-field input[type=text], .st-field textarea, .st-row > input, .st-row > select { flex: 1 1 260px; min-width: 0; width: 100%; }
.st-field textarea { resize: vertical; font: inherit; }
.st-row > input, .st-row > select { max-width: 380px; }
.st-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; line-height: 1.4; }
.st-check input { width: 18px; height: 18px; min-height: 0; margin: 1px 0 0; flex: none; accent-color: var(--mod-d); }
.st-seg { display: inline-flex; gap: 0; border: 1px solid var(--edge); border-radius: 6px; overflow: hidden; width: max-content; }
.st-segbtn { border: 0 !important; border-radius: 0 !important; min-height: 36px; padding: 0 16px; }
.st-segbtn[aria-pressed=true] { background: var(--mod) !important; color: #202D2C !important; }
.st-small { min-height: 30px; padding: 0 10px; font-size: 12px; }
.st-field input[type=color], .st-row input[type=color] { width: 46px; height: 36px; min-height: 0; padding: 2px; border: 1px solid var(--edge); border-radius: 5px; background: var(--raised); cursor: pointer; flex: none; }
.st-chip { display: inline-grid; place-items: center; width: 42px; height: 34px; border: 1px solid #202D2C; border-radius: 5px; color: #202D2C; font: 800 15px var(--font-display); }
.st-note { color: var(--muted); font-size: 12.5px; }
.st-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.st-preset { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 8px; font-weight: 700; }
.st-preset[aria-pressed=true] { background: var(--sel-bg) !important; border-color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink) !important; }
.st-sw { width: 20px; height: 20px; border: 1px solid #202D2C; border-radius: 4px; display: inline-block; }
header .header-gear:hover .ui-icon { rotate: 30deg; }
@media (max-width: 640px) { .st-row { grid-template-columns: 1fr; } .st-hint { grid-column: 1; } .st-tabs, .st-body, .st-foot, .settings .dialog-heading { padding-left: 14px; padding-right: 14px; } }
@media (prefers-reduced-motion: no-preference) { dialog.settings[open] { animation: panel-in .16s ease-out both; } header .header-gear .ui-icon { transition: rotate .25s ease-out; } }
@media print { dialog.settings { display: none !important; } }

/* Calmer motion: stops animation and blinking everywhere (the bands and digits stay fully drawn). */
body.calm *, body.calm *::before, body.calm *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
body.calm .home-bands .b-lit { display: none !important; }
