/* 31-settings-modal.css
   The shared settings modal and the controls inside it.
   Files in css/ load in filename order and the cascade depends on it: see docs/CSS.md. */

/* ============================================================
   SETTINGS POLISH — desktop-app style hierarchy
============================================================ */
#settings-modal {
  background: rgba(7, 9, 16, 0.78);
}

.settings-shell {
  width: min(1080px, 100%);
  height: min(800px, 100%);
  border: 0;
  border-radius: 12px;
  background: #313338;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 28px 90px rgba(0, 0, 0, 0.7);
}

.settings-header {
  box-sizing: border-box;
  border-color: rgba(255, 255, 255, 0.06);
  background: #2b2d31;
}

.settings-header h2 {
  margin-top: 1px;
  color: #f2f3f5;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.settings-eyebrow {
  color: #949ba4;
  font-size: 10px;
  letter-spacing: 1.25px;
}

.settings-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0 0 3px;
  border-color: #4e5058;
  border-radius: 50%;
  background: transparent;
  color: #b5bac1;
  font-size: 25px;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.settings-close:hover {
  border-color: #b5bac1;
  background: rgba(255, 255, 255, 0.05);
  color: #f2f3f5;
}

/* Shared app-settings close control. Keep this more specific than app modal button resets. */
.settings-header .settings-close {
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid #4e5058;
  border-radius: 50%;
  background: transparent;
  color: #b5bac1;
  line-height: 1;
}

.settings-header .settings-close:hover {
  border-color: #b5bac1;
  background: rgba(255, 255, 255, 0.05);
  color: #f2f3f5;
}

.settings-header .settings-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
}

.settings-nav {
  border-color: rgba(255, 255, 255, 0.05);
  background: #2b2d31;
}

.settings-nav::before {
  content: "APP SETTINGS";
  display: block;
  margin: 0 10px 8px;
  color: #949ba4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.settings-nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  margin-bottom: 3px;
  padding: 9px 12px;
  border-radius: 5px;
  color: #b5bac1;
  font-size: 15px;
  font-weight: 600;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.settings-nav button::before {
  width: 21px;
  color: #949ba4;
  font-size: 17px;
  text-align: center;
}

.settings-nav button[data-settings-tab="weather"]::before {
  content: "☁";
}
.settings-nav button.coming-soon-tab {
  overflow: hidden;
  padding-right: 80px;
}
.settings-nav button.coming-soon-tab::before {
  content: "\26A1\FE0E";
  color: #fff;
  font-family: Arial, sans-serif;
}
.settings-nav button.coming-soon-tab > span {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 8px;
  display: block;
  min-width: 42px;
  transform: translateY(-50%);
  border-radius: 999px;
  padding: 3px 6px;
  background: #d7193f;
  color: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}
.settings-nav button[data-settings-tab="lightning"]::before {
  content: "\26A1\FE0E";
  color: #fff;
  font-family: Arial, sans-serif;
}
.settings-nav button[data-settings-tab="shift-import"]::before {
  content: "⇩";
}
.settings-nav button[data-settings-tab="positions"]::before {
  content: "▦";
}
.settings-nav button[data-settings-tab="people"]::before {
  content: "♟";
}
.settings-nav button[data-settings-tab="appearance"]::before {
  content: "◐";
}
.settings-nav button[data-settings-tab="team"]::before {
  content: "♟";
}
.settings-nav button[data-settings-tab="account"]::before {
  content: "●";
}
.settings-nav button[data-settings-tab="debug"]::before {
  content: "⌁";
}

.settings-nav button:hover {
  background: #35373c;
  color: #dbdee1;
}

.settings-nav button.active {
  background: #404249;
  color: #fff;
}

.settings-nav button.active::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -8px;
  width: 3px;
  border-radius: 3px;
  background: #5865f2;
}

.settings-content {
  background: #313338;
}

.settings-content > * {
  max-width: 720px;
}

.settings-section-header {
  margin-bottom: 24px;
}

