html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: #31415c;
  background:
    radial-gradient(circle at top left, rgba(255, 231, 241, 0.72), transparent 34%),
    radial-gradient(circle at top right, rgba(223, 240, 255, 0.78), transparent 30%),
    radial-gradient(circle at bottom center, rgba(255, 245, 222, 0.42), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #fcf8ff 52%, #fffdf8 100%);
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

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

button {
  transition:
    transform 0.14s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.rp-body {
  min-height: 100dvh;
  height: 100dvh;
  padding: 10px;
  overflow: hidden;
}

.rp-shell {
  width: 100%;
  max-width: 1880px;
  height: calc(100dvh - 20px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  overflow: hidden;
}

.rp-narrow {
  max-width: 900px;
  height: auto;
  min-height: unset;
  overflow: visible;
}

.rp-card {
  position: relative;
  min-height: 0;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(191, 208, 232, 0.42);
  border-radius: 24px;
  box-shadow:
    0 18px 42px rgba(82, 106, 145, 0.09),
    inset 0 1px 0 rgba(255,255,255,0.72);
  backdrop-filter: blur(12px);
  padding: 12px;
}

.rp-topbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(0, 2fr);
  gap: 12px;
  align-items: center;
  min-height: 0;
}

.rp-title,
.rp-subtitle {
  margin: 0;
  letter-spacing: -0.02em;
}

.rp-title {
  font-size: clamp(1.4rem, 1.8vw, 2rem);
  line-height: 1.05;
  color: #2d4162;
}

.rp-subtitle {
  font-size: 1rem;
  line-height: 1.1;
  color: #3d5172;
}

.rp-muted {
  color: #6f7f9c;
  margin: 4px 0 0;
  font-size: 0.92rem;
  line-height: 1.25;
}

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

.rp-field {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.rp-field span {
  font-size: 0.82rem;
  color: #7585a4;
  font-weight: 700;
}

.rp-field input {
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 14px;
  border: 1px solid #d8e2f1;
  background: rgba(255,255,255,0.92);
  color: #324764;
  box-shadow: inset 0 1px 2px rgba(60, 88, 130, 0.04);
}

.rp-field input:focus {
  outline: none;
  border-color: #98b8ef;
  box-shadow: 0 0 0 4px rgba(148, 184, 239, 0.18);
}

.rp-button,
.rp-icon-button {
  min-height: 38px;
  border: 1px solid rgba(187, 205, 230, 0.56);
  border-radius: 15px;
  /*padding: 9px 12px;*/
  cursor: pointer;
  line-height: 1.1;
  color: #2a4464;
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: 0 7px 16px rgba(86, 118, 162, 0.10);
}

.rp-button-soft {
  background: linear-gradient(180deg, #fffdfd 0%, #f6f4ff 100%);
}

.rp-button-accent {
  background: linear-gradient(180deg, #ffdbe8 0%, #ffc7dc 100%);
  border-color: rgba(233, 162, 188, 0.65);
  color: #71334f;
}

.rp-button-accent:hover {
  box-shadow: 0 10px 22px rgba(202, 126, 154, 0.18);
}

.rp-icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 1.32rem;
  line-height: 1;
  border-radius: 999px;
}

.rp-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.55fr) minmax(300px, 0.95fr);
  gap: 10px;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

.rp-summary-grid > .rp-card {
  height: 100%;
  overflow: hidden;
}

.rp-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.rp-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4fc 100%);
  border: 1px solid rgba(191, 208, 232, 0.56);
  color: #58708d;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.rp-pill.good {
  background: linear-gradient(180deg, #edfff4 0%, #dff7e8 100%);
  border-color: rgba(143, 210, 164, 0.6);
  color: #2f6a44;
}

.rp-pill.bad {
  background: linear-gradient(180deg, #fff0f2 0%, #ffe3e8 100%);
  border-color: rgba(232, 171, 181, 0.62);
  color: #903e4a;
}

.rp-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  height: calc(100% - 52px);
  overflow: hidden;
}

.rp-day-card {
  --day-bg-top: rgba(245, 249, 255, 0.96);
  --day-bg-bottom: rgba(255, 251, 253, 0.96);
  --day-border: rgba(199, 214, 236, 0.58);
  --day-accent: #b8caef;

  position: relative;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid var(--day-border);
  background: linear-gradient(180deg, var(--day-bg-top) 0%, var(--day-bg-bottom) 100%);
  box-shadow:
    0 10px 22px rgba(95, 120, 164, 0.07),
    inset 0 1px 0 rgba(255,255,255,0.78);
}

.rp-day-card::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 5px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--day-accent) 0%, rgba(255,255,255,0.7) 100%);
}

