/* ============================================================
   zamzam.css — ZamZam PWA Canonical Design System
   Single source of truth. No overrides. No !important wars.
   2026-05-18 — spec by FRIDAY, built by NEON
   ============================================================ */

@import url('/lib/fonts.css');

:root {
  /* ── BRAND ─────────────────────────────────────────────── */
  --zz-accent:        #22d3ee;
  --zz-accent-dim:    rgba(34,211,238,0.45);
  --zz-accent-glow:   rgba(34,211,238,0.65);
  --zz-accent-bg:     rgba(34,211,238,0.06);
  --zz-accent-border: rgba(34,211,238,0.30);

  /* ── PURPLE (rank/power) ────────────────────────────────── */
  --zz-purple:        #9d3eff;
  --zz-purple-glow:   rgba(157,62,255,0.55);

  /* ── SURFACE ────────────────────────────────────────────── */
  --zz-bg:            #000814;
  --zz-surface:       rgba(0,8,20,0.85);
  --zz-surface-2:     rgba(0,20,40,0.60);
  --zz-border:        rgba(34,211,238,0.30);
  --zz-border-dim:    rgba(34,211,238,0.12);
  --zz-border-subtle: rgba(255,255,255,0.06);

  /* ── TEXT ───────────────────────────────────────────────── */
  --zz-text:          #e6f1ff;
  --zz-text-dim:      rgba(230,241,255,0.55);
  --zz-text-muted:    rgba(230,241,255,0.35);

  /* ── SEMANTIC STATE ─────────────────────────────────────── */
  --zz-success:       #10d982;
  --zz-danger:        #f43f5e;
  --zz-warning:       #fbbf24;
  --zz-gold:          #ffd700;

  /* ── SPACING ────────────────────────────────────────────── */
  --zz-space-1:  4px;
  --zz-space-2:  8px;
  --zz-space-3: 12px;
  --zz-space-4: 16px;
  --zz-space-5: 24px;
  --zz-space-6: 32px;

  /* ── RADIUS ─────────────────────────────────────────────── */
  --zz-radius-sm:   4px;
  --zz-radius-md:   8px;
  --zz-radius-lg:  12px;
  --zz-radius-pill: 999px;

  /* ── TYPOGRAPHY ─────────────────────────────────────────── */
  --zz-font-sans:    'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --zz-font-mono:    'Geist Mono', 'JetBrains Mono', monospace;
  --zz-font-display: 'Orbitron', sans-serif;

  /* ── ANIMATION ──────────────────────────────────────────── */
  --zz-ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --zz-ease-smooth:    cubic-bezier(0.4, 0, 0.2, 1);
  --zz-duration-fast:  150ms;
  --zz-duration-base:  250ms;
  --zz-duration-slow:  400ms;

  /* ── Z-INDEX ─────────────────────────────────────────────── */
  --zz-z-fx:       0;
  --zz-z-content:  2;
  --zz-z-overlay: 10;
  --zz-z-nav:    100;
  --zz-z-sysbar:  50;
  --zz-z-toast:  200;

  /* ── JS COMPAT ALIASES (getComputedStyle callers in stats.js/history.js/solo-fx.js) ── */
  --sys-cyan:      var(--zz-accent);
  --sys-cyan-dim:  var(--zz-accent-dim);
  --sys-cyan-glow: var(--zz-accent-glow);
  --sys-purple:    var(--zz-purple);
  --primary:       var(--zz-accent);
  --success:       var(--zz-success);
  --warning:       var(--zz-warning);
  --gray-300:      rgba(230,241,255,0.35);
}

/* focus-visible — WCAG 2.2 §2.4.11 */
:focus-visible {
  outline: 2px solid var(--zz-accent);
  outline-offset: 2px;
}



/* ======== BASE (from styles.css) ======== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


body.dark-mode {
  --bg: #060d1a;
  --card-bg: #0c1929;
  --text: #d4e3f5;
  --text-secondary: #6889b0;
  --gray-100: #0c1929;
  --gray-200: #152640;
  --gray-300: #1e3355;
  --primary: var(--zz-accent);
  --primary-dark: #3a8fd6;
  --primary-light: rgba(77, 168, 240, 0.08);
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--zz-bg);
  min-height: 100vh;
  color: var(--zz-text);
  transition: background 0.3s, color 0.3s;
}

/* Light mode: soft water gradient */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(30, 108, 181, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

/* Dark mode: deep ocean gradient */
body.dark-mode::after {
  background:
    radial-gradient(ellipse 60% 50% at 15% 10%, rgba(77, 168, 240, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(59, 130, 246, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(30, 108, 181, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(96, 165, 250, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 40% 50% at 10% 85%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 100px;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 16px;
}

header h1 {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--zz-accent), var(--zz-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-logo {
  height: 90px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(30, 108, 181, 0.3));
}

body.dark-mode .header-logo {
  filter: drop-shadow(0 2px 8px rgba(77, 168, 240, 0.4)) brightness(1.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--zz-surface);
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--zz-text);
}

.icon-btn:hover {
  background: rgba(0,20,40,0.60);
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--zz-surface);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--zz-text-dim);
  font-size: 10px;
  padding: 4px 6px;
  transition: color 0.2s;
}

.nav-item.active {
  color: var(--zz-accent);
}

.nav-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

/* Cards */
.card {
  background: var(--zz-surface);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toggle items */
.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,20,40,0.60);
}

.toggle-item:last-child {
  border-bottom: none;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.toggle-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.prayer-time {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--zz-accent);
  background: var(--zz-accent-bg);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(230,241,255,0.35);
  border-radius: 28px;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--zz-accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* 3-state prayer button */
.state-btn {
  width: 44px;
  height: 44px;
  border: 2.5px solid rgba(230,241,255,0.35);
  background: transparent;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
  color: var(--zz-text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.state-btn:active { transform: scale(0.85); }

.state-btn.done {
  border-color: transparent;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.state-btn.missed {
  border-color: transparent;
  background: linear-gradient(135deg, #f56565, #dc2626);
  color: white;
  box-shadow: 0 2px 10px rgba(245, 101, 101, 0.4);
}

.state-btn.readonly,
.istighfar-btn.readonly {
  opacity: 0.35;
  pointer-events: none;
}

/* Istighfar counter */
.istighfar-total {
  font-size: 28px;
  font-weight: 700;
  color: var(--zz-accent);
  text-align: center;
  padding: 8px 0 12px;
}

.istighfar-add {
  display: flex;
  gap: 8px;
  align-items: center;
}

.istighfar-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--zz-accent), var(--zz-accent));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.istighfar-btn:hover { opacity: 0.9; }
.istighfar-btn:active { transform: scale(0.97); }

/* Progress bar */
.progress-bar-container {
  background: rgba(0,20,40,0.60);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--zz-accent), var(--zz-accent));
  border-radius: 8px;
  transition: width 0.4s ease;
}

/* Date header */
.date-header {
  text-align: center;
  margin-bottom: 16px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

.date-header-day {
  font-size: 28px;
  font-weight: 700;
  color: var(--zz-accent);
}

.date-header-info {
  font-size: 14px;
  color: var(--zz-text-dim);
  margin-top: 2px;
}

.date-today-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: var(--zz-accent);
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.date-today-btn:active { opacity: 0.8; }

/* Date slide animations */
.slide-out-left {
  animation: slideOutLeft 0.15s ease-in forwards;
}
.slide-out-right {
  animation: slideOutRight 0.15s ease-in forwards;
}
.slide-in-left {
  animation: slideInLeft 0.2s ease-out forwards;
}
.slide-in-right {
  animation: slideInRight 0.2s ease-out forwards;
}

@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-40px); opacity: 0; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(40px); opacity: 0; }
}
@keyframes slideInLeft {
  from { transform: translateX(-40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.progress-text {
  font-size: 13px;
  color: var(--zz-text-dim);
  text-align: right;
  margin-top: 2px;
}

/* Text input in card */
.text-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid rgba(0,20,40,0.60);
  border-radius: 10px;
  font-size: 15px;
  background: var(--zz-bg);
  color: var(--zz-text);
  transition: border-color 0.2s;
}

.text-input:focus {
  outline: none;
  border-color: var(--zz-accent);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--zz-bg);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s;
  z-index: 200;
  white-space: nowrap;
}

body.dark-mode .toast {
  background: var(--zz-bg);
  color: var(--zz-text);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--zz-text-dim);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

/* Calendar grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}

.calendar-header {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--zz-text-dim);
  padding: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.calendar-day.empty {
  cursor: default;
}

.calendar-day.today {
  border: 2px solid var(--zz-accent);
  font-weight: 700;
}

.calendar-day.full {
  background: var(--zz-accent);
  color: white;
}

.calendar-day.partial {
  background: var(--zz-accent-bg);
  color: var(--zz-accent);
}

.calendar-day.none {
  background: rgba(0,20,40,0.60);
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-nav-btn {
  background: var(--zz-surface);
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 18px;
  cursor: pointer;
  color: var(--zz-text);
}

.calendar-month {
  font-size: 16px;
  font-weight: 600;
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--zz-surface);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--zz-accent);
}

.stat-label {
  font-size: 12px;
  color: var(--zz-text-dim);
  margin-top: 4px;
}

/* Progress rows */
.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,20,40,0.60);
}

.progress-row:last-child {
  border-bottom: none;
}

.progress-row-label {
  font-size: 14px;
  width: 100px;
  flex-shrink: 0;
}

.progress-row-bar {
  flex: 1;
  height: 8px;
  background: rgba(0,20,40,0.60);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-row-fill {
  height: 100%;
  background: var(--zz-accent);
  border-radius: 4px;
  transition: width 0.4s;
}

.progress-row-fill-missed {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--zz-danger);
  border-radius: 4px;
  opacity: 0.4;
  transition: width 0.4s;
}

.progress-row-pct {
  font-size: 13px;
  font-weight: 600;
  width: 40px;
  text-align: right;
  color: var(--zz-accent);
}

/* ============ HISTORY: Cyberpunk Design ============ */

/* Tabs — neon segmented bar */
.history-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: var(--zz-surface);
  border-radius: 16px;
  padding: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

body.dark-mode .history-tabs {
  border: 1px solid rgba(77, 168, 240, 0.1);
  box-shadow: 0 0 20px rgba(77, 168, 240, 0.05);
}

.history-tab {
  flex: 1;
  padding: 10px 4px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--zz-text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  white-space: nowrap;
}

.history-tab.active {
  background: linear-gradient(135deg, var(--zz-accent), var(--zz-accent));
  color: white;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  transform: scale(1.02);
}

body.dark-mode .history-tab.active {
  background: rgba(77, 168, 240, 0.12);
  color: var(--zz-accent);
  border: 1px solid rgba(77, 168, 240, 0.4);
  box-shadow: 0 0 16px rgba(77, 168, 240, 0.2), inset 0 0 16px rgba(77, 168, 240, 0.05);
}

.history-tab:not(.active):active {
  background: rgba(0,20,40,0.60);
  transform: scale(0.97);
}

/* Summary — neon glass cards (force layout, override any conflicts) */
.history-summary {
  margin-bottom: 16px;
  width: 100%;
  display: block;
  padding: 0;
}
.summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.summary-row:has(.summary-item:nth-child(2):last-child) {
  grid-template-columns: 1fr 1fr;
}

.summary-item {
  min-width: 0;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--zz-surface);
  border-radius: 14px;
  padding: 12px 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.summary-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(230,241,255,0.35);
  border-radius: 16px 16px 0 0;
}

