/* ═══════════════════════════════════════════════════
   LCARS MEAL PLANNER — Starfleet Interface Design
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Nunito:wght@600;700;800;900&display=swap');

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

:root {
  --orange:  #FF9900;
  --peach:   #FFCC99;
  --gold:    #CC9933;
  --blue:    #9999FF;
  --lt-blue: #CCCCFF;
  --purple:  #CC66FF;
  --red:     #FF6666;
  --maroon:  #CC3333;
  --teal:    #66CCCC;
  --green:   #66FF99;
  --yellow:  #FFFF66;
  --bg:      #000000;
  --bg2:     #0A0A0A;
  --bg3:     #111111;
  --border:  #2A2A2A;
  --text:    #FF9900;
  --sidebar: 210px;
  --topbar:  68px;
  --botbar:  36px;
}

html, body { height: 100%; background: var(--bg); color: var(--text); font-family: 'Orbitron', monospace; }

/* ─── Layout Frame ─────────────────────────────────── */
.lcars-frame {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ─── Top Bar ──────────────────────────────────────── */
.lcars-top {
  height: var(--topbar);
  background: var(--orange);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 20px 0 0;
  gap: 0;
}

.lcars-top-brand {
  width: var(--sidebar);
  flex-shrink: 0;
  height: 100%;
  background: var(--orange);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 0 0 36px 0;
}

.lcars-top-brand .app-title {
  font-size: 0.7em;
  font-weight: 900;
  color: #000;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}

.lcars-top-center {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
}

.top-blip {
  height: 22px;
  border-radius: 3px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.25);
}

.lcars-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #000;
  font-size: 0.6em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.top-user { font-weight: 700; }
.top-stardate { opacity: 0.7; font-size: 0.9em; }

.btn-logout {
  background: rgba(0,0,0,0.2);
  color: #000;
  border: 2px solid rgba(0,0,0,0.3);
  font-family: 'Orbitron', monospace;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
}
.btn-logout:hover { background: rgba(0,0,0,0.35); }

/* ─── Body ─────────────────────────────────────────── */
.lcars-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ─── Sidebar ──────────────────────────────────────── */
.lcars-sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.lcars-elbow {
  height: 64px;
  background: var(--orange);
  border-radius: 0 0 0 36px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.lcars-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 0 16px 0;
  overflow-y: auto;
}

.nav-btn {
  height: 44px;
  width: 100%;
  border-radius: 22px 0 0 22px;
  border: none;
  cursor: pointer;
  font-family: 'Orbitron', monospace;
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0 0 0 18px;
  text-align: left;
  color: #000;
  transition: filter 0.1s, transform 0.05s;
  flex-shrink: 0;
  background: var(--orange);
}
.nav-btn:hover  { filter: brightness(1.15); }
.nav-btn:active { transform: scaleY(0.95); }
.nav-btn.active { filter: brightness(1.3); outline: 2px solid var(--peach); outline-offset: -2px; }

.nav-btn.nb-orange  { background: var(--orange); }
.nav-btn.nb-peach   { background: var(--peach); }
.nav-btn.nb-blue    { background: var(--blue); }
.nav-btn.nb-purple  { background: var(--purple); }
.nav-btn.nb-teal    { background: var(--teal); }
.nav-btn.nb-red     { background: var(--red); }

.nav-blip {
  height: 10px;
  background: var(--peach);
  border-radius: 5px 0 0 5px;
  margin: 0;
  opacity: 0.5;
  flex-shrink: 0;
}

.nav-spacer { flex: 1; }

/* ─── Main Content ─────────────────────────────────── */
.lcars-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  scroll-behavior: smooth;
}

