/* ============================================================
   Vedic Lifestyle Diet — styles.css
   "Ancient and modern, village and nature"
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --paper: #F6F0E4;
  --card: #FFFBF3;
  --ink: #2A2420;
  --muted: #6B5E52;
  --forest: #234B3B;
  --neem: #4F7A4A;
  --clay: #B5573A;
  --turmeric: #D9A441;
  --indigo: #2B3A55;
  --line: #E6DAC4;
  --vata: #6F8FAF;
  --pitta: #C8553D;
  --kapha: #4F7A4A;
  --on-accent: #FFFBF3;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 10px rgba(88, 68, 40, 0.10), 0 1px 3px rgba(88, 68, 40, 0.08);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --font-head: 'Yatra One', Georgia, serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1F2A;
    --card: #242A38;
    --ink: #F2EADB;
    --muted: #B3A793;
    --forest: #8FC7A9;
    --neem: #7FB47C;
    --clay: #E08A6B;
    --turmeric: #EFC072;
    --indigo: #9DB2D8;
    --line: #39415A;
    --vata: #9DB9D4;
    --pitta: #E68B70;
    --kapha: #8FBE85;
    --on-accent: #1B1F2A;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1B1F2A;
  --card: #242A38;
  --ink: #F2EADB;
  --muted: #B3A793;
  --forest: #8FC7A9;
  --neem: #7FB47C;
  --clay: #E08A6B;
  --turmeric: #EFC072;
  --indigo: #9DB2D8;
  --line: #39415A;
  --vata: #9DB9D4;
  --pitta: #E68B70;
  --kapha: #8FBE85;
  --on-accent: #1B1F2A;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 17px; scroll-behavior: smooth; }
html[data-text="large"] { font-size: 19px; }
html[data-text="xl"] { font-size: 21px; }

html, body { margin: 0; padding: 0; }
body {
  background-color: var(--paper);
  background-image: var(--grain);
  background-repeat: repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

h1, h2, h3, .brand h1, .card-title, .section-title {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: 1.4rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }
a { color: var(--forest); overflow-wrap: anywhere; }
ul { padding-left: 1.2rem; margin: 0 0 var(--space-3); }

main#view { outline: none; }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--forest); color: var(--on-accent);
  padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  z-index: 100; min-height: 48px; display: inline-flex; align-items: center;
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: var(--space-4); top: var(--space-4); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  max-width: 560px; margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.brand-mark { display: inline-flex; width: 1.9rem; height: 1.9rem; color: var(--clay); flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand h1 { font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#typeBadge { margin-left: auto; flex: none; }

/* ---------- Layout ---------- */
main#view {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-6);
}
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.grid3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 479px) { .grid3 { grid-template-columns: 1fr; } }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
small { font-size: 0.85rem; font-weight: 400; margin-left: 0.4rem; }
label.row { min-height: 48px; cursor: pointer; }
.row > input[type="checkbox"] { width: 1.5rem; height: 1.5rem; }
.chip:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-5);
}
@media (max-width: 379px) { .card { padding: var(--space-4); } }
.card-title { font-size: 1.15rem; margin-bottom: var(--space-2); }
.section-title {
  font-size: 1.3rem;
  margin: var(--space-6) 0 var(--space-3);
}
.section-title:first-child { margin-top: 0; }

/* ---------- Kolam divider ---------- */
.kolam {
  height: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--turmeric); opacity: 0.6;
  margin: var(--space-5) 0;
  overflow: hidden;
}
.kolam svg { height: 16px; max-width: 100%; }

/* ---------- Badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  min-height: 48px; padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer;
}
.badge.V { background: color-mix(in srgb, var(--vata) 18%, var(--card)); border-color: var(--vata); }
.badge.P { background: color-mix(in srgb, var(--pitta) 16%, var(--card)); border-color: var(--pitta); }
.badge.K { background: color-mix(in srgb, var(--kapha) 16%, var(--card)); border-color: var(--kapha); }
.badge.V, .badge.P, .badge.K { color: var(--ink); }

.pill {
  display: inline-block;
  font-size: 0.85rem; font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- Buttons, inputs ---------- */
button, select, input, textarea { font: inherit; color: inherit; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn.primary { background: var(--forest); border-color: var(--forest); color: var(--on-accent); }
.btn.ghost { background: transparent; border: 1px solid var(--forest); color: var(--forest); }
.btn.danger { background: var(--clay); border-color: var(--clay); color: var(--on-accent); }
.btn-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.btn-row .btn { flex: 0 1 auto; }

button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 2px;
}

