/* ============================================================
   Cozinha de Domingo — design system
   Tokens extracted from the approved Mockup A: warm cream + terracotta,
   deep-brown ink, Fraunces display + Hanken Grotesk UI.
   ============================================================ */

:root {
  /* surfaces */
  --bg: #FBF6EE;
  --bg-warm: #F4E9D8;
  --surface: #FFFDF9;
  --surface-2: #FBF4EA;

  /* ink */
  --ink: #33241B;
  --ink-soft: #6E5C4E;
  --ink-faint: #7E6B58;

  /* brand */
  --accent: #BD4C27;
  --accent-deep: #A8401D;
  --accent-soft: #F6E2D6;
  --gold: #D89A3E;
  --gold-deep: #946A22;
  --green: #6E7C4F;
  --green-soft: #E9ECDD;
  --green-deep: #556237;

  /* lines */
  --line: #EBE0D0;
  --line-soft: #F1E9DC;

  /* type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* radii */
  --r-card: 24px;
  --r-tile: 18px;
  --r-field: 16px;
  --r-pill: 999px;
  --r-chip: 12px;

  /* shadows (warm-tinted) */
  --shadow-sm: 0 1px 2px rgba(74,48,30,.05), 0 2px 8px rgba(74,48,30,.05);
  --shadow-md: 0 8px 24px rgba(74,48,30,.10);
  --shadow-lg: 0 20px 54px rgba(74,48,30,.18);

  --maxw: 460px;
  --tabbar-h: 74px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- display type ---- */
.serif { font-family: var(--serif); }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 8vw, 34px); font-variation-settings: "opsz" 110, "SOFT" 44, "WONK" 0; }
h2 { font-size: 22px; font-variation-settings: "opsz" 60, "SOFT" 40; }
h3 { font-size: 18px; font-variation-settings: "opsz" 36, "SOFT" 30; }
.eyebrow { font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

/* ============================================================
   App shell — mobile-first; a device frame on wide screens
   ============================================================ */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}
.screen {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.pad { padding: 20px 20px 0; }
.screen.has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); }
.screen.immersive { padding-bottom: calc(24px + var(--safe-b)); }

@media (min-width: 720px) {
  body {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    background:
      radial-gradient(1200px 600px at 50% -10%, #F7ECDD, transparent),
      linear-gradient(160deg, #F1E5D2, #E7D8C0);
    padding: 28px;
  }
  .app {
    width: var(--maxw);
    height: min(94dvh, 940px);
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(74, 48, 30, .07);
  }
}

/* ============================================================
   Top bar / greeting
   ============================================================ */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: calc(14px + var(--safe-t)) 20px 6px;
}
.topbar .grow { flex: 1; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep));
  color: #FBF1E3; display: grid; place-items: center;
  overflow: hidden; flex: none; box-shadow: var(--shadow-sm);
}
.avatar svg { width: 26px; height: 26px; }
.avatar.lg { width: 66px; height: 66px; }
.avatar.lg svg { width: 38px; height: 38px; }
.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head h2 { margin: 3px 0; }
.profile-head .hi { font-size: 13px; color: var(--ink-soft); }
.result-label { padding: 16px 20px 2px; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-faint); }
.hi { font-size: 13px; color: var(--ink-soft); }
.hi b { display: block; font-size: 16px; color: var(--ink); font-weight: 700; }
.iconbtn {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); display: grid; place-items: center;
  transition: transform .15s var(--ease), background .15s;
}
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 20px; height: 20px; }

/* page header with back */
.pagehead { display: flex; align-items: center; gap: 12px; padding: calc(14px + var(--safe-t)) 20px 8px;
  position: sticky; top: 0; z-index: 25; background: var(--bg); }
.pagehead h1 { flex: 1; text-align: center; font-size: 22px; font-variation-settings: "opsz" 60, "SOFT" 40; }

