:root {
  --brand: #ff7a45;
  --brand-dark: #e8602b;
  --brand-soft: #fff1ea;
  --ink: #221c18;
  --ink-2: #4a423d;
  --muted: #8f8580;
  --line: #f0e8e2;
  --bg: #fffbf8;
  --card: #ffffff;
  --green: #5bb26a;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(60, 30, 10, 0.08);
  --font: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --display: "Jua", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --gutter-l: max(24px, env(safe-area-inset-left, 0px));
  --gutter-r: max(24px, env(safe-area-inset-right, 0px));
  --yt: #ff0033;
  color-scheme: light;
}
/* 따뜻한 밝은 부엌 느낌으로 한 가지 테마만 씁니다 */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
input, select, textarea { font-family: inherit; font-size: 15px; }
.muted { color: var(--muted); }
.container { max-width: 1180px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
:focus-visible { outline: 3px solid rgba(255, 122, 69, .55); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg);
}
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255, 251, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  height: 64px; display: flex; align-items: center; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 400; font-size: 23px; white-space: nowrap; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft);
  display: grid; place-items: center; font-size: 22px;
}
.logo.small { font-size: 17px; }
.logo.small .logo-mark { width: 30px; height: 30px; font-size: 18px; }
.nav { display: flex; gap: 6px; flex: 1; justify-content: center; }
.nav a {
  white-space: nowrap; padding: 8px 12px; border-radius: 999px; font-size: 15px; color: var(--ink-2); font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav a.active { color: var(--ink); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 18px; border: 1px solid var(--line); background: #fff;
}
.icon-btn.active { border-color: var(--brand); }
.badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 12px; font-size: 18px; }

/* ---------- Buttons / chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px; border-radius: 12px; border: 0; font-weight: 700; font-size: 15px;
  background: var(--brand); color: #fff; transition: transform .1s, background .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: scale(.98); }
.btn.lg { padding: 16px 30px; font-size: 17px; border-radius: 14px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--ink-2);
  transition: all .15s; cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: #f6f1ed; color: var(--ink-2); }

/* ---------- Photo placeholder ---------- */
.photo {
  position: relative; overflow: hidden; background: #f3ece6;
  display: grid; place-items: center;
}
.photo img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.photo.ph {
  background:
    radial-gradient(circle at 30% 25%, hsla(var(--h), 90%, 92%, 1) 0, transparent 55%),
    radial-gradient(circle at 75% 80%, hsla(calc(var(--h) + 30), 80%, 80%, .9) 0, transparent 60%),
    linear-gradient(135deg, hsl(var(--h), 70%, 88%), hsl(calc(var(--h) + 20), 65%, 76%));
}
.photo.ph .ph-emoji {
  font-size: var(--es, 64px); filter: drop-shadow(0 8px 14px rgba(0,0,0,.18));
  line-height: 1;
}
.photo.ph::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1.5px);
  background-size: 14px 14px; opacity: .5; pointer-events: none;
}

