/* ==========================================================
   Recipe Blog — 요리 레시피 블로그 디자인 시스템
   UI: Pretendard / Display: Cormorant Garamond
   ========================================================== */

:root {
  --bg: #faf6f1;
  --bg-deep: #f0e8dc;
  --paper: #fffdf9;
  --paper-edge: #e8dfd2;
  --ink: #1e1812;
  --ink-soft: #5c4f42;
  --ink-faint: #9a8b7a;
  --accent: #c45c26;
  --accent-strong: #9e4214;
  --accent-soft: #f4e4d8;
  --sage: #5a7a5e;
  --sage-soft: #e4ede5;
  --gold: #c9a227;
  --line: #e2d8ca;
  --shadow: 0 2px 8px rgba(40, 28, 16, 0.06), 0 8px 24px rgba(40, 28, 16, 0.08);
  --shadow-lift: 0 8px 20px rgba(40, 28, 16, 0.1), 0 20px 48px rgba(40, 28, 16, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --font-ui: "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-display: "Cormorant Garamond", "Noto Serif KR", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.35s;
  --section-gap: clamp(48px, 8vw, 80px);
}

[data-theme="dark"] {
  --bg: #14110e;
  --bg-deep: #0d0b09;
  --paper: #1e1914;
  --paper-edge: #2e261e;
  --ink: #f2ebe2;
  --ink-soft: #c4b5a4;
  --ink-faint: #7d6f60;
  --accent: #e07a42;
  --accent-strong: #f59a68;
  --accent-soft: #2e1f16;
  --sage: #7fa882;
  --sage-soft: #1a241b;
  --gold: #d4b44a;
  --line: #2e261e;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-lift: 0 8px 20px rgba(0, 0, 0, 0.35), 0 20px 48px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100dvh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; display: block; }
button, input, select { font-family: var(--font-ui); }
button { cursor: pointer; border: none; background: none; -webkit-tap-highlight-color: transparent; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
.eyebrow {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); }
h1 em { font-style: italic; color: var(--accent); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }

.section-desc {
  margin: 0;
  max-width: 320px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover { color: var(--ink); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--accent);
}
.brand-mark svg { width: 100%; height: 100%; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.brand-name[data-placeholder="true"] {
  color: var(--ink-faint);
  font-style: italic;
}
.brand-tag {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.main-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
  background: var(--accent-soft);
}
.main-nav a.active { color: var(--accent-strong); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-btn,
.theme-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ink-soft);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.search-btn:hover,
.theme-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.search-btn svg,
.theme-btn svg { width: 20px; height: 20px; }

.theme-btn .icon-moon { display: none; }
[data-theme="dark"] .theme-btn .icon-sun { display: none; }
[data-theme="dark"] .theme-btn .icon-moon { display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    padding: 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav a { border-radius: var(--radius-sm); }
}

/* ---------- Search Overlay ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: start center;
  padding: 80px 20px 20px;
  background: rgba(20, 14, 8, 0.55);
  backdrop-filter: blur(4px);
}
.search-overlay[hidden] { display: none; }

.search-panel {
  position: relative;
  width: min(640px, 100%);
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

.search-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-faint);
  border-radius: 50%;
}
.search-close:hover { background: var(--accent-soft); color: var(--ink); }

.search-label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color var(--duration) var(--ease);
}
.search-field:focus-within { border-color: var(--accent); }
.search-field svg { width: 20px; height: 20px; color: var(--ink-faint); flex-shrink: 0; }
.search-field input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}

.search-results {
  margin-top: 16px;
  max-height: 320px;
  overflow-y: auto;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: background var(--duration) var(--ease);
}
.search-result:hover { background: var(--accent-soft); }
.search-result-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.search-result-meta { font-size: 0.8rem; color: var(--ink-faint); }
.search-empty { padding: 16px 8px; color: var(--ink-faint); font-size: 0.9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.2s var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn-primary:hover { background: var(--accent-strong); color: #fff; }

.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-outline {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover { background: var(--accent-soft); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(48px, 8vw, 88px) 0 clamp(40px, 6vw, 64px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-lead {
  margin: 20px 0 28px;
  max-width: 480px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats dt {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-visual {
  position: relative;
  min-height: 380px;
}

.hero-card {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.hero-card--main {
  inset: 0 60px 40px 0;
  z-index: 2;
}

.hero-card-img {
  height: 200px;
  background:
    radial-gradient(ellipse at 30% 20%, hsl(var(--hue, 24) 60% 75% / 0.5), transparent 60%),
    radial-gradient(ellipse at 70% 80%, hsl(calc(var(--hue, 24) + 40) 50% 60% / 0.4), transparent 55%),
    linear-gradient(145deg, hsl(var(--hue, 24) 35% 88%), hsl(calc(var(--hue, 24) + 20) 30% 78%));
  background-size: cover;
  background-position: center;
}
.hero-card-img.has-photo,
.recipe-thumb.has-photo,
.search-result-thumb.has-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-card-body strong { font-family: var(--font-display); font-size: 1.3rem; }
.hero-card-body span:last-child { font-size: 0.85rem; color: var(--ink-faint); }

.hero-card--sub {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 3;
}
.hero-card--sub .hero-card-img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.hero-card--a { right: 0; top: 20px; }
.hero-card--b { right: 20px; bottom: 0; }

.pill {
  display: inline-block;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; max-width: 420px; margin: 0 auto; }
  .hero-card--main { inset: 0 40px 30px 0; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section-gap) 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}
.section-head--row { flex-wrap: wrap; align-items: center; }

/* ---------- Categories ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 18px;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.category-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.category-card strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.category-card span {
  font-size: 0.8rem;
  color: var(--ink-faint);
}

/* ---------- Recipe Cards ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.recipe-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
}

.recipe-card--featured { grid-row: span 2; }

.recipe-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(ellipse at 25% 25%, hsl(var(--hue, 24) 55% 72% / 0.55), transparent 55%),
    radial-gradient(ellipse at 75% 75%, hsl(calc(var(--hue, 24) + 35) 45% 58% / 0.45), transparent 50%),
    linear-gradient(160deg, hsl(var(--hue, 24) 30% 90%), hsl(calc(var(--hue, 24) + 15) 25% 80%));
  background-size: cover;
  background-position: center;
}
.recipe-card--featured .recipe-thumb { aspect-ratio: auto; flex: 1; min-height: 280px; }

.recipe-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.recipe-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.recipe-meta span::before { content: "·"; margin-right: 8px; color: var(--line); }
.recipe-meta span:first-child::before { content: none; margin: 0; }

.recipe-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}
.recipe-card--featured .recipe-title { font-size: 1.6rem; }

.recipe-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}
.recipe-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage);
  font-size: 0.72rem;
  font-weight: 500;
}

@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .recipe-card--featured { grid-row: auto; }
  .recipe-card--featured .recipe-thumb { min-height: 220px; }
}

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: all var(--duration) var(--ease);
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sort-select {
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.85rem;
  cursor: pointer;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-faint);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

/* ---------- CTA ---------- */
.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: clamp(32px, 5vw, 48px);
  background:
    radial-gradient(ellipse at 0% 50%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    radial-gradient(ellipse at 100% 50%, color-mix(in srgb, var(--sage) 10%, transparent), transparent 50%),
    var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}

.cta-copy p:last-child {
  margin: 8px 0 0;
  color: var(--ink-soft);
  max-width: 400px;
}

.cta-form {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 280px;
  max-width: 420px;
}
.cta-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--duration) var(--ease);
}
.cta-form input:focus { border-color: var(--accent); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.about-body p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.about-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.about-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.92rem;
  color: var(--ink);
}
.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-list { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--section-gap);
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand .brand-mark {
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  color: var(--accent);
}

.footer-name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-copy {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-nav a {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.footer-nav a:hover { color: var(--accent); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 22px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  opacity: 0;
  z-index: 300;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast[hidden] { display: block; }

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-copy > * {
  animation: fadeUp 0.7s var(--ease) both;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.2s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.28s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.36s; }

.hero-visual {
  animation: fadeUp 0.8s var(--ease) 0.2s both;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Images ---------- */
.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recipe-thumb,
.hero-card-img,
.search-result-thumb {
  overflow: hidden;
  position: relative;
}
.thumb-img--sm { border-radius: var(--radius-sm); }
.hero-card--sub .hero-card-img { width: 52px; height: 52px; }
.hero-card--main .hero-card-img { height: 200px; }

/* ---------- Recipe Detail ---------- */
.recipe-main { padding: 32px 0 64px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: var(--ink-faint);
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--accent); }

.recipe-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 40px;
}
.recipe-hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--paper-edge);
  box-shadow: var(--shadow-lift);
  aspect-ratio: 4 / 3;
  background: var(--paper);
}
.recipe-hero-media--fallback {
  background:
    radial-gradient(ellipse at 30% 20%, hsl(var(--hue, 24) 60% 75% / 0.5), transparent 60%),
    linear-gradient(145deg, hsl(var(--hue, 24) 35% 88%), hsl(calc(var(--hue, 24) + 20) 30% 78%));
}
.recipe-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recipe-hero-desc { margin: 12px 0 16px; color: var(--ink-soft); font-size: 1.05rem; }
.recipe-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.recipe-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}
.recipe-panel {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.panel-head--row { flex-wrap: wrap; }
.panel-head h2 { font-size: 1.5rem; }

.servings-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.servings-control input[type="range"] { width: 120px; accent-color: var(--accent); }

.ingredient-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ingredient-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}
.ing-name { font-weight: 500; }
.ing-amount { color: var(--accent-strong); font-weight: 600; white-space: nowrap; }

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.step-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
}
.step-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.9rem;
}
.step-body p { margin: 0 0 10px; color: var(--ink-soft); }
.step-timer { padding: 6px 12px; font-size: 0.82rem; }

