/*
 * Desktop recipe workspace restored from the approved Cooksy reference.
 * The existing application stays mounted underneath so its import, account,
 * and editor workflows can continue to be reused.
 */

:root {
  --reference-red: #ea4335;
  --reference-red-deep: #cf362c;
  --reference-ink: #1f2024;
  --reference-muted: #78797e;
  --reference-line: #ecebed;
  --reference-soft: #fbfbfc;
  --reference-active: #fff3f1;
  --reference-green: #2d8a2f;
  --reference-blue: #2877d7;
}

body.reference-shell-active {
  min-width: 320px;
  margin: 0;
  overflow: hidden;
  background: #fff;
  color: var(--reference-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body.reference-shell-active .app > .topbar,
body.reference-shell-active .app > #mainGrid {
  display: none !important;
}

body.reference-shell-active.cooksy-legacy-flow {
  overflow: hidden;
  background: #fff;
}

body.reference-shell-active.cooksy-legacy-flow .reference-shell {
  display: grid;
}

body.reference-shell-active.cooksy-legacy-flow .app > .topbar {
  display: none !important;
}

body.reference-shell-active.cooksy-legacy-flow .app > #mainGrid {
  display: block !important;
}

.reference-shell,
.reference-shell *,
.reference-shell *::before,
.reference-shell *::after {
  box-sizing: border-box;
}

.reference-shell {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(520px, 1fr) minmax(305px, 360px);
  grid-template-rows: 48px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  min-height: 560px;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  color: var(--reference-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  isolation: isolate;
}

.reference-shell button,
.reference-shell input,
.reference-shell select {
  font: inherit;
}

.reference-shell button {
  cursor: pointer;
}

.reference-sidebar {
  grid-row: 1 / span 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--reference-line);
  background: #fff;
}

.reference-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid var(--reference-line);
  background: #fff;
  color: var(--reference-red);
  text-align: left;
}

.reference-brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #f0e8e3;
  border-radius: 7px;
  background: #fffaf6;
}

.reference-brand-mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.reference-brand-word {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-nav {
  display: grid;
  gap: 3px;
  padding: 13px 8px;
}

.reference-nav-item,
.reference-sidebar-footer button {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #56575d;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.reference-nav-item:hover,
.reference-sidebar-footer button:hover {
  background: #fafafa;
  color: #242529;
}

@media (min-width: 861px) {
  .reference-shell.is-compact {
    grid-template-columns: 56px minmax(520px, 1fr) minmax(305px, 360px);
  }

  .reference-shell.is-compact .reference-brand {
    justify-content: center;
    padding: 0;
  }

  .reference-shell.is-compact .reference-brand-word,
  .reference-shell.is-compact .reference-nav-item > span,
  .reference-shell.is-compact .reference-sidebar-footer button > span {
    display: none;
  }

  .reference-shell.is-compact .reference-nav-item,
  .reference-shell.is-compact .reference-sidebar-footer button {
    justify-content: center;
    padding: 0;
  }

  .reference-shell.is-compact .reference-nav-item.is-active::before {
    left: 0;
  }
}

.reference-nav-item.is-active {
  position: relative;
  background: var(--reference-active);
  color: var(--reference-red);
  font-weight: 750;
}

.reference-nav-item.is-active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -8px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--reference-red);
  content: "";
}

.reference-nav-icon,
.reference-action-icon,
.reference-button-icon,
.reference-tab-icon,
.reference-check-icon {
  display: block;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  opacity: 0.78;
}

.reference-nav-item.is-active .reference-nav-icon {
  opacity: 1;
  filter: invert(38%) sepia(74%) saturate(2061%) hue-rotate(338deg) brightness(102%) contrast(84%);
}

.reference-sidebar-footer {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding: 12px 8px 14px;
}

.reference-sidebar-footer button {
  color: #73747a;
  font-weight: 500;
}

.reference-topbar {
  grid-column: 2 / span 2;
  display: grid;
  grid-template-columns: minmax(112px, 1fr) minmax(260px, 350px) auto auto auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 15px;
  border-bottom: 1px solid var(--reference-line);
  background: #fff;
}

.reference-page-title {
  min-width: 0;
  color: #1f2024;
  font-size: 14px;
  font-weight: 800;
}

.reference-search {
  position: relative;
  min-width: 0;
}

.reference-search img {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  opacity: 0.52;
}

.reference-search input {
  width: 100%;
  height: 34px;
  padding: 0 41px 0 32px;
  border: 1px solid #e7e6e7;
  border-radius: 6px;
  outline: none;
  background: #fcfcfc;
  color: #313237;
  font-size: 11px;
}

.reference-search input::placeholder {
  color: #999aa0;
}

.reference-search input:focus {
  border-color: #e8b2ac;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.09);
}

.reference-search-shortcut {
  position: absolute;
  top: 50%;
  right: 7px;
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 5px;
  transform: translateY(-50%);
  border-radius: 4px;
  background: #f1f1f2;
  color: #a1a2a6;
  font-size: 9px;
  line-height: 1;
}

.reference-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--reference-red);
  border-radius: 6px;
  background: linear-gradient(135deg, #ed5142, #d83a30);
  box-shadow: 0 5px 10px rgba(212, 55, 46, 0.17);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.reference-primary-action:hover {
  background: linear-gradient(135deg, #f25b4b, #d4382e);
}

.reference-primary-action .reference-button-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

.reference-avatar {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f1f1;
  color: #53545a;
  font-size: 9px;
  font-weight: 800;
}

.reference-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-avatar-chevron {
  width: 13px;
  height: 13px;
  opacity: 0.65;
}

.reference-recipes {
  grid-column: 2;
  min-width: 0;
  overflow: auto;
  background: #fff;
}

.reference-recipes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  gap: 12px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--reference-line);
}

.reference-filter-wrap {
  position: relative;
}

.reference-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #ecebed;
  border-radius: 5px;
  background: #fff;
  color: #54555a;
  font-size: 11px;
  font-weight: 650;
}

.reference-filter-button:hover,
.reference-filter-button[aria-expanded="true"] {
  border-color: #e1d6d4;
  background: #fffafa;
}

