body {
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    margin: 0;
    padding: 0;
    color: #111827;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

h1 {
    margin-top: 0;
}

h2 {
    margin-top: 0;
    font-size: 22px;
}

form {
    margin-top: 25px;
}

.recipe-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-section {
    padding: 22px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.full-width {
    grid-column: 1 / -1;
}

label {
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
}

textarea {
    min-height: 95px;
    resize: vertical;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.checkbox-grid label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-grid input {
    width: auto;
    margin: 0;
}

button,
.button-link {
    display: inline-block;
    align-self: flex-start;
    background: #2f6fed;
    color: white;
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    font-size: 16px;
}

button:hover,
.button-link:hover {
    background: #245bd1;
}

.recipe-box {
    background: #f2f2f2;
    padding: 20px;
    border-radius: 8px;
    white-space: pre-wrap;
}

pre {
    white-space: pre-wrap;
    font-family: Arial, sans-serif;
}

.error {
    background: #ffe5e5;
    color: #9b0000;
    padding: 12px;
    border-radius: 8px;
    margin-top: 20px;
}

.loader {
    border: 6px solid #f2f2f2;
    border-top: 6px solid #2f6fed;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    animation: spin 1s linear infinite;
    margin: 25px 0;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 700px) {
    .container {
        margin: 20px;
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

.recipe-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}

.form-section {
    padding: 22px !important;
    background: #f8fafc !important;
    border-radius: 14px !important;
    border: 1px solid #e5e7eb !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

.form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
}

.form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.full-width {
    grid-column: 1 / -1 !important;
}

.checkbox-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
}

.checkbox-grid label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 400 !important;
}

.checkbox-grid input {
    width: auto !important;
    margin: 0 !important;
}

input,
select,
textarea {
    width: 100% !important;
    box-sizing: border-box !important;
}

button {
    width: fit-content !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: #071127;
  background: #ffffff;
}

.landing-page {
  min-height: 100vh;
  padding: 42px 56px 64px;
  background:
    radial-gradient(circle at 78% 42%, rgba(112, 88, 255, 0.13), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 72%, #fafbff 100%);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 80px;
}

.brand img {
  height: 58px;
  width: auto;
}

.recipe-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border: 1px solid #d9deea;
  border-radius: 999px;
  color: #071127;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 30px rgba(18, 32, 74, 0.06);
}

.recipe-button:hover {
  border-color: #6b5cff;
  box-shadow: 0 12px 36px rgba(83, 81, 255, 0.15);
}

.hero {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  align-items: center;
  gap: 36px;
}

.hero-text h1 {
  margin: 0 0 32px;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.hero-text h1 span {
  background: linear-gradient(90deg, #7446ff, #31a8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text p {
  max-width: 560px;
  margin: 0;
  font-size: 26px;
  line-height: 1.75;
  color: #64708a;
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  display: block;
  border-radius: 30px;
  object-fit: cover;
  mask-image: linear-gradient(to left, black 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, black 72%, transparent 100%);
}

.feature-cards {
  max-width: 960px;
  margin: 80px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.feature-card {
  min-height: 240px;
  padding: 44px 48px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #edf0f7;
  box-shadow: 0 20px 60px rgba(18, 32, 74, 0.08);
  text-align: center;
}

.feature-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin: 0 auto 26px;
  border-radius: 50%;
  font-size: 34px;
}

.feature-icon.purple {
  background: #efe7ff;
}

.feature-icon.green {
  background: #e5f8f0;
}

.feature-card h2 {
  margin: 0 0 16px;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.feature-card p {
  margin: 0;
  color: #64708a;
  font-size: 20px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .landing-page {
    padding: 28px 22px 48px;
  }

  .site-header {
    margin-bottom: 48px;
  }

  .brand img {
    height: 44px;
  }

  .recipe-button {
    padding: 12px 18px;
    font-size: 15px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-text p {
    font-size: 20px;
  }

  .hero-image img {
    mask-image: none;
    -webkit-mask-image: none;
  }

  .feature-cards {
    grid-template-columns: 1fr;
    margin-top: 48px;
  }
}

.recipe-page {
  min-height: 100vh;
  padding: 36px 24px 56px;
  background:
    radial-gradient(circle at 85% 15%, rgba(112, 88, 255, 0.13), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  color: #071127;
}

.recipe-header {
  max-width: 860px;
  margin: 0 auto 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recipe-logo img {
  height: 54px;
  width: auto;
}

.home-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid #dbe1ee;
  border-radius: 999px;
  color: #071127;
  text-decoration: none;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 34px rgba(18, 32, 74, 0.06);
}

.recipe-hero {
  max-width: 860px;
  margin: 0 auto 28px;
}

.recipe-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(44px, 8vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.recipe-hero h1 span {
  background: linear-gradient(90deg, #7446ff, #31a8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.recipe-hero p {
  max-width: 650px;
  margin: 0;
  font-size: 22px;
  line-height: 1.55;
  color: #64708a;
}

.recipe-form {
  max-width: 860px;
  margin: 0 auto;
}

.recipe-card {
  margin-bottom: 18px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e7ebf3;
  box-shadow: 0 18px 50px rgba(18, 32, 74, 0.07);
}

.recipe-card h2 {
  margin: 0 0 20px;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.upload-box {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 230px;
  padding: 32px 24px;
  border: 2px dashed #cdbdff;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #fbf9ff);
  text-align: center;
  cursor: pointer;
}

.upload-box input {
  display: none;
}

.upload-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #efe7ff;
  font-size: 34px;
}

.upload-box strong {
  font-size: 24px;
}

.upload-box span {
  color: #64708a;
  font-size: 18px;
}

.recipe-card input[type="email"],
.recipe-card input[type="text"],
.recipe-card select,
.recipe-card textarea {
  width: 100%;
  border: 1px solid #d6deeb;
  border-radius: 14px;
  padding: 15px 16px;
  font-size: 17px;
  font-family: inherit;
  background: #ffffff;
  color: #071127;
}

.recipe-card textarea {
  min-height: 110px;
  resize: vertical;
}

.preferences-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preferences-card summary::-webkit-details-marker {
  display: none;
}

.preferences-card summary::after {
  content: "⌄";
  font-size: 28px;
  font-weight: 800;
}

.preferences-card[open] summary::after {
  content: "⌃";
}

.preferences-card summary h2 {
  margin-bottom: 6px;
}

.preferences-card summary p {
  margin: 0;
  color: #64708a;
  font-size: 17px;
}

.preferences-grid,
.textarea-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.preferences-grid label,
.textarea-grid label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.checkbox-section {
  margin-top: 26px;
}

.checkbox-section h3 {
  margin: 0 0 14px;
  font-size: 19px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
}

.checkbox-grid label {
  color: #26324a;
  font-size: 17px;
}

.checkbox-grid input {
  margin-right: 8px;
}

.generate-button {
  width: 100%;
  margin: 22px 0 36px;
  padding: 24px 28px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(90deg, #743cff, #2fa8ff);
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 48px rgba(70, 96, 255, 0.28);
}

.generate-button:hover {
  transform: translateY(-2px);
}

.auth-code-form {
  max-width: 560px;
}

.recipe-card .verification-code-input {
  margin-top: 10px;
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
}

.auth-message {
  padding: 12px 14px;
  border-radius: 12px;
  background: #eaf8ef;
  color: #17643a;
}

.auth-secondary-form,
.auth-restart-link {
  text-align: center;
}

.auth-link-button {
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.auth-restart-link {
  margin-top: 22px;
}

.legacy-login-fallback {
  margin-top: -12px;
  text-align: center;
  color: #64708a;
}

.legacy-login-fallback summary {
  cursor: pointer;
}

.legacy-login-fallback .auth-link-button {
  margin-top: 12px;
}

.coming-soon {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.coming-soon h2 {
  margin: 0 0 24px;
  color: #64708a;
  font-size: 22px;
}

.coming-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.coming-grid div {
  padding: 24px 18px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #edf0f7;
  box-shadow: 0 14px 40px rgba(18, 32, 74, 0.06);
}

.coming-grid span {
  display: block;
  font-size: 34px;
  margin-bottom: 14px;
}

.coming-grid strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.coming-grid p {
  margin: 0;
  color: #64708a;
}

@media (max-width: 700px) {
  .recipe-page {
    padding: 28px 18px 48px;
  }

  .recipe-header {
    margin-bottom: 36px;
  }

  .recipe-logo img {
    height: 42px;
  }

  .home-button {
    padding: 11px 18px;
    font-size: 15px;
  }

  .recipe-hero h1 {
    font-size: 48px;
  }

  .recipe-hero p {
    font-size: 20px;
  }

  .recipe-card {
    padding: 22px;
    border-radius: 24px;
  }

  .recipe-card h2 {
    font-size: 24px;
  }

  .preferences-grid,
  .textarea-grid,
  .checkbox-grid,
  .coming-grid {
    grid-template-columns: 1fr;
  }

  .upload-box {
    min-height: 210px;
  }

  .generate-button {
    margin-top: 20px;
    font-size: 22px;
    padding: 22px;
  }
}

.mode-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.mode-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px;
  border: 1px solid #e1e7f2;
  border-radius: 22px;
  background: #ffffff;
  cursor: pointer;
}

.mode-option:hover {
  border-color: #8b7cff;
  box-shadow: 0 14px 34px rgba(18, 32, 74, 0.08);
}

.mode-option input {
  width: auto !important;
  margin-top: 6px;
}

.mode-option strong {
  display: block;
  font-size: 21px;
  margin-bottom: 8px;
}

.mode-option span {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #efe7ff;
  color: #7446ff;
  font-size: 14px;
  font-weight: 800;
}

.mode-option p {
  margin: 0;
  color: #64708a;
  font-size: 17px;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .mode-options {
    grid-template-columns: 1fr;
  }
}

.mode-intro {
  margin: 0 0 22px;
  color: #64708a;
  font-size: 18px;
}

.mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mode-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid #e1e7f2;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  cursor: pointer;
  min-height: 150px;
}

.mode-option:hover {
  border-color: #8b7cff;
  box-shadow: 0 14px 34px rgba(18, 32, 74, 0.08);
}

.mode-option input[type="radio"] {
  width: 20px !important;
  height: 20px;
  margin: 3px 0 0;
  accent-color: #7446ff;
}

.mode-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mode-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mode-title-row strong {
  font-size: 22px;
  line-height: 1.2;
}

.mode-title-row span {
  padding: 5px 11px;
  border-radius: 999px;
  background: #efe7ff;
  color: #7446ff;
  font-size: 13px;
  font-weight: 900;
}

.mode-content p {
  margin: 0;
  color: #64708a;
  font-size: 17px;
  line-height: 1.45;
}

.mode-option:has(input[type="radio"]:checked) {
  border-color: #7446ff;
  box-shadow: 0 16px 38px rgba(116, 70, 255, 0.14);
  background: linear-gradient(180deg, #ffffff, #f8f5ff);
}

@media (max-width: 700px) {
  .mode-options {
    grid-template-columns: 1fr;
  }
}

.mode-badge {
  display: inline-block;
  margin-top: 8px;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #efe7ff;
  color: #7446ff;
  font-size: 13px;
  font-weight: 800;
}

.upload-box.selected {
  border-color: #22c55e !important;
  background: linear-gradient(180deg, #f0fdf4, #ffffff) !important;
}

.upload-box.selected .upload-icon {
  background: #dcfce7;
}

.upload-box.selected strong {
  color: #15803d;
}

.hidden {
  display: none;
}

.video-note {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #7b849b;
    font-weight: 500;
    text-align: center;
    background: none;
    padding: 0;
}

/* Interactive recipe split-screen override */

.recipe-page {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 1.25rem !important;
}

.recipe-hero {
  max-width: 700px !important;
  margin: 1rem auto 2rem auto !important;
}

.recipe-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem) !important;
  line-height: 1.05 !important;
}

.recipe-hero h1 span {
  font-size: clamp(1.8rem, 3.5vw, 3rem) !important;
}

.interactive-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr) !important;
  gap: 1.5rem !important;
  align-items: start !important;
}

.interactive-layout .recipe-card {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
}

.recipe-card pre {
  font-family: inherit !important;
  font-size: 1rem !important;
  line-height: 1.7 !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
}

#recipeQuestion {
   margin-top: 16px;
  width: 100% !important;
  min-height: 120px !important;
}

@media (max-width: 900px) {
  .interactive-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Interactive recipe split-screen final override */

.interactive-layout {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  align-items: start !important;
}

.interactive-layout > .recipe-card {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.interactive-layout pre {
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  font-size: 1rem !important;
  line-height: 1.7 !important;
  font-family: inherit !important;
}

@media (max-width: 900px) {
  .interactive-layout {
    grid-template-columns: 1fr !important;
  }
}

.recipe-card:last-child {
    position: sticky;
    top: 20px;
    box-shadow: 0 8px 24px rgba(91,108,255,0.15);
}
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {

    .quick-actions {
        gap: 12px;
        margin-bottom: 24px;
    }

    .quick-action {
        min-height: 52px;
        padding: 12px 18px;
    }

}

#askRecipeButton {
    margin-top: 20px;
    padding: 12px 24px;
    border-radius: 999px;
}

#recipeAnswerText {
    line-height: 1.8;
    white-space: pre-wrap;
}

#recipeQuestion {
    margin-top: 18px;
}

.chat-history {
    margin-top: 18px;
    margin-bottom: 18px;
}

.loading-card {
    max-width: 640px;
    margin: 80px auto;
    text-align: center;
}

.loading-card h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.loading-subtitle {
    font-size: 1.05rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.loading-status {
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.25rem;
}

.loading-note {
    margin-top: 1.25rem;
    color: #6b7280;
}

.loader {
    margin: 1.5rem auto;
}

.home-button.disabled-button {
    background: #e9edf5 !important;
    color: #7a879c !important;
    border: 1px solid #d6deeb !important;
    pointer-events: none;
    cursor: not-allowed;
    box-shadow: none !important;
}

.loader-hidden {
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-greeting {
  font-weight: 700;
  color: #071127;
}

.logout-form {
  margin: 0;
}

.logout-form .home-button {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.delivery-email {
  padding: 14px 16px;
  border: 1px solid #dce4f2;
  border-radius: 14px;
  background: #ffffff;
}

.delivery-email-main {
  font-weight: 800;
  color: #071127;
  margin-bottom: 6px;
}

.delivery-email-note {
  color: #53627c;
  margin-bottom: 10px;
}

.delivery-email a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.recipe-list {
    display: grid;
    gap: 18px;
}

.saved-recipe-card {
    border: 1px solid rgba(120, 72, 35, 0.18);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.saved-recipe-card h2 {
    margin-top: 0;
}

.recipe-date {
    margin-bottom: 16px;
    opacity: 0.75;
}

/* ======================================================================
   Saved recipe page header
   ====================================================================== */

.recipe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.recipe-logo {
    display: block;
    flex-shrink: 0;
}

.recipe-logo img {
    display: block;
    width: min(310px, 36vw);
    height: auto;
}

.welcome-user {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    color: #14203a;
}

.header-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.logout-form {
    display: contents;
}

.header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 10px 16px;

    border: 1px solid rgba(30, 43, 73, 0.14);
    border-radius: 999px;

    background: #ffffff;
    color: #14203a;

    font: inherit;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;
    box-shadow: 0 6px 18px rgba(40, 51, 91, 0.07);
}

.header-button:hover {
    transform: translateY(-1px);
}

.header-button-primary {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(
        135deg,
        #6958ff,
        #2f9ff8
    );
}


/* ======================================================================
   Recipe heading
   ====================================================================== */

.recipe-hero {
    margin: 54px 0 34px;
}

.recipe-eyebrow,
.chat-eyebrow {
    margin: 0 0 8px;
    color: #6c7487;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.recipe-hero h1 {
    margin: 0;
    max-width: 900px;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    line-height: 1.02;

    background: linear-gradient(
        90deg,
        #6d50ff,
        #2ea9f8
    );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.recipe-created-date {
    margin: 20px 0 0;
    color: #748099;
    font-size: 1rem;
}


/* ======================================================================
   Rating card
   ====================================================================== */

.recipe-rating-card {
    margin-bottom: 28px;
    padding: 24px;

    border: 1px solid rgba(98, 82, 255, 0.12);
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 38px rgba(66, 53, 143, 0.08);
}

.rating-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.rating-heading h2 {
    margin: 0 0 6px;
    color: #101a31;
}

.rating-heading p {
    margin: 0;
    color: #68738a;
}

.rating-status {
    min-height: 24px;
    color: #4f46d8;
    font-weight: 800;
    white-space: nowrap;
}

.star-rating {
    display: flex;
    gap: 6px;
    margin-top: 18px;
}

.rating-star {
    padding: 0;
    border: 0;
    background: transparent;

    color: #cbd0dc;
    font-size: clamp(2.3rem, 8vw, 3.1rem);
    line-height: 1;

    cursor: pointer;
    transition:
        transform 0.15s ease,
        color 0.15s ease;
}

.rating-star:hover,
.rating-star.selected {
    color: #ffc43d;
}

.rating-star:hover {
    transform: scale(1.1);
}

.rating-star:disabled {
    cursor: wait;
    opacity: 0.7;
}

.rating-summary {
    margin: 12px 0 0;
    color: #68738a;
    font-size: 0.95rem;
}


/* ======================================================================
   Recipe and chat layout
   ====================================================================== */

.interactive-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
    align-items: start;
    gap: 28px;
}

.recipe-card {
    min-width: 0;
    padding: 30px;

    border: 1px solid rgba(38, 50, 86, 0.08);
    border-radius: 28px;

    background: #ffffff;
    box-shadow: 0 18px 44px rgba(55, 54, 110, 0.07);
}

.recipe-card h2 {
    margin-top: 0;
    color: #101a31;
}

.recipe-content-card pre {
    margin: 0;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}


/* ======================================================================
   Daddy's AI chat
   ====================================================================== */

.recipe-chat-card {
    position: sticky;
    top: 20px;
}

.chat-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.chat-card-heading h2 {
    margin-bottom: 0;
}

.chat-status-dot {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #25bf77;
    box-shadow: 0 0 0 5px rgba(37, 191, 119, 0.12);
}

.chat-introduction {
    margin: 12px 0 18px;
    color: #68738a;
    line-height: 1.55;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.quick-action {
    padding: 9px 12px;
    border: 1px solid rgba(93, 78, 235, 0.15);
    border-radius: 999px;

    background: #f5f3ff;
    color: #3c347e;

    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;

    cursor: pointer;
}

.quick-action:hover {
    background: #ece8ff;
}

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 12px;

    min-height: 180px;
    max-height: 420px;
    padding: 14px;
    margin-bottom: 14px;

    overflow-y: auto;

    border: 1px solid rgba(35, 47, 78, 0.1);
    border-radius: 18px;
    background: #f8f9fe;
}

.chat-message {
    max-width: 92%;
    padding: 12px 14px;
    border-radius: 16px;
}

.chat-message strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
}

.chat-message pre,
.chat-message p {
    margin: 0;
    font-family: inherit;
    font-size: 0.94rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ai-message {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid rgba(66, 51, 173, 0.1);
}

.user-message {
    align-self: flex-end;
    color: #ffffff;
    background: linear-gradient(
        135deg,
        #6554f5,
        #2d99ed
    );
}

.chat-input-area {
    display: grid;
    gap: 10px;
}

#recipeQuestion {
    width: 100%;
    min-height: 96px;
    box-sizing: border-box;
    resize: vertical;

    padding: 14px 15px;
    border: 1px solid rgba(34, 47, 80, 0.16);
    border-radius: 16px;

    font: inherit;
    line-height: 1.45;
}

#recipeQuestion:focus {
    outline: 3px solid rgba(98, 82, 255, 0.12);
    border-color: #6757f5;
}

.ask-recipe-button {
    width: 100%;
    min-height: 48px;

    border: 0;
    border-radius: 15px;

    color: #ffffff;
    background: linear-gradient(
        135deg,
        #6756f5,
        #299df3
    );

    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.ask-recipe-button:disabled {
    cursor: wait;
    opacity: 0.7;
}


/* Hide labels visually while keeping them available to screen readers. */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ======================================================================
   Mobile layout
   ====================================================================== */

@media (max-width: 820px) {

    .recipe-page {
        padding-left: 18px;
        padding-right: 18px;
    }

    .recipe-header {
        align-items: flex-start;
        gap: 14px;
        padding: 18px 0;
    }

    .header-brand {
        display: block;
        flex: 1;
    }

    .recipe-logo img {
        width: 190px;
        max-width: 100%;
    }

    .welcome-user {
        margin-top: 7px;
        font-size: 0.88rem;
    }

    .header-buttons {
        display: grid;
        grid-template-columns: repeat(2, auto);
        gap: 7px;
    }

    .header-button {
        min-height: 38px;
        padding: 8px 11px;
        font-size: 0.78rem;
    }

    .logout-form {
        display: block;
        grid-column: 2;
    }

    .logout-form .header-button {
        width: 100%;
    }

    .recipe-hero {
        margin: 38px 0 26px;
    }

    .interactive-layout {
        grid-template-columns: 1fr;
    }

    .recipe-chat-card {
        position: static;
    }

    .recipe-card,
    .recipe-rating-card {
        padding: 22px;
        border-radius: 22px;
    }

}


@media (max-width: 520px) {

    .recipe-header {
        display: block;
    }

    .header-brand {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .welcome-user {
        margin-top: 0;
        text-align: right;
    }

    .header-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        margin-top: 14px;
    }

    .header-button {
        width: 100%;
        height: 100%;
        padding: 9px 6px;
        font-size: 0.74rem;
    }

    .logout-form {
        display: block;
        grid-column: auto;
    }

    .header-button span:first-child {
        display: none;
    }

    .rating-heading {
        display: block;
    }

    .rating-status {
        margin-top: 10px;
    }

    .star-rating {
        justify-content: space-between;
    }

    .recipe-card,
    .recipe-rating-card {
        padding: 18px;
    }

}

/* ======================================================================
   My Recipes page
   ====================================================================== */

.my-recipes-introduction {
    max-width: 650px;
    margin: 18px 0 0;
    color: #68738a;
    font-size: 1.05rem;
    line-height: 1.6;
}

.my-recipes-container {
    padding: 26px;
}

.recipe-list {
    display: grid;
    gap: 16px;
}

.saved-recipe-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 22px;

    border: 1px solid rgba(34, 47, 80, 0.12);
    border-radius: 20px;

    background: #ffffff;
}

.saved-recipe-details {
    min-width: 0;
}

.saved-recipe-card h2 {
    margin: 0;
    color: #101a31;
    font-size: 1.2rem;
    line-height: 1.35;
}

.recipe-date {
    margin: 10px 0 0;
    color: #68738a;
    font-size: 0.88rem;
}

.saved-recipe-actions {
    flex-shrink: 0;
}

.recipe-delete-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
    padding: 22px 24px;
    border: 1px solid rgba(172, 45, 45, 0.18);
    border-radius: 20px;
    background: rgba(255, 250, 250, 0.82);
}

.recipe-delete-section h2 {
    margin: 0 0 6px;
    color: #6f2525;
    font-size: 1.05rem;
}

.recipe-delete-section p {
    margin: 0;
    color: #7b6b6b;
}

.recipe-delete-section form {
    flex-shrink: 0;
}

.delete-recipe-button {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #bd4a4a;
    border-radius: 999px;
    background: transparent;
    color: #a52f2f;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    box-shadow: none;
}

.delete-recipe-button:hover {
    background: #fff0f0;
    transform: none;
}

.recipe-success-message {
    margin: 0 0 18px;
    padding: 12px 16px;
    border: 1px solid #b9dfc4;
    border-radius: 14px;
    background: #f1fbf4;
    color: #236638;
    font-weight: 700;
}


/* Rating shown on My Recipes cards */

.recipe-list-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.small-star-rating {
    display: inline-flex;
    gap: 2px;
}

.small-rating-star {
    color: #d1d5df;
    font-size: 1.25rem;
    line-height: 1;
}

.small-rating-star.selected {
    color: #ffc43d;
}

.recipe-rating-label {
    color: #68738a;
    font-size: 0.88rem;
    font-weight: 700;
}

.unrated-recipe {
    color: #8a91a2;
    font-size: 0.9rem;
    font-weight: 650;
}

.empty-recipes {
    padding: 26px 6px;
}


/* Mobile My Recipes cards */

@media (max-width: 680px) {

    .my-recipes-container {
        padding: 18px;
    }

    .saved-recipe-card {
        display: block;
        padding: 18px;
    }

    .saved-recipe-actions {
        margin-top: 18px;
    }

    .saved-recipe-actions .header-button {
        width: 100%;
    }

    .recipe-delete-section {
        display: block;
        padding: 18px;
    }

    .recipe-delete-section form {
        margin-top: 16px;
    }

    .delete-recipe-button {
        width: 100%;
    }

}

/* PWA offline fallback page */
.offline-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.offline-card {
    width: 100%;
    max-width: 440px;
    text-align: center;
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(35, 27, 20, 0.08);
}

.offline-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.offline-card h1 {
    margin-bottom: 0.75rem;
}

.offline-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Sprint 7.3 authenticated app shell */
.app-header {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto 28px;
    padding: 18px 0;
    align-items: center;
    border-bottom: 1px solid rgba(30, 43, 73, 0.1);
}

.app-header .recipe-logo img {
    width: min(230px, 30vw);
}

.app-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.app-nav-item {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 10px;
    color: #14203a;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.app-nav-item:hover {
    color: #6958ff;
    background: rgba(105, 88, 255, 0.06);
}

.app-nav-item.active {
    color: #6958ff;
    background: rgba(105, 88, 255, 0.1);
    border-color: rgba(105, 88, 255, 0.16);
}

.app-nav-item:focus-visible {
    outline: 3px solid rgba(47, 159, 248, 0.3);
    outline-offset: 2px;
}

.app-nav-icon {
    position: relative;
    display: inline-flex;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    overflow: hidden;
    color: currentColor;
}

.app-nav-icon-home::before {
    content: "";
    position: absolute;
    left: 4px;
    bottom: 2px;
    width: 10px;
    height: 9px;
    border: 2px solid currentColor;
    border-top: 0;
    border-radius: 1px;
}

.app-nav-icon-home::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 5px;
    width: 9px;
    height: 9px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(45deg);
}

.app-nav-icon-recipes::before {
    content: "";
    position: absolute;
    inset: 2px 2px 1px;
    border: 2px solid currentColor;
    border-radius: 2px;
}

.app-nav-icon-recipes::after {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 3px;
    left: 9px;
    width: 2px;
    background: currentColor;
}

.app-nav-icon-create::before,
.app-nav-icon-create::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 3px;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.app-nav-icon-create::after {
    transform: rotate(90deg);
}

.app-nav-create {
    color: #14203a;
}

.app-nav-avatar,
.account-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 800;
    border-radius: 50%;
}

.app-nav-avatar {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    color: #6958ff;
    background: rgba(105, 88, 255, 0.12);
    font-size: 11px;
}

.account-avatar {
    color: #8c3f20;
    background: #ffd8c2;
}

.app-nav-avatar img,
.account-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-home-page .recipe-page {
    width: 100%;
    max-width: 1200px !important;
    padding: 1rem 2rem 3rem !important;
}

.app-home-page .recipe-header {
    max-width: 1120px;
    margin: 0 auto 1.25rem;
    padding: 0.75rem 0;
}

.app-home-page .recipe-logo img {
    width: min(250px, 29vw);
}

.app-home-hero,
.app-home-page .home-section {
    width: 100%;
    max-width: 1120px;
    margin-right: auto;
    margin-left: auto;
}

.app-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    margin-top: 0;
    margin-bottom: 2.5rem;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    color: #14203a;
    background: #fff8f3;
    border: 1px solid #f2d9ca;
    border-radius: 24px;
}

.app-home-hero h1,
.account-hero h1 {
    margin: 0 0 0.5rem;
    overflow-wrap: anywhere;
}

.app-home-hero h1 {
    max-width: 650px;
    font-size: clamp(1.8rem, 3.3vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.home-question {
    margin: 0;
    color: #657088;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.5;
}

.home-create-action {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 82px;
    padding: 1rem 1.1rem;
    color: #fff;
    background: #e86636;
    border: 1px solid #d95a2c;
    border-radius: 17px;
    box-shadow: 0 7px 16px rgba(161, 69, 35, 0.14);
    text-decoration: none;
    transition: transform 150ms ease, background-color 150ms ease;
}

.home-create-action:hover {
    color: #fff;
    background: #d95a2c;
    transform: translateY(-1px);
}

.home-create-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    color: #d95a2c;
    background: #fff;
    border-radius: 50%;
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1;
}

.home-create-copy {
    display: grid;
    flex: 1;
    gap: 0.15rem;
    font-size: 1rem;
    line-height: 1.25;
}

.home-create-copy strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.home-create-action small {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
}

.home-action-arrow {
    flex: 0 0 auto;
    font-size: 1.25rem;
}

.home-section {
    margin-top: 0;
    margin-bottom: 2.5rem;
}

.home-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.home-section-heading h2,
.home-section-heading p,
.home-recipe-card h3,
.home-empty-state h3,
.account-card h2,
.account-card p {
    margin-top: 0;
}

.home-section-heading h2 {
    margin-bottom: 0.25rem;
    color: #14203a;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    letter-spacing: -0.02em;
}

.home-section-heading p {
    margin-bottom: 0;
    color: #748096;
    font-size: 0.92rem;
}

.home-view-all,
.home-empty-state a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #b64b25;
    font-size: 0.88rem;
    font-weight: 750;
    text-decoration: none;
}

.home-view-all {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0.45rem 0.75rem;
    background: #fff7f2;
    border: 1px solid #f0d9cb;
    border-radius: 999px;
}

.home-recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.home-recipe-card,
.home-empty-state,
.account-card,
.account-message {
    background: #fff;
    border: 1px solid #eadfd7;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(65, 41, 27, 0.06);
}

.home-recipe-card {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    padding: 1.25rem;
    color: #14203a;
    text-decoration: none;
    overflow: hidden;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.home-recipe-card:hover {
    transform: translateY(-2px);
    border-color: #dfcfc5;
    box-shadow: 0 10px 22px rgba(65, 41, 27, 0.09);
}

.home-card-date,
.home-card-unrated {
    color: #81766f;
    font-size: 0.82rem;
}

.home-recipe-card h3 {
    margin: 0.65rem 0 1.25rem;
    font-size: 1.08rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.home-card-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 28px;
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid #eee5df;
}

.home-card-open {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    color: #a34726;
    font-size: 0.82rem;
    font-weight: 750;
}

.home-card-rating {
    color: #c7bdb4;
    font-size: 0.9rem;
    letter-spacing: 0.04rem;
    white-space: nowrap;
}

.home-card-rating .filled {
    color: #f3a72f;
}

.favourite-card {
    border-color: #ecd9b2;
    background: #fffcf6;
}

.favourite-card .home-card-footer {
    border-top-color: #eee1c7;
}

.favourite-rating {
    display: inline-flex;
    align-items: baseline;
    gap: 0.1rem;
    color: #9a6213;
}

.favourite-rating strong {
    font-size: 1.25rem;
    line-height: 1;
}

.favourite-rating span {
    font-size: 0.75rem;
    font-weight: 750;
}

.home-empty-state {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 112px;
    padding: 1.25rem 1.4rem;
    box-shadow: none;
}

.home-empty-state h3 {
    margin-bottom: 0.25rem;
    color: #14203a;
}

.home-empty-state p {
    margin: 0;
    color: #748096;
}

.home-empty-state > a {
    flex: 0 0 auto;
    margin-left: auto;
}

.home-empty-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    color: #c55228;
    background: #fff0e8;
    border-radius: 50%;
    font-size: 1.4rem;
}

.home-empty-star {
    color: #a46b16;
    background: #fff5d9;
    font-size: 1rem;
}

.account-hero {
    margin: 1.25rem 0;
}

.account-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 1.4rem;
}

.account-avatar {
    flex: 0 0 auto;
    width: 104px;
    height: 104px;
    font-size: 2rem;
}

.account-photo-form,
.account-details form {
    display: grid;
    gap: 0.55rem;
    width: 100%;
}

.account-photo-form small {
    color: #746b65;
}

.account-photo-form .header-button {
    justify-self: start;
}

.account-details {
    display: grid;
    gap: 1.3rem;
}

.account-inline-form {
    display: flex;
    gap: 0.65rem;
}

.account-inline-form input {
    flex: 1;
    min-width: 0;
}

.account-field {
    display: grid;
    gap: 0.35rem;
}

.account-field span,
.account-details label {
    color: #746b65;
    font-size: 0.9rem;
    font-weight: 750;
}

.account-signout {
    justify-content: space-between;
}

.account-signout h2 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.account-signout p {
    margin-bottom: 0;
    color: #746b65;
}

.account-logout-button {
    color: #a43028;
    border-color: #e8aaa5;
}

.account-message {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    color: #35653f;
    background: #eef8ef;
    border-color: #bbdabe;
}

.account-error {
    color: #932b25;
    background: #fff0ef;
    border-color: #efb8b3;
}

@media (max-width: 820px) {
    .app-shell-page,
    body:has(.app-navigation) {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .app-header {
        margin-bottom: 18px;
        padding: 12px 0;
        border-bottom: 0;
    }

    .app-header .recipe-logo img {
        width: 190px;
        max-width: 68vw;
    }

    .app-navigation {
        position: fixed;
        z-index: 1000;
        right: 0;
        bottom: 0;
        left: 0;
        justify-content: space-around;
        gap: 0;
        padding: 0.45rem 0.35rem calc(0.45rem + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.97);
        border: 0;
        border-top: 1px solid #e9ded7;
        border-radius: 0;
        box-shadow: 0 -5px 20px rgba(55, 36, 25, 0.08);
    }

    .app-nav-item {
        flex: 1;
        flex-direction: column;
        gap: 3px;
        min-height: 54px;
        padding: 6px 2px;
        color: #14203a;
        background: transparent;
        border-color: transparent;
        border-radius: 10px;
        font-size: 11px;
    }

    .app-nav-item:hover {
        color: #6958ff;
        background: transparent;
    }

    .app-nav-item.active {
        color: #6958ff;
        background: rgba(105, 88, 255, 0.1);
        border-color: transparent;
    }

    .app-nav-create .app-nav-icon {
        flex-basis: 20px;
        width: 20px;
        height: 20px;
        color: currentColor;
        background: transparent;
        border-radius: 0;
    }

    .app-home-page .recipe-page {
        padding: 0.75rem 1.1rem calc(2rem + env(safe-area-inset-bottom)) !important;
    }

    .app-home-page .recipe-header {
        margin-bottom: 0.85rem;
        padding: 0.55rem 0;
    }

    .app-home-page .recipe-logo img {
        width: 190px;
        max-width: 68vw;
    }

    .app-home-hero {
        grid-template-columns: 1fr;
        gap: 1.15rem;
        margin-bottom: 2rem;
        padding: 1.35rem;
        border-radius: 20px;
    }

    .app-home-hero h1 {
        font-size: clamp(1.65rem, 6vw, 2.2rem);
    }

    .home-create-action {
        min-height: 76px;
    }

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

    .home-recipe-card {
        min-height: 158px;
    }

    .account-card {
        align-items: flex-start;
    }

    .account-signout {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .home-section-heading {
        align-items: flex-start;
    }

    .home-view-all {
        min-height: 36px;
        padding: 0.35rem 0.55rem;
        font-size: 0.78rem;
    }

    .home-section-heading p {
        max-width: 220px;
    }

    .home-empty-state {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .home-empty-state > div {
        flex: 1;
        min-width: 0;
    }

    .home-empty-state > a {
        width: 100%;
        margin-left: 3.6rem;
    }

    .favourite-card-footer {
        gap: 0.5rem;
    }

    .favourite-card-footer .home-card-rating {
        font-size: 0.82rem;
    }

    .account-card:not(.account-signout) {
        flex-direction: column;
    }

    .account-inline-form,
    .account-signout {
        align-items: stretch;
        flex-direction: column;
    }

    .account-inline-form .header-button,
    .account-signout .header-button {
        justify-content: center;
        width: 100%;
    }
}

/* Browser-controlled PWA installation promotion */
.pwa-install-promotion {
    position: fixed;
    z-index: 1000;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: min(390px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 14px 42px 14px 14px;
    color: #14203a;
    background: #ffffff;
    border: 1px solid rgba(20, 32, 58, 0.1);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(20, 32, 58, 0.18);
}

.pwa-install-promotion[hidden] {
    display: none;
}

.pwa-install-button[hidden],
.pwa-install-copy [hidden] {
    display: none;
}

.pwa-install-icon {
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 13px;
}

.pwa-install-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    line-height: 1.25;
}

.pwa-install-copy strong {
    font-size: 0.98rem;
    font-weight: 800;
}

.pwa-install-copy span {
    color: #667085;
    font-size: 0.82rem;
}

.pwa-install-button,
.pwa-install-dismiss {
    margin: 0;
    border: 0;
    cursor: pointer;
}

.pwa-install-button {
    align-self: center;
    min-height: 40px;
    padding: 9px 15px;
    color: #ffffff;
    background: #2f6fed;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 800;
}

.pwa-install-button:hover {
    background: #245bd1;
}

.pwa-install-button:disabled {
    cursor: default;
    opacity: 0.65;
}

.pwa-install-dismiss {
    position: absolute;
    top: 7px;
    right: 7px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #667085;
    background: transparent;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
}

.pwa-install-dismiss:hover {
    color: #14203a;
    background: rgba(20, 32, 58, 0.06);
}

.pwa-install-button:focus-visible,
.pwa-install-dismiss:focus-visible {
    outline: 3px solid rgba(47, 111, 237, 0.3);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .pwa-install-promotion {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        left: 16px;
        width: auto;
    }

    .pwa-install-promotion-above-nav {
        bottom: calc(88px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 380px) {
    .pwa-install-promotion {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .pwa-install-button {
        grid-column: 1 / -1;
        justify-self: stretch;
        width: 100%;
    }
}
