:root {
  --ink: #17211e;
  --muted: #77817d;
  --line: #dce3de;
  --paper: #f6f8f5;
  --panel: #ffffff;
  --mint: #d9f2df;
  --mint-strong: #8ed5a1;
  --accent: #226f47;
  --accent-soft: rgba(34, 111, 71, .1);
  --yellow: #f1c84b;
  --shadow: 0 20px 50px rgba(30, 63, 45, .08);
  /* Unified corner-radius scale */
  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Theme palettes — accent/mint recolor, ink/paper stay neutral. */
:root[data-theme='forest'] {
  --accent: #226f47; --accent-strong: #1a5c39; --accent-soft: rgba(34,111,71,.10);
  --mint: #d9f2df; --mint-strong: #8ed5a1;
  --paper-glow: rgba(210,239,218,.62);
  --shadow: 0 20px 50px rgba(30,63,45,.08);
}
:root[data-theme='ocean'] {
  --accent: #1d5f8a; --accent-strong: #174d70; --accent-soft: rgba(29,95,138,.10);
  --mint: #d9ecf5; --mint-strong: #8ec1dd;
  --paper-glow: rgba(212,234,246,.62);
  --shadow: 0 20px 50px rgba(22,63,90,.08);
}
:root[data-theme='ember'] {
  --accent: #a8502e; --accent-strong: #8a3f22; --accent-soft: rgba(168,80,46,.10);
  --mint: #f5e0d4; --mint-strong: #e0a583;
  --paper-glow: rgba(247,228,215,.62);
  --shadow: 0 20px 50px rgba(122,58,32,.08);
}
:root[data-theme='plum'] {
  --accent: #6d4a8a; --accent-strong: #58396f; --accent-soft: rgba(109,74,138,.10);
  --mint: #e7dcf2; --mint-strong: #b79ad6;
  --paper-glow: rgba(232,222,243,.62);
  --shadow: 0 20px 50px rgba(80,52,104,.08);
}
:root[data-theme='mono'] {
  --accent: #3c4043; --accent-strong: #2b2f31; --accent-soft: rgba(60,64,67,.10);
  --mint: #e3e5e7; --mint-strong: #aeb3b8;
  --paper-glow: rgba(226,228,230,.62);
  --shadow: 0 20px 50px rgba(40,44,48,.08);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; background: radial-gradient(circle at 85% 12%, var(--paper-glow, rgba(210,239,218,.62)), transparent 23%), var(--paper); }
.topbar { height: 82px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 5.2vw; background: rgba(246,248,245,.86); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--mint); border-radius: 50%; font-family: 'Fraunces', serif; font-size: 18px; }
.brand-copy { display: grid; gap: 1px; line-height: 1; }
.brand-copy strong { font-family: 'Fraunces', serif; font-size: 20px; letter-spacing: .04em; }
.brand-copy small, .eyebrow, .shortcut-label, .shortcut-caption, .language-label, .panel-index, .panel-footnote, .page-footer, .meta-line, .status-pill { font-family: 'DM Mono', monospace; }
.brand-copy small { font-size: 9px; color: var(--muted); letter-spacing: .14em; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.status-pill { color: var(--muted); font-size: 10px; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-strong); box-shadow: 0 0 0 4px var(--accent-soft); }
.icon-button { border: 1px solid var(--line); color: var(--ink); background: rgba(255,255,255,.6); border-radius: var(--radius-sm); width: 38px; height: 38px; display: grid; place-items: center; transition: .18s ease; }
.icon-button:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.icon-button svg, .swap-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.workspace { width: min(1440px, 89vw); margin: 0 auto; padding: 68px 0 25px; }
.hero-row { display: flex; justify-content: space-between; align-items: end; padding-bottom: 45px; }
.eyebrow { font-size: 10px; letter-spacing: .18em; color: var(--accent); margin: 0 0 18px; }
.eyebrow span { color: var(--yellow); padding: 0 5px; }
h1 { font-family: 'Fraunces', serif; font-size: clamp(44px, 5vw, 72px); line-height: .98; letter-spacing: -.055em; font-weight: 600; margin: 0; }
h1 em { font-style: normal; color: var(--accent); position: relative; }
h1 em::after { content: ''; position: absolute; height: 8px; left: 4px; right: 0; bottom: -6px; background: var(--yellow); z-index: -1; transform: rotate(-1.5deg); opacity: .82; }
.hero-subtitle { color: var(--muted); font-size: 14px; line-height: 1.7; max-width: 530px; margin: 21px 0 0; }
.shortcut-card { width: 174px; padding: 15px 17px; border: 1px solid var(--line); background: rgba(255,255,255,.55); border-radius: var(--radius-md); display: grid; gap: 4px; position: relative; }
.shortcut-card::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); position: absolute; top: -4px; right: 17px; }
.shortcut-label, .shortcut-caption { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.shortcut-key { font-weight: 600; font-size: 19px; letter-spacing: -.03em; }
.language-bar { min-height: 74px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 24px; }
.language-side { display: flex; align-items: center; gap: 16px; min-width: 245px; }
.target-side { margin-left: 25px; }
.language-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.language-select { border: 0; background: transparent; padding: 7px 0; color: var(--ink); display: flex; align-items: center; gap: 9px; font-weight: 600; }
.language-icon { width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-family: Georgia, serif; }
.chevron { color: var(--muted); font-size: 16px; margin-left: 4px; }
.detected-tag { color: var(--accent); background: var(--mint); border-radius: 20px; font-size: 10px; padding: 5px 9px; font-family: 'DM Mono', monospace; }
.swap-button { width: 32px; height: 32px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); transition: .2s; }
.swap-button:hover { background: var(--mint); border-color: var(--mint-strong); transform: rotate(180deg); }
.language-note { margin-left: auto; font-size: 11px; color: var(--muted); }
.sparkle { color: var(--yellow); font-size: 16px; padding-right: 4px; }
.translation-grid { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); margin-top: 28px; }
.translation-panel { min-height: 540px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.result-panel { background: var(--mint); border-color: var(--mint-strong); }
.panel-header { height: 73px; border-bottom: 1px solid var(--line); padding: 0 25px; display: flex; align-items: center; justify-content: space-between; }
.panel-title-wrap { display: flex; gap: 15px; align-items: center; }
.panel-index { color: var(--accent); font-size: 10px; }
h2 { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; margin: 0; letter-spacing: -.03em; }
.text-button { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 5px; }
.text-button:hover { color: var(--accent); }
.small { width: 31px; height: 31px; background: transparent; }
.small svg { width: 15px; height: 15px; }
.input-wrap, .output-wrap { flex: 1; position: relative; min-height: 0; }
textarea { border: 0; outline: 0; resize: none; }
#sourceText { width: 100%; height: 100%; min-height: 390px; padding: 28px 27px 50px; color: var(--ink); background: transparent; font-family: 'Fraunces', Georgia, serif; font-size: 22px; line-height: 1.7; }
#sourceText::placeholder { color: #b9c1bc; }
.input-hint { position: absolute; left: 28px; bottom: 18px; font-size: 10px; color: #a4ada8; font-family: 'DM Mono', monospace; pointer-events: none; }
.output-content { padding: 28px 27px 40px; color: var(--ink); font-family: 'Fraunces', Georgia, serif; font-size: 22px; line-height: 1.7; white-space: pre-wrap; overflow-y: auto; height: 100%; max-height: 445px; }
.empty-state { height: 100%; min-height: 390px; display: flex; align-items: center; justify-content: center; flex-direction: column; color: #a4b3a6; text-align: center; }
.empty-mark { width: 53px; height: 53px; border: 1px solid var(--mint-strong); color: var(--accent); display: grid; place-items: center; font-family: 'Fraunces', serif; font-size: 25px; margin-bottom: 18px; transform: rotate(-4deg); }
.empty-state p { margin: 0; font-family: 'Fraunces', serif; font-size: 18px; color: var(--accent); }
.empty-state span { margin-top: 7px; font-size: 11px; }
.panel-footer { padding: 14px 27px 17px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }
.char-count { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; }
.panel-footnote { color: #a8b2ac; font-size: 9px; }
.copy-feedback { color: var(--accent); font-family: 'DM Mono', monospace; font-size: 10px; }
.grid-divider { display: flex; justify-content: center; position: relative; }
.grid-divider span { width: 1px; background: var(--line); height: 100%; }
.action-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; padding: 24px 0 30px; }
.action-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; }
.action-meta-right { justify-content: end; }
.meta-line { height: 1px; background: var(--line); width: 55px; }
.translate-button {
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  padding: 15px 20px;
  min-width: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 -2px 4px rgba(0, 0, 0, .12),
    0 4px 10px var(--accent-soft),
    0 10px 24px var(--accent-soft);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
}
.translate-button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -2px 4px rgba(0, 0, 0, .12),
    0 8px 18px var(--accent-soft),
    0 16px 34px var(--accent-soft);
}
.translate-button:active {
  transform: translateY(0);
  filter: brightness(.97);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 2px 5px rgba(0, 0, 0, .18),
    0 2px 6px var(--accent-soft);
}
.translate-button.is-loading { opacity: .82; pointer-events: none; }
.button-icon { font-size: 18px; line-height: 1; }
.button-key { opacity: .55; font-family: 'DM Mono', monospace; font-size: 9px; margin-left: 3px; }
.page-footer { border-top: 1px solid var(--line); padding-top: 17px; color: #a1aba5; font-size: 9px; letter-spacing: .08em; display: flex; justify-content: space-between; }
.dropdown-menu { position: fixed; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(23,33,30,.14); padding: 5px; min-width: 150px; }
.dropdown-menu button { width: 100%; padding: 9px 12px; border: 0; background: transparent; text-align: left; color: var(--ink); font-size: 12px; border-radius: var(--radius-sm); transition: background .12s ease; }
.dropdown-menu button:hover { background: var(--mint); }
.modal-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(23,33,30,.32); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; }
.modal-backdrop:not([hidden]) { animation: fadeIn .18s ease; }
.modal-backdrop:not([hidden]) .config-modal { animation: modalIn .24s cubic-bezier(.34,1.4,.64,1); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.config-modal { width: min(570px, 100%); max-height: 90vh; overflow-y: auto; background: var(--paper); border: 1px solid var(--mint-strong); border-radius: var(--radius-xl); box-shadow: 0 30px 90px rgba(23,33,30,.28), 0 4px 16px rgba(23,33,30,.12); padding: 31px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; }
.modal-header .eyebrow { margin-bottom: 8px; }
.modal-header h2 { font-size: 28px; }
.close-button { border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--muted); padding: 6px; border-radius: var(--radius-sm); transition: all .15s ease; width: 34px; height: 34px; display: grid; place-items: center; }
.close-button:hover { color: var(--accent); background: var(--accent-soft); }
.modal-intro { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 16px 0 24px; }
#configForm { display: grid; gap: 15px; }
.form-grid { display: grid; gap: 14px; }
.two-col { grid-template-columns: 1fr 1fr; }
label { color: var(--ink); font-size: 11px; font-family: 'DM Mono', monospace; display: grid; gap: 7px; }
input, select, #systemPrompt { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none; padding: 11px 12px; color: var(--ink); font-family: 'DM Sans', sans-serif; font-size: 13px; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, #systemPrompt:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#systemPrompt { font-family: 'DM Sans', sans-serif; line-height: 1.5; resize: vertical; }
.secret-input { position: relative; }
.secret-input input { padding-right: 60px; }
.secret-input button { position: absolute; right: 6px; top: 6px; border: 0; background: transparent; color: var(--accent); font-family: 'DM Mono', monospace; font-size: 10px; padding: 5px 8px; border-radius: var(--radius-xs); transition: background .12s ease; }
.secret-input button:hover { background: var(--accent-soft); }
.form-tip { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); background: var(--mint); padding: 10px 12px; font-size: 10px; line-height: 1.5; border-radius: var(--radius-sm); }
.form-tip span { display: grid; place-items: center; width: 14px; height: 14px; border: 1px solid var(--mint-strong); border-radius: 50%; color: var(--accent); font-family: Georgia, serif; }
.form-tip p { margin: 0; } code { font-size: 9px; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 7px; }
.secondary-button, .primary-button { border: 1px solid var(--line); padding: 11px 18px; font-size: 12px; border-radius: var(--radius-sm); cursor: pointer; transition: all .15s ease; }
.secondary-button { background: transparent; color: var(--muted); }
.secondary-button:hover { border-color: var(--accent); color: var(--accent); }
.primary-button { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 12px var(--accent-soft); text-shadow: 0 1px 1px rgba(0,0,0,.15); }
.primary-button:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 16px var(--accent-soft); }
[hidden] { display: none !important; }
@media (max-width: 850px) { .workspace { width: 92vw; padding-top: 42px; } .hero-row { display: block; } .shortcut-card { margin-top: 25px; } .language-bar { flex-wrap: wrap; padding: 15px 0; gap: 10px 18px; } .language-note { width: 100%; margin-left: 0; } .target-side { margin-left: 0; } .translation-grid { grid-template-columns: 1fr; gap: 16px; } .grid-divider { display: none; } .translation-panel { min-height: 430px; } .action-row { grid-template-columns: 1fr; gap: 12px; } .action-meta, .action-meta-right { justify-content: center; } .translate-button { justify-self: center; } .page-footer { gap: 10px; flex-wrap: wrap; } }
@media (max-width: 560px) { .topbar { padding: 0 4vw; } .status-pill { display: none; } h1 { font-size: 47px; } .language-side { min-width: unset; width: calc(50% - 10px); gap: 8px; flex-wrap: wrap; } .swap-button { order: 2; } .target-side { order: 1; } #sourceText, .output-content { font-size: 18px; padding-left: 19px; padding-right: 19px; } .panel-header, .panel-footer { padding-left: 19px; padding-right: 19px; } .panel-footnote { display: none; } .two-col { grid-template-columns: 1fr; } .config-modal { padding: 24px 19px; } }

/* Workspace-first layout: maximize the visible source and translation area. */
@media (min-width: 851px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .app-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .topbar {
    position: relative;
    flex: 0 0 60px;
    height: 60px;
    padding: 0 22px;
  }

  .brand-mark {
    width: 29px;
    height: 29px;
    font-size: 15px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    display: none;
  }

  .config-button {
    width: 34px;
    height: 34px;
  }

  .workspace {
    width: 100%;
    max-width: none;
    height: calc(100vh - 60px);
    min-height: 0;
    margin: 0;
    padding: 8px 16px 10px;
    display: flex;
    flex-direction: column;
  }

  .hero-row,
  .page-footer,
  .language-note,
  .panel-footnote,
  .input-hint {
    display: none;
  }

  .language-bar {
    flex: 0 0 48px;
    min-height: 48px;
    gap: 16px;
    padding: 0 14px;
    background: rgba(255, 255, 255, .52);
    border: 1px solid var(--line);
  }

  .language-side {
    min-width: 230px;
    gap: 11px;
  }

  .target-side {
    margin-left: 4px;
  }

  .language-icon {
    width: 22px;
    height: 22px;
  }

  .language-select {
    padding: 3px 0;
  }

  .detected-tag {
    padding: 4px 8px;
  }

  .swap-button {
    width: 29px;
    height: 29px;
  }

  .translation-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 9px minmax(0, 1fr);
    margin-top: 8px;
  }

  .translation-panel {
    min-height: 0;
    height: 100%;
    box-shadow: 0 8px 24px rgba(30, 63, 45, .055);
    overflow: hidden;
  }

  .panel-header {
    flex: 0 0 46px;
    height: 46px;
    padding: 0 18px;
  }

  .panel-title-wrap {
    gap: 10px;
  }

  .panel-header h2 {
    font-size: 17px;
  }

  .input-wrap,
  .output-wrap {
    min-height: 0;
    overflow: hidden;
  }

  #sourceText {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 20px;
    font-size: 18px;
    line-height: 1.58;
  }

  .output-content {
    width: 100%;
    height: 100%;
    max-height: none;
    overflow-y: auto;
    padding: 18px 20px;
    font-size: 18px;
    line-height: 1.58;
  }

  .empty-state {
    min-height: 0;
  }

  .empty-mark {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    font-size: 21px;
  }

  .panel-footer {
    flex: 0 0 31px;
    min-height: 31px;
    padding: 0 18px;
  }

  .grid-divider span {
    background: transparent;
  }

  .action-row {
    flex: 0 0 52px;
    min-height: 52px;
    gap: 16px;
    padding: 7px 0 0;
  }

  .translate-button {
    min-width: 178px;
    padding: 11px 18px;
  }

  .meta-line {
    width: 32px;
  }
}