/* ─── Bottom Bar ───────────────────────────────────── */
.lcars-bottom {
  height: var(--botbar);
  background: var(--orange);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  color: #000;
  font-size: 0.6em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.lcars-bottom .status-blip {
  width: 30px;
  height: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 2px;
}

/* ─── View Header ──────────────────────────────────── */
.view-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.view-title {
  font-size: 0.85em;
  font-weight: 900;
  letter-spacing: 0.25em;
  color: var(--orange);
  text-transform: uppercase;
  flex: 1;
}
.view-subtitle {
  font-size: 0.65em;
  color: var(--peach);
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

/* ─── Buttons ──────────────────────────────────────── */
.lcars-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-family: 'Orbitron', monospace;
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #000;
  transition: filter 0.1s, transform 0.05s;
  background: var(--orange);
  white-space: nowrap;
}
.lcars-btn:hover  { filter: brightness(1.15); }
.lcars-btn:active { transform: scale(0.96); }
.lcars-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.lcars-btn.btn-sm  { height: 32px; padding: 0 12px; font-size: 0.6em; }
.lcars-btn.btn-xs  { height: 24px; padding: 0 8px;  font-size: 0.55em; border-radius: 12px; }
.lcars-btn.btn-lg  { height: 50px; padding: 0 28px; font-size: 0.75em; }
.lcars-btn.btn-full{ width: 100%; }

.lcars-btn.btn-orange { background: var(--orange); }
.lcars-btn.btn-green  { background: var(--green); color: #000; }
.lcars-btn.btn-peach  { background: var(--peach); }
.lcars-btn.btn-blue   { background: var(--blue); }
.lcars-btn.btn-purple { background: var(--purple); }
.lcars-btn.btn-teal   { background: var(--teal); }
.lcars-btn.btn-red    { background: var(--red); }
.lcars-btn.btn-gold   { background: var(--gold); }
.lcars-btn.btn-ghost  { background: transparent; border: 2px solid var(--orange); color: var(--orange); }

/* ─── Inputs ───────────────────────────────────────── */
.lcars-input, .lcars-select {
  background: var(--bg3);
  border: 2px solid var(--orange);
  color: var(--orange);
  font-family: 'Orbitron', monospace;
  font-size: 0.8em;
  padding: 10px 14px;
  outline: none;
  border-radius: 4px;
  width: 100%;
  transition: border-color 0.15s;
}
.lcars-input:focus, .lcars-select:focus { border-color: var(--peach); }
.lcars-select option { background: #111; }

.form-group { margin-bottom: 16px; }
.lcars-label-txt {
  display: block;
  font-size: 0.6em;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 5px;
}

/* ─── LCARS Divider ────────────────────────────────── */
.lcars-divider {
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
  margin: 20px 0;
  position: relative;
}
.lcars-divider::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -5px;
  width: 13px;
  height: 13px;
  background: var(--peach);
  border-radius: 50%;
}

/* ─── Cards ────────────────────────────────────────── */
.lcars-card {
  background: var(--bg2);
  border: 1px solid #2A2A2A;
  border-top: 3px solid var(--orange);
  padding: 16px;
  border-radius: 0 0 4px 4px;
  margin-bottom: 12px;
}
.lcars-card-title {
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 8px;
}

/* ─── Week Grid ────────────────────────────────────── */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.day-col { display: flex; flex-direction: column; gap: 3px; }

.day-header {
  background: var(--orange);
  color: #000;
  padding: 6px 4px;
  text-align: center;
  cursor: pointer;
  border-radius: 2px;
  transition: filter 0.1s;
}
.day-header:hover { filter: brightness(1.1); }
.day-col.today .day-header { background: var(--peach); }
.day-name { font-size: 0.55em; font-weight: 700; letter-spacing: 0.15em; }
.day-date { font-size: 0.7em; font-weight: 900; }

.week-cell {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 6px 5px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  border-radius: 2px;
}
.week-cell:hover { border-color: var(--orange); background: #0D0D05; }
.week-cell.empty { cursor: default; opacity: 0.55; }
.week-cell.empty:hover { border-color: var(--blue); }

.meal-icon { font-size: 0.7em; color: var(--gold); }
.week-recipe-name { font-size: 0.58em; color: var(--orange); letter-spacing: 0.05em; line-height: 1.3; flex: 1; }
.week-cal { font-size: 0.52em; color: var(--teal); letter-spacing: 0.1em; }
.empty-slot-label { font-size: 0.5em; color: #444; letter-spacing: 0.15em; text-transform: uppercase; }

.week-cell-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  margin-top: auto;
}
.stars-xs { font-size: 0.55em; color: var(--orange); letter-spacing: -1px; }

/* ─── Day View ─────────────────────────────────────── */
.day-meal-row {
  background: var(--bg2);
  border-left: 4px solid var(--orange);
  padding: 16px 20px;
  margin-bottom: 10px;
  border-radius: 0 4px 4px 0;
}
.day-meal-type {
  font-size: 0.6em;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--peach);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.day-meal-name {
  font-size: 0.9em;
  font-weight: 700;
  color: var(--orange);
  cursor: pointer;
  margin-bottom: 4px;
}
.day-meal-name:hover { color: var(--peach); text-decoration: underline; }
.day-meal-meta { font-size: 0.6em; color: var(--teal); letter-spacing: 0.15em; margin-bottom: 12px; }
.day-meal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Multiple entries per meal slot (shared + overrides) */
.day-meal-entry {
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.day-meal-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.day-meal-entry.dining-out-entry .day-meal-name { cursor: default; }
.day-meal-entry.dining-out-entry .day-meal-name:hover { color: var(--gold); text-decoration: none; }

/* User badges (colored initials for shared plan display) */
.user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  color: #000;
  margin-left: 5px;
  vertical-align: middle;
  font-family: var(--font-ui);
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0;
}
.week-recipe-name .user-badge { width: 14px; height: 14px; font-size: 7px; margin-left: 3px; }

/* ─── Recipe Detail ────────────────────────────────── */
.recipe-hero {
  background: var(--orange);
  color: #000;
  padding: 16px 20px;
  border-radius: 4px 4px 0 0;
  margin-bottom: 0;
}
.recipe-hero h1 { font-size: 1em; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; }
.recipe-hero .meta { font-size: 0.6em; letter-spacing: 0.2em; margin-top: 4px; opacity: 0.8; }

.recipe-body {
  background: var(--bg2);
  border: 1px solid #2A2A2A;
  padding: 20px;
  border-radius: 0 0 4px 4px;
  margin-bottom: 16px;
}

.recipe-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.stat-item { text-align: center; }
.stat-value { display: block; font-size: 1.1em; font-weight: 700; color: var(--orange); }
.stat-label { font-size: 0.55em; letter-spacing: 0.25em; color: var(--peach); text-transform: uppercase; }

.recipe-section-title {
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--orange);
  text-transform: uppercase;
  border-bottom: 1px solid var(--orange);
  padding-bottom: 4px;
  margin: 16px 0 10px;
}

.ingredient-list { list-style: none; }
.ingredient-list li {
  font-size: 0.7em;
  color: var(--peach);
  padding: 4px 0;
  border-bottom: 1px solid #1A1A1A;
  letter-spacing: 0.05em;
}
.ingredient-list li::before { content: '▸ '; color: var(--orange); }

.recipe-instructions {
  font-size: 0.7em;
  color: var(--peach);
  line-height: 1.8;
  white-space: pre-wrap;
  letter-spacing: 0.05em;
}

/* ─── Star Rating ──────────────────────────────────── */
.rating-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.rating-prompt { font-size: 0.6em; letter-spacing: 0.2em; color: var(--peach); text-transform: uppercase; }

.stars-interactive { display: flex; gap: 2px; align-items: center; }
.star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 2em; color: #333;
  transition: color 0.1s, transform 0.08s;
  padding: 2px 3px;
  line-height: 1;
}
.star-btn:hover  { color: var(--peach); transform: scale(1.25); }
.star-btn.lit    { color: var(--orange); }
.star-btn.zero-btn { font-size: 1.1em; color: #555; border: 1px solid #444; border-radius: 4px; padding: 3px 6px; font-family: 'Orbitron', monospace; }
.star-btn.zero-btn.zero-active { background: var(--red); color: #000; border-color: var(--red); }
.star-btn.zero-btn:hover { color: var(--red); border-color: var(--red); }

.rating-badge {
  font-size: 0.65em;
  letter-spacing: 0.15em;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--orange);
}

/* ─── Recipe List ──────────────────────────────────── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.recipe-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--orange);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  border-radius: 0 0 4px 4px;
}
.recipe-card:hover { border-color: var(--peach); background: #0D0D05; }
.recipe-card.category-lunch  { border-top-color: var(--blue); }
.recipe-card.category-dinner { border-top-color: var(--purple); }

.recipe-card-name { font-size: 0.75em; font-weight: 700; color: var(--orange); margin-bottom: 4px; letter-spacing: 0.05em; }
.recipe-card-meta { font-size: 0.58em; color: var(--teal); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 6px; }
.recipe-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.recipe-card-cal { font-size: 0.6em; color: var(--gold); letter-spacing: 0.1em; }
.recipe-card-stars { font-size: 0.75em; color: var(--orange); }

/* ─── Shopping List ────────────────────────────────── */
.shopping-category-header {
  background: var(--orange);
  color: #000;
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 3px;
  margin: 12px 0 4px;
}

.shopping-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.shopping-item:hover { background: var(--bg3); }
.shopping-item.checked { opacity: 0.45; }
.shopping-item.checked .item-name { text-decoration: line-through; color: #555; }

.item-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--orange);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--orange);
  font-size: 0.8em;
}
.item-check.checked { background: var(--orange); color: #000; }

.item-name { font-size: 0.72em; color: var(--orange); flex: 1; letter-spacing: 0.05em; }
.item-amount { font-size: 0.65em; color: var(--teal); letter-spacing: 0.1em; white-space: nowrap; }
.item-delete { background: none; border: none; color: #444; cursor: pointer; font-size: 1em; padding: 2px 4px; }
.item-delete:hover { color: var(--red); }

.add-custom-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--orange);
  flex-wrap: wrap;
}

