:root {
  --bg: #f7f3ea;
  --paper: #fffdf9;
  --paper-strong: #ffffff;
  --paper-2: #eee8dc;
  --ink: #252720;
  --muted: #7d7e74;
  --line: rgba(44, 49, 39, .10);
  --line-strong: rgba(44, 49, 39, .16);
  --sage: #71846b;
  --sage-dark: #52664e;
  --sage-deep: #3f543d;
  --sage-soft: #e5eadf;
  --sage-mist: #eef1e9;
  --warm: #c99969;
  --warm-soft: #f1e3d5;
  --danger: #9f5349;
  --danger-soft: #f3dfdb;
  --shadow-sm: 0 8px 24px rgba(51, 48, 39, .05);
  --shadow: 0 18px 52px rgba(51, 48, 39, .08);
  --shadow-xl: 0 28px 80px rgba(34, 35, 30, .18);
  --radius: 24px;
  --radius-sm: 16px;
  --radius-lg: 30px;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100vh; background:
  radial-gradient(circle at 12% -8%, rgba(255,255,255,.95) 0, rgba(255,255,255,0) 30%),
  radial-gradient(circle at 100% 12%, rgba(226,234,219,.48) 0, rgba(226,234,219,0) 22%),
  var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(82,102,78,.18); outline-offset: 2px; }
#app { min-height: 100vh; }

/* Layout */
.shell { width: min(100%, 1060px); margin: 0 auto; min-height: 100vh; padding: 0 18px calc(42px + env(safe-area-inset-bottom)); }
.topbar { position: sticky; top: 0; z-index: 20; margin: 0 -4px; padding: calc(12px + env(safe-area-inset-top)) 4px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(180deg, rgba(247,243,234,.97) 74%, rgba(247,243,234,0)); backdrop-filter: blur(16px); }
.brand-wrap { display: inline-flex; align-items: center; gap: 11px; }
.brand { display: flex; flex-direction: column; gap: 0; }
.brand h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 30px; line-height: 1; letter-spacing: -1px; }
.brand span { margin-top: 4px; font-size: 11px; color: var(--muted); font-weight: 640; }
.menu-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,253,249,.74); box-shadow: var(--shadow-sm); transition: transform .16s ease, background .16s ease; }
.menu-btn:active { transform: scale(.96); }
.notification-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,253,249,.72); color: #6f7168; box-shadow: var(--shadow-sm); transition: transform .16s ease, color .16s ease, background .16s ease; }
.notification-btn:active { transform: scale(.96); }
.notification-btn.has-notifications { color: var(--sage-deep); background: rgba(255,253,249,.94); }
.notification-badge { position: absolute; top: -3px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--bg); border-radius: 999px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 820; line-height: 1; box-shadow: 0 3px 10px rgba(159,83,73,.22); }
.content { animation: pageIn .28s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(7px); } }

.icon-svg { display: inline-flex; width: 20px; height: 20px; flex: 0 0 auto; }
.icon-svg svg { width: 100%; height: 100%; }
.icon-svg svg { overflow: visible; }
.menu-btn .icon-svg, .icon-btn .icon-svg { width: 21px; height: 21px; }

