:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: rgba(25, 34, 51, 0.78);
  --panel-strong: rgba(35, 45, 67, 0.92);
  --text: #f7f7fb;
  --muted: #c7c9d8;
  --soft: #8f96ad;
  --line: rgba(255, 255, 255, 0.15);
  --accent: #8b35ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 28px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 6%, rgba(139, 53, 255, 0.42), transparent 32%),
    radial-gradient(circle at 96% 0, rgba(32, 151, 255, 0.22), transparent 36%),
    linear-gradient(135deg, #111022 0, #07111f 62%, #071827 100%);
}

body.light {
  color-scheme: light;
  --bg: #f4f6fb;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.95);
  --text: #101827;
  --muted: #334155;
  --soft: #64748b;
  --line: rgba(15, 23, 42, 0.14);
  background:
    radial-gradient(circle at 12% 6%, rgba(139, 53, 255, 0.18), transparent 32%),
    radial-gradient(circle at 96% 0, rgba(32, 151, 255, 0.14), transparent 36%),
    linear-gradient(135deg, #f8f7ff 0, #f4f6fb 70%, #eef7ff 100%);
}

/* Bloqueo total de cualquier banner viejo que haya quedado cacheado */
.update-banner,
.version-banner,
#updateBanner,
#versionBanner,
[data-update-banner] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

a { color: inherit; }

.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-weight: 900;
  font-size: 24px;
}

.brand-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(139, 53, 255, 0.32);
}

.build-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #dfffe7;
  background: rgba(20, 184, 116, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.45);
  padding: 5px 8px;
  border-radius: 999px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.apple-help,
.floating-apple-help {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line);
  text-decoration: none;
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.apple-help {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

.floating-apple-help {
  position: fixed !important;
  right: 18px !important;
  bottom: calc(18px + env(safe-area-inset-bottom)) !important;
  z-index: 2147483647 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

.icon-button {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.hero { margin-bottom: 34px; }

.eyebrow {
  font-weight: 900;
  color: #d8d4ff;
  margin: 0 0 14px;
  font-size: 22px;
}

.hero h1 {
  font-size: clamp(48px, 8vw, 94px);
  line-height: 0.96;
  letter-spacing: -0.075em;
  max-width: 1080px;
  margin: 0 0 24px;
}

.hero-copy {
  max-width: 880px;
  color: var(--muted);
  font-size: clamp(21px, 2.5vw, 29px);
  line-height: 1.45;
  margin: 0 0 32px;
}

.chips,
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.chips span,
.filters button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
}

.chips span { padding: 11px 18px; font-size: 20px; }

.search-panel,
.recipe-list-card,
.recipe-detail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.search-panel { padding: 24px; margin-bottom: 24px; }

.search-panel label {
  display: block;
  font-weight: 900;
  color: var(--muted);
  font-size: 22px;
  margin: 0 0 12px;
}

.search-panel input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 22px;
  border-radius: 24px;
  padding: 18px 20px;
  margin-bottom: 18px;
  outline: none;
}

.search-panel input:focus {
  border-color: rgba(139, 53, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(139, 53, 255, 0.18);
}

.filters button {
  padding: 11px 18px;
  font-size: 18px;
  cursor: pointer;
}

.filters button.active {
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-color: transparent;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 520px) 1fr;
  gap: 24px;
}

.recipe-list-card,
.recipe-detail { padding: 24px; }

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title-row h2 { font-size: 30px; margin: 0; }
.section-title-row span { color: var(--soft); font-weight: 800; font-size: 20px; }

.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.recipe-button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 22px;
  padding: 18px 20px;
  cursor: pointer;
}

.recipe-button.active { border-color: #994dff; background: rgba(139, 53, 255, 0.28); }
.recipe-button strong { display: block; font-size: 20px; margin-bottom: 7px; }
.recipe-button span { color: var(--soft); font-size: 17px; }

.recipe-detail h2 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 8px 0 14px;
}

.recipe-detail .category { color: #d8d4ff; font-size: 20px; font-weight: 900; margin: 0; }
.recipe-detail .description { color: var(--muted); font-size: 22px; line-height: 1.45; margin: 0 0 24px; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.meta-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 16px;
}

.meta-card span {
  display: block;
  color: var(--soft);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta-card strong { display: block; font-size: 18px; margin-top: 5px; }
.detail-section { margin-top: 26px; }
.detail-section h3 { font-size: 24px; margin: 0 0 12px; }

.action-list {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.action-list li {
  counter-increment: step;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 15px 16px 15px 54px;
  position: relative;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.action-list li::before {
  content: counter(step);
  position: absolute;
  left: 15px;
  top: 15px;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(139, 53, 255, 0.28);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.action-name {
  display: inline-block;
  color: #fff;
  background: rgba(139, 53, 255, 0.24);
  border: 1px solid rgba(168, 85, 247, 0.48);
  border-radius: 12px;
  padding: 2px 7px;
  font-weight: 950;
}

.note {
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.12);
  border-radius: 18px;
  padding: 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.empty { color: var(--muted); font-size: 20px; }

@media (max-width: 850px) {
  .app-shell { width: min(100% - 28px, 1180px); padding-top: 18px; }
  .topbar { margin-bottom: 46px; }
  .brand { font-size: 20px; }
  .brand-icon { width: 48px; height: 48px; }
  .apple-help { font-size: 13px; padding: 0 12px; }
  .hero h1 { font-size: 48px; }
  .hero-copy { font-size: 20px; }
  .content-grid { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
  .floating-apple-help { right: 12px !important; bottom: calc(12px + env(safe-area-inset-bottom)) !important; }
  .recipe-list { max-height: 360px; }
}

@media (max-width: 520px) {
  .topbar { align-items: flex-start; }
  .top-actions { flex-direction: column; align-items: flex-end; }
  .apple-help { min-height: 38px; }
  .icon-button { width: 46px; height: 46px; }
  .hero h1 { font-size: 42px; }
  .chips span { font-size: 16px; }
  .search-panel input { font-size: 18px; }
  .recipe-detail h2 { font-size: 36px; }
  .floating-apple-help { font-size: 12px; min-height: 38px; padding: 0 12px; }
}
