:root {
  --cinnamon: #d94b2b;
  --apple-red: #d94b2b;
  --cinnamon-dark: #8f2418;
  --turquoise: #c9f3ef;
  --turquoise-deep: #5bbdb7;
  --green: #d6efc5;
  --green-deep: #6ca05a;
  --ink: #26312f;
  --muted: #66716d;
  --cream: #fffaf1;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(54, 40, 27, 0.16);
  --studio-scroll-offset: 190px;
}

.rails-app {
  min-height: 100vh;
}

.app-header {
  align-items: center;
  background: rgba(255, 250, 244, 0.96);
  border-bottom: 1px solid rgba(94, 73, 54, 0.14);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 12px clamp(16px, 3vw, 36px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-link,
.top-nav,
.account-nav,
.button-row,
.inline-form {
  align-items: center;
  display: flex;
  gap: 10px;
}

.brand-link {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  height: 42px;
  width: 42px;
}

.top-nav {
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link,
.account-nav a {
  color: #654b34;
  font-weight: 700;
  text-decoration: none;
}

.nav-link.active {
  border-bottom: 2px solid #b45f39;
}

.rails-main {
  padding: clamp(16px, 3vw, 34px);
}

.flash {
  border-radius: 8px;
  font-weight: 700;
  margin: 14px auto 0;
  max-width: 980px;
  padding: 12px 16px;
}

.flash.notice {
  background: #edf8f0;
  color: #24563b;
}

.flash.alert {
  background: #fff0ed;
  color: #8d2f22;
}

.form-shell,
.recipe-show,
.admin-page,
.directory-page,
.two-column-page {
  margin: 0 auto;
  max-width: 1120px;
}

.form-shell {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(94, 73, 54, 0.14);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 30px);
}

.form-shell.compact {
  margin-bottom: 22px;
  max-width: none;
}

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

.recipe-form label {
  display: grid;
  font-weight: 700;
  gap: 6px;
}

.recipe-form input,
.recipe-form textarea,
.recipe-form select,
.inline-form input {
  border: 1px solid rgba(94, 73, 54, 0.24);
  border-radius: 8px;
  font: inherit;
  padding: 10px 12px;
}

.checkbox-label {
  align-items: center;
  display: flex !important;
  flex-direction: row;
}

.app-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(230px, 0.9fr) minmax(320px, 1.5fr) minmax(220px, 0.8fr);
}

.cookbook-list,
.recipes-list,
.message-list,
.shopping-list-items {
  display: grid;
  gap: 12px;
}

.cookbook-button {
  text-decoration: none;
}

.recipe-show {
  background: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 36px);
}

.recipe-detail-photo {
  border-radius: 8px;
  object-fit: cover;
  width: 112px;
  height: 84px;
}

.two-column-page {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.4fr);
}

.inline-form {
  margin: 14px 0;
}

.inline-form input[type="text"] {
  flex: 1;
  min-width: 180px;
}

.admin-page .directory-list,
.directory-page .directory-list {
  margin-top: 22px;
}

@media (max-width: 900px) {
  .app-header,
  .app-grid,
  .two-column-page {
    grid-template-columns: 1fr;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.94), rgba(236, 246, 232, 0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cpath fill='none' stroke='%23c9b28f' stroke-opacity='.24' stroke-width='1' d='M12 32h72M12 64h72M32 12v72M64 12v72'/%3E%3Ccircle cx='48' cy='48' r='30' fill='none' stroke='%23c9b28f' stroke-opacity='.18'/%3E%3C/svg%3E");
}

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

button {
  cursor: pointer;
}

.login-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(214, 239, 197, 0.6), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(108, 160, 90, 0.38), transparent 36%),
    var(--green-deep);
}

.cookbook-route-loading .login-screen {
  display: none;
}

.landing-cookbook-home {
  padding: 76px 24px 52px;
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.96) 0%, rgba(214, 239, 197, 0.94) 39%, rgba(33, 69, 65, 0.98) 78%, rgba(143, 36, 24, 0.95) 100%);
}

.landing-cookbook-home .login-layout {
  grid-template-columns: minmax(300px, 780px);
  gap: clamp(18px, 4vh, 34px);
  width: min(920px, 100%);
}

.landing-recipe-papers {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.recipe-paper {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-rows: auto 4px 4px 4px;
  gap: 7px;
  width: clamp(82px, 10vw, 118px);
  min-height: 82px;
  padding: 12px 11px 11px;
  opacity: 0;
  color: #214541;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(249, 238, 219, 0.96));
  border: 1px solid rgba(109, 55, 30, 0.2);
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(38, 49, 47, 0.2);
  transform: translate(var(--paper-start-x), var(--paper-start-y)) rotate(var(--paper-start-rotation)) scale(0.78);
  animation: recipePaperToBook var(--paper-duration, 9s) cubic-bezier(0.24, 0.66, 0.22, 1) var(--paper-delay, 2s) infinite;
}

.recipe-paper strong {
  display: block;
  min-height: 24px;
  font-size: clamp(0.56rem, 1.2vw, 0.72rem);
  font-weight: 900;
  line-height: 1.12;
}

.recipe-paper span {
  display: block;
  background: rgba(33, 69, 65, 0.42);
  border-radius: 999px;
}

.recipe-paper span:nth-of-type(1) {
  width: 82%;
}

.recipe-paper span:nth-of-type(2) {
  width: 64%;
}

.recipe-paper span:nth-of-type(3) {
  width: 74%;
}

.landing-cookbook-scene {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(100%, 760px);
  min-height: clamp(300px, 54vh, 500px);
  place-items: center;
  perspective: 1400px;
  overflow: visible;
}

.landing-cookbook {
  position: relative;
  width: clamp(260px, 50vw, 470px);
  aspect-ratio: 1.36;
  transform-style: preserve-3d;
  animation: cookbookSettle 9s ease-out forwards;
}

.cookbook-shadow {
  position: absolute;
  right: 3%;
  bottom: 3%;
  left: 3%;
  height: 24px;
  background: rgba(23, 31, 29, 0.24);
  border-radius: 50%;
  filter: blur(12px);
  transform: translateY(26px);
}

.cookbook-pages,
.cookbook-cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82%;
  height: 72%;
  border-radius: 8px;
}

.cookbook-pages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: #f9f0df;
  border: 1px solid rgba(82, 55, 31, 0.2);
  box-shadow:
    0 20px 44px rgba(28, 41, 38, 0.22),
    inset 0 0 0 5px rgba(255, 255, 255, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) rotateX(6deg) scaleX(0.72);
  animation: cookbookPagesOpen 9s ease-out forwards;
}

.cookbook-page {
  position: relative;
  background:
    repeating-linear-gradient(180deg, transparent 0 19px, rgba(143, 36, 24, 0.13) 20px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.6), rgba(249, 240, 224, 0.96));
}

.cookbook-page-left {
  border-right: 1px solid rgba(82, 55, 31, 0.14);
}

.cookbook-page-right {
  background:
    repeating-linear-gradient(180deg, transparent 0 19px, rgba(33, 69, 65, 0.13) 20px),
    linear-gradient(90deg, rgba(239, 225, 202, 0.94), rgba(255, 255, 255, 0.64));
}

.cookbook-page::before,
.cookbook-page::after {
  position: absolute;
  left: 16%;
  display: block;
  width: 56%;
  height: 5px;
  content: "";
  background: rgba(33, 69, 65, 0.42);
  border-radius: 999px;
}

