/* ============================================================
   Smaak — App screen UI  ·  Vermilion Press (LIVE palette)
   Faithful recreation of the real app screens. All screen
   markup lives inside .screen390 (a fixed 390×844 canvas that
   the phone bezel scales to fit). Sharp 4px cards, hairline
   borders, no shadows, vermilion as the single accent.
   ============================================================ */

.screen390 {
  --s-bg:      #FFFFFF;
  --s-surface: #FAFAF9;
  --s-hair:    #E7E5E1;
  --s-ink:     #161412;
  --s-ink2:    #3D3A36;
  --s-mut:     #73706A;
  --s-dis:     #AEAAA3;
  --s-accent:  var(--vermilion, #DB3A2B);
  --s-onink:   #FFFFFF;
  --s-tabink:  #57534C;
  --s-blush:   #F3E4E0;
  --s-oat:     #EFEAE3;
  --s-stone:   #E8E5DF;

  position: absolute; top: 0; left: 0;
  width: 390px; height: 844px;
  transform-origin: top left;
  background: var(--s-bg);
  font-family: var(--font-ui);
  color: var(--s-ink);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.screen390 * { box-sizing: border-box; }

/* status bar */
.s-status { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 26px 0 30px; flex-shrink: 0; }
.s-status .time { font-size: 14px; font-weight: 600; color: var(--s-ink); letter-spacing: .3px; }
.s-status .right { display: flex; gap: 6px; align-items: center; color: var(--s-ink); }

.s-pad { padding: 0 22px; }
.s-rule { height: 1px; background: var(--s-hair); }
.s-scroll { flex: 1; overflow: hidden; }

/* masthead */
.s-mast { display: flex; align-items: flex-end; justify-content: space-between; padding: 14px 22px; gap: 10px; }
.s-mast-k { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--s-mut); }
.s-mast-t { font-family: var(--font-display); font-weight: 700; font-size: 36px; letter-spacing: -.02em; color: var(--s-ink); line-height: 1; margin-top: 3px; }
.s-acts { display: flex; gap: 8px; padding-bottom: 4px; }
.s-rbtn { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.s-rbtn.outline { border: 1px solid var(--s-hair); color: var(--s-ink); position: relative; }
.s-rbtn.filled { background: var(--s-accent); color: var(--s-onink); }
.s-pantrybadge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--s-accent); color: #fff; font-size: 9px; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* plate fills (recipe imagery — warm neutral tonal block + plate ring) */
.plate { position: relative; overflow: hidden; }
.plate.blush { background: var(--s-blush); }
.plate.oat   { background: var(--s-oat); }
.plate.stone { background: var(--s-stone); }
.plate::after { content: ''; position: absolute; inset: 0; margin: auto; width: 54%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(22,18,15,.10); }
.plate.sm::after { width: 60%; }

/* kicker accent */
.s-kacc { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--s-accent); }
.s-blurb { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 14px; line-height: 1.5; color: var(--s-ink2); }

/* planned hero card */
.s-hero { background: var(--s-surface); border: 1px solid var(--s-hair); border-radius: 4px; overflow: hidden; margin-bottom: 26px; }
.s-hero-photo { height: 196px; position: relative; display: flex; align-items: flex-start; padding: 14px; }
.s-badge-ink { background: var(--s-accent); color: var(--s-onink); font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 5px 9px; border-radius: 2px; }
.s-hero-body { padding: 16px 18px 18px; }
.s-hero-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; color: var(--s-ink); line-height: 1.16; margin: 5px 0 8px; }
.s-cta-row { display: flex; gap: 10px; margin-top: 16px; }
.s-btn { border-radius: 2px; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; display: flex; align-items: center; justify-content: center; padding: 14px 12px; }
.s-btn-ink { background: var(--s-accent); color: var(--s-onink); flex: 2; }
.s-btn-out { border: 1px solid var(--s-hair); color: var(--s-ink); flex: 1; }

/* section head */
.s-sechead { display: flex; align-items: flex-end; justify-content: space-between; padding-top: 4px; padding-bottom: 14px; }
.s-sechead .k { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--s-mut); }
.s-sechead .t { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.015em; color: var(--s-ink); margin-top: 2px; }
.s-sechead .a { font-size: 12px; font-weight: 600; color: var(--s-ink); text-decoration: underline; text-underline-offset: 3px; }