/* ─── Modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-box {
  background: var(--bg2);
  border: 2px solid var(--orange);
  border-top: 6px solid var(--orange);
  border-radius: 4px;
  padding: 24px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.modal-title { font-size: 0.8em; font-weight: 700; letter-spacing: 0.25em; color: var(--orange); text-transform: uppercase; }
.modal-sub { font-size: 0.6em; color: var(--teal); letter-spacing: 0.2em; text-transform: uppercase; margin-top: 2px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ─── Swap Options ─────────────────────────────────── */
.swap-list { display: flex; flex-direction: column; gap: 3px; max-height: 50vh; overflow-y: auto; }
.swap-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  cursor: pointer;
  border-radius: 3px;
  gap: 12px;
  transition: border-color 0.1s, background 0.1s;
}
.swap-option:hover { border-color: var(--orange); background: #0D0D05; }
.swap-name { font-size: 0.7em; color: var(--orange); font-weight: 700; flex: 1; }
.swap-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.swap-cal { font-size: 0.6em; letter-spacing: 0.1em; }
.cal-similar { color: var(--green); }
.cal-close    { color: var(--yellow); }
.cal-diff     { color: var(--peach); }
.swap-badge { font-size: 0.52em; letter-spacing: 0.1em; padding: 2px 6px; border-radius: 8px; text-transform: uppercase; }
.badge-similar { background: #0A2A0A; color: var(--green); border: 1px solid var(--green); }
.badge-close   { background: #2A2A00; color: var(--yellow); border: 1px solid var(--yellow); }
.badge-diff    { background: #1A1000; color: var(--peach); border: 1px solid var(--peach); }
.swap-stars { font-size: 0.7em; color: var(--orange); }

/* ─── Toast ────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--botbar) + 12px);
  left: calc(var(--sidebar) + 16px);
  background: var(--bg3);
  border: 2px solid var(--orange);
  color: var(--orange);
  font-size: 0.65em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 4px;
  z-index: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: var(--red); color: var(--red); }
.toast.success { border-color: var(--green); color: var(--green); }

/* ─── Loading ──────────────────────────────────────── */
.lcars-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 0;
  color: var(--orange);
  font-size: 0.7em;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.loading-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  animation: loadpulse 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes loadpulse { 0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }

/* ─── Settings ─────────────────────────────────────── */
.settings-section { margin-bottom: 28px; }
.settings-title {
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--orange);
  text-transform: uppercase;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  margin-bottom: 4px;
  border-radius: 3px;
}
.user-row-name { font-size: 0.7em; color: var(--orange); flex: 1; letter-spacing: 0.1em; }
.user-row-date { font-size: 0.58em; color: #555; letter-spacing: 0.1em; }

/* ─── Sound Toggle ─────────────────────────────────── */
.sound-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 2px solid var(--orange);
  color: var(--orange);
  font-family: 'Orbitron', monospace;
  font-size: 0.65em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}
.sound-toggle-btn.muted { border-color: #444; color: #444; }

/* ─── Mobile Bottom Navigation ─────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg2);
  border-top: 3px solid var(--orange);
  z-index: 200;
}

.mnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  padding: 6px 2px;
  font-family: 'Orbitron', monospace;
  color: #555;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.mnav-btn:last-child { border-right: none; }
.mnav-btn:hover { background: var(--bg3); color: #888; }

.mnav-icon  { font-size: 1.3em; line-height: 1; }
.mnav-label { font-size: 0.35em; letter-spacing: 0.15em; text-transform: uppercase; }

/* Colored top-accent bar on active tab */
.mnav-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  background: currentColor;
  border-radius: 0 0 3px 3px;
}
#mnav-today.active    { color: var(--peach); }
#mnav-shopping.active { color: var(--purple); }
#mnav-week.active     { color: var(--orange); }
#mnav-recipes.active  { color: var(--blue); }
#mnav-more.active     { color: var(--teal); }

/* ─── Mobile More Drawer ────────────────────────────── */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
}
.mobile-menu-overlay.open { display: block; }

.mobile-menu {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 3px solid var(--orange);
  z-index: 301;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.mobile-menu.open { transform: translateY(0); }

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 20px 28px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--orange);
  font-family: 'Orbitron', monospace;
  font-size: 0.72em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.mobile-menu-item:last-child { border-bottom: none; }
.mobile-menu-item:hover { background: var(--bg3); }
.mobile-menu-logout { color: var(--red); }
.mmi-icon { font-size: 1.15em; line-height: 1; width: 1.4em; text-align: center; }

/* ─── Responsive — tablet portrait & phone ─────────── */
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .lcars-sidebar { display: none; }
  .lcars-bottom  { display: none; }      /* replaced by mobile nav bar */
  .lcars-top-brand { width: auto; padding: 0 12px; border-radius: 0; }
  .btn-logout { display: none; }         /* logout lives in mobile More menu */
  .lcars-main { padding-bottom: 76px; }  /* clear the 60px fixed nav */
  .toast { left: 16px; bottom: 74px; }  /* float above mobile nav */
  .mobile-nav { display: flex; }
}

@media (max-width: 640px) {
  .week-grid { grid-template-columns: repeat(2, 1fr); }
  .lcars-main { padding: 16px 14px 76px; }
  .view-header { gap: 6px; }
  .recipe-grid { grid-template-columns: 1fr; }
  .lcars-top-right .top-stardate { display: none; }
  .shopping-item { padding: 12px 10px; }
  .item-name   { font-size: 0.82em; }
  .item-amount { font-size: 0.72em; }
  .item-check  { width: 28px; height: 28px; }
}

/* ─── Utility ──────────────────────────────────────── */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.gap-8 { display: flex; gap: 8px; flex-wrap: wrap; }
.text-peach  { color: var(--peach); }
.text-teal   { color: var(--teal); }
.text-red    { color: var(--red); }
.text-green  { color: var(--green); }
.text-small  { font-size: 0.65em; letter-spacing: 0.15em; }
.text-center { text-align: center; }
.cat-badge {
  display: inline-block;
  font-size: 0.5em;
  letter-spacing: 0.2em;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  border: 1px solid;
}
.cat-breakfast { color: var(--orange); border-color: var(--orange); }
.cat-lunch     { color: var(--blue);   border-color: var(--blue); }
.cat-dinner    { color: var(--purple); border-color: var(--purple); }
.cat-fasting   { color: var(--teal);   border-color: var(--teal); }

/* ─── Dining Out ───────────────────────────────────── */
.week-cell.dining-out-slot {
  border-left: 2px solid var(--gold);
  background: rgba(204,153,51,0.05);
}
.week-cell.dining-out-slot .meal-icon { color: var(--gold); }

.day-meal-row.dining-out-slot {
  border-left: 4px solid var(--gold);
  background: rgba(204,153,51,0.04);
  border-radius: 0 6px 6px 0;
}
.day-meal-row.dining-out-slot .day-meal-type { color: var(--gold); opacity: 0.85; }

/* Dining Out option in swap modal */
.swap-option.dining-out-option {
  border-left: 3px solid var(--gold);
  background: rgba(204,153,51,0.06);
  margin-bottom: 6px;
}
.swap-option.dining-out-option .swap-name { color: var(--gold); }
.swap-option.dining-out-option:hover {
  border-color: var(--gold);
  background: rgba(204,153,51,0.13);
}

/* ─── Fasting Day — Week View ──────────────────────── */
.day-col.fasting-day > .day-header {
  background: var(--teal);
  color: #000;
}
.day-col.fasting-day > .day-header .day-name,
.day-col.fasting-day > .day-header .day-date {
  color: #000;
}
.fasting-badge {
  font-size: 0.48em;
  letter-spacing: 0.12em;
  background: rgba(0,0,0,0.25);
  border-radius: 5px;
  padding: 2px 6px;
  margin-top: 3px;
  display: inline-block;
}

/* Fasting meal cells — week and day views */
.week-cell.fasting-slot {
  border-left: 2px solid var(--teal);
  background: rgba(102,204,204,0.05);
}
.week-cell.fasting-slot .meal-icon   { color: var(--teal); }
.week-cell.fasting-slot .week-recipe-name { color: var(--teal); }
.week-cell.fasting-slot .week-cal    { color: var(--teal); opacity: 0.7; }

.day-meal-row.fasting-slot {
  border-left: 3px solid var(--teal);
  background: rgba(102,204,204,0.04);
  border-radius: 0 6px 6px 0;
}
.day-meal-row.fasting-slot .day-meal-type { color: var(--teal); }

/* Fasting Day Banner — Day View */
.fasting-day-banner {
  background: rgba(102,204,204,0.08);
  border: 1px solid var(--teal);
  border-left: 4px solid var(--teal);
  border-radius: 0 6px 6px 0;
  padding: 12px 18px;
  margin-bottom: 20px;
  font-size: 0.68em;
  letter-spacing: 0.1em;
  color: var(--teal);
  line-height: 1.7;
}
.fasting-day-banner strong { font-size: 1.05em; }

/* Fasting option in swap modal */
.swap-option.fasting-option {
  border-left: 2px solid var(--teal);
}
.swap-option.fasting-option .swap-name { color: var(--teal); }

/* Fasting day-of-week toggles — Settings */
.fasting-day-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.fasting-day-btn {
  font-family: inherit;
  font-size: 0.6em;
  letter-spacing: 0.15em;
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
}
.fasting-day-btn.active {
  background: var(--teal);
  color: #000;
  border-color: var(--teal);
}
.fasting-day-btn:hover:not(.active) {
  border-color: var(--teal);
  color: var(--teal);
}

/* ─── Recipe Manage Table ─────────────────────────── */
.manage-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}
.manage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72em;
  letter-spacing: 0.06em;
}
.manage-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg3);
  color: var(--orange);
  font-size: 0.8em;
  letter-spacing: 0.18em;
  border-bottom: 2px solid var(--orange);
  white-space: nowrap;
}
.manage-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.manage-table tr:hover td { background: var(--bg3); }