.summary-item:nth-child(2)::before { background: linear-gradient(90deg, #10b981, #059669); }
.summary-item:nth-child(3)::before { background: linear-gradient(90deg, #f56565, #e53e3e); }

body.dark-mode .summary-item {
  border: 1px solid rgba(77, 168, 240, 0.08);
  background: rgba(17, 26, 46, 0.8);
}

body.dark-mode .summary-item::before { background: rgba(77, 168, 240, 0.3); }
body.dark-mode .summary-item:nth-child(2)::before { background: linear-gradient(90deg, #34d399, #00cc6a); }
body.dark-mode .summary-item:nth-child(3)::before { background: linear-gradient(90deg, #f87171, #cc1a5a); }

.summary-num {
  font-size: clamp(14px, 4.5vw, 22px);
  font-weight: 800;
  color: var(--zz-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -1.2px;
  line-height: 1.1;
  white-space: nowrap;
  display: block;
  text-align: center;
  width: 100%;
}

.summary-num.s-done { color: var(--zz-success); }
.summary-num.s-miss { color: var(--zz-danger); }

body.dark-mode .summary-num {
  text-shadow: 0 0 8px rgba(77, 168, 240, 0.3);
}
body.dark-mode .summary-num.s-done {
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.5);
}
body.dark-mode .summary-num.s-miss {
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.summary-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--zz-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Table card — neon border */
.history-card {
  background: var(--zz-surface);
  border-radius: 20px;
  padding: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.dark-mode .history-card {
  border: 1px solid rgba(77, 168, 240, 0.08);
  box-shadow: 0 0 30px rgba(77, 168, 240, 0.04), 0 4px 20px rgba(0,0,0,0.3);
}

/* Table */
.history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 2px;
  font-size: 13px;
  white-space: nowrap;
}

.history-table th {
  position: sticky;
  top: 0;
  background: var(--zz-surface);
  padding: 12px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--zz-text-dim);
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: none;
}

body.dark-mode .history-table th {
  color: rgba(77, 168, 240, 0.5);
  letter-spacing: 1px;
  font-size: 10px;
}

.history-table td {
  padding: 6px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: none;
  vertical-align: middle;
}

.history-table tbody tr {
  border-radius: 12px;
  transition: background 0.15s;
}

.history-table tbody tr td:first-child { border-radius: 12px 0 0 12px; }
.history-table tbody tr td:last-child { border-radius: 0 12px 12px 0; }

.history-table tbody tr:nth-child(odd) td { background: rgba(0,0,0,0.01); }
body.dark-mode .history-table tbody tr:nth-child(odd) td { background: rgba(77, 168, 240, 0.02); }
body.dark-mode .history-table tbody tr:nth-child(even) td { background: rgba(0,0,0,0.15); }

/* Today row — neon accent */
.history-table tr.row-today td {
  background: rgba(13,148,136,0.08);
}
.history-table tr.row-today .sticky-col {
  background: rgba(13,148,136,0.08);
}
.history-table tr.row-today td:first-child {
  box-shadow: inset 3px 0 0 var(--zz-accent);
}

body.dark-mode .history-table tr.row-today td {
  background: rgba(77, 168, 240, 0.06);
}
body.dark-mode .history-table tr.row-today .sticky-col {
  background: rgba(77, 168, 240, 0.06);
}
body.dark-mode .history-table tr.row-today td:first-child {
  box-shadow: inset 3px 0 0 var(--zz-accent), inset 8px 0 16px rgba(77, 168, 240, 0.1);
}

.sticky-col {
  position: sticky;
  left: 0;
  background: var(--zz-surface);
  z-index: 1;
}

/* Date column */
.date-cell {
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  min-width: 62px;
  padding-left: 8px;
  padding-right: 6px;
}

.date-num {
  color: var(--zz-text);
  font-size: 14px;
  font-weight: 700;
}

.row-today .date-num {
  color: var(--zz-accent);
  font-weight: 800;
}

body.dark-mode .row-today .date-num {
  text-shadow: 0 0 8px rgba(77, 168, 240, 0.6);
}

.day-label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--zz-text-dim);
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

body.dark-mode .day-label {
  letter-spacing: 1px;
  font-size: 8px;
}

/* Mini progress bar */
.date-mini-bar {
  height: 3px;
  background: rgba(0,20,40,0.60);
  border-radius: 2px;
  margin-top: 3px;
  overflow: hidden;
}

.date-mini-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}

body.dark-mode .date-mini-bar {
  background: rgba(77, 168, 240, 0.08);
}

/* ============ Cell Circles — Neon Cyberpunk ============ */
.h-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-user-select: none;
  user-select: none;
}

.h-dot:active { transform: scale(0.75); }

.h-done {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.h-miss {
  background: linear-gradient(135deg, #f56565, #dc2626);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 101, 101, 0.4);
}

.h-empty {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: none;
  border: 2px solid rgba(230,241,255,0.35);
  opacity: 0.35;
  box-shadow: none;
}

/* Neon glow in dark mode */
body.dark-mode .h-done {
  background: linear-gradient(135deg, #34d399, #00cc6a);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.5), 0 0 20px rgba(96, 165, 250, 0.2), 0 0 4px rgba(96, 165, 250, 0.8);
}

body.dark-mode .h-miss {
  background: linear-gradient(135deg, #f87171, #e8145a);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.2), 0 0 4px rgba(59, 130, 246, 0.8);
}

body.dark-mode .h-empty {
  border-color: rgba(77, 168, 240, 0.2);
  opacity: 0.5;
}

.cell-done, .cell-missed, .cell-empty { vertical-align: middle; }

/* Istighfar number cells */
.cell-ist {
  color: var(--zz-accent);
  font-weight: 800;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.cell-ist-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.12);
  color: var(--zz-accent);
  font-weight: 800;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

body.dark-mode .cell-ist-badge {
  background: rgba(77, 168, 240, 0.1);
  border: 1px solid rgba(77, 168, 240, 0.25);
  color: var(--zz-accent);
  text-shadow: 0 0 6px rgba(77, 168, 240, 0.5);
  box-shadow: 0 0 8px rgba(77, 168, 240, 0.15);
}

/* ============ Day Detail Modal — Premium ============ */
.day-detail {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.day-detail.show {
  opacity: 1;
  pointer-events: auto;
}

.day-detail-card {
  background: var(--zz-surface);
  border-radius: 24px 24px 0 0;
  padding: 8px 20px 24px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.day-detail.show .day-detail-card {
  transform: translateY(0);
}

.day-detail-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(230,241,255,0.35);
  margin: 0 auto 16px;
}

.day-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.day-detail-title {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--zz-accent), var(--zz-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.day-detail-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,20,40,0.60);
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--zz-text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.day-detail-close:active { background: rgba(230,241,255,0.35); }

.detail-section-title {
  margin: 16px 0 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--zz-text-dim);
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

body.dark-mode .detail-item { border-bottom-color: rgba(255,255,255,0.04); }

.detail-item:last-child { border-bottom: none; }

.detail-item.detail-editable {
  cursor: pointer;
  border-radius: 12px;
  margin: 0 -10px;
  padding: 10px;
  transition: background 0.15s;
  border-bottom: none;
}

.detail-item.detail-editable:active {
  background: rgba(0,20,40,0.60);
}

.detail-check {
  font-size: 20px;
}

.detail-time {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--zz-accent);
  font-family: 'SF Mono', 'Cascadia Code', monospace;
  opacity: 0.85;
}

.cell-time {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--zz-accent);
  font-family: 'SF Mono', 'Cascadia Code', monospace;
  line-height: 1;
  margin-top: 1px;
  opacity: 0.8;
}

.detail-edit-btn {
  margin-left: auto;
  padding: 6px 16px;
  border: none;
  background: linear-gradient(135deg, var(--zz-accent), var(--zz-accent));
  color: white;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.detail-edit-btn:active { opacity: 0.7; }

/* Sync status bar */
.sync-status {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 150;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.sync-status.sync-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}

/* Bottom sync bar fully retired — header ON AIR pill replaces it. */
.sync-status,
.sync-synced,
.sync-syncing,
.sync-offline,
.sync-error,
.sync-pending {
  display: none;
}

/* ===== Sync indicator pill (in header) — ON AIR style ===== */
.sync-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #10b981;
  text-transform: uppercase;
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.sync-dot:hover { filter: brightness(1.15); }

.sync-dot-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s;
}

/* States */
.sync-dot.dot-synced {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
}
.sync-dot.dot-synced .sync-dot-led {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
  animation: dotPulseSlow 2.5s ease-in-out infinite;
}
.sync-dot.dot-pending {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}
.sync-dot.dot-pending .sync-dot-led {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.7);
  animation: dotPulseSlow 1.5s ease-in-out infinite;
}
.sync-dot.dot-syncing {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
  color: var(--zz-accent);
}
.sync-dot.dot-syncing .sync-dot-led {
  background: var(--zz-accent);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
  animation: dotPulseFast 0.7s ease-in-out infinite;
}
.sync-dot.dot-offline {
  border-color: rgba(107, 114, 128, 0.4);
  background: rgba(107, 114, 128, 0.08);
  color: #9ca3af;
}
.sync-dot.dot-offline .sync-dot-led {
  background: #6b7280;
  box-shadow: none;
  animation: none;
}
.sync-dot.dot-error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.sync-dot.dot-error .sync-dot-led {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: dotPulseFast 0.7s ease-in-out infinite;
}

@keyframes dotPulseSlow {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
@keyframes dotPulseFast {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}

.sync-syncing {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  animation: syncPulse 1.5s ease-in-out infinite;
}

.sync-offline {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

.sync-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

body.dark-mode .sync-synced { background: rgba(16,185,129,0.15); color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
body.dark-mode .sync-syncing { background: rgba(245,158,11,0.15); color: #fcd34d; border-color: rgba(245,158,11,0.3); }
body.dark-mode .sync-offline { background: rgba(107,114,128,0.15); color: #9ca3af; border-color: rgba(107,114,128,0.3); }
body.dark-mode .sync-error { background: rgba(239,68,68,0.15); color: #fca5a5; border-color: rgba(239,68,68,0.3); }

.sync-retry {
  margin-left: 8px;
  padding: 2px 10px;
  border: 1px solid currentColor;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

@keyframes syncPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ============ DATE PICKER (iOS-style drum roller) ============ */
.date-picker-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.date-picker-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.date-picker-modal {
  background: var(--zz-surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.date-picker-overlay.show .date-picker-modal {
  transform: translateY(0);
}

.date-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,20,40,0.60);
}

.date-picker-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--zz-text);
}

.date-picker-btn {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--zz-text-dim);
  cursor: pointer;
  padding: 4px 8px;
}

.date-picker-btn.confirm {
  color: var(--zz-accent);
}

.date-picker-wheels {
  display: flex;
  height: 220px;
  position: relative;
  padding: 0 12px;
}

.picker-col {
  flex: 1;
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
}

.picker-col.wide { flex: 1.4; }

.picker-wheel {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.picker-wheel::-webkit-scrollbar { display: none; }

.picker-item {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--zz-text-dim);
  scroll-snap-align: center;
  user-select: none;
  -webkit-user-select: none;
  transition: color 0.15s, font-weight 0.15s;
}

.picker-item.active {
  color: var(--zz-text);
  font-weight: 700;
}

.picker-highlight {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
  border-top: 1.5px solid var(--zz-accent);
  border-bottom: 1.5px solid var(--zz-accent);
  background: var(--zz-accent-bg);
  opacity: 0.25;
  pointer-events: none;
  border-radius: 8px;
}

/* ============ MAIN PAGE: Prayer Times ============ */

/* Location bar */
/* Location chip (header) */
.location-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 12px;
  background: var(--zz-surface);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  max-width: 140px;
}

.location-chip:active { background: rgba(0,20,40,0.60); }

.location-chip-icon { font-size: 14px; flex-shrink: 0; }

.location-chip-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--zz-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hijri date */
.hijri-date {
  text-align: center;
  font-size: 13px;
  color: var(--zz-text-dim);
  margin-bottom: 16px;
}

/* Hero card */
.prayer-hero-card {
  background: linear-gradient(135deg, var(--zz-accent), #2563eb);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(30, 108, 181, 0.35);
}

body.dark-mode .prayer-hero-card {
  box-shadow: 0 4px 20px rgba(30, 108, 181, 0.2);
}

.prayer-hero-label {
  font-size: 13px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.prayer-hero-name {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.prayer-hero-time {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.prayer-hero-countdown {
  font-size: 16px;
  opacity: 0.9;
  font-weight: 500;
}

/* Prayer times list */
.prayer-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,20,40,0.60);
}

.prayer-time-row:last-child { border-bottom: none; }

.prayer-time-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prayer-time-icon {
  font-size: 22px;
  width: 30px;
  text-align: center;
}

.prayer-time-label {
  font-size: 16px;
  font-weight: 500;
}

.prayer-time-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prayer-time-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--zz-text);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: right;
}

/* Small state button inside prayer time row */
.prayer-time-row .state-btn {
  width: 36px;
  height: 36px;
  font-size: 18px;
  border-radius: 50%;
}

/* Prayer completion time (shown when ✅) */
.prayer-done-at {
  font-size: 12px;
  color: var(--zz-success);
  font-weight: 600;
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.prayer-done-at:empty {
  min-width: 0;
}

/* Highlighted: next prayer */
.prayer-next {
  background: var(--zz-accent-bg);
  margin: 0 -16px;
  padding: 14px 16px;
  border-radius: 12px;
  border-bottom-color: transparent;
}

.prayer-next .prayer-time-label {
  color: var(--zz-accent);
  font-weight: 700;
}

.prayer-next .prayer-time-value {
  color: var(--zz-accent);
  font-weight: 800;
}

/* Passed prayers */
.prayer-passed {
  opacity: 0.45;
}

/* Info rows (Sunrise, Ishraq) */
.prayer-info .prayer-time-label {
  font-style: italic;
}

/* Location modal */
.location-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.location-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.location-modal {
  background: var(--zz-surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.location-modal-overlay.show .location-modal {
  transform: translateY(0);
}

.location-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,20,40,0.60);
}

.location-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--zz-text);
}

.location-modal-btn {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--zz-text-dim);
  cursor: pointer;
  padding: 4px 8px;
}

.location-modal-btn.confirm {
  color: var(--zz-accent);
}

.location-modal-body {
  padding: 16px;
}

/* Location search results */
.location-results {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 12px;
  -webkit-overflow-scrolling: touch;
}

.location-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,20,40,0.60);
  cursor: pointer;
  transition: background 0.15s;
}

.location-result-item:last-child { border-bottom: none; }

.location-result-item:active {
  background: rgba(0,20,40,0.60);
  margin: 0 -16px;
  padding: 12px 16px;
  border-radius: 10px;
}

.location-result-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--zz-text);
}

.location-result-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.location-result-country {
  font-size: 13px;
  color: var(--zz-text-dim);
}

.location-result-tz {
  font-size: 11px;
  font-weight: 700;
  color: var(--zz-accent);
  background: var(--zz-accent-bg);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.location-no-results {
  text-align: center;
  padding: 20px;
  color: var(--zz-text-dim);
  font-size: 14px;
}

/* Swipe area — only this part slides on date navigation */
.swipe-area {
  overflow: hidden;
}

/* ============ MAIN PAGE: Date Header ============ */
.prayer-date-header {
  text-align: center;
  margin-bottom: 12px;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prayer-date-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--zz-text);
}

.prayer-date-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(120,140,180,0.20));
  background: transparent;
  color: var(--zz-text);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.prayer-date-arrow:hover {
  background: rgba(120,140,180,0.08);
  border-color: var(--primary, var(--zz-accent));
}
.prayer-date-arrow:active { transform: scale(0.92); }

.prayer-date-today-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: var(--zz-accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.prayer-date-today-btn:active { opacity: 0.8; }

/* ============ Countdown Overlay ============ */
.countdown-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.countdown-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.countdown-content {
  text-align: center;
  color: white;
}

.countdown-prayer-name {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.countdown-prayer-time {
  font-size: 18px;
  opacity: 0.7;
  margin-bottom: 32px;
}

.countdown-boxes {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 40px;
}

.countdown-box {
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 20px 24px;
  min-width: 80px;
}

.countdown-box span {
  font-size: 48px;
  font-weight: 700;
  display: block;
  font-variant-numeric: tabular-nums;
}

.countdown-box small {
  font-size: 14px;
  opacity: 0.7;
  display: block;
  margin-top: 4px;
}

.countdown-close {
  padding: 12px 40px;
  background: linear-gradient(135deg, var(--zz-accent), var(--zz-accent));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.countdown-close:active { opacity: 0.8; }

/* Clickable prayer rows */
.prayer-time-row.clickable {
  cursor: pointer;
  transition: background 0.15s;
}

.prayer-time-row.clickable:active {
  background: rgba(0,20,40,0.60);
  margin: 0 -16px;
  padding: 14px 16px;
  border-radius: 12px;
}

/* ============ CYBERPUNK: Global Neon Dark Mode ============ */

/* Bottom nav — neon border-top glow */
body.dark-mode .bottom-nav {
  background: rgba(8, 12, 24, 0.95);
  border-top: 1px solid rgba(77, 168, 240, 0.12);
  box-shadow: 0 -4px 24px rgba(77, 168, 240, 0.06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

body.dark-mode .nav-item.active {
  color: var(--zz-accent);
  text-shadow: 0 0 8px rgba(77, 168, 240, 0.5);
}

/* Header — neon gradient title */
body.dark-mode header h1 {
  background: linear-gradient(135deg, var(--zz-accent), #34d399);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Cards — neon border glow */
body.dark-mode .card {
  border: 1px solid rgba(77, 168, 240, 0.08);
  box-shadow: 0 0 20px rgba(77, 168, 240, 0.03), 0 4px 16px rgba(0,0,0,0.3);
}

/* Card titles — neon cyan */
body.dark-mode .card-title {
  color: rgba(77, 168, 240, 0.7);
  letter-spacing: 0.5px;
}

/* Icon buttons — neon border */
body.dark-mode .icon-btn {
  border: 1px solid rgba(77, 168, 240, 0.1);
}

body.dark-mode .icon-btn:hover {
  border-color: rgba(77, 168, 240, 0.3);
  box-shadow: 0 0 10px rgba(77, 168, 240, 0.1);
}

/* Text inputs — neon focus */
body.dark-mode .text-input {
  border-color: rgba(77, 168, 240, 0.1);
}

body.dark-mode .text-input:focus {
  border-color: var(--zz-accent);
  box-shadow: 0 0 12px rgba(77, 168, 240, 0.2);
}

/* Toast — neon */
body.dark-mode .toast {
  background: rgba(17, 26, 46, 0.95);
  border: 1px solid rgba(77, 168, 240, 0.2);
  box-shadow: 0 0 16px rgba(77, 168, 240, 0.1);
}

/* ============ CYBERPUNK: Main Page ============ */

/* Hero card — water glass */
body.dark-mode .prayer-hero-card {
  background: linear-gradient(135deg, rgba(30, 108, 181, 0.25), rgba(59, 130, 246, 0.10));
  border: 1px solid rgba(77, 168, 240, 0.20);
  box-shadow: 0 0 30px rgba(77, 168, 240, 0.10), 0 0 60px rgba(30, 108, 181, 0.04);
}

body.dark-mode .prayer-hero-name {
  text-shadow: 0 0 20px rgba(77, 168, 240, 0.5);
}

body.dark-mode .prayer-hero-time {
  text-shadow: 0 0 30px rgba(77, 168, 240, 0.6);
}

body.dark-mode .prayer-hero-countdown {
  text-shadow: 0 0 10px rgba(77, 168, 240, 0.4);
}

/* Location chip — neon border */
body.dark-mode .location-chip {
  border: 1px solid rgba(77, 168, 240, 0.1);
}

body.dark-mode .location-chip:hover {
  border-color: rgba(77, 168, 240, 0.3);
  box-shadow: 0 0 10px rgba(77, 168, 240, 0.1);
}

/* Hijri date — neon subtle */
body.dark-mode .hijri-date {
  color: rgba(77, 168, 240, 0.4);
  letter-spacing: 0.5px;
}

/* Prayer rows — neon borders */
body.dark-mode .prayer-time-row {
  border-bottom-color: rgba(77, 168, 240, 0.06);
}

/* Next prayer — neon highlight */
body.dark-mode .prayer-next {
  background: rgba(77, 168, 240, 0.08);
  border: 1px solid rgba(77, 168, 240, 0.15);
  box-shadow: inset 0 0 20px rgba(77, 168, 240, 0.05);
}

body.dark-mode .prayer-next .prayer-time-label {
  color: var(--zz-accent);
  text-shadow: 0 0 8px rgba(77, 168, 240, 0.4);
}

body.dark-mode .prayer-next .prayer-time-value {
  color: var(--zz-accent);
  text-shadow: 0 0 8px rgba(77, 168, 240, 0.5);
}

/* Prayer done time — neon green */
body.dark-mode .prayer-done-at {
  color: #34d399;
  text-shadow: 0 0 6px rgba(96, 165, 250, 0.5);
}

/* Prayer time badge — neon */
body.dark-mode .prayer-time {
  background: rgba(77, 168, 240, 0.1);
  border: 1px solid rgba(77, 168, 240, 0.2);
}

/* Countdown overlay — neon boxes */
body.dark-mode .countdown-overlay {
  background: rgba(8, 12, 24, 0.92);
}

body.dark-mode .countdown-box {
  background: rgba(77, 168, 240, 0.08);
  border: 1px solid rgba(77, 168, 240, 0.2);
  box-shadow: 0 0 20px rgba(77, 168, 240, 0.1);
}

body.dark-mode .countdown-box span {
  text-shadow: 0 0 20px rgba(77, 168, 240, 0.6);
}

body.dark-mode .countdown-prayer-name {
  text-shadow: 0 0 16px rgba(77, 168, 240, 0.5);
}

body.dark-mode .countdown-close {
  background: rgba(77, 168, 240, 0.12);
  border: 1px solid rgba(77, 168, 240, 0.4);
  box-shadow: 0 0 16px rgba(77, 168, 240, 0.2);
}

/* Location modal — neon */
body.dark-mode .location-modal-header {
  border-bottom-color: rgba(77, 168, 240, 0.1);
}

body.dark-mode .location-result-item {
  border-bottom-color: rgba(77, 168, 240, 0.06);
}

body.dark-mode .location-result-item:active {
  background: rgba(77, 168, 240, 0.08);
}

body.dark-mode .location-result-tz {
  background: rgba(77, 168, 240, 0.1);
  border: 1px solid rgba(77, 168, 240, 0.2);
  color: var(--zz-accent);
}

/* Prayer date nav — neon Today button */
body.dark-mode .prayer-date-today-btn {
  background: rgba(77, 168, 240, 0.12);
  border: 1px solid rgba(77, 168, 240, 0.4);
  box-shadow: 0 0 10px rgba(77, 168, 240, 0.15);
}

/* ============ CYBERPUNK: Today Page ============ */

/* State buttons — neon glow */
body.dark-mode .state-btn {
  border-color: rgba(77, 168, 240, 0.2);
  background: transparent;
}

body.dark-mode .state-btn.done {
  border-color: transparent;
  background: linear-gradient(135deg, #34d399, #00cc6a);
  color: white;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.5), 0 0 20px rgba(96, 165, 250, 0.2), 0 0 4px rgba(96, 165, 250, 0.8);
}

body.dark-mode .state-btn.missed {
  border-color: transparent;
  background: linear-gradient(135deg, #f87171, #e8145a);
  color: white;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.2), 0 0 4px rgba(59, 130, 246, 0.8);
}

/* Toggle items — neon borders */
body.dark-mode .toggle-item {
  border-bottom-color: rgba(77, 168, 240, 0.06);
}

/* Progress bar — neon glow */
body.dark-mode .progress-bar-container {
  background: rgba(77, 168, 240, 0.08);
}

body.dark-mode .progress-bar-fill {
  background: linear-gradient(90deg, var(--zz-accent), #34d399);
  box-shadow: 0 0 12px rgba(77, 168, 240, 0.4);
}

/* Date header day — neon glow */
body.dark-mode .date-header-day {
  text-shadow: 0 0 12px rgba(77, 168, 240, 0.5);
}

/* Today button — neon */
body.dark-mode .date-today-btn {
  background: rgba(77, 168, 240, 0.12);
  border: 1px solid rgba(77, 168, 240, 0.4);
  box-shadow: 0 0 10px rgba(77, 168, 240, 0.15);
}

/* Istighfar — neon */
body.dark-mode .istighfar-total {
  text-shadow: 0 0 16px rgba(77, 168, 240, 0.4);
}

body.dark-mode .istighfar-btn {
  background: rgba(77, 168, 240, 0.12);
  border: 1px solid rgba(77, 168, 240, 0.4);
  box-shadow: 0 0 12px rgba(77, 168, 240, 0.15);
}

/* Date picker — neon */
body.dark-mode .date-picker-header {
  border-bottom-color: rgba(77, 168, 240, 0.1);
}

body.dark-mode .picker-highlight {
  border-color: rgba(77, 168, 240, 0.4);
  background: rgba(77, 168, 240, 0.08);
}

body.dark-mode .picker-item.active {
  text-shadow: 0 0 8px rgba(77, 168, 240, 0.4);
}

/* ============ RTL SUPPORT (Arabic) ============ */
html[dir="rtl"] .header-actions { flex-direction: row-reverse; }
html[dir="rtl"] .prayer-time-row { flex-direction: row-reverse; }
html[dir="rtl"] .toggle-item { flex-direction: row-reverse; }
html[dir="rtl"] .settings-item { flex-direction: row-reverse; }
html[dir="rtl"] .location-result-item { flex-direction: row-reverse; }
html[dir="rtl"] .bottom-nav { direction: ltr; }
html[dir="rtl"] .istighfar-add { flex-direction: row-reverse; }
html[dir="rtl"] .heatmap-legend { flex-direction: row-reverse; }
html[dir="rtl"] .ramadan-times { flex-direction: row-reverse; }
html[dir="rtl"] .stat-grid { direction: ltr; }
html[dir="rtl"] .qibla-info { direction: ltr; }

/* ============ QIBLA COMPASS ============ */
.qibla-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
}
.qibla-compass {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 3px solid var(--zz-accent);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--zz-surface);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.qibla-directions {
  position: absolute;
  inset: 0;
  transform: rotate(var(--compass-rotation, 0deg));
  /* match qibla.js throttle (220ms) — linear so each frame finishes
     cleanly before the next render arrives, no mid-air interruption */
  transition: transform 0.22s linear;
}
.qibla-dir {
  position: absolute;
  font-size: 16px;
  font-weight: 700;
  color: var(--zz-text-dim);
}
.qibla-n { top: 12px; left: 50%; transform: translateX(-50%); color: var(--zz-danger); }
.qibla-e { right: 12px; top: 50%; transform: translateY(-50%); }
.qibla-s { bottom: 12px; left: 50%; transform: translateX(-50%); }
.qibla-w { left: 12px; top: 50%; transform: translateY(-50%); }
.qibla-needle {
  position: absolute;
  width: 4px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}
.qibla-needle-tip {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 24px solid var(--zz-success);
}
.qibla-kaaba {
  font-size: 24px;
  margin-top: -4px;
}
.qibla-center-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--zz-accent);
  position: absolute;
}
.qibla-info {
  text-align: center;
  margin-top: 24px;
}
.qibla-bearing {
  font-size: 48px;
  font-weight: 700;
  color: var(--zz-accent);
}
.qibla-distance {
  font-size: 14px;
  color: var(--zz-text-dim);
  margin-top: 4px;
}
.qibla-enable-btn {
  margin-top: 24px;
  padding: 14px 32px;
  background: var(--zz-accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.qibla-status {
  margin-top: 12px;
  font-size: 13px;
  color: var(--zz-text-dim);
}

/* Qibla dark mode */
body.dark-mode .qibla-compass {
  border-color: rgba(77, 168, 240, 0.4);
  box-shadow: 0 0 30px rgba(77, 168, 240, 0.1), inset 0 0 30px rgba(77, 168, 240, 0.03);
}
body.dark-mode .qibla-bearing {
  color: var(--zz-accent);
  text-shadow: 0 0 16px rgba(77, 168, 240, 0.5);
}
body.dark-mode .qibla-needle-tip {
  border-bottom-color: #34d399;
  filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.5));
}
body.dark-mode .qibla-center-dot {
  background: var(--zz-accent);
  box-shadow: 0 0 8px rgba(77, 168, 240, 0.5);
}
body.dark-mode .qibla-enable-btn {
  background: rgba(77, 168, 240, 0.15);
  border: 1px solid rgba(77, 168, 240, 0.4);
  color: var(--zz-accent);
  box-shadow: 0 0 12px rgba(77, 168, 240, 0.15);
}

/* ============ ISLAMIC EVENTS BADGE ============ */
.islamic-event-badge {
  text-align: center;
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  font-size: 14px;
  background: var(--zz-accent-bg);
  color: var(--zz-text);
  border: 1px solid rgba(13, 148, 136, 0.2);
}
body.dark-mode .islamic-event-badge {
  background: rgba(77, 168, 240, 0.06);
  border: 1px solid rgba(77, 168, 240, 0.2);
  color: var(--zz-accent);
  box-shadow: 0 0 12px rgba(77, 168, 240, 0.08);
}

/* ============ RAMADAN BANNER ============ */
.ramadan-banner {
  text-align: center;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(16, 185, 129, 0.06));
  border: 1px solid rgba(13, 148, 136, 0.2);
}
.ramadan-header {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--zz-text);
}
.ramadan-times {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 12px;
}
.ramadan-time-item { text-align: center; }
.ramadan-time-label {
  font-size: 12px;
  color: var(--zz-text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ramadan-time-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--zz-accent);
}
.ramadan-countdown {
  font-size: 16px;
  font-weight: 600;
  color: var(--zz-success);
  margin-bottom: 12px;
}
.ramadan-progress {
  height: 6px;
  background: rgba(0,20,40,0.60);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.ramadan-progress-fill {
  height: 100%;
  background: var(--zz-success);
  border-radius: 3px;
  transition: width 0.3s;
}
.ramadan-day-text {
  font-size: 13px;
  color: var(--zz-text-dim);
}

/* Ramadan dark mode */
body.dark-mode .ramadan-banner {
  background: linear-gradient(135deg, rgba(77, 168, 240, 0.06), rgba(96, 165, 250, 0.04));
  border-color: rgba(77, 168, 240, 0.2);
  box-shadow: 0 0 20px rgba(77, 168, 240, 0.06);
}
body.dark-mode .ramadan-time-val {
  color: var(--zz-accent);
  text-shadow: 0 0 12px rgba(77, 168, 240, 0.4);
}
body.dark-mode .ramadan-countdown {
  color: #34d399;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}
body.dark-mode .ramadan-progress-fill {
  background: linear-gradient(90deg, var(--zz-accent), #34d399);
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}

/* ============ HEATMAP CALENDAR ============ */
.heatmap-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}
.heatmap-grid {
  display: flex;
  gap: 2px;
}
.heatmap-day-labels {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 4px;
  flex-shrink: 0;
}
.heatmap-day-label {
  width: 24px;
  height: 12px;
  font-size: 9px;
  color: var(--zz-text-dim);
  line-height: 12px;
}
.heatmap-cols {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.heatmap-months {
  height: 14px;
}
.heatmap-month-label {
  width: 12px;
  font-size: 9px;
  color: var(--zz-text-dim);
  text-align: center;
  flex-shrink: 0;
}
.heatmap-row {
  display: flex;
  gap: 2px;
}
.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}
.heatmap-cell.l0 { background: rgba(0,20,40,0.60); }
.heatmap-cell.l1 { background: #6ee7b7; }
.heatmap-cell.l2 { background: #34d399; }
.heatmap-cell.l3 { background: var(--zz-success); }
.heatmap-cell.future { background: transparent; }
.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--zz-text-dim);
}
.heatmap-legend .heatmap-cell {
  width: 12px;
  height: 12px;
}

/* Heatmap dark mode */
body.dark-mode .heatmap-cell.l0 { background: rgba(77, 168, 240, 0.06); }
body.dark-mode .heatmap-cell.l1 { background: rgba(96, 165, 250, 0.2); }
body.dark-mode .heatmap-cell.l2 { background: rgba(96, 165, 250, 0.45); }
body.dark-mode .heatmap-cell.l3 {
  background: #34d399;
  box-shadow: 0 0 4px rgba(96, 165, 250, 0.3);
}

/* ============ CYBERPUNK: Stats Page ============ */

/* Stat cards — neon border + glow values */
body.dark-mode .stat-card {
  border: 1px solid rgba(77, 168, 240, 0.08);
  box-shadow: 0 0 20px rgba(77, 168, 240, 0.03);
}

body.dark-mode .stat-value {
  text-shadow: 0 0 12px rgba(77, 168, 240, 0.4);
}

body.dark-mode .stat-value[style*="color:var(--zz-danger)"] {
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

/* Progress rows — neon */
body.dark-mode .progress-row {
  border-bottom-color: rgba(77, 168, 240, 0.06);
}

body.dark-mode .progress-row-bar {
  background: rgba(77, 168, 240, 0.08);
}

body.dark-mode .progress-row-fill {
  box-shadow: 0 0 8px rgba(77, 168, 240, 0.4);
}

body.dark-mode .progress-row-fill-missed {
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

body.dark-mode .progress-row-pct {
  text-shadow: 0 0 6px rgba(77, 168, 240, 0.4);
}

/* On Time card stat labels — neon */
body.dark-mode .stat-label {
  letter-spacing: 0.5px;
}

/* Sync status — neon overrides */
body.dark-mode .sync-synced {
  background: rgba(96, 165, 250, 0.1);
  color: #34d399;
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.1);
}

body.dark-mode .sync-error {
  background: rgba(59, 130, 246, 0.1);
  color: #ff6b9d;
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.1);
}


/* === Zam-Vision Hub Bar (nav back to hub) === */
#zvHubBar {
  position: sticky;
  top: 0;
  z-index: 9999;
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: rgba(4, 4, 8, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-sizing: border-box;
  flex-shrink: 0;
}
.zv-hub-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transition: color 0.15s;
  user-select: none;
}
.zv-hub-link:hover { color: rgba(255,255,255,0.88); }
.zv-hub-mark {
  display: inline-flex;
  width: 20px; height: 20px;
  border-radius: 4px;
  background: #dc2626;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  color: white;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* WCAG 2.2 SC 2.3.3 — universal reduced-motion fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}


/* ======== SL SYSTEM (from solo-system.css) ======== */

/* ============================================================
   ZamZam — SOLO LEVELING SYSTEM
   2026-05-05
   "[SYSTEM] You have been chosen as a Player."
   ============================================================ */



/* Force dark always — Solo Leveling is night-only */
body, body.dark-mode {
  background: var(--zz-bg);
  color: var(--zz-text);
  font-family: 'Geist', sans-serif;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* ---- Particle field background (animated stars/dust) ---- */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(0, 246, 255, 0.6), transparent 50%),
    radial-gradient(2px 2px at 70% 60%, rgba(0, 246, 255, 0.4), transparent 50%),
    radial-gradient(1px 1px at 40% 80%, rgba(157, 62, 255, 0.5), transparent 50%),
    radial-gradient(2px 2px at 85% 25%, rgba(0, 246, 255, 0.3), transparent 50%),
    radial-gradient(1px 1px at 15% 65%, rgba(0, 246, 255, 0.4), transparent 50%),
    radial-gradient(1px 1px at 60% 15%, rgba(157, 62, 255, 0.3), transparent 50%),
    radial-gradient(2px 2px at 30% 50%, rgba(0, 246, 255, 0.3), transparent 50%);
  background-size: 600px 600px;
  animation: particle-drift 60s linear infinite;
}
@keyframes particle-drift {
  from { background-position: 0 0; }
  to   { background-position: -600px -600px; }
}

/* ---- Aurora glow background ---- */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(800px 600px at 15% 10%, rgba(0, 246, 255, 0.10), transparent 60%),
    radial-gradient(700px 500px at 85% 90%, rgba(157, 62, 255, 0.08), transparent 60%),
    radial-gradient(900px 700px at 50% 50%, rgba(0, 80, 255, 0.06), transparent 70%);
  filter: blur(40px);
  animation: aurora-pulse 12s ease-in-out infinite;
}
@keyframes aurora-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.container { position: relative; z-index: 2; }

/* ============================================================
   SYSTEM STATUS BAR (always at top)
   ============================================================ */
#sysBar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 12px 18px;
  min-height: 54px;
  background:
    linear-gradient(180deg, rgba(0, 22, 44, 0.97), rgba(0, 8, 20, 0.96)),
    repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(0,246,255,0.025) 2px, rgba(0,246,255,0.025) 3px);
  /* Lighter blur — 20px causes notable repaint cost on every scroll/hover */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  contain: layout paint;
  border-bottom: 1px solid var(--zz-accent);
  box-shadow:
    0 0 30px rgba(0, 246, 255, 0.30),
    inset 0 -1px 0 rgba(0, 246, 255, 0.45),
    inset 0 1px 0 rgba(0, 246, 255, 0.15);
  font-family: 'Orbitron', 'Geist Mono', monospace;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* LV badge — boxy cyan frame */
#sysBar .sys-lv {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  background: rgba(0, 246, 255, 0.08);
  border: 1px solid var(--zz-accent);
  box-shadow: 0 0 14px rgba(0,246,255,0.4), inset 0 0 8px rgba(0,246,255,0.10);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  flex-shrink: 0;
}
#sysBar .sys-lv .sys-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.20em;
  color: var(--zz-accent);
  text-shadow: 0 0 6px var(--zz-accent-glow);
}
#sysBar .sys-lv .sys-value {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 10px var(--zz-accent-glow), 0 0 20px rgba(0,246,255,0.3);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* EXP slot — long horizontal */
#sysBar .sys-exp {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
#sysBar .sys-exp .sys-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: var(--zz-accent);
  text-shadow: 0 0 6px var(--zz-accent-glow);
  white-space: nowrap;
}
#sysBar .sys-bar-track {
  flex: 1;
  position: relative;
  height: 10px;
  min-width: 80px;
  background: rgba(0, 246, 255, 0.08);
  border: 1px solid var(--zz-accent);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
  border-radius: 0;
  overflow: hidden;
  /* Inset corner cuts */
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
#sysBar .sys-bar-fill {
  height: 100%;
  background:
    linear-gradient(90deg, var(--zz-accent) 0%, #00b4ff 50%, var(--zz-purple) 100%);
  box-shadow:
    0 0 12px var(--zz-accent-glow),
    0 0 24px rgba(0, 246, 255, 0.5),
    inset 0 0 6px rgba(255, 255, 255, 0.3);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}
#sysBar .sys-bar-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: sys-shimmer 2.4s ease-in-out infinite;
}
@keyframes sys-shimmer {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}
#sysBar .sys-exp .sys-value {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 6px var(--zz-accent-glow);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* STREAK on the right */
#sysBar .sys-streak {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 10px;
  background: rgba(0, 8, 20, 0.6);
  border: 1px solid var(--zz-accent-dim);
  flex-shrink: 0;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
#sysBar .sys-streak .sys-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.20em;
  color: var(--zz-accent);
  text-shadow: 0 0 5px var(--zz-accent-glow);
}
#sysBar .sys-streak .sys-value {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 6px var(--zz-accent-glow);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* MISSION pill (clickable) — red when active, green when cleared */
#sysBar .sys-mission {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--zz-danger);
  color: var(--zz-danger);
  background: rgba(255, 51, 102, 0.08);
  text-shadow: 0 0 6px rgba(255, 51, 102, 0.55);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  animation: sys-mission-pulse 1.6s ease-in-out infinite;
}
#sysBar .sys-mission:hover {
  background: rgba(255, 51, 102, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(255, 51, 102, 0.6);
}
#sysBar .sys-mission:active { transform: translateY(0) scale(0.97); }
#sysBar .sys-mission.cleared {
  border-color: var(--zz-success);
  color: var(--zz-success);
  background: rgba(0, 255, 163, 0.08);
  text-shadow: 0 0 6px rgba(0, 255, 163, 0.55);
  animation: none;
}
#sysBar .sys-mission.cleared:hover {
  background: rgba(0, 255, 163, 0.20);
  box-shadow: 0 0 16px rgba(0, 255, 163, 0.5);
}
@keyframes sys-mission-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.4); }
  50%      { box-shadow: 0 0 16px rgba(255, 51, 102, 0.7); }
}

