@font-face {
  font-family: "Playpen Sans";
  src: url("./playpensans-variable.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
}

@font-face {
  font-family: "Yeon Sung";
  src: url("./yeonsung-regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  color-scheme: light;
  --font-body: "Playpen Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-brand: "Yeon Sung", var(--font-body);
  --bg: #f5efe6;
  --bg-rgb: 245, 239, 230;
  --topbar: #fbf8f2;
  --topbar-rgb: 251, 248, 242;
  --surface: #fbf8f2;
  --surface-rgb: 251, 248, 242;
  --surface-raised: #fbf8f2;
  --surface-raised-rgb: 251, 248, 242;
  --surface-2: #e3eae3;
  --surface-3: #ece5d8;
  --ink: #20201c;
  --text: #3a3a34;
  --muted: #707975;
  --line: #d9d0c0;
  --brand: #375a51;
  --brand-2: #375a51;
  --accent: #b07259;
  --accent-2: #c38b72;
  --gold: #d7b45c;
  --green: #587d71;
  --blue: #49758a;
  --danger: #d95553;
  --shadow: 0 14px 34px rgba(32, 32, 28, 0.08);
  --shadow-soft: 0 8px 22px rgba(32, 32, 28, 0.06);
  --shadow-lifted: 0 20px 54px rgba(32, 32, 28, 0.1);
  --ring: 0 0 0 4px rgba(176, 114, 89, 0.16);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1512;
  --bg-rgb: 15, 21, 18;
  --topbar: #101613;
  --topbar-rgb: 16, 22, 19;
  --surface: #171f1b;
  --surface-rgb: 23, 31, 27;
  --surface-raised: #1b251f;
  --surface-raised-rgb: 27, 37, 31;
  --surface-2: #202a24;
  --surface-3: #251f1a;
  --ink: #edf4ef;
  --text: #edf4ef;
  --muted: #a8b6ae;
  --line: #33443b;
  --brand: #4d9676;
  --brand-2: #69b28e;
  --accent: #f08a72;
  --accent-2: #ffb17f;
  --gold: #f3c768;
  --green: #7ec4a2;
  --blue: #75a9c2;
  --danger: #ff8e8e;
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.32);
  --shadow-lifted: 0 28px 80px rgba(0, 0, 0, 0.48);
  --ring: 0 0 0 4px rgba(240, 138, 114, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-weight: 450;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  color: var(--ink);
}

:root[data-theme="dark"] body {
  background:
    linear-gradient(135deg, rgba(18, 24, 21, 0.98) 0%, rgba(12, 19, 16, 1) 48%, rgba(24, 20, 16, 0.98) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 38px);
}

::selection {
  background: rgba(176, 114, 89, 0.24);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  padding: 8px 13px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition:
    border-color 220ms var(--ease-out),
    background-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    color 220ms var(--ease-out);
}

button:hover,
.button:hover {
  border-color: #b8ae9e;
}

button:active,
.button:active {
  border-color: var(--brand);
}

button.primary,
.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
  box-shadow: none;
}

button.danger {
  border-color: #efc1c1;
  color: var(--danger);
  background: #fffafa;
}

button.ghost {
  background: transparent;
}

button.subtle-link {
  min-height: auto;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  box-shadow: none;
  justify-self: center;
}

button.subtle-link:hover,
button.subtle-link:focus-visible {
  color: var(--accent);
  background: transparent;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.button.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font-weight: 500;
  padding: 10px 11px;
  box-shadow: none;
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    background-color 160ms var(--ease-out);
}

input:hover,
textarea:hover,
select:hover {
  border-color: #b8ae9e;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(176, 114, 89, 0.72);
  box-shadow: var(--ring);
  outline: none;
}

:root[data-theme="dark"] button,
:root[data-theme="dark"] .button {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] button.primary,
:root[data-theme="dark"] .button.primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
}

:root[data-theme="dark"] button:hover,
:root[data-theme="dark"] .button:hover {
  border-color: #607568;
}

:root[data-theme="dark"] button.danger {
  border-color: rgba(255, 142, 142, 0.38);
  background: rgba(96, 36, 36, 0.22);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select {
  background: #111815;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

button:focus-visible,
.button:focus-visible {
  box-shadow: var(--ring), var(--shadow-soft);
  outline: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

label,
.form-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

input::placeholder,
textarea::placeholder {
  color: #83827d;
  font-style: italic;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softScaleIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes swipeHintPulse {
  0%,
  100% {
    opacity: 0.76;
    transform: translate(-50%, -50%);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(18px) translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar);
  padding: calc(12px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) 12px calc(20px + env(safe-area-inset-left));
  box-shadow: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none !important;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0;
  text-decoration: none;
  justify-content: flex-start;
}

.brand:hover,
.brand:active {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-brand);
  font-size: 1.42rem;
  font-weight: 400;
  letter-spacing: 0;
}

.brand-name strong {
  font-family: var(--font-body);
  font-size: 0.8em;
  font-weight: 780;
}

.brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-actions .nav-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.appearance-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  white-space: nowrap;
}

.appearance-control select {
  width: auto;
  min-width: 104px;
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 30px 6px 10px;
  font-size: 0.84rem;
}

.mobile-menu-button {
  display: none;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(var(--surface-raised-rgb), 0.76);
  padding: 7px 10px;
  font-size: 0.84rem;
  white-space: nowrap;
  box-shadow: none;
}

.status-pill.online {
  border-color: var(--accent);
  color: var(--accent);
}

:root[data-theme="dark"] .topbar {
  background: rgba(16, 22, 19, 0.9);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .status-pill {
  background: rgba(23, 31, 27, 0.78);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  height: calc(100vh - 71px);
  height: calc(100dvh - 71px);
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}

.library-pane {
  border-right: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 71px);
  max-height: calc(100dvh - 71px);
  min-height: 0;
  overflow: hidden;
  padding: 18px;
}

:root[data-theme="dark"] .layout {
  background:
    linear-gradient(90deg, rgba(18, 25, 22, 0.72) 0%, rgba(15, 21, 18, 0.4) 45%, rgba(26, 22, 18, 0.52) 100%);
}

:root[data-theme="dark"] .library-pane {
  background:
    linear-gradient(180deg, rgba(21, 29, 25, 0.88), rgba(17, 24, 20, 0.78)),
    rgba(15, 21, 18, 0.72);
}

.detail-pane {
  min-width: 0;
  max-height: calc(100vh - 71px);
  max-height: calc(100dvh - 71px);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  scrollbar-gutter: stable;
}

.toolbar {
  display: grid;
  flex: 0 0 auto;
  gap: 12px;
  margin-bottom: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.overview-actions {
  align-items: stretch;
}

.overview-actions input[data-input="search"],
.import-row input {
  flex: 1 1 auto;
}

.overview-actions .filter-toggle,
.overview-actions .recipe-view-toggle,
.overview-actions .add-menu,
.import-row button {
  flex: 0 0 auto;
}

.toolbar-row {
  display: flex;
  gap: 10px;
}

.toolbar-row input {
  min-width: 0;
}

.overview-actions input[data-input="search"] {
  border-radius: 999px;
}

.filter-toggle {
  display: inline-flex;
}

.view-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  min-width: 86px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 3px;
  box-shadow: none;
}

.view-toggle button {
  justify-content: center;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  padding: 5px 10px;
  color: var(--muted);
}

.view-toggle button:hover {
  background: rgba(238, 244, 239, 0.86);
}

.view-toggle button.active {
  background: var(--brand);
  color: #ffffff;
  box-shadow: none;
}

.view-icon {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.view-icon-list {
  background:
    linear-gradient(currentColor 0 0) 0 1px / 15px 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 6px / 15px 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 11px / 15px 2px no-repeat;
}

.view-icon-thumbnail {
  background:
    linear-gradient(currentColor 0 0) 1px 1px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 9px 1px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 1px 9px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 9px 9px / 5px 5px no-repeat;
}

.view-toggle-label {
  display: none;
}

.filter-panel {
  display: none;
  gap: 12px;
}

.filter-panel.open {
  display: grid;
  animation: fadeUp 180ms var(--ease-out);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.import-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.add-menu {
  position: relative;
  display: inline-flex;
}

.add-menu-button {
  width: 100%;
}

.add-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: none;
  min-width: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 6px;
  transform-origin: top right;
  backdrop-filter: blur(14px);
}

.add-menu-panel.open {
  display: grid;
  gap: 4px;
  animation: softScaleIn 160ms var(--ease-out);
}

.add-menu-panel button {
  justify-content: flex-start;
  width: 100%;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.add-menu-panel button:hover {
  border-color: var(--line);
  background: var(--surface-2);
}

.library-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.library-summary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.library-summary button {
  min-height: 34px;
  padding: 6px 10px;
}

.recipe-view-toggle-mobile {
  display: none;
}

.recipe-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 10px 2px 2px;
  scrollbar-gutter: stable;
}

.recipe-list {
  display: grid;
  gap: 12px;
  min-height: 0;
  align-content: start;
}

.recipe-list-thumbnail {
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 12px;
}

.recipe-card {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: none;
  overflow: hidden;
  transition:
    border-color 500ms var(--ease-out),
    background-color 500ms var(--ease-out);
}

.recipe-card::before {
  display: none;
}

.recipe-card:hover {
  border-color: var(--brand);
}

.recipe-card-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  justify-content: stretch;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-height: 92px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px;
  text-align: left;
  overflow: visible;
  appearance: none;
}

.recipe-card > .recipe-thumb,
.recipe-card > span:not(.recipe-thumb) {
  position: relative;
  z-index: 1;
}

button.recipe-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  justify-content: stretch;
  gap: 12px;
  padding: 10px;
  color: var(--ink);
  text-align: left;
}

.recipe-card.active {
  border: 2px solid var(--brand);
  background: var(--surface);
  box-shadow: none;
}

.recipe-card.active::before {
  background: linear-gradient(180deg, var(--accent), var(--gold));
}

.recipe-list-thumbnail .recipe-card {
  min-height: 0;
}

.recipe-list-thumbnail .recipe-card::before {
  inset: 0 10px auto 10px;
  width: auto;
  height: 3px;
  border-radius: 0 0 999px 999px;
}

.recipe-list-thumbnail .recipe-card-main {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  padding: 0;
}

.recipe-list-thumbnail .recipe-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 13px 13px 0 0;
}