.rp-day-card:nth-child(1) {
  --day-bg-top: rgba(255, 245, 246, 0.98);
  --day-bg-bottom: rgba(255, 251, 251, 0.98);
  --day-border: rgba(239, 201, 209, 0.72);
  --day-accent: #f2b8c7;
}

.rp-day-card:nth-child(2) {
  --day-bg-top: rgba(255, 248, 239, 0.98);
  --day-bg-bottom: rgba(255, 252, 247, 0.98);
  --day-border: rgba(239, 217, 185, 0.72);
  --day-accent: #f0c48f;
}

.rp-day-card:nth-child(3) {
  --day-bg-top: rgba(248, 251, 236, 0.98);
  --day-bg-bottom: rgba(253, 255, 247, 0.98);
  --day-border: rgba(216, 225, 180, 0.76);
  --day-accent: #cbdc8a;
}

.rp-day-card:nth-child(4) {
  --day-bg-top: rgba(239, 251, 244, 0.98);
  --day-bg-bottom: rgba(249, 255, 252, 0.98);
  --day-border: rgba(188, 227, 207, 0.74);
  --day-accent: #9fd8b6;
}

.rp-day-card:nth-child(5) {
  --day-bg-top: rgba(240, 249, 255, 0.98);
  --day-bg-bottom: rgba(250, 253, 255, 0.98);
  --day-border: rgba(192, 219, 240, 0.76);
  --day-accent: #9ecbef;
}

.rp-day-card:nth-child(6) {
  --day-bg-top: rgba(243, 245, 255, 0.98);
  --day-bg-bottom: rgba(251, 252, 255, 0.98);
  --day-border: rgba(206, 208, 240, 0.78);
  --day-accent: #b9b6ef;
}

.rp-day-card:nth-child(7) {
  --day-bg-top: rgba(250, 243, 255, 0.98);
  --day-bg-bottom: rgba(253, 249, 255, 0.98);
  --day-border: rgba(224, 201, 239, 0.76);
  --day-accent: #d1b2f0;
}

.rp-day-head {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(214, 224, 241, 0.66);
}

.rp-day-name {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.1;
  color: #3c4f6e;
}

.rp-day-date {
  margin: 3px 0 0;
  color: #7b8ba7;
  font-size: 0.80rem;
  font-weight: 700;
}

.rp-day-slots {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}

.rp-slot-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 6px;
  padding: 9px;
  border-radius: 16px;
  border: 1px solid rgba(219, 228, 243, 0.84);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248, 251, 255, 0.96) 100%);
  box-shadow:
    0 8px 18px rgba(84, 107, 145, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.85);
}

.rp-slot-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.rp-slot-type {
  font-weight: 800;
  text-transform: capitalize;
  color: #566987;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.rp-slot-mode {
  font-size: 0.73rem;
  color: #9a84a6;
  text-transform: capitalize;
  font-weight: 700;
}

.rp-slot-title {
  margin: 0;
  font-size: 0.90rem;
  line-height: 1.16;
  color: #314767;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.08em;
}

.rp-slot-summary {
  margin: 0;
  color: #72819a;
  font-size: 0.79rem;
  line-height: 1.22;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.45em;
}

.rp-slot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 0;
}

.rp-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 2px;
  font-size: 0.50rem;
  line-height: 1;
  background: linear-gradient(180deg, #f9fcff 0%, #edf4ff 100%);
  border: 1px solid rgba(206, 220, 241, 0.78);
  color: #587090;
}