/* Push body content down to clear sysBar (now bigger) */
body { padding-top: 60px; }
header { padding-top: 0; }

/* Mobile: compact */
@media (max-width: 480px) {
  #sysBar { padding: 10px 12px; gap: 10px; min-height: 50px; }
  #sysBar .sys-lv { padding: 5px 10px 5px 8px; gap: 5px; }
  #sysBar .sys-lv .sys-value { font-size: 18px; }
  #sysBar .sys-exp { gap: 8px; }
  #sysBar .sys-exp .sys-label { font-size: 9px; letter-spacing: 0.18em; }
  #sysBar .sys-bar-track { height: 8px; }
  #sysBar .sys-exp .sys-value { font-size: 12px; }
  #sysBar .sys-streak { padding: 4px 8px; gap: 5px; }
  #sysBar .sys-streak .sys-value { font-size: 13px; }
  #sysBar .sys-mission { padding: 4px 8px; font-size: 8.5px; letter-spacing: 0.14em; }
  body { padding-top: 56px; }
}
@media (max-width: 380px) {
  /* On tiny phones, hide STREAK pill so EXP fits */
  #sysBar .sys-streak { display: none; }
}

/* ============================================================
   CARDS — System Window style with corner brackets
   ============================================================ */
.card {
  background: var(--zz-surface);
  border: 1px solid var(--zz-border);
  border-radius: 0;
  box-shadow:
    0 0 24px rgba(0, 246, 255, 0.08),
    inset 0 0 20px rgba(0, 246, 255, 0.03);
  position: relative;
  backdrop-filter: blur(8px);
}

/* Corner brackets — Solo Leveling system window aesthetic */
.card::before,
.card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--zz-accent);
  pointer-events: none;
  filter: drop-shadow(0 0 4px var(--zz-accent-glow));
}
.card::before {
  top: -1px; left: -1px;
  border-right: none;
  border-bottom: none;
}
.card::after {
  bottom: -1px; right: -1px;
  border-left: none;
  border-top: none;
}

/* ============================================================
   TYPOGRAPHY — System messages
   ============================================================ */
.card-title {
  font-family: 'Orbitron', 'Geist', sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zz-accent);
  font-size: 11px;
  text-shadow: 0 0 8px var(--zz-accent-glow);
  padding: 16px 18px 8px;
  opacity: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title::before {
  content: '◆';
  font-size: 8px;
  color: var(--zz-accent);
  text-shadow: 0 0 6px var(--zz-accent-glow);
}

.date-header {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 0 12px var(--zz-accent-glow);
  text-transform: uppercase;
  padding: 8px 0 12px;
  text-align: center;
}

.progress-text {
  font-family: 'Orbitron', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--zz-accent);
  text-shadow: 0 0 6px var(--zz-accent-glow);
}

/* ============================================================
   PROGRESS BAR (main one) — XP-style
   ============================================================ */
.progress-bar-container {
  height: 6px;
  border: 1px solid var(--zz-border);
  background: rgba(0, 246, 255, 0.08);
  border-radius: 0;
  position: relative;
  overflow: hidden;
}
.progress-bar-fill {
  background: linear-gradient(90deg, var(--zz-accent), var(--zz-purple));
  box-shadow: 0 0 12px var(--zz-accent-glow);
  border-radius: 0;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}
.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  background-size: 200% 100%;
  animation: progress-shine 2s linear infinite;
}
@keyframes progress-shine {
  from { background-position: -100% 0; }
  to   { background-position: 200% 0; }
}

/* ============================================================
   STATE BUTTONS — Quest checkmarks
   ============================================================ */
.state-btn {
  border-radius: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--zz-accent-dim);
  background: rgba(0, 246, 255, 0.05);
  color: var(--zz-accent);
  font-family: 'Orbitron', monospace;
  font-weight: 800;
  transition: all 0.2s ease;
  position: relative;
}
.state-btn:active {
  transform: scale(0.92);
}
.state-btn.done {
  background: var(--zz-accent);
  color: #000;
  border-color: var(--zz-accent);
  box-shadow:
    0 0 16px var(--zz-accent-glow),
    inset 0 0 8px rgba(255, 255, 255, 0.3);
  animation: btn-glow 2s ease-in-out infinite;
}
@keyframes btn-glow {
  0%, 100% { box-shadow: 0 0 16px var(--zz-accent-glow), inset 0 0 8px rgba(255,255,255,0.3); }
  50% { box-shadow: 0 0 24px var(--zz-accent-glow), inset 0 0 12px rgba(255,255,255,0.5); }
}
.state-btn.missed {
  background: rgba(255, 51, 102, 0.1);
  color: var(--zz-danger);
  border-color: var(--zz-danger);
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.4);
}

/* ============================================================
   COUNTERS (Salawat / Istighfar) — MP / SP gauges
   ============================================================ */
.istighfar-total {
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--zz-accent);
  opacity: 0.7;
  text-shadow: 0 0 6px var(--zz-accent-glow);
}
.istighfar-total span {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  color: #fff;
  display: block;
  margin-top: 6px;
  letter-spacing: -0.02em;
  text-shadow: 0 0 14px var(--zz-accent-glow);
  -webkit-text-fill-color: #fff;
}

/* Counter buttons / inputs */
.istighfar-btn,
button.text-btn,
button[class*="btn"]:not(.state-btn) {
  border-radius: 0;
  border: 1px solid var(--zz-accent-dim);
  background: rgba(0, 246, 255, 0.05);
  color: var(--zz-accent);
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.15s;
  padding: 10px 18px;
}
.istighfar-btn:hover,
button.text-btn:hover {
  background: var(--zz-accent);
  color: #000;
  box-shadow: 0 0 14px var(--zz-accent-glow);
}
.istighfar-btn:active {
  transform: scale(0.96);
}