.recipe-list-thumbnail .recipe-card-main > span:last-child {
  padding: 10px 38px 12px 10px;
}

.recipe-list-thumbnail .recipe-card h3 {
  display: -webkit-box;
  min-height: 2.42em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recipe-list-thumbnail .recipe-meta {
  gap: 5px;
  margin-top: 7px;
}

.recipe-list-thumbnail .recipe-meta:last-child {
  display: none;
}

.recipe-card-main:hover {
  border-color: transparent;
}

.recipe-thumb,
.detail-image {
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-3);
}

.recipe-thumb {
  width: 72px;
  height: 72px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.recipe-thumb img,
.detail-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.recipe-card h3,
.detail-hero h1 {
  margin: 0;
  letter-spacing: 0;
}

.recipe-card h3 {
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.22;
}

.recipe-card-main > span:last-child,
button.recipe-card > span:last-child {
  display: block;
  min-width: 0;
  overflow: visible;
  padding-right: 34px;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: italic;
}

.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--gold);
  line-height: 1;
  white-space: nowrap;
}

.rating-star {
  color: #c5c3bc;
}

.rating-star.filled {
  color: var(--gold);
}

.favorite-toggle {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  border-color: var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: none;
}

.favorite-toggle:hover,
.favorite-toggle.active {
  border-color: var(--danger);
  background: #ecd8cf;
  color: var(--danger);
}

.recipe-card-favorite {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 1;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  font-size: 1.08rem;
}

