@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/book/fonts/6a8370661dae.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/book/fonts/6a8370661dae.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/book/fonts/181da826c709.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/book/fonts/181da826c709.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/book/fonts/181da826c709.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/book/fonts/181da826c709.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/book/fonts/a12318d746fe.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/book/fonts/62728bf86863.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/book/fonts/62728bf86863.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #f6f2eb;
  --surface: #fffdf8;
  --fg: #302b24;
  --muted: #766d60;
  --line: #e4ddd0;
  --accent: #806039;
  --tint: #eee5d6;
  --shadow: 0 2px 4px #3c2d1904, 0 8px 24px #3c2d1906;
  color-scheme: light;
  font:
    17px/1.6 "Source Serif 4",
    Georgia,
    serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
}
a {
  color: var(--accent);
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.brand {
  font-family: Fraunces, Georgia, serif;
  font-weight: 400;
}
h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.13;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1.5rem;
  line-height: 1.25;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.35;
}
.shell {
  max-width: 1000px;
  padding: 0 36px;
  margin: auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  min-height: 94px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.22rem;
  padding: 0;
}
.brand svg {
  width: 31px;
  height: 31px;
  color: var(--accent);
}
.tools,
.toolbar,
.actions,
.nav,
.section-head,
.fieldrow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tools {
  gap: 10px;
}
.sans,
button:not(.brand):not(.card):not(.cat),
label,
select,
input,
textarea,
.meta {
  font-family: "Source Sans 3", system-ui, sans-serif;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.icon-btn:hover,
.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
/* A saved recipe has a persistent, visible heart state, including on hover. */
.icon-btn[data-action="favorite"][aria-pressed="true"] {
  color: #b94f63;
  border-color: #d68494;
  background: color-mix(in srgb, #efa6b2 18%, var(--surface));
}
.icon-btn[data-action="favorite"][aria-pressed="true"] svg {
  fill: #efa6b2;
}
.favorite-mark {
  color: #b94f63;
}
html[data-theme="dark"] .icon-btn[data-action="favorite"][aria-pressed="true"],
html[data-theme="dark"] .favorite-mark {
  color: #f3afbc;
}
html[data-theme="dark"]
  .icon-btn[data-action="favorite"][aria-pressed="true"]
  svg {
  fill: #d77d8e;
}
.language {
  border: 0;
  background: none;
  font-size: 0.85rem;
  max-width: 108px;
  min-height: 44px;
}
.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.91rem;
  min-height: 44px;
}
.primary {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}
.primary:hover {
  filter: brightness(0.93);
}
.secondary {
  background: var(--surface);
}
.danger {
  color: #a44332;
  border-color: #a4433260;
}
.nav {
  gap: 28px;
  border-bottom: 1px solid var(--line);
  height: 59px;
}
.nav button {
  position: relative;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.87rem;
  color: var(--muted);
}
.nav button.active {
  color: var(--accent);
}
.nav button.active:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}
.nav svg {
  width: 16px;
  height: 16px;
}
.count {
  font-size: 0.72rem;
  background: var(--tint);
  padding: 0 7px;
  border-radius: 12px;
  margin-left: 2px;
}
.hero {
  padding: 46px 0 29px;
  max-width: 650px;
}
.eyebrow {
  font:
    600 0.68rem/1.4 "Source Sans 3",
    sans-serif;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 15px;
}
.hero p {
  color: var(--muted);
  max-width: 540px;
  margin-top: 15px;
  line-height: 1.65;
  font-size: 1rem;
}
.search {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px 9px 3px 17px;
  box-shadow: var(--shadow);
  gap: 12px;
  margin-bottom: 32px;
}
.search > svg {
  color: var(--muted);
}
.search input {
  background: none;
  border: 0;
  width: 100%;
  font-size: 0.98rem;
  padding: 12px 0;
  outline: none;
}
.search:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.search .icon-btn {
  border: 0;
  width: 36px;
  height: 36px;
}
.section-head {
  justify-content: space-between;
  margin: 0 0 17px;
  align-items: baseline;
}
.section-head .text-button {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.subtle {
  font-size: 0.85rem;
  color: var(--muted);
}
.categories {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}
.cat {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 15px 8px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.cat:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.cat-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  color: var(--accent);
  margin-bottom: 10px;
}
.cat-symbol svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.15;
}
.cat h3 {
  font-size: 0.91rem;
  white-space: nowrap;
}
.cat small {
  font:
    0.73rem "Source Sans 3",
    sans-serif;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 18px;
}
.card {
  display: block;
  text-align: left;
  padding: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.card-image {
  aspect-ratio: 1.55;
  position: relative;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card .placeholder {
  font-size: 3rem;
  color: var(--accent);
}
.card-body {
  padding: 17px 18px 19px;
}
.card-category {
  font:
    600 0.65rem "Source Sans 3",
    sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.card h3 {
  min-height: 2.7em;
}
.card p {
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 7px;
}
.toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar select {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.83rem;
  padding: 8px;
}
.view-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px;
}
.view-toggle button {
  width: 34px;
  height: 32px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.view-toggle button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow);
}
.cards.list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.list .card {
  display: flex;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  background: none;
  border-radius: 0;
  padding: 13px 0;
}
.list .card-image {
  width: 88px;
  height: 76px;
  flex: none;
  border-radius: 5px;
}
.list .card-body {
  padding: 0 18px;
}
.list .card h3 {
  min-height: 0;
}
.list .card-category {
  margin-bottom: 3px;
}
.list .card p {
  margin-top: 3px;
  -webkit-line-clamp: 1;
}
.back {
  color: var(--muted);
  font-size: 0.88rem;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 0;
  min-height: 44px;
}
.detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 12px;
  gap: 16px;
}
.detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 34px;
  margin-bottom: 20px;
}
.detail h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  max-width: 700px;
}
.detail .lead {
  font-style: italic;
  color: var(--muted);
  margin: 17px 0 20px;
}
.detail .photo {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 7px;
  margin: 10px 0 22px;
}
.meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 16px 0;
}
.recipe-columns {
  display: grid;
  grid-template-columns: 4fr 6fr;
  gap: 40px;
  margin-top: 20px;
}
.label-title {
  font:
    600 0.76rem "Source Sans 3",
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 19px;
}
.ingredient {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 11px;
  font: inherit;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.55;
}
.ingredient input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex: none;
}
.ingredient:has(input:checked) span {
  text-decoration: line-through;
  opacity: 0.45;
}
.ingredient-heading {
  font-weight: 600;
  margin: 18px 0 10px;
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 36px;
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 21px;
}
.steps li:before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font:
    0.8rem "Source Sans 3",
    sans-serif;
  color: var(--accent);
}
.notes {
  background: var(--tint);
  border-left: 2px solid var(--accent);
  padding: 18px 22px;
  font-size: 0.91rem;
  margin-top: 30px;
  white-space: pre-wrap;
}
.notes h2 {
  margin-bottom: 8px;
}
.recipe-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.notice {
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--tint);
  font:
    0.85rem/1.5 "Source Sans 3",
    sans-serif;
  margin-bottom: 18px;
}
.notice button {
  color: var(--accent);
  text-decoration: underline;
  margin-left: 5px;
}
.empty {
  text-align: center;
  padding: 65px 20px;
}
.empty > svg {
  width: 38px;
  height: 38px;
  color: var(--accent);
  margin-bottom: 20px;
}
.empty p {
  color: var(--muted);
  max-width: 410px;
  margin: 12px auto 25px;
  font-size: 0.95rem;
}
.footer {
  border-top: 1px solid var(--line);
  margin-top: 42px;
  padding: 22px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font:
    0.74rem "Source Sans 3",
    sans-serif;
  color: var(--muted);
}
dialog {
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  width: min(630px, calc(100vw - 30px));
  max-height: 90dvh;
  box-shadow: 0 30px 90px #0003;
}
dialog::backdrop {
  background: #302b2466;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.dialog-head h2 {
  font-size: 1.6rem;
}
.dialog-head .icon-btn {
  flex: none;
}
.dialog-footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 17px;
  font-size: 0.86rem;
  font-weight: 600;
}
.field input,
.field textarea,
.field select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 400;
  font-size: 0.95rem;
  padding: 10px 12px;
  width: 100%;
}
.field textarea {
  resize: vertical;
  min-height: 90px;
}
.field small,
.help {
  font:
    400 0.79rem/1.5 "Source Sans 3",
    sans-serif;
  color: var(--muted);
}
.fieldrow {
  align-items: start;
}
.fieldrow > * {
  flex: 1;
  min-width: 0;
}
.segments {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 23px;
}
.segments button {
  flex: 1;
  border-radius: 5px;
  padding: 9px;
  font-size: 0.9rem;
  color: var(--muted);
}
.segments button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow);
}
.error {
  color: #a44332;
  font:
    0.9rem/1.5 "Source Sans 3",
    sans-serif;
  margin: 15px 0;
}
.loading,
.boot {
  padding: 100px 30px;
  text-align: center;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--surface);
  border-radius: 9px;
  padding: 12px 20px;
  box-shadow: var(--shadow);
  font:
    0.9rem "Source Sans 3",
    sans-serif;
  max-width: 90vw;
  z-index: 10;
  display: none;
}
#toast.visible {
  display: flex;
  gap: 20px;
  align-items: center;
}
#toast button {
  color: inherit;
  text-decoration: underline;
}
.settings-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.settings-section h3 {
  margin-bottom: 12px;
}
.settings-section .actions {
  flex-wrap: wrap;
  margin-top: 16px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html[data-theme="dark"] {
  --bg: #1d1a16;
  --surface: #25211c;
  --fg: #ebe5da;
  --muted: #b3a898;
  --line: #423a30;
  --accent: #c9a677;
  --tint: #322b22;
  --shadow: none;
  color-scheme: dark;
}
html[data-theme="dark"] .primary {
  color: #221c14;
}
@media (max-width: 760px) {
  .shell {
    padding: 0 22px;
  }
  .categories {
    grid-template-columns: repeat(3, 1fr);
  }
  .cat {
    padding: 12px 8px;
  }
  .cat-symbol {
    height: 35px;
    margin-bottom: 7px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    padding-top: 32px;
  }
  .recipe-columns {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .detail {
    padding: 25px;
  }
  .topbar {
    min-height: 80px;
  }
  .brand {
    font-size: 1.05rem;
  }
  .topbar .primary {
    padding: 10px;
  }
  .topbar .primary span {
    display: none;
  }
  .tools {
    gap: 6px;
  }
  .language {
    max-width: 85px;
  }
  .footer {
    flex-direction: column;
    gap: 7px;
  }
  .hero p {
    font-size: 0.94rem;
  }
  .section-head h2 {
    font-size: 1.3rem;
  }
}
@media (max-width: 440px) {
  .shell {
    padding: 0 16px;
  }
  .brand {
    gap: 6px;
    font-size: 0.94rem;
  }
  .brand svg {
    width: 25px;
  }
  .topbar {
    gap: 5px;
  }
  .tools {
    gap: 4px;
  }
  .tools .icon-btn {
    border: 0;
    width: 38px;
  }
  .language {
    max-width: 70px;
    font-size: 0.77rem;
  }
  .nav {
    gap: 20px;
  }
  .nav button {
    font-size: 0.82rem;
  }
  .card-body {
    padding: 12px;
  }
  .card h3 {
    font-size: 1rem;
  }
  .card p {
    display: none;
  }
  .cards {
    gap: 14px 12px;
  }
  .detail {
    padding: 20px;
  }
  .detail-top .secondary {
    padding: 8px 10px;
  }
  .fieldrow {
    display: block;
  }
  dialog {
    padding: 22px;
  }
  .section-head .text-button {
    font-size: 0.75rem;
  }
  .cat h3 {
    font-size: 0.88rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .topbar,
  .nav,
  .footer,
  .detail-top,
  .recipe-actions,
  .notice,
  dialog,
  #toast {
    display: none !important;
  }
  .shell {
    max-width: none;
    padding: 0;
  }
  .detail {
    border: 0;
    padding: 0;
  }
  .detail .photo {
    max-height: 240px;
  }
  .recipe-columns {
    display: block;
  }
  .ingredient input {
    display: none;
  }
  .ingredient:has(input:checked) span {
    text-decoration: none;
    opacity: 1;
  }
  body {
    background: white;
    color: black;
  }
  .steps li {
    break-inside: avoid;
  }
  .label-title {
    margin-top: 20px;
  }
}
/* The recipe image remains compact in the page and opens uncropped in a dialog. */
.photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: zoom-in;
}
.photo-button .photo {
  display: block;
}
.photo-zoom-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font:
    0.78rem "Source Sans 3",
    sans-serif;
  margin-top: -14px;
  margin-bottom: 22px;
}
.photo-zoom-hint svg {
  width: 14px;
  height: 14px;
}
dialog.photo-viewer {
  padding: 48px 16px 16px;
  width: fit-content;
  max-width: 96vw;
  max-height: 94dvh;
  overflow: visible;
}
.photo-viewer img {
  display: block;
  max-width: calc(96vw - 32px);
  max-height: calc(94dvh - 64px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}
.photo-close {
  position: absolute;
  right: 8px;
  top: 5px;
  width: 36px;
  height: 36px;
}
.ai-actions {
  flex-wrap: wrap;
  margin: 14px 0;
}
a.secondary {
  text-decoration: none;
}
.prompt-details {
  margin: 12px 0 20px;
  font:
    0.85rem "Source Sans 3",
    sans-serif;
  color: var(--muted);
}
.prompt-details textarea {
  display: block;
  width: 100%;
  height: 180px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  padding: 12px;
  font:
    0.85rem/1.5 "Source Sans 3",
    sans-serif;
}
@media print {
  .photo-zoom-hint,
  #photo-dialog {
    display: none !important;
  }
}