/* Input */
.text-input,
input[type="text"],
input[type="number"],
select {
  border-radius: 0;
  border: 1px solid var(--zz-accent-dim);
  background: rgba(0, 246, 255, 0.05);
  color: #fff;
  font-family: 'Orbitron', monospace;
  letter-spacing: 0.05em;
  padding: 10px 12px;
}
.text-input:focus,
input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--zz-accent);
  box-shadow: 0 0 12px var(--zz-accent-glow);
}

/* ============================================================
   BOTTOM NAV — System dock
   ============================================================ */
.bottom-nav {
  background: linear-gradient(0deg, rgba(0, 8, 20, 0.95), rgba(0, 20, 40, 0.85));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--zz-accent-dim);
  border-radius: 0;
  box-shadow: 0 -4px 20px rgba(0, 246, 255, 0.15);
}
.nav-item {
  color: var(--zz-text-dim);
  transition: color 0.2s;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-item.active {
  color: var(--zz-accent);
  text-shadow: 0 0 8px var(--zz-accent-glow);
}

/* ============================================================
   ICON BUTTONS — sharp edges
   ============================================================ */
.icon-btn {
  border-radius: 0;
  background: rgba(0, 246, 255, 0.05);
  border: 1px solid var(--zz-accent-dim);
  color: var(--zz-accent);
  width: 36px;
  height: 36px;
  transition: all 0.15s;
}
.icon-btn:hover {
  background: var(--zz-accent);
  color: #000;
  box-shadow: 0 0 12px var(--zz-accent-glow);
}

/* ============================================================
   FLOATING +XP NUMBERS
   ============================================================ */
.xp-popup {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 22px;
  color: var(--zz-accent);
  text-shadow:
    0 0 8px var(--zz-accent-glow),
    0 0 16px var(--zz-accent-glow);
  animation: xp-fly 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.xp-popup.bonus {
  color: var(--zz-purple);
  text-shadow: 0 0 12px var(--zz-purple-glow), 0 0 24px var(--zz-purple-glow);
  font-size: 28px;
}
@keyframes xp-fly {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.5); }
  20%  { opacity: 1; transform: translate(-50%, -10px) scale(1.2); }
  80%  { opacity: 1; transform: translate(-50%, -50px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(0.9); }
}

/* ============================================================
   LEVEL UP OVERLAY
   ============================================================ */
#levelUpOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(0, 246, 255, 0.4), rgba(0, 0, 0, 0.95));
  backdrop-filter: blur(8px);
  pointer-events: none;
}
#levelUpOverlay.show {
  display: flex;
  animation: lvl-fade 3s ease forwards;
}
@keyframes lvl-fade {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}
#levelUpOverlay .lvl-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 64px;
  letter-spacing: 0.2em;
  color: #fff;
  text-shadow:
    0 0 20px var(--zz-accent),
    0 0 40px var(--zz-accent),
    0 0 60px var(--zz-accent);
  text-transform: uppercase;
  animation: lvl-zoom 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes lvl-zoom {
  0%   { transform: scale(0.5) rotateX(-30deg); opacity: 0; letter-spacing: 0.5em; }
  60%  { transform: scale(1.2) rotateX(0); opacity: 1; }
  100% { transform: scale(1) rotateX(0); opacity: 1; letter-spacing: 0.2em; }
}
#levelUpOverlay .lvl-num {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 120px;
  color: var(--zz-accent);
  text-shadow:
    0 0 30px var(--zz-accent-glow),
    0 0 60px var(--zz-accent-glow);
  margin-top: 20px;
  animation: lvl-flicker 0.2s ease-in-out 2;
}
@keyframes lvl-flicker {
  50% { opacity: 0.4; transform: scale(1.05); }
}
#levelUpOverlay .lvl-stack {
  display: flex; flex-direction: column; align-items: center;
}

/* ============================================================
   ACHIEVEMENT POPUP (notif from corner)
   ============================================================ */
#achPopup {
  position: fixed;
  top: 60px; right: 20px;
  z-index: 9000;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(0, 8, 20, 0.95), rgba(0, 20, 40, 0.95));
  border: 1px solid var(--zz-accent);
  box-shadow:
    0 0 20px var(--zz-accent-glow),
    inset 0 0 10px rgba(0, 246, 255, 0.1);
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  display: none;
  max-width: 320px;
}
#achPopup.show {
  display: block;
  animation: ach-slide 4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes ach-slide {
  0%   { transform: translateX(120%); opacity: 0; }
  10%  { transform: translateX(0); opacity: 1; }
  85%  { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}
#achPopup .ach-title {
  font-size: 9px;
  color: var(--zz-accent);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}
#achPopup .ach-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#achPopup .ach-desc {
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  color: var(--zz-text-dim);
  margin-top: 4px;
  letter-spacing: 0;
  text-transform: none;
}

/* ============================================================
   TOGGLES — sharp system style
   ============================================================ */
.toggle-switch {
  width: 40px;
  height: 22px;
}
.toggle-slider {
  background: rgba(0, 246, 255, 0.15);
  border: 1px solid var(--zz-accent-dim);
  border-radius: 0;
  transition: background 0.2s ease, border-color 0.2s;
}
.toggle-slider:before {
  width: 14px;
  height: 14px;
  bottom: 3px;
  left: 3px;
  background: var(--zz-accent);
  border-radius: 0;
  box-shadow: 0 0 6px var(--zz-accent-glow);
  transition: transform 0.2s ease;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--zz-accent);
  border-color: var(--zz-accent);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
  background: #000;
  box-shadow: none;
}

/* ============================================================
   HEADER LOGO — keep but desaturate / glow
   ============================================================ */
.header-logo {
  max-height: 32px;
  filter: drop-shadow(0 0 8px var(--zz-accent-glow)) hue-rotate(180deg) saturate(1.5);
  opacity: 0.9;
}

/* ============================================================
   SETTINGS items — system rows
   ============================================================ */
.settings-item {
  border-top: 1px solid rgba(0, 246, 255, 0.08);
  padding: 14px 18px;
}
.settings-item:first-child {
  border-top: none;
}
.settings-label {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 14px;
  color: var(--zz-text);
}
.settings-sub {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--zz-accent);
  opacity: 0.75;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* Lang button */
.lang-btn {
  background: transparent;
  border: 1px solid var(--zz-accent-dim);
  color: var(--zz-text-dim);
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: 0;
  text-transform: uppercase;
  transition: all 0.15s;
}
.lang-btn.active {
  background: var(--zz-accent);
  color: #000;
  border-color: var(--zz-accent);
  box-shadow: 0 0 12px var(--zz-accent-glow);
}

/* Logout */
.logout-btn {
  background: transparent;
  color: var(--zz-danger);
  border: 1px solid var(--zz-danger);
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 0;
  padding: 12px 24px;
  transition: all 0.15s;
}
.logout-btn:hover {
  background: rgba(255, 51, 102, 0.1);
  box-shadow: 0 0 16px rgba(255, 51, 102, 0.4);
}

.version {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  opacity: 0.4;
  color: var(--zz-accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 16px;
}

/* ============================================================
   HISTORY page — system grid
   ============================================================ */
.h-dot {
  border-radius: 0;
  width: 28px;
  height: 28px;
  font-family: 'Orbitron', monospace;
  font-weight: 800;
  font-size: 12px;
  transition: all 0.15s ease;
}
.h-dot:active { transform: scale(0.92); }
.h-done {
  background: var(--zz-accent);
  color: #000;
  box-shadow: 0 0 10px var(--zz-accent-glow);
}
.h-miss {
  background: transparent;
  color: var(--zz-danger);
  border: 1px solid var(--zz-danger);
  box-shadow: 0 0 8px rgba(255, 51, 102, 0.4);
}
.h-empty {
  width: 8px;
  height: 8px;
  border-radius: 0;
  border: 1px solid var(--zz-accent-dim);
  background: transparent;
  opacity: 0.4;
  box-shadow: none;
}
body.dark-mode .h-done {
  background: var(--zz-accent);
  box-shadow: 0 0 12px var(--zz-accent-glow), inset 0 0 6px rgba(255,255,255,0.3);
}
body.dark-mode .h-miss {
  background: rgba(255, 51, 102, 0.08);
  box-shadow: 0 0 8px rgba(255, 51, 102, 0.4);
}

/* History tabs */
.history-tabs,
body.dark-mode .history-tabs {
  background: rgba(0, 8, 20, 0.6);
  border: 1px solid var(--zz-accent-dim);
  border-radius: 0;
  padding: 4px;
}
.history-tab {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--zz-text-dim);
  border-radius: 0;
  background: transparent;
  border: none;
  padding: 8px 14px;
  transition: all 0.15s;
}
.history-tab.active,
body.dark-mode .history-tab.active {
  background: var(--zz-accent);
  color: #000;
  box-shadow: 0 0 10px var(--zz-accent-glow);
}
.history-tab:not(.active):hover {
  background: rgba(0, 246, 255, 0.08);
  color: var(--zz-accent);
}

/* History summary stat boxes */
.history-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.history-summary > div,
.history-summary > .stat-box,
.history-summary > * {
  background: var(--zz-surface);
  border: 1px solid var(--zz-accent-dim);
  border-radius: 0;
  padding: 14px 10px;
  text-align: center;
  position: relative;
}
.history-summary > *::before,
.history-summary > *::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border: 1px solid var(--zz-accent);
  pointer-events: none;
}
.history-summary > *::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.history-summary > *::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* History table */
.history-card,
body.dark-mode .history-card {
  background: var(--zz-surface);
  border: 1px solid var(--zz-accent-dim);
  border-radius: 0;
  box-shadow: 0 0 24px rgba(0, 246, 255, 0.06);
}
.history-table th,
body.dark-mode .history-table th {
  background: rgba(0, 246, 255, 0.06);
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--zz-accent);
  font-size: 10px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--zz-accent-dim);
  padding: 10px 4px;
}
.history-table tbody tr td {
  border-bottom: 1px solid rgba(0, 246, 255, 0.06);
}
.history-table tbody tr:hover td {
  background: rgba(0, 246, 255, 0.03);
}
.history-table tbody tr td:first-child,
.history-table tbody tr td:last-child {
  border-radius: 0;
}

/* History date cell — first column */
.history-table tbody td:first-child {
  font-family: 'Orbitron', monospace;
  color: var(--zz-accent);
  font-weight: 700;
  letter-spacing: 0.05em;
  border-left: 2px solid transparent;
}
.history-table tbody tr:first-child td:first-child {
  border-left-color: var(--zz-accent);
  box-shadow: -8px 0 12px rgba(0, 246, 255, 0.3);
}

/* Big numbers in stat boxes */
.history-summary [class*="num"],
.history-summary .num {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 12px var(--zz-accent-glow);
  display: block;
}
.history-summary .label {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--zz-accent);
  opacity: 0.8;
  text-transform: uppercase;
}

/* Selection */
::selection { background: var(--zz-accent); color: #000; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--zz-accent-dim) transparent; }
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-thumb { background: var(--zz-accent-dim); border-radius: 0; }

/* WCAG 2.2 SC 2.3.3 — universal reduced-motion fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}


/* ======== PLAYER STATUS (from player-status.css) ======== */

/* ============================================================
   ZamZam — PLAYER STATUS PANEL (Solo Leveling)
   Hex rank, level, XP, 5-prayer daily mission, derived stats, buffs
   ============================================================ */

.player-status {
  position: relative;
  margin: 12px 0 18px;
  padding: 18px 18px 16px;
  background:
    linear-gradient(180deg, rgba(0,20,40,0.92), rgba(0,8,20,0.85));
  border: 1px solid var(--zz-accent-dim);
  box-shadow:
    0 0 28px rgba(0,246,255,0.18),
    inset 0 0 24px rgba(0,246,255,0.04),
    inset 0 1px 0 rgba(0,246,255,0.18);
  /* Asymmetric SL panel: top-left + bottom-right cut */
  clip-path: polygon(
    18px 0, 100% 0,
    100% calc(100% - 18px), calc(100% - 18px) 100%,
    0 100%, 0 18px
  );
  font-family: 'Geist', 'Inter', sans-serif;
  color: var(--zz-text);
  overflow: hidden;
  z-index: 1;
}

/* Scanline texture overlay */
.player-status::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(0,246,255,0.02) 3px,
      rgba(0,246,255,0.02) 4px
    );
  pointer-events: none;
  z-index: 0;
}

/* Diagonal accent stripe top */
.player-status::after {
  content: '';
  position: absolute;
  top: 0; left: 18px;
  width: calc(100% - 36px);
  height: 2px;
  background: linear-gradient(90deg,
    transparent, var(--zz-accent), var(--zz-purple), transparent);
  box-shadow: 0 0 8px var(--zz-accent-glow);
  pointer-events: none;
}

/* ---- Header: PLAYER STATUS label + rank badge ---- */
.ps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.ps-head-label {
  font-family: 'Orbitron', monospace;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: var(--zz-accent);
  text-shadow: 0 0 6px var(--zz-accent-glow);
  text-transform: uppercase;
}
.ps-head-label::before { content: '◆ '; opacity: 0.7; }

.ps-rank {
  width: 44px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0,246,255,0.20), rgba(157,62,255,0.20));
  border: 1px solid var(--zz-accent);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 22px;
  color: #fff;
  text-shadow:
    0 0 10px var(--zz-accent-glow),
    0 0 20px var(--zz-accent-glow);
  box-shadow: 0 0 16px var(--zz-accent-glow);
  letter-spacing: 0;
}
.ps-rank.rank-S { background: linear-gradient(135deg, rgba(255,215,0,0.28), rgba(255,102,0,0.20)); border-color: #ffd700; box-shadow: 0 0 18px rgba(255,215,0,0.6); }
.ps-rank.rank-A { background: linear-gradient(135deg, rgba(157,62,255,0.30), rgba(0,246,255,0.20)); border-color: #9d3eff; box-shadow: 0 0 18px var(--zz-purple-glow); }

/* ---- Identity row ---- */
.ps-id {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}
.ps-id-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 8px var(--zz-accent-glow);
  text-transform: uppercase;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-id-level {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--zz-accent);
  letter-spacing: 0.18em;
  text-shadow: 0 0 4px var(--zz-accent-glow);
  text-transform: uppercase;
  white-space: nowrap;
}
.ps-id-level .ps-id-lvnum {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin-left: 6px;
  letter-spacing: 0;
  text-shadow: 0 0 10px var(--zz-accent-glow);
}
.ps-id-title {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--zz-text-dim);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

/* ---- XP bar ---- */
.ps-xp-wrap {
  margin-top: 14px;
  position: relative;
  z-index: 1;
}
.ps-xp-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Orbitron', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--zz-accent);
  margin-bottom: 6px;
}
.ps-xp-meta .ps-xp-total {
  color: var(--zz-text-dim);
  font-weight: 600;
}
.ps-xp-meta .ps-xp-cur {
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ps-xp-track {
  height: 8px;
  background: rgba(0,246,255,0.08);
  border: 1px solid var(--zz-accent-dim);
  position: relative;
  overflow: hidden;
  /* Slight angular cut */
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
.ps-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--zz-accent), var(--zz-purple));
  box-shadow: 0 0 10px var(--zz-accent-glow);
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}
.ps-xp-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  background-size: 200% 100%;
  animation: ps-xp-shine 2.4s linear infinite;
}
@keyframes ps-xp-shine {
  from { background-position: -100% 0; }
  to   { background-position: 200% 0; }
}

/* ---- Daily Mission: 5 prayers ---- */
.ps-mission {
  margin-top: 16px;
  position: relative;
  z-index: 1;
}
.ps-mission-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: 'Orbitron', monospace;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.ps-mission-head-l {
  color: var(--zz-accent);
  font-weight: 800;
  text-shadow: 0 0 4px var(--zz-accent-glow);
}
.ps-mission-head-r {
  color: var(--zz-text-dim);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ps-mission-head.cleared .ps-mission-head-l {
  color: var(--zz-success);
  text-shadow: 0 0 8px rgba(0,255,163,0.6);
}
.ps-mission-head.cleared .ps-mission-head-r {
  color: var(--zz-success);
}

.ps-prayers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.ps-prayer {
  position: relative;
  aspect-ratio: 1;
  background: rgba(0,246,255,0.04);
  border: 1px solid var(--zz-accent-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  font-family: 'Orbitron', monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--zz-text-dim);
  text-transform: uppercase;
  /* Hex-like clip */
  clip-path: polygon(
    8px 0, calc(100% - 8px) 0,
    100% 8px, 100% calc(100% - 8px),
    calc(100% - 8px) 100%, 8px 100%,
    0 calc(100% - 8px), 0 8px
  );
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: default;
  overflow: hidden;
}
.ps-prayer-icon {
  font-size: 18px;
  line-height: 1;
  margin-bottom: 4px;
  filter: grayscale(0.7) opacity(0.6);
  transition: filter 0.25s;
}
.ps-prayer.done {
  background: linear-gradient(135deg, rgba(0,246,255,0.25), rgba(0,246,255,0.10));
  border-color: var(--zz-accent);
  color: #fff;
  box-shadow:
    0 0 14px var(--zz-accent-glow),
    inset 0 0 10px rgba(0,246,255,0.2);
  text-shadow: 0 0 6px var(--zz-accent-glow);
}
.ps-prayer.done .ps-prayer-icon {
  filter: none;
  text-shadow: 0 0 10px var(--zz-accent-glow);
}
.ps-prayer.missed {
  background: rgba(255,51,102,0.08);
  border-color: var(--zz-danger);
  color: var(--zz-danger);
  box-shadow: 0 0 8px rgba(255,51,102,0.3);
}
.ps-prayer.now {
  border-color: var(--zz-accent);
  animation: ps-prayer-pulse 1.6s ease-in-out infinite;
}
@keyframes ps-prayer-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0,246,255,0.3); }
  50%      { box-shadow: 0 0 18px rgba(0,246,255,0.7); }
}

/* ---- Stats grid: PIETY / DISCIPLINE / MERCY / KNOWLEDGE ---- */
.ps-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}
.ps-stat {
  background: rgba(0,8,20,0.6);
  border: 1px solid var(--zz-accent-dim);
  padding: 8px 4px;
  text-align: center;
  position: relative;
  /* Top-flat, bottom-cut SL tile */
  clip-path: polygon(
    0 0, 100% 0,
    100% calc(100% - 8px), calc(100% - 8px) 100%,
    8px 100%, 0 calc(100% - 8px)
  );
}
.ps-stat-label {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
  text-transform: uppercase;
  display: block;
  opacity: 0.85;
}
.ps-stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 10px var(--zz-accent-glow);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-top: 4px;
  line-height: 1;
}
.ps-stat-bar {
  height: 2px;
  background: rgba(0,246,255,0.12);
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.ps-stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--zz-accent), var(--zz-purple));
  box-shadow: 0 0 6px var(--zz-accent-glow);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---- Buffs row ---- */