/* immersive detail sticky back (recipe): transparent over hero, solid on scroll */
.detail-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + var(--safe-t)) 14px 8px; pointer-events: none; transition: background .25s var(--ease); }
.detail-topbar .dt-back { pointer-events: auto; background: rgba(255,255,255,.92); border-color: transparent; box-shadow: var(--shadow-sm); }
.detail-topbar .dt-title { flex: 1; min-width: 0; font-family: var(--serif); font-size: 17px;
  font-variation-settings: "opsz" 40, "SOFT" 50; color: var(--ink);
  opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s var(--ease);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-topbar.scrolled { background: var(--bg); box-shadow: 0 1px 0 var(--line-soft); }
.detail-topbar.scrolled .dt-back { background: var(--surface); }
.detail-topbar.scrolled .dt-title { opacity: 1; transform: none; }
.detail-topbar + .recipe-hero { margin-top: calc(-60px - var(--safe-t)); }
.pagehead .iconbtn:last-child { visibility: hidden; } /* balance spacing */

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 54px; padding: 0 22px; width: 100%;
  border: none; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 700; letter-spacing: .005em;
  transition: transform .14s var(--ease), background .2s, box-shadow .2s;
}
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 46%), var(--accent);
  color: #fff; box-shadow: 0 8px 20px rgba(168,64,29,.28); }
.btn-primary:active { transform: scale(.985);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 46%), var(--accent-deep); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:active { transform: scale(.985); background: var(--surface-2); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-sm { min-height: 42px; font-size: 14px; padding: 0 18px; width: auto; }

/* in-flow primary action (sits at end of content — never floats over it) */
.cta-wrap { padding: 22px 20px 6px; }
.recipe-sheet .cta-wrap { padding-left: 0; padding-right: 0; }

/* ============================================================
   Chips (dietary profiles, filters)
   ============================================================ */
.chips { display: flex; gap: 9px; overflow-x: auto; padding: 4px 20px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); border-radius: var(--r-pill);
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 17px; font-size: 13.5px; font-weight: 600;
  transition: transform .14s var(--ease), background .2s, color .2s, border-color .2s;
}
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   Cards
   ============================================================ */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-sm); }

