:root {
  --bg-cream: #f5f1e8;
  --bg-card: #fffaf1;
  --deep-green: #384731;
  --olive: #6a7b3c;
  --accent-lime: #ccd87b;
  --accent-sage: #dce7a4;
  --accent-rose: #ffd9cf;
  --text-dark: #2c2a22;
  --text-muted: #6f6b5b;
  --shadow-soft: 0 18px 40px rgba(42, 52, 31, 0.08);
  --shadow-strong: 0 20px 48px rgba(42, 52, 31, 0.18);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-display: "Unbounded", cursive;
  --font-body: "Montserrat", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-cream);
  font-family: var(--font-body);
  color: var(--text-dark);
  display: flex;
  justify-content: center;
}

img {
  max-width: 100%;
  display: block;
}

.app-shell {
  position: relative;
  width: min(100%, 420px);
  min-height: 100vh;
  background: var(--bg-cream);
  display: flex;
  flex-direction: column;
  padding: 12px 16px 90px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 12px;
  position: relative;
}

.logo {
  height: 28px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.nav-back.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Hide nav-back on onboarding screens */
.onboarding-active .nav-back {
  display: none !important;
}

.nav-back span {
  position: relative;
  width: 12px;
  height: 12px;
}

.nav-back span::before,
.nav-back span::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 12px;
  background: var(--deep-green);
  left: 50%;
  top: 50%;
  transform-origin: center;
}

.nav-back span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nav-back span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(104, 121, 56, 0.1);
  font-size: 12px;
  color: var(--olive);
  font-weight: 600;
}

.limited-access .header-status {
  background: rgba(222, 69, 69, 0.12);
  color: #c23636;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #4adb76;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(74, 219, 118, 0.15);
}

.limited-access .status-dot {
  background: #ff5656;
  box-shadow: 0 0 0 4px rgba(255, 86, 86, 0.18);
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.screen {
  display: none;
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-card {
  background: var(--bg-card);
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -50px 40px;
  height: 120px;
  background: linear-gradient(120deg, rgba(204, 216, 123, 0.6), rgba(245, 152, 132, 0.5));
  border-radius: 90px;
  transform: rotate(-6deg);
}

.hero-card h1 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.1;
  margin: 16px 0 12px;
}

.hero-card p {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
  max-width: 290px;
}

.hero-badge {
  display: inline-flex;
  padding: 6px 14px;
  background: var(--accent-lime);
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  color: var(--deep-green);
}

.onboarding-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-login {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -4px;
}

.quick-login-btn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--olive);
  text-decoration: underline;
  cursor: pointer;
  opacity: 0.8;
}

.quick-login-btn:hover {
  opacity: 1;
}

.onboarding-restart-btn {
  background: var(--accent-sage) !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  color: var(--deep-green) !important;
  opacity: 1 !important;
  transition: all 0.2s;
  margin-top: 8px;
}

.onboarding-restart-btn:hover {
  background: var(--accent-lime) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.input-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--olive);
}

input,
textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(104, 121, 56, 0.2);
  background: white;
  outline: none;
  transition: border 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: var(--olive);
}

.primary-btn {
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  background: var(--deep-green);
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 16px 24px rgba(56, 71, 49, 0.2);
}

.primary-btn.small {
  padding: 12px 20px;
  box-shadow: none;
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn {
  border: 1px dashed rgba(56, 71, 49, 0.4);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  color: var(--deep-green);
  cursor: pointer;
  font-size: 13px;
}

.ghost-btn.mini {
  padding: 8px 12px;
  font-size: 12px;
}

.onboarding-extra {
  display: flex;
  gap: 18px;
  background: var(--accent-rose);
  border-radius: var(--radius-lg);
  padding: 18px;
  align-items: center;
  box-shadow: var(--shadow-soft);
}

.author-photo {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  object-fit: cover;
}

.author-info h2 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 6px;
}

.author-info p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.social-chip {
  display: inline-flex;
  padding: 8px 12px;
  background: white;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--olive);
}

.home-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.home-hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
}

.home-hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.tag {
  align-self: flex-start;
  background: var(--accent-lime);
  color: var(--deep-green);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
}