/* week rail (kitchen) */
.s-weekrail { display: flex; gap: 10px; overflow: hidden; padding: 0 22px 26px; }
.s-daycard { width: 130px; flex-shrink: 0; background: var(--s-surface); border: 1px solid var(--s-hair); border-radius: 4px; overflow: hidden; }
.s-daycard .dh { padding: 10px 12px 8px; border-bottom: 1px solid var(--s-hair); display: flex; align-items: baseline; justify-content: space-between; }
.s-daycard .dn { font-size: 9px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--s-mut); }
.s-daycard .dnum { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--s-ink); letter-spacing: -.02em; }
.s-daycard .dphoto { height: 64px; }
.s-daycard .dcap { padding: 8px 12px 10px; }
.s-daycard .dtitle { font-family: var(--font-display); font-weight: 700; font-size: 13px; line-height: 1.25; color: var(--s-ink); letter-spacing: -.01em; }
.s-daycard .dempty { padding: 22px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.s-dempty .circle { width: 24px; height: 24px; border-radius: 50%; border: 1px dashed var(--s-dis); display: flex; align-items: center; justify-content: center; color: var(--s-mut); }
.s-dempty .open { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--s-dis); }

/* revisit card */
.s-revisit { display: flex; min-height: 150px; background: var(--s-surface); border: 1px solid var(--s-hair); border-radius: 4px; overflow: hidden; }
.s-revisit .rimg { width: 132px; flex-shrink: 0; }
.s-revisit .rbody { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; }
.s-revisit .rtitle { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.16; letter-spacing: -.015em; color: var(--s-ink); margin: 4px 0 6px; }
.s-revisit .rlink { font-size: 11px; font-weight: 600; color: var(--s-ink); text-decoration: underline; text-underline-offset: 3px; }

/* library: filter tags */
.s-filters { display: flex; gap: 6px; padding: 0 22px 18px; overflow: hidden; }
.s-ftag { font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; padding: 7px 12px; border-radius: 2px; border: 1px solid #C9C5BD; color: var(--s-ink); white-space: nowrap; flex-shrink: 0; }
.s-ftag.active { background: var(--s-ink); border-color: var(--s-ink); color: #fff; }

/* library: recipe grid */
.s-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 22px 24px; }
.s-tile { background: var(--s-surface); border: 1px solid var(--s-hair); border-radius: 4px; overflow: hidden; }
.s-tile .timg { aspect-ratio: 4/3; }
.s-tile .tcap { padding: 10px 12px 12px; }
.s-tile .tk { font-size: 9px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--s-mut); }
.s-tile .tt { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--s-ink); letter-spacing: -.01em; margin-top: 4px; }
.s-tile .ts { font-size: 11px; font-weight: 600; margin-top: 5px; }
.s-tile .ts.ok { color: #2E7D46; }
.s-tile .ts.low { color: var(--s-accent); }

/* library featured (reuse hero) */
.s-feat-cap { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--s-mut); display: flex; gap: 6px; }

/* planner: mode tabs */
.s-modetabs { display: flex; gap: 4px; background: var(--s-surface); border: 1px solid var(--s-hair); border-radius: 2px; padding: 6px 9px; margin: 14px 22px 0; }
.s-modetab { flex: 1; text-align: center; padding: 8px 0; border-radius: 2px; font-size: 10px; font-weight: 600; letter-spacing: .8px; color: var(--s-mut); }
.s-modetab.active { background: var(--s-accent); color: var(--s-onink); }

/* planner: week strip */
.s-pstrip { display: flex; gap: 6px; padding: 16px 22px 22px; }
.s-pday { flex: 1; min-height: 66px; border: 1px solid var(--s-hair); border-radius: 4px; background: var(--s-surface); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; }
.s-pday .pn { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--s-mut); }
.s-pday .pnum { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--s-ink); letter-spacing: -.02em; }
.s-pday .pdot { width: 5px; height: 5px; border-radius: 50%; background: var(--s-accent); }
.s-pday .pspace { width: 5px; height: 5px; }
.s-pday.sel { background: var(--s-accent); border-color: var(--s-accent); }
.s-pday.sel .pn { color: rgba(255,255,255,.82); }
.s-pday.sel .pnum { color: var(--s-onink); }
.s-pday.sel .pdot { background: #fff; }
.s-pday.past { opacity: .45; }

/* planner: day plan block */
.s-dpb { padding: 0 22px; }
.s-dpb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.s-dpb-head .t { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.015em; color: var(--s-ink); white-space: nowrap; }
.s-dpb-head .ln { flex: 1; height: 1px; background: var(--s-hair); }
.s-slot { display: flex; align-items: center; height: 92px; overflow: hidden; background: var(--s-surface); border: 1px solid var(--s-hair); border-radius: 4px; margin-bottom: 8px; }
.s-slot .sthumb { width: 92px; align-self: stretch; }
.s-slot .sbody { flex: 1; padding: 0 16px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.s-slot .sk { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--s-mut); }
.s-slot .st { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.2; letter-spacing: -.01em; color: var(--s-ink); }
.s-slot .sopt { padding: 0 16px; align-self: stretch; display: flex; align-items: center; color: var(--s-dis); }
.s-slot-empty { display: flex; align-items: center; justify-content: space-between; padding: 16px; border: 1px dashed var(--s-hair); border-radius: 4px; margin-bottom: 8px; }
.s-slot-empty .sl { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--s-dis); }
.s-slot-empty .add { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; letter-spacing: 1px; color: var(--s-dis); }