.settings-section-header h3 {
  margin-bottom: 7px;
  color: #f2f3f5;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.35px;
}

.settings-section-header p,
.settings-help {
  color: #b5bac1;
  font-size: 14px;
}

.settings-card {
  margin-bottom: 20px;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid #3f4147;
  border-radius: 0;
  background: transparent;
}

.settings-card:last-child {
  border-bottom: 0;
}

.settings-card h4 {
  margin-bottom: 14px;
  color: #dbdee1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.settings-field {
  gap: 7px;
  margin-bottom: 16px;
  color: #b5bac1;
  font-size: 12px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.settings-field input,
.settings-field select,
.position-setting-row input,
.position-setting-row select {
  height: 44px;
  border-color: #1e1f22;
  border-radius: 4px;
  background: #1e1f22;
  color: #dbdee1;
  font-size: 15px;
  text-transform: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.settings-field input:hover,
.settings-field select:hover,
.position-setting-row input:hover,
.position-setting-row select:hover {
  border-color: #111214;
}

.settings-field input:focus,
.settings-field select:focus,
.position-setting-row input:focus,
.position-setting-row select:focus {
  border-color: #00a8fc;
  box-shadow: 0 0 0 1px #00a8fc;
}

.settings-secondary,
.settings-add-position,
.settings-tool-grid button {
  border: 0;
  border-radius: 4px;
  background: #4e5058;
  color: #fff;
  transition:
    background 0.15s ease,
    transform 0.08s ease;
}

.settings-secondary:hover,
.settings-add-position:hover,
.settings-tool-grid button:hover {
  background: #5d6069;
}

.settings-secondary:active,
.settings-add-position:active,
.settings-tool-grid button:active {
  filter: brightness(0.94);
}

.position-settings-list {
  gap: 8px;
}

.position-setting-row {
  padding: 8px;
  border-radius: 6px;
  background: #2b2d31;
}

.position-drag {
  color: #949ba4;
  font-size: 12px;
}

.position-delete {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #f23f42;
  transition: background 0.15s ease;
}

.position-delete:hover:not(:disabled) {
  background: rgba(242, 63, 66, 0.14);
}

.settings-switch-row {
  min-height: 58px;
  padding: 4px 0;
}

.settings-switch-row strong {
  color: #dbdee1;
  font-size: 15px;
}

.settings-switch-row small {
  color: #949ba4;
  font-size: 13px;
}

.settings-switch-row input {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  appearance: none;
  border-radius: 12px;
  background: #4e5058;
  cursor: pointer;
  transition: background 0.18s ease;
}

.settings-switch-row input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.settings-switch-row input:checked {
  background: #23a55a;
}

.settings-switch-row input:checked::after {
  transform: translateX(18px);
}

.settings-tool-grid button {
  min-height: 50px;
  text-align: left;
}

.settings-footer {
  box-sizing: border-box;
  border-color: rgba(255, 255, 255, 0.06);
}

.settings-footer button {
  height: 40px;
  border-radius: 4px;
  font-size: 14px;
}

.settings-save {
  background: #5865f2;
  transition: background 0.15s ease;
}

.settings-save:hover {
  background: #4752c4;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.theme-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #2b2d31;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.theme-option:hover {
  background: #35373c;
}

.theme-option.selected {
  border-color: #5865f2;
}

.theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-preview {
  height: 72px;
  display: grid;
  grid-template-columns: 28% 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 5px;
  padding: 7px;
  border-radius: 5px;
  overflow: hidden;
}

.theme-preview i {
  display: block;
  border-radius: 3px;
}

.theme-preview i:first-child {
  grid-row: 1 / 3;
}

.theme-preview-dark {
  background: #1e1f22;
}

.theme-preview-dark i:first-child {
  background: #2b2d31;
}
.theme-preview-dark i:not(:first-child) {
  background: #404249;
}

.theme-preview-light {
  background: #e9edf2;
}

.theme-preview-light i:first-child {
  background: #d7dde5;
}
.theme-preview-light i:not(:first-child) {
  background: #fff;
}

.theme-preview-system {
  background: linear-gradient(115deg, #1e1f22 0 49%, #e9edf2 51% 100%);
}

.theme-preview-system i:first-child {
  background: #68707c;
}
.theme-preview-system i:not(:first-child) {
  background: #8a93a0;
}

.theme-option-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.theme-option-copy strong {
  color: #f2f3f5;
  font-size: 14px;
}

.theme-option-copy small {
  color: #949ba4;
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 700px) {
  .settings-shell {
    border-radius: 8px;
  }

  .settings-header {
    min-height: 66px;
  }

  .settings-nav {
    padding: 8px;
    background: #2b2d31;
  }

  .settings-nav::before {
    display: none;
  }

  .settings-nav button {
    min-height: 38px;
    padding: 8px 11px;
    white-space: nowrap;
  }

  .settings-nav button::before,
  .settings-nav button.active::after {
    display: none;
  }

  .settings-content > * {
    max-width: none;
  }

  .settings-section-header h3 {
    font-size: 22px;
  }

  .settings-footer {
    min-height: 64px;
    padding: 10px 12px;
  }

  .theme-options {
    grid-template-columns: 1fr;
  }

  .theme-option {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
  }

  .theme-preview {
    height: 58px;
  }
}

/* ============================================================
   LIGHT THEME — operational colors remain unchanged
============================================================ */
:root[data-theme="light"] {
  --bg: #dfe5ec;
  --card: #ffffff;
  --text: #182230;
  --muted: #5f7182;
  --accent: rgba(41, 118, 196, 0.2);
  --line: #b9c5d2;
  --inside: #2f78bd;
}

:root[data-theme="light"] body {
  color-scheme: light;
}

:root[data-theme="dark"] body {
  color-scheme: dark;
}

:root[data-theme="dark"] {
  --bg: #0d0e10;
  --card: #18191c;
  --text: #f1f2f3;
  --muted: #a2a6ad;
  --accent: rgba(150, 156, 166, 0.22);
  --line: #2d2f34;
  /* Intentionally retain the established blue Inside status color. */
  --inside: #1a2c46;
}

:root[data-theme="dark"] .history-row {
  background: #24262a;
}

:root[data-theme="dark"] .icon-btn,
:root[data-theme="dark"] .modal-cancel,
:root[data-theme="dark"] .cover-cancel-btn {
  border-color: #383b41;
  background: #24262a;
}

:root[data-theme="dark"] .icon-btn:hover,
:root[data-theme="dark"] .modal-cancel:hover,
:root[data-theme="dark"] .cover-cancel-btn:hover {
  background: #303238;
}

:root[data-theme="dark"] .mini-card {
  background: #111214;
}

:root[data-theme="dark"] .wx-top-label {
  background: #202226;
}

:root[data-theme="dark"] .wx-refresh-status::after {
  background: #202226;
}

:root[data-theme="dark"] .modal-input,
:root[data-theme="dark"] .modal-select,
:root[data-theme="dark"] .custom-select,
:root[data-theme="dark"] .custom-select-options {
  border-color: #35383e;
  background: #111214;
}

:root[data-theme="dark"] #debug-open-btn,
:root[data-theme="dark"] #roster-open-btn {
  border-color: #35383e;
  background: #1c1e21;
  color: #d7d9dc;
}

:root[data-theme="dark"] #debug-panel {
  border-color: #292b30;
  background: #111214;
}

:root[data-theme="light"] .card-inner {
  background: var(--card);
  box-shadow:
    0 1px 2px rgba(25, 42, 61, 0.12),
    0 4px 12px rgba(25, 42, 61, 0.08);
}

:root[data-theme="light"] .card.off-soon .card-inner {
  background: #f9e8f0;
}

:root[data-theme="light"] .history-row {
  background: #edf2f6;
}

:root[data-theme="light"] .icon-btn,
:root[data-theme="light"] .modal-cancel,
:root[data-theme="light"] .cover-cancel-btn {
  border-color: #c5d0dc;
  background: #e7edf4;
  color: #172333;
}

:root[data-theme="light"] .icon-btn:hover,
:root[data-theme="light"] .modal-cancel:hover,
:root[data-theme="light"] .cover-cancel-btn:hover {
  background: #dbe4ee;
}

:root[data-theme="light"] .mini-card {
  background: #edf2f7;
}

:root[data-theme="light"] #weather-widget {
  box-shadow:
    0 1px 2px rgba(25, 42, 61, 0.12),
    0 5px 16px rgba(25, 42, 61, 0.1);
}