/* Drawer */
.menu-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(26,29,24,.24); backdrop-filter: blur(5px); animation: fade .16s ease both; }
@keyframes fade { from { opacity: 0; } }
.side-menu { width: min(86vw, 348px); height: 100%; padding: calc(20px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; background: rgba(255,253,249,.985); border-right: 1px solid var(--line); box-shadow: 24px 0 70px rgba(26,29,24,.17); animation: drawer .22s cubic-bezier(.2,.8,.2,1) both; }
@keyframes drawer { from { opacity: .4; transform: translateX(-24px); } }
.menu-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 3px 3px 15px; }
.menu-head h3 { margin: 4px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; letter-spacing: -.7px; }
.menu-list { display: grid; gap: 7px; }
.menu-link { width: 100%; min-height: 54px; padding: 0 14px; display: flex; align-items: center; gap: 13px; border: 0; border-radius: 17px; background: transparent; font-weight: 720; text-align: left; }
.menu-link .icon-svg { color: #77796f; }
.menu-link.active { background: var(--sage-soft); color: var(--sage-deep); }
.menu-link.active .icon-svg { color: var(--sage-dark); }
.menu-count { margin-left: auto; min-width: 25px; height: 25px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--sage-dark); color: #fff; font-size: 11px; }
.menu-footer { margin-top: auto; display: grid; gap: 9px; padding-top: 20px; }
.menu-account { display: flex; align-items: center; gap: 11px; min-width: 0; }
.menu-avatar { width: 43px !important; height: 43px !important; border-radius: 15px !important; font-size: 16px !important; box-shadow: 0 8px 22px rgba(63,84,61,.14); }
.menu-notification { width: 100%; min-height: 58px; margin: 0 0 12px; padding: 9px 12px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--sage-mist); text-align: left; }
.menu-notification > .icon-svg { width: 20px; height: 20px; color: var(--sage-deep); justify-self: center; }
.menu-notification strong, .menu-notification small { display: block; }
.menu-notification strong { font-size: 13px; }
.menu-notification small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.menu-version { padding-top: 4px; color: #a1a197; text-align: center; font-size: 10px; }


/* Typography */
.eyebrow { color: var(--sage-dark); font-size: 11px; font-weight: 820; text-transform: uppercase; letter-spacing: .1em; }
.hero { padding: 22px 0 5px; }
.hero h2, .home-intro h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -1.2px; color: #272921; }
.hero h2 { margin: 7px 0 8px; font-size: clamp(30px, 7vw, 44px); line-height: 1.05; }
.hero p, .home-intro p { color: var(--muted); line-height: 1.5; }
.hero p { margin: 0; max-width: 650px; }
.home-intro { padding: 22px 0 18px; }
.home-intro h2 { margin: 7px 0 7px; font-size: clamp(31px, 8vw, 46px); line-height: 1.02; }
.home-intro p { margin: 0; font-size: 14px; }
.section { margin-top: 27px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.section-head h3 { margin: 0; font-size: 18px; line-height: 1.2; letter-spacing: -.4px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.big-number { font-family: Georgia, "Times New Roman", serif; font-size: 31px; }

/* Buttons */
.primary, .secondary, .ghost-btn, .danger-btn { min-height: 48px; padding: 0 17px; border: 0; border-radius: 16px; font-weight: 780; transition: transform .15s ease, filter .15s ease; }
.primary:active, .secondary:active, .ghost-btn:active, .danger-btn:active { transform: scale(.98); }
.primary { background: var(--sage-deep); color: #fff; box-shadow: 0 12px 28px rgba(63,84,61,.17); }
.secondary { background: var(--sage-soft); color: var(--sage-deep); }
.ghost-btn { background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.danger-btn { background: var(--danger-soft); color: var(--danger); }
.text-btn { min-height: 38px; padding: 0; border: 0; background: transparent; color: var(--sage-dark); font-weight: 780; font-size: 12px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,253,249,.92); color: var(--ink); }

/* Compact actions */
.quick-strip { display: grid; gap: 9px; }
.quick-action { min-height: 70px; padding: 10px 12px; display: grid; grid-template-columns: 42px minmax(0,1fr) 20px; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,249,.72); box-shadow: 0 10px 30px rgba(51,48,39,.035); text-align: left; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.quick-action:active { transform: scale(.99); background: var(--paper); }
.quick-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--sage-soft); color: var(--sage-dark); }
.quick-icon .icon-svg { width: 20px; height: 20px; }
.quick-action strong { display: block; font-size: 14px; line-height: 1.2; }
.quick-action small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.action-arrow { color: #aaa89d; width: 18px; height: 18px; }

/* Featured recipe */
.featured-section { margin-top: 30px; }
.featured-recipe { position: relative; width: 100%; min-height: 250px; overflow: hidden; padding: 0; border: 0; border-radius: 29px; background: #6f8069; box-shadow: 0 24px 60px rgba(58,68,53,.18); text-align: left; isolation: isolate; }
.featured-recipe img, .featured-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured-art { display: flex; align-items: center; justify-content: center; overflow: hidden; background:
  radial-gradient(circle at 75% 20%, rgba(239,225,198,.42) 0 13%, transparent 14%),
  radial-gradient(circle at 18% 80%, rgba(255,255,255,.12) 0 15%, transparent 16%),
  linear-gradient(145deg, #70836b 0%, #4c614a 78%); }
.featured-art > span { font-family: Georgia, "Times New Roman", serif; font-size: 120px; line-height: 1; color: rgba(255,255,255,.10); transform: translateY(-5px); }
.featured-art .icon-svg { position: absolute; right: 26px; top: 26px; width: 31px; height: 31px; color: rgba(255,255,255,.55); }
.featured-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,23,16,.03) 15%, rgba(20,28,19,.70) 100%); }
.featured-content { position: relative; z-index: 2; min-height: 250px; padding: 24px 22px 20px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; }
.featured-kicker { display: inline-flex; width: fit-content; max-width: 100%; margin-bottom: 8px; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.14); backdrop-filter: blur(10px); color: rgba(255,255,255,.92); font-size: 11px; font-weight: 720; }
.featured-content h3 { margin: 0; max-width: 560px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 8vw, 39px); font-weight: 500; line-height: 1.03; letter-spacing: -1px; }
.featured-meta { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: rgba(255,255,255,.79); font-size: 11px; }
.featured-open { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 760; white-space: nowrap; }
.featured-open .icon-svg { width: 16px; height: 16px; }

/* Recipes */
.recipe-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(165px, 47vw); gap: 12px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; padding: 1px 2px 8px; margin: 0 -2px; scrollbar-width: none; }
.recipe-rail::-webkit-scrollbar { display: none; }
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.recipe-card { position: relative; min-width: 0; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 23px; background: var(--paper); box-shadow: var(--shadow-sm); text-align: left; scroll-snap-align: start; transition: transform .18s ease, box-shadow .18s ease; }
.recipe-card:active { transform: scale(.985); }
.recipe-photo, .recipe-placeholder { width: 100%; aspect-ratio: 1.22 / 1; display: block; }
.recipe-photo { object-fit: cover; background: #e7e1d6; }
.recipe-placeholder { position: relative; display: grid; place-items: center; overflow: hidden; background:
  radial-gradient(circle at 76% 22%, rgba(117,137,107,.18) 0 14%, transparent 15%),
  radial-gradient(circle at 20% 78%, rgba(199,159,116,.14) 0 16%, transparent 17%),
  linear-gradient(145deg, #ece7dc, #f7f3eb); color: #7b7d73; font-family: Georgia, "Times New Roman", serif; font-size: 42px; }
.recipe-placeholder::after { content: ''; position: absolute; width: 72px; height: 72px; border: 1px solid rgba(82,102,78,.11); border-radius: 50%; }
.recipe-body { padding: 13px 13px 14px; }
.recipe-title { margin-bottom: 8px; font-size: 14px; font-weight: 790; line-height: 1.22; letter-spacing: -.1px; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 10px; }
.pill { min-height: 24px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; background: var(--paper-2); color: #686960; font-size: 10px; font-weight: 720; }
.pill.good { background: var(--sage-soft); color: var(--sage-deep); }
.pill.warn { background: var(--warm-soft); color: #895d33; }

/* Search and generic cards */
.searchbar { min-height: 51px; padding: 0 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,249,.82); box-shadow: var(--shadow-sm); color: #98998f; }
.searchbar .icon-svg { width: 19px; height: 19px; }
.searchbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.searchbar input::placeholder { color: #9b9c92; }
.card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,249,.88); box-shadow: var(--shadow-sm); }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.empty { padding: 30px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255,253,249,.4); color: var(--muted); text-align: center; }

/* Recipe detail */
.detail-hero { position: relative; margin: 5px -18px 0; }
.detail-hero img, .detail-hero .recipe-placeholder { width: 100%; aspect-ratio: 1.4 / 1; object-fit: cover; border-radius: 0 0 31px 31px; }
.back-floating { position: absolute; top: 15px; left: 18px; z-index: 2; background: rgba(255,253,249,.88); backdrop-filter: blur(14px); box-shadow: var(--shadow-sm); }
.detail-title { margin-top: 21px; }
.detail-title h2 { margin: 0 0 9px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 8vw, 42px); font-weight: 500; line-height: 1.02; letter-spacing: -1px; }
.servings { display: inline-flex; align-items: center; gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.servings button { width: 36px; height: 36px; border: 0; border-radius: 12px; background: var(--paper-2); font-size: 20px; }
.servings strong { min-width: 82px; text-align: center; font-size: 12px; }
.ingredient-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ingredient-row:last-child { border-bottom: 0; }
.qty { font-weight: 810; white-space: nowrap; }
.action-stack { display: grid; gap: 9px; margin-top: 16px; }
.action-stack.two { grid-template-columns: 1fr 1fr; }

/* Shopping */
.shopping-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.shopping-item:last-child { border-bottom: 0; }
.shopping-item strong { display: block; margin-bottom: 4px; }
.shopping-item .need { color: var(--muted); font-size: 11px; line-height: 1.45; }
.shopping-item .buy { font-size: 12px; font-weight: 820; color: var(--sage-deep); }
.package-chip { display: inline-flex; margin-top: 7px; padding: 5px 8px; border-radius: 999px; background: var(--sage-mist); color: var(--sage-dark); font-size: 10px; font-weight: 700; }
.qty-input { width: 88px; min-height: 41px; padding: 0 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper-strong); color: var(--ink); text-align: right; }

/* Stock */
.expiry { margin-top: 4px; color: var(--muted); font-size: 11px; }
.expiry.urgent { color: var(--danger); font-weight: 780; }
.stock-total { font-size: 17px; font-weight: 820; }
.lot { margin-top: 10px; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 13px; background: var(--paper-2); font-size: 11px; }
.switch { appearance: none; position: relative; width: 44px; height: 26px; border-radius: 999px; background: #dad6cd; transition: .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 2px 7px rgba(0,0,0,.14); transition: .2s; }
.switch:checked { background: var(--sage); }
.switch:checked::after { transform: translateX(18px); }

/* Modals */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; background: rgba(28,31,26,.34); backdrop-filter: blur(6px); animation: fade .16s ease both; }
.modal { width: min(100%, 680px); max-height: min(90vh, 850px); overflow: auto; padding: 19px 18px calc(26px + env(safe-area-inset-bottom)); border-radius: 29px 29px 0 0; background: var(--bg); box-shadow: 0 -22px 80px rgba(28,31,26,.20); animation: sheet .23s cubic-bezier(.2,.8,.2,1) both; }
@keyframes sheet { from { opacity: .6; transform: translateY(34px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 20px; }
.field { display: grid; gap: 6px; margin: 12px 0; }
.field label { color: var(--muted); font-size: 11px; font-weight: 760; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 15px; outline: 0; background: var(--paper); color: var(--ink); }
.field textarea { min-height: 90px; resize: vertical; }

/* Cooking mode */
.cook-shell { position: fixed; inset: 0; z-index: 100; overflow: auto; padding: calc(16px + env(safe-area-inset-top)) 18px calc(26px + env(safe-area-inset-bottom)); background:
  radial-gradient(circle at 100% 0%, rgba(224,234,216,.55), transparent 28%), var(--bg); }
.cook-top { max-width: 700px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.progress { height: 5px; max-width: 700px; margin: 17px auto 0; overflow: hidden; border-radius: 999px; background: #ddd7cc; }
.progress > div { height: 100%; background: var(--sage-dark); transition: width .25s ease; }
.cook-main { max-width: 700px; margin: 38px auto 0; }
.step-count { color: var(--sage-dark); font-size: 11px; font-weight: 820; text-transform: uppercase; letter-spacing: .1em; }
.current-step { margin: 12px 0 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(29px, 7.5vw, 46px); line-height: 1.12; letter-spacing: -.9px; }
.timer-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.timer-btn { min-height: 44px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--sage-soft); color: var(--sage-deep); font-weight: 790; }
.next-steps { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.next-step { display: grid; grid-template-columns: 28px 1fr; gap: 9px; padding: 9px 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.next-step b { color: var(--sage-dark); }
.cook-actions { position: sticky; bottom: 0; max-width: 700px; margin: 28px auto 0; padding: 18px 0 calc(4px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: .72fr 1.28fr; gap: 9px; background: linear-gradient(transparent 0, var(--bg) 27%); }
.timer-floating { position: fixed; z-index: 110; top: calc(72px + env(safe-area-inset-top)); right: 18px; padding: 10px 13px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-variant-numeric: tabular-nums; font-weight: 780; }

/* Profile and misc */
.profile-card { display: flex; align-items: center; gap: 14px; }
.profile-avatar { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; background: var(--sage-deep); color: #fff; font-size: 20px; font-weight: 820; }
.history-card .version-list { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.checkline { display: flex; align-items: center; gap: 10px; }
.checkbox { width: 20px; height: 20px; accent-color: var(--sage-dark); }
hr.soft { margin: 16px 0; border: 0; border-top: 1px solid var(--line); }
.hidden { display: none !important; }
.toast { position: fixed; z-index: 140; left: 50%; bottom: calc(23px + env(safe-area-inset-bottom)); max-width: calc(100% - 36px); padding: 11px 14px; border-radius: 15px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 600px) {
  .quick-strip { grid-template-columns: repeat(3, 1fr); }
  .quick-action { grid-template-columns: 42px minmax(0,1fr); }
  .quick-action > .action-arrow { display: none; }
  .recipe-rail { grid-auto-columns: 220px; }
}

@media (min-width: 760px) {
  .shell { padding-left: 28px; padding-right: 28px; }
  .recipe-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
  .detail-hero { margin: 8px 0 0; }
  .detail-hero img, .detail-hero .recipe-placeholder { aspect-ratio: 2.15 / 1; border-radius: 29px; }
  .back-floating { left: 15px; }
  .featured-recipe, .featured-content { min-height: 330px; }
  .modal { align-self: center; margin: 20px; border-radius: 29px; }
}

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


/* V3 finishing details */
.compact-icon-btn { width: 36px; height: 36px; border-radius: 12px; color: #8a8b82; }
.compact-icon-btn .icon-svg { width: 17px; height: 17px; }
.stock-lot-count { margin-top: 3px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--muted); font-size: 11px; }
.stock-chevron { width: 16px; height: 16px; display: inline-flex; transition: transform .18s ease; }
.stock-chevron.open { transform: rotate(180deg); }
.stock-chevron .icon-svg { width: 15px; height: 15px; }

.notification-head { align-items: flex-start; }
.notification-head .eyebrow { margin-bottom: 4px; }
.notification-list { display: grid; gap: 8px; }
.notification-row { width: 100%; min-height: 72px; padding: 12px 11px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto 18px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,253,249,.84); text-align: left; transition: transform .15s ease, background .15s ease; }
.notification-row:active { transform: scale(.992); }
.notification-row.is-read { background: rgba(255,253,249,.48); }
.notification-row.is-urgent { border-color: rgba(159,83,73,.16); }
.notification-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px; background: var(--sage-soft); color: var(--sage-deep); }
.notification-row.is-urgent .notification-icon { background: var(--danger-soft); color: var(--danger); }
.notification-copy { min-width: 0; }
.notification-copy strong, .notification-copy small { display: block; }
.notification-copy strong { font-size: 13px; }
.notification-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px rgba(159,83,73,.08); }
.notification-arrow { width: 16px; height: 16px; color: #aaa99f; }
.notification-read-all { margin-top: 8px; width: 100%; text-align: center; }
.notification-empty { margin-top: 4px; }

.profile-hero { padding-bottom: 14px; }
.profile-summary { display: grid; gap: 10px; }
.profile-main-card { min-height: 82px; padding: 13px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,253,249,.84); box-shadow: var(--shadow-sm); }
.profile-main-card > div:nth-child(2) { min-width: 0; flex: 1; }
.profile-main-card strong, .profile-main-card span { display: block; }
.profile-main-card strong { font-size: 15px; }
.profile-main-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-avatar-lg { width: 50px; height: 50px; border-radius: 16px; }
.profile-change-btn { min-height: 38px; padding: 0 12px; border-radius: 13px; font-size: 11px; }
.profile-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.profile-stats > div { padding: 13px 8px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,249,.62); text-align: center; }
.profile-stats strong, .profile-stats span { display: block; }
.profile-stats strong { font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; line-height: 1; }
.profile-stats span { margin-top: 5px; color: var(--muted); font-size: 9px; }
.settings-list { display: grid; gap: 8px; }
.settings-row { min-height: 67px; padding: 10px 11px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,253,249,.78); text-align: left; }
.settings-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--sage-mist); color: var(--sage-deep); }
.settings-row > span:nth-child(2) strong, .settings-row > span:nth-child(2) small { display: block; }
.settings-row > span:nth-child(2) strong { font-size: 13px; }
.settings-row > span:nth-child(2) small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.settings-tail { color: #9b9d93; }
.settings-tail .icon-svg { width: 18px; height: 18px; }
.settings-badge { min-width: 23px; height: 23px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 820; }
.premium-empty { display: grid; justify-items: center; gap: 7px; }
.premium-empty .empty-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: var(--sage-soft); color: var(--sage-deep); }
.premium-empty strong { color: var(--ink); font-size: 13px; }
.premium-empty span:last-child { font-size: 11px; }
.app-footnote { padding: 32px 0 8px; color: #a6a69c; text-align: center; font-size: 9px; letter-spacing: .02em; }

@media (hover:hover) {
  .quick-action:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(51,48,39,.055); }
  .recipe-card:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(51,48,39,.075); }
  .featured-recipe:hover { transform: translateY(-2px); box-shadow: 0 30px 70px rgba(58,68,53,.22); }
  .settings-row:hover { background: rgba(255,255,255,.94); }
}
.recipe-card, .featured-recipe { transition: transform .18s ease, box-shadow .18s ease; }
.sync-dot { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; vertical-align: 0; background: #aaa99f; }
.sync-dot.online { background: #64825f; box-shadow: 0 0 0 4px rgba(100,130,95,.08); }
.sync-dot.local { background: #b4aa99; }


/* V3.1 — desktop workspace */
.app-frame { min-height: 100vh; }
.desktop-nav { display: none; }
.detail-columns { display: block; }

@media (min-width: 1120px) {
  body { background:
    radial-gradient(circle at 10% -10%, rgba(255,255,255,.94) 0, rgba(255,255,255,0) 27%),
    radial-gradient(circle at 94% 8%, rgba(226,234,219,.40) 0, rgba(226,234,219,0) 22%),
    #f5f1e8; }
  .app-frame { width: min(calc(100% - 48px), 1500px); margin: 0 auto; display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 36px; }
  .desktop-nav { position: sticky; top: 0; height: 100vh; padding: 28px 14px 24px; display: flex; flex-direction: column; }
  .desktop-brand { height: 62px; padding: 0 10px 20px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
  .desktop-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: var(--sage-deep); color: #fff; font: 500 24px/1 Georgia, "Times New Roman", serif; box-shadow: 0 12px 28px rgba(63,84,61,.17); }
  .desktop-brand strong, .desktop-brand small { display: block; }
  .desktop-brand strong { font: 500 24px/1 Georgia, "Times New Roman", serif; letter-spacing: -.7px; }
  .desktop-brand small { margin-top: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; font-weight: 780; }
  .desktop-nav-list { display: grid; gap: 5px; padding: 22px 0 14px; }
  .desktop-nav-link, .desktop-notification, .desktop-import, .desktop-user { width: 100%; border: 0; background: transparent; text-align: left; }
  .desktop-nav-link { min-height: 48px; padding: 0 12px; display: grid; grid-template-columns: 23px minmax(0,1fr) auto; align-items: center; gap: 11px; border-radius: 15px; color: #6e7067; font-size: 13px; font-weight: 720; transition: background .16s ease, color .16s ease, transform .16s ease; }
  .desktop-nav-link .icon-svg { width: 19px; height: 19px; }
  .desktop-nav-link:hover { background: rgba(255,253,249,.6); color: var(--ink); }
  .desktop-nav-link.active { background: var(--sage-soft); color: var(--sage-deep); }
  .desktop-count { min-width: 23px; height: 23px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--sage-dark); color: #fff; font-size: 9px; font-weight: 820; }
  .desktop-count.alert { background: var(--danger); }
  .desktop-notification { min-height: 58px; margin-top: 2px; padding: 9px 11px; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,249,.56); color: #74766d; }
  .desktop-notification.has-notifications { background: var(--sage-mist); color: var(--sage-deep); }
  .desktop-notification > .icon-svg { width: 19px; height: 19px; justify-self: center; }
  .desktop-notification strong, .desktop-notification small { display: block; }
  .desktop-notification strong { font-size: 11px; }
  .desktop-notification small { margin-top: 2px; color: var(--muted); font-size: 9px; }
  .desktop-nav-bottom { margin-top: auto; display: grid; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
  .desktop-import { min-height: 42px; padding: 0 11px; display: flex; align-items: center; gap: 9px; border-radius: 13px; color: var(--sage-deep); font-size: 11px; font-weight: 760; }
  .desktop-import:hover { background: var(--sage-mist); }
  .desktop-import .icon-svg { width: 17px; height: 17px; }
  .desktop-user { min-height: 64px; padding: 8px; display: grid; grid-template-columns: 42px minmax(0,1fr) 17px; align-items: center; gap: 9px; border-radius: 16px; }
  .desktop-user:hover { background: rgba(255,253,249,.65); }
  .desktop-avatar { width: 42px !important; height: 42px !important; border-radius: 13px !important; font-size: 14px !important; }
  .desktop-user strong, .desktop-user small { display: block; }
  .desktop-user strong { font-size: 11px; }
  .desktop-user small { margin-top: 2px; color: var(--muted); font-size: 9px; }
  .desktop-user > .icon-svg { width: 15px; height: 15px; color: #9b9c92; }

  .shell { width: 100%; max-width: none; margin: 0; padding: 0 6px 64px; }
  .topbar { min-height: 74px; margin: 0; padding: 14px 0 10px; justify-content: flex-end; background: linear-gradient(180deg, rgba(245,241,232,.96) 76%, rgba(245,241,232,0)); }
  .brand-wrap { display: none; }
  .notification-btn { width: 40px; height: 40px; box-shadow: none; background: rgba(255,253,249,.58); }
  .content { width: 100%; }
  .home-intro { padding: 18px 0 22px; }
  .home-intro h2 { font-size: clamp(45px, 4.4vw, 62px); max-width: 820px; letter-spacing: -2px; }
  .home-intro p { font-size: 15px; }
  .quick-strip { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
  .quick-action { min-height: 76px; padding: 12px 14px; grid-template-columns: 44px minmax(0,1fr) 18px; border-radius: 21px; }
  .quick-action > .action-arrow { display: inline-flex; }
  .quick-action strong { font-size: 13px; }
  .quick-action small { font-size: 10px; }
  .featured-section { margin-top: 34px; }
  .featured-recipe, .featured-content { min-height: 380px; }
  .featured-content { padding: 30px 28px 25px; }
  .featured-content h3 { font-size: clamp(38px, 4vw, 54px); max-width: 760px; }
  .featured-meta { font-size: 12px; }
  .recipe-rail { grid-auto-columns: 235px; gap: 14px; }
  .recipe-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 17px; }
  .recipe-card { border-radius: 22px; }
  .recipe-photo, .recipe-placeholder { aspect-ratio: 1.28 / 1; }
  .section { margin-top: 31px; }
  .section-head h3 { font-size: 19px; }

  .detail-hero { margin: 8px 0 0; }
  .detail-hero img, .detail-hero .recipe-placeholder { aspect-ratio: 2.6 / 1; max-height: 420px; border-radius: 31px; }
  .detail-title { margin-top: 26px; }
  .detail-title h2 { font-size: clamp(42px, 4vw, 58px); }
  .detail-columns { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 18px; align-items: start; }
  .detail-columns > .section { margin-top: 25px; }
  .detail-panel { min-height: 100%; }
  .detail-actions { width: min(640px, 100%); margin: 20px 0 0 auto; }

  .profile-summary { grid-template-columns: minmax(0,1.2fr) minmax(330px,.8fr); align-items: stretch; }
  .profile-stats { height: 100%; }
  .settings-list { grid-template-columns: repeat(2,minmax(0,1fr)); }

  .modal { max-width: 700px; }
  .cook-top, .progress, .cook-main, .cook-actions { max-width: 900px; }
  .current-step { font-size: clamp(42px, 4vw, 60px); }
}

@media (min-width: 1450px) {
  .app-frame { grid-template-columns: 250px minmax(0, 1180px); gap: 48px; justify-content: center; }
  .recipe-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .featured-recipe, .featured-content { min-height: 410px; }
}