/* hero card (Início) */
.hero-card {
  position: relative; border-radius: var(--r-card); overflow: hidden;
  box-shadow: var(--shadow-md); color: #fff; isolation: isolate;
}
.hero-card .img { aspect-ratio: 3/2; width: 100%; }
.hero-card .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,18,10,.05) 30%, rgba(30,18,10,.78));
}
.hero-card .body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; }
.hero-card .kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; opacity: .92; }
.hero-card h2 { color: #fff; margin: 4px 0 12px; }

/* quick tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-tile);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 104px;
  box-shadow: var(--shadow-sm); transition: transform .14s var(--ease);
  text-align: left;
}
.tile:active { transform: scale(.975); }
.tile .ic {
  width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
  background: linear-gradient(145deg, #F9E7DB, #F0D4C4); color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 3px 7px rgba(168,64,29,.12);
}
.tile .ic.green { background: linear-gradient(145deg, #EEF1E2, #E1E7CE); color: var(--green);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 3px 7px rgba(78,90,40,.12); }
.tile .ic.illus { background: linear-gradient(145deg, #FBF4EA, #F2E7D5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 3px 7px rgba(74,48,30,.08); }
.tile .ic.illus img { width: 40px; height: 40px; object-fit: contain; display: block; }
.tile .ic svg { width: 25px; height: 25px; }
.tile b { font-size: 15px; }
.tile span { font-size: 12.5px; color: var(--ink-soft); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 26px 20px 12px; }
.section-head a { font-size: 13.5px; font-weight: 700; color: var(--accent); }

/* day list (Cardápio) */
.daylist { display: flex; flex-direction: column; gap: 12px; padding: 6px 20px 0; }
.dayrow {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-tile);
  padding: 12px; box-shadow: var(--shadow-sm); transition: transform .14s var(--ease);
  width: 100%; text-align: left;
}
.dayrow:active { transform: scale(.985); }
.dayrow .thumb { width: 66px; height: 66px; border-radius: 14px; overflow: hidden; flex: none; background: var(--bg-warm); }
.dayrow .thumb .img { width: 100%; height: 100%; }
.dayrow .grow { flex: 1; min-width: 0; }
.dayrow .day { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.dayrow .dish { font-size: 15.5px; font-weight: 600; margin: 2px 0 6px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metachip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.metachip svg { width: 14px; height: 14px; color: var(--ink-faint); }

/* ============================================================
   Recipe detail
   ============================================================ */
.recipe-hero { position: relative; }
.recipe-hero .img { width: 100%; aspect-ratio: 3/2; }
.recipe-hero .topactions {
  position: absolute; top: calc(12px + var(--safe-t)); left: 16px; right: 16px;
  display: flex; justify-content: space-between;
}
.recipe-hero .iconbtn { background: rgba(255,255,255,.92); border-color: transparent; box-shadow: var(--shadow-sm); }
.recipe-sheet {
  position: relative; margin-top: -22px; background: var(--bg);
  border-radius: 28px 28px 0 0; padding: 32px 22px 0;
}
.recipe-sheet .grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 22px; }
.recipe-title-row { display: flex; align-items: flex-start; gap: 12px; }
.recipe-title-row h1 { flex: 1; }
.heart {
  width: 46px; height: 46px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); display: grid; place-items: center;
  transition: transform .14s var(--ease);
}
.heart:active { transform: scale(.9); }
.heart[aria-pressed="true"] { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
.heart svg { width: 22px; height: 22px; }
.metarow { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
.pillstat {
  display: inline-flex; align-items: center; gap: 7px; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--r-pill); padding: 8px 14px;
  font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow-sm);
}
.pillstat svg { width: 16px; height: 16px; color: var(--accent); }

.block { margin-top: 34px; }
.block > h3 { margin-bottom: 15px; }