.manage-input {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1em;
  padding: 4px 8px;
  border-radius: 4px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.manage-input:hover  { border-color: var(--border); }
.manage-input:focus  { border-color: var(--orange); background: var(--bg2); }
.manage-number { width: 80px; text-align: right; }

.manage-name-cell { min-width: 180px; }

.manage-select {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1em;
  padding: 4px 8px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.manage-select:hover { border-color: var(--border); }
.manage-select:focus { border-color: var(--orange); background: var(--bg2); }
.manage-select option { background: var(--bg2); }

.manage-stars-cell  { white-space: nowrap; }
.manage-actions-cell { white-space: nowrap; }

.stars-compact {
  display: flex;
  gap: 1px;
  align-items: center;
}
.star-c {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  color: #444;
  padding: 1px 2px;
  line-height: 1;
  transition: color 0.1s;
}
.star-c:hover   { color: var(--peach); }
.star-c.lit     { color: var(--orange); }
.zero-c         { font-size: 0.85em; }
.zero-c-active  { color: var(--red) !important; }

/* ─── Recipe Add / Edit Modal ─────────────────────── */
.modal-box.modal-recipe {
  width: min(820px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
}
.recipe-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 70px;
}
.form-grow { flex: 1; }
.form-label {
  font-size: 0.55em;
  letter-spacing: 0.2em;
  color: var(--orange);
}
.form-input, .form-select {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.7em;
  padding: 7px 10px;
  border-radius: 4px;
  outline: none;
}
.form-input:focus, .form-select:focus { border-color: var(--orange); }
.form-select option { background: var(--bg2); }
.form-textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--peach);
  font-family: inherit;
  font-size: 0.7em;
  padding: 8px 10px;
  border-radius: 4px;
  outline: none;
  resize: vertical;
  line-height: 1.7;
  width: 100%;
}
.form-textarea:focus { border-color: var(--orange); }
.form-section-title {
  font-size: 0.6em;
  letter-spacing: 0.25em;
  color: var(--blue);
  border-bottom: 1px solid var(--blue);
  padding-bottom: 4px;
  margin-top: 4px;
}
#ing-list { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.ing-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ing-row input, .ing-row select {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.68em;
  padding: 6px 8px;
  border-radius: 4px;
  outline: none;
  min-width: 0;
}
.ing-row input:focus,
.ing-row select:focus { border-color: var(--blue); }
.ing-row select option { background: var(--bg2); }
.ing-name   { flex: 4; }
.ing-amount { flex: 1; max-width: 70px; }
.ing-unit   { flex: 2; }
.ing-cat    { flex: 2; }
.btn-ing-remove {
  background: none;
  border: 1px solid var(--border);
  color: var(--red);
  font-size: 0.75em;
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-ing-remove:hover { border-color: var(--red); background: rgba(255,102,102,0.1); }

@media (max-width: 640px) {
  .form-row { flex-direction: column; }
  .manage-table th:nth-child(4) { display: none; }
  .manage-table td:nth-child(4) { display: none; }
}

/* ─── Food Preferences View ───────────────────────── */
.pref-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}