.action-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-button {
  border: none;
  text-align: left;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.card-thumb img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.card-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.highlight-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.highlight-card {
  display: flex;
  gap: 12px;
  background: white;
  border-radius: var(--radius-md);
  padding: 12px;
  align-items: center;
  box-shadow: var(--shadow-soft);
}

.highlight-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.highlight-card h4 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 16px;
}

.highlight-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.highlight-card.expert {
  background: var(--accent-sage);
}

.app-shell.limited-access [data-restricted] {
  position: relative;
  cursor: pointer;
}

.app-shell.limited-access .card-button[data-restricted],
.app-shell.limited-access .tab-button[data-restricted] {
  opacity: 0.55;
}

.app-shell.limited-access .card-button[data-restricted]::after {
  content: '🔒';
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 20px;
}

.app-shell.limited-access .tab-button[data-restricted] {
  position: relative;
}

.app-shell.limited-access .tab-button[data-restricted]::after {
  content: '🔒';
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 14px;
}

.recipe-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.favorite-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  align-items: center;
}

.favorite-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.favorite-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.favorite-card-head h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
}

.favorite-card-body p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.favorite-card-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .favorite-card {
    grid-template-columns: 72px 1fr;
    gap: 10px;
  }

  .favorite-card img {
    width: 72px;
    height: 72px;
  }
}

.recipe-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recipe-title-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recipe-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
}

.recipe-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.recipe-meta .meta-item {
  display: inline-flex;
  background: rgba(104, 121, 56, 0.12);
  padding: 6px 10px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--deep-green);
  margin-right: 8px;
  font-size: 13px;
}

.kbju-info {
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-top: 4px;
}

.kbju-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--deep-green);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kbju-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kbju-item {
  background: white;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  box-shadow: 0 2px 4px rgba(42, 52, 31, 0.06);
}

.recipe-rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.stars {
  display: flex;
  gap: 4px;
}

.star {
  font-size: 24px;
  color: #ddd;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.star:hover,
.star.active {
  color: #ffc107;
  transform: scale(1.1);
}

.stars:hover .star {
  color: #ddd;
}

.stars:hover .star:hover,
.stars:hover .star:hover ~ .star {
  color: #ffc107;
}

.stars .star.filled {
  color: #ffc107;
}

.rating-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.recipe-summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.recipe-gallery {
  display: grid;
  gap: 10px;
}

.recipe-gallery-main {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.recipe-gallery-main img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.recipe-gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.recipe-gallery-thumbs button {
  border: none;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  width: 72px;
  height: 72px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.recipe-gallery-thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-gallery-thumbs button.active,
.recipe-gallery-thumbs button:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.recipe-content {
  display: grid;
  gap: 18px;
}

.recipe-section h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 18px;
}

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

.recipe-ingredients li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(104, 121, 56, 0.08);
  font-size: 14px;
}

.recipe-ingredients li span {
  font-weight: 600;
}

.recipe-steps {
  padding-left: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: step;
}

.recipe-steps li {
  position: relative;
  padding-left: 42px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  padding-right: 14px;
  box-shadow: var(--shadow-soft);
  font-size: 14px;
  line-height: 1.5;
}

.recipe-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-lime);
  color: var(--deep-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

@media (max-width: 640px) {
  .recipe-gallery-main img {
    height: 200px;
  }

  .recipe-gallery-thumbs button {
    width: 64px;
    height: 64px;
  }

  .recipe-header h2 {
    font-size: 22px;
  }
}
.app-shell.limited-access [data-restricted] {
  position: relative;
  cursor: pointer;
}

.app-shell.limited-access .card-button[data-restricted],
.app-shell.limited-access .tab-button[data-restricted] {
  opacity: 0.55;
}

.app-shell.limited-access .card-button[data-restricted]::after {
  content: '🔒';
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 20px;
}

.app-shell.limited-access .tab-button[data-restricted] {
  position: relative;
}

.app-shell.limited-access .tab-button[data-restricted]::after {
  content: '🔒';
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 14px;
}

.calendar-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.calendar-hero h2 {
  margin: 6px 0;
  font-family: var(--font-display);
  font-size: 24px;
}

.calendar-hero p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}

