:root {
  --es-red: #c60b1e;
  --es-red-dark: #9b111e;
  --es-yellow: #f1bf00;
  --es-yellow-soft: #fff3c4;
  --ink: #2a1215;
  --muted: #6b4f52;
  --paper: #fffaf0;
  --card: rgba(255, 255, 255, 0.9);
  --line: rgba(42, 18, 21, 0.1);
  --accent: var(--es-red);
  --accent-2: var(--es-red-dark);
  --warm: #c98500;
  --good: #1b7f5a;
  --warn: #a15c00;
  --danger: #aa151b;
  --shadow: 0 18px 50px rgba(155, 17, 30, 0.16);
  --radius: 22px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: #fcecc8;
  -webkit-tap-highlight-color: transparent;
}
body { min-height: 100dvh; }
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(241, 191, 0, 0.42) 0%, transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(198, 11, 30, 0.14) 0%, transparent 50%),
    linear-gradient(165deg, #fff8e7 0%, #fcecc8 45%, #f8dfaa 100%);
}
.app {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 18px 16px calc(110px + env(safe-area-inset-bottom));
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  animation: rise 0.45s ease both;
}
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.flag-strip {
  width: 6px;
  height: 42px;
  border-radius: 999px;
  flex-shrink: 0;
  background: linear-gradient(
    to bottom,
    var(--es-red) 0%,
    var(--es-red) 25%,
    var(--es-yellow) 25%,
    var(--es-yellow) 75%,
    var(--es-red) 75%,
    var(--es-red) 100%
  );
  box-shadow: 0 2px 8px rgba(155, 17, 30, 0.22);
}
.brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.tag { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }
a { color: var(--accent); font-weight: 600; }
.hero a { color: var(--es-yellow-soft); }
.hero, .card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(16, 36, 31, 0.05);
  animation: rise 0.4s ease both;
}
.hero {
  padding: 26px 22px;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(198, 11, 30, 0.97), rgba(155, 17, 30, 0.94) 55%, rgba(120, 12, 20, 0.92)),
    url("data:image/svg+xml,%3Csvg width='160' height='160' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 80h160M80 0v160' stroke='rgba(255,255,255,.06)'/%3E%3C/svg%3E");
  color: #fffaf0;
  box-shadow: var(--shadow);
}
.hero h1 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1.15;
}
.hero p { margin: 0 0 16px; opacity: 0.92; line-height: 1.45; max-width: 36ch; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.card h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  font-family: var(--display);
}
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(198, 11, 30, 0.1);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}
.chip.warn { background: rgba(161, 92, 0, 0.12); color: var(--warn); }
.chip.muted { background: rgba(198, 11, 30, 0.06); color: var(--muted); }
.chip.good { background: rgba(27, 127, 90, 0.12); color: var(--good); }
.price { font-weight: 800; font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; line-height: 1.4; }
button, .btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  min-height: 46px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
button:active { transform: translateY(1px) scale(0.98); }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.primary {
  background: linear-gradient(180deg, var(--es-red) 0%, var(--es-red-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(198, 11, 30, 0.22);
}
.primary:disabled { opacity: 0.5; cursor: not-allowed; }
a.btn-link {
  display: block;
  text-align: center;
  text-decoration: none;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 1rem;
}
.secondary { background: rgba(241, 191, 0, 0.18); color: var(--ink); }
.ghost { background: transparent; color: var(--accent); padding: 8px 10px; font-weight: 700; }
.danger { background: rgba(180, 35, 24, 0.1); color: var(--danger); }
label {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  flex: 1;
  min-width: 120px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: rgba(255,255,255,0.92);
}
textarea { min-height: 100px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}
.check input { width: auto; }
.tabs {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(680px, calc(100% - 20px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  z-index: 50;
}
.tabs[hidden] {
  display: none !important;
}
[hidden] {
  display: none !important;
}
.tab {
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  padding: 12px 8px;
  min-height: 46px;
}
.tab.active {
  background: linear-gradient(180deg, rgba(241, 191, 0, 0.28), rgba(198, 11, 30, 0.1));
  color: var(--accent);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  max-width: min(90vw, 420px);
  z-index: 60;
  animation: rise 0.25s ease both;
}
.empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  line-height: 1.45;
}
.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(198, 11, 30, 0.1);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--es-red), var(--es-yellow));
  transition: width 0.35s ease;
}
.checklist-items {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}
.checklist-items li {
  padding: 6px 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.checklist-items li.done {
  color: var(--ink);
}
.legal details {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 0;
}
.legal details:first-of-type {
  border-top: none;
}
.legal summary {
  cursor: pointer;
  font-weight: 600;
}
.wizard-steps {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.wizard-steps span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(0,0,0,.06);
  color: var(--muted);
}
.wizard-steps span.on {
  background: linear-gradient(145deg, var(--es-yellow-soft), rgba(241, 191, 0, 0.5));
  color: var(--es-red-dark);
}
.banner-promo {
  background: rgba(241, 191, 0, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  margin: 0;
}
.skeleton {
  height: 92px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(241,191,0,.25), rgba(255,255,255,.75), rgba(241,191,0,.25));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  flex-shrink: 0;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--es-yellow-soft), rgba(241, 191, 0, 0.45));
  color: var(--es-red-dark);
  font-weight: 800;
  font-size: 0.95rem;
  border: 2px solid rgba(198, 11, 30, 0.12);
}
.avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  font-size: 1.2rem;
}
.card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.card-head-body { flex: 1; min-width: 0; }
.card-head h3 { margin: 0; }
.fav-btn.on { color: var(--es-yellow); }
.card-flat { box-shadow: none; margin: 0; }
.panel-ok { background: rgba(198, 11, 30, 0.08); box-shadow: none; }
.panel-gold { background: rgba(241, 191, 0, 0.14); box-shadow: none; }
.panel-warn { background: rgba(180, 35, 24, 0.06); box-shadow: none; }
.banner-warn {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(241, 191, 0, 0.28);
  border: 1px solid rgba(198, 11, 30, 0.15);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.section-title {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.05rem;
}
.faq details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.faq details:first-of-type { border-top: 0; padding-top: 0; }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 8px 0 0; }
.disclaimer {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  padding: 12px 14px;
  border-left: 3px solid var(--es-yellow);
  background: rgba(241, 191, 0, 0.12);
  border-radius: 0 14px 14px 0;
}
.badge-demo {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(241, 191, 0, 0.22);
  color: #8a5a00;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat {
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
}
.photo-picker { display: grid; gap: 8px; }
.photo-drop {
  display: grid;
  justify-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
  text-align: center;
}
.photo-drop-label { font-weight: 700; color: var(--ink); }
.photo-preview {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid rgba(198, 11, 30, 0.12);
}
.photo-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--es-yellow-soft), rgba(241, 191, 0, 0.45));
  color: var(--es-red-dark);
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
