/* =============================================================================
 * chat-visual.css — the visual reply system of the chef chat.
 * Loaded AFTER chat-market.css. Enamelware tokens only (ai-design-system.css).
 * Everything here is driven by real recipe / substitution data: plate art,
 * pantry coverage, taste fingerprint, macro rings. No decorative filler.
 * ============================================================================= */

/* ---- colour families (the same eight the plate art uses) ---- */
.fam-tomato    { --f: var(--tomato);    --f-soft: var(--tomato-soft);    --f-deep: var(--tomato-deep); }
.fam-chili     { --f: var(--chili);     --f-soft: var(--chili-soft);     --f-deep: var(--chili-deep); }
.fam-saffron   { --f: var(--saffron);   --f-soft: var(--saffron-soft);   --f-deep: var(--saffron-deep); }
.fam-leaf      { --f: var(--leaf);      --f-soft: var(--leaf-soft);      --f-deep: var(--leaf-deep); }
.fam-rose      { --f: var(--rose);      --f-soft: var(--rose-soft);      --f-deep: var(--rose-deep); }
.fam-blueberry { --f: var(--blueberry); --f-soft: var(--blueberry-soft); --f-deep: var(--blueberry-deep); }
.fam-aubergine { --f: var(--aubergine); --f-soft: var(--aubergine-soft); --f-deep: var(--aubergine-deep); }
.fam-teal      { --f: var(--teal);      --f-soft: var(--teal-soft);      --f-deep: var(--teal-deep); }

.rv-msg { align-items: flex-start; }
.rv-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
.rv-msg--wide .rv-col, .rv-msg--deck .rv-col { width: 100%; }
.chat-main .chat-thread { container-type: inline-size; container-name: thread; }

