/* Recipe — personal cookbook with Cook Mode
 * Palette: dusty-rose + warm cream
 * © אופיר ברנס (Ofir Baranes) 2026
 */

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

:root {
  --bg-1: #1f0a14;
  --bg-2: #2d0c1a;
  --bg-3: #3b0f23;
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-200: #fecdd3;
  --rose-300: #fda4af;
  --rose-400: #fb7185;
  --rose-600: #e11d48;
  --rose-700: #be123c;
  --rose-800: #9f1239;
  --cream: #fef3c7;
  --cream-light: #fffbeb;
  --text-primary: #fff1f2;
  --text-secondary: rgba(255,241,242,0.72);
  --text-muted: rgba(255,241,242,0.45);
  --surface: rgba(255,228,230,0.06);
  --surface-strong: rgba(255,228,230,0.10);
  --border: rgba(254,205,211,0.16);
  --border-strong: rgba(254,205,211,0.28);
  --shadow-soft: 0 30px 60px -25px rgba(31,10,20,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(225,29,72,0.22), transparent 60%),
    radial-gradient(ellipse 500px 600px at -15% 50%, rgba(190,18,60,0.18), transparent 65%),
    radial-gradient(ellipse 800px 1000px at 50% 110%, rgba(159,18,57,0.18), transparent 70%),
    linear-gradient(180deg, #1f0a14 0%, #2a0c1a 60%, #3b0f23 110%);
  background-attachment: fixed;
  position: relative;
  padding-bottom: 90px;
}

/* Ambient orbs */
.ambient-bg {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb-blur {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}
.orb-blur.o1 { width: 420px; height: 420px; top: -120px; right: -120px; background: radial-gradient(circle, #e11d48 0%, transparent 70%); animation: drift1 24s ease-in-out infinite; }
.orb-blur.o2 { width: 340px; height: 340px; bottom: 8%; left: -100px; background: radial-gradient(circle, #fda4af 0%, transparent 70%); opacity: 0.32; animation: drift2 30s ease-in-out infinite; }
.orb-blur.o3 { width: 260px; height: 260px; top: 40%; right: 30%; background: radial-gradient(circle, #be123c 0%, transparent 70%); opacity: 0.28; animation: drift3 35s 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); } }

/* Subtle grain */
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ===== 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(31,10,20,0.85) 0%, rgba(31,10,20,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(--rose-50);
  letter-spacing: -0.01em;
}
.mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--rose-400), var(--rose-800));
  color: var(--cream-light);
  box-shadow: 0 0 18px rgba(225,29,72,0.4);
}
.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(--rose-400), var(--rose-700));
  border: none;
  color: var(--cream-light);
  font-weight: 600;
}

main {
  position: relative;
  z-index: 1;
  padding: 20px 18px;
  max-width: 880px;
  margin: 0 auto;
}
.panel { animation: fade-in 0.5s var(--bezier-soft); }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hidden { display: none !important; }

/* ===== Hero header (library) ===== */
.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 20px;
}
.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(--rose-300);
  margin-bottom: 6px;
}
.hero-title {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  font-size: clamp(38px, 8vw, 64px);
  font-weight: 700;
  line-height: 0.95;
  color: var(--rose-50);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.hero-title .ital {
  font-style: italic;
  font-weight: 500;
  color: var(--rose-300);
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hm-item { display: flex; flex-direction: column; }
.hm-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--rose-100);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hm-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}
.hm-sep { width: 1px; height: 24px; background: var(--border-strong); }

.hero-right { flex-shrink: 0; }
.hero-illust { width: 130px; height: 100px; }
.hero-illust svg { width: 100%; height: 100%; filter: drop-shadow(0 14px 24px rgba(159,18,57,0.4)); }
@keyframes steam-rise {
  0% { transform: translateY(8px); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(-12px); opacity: 0; }
}
.steam.s1 { animation: steam-rise 3s ease-out 0s infinite; transform-origin: center; }
.steam.s2 { animation: steam-rise 3.4s ease-out 0.6s infinite; transform-origin: center; }
.steam.s3 { animation: steam-rise 3.2s ease-out 1.2s infinite; transform-origin: center; }

/* ===== Controls ===== */
.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.2s var(--bezier-soft);
}
.search-bar:focus-within {
  border-color: var(--rose-400);
  background: var(--surface-strong);
}
.search-svg { width: 18px; height: 18px; color: var(--rose-300); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--rose-50);
  font-family: inherit;
  font-size: 15px;
}
.search-bar input::placeholder { color: var(--text-muted); }