/* shopping */
.s-shop-sec { padding: 0 22px; }
.s-shop-head { display: flex; justify-content: space-between; align-items: baseline; padding: 20px 0 10px; }
.s-shop-head .t { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--s-ink); letter-spacing: -.015em; }
.s-shop-head .c { font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--s-mut); }
.s-shop-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--s-hair); }
.s-shop-row.done { opacity: .5; }
.s-check { width: 18px; height: 18px; border: 1.5px solid #C9C5BD; border-radius: 2px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.s-shop-row.done .s-check { border-color: var(--s-ink); background: var(--s-ink); }
.s-check .tick { width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px); display: none; }
.s-shop-row.done .s-check .tick { display: block; }
.s-shop-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--s-ink); letter-spacing: -.01em; }
.s-shop-row.done .s-shop-name { text-decoration: line-through; }
.s-shop-src { font-family: var(--font-display); font-style: italic; font-size: 11px; color: var(--s-mut); margin-top: 1px; }
.s-shop-qty { font-size: 11px; font-weight: 600; color: var(--s-ink2); text-transform: uppercase; letter-spacing: .8px; flex-shrink: 0; }

/* cooking mode (light) */
.s-cook { display: flex; flex-direction: column; flex: 1; min-height: 0; background: var(--s-bg); }
.s-cook-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px 0; }
.s-cook-topbtn { font-size: 11px; font-weight: 600; color: var(--s-mut); }
.s-cook-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 22px 18px; text-align: center; }
.s-cook-num { font-family: var(--font-display); font-weight: 700; font-size: 88px; line-height: .9; color: var(--s-accent); letter-spacing: -3px; margin-bottom: 8px; }
.s-cook-steplabel { font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--s-dis); margin-bottom: 22px; }
.s-cook-instruction { font-family: var(--font-display); font-weight: 400; font-size: 21px; line-height: 1.5; letter-spacing: -.2px; color: var(--s-ink); max-width: 320px; text-wrap: pretty; }
.s-cook-timer { display: inline-flex; align-items: center; gap: 7px; margin-top: 24px; padding: 11px 17px; border-radius: 999px; border: 1.5px solid var(--s-accent); color: var(--s-accent); font-size: 12.5px; font-weight: 600; letter-spacing: .3px; }
.s-cook-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 16px 14px; border-top: 1px solid var(--s-hair); }
.s-cook-dot { width: 6px; height: 4px; border-radius: 2px; background: var(--s-hair); }
.s-cook-dot.on { width: 22px; background: var(--s-accent); }
.s-cook-dot.done { background: var(--s-dis); }
.s-cook-nav { display: flex; gap: 12px; padding: 0 16px 16px; }
.s-cook-prev { flex: 1; border: 1px solid var(--s-dis); border-radius: 2px; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--s-ink); }
.s-cook-next { flex: 2; background: var(--s-accent); color: #fff; border-radius: 2px; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }

/* home indicator (in-flow strip below the bar) */
.s-homebar { height: 26px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--s-bg); }
.s-homebar span { width: 134px; height: 5px; border-radius: 99px; background: var(--s-ink); opacity: .85; }

/* ============================================================
   Tab bar — edge-to-edge, top hairline, filled vermilion active
   icon (detail strokes cut out in card color). No shadow.
   ============================================================ */
.s-tabbar { display: flex; background: var(--s-bg); border-top: 1px solid var(--s-hair); padding: 22px 10px 18px; flex-shrink: 0; }
.s-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0; min-height: 72px; color: var(--s-tabink); --cut: var(--s-tabink); }
.s-tab .tlabel { font-size: 11.5px; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; color: var(--s-mut); }
.s-tab svg { display: block; width: 28px; height: 28px; }
.s-tab.on { color: var(--s-accent); --cut: var(--s-bg); }
.s-tab.on .tlabel { color: var(--s-accent); font-weight: 600; }
.s-tab.on svg { transform: translateY(-1px); }