.detail-favorite-toggle {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.detail-favorite-toggle:hover,
.detail-favorite-toggle.active {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
}

.favorite-editor-check {
  width: fit-content;
}

.rating-input {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.rating-button {
  width: 38px;
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: #c8d0cb;
  padding: 0;
  font-size: 1.55rem;
  line-height: 1;
}

.rating-button:hover,
.rating-button.active {
  border-color: transparent;
  color: var(--gold);
  background: transparent;
  text-shadow: none;
}

.rating-clear {
  width: auto;
  min-height: 34px;
  margin-left: 4px;
  padding: 6px 10px;
}

:root[data-theme="dark"] .toolbar,
:root[data-theme="dark"] .import-row {
  border-color: rgba(51, 68, 59, 0.82);
  background: rgba(23, 31, 27, 0.68);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .view-toggle {
  background: rgba(17, 24, 20, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 0 rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .view-toggle button:hover,
:root[data-theme="dark"] .add-menu-panel button:hover {
  background: rgba(32, 42, 36, 0.9);
}

:root[data-theme="dark"] .add-menu-panel,
:root[data-theme="dark"] .recipe-card,
:root[data-theme="dark"] .recipe-card.active {
  border-color: rgba(51, 68, 59, 0.92);
  background: linear-gradient(180deg, rgba(23, 31, 27, 0.97), rgba(18, 25, 21, 0.97));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .recipe-card:hover,
:root[data-theme="dark"] .recipe-card.active {
  border-color: rgba(126, 196, 162, 0.68);
}

:root[data-theme="dark"] .favorite-toggle {
  border-color: rgba(51, 68, 59, 0.9);
  background: rgba(23, 31, 27, 0.94);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .favorite-toggle:hover,
:root[data-theme="dark"] .favorite-toggle.active {
  border-color: rgba(240, 138, 114, 0.5);
  background: rgba(63, 36, 31, 0.8);
}

.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  padding: 4px 8px;
  font-size: 0.8rem;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px dashed #b9c8c0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(var(--surface-rgb), 0.78), rgba(237, 240, 232, 0.78));
  color: var(--muted);
  text-align: center;
  padding: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.2rem;
}

.mobile-screen-bar {
  display: none;
}

.detail-feedback {
  display: none;
}

.auth-card,
.editor-card {
  max-width: 980px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.editor-card {
  overflow: hidden;
}

.detail-card {
  width: min(1280px, 100%);
  min-width: 0;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 360px;
  overflow: hidden;
  background: var(--brand);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 18, 16, 0.06) 0%, rgba(10, 18, 16, 0.28) 40%, rgba(10, 18, 16, 0.9) 100%),
    linear-gradient(90deg, rgba(55, 90, 81, 0.58) 0%, rgba(55, 90, 81, 0.16) 54%, rgba(176, 114, 89, 0.16) 100%);
}

.detail-image {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #0d2e28 0%, var(--brand) 58%, var(--gold) 100%);
}

.detail-hero-empty .detail-image {
  background:
    linear-gradient(135deg, #0d2e28 0%, var(--brand) 48%, var(--accent) 100%);
}

.detail-hero .detail-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.detail-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 940px;
  padding: 96px 28px 30px;
  color: #ffffff;
}

.detail-label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 5px 10px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.detail-hero h1 {
  max-width: 920px;
  margin: 0;
  color: #ffffff;
  font-size: 2.65rem;
  font-weight: 780;
  line-height: 1.02;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.34);
}

.detail-tags {
  margin-top: 0;
}

.detail-hero .chip {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.detail-content {
  display: grid;
  gap: 24px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  padding: 24px 28px 30px;
}

.detail-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mobile-detail-menu-button {
  display: none;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(10, 18, 16, 0.16);
}

.detail-actions-menu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail-actions-backdrop,
.detail-actions-title {
  display: none;
}

.detail-actions-menu button {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.detail-actions-menu button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.detail-actions-menu button:hover {
  border-color: rgba(255, 255, 255, 0.82);
}

.detail-actions-menu button.danger {
  border-color: rgba(185, 52, 52, 0.22);
  background: rgba(255, 255, 255, 0.92);
}

:root[data-theme="dark"] .mobile-detail-menu-button,
:root[data-theme="dark"] .detail-actions-menu button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(18, 25, 21, 0.82);
  color: #f5fbf7;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .mobile-detail-menu-button:hover,
:root[data-theme="dark"] .detail-actions-menu button:hover {
  border-color: rgba(126, 196, 162, 0.62);
  background: rgba(32, 42, 36, 0.92);
  color: #ffffff;
}

:root[data-theme="dark"] .detail-actions-menu button.primary {
  border-color: rgba(126, 196, 162, 0.72);
  background: linear-gradient(135deg, #3f8a6a 0%, #5bab86 100%);
  color: #ffffff;
}

:root[data-theme="dark"] .detail-actions-menu button.danger {
  border-color: rgba(255, 142, 142, 0.44);
  background: rgba(80, 31, 31, 0.86);
  color: #ffb8b8;
}

:root[data-theme="dark"] .detail-actions-menu button.danger:hover {
  border-color: rgba(255, 164, 164, 0.7);
  background: rgba(103, 39, 39, 0.94);
  color: #ffd1d1;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-summary {
  position: relative;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 0;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  padding: 11px;
}

.detail-card .stat {
  min-height: 82px;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.stat > span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 650;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 760;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-card .stat strong {
  display: flex;
  min-height: 38px;
  align-items: center;
}

.detail-card .stat input {
  min-height: 38px;
  border-color: var(--line);
  background: var(--surface-raised);
  padding: 7px 10px;
  font-weight: 750;
}

.detail-description {
  max-width: 980px;
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.62;
  overflow-wrap: anywhere;
  border-left: 3px solid #95a49b;
  border-radius: 0 12px 12px 0;
  background: var(--surface-2);
  padding: 14px 16px;
}

.recipe-section-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr);
  gap: 30px;
  align-items: start;
  min-width: 0;
}

.section {
  display: grid;
  gap: 10px;
}

.recipe-section {
  min-width: 0;
  border-top: 0;
  padding-top: 0;
}

.section h2 {
  margin: 0;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.measure-system-control {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 500;
}

.measure-system-control select {
  width: auto;
  min-width: 150px;
  min-height: 34px;
  padding: 6px 30px 6px 9px;
  font-size: 0.84rem;
}

.ingredients,
.steps {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ingredients {
  list-style: none;
}

.ingredients li {
  position: relative;
  min-width: 0;
  min-height: 24px;
  padding-left: 24px;
  overflow-wrap: anywhere;
}

.ingredient-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-right: 5px;
  color: var(--ink);
  font-weight: 820;
  white-space: nowrap;
}

.ingredient-quantity {
  font-variant-numeric: tabular-nums;
}

.ingredient-unit {
  color: var(--ink);
  font-size: 0.88em;
  font-weight: 780;
}

.ingredient-name {
  overflow-wrap: anywhere;
}

.ingredients li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: none;
}

.steps {
  gap: 12px;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: none;
  padding: 13px 14px;
  overflow-wrap: anywhere;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: none;
}

.step-body {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.step-body p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.step-timers {
  display: grid;
  gap: 8px;
}

.step-timer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 8px;
  box-shadow: 0 8px 18px rgba(21, 50, 44, 0.04);
}

.step-timer.running {
  border-color: rgba(77, 138, 112, 0.48);
  background: #f1f8f4;
}

.step-timer.done {
  border-color: rgba(176, 114, 89, 0.5);
  background: #fff5f1;
}

.timer-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.timer-name {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-time {
  color: var(--ink);
  font-size: 1.18rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.timer-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.timer-actions button {
  min-height: 34px;
  padding: 6px 10px;
}

.nutrition-section {
  max-width: 820px;
}

.nutrition-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.detail-footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.source-link {
  display: inline;
  max-width: 100%;
  color: var(--brand);
  font-weight: 750;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.source-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

:root[data-theme="dark"] .chip {
  background: linear-gradient(180deg, #202a24, #19221d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .editor-card {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(23, 31, 27, 0.98), rgba(18, 25, 21, 0.98));
}

:root[data-theme="dark"] .detail-content {
  background: linear-gradient(180deg, #171f1b 0%, #141c18 58%, #1b1714 100%);
}

:root[data-theme="dark"] .detail-card .stat,
:root[data-theme="dark"] .steps li,
:root[data-theme="dark"] .step-timer {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(23, 31, 27, 0.96), rgba(18, 25, 21, 0.96));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .detail-card .stat input {
  border-color: var(--line);
  background: #111815;
}

:root[data-theme="dark"] .detail-description,
:root[data-theme="dark"] .ingredients,
:root[data-theme="dark"] .steps {
  color: var(--ink);
}

:root[data-theme="dark"] .steps li::before {
  border-color: rgba(126, 196, 162, 0.35);
  background: rgba(126, 196, 162, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .step-timer.running {
  border-color: rgba(126, 196, 162, 0.52);
  background: rgba(38, 74, 58, 0.4);
}

:root[data-theme="dark"] .step-timer.done {
  border-color: rgba(240, 138, 114, 0.5);
  background: rgba(77, 39, 32, 0.46);
}

.cooking-mode {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 52%, var(--bg) 100%);
  color: var(--ink);
}

.cooking-shell {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}

.cooking-ingredients {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(var(--surface-rgb), 0.9), rgba(var(--bg-rgb), 0.86));
  padding: 24px;
  overflow-y: auto;
  box-shadow: 12px 0 34px rgba(21, 50, 44, 0.08);
}

.cooking-ingredients-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cooking-ingredients h2 {
  margin: 0;
  color: var(--brand);
  font-size: 0.95rem;
  font-weight: 840;
  text-transform: uppercase;
}

.cooking-ingredients-head button {
  display: none;
}

.cooking-step-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "head"
    "progress"
    "active-timers"
    "step"
    "step-timers"
    "controls";
  gap: 22px;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: 40px;
}

.cooking-empty {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}

.cooking-head {
  grid-area: head;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cooking-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.cooking-head-actions,
.cooking-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cooking-ingredients-button {
  display: none;
}

.cooking-speech-toggle.active,
.cooking-speech-toggle[aria-pressed="true"] {
  border-color: rgba(77, 138, 112, 0.46);
  background: #eef8f1;
  color: var(--brand);
}

.cooking-progress {
  grid-area: progress;
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.cooking-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dde5de;
  box-shadow: inset 0 1px 3px rgba(21, 50, 44, 0.08);
}

.cooking-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 220ms var(--ease-out);
}

.cooking-step-card {
  grid-area: step;
  display: grid;
  align-content: center;
  justify-content: stretch;
  gap: 18px;
  min-height: 0;
  height: 100%;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--surface-raised-rgb), 0.98), rgba(var(--surface-rgb), 0.98));
  box-shadow: 0 24px 70px rgba(21, 50, 44, 0.13);
  padding: 56px;
  text-align: left;
  overflow: hidden;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.cooking-step-card:hover {
  box-shadow: 0 30px 84px rgba(21, 50, 44, 0.17);
  transform: translateY(-1px);
}

.cooking-step-card span {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 840;
  text-transform: uppercase;
}

.cooking-step-card strong {
  display: block;
  max-width: 1100px;
  max-height: 100%;
  color: var(--ink);
  font-size: 5rem;
  font-weight: 400;
  line-height: 1.08;
  overflow-wrap: anywhere;
  hyphens: auto;
  overflow: hidden;
}

.cooking-step-card:disabled {
  cursor: default;
  opacity: 1;
}

.cooking-controls {
  grid-area: controls;
  justify-content: space-between;
}

.cooking-step-timers {
  grid-area: step-timers;
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.active-cooking-timers {
  grid-area: active-timers;
  min-width: 0;
}

.active-cooking-timers-head {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 840;
  text-transform: uppercase;
}

.active-cooking-timer-list {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.active-cooking-timer {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: auto minmax(4rem, 12rem) auto auto auto;
  align-items: center;
  gap: 7px;
  max-width: min(100%, 390px);
  border: 1px solid rgba(77, 138, 112, 0.48);
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.96);
  box-shadow: 0 10px 26px rgba(21, 50, 44, 0.08);
  padding: 6px 7px 6px 10px;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.active-timer-status {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(104, 113, 109, 0.12);
}

.active-cooking-timer.running .active-timer-status {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(77, 138, 112, 0.14);
}

.active-cooking-timer.done .active-timer-status {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(224, 100, 79, 0.14);
}

.active-cooking-timer.ready .active-timer-status {
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(104, 113, 109, 0.12);
}

.active-timer-name {
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-timer-time {
  color: var(--ink);
  font-size: 1.06rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.active-cooking-timer button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  min-width: 30px;
  border-radius: 999px;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 820;
}

.timer-icon-button {
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.timer-icon {
  position: relative;
  display: block;
  line-height: 1;
}

.timer-icon-svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.15;
}

.timer-icon-play {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.timer-icon-pause {
  width: 9px;
  height: 12px;
  border-right: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

.timer-icon-restart {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 999px;
}

.timer-icon-restart::after {
  position: absolute;
  top: -3px;
  right: -1px;
  width: 0;
  height: 0;
  border-top: 4px solid currentColor;
  border-left: 4px solid transparent;
  content: "";
}

.timer-icon-close {
  width: 12px;
  height: 12px;
}

.timer-icon-close::before,
.timer-icon-close::after {
  position: absolute;
  top: 5px;
  left: 0;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.timer-icon-close::before {
  transform: rotate(45deg);
}

.timer-icon-close::after {
  transform: rotate(-45deg);
}

.active-cooking-timer .active-timer-reset {
  width: 30px;
  height: 30px;
  padding: 0;
}

.auth-wrap,
.match-placeholder {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card,
.match-placeholder section {
  width: min(460px, 100%);
  padding: 24px;
}

.auth-wrap {
  background:
    linear-gradient(135deg, rgba(21, 50, 44, 0.08), rgba(224, 100, 79, 0.08)),
    var(--bg);
}

.auth-card h1,
.match-placeholder h1 {
  margin: 0 0 10px;
  line-height: 1.08;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-brand .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.auth-brand .brand-name {
  font-size: 1.6rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}

.auth-tabs button[aria-pressed="true"] {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-columns.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-card {
  padding: 22px;
}

.editor-card h1 {
  margin: 0;
}

.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.editor-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--surface-rgb), 0.72), rgba(237, 240, 232, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  padding: 16px;
}

.editor-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.image-editor-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.image-preview {
  display: grid;
  min-height: 150px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(21, 50, 44, 0.08), rgba(246, 195, 91, 0.18)),
    var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.image-preview img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  display: block;
  object-fit: cover;
}

.ingredient-editor-list,
.step-editor-list {
  display: grid;
  gap: 7px;
}

.editor-list-add {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.ingredient-editor-row,
.step-editor-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.9);
  padding: 8px;
  box-shadow: 0 7px 18px rgba(21, 50, 44, 0.04);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.ingredient-editor-row:focus-within,
.step-editor-row:focus-within {
  border-color: rgba(176, 114, 89, 0.48);
  box-shadow: var(--ring);
}

.ingredient-editor-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.step-editor-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.check-label {
  align-self: center;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--ink);
}

.compact-scale {
  min-height: 34px;
  white-space: nowrap;
}

.check-label input {
  width: auto;
}

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(21, 50, 44, 0.14);
}

.step-timer-editor-list {
  grid-column: 2 / -1;
  display: grid;
  gap: 6px;
}

.step-timer-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.45fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.step-timer-editor-row input {
  min-height: 34px;
  padding: 7px 9px;
}

.step-timer-editor-row button {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.ingredient-editor-row textarea,
.step-editor-row textarea {
  resize: vertical;
}

.ingredient-editor-row textarea {
  min-height: 64px;
}

.step-editor-row textarea {
  min-height: 96px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ingredient-editor-row:not(.compact-row) .row-actions {
  grid-column: 1 / -1;
}

.row-actions button {
  min-height: 34px;
  padding: 6px 10px;
}

.icon-actions {
  flex-wrap: nowrap;
  gap: 4px;
}

.icon-actions button {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.icon-actions button[title="Add timer"] {
  width: auto;
  padding: 0 10px;
}

.cookbook-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  align-items: start;
  gap: 16px;
}

.cookbook-intro h2 {
  margin: 0 0 6px;
}

.cookbook-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cookbook-builder {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(280px, 1.08fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.cookbook-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--surface-rgb), 0.78), rgba(237, 240, 232, 0.88));
  box-shadow: 0 10px 30px rgba(21, 50, 44, 0.07);
  padding: 14px;
}

.cookbook-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookbook-panel-head h2 {
  margin: 0;
  color: var(--brand);
  font-size: 1rem;
}

.cookbook-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.4fr) minmax(130px, 0.4fr);
  gap: 8px;
}

.cookbook-recipe-list,
.cookbook-order-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-height: min(58vh, 620px);
  overflow-y: auto;
  padding: 2px;
}

.cookbook-order-list {
  margin: 0;
  list-style: none;
}

.cookbook-recipe-option,
.cookbook-order-item {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.94);
  padding: 9px;
  box-shadow: 0 6px 18px rgba(21, 50, 44, 0.04);
  transition:
    transform 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

.cookbook-recipe-option:hover,
.cookbook-order-item:hover {
  border-color: rgba(77, 138, 112, 0.42);
  box-shadow: 0 14px 32px rgba(21, 50, 44, 0.1);
  transform: translateY(-1px);
}

.cookbook-recipe-option input {
  width: auto;
}

.cookbook-recipe-option .recipe-thumb,
.cookbook-order-item .recipe-thumb {
  width: 58px;
  height: 58px;
}

.cookbook-recipe-option strong,
.cookbook-order-title strong,
.cookbook-order-title small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cookbook-order-item {
  grid-template-columns: 34px 58px minmax(0, 1fr) auto;
}

.cookbook-order-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 820;
  box-shadow: 0 8px 16px rgba(21, 50, 44, 0.14);
}

.cookbook-order-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cookbook-order-title small {
  color: var(--muted);
  font-weight: 650;
}

.cookbook-empty {
  min-height: 220px;
}

.planner-intro {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  align-items: start;
}

.planner-intro h2 {
  margin: 0 0 6px;
}

.planner-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.planner-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.planner-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-gutter: stable;
}

.planner-day {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--surface-rgb), 0.9), rgba(237, 240, 232, 0.84));
  box-shadow: 0 10px 30px rgba(21, 50, 44, 0.06);
  padding: 12px;
}

.planner-day.today {
  border-color: rgba(176, 114, 89, 0.42);
  background:
    linear-gradient(180deg, rgba(250, 238, 231, 0.94), rgba(237, 240, 232, 0.88));
}

.planner-day header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.planner-day header strong {
  color: var(--brand);
}

.planner-meals {
  display: grid;
  gap: 10px;
}

.planner-meal {
  display: grid;
  gap: 7px;
}

.planner-meal label {
  gap: 5px;
}

.planner-meal label > span {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 820;
}

.planner-meal select {
  min-height: 38px;
  padding: 8px 9px;
}

.planner-meal-preview {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(221, 220, 212, 0.84);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.92);
  padding: 7px;
}

.planner-meal-preview.missing {
  grid-template-columns: minmax(0, 1fr) auto;
}

.planner-meal-preview .recipe-thumb {
  width: 46px;
  height: 46px;
}

.planner-meal-preview strong,
.planner-meal-preview small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.planner-meal-preview strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.planner-meal-preview small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.planner-meal-preview button {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
}

.planner-empty {
  min-height: 260px;
}

.shopping-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.shopping-add-form textarea {
  min-height: 40px;
  max-height: 160px;
  resize: none;
  overflow: hidden;
}

.shopping-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.shopping-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shopping-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, auto) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.96);
  padding: 10px;
  box-shadow: 0 7px 20px rgba(21, 50, 44, 0.05);
  transition:
    transform 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    opacity 160ms var(--ease-out);
}

