@font-face {
  font-family: DM;
  src: url("/assets/fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: Newsreader;
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --bg: #f6f3ec;
  --surface: #fffefa;
  --soft: #eaeedc;
  --ink: #26382f;
  --muted: #607062;
  --line: #d8ddd1;
  --primary: #315d45;
  --on-primary: #fff;
  --danger: #a33832;
  --danger-bg: #f9e8e3;
  --shadow: 0 12px 40px #26382f08;
  --radius: 22px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #151d18;
  --surface: #1f2a22;
  --soft: #2d402b;
  --ink: #f4f1e8;
  --muted: #b6c2b2;
  --line: #3f5140;
  --primary: #b8d7ab;
  --on-primary: #20351f;
  --danger: #ffb4a6;
  --danger-bg: #482c28;
  --shadow: 0 12px 40px #0002;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151d18;
    --surface: #1f2a22;
    --soft: #2d402b;
    --ink: #f4f1e8;
    --muted: #b6c2b2;
    --line: #3f5140;
    --primary: #b8d7ab;
    --on-primary: #20351f;
    --danger: #ffb4a6;
    --danger-bg: #482c28;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.55 DM,
    system-ui,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--primary);
  text-underline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button,
a {
  touch-action: manipulation;
}
button svg,
a svg,
.icon svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}
svg {
  vertical-align: middle;
}
img {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3,
p {
  margin: 0 0 1rem;
}
h1,
h2,
h3 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(36px, 3.8vw, 57px);
}
h2 {
  font-size: 31px;
}
h3 {
  font-size: 25px;
}
small,
.small {
  font-size: 13px;
}
p:last-child {
  margin-bottom: 0;
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}
main:focus {
  outline: none;
}
.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  padding: 12px 20px;
  background: var(--surface);
  z-index: 100;
}
.skip:focus {
  top: 16px;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 14px;
}
.brand {
  font-family: Newsreader, Georgia, serif;
  font-size: 25px;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -1px;
}
.brand svg {
  color: var(--primary);
  width: 26px;
  height: 26px;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 21px;
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid transparent;
  border-radius: 13px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
}
.btn:hover {
  filter: brightness(0.94);
}
.btn.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.btn.full {
  width: 100%;
}
.btn.small {
  min-height: 40px;
  padding: 8px 13px;
}
.iconbtn {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  flex-shrink: 0;
}
.textbtn {
  background: none;
  border: 0;
  color: var(--primary);
  padding: 10px 4px;
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: 44px;
}
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 20px;
}
.stack.tight {
  gap: 12px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 30px;
  background: var(--soft);
  font-size: 12px;
  color: var(--primary);
}
.pill svg {
  width: 15px;
  height: 15px;
}
.tag {
  display: inline-flex;
  padding: 6px 11px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 30px;
  align-items: center;
  gap: 6px;
}
.tag svg {
  width: 16px;
  height: 16px;
}
.notice {
  background: var(--soft);
  padding: 15px 18px;
  border-radius: 14px;
  font-size: 14px;
}
.notice.error {
  background: var(--danger-bg);
  color: var(--danger);
}
.form-error:not(:empty) {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger);
}
label.field {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 550;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline-offset: 2px;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary);
  width: 19px;
  height: 19px;
  margin: 0;
  flex-shrink: 0;
}
label.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 0;
  font-size: 14px;
}
label.check span {
  min-width: 0;
}
.field small {
  font-weight: 400;
  color: var(--muted);
}
fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 0;
  padding: 18px;
}
legend {
  font-weight: 600;
  padding: 0 8px;
}
.error-text {
  color: var(--danger);
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.empty {
  text-align: center;
  max-width: 520px;
  margin: 35px auto;
  padding: 30px 16px;
}
.empty img {
  width: 190px;
  height: 143px;
  margin: 0 auto 18px;
}
.empty h2 {
  font-size: 32px;
}
.empty p {
  color: var(--muted);
}
.boot {
  min-height: 80vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 24px;
}
.loader {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: auto;
  padding: 27px 5vw;
}
.public-nav .links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.public-nav .links a {
  font-size: 13px;
  text-decoration: none;
  color: var(--muted);
}
.landing {
  max-width: 1440px;
  margin: auto;
  padding: 38px 5vw 55px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 7vw;
  align-items: center;
}
.landing-copy h1 {
  font-size: clamp(52px, 5.8vw, 84px);
  line-height: 0.99;
  letter-spacing: -0.055em;
  max-width: 560px;
  margin-bottom: 22px;
}
.landing-copy .intro {
  max-width: 420px;
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 28px;
}
.login-card {
  max-width: 440px;
  padding: 26px 30px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 22px;
  margin-top: 28px;
}
.login-card h2 {
  font-size: 30px;
  margin-bottom: 10px;
}
.login-card .small {
  color: var(--muted);
}
.login-card button {
  width: 100%;
}
.login-card .textbtn {
  width: auto;
}
.landing-visual {
  position: relative;
  align-self: stretch;
  min-height: 640px;
  padding-top: 18px;
}
.landing-photo {
  height: 100%;
  min-height: 640px;
  max-height: 850px;
  width: 100%;
  object-fit: cover;
  border-radius: 160px 160px 24px 24px;
  object-position: 55% center;
}
.photo-caption {
  position: absolute;
  bottom: 26px;
  left: -24px;
  right: 20px;
  background: var(--surface);
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 8px 32px #0001;
  border: 1px solid var(--line);
  display: flex;
  gap: 20px;
  align-items: center;
}
.photo-caption .icon {
  color: var(--primary);
  padding: 12px;
  background: var(--soft);
  border-radius: 50%;
}
.photo-caption h3 {
  font-size: 25px;
  margin-bottom: 5px;
}
.photo-caption p {
  font-size: 13px;
  color: var(--muted);
}
.public-footer {
  padding: 22px 5vw;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  max-width: 1440px;
  margin: auto;
  gap: 20px;
  flex-wrap: wrap;
}
.otp {
  letter-spacing: 0.35em;
  font-size: 25px !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.login-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.login-progress span {
  height: 3px;
  width: 32px;
  background: var(--line);
  border-radius: 3px;
}
.login-progress .active {
  background: var(--primary);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 214px;
  padding: 32px 22px 22px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  padding: 0 10px;
  margin-bottom: 55px;
}
.navlinks {
  display: grid;
  gap: 8px;
}
.navlinks a {
  display: flex;
  gap: 13px;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--muted);
  border-radius: 12px;
  font-size: 14px;
}
.navlinks a.active {
  color: var(--primary);
  background: var(--soft);
  font-weight: 650;
}
.navlinks .create {
  background: var(--primary);
  color: var(--on-primary);
  margin-top: 18px;
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar-bottom > p {
  font-size: 12px;
  padding: 15px 12px;
  color: var(--muted);
}
.sidebar-bottom a {
  display: block;
  padding: 7px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}
.shell {
  margin-left: 214px;
  max-width: 1800px;
}
.topbar {
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 90px;
}
.topbar .mobile-brand {
  display: none;
}
.topbar .breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.page {
  padding: 15px 48px 65px;
  max-width: 1320px;
  margin: 0 auto;
}
.page-head {
  margin-bottom: 30px;
}
.page-head .row {
  align-items: flex-end;
}
.page-head h1 {
  margin-bottom: 10px;
}
.page-head p {
  color: var(--muted);
  max-width: 660px;
}
.home-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  border-radius: 23px;
  overflow: hidden;
  background: var(--soft);
  margin-bottom: 30px;
  min-height: 250px;
}
.home-hero .copy {
  padding: 35px;
  align-self: center;
}
.home-hero h2 {
  font-size: 39px;
  max-width: 400px;
}
.home-hero p {
  font-size: 14px;
  max-width: 350px;
  color: var(--muted);
}
.home-hero img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
}
.home-hero .hero-art {
  object-fit: contain;
  padding: 25px;
  opacity: 0.9;
}
.searchbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.searchfield {
  position: relative;
  flex: 1;
  min-width: 150px;
}
.searchfield svg {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 19px;
  height: 19px;
  color: var(--muted);
}
.searchfield input {
  padding-left: 45px !important;
}
.filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 0 0 22px;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 27px;
}
.chip {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.chip.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: transparent;
}
.section-label {
  font-size: 25px;
  margin-bottom: 18px;
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}
.recipe-card {
  text-decoration: none;
  color: var(--ink);
  border-radius: 18px;
  overflow: hidden;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.18s;
}
.recipe-card:hover {
  transform: translateY(-3px);
}
.recipe-cover {
  aspect-ratio: 1.45;
  position: relative;
  overflow: hidden;
  background: var(--soft);
}
.recipe-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recipe-cover .no-photo {
  display: grid;
  place-content: center;
  height: 100%;
  color: var(--primary);
}
.recipe-cover .no-photo svg {
  height: 52px;
  width: 52px;
  opacity: 0.6;
}
.recipe-cover .pill {
  position: absolute;
  top: 13px;
  left: 13px;
  background: var(--surface);
}
.recipe-card .copy {
  padding: 19px;
}
.recipe-card h3 {
  font-size: 25px;
  margin-bottom: 10px;
}
.recipe-card .meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.meta svg {
  width: 15px;
  height: 15px;
  margin-right: 4px;
}
.recipe-card .author {
  font-size: 11px;
  color: var(--muted);
  margin-top: 11px;
}
.pager {
  justify-content: center;
  margin: 30px 0;
}
.listrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.listrow:last-child {
  border: 0;
}
.listrow .name {
  font-weight: 550;
}
.listrow .sub {
  font-size: 12px;
  color: var(--muted);
}
.listrow .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.group-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: var(--ink);
}
.group-card h2 {
  font-size: 31px;
  margin: 0;
}
.group-card .group-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-content: center;
  border-radius: 15px;
  background: var(--soft);
  color: var(--primary);
}
.group-card .group-icon svg {
  width: 26px;
  height: 26px;
}
.tabs {
  border-bottom: 1px solid var(--line);
  margin: 10px 0 25px;
  display: flex;
  gap: 18px;
  overflow: auto;
}
.tabs button {
  min-height: 48px;
  white-space: nowrap;
  color: var(--muted);
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  padding: 10px 6px;
  font-size: 14px;
}
.tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 1fr);
  gap: 36px;
  align-items: start;
}
.detail-main > .cover {
  aspect-ratio: 4 / 3;
  background: var(--soft);
  width: 100%;
  max-height: 470px;
  object-fit: cover;
  border-radius: 23px;
  margin-bottom: 25px;
}
.detail-main h1 {
  font-size: clamp(35px, 3.3vw, 53px);
  margin-top: 16px;
}
.detail-main > .meta {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  margin: 20px 0;
}
.detail-side {
  position: sticky;
  top: 20px;
}
.ingredients {
  padding: 0;
  list-style: none;
  margin: 8px 0 20px;
}
.ingredients li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 14px;
}
.ingredients .quantity {
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}
.servings {
  display: flex;
  gap: 7px;
  align-items: center;
  background: var(--soft);
  border-radius: 30px;
  padding: 2px 5px;
  font-size: 13px;
}
.servings button {
  background: none;
  border: 0;
  width: 34px;
  height: 34px;
  color: var(--ink);
  font-size: 19px;
}
.step-summary {
  display: flex;
  gap: 15px;
  margin: 25px 0;
}
.step-number {
  border: 1px solid var(--line);
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  font-size: 12px;
}
.step-summary p {
  white-space: pre-line;
}
.nutrition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nutrition-grid div {
  background: var(--soft);
  padding: 15px;
  border-radius: 12px;
}
.nutrition-grid b {
  display: block;
  font-size: 23px;
}
.editor-wrap {
  max-width: 900px;
}
.editor-stages {
  display: flex;
  gap: 8px;
  margin: 15px 0 28px;
}
.editor-stages button {
  flex: 1;
  border: 0;
  background: var(--soft);
  color: var(--muted);
  padding: 12px 8px;
  border-radius: 10px;
  font-size: 12px;
  min-height: 44px;
}
.editor-stages button.active {
  color: var(--on-primary);
  background: var(--primary);
}
.editor-footer {
  position: sticky;
  bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 25px;
  z-index: 8;
  box-shadow: var(--shadow);
}
.editor-line {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 95px 120px 42px;
  gap: 12px;
  align-items: end;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.editor-line .note {
  grid-column: 1/4;
}
.upload {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 18px;
}
.upload > img {
  width: 110px;
  height: 85px;
  object-fit: cover;
  border-radius: 11px;
}
.upload label {
  cursor: pointer;
}
.upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.step-editor {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.step-editor textarea {
  min-height: 150px;
}
.picker-list {
  max-height: 45vh;
  overflow: auto;
  margin: 15px 0;
}
.picker-list button {
  display: block;
  width: 100%;
  padding: 13px 10px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  min-height: 48px;
}
.picker-list button:hover {
  background: var(--soft);
}
.preferences {
  max-width: 850px;
}
.danger-zone {
  border-color: var(--danger);
}
.prose {
  max-width: 720px;
}
.prose h2 {
  margin-top: 36px;
}
.prose li {
  margin-bottom: 10px;
}
.prose p {
  white-space: pre-line;
}
.table-scroll {
  overflow: auto;
}
.catalog-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.catalog-table td,
.catalog-table th {
  text-align: left;
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
}
.catalog-table th {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.catalog-table .btn {
  min-width: 70px;
}
.cooking {
  height: 100dvh;
  max-width: 1440px;
  margin: auto;
  padding: 24px 5vw;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cook-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.cook-top .title {
  font-size: 13px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cook-progress {
  display: flex;
  gap: 8px;
}
.cook-progress span {
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  flex: 1;
}
.cook-progress .done {
  background: var(--primary);
}
.cook-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 32px;
}
.cook-ingredients {
  overflow: auto;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.cook-ingredients li {
  font-size: 13px;
}
.cook-step {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cook-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 18px;
  scrollbar-gutter: stable;
}
.cook-scroll img {
  width: 100%;
  height: clamp(130px, 23vh, 280px);
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 22px;
}
.cook-scroll h1 {
  font-size: 35px;
}
.cook-text {
  font-size: clamp(23px, 2.3vw, 32px);
  line-height: 1.55;
  white-space: pre-line;
}
.timer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 12px 18px;
  background: var(--soft);
  border-radius: 17px;
  margin: 10px 0;
}
.timer .clock {
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
}
.cook-controls {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.cook-controls .btn {
  flex: 1;
  min-height: 58px;
}
.wake {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
}
.cooking .eyebrow {
  margin: 0;
}
dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  width: calc(100% - 32px);
  max-width: 560px;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 20px 100px #0003;
}
dialog::backdrop {
  background: #14251bb3;
  backdrop-filter: blur(5px);
}
dialog .dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
dialog h2 {
  margin: 0;
  font-size: 31px;
}
dialog .dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  border-radius: 14px;
  padding: 15px 22px;
  max-width: calc(100% - 32px);
  width: max-content;
  box-shadow: 0 6px 30px #0002;
  z-index: 100;
  font-size: 14px;
}
#network {
  position: sticky;
  top: 0;
  background: var(--danger-bg);
  color: var(--danger);
  text-align: center;
  padding: 10px 15px;
  font-size: 13px;
  z-index: 99;
}
.copy-link {
  overflow-wrap: anywhere;
  word-break: break-word;
  background: var(--soft);
  border-radius: 12px;
  padding: 15px;
  font-size: 14px;
  user-select: all;
}
.skeleton {
  height: 250px;
  background: var(--soft);
  border-radius: 20px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}
@media (min-width: 1700px) {
  .page {
    padding-top: 40px;
  }
  .landing {
    padding-top: 65px;
    padding-bottom: 85px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 88px;
    padding: 30px 12px;
  }
  .sidebar .brand {
    margin: 0 auto 40px;
    padding: 0;
  }
  .sidebar .brand span,
  .sidebar .navlinks span,
  .sidebar-bottom {
    display: none;
  }
  .navlinks a {
    padding: 13px;
    justify-content: center;
  }
  .shell {
    margin-left: 88px;
  }
  .topbar {
    padding: 22px 30px;
  }
  .page {
    padding: 15px 30px 60px;
  }
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid3 {
    grid-template-columns: 1fr 1fr;
  }
  .detail-layout {
    gap: 24px;
    grid-template-columns: 1.2fr 1fr;
  }
  .detail-side.card {
    padding: 20px;
  }
}
@media (max-width: 760px) {
  .public-nav {
    padding: 20px 22px;
  }
  .public-nav .links a:first-child {
    display: none;
  }
  .landing {
    grid-template-columns: 1fr;
    padding: 20px 22px 40px;
    gap: 35px;
  }
  .landing-copy h1 {
    font-size: 57px;
    max-width: 440px;
  }
  .landing-copy .intro {
    font-size: 16px;
  }
  .login-card {
    max-width: 100%;
    padding: 24px;
    margin-top: 24px;
  }
  .landing-visual {
    min-height: 330px;
    padding-top: 0;
    max-width: 540px;
    width: 100%;
    margin: auto;
  }
  .landing-photo {
    min-height: 330px;
    max-height: 420px;
    height: 380px;
    border-radius: 90px 90px 20px 20px;
  }
  .photo-caption {
    left: 12px;
    right: 12px;
    bottom: 16px;
    padding: 18px;
  }
  .public-footer {
    padding: 20px 22px;
  }
  .sidebar {
    inset: auto 14px max(12px, env(safe-area-inset-bottom)) 14px;
    width: auto;
    height: 67px;
    padding: 5px 8px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line);
    border-radius: 21px;
    box-shadow: 0 6px 35px #182a1e12;
    display: block;
  }
  .sidebar > .brand {
    display: none;
  }
  .navlinks {
    display: flex;
    justify-content: space-around;
    gap: 0;
  }
  .navlinks a {
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 4px;
    min-height: 54px;
    font-size: 10px;
    border-radius: 14px;
  }
  .sidebar .navlinks span {
    display: block;
  }
  .navlinks .create {
    margin: 0;
    background: transparent;
    color: var(--muted);
  }
  .navlinks .catalog-nav {
    display: none;
  }
  .shell {
    margin: 0;
  }
  .topbar {
    padding: 18px 22px;
    min-height: 78px;
  }
  .topbar .breadcrumb {
    display: none;
  }
  .topbar .mobile-brand {
    display: block;
  }
  .page {
    padding: 12px 22px 115px;
  }
  .page-head {
    margin-bottom: 24px;
  }
  .page-head h1 {
    font-size: 39px;
  }
  .page-head p {
    font-size: 14px;
  }
  .page-head .row {
    align-items: center;
  }
  .home-hero {
    min-height: 210px;
    grid-template-columns: 1.2fr 1fr;
  }
  .home-hero .copy {
    padding: 23px;
  }
  .home-hero h2 {
    font-size: 31px;
  }
  .home-hero .eyebrow {
    font-size: 9px;
  }
  .home-hero p {
    font-size: 12px;
  }
  .home-hero img {
    min-height: 230px;
  }
  .home-hero .hero-art {
    padding: 8px;
    min-height: 200px;
  }
  .home-hero .btn {
    min-height: 42px;
    padding: 10px 13px;
    font-size: 12px;
  }
  .recipe-grid {
    gap: 15px;
  }
  .recipe-card .copy {
    padding: 15px;
  }
  .recipe-card h3 {
    font-size: 24px;
  }
  .recipe-card .meta {
    gap: 8px;
    font-size: 11px;
  }
  .recipe-cover .pill {
    font-size: 10px;
    top: 9px;
    left: 9px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filters label:last-child {
    grid-column: 1/-1;
  }
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 22px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .detail-side {
    position: static;
  }
  .detail-main > .cover {
    max-height: 330px;
  }
  .detail-main h1 {
    font-size: 39px;
  }
  .detail-layout .detail-main {
    display: contents;
  }
  .detail-side {
    order: 1;
  }
  .detail-steps {
    order: 2;
  }
  .editor-stages button {
    font-size: 11px;
    padding: 10px 5px;
  }
  .editor-footer {
    bottom: 95px;
    padding: 12px;
  }
  .editor-line {
    grid-template-columns: 1fr 85px 105px;
    gap: 10px;
  }
  .editor-line > .ingredient-name {
    grid-column: 1/-1;
  }
  .editor-line > .remove-line {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
  .editor-line > .note {
    grid-column: 1/-1;
  }
  .editor-line .quantity-field {
    grid-column: 1;
  }
  .editor-line .unit-field {
    grid-column: 2;
  }
  .step-editor {
    padding: 18px;
  }
  .cooking {
    padding: 18px 20px;
    gap: 16px;
  }
  .cook-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .cook-ingredients {
    display: none;
  }
  .cook-top .title {
    font-size: 12px;
  }
  .cook-scroll h1 {
    font-size: 31px;
  }
  .cook-text {
    font-size: 26px;
  }
  .cook-controls .btn {
    min-height: 55px;
  }
  .cook-scroll img {
    height: 20vh;
  }
  .timer {
    margin: 5px 0;
  }
  .cook-top .iconbtn {
    width: 42px;
    height: 42px;
  }
  #toast {
    bottom: 95px;
  }
  .group-head-actions {
    width: 100%;
  }
}
@media (max-width: 390px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .landing-copy h1 {
    font-size: 49px;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  .home-hero h2 {
    font-size: 28px;
  }
  .home-hero .copy {
    padding: 20px;
  }
  .cooking {
    padding: 16px;
  }
  .cook-text {
    font-size: 24px;
  }
  .timer {
    padding: 10px 14px;
  }
  .editor-stages {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar {
    backdrop-filter: none;
    background: var(--surface);
  }
  dialog::backdrop {
    backdrop-filter: none;
  }
}
@media print {
  .sidebar,
  .topbar,
  .btn,
  .iconbtn,
  .editor-footer,
  #toast,
  .skip {
    display: none !important;
  }
  .shell {
    margin: 0;
  }
  .page {
    padding: 15px;
  }
  .detail-layout {
    display: block;
  }
  .detail-side {
    position: static;
  }
  body {
    background: white;
    color: black;
  }
  .card {
    break-inside: avoid;
  }
  .detail-main > .cover {
    max-height: 220px;
    width: auto;
  }
}
.illustration {
  display: block;
  color: var(--primary);
  width: 190px;
  height: 143px;
  margin: 0 auto 18px;
}
.illustration svg {
  width: 100%;
  height: 100%;
}
body:has(.cooking) #toast {
  top: 76px;
  bottom: auto;
}
.cook-controls {
  flex-shrink: 0;
}
.timer {
  flex-shrink: 0;
}
.cook-layout {
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.home-hero .hero-art {
  color: var(--primary);
  align-self: center;
  display: grid;
  place-items: center;
  min-width: 0;
}
.home-hero .hero-art svg {
  width: 100%;
  max-height: 250px;
  height: auto;
}

/* Reviewed recipes: continuous, readable instructions and quiet attribution. */
.preparation-list { list-style: none; padding: 0; margin: 0; }
.preparation-list .step-summary { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 18px; align-items: start; margin: 0; padding: 22px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.preparation-list .step-summary p { margin: 2px 0 10px; line-height: 1.75; white-space: normal; }
.step-photo { border-radius: 15px; margin-top: 15px; max-height: 250px; }
.recipe-attribution { margin: 16px 0 20px; }
.recipe-attribution p { display: flex; align-items: center; gap: 9px; margin: 4px 0; font-size: 14px; }
.recipe-attribution .small { padding-left: 27px; font-size: 12px; }
.recipe-times { margin-bottom: 8px; gap: 14px 22px; }
.recipe-time-note { max-width: 65ch; margin: 0 0 24px; line-height: 1.6; }
.difficulty { display: inline-flex; gap: 7px; margin-bottom: 8px; }
.recipe-card .difficulty { font-size: 11px; margin: 0; padding: 3px 8px; }
.recipe-notes, .recipe-sources { margin-top: 32px; padding: 24px; background: var(--soft); border-radius: 20px; }
.recipe-notes h2, .recipe-sources h2 { margin: 0 0 14px; font-size: 25px; }
.recipe-notes p { font-size: 14px; line-height: 1.75; }
.recipe-notes p:last-child { margin-bottom: 0; }
.recipe-sources ul { list-style: none; padding: 0; margin: 0; }
.recipe-sources a { display: flex; align-items: center; gap: 10px; min-height: 44px; overflow-wrap: anywhere; }
.recipe-sources a .icon:last-child { margin-left: auto; }
.editor-source { padding: 16px 0; border-bottom: 1px solid var(--line); }
.ingredients li > span:first-child { min-width: 0; flex: 1; }
.ingredients .quantity { white-space: normal; max-width: 52%; overflow-wrap: anywhere; line-height: 1.5; }
.detail-main > .difficulty { width: fit-content; }
@media (max-width: 760px) { .detail-layout .detail-main { display: block; } }
@media (max-width: 600px) { .recipe-notes, .recipe-sources { padding: 18px; } .preparation-list .step-summary { gap: 12px; } }

.version-panel { margin-bottom: 24px; }
.version-photos { display: flex; flex-wrap: wrap; gap: 16px; }
.version-photos figure { margin: 0; width: min(100%, 220px); }
.version-photos img { width: 100%; max-width: 220px; height: 160px; object-fit: cover; border-radius: 12px; }
.version-comment { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
#version-photo { max-width: 100%; }

.version-panel, #version-contributions, #version-contributions > * { min-width: 0; max-width: 100%; }
.version-panel select, #version-contributions input[type=file] { width: 100%; min-width: 0; max-width: 100%; }