.ps-buffs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}
.ps-buff {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: rgba(0,246,255,0.08);
  border: 1px solid var(--zz-accent-dim);
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
  /* Parallelogram */
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.ps-buff.gold {
  background: linear-gradient(90deg, rgba(255,215,0,0.20), rgba(255,215,0,0.08));
  border-color: var(--sys-gold, #ffd700);
  color: var(--sys-gold, #ffd700);
  text-shadow: 0 0 6px rgba(255,215,0,0.6);
  animation: ps-buff-gold 2.2s ease-in-out infinite;
}
@keyframes ps-buff-gold {
  0%, 100% { box-shadow: 0 0 6px rgba(255,215,0,0.4); }
  50%      { box-shadow: 0 0 16px rgba(255,215,0,0.8); }
}
.ps-buff.danger {
  background: rgba(255,51,102,0.10);
  border-color: var(--zz-danger);
  color: var(--zz-danger);
  text-shadow: 0 0 4px rgba(255,51,102,0.6);
  animation: ps-buff-danger 1.4s ease-in-out infinite;
}
@keyframes ps-buff-danger {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}
.ps-buff.purple {
  background: linear-gradient(90deg, rgba(157,62,255,0.20), rgba(157,62,255,0.08));
  border-color: var(--zz-purple);
  color: #c69eff;
  text-shadow: 0 0 6px var(--zz-purple-glow);
}
/* Clickable buffs (DAILY MISSION ACTIVE / CLEARED) */
.ps-buff.clickable {
  cursor: pointer;
  user-select: none;
  font-size: 10px;
  padding: 6px 12px;
  letter-spacing: 0.16em;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.ps-buff.clickable:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}
.ps-buff.clickable:active { transform: translateY(0) scale(0.96); }
.ps-buff.danger.clickable:hover {
  background: rgba(255,51,102,0.25);
  box-shadow: 0 0 18px rgba(255,51,102,0.6);
}
.ps-buff.gold.clickable:hover {
  background: linear-gradient(90deg, rgba(255,215,0,0.32), rgba(255,215,0,0.18));
  box-shadow: 0 0 18px rgba(255,215,0,0.7);
}
.ps-buff.clickable:focus-visible {
  outline: 2px solid var(--zz-accent);
  outline-offset: 2px;
}

/* ============================================================
   MISSION CLEARED overlay (full-screen, post 5/5 prayers)
   ============================================================ */
#missionClearedOverlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(0,246,255,0.30), rgba(0,0,0,0.96));
  backdrop-filter: blur(6px);
}
#missionClearedOverlay.show {
  display: flex;
  animation: mc-fade 4.5s ease forwards;
}
@keyframes mc-fade {
  0%   { opacity: 0; }
  6%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}
#missionClearedOverlay::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(0,246,255,0.25) 60deg,
    transparent 120deg,
    rgba(157,62,255,0.18) 180deg,
    transparent 240deg,
    rgba(0,246,255,0.25) 300deg,
    transparent 360deg
  );
  animation: mc-rays 8s linear infinite;
}
@keyframes mc-rays {
  to { transform: rotate(360deg); }
}
.mc-stack {
  position: relative;
  text-align: center;
  z-index: 2;
  padding: 0 24px;
  max-width: 480px;
}
.mc-label {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--zz-accent);
  letter-spacing: 0.4em;
  text-shadow: 0 0 8px var(--zz-accent-glow);
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0;
  animation: mc-label-fade 0.6s ease 0.2s forwards;
}
@keyframes mc-label-fade {
  to { opacity: 1; }
}
.mc-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 9vw, 64px);
  color: #fff;
  text-shadow:
    0 0 20px var(--zz-accent),
    0 0 40px var(--zz-accent),
    0 0 80px var(--zz-purple);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1;
  animation: mc-zoom 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes mc-zoom {
  0%   { transform: scale(0.4); opacity: 0; letter-spacing: 0.6em; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); letter-spacing: 0.18em; }
}
.mc-sub {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--zz-accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 12px;
  opacity: 0;
  animation: mc-sub-fade 0.7s ease 0.7s forwards;
}
@keyframes mc-sub-fade {
  to { opacity: 0.95; }
}
.mc-rewards {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: mc-rewards-fade 0.7s ease 1s forwards;
}
.mc-reward {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  background: rgba(0,246,255,0.12);
  border: 1px solid var(--zz-accent);
  color: #fff;
  text-shadow: 0 0 8px var(--zz-accent-glow);
  box-shadow: 0 0 14px var(--zz-accent-glow);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.mc-reward.gold {
  background: linear-gradient(90deg, rgba(255,215,0,0.25), rgba(255,165,0,0.15));
  border-color: #ffd700;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,215,0,0.7);
  box-shadow: 0 0 18px rgba(255,215,0,0.7);
}
@keyframes mc-rewards-fade {
  to { opacity: 1; }
}
.mc-tap {
  margin-top: 32px;
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  animation: mc-blink 1.4s ease-in-out infinite;
  opacity: 0;
  animation: mc-tap-blink 1.4s ease-in-out 1.6s infinite;
}
@keyframes mc-tap-blink {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.9; }
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .player-status {
    padding: 14px 12px 12px;
    margin: 8px 0 12px;
  }
  .ps-id-name { font-size: 16px; letter-spacing: 0.06em; }
  .ps-id-title { font-size: 9.5px; letter-spacing: 0.12em; }
  .ps-id-level .ps-id-lvnum { font-size: 24px; }
  .ps-stat-value { font-size: 19px; }
  .ps-stat-label { font-size: 8.5px; letter-spacing: 0.10em; }
  .ps-prayer { font-size: 8px; letter-spacing: 0.06em; }
  .ps-prayer-icon { font-size: 16px; margin-bottom: 2px; }
  .ps-buff { font-size: 8.5px; padding: 4px 9px; letter-spacing: 0.10em; }
  .ps-buff.clickable { font-size: 9px; padding: 5px 10px; }
  .ps-mission-head-l, .ps-mission-head-r { font-size: 9.5px; letter-spacing: 0.12em; }
  .ps-xp-cur, .ps-xp-total { font-size: 9.5px; }
  .ps-rank { width: 30px; height: 30px; font-size: 14px; }
  .ps-head-label { font-size: 9.5px; letter-spacing: 0.18em; }
}
@media (max-width: 380px) {
  .player-status { padding: 12px 10px 10px; }
  .ps-id-name { font-size: 14.5px; }
  .ps-id-level .ps-id-lvnum { font-size: 22px; }
  .ps-stat-value { font-size: 17px; }
  .ps-prayer { font-size: 7px; }
  .ps-prayer-icon { font-size: 14px; }
  .ps-buff { font-size: 7.5px; padding: 3px 7px; }
  .ps-buff.clickable { font-size: 8.5px; padding: 4px 8px; }
}

/* WCAG 2.2 SC 2.3.3 — universal reduced-motion fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}


/* ======== OVERRIDES (from solo-overrides.css) ======== */

/* ============================================================
   ZamZam — SOLO LEVELING OVERRIDES (Phase 2 — full ПОЛНЫЙ ФАРШ)
   Targets every existing UI element on top of solo-system.css.
   - Prayer hero → ACTIVE MISSION window
   - Prayer rows → hex stat tiles
   - Bottom nav → command dock
   - Header → command bar
   - Hijri date → terminal readout
   - Ramadan banner → boss-raid card
   - Sections / cards / inputs polished
   ============================================================ */

/* ---------- HEADER as command bar ---------- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 14px;
  margin-bottom: 6px;
  position: relative;
  background: linear-gradient(180deg, rgba(0,20,40,0.55), transparent);
}
header::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--zz-accent-dim), transparent);
}
.header-logo {
  max-height: 30px;
  filter: drop-shadow(0 0 10px var(--zz-accent-glow))
          drop-shadow(0 0 20px rgba(0, 246, 255, 0.3))
          hue-rotate(170deg) saturate(1.6);
  opacity: 0.95;
  transition: filter 0.3s;
}
.header-logo:hover {
  filter: drop-shadow(0 0 14px var(--zz-accent))
          drop-shadow(0 0 24px var(--zz-accent-glow))
          hue-rotate(170deg) saturate(1.6);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Location chip — terminal pill */
.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 246, 255, 0.06);
  border: 1px solid var(--zz-accent-dim);
  border-radius: 0;
  padding: 5px 10px;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
  transition: all 0.15s;
  /* Parallelogram cut */
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.location-chip:hover {
  background: rgba(0, 246, 255, 0.18);
  box-shadow: 0 0 12px var(--zz-accent-glow);
}
.location-chip-icon {
  font-size: 12px;
  filter: drop-shadow(0 0 4px var(--zz-accent-glow));
}

/* ============================================================
   Sync dot — FULL-FRAME state indicator (very visible)
   States: synced(green) / pending(yellow) / syncing(cyan)
           / offline(orange) / error(red)
   ============================================================ */
.sync-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 0;
  padding: 6px 12px;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  border: 2px solid transparent;
  white-space: nowrap;
}
.sync-dot:hover { transform: translateY(-1px); filter: brightness(1.15); }
.sync-dot:active { transform: scale(0.96); }
.sync-dot-led {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sync-dot-text { font-weight: 800; }

/* === SYNCED — bright green === */
.sync-dot.dot-synced {
  background: rgba(0, 255, 163, 0.18);
  border-color: var(--zz-success);
  color: var(--zz-success);
  text-shadow: 0 0 6px rgba(0, 255, 163, 0.7);
  box-shadow: 0 0 14px rgba(0, 255, 163, 0.45);
}
.sync-dot.dot-synced .sync-dot-led {
  background: var(--zz-success);
  box-shadow: 0 0 6px var(--zz-success), 0 0 12px rgba(0, 255, 163, 0.7);
  animation: led-breathe 2.4s ease-in-out infinite;
}
.sync-dot.dot-synced .sync-dot-text { color: var(--zz-success); }

/* === PENDING — bright yellow/amber === */
.sync-dot.dot-pending {
  background: rgba(255, 200, 0, 0.20);
  border-color: #ffc800;
  color: #ffc800;
  text-shadow: 0 0 6px rgba(255, 200, 0, 0.7);
  box-shadow: 0 0 16px rgba(255, 200, 0, 0.5);
  animation: dot-pulse-amber 1.4s ease-in-out infinite;
}
.sync-dot.dot-pending .sync-dot-led {
  background: #ffc800;
  box-shadow: 0 0 8px #ffc800, 0 0 14px rgba(255, 200, 0, 0.8);
  animation: led-breathe 1.4s ease-in-out infinite;
}
.sync-dot.dot-pending .sync-dot-text { color: #ffc800; }

/* === SYNCING — bright cyan with motion === */
.sync-dot.dot-syncing {
  background: rgba(0, 246, 255, 0.22);
  border-color: var(--zz-accent);
  color: var(--zz-accent);
  text-shadow: 0 0 8px var(--zz-accent);
  box-shadow: 0 0 18px var(--zz-accent-glow);
  animation: dot-pulse-cyan 0.9s ease-in-out infinite;
}
.sync-dot.dot-syncing .sync-dot-led {
  background: var(--zz-accent);
  box-shadow: 0 0 8px var(--zz-accent), 0 0 18px var(--zz-accent-glow);
  animation: led-spin 0.9s linear infinite;
}
.sync-dot.dot-syncing .sync-dot-text { color: #fff; text-shadow: 0 0 8px var(--zz-accent); }

/* === OFFLINE — orange/dim === */
.sync-dot.dot-offline {
  background: rgba(255, 120, 30, 0.20);
  border-color: #ff7a1e;
  color: #ff7a1e;
  text-shadow: 0 0 6px rgba(255, 120, 30, 0.7);
  box-shadow: 0 0 12px rgba(255, 120, 30, 0.4);
}
.sync-dot.dot-offline .sync-dot-led {
  background: #ff7a1e;
  box-shadow: 0 0 6px #ff7a1e, 0 0 12px rgba(255, 120, 30, 0.7);
  animation: led-breathe 3s ease-in-out infinite;
}
.sync-dot.dot-offline .sync-dot-text { color: #ff7a1e; }

/* === ERROR — RED, hard pulse — impossible to miss === */
.sync-dot.dot-error {
  background: rgba(255, 51, 102, 0.26);
  border-color: var(--zz-danger);
  color: #fff;
  text-shadow: 0 0 8px var(--zz-danger), 0 0 16px rgba(255, 51, 102, 0.6);
  box-shadow: 0 0 18px rgba(255, 51, 102, 0.7);
  animation: dot-pulse-red 0.7s ease-in-out infinite;
}
.sync-dot.dot-error .sync-dot-led {
  background: var(--zz-danger);
  box-shadow: 0 0 8px var(--zz-danger), 0 0 18px rgba(255, 51, 102, 0.9);
  animation: led-flash 0.5s steps(2) infinite;
}
.sync-dot.dot-error .sync-dot-text { color: #fff; }

@keyframes led-breathe {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}
@keyframes led-spin {
  0%   { box-shadow: 0 0 8px var(--zz-accent), inset -3px 0 0 rgba(0, 0, 0, 0.4); }
  50%  { box-shadow: 0 0 16px var(--zz-accent), inset 3px 0 0 rgba(0, 0, 0, 0.4); }
  100% { box-shadow: 0 0 8px var(--zz-accent), inset -3px 0 0 rgba(0, 0, 0, 0.4); }
}
@keyframes led-flash {
  50% { opacity: 0.2; }
}
@keyframes dot-pulse-cyan {
  0%, 100% { box-shadow: 0 0 12px var(--zz-accent-glow); }
  50%      { box-shadow: 0 0 26px var(--zz-accent), 0 0 36px rgba(0, 246, 255, 0.5); }
}
@keyframes dot-pulse-amber {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 200, 0, 0.4); }
  50%      { box-shadow: 0 0 22px rgba(255, 200, 0, 0.8); }
}
@keyframes dot-pulse-red {
  0%, 100% { box-shadow: 0 0 14px rgba(255, 51, 102, 0.5); }
  50%      { box-shadow: 0 0 28px var(--zz-danger), 0 0 44px rgba(255, 51, 102, 0.7); }
}

/* Icon buttons (theme, settings, qibla) — hex */
.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: rgba(0, 246, 255, 0.05);
  border: 1px solid var(--zz-accent-dim);
  border-radius: 0;
  color: var(--zz-accent);
  text-decoration: none;
  transition: all 0.18s;
  /* Hex */
  clip-path: polygon(
    6px 0, calc(100% - 6px) 0,
    100% 6px, 100% calc(100% - 6px),
    calc(100% - 6px) 100%, 6px 100%,
    0 calc(100% - 6px), 0 6px
  );
}
.icon-btn:hover {
  background: var(--zz-accent);
  color: #000;
  box-shadow: 0 0 14px var(--zz-accent-glow);
  transform: translateY(-1px);
}

/* ---------- HIJRI DATE as terminal readout ---------- */
.hijri-date {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
  text-align: center;
  padding: 6px 0;
  opacity: 0.85;
}
.hijri-date::before { content: '◆ HIJRI · '; opacity: 0.7; }
.hijri-date::after  { content: ' ◆';        opacity: 0.7; }

/* ---------- ISLAMIC EVENT BADGE ---------- */
.islamic-event-badge {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.18), rgba(255, 215, 0, 0.06));
  border: 1px solid #ffd700;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.4);
  padding: 8px 14px;
  margin: 8px 0;
  text-align: center;
  border-radius: 0;
  /* Asymmetric */
  clip-path: polygon(
    0 0, calc(100% - 10px) 0, 100% 10px,
    100% 100%, 10px 100%, 0 calc(100% - 10px)
  );
}
.islamic-event-badge::before { content: '★ EVENT · '; opacity: 0.85; }

/* ---------- RAMADAN BANNER as Boss Raid ---------- */
.ramadan-banner {
  background:
    linear-gradient(135deg, rgba(123, 45, 255, 0.18), rgba(0, 8, 20, 0.95));
  border: 1px solid var(--zz-purple);
  border-radius: 0;
  box-shadow:
    0 0 24px var(--zz-purple-glow),
    inset 0 0 20px rgba(123, 45, 255, 0.08);
  padding: 14px 16px;
  margin: 10px 0;
  position: relative;
  /* Asymmetric — top-right + bottom-left cut */
  clip-path: polygon(
    0 0, calc(100% - 14px) 0, 100% 14px,
    100% 100%, 14px 100%, 0 calc(100% - 14px)
  );
}
.ramadan-banner::before {
  content: '[ EVENT · RAMADAN ]';
  display: block;
  font-family: 'Orbitron', monospace;
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: var(--zz-purple);
  text-shadow: 0 0 6px var(--zz-purple-glow);
  font-weight: 800;
  margin-bottom: 6px;
}
.ramadan-header {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  text-shadow: 0 0 10px var(--zz-purple-glow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ramadan-times {
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  color: var(--zz-accent);
  margin-top: 4px;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 4px var(--zz-accent-glow);
}
.ramadan-countdown {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 14px var(--zz-accent-glow);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.ramadan-progress {
  height: 4px;
  background: rgba(123, 45, 255, 0.12);
  border: 1px solid var(--zz-purple);
  margin-top: 8px;
  border-radius: 0;
  overflow: hidden;
}
.ramadan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--zz-purple), var(--zz-accent));
  box-shadow: 0 0 8px var(--zz-purple-glow);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ramadan-day-text {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  color: var(--zz-purple);
  margin-top: 6px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- DATE HEADER (when navigating dates) ---------- */
.prayer-date-header {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--zz-accent);
  text-shadow: 0 0 6px var(--zz-accent-glow);
  text-transform: uppercase;
  text-align: center;
  padding: 10px 0 8px;
  opacity: 0.9;
}
.prayer-date-header:not(:empty)::before { content: '◆ DATE · '; opacity: 0.7; }
.prayer-date-header:not(:empty)::after  { content: ' ◆'; opacity: 0.7; }

/* ============================================================
   PRAYER HERO CARD — ACTIVE MISSION window
   ============================================================ */
.prayer-hero-card {
  position: relative;
  margin: 12px 0 16px;
  padding: 22px 18px 20px;
  background:
    radial-gradient(ellipse at top, rgba(0, 246, 255, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(0,20,40,0.92), rgba(0,8,20,0.85));
  border: 1px solid var(--zz-accent-dim);
  border-radius: 0;
  box-shadow:
    0 0 28px rgba(0,246,255,0.18),
    inset 0 0 30px rgba(0,246,255,0.04),
    inset 0 1px 0 rgba(0,246,255,0.20);
  /* Top-right + bottom-left cut */
  clip-path: polygon(
    0 0, calc(100% - 16px) 0, 100% 16px,
    100% 100%, 16px 100%, 0 calc(100% - 16px)
  );
  overflow: hidden;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
}
/* Scanline texture */
.prayer-hero-card::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(0,246,255,0.02) 3px,
      rgba(0,246,255,0.02) 4px
    );
  pointer-events: none;
  z-index: 0;
}
/* Top accent */
.prayer-hero-card > * { position: relative; z-index: 1; }

.prayer-hero-label {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--zz-accent);
  text-shadow: 0 0 6px var(--zz-accent-glow);
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
  opacity: 0.95;
}
.prayer-hero-label::before { content: '◆ '; opacity: 0.7; }
.prayer-hero-label::after  { content: ' ◆'; opacity: 0.7; }