/* ---- intro line + understood strip ---- */
.rv-intro { margin: 0; padding: .7rem 1rem; max-width: 62ch; background: #fff; border: 1px solid var(--line); border-radius: 14px 18px 18px 4px; box-shadow: var(--lift); font-size: .98rem; line-height: 1.5; color: var(--text-primary); }
.rv-understood { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.rv-understood-label { display: inline-flex; align-items: center; gap: .35rem; margin-right: .2rem; font: 700 .78rem var(--font-body); color: var(--text-secondary); }
.rv-understood-label svg { color: var(--saffron-deep); }
.rv-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .35rem .28rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--teal-soft); color: var(--teal-deep); font: 700 .82rem var(--font-body); cursor: pointer; transition: background .15s, transform .15s var(--ease-spring); }
.rv-chip span { display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: rgba(15,35,39,.1); font-size: .9rem; line-height: 1; }
.rv-chip:hover { transform: translateY(-1px); background: #fff; }
.rv-chip:hover span { background: var(--tomato); color: #fff; }
.rv-chip--have { background: var(--leaf-soft); color: var(--leaf-deep); }
.rv-chip--avoid { background: var(--tomato-soft); color: var(--tomato-deep); }
.rv-chip--diet, .rv-chip--macro { background: var(--saffron-soft); color: var(--saffron-deep); }
.rv-chip--time, .rv-chip--delta { background: var(--blueberry-soft); color: var(--blueberry-deep); }
.rv-chip--cuisine, .rv-chip--meal { background: var(--rose-soft); color: var(--rose-deep); }
.rv-chip--clear { padding: .28rem .8rem; background: transparent; color: var(--text-secondary); border-style: dashed; }
.rv-chip--clear:hover { color: var(--tomato-deep); }

/* ---- the deck ---- */
.rv-deck { display: grid; gap: 14px; min-width: 0; }
.rv-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--lift); transition: transform .25s var(--ease-spring), box-shadow .25s var(--ease-out), opacity .25s; animation: rvIn .5s var(--ease-out) both; }
.rv-card:hover { transform: translateY(-2px); box-shadow: var(--lift-2); }
.rv-card.is-gone { opacity: 0; transform: scale(.96); pointer-events: none; }
.rv-strip-item:nth-child(2) .rv-card { animation-delay: .06s; } .rv-strip-item:nth-child(3) .rv-card { animation-delay: .12s; }
.rv-strip-item:nth-child(4) .rv-card { animation-delay: .18s; } .rv-strip-item:nth-child(5) .rv-card { animation-delay: .24s; }
@keyframes rvIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.rv-art { position: relative; aspect-ratio: 500 / 368; background: var(--f); overflow: hidden; }
.rv-art-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rv-art.is-fallback::after { content: ""; position: absolute; inset: 14% 18%; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #fff 0 56%, rgba(255,255,255,.55) 57% 70%, transparent 71%); box-shadow: 0 6px 14px -6px rgba(11,27,30,.5); }
.rv-rank { position: absolute; top: .55rem; left: .55rem; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ink-deep); color: #fff; font: 800 .82rem var(--font-display); box-shadow: 0 2px 6px rgba(11,27,30,.35); }
.rv-x { position: absolute; top: .45rem; right: .45rem; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink-deep); font-size: 1.15rem; line-height: 1; cursor: pointer; opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s var(--ease-spring); }
.rv-card:hover .rv-x, .rv-x:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .rv-x { opacity: .9; transform: none; } }
.rv-x:hover { background: var(--tomato); color: #fff; }

.rv-card-body { display: flex; flex-direction: column; gap: .55rem; padding: .85rem .95rem 1rem; flex: 1; }
.rv-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.rv-title { margin: 0; font: 760 1.02rem/1.2 var(--font-display); letter-spacing: -.015em; color: var(--text-primary); }
.rv-card--hero .rv-title { font-size: 1.45rem; font-stretch: 92%; }
.rv-desc { margin: 0; color: var(--text-secondary); font-size: .9rem; line-height: 1.45; }
.rv-facts { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .85rem; color: var(--text-secondary); font: 600 .82rem var(--font-body); }
.rv-fact { display: inline-flex; align-items: center; gap: .3rem; }
.rv-fact svg { color: var(--f-deep, var(--teal-deep)); }
.rv-diff { display: inline-flex; gap: 3px; align-items: center; }
.rv-diff i { width: .5rem; height: .5rem; border-radius: 50%; border: 1.5px solid var(--f-deep, var(--text-muted)); background: transparent; }
.rv-diff i.on { background: var(--f-deep, var(--ink-deep)); }
.rv-diets { display: inline-flex; gap: .25rem; flex: none; }
.rv-diet { padding: .12rem .5rem; border-radius: 999px; background: var(--leaf-soft); color: var(--leaf-deep); font: 700 .7rem var(--font-body); white-space: nowrap; }

/* taste fingerprint */
.rv-fl { display: inline-flex; align-items: flex-end; gap: .55rem; }
.rv-fl-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 20px; }
.rv-fl-bars i { width: 5px; height: var(--h); min-height: 3px; border-radius: 2px; background: var(--f); opacity: .28; transform-origin: bottom; animation: rvGrow .6s var(--ease-out) both; }
.rv-fl-bars i.is-hi { opacity: 1; }
.rv-fl-bars i:nth-child(2) { animation-delay: .03s; } .rv-fl-bars i:nth-child(3) { animation-delay: .06s; } .rv-fl-bars i:nth-child(4) { animation-delay: .09s; }
.rv-fl-bars i:nth-child(5) { animation-delay: .12s; } .rv-fl-bars i:nth-child(6) { animation-delay: .15s; } .rv-fl-bars i:nth-child(7) { animation-delay: .18s; } .rv-fl-bars i:nth-child(8) { animation-delay: .21s; }
@keyframes rvGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.rv-fl--lg .rv-fl-bars { height: 30px; gap: 3px; } .rv-fl--lg .rv-fl-bars i { width: 7px; }
.rv-fl-lead { font: 700 .8rem var(--font-body); color: var(--f-deep); text-transform: capitalize; }