.cookbook-page::before {
  top: 20%;
}

.cookbook-page::after {
  top: 32%;
  width: 45%;
  background: rgba(143, 36, 24, 0.34);
}

.cookbook-fold {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 22px;
  background: linear-gradient(90deg, rgba(82, 55, 31, 0.22), rgba(255, 255, 255, 0.5), rgba(82, 55, 31, 0.16));
  transform: translateX(-50%);
}

.cookbook-cover {
  display: grid;
  place-items: center;
  padding: 18px;
  color: #fffaf1;
  text-align: center;
  background:
    linear-gradient(135deg, #9a2f25 0%, #7f231c 58%, #461510 100%);
  border: 1px solid rgba(255, 250, 241, 0.18);
  box-shadow:
    0 22px 46px rgba(28, 41, 38, 0.28),
    inset 7px 0 0 rgba(68, 19, 14, 0.46),
    inset 0 0 0 7px rgba(255, 250, 241, 0.1);
  transform: translate(-50%, -50%) rotateX(6deg) rotateY(0deg);
  transform-origin: left center;
  transform-style: preserve-3d;
  animation: cookbookCoverOpen 9s cubic-bezier(0.2, 0.72, 0.2, 1) forwards;
}

.cookbook-cover::before {
  position: absolute;
  inset: 14px;
  content: "";
  border: 1px solid rgba(255, 250, 241, 0.28);
  border-radius: 6px;
  pointer-events: none;
}

.cookbook-cover-logo {
  display: grid;
  width: clamp(96px, 19vw, 150px);
  aspect-ratio: 1;
  place-items: center;
  background: rgba(255, 250, 241, 0.92);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(143, 36, 24, 0.18), 0 13px 25px rgba(28, 41, 38, 0.2);
}

.cookbook-cover-logo img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

.cookbook-cover span {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 3vw, 1.72rem);
  font-weight: 900;
  line-height: 1.05;
}

@keyframes cookbookSettle {
  0% {
    transform: translateY(18px) rotateX(0deg) rotateZ(-1deg);
  }

  35%,
  100% {
    transform: translateY(0) rotateX(0deg) rotateZ(0deg);
  }
}

@keyframes cookbookPagesOpen {
  0%,
  24% {
    opacity: 0;
    transform: translate(-50%, -50%) rotateX(6deg) scaleX(0.72);
  }

  42%,
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotateX(6deg) scaleX(1);
  }
}

@keyframes cookbookCoverOpen {
  0%,
  22% {
    transform: translate(-50%, -50%) rotateX(6deg) rotateY(0deg);
  }

  48%,
  100% {
    transform: translate(-50%, -50%) rotateX(6deg) rotateY(-74deg);
  }
}

@keyframes recipePaperToBook {
  0% {
    opacity: 0;
    transform: translate(var(--paper-start-x), var(--paper-start-y)) rotate(var(--paper-start-rotation)) scale(0.72);
  }

  12% {
    opacity: 0.96;
  }

  66% {
    opacity: 0.92;
    transform: translate(calc(var(--paper-end-x) * 0.35), calc(var(--paper-end-y) - 54px)) rotate(0deg) scale(0.92);
  }

  100% {
    opacity: 0;
    transform: translate(var(--paper-end-x), var(--paper-end-y)) rotate(var(--paper-end-rotation)) scale(0.22);
  }
}

.landing-login-toggle {
  display: inline-flex;
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 3;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #214541;
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(38, 49, 47, 0.14);
  font-weight: 900;
}

.landing-login-toggle:hover,
.landing-login-toggle:focus-visible {
  background: var(--white);
}

.login-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(320px, 430px);
  gap: clamp(14px, 3vw, 34px);
  align-items: center;
  justify-content: center;
  width: min(1040px, 100%);
}

.landing-chefs-panel {
  display: grid;
  gap: 12px;
  align-content: center;
  justify-items: center;
  min-height: 310px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(38, 49, 47, 0.12);
  backdrop-filter: blur(10px);
}

.landing-chef-hat {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
}

.landing-chef-hat-icon {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 8px 12px rgba(38, 49, 47, 0.18));
}

.landing-chef-hat-apple {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 23px;
  height: 23px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 3px rgba(38, 49, 47, 0.24));
}

.landing-chefs-panel h2 {
  margin: 0;
  color: #fffaf1;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.landing-chefs-list {
  display: grid;
  gap: 7px;
  width: 100%;
}

.landing-chefs-list span {
  display: block;
  padding: 7px 10px;
  color: #214541;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 900;
}

.login-screen[hidden],
.app-content[hidden],
.add-chef-form[hidden],
.chef-editor[hidden],
.cookbook-editor[hidden],
.spice-form[hidden],
.spices-detail-panel[hidden],
.spice-view[hidden],
.danger-button[hidden] {
  display: none;
}