.prayer-hero-name {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 9vw, 44px);
  color: #fff;
  text-shadow:
    0 0 14px var(--zz-accent),
    0 0 28px var(--zz-accent-glow),
    0 0 56px rgba(0,246,255,0.3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0;
}

.prayer-hero-time {
  font-family: 'Orbitron', monospace;
  font-weight: 800;
  font-size: clamp(20px, 6vw, 28px);
  color: var(--zz-accent);
  text-shadow: 0 0 10px var(--zz-accent-glow);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
}

/* ============================================================
   Countdown badge — color-coded by time remaining
   GREEN  : >3h    (calm)
   YELLOW : 1h-3h  (heads up)
   RED    : <1h    (red fills from right as time runs out)
   00:00  : full red
   On reset (next prayer) → back to GREEN automatically
   ============================================================ */
.prayer-hero-countdown {
  --cd-fill: 0%;
  position: relative;
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 12px;
  padding: 7px 16px;
  display: inline-block;
  border: 2px solid transparent;
  background: rgba(0, 8, 20, 0.6);
  font-variant-numeric: tabular-nums;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  overflow: hidden;
  z-index: 1;
  transition: border-color 0.4s, color 0.4s, text-shadow 0.4s, box-shadow 0.4s;
}
/* Red progress bar that fills from right → left as <1h ticks down */
.prayer-hero-countdown::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  right: 0;
  width: var(--cd-fill, 0%);
  background: linear-gradient(90deg, rgba(255, 51, 102, 0.45), rgba(255, 51, 102, 0.85));
  box-shadow: 0 0 16px rgba(255, 51, 102, 0.6);
  z-index: -1;
  transition: width 1s linear;
}

/* GREEN — plenty of time (>3h) */
.prayer-hero-countdown.cd-green {
  background: rgba(0, 255, 163, 0.10);
  border-color: var(--zz-success);
  color: var(--zz-success);
  text-shadow: 0 0 8px rgba(0, 255, 163, 0.7);
  box-shadow: 0 0 14px rgba(0, 255, 163, 0.45);
  animation: cd-green-breath 3s ease-in-out infinite;
}
@keyframes cd-green-breath {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 255, 163, 0.35); }
  50%      { box-shadow: 0 0 22px rgba(0, 255, 163, 0.65); }
}

/* YELLOW — getting close (1h-3h) */
.prayer-hero-countdown.cd-yellow {
  background: rgba(255, 200, 0, 0.12);
  border-color: #ffc800;
  color: #ffc800;
  text-shadow: 0 0 8px rgba(255, 200, 0, 0.7);
  box-shadow: 0 0 16px rgba(255, 200, 0, 0.5);
  animation: cd-yellow-pulse 1.8s ease-in-out infinite;
}
@keyframes cd-yellow-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 200, 0, 0.4); }
  50%      { box-shadow: 0 0 24px rgba(255, 200, 0, 0.8); }
}

/* RED — <1h, red bar chases yellow filling from right→left.
   Border + text turn red as fill grows. */
.prayer-hero-countdown.cd-red {
  background: rgba(255, 200, 0, 0.10);
  border-color: var(--zz-danger);
  color: #fff;
  text-shadow: 0 0 8px var(--zz-danger), 0 0 16px rgba(255, 51, 102, 0.6);
  box-shadow: 0 0 18px rgba(255, 51, 102, 0.6);
  animation: cd-red-pulse 1s ease-in-out infinite;
}
@keyframes cd-red-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(255, 51, 102, 0.5); }
  50%      { box-shadow: 0 0 28px var(--zz-danger), 0 0 44px rgba(255, 51, 102, 0.7); }
}

/* Hero nav arrows — make hex */
.hero-nav-arrow {
  background: rgba(0, 246, 255, 0.06);
  border: 1px solid var(--zz-accent-dim);
  color: var(--zz-accent);
  border-radius: 0;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  text-shadow: 0 0 4px var(--zz-accent-glow);
  transition: all 0.18s;
  clip-path: polygon(
    6px 0, calc(100% - 6px) 0,
    100% 6px, 100% calc(100% - 6px),
    calc(100% - 6px) 100%, 6px 100%,
    0 calc(100% - 6px), 0 6px
  );
}
.hero-nav-arrow:hover {
  background: var(--zz-accent);
  color: #000;
  box-shadow: 0 0 12px var(--zz-accent-glow);
}

/* ============================================================
   PRAYER TIME ROWS — SL stat tiles
   ============================================================ */
#prayerTimesList { padding: 4px 0; }

.prayer-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  margin: 8px 12px;
  background: rgba(0, 8, 20, 0.55);
  border: 1px solid rgba(0, 246, 255, 0.12);
  border-radius: 0;
  position: relative;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Asymmetric — top-right + bottom-left cut */
  clip-path: polygon(
    0 0, calc(100% - 10px) 0, 100% 10px,
    100% 100%, 10px 100%, 0 calc(100% - 10px)
  );
}
.prayer-time-row.clickable { cursor: pointer; }
.prayer-time-row:hover {
  background: rgba(0, 246, 255, 0.06);
  border-color: var(--zz-accent-dim);
  transform: translateX(2px);
}

/* Left: hex icon + name */
.prayer-time-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.prayer-time-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(0, 246, 255, 0.08);
  border: 1px solid var(--zz-accent-dim);
  filter: drop-shadow(0 0 4px var(--zz-accent-glow));
  /* Hex */
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  flex-shrink: 0;
}
.prayer-time-label {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zz-text);
  text-shadow: 0 0 4px rgba(0,246,255,0.2);
}

/* Right: state btn + done-at + time */
.prayer-time-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.prayer-time-value {
  font-family: 'Orbitron', monospace;
  font-weight: 800;
  font-size: 15px;
  color: var(--zz-accent);
  text-shadow: 0 0 6px var(--zz-accent-glow);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.prayer-done-at {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--zz-success);
  text-shadow: 0 0 4px rgba(0,255,163,0.5);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  opacity: 0.95;
}
.prayer-done-at:not(:empty)::before { content: '◆ '; opacity: 0.7; }

/* === State buttons (the cycle ✓/❌/⬜) === */
button#pstate-Fajr, button#pstate-Dhuhr, button#pstate-Asr,
button#pstate-Maghrib, button#pstate-Isha, button#pstate-Witr,
button#pstate-Tahajjud, .prayer-time-row .state-btn,
button[id^="pstate-"] {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: rgba(0, 246, 255, 0.05);
  border: 1px solid var(--zz-accent-dim);
  color: var(--zz-accent);
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  /* Hex */
  clip-path: polygon(
    6px 0, calc(100% - 6px) 0,
    100% 6px, 100% calc(100% - 6px),
    calc(100% - 6px) 100%, 6px 100%,
    0 calc(100% - 6px), 0 6px
  );
}
button[id^="pstate-"]:active { transform: scale(0.92); }

/* === Row state colors === */
/* Next / current — bright cyan with pulse */
.prayer-time-row.prayer-next {
  background: linear-gradient(90deg, rgba(0,246,255,0.10), rgba(0,8,20,0.7));
  border-color: var(--zz-accent);
  box-shadow:
    0 0 18px var(--zz-accent-glow),
    inset 0 0 14px rgba(0,246,255,0.06);
  animation: row-next-pulse 2s ease-in-out infinite;
}
@keyframes row-next-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(0,246,255,0.3), inset 0 0 12px rgba(0,246,255,0.04); }
  50%      { box-shadow: 0 0 24px var(--zz-accent-glow), inset 0 0 18px rgba(0,246,255,0.08); }
}
.prayer-time-row.prayer-next .prayer-time-icon {
  background: var(--zz-accent);
  border-color: #fff;
  box-shadow: 0 0 12px var(--zz-accent-glow);
  filter: drop-shadow(0 0 8px var(--zz-accent-glow));
}
.prayer-time-row.prayer-next .prayer-time-label,
.prayer-time-row.prayer-next .prayer-time-value {
  color: #fff;
  text-shadow: 0 0 8px var(--zz-accent-glow);
}
.prayer-time-row.prayer-next::before {
  content: 'NOW';
  position: absolute;
  top: -1px; left: 14px;
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #000;
  background: var(--zz-accent);
  padding: 2px 6px 2px 4px;
  text-shadow: none;
  box-shadow: 0 0 8px var(--zz-accent-glow);
  z-index: 2;
}

/* Passed but not done — dim */
.prayer-time-row.prayer-passed:not(.prayer-next):not(.prayer-info) {
  opacity: 0.55;
}

/* Info-only rows (Sunrise, Ishraq) — purple subdued */
.prayer-time-row.prayer-info {
  background: rgba(123, 45, 255, 0.04);
  border-color: rgba(123, 45, 255, 0.15);
}
.prayer-time-row.prayer-info .prayer-time-icon {
  background: rgba(123, 45, 255, 0.10);
  border-color: rgba(123, 45, 255, 0.3);
  filter: drop-shadow(0 0 4px var(--zz-purple-glow));
}
.prayer-time-row.prayer-info .prayer-time-label {
  color: #b89aff;
  text-shadow: 0 0 4px var(--zz-purple-glow);
}
.prayer-time-row.prayer-info .prayer-time-value {
  color: #b89aff;
  text-shadow: 0 0 4px var(--zz-purple-glow);
}

/* When a prayer state button is "done" (true), highlight whole row */
.prayer-time-row:has(button[id^="pstate-"].state-done),
.prayer-time-row:has(button.state-done) {
  background: linear-gradient(90deg, rgba(0,255,163,0.06), rgba(0,8,20,0.7));
  border-color: rgba(0,255,163,0.35);
}
.prayer-time-row:has(button.state-done) .prayer-time-icon {
  background: rgba(0,255,163,0.18);
  border-color: var(--zz-success);
  filter: drop-shadow(0 0 6px rgba(0,255,163,0.6));
}

/* state-done style on the button itself */
button[id^="pstate-"].state-done,
.prayer-time-row .state-done {
  background: var(--zz-success);
  color: #000;
  border-color: var(--zz-success);
  box-shadow: 0 0 14px rgba(0,255,163,0.6),
              inset 0 0 6px rgba(255,255,255,0.3);
  text-shadow: none;
}
button[id^="pstate-"].state-missed,
.prayer-time-row .state-missed {
  background: rgba(255,51,102,0.10);
  color: var(--zz-danger);
  border-color: var(--zz-danger);
  box-shadow: 0 0 10px rgba(255,51,102,0.5);
}

/* ============================================================
   BOTTOM NAV — command dock
   ============================================================ */
.bottom-nav {
  background: linear-gradient(0deg, rgba(0,8,20,0.97), rgba(0,20,40,0.94));
  /* Lighter blur — 22px caused repaint pressure on every hover/scroll */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  contain: layout paint;
  border: none;
  border-top: 1px solid var(--zz-accent-dim);
  border-radius: 0;
  box-shadow:
    0 -4px 24px rgba(0,246,255,0.20),
    inset 0 1px 0 rgba(0,246,255,0.20);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px 10px;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--zz-text-muted);
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  transition: all 0.18s;
  border-radius: 0;
  min-width: 56px;
}
.nav-icon {
  font-size: 18px;
  line-height: 1;
  filter: grayscale(0.6) opacity(0.7);
  transition: filter 0.18s, transform 0.18s;
}
.nav-item:hover .nav-icon {
  filter: grayscale(0) opacity(1);
  transform: translateY(-1px);
}
.nav-item:hover { color: var(--zz-accent); }

.nav-item.active {
  color: var(--zz-accent);
  text-shadow: 0 0 8px var(--zz-accent-glow);
}
.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 6px var(--zz-accent-glow)) opacity(1);
  transform: translateY(-2px);
}
/* Active marker — top hex bar */
.nav-item.active::before {
  content: '';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 3px;
  background: var(--zz-accent);
  box-shadow: 0 0 10px var(--zz-accent-glow);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 100%, 0 100%);
  animation: nav-active-glow 1.8s ease-in-out infinite;
}
@keyframes nav-active-glow {
  0%, 100% { opacity: 0.7; box-shadow: 0 0 6px rgba(0,246,255,0.4); }
  50%      { opacity: 1;   box-shadow: 0 0 14px var(--zz-accent-glow); }
}

/* ============================================================
   COUNTDOWN OVERLAY (when tapping a prayer time)
   ============================================================ */
#countdownOverlay,
.countdown-overlay {
  background: radial-gradient(circle at center, rgba(0,246,255,0.18), rgba(0,0,0,0.95));
  backdrop-filter: blur(8px);
}
#countdownOverlay .overlay-prayer-name,
#overlayPrayerName {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 8vw, 42px);
  color: #fff;
  text-shadow: 0 0 18px var(--zz-accent), 0 0 36px var(--zz-accent-glow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
#countdownOverlay .overlay-prayer-time,
#overlayPrayerTime {
  font-family: 'Orbitron', monospace;
  font-weight: 800;
  font-size: 20px;
  color: var(--zz-accent);
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px var(--zz-accent-glow);
  font-variant-numeric: tabular-nums;
}
#countdownOverlay .countdown-display,
#countdownText {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: clamp(40px, 12vw, 64px);
  color: #fff;
  text-shadow:
    0 0 20px var(--zz-accent),
    0 0 40px var(--zz-accent-glow);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  margin-top: 16px;
}

/* ============================================================
   QAZA / HABITS / FASTING / SALAWAT / ISTIGHFAR (today.html)
   Polish toggles + counters
   ============================================================ */

/* Section header inside cards (when there's a label inline) */
.section-row, .row-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid rgba(0,246,255,0.06);
}

/* Generic "+N" / number control buttons */
button.text-btn,
button.istighfar-btn {
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 14px;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

/* Big counter values (Salawat / Istighfar) — extra glow */
.istighfar-total,
.salawat-total,
.counter-total {
  text-align: center;
  padding: 18px 0;
}
.istighfar-total span,
.salawat-total span,
.counter-total span {
  font-size: 40px;
  text-shadow:
    0 0 16px var(--zz-accent),
    0 0 36px var(--zz-accent-glow);
  display: inline-block;
  animation: counter-breathe 4s ease-in-out infinite;
}
@keyframes counter-breathe {
  0%, 100% { text-shadow: 0 0 14px var(--zz-accent), 0 0 28px var(--zz-accent-glow); }
  50%      { text-shadow: 0 0 20px var(--zz-accent), 0 0 44px var(--zz-accent-glow); }
}

/* ============================================================
   STATS PAGE — heatmap polish (override styles.css)
   ============================================================ */
.heatmap-cell {
  border-radius: 0;
}
.heatmap-cell.lvl-1 { background: rgba(0, 246, 255, 0.18); box-shadow: 0 0 4px rgba(0,246,255,0.18); }
.heatmap-cell.lvl-2 { background: rgba(0, 246, 255, 0.40); box-shadow: 0 0 6px rgba(0,246,255,0.30); }
.heatmap-cell.lvl-3 { background: rgba(0, 246, 255, 0.65); box-shadow: 0 0 8px rgba(0,246,255,0.45); }
.heatmap-cell.lvl-4 { background: var(--zz-accent);          box-shadow: 0 0 10px var(--zz-accent-glow); }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 380px) {
  .prayer-hero-card { padding: 18px 14px 16px; }
  .prayer-time-row { padding: 10px 12px; margin: 6px 8px; }
  .prayer-time-icon { width: 30px; height: 30px; font-size: 15px; }
  .prayer-time-label { font-size: 12px; letter-spacing: 0.1em; }
  .prayer-time-value { font-size: 13px; }
  .nav-item { font-size: 8px; min-width: 48px; padding: 5px 6px; }
  .nav-icon { font-size: 16px; }
  .location-chip { font-size: 9px; padding: 4px 8px; }
  .sync-dot { font-size: 8px; padding: 4px 8px; }
  .icon-btn { width: 30px; height: 30px; font-size: 14px; }
}

/* Add bottom padding so content doesn't sit under fixed nav */
body { padding-bottom: 80px; }

/* Container max-width on phones */
@media (max-width: 600px) {
  .container {
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* WCAG 2.2 SC 2.3.3 — universal reduced-motion fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}


/* ======== FX (from solo-fx.css) ======== */

/* ============================================================
   ZamZam — SOLO LEVELING ENVIRONMENT EFFECTS (FX)
   Animated dungeon background, hex grid, scanlines, vignette,
   level-up flash, mission-window opening transition.
   Loaded LAST so wins over solo-system.css body::before/::after.
   ============================================================ */

/* Solid base — FX layers paint on top via real divs (NOT pseudo-elements,
   to avoid z-index quirks with opaque body bg) */
body {
  background: var(--zz-bg);
  min-height: 100vh;
}

/* Kill old layers from solo-system.css and styles.css that conflict */
body::before, body::after { display: none; }

/* ============================================================
   LAYER 1: deep-space radial nebula (real div, injected by JS)
   ============================================================ */
.fx-layer-nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 20% 0%,   rgba(0, 246, 255, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 80% 70% at 100% 50%, rgba(157, 62, 255, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 110%, rgba(0, 80, 255, 0.22) 0%,   transparent 60%),
    radial-gradient(ellipse 60% 50% at 0% 100%,  rgba(0, 246, 255, 0.12) 0%,  transparent 55%);
  animation: bg-nebula-pulse 14s ease-in-out infinite;
}
@keyframes bg-nebula-pulse {
  0%, 100% { opacity: 0.95; transform: scale(1) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.04) rotate(0.4deg); }
}

/* ============================================================
   LAYER 2: animated SL grid (the signature blue mesh)
   Two grids — one big, one fine — drifting opposite directions
   ============================================================ */
.fx-layer-grid {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    /* Coarse grid 80px */
    linear-gradient(rgba(0, 246, 255, 0.045) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, rgba(0, 246, 255, 0.045) 1px, transparent 1px) 0 0 / 80px 80px,
    /* Fine grid 16px */
    linear-gradient(rgba(0, 246, 255, 0.020) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(0, 246, 255, 0.020) 1px, transparent 1px) 0 0 / 16px 16px;
  /* Perspective floor effect */
  mask-image: radial-gradient(ellipse 90% 70% at 50% 60%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 60%, #000 0%, transparent 100%);
  animation: grid-drift 32s linear infinite;
}
@keyframes grid-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 80px 80px, 80px 80px, 16px 16px, 16px 16px; }
}

/* ============================================================
   LAYER 3: stars / particles (sharp pinpoints + drift)
   ============================================================ */
.fx-layer-stars {
  position: fixed; inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%,  rgba(0, 246, 255, 0.95), transparent 60%),
    radial-gradient(1px 1px at 70% 60%,      rgba(0, 246, 255, 0.7),  transparent 60%),
    radial-gradient(2px 2px at 40% 80%,      rgba(157, 62, 255, 0.85),transparent 60%),
    radial-gradient(1px 1px at 85% 25%,      rgba(0, 246, 255, 0.6),  transparent 60%),
    radial-gradient(1.5px 1.5px at 15% 65%,  rgba(0, 246, 255, 0.7),  transparent 60%),
    radial-gradient(1px 1px at 60% 15%,      rgba(157, 62, 255, 0.55),transparent 60%),
    radial-gradient(2px 2px at 30% 50%,      rgba(0, 246, 255, 0.6),  transparent 60%),
    radial-gradient(1px 1px at 90% 80%,      rgba(255, 255, 255, 0.5),transparent 60%),
    radial-gradient(1.5px 1.5px at 5% 90%,   rgba(0, 246, 255, 0.7),  transparent 60%),
    radial-gradient(1px 1px at 50% 5%,       rgba(255, 255, 255, 0.6),transparent 60%);
  background-size: 700px 700px;
  animation: stars-drift 90s linear infinite, stars-twinkle 3s ease-in-out infinite;
}
@keyframes stars-drift {
  from { background-position: 0 0; }
  to   { background-position: -700px -700px; }
}
@keyframes stars-twinkle {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}

