/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  background: #f4f1eb;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 800px;
}

/* ── Header ─────────────────────────────────────────────────── */
header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f3460;
  letter-spacing: -0.5px;
}

.subtitle {
  margin-top: 6px;
  font-size: 0.95rem;
  color: #666;
}

/* ── Input section ──────────────────────────────────────────── */
.input-section {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a2e;
}

.hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: #999;
}

textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1.2rem;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  transition: border-color 0.2s;
  line-height: 1.6;
  color: #1a1a2e;
}

textarea:focus {
  outline: none;
  border-color: #0f3460;
}

textarea::placeholder {
  color: #bbb;
}

input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 1rem;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.2s;
  color: #1a1a2e;
}

input[type="text"]:focus {
  outline: none;
  border-color: #0f3460;
}

input[type="text"]::placeholder {
  color: #bbb;
}

/* ── Sentence display (post-analysis) ───────────────────────── */
.sentence-display {
  min-height: 72px;
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  font-size: 1.2rem;
  line-height: 2.4;
  word-break: break-all;
  white-space: pre-wrap;
}

/* ── Inline token spans ─────────────────────────────────────── */
.token {
  position: relative;
  display: inline-block;
  padding: 1px 2px;
  border-radius: 4px;
  cursor: default;
  transition: background 0.15s;
}

.token:hover {
  background: #dbeafe;
}