.login-card {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(430px, 100%);
  gap: 16px;
  justify-items: center;
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.login-screen.login-panel-open .login-card {
  position: relative;
  top: auto;
  left: auto;
  width: min(430px, calc(100vw - 44px));
  max-height: none;
  overflow: visible;
  padding: 0;
}

.login-entry-panel,
.login-welcome-panel {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
}

.login-entry-panel {
  display: none;
  position: fixed;
  top: 76px;
  left: 22px;
  z-index: 4;
  justify-items: stretch;
  width: min(300px, calc(100vw - 44px));
  padding: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(33, 69, 65, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.login-screen.login-panel-open .login-entry-panel {
  display: grid;
}

.login-entry-panel[hidden] {
  display: none;
}

.login-logo {
  width: clamp(146px, 30vw, 190px);
  height: clamp(146px, 30vw, 190px);
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(111, 25, 24, 0.16));
}

.login-card h1 {
  max-width: 520px;
  margin-bottom: 4px;
  color: #fffaf1;
  font-size: clamp(1rem, 4.4vw, 1.28rem);
  line-height: 1.32;
  text-shadow: 0 2px 12px rgba(38, 49, 47, 0.28);
}

.rails-home .login-card {
  z-index: 6;
  width: min(620px, 100%);
}

.landing-cookbook-home:not(.landing-auth-home) .landing-kicker,
.landing-cookbook-home:not(.landing-auth-home) .login-card h1,
.landing-cookbook-home:not(.landing-auth-home) .landing-tagline {
  transform: translateX(clamp(10px, 3vw, 34px));
}

.rails-home .login-card h1 {
  max-width: 100%;
  margin: 0;
  color: #fffaf1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  line-height: 1.08;
  text-shadow: 0 3px 18px rgba(28, 41, 38, 0.32);
}

.landing-kicker,
.landing-tagline {
  margin: 0;
}

.landing-kicker {
  color: #9a2f25;
  font-size: clamp(0.78rem, 2vw, 0.92rem);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.landing-tagline {
  max-width: 560px;
  color: rgba(255, 250, 241, 0.92);
  font-size: clamp(1rem, 2.6vw, 1.24rem);
  font-weight: 800;
  line-height: 1.36;
  text-shadow: 0 2px 12px rgba(28, 41, 38, 0.28);
}

.landing-auth-home {
  min-height: 100vh;
}

.landing-auth-home .login-layout {
  width: min(980px, 100%);
}

.landing-auth-home .landing-cookbook-scene {
  min-height: clamp(260px, 44vh, 420px);
}

.landing-auth-home .landing-cookbook {
  width: clamp(240px, 44vw, 430px);
}

.landing-auth-layout {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 360px);
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
  width: min(860px, 100%);
  margin-top: clamp(-36px, -4vh, -12px);
}

.landing-auth-layout .login-card {
  justify-items: start;
  text-align: left;
}

.landing-auth-layout .login-welcome-panel {
  align-items: start;
  justify-items: start;
}

.landing-auth-layout .login-card h1 {
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  line-height: 1.08;
}

.landing-auth-layout .landing-tagline {
  max-width: 430px;
}

.landing-auth-panel {
  display: grid;
  gap: 13px;
  justify-items: stretch;
  width: min(360px, 100%);
  padding: 20px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(33, 69, 65, 0.14);
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(28, 41, 38, 0.2);
  backdrop-filter: blur(14px);
}

.landing-auth-panel .primary-button {
  width: 100%;
}

.login-card label,
.login-entry-panel label {
  width: 100%;
  text-align: left;
}

.landing-auth-panel label {
  width: 100%;
  text-align: left;
}

.login-error {
  width: 100%;
  margin: -4px 0 0;
  color: #9a2f25;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: left;
}

.login-card .primary-button {
  width: 100%;
}

.login-screen.login-panel-open .login-logo {
  width: clamp(146px, 30vw, 190px);
  height: clamp(146px, 30vw, 190px);
}

.login-screen.login-panel-open .login-card h1 {
  font-size: clamp(1rem, 4.4vw, 1.28rem);
}

.landing-button {
  display: grid;
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 3;
  width: auto;
  min-width: 132px;
  min-height: 42px;
  place-items: center;
  padding: 0 18px;
  color: #214541;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  font-weight: 800;
}

@media (min-width: 761px) {
  .login-welcome-panel {
    padding: 0;
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-recipe-papers {
    display: none;
  }

  .landing-cookbook,
  .cookbook-cover,
  .cookbook-pages {
    animation: none;
  }

  .cookbook-pages {
    opacity: 1;
    transform: translate(-50%, -50%) rotateX(6deg) scaleX(1);
  }

  .cookbook-cover {
    transform: translate(-50%, -50%) rotateX(6deg) rotateY(-74deg);
  }
}

.admin-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 18%, rgba(201, 243, 239, 0.72), transparent 32%),
    radial-gradient(circle at 82% 82%, rgba(214, 239, 197, 0.82), transparent 34%),
    var(--cream);
}

.admin-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 42px) 42px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-header-actions,
.directory-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  justify-content: flex-end;
}

.admin-header-actions .directory-nav,
.directory-header-actions .directory-nav {
  min-width: 190px;
}

.admin-section {
  margin-top: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(38, 49, 47, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.shopping-list-page {
  width: min(900px, 100%);
}

.shopping-list-section {
  background: rgba(214, 239, 197, 0.72);
}

.shopping-list-print-header {
  display: none;
}

.shopping-list-form {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto auto;
  gap: 12px;
  align-items: end;
}

.shopping-list-form input {
  min-height: 36px;
}

.shopping-list-items {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.shopping-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(69, 105, 54, 0.14);
  border-radius: 8px;
}

.shopping-list-item label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 0.86rem;
}

.shopping-list-item input {
  width: auto;
  min-height: auto;
}

.shopping-list-item .ghost-button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.shopping-list-item.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.clear-shopping-list {
  margin-top: 16px;
}

.messages-page {
  width: min(900px, 100%);
}

.clipper-page {
  width: min(900px, 100%);
}

.spices-page {
  width: min(1100px, 100%);
}

.messages-section {
  background: rgba(201, 230, 197, 0.76);
}

.clipper-section {
  background: rgba(201, 243, 239, 0.62);
}

.clipper-form {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(190px, 0.85fr);
  gap: 14px;
  align-items: end;
}

.clipper-form label:first-child,
.clipper-form label:nth-child(2),
.clipper-form .clipper-status {
  grid-column: 1 / -1;
}

.clipper-form button {
  justify-self: start;
}

.clipper-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.clipper-status.success {
  color: #315f29;
}

.clipper-status.error {
  color: #9a2f25;
}

.clipper-status.error span {
  display: block;
  margin-top: 6px;
  color: #d94b2b;
}

.spices-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.65fr) minmax(360px, 1.35fr);
  gap: 18px;
}

.spices-list-panel {
  grid-column: 1 / -1;
  background: rgba(255, 250, 241, 0.86);
}

.spice-selected-mode .spices-list-panel {
  grid-column: auto;
}

.spices-detail-panel {
  background: rgba(201, 243, 239, 0.58);
}

.spice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spice-list.vertical {
  display: grid;
}

.spice-card {
  flex: 0 0 180px;
  background: rgba(214, 239, 197, 0.68);
}

.spice-list.vertical .spice-card {
  width: 100%;
  flex-basis: auto;
}

.reference-admin-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin-top: 16px;
}

.reference-admin-card {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  min-height: 190px;
  padding: 16px;
  color: var(--ink);
  background: rgba(214, 239, 197, 0.7);
  border: 1px solid rgba(108, 160, 90, 0.22);
  border-radius: 8px;
}

.reference-admin-card h3,
.reference-admin-card p {
  margin: 0;
}

.reference-admin-card h3 {
  overflow-wrap: anywhere;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.1;
}

.reference-admin-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

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

.reference-admin-card-actions .button_to {
  display: contents;
}

.reference-admin-card-actions .ghost-button {
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  white-space: nowrap;
}

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

.spice-name-input {
  max-width: 320px;
  min-height: 36px;
  padding: 7px 10px;
}

.spice-form textarea {
  min-height: 190px;
}

.spice-view {
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(38, 49, 47, 0.12);
  border-radius: 8px;
}

.spice-view h3 {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
}

.spice-view p {
  line-height: 1.55;
}

.reference-entries-page {
  width: min(1280px, 100%);
}

.reference-board {
  position: relative;
  padding: clamp(22px, 3vw, 34px);
  background: rgba(255, 250, 241, 0.88);
}

.reference-board-heading {
  display: flex;
  min-height: 74px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.reference-board-heading h2,
.reference-board-heading p {
  margin: 0;
}

.reference-board-heading h2 {
  font-size: clamp(2.05rem, 5vw, 3.15rem);
  line-height: 1;
}

.reference-add-button {
  display: inline-grid;
  width: 52px;
  min-width: 52px;
  height: 52px;
  place-items: center;
  color: var(--white);
  background: var(--cinnamon);
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(217, 75, 43, 0.22);
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.reference-add-button:hover,
.reference-add-button:focus-visible {
  background: var(--cinnamon-dark);
  transform: translateY(-1px);
}

.reference-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.reference-card {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 16px;
  color: var(--ink);
  background: rgba(214, 239, 197, 0.72);
  border: 1px solid rgba(108, 160, 90, 0.22);
  border-radius: 8px;
  text-decoration: none;
}

.reference-card:hover,
.reference-card:focus-visible {
  background: rgba(214, 239, 197, 0.9);
  box-shadow: 0 10px 24px rgba(108, 160, 90, 0.15);
  transform: translateY(-1px);
}

.reference-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.06rem, 2vw, 1.3rem);
  line-height: 1.05;
}