/* Primary action lives in the top bar, leaving the full remaining height for text. */
.topbar-model {
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  white-space: nowrap;
}

.top-translate-button {
  min-width: 154px;
  padding: 10px 15px;
}

@media (min-width: 851px) {
  .action-row {
    display: none;
  }

  .translation-grid {
    margin-bottom: 0;
  }

  .topbar-actions {
    gap: 12px;
  }

  .top-translate-button {
    min-width: 154px;
    padding: 9px 15px;
  }
}

@media (max-width: 850px) {
  .topbar-model {
    display: none;
  }

  .top-translate-button {
    min-width: 128px;
    padding: 9px 11px;
  }

  .top-translate-button .button-key {
    display: none;
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 8px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .top-translate-button {
    min-width: 42px;
    width: 42px;
    padding: 9px;
  }

  .top-translate-button span:nth-child(2) {
    display: none;
  }
}

/* Translation action moved to the top bar; see .top-translate-button above. */


/* ── Topbar: language controls live in the header ── */
.topbar {
  gap: 18px;
}

.topbar-languages {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  margin-left: 14px;
}

.topbar-languages .language-select {
  padding: 4px 0;
  font-size: 12px;
  white-space: nowrap;
}

.topbar-languages .language-icon {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

.topbar-languages .detected-tag {
  margin-left: 4px;
  white-space: nowrap;
}

@media (min-width: 851px) {
  .topbar {
    flex: 0 0 60px;
    height: 60px;
  }
  .workspace {
    height: calc(100vh - 60px);
  }
  .topbar-languages .detected-tag {
    font-size: 9px;
  }
}

@media (max-width: 850px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 60px;
    padding: 8px 4vw;
    gap: 8px 14px;
  }
  .topbar-languages {
    order: 3;
    flex-basis: 100%;
    margin: 4px 0 2px;
  }
  .workspace {
    height: auto;
    min-height: calc(100vh - 110px);
  }
}

@media (max-width: 560px) {
  .topbar-languages {
    gap: 6px;
  }
  .topbar-languages .detected-tag {
    display: none;
  }
}

/* ── Theme swatches in settings ── */
.theme-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 2px;
}

.theme-row-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--ink);
}

.theme-swatches {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--swatch, var(--accent));
  cursor: pointer;
  padding: 0;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  outline: none;
}

.theme-swatch:hover {
  transform: scale(1.12);
}

.theme-swatch.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--swatch, var(--accent));
  transform: scale(1.08);
}

/* Focus ring for keyboard users */
.theme-swatch:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 5px var(--accent);
}
