:root {
  --mc-primary: #0284c7;
  --mc-primary-hover: #0369a1;
  --mc-bg-card: #ffffff;
  --mc-border: #e2e8f0;
  --mc-text-main: #0f172a;
  --mc-text-muted: #64748b;
  --mc-pill-bg: #f1f5f9;
  --mc-pill-hover: #e2e8f0;
  --mc-result-bg: #f8fafc;
  --mc-hl-bg: #e0f2fe;
  --mc-hl-border: #bae6fd;
  --mc-hl-text: #0369a1;
}

.mc-tool-container {
  max-width: 900px;
  margin: 0 auto 3rem auto;
  font-family: inherit;
  color: var(--mc-text-main);
}

.mc-editor-card {
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mc-presets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--mc-border);
}

.mc-presets-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--mc-text-muted);
}

.mc-pill-btn {
  background: var(--mc-pill-bg);
  border: 1px solid var(--mc-border);
  color: var(--mc-text-main);
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.mc-pill-btn:hover {
  background: var(--mc-pill-hover);
  border-color: var(--mc-primary);
}

.mc-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .mc-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

.mc-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .mc-grid-3 {
    grid-template-columns: 1fr;
  }
}

.mc-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--mc-text-main);
}

.mc-req {
  color: #dc2626;
}

.mc-field input,
.mc-field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--mc-border);
  border-radius: 8px;
  background: var(--mc-bg-card);
  color: var(--mc-text-main);
  font-size: 0.95rem;
  box-sizing: border-box;
}

.mc-field input:focus,
.mc-field select:focus {
  outline: none;
  border-color: var(--mc-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.mc-action-row {
  display: flex;
  gap: 0.75rem;
}

.mc-primary-btn {
  flex: 2;
  background: var(--mc-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mc-primary-btn:hover {
  background: var(--mc-primary-hover);
}

.mc-secondary-btn {
  background: var(--mc-pill-bg);
  color: var(--mc-text-main);
  border: 1px solid var(--mc-border);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.mc-results-card {
  background: var(--mc-result-bg);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  padding: 1.75rem;
}

.mc-highlight-box {
  background: var(--mc-hl-bg);
  border: 1px solid var(--mc-hl-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.mc-hl-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--mc-hl-text);
  margin-bottom: 0.25rem;
  display: block;
}

.mc-hl-val {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--mc-hl-text);
  margin-bottom: 0.25rem;
}

.mc-hl-sub {
  font-size: 0.85rem;
  color: var(--mc-hl-text);
}

.mc-macros-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .mc-macros-grid {
    grid-template-columns: 1fr;
  }
}

.mc-macro-card {
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-border);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.mc-macro-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.mc-macro-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--mc-text-main);
}

.mc-macro-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mc-text-muted);
}

.mc-macro-grams {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--mc-text-main);
  margin-bottom: 0.15rem;
}

.mc-macro-kcal {
  font-size: 0.8rem;
  color: var(--mc-text-muted);
  margin-bottom: 0.75rem;
}

.mc-macro-bar {
  height: 8px;
  background: var(--mc-pill-bg);
  border-radius: 9999px;
  overflow: hidden;
}

.mc-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.mc-fill-p { background: #0284c7; }
.mc-fill-c { background: #f59e0b; }
.mc-fill-f { background: #10b981; }

.mc-table-card {
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.mc-sub-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.85rem 0;
  color: var(--mc-text-main);
}

.mc-specs-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mc-spec-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--mc-text-muted);
  border-bottom: 1px solid var(--mc-border);
  padding-bottom: 0.4rem;
}

.mc-spec-row strong {
  color: var(--mc-text-main);
}

.mc-tip-box {
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-border);
  border-radius: 8px;
  padding: 1.25rem;
}

.mc-tip-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--mc-primary);
}

.mc-tip-box p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--mc-text-muted);
  line-height: 1.5;
}

.mc-macro-protein { border-top: 3px solid #0284c7; }
.mc-macro-carbs { border-top: 3px solid #f59e0b; }
.mc-macro-fats { border-top: 3px solid #10b981; }

.mc-ad {
  overflow: hidden;
  min-height: 280px;
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --mc-primary: #81bcda;
  --mc-primary-hover: #69aed4;
  --mc-bg-card: var(--tf-surface);
  --mc-border: var(--tf-surface);
  --mc-text-main: var(--tf-ink);
  --mc-text-muted: var(--tf-ink-faint);
  --mc-pill-bg: var(--tf-surface);
  --mc-pill-hover: var(--tf-surface);
  --mc-result-bg: var(--tf-surface);
  --mc-hl-bg: var(--tf-surface);
  --mc-hl-border: #81bbda;
  --mc-hl-text: #69aed4;
}
