/* ===== Generador de contadores regresivos =====
   Diseño solo de esta herramienta. Se carga después de /assets/style.css. */
.cd { padding: 40px 16px 80px; }
.cd h1 { font-size: clamp(28px, 5vw, 40px); margin: 16px 0 8px; letter-spacing: -.02em; }
.cd .lead { max-width: 780px; }
.cd-layout { display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .cd-layout { grid-template-columns: minmax(0, 1fr); } }
.cd-side, .cd-main { min-width: 0; }
.cd-main { display: grid; gap: 18px; position: sticky; top: 84px; }
@media (max-width: 900px) { .cd-main { position: static; } }
.cd-step { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 24px 0 12px; }
.cd-step:first-child { margin-top: 0; }
.cd-step span { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; display: grid; place-items: center; flex: none; }
.cd-label { display: block; font-weight: 600; font-size: 15px; margin: 14px 0 8px; }
.cd-gap { margin-top: 14px; }
.cd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 420px) { .cd-row { grid-template-columns: 1fr; } }
.cd-small { font-size: 15px; margin-bottom: 0; }
.cd-small input, .cd-small select { margin-top: 8px; }
.cd-side select { padding: 11px 12px; }
.cd-note { margin: 6px 0 0; font-size: 13px; }
.cd-check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; margin: 14px 0 0; cursor: pointer; }
.cd-check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; margin: 0; }

.cd-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.cd-seg button { flex: 1; font: inherit; font-size: 15px; font-weight: 600; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
                 background: var(--bg-2); color: var(--text-2); cursor: pointer; white-space: nowrap; }
.cd-seg button.active { border-color: var(--brand); background: rgba(98, 70, 234, .15); color: var(--text); }
.cd-seg.small button { flex: none; font-size: 13px; padding: 7px 10px; }

.cd-themes { display: flex; gap: 8px; flex-wrap: wrap; }
.cd-theme { display: flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; padding: 6px 10px 6px 6px; border-radius: 99px;
            border: 1px solid var(--line); background: var(--card); color: var(--text-2); cursor: pointer; }
.cd-theme i { width: 22px; height: 22px; border-radius: 50%; display: block; border: 1px solid rgba(0, 0, 0, .1); }
.cd-theme.active { border-color: var(--brand); color: var(--text); box-shadow: 0 0 0 2px rgba(98, 70, 234, .25); }
.cd-more { margin-top: 10px; }
.cd-more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--brand-2); }
.cd-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 10px; }
.cd-colors label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; margin: 0; }
.cd-colors input { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; flex: none; }

.cd-range { margin: 16px 0 0; }
.cd-range output { float: right; font-weight: 700; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.cd-range input { display: block; width: 100%; margin-top: 6px; accent-color: var(--brand); }

.cd-pv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cd-pv-head .cd-step { margin: 0; }
.cd-pv-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.cd-stage { border-radius: 12px; border: 1px solid var(--line); background: #f4f5f9; padding: 0; overflow: hidden; transition: background .2s; }
.cd-stage.dark { background: #0f1115; }
.cd-stage iframe { display: block; width: 100%; height: 260px; border: 0; margin: 0 auto; background: transparent; transition: width .2s; }
.cd-stage.phone iframe { width: 375px; max-width: 100%; border-left: 1px dashed var(--line); border-right: 1px dashed var(--line); }

.cd-code textarea { width: 100%; height: 170px; font: 12px/1.5 ui-monospace, Consolas, monospace; resize: vertical; white-space: pre; }
.cd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.cd-actions .btn { width: auto; }
.cd-how { margin-top: 16px; }
.cd-how .hint { margin: 10px 0 0; }
.cd-done { display: grid; gap: 6px; margin-top: 12px; }
.cd-done .hint { margin: 0; }
.cd-done a { color: var(--brand-2); font-weight: 600; }
.cd-warn { color: var(--err); margin: 8px 0 0; font-size: 13px; }
.cd-side input[type=date], .cd-side input[type=time] { display: block; width: 100%; padding: 12px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 16px; color-scheme: light dark; }
.cd-side .chip span { padding: 8px 12px; font-size: 14px; }
