/* ============================================================
   Button Studio — blueprint / drafting-table aesthetic
   ============================================================ */

:root {
  --paper: #EFF2F1;
  --surface: #FFFFFF;
  --ink: #16232B;
  --ink-soft: #5B6E77;
  --line: #C9D6DA;
  --blue: #1F5A8C;
  --blue-dark: #123A5B;
  --copper: #B85C2C;
  --green: #2F7D5C;
  --radius: 8px;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 10px;
}

/* ---------- Header ---------- */



.eyebrow {
   font-family:soraneu; font-size:12px; letter-spacing:0.14em;
  text-transform:uppercase; color:var(--ink-soft);
  display:inline-flex; align-items:center; gap:8px; margin-bottom:14px;
}
.hero{padding:24px 0 0px; }
.hero h1 {
  font-family:soraneu;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.hero p.sub {
  
  color: var(--ink-soft);
  font-size: 15.5px;
  margin: 0 0 24px;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.preset-chip:hover { border-color: var(--blue); }

.preset-chip .swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
}

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}

.stage-panel, .controls-panel {
  background: #333;
  border: 0px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

/* ---------- State switch (signature element) ---------- */

.state-switch {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  font-family:soraneu;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  cursor: pointer;
}

.switch .led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
  transition: background .15s ease, box-shadow .15s ease;
}

.switch.active {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

.switch.active .led {
  background: var(--copper);
  box-shadow: 0 0 0 3px rgba(184,92,44,0.28);
}

/* ---------- Preview stage ---------- */

.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border-radius: 10px;
  background-color: #EEE;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid #AAA;
  margin-bottom: 20px;
}

/* ---------- Export panel ---------- */

.export-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.tab {
  font-family:soraneu;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 4px;
  color: var(--ink-soft);
  cursor: pointer;
}

.tab.active {
  color: var(--blue);
  border-bottom-color: var(--copper);
}

.code-block {
  background: var(--ink);
  color: #E7EEF1;
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 12px;
  max-height: 320px;
  overflow: auto;
  font-family:soraneu;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre;
  max-width:650px;
}

.export-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  /*border: 1px solid var(--line);*/
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-action:hover { transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); }

.btn-action.copied {
 /* background: var(--copper);
  border-color: var(--copper);*/
  color: #fff;
}

/* ---------- Controls panel ---------- */

.control-group {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.control-group:first-child { padding-top: 0; }
.control-group:last-child { border-bottom: none; padding-bottom: 0; }

.control-group h2 {
  font-family:soraneu;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.control-group h2 .hint {
  font-family:soraneu;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0;
}

.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-direction:row !important;
}

.field:last-child { margin-bottom: 0; }

.field label {
  font-size: 13px;
  color: #CCC;
  flex-shrink: 0;
  min-width: 96px;
}

.field .readout {
  font-family:soraneu;
  font-size: 11.5px;
  color: #A5F2FC;
  min-width: 34px;
  text-align: right;
}

.field input[type="range"] {
  flex: 1;
  accent-color: #0081f7;
}

.field input[type="color"] {
  width: 34px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.field input[type="text"] {
  flex: 1;
  font-family: soraneu;
  font-size: 13.5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  color:#FFF;
  background:#000;
}

.field select {
  flex: 1;
  font-family: soraneu;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  color:#FFF;
  background:#000;
}

.field.checkbox {
  justify-content: flex-start;
}

.field.checkbox label { min-width: 0; }

.field input[type="checkbox"] {
  accent-color: var(--blue);
  width: 15px;
  height: 15px;
}

.color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}


/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-family:soraneu;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
