/* Training environment selector extends the existing program generator. */
.training-environment { margin-bottom: 22px; }
.training-environment-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.training-environment-option { display: grid; justify-items: start; align-content: start; gap: 7px; min-width: 0; text-align: start; cursor: pointer; border: 1px solid var(--line); border-radius: 17px; padding: 18px; background: var(--panel-2); }
.training-environment-option.active { border-color: var(--aqua); box-shadow: inset 0 -3px var(--aqua); }
.training-environment-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(87,230,193,.08); color: var(--aqua); }
.training-environment-icon svg { width: 23px; height: 23px; }
.training-environment-option strong { font-size: 1rem; }
.training-environment-option small { color: var(--muted); line-height: 1.9; }
.training-environment-state { margin-top: 6px; font-size: .8rem; color: var(--aqua); }
.training-environment-summary { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.training-environment-summary p, .training-environment-summary small { color: var(--muted); }
.training-environment-summary p { margin: 8px 0; }
.training-environment-running { border-inline-start: 3px solid var(--aqua); padding: 10px 13px; background: var(--panel-2); border-radius: 8px; font-size: .88rem; }
@media (max-width: 700px) {
  .training-environment .card-head { display: block; }
  .training-environment .card-head .pill { display: inline-flex; margin-top: 10px; }
  .training-environment-options { grid-template-columns: 1fr; gap: 10px; }
  .training-environment-option { grid-template-columns: 42px 1fr; column-gap: 12px; padding: 14px; }
  .training-environment-icon { grid-row: 1 / 4; }
  .training-environment-option strong, .training-environment-option small, .training-environment-state { grid-column: 2; }
  .training-environment-state { margin-top: 0; }
}

/* Shared palette; rival components use the same tokens as the main app. */
:root {
  color-scheme: dark;
  --ink: #eff7f1;
  --muted: #9aaba1;
  --dim: #718078;
  --bg: #07100c;
  --panel: #0d1913;
  --panel-2: #122119;
  --line: #24352b;
  --acid: #c7ff4a;
  --acid-ink: #101904;
  --aqua: #57e6c1;
  --blue: #7bb9ff;
  --amber: #ffcb66;
  --red: #ff7a7a;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  font-family: Vazirmatn, IRANSansX, Tahoma, "Segoe UI", sans-serif;
  font-synthesis: none;
}

.account-entry { min-height: 100svh; display: grid; place-items: center; padding: 26px 14px; }
.account-card { width: min(100%, 490px); }
.account-card h1 { font-size: clamp(1.5rem, 5vw, 2rem); margin: 25px 0 8px; }
.account-card > p { color: var(--muted); }
.account-tabs { display: flex; gap: 8px; margin: 22px 0; }
.account-tabs > button { flex: 1; }
.account-form { display: grid; gap: 15px; }
.account-file-actions { display: grid; gap: 12px; margin-top: 24px; }
.account-file-actions > a { white-space: normal; text-align: center; }
.account-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); line-height: 1.9; }
.account-consent input { margin-top: 7px; flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--acid); }
.account-message { min-height: 1.7em; overflow-wrap: anywhere; }
.account-bar { position: relative; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 9px 24px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: .82rem; }
.account-bar > div { margin-inline-start: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.account-bar > span { overflow-wrap: anywhere; min-width: 0; }
#account-chrome:has(.account-bar) ~ .app-shell .sidebar { padding-top: 80px; }
.account-conflict { display: block; margin: 12px; }
.account-conflict p { margin-top: 0; }
#account-legacy-list button { margin-block: 6px; max-width: 100%; white-space: normal; }
@media (max-width: 620px) {
  .account-bar { padding: 9px 12px; gap: 4px 10px; }
  .account-bar > span:nth-child(2) { width: 100%; order: 3; }
  .account-bar .btn { padding: 7px 8px; font-size: .72rem; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 5%, rgba(199, 255, 74, 0.11), transparent 23rem),
    radial-gradient(circle at 5% 75%, rgba(87, 230, 193, 0.08), transparent 28rem),
    var(--bg);
  font-size: 16px;
  line-height: 1.65;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: var(--aqua); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(199, 255, 74, 0.65); outline-offset: 3px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; }

.sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: 270px;
  padding: 24px 18px;
  border-inline-end: 1px solid var(--line);
  background: rgba(7, 16, 12, 0.87);
  backdrop-filter: blur(18px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--acid); color: var(--acid-ink);
  box-shadow: 0 0 0 7px rgba(199, 255, 74, 0.07);
}
.brand strong { font-size: 1.2rem; }
.brand small { color: var(--muted); display: block; font-size: .74rem; margin-top: -2px; }