.search, input[type="text"], input[type="search"], input[type="date"], input[type="time"], input[type="number"], select {
  min-height: 48px;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  width: 100%;
  max-width: 100%;
}
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--forest); min-height: 0; }

.form-row { margin-bottom: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field > label, .field > span:first-child {
  font-weight: 700; font-size: 0.95rem;
}

/* ---------- Chips ---------- */
.chips {
  display: flex; gap: var(--space-2);
  overflow-x: auto;
  padding: 0.25rem 0 0.5rem;
  margin: 0 calc(-1 * var(--space-4)) 0;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.chip {
  flex: none;
  display: inline-flex; align-items: center;
  min-height: 48px;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.chip.on { background: var(--forest); border-color: var(--forest); color: var(--on-accent); }

/* ---------- Bottom tabs ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 10px rgba(88, 68, 40, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabs button {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  min-height: 60px;
  background: none; border: 0;
  padding: 0.4rem 0.25rem;
  color: var(--muted);
  font-size: 0.85rem; font-weight: 700;
  cursor: pointer;
  position: relative;
}
.tabs button .ico { display: flex; width: 24px; height: 24px; }
.tabs button .ico svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--forest); }
.tabs button[aria-current="page"]::after {
  content: "";
  position: absolute; bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--turmeric);
}

/* ---------- Hero art ---------- */
.card.hero { padding: 0 0 var(--space-5); overflow: hidden; }
.card.hero > :not(.hero-art) { margin-left: var(--space-5); margin-right: var(--space-5); }
.card.hero > .hero-art + * { margin-top: var(--space-4); }
.hero-art {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--turmeric) 28%, var(--paper)), var(--paper));
  display: block;
}
.hero-art svg { width: 100%; height: auto; display: block; }

/* gentle illustration animations */
@keyframes sunGlow {
  0%, 100% { filter: drop-shadow(0 0 2px var(--turmeric)); opacity: 0.9; }
  50% { filter: drop-shadow(0 0 12px var(--turmeric)); opacity: 1; }
}
@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}
@keyframes sway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(1.2deg); }
}
.hero-art .sun, .hero-art [data-part="sun"] { animation: sunGlow 12s ease-in-out infinite; transform-origin: center; }
.hero-art .birds, .hero-art [data-part="birds"] { animation: drift 16s ease-in-out infinite; }
.hero-art .field, .hero-art [data-part="field"] { animation: sway 20s ease-in-out infinite; transform-origin: bottom center; }

.illus { display: inline-flex; width: 2.4rem; height: 2.4rem; color: var(--forest); flex: none; }
.illus svg { width: 100%; height: 100%; }

/* ---------- Diya flicker ---------- */
@keyframes diyaFlicker {
  0%, 100% { opacity: 1; transform: scale(1); }
  25% { opacity: 0.85; transform: scale(0.97) rotate(-1deg); }
  50% { opacity: 1; transform: scale(1.04); }
  75% { opacity: 0.9; transform: scale(0.98) rotate(1deg); }
}
.diya { display: inline-flex; width: 1.8rem; height: 1.8rem; color: var(--clay); }
.diya svg { width: 100%; height: 100%; }
.slot.done .diya { animation: diyaFlicker 2.4s ease-in-out infinite; }

/* ---------- Meal slots ---------- */
.slot {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-4);
}
.slot.done { border-color: var(--kapha); background: color-mix(in srgb, var(--kapha) 8%, var(--card)); }
.slot.skipped { border-color: var(--clay); background: color-mix(in srgb, var(--clay) 6%, var(--card)); }
.slot-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: var(--space-2); }
.slot-time { font-weight: 700; color: var(--forest); font-variant-numeric: tabular-nums; }
.slot-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); }

