/* Recipe Share: shared screen frame and form styles (the test tracker screens these also styled are not shipped). The kitchen's own styles come from the page template. */
:root { --clay: #A8452B; --olive: #4F5E43; --track: #EADFC8; --deep: #C24400; }
[hidden] { display: none !important; }
* { -webkit-tap-highlight-color: transparent; }
@media (max-width: 520px) { body { padding: 0 !important; } #stage { border-radius: 0 !important; } }

.view { position: absolute; left: 0; top: 0; width: 375px; height: 812px; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font-family: var(--text); }
.bar { height: 66px; flex: none; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 10px 16px 0 14px; }
.bar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bar h1 { margin: 0; font-family: var(--hand); font-weight: 700; font-size: 32px; line-height: 1; white-space: nowrap; }
.tabs { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px 12px 0; border-bottom: 1.5px dashed var(--rule); }
.tabs button { height: 48px; border: none; border-bottom: 3px solid transparent; background: transparent; font-size: 15px; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--orange); font-weight: 700; }
.body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-sizing: border-box; padding: 16px 20px 30px; display: flex; flex-direction: column; gap: 22px; }

.daynav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daynav .when { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; border: none; background: transparent; padding: 0; min-height: 48px; justify-content: center; }
.daynav .when b { font-family: var(--hand); font-weight: 700; font-size: 30px; line-height: 1; }
.daynav .when span { font-style: italic; font-size: 14px; color: var(--olive); }
.round[disabled] { opacity: 0.35; }

.card { border: 1.5px dashed var(--clay); border-radius: 18px; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.card.tap { background: transparent; text-align: left; width: 100%; box-sizing: border-box; }
.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.big { font-family: var(--hand); font-weight: 700; font-size: 72px; line-height: 0.8; }
.mid { font-family: var(--hand); font-weight: 700; font-size: 34px; line-height: 1; color: var(--clay); }
.sub { font-size: 15px; }
.note { font-style: italic; font-size: 14px; color: var(--olive); }
.track { height: 14px; border-radius: 7px; background: var(--track); overflow: hidden; }
.track > i { display: block; height: 100%; border-radius: 7px; background: var(--orange); }
.track.thin { height: 8px; border-radius: 4px; }
.track.thin > i { border-radius: 4px; }
.track > i.ok { background: var(--olive); }
.track > i.over { background: var(--clay); }

h2.sec { margin: 0; font-family: var(--hand); font-weight: 700; font-size: 30px; line-height: 1.1; }
.sec-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 4px; }
.goal { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1.5px dashed var(--rule); }
.goal:last-child { border-bottom: none; }
.goal .gtop { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.goal .gtop b { font-weight: 600; font-size: 16px; }
.goal .gtop span { font-size: 14px; }
.goal .say { font-size: 13px; color: var(--olive); }
.goal .say.go { color: var(--clay); font-weight: 600; }

.cta { height: 56px; flex: none; border: none; border-radius: 28px; background: var(--orange); color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.pill.wide { width: 100%; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.linkish { border: none; background: transparent; font-size: 14px; text-decoration: underline; min-height: 44px; padding: 0 8px; color: var(--ink); }
.center { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }

.entry { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 0; border: none; border-bottom: 1.5px dashed var(--rule); background: transparent; text-align: left; width: 100%; box-sizing: border-box; }
.entry:last-child { border-bottom: none; }
.pic { width: 48px; height: 48px; border-radius: 24px; flex: none; object-fit: cover; background: var(--track); display: flex; align-items: center; justify-content: center; font-family: var(--hand); font-weight: 700; font-size: 26px; color: var(--clay); }
.entry .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.entry .txt b { font-weight: 600; font-size: 16px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .txt span { font-size: 13px; color: var(--olive); }
.kcal { font-family: var(--hand); font-weight: 700; font-size: 28px; line-height: 1; white-space: nowrap; }
.kcal small { font-family: var(--text); font-weight: 400; font-size: 12px; color: var(--olive); }
.x { width: 44px; height: 44px; flex: none; border: none; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--clay); }
.meal-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid var(--rule); padding-bottom: 4px; }
.meal-head b { font-family: var(--hand); font-weight: 700; font-size: 24px; line-height: 1; }
.meal-head span { font-size: 13px; color: var(--olive); }
.empty { font-style: italic; color: var(--olive); font-size: 15px; line-height: 1.5; text-align: center; padding: 6px 10px; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select { height: 48px; box-sizing: border-box; width: 100%; min-width: 0; border: 1.5px solid var(--rule); border-radius: 12px; background: #FFFDF7; color: var(--ink); font-family: var(--text); font-size: 16px; padding: 0 12px; }
.form { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chips button { height: 44px; border: 1.5px solid var(--rule); border-radius: 22px; background: #FFFDF7; font-size: 13px; font-weight: 600; padding: 0; }
.chips button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper input { text-align: center; }
.stepper .round { flex: none; }

.chart { width: 100%; display: block; }
.chart text { font-family: var(--text); font-size: 11px; fill: var(--olive); }
.daybars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 120px; position: relative; }
.daybars button { border: none; background: transparent; padding: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.daybars i { display: block; width: 70%; border-radius: 5px 5px 0 0; background: var(--track); min-height: 2px; }
.daybars button.has i { background: var(--olive); }
.daybars button.over i { background: var(--clay); }
.daybars button.sel i { outline: 2px solid var(--orange); outline-offset: 1px; }
.daybars span { font-size: 11px; color: var(--olive); }
.daybars button.sel span { font-weight: 700; color: var(--ink); }
.goal-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed var(--clay); pointer-events: none; }

#sheetVeil { position: absolute; left: 0; top: 0; width: 375px; height: 812px; border: none; padding: 0; background: rgba(20, 14, 8, 0.5); }
#sheet { position: absolute; left: 0; top: 40px; width: 375px; height: 772px; box-sizing: border-box; background: var(--paper); color: var(--ink); font-family: var(--text); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.45); padding: 10px 18px 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; overscroll-behavior: contain; animation: sheetUp 0.28s ease both; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #sheet { animation: none; } }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; }
.sheet-top h2 { margin: 0; font-family: var(--hand); font-weight: 700; font-size: 30px; line-height: 1; }
.foodlist { display: flex; flex-direction: column; }
.picked { border: 1.5px dashed var(--clay); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
#toast { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 9; width: max-content; }