.calendar-nav .month-label {
  font-weight: 600;
  color: var(--deep-green);
  min-width: 120px;
  text-align: center;
}

.calendar-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 6px 0;
  justify-content: center;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.legend-dot.breakfast {
  background: #ffd278;
}

.legend-dot.lunch {
  background: #ccd87b;
}

.legend-dot.dinner {
  background: #f8a6a6;
}

.calendar-grid-wrapper {
  margin-top: 12px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 12px 12px 16px;
}

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

.calendar-heading {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: var(--olive);
  padding: 6px 0;
}

.calendar-cell {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  padding: 6px 4px 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  color: var(--text-dark);
}

.calendar-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(42, 52, 31, 0.12);
}

.calendar-cell.inactive {
  background: rgba(255, 255, 255, 0.4);
  color: var(--text-muted);
  cursor: default;
  opacity: 0.55;
  pointer-events: none;
}

.calendar-cell.planned {
  background: #fffaf1;
}

.calendar-cell.selected {
  box-shadow: 0 0 0 2px rgba(104, 121, 56, 0.35);
}

.calendar-cell:focus-visible {
  outline: 2px solid var(--deep-green);
  outline-offset: 2px;
}

.calendar-cell .day-number {
  font-weight: 600;
  font-size: 14px;
}

.plan-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: auto;
}

.plan-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(104, 121, 56, 0.2);
}

.plan-dot.breakfast {
  background: #ffd278;
}

.plan-dot.lunch {
  background: #ccd87b;
}

.plan-dot.dinner {
  background: #f8a6a6;
}

.calendar-cell.today {
  border: 2px solid rgba(104, 121, 56, 0.35);
}

.favorites-list {
  display: grid;
  gap: 16px;
}

/* Shopping List Styles */
.shopping-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.shopping-list {
  display: grid;
  gap: 24px;
}

.shopping-category h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--deep-green);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(56, 71, 49, 0.1);
}

.shopping-items {
  display: grid;
  gap: 8px;
}

.shopping-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s;
}

.shopping-item:hover {
  background: var(--bg-card);
}

.shopping-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

.shopping-item input[type="checkbox"]:checked + .item-name {
  text-decoration: line-through;
  opacity: 0.6;
}

.item-name {
  flex: 1;
  font-size: 15px;
  color: var(--text-dark);
}