.reference-filter-button img {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.reference-filter-menu {
  position: absolute;
  z-index: 5;
  top: 36px;
  left: 0;
  display: grid;
  width: 188px;
  gap: 6px;
  padding: 11px;
  border: 1px solid #e9e7e7;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 26px rgba(30, 30, 32, 0.12);
}

.reference-filter-menu[hidden] {
  display: none;
}

.reference-filter-menu label {
  color: #707177;
  font-size: 10px;
  font-weight: 700;
}

.reference-filter-menu select {
  width: 100%;
  height: 31px;
  padding: 0 8px;
  border: 1px solid #e5e3e4;
  border-radius: 5px;
  background: #fff;
  color: #3d3e43;
  font-size: 11px;
}

.reference-count {
  color: #797a80;
  font-size: 10px;
  white-space: nowrap;
}

.reference-table-head,
.reference-row {
  display: grid;
  grid-template-columns: minmax(215px, 1.9fr) minmax(74px, 0.82fr) 74px minmax(112px, 1.02fr) 92px 28px;
  align-items: center;
  min-width: 680px;
  width: 100%;
}

.reference-table-head {
  min-height: 31px;
  padding: 0 13px 0 26px;
  border-bottom: 1px solid #f1f0f1;
  color: #8b8c91;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.reference-table-head > span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 3px;
}

.reference-sort {
  width: 10px;
  height: 10px;
  opacity: 0.45;
}

.reference-table {
  min-width: 680px;
  width: 100%;
}

.reference-row {
  position: relative;
  min-height: 64px;
  padding: 0 13px 0 26px;
  border: 0;
  border-bottom: 1px solid #f0eff0;
  background: #fff;
  color: inherit;
  text-align: left;
}

.reference-row::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: transparent;
  content: "";
}

.reference-row:hover {
  background: #fffafa;
}

.reference-row.is-selected {
  background: linear-gradient(90deg, #fff5f3, #fffdfd);
}

.reference-row.is-selected::before {
  background: var(--reference-red);
}

.reference-row-cell {
  min-width: 0;
  padding: 7px 4px;
}

.reference-recipe-main {
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.reference-recipe-thumb {
  width: 47px;
  height: 47px;
  overflow: hidden;
  border-radius: 6px;
  background: #f2efec;
}

.reference-recipe-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-recipe-title {
  overflow: hidden;
  color: #28292d;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.reference-cell-text {
  overflow: hidden;
  color: #68696e;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-cell-date {
  display: grid;
  gap: 2px;
}

.reference-cell-date strong,
.reference-cell-date span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-cell-date strong {
  color: #65666b;
  font-size: 10px;
  font-weight: 600;
}

.reference-cell-date span {
  color: #919297;
  font-size: 9px;
}

.reference-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.reference-status.is-ready {
  background: #e4f6df;
  color: #3b9b42;
}

.reference-status.is-review {
  background: #e7f0ff;
  color: #3578ce;
}

.reference-status.is-draft {
  background: #f2f2f3;
  color: #7a7b80;
}

.reference-row-menu {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
}

.reference-row-menu:hover {
  background: #f3f2f2;
}

.reference-row-menu img {
  width: 16px;
  height: 16px;
  opacity: 0.63;
}

.reference-pagination {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 47px;
  padding: 0 18px;
  border-top: 1px solid #f0eff0;
  color: #7c7d82;
  font-size: 9px;
}

.reference-page-numbers {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-left: auto;
}

.reference-page-numbers button {
  width: 18px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #797a7f;
  font-size: 9px;
}

.reference-page-numbers button.is-current {
  background: #fff0ee;
  color: var(--reference-red);
  font-weight: 800;
}

.reference-inspector {
  grid-column: 3;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--reference-line);
  background: #fff;
}

.reference-inspector-head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 47px;
  padding: 0 14px;
}

.reference-inspector-close,
.reference-inspector-more {
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
}

.reference-inspector-close:hover,
.reference-inspector-more:hover {
  background: #f4f4f4;
}

.reference-inspector-close img,
.reference-inspector-more img {
  width: 16px;
  height: 16px;
  opacity: 0.67;
}

.reference-inspector-title {
  flex: 1;
  overflow: hidden;
  color: #242529;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-inspector-hero {
  position: relative;
  flex: 0 0 auto;
  height: 228px;
  margin: 2px 14px 11px;
  overflow: hidden;
  border-radius: 7px;
  background: #efefef;
}

.reference-inspector-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-detail-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 29px;
  padding: 0 14px;
  border-bottom: 1px solid var(--reference-line);
}

.reference-detail-tabs button {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: #85868b;
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-detail-tabs button.is-active {
  color: var(--reference-red);
  font-weight: 800;
}

.reference-detail-tabs button.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--reference-red);
  content: "";
}

.reference-inspector-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 17px 0;
}

.reference-detail-list {
  display: grid;
  gap: 7px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--reference-line);
}

.reference-detail-pair {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(94px, 1.1fr);
  gap: 12px;
  color: #6e6f74;
  font-size: 9px;
}

.reference-detail-pair strong {
  overflow: hidden;
  color: #5e5f64;
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-detail-status {
  display: inline-flex;
  width: fit-content;
  margin-left: auto;
}

.reference-ingredients {
  padding: 13px 0 0;
}

.reference-ingredients-head {
  display: grid;
  grid-template-columns: 1fr auto 89px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.reference-ingredients-head h3 {
  margin: 0;
  color: #343539;
  font-size: 11px;
  font-weight: 800;
}

.reference-ingredients-count {
  color: var(--reference-green);
  font-size: 9px;
  font-weight: 800;
}

.reference-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeeef;
}

.reference-progress span {
  display: block;
  width: var(--reference-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: #2a8e2d;
}

.reference-ingredient-row {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: #5e5f64;
  font-size: 9px;
}

.reference-ingredient-row img {
  width: 14px;
  height: 14px;
}

.reference-ingredient-row.is-done img {
  filter: invert(47%) sepia(82%) saturate(576%) hue-rotate(72deg) brightness(81%) contrast(91%);
}

.reference-ingredient-name,
.reference-ingredient-amount {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-ingredient-amount {
  color: #6d6e73;
}

.reference-tab-panel {
  color: #66676d;
  font-size: 10px;
  line-height: 1.55;
}

.reference-tab-panel h3 {
  margin: 0 0 9px;
  color: #343539;
  font-size: 11px;
}

.reference-tab-panel p {
  margin: 0;
}

.reference-inspector-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-top: 1px solid var(--reference-line);
}

.reference-open-complete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--reference-red);
  font-size: 9px;
  font-weight: 750;
}

