:root {
  font-size: 16px;
  color: #182335;
  --brand-pink: #c31783;
  --brand-purple: #7539bf;
  --brand-blue: #138ab5;
  --soft-bg: #f2f5fa;
  --soft-line: #e1e7f0;
}
body { background: var(--soft-bg); }
header {
  background: #fff;
  min-height: 86px;
  padding: 14px 30px;
  border-bottom: 1px solid var(--soft-line);
  box-shadow: 0 3px 14px #1823350a;
}
header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, #e10e91, #7945da 55%, #17b2ba);
}
.brand-logo { width: 205px; height: 62px; }
.brand-logo small { color: #34425a; font-weight: 800; }
.header-actions { gap: 10px; }
.badge {
  color: #335069;
  background: #f1f8fc;
  border-color: #d5e9f3;
  font-weight: 700;
}
.intro {
  padding: 36px 34px 27px;
  background: linear-gradient(112deg, #fff 0%, #fff 58%, #fbf3fa 100%);
  border-bottom: 1px solid var(--soft-line);
}
.eyebrow {
  display: inline-block;
  color: #a21370;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.6px;
  margin-bottom: 8px;
}
.intro h1 { color: #17243b; font-size: 34px; letter-spacing: -1.1px; margin: 0; }
.intro p { color: #536176; margin: 8px 0 22px; font-size: 16px; }
.intro ol { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.intro li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #f4f6fa;
  border: 1px solid #e3e8f0;
  border-radius: 24px;
  padding: 9px 15px 9px 9px;
  color: #43516a;
  font-size: 14px;
  font-weight: 750;
}
.intro li:first-child { background: #fff0f8; border-color: #f1c3df; color: #971065; }
.intro li:nth-child(2) { background: #edf6ff; border-color: #c7dcf3; color: #245d91; }
.intro li:nth-child(3) { background: #edfbf4; border-color: #c6ead6; color: #14784f; }
.intro li b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(140deg, var(--brand-pink), var(--brand-purple));
}
.intro li:nth-child(2) b { background: linear-gradient(140deg, #3284c5, #17639c); }
.intro li:nth-child(3) b { background: linear-gradient(140deg, #22a875, #14784f); }
main { grid-template-columns: 310px minmax(300px, 1fr) 310px; min-height: 0; }
aside { padding: 24px; }
aside h2 { color: #1d2a41; font-size: 17px; letter-spacing: -.2px; }
.tools, .order { background: #fff; }
.tools { border-right: 1px solid var(--soft-line); }
.order { border-left: 1px solid var(--soft-line); }
.tools { border-top: 4px solid #c31783; }
.workspace { border-top: 4px solid #3284c5; }
.order { border-top: 4px solid #1d9a68; }
.tools > h2:first-child, .step-heading, .order > h2:first-child {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 10px;
  border: 0;
  border-left: 4px solid;
  border-radius: 0 9px 9px 0;
  font-size: 15px;
}
.tools > h2:first-child { border-left-color: #c31783; background: #fff0f8; color: #941064; }
.step-heading { border-top: 0; margin-top: 24px; border-left-color: #3284c5; background: #edf6ff; color: #245d91; }
.order > h2:first-child { border-left-color: #1d9a68; background: #edfbf4; color: #14784f; }
.tools > p { color: #647188; margin: 8px 0 15px; }
.step-heading { margin-top: 26px; padding-top: 20px; border-top: 1px solid #edf0f5; }
.help { font-size: 14px; color: #66738a; line-height: 1.5; }
small, .design-card small, .hint, .notice, .check { font-size: 13px; }
small { color: #68758a; }
button { min-height: 44px; border-radius: 10px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px #18233514; }
button:focus-visible, input:focus-visible, .upload:focus-within { outline: 3px solid #dc72b5; outline-offset: 3px; }
.upload {
  background: linear-gradient(135deg, #c91b86, #8c39bd 62%, #6845c7);
  color: #fff;
  border: 0;
  border-radius: 13px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 8px 20px #a716721f;
}
.upload:hover { background: linear-gradient(135deg, #ad126e, #71319b); }
.upload-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #ffffff25;
  font-size: 22px;
  line-height: 1;
}
.upload input, .load input { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; }
.secondary-action { color: #8f1768; border-color: #e5bfd8; background: #fff7fb; font-weight: 750; }
.secondary-action:hover { background: #fff0f8; }
.advanced { border: 1px solid var(--soft-line); padding: 12px; border-radius: 11px; background: #fbfcfe; }
.advanced summary, details summary { cursor: pointer; font-weight: 750; min-height: 32px; color: #40516b; }
.buttons button { font-size: 14px; min-height: 44px; }
.design-card b { font-size: 14px; }
.properties, .design-list-wrap { border-top-color: #e9edf4; }
.empty-board {
  padding: 26px 20px;
  text-align: center;
  border: 1px dashed #cbd5e3;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, #f9fbfe);
  margin: 0 auto 17px;
  max-width: 650px;
  color: #34445c;
}
.empty-icon { display: block; color: var(--brand-pink); font-size: 25px; margin-bottom: 5px; }
.empty-board strong { font-size: 18px; color: #1c2b44; }
.empty-board p { color: #65738a; margin: 6px 0 0; font-size: 14px; }
.empty-board[hidden] { display: none; }
.empty-board:not([hidden]) + .boardwrap { display: none; }
.workspace { background: #f1f4f9; padding: 24px; min-width: 0; }
.topline { align-items: flex-start; margin-bottom: 20px; }
.topline > div:first-child strong { color: #1b2940; font-size: 16px; }
.topline > div:first-child span { color: #647188; margin-top: 5px; }
.metrics { gap: 7px; align-items: center; }
.metrics span { background: #fff; border: 1px solid #e0e6ef; border-radius: 20px; padding: 7px 10px; color: #3c4c65; font-size: 13px; }
.metrics span b { color: #192942; }
.spacing-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 11px;
  max-width: 650px;
  margin: 0 auto 15px;
  padding: 10px 12px;
  border: 1px solid #dfe6ef;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 14px #18233508;
}
.spacing-control label { margin: 0; color: #34445c; font-size: 13px; font-weight: 800; }
.spacing-control select {
  min-width: 96px;
  padding: 7px 28px 7px 10px;
  border: 1px solid #cbd7e5;
  border-radius: 8px;
  background: #f8fbfe;
  color: #20334e;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}
.spacing-control span { color: #68758a; font-size: 12px; }
.spacing-control label::before { content: "↔"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 7px; background: #e8f4ff; color: #2778b9; font-size: 15px; }
.picker-label { background: transparent !important; border: 0 !important; padding: 0 0 0 3px !important; font-weight: 800; color: #34445c; }
.background-control { display: flex; align-items: center; gap: 8px; padding: 4px 5px 4px 10px; border: 1px solid #dce3ed; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px #18233508; }
.background-control > strong { color: #34445c; font-size: 12px; font-weight: 850; white-space: nowrap; }
.background-picker { display: inline-flex; gap: 3px; padding: 3px; background: #edf1f6; border: 1px solid #dfe6ef; border-radius: 9px; }
.background-picker .bg-choice { display: inline-flex; align-items: center; gap: 6px; width: auto; min-height: 34px; margin: 0; padding: 5px 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #46566d; font-size: 12px; font-weight: 800; box-shadow: none; }
.background-picker .bg-choice:hover { background: #fff; transform: none; box-shadow: none; }
.background-picker .bg-choice.is-selected[data-tone="black"] { background: #172234; border-color: #172234; color: #fff; box-shadow: 0 2px 6px #18233524; }
.background-picker .bg-choice.is-selected[data-tone="green"] { background: #137b51; border-color: #137b51; color: #fff; box-shadow: 0 2px 6px #137b5130; }
.background-picker .bg-choice.is-selected[data-tone="white"] { background: #fff; border-color: #9eacbf; color: #263750; box-shadow: 0 2px 6px #18233512; }
.metrics .picker-label { padding-left: 4px !important; color: #34445c; }
.swatch { display: inline-block; width: 12px; height: 12px; border: 1px solid #8290a2; border-radius: 50%; }
.bg-choice.is-selected .swatch { border-color: #fff; box-shadow: 0 0 0 1px #ffffff44; }
.swatch-black { background: #121820; }
.swatch-green { background: #0b3b2e; }
.swatch-white { background: #fff; }
.boardwrap { max-width: 500px; }
.ruler { color: #596b84; font-weight: 700; }
.boardwrap canvas { background-image: none; background-color: #162235; border: 2px solid #405672; border-radius: 8px; box-shadow: 0 14px 32px #1b29401b; }
canvas { cursor: grab; }
canvas:active { cursor: grabbing; }
.hint { color: #68758a; margin-top: 12px; }
#status { position: static; margin: 12px 0; box-shadow: 0 5px 20px #18233517; background: #fff; border-left-color: var(--brand-pink); }
input[readonly] { background: #f5f7fa; color: #536176; }
.primary { background: linear-gradient(135deg, #c91b86, #8639be 66%, #6146c7); font-size: 16px; font-weight: 850; min-height: 54px; box-shadow: 0 8px 20px #a716721f; }
.primary:hover { background: linear-gradient(135deg, #ad126e, #71319b); }
.order #runCheck { border-color: #f0d19a; background: #fff8e8; color: #815210; font-weight: 800; }
.order #runCheck:hover { background: #fff0c8; }
.order #export.primary { background: linear-gradient(135deg, #169766, #0f7655); box-shadow: 0 8px 20px #0d81521c; }
.order #export.primary:hover { background: linear-gradient(135deg, #11784f, #0b6247); }
.order #copySummary { border-color: #cadff1; background: #f2f8ff; color: #2b6398; font-weight: 750; }
.order > h2:first-child { padding-bottom: 12px; border-bottom: 1px solid #edf0f5; }
.row { gap: 12px; }
.row b { white-space: nowrap; }
.total { color: #192942; }
.notice { padding: 13px; background: #f1f7fb; border: 1px solid #e0edf3; color: #53677a; line-height: 1.55; margin-top: 20px; border-radius: 10px; }
@media (max-width: 1100px) {
  main { grid-template-columns: 290px minmax(300px, 1fr); }
  .order { grid-column: 1 / -1; border-top: 1px solid var(--soft-line); border-left: 0; }
  .order #quote { max-width: 460px; }
}
@media (max-width: 690px) {
  header { position: static; padding: 12px 16px; gap: 10px; }
  .brand-logo { width: 145px; height: 47px; }
  .brand-logo small { font-size: 7px; letter-spacing: 1.5px; }
  .badge { display: none; }
  .header-actions { gap: 4px; }
  .intro { padding: 25px 20px 20px; }
  .intro h1 { font-size: 28px; }
  .intro p { font-size: 15px; margin-bottom: 16px; }
  .intro ol { gap: 7px; }
  .intro li { font-size: 12px; padding: 6px 10px 6px 6px; }
  .intro li b { width: 23px; height: 23px; }
  main { display: flex; flex-direction: column; }
  .tools { border-right: 0; }
  .workspace { padding: 18px 15px; }
  .topline { flex-direction: column; }
  .metrics { justify-content: flex-start; }
  aside { padding: 20px; }
  .inline-two { grid-template-columns: 1fr 1fr; }
  .boardwrap { max-width: 370px; }
  .order { border-top: 1px solid var(--soft-line); }
}

/* Ajustes de lectura para pantallas estrechas: evita que el lienzo fuerce
   un ancho de página mayor que el móvil y mantiene separados los pasos. */
@media (max-width: 690px) {
  html, body { width: 100%; max-width: 100%; overflow-x: clip; }
  main { width: 100%; max-width: 100%; min-width: 0; }
  main > .tools, main > .workspace, main > .order {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .tools > *, .workspace > *, .order > * { min-width: 0; max-width: 100%; }
  .step-heading { margin: 22px 0 10px; padding: 8px 10px; min-height: 40px; line-height: 1.3; }
  .step-heading + .help { display: block; margin: 8px 0 32px !important; padding-bottom: 8px; line-height: 1.5; }
  .properties { margin-top: 12px; }
  .workspace { padding-inline: 15px; }
  .topline, .metrics, .background-control, .background-picker, .spacing-control { max-width: 100%; }
  .background-control { flex-wrap: wrap; }
  .background-picker { flex-wrap: wrap; }
  .boardwrap, .ruler, .boardwrap canvas { width: 100%; max-width: 100%; min-width: 0; }
  .hint, #status { overflow-wrap: anywhere; }
  #status { position: static; bottom: auto; z-index: auto; margin: 12px 0; }
}