/* Cook mode */
body.cook-mode .site-header,
body.cook-mode .site-footer,
body.cook-mode .breadcrumb { display: none; }
body.cook-mode .recipe-hero { grid-template-columns: 1fr; }
body.cook-mode .recipe-detail-grid { grid-template-columns: 1fr; }
body.cook-mode .step-body p { font-size: 1.2rem; line-height: 1.7; color: var(--ink); }
body.cook-mode .step-num { width: 48px; height: 48px; font-size: 1.1rem; }

@media (max-width: 900px) {
  .recipe-hero { grid-template-columns: 1fr; }
  .recipe-detail-grid { grid-template-columns: 1fr; }
}

/* ---------- Auth ---------- */
.auth-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-wrap {
  width: min(400px, 100%);
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.auth-wrap h1 { font-family: var(--font-display); margin: 16px 0 24px; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; font-size: 0.88rem; color: var(--ink-soft); }
.auth-form input {
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
}
.auth-error { color: #c0392b; font-size: 0.88rem; margin: 0; }
.auth-alt { margin-top: 20px; font-size: 0.9rem; color: var(--ink-soft); text-align: center; }

.auth-nav { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.auth-nav .auth-user { color: var(--ink-soft); font-weight: 500; }
.auth-link {
  color: var(--ink-soft);
  background: none;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}
.auth-link:hover { color: var(--accent); }

/* ---------- Optional / Pairings / Drinks ---------- */
.panel-desc { margin: -8px 0 16px; font-size: 0.9rem; color: var(--ink-faint); }
.recipe-base { margin: 0; font-size: 0.8rem; color: var(--ink-faint); }
.recipe-detail-col { display: grid; gap: 24px; }
.optional-list, .pairing-list, .drink-list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
}
.optional-list li, .pairing-list li, .drink-list li {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}
.opt-head, .pair-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.opt-reason, .pairing-list p, .drink-list p { margin: 4px 0 0; font-size: 0.88rem; color: var(--ink-soft); }
.opt-taste {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage);
  font-size: 0.72rem;
}
.drink-list strong { color: var(--accent-strong); }

/* ---------- Comments ---------- */
.comments-panel { margin-top: 24px; }
.comment-form { display: grid; gap: 10px; margin-bottom: 20px; }
.comment-form textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
  min-height: 80px;
}
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.comment-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}
.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.comment-head time { color: var(--ink-faint); }
.comment-body { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.comments-empty { color: var(--ink-faint); font-size: 0.9rem; }

/* ---------- Coupang Partners ---------- */
.coupang-banner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 28px auto;
  width: 100%;
  max-width: 700px;
  min-height: 140px;
  padding: 0 24px;
}
.coupang-banner {
  width: 100%;
  max-width: 680px;
  min-height: 140px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.coupang-banner-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.4;
  opacity: 0.85;
}
@media (max-width: 720px) {
  .coupang-banner-wrap {
    margin: 20px auto;
    padding: 0 16px;
  }
  .coupang-banner {
    max-width: 100%;
    overflow-x: auto;
  }
}