.pref-section-title {
  font-size: 0.65em;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid;
}
.pref-section-title.like-title   { color: var(--green);  border-color: var(--green); }
.pref-section-title.dislike-title { color: var(--red);    border-color: var(--red); }

.add-pref-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.add-pref-row input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.75em;
  padding: 8px 12px;
  border-radius: 6px;
  outline: none;
}
.add-pref-row input:focus { border-color: var(--orange); }
.add-pref-row input::placeholder { color: #555; }

.btn-add-like    { background: var(--green);  color: #000; }
.btn-add-dislike { background: var(--red);    color: #000; }

.pref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pref-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65em;
  letter-spacing: 0.12em;
  padding: 4px 10px 4px 12px;
  border-radius: 20px;
  border: 1px solid;
  text-transform: uppercase;
}
.pref-tag.like    { color: var(--green);  border-color: var(--green);  background: rgba(102,255,153,0.07); }
.pref-tag.dislike { color: var(--red);    border-color: var(--red);    background: rgba(255,102,102,0.07); }

.pref-owner {
  font-size: 0.85em;
  opacity: 0.55;
  margin-left: 3px;
  letter-spacing: 0;
  font-style: italic;
}

.pref-tag-other {
  opacity: 0.7;
}

.pref-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  line-height: 1;
  padding: 0;
  opacity: 0.6;
  color: inherit;
}
.pref-tag-remove:hover { opacity: 1; }

.pref-empty {
  font-size: 0.65em;
  letter-spacing: 0.12em;
  color: #444;
  font-style: italic;
}

.pref-impact {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--bg3);
  border-left: 3px solid var(--orange);
  border-radius: 0 6px 6px 0;
}
.pref-impact p {
  font-size: 0.62em;
  letter-spacing: 0.1em;
  line-height: 1.8;
  color: var(--peach);
}
.pref-impact strong { color: var(--orange); }