.shopping-item:hover {
  border-color: rgba(77, 138, 112, 0.34);
  box-shadow: 0 14px 30px rgba(21, 50, 44, 0.09);
  transform: translateY(-1px);
}

.shopping-item.checked {
  opacity: 0.65;
}

.shopping-item.checked .shopping-item-text strong {
  text-decoration: line-through;
}

.shopping-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
}

.shopping-check input {
  width: auto;
  flex: 0 0 auto;
}

.shopping-item-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.shopping-item-text strong,
.shopping-item-text small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shopping-item-text small {
  color: var(--muted);
  font-weight: 650;
}

.shopping-item-source-inline::before {
  content: " - ";
}

.shopping-source-popover {
  position: relative;
  display: none;
}

.shopping-source-popover summary {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.shopping-source-popover summary::-webkit-details-marker {
  display: none;
}

.shopping-source-popover div {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 8;
  width: min(260px, 76vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 9px 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

.shopping-quantity {
  justify-self: end;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #f4faf5, #eaf2ec);
  padding: 6px 10px;
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}

.shopping-item > button {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.shopping-empty {
  min-height: 220px;
}

.tool-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--surface-rgb), 0.76), rgba(237, 240, 232, 0.9));
  box-shadow: 0 10px 30px rgba(21, 50, 44, 0.06);
  padding: 16px;
}