.reference-card span {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 900;
}

.reference-form-panel {
  width: min(560px, 100%);
  margin: 42px 0 0 clamp(0px, 4vw, 46px);
  padding: clamp(22px, 3vw, 30px);
  background: rgba(201, 243, 239, 0.72);
  border: 1px solid rgba(33, 69, 65, 0.12);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(38, 49, 47, 0.1);
}

.reference-entry-form {
  display: grid;
  gap: 18px;
}

.reference-form-heading h2,
.reference-form-heading p {
  margin: 0;
}

.reference-form-heading h2 {
  font-size: clamp(2.2rem, 5vw, 3.15rem);
  line-height: 1.02;
}

.reference-entry-form label {
  display: grid;
  gap: 7px;
  color: #214541;
  font-weight: 900;
}

.reference-entry-form input,
.reference-entry-form textarea {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.reference-name-input {
  min-height: 44px;
}

.reference-entry-form textarea {
  min-height: 300px;
  resize: vertical;
}

.reference-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
}

.reference-form-actions .primary-button,
.reference-form-actions .ghost-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  font-size: 1.05rem;
  text-decoration: none;
}

.message-form {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.message-form textarea {
  min-height: 88px;
  resize: vertical;
}

.message-voice-status {
  grid-column: 1 / -1;
}

.messages-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.message-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(69, 105, 54, 0.14);
  border-radius: 8px;
}

.message-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.message-card-heading h3,
.message-card-heading p,
.message-body {
  margin: 0;
}

.message-card-heading h3 {
  font-size: 1rem;
}

.message-card-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.message-recipient {
  flex: 0 0 auto;
  padding: 4px 9px;
  color: #2d4a24;
  background: rgba(214, 239, 197, 0.9);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
}

.message-recipient.private {
  color: #9d2f1b;
  background: rgba(217, 75, 43, 0.12);
}

