/* Goal — yearly goals tracker with linear regression ETA
 * Palette: sky-pastel + cream + status colors
 * © אופיר ברנס (Ofir Baranes) 2026
 */

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg-1: #0c1418;
  --bg-2: #101b22;
  --bg-3: #16242c;
  --sky-200: #bae6fd;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --sky-800: #075985;
  --cream: #fef9c3;
  --cream-light: #fffbeb;
  --success: #86efac;
  --success-deep: #16a34a;
  --warning: #fcd34d;
  --behind: #fb7185;
  --salmon: #f87171;
  --text-primary: #f0f9ff;
  --text-secondary: rgba(240,249,255,0.72);
  --text-muted: rgba(240,249,255,0.42);
  --surface: rgba(186,230,253,0.05);
  --surface-strong: rgba(186,230,253,0.10);
  --border: rgba(125,211,252,0.16);
  --border-strong: rgba(125,211,252,0.28);
  --shadow-glass: 0 30px 60px -25px rgba(12,20,24,0.7);
  --bezier: cubic-bezier(.34,1.56,.64,1);
  --bezier-soft: cubic-bezier(.4,0,.2,1);
}

html, body {
  background: var(--bg-1);
  color: var(--text-primary);
  font-family: 'Heebo', system-ui, sans-serif;
  font-weight: 400;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse 700px 800px at 80% -10%, rgba(56,189,248,0.16), transparent 60%),
    radial-gradient(ellipse 500px 600px at -10% 60%, rgba(186,230,253,0.10), transparent 65%),
    radial-gradient(ellipse 800px 1000px at 50% 110%, rgba(7,89,133,0.30), transparent 70%),
    linear-gradient(180deg, #0c1418 0%, #101b22 60%, #16242c 110%);
  background-attachment: fixed;
  position: relative;
  padding-bottom: 90px;
}

.ambient-bg {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb-blur {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.45;
}
.orb-blur.o1 { width: 420px; height: 420px; top: -120px; right: -120px; background: radial-gradient(circle, #38bdf8 0%, transparent 70%); animation: drift1 26s ease-in-out infinite; }
.orb-blur.o2 { width: 340px; height: 340px; bottom: 5%; left: -100px; background: radial-gradient(circle, #f87171 0%, transparent 70%); opacity: 0.18; animation: drift2 32s ease-in-out infinite; }
.orb-blur.o3 { width: 260px; height: 260px; top: 40%; right: 30%; background: radial-gradient(circle, #0ea5e9 0%, transparent 70%); opacity: 0.32; animation: drift3 38s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px,40px) scale(1.1); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-30px) scale(1.08); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-25px,-35px) scale(1.12); } }

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(12,20,24,0.85) 0%, rgba(12,20,24,0.55) 100%);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--cream-light);
  letter-spacing: -0.01em;
}
.mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sky-300), var(--sky-700));
  color: var(--cream-light);
  box-shadow: 0 0 18px rgba(56,189,248,0.45);
}
.mark svg { width: 18px; height: 18px; }

.header-actions { display: flex; gap: 8px; }
.icon-btn, .install-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  border-radius: 12px;
  padding: 7px 12px;
  cursor: pointer;
  transition: all 0.2s var(--bezier-soft);
  backdrop-filter: blur(10px);
}
.icon-btn { padding: 7px 9px; font-size: 16px; }
.icon-btn:hover, .install-btn:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.install-btn {
  background: linear-gradient(135deg, var(--sky-300), var(--sky-700));
  border: none;
  color: var(--bg-1);
  font-weight: 700;
}

main {
  position: relative;
  z-index: 1;
  padding: 22px 18px;
  max-width: 880px;
  margin: 0 auto;
}
.hidden { display: none !important; }

/* ===== Hero ===== */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-left { flex: 1; min-width: 0; }
.kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--sky-300);
  margin-bottom: 6px;
}
.hero-title {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 700;
  line-height: 0.95;
  color: var(--cream-light);
  letter-spacing: -0.025em;
}
.hero-title .ital {
  font-style: italic;
  font-weight: 500;
  color: var(--sky-300);
}

.hero-stats {
  display: flex;
  gap: 16px;
}
.hs {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
}
.hs-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px;
  font-weight: 600;
  color: var(--cream-light);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hs-num.accent { color: var(--sky-300); }
.hs-num.success { color: var(--success); }
.hs-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* ===== Filter chips ===== */
.filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 14px;
  margin-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--bezier-soft);
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-chip:hover { background: var(--surface-strong); color: var(--cream-light); }
.filter-chip.active {
  background: linear-gradient(135deg, var(--sky-400), var(--sky-700));
  border-color: transparent;
  color: var(--cream-light);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(56,189,248,0.35);
}