/* pantry coverage */
.rv-pantry { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: 12px; background: var(--f-soft); }
.rv-ring { position: relative; display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; flex: none; }
.rv-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rv-ring-bg { fill: none; stroke: rgba(11,27,30,.12); stroke-width: 3.6; }
.rv-ring-fg { fill: none; stroke: var(--f, var(--teal)); stroke-width: 3.6; stroke-linecap: round; animation: rvRing .9s var(--ease-out) both; }
@keyframes rvRing { from { stroke-dasharray: 0 100; } }
.rv-ring b { position: relative; font: 800 .74rem var(--font-display); color: var(--f-deep, var(--ink-deep)); }
.rv-ring--sm { width: 2.5rem; height: 2.5rem; }
.rv-pantry-txt { display: flex; flex-direction: column; gap: .2rem; min-width: 0; font-size: .8rem; }
.rv-have { color: var(--f-deep); font-weight: 700; }
.rv-miss-row { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; color: var(--text-secondary); }
.rv-miss-label { font-weight: 600; margin-right: .1rem; }
.rv-miss { padding: .05rem .45rem; border-radius: 999px; background: #fff; border: 1px dashed var(--border-strong); font-weight: 600; }
.rv-have-all { font-weight: 700; color: var(--leaf-deep); }

.rv-why { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.rv-why li { padding: .12rem .55rem; border-radius: 999px; background: var(--bg-tertiary); font: 600 .74rem var(--font-body); color: var(--text-secondary); }

.rv-card-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .3rem; }
.rv-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text-primary); font: 700 .84rem var(--font-body); cursor: pointer; transition: transform .15s var(--ease-spring), background .15s, box-shadow .15s; min-height: 38px; }
.rv-btn:hover { background: var(--f-soft, var(--saffron-soft)); transform: translateY(-1px); }
.rv-btn--primary { background: var(--ink-deep); color: #fff; border-color: var(--ink-deep); }
.rv-btn--primary:hover { background: #17313a; color: #fff; }
.rv-btn--ghost { border-style: dashed; }
.rv-btn:disabled { opacity: .45; cursor: default; transform: none; }
.rv-btn:focus-visible, .rv-chip:focus-visible, .rv-fchip:focus-visible, .rv-ing-btn:focus-visible, .rv-step-btn:focus-visible, .rv-timer:focus-visible, .rv-x:focus-visible, .tt:focus-visible { outline: 2px solid var(--blueberry); outline-offset: 2px; }

/* hero card is a two-column spread on wide threads */
@container thread (min-width: 640px) {
  .rv-card--hero { flex-direction: row; }
  .rv-card--hero .rv-art { flex: 0 0 44%; aspect-ratio: auto; min-height: 280px; }
  .rv-card--hero .rv-art-img { position: absolute; inset: 0; }
  .rv-card--hero .rv-card-body { padding: 1.1rem 1.2rem 1.2rem; gap: .7rem; }
}
.rv-strip { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rv-strip-item { flex: 0 0 min(250px, 74%); scroll-snap-align: start; display: flex; }
.rv-strip-item .rv-card { width: 100%; }
.rv-strip--pair .rv-strip-item, .rv-strip--tonight .rv-strip-item { flex-basis: min(230px, 70%); }
.rv-card--mini .rv-card-actions .rv-btn { padding: .42rem .65rem; font-size: .8rem; }

/* ---- follow-up chips ---- */
.rv-followups { display: flex; flex-wrap: wrap; gap: .4rem; }
.rv-fchip { padding: .42rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text-primary); font: 700 .82rem var(--font-body); cursor: pointer; transition: transform .15s var(--ease-spring), background .15s; }
.rv-fchip:hover { background: var(--saffron-soft); transform: translateY(-1px); }
.rv-escalate { margin: 0; font-size: .84rem; color: var(--text-secondary); }
.rv-link { padding: 0; border: 0; background: none; color: var(--text-primary); font: 800 .84rem var(--font-body); text-decoration: underline; text-decoration-color: var(--tomato); text-underline-offset: 3px; cursor: pointer; }
.rv-tag { margin: 0; }
.rv-empty { max-width: 56ch; }

/* ---- recipe sheet ---- */
.rv-sheet { display: flex; flex-direction: column; gap: 1rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--lift); }
.rv-sheet-head { display: grid; gap: .9rem; }
@container thread (min-width: 640px) { .rv-sheet-head { grid-template-columns: 220px minmax(0, 1fr); align-items: center; } }
.rv-sheet-head .rv-art { border-radius: 14px; }
.rv-sheet-title { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.rv-sheet-title h3 { margin: 0; font: 800 1.5rem/1.1 var(--font-display); font-stretch: 92%; letter-spacing: -.02em; }
.rv-sheet-title p { margin: 0; color: var(--text-secondary); font-size: .92rem; line-height: 1.5; }
.rv-sheet-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.rv-sheet-cols { display: grid; gap: 1.1rem; }
@container thread (min-width: 720px) { .rv-sheet-cols { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); } }
.rv-sec-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .55rem; }
.rv-sec-head h4, .rv-sec-head h3 { margin: 0; font: 760 1rem var(--font-display); letter-spacing: -.01em; }
.rv-sec-head--sub { margin-top: 1rem; }
.rv-prog { font: 700 .76rem var(--font-body); color: var(--text-secondary); }
.rv-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.rv-stepper button { width: 2rem; height: 2rem; border: 0; background: transparent; font: 800 1.05rem var(--font-body); cursor: pointer; }
.rv-stepper button:hover { background: var(--f-soft); }
.rv-stepper output { padding: 0 .5rem; font: 700 .78rem var(--font-body); min-width: 5.2rem; text-align: center; }
.rv-sheet.is-scaled .rv-amt { animation: rvPop .4s var(--ease-spring); color: var(--f-deep); }
@keyframes rvPop { 40% { transform: scale(1.22); } }
.rv-amt { display: inline-block; font-weight: 800; }