/* ============================================================
   LAYER 4: scanlines (very subtle CRT feel) — desktop only
   ============================================================ */
.fx-layer-scan {
  position: fixed; inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 246, 255, 0.012) 2px,
    rgba(0, 246, 255, 0.012) 3px
  );
  mix-blend-mode: screen;
  contain: paint;
}

/* ============================================================
   LAYER 5: vignette + edge glow
   ============================================================ */
.fx-layer-vignette {
  position: fixed; inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.65) 100%);
  mix-blend-mode: multiply;
  contain: paint;
}

/* Containment hints for paint isolation */
.fx-layer-nebula, .fx-layer-grid, .fx-layer-stars { contain: paint; }

/* Off-screen cards skip layout/paint until they scroll into view.
   Saves ~30-60% scroll cost on stats page (which has 10+ cards). */
.card {
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
}
/* Exception: keep critical above-fold cards always rendered */
.prayer-hero-card,
#playerStatusMount,
.player-status,
#sysBar {
  content-visibility: visible;
}

/* On low-end / mobile: drop the heaviest layers (mix-blend-mode is GPU-expensive)
   and slow down ambient anims to reduce paint frequency */
@media (max-width: 600px), (pointer: coarse) {
  .fx-layer-scan, .fx-layer-vignette { display: none; }
  .fx-layer-nebula { animation-duration: 30s; }
  .fx-layer-grid   { animation-duration: 60s; }
  .fx-layer-stars  { animation: none; opacity: 0.7; }
  .fx-layer-edge-top, .fx-layer-edge-bot { animation: none; opacity: 0.5; }
}

/* Respect user motion preference — kill all decorative animations */
@media (prefers-reduced-motion: reduce) {
  .fx-layer-grid, .fx-layer-stars, .fx-layer-nebula,
  .fx-layer-edge-top, .fx-layer-edge-bot,
  #sysBar .sys-bar-fill::after,
  .ramadan-progress-fill, .prayer-time-row.prayer-next,
  .ach-tile.unlocked, .istighfar-total span, .salawat-total span,
  .counter-total span, .ins-card.ins-urgent,
  .nav-item.active::before, .ps-buff.gold, .ps-buff.danger,
  .syslog-line, .feed-line {
    animation: none;
  }
  * { transition-duration: 0.05s; }
}

/* Top edge — like an SL system bar starting to slide down */
.fx-layer-edge-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--zz-accent), transparent);
  box-shadow: 0 0 14px var(--zz-accent-glow);
  z-index: 100;
  pointer-events: none;
  opacity: 0.45;
  animation: edge-pulse 4s ease-in-out infinite;
}
.fx-layer-edge-bot {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--zz-purple), transparent);
  box-shadow: 0 0 10px var(--zz-purple-glow);
  z-index: 100;
  pointer-events: none;
  opacity: 0.35;
  animation: edge-pulse 6s ease-in-out infinite reverse;
}
@keyframes edge-pulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.7; }
}

/* Make all real content sit above FX layers (which use z-index 0..4) */
.container, header, .bottom-nav, #sysBar,
.location-modal-overlay, .countdown-overlay, .toast,
.greeter-overlay, #missionClearedOverlay, #countdownOverlay,
.date-picker-overlay
  { position: relative; z-index: 10; }
.bottom-nav { position: fixed; z-index: 50; }
#sysBar { position: fixed; z-index: 60; }
.location-modal-overlay, .countdown-overlay, .greeter-overlay,
#missionClearedOverlay, .date-picker-overlay { position: fixed; z-index: 9000; }

/* ============================================================
   LEVEL UP — full-screen flash event
   Triggered by adding class .lvl-up-flash to body
   ============================================================ */
body.lvl-up-flash::after {
  content: 'LEVEL UP';
  display: block;
  position: fixed; inset: 0;
  z-index: 9998;
  background:
    radial-gradient(circle at center, rgba(0,246,255,0.5), transparent 60%),
    rgba(0, 8, 20, 0.85);
  pointer-events: none;
  animation: lvl-flash 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(48px, 14vw, 100px);
  letter-spacing: 0.18em;
  color: #fff;
  text-shadow:
    0 0 30px var(--zz-accent),
    0 0 60px var(--zz-accent-glow),
    0 0 120px rgba(0, 246, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
@keyframes lvl-flash {
  0%   { opacity: 0; transform: scale(0.4); filter: blur(20px); }
  20%  { opacity: 1; transform: scale(1.2); filter: blur(0); }
  60%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* ============================================================
   PRAYER COMPLETED — micro flash on the row
   Add class .row-pulse-cyan to .prayer-time-row briefly
   ============================================================ */
.prayer-time-row.row-pulse-cyan {
  animation: row-pulse-cyan 0.7s ease-out;
}
@keyframes row-pulse-cyan {
  0%   { box-shadow: 0 0 0 0 rgba(0, 255, 163, 0.5), inset 0 0 0 rgba(0,255,163,0.2); }
  50%  { box-shadow: 0 0 24px rgba(0, 255, 163, 0.8), inset 0 0 14px rgba(0, 255, 163, 0.18); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 163, 0); }
}
.prayer-time-row.row-pulse-red {
  animation: row-pulse-red 0.5s ease-out;
}
@keyframes row-pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.5); }
  50%  { box-shadow: 0 0 18px rgba(255, 51, 102, 0.7); }
  100% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0); }
}

/* ============================================================
   DAILY GREETER MODAL — typewriter
   ============================================================ */
.greeter-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(0, 8, 20, 0.92), rgba(0, 0, 0, 0.96));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.greeter-overlay.show { opacity: 1; pointer-events: auto; }
.greeter-card {
  width: min(440px, 100%);
  background: linear-gradient(180deg, rgba(0, 20, 40, 0.95), rgba(0, 8, 20, 0.95));
  border: 1px solid var(--zz-accent);
  box-shadow:
    0 0 50px rgba(0, 246, 255, 0.4),
    inset 0 0 30px rgba(0, 246, 255, 0.06);
  padding: 28px 22px 22px;
  font-family: 'Orbitron', monospace;
  position: relative;
  clip-path: polygon(
    0 0, calc(100% - 18px) 0, 100% 18px,
    100% 100%, 18px 100%, 0 calc(100% - 18px)
  );
  transform: translateY(20px);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.greeter-overlay.show .greeter-card { transform: translateY(0); }
.greeter-tag {
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--zz-accent);
  text-shadow: 0 0 6px var(--zz-accent-glow);
  font-weight: 800;
  margin-bottom: 14px;
}
.greeter-line {
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--zz-text);
  margin: 6px 0;
  min-height: 18px;
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 0 4px rgba(0, 246, 255, 0.2);
}
.greeter-line strong {
  color: var(--zz-accent);
  font-weight: 800;
  text-shadow: 0 0 8px var(--zz-accent-glow);
}
.greeter-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--zz-accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  box-shadow: 0 0 6px var(--zz-accent-glow);
  animation: greeter-blink 0.8s steps(2) infinite;
}
@keyframes greeter-blink { 50% { opacity: 0; } }
.greeter-cta {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 22px;
  background: var(--zz-accent);
  color: #000;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 18px var(--zz-accent-glow);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  opacity: 0;
  transition: opacity 0.3s, box-shadow 0.2s;
}
.greeter-cta.ready { opacity: 1; }
.greeter-cta:hover { box-shadow: 0 0 30px var(--zz-accent); }

/* ============================================================
   ACHIEVEMENTS GRID
   ============================================================ */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  padding: 12px 14px 16px;
}
@media (max-width: 600px) {
  .ach-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; padding: 8px 10px 12px; }
  .ach-icon { font-size: 18px; }
  .ach-name { font-size: 6.5px; letter-spacing: 0.06em; }
}
@media (max-width: 380px) {
  .ach-grid { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 5px; padding: 6px 8px 10px; }
  .ach-icon { font-size: 16px; }
  .ach-name { font-size: 6px; letter-spacing: 0.04em; }
}
.ach-tile {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(0, 8, 20, 0.65);
  border: 1px solid rgba(0, 246, 255, 0.15);
  cursor: help;
  transition: all 0.18s;
  font-family: 'Orbitron', monospace;
  /* Hex */
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.ach-tile.locked {
  opacity: 0.4;
  filter: grayscale(0.9);
}
.ach-tile.unlocked {
  background: linear-gradient(135deg, rgba(0, 246, 255, 0.18), rgba(0, 8, 20, 0.6));
  border-color: var(--zz-accent);
  box-shadow: 0 0 14px rgba(0, 246, 255, 0.45);
  animation: ach-unlocked-glow 4s ease-in-out infinite;
}
@keyframes ach-unlocked-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 246, 255, 0.35); }
  50%      { box-shadow: 0 0 22px rgba(0, 246, 255, 0.65); }
}
.ach-tile.unlocked.gold {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(0, 8, 20, 0.6));
  border-color: #ffd700;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.5);
}
.ach-tile.unlocked.purple {
  background: linear-gradient(135deg, rgba(157, 62, 255, 0.20), rgba(0, 8, 20, 0.6));
  border-color: var(--zz-purple);
  box-shadow: 0 0 16px var(--zz-purple-glow);
}
.ach-icon {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(0, 246, 255, 0.55));
}
.ach-tile.locked .ach-icon { filter: grayscale(1) opacity(0.6); }
.ach-name {
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--zz-accent);
  text-align: center;
  line-height: 1.1;
  text-shadow: 0 0 4px var(--zz-accent-glow);
  padding: 0 4px;
}
.ach-tile.locked .ach-name { color: var(--zz-text-muted); text-shadow: none; }

/* ============================================================
   ACTIVITY FEED — terminal log
   ============================================================ */
.feed {
  padding: 12px 14px 16px;
  font-family: 'Geist Mono', 'Orbitron', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  max-height: 320px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 246, 255, 0.08);
  margin: 0 14px 14px;
}
.feed::-webkit-scrollbar { width: 4px; }
.feed::-webkit-scrollbar-thumb { background: var(--zz-accent-dim); }
.feed-line {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0, 246, 255, 0.06);
  align-items: baseline;
  opacity: 0;
  animation: feed-line-in 0.4s ease forwards;
}
@keyframes feed-line-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
.feed-time {
  color: var(--zz-accent);
  text-shadow: 0 0 3px var(--zz-accent-glow);
  font-weight: 600;
  opacity: 0.85;
}
.feed-event {
  color: var(--zz-text);
  font-weight: 500;
}
.feed-event.event-prayer  { color: var(--zz-success); text-shadow: 0 0 4px rgba(0, 255, 163, 0.4); }
.feed-event.event-missed  { color: var(--zz-danger);  text-shadow: 0 0 4px rgba(255, 51, 102, 0.4); }
.feed-event.event-dhikr   { color: var(--zz-purple);  text-shadow: 0 0 4px var(--zz-purple-glow); }
.feed-event.event-system  { color: #ffd700;            text-shadow: 0 0 4px rgba(255, 215, 0, 0.4); }
.feed-xp {
  color: var(--zz-accent);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 4px var(--zz-accent-glow);
}
.feed-xp.neg { color: var(--zz-danger); text-shadow: 0 0 4px rgba(255, 51, 102, 0.4); }
.feed-empty {
  text-align: center;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--zz-text-muted);
  text-transform: uppercase;
  padding: 30px 12px;
}

/* ============================================================
   MINI SYSTEM LOG (compact terminal on index/today)
   ============================================================ */
.mini-syslog {
  margin-top: 10px;
  margin-bottom: 12px;
  position: relative;
}
.syslog-body {
  font-family: 'Geist Mono', 'Orbitron', monospace;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  padding: 6px 14px 4px;
  max-height: 130px;
  overflow: hidden;
  position: relative;
}
.syslog-body::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 26px;
  background: linear-gradient(transparent, rgba(0, 8, 20, 0.95));
  pointer-events: none;
}
.syslog-line {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px dashed rgba(0, 246, 255, 0.05);
  align-items: baseline;
  opacity: 0;
  animation: feed-line-in 0.3s ease forwards;
}
.syslog-line:last-child { border-bottom: none; }
.syslog-t {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--zz-accent);
  text-shadow: 0 0 3px var(--zz-accent-glow);
  opacity: 0.85;
}
.syslog-msg {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--zz-text);
}
.syslog-line.k-ok    .syslog-msg { color: var(--zz-success); text-shadow: 0 0 3px rgba(0,255,163,0.35); }
.syslog-line.k-err   .syslog-msg { color: var(--zz-danger);  text-shadow: 0 0 3px rgba(255,51,102,0.35); }
.syslog-line.k-dhikr .syslog-msg { color: #c19fff;            text-shadow: 0 0 3px var(--zz-purple-glow); }
.syslog-line.k-sys   .syslog-msg { color: #ffd700;            text-shadow: 0 0 3px rgba(255,215,0,0.35); }
.syslog-xp {
  font-family: 'Orbitron', monospace;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
}
.syslog-xp.neg { color: var(--zz-danger); text-shadow: 0 0 4px rgba(255,51,102,0.35); }
.syslog-empty {
  text-align: center;
  font-family: 'Orbitron', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--zz-text-muted);
  text-transform: uppercase;
  padding: 18px 12px;
  opacity: 0.7;
}
.syslog-more {
  display: block;
  text-align: right;
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.20em;
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
  text-decoration: none;
  padding: 6px 14px 10px;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.15s, color 0.15s;
}
.syslog-more:hover { opacity: 1; color: #fff; }

/* ============================================================
   FEED FILTER CHIPS (stats.html)
   ============================================================ */
.feed-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 14px 4px;
}
.feed-chip {
  font-family: 'Orbitron', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--zz-accent);
  background: rgba(0, 246, 255, 0.05);
  border: 1px solid var(--zz-accent-dim);
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  text-shadow: 0 0 3px var(--zz-accent-glow);
}
.feed-chip.active {
  background: var(--zz-accent);
  color: #000;
  text-shadow: none;
  box-shadow: 0 0 10px var(--zz-accent-glow);
}
.feed-chip:hover:not(.active) {
  background: rgba(0, 246, 255, 0.15);
}


/* ======== INSIGHTS (from solo-insights.css) ======== */

/* ============================================================
   ZamZam — Solo Leveling Insights styling
   - INSIGHTS (top advice cards)
   - TRENDS (last 30D vs prior 30D)
   - WEEKLY (7-day cells)
   - GOALS (progress bars)
   ============================================================ */

/* -------- INSIGHTS cards -------- */
#insightsMount {
  display: grid;
  gap: 10px;
  padding: 12px 14px 16px;
}
.ins-card {
  background: rgba(0, 8, 20, 0.65);
  border: 1px solid rgba(0, 246, 255, 0.18);
  padding: 12px 14px;
  position: relative;
  clip-path: polygon(
    0 0, calc(100% - 10px) 0, 100% 10px,
    100% 100%, 10px 100%, 0 calc(100% - 10px)
  );
  transition: transform 0.15s, box-shadow 0.15s;
}
.ins-card:hover { transform: translateX(2px); }
.ins-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ins-ico {
  font-size: 16px;
  filter: drop-shadow(0 0 6px var(--zz-accent-glow));
}
.ins-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--zz-accent);
  text-shadow: 0 0 5px var(--zz-accent-glow);
}
.ins-body {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--zz-text);
  letter-spacing: 0.01em;
}

/* Variant: urgent (red, pulse) */
.ins-card.ins-urgent {
  background: linear-gradient(90deg, rgba(255,51,102,0.12), rgba(0,8,20,0.7));
  border-color: var(--zz-danger);
  box-shadow: 0 0 16px rgba(255,51,102,0.35);
  animation: ins-urgent-pulse 1.6s ease-in-out infinite;
}
.ins-card.ins-urgent .ins-title { color: var(--zz-danger); text-shadow: 0 0 6px rgba(255,51,102,0.6); }
.ins-card.ins-urgent .ins-ico { filter: drop-shadow(0 0 6px rgba(255,51,102,0.8)); }
@keyframes ins-urgent-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255,51,102,0.35); }
  50%      { box-shadow: 0 0 26px rgba(255,51,102,0.7); }
}

/* Variant: fix (warning) */
.ins-card.ins-fix {
  background: linear-gradient(90deg, rgba(255,170,40,0.10), rgba(0,8,20,0.7));
  border-color: #ffaa28;
  box-shadow: 0 0 12px rgba(255,170,40,0.3);
}
.ins-card.ins-fix .ins-title { color: #ffaa28; text-shadow: 0 0 6px rgba(255,170,40,0.5); }
.ins-card.ins-fix .ins-ico { filter: drop-shadow(0 0 6px rgba(255,170,40,0.8)); }

/* Variant: pattern (insight, blue) */
.ins-card.ins-pattern {
  border-color: var(--zz-accent-dim);
}

/* Variant: win (green) */
.ins-card.ins-win {
  background: linear-gradient(90deg, rgba(0,255,163,0.12), rgba(0,8,20,0.7));
  border-color: var(--zz-success);
  box-shadow: 0 0 14px rgba(0,255,163,0.35);
}
.ins-card.ins-win .ins-title { color: var(--zz-success); text-shadow: 0 0 6px rgba(0,255,163,0.5); }
.ins-card.ins-win .ins-ico { filter: drop-shadow(0 0 6px rgba(0,255,163,0.8)); }

/* Variant: level-up (purple) */
.ins-card.ins-level-up {
  background: linear-gradient(90deg, rgba(157,62,255,0.16), rgba(0,8,20,0.7));
  border-color: var(--zz-purple);
  box-shadow: 0 0 14px var(--zz-purple-glow);
}
.ins-card.ins-level-up .ins-title { color: #c69eff; text-shadow: 0 0 6px var(--zz-purple-glow); }
.ins-card.ins-level-up .ins-ico { filter: drop-shadow(0 0 6px var(--zz-purple-glow)); }

.ins-empty {
  text-align: center;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--zz-text-muted);
  text-transform: uppercase;
  padding: 30px 12px;
  opacity: 0.7;
}

/* -------- TRENDS rows -------- */
#trendsMount {
  padding: 8px 14px 14px;
  font-family: 'Orbitron', monospace;
}
.trend-head {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
  text-transform: uppercase;
  padding: 6px 0 10px;
  opacity: 0.85;
}
.trend-row {
  display: grid;
  grid-template-columns: 90px 1fr 60px 70px;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(0,246,255,0.06);
}
.trend-row:last-child { border-bottom: none; }
.trend-key {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--zz-text);
  text-shadow: 0 0 4px rgba(0,246,255,0.2);
}
.trend-bar {
  position: relative;
  display: block;
  height: 8px;
  background: rgba(0,246,255,0.08);
  border: 1px solid var(--zz-accent-dim);
  overflow: hidden;
  clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}