.rp-slot-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.rp-slot-actions .rp-button {
  min-width: 0;
  min-height: 32px;
  /*padding: 7px 6px;*/
  font-size: 0.75rem;
  border-radius: 12px;
}

.rp-slot-custom {
  background: linear-gradient(180deg, #ffffff 0%, #eefbff 100%);
}

.rp-slot-default {
  background: linear-gradient(180deg, #fffdf3 0%, #fff4cf 100%);
  border-color: rgba(232, 211, 141, 0.72);
  color: #6e5b19;
}

.rp-slot-title-button.is-custom,
.rp-slot-title-button.is-empty {
  cursor: pointer;
}

.rp-shopping-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: calc(100% - 52px);
  overflow: auto;
  padding-right: 4px;
}

.rp-shopping-list::-webkit-scrollbar,
.rp-recipe-results::-webkit-scrollbar {
  width: 9px;
}

.rp-shopping-list::-webkit-scrollbar-thumb,
.rp-recipe-results::-webkit-scrollbar-thumb {
  background: rgba(176, 191, 217, 0.9);
  border-radius: 999px;
}

.rp-shopping-list::-webkit-scrollbar-track,
.rp-recipe-results::-webkit-scrollbar-track {
  background: rgba(236, 242, 251, 0.78);
  border-radius: 999px;
}

.rp-shopping-group {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0%, rgba(255, 250, 253, 0.96) 100%);
  border-radius: 18px;
  border: 1px solid rgba(216, 226, 241, 0.68);
  padding: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

.rp-shopping-group h3 {
  margin: 0 0 8px;
  font-size: 0.94rem;
  text-transform: capitalize;
  color: #46607f;
}

.rp-shopping-group ul {
  margin: 0;
  padding-left: 18px;
}

.rp-shopping-group li {
  margin: 0 0 6px;
  color: #556983;
  font-size: 0.82rem;
  line-height: 1.28;
}

.rp-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(1120px, 94vw);
  width: 100%;
}

.rp-dialog::backdrop {
  background: rgba(45, 63, 88, 0.36);
  backdrop-filter: blur(5px);
}

.rp-dialog-panel {
  border: 0;
  padding: 14px;
  border-radius: 26px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 22px 48px rgba(40, 57, 82, 0.22);
  max-height: min(88dvh, 920px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
}

.rp-searchbar {
  display: flex;
  gap: 10px;
}

.rp-searchbar input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #d8e1ef;
  background: rgba(255,255,255,0.94);
}

.rp-searchbar input:focus {
  outline: none;
  border-color: #9ebcf0;
  box-shadow: 0 0 0 4px rgba(158, 188, 240, 0.18);
}

.rp-recipe-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
  min-height: 0;
}

.rp-result-card {
  border: 1px solid rgba(213, 224, 243, 0.74);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 12px;
  display: grid;
  gap: 7px;
  box-shadow: 0 10px 18px rgba(84, 107, 145, 0.06);
}

.rp-result-card h4 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.15;
  color: #334b6d;
}

.rp-result-card p {
  margin: 0;
  color: #687894;
  font-size: 0.84rem;
  line-height: 1.26;
}

.rp-checks {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.rp-check-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(247, 250, 255, 0.85);
  border: 1px solid rgba(214, 225, 242, 0.7);
  border-radius: 18px;
}

.rp-actions {
  margin-top: 18px;
}

.rp-pre {
  white-space: pre-wrap;
  background: #fff5f6;
  border-radius: 16px;
  padding: 12px;
  border: 1px solid #ffd9dd;
}