.reference-open-complete img {
  width: 13px;
  height: 13px;
  filter: invert(38%) sepia(74%) saturate(2061%) hue-rotate(338deg) brightness(102%) contrast(84%);
}

.reference-empty {
  display: grid;
  min-height: 310px;
  place-items: center;
  padding: 30px;
  color: #797a7f;
  font-size: 12px;
  text-align: center;
}

.reference-empty-content {
  display: grid;
  justify-items: center;
  max-width: 290px;
  gap: 8px;
}

.reference-empty-title {
  color: #303135;
  font-size: 15px;
  font-weight: 780;
}

.reference-empty-copy {
  color: #77787d;
  line-height: 1.5;
}

.reference-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.reference-empty-action {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #e3dfdc;
  border-radius: 6px;
  background: #fff;
  color: #303135;
  font: inherit;
  font-weight: 760;
}

.reference-empty-action.is-primary {
  border-color: var(--reference-red);
  background: var(--reference-red);
  color: #fff;
  box-shadow: 0 7px 14px rgba(232, 71, 57, 0.16);
}

.reference-empty-action:hover {
  border-color: #cac4c0;
  background: #faf9f8;
}

.reference-empty-action.is-primary:hover {
  border-color: #d63e32;
  background: #d63e32;
}

.reference-table-head[hidden],
.reference-pagination[hidden],
.reference-inspector-hero[hidden],
.reference-detail-tabs[hidden],
.reference-inspector-foot[hidden] {
  display: none !important;
}

.reference-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .reference-shell {
    grid-template-columns: 136px minmax(470px, 1fr) minmax(290px, 322px);
  }

  .reference-topbar {
    grid-template-columns: minmax(92px, 1fr) minmax(210px, 300px) auto auto auto;
    gap: 8px;
    padding-inline: 11px;
  }

  .reference-table-head,
  .reference-row,
  .reference-table {
    min-width: 630px;
  }

  .reference-table-head,
  .reference-row {
    grid-template-columns: minmax(205px, 1.8fr) 72px 65px minmax(100px, 0.92fr) 82px 25px;
    padding-left: 18px;
  }

  .reference-inspector-hero {
    height: 205px;
  }
}

@media (max-width: 860px) {
  body.reference-shell-active {
    overflow: auto;
    background: #fff;
  }

  .reference-shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: auto;
    min-height: 100vh;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .reference-sidebar {
    position: fixed;
    z-index: 8;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 60px;
    border-top: 1px solid var(--reference-line);
    border-right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
  }

  .reference-brand,
  .reference-sidebar-footer {
    display: none;
  }

  .reference-nav {
    display: contents;
    padding: 0;
  }

  .reference-nav-item {
    display: grid;
    min-height: 60px;
    place-content: center;
    gap: 3px;
    padding: 5px 3px;
    border-radius: 0;
    font-size: 9px;
    text-align: center;
  }

  .reference-nav-item:nth-child(n + 6) {
    display: none;
  }

  .reference-nav-item.is-active::before {
    top: 0;
    right: 12px;
    bottom: auto;
    left: 12px;
    width: auto;
    height: 2px;
    border-radius: 0 0 2px 2px;
  }

  .reference-nav-icon {
    width: 17px;
    height: 17px;
    margin: 0 auto;
  }

  .reference-topbar {
    position: sticky;
    z-index: 4;
    top: 0;
    display: grid;
    grid-column: auto;
    width: 100%;
    flex: 0 0 auto;
    grid-template-columns: 1fr auto auto;
    gap: 9px;
    min-height: 56px;
    padding: 0 14px;
  }

  .reference-page-title {
    font-size: 15px;
  }

  .reference-search {
    grid-column: 1 / span 3;
    grid-row: 2;
    margin-bottom: 11px;
  }

  .reference-search-shortcut,
  .reference-avatar-chevron,
  .reference-avatar {
    display: none;
  }

  .reference-primary-action {
    height: 31px;
    padding: 0 10px;
    font-size: 10px;
  }

  .reference-recipes {
    grid-column: auto;
    width: 100%;
    flex: 1 1 auto;
    overflow: visible;
    padding-bottom: 60px;
  }

  .reference-recipes-toolbar {
    position: sticky;
    z-index: 3;
    top: 102px;
    background: #fff;
  }

  .reference-table-head {
    display: none;
  }

  .reference-table,
  .reference-row {
    min-width: 0;
  }

  .reference-row {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 73px;
    padding: 0 12px 0 16px;
  }

  .reference-row > :nth-child(2),
  .reference-row > :nth-child(3),
  .reference-row > :nth-child(4) {
    display: none;
  }

  .reference-recipe-main {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 11px;
  }

  .reference-recipe-thumb {
    width: 52px;
    height: 52px;
  }

  .reference-recipe-title {
    font-size: 12px;
  }

  .reference-row-cell.reference-status-cell {
    display: none;
  }

  .reference-row-menu {
    display: none;
  }

  .reference-inspector {
    display: none;
  }
}

@media (max-width: 500px) {
  .reference-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .reference-search {
    grid-column: 1 / span 2;
  }

  .reference-primary-action span {
    display: none;
  }

  .reference-primary-action {
    width: 34px;
    padding: 0;
  }

  .reference-primary-action .reference-button-icon {
    width: 16px;
    height: 16px;
  }
}

/* Unified Cooksy workspaces: the existing import, editor and account flows
   keep their behavior, but now live inside the same application frame. */
body.reference-shell-active.cooksy-legacy-flow .reference-recipes,
body.reference-shell-active.cooksy-legacy-flow .reference-inspector {
  display: none !important;
}

body.reference-shell-active.cooksy-legacy-flow .reference-shell {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  z-index: 20;
}