.trend-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--zz-accent), #00b4ff);
  box-shadow: 0 0 8px var(--zz-accent-glow);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.trend-fill.purple { background: linear-gradient(90deg, var(--zz-purple), #c69eff); box-shadow: 0 0 8px var(--zz-purple-glow); }
.trend-fill.gold   { background: linear-gradient(90deg, #ffd700, #ffaa28);            box-shadow: 0 0 8px rgba(255,215,0,0.5); }
.trend-val {
  font-size: 12px;
  font-weight: 800;
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.trend-delta {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.trend-delta.up      { color: var(--zz-success); text-shadow: 0 0 4px rgba(0,255,163,0.4); }
.trend-delta.down    { color: var(--zz-danger);  text-shadow: 0 0 4px rgba(255,51,102,0.4); }
.trend-delta.neutral { color: var(--zz-text-muted); }

/* -------- WEEKLY rows -------- */
#weeklyMount {
  padding: 8px 14px 14px;
  font-family: 'Orbitron', monospace;
}
.wk-head {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
  text-transform: uppercase;
  padding: 6px 0 10px;
  opacity: 0.85;
}
.wk-row {
  display: grid;
  grid-template-columns: 80px auto 50px 60px 50px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0,246,255,0.06);
  font-size: 11px;
}
.wk-row:last-child { border-bottom: none; }
.wk-key {
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--zz-text);
}
.wk-cells {
  display: inline-flex;
  gap: 3px;
}
.wk-c {
  display: inline-block;
  width: 12px; height: 12px;
  background: rgba(0,246,255,0.08);
  border: 1px solid rgba(0,246,255,0.14);
  clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%);
}
.wk-c.done   { background: var(--zz-accent); border-color: var(--zz-accent); box-shadow: 0 0 6px var(--zz-accent-glow); }
.wk-c.missed { background: rgba(255,51,102,0.6); border-color: var(--zz-danger); box-shadow: 0 0 5px rgba(255,51,102,0.6); }
.wk-vs {
  font-weight: 800;
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.wk-prev {
  color: var(--zz-text-muted);
  font-weight: 600;
  font-size: 10px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wk-delta {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 10px;
}
.wk-delta.up      { color: var(--zz-success); }
.wk-delta.down    { color: var(--zz-danger); }
.wk-delta.neutral { color: var(--zz-text-muted); }

/* -------- GOALS rows -------- */
#goalsMount {
  padding: 8px 14px 14px;
  display: grid;
  gap: 10px;
}
.goal-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(0, 8, 20, 0.55);
  border: 1px solid rgba(0, 246, 255, 0.12);
  clip-path: polygon(
    0 0, calc(100% - 8px) 0, 100% 8px,
    100% 100%, 8px 100%, 0 calc(100% - 8px)
  );
}
.goal-icon {
  font-size: 22px;
  text-align: center;
  filter: drop-shadow(0 0 6px var(--zz-accent-glow));
}
.goal-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.goal-label {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--zz-accent);
  text-shadow: 0 0 4px var(--zz-accent-glow);
}
.goal-track {
  height: 6px;
  background: rgba(0,246,255,0.08);
  border: 1px solid var(--zz-accent-dim);
  overflow: hidden;
  clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%);
}
.goal-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--zz-accent), #00b4ff);
  box-shadow: 0 0 6px var(--zz-accent-glow);
  transition: width 0.6s ease;
}
.goal-val {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 5px var(--zz-accent-glow);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.goal-row.goal-gold   { border-color: #ffd700; box-shadow: 0 0 14px rgba(255,215,0,0.25); }
.goal-row.goal-gold .goal-icon  { filter: drop-shadow(0 0 6px rgba(255,215,0,0.7)); }
.goal-row.goal-gold .goal-label { color: #ffd700; text-shadow: 0 0 4px rgba(255,215,0,0.5); }
.goal-row.goal-gold .goal-fill  { background: linear-gradient(90deg, #ffd700, #ffaa28); box-shadow: 0 0 6px rgba(255,215,0,0.5); }
.goal-row.goal-purple { border-color: var(--zz-purple); box-shadow: 0 0 14px var(--zz-purple-glow); }
.goal-row.goal-purple .goal-icon  { filter: drop-shadow(0 0 6px var(--zz-purple-glow)); }
.goal-row.goal-purple .goal-label { color: #c69eff; text-shadow: 0 0 4px var(--zz-purple-glow); }
.goal-row.goal-purple .goal-fill  { background: linear-gradient(90deg, var(--zz-purple), #c69eff); box-shadow: 0 0 6px var(--zz-purple-glow); }

/* -------- Mobile responsiveness -------- */
@media (max-width: 600px) {
  /* INSIGHTS: tighter padding + smaller text */
  #insightsMount { padding: 8px 10px 12px; gap: 8px; }
  .ins-card { padding: 10px 12px; }
  .ins-title { font-size: 9.5px; letter-spacing: 0.12em; }
  .ins-body { font-size: 12px; line-height: 1.4; }
  .ins-ico { font-size: 14px; }

  /* TRENDS: tighter columns */
  #trendsMount { padding: 6px 10px 12px; }
  .trend-head { font-size: 9px; letter-spacing: 0.16em; padding: 4px 0 8px; }
  .trend-row { grid-template-columns: 64px 1fr 48px 56px; gap: 6px; padding: 6px 0; }
  .trend-key { font-size: 9.5px; letter-spacing: 0.08em; }
  .trend-val { font-size: 11px; }
  .trend-delta { font-size: 9px; letter-spacing: 0.04em; }
  .trend-bar { height: 6px; }

  /* WEEKLY: hide redundant "vs X/7" column on phone, compact */
  #weeklyMount { padding: 6px 10px 12px; }
  .wk-head { font-size: 9px; letter-spacing: 0.16em; padding: 4px 0 8px; }
  .wk-row {
    grid-template-columns: 60px auto 38px 40px;
    gap: 5px;
    font-size: 9.5px;
    padding: 5px 0;
  }
  .wk-row .wk-prev { display: none; }
  .wk-c { width: 11px; height: 11px; }

  /* GOALS: tighter, allow value wrap */
  #goalsMount { padding: 6px 10px 12px; gap: 8px; }
  .goal-row { padding: 8px 10px; gap: 10px; grid-template-columns: 24px 1fr auto; }
  .goal-icon { font-size: 18px; }
  .goal-label { font-size: 9px; letter-spacing: 0.14em; }
  .goal-val { font-size: 10px; }
  .goal-track { height: 5px; }

  .ins-empty { font-size: 9.5px; padding: 22px 10px; }
}

/* Tiny phones — even tighter */
@media (max-width: 380px) {
  .trend-row { grid-template-columns: 56px 1fr 42px 50px; gap: 4px; }
  .wk-row { grid-template-columns: 50px auto 32px 36px; gap: 4px; }
  .wk-c { width: 9px; height: 9px; }
  .goal-row { grid-template-columns: 22px 1fr auto; gap: 8px; padding: 7px 9px; }
  .goal-val { font-size: 9.5px; }
  .ins-title { font-size: 9px; }
  .ins-body { font-size: 11.5px; }
}

/* WCAG 2.2 SC 2.3.3 — universal reduced-motion fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}


/* ======== MOBILE (from mobile.css) ======== */

/* ============================================================
   ZamZam — Mobile responsive overrides
   Loaded LAST so overrides win.
   Breakpoints:
     - phone:       <= 600px
     - small phone: <= 380px
     - landscape:   <= 500px height
   Desktop stays as-is.
   ============================================================ */

/* === TABLET (≤900px) === */
@media (max-width: 900px) {
  body .container {
    max-width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* === PHONE (≤600px) === */
@media (max-width: 600px) {

  /* Header — compact */
  header {
    padding: 12px 0 14px;
    gap: 8px;
  }
  .header-logo, header h1 {
    font-size: 18px;
  }
  .header-actions {
    gap: 6px;
  }
  .icon-btn {
    width: 32px;
    height: 32px;
  }

  /* Date header / Hijri */
  .date-header {
    font-size: 13px;
    padding: 8px 10px;
  }
  .hijri-date {
    font-size: 11px;
  }

  /* Location chip */
  .location-chip {
    padding: 6px 10px;
    font-size: 11px;
  }
  .location-chip-icon {
    font-size: 12px;
  }
  .location-chip-text {
    font-size: 11px;
  }

  /* Cards (prayer cards, generic) */
  .card {
    padding: 14px 12px;
    margin-bottom: 10px;
  }
  .card-title {
    font-size: 14px;
  }

  /* Stat cards (2-col → 2-col stays good on phone) */
  .stat-card {
    padding: 14px 10px;
  }

  /* Countdown overlay (prayer countdown big screen) */
  .countdown-prayer-name {
    font-size: 28px;
    letter-spacing: 0.12em;
  }
  .countdown-prayer-time {
    font-size: 16px;
  }
  .countdown-boxes {
    gap: 8px;
  }
  .countdown-box {
    padding: 14px 10px;
    min-width: 60px;
  }
  .countdown-content {
    padding: 20px 16px;
  }
  .countdown-close {
    top: 12px;
    right: 12px;
  }

  /* Date picker modal */
  .date-picker-modal {
    width: calc(100% - 24px);
    max-width: 380px;
    padding: 16px 14px;
  }
  .date-picker-title {
    font-size: 14px;
  }
  .date-picker-wheels {
    gap: 8px;
  }
  .date-picker-btn {
    padding: 10px 14px;
    font-size: 12px;
  }

  /* Location modal */
  .location-modal {
    width: calc(100% - 24px);
    max-width: 420px;
    max-height: 80vh;
  }
  .location-modal-header {
    padding: 14px 16px;
  }
  .location-modal-title {
    font-size: 14px;
  }
  .location-modal-body {
    padding: 12px;
  }
  .location-modal-btn {
    padding: 10px 14px;
    font-size: 12px;
  }

  /* Istighfar / Salawat counters */
  .istighfar-total {
    font-size: 28px;
  }
  .istighfar-btn, .istighfar-add {
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Islamic event badge */
  .islamic-event-badge {
    font-size: 10px;
    padding: 4px 8px;
  }

  /* Heatmap — 7-col stays but cells smaller */
  /* (existing 7-col grid in styles.css line 489 already responsive) */

  /* Bottom nav — taller, comfortable thumb reach */
  .bottom-nav {
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  }
  .nav-item {
    font-size: 9px;
  }
  .nav-icon {
    width: 20px;
    height: 20px;
  }

  /* Prayer time list / today timeline */
  .prayer-row, .prayer-item {
    padding: 10px 12px;
    font-size: 13px;
  }
  .prayer-time {
    font-size: 14px;
  }
  .prayer-name {
    font-size: 12px;
  }

  /* Section headings */
  .section-label, h2 {
    font-size: 11px;
    margin: 14px 0 8px;
  }
  h1 {
    font-size: 22px;
  }
}

/* === SMALL PHONE (≤380px) === */
@media (max-width: 380px) {
  body .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .countdown-prayer-name {
    font-size: 22px;
  }
  .countdown-box {
    min-width: 52px;
    padding: 10px 6px;
  }
  .istighfar-total {
    font-size: 24px;
  }
  .nav-item {
    font-size: 8.5px;
  }
}

/* === LANDSCAPE PHONE === */
@media (max-height: 500px) and (orientation: landscape) {
  header {
    padding: 8px 0;
  }
  .countdown-content {
    padding: 16px 14px;
  }
  .bottom-nav {
    padding: 4px 0;
  }
}

/* iOS input zoom fix */
@media (max-width: 600px) {
  input[type="number"],
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px;
  }
}

/* ============================================================
   PHONE DENSITY PASS — V1 (2026-05-20, NEON)
   Goal: every page fits 390x844 iPhone PWA without crowding
   or horizontal overflow. Desktop layout untouched.
   Boss directive: «телефонный вариант сделай чтобы можно было
   весь функционал чтобы всё помещалось».
   Rollback: revert this commit (block is self-contained,
   appended at end of file — last cascade wins).
   ============================================================ */
@media (max-width: 480px) {
  /* — Top system bar (sysBar) — 50→44px, tighter pills — */
  #sysBar { padding: 6px 10px; gap: 8px; min-height: 44px; }
  #sysBar .sys-lv { padding: 4px 9px 4px 7px; gap: 4px; }
  #sysBar .sys-lv .sys-label { font-size: 8.5px; letter-spacing: 0.16em; }
  #sysBar .sys-lv .sys-value { font-size: 16px; }
  #sysBar .sys-exp { gap: 6px; }
  #sysBar .sys-exp .sys-label { font-size: 8.5px; letter-spacing: 0.14em; }
  #sysBar .sys-bar-track { height: 6px; min-width: 50px; }
  /* Replace long EXP text ("31206 XP · → 1294 to L25") with data-short ("31k · L25")
     rendered via ::before. JS keeps original textContent for desktop. */
  #sysBar .sys-exp .sys-value {
    font-size: 0;
    line-height: 0;
    letter-spacing: 0;
    max-width: 78px;
    white-space: nowrap;
    overflow: hidden;
  }
  #sysBar .sys-exp .sys-value::before {
    content: attr(data-short);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.02em;
    color: #fff;
    text-shadow: 0 0 6px var(--zz-accent-glow);
    font-variant-numeric: tabular-nums;
  }
  #sysBar .sys-streak { padding: 3px 7px; gap: 4px; }
  #sysBar .sys-streak .sys-label { font-size: 8.5px; }
  #sysBar .sys-streak .sys-value { font-size: 12px; }
  /* Mission button: icon-only on phone (▲ or ▲N or ★) via data-short pseudo */
  #sysBar .sys-mission {
    padding: 4px 7px;
    gap: 0;
    min-width: 26px;
    letter-spacing: 0;
  }
  #sysMissionText {
    font-size: 0;
    line-height: 0;
  }
  #sysMissionText::before {
    content: attr(data-short);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.04em;
    font-weight: 900;
  }
  body { padding-top: 48px; }

  /* — Header (logo row) — was eating ~46px now ~36px — */
  header { padding: 6px 10px 8px; margin-bottom: 4px; gap: 6px; }
  .header-logo { max-height: 24px; }
  .header-actions { gap: 5px; }
  .icon-btn { width: 30px; height: 30px; font-size: 16px; border-radius: 8px; }
  .location-chip { padding: 5px 9px; gap: 4px; }
  .location-chip-text { font-size: 11px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* — Date / Hijri header — */
  .date-header { padding: 6px 10px; font-size: 12px; }
  .hijri-date { font-size: 10.5px; }

  /* — Container — give content the screen — */
  body .container { padding-left: 12px; padding-right: 12px; padding-bottom: 84px; }

  /* Prevent page-level horizontal scroll (table h-scrolls internally) */
  html, body { overflow-x: hidden; }

  /* — Prayer hero card (#index): tighten from 28/20 padding — */
  .prayer-hero-card { padding: 16px 14px; border-radius: 16px; margin-bottom: 12px; }
  .prayer-hero-label { font-size: 11px; margin-bottom: 2px; letter-spacing: 0.4px; }
  .prayer-hero-name { font-size: 22px; margin-bottom: 2px; }
  .prayer-hero-time { font-size: 38px; letter-spacing: -0.5px; margin-bottom: 4px; }
  .prayer-hero-countdown { font-size: 13px; }

  /* — Prayer time list rows (#today): 14→10 padding — */
  .prayer-time-row { padding: 10px 0; }
  .prayer-time-left { gap: 9px; }
  .prayer-time-icon { font-size: 18px; width: 24px; }
  .prayer-time-label { font-size: 14px; }
  .prayer-time-right { gap: 8px; }
  .prayer-time-value { font-size: 15px; }

  /* — Generic cards — */
  .card { padding: 12px 12px; margin-bottom: 10px; border-radius: 14px; }
  .card-title { font-size: 13px; margin-bottom: 8px; }

  /* — Bottom nav: 5 items must fit 390px width (~78px each) — */
  .bottom-nav { padding: 5px 0 max(6px, env(safe-area-inset-bottom)); }
  .nav-item { padding: 3px 4px; font-size: 9.5px; gap: 1px; }
  .nav-icon { font-size: 18px; width: 18px; height: 18px; margin-bottom: 1px; line-height: 1; }

  /* — History (#history): table h-scrolls inside .history-card, page does NOT — */
  .history-card { padding: 2px; border-radius: 14px; }
  .history-table { font-size: 11.5px; }
  .history-table th { padding: 8px 4px; font-size: 9.5px; letter-spacing: 0.4px; }
  .history-table td { padding: 5px 3px; }

  /* — Day-detail bottom sheet — */
  .day-detail-card { max-height: 78vh; }

  /* — Stats (#stats): 2-col grid stays (Boss "fit everything"), values smaller — */
  .stat-grid { gap: 8px; margin-bottom: 12px; }
  .stat-card { padding: 12px 8px; border-radius: 14px; }
  .stat-value { font-size: 22px; }
  .stat-label { font-size: 10.5px; margin-top: 2px; }

  /* — Settings (#settings): toggle rows + settings-item — */
  .toggle-item { padding: 10px 0; }
  .toggle-label { font-size: 14px; gap: 8px; }
  .toggle-icon { font-size: 18px; width: 24px; }
  .settings-item { padding: 10px 14px; }
  .settings-label { font-size: 13.5px; }
  .settings-sub { font-size: 12px; }

  /* — Progress rows — */
  .progress-row { padding: 8px 0; gap: 9px; }
  .progress-row-label { font-size: 13px; width: 80px; }
  .progress-row-pct { font-size: 12px; width: 36px; }

  /* — Section headings — */
  .section-label, h2 { font-size: 11px; margin: 10px 0 6px; }
  h1 { font-size: 20px; }
}

/* — iPhone SE / Mini / Galaxy S-Ultra-class (≤380px) — squeeze further — */
@media (max-width: 380px) {
  #sysBar { padding: 5px 6px; gap: 5px; min-height: 42px; }
  #sysBar .sys-lv { padding: 3px 7px 3px 6px; gap: 3px; }
  #sysBar .sys-lv .sys-label { font-size: 8px; }
  #sysBar .sys-lv .sys-value { font-size: 15px; }
  #sysBar .sys-exp .sys-label { display: none; }   /* hide "EXP" label, bar tells story */
  #sysBar .sys-bar-track { min-width: 40px; }
  #sysBar .sys-exp .sys-value { max-width: 64px; }
  #sysBar .sys-exp .sys-value::before { font-size: 10px; }
  #sysBar .sys-streak { padding: 3px 6px; gap: 3px; }
  #sysBar .sys-streak .sys-label { font-size: 8px; }
  #sysBar .sys-streak .sys-value { font-size: 11px; }
  #sysBar .sys-mission { padding: 3px 6px; min-width: 22px; }
  #sysMissionText::before { font-size: 10px; }
  body { padding-top: 46px; }
  .header-logo { max-height: 22px; }
  .icon-btn { width: 28px; height: 28px; font-size: 15px; }
  .prayer-hero-card { padding: 14px 12px; }
  .prayer-hero-name { font-size: 20px; }
  .prayer-hero-time { font-size: 34px; }
  .nav-item { font-size: 8.5px; padding: 3px 2px; }
  .nav-icon { font-size: 17px; }
  body .container { padding-left: 10px; padding-right: 10px; }
}