/* ingredients */
.ing { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.ing:last-child { border-bottom: none; }
.ing .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.ing .name { flex: 1; font-size: 15px; }
.ing .qty { font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
.sub-note {
  display: flex; gap: 10px; background: var(--green-soft); border-radius: 14px; padding: 12px 14px;
  font-size: 13px; color: #4f5a37; margin-top: 12px;
}
.sub-note svg { width: 18px; height: 18px; flex: none; color: var(--green); margin-top: 1px; }

/* step timeline */
.steps { position: relative; }
.step { position: relative; display: flex; gap: 14px; padding-bottom: 20px; }
.step:last-child { padding-bottom: 0; }
.step .marker { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; }
.step .num {
  position: relative;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink-faint);
  font-size: 13px; font-weight: 700; z-index: 1; transition: all .25s var(--ease);
}
.step .num .d { transition: opacity .18s; }
.step .num .chk { position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
  opacity: 0; transform: scale(.4); transition: opacity .22s, transform .32s var(--ease); }
.step .num .chk svg { width: 16px; height: 16px; }
.step .line { width: 2px; flex: 1; background: var(--line); margin: 4px 0 -4px; transition: background .3s var(--ease); }
.step:last-child .line { display: none; }
.step.done .num, .step.active .num { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.done .num { transform: scale(1.06); }
.step.done .num .d { opacity: 0; }
.step.done .num .chk { opacity: 1; transform: scale(1); }
.step.done .line { background: var(--accent); }
.step.done .txt h4 { text-decoration: line-through; color: var(--ink-faint); }
.step .txt { padding-top: 3px; }
.step .txt h4 { margin: 0 0 3px; font-size: 15px; font-weight: 700; font-family: var(--sans); }
.step .txt p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.step.toggle { cursor: pointer; }

/* freeze note linking to method */
.freeze-link {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile);
  padding: 14px 16px; margin-top: 22px; box-shadow: var(--shadow-sm);
  transition: transform .14s var(--ease);
}
.freeze-link:active { transform: scale(.985); }
.freeze-link .ic { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, #FBF4EA, #F2E7D5); }
.freeze-link .ic svg { width: 22px; height: 22px; }
.freeze-link .ic img { width: 32px; height: 32px; object-fit: contain; display: block; }
.freeze-link .grow { flex: 1; }
.freeze-link b { font-size: 14.5px; display: block; }
.freeze-link span { font-size: 12.5px; color: var(--ink-soft); }
.freeze-link .chev { color: var(--ink-faint); }

/* ============================================================
   Shopping list
   ============================================================ */
.aisle { margin-top: 18px; }
.aisle h3 { font-size: 13px; font-family: var(--sans); font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.check {
  display: flex; align-items: center; gap: 13px; padding: 13px 4px; width: 100%; text-align: left;
  border: none; background: none; border-bottom: 1px solid var(--line-soft);
}
.check .box {
  width: 24px; height: 24px; flex: none; border-radius: 8px; border: 2px solid var(--line);
  display: grid; place-items: center; color: #fff; transition: all .18s var(--ease);
}
.check .box svg { width: 15px; height: 15px; opacity: 0; transform: scale(.5); transition: opacity .18s, transform .18s var(--ease); }
.check[aria-checked="true"] .box { background: var(--green); border-color: var(--green); }
.check[aria-checked="true"] .box svg { opacity: 1; transform: scale(1); animation: checkPop .34s var(--ease); }
@keyframes checkPop { 0% { transform: scale(.3); } 55% { transform: scale(1.2); } 100% { transform: scale(1); } }
.check .label { flex: 1; font-size: 15px; transition: color .18s, opacity .18s; }
.check .amt { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.check[aria-checked="true"] .label { color: var(--ink-faint); text-decoration: line-through; }

/* progress bar */
.progress { height: 8px; border-radius: 8px; background: var(--bg-warm); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--green); border-radius: 8px;
  transition: width .35s var(--ease); }

/* ============================================================
   Method (Congelamento Seco)
   ============================================================ */
.method-step {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-card);
  padding: 18px; box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.method-step .n { font-family: var(--serif); font-size: 30px; color: var(--accent);
  font-variation-settings: "opsz" 60, "SOFT" 30; line-height: 1; }
.method-step h3 { margin: 8px 0 6px; }
.method-step p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.tech-row { display: flex; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.tech-row:last-child { border-bottom: none; }
.tech-row .t { font-size: 15px; font-weight: 600; flex: 1; }
.tech-row .v { font-size: 13.5px; color: var(--green-deep); font-weight: 700; }

/* ============================================================
   Materials / Bônus
   ============================================================ */
.matgrid { display: flex; flex-direction: column; gap: 12px; padding: 6px 20px 0; }
.matcard {
  display: flex; gap: 14px; align-items: center; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-tile);
  padding: 14px; box-shadow: var(--shadow-sm); transition: transform .14s var(--ease);
}
.matcard:active { transform: scale(.985); }
.matcard .cover { width: 56px; height: 72px; border-radius: 10px; flex: none; overflow: hidden;
  background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); box-shadow: var(--shadow-sm); }
.matcard .cover svg { width: 26px; height: 26px; }
.matcard .grow { flex: 1; min-width: 0; }
.matcard .tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); }
.matcard b { font-size: 15px; display: block; margin: 2px 0; }
.matcard p { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.matcard .dl { color: var(--accent); flex: none; }

/* ============================================================
   Empty states / saved
   ============================================================ */
.empty { text-align: center; padding: 60px 30px; }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px;
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.empty .ic svg { width: 30px; height: 30px; }
.empty-illus { width: 158px; height: auto; margin: 0 auto 10px; display: block; }
.empty h3 { margin-bottom: 6px; }
.empty p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ============================================================
   Tab bar
   ============================================================ */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex; align-items: stretch;
  background: rgba(251,246,238,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft); z-index: 20;
}
.tabbar[hidden] { display: none; }
.tab {
  flex: 1; border: none; background: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; color: var(--ink-faint);
  font-size: 11px; font-weight: 600; transition: color .18s;
}
.tab .ti { display: grid; place-items: center; width: 54px; height: 30px;
  border-radius: var(--r-pill); transition: background .22s var(--ease); }