:root[data-theme="light"] .wx-forecast {
  background: #f4f7fb;
}

:root[data-theme="light"] .wx-forecast-time {
  color: #2878c8;
}

:root[data-theme="light"] .wx-forecast-zone {
  color: #5f6670;
}

:root[data-theme="light"] .wx-top-label {
  background: #dce9f7;
  color: #245f9f;
}

:root[data-theme="light"] .wx-refresh-status::after {
  background: #dce9f7;
}

:root[data-theme="light"] .modal {
  background: rgba(42, 52, 67, 0.34);
}

:root[data-theme="light"] .modal-box {
  box-shadow: 0 18px 55px rgba(37, 49, 66, 0.22);
}

:root[data-theme="light"] .cover-toggle-wrap {
  border-color: #c5d0dc;
  background: #e7edf4;
}

:root[data-theme="light"] .cover-toggle-slider {
  background: #2878c8;
}

:root[data-theme="light"] .cover-name-pill {
  border: 1px solid #c5d0dc;
  background: #edf2f7;
  color: #172333;
}

:root[data-theme="light"] .cover-name-pill:hover {
  border-color: #9fb4c9;
  background: #e1e8f0;
}

:root[data-theme="light"] .cover-toggle-wrap .toggle-btn {
  color: #4f6275;
}