/* ---------- Landing ---------- */
.hero {
  text-align: center; padding: 72px 24px 56px; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #ffe4d6 0%, transparent 60%);
}
.hero-pill {
  display: inline-block; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid #ffd9c6;
  color: var(--brand-dark); font-size: 14px; font-weight: 600; margin-bottom: 28px;
}
.hero h1 { font-family: var(--display); font-size: clamp(40px, 7vw, 78px); line-height: 1.15; margin: 0 0 24px; font-weight: 400; text-wrap: balance; }
.hero h1 .accent { background: linear-gradient(90deg, #ff7a45, #ffb347); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 19px; color: var(--ink-2); margin: 0 auto 36px; max-width: 560px; }
.hero .search-box { max-width: 560px; margin: 0 auto 20px; }
.hero-checks { display: flex; justify-content: center; gap: 22px; margin-top: 22px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.hero-checks span::before { content: "✓ "; color: var(--brand); font-weight: 800; }
.hero-floats span {
  position: absolute; font-size: 44px; opacity: .9; animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(6deg); } }

.section { padding: 56px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 36px; }
.eyebrow { color: var(--brand-dark); font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.section-head h2 { font-size: 32px; margin: 0 0 10px; letter-spacing: -1px; }
.section-head p { color: var(--muted); margin: 0; }
.row-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.row-head h2 { font-size: 22px; margin: 0; letter-spacing: -.5px; }
.row-head a { color: var(--muted); font-size: 14px; }

.pain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pain {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.pain .em { font-size: 32px; margin-bottom: 12px; }
.pain h3 { margin: 0 0 8px; font-size: 17px; }
.pain p { margin: 0; color: var(--muted); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { text-align: center; padding: 28px 12px; background: var(--brand-soft); border-radius: var(--radius); }
.stat b { display: block; font-size: 36px; color: var(--brand-dark); letter-spacing: -1px; }
.stat span { font-weight: 700; }
.stat small { display: block; color: var(--muted); margin-top: 4px; }

.situ-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.situ { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.situ h3 { margin: 0 0 14px; font-size: 17px; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 28px 0; }
.feature.rev .feature-visual { order: -1; }
.feature h3 { font-size: 28px; margin: 6px 0 12px; letter-spacing: -.8px; }
.feature p { color: var(--ink-2); }
.feature ul { padding: 0; list-style: none; margin: 18px 0 0; display: grid; gap: 8px; }
.feature li::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: 8px; }
.feature-visual {
  border-radius: 24px; background: linear-gradient(135deg, #fff1ea, #ffe2d1); padding: 28px; min-height: 280px;
  display: grid; place-items: center; font-size: 96px; box-shadow: var(--shadow);
}
.mini-steps { width: 100%; display: grid; gap: 12px; font-size: 14px; }
.mini-step { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 12px; padding: 10px 12px; }
.mini-step .num { flex: none; }
.mini-step .photo { width: 64px; height: 48px; border-radius: 8px; margin-left: auto; --es: 26px; }

.cta {
  text-align: center; padding: 64px 24px; margin: 24px auto 64px; max-width: 1132px; border-radius: 28px;
  background: linear-gradient(135deg, #ff7a45, #ffa95e); color: #fff;
}
.cta h2 { font-size: 36px; margin: 0 0 12px; letter-spacing: -1px; }
.cta p { opacity: .9; margin: 0 0 28px; }
.cta .btn { background: #fff; color: var(--brand-dark); }
.cta .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }

/* ---------- Search box ---------- */
.search-box {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--line);
  border-radius: 999px; padding: 6px 6px 6px 20px; transition: border-color .15s; box-shadow: var(--shadow);
}
.search-box:focus-within { border-color: var(--brand); }
.search-box input { flex: 1; border: 0; outline: 0; font-size: 16px; background: transparent; min-width: 0; }
.search-box button { border: 0; background: var(--brand); color: #fff; border-radius: 999px; padding: 10px 20px; font-weight: 700; }

/* ---------- Cards / carousel ---------- */
.carousel-wrap { position: relative; }
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 64px) / 5); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 8px;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.car-btn {
  position: absolute; top: 34%; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow); font-size: 16px; z-index: 2;
}
.car-btn.prev { left: -18px; }
.car-btn.next { right: -18px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card { display: block; min-width: 0; }
.card .thumb { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1 / 1; }
.card .thumb .photo { width: 100%; height: 100%; transition: transform .3s; }
.card:hover .thumb .photo { transform: scale(1.04); }
.card .author-badge {
  position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; color: #fff;
  font-size: 12px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.4); z-index: 1;
}
.card .author-badge i {
  width: 20px; height: 20px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px;
}
.card .thumb::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.35)); }
.save-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 10px;
  border: 0; background: rgba(255,255,255,.85); font-size: 15px; display: grid; place-items: center;
  filter: grayscale(1); opacity: .8;
}
.save-btn.on { filter: none; opacity: 1; background: #fff; }
.card h3 { font-size: 15px; margin: 10px 0 4px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; gap: 10px; color: var(--muted); font-size: 13px; }
.card .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }

