.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.theme-toggle {
  border: 1px solid #cbd5c9;
  border-radius: 999px;
  background: #fff;
  color: #365541;
  padding: 9px 15px;
  font: 700 12px 'DM Sans', Arial, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.theme-toggle:hover { background: #eaf0e9; }
.theme-toggle:focus-visible { outline: 3px solid #c77d53; outline-offset: 3px; }
.output-actions { display: flex; align-items: center; gap: 8px; }
.source-actions { display: flex; align-items: center; gap: 8px; }
.source-panel .panel-footer { flex-wrap: wrap; }
.source-actions { margin-left: auto; }
.record-button {
  border: 1px solid #bb6b5c;
  border-radius: 999px;
  background: #fff8f5;
  color: #963f31;
  padding: 8px 11px;
  font: 700 12px 'DM Sans', Arial, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.record-button::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #ca5147; }
.record-button:hover { background: #fbeae4; }
.record-button:focus-visible { outline: 3px solid #c77d53; outline-offset: 2px; }
.record-button[aria-pressed='true'] { background: #ae4439; color: #fff; }
.record-button[aria-pressed='true']::before { background: #fff; }
.record-button:disabled { opacity: .65; cursor: wait; }

:root[data-theme='dark'] {
  color-scheme: dark;
  color: #e6eee7;
  background: #151d19;
}

[data-theme='dark'] .site-header,
[data-theme='dark'] footer { border-color: #34453a; }
[data-theme='dark'] .brand { color: #e6eee7; }
[data-theme='dark'] .brand-mark { background: #77a986; color: #102017; }
[data-theme='dark'] .header-note,
[data-theme='dark'] .intro p,
[data-theme='dark'] .auth-section p,
[data-theme='dark'] footer { color: #afc0b1; }
[data-theme='dark'] .eyebrow,
[data-theme='dark'] .section-kicker,
[data-theme='dark'] .account-bar { color: #b2cbb2; }
[data-theme='dark'] .intro h1 em { color: #e8ae83; }

[data-theme='dark'] .translator,
[data-theme='dark'] .auth-section,
[data-theme='dark'] .history-card {
  background: #202b24;
  border-color: #3c5042;
  box-shadow: none;
}

[data-theme='dark'] .language-bar,
[data-theme='dark'] .source-panel,
[data-theme='dark'] .action-row { border-color: #3c5042; }
[data-theme='dark'] .output-panel { background: #1b261f; }
[data-theme='dark'] textarea,
[data-theme='dark'] .translation-output,
[data-theme='dark'] .sign-in-form input { color: #e6eee7; }
[data-theme='dark'] textarea::placeholder,
[data-theme='dark'] .translation-output.empty { color: #9bb09e; }
[data-theme='dark'] .panel-footer,
[data-theme='dark'] .hint,
[data-theme='dark'] .history-empty,
[data-theme='dark'] .history-card .result { color: #afc0b1; }
[data-theme='dark'] .history-card .pair { color: #a8d4ae; }
[data-theme='dark'] .text-button { color: #b2dfb8; }
[data-theme='dark'] .text-button:disabled { color: #8c9c8e; }
[data-theme='dark'] .swap-button,
[data-theme='dark'] .theme-toggle,
[data-theme='dark'] .sign-in-form input {
  background: #26372c;
  border-color: #53705a;
  color: #e6eee7;
}
[data-theme='dark'] .swap-button:hover,
[data-theme='dark'] .theme-toggle:hover { background: #344b3b; }
[data-theme='dark'] .translate-button { background: #8fc59c; color: #122218; }
[data-theme='dark'] .translate-button:hover { background: #afe0b8; }
[data-theme='dark'] .history-card:hover { border-color: #8fc59c; box-shadow: 0 6px 22px #0003; }
[data-theme='dark'] .message { color: #ffb59b; }
[data-theme='dark'] .record-button { background: #362a28; color: #ffb8a8; border-color: #b5796b; }
[data-theme='dark'] .record-button[aria-pressed='true'] { background: #b85a4c; color: #fff; }

@media (max-width: 700px) {
  .header-actions { gap: 0; }
  .theme-toggle { padding: 8px 12px; }
}