:root[data-theme="light"] .cover-toggle-wrap .toggle-btn.active {
  color: #fff;
}

:root[data-theme="light"] .modal-input,
:root[data-theme="light"] .modal-select,
:root[data-theme="light"] .custom-select,
:root[data-theme="light"] .custom-select-options {
  border-color: #c7d1dc;
  background: #f4f7fa;
  color: #172333;
}

:root[data-theme="light"] .custom-select-option:hover {
  background: #e1e8f0;
}

:root[data-theme="light"] #debug-open-btn,
:root[data-theme="light"] #roster-open-btn {
  border-color: #c3ceda;
  background: #ffffff;
  color: #32445a;
  box-shadow: 0 4px 14px rgba(35, 52, 73, 0.16) !important;
}

:root[data-theme="light"] #debug-panel {
  border-color: #c8d2de;
  background: #f5f7fa;
  color: #26374b;
}

:root[data-theme="light"] .settings-shell,
:root[data-theme="light"] .settings-content {
  background: #ffffff;
}

:root[data-theme="light"] .settings-header,
:root[data-theme="light"] .settings-footer,
:root[data-theme="light"] .settings-nav {
  border-color: #d9dee5;
  background: #f2f3f5;
}

:root[data-theme="light"] .settings-header h2,
:root[data-theme="light"] .settings-section-header h3,
:root[data-theme="light"] .settings-card h4,
:root[data-theme="light"] .settings-switch-row strong,
:root[data-theme="light"] .theme-option-copy strong {
  color: #20242a;
}

:root[data-theme="light"] .settings-eyebrow,
:root[data-theme="light"] .settings-nav::before,
:root[data-theme="light"] .settings-section-header p,
:root[data-theme="light"] .settings-help,
:root[data-theme="light"] .settings-switch-row small,
:root[data-theme="light"] .theme-option-copy small {
  color: #5f6670;
}

:root[data-theme="light"] .settings-close {
  border-color: #b5bbc3;
  color: #4e555f;
}

:root[data-theme="light"] .settings-nav button {
  color: #4f5660;
}