.item-amount {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Welcome Screen with Огонёк */
.welcome-container {
  padding: 30px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fire-mascot {
  font-size: 56px;
  animation: flicker 2s infinite;
  margin-bottom: 8px;
}

.fire-mascot-small {
  font-size: 32px;
  display: inline-block;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.85;
  }
}

.welcome-container h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

.welcome-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.welcome-features {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  margin: 16px 0;
}

.welcome-features h2 {
  font-size: 16px;
  color: var(--deep-green);
  margin-bottom: 16px;
  margin-top: 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.feature-item p {
  margin: 0;
  color: var(--text-dark);
  font-size: 14px;
}

/* Onboarding Slides */
.onboarding-slides {
  padding: 20px;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.slide-indicators {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
  margin-top: 20px;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s;
}

.indicator.active {
  width: 24px;
  border-radius: 4px;
  background: var(--olive);
}

.slides-container {
  margin-bottom: 20px;
}

.slide {
  display: none;
  text-align: center;
  padding: 0 10px;
}

.slide.active {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.slide h2 {
  font-size: 20px;
  color: var(--deep-green);
  margin-bottom: 12px;
  margin-top: 0;
}

.slide p {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-dark);
  margin-bottom: 8px;
  margin-top: 0;
}

.slide-example {
  font-style: italic;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 10px;
  border-radius: var(--radius-md);
  margin-top: 8px;
  font-size: 13px;
}

.slide-note {
  background: var(--accent-sage);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-top: 12px;
  font-size: 13px;
}

.slide-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 20px;
}

.slide-navigation button {
  flex: 1;
  min-width: 120px;
}

.slide-navigation .skip-onboarding-btn {
  flex: 0 0 100%;
  opacity: 0.7;
  font-size: 13px;
}

/* Extended Onboarding Screens */
.onboarding-header {
  text-align: center;
  margin-bottom: 32px;
}

.onboarding-header h2 {
  font-size: 24px;
  color: var(--deep-green);
  margin-bottom: 12px;
}

.onboarding-header p {
  font-size: 14px;
  color: var(--text-muted);
}

.progress-bar {
  height: 6px;
  background: rgba(104, 121, 56, 0.15);
  border-radius: 999px;
  margin: 16px 0 32px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--olive);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.onboarding-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.option-buttons {
  display: grid;
  gap: 12px;
}

.option-btn {
  background: white;
  border: 2px solid rgba(104, 121, 56, 0.2);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.option-btn:hover {
  border-color: var(--olive);
  box-shadow: var(--shadow-soft);
}

.option-btn.selected {
  background: var(--accent-sage);
  border-color: var(--olive);
  color: var(--deep-green);
  font-weight: 600;
}

.priority-sliders {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-dark);
}

.slider-value {
  font-weight: 600;
  color: var(--olive);
}

input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(104, 121, 56, 0.15);
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--olive);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(104, 121, 56, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--olive);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(104, 121, 56, 0.3);
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-tag {
  background: white;
  border: 2px solid rgba(104, 121, 56, 0.2);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s;
}

.product-tag:hover {
  border-color: var(--olive);
}

.product-tag.selected {
  background: var(--accent-rose);
  border-color: #ff9580;
  color: var(--deep-green);
  font-weight: 600;
}

.loading-state {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 4px solid rgba(104, 121, 56, 0.2);
  border-top: 4px solid var(--olive);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state h3 {
  font-size: 20px;
  color: var(--deep-green);
  margin-bottom: 12px;
}

.loading-state p {
  font-size: 14px;
  color: var(--text-muted);
}

/* User Avatar on Home */
.user-avatar-container {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.user-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-lime), var(--olive));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: white;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s;
}

.user-avatar-btn:hover .user-avatar {
  transform: scale(1.05);
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
}

/* My Recipes Styles */
.myrecipes-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  background: white;
  padding: 6px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.myrecipes-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.myrecipes-tab.active {
  background: var(--accent-sage);
  color: var(--deep-green);
}

.myrecipes-section {
  display: none;
}

.myrecipes-section.active {
  display: block;
}

.add-recipe-btn {
  width: 100%;
  margin-bottom: 24px;
}

.favorites-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.favorite-recipe-card {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: all 0.2s;
}

.favorite-recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.favorite-recipe-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.favorite-recipe-info {
  padding: 12px;
}

.favorite-recipe-info h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--deep-green);
  line-height: 1.3;
}

.favorite-recipe-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.favorite-recipe-card .favorite-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffc107;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.myrecipes-list {
  display: grid;
  gap: 14px;
}

.recipe-actions {
  display: flex;
  gap: 8px;
}

.recipe-actions .ghost-btn {
  padding: 6px 12px;
  font-size: 13px;
}

.calendar-details {
  margin-top: 16px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-details h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.calendar-details .meta {
  font-size: 13px;
  color: var(--text-muted);
}


.calendar-details ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.calendar-details li {
  display: grid;
  gap: 6px;
  align-items: stretch;
  padding: 12px;
  border-radius: 14px;
  background: rgba(104, 121, 56, 0.05);
}

.calendar-details li.calendar-meal {
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.calendar-details li.calendar-meal:hover,
.calendar-details li.calendar-meal:focus-visible {
  background: rgba(104, 121, 56, 0.1);
  box-shadow: 0 0 0 2px rgba(104, 121, 56, 0.2);
  outline: none;
}

.calendar-meal-image {
  width: 80px;
  height: 80px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.calendar-meal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--deep-green);
  background: rgba(104, 121, 56, 0.12);
}

.badge.breakfast {
  background: rgba(255, 210, 120, 0.55);
}

.badge.lunch {
  background: rgba(204, 216, 123, 0.6);
}

.badge.dinner {
  background: rgba(248, 166, 166, 0.45);
}

.calendar-meal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-meal-header .badge {
  min-width: 68px;
  text-align: center;
  justify-content: center;
  padding: 6px 0;
}

.calendar-meal__title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
}