.tab svg { width: 23px; height: 23px; transition: transform .18s var(--ease); }
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"] .ti { background: var(--accent-soft); }
.tab:active svg { transform: scale(.86); }

/* ============================================================
   Login (premium: photo melts into cream, ornamented wordmark)
   ============================================================ */
.login { display: flex; flex-direction: column; height: 100%; background: var(--bg); }
.login-hero { position: relative; height: 47%; min-height: 248px; flex: none; }
.login-hero .img { width: 100%; height: 100%; }
.login-hero .scrim { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(40,24,14,.20), transparent 24%, transparent 56%, var(--bg) 97%); }
.login-card {
  position: relative; z-index: 2; flex: 1; margin-top: -34px;
  background: var(--bg); border-radius: 34px 34px 0 0;
  padding: 14px 28px calc(18px + var(--safe-b));
  display: flex; flex-direction: column; justify-content: space-evenly; text-align: center;
}
.brand { font-family: var(--serif); color: var(--ink); line-height: .9; }
.brand .l { display: block; font-size: 43px;
  font-variation-settings: "opsz" 130, "SOFT" 48, "WONK" 1; }
.brand .de { display: flex; align-items: center; justify-content: center; gap: 13px;
  font-size: 22px; font-style: italic; color: var(--accent); margin: 4px 0;
  font-variation-settings: "opsz" 28, "SOFT" 70; }
.brand .de svg { width: 32px; height: 13px; color: var(--gold); }
.brand .de .flip { display: inline-flex; transform: scaleX(-1); }
.login-sub { color: var(--ink-soft); font-size: 15px; line-height: 1.46; margin: 16px auto 0; max-width: 27ch; }
.login-form { width: 100%; text-align: left; }
.field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  margin-bottom: 9px; line-height: 1.35; }
.field {
  display: flex; align-items: center; gap: 11px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-field); padding: 0 16px; height: 56px;
  box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field svg { width: 20px; height: 20px; color: var(--ink-faint); flex: none; }
.field input {
  flex: 1; border: none; outline: none; background: none; font-family: inherit;
  font-size: 16px; color: var(--ink); min-width: 0; height: 100%;
}
.field input::placeholder { color: var(--ink-faint); }
.field-error { color: var(--accent-deep); font-size: 13px; margin: 8px 2px 0; min-height: 1px; }
.login-form .btn { margin-top: 16px; }
.login-foot { display: flex; align-items: center; justify-content: center; gap: 7px;
  color: var(--ink-faint); font-size: 12.5px; }
.login-foot svg { width: 15px; height: 15px; }

/* ============================================================
   Imagery — blur-up, never hide content if JS fails
   ============================================================ */
