:root {
  --primary: oklch(0.65 0.2 47);
  --primary-foreground: oklch(0.95 0 0);
  --background: oklch(0.1 0 0);
  --foreground: oklch(0.95 0 0);
  --card: oklch(0.12 0.01 0);
  --secondary: oklch(0.2 0.01 0);
  --muted-foreground: oklch(0.7 0 0);
  --border: oklch(0.2 0.01 0);
  --input: oklch(0.15 0.01 0);
  --yellow: #eab308;
  --yellow-light: #facc15;
  --green: #4ade80;
  --red: #f87171;
  --radius: 0.5rem;
  --radius-sm: 0.25rem;
  --radius-lg: 0.75rem;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  min-height: 100vh;
}

body {
  font-size: 14px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 700;
}

button, [role="button"], select, input[type="checkbox"], input[type="radio"], a {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.hidden { display: none !important; }

.font-mono { font-family: var(--font-mono); }

.grid-bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding-left: 2rem; padding-right: 2rem; }
}

.divider {
  border-top: 1px solid var(--border);
}

.divider-gold {
  border-top: 2px solid var(--primary);
}

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--card) 50%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.site-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.rate-status { text-align: right; flex-shrink: 0; }
.rate-status-time { font-size: 0.75rem; color: var(--muted-foreground); }
.rate-status-source { font-size: 0.75rem; margin-top: 0.125rem; }
.rate-status-source.live { color: var(--primary); }
.rate-status-source.manual { color: var(--yellow); }

@media (min-width: 768px) {
  .site-title { font-size: 1.5rem; }
  .header-inner { padding-top: 1rem; padding-bottom: 1rem; }
}

/* ===== Layout ===== */
.main-grid {
  padding-top: 1rem;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .main-grid { padding-top: 2rem; padding-bottom: 2rem; gap: 2rem; }
}

@media (min-width: 1024px) {
  .main-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
  }
}

.panel-col { width: 100%; }
.content-col { display: flex; flex-direction: column; gap: 1.5rem; }

@media (min-width: 768px) {
  .content-col { gap: 2.5rem; }
}

/* ===== Panel ===== */
.panel-mobile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .panel-mobile { display: none; }
}

.panel-mobile-summary {
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.panel-mobile-summary::-webkit-details-marker { display: none; }
.panel-mobile-meta { font-size: 0.75rem; color: var(--muted-foreground); font-weight: 400; }

.panel-mobile-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}

.panel-desktop {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 6rem;
}

@media (min-width: 1024px) {
  .panel-desktop { display: block; }
}

.panel-block { display: flex; flex-direction: column; gap: 1.5rem; }
.panel-title { font-size: 1.5rem; }

.panel-section { display: flex; flex-direction: column; gap: 1rem; }
.panel-section-title { font-size: 0.875rem; font-weight: 500; }

.field-block { display: block; }
.field-sublabel { display: block; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); margin-bottom: 0.5rem; }
.field-sublabel.small { font-size: 0.75rem; margin-bottom: 0.25rem; }
.field-label-md { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }

.discount-wrap {
  background: color-mix(in oklch, var(--secondary) 30%, transparent);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.input-with-suffix { position: relative; }
.input-suffix {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  user-select: none;
}

.rate-diff {
  color: var(--primary);
  font-size: 1.125rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding-right: 2rem;
}

.auto-fetch-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary) 20%, transparent);
  font-size: 0.75rem;
  color: var(--primary);
}

.pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.panel-last-updated {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: center;
}

/* ===== Inputs ===== */
.text-input {
  width: 100%;
  height: 2.25rem;
  padding: 0.25rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 50%, transparent);
}

.panel-input {
  background: var(--input);
}

.text-input.has-prefix { padding-left: 1.75rem; }
.input-with-prefix { position: relative; }
.input-prefix {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  user-select: none;
}

#amount-input.text-input {
  height: 3rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  background: var(--input);
  border-radius: var(--radius);
}

.rate-input {
  height: 3rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  background: var(--input);
  border-color: color-mix(in oklch, var(--yellow) 30%, transparent);
}

.rate-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--yellow) 50%, transparent);
}

/* ===== Block / Sections ===== */
.block { display: flex; flex-direction: column; gap: 1rem; }
.block-title { font-size: 1.25rem; }