.rv-ings, .msg-ing-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.rv-ing, .rv-item { margin: 0; }
.rv-ing-btn { display: flex; align-items: flex-start; gap: .6rem; width: 100%; padding: .42rem .5rem; border: 0; border-radius: 10px; background: transparent; text-align: left; color: var(--text-primary); font: 500 .92rem/1.4 var(--font-body); cursor: pointer; transition: background .15s; }
.rv-ing-btn:hover { background: var(--f-soft, var(--bg-hover)); }
.rv-box { flex: none; display: grid; place-items: center; width: 1.2rem; height: 1.2rem; margin-top: .1rem; border: 1.5px solid var(--text-muted); border-radius: 6px; color: transparent; transition: background .15s, border-color .15s, color .15s; }
.rv-ing-btn[aria-pressed="true"] .rv-box { background: var(--f, var(--leaf)); border-color: var(--f, var(--leaf)); color: #fff; }
.rv-ing-btn[aria-pressed="true"] .rv-ing-text { text-decoration: line-through; text-decoration-color: rgba(11,27,30,.35); color: var(--text-muted); }
.rv-ing-text b { font-weight: 700; }
.rv-note { color: var(--text-muted); font-size: .82em; font-style: normal; }
.rv-ing.is-staple .rv-ing-text { color: var(--text-secondary); }
.rv-equip { margin: .6rem 0 0; font-size: .84rem; color: var(--text-secondary); }

.rv-steps, .msg-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; counter-reset: none; }
.rv-step { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .4rem .6rem; margin: 0; }
.rv-step-btn { flex: 1 1 14rem; display: flex; align-items: flex-start; gap: .7rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; font: 500 .94rem/1.5 var(--font-body); color: var(--text-primary); cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; }
.rv-step-btn:hover { border-color: var(--f, var(--teal)); }
.rv-step-num { flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--f, var(--ink-deep)); color: #fff; font: 800 .82rem var(--font-display); }
.rv-step-btn[aria-pressed="true"] { background: var(--f-soft, var(--leaf-soft)); border-color: transparent; opacity: .72; }
.rv-step-btn[aria-pressed="true"] .rv-step-text { text-decoration: line-through; text-decoration-color: rgba(11,27,30,.3); }
.rv-step-btn[aria-pressed="true"] .rv-step-num { background: var(--leaf-deep); }
.rv-timer, .tt-time { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border: 1px solid var(--blueberry); border-radius: 999px; background: var(--blueberry-soft); color: var(--blueberry-deep); font: 700 .78rem var(--font-body); cursor: pointer; white-space: nowrap; align-self: center; transition: background .15s, transform .15s var(--ease-spring); }
.rv-timer:hover, .tt-time:hover { background: var(--blueberry); color: #fff; transform: scale(1.04); }
.tt { font: inherit; }
.tt-temp { padding: .02rem .45rem; border: 1px dashed var(--chili); border-radius: 6px; background: var(--chili-soft); color: var(--chili-deep); font-weight: 800; cursor: pointer; }
.tt-time { padding: .08rem .55rem; font-size: .85em; margin-inline: .1rem; }

.rv-diet--outline { background: var(--bg-tertiary); color: var(--text-secondary); }
.rv-outline { padding: 1rem; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--bg-primary); }
.rv-outline h4 { margin: 0 0 .3rem; font: 780 1rem var(--font-display); }
.rv-outline p { margin: 0 0 .7rem; font-size: .9rem; color: var(--text-secondary); line-height: 1.5; }