/* ===== Goals grid ===== */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.goal-card {
  position: relative;
  padding: 18px;
  background: linear-gradient(140deg, var(--surface-strong) 0%, var(--surface) 100%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 22px;
  cursor: pointer;
  transition: all 0.3s var(--bezier);
  overflow: hidden;
}
.goal-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(135deg, var(--gc, var(--sky-400)) 0%, transparent 50%);
  -webkit-mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.goal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glass), 0 0 30px color-mix(in srgb, var(--gc, var(--sky-400)) 25%, transparent);
}
.goal-card:hover::before { opacity: 1; }

.gc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.gc-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: color-mix(in srgb, var(--gc, var(--sky-400)) 18%, transparent);
  color: var(--gc, var(--sky-300));
  border: 1px solid color-mix(in srgb, var(--gc, var(--sky-400)) 30%, transparent);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.04em;
}
.gc-status-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 100px;
  font-weight: 600;
}
.gc-status-pill.ontrack { background: rgba(134,239,172,0.15); color: var(--success); border: 1px solid rgba(134,239,172,0.3); }
.gc-status-pill.behind  { background: rgba(251,113,133,0.15); color: var(--behind); border: 1px solid rgba(251,113,133,0.3); }
.gc-status-pill.done    { background: rgba(252,211,77,0.18); color: var(--warning); border: 1px solid rgba(252,211,77,0.35); }

.gc-title {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--cream-light);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

.gc-progress-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.gc-mini-circle {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  position: relative;
}
.gc-mini-circle svg { width: 100%; height: 100%; }
.gc-mini-pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--cream-light);
  font-variant-numeric: tabular-nums;
}
.gc-vals {
  flex: 1;
  min-width: 0;
}
.gc-current {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--cream-light);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
  direction: ltr;
}
.gc-of {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.gc-eta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.gc-eta .eta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.gc-eta .eta-pos { color: var(--success); }
.gc-eta .eta-neg { color: var(--behind); }

/* Empty */
.empty {
  text-align: center;
  padding: 70px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 24px;
}
.empty-illust {
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 12px 24px rgba(56,189,248,0.25));
}
.empty-illust svg { width: 100%; height: 100%; }
.empty h3 {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--cream-light);
  margin-bottom: 8px;
}
.empty p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 380px;
  margin: 0 auto 22px;
  line-height: 1.7;
}

/* ===== FAB ===== */
.fab {
  position: fixed;
  bottom: 24px;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 60px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky-300), var(--sky-700));
  color: var(--cream-light);
  cursor: pointer;
  z-index: 60;
  box-shadow: 0 14px 30px rgba(56,189,248,0.50), 0 0 24px rgba(125,211,252,0.30);
  display: grid;
  place-items: center;
  transition: all 0.3s var(--bezier);
}
.fab:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.05);
  box-shadow: 0 18px 40px rgba(56,189,248,0.65), 0 0 32px rgba(125,211,252,0.45);
}
.fab:active { transform: translateX(-50%) scale(0.95); }
.fab svg { width: 26px; height: 26px; }

/* ===== Modal ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(7,12,16,0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: modal-fade 0.25s var(--bezier-soft);
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%;
  max-width: 540px;
  background: linear-gradient(180deg, #16242c 0%, #0c1418 100%);
  border: 1px solid var(--border-strong);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  padding: 20px 22px 32px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  animation: modal-slide 0.4s var(--bezier);
  max-height: 92vh;
  overflow-y: auto;
}
@keyframes modal-slide { from { transform: translateY(100%); } to { transform: translateY(0); } }
.handle {
  width: 38px; height: 4px;
  background: var(--border-strong);
  border-radius: 4px;
  margin: 0 auto 16px;
}
.modal-card h3 {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  color: var(--cream-light);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}
.modal-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 14px;
}
.mark-big {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--sky-300), var(--sky-700));
  border-radius: 18px;
  color: var(--cream-light);
  margin: 4px auto 14px;
  box-shadow: 0 0 30px rgba(56,189,248,0.4);
}
.mark-big svg { width: 32px; height: 32px; }

/* Detail modal */
.dm-header {
  text-align: center;
  margin-bottom: 18px;
}
.dm-cat-pill {
  display: inline-block;
  padding: 3px 12px;
  background: color-mix(in srgb, var(--dc) 18%, transparent);
  color: var(--dc);
  border: 1px solid color-mix(in srgb, var(--dc) 30%, transparent);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 8px;
}
.dm-title {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--cream-light);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.dm-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Big circular progress */
.big-progress {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 8px auto 18px;
}
.bp-svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 28px rgba(56,189,248,0.35)); }
#bpFill { transition: stroke-dasharray 1s var(--bezier); }
.bp-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.bp-pct {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 38px;
  font-weight: 600;
  color: var(--cream-light);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(125,211,252,0.3);
}
.bp-vals {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

/* ETA card */
.eta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.eta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
}
.eta-row:last-of-type { border-bottom: none; }
.eta-label {
  font-size: 12px;
  color: var(--text-secondary);
}
.eta-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--cream-light);
}
.eta-val.mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; direction: ltr; }
.eta-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.eta-status.ontrack { background: rgba(134,239,172,0.12); color: var(--success); border: 1px solid rgba(134,239,172,0.30); }
.eta-status.behind { background: rgba(251,113,133,0.12); color: var(--behind); border: 1px solid rgba(251,113,133,0.30); }
.eta-status.done { background: rgba(252,211,77,0.15); color: var(--warning); border: 1px solid rgba(252,211,77,0.30); }
.eta-status.unknown { background: rgba(186,230,253,0.08); color: var(--text-muted); border: 1px dashed var(--border); }