@media (min-width: 768px) {
  .block-title { font-size: 1.5rem; }
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .input-grid { grid-template-columns: 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: 0.5rem; }

.field-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Quick amount buttons */
.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.quick-btn {
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.quick-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.quick-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.quick-btn.clear-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Rate options */
.rate-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.toggle-switch {
  position: relative;
  width: 2.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: var(--border);
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-switch.on { background: var(--yellow); }

.toggle-dot {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

.toggle-switch.on .toggle-dot { transform: translateX(1rem); }

.toggle-text { font-size: 0.75rem; color: var(--muted-foreground); }
.toggle-rate { font-size: 0.75rem; font-family: var(--font-mono); font-weight: 700; color: var(--foreground); }

.link-clear {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  padding: 0.125rem 0.25rem;
}

.link-clear:hover { color: var(--red); }

.rate-compare {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-sm);
  background: color-mix(in oklch, var(--yellow) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--yellow) 20%, transparent);
}

.rate-compare-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--yellow-light);
  flex-shrink: 0;
}

.rate-compare-text {
  font-size: 0.75rem;
  color: var(--yellow-light);
  font-family: var(--font-mono);
}

/* ===== Result card ===== */
.result-card {
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklch, var(--primary) 40%, transparent);
  background: var(--card);
  overflow: hidden;
}

.result-header {
  padding: 0.75rem 1rem;
  background: color-mix(in oklch, var(--primary) 10%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--primary) 20%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .result-header { padding: 0.75rem 1.5rem; }
}

.result-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
}

@media (min-width: 768px) {
  .result-title { font-size: 1.125rem; }
}

.result-fee-note { font-size: 0.75rem; color: var(--muted-foreground); }

.result-cols {
  display: grid;
  grid-template-columns: 1fr;
}

.result-cols.cols-2 { grid-template-columns: 1fr; }
.result-cols.cols-3 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .result-cols.cols-2 { grid-template-columns: 1fr 1fr; }
  .result-cols.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.result-col {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .result-col { border-bottom: none; border-right: 1px solid var(--border); }
  .result-col:last-child { border-right: none; }
  .result-col { padding: 1.25rem; }
}

.result-col.custom { background: color-mix(in oklch, var(--yellow) 5%, transparent); }

.col-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.col-label.custom { color: var(--yellow-light); }

.col-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
}

@media (min-width: 768px) {
  .col-value { font-size: 1.5rem; }
}

.col-value.primary { color: var(--primary); }
.col-value.muted { color: var(--foreground); }
.col-value.custom { color: var(--yellow-light); }

.col-detail {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.col-detail .num { font-family: var(--font-mono); }
.col-detail .num.primary { color: var(--primary); }
.col-detail .num.muted { color: var(--foreground); }
.col-detail .num.custom { color: var(--yellow-light); }
.col-detail .fee-tag { margin-left: 0.25rem; color: color-mix(in oklch, var(--yellow) 70%, transparent); }

.result-pnl {
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr;
}

.result-pnl.cols-2 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .result-pnl.cols-2 { grid-template-columns: 1fr 1fr; }
}

.pnl-cell {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .pnl-cell {
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 1rem 1.5rem;
  }
  .pnl-cell:last-child { border-right: none; }
}

.pnl-cell.bank {
  background: color-mix(in oklch, var(--primary) 5%, transparent);
}

.pnl-cell.gain {
  background: color-mix(in oklch, var(--green) 10%, transparent);
  border-left: 4px solid var(--green);
}

.pnl-cell.loss {
  background: color-mix(in oklch, var(--red) 10%, transparent);
  border-left: 4px solid var(--red);
}

.pnl-label { font-size: 0.75rem; color: var(--muted-foreground); margin-bottom: 0.125rem; }

.pnl-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .pnl-value { font-size: 1.125rem; }
}

.pnl-value.primary { color: var(--primary); }
.pnl-value.green { color: var(--green); }
.pnl-value.red { color: var(--red); }

.pnl-pct {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-foreground);
  margin-left: 0.25rem;
}

.pnl-side { text-align: right; }
.pnl-side-tag { font-size: 0.75rem; font-weight: 700; margin-bottom: 0.125rem; }
.pnl-side-tag.green { color: var(--green); }
.pnl-side-tag.red { color: var(--red); }
.pnl-side-pct { font-family: var(--font-mono); font-weight: 700; font-size: 0.875rem; }
.pnl-side-pct.green { color: var(--green); }
.pnl-side-pct.red { color: var(--red); }