/* ---- nutrition / macro ring ---- */
.rv-nutri, .rv-timeline, .rv-shop, .rv-taste, .rv-pair, .rv-plan, .rv-conv, .rv-fix, .rv-swap { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--lift); padding: 1rem; }
.rv-nutri-head { display: flex; align-items: center; gap: .9rem; margin-bottom: .8rem; }
.rv-nutri-head .rv-art { width: 120px; flex: none; border-radius: 12px; }
.rv-nutri-head h4 { margin: 0 0 .15rem; font: 780 1.1rem var(--font-display); }
.rv-nutri-head p { margin: 0; color: var(--text-secondary); font-size: .85rem; }
.rv-badges { display: flex; gap: .25rem; margin-top: .4rem !important; }
.rv-macro { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.rv-donut { position: relative; display: inline-grid; place-items: center; width: 7.2rem; height: 7.2rem; }
.rv-donut svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rv-donut circle { animation: rvRing .9s var(--ease-out) both; }
.rv-donut b { position: relative; display: flex; flex-direction: column; align-items: center; font: 800 1.45rem/1 var(--font-display); }
.rv-donut small { font: 700 .66rem var(--font-body); color: var(--text-secondary); }
.rv-macro-key { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .35rem; font: 600 .88rem var(--font-body); }
.rv-macro-key i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .45rem; }
.rv-day { display: flex; flex-direction: column; gap: .3rem; margin-top: .9rem; font: 600 .8rem var(--font-body); color: var(--text-secondary); }
.rv-day-bar { height: 8px; border-radius: 999px; background: var(--bg-tertiary); overflow: hidden; }
.rv-day-bar i, .rv-bar i { display: block; height: 100%; border-radius: inherit; background: var(--f, var(--teal)); animation: rvBar .8s var(--ease-out) both; transform-origin: left; }
@keyframes rvBar { from { transform: scaleX(0); } }
.rv-fine { margin: .5rem 0 0; font-size: .78rem; color: var(--text-muted); }