.theme-card {
  display: block; padding: 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  transition: transform .15s, box-shadow .15s;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.theme-card .em { font-size: 28px; }
.theme-card b { display: block; margin: 10px 0 4px; }
.theme-card span { color: var(--muted); font-size: 14px; }
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.budget-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.budget {
  padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, #fff, #fff5ee); border: 1px solid var(--line);
}
.budget b { font-size: 20px; display: block; }
.budget span { color: var(--muted); font-size: 14px; }

/* ---------- Page layout ---------- */
.page { padding-top: 32px; padding-bottom: 64px; }
.page-title { font-size: 30px; margin: 0 0 6px; letter-spacing: -1px; }
.page-sub { color: var(--muted); margin: 0 0 28px; }
.block { margin-bottom: 48px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 24px; }
.filters select { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.empty { text-align: center; padding: 64px 0; color: var(--muted); }
.empty .em { font-size: 56px; margin-bottom: 12px; }

.cat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-bottom: 36px; }
.cat {
  display: grid; justify-items: center; gap: 8px; padding: 18px 8px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 14px; transition: all .15s;
}
.cat .em { font-size: 34px; }
.cat:hover, .cat.on { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Fridge ---------- */
.fridge-layout { display: grid; grid-template-columns: 380px 1fr; gap: 32px; align-items: start; }
.fridge-panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; position: sticky; top: 88px; }
.fridge-panel h3 { margin: 0 0 4px; }
.fridge-group { margin-top: 18px; }
.fridge-group h4 { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.match-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.match-bar i { display: block; height: 100%; background: var(--green); }
.match-text { font-size: 12px; color: var(--green); font-weight: 700; margin-top: 4px; }
.miss { font-size: 12px; color: var(--muted); }

/* ---------- Recipe detail ---------- */
.detail { max-width: 860px; margin: 0 auto; }
.detail-hero { border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 9; }
.detail-hero .photo { width: 100%; height: 100%; --es: 140px; }
.detail-head { text-align: center; padding: 28px 0 8px; border-bottom: 1px solid var(--line); }
.detail-author { color: var(--muted); font-size: 14px; }
.detail-head h1 { font-size: 34px; margin: 8px 0 10px; letter-spacing: -1px; }
.detail-head .desc { color: var(--ink-2); max-width: 620px; margin: 0 auto 20px; }
.info-row { display: flex; justify-content: center; gap: 40px; padding: 16px 0 24px; }
.info-row div { text-align: center; }
.info-row .em { font-size: 26px; }
.info-row small { display: block; color: var(--muted); font-size: 13px; }
.info-row b { font-size: 15px; }
.detail-actions { display: flex; justify-content: center; gap: 10px; padding-bottom: 28px; flex-wrap: wrap; }

.d-section { padding: 36px 0; border-bottom: 8px solid #f6f1ed; }
.d-section:last-child { border-bottom: 0; }
.d-title { display: flex; align-items: baseline; gap: 8px; margin: 0 0 22px; font-size: 24px; letter-spacing: -.5px; }
.d-title small { color: #c9beb7; font-size: 14px; font-weight: 400; font-style: italic; }
.d-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.d-title-row .d-title { margin: 0; }

.ing-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.ing-group h4 { margin: 0 0 8px; font-size: 15px; color: var(--brand-dark); }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li {
  display: flex; justify-content: space-between; padding: 11px 4px; border-bottom: 1px dashed var(--line); cursor: pointer;
}
.ing-list li .amt { color: var(--muted); }
.ing-list li.checked .name { text-decoration: line-through; color: var(--muted); }
.ing-list li .name::before { content: "○ "; color: #d6ccc5; }
.ing-list li.checked .name::before { content: "● "; color: var(--green); }

.view-toggle { display: inline-flex; background: #f6f1ed; border-radius: 12px; padding: 4px; }
.view-toggle button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-size: 13px; color: var(--muted); font-weight: 600;
}
.view-toggle button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* 조리순서 - 기본(텍스트 + 오른쪽 사진) */
.steps { display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 40px 1fr 280px; gap: 16px 18px; align-items: start;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; }
.num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800;
  display: grid; place-items: center; font-size: 15px; margin-top: 2px;
}
.step-text { font-size: 18px; color: var(--ink); line-height: 1.6; }
.step-tip { display: flex; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 15px; }
.step-photo { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; }
.step-photo .photo { width: 100%; height: 100%; --es: 72px; }

/* 사진 크게 보기 */
.steps.view-photo .step { grid-template-columns: 40px 1fr; }
.steps.view-photo .step-photo { grid-column: 2; grid-row: 1; aspect-ratio: 16 / 10; }
.steps.view-photo .step-photo .photo { --es: 110px; }
.steps.view-photo .step-body { grid-column: 2; }
.steps.view-photo .num { grid-row: 1; }

/* 텍스트만 */
.steps.view-text .step { grid-template-columns: 40px 1fr; padding: 18px 0; }
.steps.view-text .step-photo { display: none; }

.done-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.done-photos .photo { aspect-ratio: 1; border-radius: 12px; --es: 64px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Cook mode ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 14, 10, .92); color: #fff;
  display: flex; flex-direction: column;
}
.overlay-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; }
.overlay-top button { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 10px; padding: 8px 14px; }
.cook-progress { height: 4px; background: rgba(255,255,255,.15); margin: 0 24px; border-radius: 99px; overflow: hidden; }
.cook-progress i { display: block; height: 100%; background: var(--brand); transition: width .25s; }
.cook-body { flex: 1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 24px 48px; max-width: 1200px; margin: 0 auto; width: 100%; }
.cook-body .photo { border-radius: 20px; aspect-ratio: 4/3; width: 100%; --es: 150px; }
.cook-step-no { color: var(--brand); font-weight: 800; font-size: 18px; margin-bottom: 12px; }
.cook-text { font-size: 28px; line-height: 1.5; font-weight: 600; }
.cook-tip { margin-top: 18px; color: rgba(255,255,255,.7); font-size: 17px; }
.cook-nav { display: flex; justify-content: center; gap: 12px; padding: 24px; }
.cook-nav button { min-width: 140px; }
.cook-nav .btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.timer-btn { margin-top: 20px; }

.lightbox { position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox .photo { width: min(900px, 92vw); aspect-ratio: 4/3; border-radius: 16px; --es: 180px; }

/* ---------- Write form ---------- */
.form { max-width: 820px; margin: 0 auto; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; margin-bottom: 20px; }
.form-card h3 { margin: 0 0 18px; font-size: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea, .row-input input, .step-edit textarea, .step-edit input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fffdfb; outline: 0;
}
.field input:focus, .field textarea:focus, .row-input input:focus, .step-edit textarea:focus, .step-edit input:focus { border-color: var(--brand); }
.field-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.row-input { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 8px; margin-bottom: 8px; }
.del-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; color: var(--muted); }
.upload {
  display: grid; place-items: center; border: 2px dashed #ecd9cd; border-radius: 14px; background: #fffaf6;
  color: var(--muted); font-size: 14px; cursor: pointer; overflow: hidden; position: relative; text-align: center;
}
.upload img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload input { display: none; }
.upload.main { aspect-ratio: 16 / 9; }
.step-edit { display: grid; grid-template-columns: 40px 1fr 180px; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.step-edit .inputs { display: grid; gap: 8px; }
.step-edit textarea { min-height: 84px; resize: vertical; }
.step-edit .upload { aspect-ratio: 4/3; }
.step-edit .tools { grid-column: 2 / 4; display: flex; gap: 6px; justify-content: flex-end; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- YouTube 가져오기 ---------- */
.yt-hero { background: #f1f6ef; border-bottom: 1px solid var(--line); }
.yt-hero-inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.yt-copy { min-width: 0; }
.yt-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-2); margin-bottom: 18px; }
.yt-logo { display: inline-grid; place-items: center; width: 26px; height: 18px; border-radius: 5px; background: var(--yt); color: #fff; font-size: 9px; }
.yt-copy h1 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.22; margin: 0 0 18px; letter-spacing: -1.5px; font-weight: 900; text-wrap: balance; }
.yt-copy p { color: var(--ink-2); font-size: 17px; margin: 0 0 26px; }
.link-box {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #dfe6dc; border-radius: 18px;
  padding: 8px 8px 8px 20px; margin-bottom: 10px; transition: border-color .15s;
}
.link-box:focus-within { border-color: var(--brand); }
.link-box input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 17px; padding: 12px 0; background: transparent; }
.link-box button { border: 0; background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 20px; font-weight: 700; }
.yt-demo { display: flex; align-items: center; gap: 16px; justify-content: center; }
.yt-video, .yt-card { background: #fff; border-radius: 22px; box-shadow: 0 14px 40px rgba(40, 60, 30, .12); overflow: hidden; }
.yt-video { width: 240px; flex: none; position: relative; }
.yt-video > .photo { aspect-ratio: 1 / .9; --es: 84px; }
.yt-play {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 2;
  width: 56px; height: 40px; border-radius: 12px; background: var(--yt); color: #fff; display: grid; place-items: center; font-size: 16px;
}
.yt-play.sm { width: 44px; height: 32px; top: 50%; font-size: 13px; }
.yt-video-meta { padding: 14px 18px 18px; }
.yt-video-meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-video-meta small { color: var(--muted); }
.yt-arrow { flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 22px; }
.yt-card { width: 250px; flex: none; padding: 22px; }
.yt-card small { font-weight: 700; color: var(--ink-2); font-size: 12px; }
.yt-card > b { display: block; font-size: 19px; margin: 8px 0 14px; }
.yt-ing { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 0 10px; font-size: 13px; }
.yt-ing > * { padding: 9px 0; border-bottom: 1px solid var(--line); }
.yt-ing span { color: var(--ink-2); }
.yt-ing b { text-align: right; font-variant-numeric: tabular-nums; }
.yt-ing.wide { grid-template-columns: repeat(2, 1fr auto); gap: 0 18px; font-size: 15px; margin: 14px 0; }
.yt-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.yt-stats div + div { border-left: 1px solid var(--line); }
.yt-stats b { display: block; font-size: 16px; }
.yt-stats small { color: var(--muted); font-weight: 400; }
.yt-work { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.yt-work > * { min-width: 0; }
.yt-picked { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: start; }
.yt-thumb { position: relative; border-radius: 12px; overflow: hidden; display: block; }
.yt-thumb .photo { aspect-ratio: 16 / 9; --es: 40px; }
.yt-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--ink-2); font-size: 14px; }
.yt-result h2 { margin: 6px 0 6px; font-size: 26px; letter-spacing: -.6px; }
.yt-steps { margin: 20px 0; padding-left: 22px; display: grid; gap: 10px; }
.yt-steps li { padding-left: 4px; }
.yt-steps small { display: block; color: var(--muted); margin-top: 2px; }
.yt-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.yt-how > div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.yt-how b { display: block; margin: 12px 0 4px; font-size: 17px; }
.yt-how p { margin: 0; font-size: 14px; }

/* ---------- Confirm modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 150; background: rgba(30, 20, 14, .45); display: grid; place-items: center; padding: 24px; }
.modal { background: #fff; border-radius: 18px; padding: 24px; width: min(380px, 100%); box-shadow: var(--shadow); }
.modal p { margin: 0 0 20px; font-size: 16px; font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Toast / footer ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(32px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow);
}
.footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding-block: 32px; padding-left: var(--gutter-l); padding-right: var(--gutter-r); display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.footer p { margin: 0; }

.overlay { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: #fff;
    padding: 12px var(--gutter-r) 12px var(--gutter-l); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .header-actions { margin-left: auto; }
  .menu-btn { display: grid; place-items: center; }
  .yt-hero-inner { grid-template-columns: 1fr; }
  .yt-work { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .carousel { grid-auto-columns: calc((100% - 48px) / 4); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .fridge-layout { grid-template-columns: 1fr; }
  .fridge-panel { position: static; }
}
@media (max-width: 768px) {
  .header-inner { gap: 12px; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: #fff;
    padding: 12px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .header-actions { margin-left: auto; }
  .menu-btn { display: grid; place-items: center; }
  .carousel { grid-auto-columns: 44%; }
  .car-btn { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .pain-grid, .stats, .theme-grid, .budget-grid { grid-template-columns: repeat(2, 1fr); }
  .situ-grid { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 20px; }
  .feature.rev .feature-visual { order: 0; }
  .ing-groups { grid-template-columns: 1fr; }
  .step { grid-template-columns: 34px 1fr; }
  .step-photo { grid-column: 2; }
  .step-text { font-size: 16px; }
  .info-row { gap: 22px; }
  .cook-body { grid-template-columns: 1fr; padding: 16px 24px; gap: 20px; }
  .cook-text { font-size: 21px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .step-edit { grid-template-columns: 34px 1fr; }
  .step-edit .upload { grid-column: 2; }
  .step-edit .tools { grid-column: 2; }
  .hero-floats { display: none; }
  .yt-demo { flex-direction: column; }
  .yt-arrow { transform: rotate(90deg); }
  .yt-video, .yt-card { width: min(300px, 100%); }
  .yt-picked, .yt-how { grid-template-columns: 1fr; }
  .yt-ing.wide { grid-template-columns: 1fr auto; }
  .cook-nav button { min-width: 0; flex: 1; }
}
