:root {
  --saffron: #E0561B;
  --magenta: #C2185B;
  --gold: #E8A100;
  --cream: #FFF7EC;
  --ink: #2A1A12;
  --muted: #7c6a5f;
  --card: #ffffff;
  --shadow: 0 6px 20px rgba(80, 30, 10, 0.10);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--saffron) 0%, var(--magenta) 70%, #7B1E3B 100%);
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 38px) 20px 30px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
}
.hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }
.hero-eyebrow {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  opacity: 0.85; margin-bottom: 6px;
}
.hero-eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hero h1 { margin: 0; font-size: 38px; font-weight: 800; letter-spacing: -0.5px; }
.hero p { margin: 4px 0 0; font-size: 18px; opacity: 0.95; }
.hero-dates { font-size: 14px !important; opacity: 0.8 !important; margin-top: 8px !important; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 60px; }

/* OFFLINE BAR */
.offline-bar {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin: -22px 0 26px;
  position: relative; z-index: 2;
}
.offline-text { flex: 1; font-size: 14px; line-height: 1.4; }
.offline-text strong { display: block; color: var(--saffron); margin-bottom: 2px; font-size: 15px; }
.offline-text span { color: var(--muted); }
.btn-download {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--saffron), var(--magenta));
  color: #fff; border: none; border-radius: 999px;
  padding: 11px 20px; font-size: 15px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 12px rgba(194,24,91,0.3);
}
.btn-download:disabled { opacity: 0.7; cursor: default; }
.btn-download.done { background: #2E7D32; box-shadow: none; }

/* CITY */
.city { margin-bottom: 30px; }
.city-head {
  display: flex; align-items: center; gap: 10px;
  margin: 0 4px 14px;
}
.city-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.city-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.city-head .count { color: var(--muted); font-size: 14px; font-weight: 500; }

/* CARD */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
  margin-bottom: 14px;
  border-left: 5px solid var(--saffron);
}
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.card .dur { flex-shrink: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.card .desc { margin: 6px 0 12px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.card audio { width: 100%; height: 38px; }

.card-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.btn-save {
  background: transparent; border: 1.5px solid #e3d6c8; color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-save.saved { border-color: #2E7D32; color: #2E7D32; background: #eef7ee; }
.badge-offline { font-size: 12px; color: #2E7D32; font-weight: 600; display: none; }

/* FOOTER */
.site-footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 30px; line-height: 1.6; }
.site-footer .muted { font-size: 12px; opacity: 0.8; }

/* INSTALL HINT */
.install-hint {
  position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 12px);
  background: var(--ink); color: #fff; border-radius: 14px;
  padding: 14px 40px 14px 16px; font-size: 14px; line-height: 1.4;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3); max-width: 740px; margin: 0 auto;
}
.install-hint button {
  position: absolute; right: 8px; top: 8px; background: none; border: none;
  color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.hidden { display: none; }

@media (min-width: 640px) {
  .hero h1 { font-size: 46px; }
}
