* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: var(--fs-md); font-weight: 400; line-height: 1.5; }
a { color: var(--accent); text-underline-offset: .2em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--fs-2xl); font-weight: 600; line-height: 1.25; }
h2 { font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; }
h3 { font-size: var(--fs-md); font-weight: 600; }
button, input, textarea, select { font: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; padding: var(--s2) var(--s4); border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 500; text-decoration: none; cursor: pointer; min-height: 44px; background: var(--panel); color: var(--text); }
button:disabled { cursor: wait; opacity: .65; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.secondary { background: var(--panel-soft); color: var(--text); }
.quiet { background: transparent; border-color: transparent; font-size: var(--fs-sm); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
label { display: flex; flex-direction: column; gap: var(--s2); font-weight: 500; font-size: var(--fs-sm); }
input, textarea, select { width: 100%; padding: var(--s3); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-sm); min-height: 44px; font-size: var(--fs-md); }
textarea { resize: vertical; line-height: 1.5; }
.check { flex-direction: row; align-items: center; }
.check input { width: 20px; min-height: 20px; accent-color: var(--accent); }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s4); padding: var(--s4) var(--s8); background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: var(--s2); color: var(--text); font-size: var(--fs-xl); font-weight: 600; text-decoration: none; }
.skillet-icon { width: 28px; height: 28px; display: inline-block; background: currentColor; mask: url("/icons/skillet.svg") center / contain no-repeat; }
.large-icon { width: 48px; height: 48px; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s4); font-size: var(--fs-sm); }
nav a { text-decoration: none; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: var(--s8); display: flex; flex-direction: column; gap: var(--s6); }
.narrow { max-width: 540px; }
.reading { max-width: 880px; }
.panel { padding: var(--s6); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }
.stack { display: flex; flex-direction: column; gap: var(--s5); }
.auth-panel { margin-top: var(--s8); display: flex; flex-direction: column; gap: var(--s5); }
.muted, .hint { color: var(--text-muted); }
.hint { font-size: var(--fs-xs); font-weight: 400; }
.eyebrow { color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; }
.intro { font-size: var(--fs-lg); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3); }
.field-row { display: flex; gap: var(--s4); }
.field-row label { flex: 1; min-width: 0; }
.notice { padding: var(--s4); border: 1px solid var(--line); background: var(--panel-soft); border-radius: var(--r-sm); }
.notice.error { border-color: var(--danger); }
.notice.success { border-color: var(--success); }
.status-success { color: var(--success); }
.page-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s5); }
.page-heading > div { display: flex; flex-direction: column; gap: var(--s2); }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s5); }
.recipe-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; color: var(--text); text-decoration: none; }
.recipe-card > img, .recipe-card > .placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.recipe-card:focus-visible { box-shadow: var(--shadow); }
.card-body { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.card-body h2 { font-size: var(--fs-sm); font-weight: 600; }
.card-body p { font-size: var(--fs-xs); color: var(--text-muted); }
.placeholder { background: var(--panel-soft); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: var(--fs-2xl); }
.preview-image { width: 240px; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }
.hero { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { padding: var(--s1) var(--s2); background: var(--accent-soft); color: var(--text); border-radius: var(--r-sm); font-size: var(--fs-xs); }
.recipe-detail .panel { display: flex; flex-direction: column; gap: var(--s4); }
.ingredients, .method { margin: 0; padding-left: var(--s6); display: flex; flex-direction: column; gap: var(--s3); }
.method { gap: var(--s5); }
.group-label { list-style: none; font-weight: 600; }
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--s5); padding: var(--s9); text-align: center; }
.footer { padding: var(--s7); text-align: center; font-size: var(--fs-xs); color: var(--text-muted); }
.qr { width: 240px; height: 240px; max-width: 100%; object-fit: contain; }
.codes { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--s3); }
code { font-size: var(--fs-sm); }
.secret, .break-word { overflow-wrap: anywhere; }
.secret { display: block; padding: var(--s3); background: var(--panel-soft); border-radius: var(--r-sm); }
summary { cursor: pointer; }
[hidden] { display: none; }
@media (hover: hover) {
  .recipe-card:hover { box-shadow: var(--shadow); }
  button:hover, .button:hover { filter: brightness(.95); }
  a:hover { text-decoration: underline; }
}
@media (max-width: 1000px) {
  .topbar { padding: var(--s4) var(--s6); }
  .container { padding: var(--s6); }
}
@media (max-width: 760px) {
  .topbar { align-items: flex-start; padding: var(--s4); }
  nav { gap: var(--s2); }
  .container { padding: var(--s4); }
  .panel { padding: var(--s4); }
  .field-row { flex-wrap: wrap; }
  .field-row label { flex-basis: 40%; }
  .auth-panel { margin-top: var(--s4); }
}
@media print {
  .topbar, .footer, .actions { display: none; }
  .container { max-width: none; padding: 0; }
}
