/* ══════════════════ PROGRESSBAR.TODAY — wallpaper studio ══════════════════ */

:root {
  --paper: #f2eddf;
  --paper-deep: #e6deca;
  --ink: #171713;
  --muted: #6f6a5e;
  --orange: #ff5b35;
  --acid: #d8f242;
  --aqua: #72d8d2;
  --blue: #2b59ff;
  --line: 2px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(23, 23, 19, 0.11) 0.7px, transparent 0.7px);
  background-size: 8px 8px;
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
}

.hidden { display: none !important; }

/* ══════════════════ LEFT · CONFIG PANEL ══════════════════ */

.panel {
  width: 390px;
  flex-shrink: 0;
  padding: 26px 26px 34px;
  background: rgba(242, 237, 223, 0.97);
  border-right: var(--line);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

.panel::-webkit-scrollbar { width: 5px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 99px; }

.panel h1 {
  font-size: 38px;
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: .85;
}
.subtitle { color: var(--muted); font-size: 13px; margin: 16px 0 0; line-height: 1.5; max-width: 31ch; }

.panel > header {
  padding-bottom: 22px;
  border-bottom: var(--line);
}

.brand-lockup { display: flex; align-items: flex-start; gap: 13px; }
.brand-mark { width: 37px; height: 37px; flex: 0 0 auto; background: var(--orange); border: var(--line); display: grid; place-content: center; gap: 3px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-3deg); }
.brand-mark i { display: block; width: 19px; height: 3px; background: var(--ink); }
.eyebrow { margin: 0 0 7px; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.edition-stamp { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; border: 1px solid var(--ink); padding: 5px 7px; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.edition-stamp span { background: var(--ink); color: var(--paper); padding: 2px 4px; }

/* Section divider */
.panel > section + section { padding-top: 0; }

.field label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  display: block;
  margin-bottom: 8px;
}

.section-divider {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 2px 0;
}

/* Dropzone */
.dropzone {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: 14px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: #f3f4f6;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.drag, .dropzone:focus-visible {
  border-color: #111827;
  background: #f0f1f3;
  outline: none;
}
.drop-hint { text-align: center; color: #6b7280; font-size: 13px; padding: 18px; line-height: 1.6; }
.drop-icon { font-size: 22px; display: block; margin-bottom: 4px; }
.thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Stock background picker */
.stock-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.stock-thumb {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  padding: 0;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #f3f4f6;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.stock-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stock-thumb:hover { transform: scale(1.05); border-color: #94a3b8; }
.stock-thumb.active {
  border-color: #111827;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #111827;
}
.stock-hint { font-size: 11px; color: #94a3b8; margin: 8px 0 0; line-height: 1.5; }
.stock-hint a { color: #111827; font-weight: 600; }

/* Dates */
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; min-width: 0; }

input[type="date"], input[type="text"] {
  width: 100%;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111827;
  border-radius: 10px;
  padding: 10px 12px;
  font: 500 14px 'Inter', sans-serif;
  color-scheme: light;
  transition: border-color 0.15s;
}
input[type="date"]:focus, input[type="text"]:focus { outline: none; border-color: #111827; }

/* Range slider */
input[type="range"] {
  width: 100%;
  accent-color: #111827;
  cursor: pointer;
}

/* Select */
select {
  width: 100%;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111827;
  border-radius: 10px;
  padding: 10px 12px;
  font: 500 14px 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.15s;
}
select:focus { outline: none; border-color: #111827; }
.label-val { color: #111827; font-weight: 600; text-transform: none; letter-spacing: 0; }

/* Color swatches */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.swatch:hover { transform: scale(1.12); }
.swatch.active { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #111827; }
.swatch-color {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: none;
  cursor: pointer;
}
.swatch-color::-webkit-color-swatch-wrapper { padding: 0; }
.swatch-color::-webkit-color-swatch { border: 1.5px dashed #94a3b8; border-radius: 50%; }
.swatch-color::-moz-color-swatch { border: 1.5px dashed #94a3b8; border-radius: 50%; }

.error { color: #dc2626; font-size: 13px; margin: -8px 0 0; }

/* Stats */
.stats { display: flex; gap: 10px; }
.stat {
  flex: 1;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
}
.stat-num { display: block; font-size: 20px; font-weight: 700; color: #0f172a; }
.stat-label { font-size: 11px; color: #64748b; }

/* Buttons */
.btn-primary {
  background: #111827;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font: 600 15px 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: #1f2937; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  font: 600 15px 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.btn-secondary:hover { background: #f3f4f6; border-color: #94a3b8; }
.btn-secondary:active { transform: scale(0.98); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }
.hint { font-size: 12px; color: #94a3b8; text-align: center; margin: -10px 0 0; }

/* ══════════════════ DESIGN STRIP ══════════════════ */

.design-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.design-strip::-webkit-scrollbar { height: 4px; }
.design-strip::-webkit-scrollbar-track { background: transparent; }
.design-strip::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 99px; }

.design-option {
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.design-option:hover { border-color: #94a3b8; }
.design-option.active {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
}
.design-option img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.design-option span {
  font-size: 11px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
}

/* ══════════════════ RIGHT · PHONE PREVIEW ══════════════════ */

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: linear-gradient(135deg, rgba(255,91,53,.9) 0 18%, transparent 18% 100%), var(--aqua);
  min-width: 0;
}

/* Container for cqw units — width matches the phone width */
.phone-shell {
  container-type: inline-size;
  width: min(40.6vh, 400px, 90%);
}

.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  background: #0a0c0d;
  border-radius: 15cqw;
  padding: 2.8cqw;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px #2a3134;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12.2cqw;
  overflow: hidden;
  /* Placeholder "misty mountains" gradient until a photo is uploaded */
  background: linear-gradient(180deg, #dfe9ec 0%, #b9cfc9 45%, #7ea09a 100%);
}

.wallpaper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* ── Frame hardware — toggled by .frame-* class on .phone ── */
.island, .notch-tab, .home-indicator, .home-button, .speaker { display: none; }
.phone.frame-island .island,
.phone.frame-island .home-indicator,
.phone.frame-notch .notch-tab,
.phone.frame-notch .home-indicator { display: block; }
.phone.frame-home .home-button,
.phone.frame-home .speaker { display: block; }

/* Dynamic Island — iPhone 14 Pro → 17 series, Air */
.island {
  position: absolute;
  top: 2.2cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 32cqw;
  height: 8.4cqw;
  background: #0a0c0d;
  border-radius: 99px;
  z-index: 5;
}

/* Classic notch — iPhone 12 / 13 / 14 / 16e */
.notch-tab {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 46cqw;
  height: 8.6cqw;
  background: #0a0c0d;
  border-radius: 0 0 4.5cqw 4.5cqw;
  z-index: 5;
}

.home-indicator {
  position: absolute;
  bottom: 2.2cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 36cqw;
  height: 1.4cqw;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 99px;
  z-index: 5;
}

/* Home-button frame — iPhone SE (2020 / 2022): 16:9 screen inset in bezels */
.phone.frame-home .screen {
  position: absolute;
  top: 11%;
  left: 4%;
  width: 92%;
  height: auto;
  aspect-ratio: 750 / 1334;
  border-radius: 1.5cqw;
}
.home-button {
  position: absolute;
  bottom: 2.8%;
  left: 50%;
  transform: translateX(-50%);
  width: 12.5cqw;
  height: 12.5cqw;
  border-radius: 50%;
  background: #0a0c0d;
  box-shadow: inset 0 0 0 0.7cqw #2a3134;
  z-index: 6;
}
.speaker {
  position: absolute;
  top: 4.6%;
  left: 50%;
  transform: translateX(-50%);
  width: 17cqw;
  height: 1.7cqw;
  border-radius: 99px;
  background: #2a3134;
  z-index: 6;
}

/* ══════════════════ FROSTED GLASS CARD ══════════════════ */

.card {
  position: absolute;
  left: 50%;
  top: 57%;
  transform: translateX(-50%);
  width: 80%;
  z-index: 4;
  background: rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 7cqw;
  padding: 5.5cqw 6cqw 5cqw;
  color: #31423b;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.card-kicker,
.card-total { display: none; }

/* Short 16:9 lock screens need a slightly higher card position to preserve
   the system quick-action area. The render page mirrors this class. */
.phone.frame-home .card,
.screen.render-frame-home .card { top: 51.5%; }

/* Date row */
.card-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5cqw;
  font: 500 3.6cqw 'Inter', sans-serif;
  letter-spacing: 1.1cqw;
  text-transform: uppercase;
}
.card-date svg { width: 4.4cqw; height: 4.4cqw; flex-shrink: 0; }

/* Divider heading */
.card-heading {
  display: flex;
  align-items: center;
  gap: 3cqw;
  margin-top: 4cqw;
  font: 500 3.1cqw 'Inter', sans-serif;
  letter-spacing: 1.3cqw;
  text-transform: uppercase;
  color: #3c5048;
  white-space: nowrap;
}
.card-heading .line { flex: 1; height: 1px; background: rgba(60, 80, 72, 0.55); }

/* Big days number */
.card-days {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2.5cqw;
  margin-top: 3cqw;
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  color: #2f4039;
  line-height: 1;
}
#daysNum { font-size: 16cqw; font-weight: 400; }
.days-word { font-size: 5cqw; }

/* Progress bar */
.card-progress {
  display: flex;
  align-items: center;
  gap: 3.5cqw;
  margin-top: 4.5cqw;
}
.bar {
  flex: 1;
  height: 6.2cqw;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: #88a896;
  transition: width 0.6s ease;
}
.pct {
  font: 500 3.8cqw 'Inter', sans-serif;
  color: #31423b;
  min-width: 10cqw;
  text-align: left;
}

/* ══════════════════ CARD DESIGN VARIANTS ══════════════════ */

/* Bottom scrim — Minimal Float design only */
.scrim {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.42) 82%);
}
.screen.show-scrim .scrim { display: block; }

/* ── Dark Glass ── */
.card.design-dark {
  background: rgba(10, 15, 12, 0.42);
  border-color: rgba(255, 255, 255, 0.28);
  color: #f0f4f2;
}
.card.design-dark .card-heading { color: rgba(240, 244, 242, 0.85); }
.card.design-dark .card-heading .line { background: rgba(255, 255, 255, 0.45); }
.card.design-dark .card-days { color: #f0f4f2; }
.card.design-dark .bar { background: rgba(255, 255, 255, 0.22); box-shadow: none; }
.card.design-dark .pct { color: #f0f4f2; }

/* ── Minimal Float (no card) ── */
.card.design-minimal {
  background: transparent;
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: #ffffff;
  text-shadow: 0 0.26cqw 3.2cqw rgba(0, 0, 0, 0.45);
}
.card.design-minimal .card-heading { color: rgba(255, 255, 255, 0.92); }
.card.design-minimal .card-heading .line { background: rgba(255, 255, 255, 0.55); }
.card.design-minimal .card-days { color: #ffffff; }
.card.design-minimal .bar { background: rgba(255, 255, 255, 0.35); box-shadow: none; }
.card.design-minimal .pct { color: #ffffff; }

/* ── Solid Paper ── */
.card.design-paper {
  background: rgba(255, 255, 255, 0.92);
  border: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  color: #2b3a34;
}
.card.design-paper .card-heading { color: rgba(43, 58, 52, 0.75); }
.card.design-paper .card-heading .line { background: rgba(43, 58, 52, 0.35); }
.card.design-paper .card-days { color: #2b3a34; }
.card.design-paper .bar { background: rgba(43, 58, 52, 0.12); box-shadow: none; }
.card.design-paper .pct { color: #2b3a34; }

/* ── Halo — luminous dark glass ── */
.card.design-halo {
  background: rgba(8, 12, 28, 0.68);
  border-color: rgba(175, 218, 255, 0.58);
  color: #f5f8ff;
  box-shadow: inset 0 0 0 0.28cqw rgba(255, 255, 255, 0.08),
              0 0 7cqw rgba(96, 178, 255, 0.30),
              0 4cqw 10cqw rgba(0, 0, 0, 0.24);
}
.card.design-halo .card-heading { color: rgba(228, 238, 255, 0.86); }
.card.design-halo .card-heading .line { background: rgba(167, 218, 255, 0.58); }
.card.design-halo .card-days, .card.design-halo .pct { color: #ffffff; }
.card.design-halo .bar { background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 0.28cqw rgba(255,255,255,.18); }
.card.design-halo .bar-fill { box-shadow: 0 0 4cqw currentColor; }

/* ── Editorial — warm print card with offset shadow ── */
.card.design-editorial {
  background: rgba(250, 244, 226, 0.96);
  border: none;
  border-radius: 1.8cqw;
  color: #171a1f;
  text-align: left;
  box-shadow: 2cqw 2cqw 0 rgba(12, 17, 24, 0.84);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card.design-editorial .card-date,
.card.design-editorial .card-days { justify-content: flex-start; }
.card.design-editorial .card-heading { color: rgba(23, 26, 31, 0.72); }
.card.design-editorial .card-heading .line { background: rgba(23, 26, 31, 0.42); }
.card.design-editorial .card-heading .line:first-child { display: none; }
.card.design-editorial .bar { height: 4.2cqw; border-radius: 0; background: rgba(23, 26, 31, 0.12); box-shadow: none; }
.card.design-editorial .bar-fill { border-radius: 0; }
.card.design-editorial .card-days, .card.design-editorial .pct { color: #171a1f; }

/* ── Frame — light, open outline over the image ── */
.card.design-outline {
  background: rgba(8, 12, 18, 0.12);
  border: 0.55cqw solid rgba(255, 255, 255, 0.82);
  border-radius: 2.2cqw;
  color: #ffffff;
  box-shadow: none;
  text-shadow: 0 0.26cqw 3.2cqw rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card.design-outline .card-heading { color: rgba(255, 255, 255, 0.9); }
.card.design-outline .card-heading .line { background: rgba(255, 255, 255, 0.55); }
.card.design-outline .card-days, .card.design-outline .pct { color: #ffffff; }
.card.design-outline .bar { height: 4.8cqw; background: rgba(255,255,255,.18); border: 0.28cqw solid rgba(255,255,255,.62); box-shadow: none; }

/* ── Focus — large, centered open typography ── */
.card.design-focus {
  top: 52%;
  width: 88%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  text-shadow: 0 .35cqw 3.4cqw rgba(0,0,0,.62);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card.design-focus .card-date { font-size: 3.2cqw; letter-spacing: 1.35cqw; }
.card.design-focus .card-date svg { display: none; }
.card.design-focus .card-heading { margin-top: 2.8cqw; color: rgba(255,255,255,.92); font-size: 2.6cqw; }
.card.design-focus .card-heading .line { background: rgba(255,255,255,.68); }
.card.design-focus .card-days { display: block; margin-top: 1.8cqw; color: #fff; line-height: .82; }
.card.design-focus #daysNum { display: block; font-size: 24cqw; font-weight: 400; }
.card.design-focus .days-word { display: block; margin-top: 2.2cqw; font: 600 2.8cqw/1 'Inter', sans-serif; letter-spacing: 1.2cqw; text-transform: uppercase; }
.card.design-focus .card-progress { margin-top: 4.2cqw; }
.card.design-focus .bar { height: 1.4cqw; background: rgba(255,255,255,.30); box-shadow: none; }
.card.design-focus .pct { color: #fff; font-size: 3.2cqw; }

/* ── Caption — cinematic lower-third without a container ── */
.card.design-caption {
  top: 60%;
  width: 86%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  text-align: left;
  text-shadow: 0 .35cqw 3.4cqw rgba(0,0,0,.68);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card.design-caption .card-date,
.card.design-caption .card-days { justify-content: flex-start; }
.card.design-caption .card-date { font-size: 3cqw; letter-spacing: 1.15cqw; }
.card.design-caption .card-date svg { width: 3.7cqw; height: 3.7cqw; }
.card.design-caption .card-heading { margin-top: 2.5cqw; color: rgba(255,255,255,.88); }
.card.design-caption .card-heading .line { background: rgba(255,255,255,.58); }
.card.design-caption .card-heading .line:first-child { display: none; }
.card.design-caption .card-days { margin-top: 2.2cqw; color: #fff; }
.card.design-caption #daysNum { font-size: 18cqw; }
.card.design-caption .days-word { font: 500 3.5cqw/1 'Inter', sans-serif; letter-spacing: .35cqw; text-transform: uppercase; }
.card.design-caption .card-progress { margin-top: 3cqw; }
.card.design-caption .bar { height: 1.6cqw; background: rgba(255,255,255,.28); box-shadow: none; }
.card.design-caption .pct { color: #fff; font-size: 3.3cqw; }

/* ── Stack — editorial edge rule, still fully open to the photo ── */
.card.design-stack {
  top: 53%;
  width: 84%;
  padding: 0 0 0 5cqw;
  background: transparent;
  border: 0;
  border-left: .75cqw solid #fff5dc;
  border-radius: 0;
  box-shadow: none;
  color: #fff5dc;
  text-align: left;
  text-shadow: 0 .35cqw 3.4cqw rgba(0,0,0,.7);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card.design-stack .card-date,
.card.design-stack .card-days { justify-content: flex-start; }
.card.design-stack .card-date { font: 600 2.7cqw/1 'Inter', sans-serif; letter-spacing: 1.2cqw; }
.card.design-stack .card-date svg { display: none; }
.card.design-stack .card-heading { margin-top: 3cqw; color: rgba(255,245,220,.88); }
.card.design-stack .card-heading .line { background: rgba(255,245,220,.62); }
.card.design-stack .card-heading .line:first-child { display: none; }
.card.design-stack .card-days { margin-top: 2.4cqw; color: #fff5dc; }
.card.design-stack #daysNum { font-size: 21cqw; }
.card.design-stack .days-word { max-width: 14cqw; font: 600 3cqw/1.25 'Inter', sans-serif; letter-spacing: .35cqw; text-transform: uppercase; }
.card.design-stack .card-progress { margin-top: 3.4cqw; }
.card.design-stack .bar { height: 1.4cqw; background: rgba(255,245,220,.28); box-shadow: none; }
.card.design-stack .pct { color: #fff5dc; font-size: 3.2cqw; }

/* ── Signal — percentage-led open composition ── */
.card.design-signal {
  top: 51%;
  width: 86%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  text-shadow: 0 .35cqw 3.4cqw rgba(0,0,0,.68);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card.design-signal .card-date { font-size: 2.8cqw; letter-spacing: 1.15cqw; }
.card.design-signal .card-date svg { display: none; }
.card.design-signal .card-heading { margin-top: 2.5cqw; color: rgba(255,255,255,.86); }
.card.design-signal .card-heading .line { background: rgba(255,255,255,.58); }
.card.design-signal .card-days { margin-top: 3.2cqw; color: #fff; }
.card.design-signal #daysNum { font: 600 4.6cqw/1 'Inter', sans-serif; }
.card.design-signal .days-word { font: 500 3cqw/1 'Inter', sans-serif; letter-spacing: .55cqw; text-transform: uppercase; }
.card.design-signal .card-progress { flex-direction: column-reverse; gap: 2.5cqw; margin-top: 1.6cqw; }
.card.design-signal .bar { width: 72%; height: 1.5cqw; flex: none; background: rgba(255,255,255,.30); box-shadow: none; }
.card.design-signal .pct { min-width: 0; color: #fff; font: 300 19cqw/.9 'Inter', sans-serif; letter-spacing: -1.2cqw; text-align: center; }

.phone.frame-home .card.design-focus,
.screen.render-frame-home .card.design-focus,
.phone.frame-home .card.design-caption,
.screen.render-frame-home .card.design-caption,
.phone.frame-home .card.design-stack,
.screen.render-frame-home .card.design-stack,
.phone.frame-home .card.design-signal,
.screen.render-frame-home .card.design-signal { top: 47.5%; }

/* ── Aurora — dimensional jewel-tone glass ── */
.card.design-aurora {
  background: linear-gradient(135deg, rgba(25, 28, 76, 0.78), rgba(97, 47, 112, 0.67) 53%, rgba(10, 111, 106, 0.64));
  border-color: rgba(209, 226, 255, 0.38);
  color: #f7f4ff;
  box-shadow: inset 0 0 8cqw rgba(147, 217, 255, 0.10), 0 4cqw 11cqw rgba(12, 13, 46, 0.32);
}
.card.design-aurora .card-heading { color: rgba(243, 238, 255, 0.86); }
.card.design-aurora .card-heading .line { background: rgba(196, 229, 255, 0.48); }
.card.design-aurora .card-days, .card.design-aurora .pct { color: #ffffff; }
.card.design-aurora .bar { background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 0.28cqw rgba(255,255,255,.12); }

/* ── Ledger — structured dark panel with an accent spine ── */
.card.design-ledger {
  background: rgba(15, 29, 43, 0.96);
  border: none;
  border-left: 2cqw solid #f0ba5d;
  border-radius: 1.4cqw;
  color: #f4eddc;
  text-align: left;
  box-shadow: 0 4cqw 10cqw rgba(0, 0, 0, 0.30);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card.design-ledger .card-date,
.card.design-ledger .card-days { justify-content: flex-start; }
.card.design-ledger .card-heading { color: rgba(244, 237, 220, 0.76); }
.card.design-ledger .card-heading .line { background: rgba(244, 237, 220, 0.36); }
.card.design-ledger .card-heading .line:first-child { display: none; }
.card.design-ledger .card-days, .card.design-ledger .pct { color: #fff8e8; }
.card.design-ledger .bar { height: 4.4cqw; border-radius: 0; background: repeating-linear-gradient(90deg, rgba(244,237,220,.15) 0 5cqw, transparent 5cqw 5.8cqw); box-shadow: none; }
.card.design-ledger .bar-fill { border-radius: 0; }

/* ── Poster — bold modernist block ── */
.card.design-poster {
  background: rgba(37, 61, 183, 0.96);
  border: 0.55cqw solid rgba(255, 247, 223, 0.82);
  border-radius: 1.8cqw;
  color: #fff8e7;
  text-align: left;
  box-shadow: 2.2cqw 2.2cqw 0 rgba(255, 118, 95, 0.92);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card.design-poster .card-date,
.card.design-poster .card-days { justify-content: flex-start; }
.card.design-poster .card-heading { color: rgba(255, 248, 231, 0.82); }
.card.design-poster .card-heading .line { background: rgba(255, 248, 231, 0.52); }
.card.design-poster .card-heading .line:first-child { display: none; }
.card.design-poster .card-days, .card.design-poster .pct { color: #fff8e7; }
.card.design-poster .bar { height: 5cqw; background: rgba(255, 248, 231, 0.22); border-radius: 1cqw; box-shadow: none; }
.card.design-poster .bar-fill { border-radius: 0.7cqw; }

/* ── Editorial progress layouts — inspired by print countdown cards ── */
.card.design-countdown,
.card.design-breeze,
.card.design-horizon,
.card.design-chapter {
  width: 86%;
  padding: 4.2cqw 5cqw 4.5cqw;
  border-radius: 3cqw;
  text-align: left;
}
.card.design-countdown .card-kicker,
.card.design-breeze .card-kicker,
.card.design-horizon .card-kicker,
.card.design-chapter .card-kicker {
  display: flex;
  align-items: center;
  gap: 2.2cqw;
  font: 600 2.7cqw/1 'Inter', sans-serif;
  letter-spacing: 1.45cqw;
  text-transform: uppercase;
}
.card-kicker .kicker-mark {
  position: relative;
  width: 5.4cqw;
  height: 5.4cqw;
  flex: 0 0 5.4cqw;
  border: .38cqw solid currentColor;
  border-radius: 50%;
}
.card-kicker .kicker-mark::before,
.card-kicker .kicker-mark::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 1.4cqw;
  height: 1.4cqw;
  border: .3cqw solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}
.card-kicker .kicker-mark::before { top: .72cqw; }
.card-kicker .kicker-mark::after { bottom: .72cqw; }
.card.design-countdown .card-date,
.card.design-breeze .card-date,
.card.design-horizon .card-date,
.card.design-chapter .card-date {
  justify-content: flex-start;
  margin-top: 3.2cqw;
  font: 400 9.2cqw/.95 'Inter', sans-serif;
  letter-spacing: -.28cqw;
}
.card.design-countdown .card-date svg,
.card.design-breeze .card-date svg,
.card.design-horizon .card-date svg,
.card.design-chapter .card-date svg { display: none; }
.card.design-countdown .card-heading,
.card.design-breeze .card-heading,
.card.design-horizon .card-heading,
.card.design-chapter .card-heading {
  justify-content: flex-start;
  gap: 2.6cqw;
  margin-top: 3.2cqw;
  font: 400 3.25cqw/1.3 'Cormorant Garamond', serif;
  letter-spacing: .05cqw;
  text-transform: none;
}
.card.design-countdown .card-heading .line:first-child,
.card.design-breeze .card-heading .line:first-child,
.card.design-horizon .card-heading .line:first-child,
.card.design-chapter .card-heading .line:first-child { flex: 0 0 8cqw; height: .5cqw; }
.card.design-countdown .card-heading .line:last-child,
.card.design-breeze .card-heading .line:last-child,
.card.design-horizon .card-heading .line:last-child,
.card.design-chapter .card-heading .line:last-child { display: none; }
.card.design-countdown .card-days,
.card.design-breeze .card-days,
.card.design-horizon .card-days,
.card.design-chapter .card-days {
  justify-content: flex-start;
  gap: 1.8cqw;
  margin-top: 4.2cqw;
  font-family: 'Inter', sans-serif !important;
  line-height: 1;
}
.card.design-countdown #daysNum,
.card.design-breeze #daysNum,
.card.design-horizon #daysNum,
.card.design-chapter #daysNum { font-size: 3.8cqw; font-weight: 700 !important; }
.card.design-countdown .days-word,
.card.design-breeze .days-word,
.card.design-horizon .days-word,
.card.design-chapter .days-word { display: none; }
.card.design-countdown .card-total,
.card.design-breeze .card-total,
.card.design-horizon .card-total,
.card.design-chapter .card-total {
  display: inline;
  font: 500 2.45cqw/1 'Inter', sans-serif;
  letter-spacing: .5cqw;
  text-transform: uppercase;
  opacity: .72;
}
.card.design-countdown .card-progress,
.card.design-breeze .card-progress,
.card.design-horizon .card-progress,
.card.design-chapter .card-progress {
  position: relative;
  display: block;
  margin-top: 2.6cqw;
}
.card.design-countdown .pct,
.card.design-breeze .pct,
.card.design-horizon .pct,
.card.design-chapter .pct {
  position: absolute;
  right: 0;
  bottom: calc(100% + 2.2cqw);
  min-width: 0;
  font: 500 5.8cqw/1 'Inter', sans-serif;
}
.card.design-countdown .bar,
.card.design-breeze .bar,
.card.design-horizon .bar,
.card.design-chapter .bar { width: 100%; height: 5.6cqw; box-shadow: none; }

/* Warm coral interpretation of the first reference. */
.card.design-countdown {
  background: rgba(255, 250, 243, 0.84);
  border-color: rgba(255, 255, 255, 0.62);
  color: #514e4c;
  box-shadow: 0 3cqw 10cqw rgba(80, 55, 42, .12);
}
.card.design-countdown .card-kicker, .card.design-countdown #daysNum, .card.design-countdown .pct { color: #ef6c55; }
.card.design-countdown .card-heading { color: #696562; }
.card.design-countdown .card-heading .line { background: #ff765f; }
.card.design-countdown .card-days { color: #514e4c; }
.card.design-countdown .bar { padding: 1cqw; background: rgba(255,118,95,.10); border: .35cqw solid rgba(255,118,95,.18); }

/* Airy blue interpretation of the second reference. */
.card.design-breeze {
  background: rgba(240, 248, 251, 0.82);
  border-color: rgba(255, 255, 255, 0.72);
  color: #40505a;
  box-shadow: 0 3cqw 10cqw rgba(34, 69, 88, .10);
}
.card.design-breeze .card-kicker { justify-content: center; color: #497387; }
.card.design-breeze .kicker-mark { display: none; }
.card.design-breeze .card-date { justify-content: center; }
.card.design-breeze .card-heading { justify-content: center; color: #60707a; }
.card.design-breeze .card-heading .line:last-child { display: block; flex: 0 0 8cqw; height: .5cqw; }
.card.design-breeze .card-heading .line { background: #7ec4e4; }
.card.design-breeze .card-days, .card.design-breeze .pct { color: #497387; }
.card.design-breeze .bar { background: rgba(126,196,228,.16); }

/* Dark cinematic version with the same information hierarchy. */
.card.design-horizon {
  background: rgba(10, 25, 36, 0.74);
  border-color: rgba(255, 255, 255, 0.20);
  color: #f4f7f5;
  box-shadow: 0 4cqw 12cqw rgba(0,0,0,.30);
}
.card.design-horizon .card-kicker, .card.design-horizon #daysNum, .card.design-horizon .pct { color: #ffc983; }
.card.design-horizon .card-heading { color: rgba(244,247,245,.74); }
.card.design-horizon .card-heading .line { background: #ffc983; }
.card.design-horizon .card-days { color: #f4f7f5; }
.card.design-horizon .bar { background: rgba(255,255,255,.14); border-radius: 1cqw; }
.card.design-horizon .bar-fill { border-radius: .7cqw; }

/* Quiet, bookish variant for long-term goals. */
.card.design-chapter {
  background: rgba(250, 244, 231, 0.96);
  border-color: rgba(75, 58, 47, 0.20);
  border-left: 1.4cqw solid #bc8a66;
  border-radius: .8cqw 3cqw 3cqw .8cqw;
  color: #443a34;
  box-shadow: 1.8cqw 2.2cqw 0 rgba(68,58,52,.18);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card.design-chapter .card-kicker { color: #8b6349; }
.card.design-chapter .card-date { font-family: 'Italiana', 'Cormorant Garamond', serif; }
.card.design-chapter .card-heading { color: #75665d; }
.card.design-chapter .card-heading .line { background: #bc8a66; }
.card.design-chapter .card-days, .card.design-chapter .pct { color: #443a34; }
.card.design-chapter .bar { height: 3.8cqw; border-radius: 0; background: rgba(68,58,52,.12); }
.card.design-chapter .bar-fill { border-radius: 0; }

/* Manual text colour — kept after every design rule so it consistently
   recolours the complete information system while preserving each layout. */
.card.has-custom-text-color,
.card.has-custom-text-color .card-date,
.card.has-custom-text-color .card-heading,
.card.has-custom-text-color .card-days,
.card.has-custom-text-color #daysNum,
.card.has-custom-text-color .days-word,
.card.has-custom-text-color .card-total,
.card.has-custom-text-color .pct,
.card.has-custom-text-color .card-kicker {
  color: var(--card-text-color) !important;
}
.card.has-custom-text-color .card-heading .line {
  background: rgba(255, 255, 255, .35);
  background: color-mix(in srgb, var(--card-text-color) 58%, transparent) !important;
}
.card.has-custom-text-color .bar {
  background: rgba(255, 255, 255, .14);
  background: color-mix(in srgb, var(--card-text-color) 16%, transparent) !important;
  border-color: color-mix(in srgb, var(--card-text-color) 28%, transparent) !important;
  box-shadow: none;
}
.card.has-custom-text-color.design-stack { border-left-color: var(--card-text-color); }

/* ══════════════════ LICENSE / UPGRADE MODAL ══════════════════ */

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  padding: 20px;
}
.modal.hidden { display: none; }

.modal-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
  width: min(400px, 100%);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  position: relative;
}
.modal-card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; color: #0f172a; }
.modal-sub { color: #64748b; font-size: 14px; margin: 0 0 14px; line-height: 1.5; }
.modal-link { margin: 0 0 6px; }
.modal-link a { color: #111827; font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 2px; }
.modal-divider { color: #94a3b8; font-size: 12px; text-align: center; margin: 16px 0 10px; position: relative; }
.modal-divider::before,
.modal-divider::after { content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: #e5e7eb; }
.modal-divider::before { left: 0; }
.modal-divider::after { right: 0; }

.modal-card input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  color: #111827;
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.modal-card input[type="text"]:focus { outline: none; border-color: #111827; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}
.modal-close:hover { color: #111827; }

/* ── Shortcut modal ── */
.shortcut-card { width: min(440px, 100%); }
.shortcut-url-box { display: flex; gap: 8px; margin: 4px 0 16px; }
.shortcut-url-box input[type="text"] {
  flex: 1;
  margin-bottom: 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shortcut-copy { padding: 10px 16px; font-size: 13px; border-radius: 8px; flex-shrink: 0; }
.shortcut-qr {
  display: block;
  margin: 0 auto 16px;
  width: 180px;
  height: 180px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 8px;
}
.shortcut-steps {
  margin: 0;
  padding-left: 18px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}
.shortcut-steps strong { color: #0f172a; }

/* ══════════════════ RESPONSIVE ══════════════════ */

@media (max-width: 880px) {
  body { flex-direction: column; }
  .panel { width: 100%; border-right: none; border-bottom: 1px solid #e5e7eb; }
  .stage { padding: 40px 20px; }
  .phone-shell { width: min(78vw, 320px); }
}