/* ---------- Banner / daily ---------- */
.banner {
  background: color-mix(in srgb, var(--turmeric) 14%, var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: 0.95rem;
}
.banner.warn {
  background: color-mix(in srgb, var(--clay) 12%, var(--card));
  border-color: color-mix(in srgb, var(--clay) 50%, var(--line));
}
.daily {
  background: color-mix(in srgb, var(--kapha) 10%, var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-4);
}

/* ---------- Ring ---------- */
.ring { position: relative; width: 5rem; height: 5rem; flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring .illus { position: absolute; inset: 0; margin: auto; width: 2.2rem; height: 2.2rem; }

/* ---------- Foods ---------- */
.food {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
}
.food-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.food-head b { font-size: 1rem; }
.food-why {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
.food[hidden] .food-why, .food-why[hidden] { display: none; }

/* Food icon badge */
.fico {
  display: inline-flex;
  width: 28px; height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--turmeric) 22%, transparent);
  color: var(--ink);
}
.fico svg { width: 18px; height: 18px; }
.gitem .fico {
  display: inline-flex;
  width: 28px; height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  vertical-align: middle;
  margin-right: 8px;
}

/* V/P/K marks: symbol + text, not colour-only */
.marks { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.mark {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.85rem; font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.mark.fav { border-color: var(--kapha); color: var(--ink); }
.mark.mod { border-style: dashed; color: var(--muted); }
.mark.red { border-color: var(--clay); color: var(--clay); }
.mark.avoid { border-color: var(--clay); background: var(--clay); color: var(--on-accent); font-weight: 800; }

/* ---------- Learn: viruddha + sources ---------- */
.viruddha {
  border-left: 3px solid var(--turmeric);
  padding-left: var(--space-3);
  margin-bottom: var(--space-3);
}
.source { display: block; color: var(--muted); font-size: 0.9rem; font-style: italic; margin-top: var(--space-1); }

/* ---------- Bars (constitution %) ---------- */
.bars { display: flex; flex-direction: column; gap: var(--space-2); }
.bar {
  display: grid; grid-template-columns: 4.5rem 1fr 3.2rem;
  align-items: center; gap: var(--space-2);
  font-size: 0.95rem; font-weight: 700;
}
.bar > i { grid-column: 1; font-style: normal; }
.bar > span {
  grid-column: 2;
  display: block; height: 0.7rem; border-radius: 999px;
  background: var(--line);
  overflow: hidden; position: relative;
}
.bar > span::after { content: none; }
.bar > span > em { display: block; height: 100%; border-radius: 999px; }
.bar.V > span > em { background: var(--vata); }
.bar.P > span > em { background: var(--pitta); }
.bar.K > span > em { background: var(--kapha); }
.bar > b { grid-column: 3; font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Quiz ---------- */
.quiz { max-width: 560px; margin: 0 auto; }
.quiz-q { font-family: var(--font-head); font-weight: 400; font-size: 1.2rem; margin-bottom: var(--space-4); }
.answer {
  display: flex; align-items: center; gap: var(--space-3);
  width: 100%;
  min-height: 48px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.answer:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.answer.selected {
  border-color: var(--forest);
  box-shadow: 0 0 0 2px var(--forest);
  background: color-mix(in srgb, var(--forest) 8%, var(--card));
}
.answer input { flex: none; }

.progressbar {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.progressbar > i, .progressbar > span {
  display: block; height: 100%;
  background: var(--forest);
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* ---------- Chart ---------- */
.chart {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.chart svg { width: 100%; height: auto; display: block; }

/* ---------- Details ---------- */
.details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); padding: 0.25rem var(--space-3); }
.details > summary {
  cursor: pointer;
  min-height: 48px;
  display: flex; align-items: center;
  font-weight: 700;
  padding: var(--space-2) 0;
  list-style-position: inside;
}
.details[open] > summary { border-bottom: 1px dashed var(--line); margin-bottom: var(--space-2); }
.details > *:not(summary) { padding-bottom: var(--space-2); }

/* ---------- Empty ---------- */
.empty {
  text-align: center;
  color: var(--muted);
  padding: var(--space-6) var(--space-4);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(20, 16, 12, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 700px) {
  .overlay { align-items: center; padding: var(--space-6); }
}
.overlay-panel {
  background: var(--card);
  background-image: var(--grain);
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  max-height: 92vh;
  width: 100%; max-width: 560px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-5);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.2);
  animation: sheetUp 0.28s ease both;
}
@media (min-width: 700px) {
  .overlay-panel { border-radius: var(--radius); animation: fadeRise 0.25s ease both; }
}
@keyframes sheetUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: min(90vw, 480px);
  z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Entrance animations ---------- */
@keyframes fadeRise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeRise 250ms ease both; }

.stagger > * { animation: fadeRise 250ms ease both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }
.stagger > *:nth-child(7) { animation-delay: 360ms; }
.stagger > *:nth-child(8) { animation-delay: 420ms; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.brand-text { display:flex; flex-direction:column; line-height:1.1; } .brand-sub { font-size:0.85rem; color: var(--muted); font-family: 'Nunito Sans', system-ui, sans-serif; }
.verse { text-align:center; padding: 0.5rem 0; } .verse-dev { font-family: 'Tiro Devanagari Sanskrit', 'Noto Serif Devanagari', serif; font-size: 1.15rem; line-height: 1.7; color: var(--ink); } .verse-iast { font-style: italic; color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; } .verse-en { margin-top: 0.5rem; font-size: 1rem; } .verse-ref { margin-top: 0.35rem; font-size: 0.85rem; color: var(--forest); font-weight: 700; letter-spacing: .02em; } .verse-note { margin-top: 0.5rem; font-size: 0.95rem; color: var(--muted); }
.theme-line { font-family: 'Yatra One', Georgia, serif; color: var(--forest); font-size: 1.1rem; text-align:center; }
.attribution { font-size: 0.85rem; color: var(--muted); text-align:center; font-style: italic; }
.verse-strip { border-left: 3px solid var(--turmeric); padding: 0.4rem 0.75rem; margin-top: 0.75rem; font-size: 0.95rem; }
.mark b { font-weight: 800; margin-right: 0.2rem; }

.emblem { width: 10rem; height: 10rem; margin: 1rem auto 0.25rem; color: var(--forest); }
.emblem svg { width: 100%; height: 100%; }
.emblem .halo { animation: halo-glow 6s ease-in-out infinite; transform-origin: center; }
@keyframes halo-glow {
  0%,100% { opacity: .45; }
  50% { opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .emblem .halo { animation: none; }
}
.brand-mark { color: var(--forest); }

.card.hero > .emblem { margin-left: auto; margin-right: auto; }
.card.hero > .emblem + .card-title { text-align: center; font-size: 1.9rem; margin-top: 0.25rem; }
.brand-mark svg { width: 1.9rem; height: 1.9rem; }
.brand-line { display:flex; align-items:baseline; gap:0.4rem; flex-wrap:wrap; } .brand-meaning { font-size:0.85rem; color: var(--muted); font-style: italic; font-family: 'Nunito Sans', system-ui, sans-serif; } .name-meaning { text-align:center; font-style: italic; color: var(--muted); font-size: 0.95rem; margin-top: -0.25rem; }

.visually-hidden { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.type-pick select { min-height:48px; padding: 0.35rem 2rem 0.35rem 0.85rem; border-radius:999px; border:1.5px solid var(--line); background: var(--card); color: var(--ink); font: 700 0.9rem 'Nunito Sans', system-ui, sans-serif; cursor:pointer; max-width: 11rem; }
.type-pick select[data-type*="V"] { border-color: var(--vata); } .type-pick select[data-type="P"], .type-pick select[data-type="PK"] { border-color: var(--pitta); } .type-pick select[data-type="K"] { border-color: var(--kapha); }
.type-pick select:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }
.top { gap: 0.5rem; }

.to-top { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 48px; height: 48px; border-radius: 50%; border: none; background: var(--forest); color: var(--on-accent); font-size: 1.4rem; font-weight: 800; box-shadow: 0 6px 18px rgba(0,0,0,.18); cursor: pointer; z-index: 40; display: flex; align-items: center; justify-content: center; }
.to-top[hidden] { display: none !important; }
.to-top:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 3px; }
@media (min-width: 600px) { .to-top { right: calc(50% - 280px + 16px); } }

.details > summary { display:flex; align-items:center; gap:0.6rem; flex-wrap:wrap; }
.details > summary [lang='sa'] { font-family: 'Tiro Devanagari Sanskrit', serif; color: var(--muted); }

.chew-card { margin-top: 1rem; text-align: left; border-left: 3px solid var(--turmeric); }
.chew-card ul { margin: 0.4rem 0 0.6rem 1.1rem; }

/* ---------- Order online (Swiggy / Zomato search links) ---------- */
.order-list { padding-left: 0; list-style: none; }
.order-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px dashed var(--line); }
.order-item:last-child { border-bottom: 0; }
.order-item > :first-child { flex: 1 1 10rem; }
.order-links { display: flex; gap: var(--space-2); }
.order-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 48px; padding: 0.3rem 0.9rem;
  border-radius: 999px; border: 1px solid var(--forest);
  color: var(--forest); font-weight: 700; font-size: 0.9rem; text-decoration: none;
  white-space: nowrap;
}
.order-btn:hover, .order-btn:focus-visible { background: var(--forest); color: var(--on-accent); }
.order-note { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.order-note-text {
  margin: 0; width: 100%; padding: var(--space-3);
  border: 1px dashed var(--forest); border-radius: var(--radius-sm);
  background: var(--paper); font-weight: 600;
  user-select: all; -webkit-user-select: all;
}

/* ---------- Recipes ---------- */
.recipe-btn { align-self: flex-start; }
.recipe-title { font-size: 1.3rem; margin: 0; }
.recipe-adjust { background: var(--paper); border: 1px dashed var(--forest); border-radius: var(--radius-sm); padding: var(--space-3); }
.recipe-adjust ul { margin: 0 0 var(--space-2); padding-left: 1.1rem; }
.recipe-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-bottom: var(--space-2); }
.recipe-grid .chip { flex: 0 1 auto; max-width: 100%; white-space: normal; text-align: left; }
.cook-list { list-style: none; padding: 0; margin: 0; }
.cook-check { display: flex; gap: var(--space-3); align-items: flex-start; min-height: 48px; padding: var(--space-2) 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.cook-check input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--forest); }
.cook-check input:checked + span { text-decoration: line-through; color: var(--muted); }

/* ---------- Recipes tab ---------- */
.recipe-list { display: flex; flex-direction: column; gap: var(--space-2); }
.recipe-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  min-height: 48px; padding: var(--space-3); text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink);
}
.recipe-row:hover, .recipe-row:focus-visible { border-color: var(--forest); }
.recipe-row-name { font-weight: 700; }
/* Six tabs: tighten labels on small phones */
/* Six tabs: size each tab to its label (min 48px tap target) and tighten labels on small phones */
.tabs button { flex: 1 1 auto; min-width: 48px; }
/* Bottom-bar labels keep a fixed readable size: the text-size setting enlarges content, not the nav,
   so six labels always fit on small phones. */
