:root {
  color-scheme: dark;
  --topbar-height: 72px;
  --ink: #10161d;
  --ink-soft: #18232c;
  --line: #293640;
  --paper: #f5f1e9;
  --paper-line: #ded8cc;
  --muted: #8c9aa2;
  --muted-dark: #65727a;
  --amber: #e5a14b;
  --amber-soft: #f5d39d;
  --teal: #83c4ba;
  font-family: "Roboto", sans-serif;
  background: var(--ink);
  color: #eef1ed;
}
* {
  box-sizing: border-box;
}
html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}
body {
  overflow: hidden;
  background: var(--ink);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.app-shell {
  height: 100vh;
  min-height: 0;
  background: radial-gradient(circle at 42% -20%, #263540 0, var(--ink) 42%);
}
.topbar {
  height: var(--topbar-height);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}
.main-tabs {
  grid-column: 2;
  grid-row: 1;
}
.topbar-status {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
.topbar-status,
.eyebrow-row,
.chapter-bar,
.chapter-nav,
.panel-topline,
.library-footer,
.pane-toolbar,
.entity-card {
  display: flex;
  align-items: center;
}
.section-label,
.eyebrow-row {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.topbar { justify-content: flex-end; }
.topbar-status {
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.live-dot,
.status-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(131, 196, 186, 0.12);
}
.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}
.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--amber);
  color: var(--amber-soft);
  outline: none;
}
.app-view {
  display: none;
}
.app-view.active {
  display: block;
}
.main-tabs {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-tab {
  height: 100%;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 17px;
  font-size: 12px;
}
.main-tab:hover,
.main-tab:focus-visible {
  color: #e9eee9;
  outline: none;
}
.main-tab.active {
  border-color: var(--amber);
  color: var(--amber-soft);
}
.workspace {
  display: grid;
  grid-template-columns: 285px minmax(430px, 1fr) 380px;
  height: calc(100vh - var(--topbar-height));
  min-height: 0;
  overflow: hidden;
}
.workspace > .library-panel,
.workspace > .reader-column,
.workspace > .inspector-panel {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.library-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  overflow-x: hidden;
}
.panel-topline {
  justify-content: space-between;
  padding: 0 8px 16px;
}
.count-badge {
  color: var(--amber-soft);
  font-family: Consolas, monospace;
  font-size: 12px;
}
.library-search {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  background: #121b22;
  color: var(--muted);
  padding: 8px 10px;
}
.library-search input,
.pane-toolbar input,
.pane-toolbar select {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e9eeea;
  font-size: 12px;
}
.library-search input {
  width: 100%;
}
.story-list {
  display: grid;
  gap: 4px;
  flex: 1 1 0;
  min-height: 0;
  margin-top: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.story-row {
  width: 100%;
  gap: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #dbe1dd;
  padding: 12px 9px;
  text-align: left;
}
.story-row:hover,
.story-row.selected {
  border-color: #384852;
  background: var(--ink-soft);
}
.story-index {
  color: var(--amber);
  font-family: Consolas, monospace;
  font-size: 11px;
}
.story-row strong,
.story-row small {
  display: block;
}
.story-row strong {
  font-size: 13px;
  font-weight: 600;
}
.story-row small {
  margin-top: 3px;
  color: var(--muted-dark);
  font-size: 10px;
}
.row-arrow {
  margin-left: auto;
  color: var(--muted-dark);
}
.story-row.selected .row-arrow {
  color: var(--amber);
}
.library-footer {
  gap: 8px;
  margin-top: auto;
  padding: 18px 8px 0;
  color: var(--muted-dark);
  font-size: 10px;
}
.reader-column {
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}
.story-hero {
  min-height: 218px;
  background: linear-gradient(135deg, #17242b, #263740);
  color: #f7f3eb;
  padding: 32px 42px 28px;
}
.eyebrow-row {
  justify-content: space-between;
  color: var(--amber-soft);
}
.state-pill {
  border: 1px solid rgba(245, 211, 157, 0.36);
  padding: 4px 8px;
  color: var(--amber-soft);
  font-size: 10px;
}
.state-pill.ready {
  border-color: rgba(131, 196, 186, 0.45);
  color: var(--teal);
}
.story-hero h1 {
  max-width: 720px;
  margin: 18px 0 8px;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.story-meta {
  margin: 0;
  color: #afbdc0;
  font-size: 13px;
}
.chapter-bar {
  justify-content: space-between;
  border-bottom: 1px solid var(--paper-line);
  padding: 17px 42px;
}
.chapter-bar .section-label {
  color: #8f8a7f;
}
.chapter-bar strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 400;
}
.chapter-nav {
  gap: 10px;
  color: #777267;
  font-family: Consolas, monospace;
  font-size: 11px;
}
.chapter-nav .icon-button {
  border-color: var(--paper-line);
  color: #777267;
}
.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  border-bottom: 1px solid var(--paper-line);
  background: #f0ece4;
  padding: 10px 42px;
}
.reader-modes,
.reader-language {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.reader-modes {
  flex-wrap: wrap;
}
.reader-mode {
  appearance: none;
  min-height: 34px;
  border: 1px solid #c9c2b5;
  background: #faf7f0;
  color: #4c514f;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}
.reader-mode:hover,
.reader-mode:focus-visible {
  border-color: #a28561;
  background: #e7e0d4;
  color: #202827;
  outline: none;
}
.reader-mode.active,
.reader-mode[aria-pressed="true"] {
  border-color: #2e3e42;
  background: #2e3e42;
  color: #fffaf0;
}
.reader-language {
  justify-content: flex-end;
  margin-left: auto;
}
.reader-language label {
  color: #6d6a63;
  font-size: 11px;
  white-space: nowrap;
}
#workspaceLanguage {
  appearance: none;
  min-width: 154px;
  min-height: 34px;
  border: 1px solid #bdb5a8;
  background: #fffdf8;
  color: #28302f;
  color-scheme: light;
  padding: 8px 30px 8px 10px;
  font-size: 12px;
  background-image:
    linear-gradient(45deg, transparent 50%, #6d6a63 50%),
    linear-gradient(135deg, #6d6a63 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 14px,
    calc(100% - 9px) 14px;
  background-repeat: no-repeat;
  background-size:
    5px 5px,
    5px 5px;
}
#workspaceLanguage:focus-visible {
  border-color: #a28561;
  outline: 2px solid rgba(162, 133, 97, 0.24);
  outline-offset: 1px;
}
.chapter-reader {
  max-width: 720px;
  min-height: 520px;
  margin: 0 auto;
  padding: 52px 42px 90px;
}
.chapter-reader h2 {
  margin: 7px 0 32px;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.chapter-label {
  color: #a28561;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.chapter-reader p {
  margin: 0 0 1.25em;
  color: #353b3b;
  font-size: 17px;
  line-height: 1.85;
}
.reader-empty,
.reader-loading {
  display: grid;
  place-items: center;
  min-height: 420px;
  color: #898377;
  text-align: center;
}
.reader-glyph {
  color: #c59a5e;
  font-size: 42px;
}
.reader-column.compare-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-content: start;
}
.reader-column.compare-mode > .story-hero,
.reader-column.compare-mode > .chapter-bar,
.reader-column.compare-mode > .reader-toolbar {
  grid-column: 1 / -1;
}
.reader-column.compare-mode > .chapter-reader {
  grid-column: 1;
  width: 100%;
  max-width: none;
  margin: 0;
}
.reader-column.compare-mode > .workspace-translation-pane {
  grid-column: 2;
  display: block;
  min-width: 0;
  border-left: 1px solid var(--paper-line);
}
.reader-column.compare-mode > .workspace-translation-pane .chapter-reader {
  max-width: none;
  width: 100%;
}
.inspector-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #151e25;
  padding: 23px 18px;
  overflow-x: hidden;
}
.inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.inspector-head h2 {
  margin: 6px 0 0;
  font-size: 22px;
  font-weight: 400;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--amber-soft);
  font-size: 11px;
}
.feedback {
  min-height: 28px;
  padding: 10px 0;
  color: var(--teal);
  font-size: 11px;
  line-height: 1.4;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 22px;
}
.metric {
  min-height: 63px;
  border: 1px solid var(--line);
  background: #10171d;
  padding: 9px;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}
.metric strong {
  display: block;
  margin-top: 7px;
  color: #f3eee4;
  font-family: Consolas, monospace;
  font-size: 17px;
  font-weight: 400;
}
.metric-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  color: var(--muted);
  padding: 18px;
  font-size: 12px;
}
.inspector-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.inspector-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 10px 0;
  font-size: 12px;
  white-space: nowrap;
}
.inspector-tab.active {
  border-color: var(--amber);
  color: var(--amber-soft);
}
.inspector-pane {
  display: none;
}
.inspector-pane.active {
  display: block;
}
.pane-toolbar {
  justify-content: space-between;
  gap: 8px;
  padding: 13px 0;
  color: var(--muted);
  font-size: 10px;
}
.pane-toolbar input,
.pane-toolbar select {
  border: 1px solid var(--line);
  padding: 6px 8px;
  color: #dfe6e1;
}
.entity-list,
.relation-list {
  display: grid;
  gap: 5px;
}
.entity-card {
  width: 100%;
  gap: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #e5ebe6;
  padding: 9px 7px;
  text-align: left;
}
.entity-card:hover,
.entity-card:focus-visible {
  border-color: #3c4b53;
  background: #1b2830;
  outline: none;
}
.entity-card strong,
.entity-card small {
  display: block;
}
.entity-card strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}
.entity-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.relation-card {
  border-left: 2px solid #465861;
  background: #111a20;
  padding: 10px;
}
.relation-card small {
  display: inline-block;
  margin-top: 6px;
  color: var(--teal);
  font-size: 10px;
  text-transform: uppercase;
}
.relation-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.quality-criterion {
  border-left: 2px solid #465861;
  padding: 4px 0 4px 8px;
  margin-top: 6px !important;
}
.quality-criterion.pass {
  border-left-color: #3f9c7a;
}
.quality-criterion.fail {
  border-left-color: #b4553f;
}
.quality-criterion strong {
  color: #eef1ed;
  text-transform: capitalize;
}
.empty {
  color: var(--muted);
  padding: 18px 4px;
  font-size: 11px;
}
.analysis-view,
.console-view {
  height: calc(100vh - var(--topbar-height));
  min-height: 0;
  overflow: hidden;
  background: #121a20;
  padding: 44px 28px 80px;
}
.analysis-shell,
.console-shell {
  width: min(1060px, 100%);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
}
.analysis-shell {
  display: flex;
  flex-direction: column;
}
.analysis-heading h1,
.console-head h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 400;
}
.analysis-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.selection-head,
.analysis-submit,
.console-head,
.console-entry header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.selection-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}
.analysis-story-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  gap: 7px;
  padding: 14px 0 22px;
}
.analysis-story-group {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 16px;
}
.analysis-story-group-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 0;
  background: var(--panel, #11191f);
}
.analysis-story-group-head h2 {
  margin: 0;
}
.analysis-story-group-head .text-button {
  flex: 0 0 auto;
  padding: 6px 8px;
  font-size: 10px;
}
.analysis-submit {
  flex: 0 0 auto;
}
.analysis-story {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  background: #11191f;
  padding: 12px;
  cursor: pointer;
}
.analysis-story:hover,
.analysis-story.selected {
  border-color: #4f646d;
  background: #19252c;
}
.analysis-story-index {
  color: var(--amber);
  font:
    11px Consolas,
    monospace;
}
.analysis-story strong,
.analysis-story small {
  display: block;
}
.analysis-story strong {
  overflow: hidden;
  color: #e6ece7;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analysis-story small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.analysis-submit {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 11px;
}
.console-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.console-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.danger-button {
  color: #e5a29b;
}
.danger-button:hover,
.danger-button:focus-visible {
  color: #ffd0c9;
}
.console-entry.status-cancelled {
  border-color: #71818a;
}
.console-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 130px));
  gap: 8px;
  margin: 20px 0;
}
.console-stat {
  border: 1px solid var(--line);
  background: #0d1419;
  padding: 10px 12px;
}
.console-stat span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}
.console-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--amber-soft);
  font:
    18px Consolas,
    monospace;
}
.console-log {
  height: calc(100% - 150px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  align-content: start;
  gap: 8px;
}
.console-entry {
  border-left: 3px solid #53636b;
  background: #0d1419;
  padding: 12px 14px;
}
.console-entry.status-running {
  border-color: var(--amber);
}
.console-entry.status-completed {
  border-color: var(--teal);
}
.console-entry.status-failed {
  border-color: #bd746d;
}
.console-entry header {
  color: var(--muted);
  font-size: 10px;
}
.console-entry header strong {
  color: #edf0ec;
  font-size: 12px;
}
.console-delete {
  width: 24px;
  height: 24px;
  margin-left: auto;
  border: 1px solid #46565e;
  background: transparent;
  color: #b7c2c0;
  cursor: pointer;
  font: 16px/1 Consolas, monospace;
}
.console-delete:hover,
.console-delete:focus-visible {
  border-color: #bd746d;
  color: #f0b4aa;
}
.console-entry pre {
  max-height: 280px;
  overflow: auto;
  margin: 12px 0 0;
  color: #aebbb9;
  font:
    11px/1.6 Consolas,
    monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.console-empty {
  border: 1px dashed var(--line);
  color: var(--muted);
  padding: 30px;
  text-align: center;
}
.console-notice {
  border-left: 3px solid var(--teal);
  background: #0d1419;
  color: #b9cbc5;
  margin: 0;
  padding: 10px 12px;
  font-size: 11px;
}
.translation-batch-language {
  flex: 0 0 auto;
  justify-content: flex-start;
  margin: 18px 0 14px;
}
.translation-batch-language label { color: var(--muted); }
.translation-batch-language select {
  min-width: 170px;
  min-height: 34px;
  border: 1px solid #3c4d55;
  border-radius: 4px;
  background: #0b1217;
  color: #eef1ed;
  padding: 7px 10px;
}
.settings-provider {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.settings-provider h3 {
  margin: 0 0 12px;
  color: #eef1ed;
  font-size: 14px;
}
.settings-provider h3 small { color: var(--teal); font-weight: 400; }
@media (max-height: 700px) and (min-width: 861px) {
  .analysis-view,
  .console-view {
    overflow-y: auto;
    padding-block: 18px 28px;
  }
  .analysis-shell { height: auto; }
  .analysis-story-list {
    flex: none;
    height: 340px;
  }
}
@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 220px minmax(380px, 1fr);
  }
}
@media (max-width: 900px) {
  .reader-column.compare-mode {
    display: block;
  }
  .reader-column.compare-mode > .workspace-translation-pane {
    border-top: 1px solid var(--paper-line);
    border-left: 0;
  }
}
@media (max-width: 860px) {
  :root {
    --topbar-height: 114px;
  }
  body {
    overflow: auto;
  }
  .app-shell {
    height: auto;
    min-height: 100vh;
  }
  .topbar {
    height: var(--topbar-height);
    padding: 8px 16px 0;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 48px;
    row-gap: 4px;
  }
  .main-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .main-tab {
    flex: 0 0 auto;
    height: 48px;
    white-space: nowrap;
  }
  .topbar-status {
    grid-column: 2;
    grid-row: 1;
  }
  .workspace,
  .analysis-view,
  .console-view {
    height: auto;
    min-height: calc(100vh - var(--topbar-height));
    overflow: visible;
  }
  .analysis-shell,
  .console-shell {
    height: auto;
  }
  .analysis-story-list {
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .analysis-story-group {
    height: min(52vh, 520px);
  }
  .console-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .console-log {
    height: min(60vh, 620px);
  }
}
@media (max-width: 720px) {
  .workspace {
    display: block;
  }
  .workspace > .library-panel {
    height: 240px;
    max-height: 240px;
  }
  .workspace > .library-panel .story-list {
    height: auto;
    flex: 1 1 auto;
  }
  .workspace > .reader-column {
    overflow: visible;
  }
  .workspace > .inspector-panel {
    max-height: 520px;
  }
  .reader-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 10px 22px;
  }
  .reader-modes,
  .reader-language {
    width: 100%;
  }
  .reader-language {
    justify-content: stretch;
    margin-left: 0;
  }
  #workspaceLanguage {
    flex: 1 1 0;
  }
}
@media (max-width: 420px) {
  .reader-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .reader-mode {
    min-width: 0;
    padding-inline: 5px;
  }
  .reader-language {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
}

html body,
html body * {
  font-family: "Roboto", sans-serif !important;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  src: url("/fonts/Roboto-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  src: url("/fonts/Roboto-Medium.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  src: url("/fonts/Roboto-Bold.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  font-style: italic;
  font-weight: 400;
  src: url("/fonts/Roboto-Italic.ttf") format("truetype");
  font-display: swap;
}

.settings-dialog {
  width: min(820px, calc(100vw - 32px));
  max-height: min(88vh, 760px);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #101820;
  color: #eef1ed;
  padding: 0;
  overflow: hidden;
}
.settings-dialog::backdrop { background: rgba(0, 0, 0, .66); }
.settings-form {
  display: grid;
  gap: 18px;
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 0 22px;
}
.settings-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -22px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: #101820;
}
.settings-heading h2 { margin: 6px 0 0; font-size: 23px; font-weight: 500; }
.settings-heading .icon-button { flex: 0 0 34px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.settings-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.settings-grid input:not([type='checkbox']) {
  width: 100%;
  min-width: 0;
  border: 1px solid #3c4d55;
  border-radius: 4px;
  background: #0b1217;
  color: #eef1ed;
  padding: 9px 10px;
}
.settings-grid input:focus-visible {
  border-color: var(--amber);
  outline: 2px solid rgba(229, 161, 75, 0.2);
}
.settings-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 -22px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
  background: #101820;
}
.settings-actions .text-button,
.settings-actions .action-button {
  min-height: 36px;
  border: 1px solid #495962;
  border-radius: 4px;
  padding: 8px 15px;
  font-size: 12px;
}
.settings-actions .text-button { color: #e6ece7; background: #17232b; }
.settings-actions .text-button:hover { background: #263640; border-color: #74858b; }
.settings-actions .action-primary { color: #11191f; background: var(--amber); border-color: var(--amber); }
.settings-actions .action-primary:hover { background: var(--amber-soft); border-color: var(--amber-soft); }
.settings-feedback { min-height: 16px; margin: 0; color: var(--teal); font-size: 11px; }
.settings-toggle { display: flex; align-items: center; gap: 8px; color: #d4dfdc; font-size: 12px; }
@media (max-width: 640px) { .settings-grid { grid-template-columns: 1fr; } }