/* ---- timeline ---- */
.rv-timeline h4 { margin: 0; font: 780 1.15rem var(--font-display); }
.rv-time-total { margin: .1rem 0 .8rem; color: var(--text-secondary); font-weight: 600; }
.rv-time-bar { display: flex; gap: 3px; height: 2.6rem; margin-bottom: .6rem; }
.rv-seg { display: flex; align-items: center; justify-content: center; gap: .3rem; min-width: 3.5rem; padding: 0 .6rem; border-radius: 10px; font: 600 .78rem var(--font-body); white-space: nowrap; animation: rvBar .8s var(--ease-out) both; transform-origin: left; }
.rv-seg b { font-weight: 800; }
.rv-seg.is-prep { background: var(--saffron-soft); color: var(--saffron-deep); }
.rv-seg.is-cook { background: var(--tomato); color: #fff; }
.rv-seg.is-rest { background: var(--bg-tertiary); }
.rv-time-meta { display: flex; gap: 1rem; margin-bottom: .8rem; font: 600 .82rem var(--font-body); color: var(--text-secondary); }

/* ---- shopping ---- */
.rv-aisles { display: grid; gap: .8rem; }
@container thread (min-width: 560px) { .rv-aisles { grid-template-columns: 1fr 1fr; } }
.rv-aisle h5 { margin: 0 0 .25rem; padding-bottom: .25rem; border-bottom: 1px solid var(--line); font: 800 .8rem var(--font-body); color: var(--text-secondary); }
.rv-aisle ul { margin: 0; padding: 0; list-style: none; }
.rv-item.is-have .rv-ing-text { opacity: .55; }
.rv-amt-txt { font-weight: 700; color: var(--text-secondary); }
.rv-shop-actions { margin-top: .8rem; }

/* ---- compare ---- */
.rv-compare { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
.rv-col-card { flex: 1 0 min(250px, 78%); display: flex; flex-direction: column; gap: .6rem; padding: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--lift); scroll-snap-align: start; }
.rv-col-card .rv-art { border-radius: 12px; }
.rv-col-card h4 { margin: 0; font: 760 1rem/1.2 var(--font-display); }
.rv-dl { display: grid; grid-template-columns: 4.5rem 1fr; gap: .45rem .5rem; margin: 0; font: 600 .8rem var(--font-body); align-items: center; }
.rv-dl dt { color: var(--text-muted); }
.rv-dl dd { margin: 0; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.rv-bar { flex: 1 1 3rem; min-width: 3rem; height: 8px; border-radius: 999px; background: var(--bg-tertiary); overflow: hidden; }
.rv-bar.is-time i { background: var(--blueberry); } .rv-bar.is-kcal i { background: var(--chili); } .rv-bar.is-pro i { background: var(--rose); }
.rv-win { padding: .05rem .5rem; border-radius: 999px; background: var(--saffron); color: var(--ink-deep); font: 800 .68rem var(--font-body); }
.rv-na { color: var(--text-muted); }

/* ---- pairing / plan ---- */
.rv-pair-base { margin: 0 0 .6rem; color: var(--text-secondary); }
.rv-days { margin: 0; padding: 0; list-style: none; display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.rv-day-card { position: relative; flex: 0 0 min(210px, 70%); display: flex; flex-direction: column; gap: .5rem; padding: .6rem; border: 1px solid var(--line); border-radius: 14px; background: var(--f-soft); scroll-snap-align: start; }
.rv-day-card .rv-art { border-radius: 10px; }
.rv-day-name { font: 800 .72rem var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--f-deep); }
.rv-plan-stats { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .5rem 0 0; font: 600 .84rem var(--font-body); color: var(--text-secondary); }
.rv-plan-stats b { color: var(--text-primary); }

/* ---- swap ---- */
.rv-swap-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .9rem; }
.rv-swap-head .rv-art { width: 120px; flex: none; border-radius: 12px; }
.rv-kicker { margin: 0; font: 700 .76rem var(--font-body); color: var(--f-deep, var(--text-secondary)); }
.rv-swap-head h4 { margin: 0 0 .5rem; font: 800 1.45rem/1.05 var(--font-display); font-stretch: 92%; text-transform: capitalize; }
.rv-qty { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; font: 600 .82rem var(--font-body); color: var(--text-secondary); }
.rv-qty input { width: 4.6rem; padding: .35rem .5rem; border: 1px solid var(--border-strong); border-radius: 8px; font: 700 .9rem var(--font-body); }
.rv-swap-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.rv-swap-item { position: relative; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.rv-swap-item.is-top { background: var(--f-soft); border-color: var(--f); }
.rv-top { position: absolute; top: -.55rem; right: .8rem; padding: .08rem .55rem; border-radius: 999px; background: var(--f); color: #fff; font: 800 .68rem var(--font-body); }
.rv-swap-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.rv-swap-row h5 { margin: 0; font: 760 1rem var(--font-display); }
.rv-pips { display: inline-flex; gap: 3px; }
.rv-pips i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--bg-tertiary); border: 1px solid var(--border-strong); }
.rv-pips i.on { background: var(--leaf); border-color: var(--leaf); }
.rv-swap-visual { display: flex; align-items: center; gap: .6rem; margin: .55rem 0; color: var(--text-muted); }
.rv-vessel { position: relative; display: flex; align-items: flex-end; width: 1.7rem; height: 2.6rem; border: 2px solid var(--ink-deep); border-top: 0; border-radius: 0 0 8px 8px; background: #fff; overflow: hidden; }
.rv-vessel i { display: block; width: 100%; background: var(--f); opacity: .85; transition: height .5s var(--ease-out); }
.rv-vessel--to i { background: var(--leaf); }
.rv-vessel u { position: absolute; inset: 0 0 auto; height: 3px; background: var(--tomato); }
.rv-ratio { font: 600 .88rem var(--font-body); color: var(--text-primary); }
.rv-ratio b { font-weight: 800; font-size: 1.05rem; }
.rv-swap-note { margin: 0 0 .3rem; font-size: .88rem; line-height: 1.45; color: var(--text-secondary); }
.rv-swap-adj { margin: 0 0 .3rem; padding: .35rem .6rem; border-left: 3px solid var(--saffron); background: var(--saffron-soft); border-radius: 0 8px 8px 0; font-size: .82rem; }
.rv-swap-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0 0; }
.rv-swap-tags span:not(.rv-diet) { padding: .1rem .5rem; border-radius: 999px; background: var(--bg-tertiary); font: 600 .72rem var(--font-body); color: var(--text-secondary); }

/* ---- conversion ---- */
.rv-conv-main { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; }
.rv-from { font: 700 1.05rem var(--font-body); color: var(--text-secondary); }
.rv-conv-arrow { color: var(--tomato); display: inline-flex; }
.rv-big { font: 800 2.4rem/1 var(--font-display); font-stretch: 90%; letter-spacing: -.03em; color: var(--ink-deep); }
.rv-big small { font-size: 1.1rem; margin-left: .15rem; color: var(--tomato); }
.rv-big--unit { font-size: 1.9rem; }
.rv-conv-eq { font: 700 1.1rem var(--font-body); color: var(--text-secondary); }
.rv-cup { height: .6rem; margin: .8rem 0 .2rem; border-radius: 999px; background: var(--bg-tertiary); overflow: hidden; } .rv-cup i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--saffron), var(--chili)); animation: rvBar .9s var(--ease-out) both; transform-origin: left; }
.rv-thermo { margin: .9rem 0 .2rem; }
.rv-thermo-bar { display: block; height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--blueberry-soft), var(--saffron-soft) 45%, var(--chili-soft) 70%, var(--tomato-soft)); position: relative; overflow: hidden; }
.rv-thermo-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--saffron), var(--chili), var(--tomato)); border-radius: inherit; animation: rvBar 1s var(--ease-out) both; transform-origin: left; }
.rv-thermo-ticks { display: flex; justify-content: space-between; margin-top: .25rem; font: 600 .7rem var(--font-body); color: var(--text-muted); }
.rv-thermo-ticks u { text-decoration: none; }