.calendar-meal-content {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.calendar-meal-meta span {
  font-weight: 600;
  color: var(--deep-green);
}

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

body.modal-open {
  overflow: hidden;
}

.calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 39, 20, 0.35);
  backdrop-filter: blur(3px);
}

.calendar-modal:not([hidden]) {
  display: flex;
}

.calendar-modal__content {
  background: white;
  border-radius: 24px 24px 16px 16px;
  width: min(520px, 100%);
  padding: 24px;
  box-shadow: var(--shadow-strong);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.calendar-modal.open .calendar-modal__content {
  transform: translateY(0);
  opacity: 1;
}

.calendar-modal__close {
  align-self: flex-end;
  border: none;
  background: rgba(104, 121, 56, 0.12);
  color: var(--deep-green);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.calendar-modal__close:hover {
  background: rgba(104, 121, 56, 0.2);
}

.calendar-modal__close:focus-visible {
  outline: 2px solid var(--deep-green);
  outline-offset: 2px;
}

.calendar-modal__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-modal__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-modal__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.calendar-modal__sup {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.calendar-modal__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.calendar-modal__meta span {
  display: inline-flex;
  align-items: center;
}

.calendar-modal__image {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  max-height: 220px;
}

.calendar-modal__body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dark);
}

.calendar-modal__footer {
  font-size: 13px;
  color: var(--olive);
  padding-top: 4px;
}

.calendar-modal__actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

@media (max-width: 960px) {
  .calendar-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .calendar-nav {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-grid-wrapper {
    padding: 12px 10px;
  }

  .calendar-cell {
    min-height: 72px;
  }
}

@media (max-width: 640px) {
  .calendar-grid {
    gap: 4px;
  }

  .calendar-cell {
    border-radius: 12px;
    padding: 6px 4px 4px;
  }

  .calendar-cell .day-number {
    font-size: 13px;
  }

  .calendar-details {
    padding: 18px;
  }

  .calendar-modal {
    padding: 16px 16px 20px;
  }

  .calendar-modal__content {
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 480px) {
  .calendar-grid {
    gap: 3px;
  }

  .calendar-modal__content {
    padding: 20px;
  }

  .calendar-heading {
    font-size: 10px;
  }
}

/* Адаптивные стили для таблицы меню */
@media (max-width: 960px) {
  .generated-menu-header,
  .generated-menu-row {
    grid-template-columns: 48px 1fr 1fr 1fr;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .generated-menu-table {
    padding: 12px;
  }

  .generated-menu-header,
  .generated-menu-row {
    grid-template-columns: 45px 1fr 1fr 1fr;
    gap: 4px;
  }

  .menu-header-cell {
    font-size: 11px;
    padding: 8px 4px;
  }

  .menu-day-cell {
    padding: 6px 1px;
    font-size: 10px;
  }

  .meal-cell-body {
    padding: 8px;
  }

  .meal-cell-body h4 {
    font-size: 11px;
  }

  .swap-btn.mini {
    font-size: 9px;
    padding: 3px 6px;
  }
}

@media (max-width: 480px) {
  .generated-menu-table {
    padding: 8px;
  }

  .generated-menu-header,
  .generated-menu-row {
    grid-template-columns: 42px 1fr 1fr 1fr;
    gap: 3px;
  }

  .menu-header-cell {
    font-size: 10px;
    padding: 6px 2px;
  }

  .menu-day-cell {
    font-size: 9px;
    padding: 4px 1px;
  }

  .meal-cell-body h4 {
    font-size: 10px;
  }
}

.empty-state {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 24px 20px;
  text-align: center;
  display: grid;
  gap: 8px;
  color: var(--text-muted);
}

.empty-state strong {
  font-family: var(--font-display);
  color: var(--deep-green);
  font-size: 18px;
}

.chat-bubble {
  background: white;
  padding: 20px;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  position: relative;
  font-size: 15px;
}

.chat-bubble .subtitle-gray {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 12px;
}

.chat-bubble.bot::before {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 28px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 6px;
  transform: rotate(45deg);
  box-shadow: var(--shadow-soft);
}

.chat-input {
  display: flex;
  gap: 12px;
}

.chat-input input {
  flex: 1;
}

.suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: rgba(205, 216, 123, 0.4);
  color: var(--deep-green);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.chip.selectable {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(104, 121, 56, 0.4);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.chip.selectable.active {
  background: var(--deep-green);
  color: white;
  border-color: transparent;
}

.quiz-panel {
  margin-top: 12px;
  padding: 20px;
  background: var(--accent-sage);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: none;
  flex-direction: column;
  gap: 18px;
}

.quiz-panel.open {
  display: flex;
}

.quiz-panel h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  line-height: 1.3;
}

.quiz-step {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.quiz-step.active {
  display: flex;
}

.prompt {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.chip-group.vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chip-group.vertical .product-tag {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
}

.quiz-step textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.quiz-step-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.menu-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.form-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}

.form-block textarea {
  min-height: 72px;
}

.menu-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.menu-actions .ghost-btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.menu-results {
  display: grid;
  gap: 16px;
}

.menu-hints {
  display: grid;
  gap: 6px;
}

/* Generated Menu Table */
.generated-menu-table {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  overflow-x: auto;
}

.generated-menu-header {
  display: grid;
  grid-template-columns: 50px 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.menu-header-cell {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: var(--olive);
  padding: 12px 8px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.menu-header-cell:first-child {
  background: transparent;
  text-align: left;
  font-size: 11px;
}

.generated-menu-row {
  display: grid;
  grid-template-columns: 50px 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.menu-day-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--deep-green);
  line-height: 1.2;
}

.menu-meal-cell {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.menu-meal-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 52, 31, 0.1);
}

.menu-meal-cell img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  flex-shrink: 0;
}

.meal-cell-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.meal-cell-body h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dark);
}

.swap-btn.mini {
  font-size: 10px;
  padding: 4px 8px;
  white-space: nowrap;
}

.menu-day {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 18px 22px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.menu-add-calendar {
  margin: 14px 0;
}

.primary-btn.full-width {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.menu-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.menu-day-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
}

.menu-day-header .meta {
  font-size: 12px;
  color: var(--olive);
  background: rgba(205, 216, 123, 0.3);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.menu-day-meals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.menu-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.menu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.menu-card .menu-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-subhead {
  font-size: 12px;
  font-weight: 600;
  color: var(--olive);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.menu-card h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.3;
}

.menu-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.menu-card .card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.swap-btn {
  border: none;
  background: var(--accent-lime);
  color: var(--deep-green);
  font-weight: 600;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 999px;
  cursor: pointer;
}

.tabbar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 32px, 420px);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  box-shadow: 0 20px 30px rgba(42, 52, 31, 0.18);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tabbar.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.tab-button {
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 6px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex: 1;
  min-width: 0;
}

.tab-button.active {
  background: var(--accent-lime);
  color: var(--deep-green);
}

.tab-button .icon {
  font-size: 16px;
  line-height: 1;
}

.search-results {
  display: grid;
  gap: 14px;
}

.search-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.search-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.search-card .search-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-card h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.3;
}

.card-meta-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.card-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.favorite-btn-inline {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--olive);
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--olive);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.favorite-btn-inline:hover {
  transform: scale(1.1);
}

.favorite-btn-inline.active {
  background: var(--olive);
  color: #FFD700;
  border-color: var(--olive);
}

.favorite-btn-inline .favorite-icon {
  line-height: 1;
}

.result-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 4px;
}

.favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--olive);
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(42, 52, 31, 0.18);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.favorite-btn-card {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--olive);
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--olive);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(42, 52, 31, 0.2);
  transition: all 0.2s ease;
  z-index: 2;
}

.favorite-btn-card:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(42, 52, 31, 0.3);
}

.favorite-btn-card.active {
  background: var(--olive);
  color: #FFD700;
  border-color: var(--olive);
}

.favorite-btn-card .favorite-icon {
  line-height: 1;
}

.recipe-title-block .favorite-btn,
.favorite-card-head .favorite-btn {
  position: static;
  width: 34px;
  height: 34px;
  box-shadow: none;
  margin-left: auto;
}

.recipe-title-block .favorite-btn:hover,
.favorite-card-head .favorite-btn:hover {
  transform: none;
}

.favorite-btn:hover {
  transform: scale(1.05);
}

.favorite-btn.active {
  background: rgba(248, 166, 166, 0.6);
  color: var(--deep-green);
}

.favorite-btn:focus-visible {
  outline: 2px solid var(--deep-green);
  outline-offset: 2px;
}

.tariff-grid {
  display: grid;
  gap: 18px;
}

.tariff-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-soft);
}

.tariff-card.accent {
  background: var(--accent-sage);
}

.tariff-card.premium {
  background: var(--accent-rose);
}