.tabs button { font-size: clamp(14.5px, 0.85rem, 15.5px); }
@media (max-width: 400px) { .tabs button { font-size: 14.5px; padding-left: 0; padding-right: 0; } }

/* ---------- Dish advice ---------- */
.dish-advice { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-2); background: var(--card); }
.dish-name { margin: 0; font-size: 1.15rem; }
.verdicts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.verdict { padding: 0.4rem 0.7rem; border-radius: var(--radius-sm); border-left: 4px solid var(--line); background: var(--paper); }
.verdict.vgood { border-left-color: var(--neem); }
.verdict.vok { border-left-color: var(--turmeric); }
.verdict.vbad { border-left-color: var(--clay); }
.verdict.vavoid { border-left: 6px solid var(--clay); font-weight: 700; color: var(--ink); }
.swap { border-top: 1px dashed var(--line); padding-top: var(--space-2); }
.lookup-result { border-left: 4px solid var(--indigo); background: var(--paper); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.lookup-result p { margin: 0 0 var(--space-2); }
.lookup-result p:last-child { margin-bottom: 0; }
/* ---------- Header actions: dosha select + Me button ---------- */
.top-actions { display: flex; align-items: center; gap: 0.4rem; flex: none; }
.me-btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; flex: none; }
.me-btn .ico, .me-btn svg { width: 24px; height: 24px; display: flex; }
.me-btn[aria-current="page"] { color: var(--forest); border-color: var(--forest); }
.me-btn:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }
.top .brand { flex: 1 1 auto; min-width: 0; overflow: hidden; }
@media (max-width: 400px) { .brand-meaning { display: none; } .type-pick select { width: 7.2rem; max-width: 7.2rem; } }
@media (max-width: 360px) { .brand-sub { display: none; } .top .brand { gap: 0.35rem; } .top .brand h1 { font-size: 1rem; } .type-pick select { width: 6.6rem; max-width: 6.6rem; padding-left: 0.7rem; padding-right: 1.6rem; } }

/* ---------- Seasons (Ritucharya) & Read aloud ---------- */
.season-card { border-left: 5px solid var(--turmeric); }
.season-tip { margin: 0; }
.speak-btn[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--on-accent); }