/* 16:9 desktop tuning */
@media (max-width: 1600px) {
  .rp-body {
    padding: 8px;
  }

  .rp-shell {
    height: calc(100dvh - 16px);
    gap: 8px;
  }

  .rp-summary-grid {
    gap: 8px;
    grid-template-columns: minmax(0, 2.55fr) minmax(280px, 0.75fr);
  }

  .rp-week-grid {
    gap: 6px;
  }

  .rp-day-card {
    padding: 8px;
  }

  .rp-slot-card {
    padding: 8px;
  }

  .rp-slot-actions .rp-button {
    font-size: 8px;
    min-height: 30px;
  }
  
  .rp-slot-type {
    font-weight: 800;
    text-transform: capitalize;
    color: #566987;
    font-size: 12px;
    letter-spacing: 0.01em;
}

.rp-slot-title {
    margin: 0;
    font-size: 9px;
    line-height: 1.16;
    color: #314767;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.08em;
}

.rp-slot-summary {
	display: none;
    margin: 0;
    color: #72819a;
    font-size: 0.79rem;
    line-height: 1.22;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.45em;
}
}

/* Tablet and smaller: allow page scroll again */
@media (max-width: 1200px) {
	
	
  html,
  body,
  .rp-body {
    overflow: auto;
  }

  .rp-shell {
    height: auto;
    min-height: calc(100dvh - 20px);
  }

  .rp-summary-grid {
    grid-template-columns: 1fr;
  }

  .rp-summary-grid > .rp-card {
    height: auto;
  }

  .rp-week-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    height: auto;
  }

  .rp-day-card {
    min-height: 0;
  }

  .rp-day-slots {
    grid-template-rows: none;
  }

  .rp-shopping-list {
    max-height: none;
  }
}

@media (max-width: 980px) {
  html,
  body,
  .rp-body {
    overflow: auto;
  }

  .rp-topbar {
    grid-template-columns: 1fr;
  }

  .rp-topbar-controls {
    justify-content: flex-start;
  }

  .rp-recipe-results {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  html,
  body,
  .rp-body {
    overflow: auto;
  }

  .rp-body {
    padding: 12px;
    height: auto;
    min-height: 100dvh;
  }

  .rp-shell {
    height: auto;
    min-height: unset;
  }

  .rp-card {
    border-radius: 20px;
    padding: 14px;
  }

  .rp-week-grid {
    grid-template-columns: 1fr;
  }

  .rp-slot-actions {
    grid-template-columns: 1fr;
  }

  .rp-slot-actions .rp-button {
    width: 100%;
  }

  .rp-searchbar {
    flex-direction: column;
  }

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

  .rp-search-filter-head {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Ratings + recipe browser */
.rp-slot-title-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 0.55rem;
  line-height: 1.16;
  color: #314767;
  min-height: 2.08em;
  box-shadow: none;
}

.rp-slot-title-button:hover {
  transform: none;
}

.rp-slot-title-button.is-link {
  cursor: pointer;
  font-weight: 700;
}

.rp-slot-title-button.is-link:hover {
  color: #7a4562;
  text-decoration: underline;
}

.rp-slot-title-button.is-empty {
  cursor: default;
  opacity: 1;
}

.rp-dialog-panel--recipe {
  max-width: 96;
}

.rp-modal-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.35fr);
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.rp-modal-search,
.rp-modal-preview {
  min-height: 0;
  display: grid;
  gap: 10px;
}

.rp-modal-search {
  grid-template-rows: auto auto 1fr;
}

.rp-modal-preview {
  border-left: 1px solid rgba(214, 225, 242, 0.7);
  padding-left: 12px;
}

.rp-search-filters {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
}

.rp-search-filter-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.rp-search-filter-title {
  margin: 0;
  font-size: 0.9rem;
  color: #3d5172;
}

.rp-search-filter-copy {
  margin-top: 3px;
}

.rp-button-small {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 0.74rem;
}

.rp-search-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.rp-multi-filter {
  position: relative;
  min-width: 0;
}

.rp-multi-filter__summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(206, 220, 241, 0.78);
  background: linear-gradient(180deg, #f9fcff 0%, #edf4ff 100%);
  color: #587090;
  cursor: pointer;
}

.rp-multi-filter__summary::-webkit-details-marker {
  display: none;
}

.rp-multi-filter__summary::after {
  content: "▾";
  color: #7a8caa;
  font-size: 0.85rem;
}

.rp-multi-filter[open] .rp-multi-filter__summary::after {
  transform: rotate(180deg);
}

.rp-multi-filter__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #617693;
}