/* ---- fix ---- */
.rv-fix header { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.rv-fix-ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--rose-soft); color: var(--rose-deep); }
.rv-fix h4 { margin: 0; font: 800 1.3rem var(--font-display); }
.rv-fix-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.rv-fix-steps li { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 12px; font-size: .94rem; line-height: 1.5; }
.rv-fix-steps .rv-step-num { background: var(--rose); }

/* ---- taste ---- */
.rv-taste-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.rv-taste-list li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; font: 600 .9rem var(--font-body); text-transform: capitalize; }
.rv-taste-list em { color: var(--text-muted); font-style: normal; font-size: .76rem; text-transform: none; }
.rv-taste-list .rv-bar { flex: 0 0 45%; }

/* ---- welcome "tonight" ---- */
.rv-tonight { margin: 1.6rem 0 0; text-align: left; }
.rv-tonight[hidden] { display: none; }
.rv-tonight-h { font-family: var(--font-display); }
.rv-tonight .rv-card { animation-duration: .6s; }

/* ---- constraint tray above the composer ---- */
.rv-tray { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0 0 .5rem; padding: 0 .2rem; }
.rv-tray[hidden] { display: none; }
.rv-tray-label { font: 700 .74rem var(--font-body); color: var(--text-muted); margin-right: .2rem; }

/* ---- timers dock ---- */
.rv-dock { position: fixed; left: 1rem; bottom: 1rem; z-index: 2100; display: flex; flex-direction: column; gap: .4rem; max-width: min(320px, calc(100vw - 2rem)); }
.rv-dock[hidden] { display: none; }
.rv-dock-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .5rem .5rem .8rem; border-radius: 14px; background: var(--ink-deep); color: #fff; box-shadow: 0 10px 26px -10px rgba(11,27,30,.6); font: 600 .84rem var(--font-body); }
.rv-dock-item b { font: 800 1.1rem var(--font-display); font-variant-numeric: tabular-nums; margin-left: auto; }
.rv-dock-item button { width: 1.7rem; height: 1.7rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.rv-dock-item.is-done { background: var(--tomato); animation: rvShake .6s ease 2; }
@keyframes rvShake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }

/* ---- LLM text enhancements ---- */
.msg-callout { margin: .8rem 0; padding: .7rem .9rem; border-left: 4px solid var(--teal); border-radius: 0 12px 12px 0; background: var(--teal-soft); }
.msg-callout p { margin: 0; font-size: .92rem; }
.msg-callout-label { display: block; margin-bottom: .15rem; font: 800 .74rem var(--font-body); color: var(--teal-deep); }
.msg-callout--tip { border-color: var(--saffron); background: var(--saffron-soft); } .msg-callout--tip .msg-callout-label { color: var(--saffron-deep); }
.msg-callout--warn { border-color: var(--tomato); background: var(--tomato-soft); } .msg-callout--warn .msg-callout-label { color: var(--tomato-deep); }
.msg-bubble-rich .msg-steps .rv-step-btn { padding: .55rem .7rem; }
.msg-bubble-rich .msg-ing-list { margin: .4rem 0 .8rem; }
.msg-bubble-rich { --f: var(--teal); --f-soft: var(--teal-soft); --f-deep: var(--teal-deep); }