@media (max-width: 640px) {
  .pref-columns { grid-template-columns: 1fr; }
}

/* ─── Theme Selector Cards ─────────────────────────── */
.theme-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.theme-card {
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-width: 140px;
  flex: 1;
}
.theme-card:hover  { border-color: var(--orange); background: var(--bg2); }
.theme-card.active { border-color: var(--orange); background: var(--bg2); }
.theme-swatches {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}
.theme-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}
.theme-name {
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 3px;
}
.theme-active-mark {
  font-size: 0.6em;
  color: var(--teal);
  letter-spacing: 0.15em;
  margin-top: 2px;
}
.theme-desc {
  font-size: 0.52em;
  letter-spacing: 0.1em;
  color: #666;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════
   THEME: KAWAII — Cute Pastel Dark Interface
   Layout: top nav bar · bubbly cards · Nunito font
   ═══════════════════════════════════════════════════════ */

/* ── Colour palette ─────────────────────────────────── */
html[data-theme="kawaii"] {
  --orange:  #FF85C2;   /* hot pink  — primary */
  --peach:   #FFB3D9;   /* light pink */
  --gold:    #C3A1E0;   /* lavender */
  --blue:    #7FDBFF;   /* sky blue */
  --lt-blue: #B2EBF2;   /* pale blue */
  --purple:  #CE93D8;   /* soft purple */
  --red:     #FF8FA3;   /* coral */
  --maroon:  #E91E8C;   /* hot-pink danger */
  --teal:    #98F5D0;   /* mint */
  --green:   #A5D6A7;   /* soft green */
  --yellow:  #FFF9C4;   /* soft yellow */
  --bg:      #110520;   /* deep purple-black */
  --bg2:     #1A0832;   /* dark purple */
  --bg3:     #240D42;   /* mid purple */
  --border:  #4A1A6E;   /* purple border */
  --text:    #FFB3D9;   /* light pink text */
  --sidebar: 0px;       /* nav lives at top, not side */
  --topbar:  auto;
  --botbar:  0px;
}

/* ── Typography ─────────────────────────────────────── */
html[data-theme="kawaii"],
html[data-theme="kawaii"] body {
  font-family: 'Nunito', sans-serif;
}
/* Keep Orbitron for titles & nav labels only */
html[data-theme="kawaii"] .app-title,
html[data-theme="kawaii"] .view-title,
html[data-theme="kawaii"] .nav-btn,
html[data-theme="kawaii"] .lcars-btn,
html[data-theme="kawaii"] .settings-title,
html[data-theme="kawaii"] .modal-title {
  font-family: 'Orbitron', monospace;
}

/* ── Frame & body layout ────────────────────────────── */
html[data-theme="kawaii"] .lcars-frame {
  background: var(--bg);
}

/* Body: sidebar stacks above content (not beside it) */
html[data-theme="kawaii"] .lcars-body {
  flex-direction: column;
  overflow: visible;
}

/* ── Header banner ──────────────────────────────────── */
html[data-theme="kawaii"] .lcars-top {
  height: auto;
  min-height: 58px;
  background: linear-gradient(135deg, #8B0070 0%, #6A1B9A 55%, #4527A0 100%);
  padding: 10px 20px;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 4px 24px rgba(139,0,112,0.45);
  position: relative;
  z-index: 10;
}
html[data-theme="kawaii"] .lcars-top-brand {
  width: auto;
  background: transparent;
  border-radius: 0;
  padding: 0 16px 0 0;
}
html[data-theme="kawaii"] .lcars-top-brand .app-title {
  color: #fff;
  font-size: 0.65em;
  letter-spacing: 0.1em;
}
html[data-theme="kawaii"] .top-blip {
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  height: 14px;
}
html[data-theme="kawaii"] .lcars-top-right { color: rgba(255,255,255,0.92); }
html[data-theme="kawaii"] .top-stardate    { color: rgba(255,255,255,0.65); }
html[data-theme="kawaii"] .btn-logout {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 18px;
  padding: 4px 14px;
}
html[data-theme="kawaii"] .btn-logout:hover {
  background: rgba(255,255,255,0.32);
}

/* ── Sidebar → horizontal top nav ──────────────────── */
html[data-theme="kawaii"] .lcars-sidebar {
  display: flex !important;   /* always visible — it's the top nav */
  width: 100%;
  flex-direction: column;
  background: transparent;
  overflow: visible;
}
html[data-theme="kawaii"] .lcars-elbow { display: none; }

html[data-theme="kawaii"] .lcars-nav {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 12px 18px 16px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}
html[data-theme="kawaii"] .lcars-nav::-webkit-scrollbar { display: none; }

html[data-theme="kawaii"] .nav-spacer { display: none; }
html[data-theme="kawaii"] .nav-blip   { display: none; }

/* Nav buttons: horizontal pills with drop shadow */
html[data-theme="kawaii"] .nav-btn {
  width: auto;
  min-width: max-content;
  height: 40px;
  border-radius: 20px;
  padding: 0 22px;
  font-size: 0.56em;
  letter-spacing: 0.12em;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.45);
  transition: filter 0.15s, box-shadow 0.15s, transform 0.08s;
}
html[data-theme="kawaii"] .nav-btn:hover {
  box-shadow: 0 5px 16px rgba(0,0,0,0.5);
}
html[data-theme="kawaii"] .nav-btn:active { transform: scale(0.95); }
html[data-theme="kawaii"] .nav-btn.active {
  filter: brightness(1.18);
  box-shadow: 0 0 18px rgba(255,133,194,0.55), 0 4px 12px rgba(0,0,0,0.4);
  outline: 2px solid rgba(255,255,255,0.35);
  outline-offset: 1px;
}

/* Hide the fixed mobile bottom nav — kawaii uses top nav instead */
html[data-theme="kawaii"] .mobile-nav         { display: none !important; }
html[data-theme="kawaii"] .mobile-menu        { display: none !important; }
html[data-theme="kawaii"] .mobile-menu-overlay{ display: none !important; }
html[data-theme="kawaii"] .lcars-bottom       { display: none; }

/* ── Main content ───────────────────────────────────── */
html[data-theme="kawaii"] .lcars-main {
  padding: 24px 24px 32px !important;
}

/* ── View header ────────────────────────────────────── */
html[data-theme="kawaii"] .view-title {
  font-size: 0.9em;
  letter-spacing: 0.2em;
}
html[data-theme="kawaii"] .view-title::after  { content: ' ✨'; font-size: 0.7em; opacity: 0.8; }
html[data-theme="kawaii"] .view-subtitle { color: var(--peach); letter-spacing: 0.15em; }

/* ── Cards ──────────────────────────────────────────── */
html[data-theme="kawaii"] .lcars-card {
  border-radius: 18px;
  border: 2px solid var(--border);
  border-top: 3px solid var(--orange);
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
}

/* ── Buttons ────────────────────────────────────────── */
html[data-theme="kawaii"] .lcars-btn {
  border-radius: 24px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
}
html[data-theme="kawaii"] .lcars-btn:hover {
  box-shadow: 0 5px 18px rgba(0,0,0,0.4);
}

/* ── Inputs ─────────────────────────────────────────── */
html[data-theme="kawaii"] .lcars-input,
html[data-theme="kawaii"] .lcars-select {
  border-radius: 14px;
  border-color: var(--border);
  font-family: 'Nunito', sans-serif;
  font-size: 0.85em;
}
html[data-theme="kawaii"] .lcars-input:focus,
html[data-theme="kawaii"] .lcars-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,133,194,0.2);
}