.rp-multi-filter__value {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  color: #425a7a;
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rp-multi-filter__menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(206, 220, 241, 0.9);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 18px 32px rgba(84, 107, 145, 0.12);
  display: grid;
  gap: 6px;
}

.rp-multi-filter__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 12px;
  color: #4f6686;
  cursor: pointer;
}

.rp-multi-filter__option:hover {
  background: rgba(240, 246, 255, 0.8);
}

.rp-multi-filter__option input {
  margin: 0;
}

.rp-multi-filter__empty {
  margin: 0;
  color: #7a8caa;
  font-size: 0.8rem;
}

.rp-recipe-results {
  grid-template-columns: 1fr;
  align-content: start;
}

.rp-result-card.is-selected {
  border-color: rgba(226, 151, 182, 0.72);
  box-shadow: 0 12px 24px rgba(197, 124, 153, 0.14);
}

.rp-result-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.rp-result-stars {
  font-size: 0.95rem;
  color: #c07b9b;
  white-space: nowrap;
}

.rp-slot-actions--results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rp-recipe-preview {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.rp-recipe-preview::-webkit-scrollbar {
  width: 9px;
}

.rp-recipe-preview::-webkit-scrollbar-thumb {
  background: rgba(176, 191, 217, 0.9);
  border-radius: 999px;
}

.rp-empty-preview,
.rp-empty-results {
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  padding: 18px;
  border: 1px dashed rgba(205, 217, 235, 0.95);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(249,252,255,0.95) 0%, rgba(255,250,253,0.96) 100%);
}

.rp-empty-preview h4,
.rp-empty-results h4 {
  margin: 0;
  font-size: 1rem;
  color: #334b6d;
}

.rp-empty-preview p,
.rp-empty-results p {
  margin: 0;
  color: #687894;
  line-height: 1.35;
}

.rp-recipe-card {
  display: grid;
  gap: 12px;
}

.rp-recipe-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.rp-recipe-card__title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.15;
  color: #334b6d;
}

.rp-rating-block {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 180px;
}

.rp-rating-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #7b8ba7;
}

.rp-rating-stars {
  display: flex;
  gap: 2px;
}

.rp-star-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 2px;
  min-height: auto;
  font-size: 1.45rem;
  line-height: 1;
  color: #d6dce6;
  cursor: pointer;
}

.rp-star-button:hover {
  transform: scale(1.05);
}

.rp-star-button.is-active {
  color: #d98aa8;
}

.rp-rating-clear {
  border: 0;
  background: transparent;
  color: #7a4562;
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  padding: 0;
}

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

.rp-recipe-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(213, 224, 243, 0.74);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.rp-recipe-section h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #334b6d;
}

.rp-recipe-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #556983;
  font-size: 0.86rem;
  line-height: 1.34;
}

.rp-recipe-list--steps {
  padding-left: 20px;
}

.rp-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rp-recipe-notes {
  margin: 0;
  color: #556983;
  font-size: 0.86rem;
  line-height: 1.34;
}

.rp-recipe-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

@media (max-width: 1200px) {
  .rp-modal-grid {
    grid-template-columns: 1fr;
  }

  .rp-modal-preview {
    border-left: 0;
    border-top: 1px solid rgba(214, 225, 242, 0.7);
    padding-left: 0;
    padding-top: 12px;
  }

  .rp-recipe-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .rp-recipe-card__head {
    flex-direction: column;
  }

  .rp-rating-block {
    justify-items: start;
    min-width: 0;
  }
}


/* Topbar search + split autofill */
.rp-topbar-search-icon {
  width: 42px;
  min-width: 42px;
  padding: 0;
  justify-content: center;
}

.rp-topbar-search-icon__glyph {
  font-size: 1.05rem;
  line-height: 1;
}

.rp-split-button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 210px;
}