.img { position: relative; background: var(--bg-warm); overflow: hidden; }
.img::after { content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(110deg, var(--bg-warm) 30%, #efe1cd 50%, var(--bg-warm) 70%);
  background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
.img > img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity .5s var(--ease); }
.img.placeholder::after { display: none; }
@keyframes shimmer { to { background-position: -120% 0; } }

/* placeholder food motif (until a real photo exists) */
.img.placeholder { display: grid; place-items: center;
  background: linear-gradient(150deg, #F3E4D0, #ECD7BD); color: #C49A6C; }
.img.placeholder svg { width: 34%; max-width: 84px; height: auto; opacity: .65; }

/* hero video overlay (login + home) — poster is the offline / reduced-motion fallback */
.hero-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.login-hero .scrim, .hero-card .scrim { z-index: 2; }
.hero-card .body { z-index: 3; }
@media (prefers-reduced-motion: reduce) { .hero-vid { display: none; } }

/* ============================================================
   Reveal / motion
   ============================================================ */
.reveal { opacity: 0; transform: translateY(10px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

/* whisper-quiet screen fade on every route change */
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }
.screen.anim { animation: screenIn .26s ease; }

/* heart pop when a recipe is saved */
@keyframes heartPop { 0% { transform: scale(1); } 35% { transform: scale(1.32); } 62% { transform: scale(.9); } 100% { transform: scale(1); } }
.heart.pop svg { animation: heartPop .42s var(--ease); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px + var(--safe-b));
  transform: translateX(-50%) translateY(20px);
  display: flex; align-items: center; gap: 9px;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease);
  max-width: 86vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-ic { display: inline-flex; flex: none; color: var(--gold); }
.toast-ic svg { width: 18px; height: 18px; }

/* ============================================================
   Content screens (real data): skeleton, tips, errors, freezing,
   substitutions, prose sections, tables
   ============================================================ */
.skel { height: 16px; border-radius: 8px; margin: 0 0 13px; background: var(--bg-warm);
  background-image: linear-gradient(110deg, var(--bg-warm) 30%, #efe1cd 50%, var(--bg-warm) 70%);
  background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }

.step .txt .dica { display: flex; gap: 6px; align-items: flex-start; margin: 7px 0 0; font-size: 12.5px; color: var(--gold-deep); }
.step .txt .dica svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--gold); }

.erros { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.erro { background: #FBEFE6; border: 1px solid #F0DCC9; border-radius: 14px; padding: 12px 14px; }
.erro b { display: flex; gap: 7px; align-items: flex-start; font-size: 13.5px; color: var(--accent-deep); font-weight: 700; }
.erro b svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.erro span { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 5px; line-height: 1.5; }

.block > h3 svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 3px; color: var(--accent); }
.cong, .sub { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.cong:last-child, .sub:last-child { border-bottom: none; }
.cong b, .sub b { flex: none; width: 100px; font-size: 13.5px; color: var(--ink); }
.cong span, .sub span { flex: 1; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

.prose-sec { margin-bottom: 22px; }
.prose-sec h3 { font-size: 19px; margin-bottom: 8px; font-variation-settings: "opsz" 40, "SOFT" 40; }
.prose-sec p { margin: 0 0 9px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }

.tbl { overflow-x: auto; margin: 4px 0 18px; border: 1px solid var(--line-soft); border-radius: 12px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 9px 11px; background: var(--bg-warm); color: var(--ink); font-weight: 700; }
.tbl td { padding: 9px 11px; border-top: 1px solid var(--line-soft); color: var(--ink-soft); }

.matcard .dl a { color: var(--accent); display: inline-flex; }
.matcard .cover img { width: 100%; height: 100%; object-fit: cover; }
.pdf-link { display: inline-flex; gap: 6px; align-items: center; background: none; border: none; cursor: pointer; color: var(--accent); font-size: 13.5px; font-weight: 600; padding: 8px; }
.pdf-link:disabled { opacity: .55; }
.pdf-link svg { width: 16px; height: 16px; }

/* ============================================================
   Accessibility
   ============================================================ */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
button, a, input { -webkit-tap-highlight-color: transparent; }

/* Desktop hover — subtle lift; mobile keeps the :active press */
@media (hover: hover) and (pointer: fine) {
  .tile, .dayrow, .matcard, .freeze-link, .hero-card, .chip, .btn, .iconbtn, .tab, .check, .heart, .step.toggle, [data-go] { cursor: pointer; }
  .tile:hover, .dayrow:hover, .matcard:hover, .freeze-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .chip:hover { border-color: var(--ink-faint); background: var(--surface-2); }
  .btn-primary:hover { box-shadow: 0 11px 26px rgba(168,64,29,.34); }
  .btn-ghost:hover, .iconbtn:hover { background: var(--surface-2); }
  .heart:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