/* ── Week grid ──────────────────────────────────────── */
html[data-theme="kawaii"] .day-header {
  border-radius: 12px;
  margin-bottom: 5px;
}
html[data-theme="kawaii"] .week-cell {
  border-radius: 14px;
  border-width: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  min-height: 100px;
}
html[data-theme="kawaii"] .week-cell:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 16px rgba(255,133,194,0.2);
}

/* ── Day view ───────────────────────────────────────── */
html[data-theme="kawaii"] .day-meal-row {
  border-radius: 18px;
  border-left-width: 4px;
  padding: 18px 22px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.25);
}
html[data-theme="kawaii"] .day-meal-name { font-size: 1em; font-weight: 700; }
html[data-theme="kawaii"] .day-meal-type { font-family: 'Nunito', sans-serif; font-weight: 800; }

/* ── Recipe cards ───────────────────────────────────── */
html[data-theme="kawaii"] .recipe-card {
  border-radius: 18px;
  border: 2px solid var(--border);
  border-top: 3px solid var(--orange);
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}
html[data-theme="kawaii"] .recipe-card:hover {
  border-color: var(--peach);
  box-shadow: 0 6px 22px rgba(255,133,194,0.22);
}
html[data-theme="kawaii"] .recipe-card-name { font-weight: 800; font-size: 0.8em; }