.tariff-card header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tariff-card .badge {
  align-self: flex-start;
  background: var(--accent-lime);
  color: var(--deep-green);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.tariff-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.tariff-card .price {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--deep-green);
}

.tariff-card ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.profile-hero {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-main img {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
}

.profile-main h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
}

.profile-main p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.status-pill {
  margin-top: 8px;
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(205, 216, 123, 0.5);
  font-size: 12px;
  font-weight: 600;
  color: var(--deep-green);
}

.profile-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.stat-card .value {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
}

.stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
}

.profile-actions {
  display: grid;
  gap: 12px;
}

.profile-action {
  border: none;
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
  color: var(--deep-green);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.profile-action .meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-accordion {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.profile-accordion + .profile-accordion {
  margin-top: 12px;
}

.profile-accordion [data-accordion-toggle] {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
}

.profile-accordion-content {
  display: none;
  padding: 0 18px 18px;
  font-size: 13px;
  color: var(--text-muted);
  background: white;
  border-top: 1px solid rgba(104, 121, 56, 0.12);
}

.profile-accordion.open .profile-accordion-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-accordion-content pre {
  margin: 0;
  padding: 14px;
  background: rgba(104, 121, 56, 0.08);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-family: 'SF Mono', 'Roboto Mono', monospace;
  line-height: 1.5;
  white-space: pre-wrap;
}

.profile-accordion .copy-system-info {
  align-self: flex-start;
}

.support-input {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border-radius: var(--radius-md);
  border: 1px solid rgba(104, 121, 56, 0.18);
  padding: 12px 14px;
  font-family: var(--font-body);
}

.support-send.success {
  background: rgba(104, 121, 56, 0.18);
  color: var(--deep-green);
}

.payment-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.payment-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(104, 121, 56, 0.08);
  font-size: 13px;
}

.payment-entry div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.payment-title {
  font-weight: 600;
  color: var(--text-dark);
}

.payment-date {
  color: var(--text-muted);
  font-size: 12px;
}

.payment-status {
  font-weight: 600;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  min-width: 84px;
  text-align: center;
}

.payment-entry.success {
  background: rgba(104, 121, 56, 0.08);
}

.payment-entry.success .payment-status {
  background: rgba(110, 210, 118, 0.3);
  color: var(--deep-green);
}

.payment-entry.failed {
  background: rgba(222, 69, 69, 0.08);
}

.payment-entry.failed .payment-status {
  background: rgba(222, 69, 69, 0.25);
  color: #b83232;
}

/* Review Modal */
.review-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.review-modal[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.review-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(42, 52, 31, 0.6);
  backdrop-filter: blur(4px);
}

.review-modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin: 20px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(42, 52, 31, 0.25);
  animation: slideUp 0.3s ease;
  z-index: 1;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.review-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(104, 121, 56, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-dark);
  transition: all 0.2s;
}

.review-modal-close:hover {
  background: rgba(104, 121, 56, 0.2);
  transform: rotate(90deg);
}

.review-modal-body {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-modal-icon {
  font-size: 56px;
  margin-bottom: 8px;
}

.review-modal-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--deep-green);
}

.review-modal-body p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-dark);
}

.review-modal-body strong {
  color: var(--olive);
  font-weight: 600;
}

.review-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

@media (min-width: 768px) {
  body {
    padding: 28px 0;
  }

  .app-shell {
    border-radius: 34px;
    box-shadow: 0 60px 80px rgba(42, 52, 31, 0.18);
  }
}
