:root {
  color-scheme: dark;
  --bg: #101514;
  --surface: #18211e;
  --surface-soft: #1e2925;
  --ink: #edf5ef;
  --muted: #99aaa0;
  --green: #8bd4a5;
  --green-dark: #183b30;
  --orange: #f1aa79;
  --line: #2b3933;
  --highlight: #20392b;
  --shadow: 0 16px 38px rgba(0, 0, 0, .28);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101514; --surface: #18211e; --surface-soft: #1e2925;
    --ink: #edf5ef; --muted: #99aaa0; --green: #8bd4a5;
    --green-dark: #183b30; --orange: #f1aa79; --line: #2b3933;
    --highlight: #20392b; --shadow: 0 16px 38px rgba(0,0,0,.28);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101514; --surface: #18211e; --surface-soft: #1e2925;
  --ink: #edf5ef; --muted: #99aaa0; --green: #8bd4a5;
  --green-dark: #183b30; --orange: #f1aa79; --line: #2b3933;
  --highlight: #20392b; --shadow: 0 16px 38px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 12% 0%, rgba(205, 125, 79, .11), transparent 32%), radial-gradient(ellipse at 92% 8%, rgba(91, 174, 124, .16), transparent 38%), var(--bg);
  color: var(--ink);
  font-family: Tahoma, Vazirmatn, "Noto Sans Arabic", "Noto Naskh Arabic", "Segoe UI", system-ui, sans-serif;
  line-height: 1.8;
}
.w { width: min(100%, 780px); margin: 0 auto; padding: 26px 22px 38px; }
.hero { padding: 14px 4px 24px; animation: page-enter .65s cubic-bezier(.2,.75,.25,1) both; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 14px; background: var(--green); color: #fff; font-size: 21px;
  box-shadow: 0 7px 18px rgba(91, 174, 124, .18);
}
h1 { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .02em; margin: 0; }
.date { font-size: clamp(22px, 5vw, 29px); font-weight: 800; line-height: 1.45; margin: 9px 0 0; letter-spacing: -.035em; }
.today-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 19px 20px; margin-bottom: 0; box-shadow: var(--shadow);
  transition: transform .38s cubic-bezier(.2,.75,.25,1), box-shadow .38s ease, border-color .3s ease;
}
.meal-card { min-height: 142px; animation: card-enter .68s cubic-bezier(.2,.75,.25,1) both; }
.meal-card:nth-child(1) { animation-delay: .08s; }
.meal-card:nth-child(2) { animation-delay: .16s; }
.meal-card::before { content: ""; position: absolute; right: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 4px 0 0 4px; background: var(--orange); }
.dinner-card::before { background: var(--green); }
.lab { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--orange); font-weight: 800; margin-bottom: 12px; }
.dinner-card .lab { color: var(--green); }
.food { font-size: 20px; line-height: 1.65; font-weight: 800; }
.note { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 8px; }
.next-card {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(110px, .65fr) 1fr; align-items: center;
  gap: 8px 18px; background: var(--green-dark); border-color: transparent; color: #fff; padding: 17px 20px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .26);
  animation: card-enter .72s cubic-bezier(.2,.75,.25,1) .24s both;
  transition: transform .4s cubic-bezier(.2,.75,.25,1), box-shadow .4s ease, border-color .3s ease;
}
.next-card::after {
  content: ""; position: absolute; left: -38px; top: -68px; width: 166px; height: 166px;
  border: 1px solid rgba(139, 212, 165, .13); border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(139, 212, 165, .035), 0 0 0 38px rgba(139, 212, 165, .025);
  pointer-events: none;
  transition: transform .65s cubic-bezier(.2,.75,.25,1), opacity .45s ease;
}
.next-card .lab { color: #d7ead7; margin: 0; }
.next-card .food { font-size: 14px; font-weight: 600; line-height: 1.75; }
.next-meals { display: grid; gap: 3px; }
.tabs { display: flex; gap: 5px; padding: 5px; margin: 25px 0 13px; border-radius: 14px; background: var(--surface-soft); border: 1px solid var(--line); }
.tabs button {
  flex: 1; min-height: 43px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.tabs button:hover { color: var(--green); }
.tabs button.on { color: #fff; background: var(--green); box-shadow: 0 4px 13px rgba(91,174,124,.22); }
.tabs button:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--orange) 55%, transparent); outline-offset: 2px; }
#full > .note { font-size: 14px; color: var(--green); font-weight: 800 !important; margin: 20px 3px 8px !important; }
.sc { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 16px rgba(0,0,0,.12); }
table { width: 100%; min-width: 490px; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
th { position: sticky; top: 0; color: var(--muted); font-weight: 700; background: var(--surface-soft); }
tbody tr:last-child td, table tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even):not(.today) td { background: color-mix(in srgb, var(--surface) 82%, var(--surface-soft)); }
tr.today td { background: var(--highlight); }
tr.today td:first-child { color: var(--green); }
td:first-child { white-space: nowrap; font-weight: 800; }
td .note { margin-top: 3px; font-size: 11px; }
#full .sc + .note { margin-top: 20px; }
#full .sc { margin-bottom: 5px; animation: section-enter .58s cubic-bezier(.2,.75,.25,1) both; }
#full .sc:nth-of-type(2) { animation-delay: .06s; }
#full .sc:nth-of-type(4) { animation-delay: .12s; }
#full .sc:nth-of-type(6) { animation-delay: .18s; }
#full .sc:nth-of-type(8) { animation-delay: .24s; }
#full .sc tr { transition: background-color .22s ease; animation: row-enter .38s ease both; }
#full .sc tbody tr:nth-child(1) { animation-delay: .08s; }
#full .sc tbody tr:nth-child(2) { animation-delay: .12s; }
#full .sc tbody tr:nth-child(3) { animation-delay: .16s; }
#full .sc tbody tr:nth-child(4) { animation-delay: .20s; }
#full .sc tbody tr:nth-child(5) { animation-delay: .24s; }
#full .sc tbody tr:nth-child(6) { animation-delay: .28s; }
#full .sc tbody tr:nth-child(7) { animation-delay: .32s; }
@keyframes page-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes card-enter { from { opacity: 0; transform: translateY(17px) scale(.985); filter: blur(3px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes section-enter { from { opacity: 0; transform: translateY(11px); } to { opacity: 1; transform: translateY(0); } }
@keyframes row-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (hover: hover) and (pointer: fine) {
  .meal-card:hover, .meal-card:focus-within { transform: translateY(-5px) scale(1.012); border-color: color-mix(in srgb, var(--green) 48%, var(--line)); box-shadow: 0 20px 42px rgba(0,0,0,.32); }
  .meal-card:hover::before { transform: scaleY(1.2); }
  .next-card:hover, .next-card:focus-within { transform: translateY(-4px); border-color: color-mix(in srgb, var(--green) 42%, transparent); box-shadow: 0 22px 44px rgba(0,0,0,.34); }
  .next-card:hover::after { transform: scale(1.08) translate(-3px, 3px); }
}
.meal-card::before { transition: transform .35s cubic-bezier(.2,.75,.25,1); transform-origin: center; }
.diet { margin-top: 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); color: var(--muted); font-size: 12px; line-height: 1.9; }
.diet::before { content: "پیشنهادهای سبک‌تر"; display: block; color: var(--green); font-size: 13px; font-weight: 800; margin-bottom: 3px; }
select { font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
#set { margin-top: 12px; }
#set select { margin-top: 8px; }
.hid { display: none; }
@media (max-width: 560px) {
  .w { padding: 17px 15px 28px; }
  .hero { padding: 9px 3px 19px; }
  .today-grid { gap: 10px; }
  .card { border-radius: 17px; padding: 16px; }
  .meal-card { min-height: 138px; }
  .food { font-size: 17px; }
  .next-card { grid-template-columns: 1fr; gap: 5px; padding: 15px 17px; }
  .next-card .food { font-size: 13px; }
  .tabs { margin-top: 20px; }
  th, td { padding: 9px 10px; }
}
@media (max-width: 370px) {
  .today-grid { grid-template-columns: 1fr; }
  .meal-card { min-height: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

/* طرح دوم: سرمه‌ای شبانه با درخشش فیروزه‌ای و بنفش */
:root {
  color-scheme: dark;
  --bg: #0b101c;
  --surface: #131d2e;
  --surface-soft: #18243a;
  --ink: #edf4ff;
  --muted: #91a2bd;
  --green: #62e8dc;
  --green-dark: #202b52;
  --orange: #b99cff;
  --line: #27354e;
  --highlight: #172d3b;
  --shadow: 0 17px 40px rgba(0,0,0,.3);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b101c; --surface: #131d2e; --surface-soft: #18243a;
    --ink: #edf4ff; --muted: #91a2bd; --green: #62e8dc;
    --green-dark: #202b52; --orange: #b99cff; --line: #27354e;
    --highlight: #172d3b; --shadow: 0 17px 40px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b101c; --surface: #131d2e; --surface-soft: #18243a;
  --ink: #edf4ff; --muted: #91a2bd; --green: #62e8dc;
  --green-dark: #202b52; --orange: #b99cff; --line: #27354e;
  --highlight: #172d3b; --shadow: 0 17px 40px rgba(0,0,0,.3);
}
body {
  background: radial-gradient(ellipse at 7% 1%, rgba(185,156,255,.16), transparent 31%),
    radial-gradient(ellipse at 94% 11%, rgba(98,232,220,.13), transparent 34%), var(--bg);
}
.hero {
  position: relative; padding: 19px 20px 20px; margin: 10px 0 15px;
  border: 1px solid var(--line); border-radius: 23px;
  background: linear-gradient(125deg, rgba(98,232,220,.075), rgba(185,156,255,.07) 58%, rgba(19,29,46,.4));
  box-shadow: 0 14px 32px rgba(0,0,0,.14);
}
.brand-mark {
  color: #0b1420; border-radius: 50%;
  background: linear-gradient(145deg, var(--green), #9ef2d9);
  box-shadow: 0 0 0 5px rgba(98,232,220,.08), 0 8px 24px rgba(98,232,220,.2);
}
.date { color: #eaf5ff; }
.card { border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.025), transparent 55%), var(--surface); }
.meal-card { border-color: color-mix(in srgb, var(--line) 75%, var(--orange)); }
.dinner-card { border-color: color-mix(in srgb, var(--line) 72%, var(--green)); }
.meal-card::before { width: 3px; border-radius: 4px 0 0 4px; box-shadow: 0 0 13px color-mix(in srgb, var(--orange) 60%, transparent); }
.dinner-card::before { box-shadow: 0 0 13px color-mix(in srgb, var(--green) 60%, transparent); }
.lab { letter-spacing: .01em; }
.next-card {
  background: linear-gradient(118deg, #26305b 0%, #192740 62%, #123b43 100%);
  border: 1px solid rgba(139,193,220,.18);
}
.next-card::after {
  border-color: rgba(98,232,220,.2);
  box-shadow: 0 0 0 18px rgba(98,232,220,.045), 0 0 0 38px rgba(185,156,255,.035);
}
.next-card .lab { color: #86eee3; }
.tabs { border-radius: 16px; background: rgba(24,36,58,.8); }
.tabs button.on {
  color: #08161c; background: linear-gradient(135deg, #62e8dc, #8ee7d3);
  box-shadow: 0 5px 18px rgba(98,232,220,.2);
}
#full > .note { color: #c4aaff; }
.sc { border-color: var(--line); background: var(--surface); }
th { background: #1a2740; }
tbody tr:nth-child(even):not(.today) td { background: color-mix(in srgb, var(--surface) 68%, var(--surface-soft)); }
tr.today td { background: linear-gradient(90deg, rgba(98,232,220,.12), rgba(98,232,220,.055)); }
tr.today td:first-child { color: var(--green); }
.diet { border-color: color-mix(in srgb, var(--line) 72%, var(--orange)); background: linear-gradient(120deg, rgba(185,156,255,.06), transparent 70%), var(--surface-soft); }
.diet::before { color: var(--orange); }
@media (hover: hover) and (pointer: fine) {
  .meal-card:hover, .meal-card:focus-within {
    box-shadow: 0 22px 48px rgba(0,0,0,.4), 0 0 0 1px rgba(98,232,220,.08);
  }
}
@media (max-width: 560px) {
  .hero { padding: 16px 16px 17px; margin-top: 5px; }
}

/* طرح سوم: مینیمال، روشن و آرام */
:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-soft: #eef3ee;
  --ink: #24332b;
  --muted: #78867d;
  --green: #3e7955;
  --green-dark: #e9f1e9;
  --orange: #b8744e;
  --line: #dfe7e0;
  --highlight: #edf5ee;
  --shadow: 0 8px 24px rgba(36, 62, 44, .055);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: light;
    --bg: #f5f7f4; --surface: #ffffff; --surface-soft: #eef3ee;
    --ink: #24332b; --muted: #78867d; --green: #3e7955;
    --green-dark: #e9f1e9; --orange: #b8744e; --line: #dfe7e0;
    --highlight: #edf5ee; --shadow: 0 8px 24px rgba(36,62,44,.055);
  }
}
:root[data-theme="dark"] {
  color-scheme: light;
  --bg: #f5f7f4; --surface: #ffffff; --surface-soft: #eef3ee;
  --ink: #24332b; --muted: #78867d; --green: #3e7955;
  --green-dark: #e9f1e9; --orange: #b8744e; --line: #dfe7e0;
  --highlight: #edf5ee; --shadow: 0 8px 24px rgba(36,62,44,.055);
}
body {
  background: radial-gradient(ellipse at 85% -12%, rgba(105,157,115,.09), transparent 34%), var(--bg);
}
.hero {
  padding: 12px 4px 20px; margin: 4px 0 18px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; box-shadow: none;
}
.brand-mark {
  color: var(--green); border: 1px solid #d9e7da; border-radius: 13px;
  background: #eaf2e9; box-shadow: none;
}
.date { color: var(--ink); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 5px 18px rgba(36,62,44,.035);
}
.meal-card { border-color: var(--line); }
.meal-card::before { width: 3px; border-radius: 3px 0 0 3px; box-shadow: none; }
.dinner-card::before { box-shadow: none; }
.lab { font-size: 12px; }
.next-card {
  color: var(--ink); background: var(--green-dark); border: 1px solid #dce8dc;
  box-shadow: 0 5px 18px rgba(36,62,44,.045);
}
.next-card::after {
  border-color: rgba(62,121,85,.12);
  box-shadow: 0 0 0 18px rgba(62,121,85,.025), 0 0 0 38px rgba(62,121,85,.018);
}
.next-card .lab { color: var(--green); }
.next-card .food { color: var(--ink); }
.tabs { border-radius: 12px; background: var(--surface-soft); border-color: var(--line); }
.tabs button.on {
  color: #fff; background: var(--green); box-shadow: 0 3px 9px rgba(62,121,85,.15);
}
#full > .note { color: var(--green); }
.sc { border-color: var(--line); background: var(--surface); box-shadow: 0 4px 14px rgba(36,62,44,.035); }
th { background: #f3f6f2; }
tbody tr:nth-child(even):not(.today) td { background: #fafcf9; }
tr.today td { background: var(--highlight); }
tr.today td:first-child { color: var(--green); }
.diet { border-color: var(--line); background: var(--surface-soft); }
.diet::before { color: var(--green); }
@media (hover: hover) and (pointer: fine) {
  .meal-card:hover, .meal-card:focus-within {
    transform: translateY(-3px); border-color: #c7d9cb;
    box-shadow: 0 12px 25px rgba(36,62,44,.09);
  }
  .next-card:hover, .next-card:focus-within {
    transform: translateY(-3px); border-color: #c7d9cb;
    box-shadow: 0 12px 25px rgba(36,62,44,.09);
  }
  .next-card:hover::after { transform: scale(1.04); }
}
@media (max-width: 560px) {
  .hero { padding: 9px 3px 16px; margin-top: 0; }
}