/* ── Recipe hero ────────────────────────────────────── */
html[data-theme="kawaii"] .recipe-hero {
  background: linear-gradient(135deg, #8B0070, #6A1B9A);
  color: #fff;
  border-radius: 16px 16px 0 0;
}
html[data-theme="kawaii"] .recipe-hero h1 { color: #fff; }
html[data-theme="kawaii"] .recipe-body {
  border-radius: 0 0 18px 18px;
  border: 2px solid var(--border);
  border-top: none;
}

/* ── Shopping list ──────────────────────────────────── */
html[data-theme="kawaii"] .shopping-category-header {
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--purple));
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 0.72em;
}
html[data-theme="kawaii"] .shopping-item {
  border-radius: 12px;
  margin-bottom: 5px;
  border-bottom: none;
  border: 1px solid var(--border);
}
html[data-theme="kawaii"] .item-check {
  border-radius: 50%;
  width: 26px;
  height: 26px;
}
html[data-theme="kawaii"] .item-check.checked { background: var(--orange); }
html[data-theme="kawaii"] .item-name  { font-family: 'Nunito', sans-serif; font-weight: 700; }
html[data-theme="kawaii"] .item-amount { font-family: 'Nunito', sans-serif; }

/* ── Modal ──────────────────────────────────────────── */
html[data-theme="kawaii"] .modal-box {
  border-radius: 24px;
  border-top: 4px solid var(--orange);
  box-shadow: 0 10px 50px rgba(0,0,0,0.65), 0 0 40px rgba(255,133,194,0.12);
}
html[data-theme="kawaii"] .modal-title { letter-spacing: 0.18em; }

/* ── Swap options ───────────────────────────────────── */
html[data-theme="kawaii"] .swap-option {
  border-radius: 12px;
  border-width: 2px;
}
html[data-theme="kawaii"] .swap-option:hover {
  box-shadow: 0 3px 12px rgba(255,133,194,0.18);
}

/* ── Divider ────────────────────────────────────────── */
html[data-theme="kawaii"] .lcars-divider {
  background: linear-gradient(90deg, var(--orange), var(--purple));
}
html[data-theme="kawaii"] .lcars-divider::after {
  background: var(--peach);
  width: 16px; height: 16px;
  border-radius: 50%;
  top: -7px; right: -8px;
}

/* ── Toast — centred floating pill ─────────────────── */
html[data-theme="kawaii"] .toast {
  border-radius: 28px;
  left: 50% !important;
  right: auto;
  bottom: 24px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  letter-spacing: 0.1em;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
}
html[data-theme="kawaii"] .toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Settings ───────────────────────────────────────── */
html[data-theme="kawaii"] .settings-title {
  border-radius: 0;
  letter-spacing: 0.18em;
}
html[data-theme="kawaii"] .user-row        { border-radius: 14px; border-width: 2px; }
html[data-theme="kawaii"] .sound-toggle-btn { border-radius: 14px; font-family: 'Nunito', sans-serif; font-weight: 800; }
html[data-theme="kawaii"] .fasting-day-btn { border-radius: 14px; font-family: 'Nunito', sans-serif; }
html[data-theme="kawaii"] .fasting-day-btn.active { box-shadow: 0 2px 10px rgba(152,245,208,0.35); }
html[data-theme="kawaii"] .theme-card      { border-radius: 18px; border-width: 2px; }
html[data-theme="kawaii"] .theme-swatch    { width: 24px; height: 24px; }

/* ── Preferences ────────────────────────────────────── */
html[data-theme="kawaii"] .pref-tag        { border-radius: 20px; }
html[data-theme="kawaii"] .add-pref-row input { border-radius: 14px; font-family: 'Nunito', sans-serif; }

/* ── Fasting ────────────────────────────────────────── */
html[data-theme="kawaii"] .fasting-day-banner { border-radius: 0 18px 18px 0; }

/* ── Manage table ───────────────────────────────────── */
html[data-theme="kawaii"] .manage-input:focus  { box-shadow: 0 0 0 2px rgba(255,133,194,0.22); }
html[data-theme="kawaii"] .manage-input        { font-family: 'Nunito', sans-serif; }

/* ── Recipe form (modal) ────────────────────────────── */
html[data-theme="kawaii"] .form-input,
html[data-theme="kawaii"] .form-select,
html[data-theme="kawaii"] .form-textarea {
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
}

/* ── Loading ────────────────────────────────────────── */
html[data-theme="kawaii"] .loading-dots span { background: var(--orange); }

/* ── Responsive: kawaii on small screens ────────────── */
@media (max-width: 640px) {
  html[data-theme="kawaii"] .lcars-nav {
    padding: 8px 12px 12px;
    gap: 6px;
  }
  html[data-theme="kawaii"] .nav-btn {
    height: 36px;
    padding: 0 14px;
    font-size: 0.5em;
  }
  html[data-theme="kawaii"] .lcars-main {
    padding: 16px 14px 24px !important;
  }
}