body.reference-shell-active.cooksy-legacy-flow .app {
  position: fixed;
  z-index: 21;
  top: 48px;
  right: 0;
  bottom: 0;
  left: 150px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  background: #f8f8f8;
  color: #242529;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body.reference-shell-active.cooksy-legacy-flow .app > #mainGrid {
  min-height: 100%;
  padding: 28px clamp(20px, 3vw, 46px) 40px;
  background: #f8f8f8;
}

body.reference-shell-active.cooksy-legacy-flow .app .desktopStartPanel,
body.reference-shell-active.cooksy-legacy-flow .app .appLegalFooter {
  display: none !important;
}

body.reference-shell-active.cooksy-new-recipe-flow .app .inputWorkspace {
  display: none !important;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .inputWorkspace {
  display: none !important;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .previewWorkspace > .cardHeader {
  display: none;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .previewWorkspace {
  padding-top: 18px;
}

body.reference-shell-active.cooksy-legacy-flow .app .recipeAlternativeTools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
}

body.reference-shell-active.cooksy-legacy-flow .app .recipeAlternativeLabel {
  color: #4f4b49;
  font-size: 12px;
  font-weight: 720;
}

body.reference-shell-active.cooksy-legacy-flow .app .recipeAlternativeTools .smartSubFilter {
  min-width: 176px;
}

/* A recipe stays an editor, but its structure should feel like a workspace. */
body.reference-shell-active.cooksy-recipe-editor-flow .app .previewWorkspace {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app #recipePreviewEditor {
  display: grid;
  gap: 26px;
  padding: 0;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeStudioHeader {
  padding: 2px 0 20px;
  border-bottom: 1px solid #e7e1dd;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .previewTitle {
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  color: #242529;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 38px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.13;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .previewTitle:focus {
  color: #d94135;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeStudioLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(254px, 286px);
  align-items: start;
  gap: 28px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeStudioMain {
  min-width: 0;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorCanvas {
  display: grid;
  grid-template-columns: minmax(242px, 0.76fr) minmax(0, 1.24fr);
  min-height: 478px;
  overflow: hidden;
  border: 1px solid #e5dfda;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(47, 39, 35, 0.045);
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorCanvas .previewBox {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeIngredientPanel {
  border-right: 1px solid #ebe5e1 !important;
  background: #fffdfa !important;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeStepsPanel {
  background: #fff !important;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorSectionHeader {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 0 22px;
  border-bottom: 1px solid #eee8e4;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorCanvas .previewBoxTitle,
body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferencesPanel .previewBoxTitle,
body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEquipmentBox .previewBoxTitle,
body.reference-shell-active.cooksy-recipe-editor-flow .app .stackTables .previewBoxTitle {
  margin: 0;
  color: #292725;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.2;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorCanvas textarea.previewBoxBody {
  display: block;
  width: 100% !important;
  min-height: 414px !important;
  height: calc(100% - 62px);
  margin: 0;
  padding: 20px 22px !important;
  border: 0 !important;
  border-radius: 0;
  outline: none !important;
  background: transparent !important;
  box-shadow: none;
  color: #3b3836;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  font-weight: 450;
  line-height: 1.72;
  resize: vertical !important;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorCanvas textarea.previewBoxBody:focus {
  background: #fffefd !important;
  box-shadow: inset 3px 0 0 #e84739;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorCanvas textarea.previewBoxBody::placeholder {
  color: #a49b96;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeInfoRail {
  min-width: 0;
  padding-left: 24px;
  border-left: 1px solid #e7e1dd;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeInfoRailHeader {
  margin: 2px 0 10px;
  color: #625c58;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 760;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeMetaRow {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid #e8e2de;
  background: transparent;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeMetaRow .metaField {
  min-height: 64px;
  padding: 11px 0 10px;
  border: 0;
  border-bottom: 1px solid #ece6e2;
  border-radius: 0;
  background: transparent;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeMetaRow .metaField:focus-within {
  background: #fff8f6;
  box-shadow: inset 2px 0 0 #e84739;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeMetaRow .metaLabel {
  margin-bottom: 3px;
  color: #827a76;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeMetaRow .metaInput {
  width: 100%;
  min-height: 25px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  color: #302e2c;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 650;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeMetaRow select.metaInput {
  cursor: pointer;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .metaFieldServings {
  min-height: 102px !important;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .portionScaleControls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px 62px;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .portionScaleLabel {
  min-width: 0;
  overflow: hidden;
  color: #756e69;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .portionScaleControls .portionScaleInput {
  min-width: 0;
  min-height: 30px;
  padding: 3px 5px;
  border: 1px solid #ded7d2;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .portionScaleControls .btn {
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid #efc6c1;
  border-radius: 6px;
  background: #fff6f4;
  box-shadow: none;
  color: #c94035;
  font-size: 12px;
  font-weight: 700;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEquipmentBox {
  min-width: 0;
  margin-top: 20px;
  padding-top: 19px;
  border-top: 1px solid #e8e2de;
  background: transparent;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEquipmentBox .previewBoxTitle {
  margin-bottom: 9px;
  font-size: 14px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEquipmentBox .previewBoxBody {
  min-height: 72px;
  padding: 0;
  outline: none;
  color: #4b4642;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.58;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEquipmentBox .previewBoxBody:focus {
  color: #2f2c2a;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferencesPanel {
  overflow: hidden;
  padding: 0;
  border: 1px solid #e5dfda;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(47, 39, 35, 0.035);
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferencesHeader {
  padding: 19px 22px 0;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferenceColumns {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  margin-top: 16px;
  border-bottom: 1px solid #eee8e4;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferenceGroup {
  min-width: 0;
  padding: 0 22px 20px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferenceGroup + .recipePreferenceGroup {
  border-left: 1px solid #eee8e4;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferenceGroupTitle {
  color: #716965;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 720;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .dietRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .chk {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #e5ded9;
  border-radius: 18px;
  background: #fdfcfb;
  color: #56504c;
  cursor: pointer;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .chk:has(input:checked) {
  border-color: #b8d9bf;
  background: #eff8f0;
  color: #28623a;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .chk input {
  width: 14px;
  height: 14px;
  margin: 0 6px 0 0;
  accent-color: #37904f;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAlternativeTools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 22px;
  border-bottom: 1px solid #eee8e4;
  background: #faf8f6;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAlternativeCopy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAlternativeLabel {
  color: #625b57;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 720;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAlternativeHint {
  overflow: hidden;
  color: #746c67;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAlternativeActions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app #btnSmartSubGenerate,
body.reference-shell-active.cooksy-recipe-editor-flow .app #btnSmartSubApply {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app #btnSmartSubGenerate {
  border: 1px solid #ddd5d0;
  background: #fff;
  color: #494441;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app #btnSmartSubApply {
  border: 1px solid #e84739;
  background: #e84739;
  color: #fff;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app #btnSmartSubGenerate:disabled,
body.reference-shell-active.cooksy-recipe-editor-flow .app #btnSmartSubApply:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubPanel {
  margin: 0 22px 18px;
  padding: 14px 16px;
  border: 1px solid #eadfda;
  border-left: 3px solid #e84739;
  border-radius: 7px;
  background: #fffaf8;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubPanel[hidden] {
  display: none !important;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubTitle {
  color: #302c2a;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 760;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubSummary,
body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubEmpty {
  margin-top: 4px;
  color: #746c67;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.48;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubList {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubItem {
  padding: 9px 10px;
  border: 1px solid #eee5e1;
  border-radius: 6px;
  background: #fff;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubLine {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  color: #3d3835;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubFrom {
  color: #6e6661;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubArrow {
  color: #e84739;
  font-weight: 800;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubTo {
  color: #2f2b29;
  font-weight: 760;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubChoices {
  margin-top: 4px;
  color: #817873;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.42;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAllergenNotes {
  padding: 16px 22px 18px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAllergenNotes .previewBoxBody {
  min-height: 52px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  background: #faf8f6;
  color: #4b4642;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.58;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAllergenNotes .previewBoxBody:focus {
  border-color: #e4bbb6;
  background: #fff;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .stackTables {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .stackTables .previewBox {
  overflow: hidden;
  padding: 20px;
  border: 1px solid #e5dfda;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(47, 39, 35, 0.03);
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .stackTables .previewBoxTitle {
  margin-bottom: 12px;
}

body.reference-shell-active.cooksy-recipe-editor-flow .app .stackTables .muted {
  margin: 0 0 12px !important;
}

@media (max-width: 1120px) {
  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeStudioLayout {
    grid-template-columns: 1fr;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeInfoRail {
    padding: 20px 0 0;
    border-top: 1px solid #e7e1dd;
    border-left: 0;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeMetaRow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 18px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .metaFieldServings {
    grid-column: span 2;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEquipmentBox {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    column-gap: 18px;
    align-items: start;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEquipmentBox .previewBoxTitle {
    margin: 0;
  }
}

@media (max-width: 780px) {
  body.reference-shell-active.cooksy-recipe-editor-flow .app #recipePreviewEditor {
    gap: 20px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorCanvas {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeIngredientPanel {
    border-right: 0 !important;
    border-bottom: 1px solid #ebe5e1 !important;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorCanvas textarea.previewBoxBody {
    min-height: 300px !important;
    height: auto;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeMetaRow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .metaFieldServings {
    grid-column: span 2;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferenceColumns {
    grid-template-columns: 1fr;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferenceGroup + .recipePreferenceGroup {
    padding-top: 18px;
    border-top: 1px solid #eee8e4;
    border-left: 0;
  }
}

@media (max-width: 620px) {
  body.reference-shell-active.cooksy-recipe-editor-flow .app .previewTitle {
    font-size: 29px;
    line-height: 1.16;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeStudioHeader {
    padding-bottom: 16px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorSectionHeader {
    min-height: 56px;
    padding: 0 16px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEditorCanvas textarea.previewBoxBody {
    min-height: 270px !important;
    padding: 16px !important;
    font-size: 14px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeMetaRow {
    column-gap: 12px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .portionScaleControls {
    grid-template-columns: minmax(0, 1fr) 60px 62px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEquipmentBox {
    display: block;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeEquipmentBox .previewBoxTitle {
    margin-bottom: 8px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferencesHeader,
  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipePreferenceGroup,
  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAllergenNotes {
    padding-right: 16px;
    padding-left: 16px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAlternativeTools {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 14px 16px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAlternativeHint {
    overflow: visible;
    white-space: normal;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAlternativeActions {
    width: 100%;
    justify-content: stretch;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeAlternativeActions .btn {
    flex: 1 1 0;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .recipeSmartSubPanel {
    margin-right: 16px;
    margin-left: 16px;
  }

  body.reference-shell-active.cooksy-recipe-editor-flow .app .stackTables .previewBox {
    padding: 16px;
  }
}

body.reference-shell-active.cooksy-new-recipe-flow .app .previewHeaderActions {
  display: none !important;
}

body.reference-shell-active.cooksy-new-recipe-flow .app .previewTitle {
  min-height: 52px;
  font-size: 26px;
  font-weight: 750;
}

body.reference-shell-active.cooksy-legacy-flow .app .card,
body.reference-shell-active.cooksy-legacy-flow .app .inputWorkspace,
body.reference-shell-active.cooksy-legacy-flow .app .previewWorkspace {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #e8e5e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(25, 25, 25, 0.05);
}

body.reference-shell-active.cooksy-legacy-flow .app .cardHeader {
  align-items: flex-start;
  gap: 16px;
  min-height: 54px;
  margin: 0 0 20px;
  padding: 0 0 16px;
  border-color: #ebe9e7;
}

body.reference-shell-active.cooksy-legacy-flow .app .cardTitle,
body.reference-shell-active.cooksy-legacy-flow .app .previewTitle {
  color: #202124;
  font-size: 24px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

body.reference-shell-active.cooksy-legacy-flow .app .cardHint,
body.reference-shell-active.cooksy-legacy-flow .app .previewMeta,
body.reference-shell-active.cooksy-legacy-flow .app .fieldHint,
body.reference-shell-active.cooksy-legacy-flow .app .missingHint {
  color: #77716e;
  font-size: 13px;
  line-height: 1.45;
}

body.reference-shell-active.cooksy-legacy-flow .app .btn {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #e1ddda;
  border-radius: 6px;
  background: #fff;
  color: #292a2d;
  box-shadow: 0 4px 12px rgba(25, 25, 25, 0.05);
  font-size: 13px;
  font-weight: 700;
}

body.reference-shell-active.cooksy-legacy-flow .app .btn:hover:not(:disabled) {
  border-color: #cfc9c5;
  background: #fafafa;
  box-shadow: 0 7px 18px rgba(25, 25, 25, 0.08);
  transform: translateY(-1px);
}

body.reference-shell-active.cooksy-legacy-flow .app .btn.primary {
  border-color: #df4135;
  background: #e84739;
  color: #fff;
  box-shadow: 0 8px 18px rgba(225, 63, 52, 0.19);
}

body.reference-shell-active.cooksy-legacy-flow .app .btn.primary:hover:not(:disabled) {
  border-color: #ce352a;
  background: #d93d30;
}

body.reference-shell-active.cooksy-legacy-flow .app .btn.subtle,
body.reference-shell-active.cooksy-legacy-flow .app .btn.secondary {
  background: #fff;
  color: #4f4b49;
}

body.reference-shell-active.cooksy-legacy-flow .app .btn.danger {
  border-color: #f0c9c4;
  color: #bf372d;
  background: #fffafa;
}

body.reference-shell-active.cooksy-legacy-flow .app .importMethodPicker {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.reference-shell-active.cooksy-legacy-flow .app .importMethod {
  min-height: 86px;
  padding: 14px;
  border-color: #e7e2df;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

body.reference-shell-active.cooksy-legacy-flow .app .importMethod:hover {
  border-color: #d5cfcb;
  background: #fdfcfb;
}

body.reference-shell-active.cooksy-legacy-flow .app .importMethodInput:checked + .importMethod {
  border-color: #ec766c;
  background: #fff5f3;
  box-shadow: inset 3px 0 0 #e84739;
}

body.reference-shell-active.cooksy-legacy-flow .app .importMethodInput:checked + .importMethod strong {
  color: #c93b31;
}

body.reference-shell-active.cooksy-legacy-flow .app .importRoute {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #ece8e5;
  border-radius: 8px;
  background: #fcfcfc;
}

body.reference-shell-active.cooksy-legacy-flow .app .importRouteCopy strong {
  color: #252629;
  font-size: 18px;
}

body.reference-shell-active.cooksy-legacy-flow .app .importRouteCopy span {
  color: #77716e;
}

body.reference-shell-active.cooksy-legacy-flow .app .importPrimaryButton {
  min-height: 40px;
  margin-top: 14px;
}

body.reference-shell-active.cooksy-legacy-flow .app .importSelectionPanel,
body.reference-shell-active.cooksy-legacy-flow .app .importFolderWork,
body.reference-shell-active.cooksy-legacy-flow .app .importProgressPanel,
body.reference-shell-active.cooksy-legacy-flow .app .importDetails,
body.reference-shell-active.cooksy-legacy-flow .app .missingPanel,
body.reference-shell-active.cooksy-legacy-flow .app .previewBox {
  border-color: #e8e5e3;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

body.reference-shell-active.cooksy-legacy-flow .app .fileList,
body.reference-shell-active.cooksy-legacy-flow .app .log,
body.reference-shell-active.cooksy-legacy-flow .app .logList {
  border-color: #e9e5e2;
  border-radius: 7px;
  background: #fafafa;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body.reference-shell-active.cooksy-legacy-flow .app input,
body.reference-shell-active.cooksy-legacy-flow .app textarea,
body.reference-shell-active.cooksy-legacy-flow .app select,
body.reference-shell-active.cooksy-legacy-flow .app .metaInput,
body.reference-shell-active.cooksy-legacy-flow .app .dtInput {
  border: 1px solid #dfdbd8;
  border-radius: 6px;
  background: #fff;
  color: #292a2d;
  box-shadow: none;
}

body.reference-shell-active.cooksy-legacy-flow .app input:focus,
body.reference-shell-active.cooksy-legacy-flow .app textarea:focus,
body.reference-shell-active.cooksy-legacy-flow .app select:focus,
body.reference-shell-active.cooksy-legacy-flow .app .metaInput:focus,
body.reference-shell-active.cooksy-legacy-flow .app .dtInput:focus {
  outline: 3px solid rgba(232, 71, 57, 0.13);
  border-color: #e56b61;
}

body.reference-shell-active.cooksy-legacy-flow .app .previewCols,
body.reference-shell-active.cooksy-legacy-flow .app .accountGrid {
  gap: 14px;
}

body.reference-shell-active.cooksy-legacy-flow .app .previewBox {
  padding: 16px;
}

body.reference-shell-active.cooksy-legacy-flow .app .previewBoxTitle,
body.reference-shell-active.cooksy-legacy-flow .app .accountSectionTitle {
  color: #252629;
  font-size: 15px;
  font-weight: 760;
}

body.reference-shell-active.cooksy-legacy-flow .app .metaRow {
  gap: 9px;
}

body.reference-shell-active.cooksy-legacy-flow .app .metaField {
  padding: 9px 10px;
  border-color: #e7e3e0;
  border-radius: 7px;
  background: #fafafa;
}

body.reference-shell-active.cooksy-legacy-flow .app .metaLabel,
body.reference-shell-active.cooksy-legacy-flow .app .label {
  color: #736d69;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.reference-shell-active .modalBackdrop {
  background: rgba(10, 10, 12, 0.48);
  backdrop-filter: blur(3px);
}

body.reference-shell-active .modalPanel,
body.reference-shell-active .accountPanel {
  border: 1px solid #e6e2df;
  border-radius: 9px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

body.reference-shell-active .modalHeader {
  min-height: 58px;
  padding: 12px 18px;
  border-color: #ebe8e5;
  background: #fff;
}

body.reference-shell-active .modalTitle {
  color: #222326;
  font-size: 18px;
  font-weight: 760;
}

body.reference-shell-active .modalBody {
  padding: 18px;
  background: #fafafa;
}

body.reference-shell-active .accountPanel .modalBody,
body.reference-shell-active .accountBody {
  background: #fafafa;
}

body.reference-shell-active .accountSection {
  padding: 16px;
  border-color: #e6e1de;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

body.reference-shell-active .accountHero,
body.reference-shell-active .accountPasskeyBox {
  border-color: #e6e1de;
  border-radius: 8px;
  background: #fff;
}

/* L'account vive nello stesso spazio di lavoro: non e' una finestra separata. */
body.reference-shell-active.cooksy-legacy-flow .accountModal:not(.hidden) {
  position: fixed;
  z-index: 30;
  inset: 58px 10px 10px 160px;
  display: block;
  background: #fafafa;
}

body.reference-shell-active.cooksy-legacy-flow .accountModal .modalBackdrop {
  display: none;
}

body.reference-shell-active.cooksy-legacy-flow .accountModal .accountPanel {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: #fafafa;
  box-shadow: none;
}

body.reference-shell-active.cooksy-legacy-flow .accountModal .modalHeader {
  min-height: 74px;
  padding: 16px max(28px, 4vw);
  border-bottom-color: #e8e5e3;
  background: #fff;
}

body.reference-shell-active.cooksy-legacy-flow .accountModal .modalTitle {
  font-size: 24px;
  font-weight: 760;
}

body.reference-shell-active.cooksy-legacy-flow .accountModal .modalBody {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 30px clamp(24px, 4vw, 48px) 48px;
  background: #fafafa;
}

body.reference-shell-active.cooksy-legacy-flow .accountModal .accountSection {
  padding: 20px;
}

body.reference-shell-active.cooksy-legacy-flow .accountModal input[type="file"].metaInput {
  min-height: 42px;
  padding: 5px 8px;
}

body.reference-shell-active.cooksy-legacy-flow .accountModal input[type="file"].metaInput::file-selector-button {
  height: 30px;
  margin-right: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 5px;
  background: #f2efed;
  color: #252629;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

body.reference-shell-active .accountAvatar {
  border-radius: 8px;
  background: #fff5f3;
}

body.reference-shell-active .accountBadge {
  border-radius: 999px;
}

@media (max-width: 860px) {
  body.reference-shell-active.cooksy-legacy-flow {
    overflow: auto;
    background: #fff;
  }

  body.reference-shell-active.cooksy-legacy-flow .reference-shell {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: auto;
    min-height: 102px;
    overflow: visible;
  }

  body.reference-shell-active.cooksy-legacy-flow .reference-topbar {
    grid-column: auto;
    width: 100%;
    flex: 0 0 auto;
  }

  body.reference-shell-active.cooksy-legacy-flow .reference-sidebar {
    display: grid;
  }

  body.reference-shell-active.cooksy-legacy-flow .app {
    position: relative;
    z-index: 1;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    min-height: calc(100vh - 162px);
    overflow: visible;
  }

  body.reference-shell-active.cooksy-legacy-flow .app > #mainGrid {
    padding: 18px 12px 82px;
  }

  body.reference-shell-active.cooksy-legacy-flow .app .card,
  body.reference-shell-active.cooksy-legacy-flow .app .inputWorkspace,
  body.reference-shell-active.cooksy-legacy-flow .app .previewWorkspace {
    padding: 16px;
  }

  body.reference-shell-active.cooksy-legacy-flow .app .importMethodPicker {
    grid-template-columns: 1fr;
  }

  body.reference-shell-active.cooksy-legacy-flow .accountModal:not(.hidden) {
    inset: 0 0 60px;
  }

  body.reference-shell-active.cooksy-legacy-flow .accountModal .modalHeader {
    min-height: 58px;
    padding: 11px 16px;
  }

  body.reference-shell-active.cooksy-legacy-flow .accountModal .modalBody {
    padding: 18px 14px 28px;
  }
}

/* Keep the recipe studio independent from the legacy import surface. */
body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .previewWorkspace {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .previewTitle {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #242529;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 38px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.13;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid #e8e2de;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow .metaField {
  min-height: 64px;
  padding: 11px 0 10px;
  border: 0;
  border-bottom: 1px solid #ece6e2;
  border-radius: 0;
  background: transparent;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow .metaLabel {
  margin-bottom: 3px;
  color: #827a76;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow .metaInput {
  width: 100%;
  min-height: 25px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #302e2c;
  font-size: 14px;
  font-weight: 650;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .portionScaleControls .portionScaleInput {
  min-height: 30px;
  padding: 3px 5px;
  border: 1px solid #ded7d2;
  border-radius: 6px;
  background: #fff;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeEquipmentBox {
  min-width: 0;
  margin-top: 20px;
  padding: 19px 0 0;
  border: 0;
  border-top: 1px solid #e8e2de;
  border-radius: 0;
  background: transparent;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeEquipmentBox .previewBoxTitle {
  margin: 0 0 9px;
  color: #292725;
  font-size: 14px;
  font-weight: 760;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeEquipmentBox .previewBoxBody {
  min-height: 72px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4b4642;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.58;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipePreferencesPanel {
  padding: 0;
  border: 1px solid #e5dfda;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(47, 39, 35, 0.035);
}

@media (max-width: 1120px) {
  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 18px;
  }
}

@media (max-width: 780px) {
  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }
}

/* Small visual cues keep the editor expressive without changing its workflow. */
body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepsEditor {
  position: relative;
  min-height: 414px;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepList {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 414px;
  max-height: 414px;
  margin: 0;
  padding: 20px 22px;
  overflow: auto;
  counter-reset: recipe-step;
  list-style: none;
  background: #fff;
  cursor: text;
  scrollbar-color: #c7bdb8 transparent;
  scrollbar-width: thin;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepList:focus-visible {
  outline: 2px solid #e84739;
  outline-offset: -3px;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepList li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  counter-increment: recipe-step;
  color: #3b3836;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.62;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepList li::before {
  content: counter(recipe-step, decimal-leading-zero);
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #f1c7c1;
  border-radius: 8px;
  background: #fff2ef;
  color: #cf4639;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepsEditor:not(.is-editing) textarea.previewBoxBody {
  position: absolute !important;
  width: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepsEditor.is-editing .recipeStepList {
  display: none;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepsEditor.is-editing textarea.previewBoxBody {
  display: block;
  min-height: 414px !important;
  height: 414px !important;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip {
  --preference-color: #6c665f;
  --preference-bg: #f4f1ee;
  position: relative;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px 0 7px;
  border-radius: 9px;
  background: #fff;
  color: #4f4a47;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChipMark {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 7px;
  background: var(--preference-bg);
  color: var(--preference-color);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChipMark::after {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--preference-color);
  content: "";
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 140ms ease, transform 140ms ease;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChipText {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.15;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip:has(input:checked) {
  border-color: color-mix(in srgb, var(--preference-color) 45%, #fff);
  background: color-mix(in srgb, var(--preference-bg) 78%, #fff);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--preference-color) 13%, transparent);
  color: #35312e;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip:has(input:checked) .preferenceChipMark::after {
  opacity: 1;
  transform: scale(1);
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip:focus-within {
  border-color: var(--preference-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--preference-color) 17%, transparent);
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--vegetarian,
body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--vegan {
  --preference-color: #2f8754;
  --preference-bg: #eaf6ee;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--gluten {
  --preference-color: #a76a20;
  --preference-bg: #fdf2dc;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--lactose {
  --preference-color: #357ab0;
  --preference-bg: #eaf4fb;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--egg {
  --preference-color: #bd7134;
  --preference-bg: #fff1e4;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--nut,
body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--peanut {
  --preference-color: #9b5c35;
  --preference-bg: #f9eee7;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--soy {
  --preference-color: #7a6b47;
  --preference-bg: #f5f1e5;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--fish,
body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--shellfish {
  --preference-color: #327a88;
  --preference-bg: #e8f5f5;
}

@media (max-width: 780px) {
  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepsEditor,
  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepList {
    min-height: 300px;
  }

  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepList {
    max-height: 300px;
  }

  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepsEditor.is-editing textarea.previewBoxBody {
    min-height: 300px !important;
    height: 300px !important;
  }
}

@media (max-width: 620px) {
  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepsEditor,
  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepList {
    min-height: 270px;
  }

  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepList {
    max-height: 270px;
    padding: 16px;
  }

  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepList li {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
    font-size: 13px;
  }

  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepList li::before {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStepsEditor.is-editing textarea.previewBoxBody {
    min-height: 270px !important;
    height: 270px !important;
  }
}

/* Make dietary choices immediately recognizable, even before reading the label. */
body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChipMark {
  font-size: 0;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChipMark::before {
  display: block;
  width: 15px;
  height: 15px;
  background: currentColor;
  content: "";
  -webkit-mask: var(--preference-icon) center / contain no-repeat;
  mask: var(--preference-icon) center / contain no-repeat;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--vegetarian {
  --preference-icon: url("assets/icons/leaf.svg");
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--vegan {
  --preference-icon: url("assets/icons/sprout.svg");
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--gluten {
  --preference-icon: url("assets/icons/wheat-off.svg");
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--lactose {
  --preference-icon: url("assets/icons/milk-off.svg");
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--egg {
  --preference-icon: url("assets/icons/egg-off.svg");
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--nut {
  --preference-icon: url("assets/icons/nut-off.svg");
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--peanut,
body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--soy {
  --preference-icon: url("assets/icons/bean-off.svg");
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--fish {
  --preference-icon: url("assets/icons/fish-off.svg");
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .preferenceChip--shellfish {
  --preference-icon: url("assets/icons/shell.svg");
}

/* The side rail is an active recipe summary, not a faint column of metadata. */
body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStudioLayout {
  grid-template-columns: minmax(0, 1fr) minmax(286px, 308px);
  gap: 24px;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeInfoRail {
  padding: 18px 20px 20px;
  border: 1px solid #e5ded9;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(47, 39, 35, 0.05);
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeInfoRailHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #2f2b28;
  font-size: 16px;
  font-weight: 800;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeInfoRailHeader::before {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #e84739;
  box-shadow: 0 0 0 4px #fff1ee;
  content: "";
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeDataActions {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeCompleteMissingButton,
body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeRecalculateButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 39px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 7px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeCompleteMissingButton {
  border: 1px solid #e84739;
  background: #e84739;
  color: #fff;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeCompleteMissingButton:hover:not(:disabled) {
  border-color: #cf392d;
  background: #cf392d;
  transform: translateY(-1px);
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeRecalculateButton {
  border: 1px solid #efc6c0;
  background: #fff7f5;
  color: #c94134;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeRecalculateButton:hover:not(:disabled) {
  border-color: #e84739;
  background: #fff0ed;
  transform: translateY(-1px);
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeCompleteMissingButton:disabled,
body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeRecalculateButton:disabled {
  cursor: wait;
  opacity: 0.68;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow {
  border-top-color: #e9e2dd;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow .metaField {
  position: relative;
  min-height: 69px;
  padding: 13px 0 12px 12px;
  border-bottom-color: #eee8e4;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow .metaField::before {
  position: absolute;
  top: 17px;
  left: 0;
  width: 3px;
  height: 24px;
  border-radius: 999px;
  background: #f0c8c2;
  content: "";
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow .metaField:focus-within::before {
  background: #e84739;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow .metaLabel {
  margin-bottom: 5px;
  color: #756d68;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeMetaRow .metaInput {
  color: #2d2a28;
  font-size: 15px;
  font-weight: 780;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .metaFieldServings {
  min-height: 111px !important;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeEquipmentBox {
  margin-top: 17px;
  padding: 15px 15px 14px;
  border: 1px solid #ebe4df;
  border-radius: 8px;
  background: #fcfaf8;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeEquipmentBox .previewBoxTitle {
  margin-bottom: 8px;
  color: #3a3532;
  font-size: 13px;
}

body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeEquipmentBox .previewBoxBody {
  color: #4e4844;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 1120px) {
  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeStudioLayout {
    grid-template-columns: 1fr;
  }

  body.reference-shell-active.cooksy-legacy-flow.cooksy-recipe-editor-flow .app .recipeInfoRail {
    padding: 18px 20px 20px;
    border: 1px solid #e5ded9;
  }
}