.message-body {
  margin-top: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.message-recipe-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-recipe-photo-button {
  display: block;
  width: 92px;
  height: 70px;
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 1px solid rgba(38, 49, 47, 0.12);
  border-radius: 8px;
}

.message-recipe-photo-button:focus-visible {
  outline: 3px solid rgba(108, 160, 90, 0.48);
  outline-offset: 3px;
}

.message-reply-button {
  min-height: 32px;
  margin-top: 12px;
  padding: 0 12px;
  color: var(--white);
  background: var(--green-deep);
  font-size: 0.78rem;
}

.message-dish-button {
  min-height: 34px;
  margin-top: 12px;
  margin-right: 8px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.head-chef-card {
  background: var(--turquoise);
}

.head-chef-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.add-chef-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--apple-red);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 18px rgba(111, 25, 24, 0.18);
  cursor: pointer;
  font: inherit;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.add-chef-button:hover,
.add-chef-button:focus-visible {
  transform: translateY(-1px);
}

.add-chef-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.add-chef-form label {
  display: grid;
  gap: 6px;
  color: var(--cinnamon-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.add-chef-form input {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(38, 49, 47, 0.14);
  border-radius: 8px;
  font: inherit;
  text-transform: none;
}

.add-chef-form .login-error {
  grid-column: 1 / -1;
  margin: 0;
}

.welcome-template-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.welcome-template-form label,
.welcome-template-copy {
  display: grid;
  gap: 6px;
  color: var(--cinnamon-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.welcome-template-form input,
.welcome-template-text {
  width: 100%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(38, 49, 47, 0.14);
  border-radius: 8px;
  font: inherit;
  text-transform: none;
}

.welcome-template-form input {
  min-height: 42px;
  padding: 10px 12px;
}

.welcome-template-preview {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

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

.welcome-template-details p {
  display: grid;
  gap: 5px;
  min-height: 72px;
  margin: 0;
  padding: 12px;
  color: var(--ink);
  background: rgba(214, 239, 197, 0.56);
  border: 1px solid rgba(108, 160, 90, 0.18);
  border-radius: 8px;
}

.welcome-template-details strong {
  color: var(--cinnamon-dark);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.welcome-template-details span {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.welcome-template-text {
  min-height: 360px;
  padding: 16px;
  line-height: 1.5;
  resize: vertical;
}

.chef-editor {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  background: rgba(201, 243, 239, 0.54);
  border: 1px solid rgba(38, 49, 47, 0.12);
  border-radius: 8px;
}

.chef-editor-heading,
.chef-editor-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chef-editor h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.chef-editor label {
  display: grid;
  gap: 6px;
  color: var(--cinnamon-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chef-editor input {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(38, 49, 47, 0.14);
  border-radius: 8px;
  font: inherit;
  text-transform: none;
}

.chef-editor .login-error {
  grid-column: 1 / -1;
  margin: 0;
}

.danger-button {
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  background: #9a2f25;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.danger-button:hover,
.danger-button:focus-visible {
  background: #7f251d;
  transform: translateY(-1px);
}

.admin-section h2 {
  margin-bottom: 6px;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.admin-section p {
  margin-bottom: 0;
  color: var(--muted);
}

.admin-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-section-heading span {
  color: var(--cinnamon-dark);
  font-size: 0.9rem;
  font-weight: 900;
}

.chef-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

.cookbook-admin-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
  margin-top: 16px;
}

.chef-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  color: var(--ink);
  background: rgba(214, 239, 197, 0.6);
  border: 1px solid rgba(69, 105, 54, 0.14);
  border-radius: 8px;
  font: inherit;
  text-align: left;
}

.chef-card-details {
  min-width: 0;
}

.chef-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

.chef-card-email {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chef-card-status::before {
  content: "· ";
}

.chef-card-actions {
  align-self: stretch;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.chef-card-actions .ghost-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  white-space: nowrap;
}

.chef-card.head-chef {
  background: rgba(217, 75, 43, 0.14);
  border-color: rgba(217, 75, 43, 0.24);
}

.chef-card.head-chef .chef-card-meta {
  color: var(--cinnamon-dark);
}

.chef-card.selected {
  outline: 3px solid rgba(217, 75, 43, 0.26);
  background: rgba(255, 255, 255, 0.86);
}

.cookbook-admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 14px;
  color: var(--ink);
  background: rgba(201, 243, 239, 0.58);
  border: 1px solid rgba(69, 105, 54, 0.14);
  border-radius: 8px;
}

.cookbook-admin-card-details {
  min-width: 0;
}

.cookbook-admin-card strong {
  display: block;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.cookbook-admin-card span {
  color: var(--turquoise-deep);
  display: block;
  margin-top: 6px;
  font-weight: 800;
}

.cookbook-admin-card-actions {
  align-self: stretch;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.cookbook-admin-card-actions .ghost-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  white-space: nowrap;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(16px, 4vw, 42px);
  background: rgba(255, 250, 241, 0.88);
  border-bottom: 1px solid rgba(109, 55, 30, 0.16);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.apple-logo {
  width: clamp(77px, 10.6vw, 109px);
  height: clamp(77px, 10.6vw, 109px);
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(111, 25, 24, 0.18));
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1;
}

.header-tools {
  display: grid;
  gap: 10px;
  width: min(440px, 100%);
}

.header-tools .directory-nav {
  order: -1;
  justify-self: end;
  width: 190px;
}

.directory-nav {
  display: grid;
  gap: 5px;
  color: #214541;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.directory-nav select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(33, 69, 65, 0.18);
  border-radius: 8px;
  font-weight: 800;
  text-transform: none;
}

.header-note {
  max-width: 430px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
}

.search-form input {
  min-height: 42px;
}

.search-form .primary-button {
  min-height: 42px;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(170px, 0.48fr) minmax(360px, 1fr);
  gap: 18px;
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 32px) 32px;
}

.recipe-open-mode .app-shell {
  grid-template-columns: minmax(160px, 0.46fr) minmax(460px, 1.9fr) minmax(190px, 0.56fr);
}

.directory-cookbook-mode .app-shell {
  grid-template-columns: minmax(180px, 0.55fr) minmax(340px, 1fr);
  width: min(980px, 100%);
}

.directory-recipe-open-mode .app-shell {
  grid-template-columns: minmax(160px, 0.46fr) minmax(460px, 1.9fr) minmax(190px, 0.56fr);
  width: min(1680px, 100%);
}

.add-recipe-focus-mode .app-shell {
  grid-template-columns: minmax(360px, 760px);
  justify-content: center;
  width: min(860px, 100%);
}

.panel {
  min-height: calc(100vh - 142px);
  border: 1px solid rgba(38, 49, 47, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cookbooks-panel {
  scroll-margin-top: var(--studio-scroll-offset);
  background: var(--cinnamon);
  color: var(--cream);
}

.recipe-panel {
  display: none;
  scroll-margin-top: var(--studio-scroll-offset);
  background: var(--turquoise);
}

.recipe-open-mode .recipe-panel,
.directory-recipe-open-mode .recipe-panel,
.add-recipe-focus-mode .recipe-panel {
  display: block;
}

.recipes-panel {
  scroll-margin-top: var(--studio-scroll-offset);
  background: var(--green);
}

.authorized-chefs-panel {
  display: none;
  background: rgba(255, 250, 241, 0.92);
}

.directory-cookbook-mode .recipe-panel,
.directory-cookbook-mode .authorized-chefs-panel {
  display: none;
}

.directory-recipe-open-mode .authorized-chefs-panel {
  display: none;
}

.add-recipe-focus-mode .cookbooks-panel,
.add-recipe-focus-mode .recipes-panel,
.add-recipe-focus-mode .authorized-chefs-panel {
  display: none;
}

.add-recipe-focus-mode #clear-form {
  display: none;
}

.authorized-chefs-panel .panel-heading {
  padding: 12px;
}

.authorized-chefs-panel .panel-heading h2 {
  font-size: 0.9rem;
}

.authorized-chefs-panel .panel-heading p {
  font-size: 0.72rem;
}

.recipes-panel .panel-heading {
  padding: 12px 14px;
}

.recipes-panel .panel-heading h2 {
  font-size: 0.98rem;
}

.recipes-panel .panel-heading p {
  font-size: 0.76rem;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid rgba(38, 49, 47, 0.12);
}

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

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

.studio-scroll-icon {
  display: none;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  background: var(--teal);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(33, 69, 65, 0.16);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.studio-scroll-icon:hover,
.studio-scroll-icon:focus {
  background: #235f59;
  outline: none;
}

.panel-heading h2 {
  margin-bottom: 4px;
  font-size: 1.16rem;
}

.panel-logo {
  display: block;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(111, 25, 24, 0.14));
}

.panel-heading p,
.panel-heading span {
  margin: 0;
  color: rgba(38, 49, 47, 0.72);
  font-size: 0.86rem;
}

.cookbooks-panel .panel-heading {
  border-bottom-color: rgba(255, 250, 241, 0.2);
}

.cookbooks-panel .panel-heading span {
  color: rgba(255, 250, 241, 0.78);
}

.cookbook-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.cookbook-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.cookbook-button,
.cookbook-print-button,
.recipe-card,
.primary-button,
.ghost-button,
.danger-button {
  border: 0;
  border-radius: 8px;
}

.cookbook-button {
  min-height: 48px;
  padding: 10px 12px;
  color: var(--cream);
  text-align: left;
  background: rgba(255, 250, 241, 0.12);
}

.cookbook-button strong,
.recipe-card strong {
  display: block;
  line-height: 1.2;
}

.cookbook-button span,
.recipe-card span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 250, 241, 0.72);
  font-size: 0.78rem;
}

.cookbook-button.active {
  color: var(--cinnamon-dark);
  background: var(--cream);
}

.cookbook-button.active span {
  color: rgba(109, 55, 30, 0.7);
}

.cookbook-print-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--cream);
}

.cookbook-print-button img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  filter: drop-shadow(0 4px 7px rgba(111, 25, 24, 0.16));
}

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

label {
  display: grid;
  gap: 7px;
  color: #214541;
  font-size: 0.86rem;
  font-weight: 800;
}

.field-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mic-button {
  display: grid;
  width: 34px;
  min-height: 30px;
  place-items: center;
  padding: 0;
  background: #16716c;
  border: 0;
  border-radius: 8px;
}

.mic-button img {
  width: 17px;
  height: 17px;
}

.mic-button.listening {
  background: var(--cinnamon);
}

.voice-status {
  min-height: 18px;
  margin: -5px 0 0;
  color: #214541;
  font-size: 0.8rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(33, 69, 65, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 112px;
  overflow: hidden;
  padding: 12px 13px;
  resize: vertical;
  field-sizing: content;
}

input:focus,
textarea:focus {
  border-color: var(--turquoise-deep);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(91, 189, 183, 0.22);
}

input[readonly] {
  color: rgba(38, 49, 47, 0.72);
  background: rgba(255, 255, 255, 0.52);
}

.recipe-form.viewing-recipe {
  gap: 12px;
  padding-top: 14px;
}

.recipe-form.viewing-recipe > label {
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(33, 69, 65, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(38, 49, 47, 0.05);
}

.recipe-form.viewing-recipe input,
.recipe-form.viewing-recipe textarea {
  padding-right: 0;
  padding-left: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.recipe-form.viewing-recipe input {
  min-height: 28px;
}

.recipe-form.viewing-recipe textarea {
  min-height: 72px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.recipe-form.viewing-recipe input[readonly],
.recipe-form.viewing-recipe textarea[readonly] {
  color: var(--ink);
  background: transparent;
}

.recipe-form.viewing-recipe input:focus,
.recipe-form.viewing-recipe textarea:focus {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(91, 189, 183, 0.38);
  box-shadow: 0 0 0 3px rgba(91, 189, 183, 0.14);
}

.photo-upload-label {
  margin-top: 6px;
}

.photo-upload-button {
  display: grid;
  width: 112px;
  min-height: 36px;
  place-items: center;
  color: var(--white);
  background: #16716c;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.photo-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  opacity: 0;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.photo-preview[hidden],
.photo-modal[hidden] {
  display: none;
}

.photo-thumb-button {
  width: 112px;
  height: 84px;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(33, 69, 65, 0.18);
  border-radius: 8px;
}

.photo-thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 56px 20px 24px;
  background: rgba(20, 27, 25, 0.82);
}

.photo-modal img {
  max-width: min(96vw, 1100px);
  max-height: 86vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
}

.photo-modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--cream);
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}

.save-notification,
.new-recipe-notification,
.pick-recipe-notification,
.message-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 30;
  margin: 0;
  padding: 22px 32px;
  color: var(--white);
  background: var(--green-deep);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(108, 160, 90, 0.34);
  font-size: 1.35rem;
  font-weight: 900;
  opacity: 0;
  text-align: center;
  transform: translate(-50%, -46%);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.new-recipe-notification {
  background: var(--green-deep);
  box-shadow: 0 18px 48px rgba(108, 160, 90, 0.34);
}

.pick-recipe-notification {
  background: var(--green-deep);
  box-shadow: 0 18px 48px rgba(108, 160, 90, 0.34);
}

.message-notification {
  max-width: min(560px, calc(100vw - 32px));
  background: var(--green-deep);
  box-shadow: 0 18px 48px rgba(108, 160, 90, 0.34);
}

.message-notification p {
  margin: 0;
}

.message-notification-close {
  position: absolute;
  top: 8px;
  right: 10px;
  display: grid;
  width: 30px;
  min-height: 30px;
  place-items: center;
  padding: 0;
  color: var(--white);
  background: transparent;
  border: 0;
  font-size: 1.4rem;
  font-weight: 900;
}

.message-notification-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 14px;
  color: #214541;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
}

.save-notification.visible,
.new-recipe-notification.visible,
.pick-recipe-notification.visible,
.message-notification.visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.primary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.primary-button {
  color: var(--white);
  background: #16716c;
}

.ghost-button {
  color: #214541;
  background: rgba(255, 255, 255, 0.72);
}

.danger-button {
  color: var(--white);
  background: #b54436;
}

.recipes-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.authorized-chefs-list {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.authorized-chef-card {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 9px;
  color: var(--ink);
  background: rgba(214, 239, 197, 0.62);
  border: 1px solid rgba(69, 105, 54, 0.12);
  border-radius: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.authorized-chef-card strong {
  font-size: 0.74rem;
  line-height: 1.15;
}

.authorized-chef-card span {
  color: rgba(38, 49, 47, 0.64);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.authorized-chef-card.head-chef {
  background: rgba(217, 75, 43, 0.14);
  border-color: rgba(217, 75, 43, 0.24);
}

.authorized-chef-card.head-chef span {
  color: var(--cinnamon-dark);
}

.authorized-chef-card:hover,
.authorized-chef-card:focus-visible,
.authorized-chef-card.head-chef:hover,
.authorized-chef-card.head-chef:focus-visible {
  background: rgba(217, 75, 43, 0.2);
  box-shadow: 0 10px 20px rgba(111, 25, 24, 0.12);
  transform: translateY(-1px);
}

.chef-profile-panel {
  display: grid;
  gap: 10px;
  margin: 0 10px 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(33, 69, 65, 0.14);
  border-radius: 8px;
}

.chef-profile-panel[hidden] {
  display: none;
}

.chef-profile-heading,
.chef-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.chef-profile-heading h3 {
  margin: 0;
  font-size: 0.96rem;
}

.chef-profile-panel input {
  min-height: 36px;
}

.chef-profile-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.76rem;
}

.recipe-card {
  padding: 9px 10px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(69, 105, 54, 0.12);
}

.recipe-card strong {
  font-size: 0.78rem;
}

.recipe-card-title {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  line-height: 1.2;
}

.recipe-card-title strong {
  display: inline;
}

.recipe-card-title .new-recipe-tag {
  display: inline;
  color: #ff0000;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.recipe-card:hover,
.recipe-card.active {
  background: var(--white);
  box-shadow: 0 12px 30px rgba(67, 100, 45, 0.18);
}

.recipe-card span {
  color: rgba(38, 49, 47, 0.64);
}

.recipe-card p {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: rgba(38, 49, 47, 0.76);
  font-size: 0.88rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.empty-state {
  padding: 22px;
  color: rgba(38, 49, 47, 0.68);
  text-align: center;
  background: rgba(255, 255, 255, 0.48);
  border: 1px dashed rgba(69, 105, 54, 0.28);
  border-radius: 8px;
}

.print-recipe {
  display: none;
}

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

  .app-shell {
    grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
    align-items: start;
  }

  .cookbooks-panel,
  .recipe-panel {
    min-width: 0;
  }

  .recipes-panel,
  .authorized-chefs-panel {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .authorized-chefs-list {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

.directory-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(201, 243, 239, 0.72), transparent 32%),
    radial-gradient(circle at 82% 82%, rgba(214, 239, 197, 0.72), transparent 34%),
    var(--cream);
}

.directory-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 42px) 42px;
}

.directory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.directory-content {
  padding: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(109, 55, 30, 0.1);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(38, 49, 47, 0.1);
}

.directory-heading {
  margin-bottom: 16px;
}

.directory-heading h2,
.directory-heading p {
  margin: 0;
}

.directory-heading h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.directory-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.directory-list {
  display: grid;
  gap: 12px;
}

.directory-list.cookbooks-view,
.directory-list.recipes-view,
.directory-list.chefs-view {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.directory-card {
  min-height: 104px;
  padding: 16px;
  color: var(--ink);
  background: rgba(214, 239, 197, 0.72);
  border: 1px solid rgba(69, 105, 54, 0.14);
  border-radius: 8px;
  font: inherit;
  text-align: left;
}

.cookbook-directory-card {
  background: rgba(217, 75, 43, 0.14);
  border-color: rgba(217, 75, 43, 0.2);
}

.chef-directory-card {
  cursor: pointer;
}

.recipe-directory-card {
  cursor: pointer;
}

.cookbook-directory-card:hover,
.cookbook-directory-card:focus-visible,
.recipe-directory-card:hover,
.recipe-directory-card:focus-visible,
.chef-directory-card:hover,
.chef-directory-card:focus-visible {
  background: rgba(217, 75, 43, 0.2);
  box-shadow: 0 10px 24px rgba(217, 75, 43, 0.12);
  transform: translateY(-1px);
}

.directory-profile-panel {
  margin: 16px 0 0;
}

.directory-card h3,
.directory-card p {
  margin: 0;
}

.directory-card h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.directory-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

@media print {
  body {
    color: #1f2422;
    background: #ffffff;
  }

  .login-screen,
  .app-content,
  .flash,
  .shopping-list-page .admin-header,
  .shopping-list-form,
  .shopping-list-page .voice-status,
  .clear-shopping-list,
  .message-form,
  .shopping-list-item button {
    display: none !important;
  }

  .recipe-detail-page .admin-header,
  .recipe-detail-actions {
    display: none !important;
  }

  .shopping-list-page {
    display: block;
    width: 100%;
    max-width: 720px;
    padding: 28px;
  }

  .shopping-list-section {
    padding: 0;
    background: #fff;
    border: 0;
    box-shadow: none;
  }

  .shopping-list-print-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #d7ddd9;
  }

  .shopping-list-print-header img {
    width: 58px;
    height: 58px;
    object-fit: contain;
  }

  .shopping-list-print-header p {
    margin: 0 0 3px;
    color: #8f2418;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .shopping-list-print-header h1 {
    margin: 0;
    color: #1f2422;
    font-size: 25px;
    line-height: 1.15;
  }

  .shopping-list-item {
    grid-template-columns: 1fr;
    padding: 8px 0;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #d7ddd9;
  }

  .message-card {
    break-inside: avoid;
    background: #fff;
    border-color: #d7ddd9;
    box-shadow: none;
  }

  .print-recipe {
    display: block;
    max-width: 720px;
    margin: 0 auto;
    padding: 28px;
    font-family: Georgia, "Times New Roman", serif;
  }

  .print-recipe-page {
    display: flex;
    min-height: calc(100vh - 56px);
    flex-direction: column;
    break-after: page;
    page-break-after: always;
  }

  .print-recipe-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .print-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-family:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
    font-weight: 800;
  }

  .print-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
  }

  .print-photo-block {
    margin-top: auto;
    padding-top: 24px;
  }

  .print-photo {
    display: block;
    width: 112px;
    height: 84px;
    object-fit: cover;
  }

  .print-cookbook,
  .print-chef {
    margin-bottom: 12px;
    color: #4d5a55;
    font-family:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
  }

  .print-recipe h1 {
    margin-bottom: 12px;
    font-size: 30px;
    line-height: 1.15;
  }

  .print-recipe h2 {
    margin: 24px 0 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #d7ddd9;
    font-family:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
    font-size: 15px;
  }

  .print-recipe p {
    font-size: 13px;
    line-height: 1.55;
  }
}

@media (max-width: 760px) {
  .app-header {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 18px 14px;
  }

  .apple-logo {
    width: 58px;
    height: 58px;
  }

  .login-layout {
    grid-template-columns: 1fr;
  }

  .landing-cookbook-home {
    min-height: 100svh;
    padding: 84px 14px 38px;
  }

  .landing-cookbook-home .login-layout {
    gap: 18px;
  }

  .landing-cookbook-scene {
    min-height: clamp(260px, 46vh, 360px);
  }

  .recipe-paper {
    width: 76px;
    min-height: 74px;
    padding: 10px 9px;
  }

  .cookbook-cover span {
    right: 16px;
    bottom: 16px;
    left: 16px;
  }

  .landing-tagline {
    max-width: 330px;
    font-size: 1rem;
  }

  .landing-cookbook-home:not(.landing-auth-home) .landing-kicker,
  .landing-cookbook-home:not(.landing-auth-home) .login-card h1,
  .landing-cookbook-home:not(.landing-auth-home) .landing-tagline {
    transform: translateX(12px);
  }

  .landing-auth-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    margin-top: -24px;
  }

  .landing-auth-layout .login-card,
  .landing-auth-layout .login-welcome-panel {
    justify-items: center;
    text-align: center;
  }

  .landing-auth-home .landing-cookbook-scene {
    min-height: clamp(225px, 36vh, 285px);
  }

  .landing-auth-layout .login-card h1 {
    font-size: clamp(2.1rem, 11.5vw, 3.45rem);
  }

  .landing-auth-layout .landing-tagline {
    max-width: 350px;
  }

  .landing-auth-panel {
    width: min(360px, 100%);
  }

  .login-screen.login-panel-open .login-card {
    grid-template-columns: 1fr;
  }

  .landing-chefs-panel {
    min-height: auto;
  }

  .landing-chefs-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-header,
  .directory-header,
  .head-chef-admin-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .spices-page {
    padding: 16px 12px 28px;
  }

  .spices-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .spices-list-panel,
  .spices-detail-panel {
    padding: 14px;
  }

  .spices-list-panel .admin-section-heading,
  .spices-detail-panel .admin-section-heading {
    align-items: center;
    margin-bottom: 12px;
  }

  .spices-list-panel h2,
  .spices-detail-panel h2 {
    font-size: 1.35rem;
  }

  .spice-list {
    gap: 7px;
  }

  .spice-card {
    min-height: 42px;
    padding: 9px 10px;
  }

  .spice-form {
    gap: 10px;
  }

  .spice-name-input {
    max-width: none;
    min-height: 38px;
  }

  .spice-form textarea {
    min-height: 150px;
  }

  .spice-view {
    padding: 14px;
  }

  .reference-board {
    padding: 18px;
  }

  .reference-board-heading {
    min-height: 62px;
  }

  .reference-add-button {
    width: 46px;
    min-width: 46px;
    height: 46px;
    font-size: 2rem;
  }

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

  .reference-card {
    min-height: 64px;
    padding: 13px 12px;
    gap: 10px;
  }

  .reference-card span {
    font-size: 0.84rem;
  }

  .reference-form-panel {
    margin: 26px 0 0;
  }

  .reference-entry-form textarea {
    min-height: 240px;
  }

  .reference-form-actions .primary-button,
  .reference-form-actions .ghost-button {
    flex: 1 1 150px;
  }

  .admin-header-actions .directory-nav,
  .directory-header-actions .directory-nav {
    flex: 1 1 190px;
  }

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

  .welcome-template-form,
  .welcome-template-details {
    grid-template-columns: 1fr;
  }

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

  .message-form .primary-button {
    width: 100%;
  }

  .chef-editor {
    grid-template-columns: 1fr;
  }

  .chef-editor-heading,
  .chef-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .chef-list {
    grid-template-columns: 1fr;
  }

  .chef-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .chef-card-actions {
    justify-content: flex-start;
  }

  .cookbook-admin-list {
    grid-template-columns: 1fr;
  }

  .cookbook-admin-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .cookbook-admin-card-actions {
    justify-content: flex-start;
  }

  .header-note {
    font-size: 0.92rem;
  }

  .app-shell {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px 12px 24px;
  }

  .cookbooks-panel,
  .recipes-panel,
  .recipe-panel {
    grid-column: 1;
    width: 100%;
  }

  .directory-cookbook-mode .app-shell,
  .directory-recipe-open-mode .app-shell,
  .add-recipe-focus-mode .app-shell,
  .recipe-open-mode .app-shell,
  .mobile-new-recipe-mode .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .mobile-new-recipe-mode .cookbooks-panel,
  .mobile-new-recipe-mode .recipes-panel,
  .mobile-new-recipe-mode .authorized-chefs-panel {
    display: none;
  }

  .recipe-open-mode .recipe-panel {
    display: grid;
    width: 100%;
  }

  .recipe-open-mode .mobile-cookbooks-button {
    display: inline-flex;
    align-items: center;
  }

  .panel {
    min-height: auto;
    overflow: visible;
  }

  .recipe-panel {
    overflow: visible;
  }

  #about-recipe,
  #ingredients,
  #directions {
    min-height: 120px;
    overflow: hidden;
  }

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

  .cookbook-item {
    grid-template-columns: 1fr 38px;
  }

  .cookbook-button {
    min-height: 54px;
  }

  .cookbook-print-button {
    width: 38px;
    height: 38px;
  }

  .cookbook-print-button img {
    width: 25px;
    height: 25px;
  }

  .directory-list.cookbooks-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .brand {
    align-items: center;
    gap: 10px;
  }

  .brand h1 {
    font-size: 1.7rem;
    line-height: 1.05;
  }

  .apple-logo {
    width: 52px;
    height: 52px;
  }

  .chef-input-row {
    grid-template-columns: 1fr;
  }

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

  .shopping-list-form,
  .clipper-form,
  .message-form,
  .shopping-list-item {
    grid-template-columns: 1fr;
  }

  .clipper-form button {
    width: 100%;
  }

  .cookbook-list {
    grid-template-columns: 1fr;
  }

  .directory-list.cookbooks-view,
  .directory-list.recipes-view,
  .directory-list.chefs-view {
    grid-template-columns: 1fr;
  }

  .reference-card-grid {
    grid-template-columns: 1fr;
  }

  .reference-board-heading {
    align-items: center;
  }

  .reference-form-actions {
    justify-content: stretch;
  }

  .reference-form-actions .primary-button,
  .reference-form-actions .ghost-button {
    width: 100%;
  }

  .panel-heading,
  .recipe-form {
    padding: 14px;
  }
}

.rails-dashboard-mode .app-shell {
  grid-template-columns: minmax(250px, 0.48fr) minmax(520px, 1fr);
  width: min(1760px, 100%);
}

.recipe-studio-mode .recipe-panel,
.recipe-studio-mode .authorized-chefs-panel {
  display: none;
}

.recipe-studio-mode .recipes-panel {
  min-height: calc(100vh - 142px);
}

.recipe-list-heading {
  align-items: center;
  flex-wrap: wrap;
}

.add-recipe-button {
  white-space: nowrap;
}

.recipe-studio-mode .recipes-list {
  gap: 10px;
  padding: 12px;
}

.recipe-studio-mode .recipe-card {
  display: flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
}

.recipe-studio-mode .recipe-card.active {
  background: var(--white);
  box-shadow: 0 12px 30px rgba(67, 100, 45, 0.18);
}

.recipe-studio-mode .recipe-card-title {
  margin-top: 0;
}

.recipe-studio-mode .new-recipe-tag {
  margin-top: 0;
}

.recipe-entry-mode .app-shell {
  grid-template-columns: minmax(210px, 0.36fr) minmax(520px, 1fr) minmax(230px, 0.36fr);
}

.recipe-entry-mode .recipe-panel {
  display: block;
  min-height: calc(100vh - 142px);
  overflow: visible;
  background: var(--turquoise);
}

.recipe-entry-mode .recipe-form {
  max-height: none;
  overflow: visible;
}

.recipe-entry-mode .recipes-panel {
  min-height: calc(100vh - 142px);
}

.cookbook-print-shell {
  width: min(980px, 100%);
}

.cookbook-print-actions {
  margin-bottom: 18px;
}

.cookbook-print-recipes {
  display: grid;
  gap: 18px;
}

.cookbook-print-recipe {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(33, 69, 65, 0.12);
}

.cookbook-print-recipe:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.cookbook-print-recipe .print-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.cookbook-print-recipe .print-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.cookbook-print-recipe h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.cookbook-print-recipe h2 {
  margin: 20px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(33, 69, 65, 0.12);
  font-family: inherit;
  font-size: 0.98rem;
}

.cookbook-print-recipe p {
  line-height: 1.55;
}

@media print {
  .cookbook-print-page .admin-header,
  .cookbook-print-actions {
    display: none !important;
  }

  .cookbook-print-page .admin-shell {
    width: 100%;
    max-width: 720px;
    padding: 0;
  }

  .cookbook-print-page .admin-section {
    padding: 0;
    background: #ffffff;
    border: 0;
    box-shadow: none;
  }

  .cookbook-print-page .cookbook-print-recipes {
    display: block;
  }

  .cookbook-print-page .cookbook-print-recipe {
    display: flex;
    min-height: calc(100vh - 56px);
    flex-direction: column;
    padding: 28px;
    border: 0;
    break-after: page;
    font-family: Georgia, "Times New Roman", serif;
    page-break-after: always;
  }

  .cookbook-print-page .cookbook-print-recipe:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .cookbook-print-page .cookbook-print-recipe .print-brand {
    margin-bottom: 24px;
    font-family:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
  }

  .cookbook-print-page .cookbook-print-recipe .print-brand img {
    width: 54px;
    height: 54px;
  }

  .cookbook-print-page .cookbook-print-recipe h1 {
    margin-bottom: 12px;
    font-size: 30px;
    line-height: 1.15;
  }

  .cookbook-print-page .cookbook-print-recipe h2 {
    margin: 24px 0 8px;
    border-color: #d7ddd9;
    font-family:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
    font-size: 15px;
  }

  .cookbook-print-page .cookbook-print-recipe p {
    font-size: 13px;
    line-height: 1.55;
  }

  .cookbook-print-page .print-photo-block {
    margin-top: auto;
    padding-top: 24px;
  }
}

.recipe-detail-page {
  width: min(980px, 100%);
}

.recipe-show {
  margin: 0;
  max-width: none;
}

.recipe-show section {
  margin-top: 22px;
}

.recipe-show section h2 {
  margin-bottom: 8px;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(33, 69, 65, 0.18);
  border-radius: 8px;
  font: inherit;
}

a.cookbook-button,
a.recipe-card,
a.authorized-chef-card,
a.directory-card,
a.primary-button,
a.ghost-button,
a.landing-login-toggle,
a.landing-button {
  text-decoration: none;
}

.button-row form {
  display: inline-flex;
}

.button-row .button_to {
  display: inline-flex;
}

.photo-thumb-image {
  display: block;
  width: 112px;
  height: 84px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(33, 69, 65, 0.18);
  border-radius: 8px;
}

.recipe-detail-photo-button {
  margin: 18px 0 0;
}

.static-field span {
  display: block;
  min-height: 46px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(33, 69, 65, 0.12);
  border-radius: 8px;
}

.recipe-panel > .form-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, max-content));
  gap: 10px;
  align-items: stretch;
  padding: 0 18px 18px;
}

.recipe-panel > .form-actions .button_to,
.recipe-panel > .form-actions form {
  display: contents;
}

.recipe-panel > .form-actions .primary-button,
.recipe-panel > .form-actions .ghost-button,
.recipe-panel > .form-actions .danger-button {
  display: inline-flex;
  min-width: 128px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  white-space: nowrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label input {
  width: auto;
  min-height: auto;
}

.auth-entry-panel {
  display: grid;
  max-height: calc(100vh - 106px);
  overflow: auto;
}

.start-kitchen-panel {
  width: min(380px, calc(100vw - 44px));
}

.auth-entry-panel p {
  margin: 0;
  text-align: center;
}

.auth-entry-panel a {
  color: #214541;
  font-weight: 900;
}

.password-field-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.4;
}

.chef-card strong {
  display: block;
  line-height: 1.15;
}

.chef-card .button-row:not(.chef-card-actions) {
  justify-content: flex-end;
}

.admin-section .recipe-form,
.directory-content .recipe-form {
  padding: 0;
}

.flash {
  position: relative;
  z-index: 40;
}

@media (max-width: 1180px) {
  .rails-dashboard-mode .app-shell {
    grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  }

  .recipe-entry-mode .recipes-panel {
    grid-column: 1 / -1;
  }

  .rails-dashboard-mode .authorized-chefs-panel {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .rails-dashboard-mode .app-shell {
    grid-template-columns: 1fr;
  }

  .rails-dashboard-mode .studio-scroll-icon {
    display: inline-flex;
  }

  .rails-dashboard-mode .recipe-heading-actions {
    align-items: center;
    flex-wrap: nowrap;
  }

  .rails-dashboard-mode .recipe-form {
    max-height: none;
  }

  .auth-entry-panel {
    position: static;
    width: min(430px, calc(100vw - 44px));
  }
}

@media (min-width: 481px) and (max-width: 760px) {
  .rails-home .login-card h1 {
    font-size: clamp(1.95rem, 7.4vw, 2.8rem);
    line-height: 1.08;
  }
}