.profile-switcher {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
}
.profile-switcher select {
  width: 100%; border: 0; background: transparent; color: var(--ink);
  padding: 7px 6px; outline: 0; cursor: pointer;
}
.profile-switcher option { background: #122019; }

.nav-list { display: grid; gap: 7px; }
.nav-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 48px;
  padding: 10px 13px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: right;
  transition: .18s ease;
}
.nav-button:hover { color: var(--ink); background: rgba(255,255,255,.035); transform: translateX(-2px); }
.nav-button.active { color: var(--ink); background: var(--panel-2); box-shadow: inset -3px 0 var(--acid); }
.nav-button svg { width: 21px; height: 21px; flex: 0 0 auto; }
.sidebar-footer { margin-top: auto; display: grid; gap: 8px; }

.main { grid-column: 2; width: 100%; min-width: 0; padding: 28px clamp(22px, 4vw, 58px) 70px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.eyebrow { color: var(--aqua); font-size: .78rem; font-weight: 800; letter-spacing: .03em; }
.topbar h1 { margin: 2px 0 0; font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.3; }
.top-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 17px;
  min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
  text-decoration: none;
  font-weight: 750;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--acid); color: var(--acid-ink); }
.btn-primary:hover { background: #d5ff76; }
.btn-secondary { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-danger { background: rgba(255, 122, 122, .1); border-color: rgba(255,122,122,.25); color: #ffabab; }
.btn-sm { min-height: 38px; padding: 7px 12px; font-size: .88rem; }
.btn-block { width: 100%; }
.icon-btn { width: 44px; padding: 0; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }

.card {
  background: linear-gradient(145deg, rgba(18, 33, 25, .96), rgba(11, 23, 17, .96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
}
.card-flat { box-shadow: none; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.card-head h2, .card-head h3 { margin: 0; line-height: 1.4; }
.card-head h2 { font-size: 1.15rem; }
.card-head h3 { font-size: 1rem; }
.card-head p { color: var(--muted); margin: 3px 0 0; font-size: .88rem; }

.hero-card {
  padding: clamp(22px, 4vw, 36px);
  min-height: 280px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: 28px;
  overflow: hidden;
  position: relative;
}
.hero-card::after {
  content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  inset-inline-end: -170px; inset-block-start: -170px;
  background: radial-gradient(circle, rgba(199,255,74,.22), transparent 66%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.hero-copy h2 { font-size: clamp(1.55rem, 3vw, 2.45rem); line-height: 1.35; margin: 7px 0 10px; }
.hero-copy p { color: var(--muted); max-width: 52ch; margin: 0 0 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.week-ring { display: grid; place-items: center; position: relative; z-index: 1; }
.ring {
  --p: 0deg;
  width: min(190px, 42vw); aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(var(--acid) var(--p), rgba(255,255,255,.07) 0);
  display: grid; place-items: center;
  box-shadow: 0 0 52px rgba(199,255,74,.08);
}
.ring::before { content: ""; width: 76%; aspect-ratio: 1; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); }
.ring-label { position: absolute; text-align: center; }
.ring-label strong { display: block; font-size: 2.1rem; line-height: 1.1; }
.ring-label span { font-size: .8rem; color: var(--muted); }

.stat-card { position: relative; overflow: hidden; }
.stat-label { color: var(--muted); font-size: .83rem; display: flex; align-items: center; justify-content: space-between; }
.stat-value { font-size: clamp(1.3rem, 2.5vw, 1.85rem); font-weight: 900; margin: 8px 0 2px; line-height: 1.2; }
.stat-note { color: var(--dim); font-size: .77rem; }
.metric-accent { color: var(--acid); }
.metric-aqua { color: var(--aqua); }
.metric-blue { color: var(--blue); }
.metric-amber { color: var(--amber); }

.progress-track { height: 8px; border-radius: 99px; background: rgba(255,255,255,.065); overflow: hidden; margin-top: 12px; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--acid); }

.section { margin-top: 22px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 13px; }
.section-title h2 { margin: 0; font-size: 1.18rem; }
.section-title p { margin: 0; color: var(--muted); font-size: .85rem; }

.workout-row, .meal-row, .checkin-row {
  display: grid; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.workout-row:last-child, .meal-row:last-child, .checkin-row:last-child { border-bottom: 0; }
.workout-row { grid-template-columns: auto 1fr auto; }
.checkin-row { grid-template-columns: minmax(0, 1fr) repeat(4, auto); }
.checkin-row > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .checkin-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkin-row > div { grid-column: 1 / -1; }
  .checkin-row .pill { justify-self: start; }
}
.day-badge { width: 45px; height: 45px; border-radius: 14px; display: grid; place-items: center; background: rgba(199,255,74,.1); color: var(--acid); font-weight: 900; }
.workout-row.done .day-badge { color: var(--acid-ink); background: var(--acid); }
.row-main strong { display: block; }
.row-main small { color: var(--muted); font-size: .78rem; }
.status-pill, .pill {
  border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--muted);
  border-radius: 999px; padding: 5px 10px; font-size: .75rem; white-space: nowrap;
}
.pill-acid { color: var(--acid); border-color: rgba(199,255,74,.28); background: rgba(199,255,74,.08); }
.pill-aqua { color: var(--aqua); border-color: rgba(87,230,193,.25); background: rgba(87,230,193,.07); }

.coach-note { border-inline-start: 3px solid var(--aqua); padding: 4px 14px 4px 0; }
.coach-note p { color: var(--muted); margin: 4px 0 0; }

.budget-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: rgba(255,255,255,.035); padding: 6px; border-radius: 16px; }
.budget-tab { border: 0; border-radius: 11px; padding: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.budget-tab.active { background: var(--acid); color: var(--acid-ink); font-weight: 900; }
.meal-row { grid-template-columns: minmax(80px, .4fr) minmax(0, 1.7fr) auto; }
.meal-row .meal-time { color: var(--aqua); font-weight: 800; }
.meal-row p { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }
.macro-dots { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.macro-dots span { font-size: .72rem; color: var(--dim); }
.macro-dots i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 4px; background: var(--acid); }

.training-day { padding: 0; overflow: hidden; }
.training-day summary { list-style: none; cursor: pointer; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.training-day summary::-webkit-details-marker { display: none; }
.training-day[open] summary { border-bottom: 1px solid var(--line); }
.training-title { display: flex; align-items: center; gap: 12px; }
.training-content { padding: 6px 20px 18px; }
.exercise { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); align-items: start; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.exercise:last-child { border-bottom: 0; }
.exercise small { display: block; color: var(--muted); }
.sets { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; color: var(--acid); font-weight: 900; direction: rtl; text-align: right; }
.sets small { color: var(--acid); font-size: .82rem; font-weight: 600; line-height: 1.9; }
@media (max-width: 620px) {
  .exercise { grid-template-columns: minmax(0, 1fr); gap: 7px; }
}
.training-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; }

.chart-wrap { min-height: 250px; padding-top: 8px; }
.chart { width: 100%; height: 230px; overflow: visible; }
.chart-grid { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--acid); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#areaGradient); }
.chart-dot { fill: var(--panel); stroke: var(--acid); stroke-width: 3; }
.chart-label { fill: var(--muted); font: 12px Tahoma, sans-serif; }
.empty-state { text-align: center; padding: 42px 20px; }
.empty-state .empty-icon { width: 60px; height: 60px; border-radius: 20px; background: rgba(199,255,74,.09); color: var(--acid); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-state h3 { margin: 0 0 7px; }
.empty-state p { color: var(--muted); max-width: 46ch; margin: 0 auto 18px; }

.insight-list { display: grid; gap: 10px; }
.insight { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.025); padding: 13px; border-radius: 15px; }
.insight-icon { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px; background: rgba(87,230,193,.1); color: var(--aqua); display: grid; place-items: center; font-weight: 900; }
.insight p { margin: 2px 0 0; color: var(--muted); font-size: .84rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { font-size: .86rem; font-weight: 800; }
.field small { color: var(--muted); font-size: .74rem; }
.field small { line-height: 1.9; }
.checkin-guide { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 20px; background: var(--panel-2); }
.checkin-guide summary { cursor: pointer; font-weight: 800; color: var(--aqua); }
.checkin-guide p { font-size: .85rem; color: var(--muted); margin-bottom: 0; }
.jalali-date-input { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.jalali-picker { border: 1px solid var(--line); border-radius: 13px; padding: 10px; background: var(--panel-2); }
.jalali-picker summary { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--aqua); font-size: .86rem; }
.jalali-picker summary svg { width: 19px; height: 19px; }
.jalali-controls { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 6px; margin: 12px 0; }
.jalali-controls .select { padding-inline: 6px; }
.jalali-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; margin-bottom: 9px; }
.jalali-weekday { font-size: .8rem; color: var(--muted); padding: 4px; }
.jalali-days button { min-width: 0; min-height: 40px; border-radius: 9px; border: 1px solid transparent; color: var(--ink); background: transparent; cursor: pointer; font: inherit; }
.jalali-days button:hover, .jalali-days button:focus-visible { border-color: var(--aqua); outline: 2px solid var(--aqua); outline-offset: 1px; }
.jalali-days button[aria-current="date"] { border-color: var(--aqua); }
.jalali-days button[aria-pressed="true"] { background: var(--acid); color: var(--acid-ink); font-weight: 900; }
@media (max-height: 450px) {
  .ai-modal-head { padding: 7px 12px; }
  .ai-modal-head .ai-orb { width: 34px; height: 34px; }
  .ai-modal-head h2 { font-size: 1.1rem; }
  .ai-options { padding-block: 4px; }
  .ai-send-notice { font-size: .67rem; }
  .ai-welcome { padding: 8px; }
}
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: #0a1610; color: var(--ink);
  border-radius: 13px; min-height: 47px; padding: 10px 12px; outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { min-height: 86px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(199,255,74,.65); box-shadow: 0 0 0 4px rgba(199,255,74,.07); }

.segmented { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: grid; place-items: center; min-height: 49px; text-align: center;
  border: 1px solid var(--line); border-radius: 13px; color: var(--muted); cursor: pointer;
  background: #0a1610; padding: 8px;
}
.choice input:checked + label { border-color: var(--acid); background: rgba(199,255,74,.1); color: var(--acid); font-weight: 850; }

.notice { display: flex; gap: 11px; align-items: flex-start; border: 1px solid rgba(255,203,102,.22); background: rgba(255,203,102,.07); color: #ffe1a2; padding: 13px 15px; border-radius: 15px; font-size: .83rem; }
.notice svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; }
.notice p { margin: 0; }

.onboarding-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(520px, 1.25fr); }
.onboarding-aside { padding: clamp(32px, 7vw, 86px); display: flex; flex-direction: column; justify-content: space-between; border-inline-end: 1px solid var(--line); position: relative; overflow: hidden; }
.onboarding-aside::before { content: ""; width: 420px; height: 420px; border: 1px solid rgba(199,255,74,.15); border-radius: 50%; position: absolute; inset-inline-start: -210px; inset-block-end: -160px; box-shadow: 0 0 0 65px rgba(199,255,74,.025), 0 0 0 130px rgba(199,255,74,.015); }
.onboarding-aside h1 { font-size: clamp(2.2rem, 5vw, 5.4rem); line-height: 1.12; letter-spacing: -.04em; max-width: 8ch; margin: 38px 0 18px; }
.onboarding-aside h1 span { color: var(--acid); }
.onboarding-aside p { color: var(--muted); max-width: 46ch; }
.aside-points { display: grid; gap: 12px; margin-top: 30px; }
.aside-point { display: flex; align-items: center; gap: 10px; color: #c7d2cb; }
.aside-point i { width: 24px; height: 24px; border-radius: 8px; background: rgba(199,255,74,.1); color: var(--acid); display: grid; place-items: center; font-style: normal; font-size: .75rem; }
.onboarding-main { padding: clamp(26px, 6vw, 74px); display: grid; align-items: center; }
.onboarding-card { max-width: 680px; width: 100%; margin-inline: auto; }
.step-meta { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 14px; color: var(--muted); font-size: .85rem; }
.step-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 30px; }
.step-bar i { height: 5px; border-radius: 99px; background: var(--line); }
.step-bar i.active { background: var(--acid); }
.onboarding-card h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 6px; }
.onboarding-card > p { color: var(--muted); margin: 0 0 25px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }

.modal-backdrop { position: fixed; inset-inline: 0; top: var(--tanora-viewport-top, 0px); height: var(--tanora-viewport-height, 100dvh); z-index: 100; background: rgba(0,0,0,.72); backdrop-filter: blur(9px); display: grid; place-items: center; padding: 20px; }
.modal { width: min(640px, 100%); max-height: min(780px, calc(var(--tanora-viewport-height, 100dvh) - 40px)); overflow: auto; overscroll-behavior: contain; background: #0d1913; color: var(--ink); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); padding: 22px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.modal-head h2 { margin: 0; }
.modal-head p { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }

.settings-list { display: grid; gap: 12px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; }
.setting-row p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; }
.source-list { display: grid; gap: 11px; }
.source-item { padding: 14px; border: 1px solid var(--line); border-radius: 15px; }
.source-item strong { display: block; }
.source-item p { color: var(--muted); margin: 4px 0 8px; font-size: .83rem; }

.mobile-nav { display: none; }
.toast-region { position: fixed; inset-inline-end: 22px; inset-block-end: 22px; z-index: 200; display: grid; gap: 9px; pointer-events: none; }
body:has(.ai-modal) .toast-region { inset-block-end: calc(max(10px, env(safe-area-inset-bottom)) + 110px); max-width: calc(100vw - 28px); }
.toast { background: #17251d; border: 1px solid #32473a; box-shadow: var(--shadow); padding: 12px 16px; border-radius: 14px; animation: toast-in .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.fade-in { animation: fade-in .28s ease; }
@keyframes fade-in { from { opacity: 0; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card { grid-template-columns: 1fr .55fr; }
}

@media (max-width: 820px) {
  body { padding-bottom: 72px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 20px 16px 36px; }
  .mobile-nav {
    position: fixed; display: grid; grid-template-columns: repeat(5, 1fr); z-index: 50;
    inset-inline: 10px; inset-block-end: 9px; height: 64px; padding: 6px;
    background: rgba(13,25,19,.94); backdrop-filter: blur(17px); border: 1px solid var(--line); border-radius: 19px;
  }
  .mobile-nav .nav-button { min-height: 50px; padding: 5px; display: grid; justify-items: center; gap: 0; font-size: .66rem; box-shadow: none; }
  .mobile-nav .nav-button.active { background: rgba(199,255,74,.1); color: var(--acid); }
  .mobile-nav .nav-button svg { width: 19px; height: 19px; }
  .onboarding-shell { grid-template-columns: 1fr; }
  .onboarding-aside { min-height: auto; padding: 28px 22px; border: 0; border-bottom: 1px solid var(--line); }
  .onboarding-aside h1 { font-size: 2.6rem; max-width: none; margin: 20px 0 10px; }
  .aside-points { display: none; }
  .onboarding-main { padding: 30px 18px; }
}

@media (max-width: 620px) {
  .topbar { align-items: flex-start; }
  .top-actions .btn span { display: none; }
  .grid-4, .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .hero-card { grid-template-columns: 1fr; }
  .week-ring { display: none; }
  .hero-card { min-height: auto; }
  .meal-row { grid-template-columns: 1fr auto; }
  .meal-row .meal-time { grid-column: 1 / -1; }
  .segmented { grid-template-columns: 1fr; }
  .budget-tabs { font-size: .83rem; }
  .training-footer { align-items: stretch; flex-direction: column; }
  .setting-row { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 2026 product polish: a compact athletic cockpit with calm, high-contrast surfaces. */
@font-face {
  font-family: "Tanora Persian";
  src: local("B Yekan"), local("BYekan"), local("Yekan");
  font-display: swap;
}

:root {
  --bg: #050b08;
  --panel: #0b1510;
  --panel-2: #101e16;
  --line: rgba(191, 224, 203, .12);
  --ink: #f3f8f4;
  --muted: #9caf9f;
  --dim: #72857a;
  --acid: #cfff48;
  --aqua: #58e6c2;
  --blue: #81baff;
  --amber: #ffd06b;
  --radius: 22px;
  --shadow: 0 22px 64px rgba(0, 0, 0, .28);
  font-family: "Tanora Persian", Vazirmatn, Tahoma, "Segoe UI", sans-serif;
}

body {
  letter-spacing: 0;
  background:
    radial-gradient(circle at 73% -8%, rgba(207,255,72,.12), transparent 30rem),
    radial-gradient(circle at -8% 72%, rgba(88,230,194,.07), transparent 34rem),
    linear-gradient(180deg, #07100c 0%, var(--bg) 46%, #040906 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.24'/%3E%3C/svg%3E");
  z-index: -1;
}

.sidebar {
  width: 282px;
  padding: 26px 20px;
  background: linear-gradient(180deg, rgba(10,20,15,.95), rgba(5,12,8,.94));
  box-shadow: 14px 0 50px rgba(0,0,0,.18);
}
.app-shell { grid-template-columns: 282px 1fr; }
.brand-mark { border-radius: 13px 13px 13px 5px; transform: rotate(-2deg); }
.brand strong { font-size: 1.35rem; letter-spacing: -.02em; }
.profile-switcher { padding: 9px 11px; background: rgba(255,255,255,.025); }
.nav-list { gap: 5px; }
.nav-button { font-size: .98rem; min-height: 51px; border: 1px solid transparent; }
.nav-button.active { background: linear-gradient(90deg, rgba(207,255,72,.11), rgba(207,255,72,.03)); border-color: rgba(207,255,72,.1); box-shadow: inset -3px 0 var(--acid); }

.main { max-width: 1500px; margin-inline: auto; }
.topbar { margin-bottom: 24px; }
.topbar h1 { letter-spacing: -.03em; font-weight: 900; }
.eyebrow { letter-spacing: 0; }
.card { box-shadow: 0 16px 55px rgba(0,0,0,.2); background: linear-gradient(145deg, rgba(17,31,23,.94), rgba(9,19,14,.96)); }
.card-flat { box-shadow: 0 10px 38px rgba(0,0,0,.12); }
.card:hover { border-color: rgba(207,255,72,.17); }
.btn { min-height: 46px; border-radius: 13px; }
.btn svg { width: 20px; height: 20px; }
.btn-primary { box-shadow: 0 10px 25px rgba(207,255,72,.12); }
.btn-ai { background: linear-gradient(135deg, rgba(88,230,194,.14), rgba(129,186,255,.08)); border-color: rgba(88,230,194,.22); color: #dffff6; }
.btn-ai:hover { border-color: rgba(88,230,194,.4); }

.hero-card {
  min-height: 256px;
  background:
    linear-gradient(118deg, rgba(207,255,72,.08), transparent 43%),
    linear-gradient(145deg, rgba(18,34,25,.98), rgba(7,17,12,.98));
  border-color: rgba(207,255,72,.14);
}
.hero-copy h2 { letter-spacing: -.035em; }
.stat-card { min-height: 136px; }
.stat-value small { color: currentColor; opacity: .72; font-size: .72rem; }
.day-badge { border-radius: 13px 13px 13px 5px; }

.ai-side-card {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: 17px;
  border: 1px solid rgba(88,230,194,.18);
  color: var(--ink);
  background: linear-gradient(135deg, rgba(88,230,194,.1), rgba(129,186,255,.04));
  cursor: pointer;
  text-align: right;
}
.ai-side-card strong, .ai-side-card small { display: block; }
.ai-side-card small { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.ai-orb {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 13px;
  display: grid; place-items: center; color: #06120d;
  background: linear-gradient(135deg, var(--aqua), var(--acid));
  box-shadow: 0 0 26px rgba(88,230,194,.16);
}
.ai-orb svg { width: 22px; height: 22px; }
.ai-orb.large { width: 48px; height: 48px; border-radius: 16px; }
.ai-fab { display: none; }

.photo-section { overflow: hidden; }
.photo-privacy, .ai-disclosure {
  display: flex; align-items: flex-start; gap: 9px;
  color: var(--muted); font-size: .82rem; line-height: 1.7;
  padding: 11px 13px; border-radius: 14px;
  background: rgba(88,230,194,.055); border: 1px solid rgba(88,230,194,.12);
}
.photo-privacy svg, .ai-disclosure svg { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 2px; color: var(--aqua); }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.photo-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(0,0,0,.13); }
.photo-frame { aspect-ratio: 3/4; position: relative; overflow: hidden; background: #07100b; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-frame span { position: absolute; inset-inline-start: 10px; inset-block-end: 10px; padding: 4px 9px; border-radius: 999px; font-size: .7rem; color: #fff; background: rgba(0,0,0,.62); backdrop-filter: blur(8px); }
.photo-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; }
.photo-meta strong, .photo-meta small { display: block; }
.photo-meta small { color: var(--muted); font-size: .72rem; }
.photo-actions { display: flex; gap: 6px; }
.icon-mini { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--muted); cursor: pointer; }
.icon-mini svg { width: 18px; height: 18px; }
.icon-mini.ai-mini { color: var(--aqua); border-color: rgba(88,230,194,.18); }
.photo-analysis { padding: 0 12px 13px; }
.photo-analysis strong { color: var(--aqua); font-size: .78rem; }
.photo-analysis p { color: var(--muted); font-size: .8rem; margin: 4px 0 0; max-height: 7em; overflow: auto; }
.photo-empty { display: flex; align-items: center; gap: 15px; margin-top: 16px; padding: 24px; border: 1px dashed rgba(207,255,72,.2); border-radius: 18px; background: rgba(207,255,72,.025); }
.photo-empty > span { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: var(--acid); background: rgba(207,255,72,.08); }
.photo-empty svg { width: 23px; height: 23px; }
.photo-empty p { margin: 3px 0 0; color: var(--muted); font-size: .83rem; }

.ai-modal { width: min(760px, 100%); height: min(780px, calc(var(--tanora-viewport-height, 100dvh) - 40px)); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.ai-modal-head { flex: 0 0 auto; padding: 15px 18px 12px; margin: 0; border-bottom: 1px solid var(--line); }
.ai-heading { display: flex; align-items: center; gap: 12px; }
.ai-options { flex: 0 1 auto; min-height: 0; max-height: 38%; overflow: auto; overscroll-behavior: contain; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.ai-context summary { cursor: pointer; font-size: .82rem; color: var(--aqua); padding: 3px 0; }
.ai-send-notice { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; }
.ai-disclosure { margin: 13px 16px 0; }
.chat-stream { flex: 1 1 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { flex-shrink: 0; min-width: 0; max-width: 90%; overflow-wrap: anywhere; padding: 12px 14px; border-radius: 17px; font-size: .94rem; line-height: 1.85; }
.chat-bubble.user { align-self: flex-start; background: var(--acid); color: var(--acid-ink); border-end-start-radius: 5px; }
.chat-bubble.assistant { align-self: flex-end; display: flex; gap: 9px; background: rgba(255,255,255,.045); border: 1px solid var(--line); border-end-end-radius: 5px; }
.chat-avatar { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; color: var(--aqua); background: rgba(88,230,194,.1); }
.chat-avatar svg { width: 17px; height: 17px; }
.ai-welcome { margin: auto; text-align: center; padding: 24px; }
.ai-welcome > span { width: 48px; height: 48px; margin: 0 auto 11px; display: grid; place-items: center; border-radius: 16px; color: var(--acid); background: rgba(207,255,72,.08); }
.ai-welcome h3 { margin: 0 0 5px; }
.ai-welcome p { color: var(--muted); margin: 0 0 16px; }
.prompt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.prompt-chips button { border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.025); padding: 8px 11px; border-radius: 999px; cursor: pointer; }
.ai-composer { flex: 0 0 auto; margin: 0 12px max(10px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-2); }
.ai-composer textarea { border: 0; outline: 0; resize: none; min-height: 48px; max-height: 120px; padding: 11px; background: transparent; color: var(--ink); }
.send-btn { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 14px; cursor: pointer; background: var(--acid); color: var(--acid-ink); }
.send-btn svg { width: 21px; height: 21px; }
.send-btn.loading { opacity: .55; animation: pulse 1s ease infinite; }
:root[data-theme="light"] .chat-bubble.user, :root[data-theme="light"] .send-btn { background: #cfff48; color: #102004; }
:root[data-theme="light"] .jalali-days button[aria-pressed="true"] { color: #fff; }
@keyframes pulse { 50% { transform: scale(.92); } }
.ai-footnote { margin: 0 20px 14px; color: var(--dim); font-size: .72rem; text-align: center; }
.ai-model-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 16px 0; }
.ai-model-picker button { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; text-align: start; color: var(--muted); background: rgba(255,255,255,.025); cursor: pointer; transition: .18s ease; }
.ai-model-picker button:hover { border-color: rgba(88,230,194,.3); }
.ai-model-picker button.active { border-color: rgba(207,255,72,.42); color: var(--ink); background: rgba(207,255,72,.075); box-shadow: inset 0 0 0 1px rgba(207,255,72,.08); }
.ai-model-picker strong, .ai-model-picker small { display: block; }
.ai-model-picker strong { font-size: .78rem; }
.ai-model-picker small { margin-top: 2px; color: var(--dim); direction: ltr; text-align: start; }
.chat-model { display: block; margin-top: 7px; color: var(--dim); font-size: .65rem; direction: ltr; text-align: start; }
.ai-setup { margin: 22px; padding: 30px; text-align: center; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.018); }
.ai-modal > .ai-setup { overflow: auto; }
.ai-setup.compact { margin: 14px 0 0; padding: 16px; }
@media (max-height: 450px) {
  .ai-modal .ai-modal-head { padding: 7px 12px; }
  .ai-modal-head .icon-btn { width: 36px; min-height: 36px; height: 36px; padding: 6px; }
  .ai-modal .ai-options { padding-block: 4px; }
  .ai-modal .ai-welcome { padding: 8px; }
}
.setup-icon { width: 62px; height: 62px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 20px; color: var(--aqua); background: rgba(88,230,194,.09); }
.setup-icon svg { width: 30px; height: 30px; }
.ai-setup h3 { margin: 0 0 7px; }
.ai-setup p { color: var(--muted); max-width: 52ch; margin: 0 auto 14px; }
.ai-setup pre { direction: ltr; text-align: left; overflow: auto; padding: 13px; border-radius: 13px; color: #cdebd9; background: #050a07; border: 1px solid var(--line); }
.consent-modal { width: min(520px, 100%); }
.consent-preview { width: min(220px, 60%); aspect-ratio: 3/4; overflow: hidden; border-radius: 18px; margin: 0 auto 16px; border: 1px solid var(--line); }
.consent-preview img { width: 100%; height: 100%; object-fit: cover; }
.consent-modal > .btn-block { margin-top: 14px; }

.onboarding-aside { background: linear-gradient(145deg, rgba(16,31,22,.9), rgba(5,13,9,.86)); }
.onboarding-card { padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(145deg, rgba(14,27,20,.88), rgba(8,17,12,.78)); box-shadow: var(--shadow); }
.input, .select, .textarea { background: rgba(3,10,6,.72); min-height: 50px; }
.field label, .field-label { color: #dce7df; }

@media (max-width: 1100px) {
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-actions .btn-ai span { display: none; }
}

@media (max-width: 820px) {
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .main { padding: 17px 14px 32px; }
  .topbar { position: sticky; top: 0; z-index: 18; margin: -17px -14px 18px; padding: 14px; background: rgba(5,12,8,.82); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(191,224,203,.08); }
  .topbar h1 { font-size: clamp(1.42rem, 6vw, 1.85rem); }
  .top-actions .btn-ai { display: none; }
  .ai-fab { position: fixed; z-index: 60; display: grid; place-items: center; inset-inline-start: 50%; transform: translateX(50%); inset-block-end: calc(47px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border: 7px solid var(--bg); border-radius: 20px; background: linear-gradient(135deg, var(--aqua), var(--acid)); color: #06120d; box-shadow: 0 13px 32px rgba(0,0,0,.4); cursor: pointer; }
  .ai-fab span { display: grid; place-items: center; }
  .ai-fab svg { width: 23px; height: 23px; }
  .ai-fab b { position: absolute; inset-block-end: -18px; font-size: .58rem; color: var(--aqua); letter-spacing: .04em; }
  .mobile-nav { inset-inline: 8px; inset-block-end: calc(7px + env(safe-area-inset-bottom)); height: 69px; padding: 7px 6px; border-radius: 22px; box-shadow: 0 18px 60px rgba(0,0,0,.48); }
  .mobile-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .mobile-nav .nav-button:nth-child(1) { grid-column: 1; }
  .mobile-nav .nav-button:nth-child(2) { grid-column: 2; }
  .mobile-nav .nav-button:nth-child(3) { grid-column: 4; }
  .mobile-nav .nav-button:nth-child(4) { grid-column: 5; }
  .mobile-nav .nav-button:nth-child(5) { grid-column: 6; }
  .hero-card { min-height: 226px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: calc(var(--tanora-viewport-height, 100dvh) - 8px); border-radius: 26px 26px 0 0; border-bottom: 0; }
  .ai-modal { height: calc(var(--tanora-viewport-height, 100dvh) - 8px); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .onboarding-card { border-radius: 23px; }
}

@media (max-width: 620px) {
  .top-actions .btn-secondary span { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .btn { min-height: 42px; }
  .hero-card { padding: 22px 19px; }
  .hero-copy h2 { font-size: 1.55rem; }
  .card { padding: 17px; border-radius: 20px; }
  .stat-card { min-height: 120px; }
  .photo-section .card-head { align-items: stretch; flex-direction: column; }
  .photo-section .card-head .btn { width: 100%; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo-meta { align-items: flex-start; flex-direction: column; }
  .photo-actions { width: 100%; justify-content: flex-end; }
  .photo-empty { align-items: flex-start; padding: 18px; }
  .chat-bubble { max-width: 92%; }
  .ai-setup { margin: 14px; padding: 20px 14px; }
  .onboarding-aside { padding: 20px 18px; }
  .onboarding-aside h1 { font-size: 2rem; margin: 16px 0 8px; }
  .onboarding-aside p { font-size: .88rem; margin-bottom: 0; }
  .onboarding-main { padding: 18px 12px 28px; }
  .onboarding-card { padding: 20px 15px; }
  .form-actions { position: sticky; bottom: 0; z-index: 4; padding: 11px 0 max(4px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(8,17,12,.98) 24%); }
}

/* Tanora: real-life planning and private health record. */
.onboarding-main { align-items: start; }
.onboarding-card { max-width: 780px; }
.weekday-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.check-chip { position: relative; cursor: pointer; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span { min-height: 44px; padding: 8px 5px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(3,10,6,.72); font-size: .875rem; }
.check-chip input:checked + span { color: var(--acid); border-color: rgba(207,255,72,.48); background: rgba(207,255,72,.09); box-shadow: inset 0 -2px var(--acid); }
.check-chip input:focus-visible + span { outline: 3px solid rgba(207,255,72,.55); outline-offset: 2px; }

.readiness-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.readiness-grid > div { min-width: 0; display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.02); }
.readiness-grid svg { grid-row: 1 / 3; width: 24px; color: var(--aqua); }
.readiness-grid span { color: var(--muted); font-size: .8rem; }
.readiness-grid strong { line-height: 1.35; }

.reality-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.reality-strip article { min-width: 0; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(16,31,23,.82), rgba(7,16,11,.9)); }
.reality-strip article > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--aqua); background: rgba(88,230,194,.08); }
.reality-strip svg { width: 22px; }
.reality-strip small, .reality-strip strong, .reality-strip p { display: block; }
.reality-strip small { color: var(--aqua); font-size: .75rem; }
.reality-strip strong { margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reality-strip p { color: var(--muted); font-size: .8rem; margin: 2px 0 0; }

.cooking-plan { overflow: hidden; background: linear-gradient(120deg, rgba(88,230,194,.045), rgba(9,19,14,.96)); }
.micro-plan { min-width: 0; padding: 15px; border-radius: 16px; border: 1px solid var(--line); background: rgba(0,0,0,.12); }
.micro-plan svg { width: 23px; color: var(--acid); margin-bottom: 9px; }
.micro-plan strong { display: block; }
.micro-plan p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; }

.vault-upload { display: flex; align-items: center; gap: 8px; }
.compact-select { width: auto; min-width: 160px; min-height: 38px; padding-block: 6px; }
.document-list { display: grid; gap: 10px; margin-top: 14px; }
.document-row { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: start; gap: 12px; padding: 14px; border-radius: 17px; border: 1px solid var(--line); background: rgba(255,255,255,.018); }
.document-icon, .document-consent-icon { display: grid; place-items: center; color: var(--aqua); background: rgba(88,230,194,.08); border-radius: 14px; }
.document-icon { width: 46px; height: 46px; }
.document-icon svg { width: 22px; }
.document-main { min-width: 0; }
.document-main > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-main > small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.document-actions { display: flex; gap: 6px; }
.document-summary { margin-top: 10px; padding: 11px 12px; border-radius: 13px; background: rgba(88,230,194,.05); border: 1px solid rgba(88,230,194,.12); }
.document-summary b { color: var(--aqua); font-size: .8rem; }
.document-summary p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; white-space: pre-line; }
.document-consent-icon { width: 72px; height: 72px; margin: 0 auto 16px; }
.document-consent-icon svg { width: 34px; }

@media (max-width: 980px) {
  .reality-strip { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .ai-model-picker { grid-template-columns: 1fr; }
  .weekday-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .readiness-grid { grid-template-columns: 1fr; }
  .reality-strip article { padding: 14px; }
  .vault-upload { width: 100%; align-items: stretch; flex-direction: column; }
  .compact-select { width: 100%; }
  .document-row { grid-template-columns: 42px minmax(0,1fr); }
  .document-icon { width: 42px; height: 42px; }
  .document-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