:root[data-theme="light"] .settings-nav button:hover {
  background: #e2e4e8;
  color: #272b31;
}

:root[data-theme="light"] .settings-nav button.active {
  background: #d8dbe0;
  color: #17191d;
}

:root[data-theme="light"] .settings-card {
  border-color: #d9dde3;
}

:root[data-theme="light"] .settings-field {
  color: #555d68;
}

:root[data-theme="light"] .settings-field input,
:root[data-theme="light"] .settings-field select,
:root[data-theme="light"] .position-setting-row input,
:root[data-theme="light"] .position-setting-row select {
  border-color: #b9c1cb;
  background: #ffffff;
  color: #20242a;
}

:root[data-theme="light"] .position-setting-row,
:root[data-theme="light"] .theme-option {
  background: #f2f3f5;
}

:root[data-theme="light"] .theme-option:hover {
  background: #e8eaed;
}

:root[data-theme="light"] .settings-secondary,
:root[data-theme="light"] .settings-add-position,
:root[data-theme="light"] .settings-tool-grid button {
  background: #e1e4e8;
  color: #252a31;
}

:root[data-theme="light"] .settings-secondary:hover,
:root[data-theme="light"] .settings-add-position:hover,
:root[data-theme="light"] .settings-tool-grid button:hover {
  background: #d3d7dd;
}

/* ============================================================
   COMPACT SETTINGS + EMBEDDED TOOLS
============================================================ */
.settings-shell {
  width: min(920px, 100%);
  height: min(700px, 100%);
}

.settings-header {
  min-height: 68px;
  padding: 13px 20px;
}

.settings-layout {
  grid-template-columns: 220px minmax(0, 1fr);
}

.settings-nav {
  padding: 20px 10px 20px 16px;
}

.settings-content {
  padding: 26px 30px 34px;
}

.zone-boundary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.zone-boundary-grid .settings-field {
  margin-bottom: 4px;
}

.zone-boundary-grid .settings-field input {
  height: 38px;
}

.settings-debug-embedded#debug-panel {
  position: static;
  width: auto;
  height: auto;
  padding: 18px;
  border: 1px solid #3f4147;
  border-radius: 7px;
  background: #2b2d31;
  color: inherit;
  transition: none;
  z-index: auto;
}

.settings-action-list {
  overflow: hidden;
  padding: 0;
  border: 1px solid #3f4147;
  border-radius: 7px;
  background: #2b2d31;
}

.settings-action-row {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  gap: 13px;
  align-items: center;
  padding: 12px 15px;
  border: 0;
  border-bottom: 1px solid #3f4147;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease;
}

.settings-action-row:last-child {
  border-bottom: 0;
}

.settings-action-row:hover {
  background: #35373c;
}

.settings-action-row.active {
  background: #383a40;
}

.settings-action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #404249;
  color: #dbdee1;
  font-size: 20px;
  font-weight: 700;
  pointer-events: none;
}

.settings-action-row > span:nth-child(2),
.debug-section-heading > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}

.settings-action-row strong,
.debug-section-heading strong {
  color: #f2f3f5;
  font-size: 15px;
}

.settings-action-row small,
.debug-section-heading small {
  color: #949ba4;
  font-size: 12px;
  line-height: 1.35;
}

.settings-action-row b {
  color: #949ba4;
  font-size: 25px;
  font-weight: 400;
  pointer-events: none;
}

.settings-inline-panel {
  padding: 16px;
  border-bottom: 1px solid #3f4147;
  background: #232428;
}

.settings-inline-panel.hidden {
  display: none;
}

.settings-inline-grid {
  align-items: end;
}

.settings-inline-panel .settings-field {
  margin: 0;
}

.settings-inline-panel select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #4b4d55;
  border-radius: 6px;
  background: #18191c;
  color: #f2f3f5;
  font-size: 14px;
  font-weight: 700;
}

.settings-inline-actions:has(.settings-save-inline:only-child) {
  justify-content: flex-start;
}

