@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --paper: #f8f5ee;
  --surface: #fffefa;
  --ink: #2e392e;
  --muted: #6b7062;
  --green: #456449;
  --green-dark: #304c34;
  --line: #dedfd2;
  --orange: #c87042;
  --danger: #a23c30;
  font-family: "DM Sans", "Noto Sans JP", "Noto Sans Devanagari", "Noto Sans SC", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, .button, input, select { min-height: 46px; }
button:disabled { cursor: wait; opacity: .5; }
textarea { resize: vertical; min-height: 100px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; background: var(--surface); color: var(--ink); }
input[type="checkbox"] { width: 22px; min-height: 22px; accent-color: var(--green); }
input[type="file"] { font-size: .85rem; }
input[type="file"]::file-selector-button { border: 0; border-radius: 5px; padding: 7px; background: #e9eddf; color: var(--green-dark); margin-right: 10px; cursor: pointer; }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
:focus-visible { outline: 3px solid #ba7a3b; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.35; letter-spacing: -.04em; margin-bottom: 20px; overflow-wrap: anywhere; }
h2 { font-size: 1.3rem; letter-spacing: -.025em; margin-bottom: 22px; }
h3 { font-size: 1.15rem; line-height: 1.6; }
p { margin-bottom: 16px; }
.site-header { min-height: 102px; max-width: 1280px; margin: auto; padding: 22px 6%; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 1.9rem; font-weight: 700; letter-spacing: -.08em; white-space: nowrap; }
.brand-icon { background: var(--green); color: var(--paper); font-size: 1.2rem; width: 37px; height: 40px; border-radius: 14px 14px 9px 9px; display: grid; place-items: center; transform: rotate(-7deg); letter-spacing: -.08em; }
.brand-dot { color: var(--orange); margin-left: -9px; }
.header-tools { display: flex; align-items: center; gap: 26px; }
.auth-tools { display: flex; align-items: center; gap: 10px; }
.auth-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.auth-tools .button { font-size: .78rem; padding: 10px 12px; }
.header-tools select { width: auto; max-width: 155px; background: transparent; font-size: .85rem; }
.header-note { font-size: .8rem; color: var(--muted); display: none; }
.container { width: min(1100px, 88%); margin: 0 auto; min-height: 65vh; }
.narrow { max-width: 800px; padding-top: 30px; }
.intro { position: relative; overflow: hidden; padding: 64px 0 66px; margin-bottom: 24px; }
.eyebrow { display: block; color: var(--green); font-size: .72rem; font-weight: 700; letter-spacing: .16em; margin-bottom: 18px; }
.intro h1 { white-space: pre-line; max-width: 670px; font-size: clamp(2.1rem, 4.3vw, 3.45rem); line-height: 1.4; }
.intro p { max-width: 490px; color: var(--muted); line-height: 1.9; font-size: .94rem; margin-bottom: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 22px; border-radius: 8px; border: 1px solid transparent; text-decoration: none; font-weight: 600; font-size: .88rem; line-height: 1.5; gap: 7px; transition: background .15s, transform .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.primary { background: var(--green); color: #fff; }
.primary:hover:not(:disabled) { background: var(--green-dark); }
.secondary { border-color: var(--line); background: var(--surface); color: var(--green-dark); }
.secondary:hover:not(:disabled) { background: #edf0e5; }
.text-button { background: transparent; color: var(--muted); padding-left: 12px; padding-right: 12px; }
.danger { color: var(--danger); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-heading h1, .section-heading h2 { margin-bottom: 0; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading .button { flex-shrink: 0; }
.muted { color: var(--muted); font-size: .84rem; }
.filters { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 27px; }
.filters > select { width: auto; flex: 1 1 160px; }
.search-field { flex: 4 1 250px; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding-left: 17px; }
.search-field > span { color: var(--muted); font-size: 1.5rem; transform: rotate(-30deg); }
.search-field input { border: 0; background: transparent; }
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.recipe-card { display: block; text-decoration: none; background: var(--surface); border: 1px solid #e7e5db; border-radius: 15px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.recipe-card:hover { transform: translateY(-4px); box-shadow: 0 12px 25px #33442c0c; }
.card-photo { width: 100%; aspect-ratio: 1; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.recipe-card:hover img { transform: scale(1.025); }
.card-body { padding: 20px; }
.badge { background: #edf0e5; color: var(--green-dark); border-radius: 5px; padding: 4px 9px; display: inline-block; font-size: .7rem; line-height: 1.5; font-weight: 500; }
.card-body h3 { margin: 12px 0 9px; overflow-wrap: anywhere; }
.card-body p { margin: 0; overflow-wrap: anywhere; }
.placeholder { display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #f6f4e9 0 30%, #e9ecdf 30.5% 32%, #f0efe5 32.5% 41%, #e3e7d8 41.5% 42%, #ececdf 42.5%); text-align: center; min-height: 160px; color: #68735d; }
.placeholder span { max-width: 75%; padding: 12px 18px; font-size: .8rem; background: #fffefaeb; border-radius: 20px; }
.empty-state { text-align: center; padding: 55px 20px; background: #efefe5; border: 1px dashed #cbd1bc; border-radius: 15px; }
.empty-state p { color: var(--muted); font-size: .9rem; }
.empty-icon { display: block; font-size: 2.4rem; color: var(--green); margin-bottom: 14px; }
.status { margin: 15px 0; font-size: .92rem; overflow-wrap: anywhere; }
.status:empty { display: none; }
.status.error { padding: 15px 18px; background: #f9e9e1; border: 1px solid #e9c2b0; color: #843528; border-radius: 9px; }
.back-link { display: inline-block; font-size: .87rem; color: var(--green); margin: 0 0 28px; text-decoration: none; padding: 8px 0; }
.panel { background: var(--surface); padding: 25px; border: 1px solid #e4e4d8; border-radius: 14px; margin-bottom: 23px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
label { font-size: .87rem; }
.field > label, .ingredient-row label > span { display: block; margin-bottom: 8px; font-weight: 500; }
.hint { color: var(--muted); font-size: .79rem; line-height: 1.8; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.photo-preview { width: 100%; min-height: 210px; border-radius: 10px; overflow: hidden; margin-bottom: 15px; }
.photo-preview img { width: 100%; max-height: 350px; object-fit: cover; display: block; }
.photo-preview:not(.placeholder):empty { display: none; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field .button-row { margin: 12px 0; }
.ingredient-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-bottom: 15px; }
.ingredient-row:last-child { margin-bottom: 0; }
.row-button { color: var(--muted); border-color: var(--line); background: transparent; padding: 10px; font-size: .76rem; }
.row-button:hover { background: #f2f2e9; }
.step-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 24px; }
.step-row:last-child { margin-bottom: 0; }
.step-number { background: #e9eddf; color: var(--green); border-radius: 50%; height: 33px; width: 33px; display: inline-grid; place-items: center; flex-shrink: 0; font-size: .88rem; font-weight: 700; }
.step-controls { grid-column: 2; display: flex; flex-wrap: wrap; gap: 7px; }
.password-row { display: flex; gap: 10px; }
.password-row input { min-width: 0; }
.checkbox-label { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin: 30px 0; }
.hero-photo { width: 100%; border-radius: 16px; overflow: hidden; min-height: 260px; }
.hero-open { display: block; padding: 0; width: 100%; background: transparent; border: 0; }
.hero-open img { width: 100%; max-height: 510px; aspect-ratio: 8 / 5; object-fit: cover; display: block; }
.recipe-title { margin: 35px 0 20px; }
.recipe-title h1 { margin: 15px 0; }
.recipe-actions { margin-bottom: 32px; }
.video-panel iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; background: #182018; }
.video-panel .hint { margin-top: 15px; }
.recipe-body { display: grid; gap: 0 25px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 13px 0; border-bottom: 1px solid #e9e9df; text-align: left; font-weight: 400; overflow-wrap: anywhere; }
th { width: 57%; padding-right: 15px; }
td { text-align: right; }
.seasoning-heading { padding-top: 27px; font-weight: 600; color: var(--green); font-size: .82rem; }
.instructions { padding: 0; margin: 0; list-style: none; }
.instructions li { display: flex; gap: 17px; margin-bottom: 26px; break-inside: avoid; }
.instructions li:last-child { margin-bottom: 0; }
.instructions p { margin: 0; font-size: .94rem; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
dialog { border: 1px solid var(--line); color: var(--ink); background: var(--surface); border-radius: 16px; padding: 30px; max-width: min(480px, 92vw); width: 100%; }
dialog::backdrop { background: #182018b8; backdrop-filter: blur(4px); }
.password-dialog h2 { margin-bottom: 12px; }
.password-dialog p { font-size: .9rem; color: var(--muted); }
.lightbox { background: transparent; border: 0; padding: 0; max-width: none; width: 100vw; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 95vw; max-height: 88dvh; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: fixed; right: 18px; top: 18px; border: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--ink); font-weight: 700; }
footer { width: min(1100px, 88%); margin: 70px auto 0; padding: 28px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; color: var(--muted); font-size: .75rem; }
.brand-small { color: var(--green); font-weight: 700; font-size: 1.1rem; letter-spacing: -.05em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.intro-art { display: none; }

@media (min-width: 850px) {
  .header-note { display: inline; }
  .recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; }
  .intro { min-height: 415px; }
  .intro h1, .intro p { max-width: 62%; position: relative; z-index: 1; }
  .intro-art { display: block; position: absolute; right: 0; top: 36px; width: 330px; height: 330px; }
  .plate { position: absolute; inset: 24px; border-radius: 50%; background: #fdfcf5; border: 15px solid #e8e9db; box-shadow: 10px 20px 35px #41472815, inset 0 0 0 2px #d9decb; transform: rotate(-15deg); }
  .salad { position: absolute; inset: 37px; border-radius: 50%; background: radial-gradient(ellipse at 28% 35%, #cb784b 0 9%, transparent 10%), radial-gradient(ellipse at 70% 65%, #cb784b 0 12%, transparent 13%), radial-gradient(ellipse at 60% 30%, #e8d6a0 0 14%, transparent 15%), radial-gradient(ellipse at 35% 75%, #e8d6a0 0 12%, transparent 13%), repeating-conic-gradient(from 20deg, #69814f 0 20deg, #91a064 20deg 45deg, #b2b977 45deg 62deg); box-shadow: 0 5px 9px #354c3320; }
  .leaf { position: absolute; background: #7e965c; width: 70px; height: 25px; border-radius: 0 80%; z-index: 1; }
  .leaf-one { right: 8px; top: 29px; transform: rotate(-30deg); }
  .leaf-two { right: -6px; top: 60px; transform: rotate(16deg); background: #a4b086; }
  .tomato { position: absolute; width: 36px; height: 35px; background: #c87042; border-radius: 50%; bottom: 23px; left: 18px; }
  .recipe-body { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; }
}
@media (max-width: 520px) {
  .site-header { flex-wrap: wrap; }
  .header-tools { flex-wrap: wrap; gap: 10px; }
  .auth-tools { flex-wrap: wrap; }
  .auth-name { max-width: 100px; }
  .site-header { min-height: 84px; padding: 16px 6%; gap: 10px; }
  .brand { font-size: 1.6rem; }
  .brand-icon { width: 30px; height: 34px; font-size: 1rem; }
  .header-tools select { max-width: 110px; padding: 10px 7px; }
  .container { width: 90%; }
  .intro { padding: 39px 0 35px; }
  .recipe-grid { gap: 12px; }
  .card-body { padding: 14px; }
  .card-body h3 { font-size: 1rem; }
  .panel { padding: 20px 16px; }
  .panel .section-heading { flex-wrap: wrap; }
  .narrow > .section-heading { flex-wrap: wrap; }
  .ingredient-row { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 7px; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
  .ingredient-row > button { grid-column: 2; justify-self: end; }
  .two-columns { grid-template-columns: 1fr; gap: 0; }
  .hero-photo { border-radius: 12px; min-height: 210px; }
  .password-row .button { padding: 10px; flex-shrink: 0; }
  .form-actions > * { flex: 1; }
  dialog { padding: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media print {
  :root { background: white; color: black; font-size: 11pt; }
  body { background: white; }
  .site-header, footer, .back-link, .recipe-actions, #ownership-note, dialog, .status, .video-panel { display: none !important; }
  .container { width: 100%; max-width: none; margin: 0; padding: 0; }
  .hero-photo { max-width: 800px; margin: 0 auto; min-height: 0; break-inside: avoid; page-break-inside: avoid; }
  .hero-photo img { width: auto; max-width: 100%; max-height: 300px; margin: 0 auto; object-fit: contain; break-inside: avoid; page-break-inside: avoid; }
  .hero-photo.placeholder { min-height: 120px; }
  .hero-open { min-height: 0; }
  .recipe-title { margin: 20px 0; }
  h1 { font-size: 23pt; }
  h2 { break-after: avoid; }
  .recipe-body { display: block; }
  .panel { border: 0; padding: 0; margin: 0 0 24px; }
  tr, .instructions li { break-inside: avoid; page-break-inside: avoid; }
  .badge, .step-number { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