/* Reading tooltip shown above token on hover */
.token[data-reading]:hover::before {
  content: attr(data-reading);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f3460;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

/* PoS badge shown below token on hover */
.token[data-pos]:hover::after {
  content: attr(data-pos);
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #f0f0f0;
  color: #555;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

/* Punctuation tokens: no highlight, no tooltip */
.token--punct {
  cursor: text;
}
.token--punct:hover { background: none; }
.token--punct:hover::before,
.token--punct:hover::after { display: none; }

/* Token briefly flashes green when added to vocab */
.token--added {
  background: #bbf7d0 !important;
  transition: background 0.1s;
}

/* ── Button row ─────────────────────────────────────────────── */
.btn-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  padding: 10px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  background: #0f3460;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-primary:hover:not(:disabled) { background: #16213e; }

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  background: transparent;
  color: #0f3460;
  border: 1.5px solid #0f3460;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover { background: #eef2ff; }

/* ── Utility ────────────────────────────────────────────────── */
.hidden { display: none; }

.error { color: #b91c1c; font-size: 0.9rem; }

/* ── Vocabulary list ────────────────────────────────────────── */
.vocab-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}

.vocab-item {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #e8f0fe;
  color: #1a4db8;
  border-radius: 20px;
  padding: 4px 6px 4px 12px;
  font-size: 1rem;
  font-weight: 500;
}

.vocab-input-row {
  display: flex;
  gap: 8px;
}

.vocab-input-row input {
  flex: 1;
}

/* ── Icon buttons (+ / -) ───────────────────────────────────── */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  line-height: 1;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-icon { background: #0f3460; color: #fff; padding: 0 14px; width: auto; border-radius: 8px; font-size: 0.9rem; font-weight: 600; }
.btn-icon:hover { background: #16213e; }

.btn-icon--remove { background: transparent; color: #1a4db8; width: 24px; height: 24px; padding: 0; font-size: 1rem; border-radius: 50%; }
.btn-icon--remove:hover { background: #c7d8fc; }

/* ── Generate button ────────────────────────────────────────── */
.btn-generate {
  padding: 11px 32px;
  font-size: 1rem;
  font-weight: 700;
  background: #16213e;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-generate:hover:not(:disabled) { background: #0f3460; }
.btn-generate:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.btn-generate--loading .btn-spinner { display: block; }
.btn-generate--loading .btn-label   { opacity: 0.85; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Result section ─────────────────────────────────────────── */
.result-header { margin-bottom: 14px; }

.result-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.result-badge--success { background: #dcfce7; color: #166534; }
.result-badge--warn    { background: #fef9c3; color: #854d0e; }

.result-sentence {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0f3460;
  white-space: pre-wrap;
}

.result-translation {
  flex: 1;
  font-style: italic;
  color: #555;
  white-space: pre-wrap;
}

.result-section {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0ede6;
}

.result-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
  margin-bottom: 6px;
}

.result-construction {
  margin-top: 6px;
}

/* Plain text fallback (no jp-grammar diagram inside) */
.result-construction:not(:has(.jp-grammar)) {
  display: inline-block;
  background: #e8f0fe;
  color: #1a4db8;
  font-family: monospace;
  font-size: 0.9rem;
  padding: 3px 10px;
  border-radius: 4px;
}

/* Loading shimmer while waiting for the diagram — kept for future use */
/* ── Grammar diagram (jp-* component system) ─────────────────── */
:root {
  --jp-font: "Hiragino Sans", "Noto Sans JP", sans-serif;
  --jp-size: 20px;
  --pill-bg-1: #d9d9d9;
  --pill-bg-2: #bfbfbf;
  --pill-radius: 999px;
  --pill-py: 0.12em;
  --pill-px: 0.42em;
  --gap-xs: 0.2em;
  --gap-sm: 0.35em;
  --gap-md: 0.6em;
  --bracket-width: 0.8em;
  --bracket-stroke: 0.09em;
  --bracket-arm: 0.55em;
  --strike-thickness: 0.09em;
}
.jp-grammar {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-md);
  font-family: var(--jp-font), sans-serif;
  font-size: var(--jp-size);
  color: #111;
  line-height: 1.15;
  white-space: nowrap;
  margin-block: 0.3em;
  flex-wrap: wrap;
}
.jp-inline, .jp-row {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-sm);
}
.jp-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap-sm);
}
.jp-stack-compact { gap: 0.18em; }
.jp-pill {
  display: inline-block;
  padding: var(--pill-py) var(--pill-px);
  border-radius: var(--pill-radius);
  background: linear-gradient(var(--pill-bg-1), var(--pill-bg-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  font-weight: 700;
  line-height: 1;
}
.jp-op {
  display: inline-block;
  margin-inline: var(--gap-xs);
}
.jp-bracket-left, .jp-bracket-right {
  position: relative;
  display: inline-block;
  width: var(--bracket-width);
  min-height: 2.8em;
  align-self: center;
  flex: 0 0 auto;
}
.jp-bracket-left::before, .jp-bracket-left::after,
.jp-bracket-right::before, .jp-bracket-right::after {
  content: "";
  position: absolute;
  width: var(--bracket-arm);
  height: var(--bracket-stroke);
  background: currentColor;
  border-radius: 999px;
}
.jp-bracket-left::before  { top: 0;    left: 0; }
.jp-bracket-left::after   { bottom: 0; left: 0; }
.jp-bracket-right::before { top: 0;    right: 0; }
.jp-bracket-right::after  { bottom: 0; right: 0; }
.jp-bracket-left  { border-left:  var(--bracket-stroke) solid currentColor; }
.jp-bracket-right { border-right: var(--bracket-stroke) solid currentColor; }
.jp-bracket-xs { min-height: 1.6em; }
.jp-bracket-sm { min-height: 2.2em; }
.jp-bracket-md { min-height: 3em; }
.jp-bracket-lg { min-height: 4em; }
.jp-strike {
  position: relative;
  display: inline-block;
}
.jp-strike::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  top: 52%;
  height: var(--strike-thickness);
  background: currentColor;
  transform: rotate(-6deg);
  transform-origin: center;
  border-radius: 999px;
}

.result-vocab { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.result-vocab li { font-size: 0.95rem; }
.result-reading { color: #888; font-size: 0.85rem; }
.result-pos {
  font-size: 0.72em;
  background: #f0f0f0;
  color: #666;
  padding: 1px 5px;
  border-radius: 3px;
  margin: 0 2px;
}

/* ── Checkbox ───────────────────────────────────────────────── */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #0f3460;
}

input[type="text"]:disabled {
  background: #f5f5f5;
  color: #bbb;
  border-color: #eee;
  cursor: not-allowed;
}

.btn-generate--success {
  background: #166534 !important;
  cursor: default;
}

.result-translation-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.result-inline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.result-inline-row .result-label {
  margin-bottom: 0;
  min-width: 80px;
}

.result-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.result-section-header .result-label {
  margin-bottom: 0;
  flex: 1;
}

.grammar-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Grammar HTML split editor ───────────────────────────────── */
.grammar-html-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.grammar-html-editor__code,
.grammar-html-editor__preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.grammar-html-editor__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #aaa;
}

.grammar-html-editor__textarea {
  flex: 1;
  font-family: ui-monospace, "Cascadia Code", "Fira Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 6px 8px;
  border: 1px solid #a5b4fc;
  border-radius: 6px;
  background: #f8f9ff;
  color: #334155;
  resize: vertical;
  min-height: 100px;
  width: 100%;
  box-sizing: border-box;
}

.grammar-html-editor__textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.grammar-html-editor__preview-content {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fafafa;
  padding: 8px 10px;
  min-height: 100px;
  overflow-x: auto;
}

@media (max-width: 560px) {
  .grammar-html-editor {
    grid-template-columns: 1fr;
  }
}

.result-vocab-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vocab-item-display {
  flex: 1;
}

.result-edit-input {
  flex: 1;
  font-size: 0.95rem;
  padding: 4px 8px;
  border: 1px solid #a5b4fc;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: block;
  width: 100%;
  margin-bottom: 4px;
}

.result-edit-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.result-edit-input--sm {
  width: auto;
  flex: 0 0 140px;
  display: inline-block;
  margin-bottom: 0;
  margin-right: 4px;
}

.result-translation-input {
  flex: 1;
  font-size: 1rem;
  font-style: italic;
  padding: 4px 8px;
  border: 1px solid #a5b4fc;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.result-translation-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.btn-inline-edit {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.45;
  border-radius: 4px;
  transition: opacity 0.15s, background 0.15s;
}

.btn-inline-edit:hover {
  opacity: 1;
  background: #f0f0f0;
}

.btn-inline-confirm {
  flex-shrink: 0;
  background: #0f3460;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s;
}

.btn-inline-confirm:hover {
  background: #1a4db8;
}

.btn-inline-cancel {
  flex-shrink: 0;
  background: none;
  color: #94a3b8;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.btn-inline-cancel:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.edit-btn-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-inline-delete {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 1rem;
  color: #cbd5e1;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}

.btn-inline-delete:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* ── Furigana in card preview ───────────────────────────────── */
.result-sentence ruby { ruby-position: over; }
.result-sentence rt {
  font-size: 0.55em;
  color: #888;
  letter-spacing: 0.02em;
}

/* ── Auth ────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.auth-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 44px;
  background: #0f3460;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 24px;
  font-size: 0.875rem;
  z-index: 100;
}

.auth-bar .auth-email { opacity: 0.8; }

.auth-bar .btn-secondary {
  font-size: 0.8rem;
  padding: 4px 12px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}

.auth-bar .btn-secondary:hover { background: rgba(255,255,255,0.15); }

/* Push app content below auth bar when bar is visible */
.auth-bar:not(.hidden) ~ #app-content { padding-top: 44px; }

#app-content {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  background: #fff;
  border-radius: 14px;
  padding: 48px 40px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-card h1 { font-size: 1.8rem; font-weight: 800; color: #0f3460; }
.auth-card p  { color: #666; font-size: 0.95rem; }
.btn-sm { font-size: 0.8rem; padding: 4px 12px; }

/* Provider login buttons */
.login-providers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
}

.login-provider-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  color: #3c4043;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.login-provider-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.provider-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Auth bar icon button (config) ───────────────────────────── */
.auth-bar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-bar-icon-btn:hover { background: rgba(255,255,255,0.15); }
.auth-bar-icon-btn--active { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.7); }

/* ── Config page layout ──────────────────────────────────────── */
#config-page {
  display: flex;
  flex-direction: column;
  min-height: 60vh;
}
.config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 1.5rem;
}
.config-header h1 { margin: 0; }
.config-close-btn {
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  color: #555;
  line-height: 1;
}
.config-close-btn:hover { background: #f0f0f0; color: #222; }
.config-main { flex: 1; }
.config-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  margin-top: 1.5rem;
}

/* ── Config page fields ──────────────────────────────────────── */
.config-section { margin-bottom: 2rem; }
.config-section h2 { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #666; margin-bottom: 1rem; }
.form-hint { display: block; margin-top: .3rem; font-size: .82rem; color: #888; }

.form-group { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1.2rem; }
.form-group label { font-weight: 500; font-size: .9rem; }
.form-control {
  padding: .5rem .75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}
.form-control:focus { outline: none; border-color: #4285f4; box-shadow: 0 0 0 2px rgba(66,133,244,.25); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.modal h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.modal p  { margin: 0 0 1.2rem; line-height: 1.6; color: #444; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.modal-error {
  background: #fdecea;
  color: #c62828;
  border: 1px solid #f5c6c6;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ── Model setup button (config page) ───────────────────────── */
.btn-model-setup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #4285f4;
  background: #4285f4;
  color: #fff;
  transition: background 0.15s, opacity 0.15s;
}
.btn-model-setup:hover:not(:disabled) { background: #306bc4; border-color: #306bc4; }
.btn-model-setup:disabled { cursor: not-allowed; }

/* State: ok (note type exists) */
.btn-model-setup--ok {
  background: #e6f4ea;
  border-color: #34a853;
  color: #1e7e34;
  opacity: 1;
}

/* State: unavailable */
.btn-model-setup--warn {
  background: #fff8e1;
  border-color: #f9a825;
  color: #7a5a00;
  opacity: 1;
}

/* ── Build version badge ─────────────────────────────────────────────────── */
.build-version {
  position: fixed;
  bottom: 8px;
  right: 12px;
  font-size: 11px;
  color: #aaa;
  font-family: monospace;
  pointer-events: none;
  user-select: none;
  z-index: 9999;
}