.tool-section h2 {
  margin: 0;
  font-size: 1.05rem;
}

.tool-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.billing-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.billing-plan-name {
  margin: 4px 0 0;
  font-size: 1.7rem;
  font-weight: 800;
}

.billing-meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.billing-meter {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.billing-meter > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.billing-meter strong {
  color: var(--ink);
}

.billing-meter-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 55, 47, 0.12);
}

.billing-meter-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.billing-meter.over-limit .billing-meter-track span {
  background: var(--danger);
}

.billing-actions .message {
  align-self: center;
  margin: 0;
}

.quota-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(9, 16, 13, 0.45);
  padding: 18px;
}

.quota-modal {
  display: grid;
  gap: 12px;
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.quota-modal h2,
.quota-modal p {
  margin: 0;
}

.account-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.account-settings-grid form {
  align-content: start;
}

.account-settings-grid input[readonly] {
  color: var(--muted);
  background: rgba(var(--surface-rgb), 0.62);
}

:root[data-theme="dark"] .cooking-mode {
  background:
    linear-gradient(135deg, #111815 0%, #0c1310 52%, #181410 100%);
}

:root[data-theme="dark"] .cooking-ingredients {
  background: linear-gradient(180deg, rgba(23, 31, 27, 0.9), rgba(18, 25, 21, 0.88));
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .cooking-speech-toggle.active,
:root[data-theme="dark"] .cooking-speech-toggle[aria-pressed="true"] {
  background: rgba(38, 74, 58, 0.42);
}

:root[data-theme="dark"] .cooking-progress-track {
  background: #25332b;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .cooking-step-card,
:root[data-theme="dark"] .active-cooking-timer,
:root[data-theme="dark"] .editor-section,
:root[data-theme="dark"] .ingredient-editor-row,
:root[data-theme="dark"] .step-editor-row,
:root[data-theme="dark"] .cookbook-panel,
:root[data-theme="dark"] .cookbook-recipe-option,
:root[data-theme="dark"] .cookbook-order-item,
:root[data-theme="dark"] .planner-day,
:root[data-theme="dark"] .planner-meal-preview,
:root[data-theme="dark"] .shopping-item,
:root[data-theme="dark"] .tool-section {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(23, 31, 27, 0.94), rgba(18, 25, 21, 0.94));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .planner-day.today {
  border-color: rgba(240, 138, 114, 0.5);
  background: linear-gradient(180deg, rgba(45, 30, 25, 0.94), rgba(18, 25, 21, 0.94));
}

:root[data-theme="dark"] .image-preview {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .shopping-source-popover summary,
:root[data-theme="dark"] .shopping-quantity {
  border-color: var(--line);
  background: linear-gradient(180deg, #202a24, #19221d);
}

:root[data-theme="dark"] .billing-meter-track {
  background: rgba(228, 236, 226, 0.12);
}

:root[data-theme="dark"] .account-settings-grid input[readonly] {
  color: var(--muted);
  background: rgba(31, 42, 36, 0.78);
}

.message {
  color: var(--muted);
  font-size: 0.9rem;
}

.message.error {
  color: var(--danger);
}

.toast-region {
  position: fixed;
  z-index: 60;
  right: calc(18px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: grid;
  width: min(360px, calc(100vw - 24px));
  gap: 10px;
  pointer-events: none;
}

.toast-region[hidden] {
  display: none;
}

.toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  padding: 12px 12px 12px 14px;
  pointer-events: auto;
  animation: toastIn 220ms var(--ease-out);
}

.toast.info {
  border-left-color: #3e6d89;
}

.toast.warning {
  border-left-color: var(--gold);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast p {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.93rem;
  line-height: 1.35;
}

.toast-close {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding: 0;
  line-height: 1;
}

.toast-close:hover {
  border-color: var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.match-page {
  min-height: calc(100vh - 71px);
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(21, 50, 44, 0.08), rgba(224, 100, 79, 0.1)),
    var(--bg);
}

.match-topbar .topbar-actions {
  flex-wrap: nowrap;
}

.match-panel {
  width: min(1040px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--surface-raised-rgb), 0.98), rgba(var(--surface-rgb), 0.98));
  box-shadow: var(--shadow-lifted);
  padding: 22px;
}

.match-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.match-panel-head h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.05;
}

.match-select-list,
.results-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.match-select-row,
.result-row {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.94);
  padding: 10px;
  box-shadow: 0 7px 20px rgba(21, 50, 44, 0.05);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.match-select-row:hover,
.result-row:hover {
  border-color: rgba(77, 138, 112, 0.36);
  box-shadow: 0 14px 30px rgba(21, 50, 44, 0.1);
  transform: translateY(-1px);
}

.match-select-row {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.match-select-row input {
  width: 20px;
  height: 20px;
}

.result-row {
  grid-template-columns: 72px minmax(0, 1fr);
}

.result-row h2 {
  margin: 0;
  font-size: 1.05rem;
}

.result-row.everyone-match {
  border-color: var(--green);
  background: #f2faf5;
}

.share-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.swipe-shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  background: #0c1614;
  color: #ffffff;
  overflow: hidden;
}

.swipe-shell.details-open {
  grid-template-rows: minmax(48vh, 1fr) auto;
  overflow-y: auto;
}

.swipe-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.swipe-card img,
.swipe-fallback {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  animation: softScaleIn 260ms var(--ease-out);
}

.swipe-fallback {
  background: linear-gradient(135deg, #0d2e28, var(--brand) 58%, var(--gold));
}

.swipe-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.12) 62%, rgba(0, 0, 0, 0.35));
}

.swipe-overlay {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 10px;
  padding: 24px;
  padding-right: calc(24px + env(safe-area-inset-right));
  padding-bottom: calc(118px + env(safe-area-inset-bottom));
  padding-left: calc(24px + env(safe-area-inset-left));
  max-height: 100%;
  overflow: hidden;
}

.swipe-overlay h1 {
  max-width: 920px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.8rem, min(7vw, 8vh), 5.6rem);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.swipe-overlay .recipe-meta,
.swipe-overlay .chip {
  color: #ffffff;
}

.swipe-overlay .chip,
.swipe-overlay .status-pill {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.16);
}

.swipe-progress-pill {
  position: absolute;
  z-index: 2;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  backdrop-filter: blur(12px);
}

.swipe-hint {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  transform: translate(-50%, -50%);
  pointer-events: none;
  backdrop-filter: blur(12px);
  animation: swipeHintPulse 1600ms ease-in-out infinite;
}

.swipe-hint strong {
  font-weight: 900;
}

.swipe-controls {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 0 18px 20px;
  padding-right: calc(18px + env(safe-area-inset-right));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  padding-left: calc(18px + env(safe-area-inset-left));
  pointer-events: none;
}

.swipe-controls button {
  min-height: 58px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
  pointer-events: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.swipe-detail-button {
  width: 52px;
  min-height: 52px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand);
}

.swipe-detail-button:hover,
.swipe-detail-button:focus-visible {
  background: #ffffff;
  color: var(--brand);
}

.swipe-detail-button[aria-pressed="true"] {
  background: var(--gold);
  color: #171717;
}

.swipe-detail-button svg {
  width: 23px;
  height: 23px;
  display: block;
}

.swipe-details {
  width: min(860px, calc(100% - 28px));
  margin: 0 auto 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  animation: fadeUp 200ms var(--ease-out);
}

.swipe-details h2 {
  margin: 18px 0 8px;
}

:root[data-theme="dark"] .auth-wrap,
:root[data-theme="dark"] .match-page {
  background:
    linear-gradient(135deg, rgba(77, 150, 118, 0.1), rgba(240, 138, 114, 0.09)),
    var(--bg);
}

:root[data-theme="dark"] .match-panel,
:root[data-theme="dark"] .match-select-row,
:root[data-theme="dark"] .result-row {
  background: linear-gradient(180deg, rgba(23, 31, 27, 0.96), rgba(18, 25, 21, 0.96));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .result-row.everyone-match {
  background: rgba(38, 74, 58, 0.48);
}

:root[data-theme="dark"] .swipe-details {
  background: var(--surface);
  color: var(--ink);
}

:root:not([data-theme="dark"]) .empty-state,
:root:not([data-theme="dark"]) .editor-section,
:root:not([data-theme="dark"]) .ingredient-editor-row,
:root:not([data-theme="dark"]) .step-editor-row,
:root:not([data-theme="dark"]) .cookbook-panel,
:root:not([data-theme="dark"]) .cookbook-recipe-option,
:root:not([data-theme="dark"]) .cookbook-order-item,
:root:not([data-theme="dark"]) .planner-day,
:root:not([data-theme="dark"]) .planner-meal-preview,
:root:not([data-theme="dark"]) .shopping-item,
:root:not([data-theme="dark"]) .tool-section,
:root:not([data-theme="dark"]) .match-panel,
:root:not([data-theme="dark"]) .match-select-row,
:root:not([data-theme="dark"]) .result-row,
:root:not([data-theme="dark"]) .toast,
:root:not([data-theme="dark"]) .quota-modal {
  border-color: var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: none;
}

:root:not([data-theme="dark"]) .auth-wrap,
:root:not([data-theme="dark"]) .match-page,
:root:not([data-theme="dark"]) .cooking-mode {
  background: var(--bg);
}

:root:not([data-theme="dark"]) .cooking-ingredients,
:root:not([data-theme="dark"]) .cooking-step-card,
:root:not([data-theme="dark"]) .active-cooking-timer {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}

:root:not([data-theme="dark"]) .shopping-quantity,
:root:not([data-theme="dark"]) .shopping-source-popover summary {
  border-color: var(--line);
  background: var(--surface-3);
}

:root:not([data-theme="dark"]) .result-row.everyone-match {
  background: var(--surface-2);
}

:root:not([data-theme="dark"]) .cookbook-recipe-option:hover,
:root:not([data-theme="dark"]) .cookbook-order-item:hover,
:root:not([data-theme="dark"]) .shopping-item:hover,
:root:not([data-theme="dark"]) .match-select-row:hover,
:root:not([data-theme="dark"]) .result-row:hover {
  border-color: var(--brand);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 880px) {
  .layout {
    display: block;
    height: auto;
    min-height: calc(100vh - 63px);
    overflow: visible;
  }

  .library-pane {
    border-right: 0;
    border-bottom: 0;
    display: block;
    max-height: none;
    overflow: visible;
  }

  .detail-pane {
    max-height: none;
    overflow: visible;
    padding: 16px;
  }

  .detail-hero {
    min-height: 310px;
  }

  .detail-hero-content {
    padding: 84px 18px 24px;
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .measure-system-control {
    width: 100%;
  }

  .measure-system-control select {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .detail-hero h1 {
    font-size: 2.1rem;
    line-height: 1.08;
  }

  .detail-content {
    padding: 18px;
  }

  .layout.screen-overview .detail-pane,
  .layout.screen-detail .library-pane,
  .layout.screen-editor .library-pane,
  .layout.screen-tools .library-pane,
  .layout.screen-shopping .library-pane,
  .layout.screen-planner .library-pane,
  .layout.screen-cookbook .library-pane {
    display: none;
  }

  .mobile-screen-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }

  .mobile-screen-bar button {
    width: auto;
    min-height: 38px;
    padding: 7px 11px;
  }

  .mobile-screen-bar strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .detail-feedback {
    display: block;
  }

  .editor-head {
    display: grid;
  }

  .editor-actions {
    justify-content: start;
  }

  .detail-actions {
    right: 14px;
    left: 14px;
    justify-content: flex-end;
  }

  .mobile-detail-menu-button {
    display: inline-flex;
    width: auto;
  }

  .detail-actions-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 81;
    display: none;
    width: min(360px, calc(100vw - 28px));
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    transform: translate(-50%, -50%);
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(21, 50, 44, 0.2);
    padding: 14px;
  }

  .detail-actions-menu.open {
    display: grid;
  }

  .detail-actions-backdrop.open {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    background: rgba(9, 16, 14, 0.48);
    backdrop-filter: blur(3px);
  }

  .detail-actions-title {
    display: block;
    padding: 2px 2px 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 820;
    text-transform: uppercase;
  }

  .detail-actions-menu button {
    justify-content: flex-start;
    min-height: 46px;
    border-color: var(--line);
    background: var(--surface);
    box-shadow: none;
  }

  .detail-actions-menu button.primary {
    justify-content: center;
    border-color: var(--brand);
    background: var(--brand);
  }

  .detail-grid.detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
  }

  .detail-grid.nutrition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recipe-section-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .recipe-card.active,
  :root[data-theme="dark"] .recipe-card.active {
    border: 1px solid var(--line);
  }

  .cooking-shell {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .cooking-ingredients {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    border-right: 0;
    background: var(--surface);
    padding: calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
  }

  .cooking-ingredients.open {
    display: grid;
  }

  .cooking-ingredients-head button,
  .cooking-ingredients-button {
    display: inline-flex;
    width: auto;
  }

  .cooking-step-panel {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    padding: 18px;
  }

  .cooking-head {
    display: grid;
  }

  .cooking-head-actions {
    justify-content: start;
  }

  .cooking-step-card {
    height: 100%;
  }

  .detail-grid,
  .form-columns,
  .form-columns.three,
  .image-editor-grid,
  .ingredient-editor-row,
  .step-editor-row,
  .result-summary {
    grid-template-columns: 1fr;
  }

  .ingredient-editor-row .row-actions {
    grid-column: auto;
  }

  .ingredient-editor-row.compact-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ingredient-editor-row.compact-row .icon-actions,
  .step-editor-row.compact-row .icon-actions {
    grid-column: 1 / -1;
    justify-content: end;
  }

  .step-timer-editor-list {
    grid-column: 1 / -1;
  }

  .match-panel-head,
  .share-box {
    display: grid;
  }

  .swipe-shell {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .swipe-shell.details-open {
    grid-template-rows: minmax(46vh, 1fr) auto auto;
  }
}

@media (max-width: 760px) {
  .app-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: calc(10px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 10px calc(14px + env(safe-area-inset-left));
  }

  .app-topbar .brand {
    min-height: 42px;
  }

  .app-topbar .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-button {
    display: inline-flex;
    width: auto;
    min-height: 38px;
    padding: 7px 12px;
  }

  .app-topbar .topbar-actions {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    left: 12px;
    display: none;
    width: auto;
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-content: stretch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 12px;
  }

  .app-topbar .topbar-actions.open {
    display: grid;
  }

  .app-topbar .topbar-actions .status-pill,
  .app-topbar .topbar-actions button,
  .app-topbar .topbar-actions .button {
    width: 100%;
  }

  .app-topbar .topbar-actions .appearance-control {
    width: 100%;
    justify-content: space-between;
  }

  .app-topbar.match-topbar .topbar-actions {
    position: static;
    display: flex;
    width: auto;
    grid-template-columns: none;
    align-items: center;
    justify-content: flex-end;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .app-topbar.match-topbar .topbar-actions .status-pill {
    display: none;
  }

  .app-topbar.match-topbar .topbar-actions .button {
    width: auto;
    min-height: 38px;
    padding: 7px 12px;
  }

  .account-settings-grid {
    grid-template-columns: 1fr;
  }

  .billing-head,
  .billing-meter > div:first-child {
    flex-direction: column;
    align-items: flex-start;
  }

  .billing-meters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar:not(.app-topbar) {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-row,
  .library-summary {
    width: 100%;
  }

  .toolbar-row,
  .library-summary {
    display: grid;
  }

  .overview-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-actions input {
    grid-column: 1 / -1;
  }

  .overview-actions .filter-toggle,
  .overview-actions .recipe-view-toggle,
  .overview-actions .add-menu {
    width: 100%;
  }

  .recipe-view-toggle-mobile {
    display: inline-grid;
  }

  .recipe-view-toggle-desktop {
    display: none;
  }

  .view-toggle button {
    padding: 5px 7px;
  }

  .view-toggle-label {
    display: none;
  }

  .overview-actions .add-menu {
    width: 100%;
  }

  .add-menu-panel {
    right: 0;
    left: auto;
    width: min(220px, calc(100vw - 24px));
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .cookbook-intro,
  .planner-intro,
  .cookbook-builder,
  .cookbook-filters,
  .cookbook-stats,
  .planner-stats {
    grid-template-columns: 1fr;
  }

  .planner-week {
    grid-template-columns: 1fr;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .planner-day {
    min-width: 0;
  }

  .planner-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .planner-toolbar .row-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .planner-toolbar .row-actions button {
    min-width: 0;
    padding-inline: 6px;
  }

  .cookbook-recipe-list,
  .cookbook-order-list {
    max-height: none;
  }

  .cookbook-panel-head {
    display: grid;
  }

  .cookbook-order-item {
    grid-template-columns: 30px 52px minmax(0, 1fr);
  }

  .cookbook-order-item .row-actions {
    grid-column: 3;
    justify-content: start;
  }

  .cookbook-recipe-option {
    grid-template-columns: auto 52px minmax(0, 1fr);
  }

  .cookbook-recipe-option .recipe-thumb,
  .cookbook-order-item .recipe-thumb {
    width: 52px;
    height: 52px;
  }

  .shopping-add-form {
    grid-template-columns: 1fr;
  }

  .shopping-list {
    gap: 6px;
  }

  .shopping-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 5px 8px;
    padding: 8px 10px;
  }

  .shopping-check {
    grid-column: 1;
    grid-row: 1;
    align-items: flex-start;
    gap: 8px;
  }

  .shopping-check input {
    width: 14px;
    height: 14px;
    margin-top: 2px;
  }

  .shopping-item-text {
    gap: 0;
  }

  .shopping-item-text strong {
    font-size: 0.92rem;
    line-height: 1.16;
  }

  .shopping-item-note {
    font-size: 0.76rem;
    line-height: 1.2;
  }

  .shopping-item-source-inline {
    display: none;
  }

  .shopping-item-source-inline::before {
    content: "";
  }

  .shopping-source-popover {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    display: block;
  }

  .shopping-source-popover div {
    right: -38px;
  }

  .shopping-source-popover[open] {
    z-index: 9;
  }

  .shopping-item-text small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .shopping-quantity {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    padding: 3px 8px;
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .shopping-item > button {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    width: 30px;
    min-height: 30px;
  }

  button,
  .button {
    width: 100%;
  }

  .toast-region {
    right: calc(12px + env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: calc(12px + env(safe-area-inset-left));
    width: auto;
  }

  .rating-button,
  .rating-clear {
    width: auto;
  }

  .check-label input {
    width: auto;
  }

  .row-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .icon-actions {
    display: flex;
    grid-template-columns: none;
  }

  .detail-hero {
    min-height: 260px;
  }

  .detail-hero-content {
    padding: 78px 16px 22px;
  }

  .detail-hero h1 {
    font-size: 1.75rem;
  }

  .detail-eyebrow {
    min-height: 28px;
    font-size: 0.72rem;
  }

  .detail-grid.detail-summary,
  .detail-grid.nutrition-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid.detail-summary {
    margin-top: 0;
  }

  .detail-card .stat {
    min-height: auto;
  }

  .steps li {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  .steps li::before {
    width: 30px;
    height: 30px;
  }

  .step-timer {
    grid-template-columns: 1fr;
  }

  .timer-actions {
    justify-content: stretch;
  }

  .timer-actions button {
    flex: 1 1 auto;
  }

  .cooking-step-panel {
    gap: 16px;
    padding: 14px;
  }

  .cooking-head-actions button,
  .cooking-ingredients-head button,
  .cooking-ingredients-button {
    width: auto;
  }

  .cooking-step-card {
    height: 100%;
    padding: 22px;
  }

  .cooking-step-card strong {
    font-size: 2.6rem;
  }

  .cooking-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cooking-step-timers {
    max-height: none;
    gap: 6px;
  }

  .active-cooking-timer-list {
    max-height: none;
    gap: 6px;
  }

  .active-cooking-timer {
    grid-template-columns: auto minmax(4rem, 1fr) auto auto auto;
    max-width: min(86vw, 340px);
    padding: 5px 6px 5px 9px;
  }

  .active-timer-name {
    max-width: 7rem;
    font-size: 0.78rem;
  }

  .active-timer-time {
    font-size: 0.98rem;
  }

  .active-cooking-timer button {
    width: 28px;
    height: 28px;
    min-height: 28px;
    min-width: 28px;
    padding: 0;
    font-size: 0.72rem;
  }

  .active-cooking-timer .active-timer-reset {
    width: 28px;
    height: 28px;
    padding: 0;
  }

  .step-timer-editor-row {
    grid-template-columns: 1fr;
  }

  .step-timer-editor-row button {
    justify-self: end;
  }

  .icon-actions button {
    width: 34px;
  }

  .recipe-card-main {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .recipe-thumb {
    width: 62px;
    height: 62px;
  }

  .recipe-list-scroll {
    overflow: visible;
    padding: 0;
  }

  .library-pane,
  .detail-pane {
    padding: 12px;
  }

  .detail-content,
  .editor-card {
    padding: 16px;
  }

  .match-page {
    padding: 14px;
  }

  .match-panel {
    padding: 14px;
  }

  .match-select-row,
  .result-row {
    grid-template-columns: auto 62px minmax(0, 1fr);
  }

  .result-row {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .swipe-controls {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    padding-right: calc(12px + env(safe-area-inset-right));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    padding-left: calc(12px + env(safe-area-inset-left));
  }

  .swipe-controls button {
    min-height: 52px;
    font-size: 0.98rem;
  }

  .swipe-detail-button {
    width: 48px;
    min-height: 48px;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --surface-3: #ffffff;
    --ink: #171717;
    --muted: #555555;
    --line: #d2d2d2;
    --brand: #171717;
    --brand-2: #171717;
    --accent: #555555;
    --gold: #555555;
    font-size: 10pt;
  }

  body {
    background: #ffffff;
    color: #171717;
  }

  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  .topbar,
  .library-pane,
  .detail-actions,
  .mobile-screen-bar,
  .favorite-toggle,
  .measure-system-control,
  .toast-region,
  .status-pill,
  .step-timer button,
  .timer-actions {
    display: none !important;
  }

  .layout {
    display: block;
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .detail-pane {
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .detail-card {
    max-width: none;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  .detail-card,
  .editor-card {
    overflow: visible;
  }

  .detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54mm;
    align-items: start;
    gap: 10mm;
    min-height: auto;
    overflow: visible;
    background: #ffffff;
    border-bottom: 1px solid #d2d2d2;
    padding-bottom: 7mm;
    break-inside: avoid;
  }

  .detail-hero::after {
    display: none;
  }

  .detail-image {
    position: static;
    grid-column: 2;
    grid-row: 1;
    width: 54mm;
    height: 40mm;
    aspect-ratio: auto;
    border: 1px solid #d2d2d2;
    border-radius: 0;
    background: #ffffff;
    page-break-after: auto;
  }

  .detail-hero-empty .detail-image {
    display: none;
  }

  .detail-hero-empty {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-hero-content {
    grid-column: 1;
    grid-row: 1;
    max-width: none;
    padding: 0;
    color: #171717;
  }

  .detail-hero h1 {
    color: #171717;
    font-size: 20pt;
    line-height: 1.08;
    letter-spacing: 0;
  }

  .detail-label-row,
  .detail-eyebrow {
    display: none;
  }

  .detail-tags {
    display: block;
    margin-top: 3mm;
    color: #555555;
    font-size: 8.5pt;
    line-height: 1.3;
  }

  .detail-hero .chip {
    display: inline;
    border: 0;
    background: transparent;
    color: #555555;
    padding: 0;
    backdrop-filter: none;
  }

  .detail-hero .chip + .chip::before {
    content: ", ";
  }

  .detail-content {
    border: 0;
    background: #ffffff;
    gap: 6mm;
    padding: 7mm 0 0;
  }

  .recipe-meta,
  .chip,
  .stat span,
  .stat strong {
    color: #171717;
  }

  .chip,
  .stat {
    border-color: #d2d2d2;
    background: #ffffff;
  }

  .detail-grid.detail-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4mm 9mm;
    border-bottom: 1px solid #d2d2d2;
    margin: 0;
    padding-bottom: 5mm;
    page-break-inside: avoid;
  }

  .detail-card .stat,
  .stat {
    display: block;
    min-height: auto;
    border: 0;
    background: transparent;
    padding: 0;
  }

  .stat > span {
    display: block;
    color: #666666;
    font-size: 7.5pt;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .stat strong,
  .detail-card .stat strong {
    display: block;
    min-height: auto;
    margin-top: 1mm;
    color: #171717;
    font-size: 10pt;
    line-height: 1.2;
  }

  .detail-grid input {
    width: auto;
    min-height: auto;
    border: 0;
    background: transparent;
    color: #171717;
    font: inherit;
    padding: 0;
  }

  .rating-stars,
  .rating-star,
  .rating-star.filled {
    color: #555555;
  }

  .detail-description {
    border: 0;
    padding: 0;
    color: #222222;
    font-size: 10pt;
    line-height: 1.42;
  }

  .recipe-section-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 10mm;
    align-items: start;
  }

  .recipe-section {
    border-top: 0;
    padding-top: 0;
  }

  .section-title-row {
    display: block;
  }

  .section h2 {
    color: #171717;
    font-size: 10pt;
    letter-spacing: 0;
    text-transform: uppercase;
    border-bottom: 1px solid #d2d2d2;
    padding-bottom: 2mm;
    break-after: avoid;
  }

  .ingredients,
  .steps {
    color: #171717;
    font-size: 9pt;
    line-height: 1.32;
  }

  .ingredients {
    display: block;
    list-style: disc;
    padding-left: 12pt;
  }

  .ingredients li {
    display: list-item;
    min-height: 0;
    margin: 0 0 3pt;
    padding: 0;
    break-inside: avoid;
  }

  .ingredients li::before {
    display: none;
  }

  .ingredient-amount {
    font-weight: 700;
  }

  .steps {
    display: block;
    list-style: decimal;
    padding-left: 14pt;
  }

  .steps li {
    display: list-item;
    grid-template-columns: none;
    min-height: 0;
    margin: 0 0 4pt;
    border: 0;
    background: transparent;
    padding: 0;
    break-inside: avoid;
    counter-increment: none;
  }

  .steps li::before {
    display: none;
  }

  .step-body p {
    margin: 0;
  }

  .step-timers {
    display: flex;
    flex-wrap: wrap;
    gap: 2mm;
    margin-top: 1.5mm;
  }

  .step-timer {
    display: inline-flex;
    min-height: 0;
    border: 1px solid #d2d2d2;
    background: transparent;
    padding: 1mm 2mm;
    color: #555555;
    font-size: 8pt;
  }

  .nutrition-section {
    border-top: 1px solid #d2d2d2;
    padding-top: 4mm;
  }

  .nutrition-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3mm 8mm;
  }

  .detail-footer {
    margin-top: 0;
    border-top: 1px solid #d2d2d2;
    padding-top: 3mm;
    color: #666666;
    font-size: 8pt;
  }

  .section,
  .detail-grid,
  .source-link,
  .detail-footer {
    break-inside: avoid;
  }

  a {
    color: #555555;
    text-decoration: none;
  }

  .source-link {
    display: block;
    overflow-wrap: anywhere;
  }

  .source-link::after {
    content: " (" attr(href) ")";
    color: #777777;
  }
}