.cat-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.cat-filter::-webkit-scrollbar { display: none; }
.cat-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;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-chip:hover { background: var(--surface-strong); border-color: var(--border-strong); }
.cat-chip.active {
  background: linear-gradient(135deg, var(--rose-400), var(--rose-700));
  border-color: transparent;
  color: var(--cream-light);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(225,29,72,0.35);
}
.chip-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* ===== Recipe grid ===== */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.recipe-card {
  background: linear-gradient(140deg, var(--surface-strong) 0%, var(--surface) 100%);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.3s var(--bezier);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
}
.recipe-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(135deg, var(--rc, var(--rose-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;
}
.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft), 0 0 30px rgba(225,29,72,0.15);
  border-color: var(--border-strong);
}
.recipe-card:hover::before { opacity: 1; }
.rc-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 4px 10px;
  background: color-mix(in srgb, var(--rc, var(--rose-400)) 22%, transparent);
  color: var(--rc, var(--rose-300));
  border: 1px solid color-mix(in srgb, var(--rc, var(--rose-400)) 35%, transparent);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.02em;
}
.rc-title {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--rose-50);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.rc-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rc-meta {
  display: flex;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.rc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.rc-meta svg { width: 12px; height: 12px; }
.rc-stars {
  display: inline-flex;
  gap: 1px;
  color: var(--rose-300);
}
.rc-stars .filled { color: #fcd34d; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-illust {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  opacity: 0.55;
}
.empty-state h3 {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== Detail panel ===== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 18px;
  transition: all 0.2s;
}
.back-btn:hover { background: var(--surface); color: var(--rose-50); }
.back-btn svg { width: 14px; height: 14px; transform: scaleX(-1); }

.detail-hero {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.detail-cat-badge {
  display: inline-block;
  padding: 4px 12px;
  background: color-mix(in srgb, var(--dc, var(--rose-400)) 18%, transparent);
  color: var(--dc, var(--rose-300));
  border: 1px solid color-mix(in srgb, var(--dc, var(--rose-400)) 30%, transparent);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 12px;
}
.detail-title {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  font-size: clamp(36px, 7vw, 56px);
  font-weight: 700;
  color: var(--rose-50);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.detail-sub {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
  max-width: 600px;
}
.detail-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.dm-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--rose-100);
  font-variant-numeric: tabular-nums;
}
.dm-svg { width: 16px; height: 16px; color: var(--rose-300); }

.detail-section {
  margin-bottom: 32px;
}
.section-title {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--rose-100);
  margin-bottom: 14px;
  letter-spacing: -0.015em;
}

.ingredients {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
}
.ingredients li {
  padding: 10px 14px 10px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--rose-50);
  position: relative;
  transition: all 0.2s;
  cursor: pointer;
}
.ingredients li::before {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border: 1.5px solid var(--rose-400);
  border-radius: 4px;
  transition: all 0.2s;
}
.ingredients li.checked {
  color: var(--text-muted);
  text-decoration: line-through;
  background: rgba(255,255,255,0.02);
}
.ingredients li.checked::before {
  background: var(--rose-400);
  border-color: var(--rose-400);
}
.ingredients li.checked::after {
  content: '✓';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--bg-1);
  font-weight: 700;
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: step;
}
.steps li {
  padding: 16px 16px 16px 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 15px;
  color: var(--rose-50);
  line-height: 1.55;
  position: relative;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--rose-400), var(--rose-700));
  color: var(--cream-light);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 700;
}
.steps .timer-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  padding: 2px 8px;
  background: rgba(252,211,77,0.15);
  color: #fcd34d;
  border-radius: 100px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
}

.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ===== Buttons (shared) ===== */
.btn-primary, .btn-secondary, .btn-mini {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 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(--rose-400), var(--rose-700));
  color: var(--cream-light);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(225,29,72,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(225,29,72,0.45); }
.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--rose-50);
}
.btn-secondary:hover { background: var(--surface-strong); border-color: var(--border-strong); }
.btn-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  flex: 0 1 auto;
  padding: 14px 18px;
}
.btn-mini:hover { background: var(--surface-strong); color: var(--rose-50); }
.btn-mini.danger { color: var(--rose-300); border-color: rgba(253,164,175,0.3); }
.btn-mini.danger:hover { background: rgba(253,164,175,0.1); color: var(--rose-200); }

/* ===== 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(--rose-400), var(--rose-700));
  color: var(--cream-light);
  cursor: pointer;
  z-index: 60;
  box-shadow: 0 14px 30px rgba(225,29,72,0.45), 0 0 24px rgba(225,29,72,0.25);
  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(225,29,72,0.55), 0 0 32px rgba(225,29,72,0.4);
}
.fab:active { transform: translateX(-50%) scale(0.95); }
.fab svg { width: 26px; height: 26px; }

/* ===== Cook Mode ===== */
.cook-mode {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #2d0c1a 0%, #1f0a14 100%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  animation: cook-in 0.4s var(--bezier-soft);
}
@keyframes cook-in {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}
.cook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  padding-top: max(14px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  background: rgba(31,10,20,0.6);
  backdrop-filter: blur(20px);
}
.cook-exit {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--rose-100);
  cursor: pointer;
}
.cook-exit svg { width: 18px; height: 18px; }
.cook-title-wrap { text-align: center; flex: 1; padding: 0 12px; min-width: 0; }
.cook-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--rose-300);
  margin-bottom: 2px;
}
.cook-title {
  font-family: 'Frank Ruhl Libre', 'Heebo', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--rose-50);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cook-progress {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--rose-100);
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px;
}
.cook-progress .sep { color: var(--text-muted); margin: 0 2px; }