/* Compact controls, using the book's existing colors and type. */
.toolbar-menu { position: relative; }
.toolbar-menu summary { list-style: none; cursor: pointer; }
.toolbar-menu summary::-webkit-details-marker { display: none; }
.toolbar-menu[open] > summary { background: var(--tint); color: var(--accent); }
.toolbar-options {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 30;
  display: flex; gap: 4px; padding: 6px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--surface); box-shadow: var(--shadow);
  width: max-content; max-width: calc(100vw - 32px);
  animation: reveal-options 140ms ease-out;
}
.toolbar-options button { padding: 9px 12px; border-radius: 10px; white-space: nowrap; }
.toolbar-options button:hover, .toolbar-options button[aria-pressed="true"] { background: var(--tint); color: var(--accent); }
@keyframes reveal-options { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.import-list { max-height: 340px; overflow: auto; border-block: 1px solid var(--line); margin: 12px 0; }
.import-row { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.import-row:last-child { border: 0; }
.import-row input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--accent); }
.import-row small { display: block; color: var(--muted); }
.site-help p { color: var(--muted); line-height: 1.6; }
@media (max-width: 780px) {
  .topbar { flex-wrap: wrap; padding-block: 18px; gap: 14px; }
  .tools { flex-wrap: wrap; gap: 8px; }
  .tools .icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); }
  .toolbar-options { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .toolbar-options { animation: none; } }
.empty .empty-add { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; color: var(--accent); font-size: 0.85rem; }
.empty .empty-add svg { width: 16px; height: 16px; margin: 0; }
.site-card { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:22px; margin:14px 0; background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.site-card h2 { font-size:1.2rem; margin-bottom:8px; }
.site-card h2 a { text-decoration:none; }
.site-card p, .site-card small { color:var(--muted); }
.site-card p { margin-bottom:8px; }
@media(max-width:600px) { .site-card { align-items:flex-start; flex-direction:column; } .nav { gap:16px; overflow-x:auto; } .nav button { flex-shrink:0; } }
.url-import { padding-bottom:22px; margin-bottom:22px; border-bottom:1px solid var(--line); }
.url-import .help { margin-top:10px; }
.import-photo-preview { display:block; max-width:100%; max-height:220px; border-radius:10px; margin:16px 0; object-fit:contain; }
.site-card .actions { flex-shrink: 0; }
.site-card .actions button { white-space: nowrap; }
.ai-preference { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.ai-preference input { width:18px; height:18px; accent-color:var(--accent); }
