:root {
  --ink: #25241f;
  --muted: #77736a;
  --paper: #f7f3eb;
  --card: #fffdf8;
  --line: #e7e0d4;
  --accent: #f0613c;
  --accent-dark: #cb4728;
  --green: #486853;
  --shadow: 0 18px 50px rgba(54, 45, 32, .09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 4%, rgba(240, 97, 60, .13), transparent 28rem),
    var(--paper);
  font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding-bottom: 92px;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 20px 12px;
  background: rgba(247, 243, 235, .86); backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 850; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: white; font-size: 12px; letter-spacing: -.08em; }
.avatar { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 12px; color: var(--green); font-size: 12px; font-weight: 800; }
.account-area { display: flex; align-items: center; gap: 9px; }
.sync-meta { max-width: 180px; color: var(--muted); font-size: 9px; line-height: 1.3; text-align: right; }
main { width: min(100%, 1080px); margin: auto; }
.hero { display: grid; grid-template-columns: 1fr 120px; gap: 16px; align-items: center; min-height: 360px; padding: 44px 22px 28px; }
.eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 900; letter-spacing: .17em; color: var(--accent); }
h1 { margin: 0; max-width: 590px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 11vw, 76px); line-height: .98; letter-spacing: -.065em; }
h1 span, h1 em { display: block; width: max-content; max-width: 100%; white-space: nowrap; }
h1 em { color: var(--accent); font-weight: inherit; font-style: italic; }
.hero-copy { max-width: 430px; margin: 20px 0 0; line-height: 1.65; color: var(--muted); word-break: keep-all; }
.hero-orb { width: 116px; aspect-ratio: 1; border-radius: 44% 56% 62% 38% / 50% 37% 63% 50%; display: grid; place-items: center; background: #ffd36d; transform: rotate(-8deg); box-shadow: var(--shadow); }
.hero-orb span { font-size: 54px; transform: rotate(8deg); }
.quick-status { margin: 0 16px 22px; padding: 18px 8px; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--ink); border-radius: 22px; box-shadow: var(--shadow); }
.quick-status a { color: white; text-align: center; text-decoration: none; border-right: 1px solid rgba(255,255,255,.15); }
.quick-status a:last-child { border: 0; }
.quick-status strong, .quick-status span { display: block; }
.quick-status strong { font: 700 25px Georgia, serif; }
.quick-status span { margin-top: 3px; color: #d8d3c8; font-size: 11px; }
.feature-ribbon { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 16px 22px; }
.feature-ribbon div { min-width: 0; padding: 14px 10px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,248,.82); text-align: center; }
.feature-ribbon span, .feature-ribbon strong, .feature-ribbon small { display: block; }
.feature-ribbon span { margin-bottom: 7px; font-size: 22px; }
.feature-ribbon strong { font-size: 11px; }
.feature-ribbon small { display: none; margin-top: 4px; color: var(--muted); font-size: 10px; }
.section { margin: 14px 16px; padding: 24px 18px; background: rgba(255,253,248,.88); border: 1px solid rgba(231,224,212,.9); border-radius: 26px; box-shadow: 0 9px 32px rgba(54,45,32,.045); scroll-margin-top: 74px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
h2 { margin: 0; font: 700 30px/1.1 Georgia, "Noto Serif KR", serif; letter-spacing: -.04em; }
.section-note, .section-intro { color: var(--muted); font-size: 12px; }
.section-intro { margin: 12px 0 20px; line-height: 1.6; }
.ingredient-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
label span { display: block; margin: 0 0 6px 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
input { width: 100%; min-height: 47px; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 0 14px; color: var(--ink); outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240,97,60,.12); }
.primary, .secondary { min-height: 48px; border: 0; border-radius: 14px; font-weight: 850; }
.primary { grid-column: 1 / -1; background: var(--accent); color: white; }
.primary:active { background: var(--accent-dark); }
.secondary { width: 100%; margin-top: 14px; border: 1px solid var(--line); background: white; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.quick-add { display: flex; gap: 6px; align-items: center; overflow-x: auto; margin-top: 14px; padding-bottom: 3px; }
.quick-add span { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 800; }
.quick-add button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: transparent; padding: 7px 10px; color: var(--green); font-size: 11px; font-weight: 750; }
.chip { position: relative; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 10px 12px; color: var(--ink); text-align: left; }
.chip strong, .chip small { display: block; }
.chip small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.chip.urgent { border-color: #ee917b; background: #fff4ef; }
.empty { margin: 20px 0 0; padding: 18px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; font-size: 13px; }
.pantry-box { margin-top: 18px; padding: 14px; border-radius: 17px; background: #f2eee5; }
.pantry-box summary { cursor: pointer; font-size: 13px; font-weight: 850; }
.pantry-box summary span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 5px; border-radius: 99px; background: var(--green); color: white; font-size: 10px; }
.pantry-box > p { color: var(--muted); font-size: 11px; line-height: 1.55; }
.text-button { padding: 7px 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 800; }
.recipe-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 82%); overflow-x: auto; gap: 14px; padding: 3px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.wanted-form { display: grid; gap: 10px; margin: 0 0 20px; padding: 16px; border-radius: 18px; background: #f0eadf; }
.wanted-form strong, .wanted-form span { display: block; }
.wanted-form strong { font-family: Georgia, "Noto Serif KR", serif; }
.wanted-form span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.wanted-form .secondary { margin: 0; }
.wish-person span { margin-bottom: 5px; }
.wish-person select { width: 100%; min-height: 47px; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 0 12px; color: var(--ink); }
.recipe-grid::-webkit-scrollbar { display: none; }
.recipe-card { position: relative; overflow: hidden; min-height: 390px; border-radius: 23px; background: #292722; color: white; scroll-snap-align: start; box-shadow: var(--shadow); }
.recipe-visual { position: relative; height: 215px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #f6a38a, #c94a2e); }
.recipe-visual span { font-size: 84px; filter: drop-shadow(0 14px 18px rgba(45,30,20,.18)); transform: rotate(-6deg); }
.recipe-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-credit { position: absolute; z-index: 2; right: 8px; bottom: 8px; padding: 4px 7px; border-radius: 999px; background: rgba(20,18,15,.7); color: white; font-size: 9px; text-decoration: none; }
.recipe-visual.red, .selected-emoji.red { background: linear-gradient(145deg, #ec8d72, #9f301f); }
.recipe-visual.yellow, .selected-emoji.yellow { background: linear-gradient(145deg, #ffe28d, #dd9b2a); }
.recipe-visual.green, .selected-emoji.green { background: linear-gradient(145deg, #a9c99a, #4f7658); }
.recipe-visual.blue, .selected-emoji.blue { background: linear-gradient(145deg, #a8d5db, #4f7a85); }
.recipe-card::after { content: ""; position: absolute; inset: 130px 0 auto; height: 90px; background: linear-gradient(transparent, #292722); pointer-events: none; }
.recipe-body { position: relative; z-index: 1; padding: 18px; }
.match { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #ffe27f; color: #443b1d; font-size: 11px; font-weight: 900; }
.recipe-card h3 { margin: 12px 0 6px; font: 700 25px Georgia, "Noto Serif KR", serif; letter-spacing: -.035em; }
.recipe-meta { color: #bdb7ad; font-size: 12px; }
.missing { min-height: 36px; margin: 12px 0; color: #e7e0d5; font-size: 12px; line-height: 1.5; }
.card-actions { display: flex; gap: 8px; }
.card-actions button { flex: 1; min-height: 42px; border-radius: 12px; font-size: 12px; font-weight: 850; }
.select-recipe { border: 0; background: var(--accent); color: white; }
.add-missing { border: 1px solid #555149; background: transparent; color: white; }
.view-recipe { border: 1px solid #555149; background: transparent; color: white; }
.selected-recipe { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; margin-top: 18px; padding: 12px; border-radius: 18px; background: #f1eadf; }
.selected-emoji { width: 92px; height: 84px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #f6a38a, #c94a2e); font-size: 38px; }
.selected-recipe h3 { margin: 0 0 6px; font-family: Georgia, serif; }
.selected-recipe p { margin: 0; color: var(--muted); font-size: 12px; }
.selected-empty { margin-top: 18px; padding: 25px 10px; border: 1px dashed var(--line); border-radius: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.selected-empty span { display: block; font-size: 30px; }
.status-pill { padding: 7px 10px; border-radius: 999px; background: #eee8dc; color: var(--muted); font-size: 11px; font-weight: 800; }
.status-pill.done { background: #dfeee2; color: #31543b; }
.family-votes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.family-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; margin-top: 15px; }
.family-tools .shopping-form { margin: 0; }
.chef-select span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.chef-select select { width: 100%; height: 47px; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 0 12px; color: var(--ink); }
.family-vote { min-height: 82px; border: 1px solid var(--line); border-radius: 15px; background: white; color: var(--ink); font-size: 12px; font-weight: 800; }
.family-vote span { display: block; margin-bottom: 7px; font-size: 21px; }
.family-vote.voted { border-color: #8db99a; background: #edf7ef; color: #31543b; }
.wanted-section { background: linear-gradient(145deg, rgba(255,253,248,.96), rgba(238,245,238,.92)); }
.wanted-result:empty { display: none; }
.wanted-card { margin-top: 16px; padding: 18px; border: 1px solid #d9e5da; border-radius: 20px; background: white; }
.wanted-card-title { display: flex; gap: 13px; align-items: center; }
.wanted-card-title > div { min-width: 0; flex: 1; }
.wish-remove { align-self: flex-start; width: 34px; height: 34px; border: 0; border-radius: 99px; background: #f3eee5; color: var(--muted); font-size: 19px; }
.wish-note { margin: 14px 0 0; padding: 12px; border-radius: 13px; background: #f3eee5; color: var(--muted); font-size: 12px; line-height: 1.5; }
.wanted-card-title > span { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; background: #f3eee5; font-size: 31px; }
.wanted-card-title small { color: var(--green); font-weight: 850; }
.wanted-card-title h3 { margin: 2px 0; font: 700 24px Georgia, "Noto Serif KR", serif; }
.wanted-card-title p { margin: 0; color: var(--muted); font-size: 12px; }
.wanted-materials { display: grid; gap: 8px; margin-top: 15px; }
.wanted-materials > div { padding: 13px; border-radius: 14px; background: #edf6ee; color: #31543b; }
.wanted-materials .need { background: #fff0eb; color: #a13e29; }
.wanted-materials strong { font-size: 12px; }
.wanted-materials p { margin: 5px 0 0; font-size: 12px; line-height: 1.5; }
.wanted-actions { display: grid; gap: 8px; margin-top: 12px; }
.wanted-actions .primary { width: 100%; }
.wanted-actions .secondary { margin: 0; }
.shopping-form { display: grid; grid-template-columns: 1fr 48px; gap: 8px; margin-top: 18px; }
.icon-button { border: 0; border-radius: 14px; background: var(--ink); color: white; font-size: 24px; }
.shopping-list { margin-top: 12px; }
.shopping-row { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.shopping-row input { width: 21px; min-height: 21px; accent-color: var(--accent); }
.shopping-row span { flex: 1; font-size: 14px; }
.shopping-row.done span { color: var(--muted); text-decoration: line-through; }
.shopping-row button { border: 0; background: transparent; color: #a39c90; font-size: 18px; }
.bottom-nav { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; max-width: 520px; margin: auto; padding: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: rgba(37,36,31,.94); backdrop-filter: blur(18px); box-shadow: 0 18px 40px rgba(0,0,0,.22); }
.bottom-nav a { color: #c9c4ba; text-align: center; text-decoration: none; font-size: 9px; }
.bottom-nav span { display: block; margin-bottom: 4px; font-size: 18px; }
.bottom-nav .nav-main { color: white; }
.bottom-nav .nav-main span { width: 43px; height: 43px; margin: -22px auto 4px; display: grid; place-items: center; border-radius: 15px; background: var(--accent); box-shadow: 0 8px 20px rgba(240,97,60,.35); }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 103px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 999px; background: var(--ink); color: white; font-size: 12px; transition: .25s ease; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.recipe-dialog { width: min(92vw, 620px); max-height: 88vh; border: 0; border-radius: 26px; background: var(--card); padding: 0; color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.32); }
.recipe-dialog::backdrop { background: rgba(24,22,18,.62); backdrop-filter: blur(5px); }
.dialog-close { position: sticky; z-index: 2; top: 13px; float: right; width: 38px; height: 38px; margin: 13px; border: 0; border-radius: 99px; background: rgba(37,36,31,.88); color: white; font-size: 22px; }
.detail-cover { min-height: 180px; display: grid; place-items: center; font-size: 76px; }
.detail-content { padding: 22px; }
.detail-content h3 { margin: 0; font: 700 32px Georgia, "Noto Serif KR", serif; }
.detail-content > p { color: var(--muted); font-size: 13px; }
.detail-block { margin-top: 22px; }
.detail-block h4 { margin: 0 0 10px; font-size: 13px; }
.ingredient-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ingredient-tag { padding: 8px 10px; border-radius: 999px; background: #e4f0e6; color: #31543b; font-size: 11px; font-weight: 800; }
.ingredient-tag.need { background: #fff0eb; color: #b3482f; }
.ingredient-list { display: grid; gap: 7px; }
.ingredient-row { padding: 10px 12px; border-radius: 12px; background: #eef5ee; color: #31543b; font-size: 12px; font-weight: 750; line-height: 1.45; }
.steps { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: start; padding: 12px; border-radius: 14px; background: #f3eee5; font-size: 13px; line-height: 1.55; }
.steps b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--ink); color: white; font-size: 11px; }
.tip-box { padding: 14px; border-left: 3px solid var(--accent); background: #fff4ef; color: #6f4a3e; font-size: 12px; line-height: 1.6; }
.notification-button { position: relative; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); font-size: 16px; cursor: pointer; }
.notification-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--paper); border-radius: 99px; background: var(--accent); color: white; font-size: 9px; font-weight: 900; }
.section-heading { gap: 10px; }
.section-toggle { margin-left: auto; padding: 8px 10px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.section-toggle b { color: var(--ink); font-size: 15px; line-height: 1; }
.section.is-collapsed > :not(.section-heading) { display: none !important; }
.message-list { max-height: 420px; overflow-y: auto; display: grid; gap: 10px; padding: 4px 2px 14px; }
.message-bubble { width: min(86%, 460px); padding: 13px 15px; border-radius: 18px 18px 18px 5px; background: #f0ece4; }
.message-bubble.mine { justify-self: end; border-radius: 18px 18px 5px 18px; background: #e1eee3; }
.message-author { display: flex; align-items: baseline; gap: 8px; }
.message-author strong { font-size: 12px; }
.message-author time { color: var(--muted); font-size: 9px; }
.message-bubble p { margin: 7px 0 0; font-size: 13px; line-height: 1.6; word-break: break-word; }
.message-form { display: grid; grid-template-columns: minmax(100px,.35fr) 1fr; gap: 10px; align-items: end; margin-top: 14px; padding: 14px; border-radius: 18px; background: #f6f2ea; }
.message-form label { display: grid; gap: 6px; }
.message-form label span { color: var(--muted); font-size: 10px; font-weight: 800; }
.message-form select,.message-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); font: inherit; font-size: 13px; padding: 11px; resize: vertical; }
.message-form .message-input { grid-column: 2; grid-row: 1 / span 2; }
.message-form .primary { min-height: 42px; }
.notification-backdrop { position: fixed; z-index: 54; inset: 0; background: rgba(26,24,20,.32); backdrop-filter: blur(2px); }
.notification-panel { position: fixed; z-index: 55; top: 0; right: 0; width: min(390px,94vw); height: 100dvh; padding: 24px 20px; overflow-y: auto; background: var(--paper); box-shadow: -20px 0 60px rgba(0,0,0,.18); transform: translateX(105%); transition: transform .28s ease; }
.notification-panel.open { transform: translateX(0); }
.notification-head { display: flex; justify-content: space-between; align-items: start; }
.notification-head small { color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.notification-head h2 { margin: 3px 0 0; font: 700 25px Georgia,"Noto Serif KR",serif; }
.notification-head button { width: 36px; height: 36px; border: 0; border-radius: 99px; background: var(--ink); color: white; font-size: 21px; }
.notification-guide { margin: 14px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.notification-list { display: grid; gap: 8px; }
.notification-item { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.55); }
.notification-item.unread { border-color: #ef9b83; background: #fff5f1; }
.notification-item > span { align-self: start; padding: 4px 7px; border-radius: 99px; background: #e8e3da; color: var(--muted); font-size: 8px; font-weight: 900; }
.notification-item.unread > span { background: var(--accent); color: white; }
.notification-item strong { font-size: 12px; }.notification-item p { margin: 3px 0; font-size: 11px; line-height: 1.45; }.notification-item time { color: var(--muted); font-size: 9px; }
.notification-permission { width: 100%; margin-top: 16px; }
.hidden { display: none !important; }
@media (min-width: 720px) {
  body { padding-bottom: 30px; }
  .topbar { padding-inline: 34px; }
  .hero { grid-template-columns: 1fr 250px; padding: 80px 36px 48px; }
  .hero-orb { width: 220px; }
  .hero-orb span { font-size: 90px; }
  .quick-status { margin-inline: 34px; }
  .feature-ribbon { margin-inline: 34px; gap: 14px; }
  .feature-ribbon div { padding: 18px; text-align: left; }
  .feature-ribbon span { float: left; margin: 0 12px 0 0; }
  .feature-ribbon small { display: block; }
  .section { margin: 18px 34px; padding: 32px; }
  .ingredient-form { grid-template-columns: 1.2fr 1fr auto; align-items: end; }
  .primary { grid-column: auto; padding: 0 24px; }
  .recipe-grid { grid-auto-flow: initial; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .wanted-form { grid-template-columns: 1.15fr 1fr .8fr auto; align-items: end; }
  .wanted-form .secondary { padding-inline: 18px; }
  .message-form { grid-template-columns: 150px 1fr auto; }
  .message-form .message-input { grid-column: 2; grid-row: 1; }
  .message-form .primary { grid-column: 3; }
  .recipe-card { min-width: 0; }
  .bottom-nav { position: sticky; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