/* ===== Save row ===== */
.save-row {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: color-mix(in oklch, var(--secondary) 20%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .save-row { flex-direction: row; align-items: center; padding: 0.75rem 1.5rem; }
}

.save-note {
  flex: 1;
  height: auto;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  background: var(--input);
  border-radius: var(--radius-sm);
}

.save-note:focus { box-shadow: 0 0 0 1px var(--primary); }

.saved-msg {
  font-size: 0.75rem;
  color: var(--green);
  font-family: var(--font-mono);
}

/* ===== Buttons ===== */
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  font-weight: 500;
  transition: background 0.15s, opacity 0.15s;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover { background: color-mix(in oklch, var(--primary) 80%, black); }

.btn-full {
  width: 100%;
  height: 2.25rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-family: var(--font-sans);
}

.refresh-icon {
  display: inline-block;
  font-size: 1rem;
  transition: transform 0.2s;
}

.refresh-icon[data-spin="true"] {
  animation: spin 1s linear infinite;
}

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

.btn-outline {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--muted-foreground);
  transition: color 0.15s, border-color 0.15s;
}

.btn-outline:hover { color: var(--foreground); border-color: var(--foreground); }

/* ===== Preset preview ===== */
.preset-desktop-wrap {
  display: none;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .preset-desktop-wrap { display: block; }
}

.preset-table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.preset-table thead tr {
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--secondary) 50%, transparent);
}

.preset-table th {
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

.preset-table th.left { text-align: left; color: var(--foreground); }
.preset-table th.right { text-align: right; }
.preset-table th.right.primary { color: var(--primary); }
.preset-table th.right.muted { color: var(--muted-foreground); }
.preset-table th.right.custom { color: var(--yellow-light); }

.preset-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.preset-table tbody tr:hover {
  background: color-mix(in oklch, var(--secondary) 30%, transparent);
}

.preset-table td {
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
}

.preset-table td.left { text-align: left; font-weight: 600; white-space: nowrap; }
.preset-table td.right { text-align: right; }
.preset-table td.primary { color: var(--primary); font-weight: 600; }
.preset-table td.muted { color: var(--muted-foreground); }
.preset-table td.fg { color: var(--foreground); }
.preset-table td.custom { color: var(--yellow-light); }

.preset-mobile-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .preset-mobile-wrap { display: none; }
}

.preset-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.preset-card-head {
  padding: 0.5rem 0.75rem;
  background: color-mix(in oklch, var(--secondary) 50%, transparent);
}

.preset-card-head-amount {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--foreground);
  font-size: 0.875rem;
}

.preset-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.preset-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preset-card-row.bordered {
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

.preset-card-row.yellow-border {
  border-top: 1px solid color-mix(in oklch, var(--yellow) 20%, transparent);
  padding-top: 0.5rem;
}

.preset-card-row .label { font-size: 0.75rem; color: var(--muted-foreground); }
.preset-card-row .label.yellow { color: var(--yellow-light); }
.preset-card-row .val { font-family: var(--font-mono); }
.preset-card-row .val.primary { color: var(--primary); font-weight: 600; }
.preset-card-row .val.fg { color: var(--foreground); }
.preset-card-row .val.custom { color: var(--yellow-light); }

.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  white-space: nowrap;
}

.badge.gain { background: color-mix(in oklch, var(--green) 15%, transparent); color: var(--green); }
.badge.loss { background: color-mix(in oklch, var(--red) 15%, transparent); color: var(--red); }

/* ===== Chart ===== */
.chart-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.chart-canvas {
  position: relative;
  height: 260px;
}

.chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
}

.empty-block {
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* ===== History ===== */
.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-loading {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  padding: 2rem 0;
}

.history-empty {
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.history-list { display: flex; flex-direction: column; gap: 0.75rem; }

.history-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.history-item-head {
  padding: 0.5rem 1rem;
  background: color-mix(in oklch, var(--secondary) 30%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.history-item-head-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.history-amount {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--foreground);
  font-size: 0.875rem;
}

.history-note { font-size: 0.75rem; color: var(--muted-foreground); }

.history-item-head-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.history-time { font-size: 0.75rem; color: var(--muted-foreground); }

.history-delete {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  padding: 0 0.25rem;
}

.history-delete:hover { color: var(--red); }

.history-item-body {
  padding: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.75rem;
}

@media (min-width: 640px) {
  .history-item-body { grid-template-columns: repeat(4, 1fr); }
}

.history-cell-label { color: var(--muted-foreground); margin-bottom: 0.125rem; }
.history-cell-val { font-family: var(--font-mono); }
.history-cell-val.primary { color: var(--primary); }
.history-cell-val.fg { color: var(--foreground); }
.history-cell-val.custom { color: var(--yellow-light); }
.history-cell-val.muted { color: var(--muted-foreground); }
