:root {
  --yctc-primary: #dc2626;
  --yctc-primary-hover: #b91c1c;
  --yctc-bg-card: #ffffff;
  --yctc-border: #e2e8f0;
  --yctc-text: #1e293b;
  --yctc-muted: #64748b;
  --yctc-success: #16a34a;
  --yctc-warning: #f59e0b;
  --yctc-danger: #dc2626;
}

.yctc-main {
  padding: 1.5rem 1rem 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--yctc-text);
  font-family: inherit;
}

.yctc-wrap {
  width: 100%;
}

.yctc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .yctc-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.yctc-card {
  background: var(--yctc-bg-card);
  border: 1px solid var(--yctc-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.yctc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.yctc-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--yctc-text);
}

.yctc-sub-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--yctc-text);
}

.yctc-head-btns {
  display: flex;
  gap: 0.5rem;
}

.yctc-form-group {
  margin-bottom: 1.25rem;
}

.yctc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.yctc-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--yctc-text);
}

.yctc-counter-badge {
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--yctc-border);
  color: var(--yctc-text);
}

.yctc-input,
.yctc-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--yctc-border);
  border-radius: 6px;
  background: transparent;
  color: var(--yctc-text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.15s ease;
}

.yctc-textarea {
  font-family: monospace;
  font-size: 0.875rem;
}

.yctc-input:focus,
.yctc-textarea:focus {
  outline: none;
  border-color: var(--yctc-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.yctc-meter-track {
  width: 100%;
  height: 6px;
  background: var(--yctc-border);
  border-radius: 999px;
  margin-top: 0.4rem;
  overflow: hidden;
}

.yctc-meter-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.yctc-meter-safe {
  background-color: var(--yctc-success);
}

.yctc-meter-warn {
  background-color: var(--yctc-warning);
}

.yctc-meter-danger {
  background-color: var(--yctc-danger);
}

.yctc-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.725rem;
  color: var(--yctc-muted);
  margin-top: 0.25rem;
}

.yctc-meter-marker {
  color: var(--yctc-warning);
  font-weight: 600;
}

.yctc-hint {
  font-size: 0.8rem;
  color: var(--yctc-muted);
  margin: 0.35rem 0 0 0;
}

.yctc-action-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.yctc-btn-action {
  background: var(--yctc-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.15s ease;
}

.yctc-btn-action:hover {
  background: var(--yctc-primary-hover);
}

.yctc-btn-ghost {
  background: transparent;
  color: var(--yctc-text);
  border: 1px solid var(--yctc-border);
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.15s ease;
}

.yctc-btn-ghost:hover {
  background: var(--yctc-border);
}

.yctc-status-msg {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--yctc-success);
}

/* KPI Cards */
.yctc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 576px) {
  .yctc-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.yctc-kpi-card {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--yctc-border);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}

.yctc-kpi-label {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--yctc-muted);
  margin-bottom: 0.25rem;
}

.yctc-kpi-val {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.yctc-kpi-sub {
  font-size: 0.725rem;
  color: var(--yctc-muted);
  margin-top: 0.25rem;
}

.yctc-text-success {
  color: var(--yctc-success);
}

.yctc-text-warning {
  color: var(--yctc-warning);
}

.yctc-text-danger {
  color: var(--yctc-danger);
}

.yctc-text-primary {
  color: var(--yctc-primary);
}

.yctc-text-muted {
  color: var(--yctc-muted);
}

/* Rules Checklist */
.yctc-rules-box {
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid var(--yctc-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.yctc-rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.yctc-rule-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.yctc-rule-text {
  flex: 1;
}

.yctc-rule-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
}

.yctc-rule-pass .yctc-rule-icon {
  background: #dcfce7;
  color: #15803d;
}

.yctc-rule-fail .yctc-rule-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.yctc-rule-fail {
  color: var(--yctc-danger);
}

/* Timeline & Scrub Bar */
.yctc-timeline-box {
  border: 1px solid var(--yctc-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.yctc-scrub-bar {
  display: flex;
  width: 100%;
  height: 12px;
  background: var(--yctc-border);
  border-radius: 4px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 0.75rem;
}

.yctc-scrub-seg {
  background: var(--yctc-primary);
  height: 100%;
  transition: opacity 0.15s;
  cursor: pointer;
}

.yctc-scrub-seg:hover {
  opacity: 0.8;
}

.yctc-chapter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.yctc-chip {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--yctc-border);
  border-radius: 4px;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  color: var(--yctc-text);
  font-family: monospace;
}

/* SERP Mockup Box */
.yctc-mockup-box {
  border: 1px solid var(--yctc-border);
  border-radius: 8px;
  padding: 1rem;
}

.yctc-mockup-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--yctc-bg-card);
  border: 1px solid var(--yctc-border);
  border-radius: 8px;
  overflow: hidden;
}

@media (min-width: 480px) {
  .yctc-mockup-card {
    flex-direction: row;
  }
}

.yctc-mockup-thumb {
  background: #0f172a;
  min-width: 140px;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #ffffff;
}

.yctc-mockup-play {
  font-size: 1.25rem;
  opacity: 0.7;
}

.yctc-mockup-time {
  position: absolute;
  bottom: 4px;
  right: 6px;
  background: rgba(0, 0, 0, 0.85);
  font-size: 0.65rem;
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
  font-weight: 700;
  color: #ffffff;
}

.yctc-mockup-body {
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.yctc-mockup-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0 0 0.2rem 0;
  color: var(--yctc-text);
  line-height: 1.3;
}

.yctc-mockup-channel {
  font-size: 0.725rem;
  color: var(--yctc-muted);
  margin: 0 0 0.25rem 0;
}

.yctc-mockup-desc {
  font-size: 0.75rem;
  color: var(--yctc-muted);
  margin: 0;
  line-height: 1.3;
}
/* 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"] {
  --yctc-primary: #da8181;
  --yctc-primary-hover: #da8181;
  --yctc-bg-card: var(--tf-surface);
  --yctc-border: var(--tf-surface);
  --yctc-text: var(--tf-ink);
  --yctc-muted: var(--tf-ink-faint);
  --yctc-success: #7ad89d;
  --yctc-warning: #dab981;
  --yctc-danger: #da8181;
}