/* Sparkline */
.sparkline-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 18px;
}
.sl-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.sl-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--cream-light);
}
.sl-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
#sparkline {
  width: 100%;
  height: 90px;
  overflow: visible;
}

/* Quick add */
.quick-add {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.qa-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sky-300);
  margin-bottom: 10px;
}
.qa-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.qa-mini {
  padding: 10px 14px;
  background: rgba(186,230,253,0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--cream);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.qa-mini:hover { background: rgba(125,211,252,0.18); border-color: var(--sky-400); }
.qa-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  background: rgba(186,230,253,0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--cream-light);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  text-align: left;
  direction: ltr;
}
.qa-input:focus { outline: none; border-color: var(--sky-400); }
.qa-add {
  width: 40px;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-700));
  border: none;
  border-radius: 10px;
  color: var(--cream-light);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(56,189,248,0.35);
}
.qa-add:hover { transform: translateY(-1px); }
.qa-add svg { width: 18px; height: 18px; }

/* Log */
.log-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.log-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.log-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--cream-light);
}
.log-header .mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.log-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}
.log-list::-webkit-scrollbar { width: 4px; }
.log-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.log-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(186,230,253,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
}
.log-date {
  font-size: 11px;
  color: var(--text-muted);
}
.log-vals {
  font-size: 13px;
  color: var(--cream-light);
  font-weight: 600;
  direction: ltr;
}
.log-delta {
  font-size: 11px;
  font-weight: 600;
}
.log-delta.pos { color: var(--success); }
.log-delta.neg { color: var(--behind); }
.log-empty {
  text-align: center;
  padding: 14px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
}

/* Modal inputs */
.modal-input {
  width: 100%;
  padding: 13px 14px;
  background: rgba(186,230,253,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--cream-light);
  font-family: 'Heebo', sans-serif;
  font-size: 15px;
  margin-bottom: 12px;
  transition: all 0.2s;
  text-align: right;
  direction: rtl;
}
.modal-input.mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; direction: ltr; text-align: left; }
.modal-input:focus {
  outline: none;
  border-color: var(--sky-400);
  background: rgba(186,230,253,0.10);
}
.modal-input::placeholder { color: var(--text-muted); }

.form-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sky-300);
  margin-bottom: 8px;
}
.form-row { margin-bottom: 12px; }
.form-row.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-col { display: flex; flex-direction: column; }
.form-col .modal-input { margin-bottom: 0; }

.cat-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.cat-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--bezier-soft);
}
.cat-pick:hover { background: var(--surface-strong); }
.cat-pick.active {
  background: color-mix(in srgb, var(--cp-color) 22%, transparent);
  border-color: var(--cp-color);
  color: var(--cream-light);
  font-weight: 600;
}
.cat-pick svg { width: 18px; height: 18px; color: var(--cp-color); }

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.btn-primary, .btn-secondary, .btn-mini {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 18px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--bezier);
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--sky-300), var(--sky-700));
  color: var(--cream-light);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(56,189,248,0.40);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(56,189,248,0.55); }
.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--cream-light);
}
.btn-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  flex: 0 1 auto;
  padding: 13px 18px;
}
.btn-mini.danger { color: #fda4af; border-color: rgba(253,164,175,0.3); }
.btn-mini.danger:hover { background: rgba(253,164,175,0.1); }

/* Splash */
.splash {
  position: fixed; inset: 0;
  background: radial-gradient(circle at center, rgba(56,189,248,0.4), rgba(12,20,24,0.95));
  z-index: 200;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px;
  animation: splash-in 0.4s var(--bezier);
}
@keyframes splash-in { from { opacity: 0; backdrop-filter: blur(0); } to { opacity: 1; backdrop-filter: blur(8px); } }
.splash.fade { animation: splash-out 0.4s var(--bezier-soft) forwards; }
@keyframes splash-out { to { opacity: 0; } }
.splash-icon {
  font-size: 96px;
  animation: splash-pop 0.6s var(--bezier);
}
@keyframes splash-pop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.splash-msg {
  color: var(--cream-light);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 4px 16px rgba(7,12,16,0.6);
}
