:root {
  --bg: #F4F4F2;
  --card: #FFFFFF;
  --ink: #121212;
  --muted: #5F5F5A;
  --line: rgba(18, 18, 18, 0.1);
  --good: #13803F;
  --bad: #C8302C;
  --mid: #F2C12E;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: "Geist", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 10px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 40; height: 56px; display: flex; justify-content: space-between; align-items: center; margin: 0 -32px; padding: 0 32px; background: rgba(244,244,242,.85); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.nav ul { display: flex; gap: 26px; list-style: none; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.nav a { text-decoration: none; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); font-weight: 600; }
.nav a i { font-size: 16px; }
.yt { display: inline-grid !important; place-items: center; width: 46px; height: 34px; padding: 0 !important; border-radius: 999px; border: 1px solid rgba(18,18,18,.25); color: var(--ink) !important; }
.yt:hover { background: rgba(18,18,18,.06); }
.yt svg { width: 22px; height: 22px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; padding: 36px 0 72px; }
.hero h1 { font-size: clamp(42px, 5.6vw, 76px); line-height: .98; letter-spacing: -0.045em; font-weight: 750; margin-top: 18px; }
.lede { font-size: 19px; line-height: 1.45; color: var(--muted); max-width: 44ch; margin-top: 18px; }
.stats { display: flex; gap: 40px; margin-top: 36px; }
.stats b { display: block; font-size: 44px; line-height: 1; letter-spacing: -0.04em; font-weight: 700; }
.stats span { color: var(--muted); font-size: 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 999px; padding: 15px 26px; font-weight: 600; text-decoration: none; cursor: pointer; background: var(--ink); color: #fff; transition: transform .15s; }
.btn:active { transform: scale(.97); }

.photo { position: relative; }
.photo video { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 22px; background: #1a1a1a; }
.playpause { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); display: grid; place-items: center; font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none; }
.playpause:focus-visible { opacity: 1; pointer-events: auto; }
#clip { cursor: pointer; }
.pin { position: absolute; left: -28px; bottom: 32px; display: flex; gap: 14px; align-items: center; background: var(--card); padding: 12px 18px 12px 12px; border-radius: 16px; box-shadow: 0 18px 40px rgba(18,18,18,.14); text-decoration: none; transition: transform .25s; }
.pin:hover { transform: translateY(-3px); }
.pin img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.pin small { display: block; color: var(--muted); font-size: 12px; }
.pin strong { display: block; font-size: 15px; line-height: 1.25; max-width: 18ch; }
.pin .badge { margin-left: 6px; }

/* meal type colors */
.t-Breakfast { --tc: #A16207; } .t-Lunch { --tc: #2F7D6D; } .t-Dinner { --tc: #3558A8; } .t-Snack { --tc: #7A4BA8; } .t-Dessert { --tc: #B23A64; } .t-All { --tc: #121212; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; list-style: none; }
.jump a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 11px 16px; border-radius: 999px; background: color-mix(in srgb, var(--tc) 9%, #fff); font-weight: 600; font-size: 15px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 22%, transparent); transition: transform .2s, background .2s; }
.jump a:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--tc) 16%, #fff); }
.jump a i { font-size: 19px; color: var(--tc); }
.jump a span { color: var(--muted); font-weight: 500; }

/* score badge */
.badge { display: inline-grid; place-items: center; min-width: 52px; height: 52px; padding: 3px 8px 0; line-height: 1; border-radius: 999px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; background: var(--mid); color: var(--ink); }
.badge.good { background: var(--good); color: #fff; }
.badge.bad { background: var(--bad); color: #fff; }
.badge.sm { min-width: 42px; height: 42px; font-size: 16px; }

.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 64px; list-style: none; }
.legend li { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 14px; padding: 16px 18px; }
.legend b { font-size: 16px; }
.legend span:not(.badge) { display: block; color: var(--muted); font-size: 14px; }

h2.sec { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.035em; line-height: 1; font-weight: 720; margin-bottom: 26px; }

/* browse */
.browse { padding-bottom: 96px; }
.bar { position: sticky; top: 56px; z-index: 20; background: rgba(244,244,242,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 14px 0; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.bar .in { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { flex: 1 1 240px; display: flex; align-items: center; gap: 4px; background: var(--card); border-radius: 999px; padding: 0 16px; box-shadow: inset 0 0 0 1px var(--line); }
.search i { color: var(--muted); }
.search input { border: none; background: none; outline: none; padding: 12px 8px; width: 100%; font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: none; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 9px 15px; border-radius: 999px; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s; }
.chip i { font-size: 16px; color: var(--tc); }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--tc) 14%, #fff); box-shadow: inset 0 0 0 1.5px var(--tc); font-weight: 600; }
.sel { -webkit-appearance: none; appearance: none; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23121212' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 11px 8px; border: none; box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 10px 34px 10px 16px; font-size: 14px; cursor: pointer; }
.divider { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.count { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 18px; list-style: none; }
.card { display: flex; flex-direction: column; text-decoration: none; }
.card .pic { display: block; position: relative; z-index: 0; aspect-ratio: 4 / 3; border-radius: 14px; }
.card .clip { display: block; position: absolute; inset: 0; border-radius: 14px; overflow: hidden; background: #ddd; }
.card .clip img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.16,1,.3,1); }
.card:hover .clip img { transform: scale(1.06); }
.card .badge { position: absolute; top: 10px; right: 10px; }
.card h3 { font-size: 17px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 620; margin-top: 12px; }
.card .meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-top: 2px; }
.card .meta i { color: var(--tc); font-size: 15px; }
.card.top .pic::before { content: ""; position: absolute; inset: -4px; z-index: -1; border-radius: 18px; background: var(--good); }
.card .tag { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 5px 10px 4px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: var(--good); color: #fff; }
.card .tag i { font-size: 13px; vertical-align: -2px; margin-right: 4px; }
.empty { grid-column: 1 / -1; padding: 60px 0; text-align: center; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; gap: 20px; }

/* recipe: shared by the slide-out panel and the meal pages */
.recipe .rt { font-size: 30px; line-height: 1.06; letter-spacing: -0.035em; font-weight: 720; }
.recipe .hd { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.recipe .hd .badge { min-width: 64px; height: 64px; font-size: 24px; flex: none; }
.recipe .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; list-style: none; }
.recipe .tags li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--bg); }
.recipe .tags i { font-size: 15px; color: var(--tc); }
.recipe .take { margin-top: 20px; font-size: 17px; line-height: 1.6; }
.recipe blockquote { margin-top: 16px; font-size: 17px; color: var(--muted); }
.recipe blockquote p::before { content: "\201C"; } .recipe blockquote p::after { content: "\201D"; }
.recipe .sub { font-size: 13px; color: var(--muted); font-weight: 600; margin: 30px 0 8px; }
.recipe ul.check { list-style: none; }
.recipe ul.check li { border-bottom: 1px solid var(--line); }
.recipe ul.check label { display: flex; gap: 12px; align-items: center; padding: 10px 0; cursor: pointer; }
.recipe ul.check input { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px #8E8E88; flex: none; cursor: pointer; transition: background .15s; }
.recipe ul.check input:checked { background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 11px 9px; box-shadow: none; }
.recipe ul.check li:has(input:checked) label { color: var(--muted); text-decoration: line-through; }
.recipe ol { list-style: none; counter-reset: s; }
.recipe ol li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; padding: 9px 0; }
.recipe ol li::before { content: counter(s); font-weight: 700; }
.recipe .watch { margin-top: 32px; width: 100%; justify-content: center; }
.recipe .soon { margin-top: 32px; text-align: center; color: var(--muted); font-size: 14px; padding: 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.save { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; }
.save button { display: flex; flex-direction: column; align-items: center; gap: 6px; border: none; background: var(--bg); border-radius: 12px; padding: 12px 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, transform .15s; }
.save button:hover { background: #E9E9E5; }
.save button:active { transform: scale(.97); }
.save i { font-size: 22px; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s cubic-bezier(.16,1,.3,1); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* slide-out panel on the list page */
.scrim { position: fixed; inset: 0; background: rgba(10,10,10,.35); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); opacity: 0; pointer-events: none; transition: opacity .35s; z-index: 50; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100%); background: var(--card); z-index: 51; transform: translateX(100%); visibility: hidden; transition: transform .5s cubic-bezier(.16,1,.3,1), visibility 0s .5s; overflow-y: auto; }
body.open .scrim { opacity: 1; pointer-events: auto; }
body.open .panel { transform: none; visibility: visible; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.panel .pimg img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.panel .x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.95); font-size: 22px; cursor: pointer; z-index: 2; }
.panel .recipe { padding: 26px 30px calc(56px + env(safe-area-inset-bottom)); }
.panel { overscroll-behavior: contain; }
html:has(body.open) { overflow: hidden; }
.panel .full { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; }

/* meal page */
.crumbs { display: flex; gap: 8px; list-style: none; font-size: 14px; color: var(--muted); padding: 22px 0 18px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.meal { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; padding-bottom: 80px; }
.meal .shot { position: sticky; top: 76px; }
.meal .shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; }
.meal .recipe .rt { font-size: clamp(32px, 4vw, 48px); }
.meal .src { color: var(--muted); font-size: 14px; margin-top: 10px; }
.more { padding: 0 0 96px; }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav { margin: 0 -16px; padding: 0 16px; }
  .nav li.hide-sm { display: none; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 16px 0 56px; }
  .photo video { aspect-ratio: 4 / 3; }
  .pin { left: 12px; bottom: 12px; }
  .stats b { font-size: 34px; }
  .legend { grid-template-columns: 1fr; margin-top: -24px; }
  .jump { gap: 6px; } .jump a { font-size: 14px; padding: 9px 13px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .divider { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .card h3 { font-size: 15px; }
  .badge.sm { min-width: 36px; height: 36px; font-size: 14px; }
  .panel { top: auto; height: 90dvh; border-radius: 20px 20px 0 0; transform: translateY(100%); }
  .meal { grid-template-columns: 1fr; gap: 24px; }
  .meal .shot { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}
@media print {
  .nav, .skip, .crumbs, .save, .watch, .soon, .shot, .more, footer, .pimg, .x, .browse, .hero, .legend, .scrim { display: none !important; }
  body.open > .wrap { display: none !important; }
  .panel { position: static !important; transform: none !important; visibility: visible !important; width: auto !important; height: auto !important; overflow: visible !important; }
  .meal { display: block; }
  .recipe { padding: 0 !important; font-size: 11pt; }
}
