/* ── UPDATE BANNER (top) ──────────────────────────────────────────────────── */
#updateBanner {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #3a86ff 0%, #7b5ea7 100%);
  color: #fff;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
  font-family: 'Outfit', sans-serif;
}
#updateBanner.visible {
  display: flex;
  transform: translateY(0);
}
#updateBanner button {
  background: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 5px 14px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  transition: background 0.15s;
  flex-shrink: 0;
}
#updateBanner button:hover { background: rgba(255, 255, 255, 0.35); }
#updateBanner .banner-dismiss {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  padding: 2px 6px;
  opacity: 0.7;
}

/* ── OFFLINE BAR (bottom) ─────────────────────────────────────────────────── */
#offlineBar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9998;
  background: var(--text);
  color: var(--bg);
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  font-family: 'Outfit', sans-serif;
}
#offlineBar.visible { display: block; }

/* ── INSTALL BANNER (bottom float) ───────────────────────────────────────── */
#installBanner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 9997;
  width: calc(100% - 32px);
  max-width: 440px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(44, 40, 37, 0.18), 0 2px 8px rgba(44, 40, 37, 0.08);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  font-family: 'Outfit', sans-serif;
  pointer-events: none;
}
#installBanner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}
#installBanner .install-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #faf8f5 0%, #f0e8ff 100%);
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
#installBanner .install-text { flex: 1; min-width: 0; }
#installBanner .install-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
#installBanner .install-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#installBanner .install-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.install-btn {
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.15s;
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.install-btn-primary {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #e040fb 100%);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 4px 18px rgba(238, 90, 36, 0.45), 0 1px 4px rgba(0, 0, 0, 0.15);
  animation: installPulse 2.4s ease-in-out infinite;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.01em;
}
@keyframes installPulse {
  0%   { box-shadow: 0 4px 18px rgba(238,90,36,0.45), 0 0 0 0 rgba(238,90,36,0.35); background-position: 0% 50%; }
  50%  { box-shadow: 0 4px 24px rgba(224,64,251,0.45), 0 0 0 7px rgba(238,90,36,0); background-position: 100% 50%; }
  100% { box-shadow: 0 4px 18px rgba(238,90,36,0.45), 0 0 0 0 rgba(238,90,36,0); background-position: 0% 50%; }
}
.install-btn-primary:hover {
  transform: scale(1.07) translateY(-1px);
  box-shadow: 0 6px 24px rgba(238, 90, 36, 0.55), 0 2px 6px rgba(0, 0, 0, 0.18);
  animation: none;
  background-position: 100% 50%;
}
.install-btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(238, 90, 36, 0.35);
}
.install-btn-dismiss {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.install-btn-dismiss:hover { background: var(--hover); color: var(--text); }

/* ── iOS INSTALL INSTRUCTIONS SHEET ──────────────────────────────────────── */
#iosInstallSheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 10000;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  border-top: 1.5px solid var(--border);
  padding: 20px 24px 32px;
  box-shadow: 0 -8px 40px rgba(44, 40, 37, 0.16);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.1, 0.64, 1);
  font-family: 'Outfit', sans-serif;
}
#iosInstallSheet.visible { transform: translateY(0); }
.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.sheet-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 6px;
}
.sheet-sub {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.5;
}
.sheet-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-text {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.5;
}
.step-text strong { font-weight: 700; }
.sheet-close {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.sheet-close:hover { background: var(--hover); color: var(--text); }
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(44, 40, 37, 0.4);
  z-index: -1;
  backdrop-filter: blur(3px);
}