/* ---- cook mode ---- */
body.cm-open { overflow: hidden; }
.cm { position: fixed; inset: 0; z-index: 2000; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100dvh; background: var(--f-soft, var(--bg-primary)); color: var(--ink-deep); animation: cmIn .35s var(--ease-out); }
@keyframes cmIn { from { opacity: 0; transform: translateY(16px); } }
.cm-top { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; }
.cm-x { width: 2.6rem; height: 2.6rem; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.5rem; cursor: pointer; }
.cm-title { flex: 1; display: flex; flex-direction: column; min-width: 0; } .cm-title b { font: 800 1.1rem var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cm-title span { font: 700 .8rem var(--font-body); color: var(--text-secondary); }
.cm-progress { height: 5px; background: rgba(11,27,30,.1); } .cm-progress i { display: block; height: 100%; width: 0; background: var(--f); transition: width .4s var(--ease-out); }
.cm-stage { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem; padding: 1rem 1.4rem; overflow-y: auto; outline: none; text-align: center; }
.cm-art { width: min(260px, 44vw); border-radius: 18px; overflow: hidden; background: var(--f); box-shadow: var(--lift-2); } .cm-art img { display: block; width: 100%; height: auto; }
.cm-art.is-fallback { aspect-ratio: 500/368; }
.cm-text { max-width: 28ch; margin: 0; font: 700 clamp(1.5rem, 4.2vw, 2.5rem)/1.2 var(--font-display); letter-spacing: -.02em; font-stretch: 94%; }
.cm-text.is-in { animation: cmText .45s var(--ease-out); } @keyframes cmText { from { opacity: 0; transform: translateX(18px); } }
.cm-timers { min-height: 2.4rem; }
.cm-ing { position: absolute; right: 0; top: 4.6rem; bottom: 4.6rem; width: min(360px, 88vw); padding: 1rem; overflow-y: auto; background: #fff; border-left: 1px solid var(--line); box-shadow: -10px 0 30px -18px rgba(11,27,30,.5); }
.cm-ing[hidden] { display: none; } .cm-ing h4 { margin: 0 0 .6rem; font: 800 1.05rem var(--font-display); }
.cm-nav { display: flex; gap: .7rem; padding: .9rem 1rem calc(.9rem + env(safe-area-inset-bottom)); } .cm-nav .rv-btn { flex: 1; min-height: 52px; font-size: 1rem; }
.cm .rv-timer { font-size: .95rem; padding: .5rem 1.1rem; }

/* ---- small screens ---- */
@media (max-width: 560px) {
  .rv-intro { font-size: .94rem; }
  .rv-sheet, .rv-nutri, .rv-shop, .rv-timeline, .rv-swap, .rv-conv, .rv-fix, .rv-taste, .rv-plan, .rv-pair { padding: .8rem; }
  .rv-nutri-head .rv-art, .rv-swap-head .rv-art { width: 92px; }
  .rv-donut { width: 6rem; height: 6rem; }
  .rv-dock { left: .6rem; right: .6rem; bottom: 5.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-card, .rv-fl-bars i, .rv-ring-fg, .rv-donut circle, .rv-day-bar i, .rv-bar i, .rv-seg, .rv-thermo-bar i, .rv-cup i, .cm, .cm-text.is-in, .rv-dock-item.is-done { animation: none !important; }
  .rv-card, .rv-btn, .rv-chip, .rv-fchip { transition: none; }
}

/* ---- layout fixes found in review ---- */
.chat-main .empty-state .rv-tonight { width: 100%; min-width: 0; max-width: 720px; align-self: stretch; text-align: left; }
.chat-main .empty-state .rv-tonight .rv-strip { scroll-padding-inline: 2px; }
.msg-bubble-rich ul.msg-ing-list, .msg-bubble-rich ol.msg-steps { padding-left: 0; margin-left: 0; }
.rv-big small { text-transform: uppercase; font-family: var(--font-display); }
.rv-dl dd { min-height: 1.4rem; }
.rv-why:empty { display: none; }
.tt-static { cursor: inherit; }
button.tt-temp { cursor: pointer; }

/* ---- Premium-only actions in chat (PremiumBundle::chatFeatures) ---- */
.rv-btn--locked { text-decoration: none; border-style: dashed; color: var(--text-secondary); }
.rv-btn--locked:hover { color: var(--text-primary); }
.rv-premium-tag { font: 800 .68rem var(--font-body); padding: .1rem .4rem; border-radius: 999px; background: var(--saffron-soft); color: var(--saffron-deep, #6b4504); }
.rv-day-card.is-locked { display: grid; align-content: center; justify-items: center; gap: .5rem; min-height: 150px; border: 1px dashed var(--line); background: var(--bg-tertiary, #eef2f1); color: var(--text-secondary); }
.rv-day-lock { display: inline-flex; align-items: center; gap: .3rem; font: 800 .78rem var(--font-body); }
.rv-plan-lock { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: .75rem 0 0; padding: .7rem .85rem; border-radius: 12px; background: var(--saffron-soft); font-size: .88rem; }
.rv-plan-lock > span { flex: 1 1 14rem; }
.rv-plan-lock .rv-btn { text-decoration: none; }