.rp-split-button__main {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  justify-content: flex-start;
  text-align: left;
}

.rp-split-button__toggle {
  width: 42px;
  padding: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  font-size: 1rem;
}

.rp-split-menu[hidden] {
  display: none !important;
}

.rp-split-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 100%;
  z-index: 30;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid rgba(191, 208, 232, 0.62);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(82, 106, 145, 0.16);
  backdrop-filter: blur(10px);
  display: grid;
  gap: 4px;
}

.rp-split-menu__item {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  text-align: left;
  color: #395170;
  background: transparent;
  cursor: pointer;
}

.rp-split-menu__item:hover {
  background: linear-gradient(180deg, #f9fcff 0%, #edf4ff 100%);
}

.rp-split-menu__item.is-selected {
  background: linear-gradient(180deg, #ffe6ef 0%, #ffd4e4 100%);
  color: #74374f;
  font-weight: 700;
}

.rp-slot-actions--single {
  grid-template-columns: 1fr;
}

.rp-search-filter-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .rp-split-button {
    min-width: 100%;
  }
}

@media (max-width: 680px) {
  .rp-split-button {
    width: 100%;
  }
}

/* Recipe editor */
.rp-recipe-editor {
  display: grid;
  gap: 12px;
}

.rp-recipe-editor__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

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

.rp-section-head h4 {
  margin: 0;
}

.rp-editor-grid {
  display: grid;
  gap: 10px;
}

.rp-editor-grid--details {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rp-editor-grid--tags,
.rp-editor-grid--ingredient {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rp-editor-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rp-editor-field--full {
  grid-column: 1 / -1;
}

.rp-editor-field span {
  font-size: 0.77rem;
  color: #7585a4;
  font-weight: 700;
}

.rp-editor-input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 14px;
  border: 1px solid #d8e1ef;
  background: rgba(255,255,255,0.96);
  color: #324764;
  box-shadow: inset 0 1px 2px rgba(60, 88, 130, 0.04);
}

textarea.rp-editor-input {
  resize: vertical;
  min-height: 82px;
}

.rp-editor-input:focus {
  outline: none;
  border-color: #9ebcf0;
  box-shadow: 0 0 0 4px rgba(158, 188, 240, 0.18);
}

.rp-editor-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rp-check-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  cursor: pointer;
}

.rp-check-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rp-check-chip span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  border: 1px solid rgba(206, 220, 241, 0.78);
  background: linear-gradient(180deg, #f9fcff 0%, #edf4ff 100%);
  color: #587090;
  font-size: 0.75rem;
  font-weight: 700;
}

.rp-check-chip input:checked + span {
  background: linear-gradient(180deg, #ffdbe8 0%, #ffc7dc 100%);
  border-color: rgba(233, 162, 188, 0.65);
  color: #71334f;
}

.rp-editor-list {
  display: grid;
  gap: 10px;
}

.rp-editor-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(213, 224, 243, 0.74);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.rp-editor-row__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.rp-editor-row__top strong {
  color: #334b6d;
  font-size: 0.88rem;
}

.rp-recipe-actions--editor {
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .rp-editor-grid--details,
  .rp-editor-grid--tags,
  .rp-editor-grid--ingredient {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .rp-recipe-editor__head,
  .rp-section-head,
  .rp-editor-row__top {
    flex-direction: column;
    align-items: stretch;
  }

  .rp-editor-grid--details,
  .rp-editor-grid--tags,
  .rp-editor-grid--ingredient {
    grid-template-columns: 1fr;
  }
}


/* Make the top area its own higher layer */
.rp-topbar {
  position: relative;
  z-index: 200;
  overflow: visible;
}

/* If your topbar also has .rp-card on it, this matters too */
.rp-topbar.rp-card {
  position: relative;
  z-index: 200;
  overflow: visible;
}

/* Keep the dropdown anchor above neighboring content */
.rp-split-button {
  position: relative;
  z-index: 201;
}

/* The menu itself */
.rp-split-menu {
  z-index: 9999;
}