.cook-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.cook-step-wrap {
  background: linear-gradient(140deg, var(--surface-strong) 0%, var(--surface) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 32px 26px;
  position: relative;
  box-shadow: var(--shadow-soft);
}
.cook-step-num {
  position: absolute;
  top: -22px;
  right: 26px;
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--rose-400), var(--rose-700));
  color: var(--cream-light);
  border-radius: 18px;
  display: grid; place-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 12px 24px rgba(225,29,72,0.4);
}
.cook-step-text {
  font-family: 'Heebo', sans-serif;
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--rose-50);
  margin-top: 16px;
}

.cook-step-timer {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed var(--border-strong);
  text-align: center;
}
.timer-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--rose-300);
  margin-bottom: 12px;
}
.timer-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 56px;
  font-weight: 600;
  color: var(--rose-50);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 18px;
  text-shadow: 0 0 30px rgba(254,205,211,0.2);
}
.timer-value.alarm {
  color: #fcd34d;
  animation: pulse-alarm 0.6s ease-in-out infinite;
  text-shadow: 0 0 40px rgba(252,211,77,0.6);
}
@keyframes pulse-alarm {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.timer-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.timer-btn {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--rose-400), var(--rose-700));
  color: var(--cream-light);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.timer-btn:hover { transform: translateY(-1px); }
.timer-btn.ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.cook-ingredients-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}
.cim-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--rose-300);
  margin-bottom: 10px;
}
.cim-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cim-pill {
  padding: 6px 12px;
  background: rgba(255,228,230,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  color: var(--rose-100);
}

.cook-nav {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgba(31,10,20,0.6);
  backdrop-filter: blur(20px);
}
.cook-nav-btn {
  flex: 1;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--rose-100);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s var(--bezier);
}
.cook-nav-btn:hover { background: var(--surface-strong); }
.cook-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cook-nav-btn svg { width: 18px; height: 18px; }
.cook-nav-btn.primary {
  background: linear-gradient(135deg, var(--rose-400), var(--rose-700));
  color: var(--cream-light);
  border: none;
  box-shadow: 0 8px 20px rgba(225,29,72,0.3);
}
.cook-nav-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(225,29,72,0.45); }

/* ===== Modal (bottom sheet) ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(20,5,12,0.65);
  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: 560px;
  background: linear-gradient(180deg, #2d0c1a 0%, #1f0a14 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(--rose-50);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
}
.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(--rose-400), var(--rose-700));
  border-radius: 18px;
  color: var(--cream-light);
  margin: 4px auto 14px;
  box-shadow: 0 0 30px rgba(225,29,72,0.4);
}
.mark-big svg { width: 32px; height: 32px; }

.modal-input {
  width: 100%;
  padding: 13px 14px;
  background: rgba(255,228,230,0.06);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--rose-50);
  font-family: inherit;
  font-size: 15px;
  margin-bottom: 12px;
  transition: all 0.2s;
  resize: vertical;
  text-align: right;
  direction: rtl;
}
.modal-input:focus {
  outline: none;
  border-color: var(--rose-400);
  background: rgba(255,228,230,0.10);
}
.modal-input::placeholder { color: var(--text-muted); }
textarea.modal-input { font-family: 'Heebo', sans-serif; line-height: 1.5; min-height: 80px; }

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

.cat-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
@media (max-width: 480px) { .cat-picker { grid-template-columns: repeat(3, 1fr); } }
.cat-pick {
  padding: 12px 6px;
  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);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cat-pick:hover { background: var(--surface-strong); }
.cat-pick.active {
  background: color-mix(in srgb, var(--cp, var(--rose-400)) 20%, transparent);
  border-color: var(--cp, var(--rose-400));
  color: var(--cp, var(--rose-200));
  font-weight: 600;
}
.cat-pick-icon { font-size: 18px; }

.rating-picker {
  display: flex;
  gap: 2px;
  background: rgba(255,228,230,0.06);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px;
  justify-content: center;
}
.star {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 2px 4px;
  transition: all 0.15s;
  font-family: inherit;
}
.star.filled { color: #fcd34d; transform: scale(1.05); }
.star:hover { color: #fde68a; }

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