.settings-save-inline {
  border: 0;
  border-radius: 5px;
  background: #5865f2;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.settings-save-inline:hover {
  background: #4752c4;
}

.settings-inline-leader-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.settings-inline-leader-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: center;
}

.settings-inline-add-row {
  margin-top: 12px;
}

.debug-section-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  margin-bottom: 2px;
}

.settings-debug-embedded #dbg-tools-body {
  display: block;
}

.settings-debug-embedded .dbg-section {
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-top: 1px solid #3f4147;
  border-radius: 0;
  background: transparent;
}

.settings-debug-embedded .dbg-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-debug-embedded .dbg-row {
  grid-template-columns: 55px minmax(0, 1fr) 44px;
  gap: 8px;
}

.settings-debug-embedded .dbg-zone {
  flex: 1 1 30%;
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  background: #404249;
  color: var(--text);
  font-weight: 700;
}

.settings-debug-embedded .dbg-zone:hover {
  background: #4e5058;
}

.settings-debug-embedded .dbg-btn {
  min-height: 42px;
  border: 0;
  border-radius: 4px;
  background: #5865f2;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.settings-debug-embedded .dbg-btn:hover {
  background: #4752c4;
}

.settings-debug-embedded .dbg-toggle {
  justify-content: space-between;
}

.settings-debug-embedded .dbg-toggle .label {
  order: -1;
  color: #dbdee1;
  font-size: 15px;
  font-weight: 700;
}

.settings-debug-embedded .dbg-row label {
  color: #b5bac1;
  font-size: 13px;
  font-weight: 700;
}

.settings-debug-embedded input[type="range"] {
  accent-color: #5865f2;
}

:root[data-theme="light"] .settings-debug-embedded#debug-panel {
  border-color: #d9dde3;
  background: #f2f3f5;
  color: #26374b;
}

:root[data-theme="light"] .settings-debug-embedded .dbg-section {
  border-color: #d9dde3;
  background: transparent;
}

:root[data-theme="light"] .settings-debug-embedded .dbg-zone,
:root[data-theme="light"] .settings-debug-embedded .dbg-btn {
  background: #e4e8ed;
  color: #252a31;
}

:root[data-theme="light"] .settings-debug-embedded .dbg-zone:hover {
  background: #d6dce3;
}

:root[data-theme="light"] .settings-debug-embedded .dbg-btn {
  background: #5865f2;
  color: #fff;
}

:root[data-theme="light"] .settings-debug-embedded .dbg-toggle .label,
:root[data-theme="light"] .settings-action-row strong,
:root[data-theme="light"] .debug-section-heading strong {
  color: #20242a;
}

:root[data-theme="light"] .settings-debug-embedded .dbg-row label,
:root[data-theme="light"] .settings-action-row small,
:root[data-theme="light"] .debug-section-heading small {
  color: #5f6670;
}

:root[data-theme="light"] .settings-action-list {
  border-color: #d9dde3;
  background: #f2f3f5;
}

:root[data-theme="light"] .settings-action-row {
  border-color: #d9dde3;
  color: #20242a;
}

:root[data-theme="light"] .settings-action-row:hover {
  background: #e8eaed;
}

:root[data-theme="light"] .settings-action-row.active {
  background: #e3e7ec;
}

:root[data-theme="light"] .settings-action-icon {
  background: #d8dbe0;
  color: #363b44;
}

:root[data-theme="light"] .settings-inline-panel {
  border-color: #d9dde3;
  background: #ffffff;
}

:root[data-theme="light"] .settings-inline-panel select {
  border-color: #b8c0cb;
  background: #f9fafb;
  color: #20242a;
}

@media (max-width: 700px) {
  .settings-shell {
    width: 100%;
    height: 100%;
  }

  .settings-content {
    padding: 20px 16px 30px;
  }

  .zone-boundary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-inline-grid {
    grid-template-columns: 1fr;
  }

  .settings-inline-actions {
    flex-direction: column-reverse;
  }

  .settings-inline-actions button {
    width: 100%;
  }
}
