/* ============================================================
   Kobook Make v2 — identidad visual (Figma Make)
   Se carga después de app.css. Tokens Make + componentes.
   ============================================================ */

:root {
  --color-cream: #F5EFE3;
  --color-cream-light: #FDFAF5;
  --color-surface: #FDFAF5;
  --color-ink: #1A1510;
  --color-ink-muted: #72655A;
  --color-olive: #273B23;
  --color-olive-mid: #3D5938;
  --color-terra: #C05030;
  --color-terra-light: #F2D9CF;
  --color-amber: #CC8228;
  --color-amber-light: #FAE8C8;
  --color-sage: #4E7D50;
  --color-sage-light: #D2E8CC;
  --color-border-light: #EDE6D8;
  --color-surface-alt: #F8F3EB;
  --color-nav-idle: #B0A090;
  --cook-bg: #131F11;

  --color-bg: var(--color-cream);
  --color-card: var(--color-surface);
  --color-primary: var(--color-olive);
  --color-primary-dark: var(--color-olive-mid);
  --color-secondary: var(--color-sage);
  --color-tertiary: var(--color-amber);
  --color-heading: var(--color-ink);
  --color-text: var(--color-ink);
  --color-muted: var(--color-ink-muted);
  --color-border: #DDD1BC;
  --color-alert: var(--color-terra);
  --color-event: var(--color-terra);
  --color-cta-recetas: var(--color-terra);
  --color-cta-cal: var(--color-amber);
  --color-cta-inv: var(--color-sage);

  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;
  --radius: 13px;
  --shadow: 0 2px 8px rgba(26, 21, 16, 0.06);
  --shadow-lg: 0 6px 24px rgba(39, 59, 35, 0.16);
  --bottom-nav-h: 68px;

  --c-green: var(--color-sage);
  --c-green-dark: #1F4D22;
  --c-green-light: var(--color-sage-light);
  --c-green-mid: #8FBF90;
  --c-terra: var(--color-terra);
  --c-terra-dark: #6A2015;
  --c-terra-light: var(--color-terra-light);
  --c-amber: var(--color-amber);
  --c-amber-dark: #6A4010;
  --c-amber-light: var(--color-amber-light);
  --c-blue: var(--color-olive);
  --c-blue-dark: var(--color-olive);
  --c-blue-light: var(--color-sage-light);
  --c-mauve: var(--color-terra);
  --c-mauve-dark: #6A2015;
  --c-mauve-light: var(--color-terra-light);
  --color-acento: var(--color-terra);
  --color-acento-dark: #6A2015;
  --color-acento-light: var(--color-terra-light);
  --color-bg-soft: var(--color-cream);

  --bs-primary: #273B23;
  --bs-primary-rgb: 39, 59, 35;
  --bs-body-color: #1A1510;
  --bs-body-bg: #F5EFE3;
  --bs-border-color: #DDD1BC;
  --bs-link-color: #C05030;
  --bs-link-hover-color: #273B23;
}

html { background-color: var(--color-cream); }

body::before { display: none !important; }

body {
  font-family: var(--font-body);
  background: var(--color-cream);
  color: var(--color-ink);
  padding-bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
}

h1, h2, h3, h4, .section-title, .page-title, .brand-title, .cal-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--color-ink);
}

a { color: var(--color-terra); }
a:hover { color: var(--color-olive); }

.kb-icon {
  display: block;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}
.kb-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: clip;
  flex-shrink: 0;
}

/* Wordmark */

.kb-wordmark {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--color-olive);
  letter-spacing: -0.02em;
  line-height: 1;
}

.kb-wordmark-white {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: white;
  letter-spacing: -0.02em;
  line-height: 1;
}
.kb-wordmark span,
.kb-wordmark-white span {
  font-family: inherit;
  font-style: inherit;
  font-weight: inherit;
  color: var(--color-terra);
}
.kb-wordmark-white span {
  color: #96afa0;
}


/* Labels */
.kb-label,
.section-label,
label.form-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-ink-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.section-label { margin: 0 0 10px; }

.section-title {
  font-size: 11px;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
  color: var(--color-ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  margin-bottom: 10px;
}
.section-title .bi { color: var(--color-ink-muted); }

.cal-title {
  font-size: 24px;
  font-weight: 500;
  text-align: left;
  margin: 0 0 12px;
}

/* Header */
.app-brand-header { margin: 0 0 12px; }
.app-brand-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding-bottom: 0;
  border-bottom: none;
}
.app-brand-header .brand-title {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  text-shadow: none;
}
.app-brand-back,
.app-brand-back-spacer {
  width: auto;
  min-width: 40px;
  height: 40px;
  background: none;
  color: var(--color-ink-muted);
  border-radius: 10px;
  font-size: 13px;
  gap: 4px;
}
.app-brand-back:hover {
  background: var(--color-surface);
  color: var(--color-ink);
}
.app-brand-action {
  width: 34px;
  height: 34px;
  background: rgba(253, 250, 245, 0.88);
  color: var(--color-ink-muted);
  border-radius: 11px;
  box-shadow: none;
}
.app-brand-action:hover {
  background: var(--color-surface);
  color: var(--color-ink);
}
.app-brand-action-danger { background: rgba(253, 250, 245, 0.88); color: var(--color-terra); }
.app-brand-action-danger:hover { background: var(--color-terra-light); color: var(--color-terra); }

.page-header { margin-bottom: 12px; }

.kb-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 6px;
}
.kb-page-head h1,
.kb-page-head .kb-page-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 24px;
  font-weight: 500;
  color: var(--color-ink);
  margin: 0;
  line-height: 1.2;
}
.kb-page-head-sub {
  font-size: 13px;
  color: var(--color-ink-muted);
  margin: 2px 0 0;
}
.kb-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--color-olive);
  color: var(--color-cream);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}
.kb-icon-btn:hover { background: var(--color-olive-mid); color: var(--color-cream); }
.kb-icon-btn .kb-icon-wrap { width: 18px; height: 18px; }
.kb-info-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin-left: 4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-ink-muted);
  vertical-align: middle;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease;
}
.kb-info-hint:hover,
.kb-info-hint:focus-visible {
  color: var(--color-olive);
  background: var(--color-surface-alt);
}
.kb-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--color-ink-muted);
  font-size: 13px;
  font-family: var(--font-body);
  text-decoration: none;
  padding: 0;
  min-height: 44px;
}
.kb-back:hover { color: var(--color-ink); }
.kb-back .kb-icon-wrap { width: 18px; height: 18px; }
.kb-text-action {
  background: none;
  border: none;
  color: var(--color-terra);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-body);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.kb-text-action:hover { color: var(--color-olive); }
.kb-text-action.is-muted { color: var(--color-ink-muted); font-weight: 400; font-size: 13px; }

.kb-action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  min-height: 32px;
  border-radius: 20px;
  background: var(--color-terra-light);
  color: var(--color-terra);
  border: 1px solid rgba(192, 80, 48, 0.25);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  white-space: nowrap;
  vertical-align: middle;
  transition: background 0.3s ease, border-color 0.3s ease, filter 0.3s ease, color 0.3s ease;
}
.kb-action-badge:hover,
.kb-action-badge:focus-visible {
  color: var(--color-terra);
  border-color: var(--color-terra);
  filter: brightness(0.96);
}
.kb-action-badge .kb-icon-wrap {
  width: 14px;
  height: 14px;
  color: inherit;
  flex-shrink: 0;
  pointer-events: none;
}
.kb-action-badge.is-icon {
  width: 32px;
  min-width: 32px;
  padding: 0;
}
.kb-action-badge.is-sage {
  background: var(--color-sage-light);
  color: var(--color-sage);
  border-color: rgba(78, 125, 80, 0.28);
}
.kb-action-badge.is-sage:hover,
.kb-action-badge.is-sage:focus-visible {
  color: var(--color-sage);
  border-color: var(--color-sage);
}
.kb-action-badge.is-amber {
  background: var(--color-amber-light);
  color: var(--color-amber);
  border-color: rgba(204, 130, 40, 0.28);
}
.kb-action-badge.is-amber:hover,
.kb-action-badge.is-amber:focus-visible {
  color: var(--color-amber);
  border-color: var(--color-amber);
}
.kb-action-badge.is-olive {
  background: var(--color-olive);
  color: var(--color-cream);
  border-color: transparent;
}
.kb-action-badge.is-olive:hover,
.kb-action-badge.is-olive:focus-visible {
  color: var(--color-cream);
  border-color: transparent;
  filter: brightness(1.08);
}
.kb-action-badge.is-muted {
  background: var(--color-surface-alt);
  color: var(--color-ink-muted);
  border-color: var(--color-border);
}
.kb-action-badge.is-muted:hover,
.kb-action-badge.is-muted:focus-visible {
  color: var(--color-ink);
  border-color: var(--color-olive-mid);
  filter: none;
}
.kb-action-badge.is-danger {
  background: var(--color-terra-light);
  color: var(--color-terra);
  border-color: rgba(192, 80, 48, 0.25);
}
.kb-page-head .kb-action-badge {
  flex-shrink: 0;
}
.kb-hint-card .kb-action-badge {
  margin-top: 6px;
}

/* Bottom nav */
.bottom-nav {
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: none;
  backdrop-filter: none;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav a,
.bottom-nav .dropup > a {
  color: var(--color-nav-idle);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.03em;
  gap: 3px;
  padding: 6px 10px;
  position: relative;
  max-width: none;
  background: none !important;
  min-width: 44px;
  min-height: 44px;
}
.bottom-nav a .kb-icon-wrap {
  width: 21px;
  height: 21px;
}
.bottom-nav a i { display: none; }
.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--color-olive);
  background: none !important;
}
.bottom-nav a.active { font-weight: 700; }
.bottom-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-terra);
}
.bottom-nav .dropdown-menu {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(26, 21, 16, 0.18);
  padding: 10px;
  min-width: 200px;
  max-width: min(90vw, 240px);
}
.bottom-nav .dropdown-menu .dropdown-item {
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-ink);
  border-radius: 10px;
  padding: 10px 12px;
}
.bottom-nav .dropdown-menu .dropdown-item .kb-icon-wrap {
  width: 18px;
  height: 18px;
  color: var(--color-ink-muted);
}
.bottom-nav .dropdown-menu .dropdown-item:hover,
.bottom-nav .dropdown-menu .dropdown-item:focus {
  background: var(--color-cream);
  color: var(--color-olive);
}
.bottom-nav .dropdown-menu .dropdown-item.text-danger { color: var(--color-terra); }
.bottom-nav .dropdown-menu .dropdown-divider { border-color: var(--color-border); }
.bottom-nav .dropdown-menu .dropdown-item-text {
  text-align: left;
  color: var(--color-ink-muted);
  font-size: 12px;
}

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 13px;
  padding: 13px 24px;
  box-shadow: none;
  letter-spacing: 0.01em;
  font-size: 14px;
}
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 12px; }
.btn-lg { padding: 13px 24px; font-size: 14px; }

.btn-primary,
.btn-accent,
.btn-blue,
.btn-mauve,
.btn-amber,
.btn-terra {
  background: var(--color-olive);
  border-color: var(--color-olive);
  color: var(--color-cream);
  box-shadow: none;
}
.btn-primary:hover,
.btn-accent:hover,
.btn-blue:hover,
.btn-primary:focus,
.btn-mauve:hover,
.btn-amber:hover,
.btn-terra:hover {
  background: var(--color-olive-mid);
  border-color: var(--color-olive-mid);
  color: var(--color-cream);
}

.btn-secondary {
  background: var(--color-terra-light);
  border: 1px solid rgba(192, 80, 48, 0.25);
  color: var(--color-terra);
}
.btn-secondary:hover {
  background: #ebc4b6;
  border-color: var(--color-terra);
  color: var(--color-terra);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-blue,
.btn-outline-mauve,
.btn-outline-amber,
.btn-outline-terra {
  color: var(--color-ink-muted);
  border: 1.5px solid var(--color-border);
  background: transparent;
}
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-olive);
  color: var(--color-olive);
}

.btn-danger {
  background: var(--color-terra);
  border-color: var(--color-terra);
  color: #FFF8F5;
}
.btn-danger:hover { background: #a84328; border-color: #a84328; color: #fff; }
.btn-outline-danger {
  color: var(--color-terra);
  border-color: rgba(192, 80, 48, 0.35);
  background: var(--color-terra-light);
}

/* Forms */
.form-control,
.form-select {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--color-ink);
  font-family: var(--font-body);
  box-shadow: none;
}
form .row {
  --bs-gutter-y: 0.5rem;
}
form .kb-field.mb-3,
form > .mb-3,
form .tab-pane > .mb-3 {
  margin-bottom: 0.65rem !important;
}
form .mb-4,
form .row.mb-4,
form .kb-tabs.mb-4,
form .recipe-form-tabs.mb-4 {
  margin-bottom: 0.85rem !important;
}
form hr.my-4 {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}
.form-control:focus,
.form-select:focus {
  background: var(--color-surface);
  border-color: var(--color-olive);
  box-shadow: 0 0 0 0.15rem rgba(39, 59, 35, 0.12);
  color: var(--color-ink);
}
input::placeholder,
textarea::placeholder,
.form-control::placeholder,
.form-select::placeholder,
.kb-search input::placeholder {
  color: var(--color-nav-idle);
  opacity: 1;
}
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--color-amber);
  background-image: none;
  padding-right: 15px;
  box-shadow: none;
}
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: var(--color-amber);
  box-shadow: 0 0 0 0.15rem rgba(204, 130, 40, 0.18);
}
.input-group-text {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  color: var(--color-ink-muted);
}

.kb-field { margin-bottom: 0; }

.kb-pwd-wrap {
  position: relative;
  display: block;
}
.kb-pwd-wrap .form-control,
.login-wrap .kb-pwd-wrap .form-control,
.kb-pwd-wrap .form-control.is-invalid {
  padding-right: 44px;
  background-image: none;
}
.kb-pwd-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-ink-muted);
  cursor: pointer;
  line-height: 0;
  transition: color 0.3s;
}
.kb-pwd-toggle:hover,
.kb-pwd-toggle:focus-visible {
  color: var(--color-olive);
  outline: none;
}
.kb-pwd-toggle .kb-icon-wrap {
  width: 18px;
  height: 18px;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .kb-pwd-toggle { transition: none; }
}
.kb-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  padding: 10px 14px;
}
.kb-search .kb-icon-wrap { width: 17px; height: 17px; color: var(--color-ink-muted); }
.kb-search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--color-ink);
  font-family: var(--font-body);
  padding: 0;
  box-shadow: none;
}
.kb-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kb-filter-bar-cat .form-select {
  width: 100%;
}
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 12px;
  -webkit-overflow-scrolling: touch;
}
.filter-chip {
  flex-shrink: 0;
  padding: 5px 14px;
  background: var(--color-surface);
  color: var(--color-ink-muted);
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  text-decoration: none;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.filter-chip:hover { color: var(--color-ink); }
.filter-chip.is-active {
  background: var(--color-olive);
  color: var(--color-cream);
  border-color: var(--color-olive);
}

.contact-import-wrap {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.contact-import-wrap .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.contact-import-wrap .form-text {
  margin-top: 8px;
}

.kobookers-block {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.kobookers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kobookers-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 11px;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.3s, background 0.3s;
}
.kobookers-row:hover {
  border-color: var(--color-olive);
  background: var(--color-cream);
}
.kobookers-row-name {
  font-weight: 600;
  display: block;
}
.kobookers-row-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-ink-muted);
  display: block;
  margin-top: 2px;
}
.kobookers-row-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--color-sage);
  flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
  .kobookers-row { transition: none; }
}

/* Cards */
.content-card,
.card-cookbook,
.recipe-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.content-card:has(> form) {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Recipe grid */
.recipe-search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.recipe-search-card {
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow);
}
.recipe-search-card--rail {
  flex-shrink: 0;
  width: 144px;
}
.recipe-search-media,
.recipe-search-media-link {
  display: block;
  height: 106px;
  overflow: hidden;
  background: var(--color-cream);
}
.recipe-search-card--rail .recipe-search-media,
.recipe-search-card--rail .recipe-search-media-link { height: 96px; }
.recipe-search-media img,
.recipe-search-media-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kb-media-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
  background: var(--color-cream);
}
.recipe-search-body-link { padding: 9px 11px 12px; display: block; text-decoration: none; }
.recipe-search-card h3 {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-ink);
  margin: 0 0 5px;
  line-height: 1.3;
}
.recipe-search-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--color-ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}
.recipe-search-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.recipe-search-meta-item .kb-icon-wrap { width: 12px; height: 12px; }
.recipe-search-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border);
}
.recipe-share-fab {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(253, 250, 245, 0.9);
  border: none;
  color: var(--color-ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.recipe-search-media { position: relative; }

.kb-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 4px;
  -webkit-overflow-scrolling: touch;
}

/* Home */
.home-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0 14px;
}
.home-welcome-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  margin: 0;
}
.home-welcome h2 {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  color: var(--color-ink);
}
.event-hero {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(39, 59, 35, 0.16);
  color: inherit;
  margin-bottom: 18px;
}
.event-hero-media {
  position: relative;
  height: 118px;
  background: var(--color-olive);
}
.event-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 10%, rgba(39, 59, 35, 0.91) 100%);
}
.event-hero-body {
  background: var(--color-olive);
  padding: 12px 18px 16px;
}
.event-hero-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(245, 239, 227, 0.55);
  margin: 0 0 2px;
  letter-spacing: 0.04em;
}
.event-hero-body h3 {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 20px;
  font-weight: 500;
  color: var(--color-cream);
  margin: 0 0 10px;
}
.event-hero.is-date-pending {
  border: 2px solid var(--color-amber);
  box-shadow: 0 6px 24px rgba(204, 130, 40, 0.18);
}
.event-hero.is-date-pending .event-hero-media {
  background: var(--color-amber);
}
.event-hero.is-date-pending .event-hero-media::after {
  background: linear-gradient(to bottom, transparent 10%, rgba(204, 130, 40, 0.88) 100%);
}
.event-hero.is-date-pending .event-hero-body {
  background: var(--color-amber-light);
}
.event-hero.is-date-pending .event-hero-body h3 {
  color: var(--color-ink);
}
.event-hero.is-date-pending .event-hero-meta {
  color: var(--color-amber);
  display: flex;
  align-items: center;
  gap: 6px;
}
.event-hero.has-date-propose {
  box-shadow: 0 6px 24px rgba(204, 130, 40, 0.16);
  outline: 2px solid var(--color-amber);
  outline-offset: -2px;
}
.event-hero-date-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-amber);
  background: var(--color-amber-light);
  border-radius: 8px;
  padding: 4px 8px;
  margin-bottom: 8px;
}
.event-hero-meta svg {
  flex-shrink: 0;
}
.event-hero-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.event-hero-title-row h3 { margin: 0 0 10px; flex: 1; }
.event-hero-avatars {
  display: flex;
  flex-shrink: 0;
  margin-top: 2px;
}
.event-hero-avatars .kb-avatar {
  margin-left: -8px;
  border: 2px solid var(--color-olive);
}
.event-hero-avatars .kb-avatar:first-child { margin-left: 0; }
.home-welcome-actions {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.home-brand {
  display: block;
  text-align: right;
  line-height: 1.15;
}
.home-brand .kb-wordmark {
  display: block;
}
.home-plan {
  display: block;
  margin: 2px 0 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-sage);
  line-height: 1.25;
  white-space: nowrap;
}
.home-bell {
  width: 34px;
  height: 34px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 11px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
  text-decoration: none;
}
.home-bell:hover { color: var(--color-olive); }
.home-stats {
  margin: 0 0 18px;
  background: var(--color-olive);
  border-radius: 14px;
  display: flex;
  overflow: hidden;
}
.home-stats > div,
.more-hero-stats > div,
.profile-stats > div {
  flex: 1;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid rgba(245, 239, 227, 0.1);
}
.home-stats > div:last-child,
.more-hero-stats > div:last-child,
.profile-stats > div:last-child { border-right: none; }
.home-stats .n,
.more-hero-stats .n {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  color: var(--color-cream);
  line-height: 1;
}
.home-stats .l,
.more-hero-stats .l {
  font-size: 10px;
  color: rgba(245, 239, 227, 0.45);
  margin-top: 3px;
  letter-spacing: 0.05em;
}
.profile-stats {
  margin: 0 0 18px;
  background: var(--color-surface);
  border-radius: 14px;
  display: flex;
  border: 1px solid var(--color-border-light);
}
.profile-stats .n {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 20px;
  font-weight: 500;
  color: var(--color-ink);
}
.profile-stats .l {
  font-size: 10px;
  color: var(--color-ink-muted);
  letter-spacing: 0.05em;
}
.profile-stats > div { border-right-color: var(--color-border-light); }

.more-hero {
  margin: calc(-16px - env(safe-area-inset-top, 0px)) -20px 20px;
  background: var(--color-olive);
  padding: 8px 22px 24px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
}
.more-hero-user {
  display: flex;
  align-items: center;
  gap: 14px;
}
.more-hero-avatar {
  width: 60px;
  height: 60px;
  border-radius: 19px;
  background: rgba(245, 239, 227, 0.12);
  border: 2px solid rgba(245, 239, 227, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-cream);
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
}
.more-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.more-hero-name {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  color: var(--color-cream);
  margin: 0 0 2px;
}
.more-hero-mail {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(245, 239, 227, 0.5);
  margin: 0;
}
.more-hero-edit {
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(245, 239, 227, 0.12);
  border: 1.5px solid rgba(245, 239, 227, 0.22);
  color: var(--color-cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.3s, color 0.3s;
}
.more-hero-edit:hover {
  background: rgba(245, 239, 227, 0.22);
  color: var(--color-cream);
}
.more-hero-edit .kb-icon-wrap { width: 18px; height: 18px; }
.more-hero-stats {
  display: flex;
  margin-top: 18px;
  background: rgba(245, 239, 227, 0.07);
  border-radius: 13px;
  overflow: hidden;
}
.more-list {
  background: var(--color-surface);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  margin-bottom: 16px;
}
.more-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  background: none;
  border: none;
  border-top: 1px solid var(--color-border-light);
  color: inherit;
  text-decoration: none;
  text-align: left;
  min-height: 44px;
}
.more-list-item:first-child { border-top: none; }
.more-list-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-olive);
  flex-shrink: 0;
}
.more-list-text { flex: 1; min-width: 0; }
.more-list-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
}
.more-list-text span {
  display: block;
  font-size: 12px;
  color: var(--color-ink-muted);
}
.more-list-item .kb-icon-wrap { color: var(--color-ink-muted); width: 15px; height: 15px; }
.more-list-item.is-plan {
  align-items: center;
  gap: 12px;
}
.more-list-item.is-plan .more-list-ico .kb-icon-wrap {
  color: var(--color-olive);
  width: 18px;
  height: 18px;
}
.more-plan-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
@media (max-width: 420px) {
  .more-list-item.is-plan {
    flex-wrap: wrap;
  }
  .more-plan-btn {
    width: 100%;
    margin-top: 2px;
    text-align: center;
  }
}
.more-logout {
  width: 100%;
  padding: 13px;
  background: var(--color-terra-light);
  border: 1px solid rgba(192, 80, 48, 0.19);
  border-radius: 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-terra);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  min-height: 44px;
}
.more-logout:hover { color: var(--color-terra); }
button.more-logout {
  font-family: inherit;
  cursor: pointer;
}
.more-logout--admin {
  background: var(--color-olive);
  border-color: var(--color-olive);
  color: var(--color-cream);
  margin-bottom: 10px;
}
.more-logout--admin:hover {
  color: var(--color-cream);
  background: var(--color-olive-mid);
}
.more-version {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #C8B8A8;
  margin-top: 18px;
}

.pantry-list { display: flex; flex-direction: column; gap: 7px; }
.pantry-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}
.pantry-row-text { flex: 1; min-width: 0; }
.pantry-row .name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-ink);
  margin: 0 0 2px;
}
.pantry-row .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-ink-muted);
  margin: 0;
}
.pantry-row .kb-icon-wrap { color: var(--color-ink-muted); width: 15px; height: 15px; }

.kb-hint-sage {
  margin-top: 16px;
  background: var(--color-sage-light);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--color-sage);
}
.kb-hint-sage p {
  font-size: 12px;
  color: #1F4D22;
  margin: 0;
  line-height: 1.6;
}

.cook-progress-dots {
  display: flex;
  justify-content: space-between;
  margin: 6px 26px 0;
}
.cook-progress-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 239, 227, 0.12);
}
.cook-progress-dots span.is-on { background: var(--color-terra); }

.home-quick {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.home-quick-btn {
  flex: 1;
  padding: 12px 10px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 13px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  color: var(--color-ink);
  min-height: 44px;
}
button.home-quick-btn {
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.home-quick-btn:hover { color: var(--color-ink); }
.home-quick-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-quick-ico .kb-icon-wrap { width: 16px; height: 16px; }
.home-quick-ico.is-terra { background: var(--color-terra-light); color: var(--color-terra); }
.home-quick-ico.is-amber { background: var(--color-amber-light); color: var(--color-amber); }
.home-quick-ico.is-sage { background: var(--color-sage-light); color: var(--color-sage); }
.home-quick-btn span:last-child {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.home-section { margin-bottom: 18px; }
.home-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.home-section-link {
  background: none;
  border: none;
  color: var(--color-terra);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.cta-frame { display: none; }

.kb-hint-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.kb-hint-card p,
.kb-hint-card li { font-size: 13px; color: var(--color-ink); line-height: 1.55; }

/* Semáforo */
.semaforo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}
.semaforo-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.semaforo-badge.is-new {
  background: var(--color-sage-light);
  color: #1F4D22;
  border: 1px solid rgba(78, 125, 80, 0.25);
}
.semaforo-badge.is-new .semaforo-badge-dot { background: var(--color-sage); }
.semaforo-badge.is-old {
  background: var(--color-amber-light);
  color: #6A4010;
  border: 1px solid rgba(204, 130, 40, 0.25);
}
.semaforo-badge.is-old .semaforo-badge-dot { background: var(--color-amber); }
.semaforo-badge.is-recent {
  background: var(--color-terra-light);
  color: #6A2015;
  border: 1px solid rgba(192, 80, 48, 0.25);
}
.semaforo-badge.is-recent .semaforo-badge-dot { background: var(--color-terra); }
.semaforo-badge[data-semaforo-tip] {
  cursor: help;
  flex-shrink: 0;
  position: relative;
}

#kb-semaforo-tip {
  position: fixed;
  z-index: 1080;
  max-width: min(280px, calc(100vw - 32px));
  padding: 10px 12px;
  background: var(--color-surface);
  color: var(--color-ink);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  white-space: pre-line;
  pointer-events: none;
}

.semaforo-legend {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 11px;
  padding: 10px 13px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.semaforo-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--color-ink-muted);
}

/* Empty */
.kb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 50px 20px;
  gap: 12px;
}
.kb-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kb-empty-icon .kb-icon-wrap { width: 22px; height: 22px; }
.kb-empty-icon--terra { background: var(--color-terra-light); color: var(--color-terra); }
.kb-empty-icon--sage { background: var(--color-sage-light); color: var(--color-sage); }
.kb-empty-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 20px;
  color: var(--color-ink);
  margin: 0;
}
.kb-empty-body {
  font-size: 13px;
  color: var(--color-ink-muted);
  margin: 0;
  line-height: 1.6;
  max-width: 280px;
}

/* Login / auth */
body.auth-body {
  display: block;
  padding: 0;
  align-items: stretch;
  background: var(--color-cream);
}
.auth-shell {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-cream);
}
.login-hero {
  height: 230px;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--color-olive);
}
.login-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.42;
  pointer-events: none;
}
.login-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(39, 59, 35, 0.72) 0%,
    rgba(39, 59, 35, 0.28) 55%,
    rgba(39, 59, 35, 0.4) 100%
  );
  pointer-events: none;
}
.login-hero-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 28px 28px;
}
.login-hero-tag {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 15px;
  color: rgba(245, 239, 227, 0.7);
  margin: 6px 0 0;
  font-weight: 300;
}
.login-wrap {
  flex: 1;
  width: 100%;
  max-width: none;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-wrap .brand-title { display: none; }
.login-wrap .brand-title::after { display: none; }
.login-field { margin-bottom: 0; }
.login-field .login-icon { display: none; }
.login-wrap .form-control {
  padding: 8px 14px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  box-shadow: none;
  color: var(--color-ink);
}
.login-wrap .form-control::placeholder { color: var(--color-nav-idle); }
.login-wrap .btn.btn-primary.btn-lg {
  background: var(--color-olive);
  border: none;
  color: var(--color-cream);
  box-shadow: none;
  border-radius: 13px;
}
.login-link {
  color: var(--color-ink-muted);
  text-decoration: underline;
  margin-top: 0;
  font-size: 13px;
}
.login-link--register,
.login-auth-row a {
  font-weight: 700;
  color: var(--color-olive);
  text-decoration: none;
}
.login-auth-row a.kb-action-badge {
  font-weight: 600;
  text-decoration: none;
}
.login-auth-row a.kb-action-badge.is-sage {
  color: var(--color-sage);
}
.login-divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}
.login-auth-row {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--color-ink-muted);
}
.login-subtitle {
  text-align: left;
  font-size: 14px;
  color: var(--color-ink-muted);
  margin: 0 0 4px;
}
.auth-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 30px;
  font-weight: 400;
  color: var(--color-ink);
  margin: 0 0 4px;
  line-height: 1.2;
  text-align: left;
}
.auth-lock {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--color-terra-light);
  color: var(--color-terra);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-lock .kb-icon-wrap { width: 22px; height: 22px; }
.login-help, .pwd-rules { color: var(--color-ink-muted); }
.pwd-rules li.is-ok { color: #1F4D22; }
.pwd-rules li.is-bad { color: var(--color-terra); }
.login-combobox-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.login-wrap--register { max-width: none; }

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  text-align: left;
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-ink-muted);
}
.auth-terms .form-check-input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 1.15em;
  height: 1.15em;
  border-color: var(--color-border);
  accent-color: var(--color-olive);
  cursor: pointer;
}
.auth-terms .form-check-input:checked {
  background-color: var(--color-olive);
  border-color: var(--color-olive);
}
.auth-terms .form-check-input:focus {
  border-color: var(--color-olive);
  box-shadow: 0 0 0 0.2rem rgba(39, 59, 35, 0.18);
}
.auth-terms .form-check-input.is-invalid {
  border-color: var(--color-terra);
}
.auth-terms .form-check-label {
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-ink-muted);
  cursor: pointer;
}
.auth-terms a {
  color: var(--color-olive);
  font-weight: 600;
  text-decoration: underline;
}
.auth-terms a:hover {
  color: var(--color-terra);
}

.auth-shell--legal {
  max-width: 640px;
}
.login-wrap--legal {
  padding-bottom: 48px;
}
.legal-updated {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-ink-muted);
  margin: 0 0 4px;
}
.legal-toc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.legal-toc-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-ink);
  margin: 0 0 8px;
}
.legal-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal-toc a {
  color: var(--color-olive);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.legal-toc a:hover {
  color: var(--color-terra);
  text-decoration: underline;
}
.legal-doc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-ink);
}
.legal-doc h2 {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  color: var(--color-ink);
  margin: 28px 0 12px;
  scroll-margin-top: 16px;
}
.legal-doc h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink);
  margin: 18px 0 8px;
}
.legal-doc p,
.legal-doc li {
  color: var(--color-ink);
}
.legal-doc ul {
  padding-left: 1.2em;
  margin: 0 0 12px;
}
.legal-doc a {
  color: var(--color-olive);
  font-weight: 600;
}
.legal-doc a:hover {
  color: var(--color-terra);
}
.legal-doc code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-ink-muted);
}
.legal-contact {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-ink-muted);
}

.more-version a {
  color: inherit;
  text-decoration: underline;
}
.more-version a:hover {
  color: var(--color-olive);
}

.register-thanks-modal,
.modal-content {
  background: var(--color-surface);
  border: none;
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(26, 21, 16, 0.35);
}
.modal-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--color-ink);
}
.kb-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-terra-light);
  color: var(--color-terra);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.kb-modal-icon .kb-icon-wrap { width: 20px; height: 20px; }

#kbImageLoadingModal {
  z-index: 2100;
  background: rgba(26, 21, 16, 0.45);
  transition: none;
}
#kbImageLoadingModal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
#kbImageLoadingModal .modal-dialog {
  margin: 1rem;
}
.modal-backdrop.kb-image-loading-backdrop {
  z-index: 2090;
  display: none;
}
.kb-image-loading-spinner {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--color-olive);
  border-width: 0.2rem;
}
.kb-image-loading-text {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.4;
}

/* Recipe show */
.recipe-show-page { position: relative; }
.recipe-hero-wrap { margin: -16px -20px 0; }
.page-wrapper {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}
.page-wrapper > .container.app-shell { padding-left: 20px; padding-right: 20px; }
.app-shell { padding-left: 20px; padding-right: 20px; }

.recipe-hero {
  height: 236px;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}
.recipe-hero img { width: 100%; height: 100%; object-fit: cover; }
.recipe-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, transparent 55%);
  pointer-events: none;
}
.recipe-hero--empty { background: var(--color-olive); }
.recipe-float-btn {
  position: absolute;
  top: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 11px;
  background: rgba(253, 250, 245, 0.88);
  border: none;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  backdrop-filter: blur(6px);
}
.recipe-float-btn .kb-icon-wrap { width: 16px; height: 16px; }
.recipe-float-btn.is-back { left: 16px; }
.recipe-float-btn.is-delete { right: 92px; }
.recipe-float-btn.is-edit {
  right: 16px;
  width: auto;
  min-width: 44px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-ink-muted);
}
.recipe-show-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 26px;
  font-weight: 500;
  margin: 18px 0 10px;
  line-height: 1.2;
  text-align: left;
}
.recipe-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.recipe-cat-chips .filter-chip {
  padding: 3px 10px;
  min-height: 26px;
  font-size: 11px;
}
.ms-check-menu {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow);
  z-index: 30;
}
.ms-check-option {
  color: var(--color-ink);
  font-family: var(--font-body);
}
.ms-check-option:hover {
  background: rgba(39, 59, 35, 0.06);
}
.ms-check-option input {
  accent-color: var(--color-olive);
}
.recipe-metrics {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
}
.recipe-metrics p { margin: 0; }
.recipe-metrics .v {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-ink);
}
.recipe-metrics .l {
  font-size: 10px;
  color: var(--color-ink-muted);
  letter-spacing: 0.04em;
}
.recipe-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 10px;
}
.recipe-tabs button,
.recipe-tabs .recipe-tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--color-ink-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 400;
}
.recipe-tabs .active,
.recipe-tabs button.active {
  font-weight: 700;
  color: var(--color-ink);
  border-bottom-color: var(--color-terra);
}
.recipe-tabs.has-tab-ink .active,
.recipe-tabs.has-tab-ink button.active {
  border-bottom-color: transparent;
}
.recipe-tabs[data-rol-locked] .recipe-tab {
  flex: 0 1 auto;
  padding-inline: 2px 18px;
  pointer-events: none;
}
.ing-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  background: var(--color-surface);
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
  margin-bottom: 7px;
}
.ing-row .qty {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-terra);
  min-width: 64px;
  font-weight: 500;
}
.ingredient-row .ing-icon-btn {
  transition: background 0.3s ease, color 0.3s ease;
}
.ingredient-row .ing-icon-btn:hover,
.ingredient-row .ing-icon-btn:focus-visible {
  background: var(--color-terra);
  color: var(--color-cream);
}
.step-item { gap: 13px; }
.step-number,
.step-number-badge {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--color-olive);
  color: var(--color-cream);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-form-row .step-side {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.step-form-row .remove-step-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1;
}
.step-form-row .step-body {
  min-width: 0;
  flex: 1 1 auto;
}
.step-form-row .step-body .form-control,
.step-form-row .step-photo {
  width: 100%;
}
.recipe-notes-box {
  background: var(--color-amber-light);
  border-radius: 13px;
  padding: 14px 16px;
  border: 1px solid rgba(204, 130, 40, 0.19);
}
.recipe-notes-box p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 15px;
  color: #5A380A;
  margin: 0;
  line-height: 1.7;
}
.cook-fab-wrap {
  position: sticky;
  bottom: calc(var(--bottom-nav-h) + 12px);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  z-index: 10;
  pointer-events: none;
  margin-top: 16px;
}
.recipe-print-btn {
  pointer-events: auto;
}
.btn-cook-cta,
.cook-fab {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  background: var(--color-olive);
  color: var(--color-cream);
  border: none;
  border-radius: 28px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(39, 59, 35, 0.31);
}
.btn-cook-cta:hover,
.cook-fab:hover { color: var(--color-cream); background: var(--color-olive-mid); }
.cook-fab .kb-icon-wrap { width: 16px; height: 16px; }

/* Cook mode */
.cook-mode-body {
  background: var(--cook-bg);
  color: var(--color-cream);
}
.cook-mode {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--cook-bg);
}
.cook-header {
  background: transparent;
  border: none;
  padding: 16px 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: static;
}
.cook-exit {
  background: rgba(245, 239, 227, 0.1);
  border: none;
  border-radius: 10px;
  padding: 7px 14px;
  color: rgba(245, 239, 227, 0.65);
  font-size: 13px;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.cook-exit:hover { color: var(--color-cream); }
.cook-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(245, 239, 227, 0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cook-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(245, 239, 227, 0.45);
  min-width: 40px;
  text-align: right;
}
.cook-progress {
  margin: 14px 26px 0;
  height: 2px;
  background: rgba(245, 239, 227, 0.08);
  border-radius: 2px;
}
.cook-progress > span {
  display: block;
  height: 100%;
  background: var(--color-terra);
  border-radius: 2px;
  width: 0;
  transition: width 0.3s ease;
}
.cook-step { display: none !important; flex-direction: column; align-items: flex-start; }
.cook-step.is-active { display: flex !important; }
.cook-step-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 28px;
}
.cook-step-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(245, 239, 227, 0.35);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.cook-step.is-active h2 {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 400;
  color: #F5EFE3;
  margin: 0 0 18px;
  line-height: 1.15;
}
.cook-step-body {
  font-size: 17px;
  color: rgba(245, 239, 227, 0.82);
  line-height: 1.7;
  font-weight: 300;
}
.cook-nav {
  padding: 0 26px 24px;
  display: flex;
  gap: 10px;
}
.cook-nav .btn {
  border-radius: 14px;
  padding: 15px;
}
.cook-nav #cook-prev {
  flex: 1;
  background: rgba(245, 239, 227, 0.07);
  border: 1px solid rgba(245, 239, 227, 0.1);
  color: rgba(245, 239, 227, 0.75);
}
.cook-nav #cook-prev:disabled { color: rgba(245, 239, 227, 0.2); }
.cook-nav #cook-next {
  flex: 2;
  background: var(--color-terra);
  border: none;
  color: #FFF8F5;
}
.cook-extras {
  padding: 0 26px 32px;
}
.cook-panel {
  background: rgba(245, 239, 227, 0.06);
  border: 1px solid rgba(245, 239, 227, 0.08);
  border-radius: 14px;
  padding: 16px;
  color: var(--color-cream);
}
.cook-panel h2,
.cook-panel .h6 {
  color: rgba(245, 239, 227, 0.45) !important;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.cook-timer-display { color: var(--color-terra); font-family: var(--font-mono); }
.cook-mode-body .btn-outline-secondary,
.cook-mode-body .btn-outline-light {
  color: rgba(245, 239, 227, 0.75);
  border-color: rgba(245, 239, 227, 0.15);
}

@media (min-width: 768px) {
  .cook-body-split {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 24px;
    padding: 0 26px 32px;
    align-items: start;
  }
}

/* Calendar */
.cal-month {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-ink);
}
.cal-month .kb-action-badge.is-icon {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}
.cal-nav-btns,
.cal-nav-btns a {
  background: none;
  border: none;
  box-shadow: none;
  color: var(--color-ink-muted);
  font-size: 20px;
  width: auto;
  height: auto;
}
.cal-grid {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
  gap: 2px;
  margin-bottom: 14px;
}
.cal-dow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  text-align: center;
}
.cal-day {
  min-height: auto;
  padding: 5px 0;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
  border: none;
  background: transparent;
  color: var(--color-ink);
}
.cal-day.has-event {
  background: transparent;
  font-weight: 400;
  border: none;
}
.cal-day.selected {
  background: var(--color-olive);
  color: var(--color-cream);
  font-weight: 700;
  box-shadow: none;
}
.cal-day.selected .cal-dot { background: rgba(245, 239, 227, 0.5); }
.cal-day.today { outline: none; }
.cal-day.today:not(.selected) { font-weight: 700; }
.cal-day .cal-dot {
  width: 5px;
  height: 5px;
  background: var(--color-terra);
  margin-top: 1px;
}
.cal-day .cal-dot.is-guest {
  background: var(--color-sage);
}

.event-month-row {
  display: flex;
  gap: 13px;
  padding: 11px 13px;
  background: var(--color-surface);
  border-radius: 13px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-border-light);
  margin-bottom: 8px;
  align-items: center;
}
.event-month-row.is-sel {
  background: var(--color-terra-light);
  border-color: rgba(192, 80, 48, 0.31);
}
.event-month-row.is-guest.is-sel {
  background: var(--color-sage-light);
  border-color: rgba(78, 125, 80, 0.31);
}
.event-month-day {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  flex-shrink: 0;
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-ink);
}
.event-month-row.is-sel .event-month-day {
  background: var(--color-terra);
  color: #FFF8F5;
}
.event-month-row.is-guest.is-sel .event-month-day {
  background: var(--color-sage);
  color: var(--color-cream);
}
.event-month-row h3,
.event-month-row .t {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 2px;
  color: var(--color-ink);
}
.event-month-row p {
  font-size: 12px;
  color: var(--color-ink-muted);
  margin: 0;
}
.event-month-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--color-ink-muted);
}
.event-month-row.is-date-pending {
  background: var(--color-amber-light);
  border-color: var(--color-amber);
}
.event-month-row.is-date-pending .event-month-day {
  background: var(--color-amber-light);
  color: var(--color-amber);
}
.event-month-row.has-date-propose {
  border-color: var(--color-amber);
}
.event-date-mini-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--color-amber);
  background: var(--color-amber-light);
  border-radius: 8px;
  padding: 2px 7px;
}
.event-date-propose-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.event-date-propose-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}
.event-date-propose-name {
  font-weight: 600;
  color: var(--color-ink);
}
.event-date-propose-day {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-ink-muted);
}
.event-date-propose-host {
  font-size: 14px;
  color: var(--color-ink);
}
.event-date-propose-form .form-control {
  max-width: 12rem;
}
.event-month-meta .rsvp-badge {
  flex-shrink: 0;
}

/* Event show */
.event-date-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-terra);
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}
.event-show-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 14px;
  line-height: 1.2;
}
.menu-dish-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  background: var(--color-surface);
  border-radius: 12px;
  margin-bottom: 7px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-border-light);
}
.menu-dish-row .menu-dish-main {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.menu-dish-row .course {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-ink-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 2px;
}
.menu-dish-row .dish {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  color: var(--color-ink);
}
.btn-shop-gen {
  width: 100%;
  padding: 13px;
  background: var(--color-sage-light);
  border: 1px solid rgba(78, 125, 80, 0.25);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: #1F4D22;
  font-weight: 600;
  font-size: 14px;
}
.btn-shop-gen:hover { color: #1F4D22; }
.btn-shop-gen .kb-icon-wrap { width: 16px; height: 16px; color: var(--color-sage); }

.kb-avatar {
  display: inline-flex;
  flex-shrink: 0;
  text-decoration: none;
  overflow: hidden;
  border: 2px solid var(--color-cream);
}
.kb-avatar--sm { width: 38px; height: 38px; border-radius: 12px; }
.kb-avatar--md { width: 44px; height: 44px; border-radius: 13px; }
.kb-avatar--lg { width: 68px; height: 68px; border-radius: 20px; }
.kb-avatar img,
.kb-avatar-init {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.kb-avatar--sm .kb-avatar-init { font-size: 14px; }
.kb-avatar--md .kb-avatar-init { font-size: 17px; }
.kb-avatar--lg .kb-avatar-init { font-size: 26px; }

.contact-photo-picker {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  margin: 0 0 10px;
}
.contact-photo-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  cursor: pointer;
}
.contact-photo-avatar img,
.contact-photo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
}
.contact-photo-placeholder {
  background: #c8c2b6;
  color: rgba(26, 21, 16, 0.32);
  box-shadow: var(--shadow), inset 0 2px 10px rgba(26, 21, 16, 0.18);
}
.contact-photo-placeholder .kb-icon-wrap {
  width: 44px;
  height: 44px;
}
.contact-photo-avatar.has-photo img {
  box-shadow: var(--shadow);
}
.contact-photo-avatar img[hidden],
.contact-photo-placeholder[hidden] {
  display: none;
}
.contact-photo-edit,
.contact-photo-cam {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-cream);
  transition: background 0.3s, color 0.3s;
}
.contact-photo-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  background: var(--color-olive);
  color: var(--color-cream);
}
.contact-photo-edit:hover {
  background: var(--color-olive-mid);
  color: var(--color-cream);
}
.contact-photo-edit .kb-icon-wrap { width: 14px; height: 14px; }
.contact-photo-cam {
  background: var(--color-surface);
  color: var(--color-olive);
  border-color: var(--color-border);
  box-shadow: var(--shadow);
}
.contact-photo-cam:hover {
  background: var(--color-sage-light);
  color: var(--color-olive);
}
.contact-photo-cam .kb-icon-wrap { width: 18px; height: 18px; }

.guest-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* Shopping */
.shopping-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  margin-bottom: 6px;
  background: var(--color-surface);
  border-radius: 11px;
  border: 1px solid var(--color-border-light);
  cursor: pointer;
}
.shopping-item.is-done {
  background: var(--color-cream);
  border-color: var(--color-border);
  opacity: 0.65;
  text-decoration: none;
}
.shopping-item.is-done span { text-decoration: line-through; }
.shopping-item input[type="checkbox"] {
  width: 21px;
  height: 21px;
  border-radius: 6px;
  accent-color: var(--color-olive);
  flex-shrink: 0;
}

/* Guests */
.guest-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  background: var(--color-surface);
  border-radius: 14px;
  border: 1px solid var(--color-border-light);
  text-decoration: none;
  color: inherit;
  margin-bottom: 8px;
}
.guest-row:hover { color: inherit; }
.guest-row .name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink);
  margin: 0 0 2px;
}
.guest-row .meta {
  font-size: 12px;
  color: var(--color-ink-muted);
  margin: 0;
}
.guest-row .chev { color: var(--color-ink-muted); margin-left: auto; }
.guest-row .chev .kb-icon-wrap { width: 15px; height: 15px; }
.guest-row .share-status-badge { flex-shrink: 0; }

.modal-header.guest-pick-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  background: var(--color-surface);
  padding: 12px 16px 12px;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 6px 16px rgba(26, 21, 16, 0.08);
}
.guest-pick-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.guest-pick-bar .kb-search {
  width: 100%;
}
.event-guest-row {
  cursor: default;
}
.guest-pick-bar .modal-title {
  font-size: 17px;
  text-align: center;
  flex: 1;
  min-width: 0;
}
.guest-pick-bar .kb-action-badge {
  min-height: 32px;
  flex-shrink: 0;
}
.guest-pick-item {
  cursor: pointer;
  user-select: none;
}
.guest-pick-item .guest-pick-check {
  width: 21px;
  height: 21px;
  accent-color: var(--color-olive);
  flex-shrink: 0;
  margin: 0;
}
.event-guest-remove {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--color-terra);
  border-radius: 10px;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}
.event-guest-remove:hover {
  background: var(--color-terra-light);
  color: var(--color-terra);
}
.event-guest-remove .kb-icon-wrap { width: 16px; height: 16px; }

.pref-chip {
  padding: 5px 12px;
  background: var(--color-sage-light);
  color: #1F4D22;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.pref-chip.is-shared {
  outline: 1px dashed var(--color-sage);
}
.pref-chip.is-dislike {
  background: var(--color-terra-light);
  color: #6A2015;
}
.pref-chip.is-dislike.is-shared {
  outline-color: var(--color-terra);
}
.pref-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.pref-section-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 6px 13px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}
.pref-section-label .bi {
  font-size: 13px;
  color: inherit;
}
.pref-section-label.is-like {
  color: var(--color-cream);
  background: linear-gradient(165deg, color-mix(in srgb, var(--color-sage) 72%, white) 0%, var(--color-sage) 48%, var(--color-olive-mid) 100%);
  box-shadow: 0 2px 7px rgba(78, 125, 80, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.pref-section-label.is-dislike {
  color: var(--color-cream);
  background: linear-gradient(165deg, color-mix(in srgb, var(--color-terra) 70%, white) 0%, var(--color-terra) 50%, #8A3820 100%);
  box-shadow: 0 2px 7px rgba(192, 80, 48, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}
.pref-section-label.is-restrict {
  color: var(--color-cream);
  background: linear-gradient(165deg, color-mix(in srgb, var(--color-amber) 68%, white) 0%, var(--color-amber) 52%, #8A5414 100%);
  box-shadow: 0 2px 7px rgba(204, 130, 40, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}
.pref-section-rule {
  flex: 1 1 auto;
  min-width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-border) 0%, color-mix(in srgb, var(--color-border) 35%, transparent) 100%);
}
@media (max-width: 576px) {
  .pref-section-head {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .pref-section-label {
    max-width: 100%;
  }
  .pref-section-label.is-restrict {
    white-space: normal;
  }
  .pref-section-head > .btn {
    flex: 1 0 100%;
  }
}
.pref-shared-block {
  background: #d9e6d1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
}
.pref-shared-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-ink-muted);
  letter-spacing: 0.04em;
}
.pref-shared-text {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-ink);
  line-height: 1.45;
  white-space: pre-wrap;
}
.pref-shared-type {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-sage);
  margin-right: 8px;
}
.pref-shared-hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 8px 0;
  opacity: 1;
}
.pref-shared-rest-line {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-ink);
  line-height: 1.45;
}
.restriction-row-shared {
  background: #d9e6d1;
}
.allergy-box {
  background: var(--color-terra-light);
  border-radius: 11px;
  padding: 10px 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
  color: #3A1008;
}
.allergy-box strong { color: #6A2015; font-size: 12px; display: block; margin-bottom: 2px; }
.history-card {
  padding: 12px 14px;
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  display: block;
}
.history-card:hover { color: inherit; }
.history-card h3 {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}
.history-card .when {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-ink-muted);
}
.dish-chip {
  padding: 3px 9px;
  background: var(--color-cream);
  color: var(--color-ink-muted);
  border-radius: 16px;
  font-size: 11px;
}

.historial-people-filter {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 16px;
}
button.historial-people-trigger {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.historial-people-trigger-label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--color-ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.historial-people-trigger-label.is-active {
  color: var(--color-ink);
  font-weight: 500;
}
.historial-clear-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: var(--color-amber);
  color: var(--color-cream);
  border: none;
  text-decoration: none;
  transition: filter 0.3s ease, background 0.3s ease;
}
.historial-clear-btn:hover,
.historial-clear-btn:focus-visible {
  color: var(--color-cream);
  background: var(--color-amber);
  filter: brightness(0.94);
}
.historial-clear-btn .kb-icon-wrap {
  width: 16px;
  height: 16px;
  color: inherit;
}

.profile-hero { background: none; padding: 10px 0 20px; }
.profile-hero-band { display: none; }
.profile-hero-photo { margin: 0; }
.contact-show-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.contact-show-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 3px;
}
.contact-show-photo .share-status-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  line-height: 1.25;
  max-width: 76px;
  text-align: center;
  white-space: nowrap;
}
.contact-show-meta { min-width: 0; }
.profile-share-wrap {
  margin-top: 2px;
  margin-bottom: 20px;
}
.profile-name {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 26px;
  font-weight: 500;
  text-align: left;
  margin: 0 0 3px;
}
.profile-facts { gap: 0; }
.profile-section-title {
  font-size: 11px;
  font-family: var(--font-body);
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  font-weight: 600;
}

/* Nav tabs (recipe form) */
.nav-tabs {
  border-bottom: 1px solid var(--color-border);
  gap: 0;
}
.nav-tabs .nav-link {
  border: none;
  border-radius: 0;
  color: var(--color-ink-muted);
  font-size: 13px;
  padding: 9px 12px;
  margin: 0;
}
.nav-tabs .nav-link.active {
  background: transparent;
  color: var(--color-ink);
  font-weight: 700;
  border-bottom: 2px solid var(--color-terra);
}
.recipe-form-tabs {
  position: relative;
}
.recipe-form-tabs .nav-tabs {
  margin-bottom: 0;
}
.recipe-form-tabs.has-tab-ink .nav-link.active,
.kb-tabs.has-tab-ink .nav-link.active {
  border-bottom-color: transparent;
}
.kb-tabs,
.recipe-form-tabs,
.recipe-tabs {
  position: relative;
}
.kb-tabs-ink,
.recipe-tabs-ink {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--color-terra);
  border-radius: 2px 2px 0 0;
  pointer-events: none;
  transform: translateX(0);
  transition: transform 0.3s ease, width 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
  .kb-tabs-ink,
  .recipe-tabs-ink { transition: none; }
}

.badge-facil { background: var(--color-sage-light); color: #1F4D22; border-color: transparent; }
.badge-media { background: var(--color-amber-light); color: #6A4010; border-color: transparent; }
.badge-dificil { background: var(--color-terra-light); color: #6A2015; border-color: transparent; }
.badge-cat {
  background: var(--color-cream);
  color: var(--color-ink-muted);
  border-radius: 16px;
}

.pagination .page-link {
  background: var(--color-surface);
  color: var(--color-ink);
  border-color: var(--color-border);
  border-radius: 10px;
}
.pagination .page-item.active .page-link {
  background: var(--color-olive);
  border-color: var(--color-olive);
  color: var(--color-cream);
}

.flash-container .alert {
  border-radius: 14px;
  border: 1px solid var(--color-border);
}

.kb-impersonate-bar {
  position: sticky;
  top: 0;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 20px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: var(--color-olive);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
}
.kb-impersonate-bar strong {
  font-weight: 700;
}
.kb-impersonate-bar form {
  margin: 0;
}
.kb-impersonate-bar button {
  background: var(--color-terra);
  color: var(--color-cream);
  border: none;
  border-radius: var(--radius);
  padding: 8px 14px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.kb-impersonate-bar button:hover {
  background: var(--color-olive-mid);
}

.kb-required-toast {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  width: min(100% - 24px, var(--app-max, 420px));
  z-index: 1085;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--color-surface);
  color: var(--color-ink);
  border-radius: 14px;
  border: 1px solid var(--color-amber);
  box-shadow: 0 8px 24px rgba(26, 21, 16, 0.14);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.kb-required-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  visibility: visible;
}
.kb-required-toast-mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-amber);
  color: #fff;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.kb-required-toast-text {
  padding-top: 1px;
}

.ingredient-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
}
.ingredient-icon {
  background: var(--color-sage-light);
  color: var(--color-olive);
}
.ingredient-icon .kb-icon-wrap { width: 22px; height: 22px; }

.share-status-badge.is-kobook { background: var(--color-sage-light); color: #1F4D22; }
.share-status-badge.is-external { background: var(--color-amber-light); color: #6A4010; }

@media (min-width: 768px) {
  :root { --app-max: 720px; }
  .recipe-search-grid { grid-template-columns: repeat(3, 1fr); }
  .login-hero { height: 260px; }
  .kb-filter-bar {
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
  }
  .kb-filter-bar .kb-search {
    flex: 1 1 auto;
    min-width: 0;
  }
  .kb-filter-bar-cat {
    flex: 0 1 240px;
    min-width: 180px;
  }
  .kb-filter-bar-cat .form-select {
    height: 100%;
  }
}

body.no-bottom-nav { padding-bottom: 16px; }
body.no-bottom-nav .page-wrapper {
  padding-top: 8px;
  padding-bottom: 16px;
}

/* Botón fijo Volver / Atrás / Cancelar (contenido más alto que la pantalla) */
.kb-sticky-back {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 1060;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px 10px 14px;
  max-width: calc(100vw - 40px);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-olive);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(-50%, 8px, 0);
  -webkit-transform: translate3d(-50%, 8px, 0);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.kb-sticky-back.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0);
  -webkit-transform: translate3d(-50%, 0, 0);
}
.kb-sticky-back:hover,
.kb-sticky-back:focus-visible {
  color: var(--color-olive);
  background: var(--color-cream);
}
.kb-sticky-back .kb-icon-wrap {
  width: 16px;
  height: 16px;
  color: inherit;
  flex-shrink: 0;
}
.kb-sticky-back.is-cancel {
  background: var(--color-terra-light);
  color: var(--color-terra);
  border-color: rgba(192, 80, 48, 0.25);
}
.kb-sticky-back.is-cancel:hover,
.kb-sticky-back.is-cancel:focus-visible {
  color: var(--color-terra);
  border-color: var(--color-terra);
}
.kb-sticky-back.is-above-fab {
  bottom: calc(var(--bottom-nav-h) + 72px + env(safe-area-inset-bottom, 0px));
}
body.no-bottom-nav .kb-sticky-back {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
body.no-bottom-nav .kb-sticky-back.is-above-fab {
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
body.has-kb-sticky-back {
  padding-bottom: calc(var(--bottom-nav-h) + 72px + env(safe-area-inset-bottom, 0px));
}
body.no-bottom-nav.has-kb-sticky-back,
body.cook-mode-body.has-kb-sticky-back {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}
body.cook-mode-body .kb-sticky-back {
  background: rgba(245, 239, 227, 0.14);
  color: var(--color-cream);
  border-color: rgba(245, 239, 227, 0.22);
}
body.cook-mode-body .kb-sticky-back:hover,
body.cook-mode-body .kb-sticky-back:focus-visible {
  color: var(--color-cream);
  background: rgba(245, 239, 227, 0.22);
}
body.modal-open .kb-sticky-back {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .kb-sticky-back {
    transition: none;
    transform: translate3d(-50%, 0, 0);
    -webkit-transform: translate3d(-50%, 0, 0);
  }
}

.recipe-photo-picker { display: flex; flex-direction: column; gap: 10px; }
.recipe-photo-preview {
  height: 134px;
  border-radius: 14px;
  border: 2px dashed var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.recipe-photo-preview.has-photo { border-style: solid; }
.recipe-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recipe-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-ink-muted);
  font-size: 13px;
}
.recipe-photo-placeholder .kb-icon-wrap { width: 28px; height: 28px; }
.recipe-photo-actions {
  display: flex;
  gap: 8px;
}
.recipe-photo-actions .btn {
  flex: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.recipe-cam-video {
  width: 100%;
  max-height: 52vh;
  background: #1A1510;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

@media print {
  .bottom-nav, .cook-fab-wrap, .recipe-float-btn, .recipe-share-fab,
  .recipe-tabs, .kb-page-head .kb-text-action, .shop-export-actions,
  .kb-action-badge, .kb-sticky-back { display: none !important; }
  body { background: #fff; }
  .recipe-show-page .recipe-tab-panel { display: block !important; }
  .recipe-show-page .recipe-tab-panel.d-none { display: block !important; }
}

/* Invitaciones Kobook */
.bottom-nav a .kb-nav-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bottom-nav .nav-dot {
  position: absolute;
  top: -2px;
  right: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-terra);
  border: 2px solid var(--color-surface);
  pointer-events: none;
}
.home-invite-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  margin: 0 0 16px;
  background: var(--color-terra-light);
  border: 1px solid rgba(192, 80, 48, 0.28);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-ink);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.home-invite-banner:hover {
  color: var(--color-ink);
  transform: translateY(-1px);
}
.home-invite-banner strong {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--color-terra);
  font-weight: 500;
  margin-bottom: 2px;
}
.home-invite-banner span span,
.home-invite-banner .flex-grow-1 span {
  font-size: 14px;
}
.home-invite-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-terra);
  flex-shrink: 0;
}
.home-invite-banner.is-sage {
  background: var(--color-sage-light);
  border-color: rgba(78, 125, 80, 0.28);
}
.home-invite-banner.is-sage strong {
  color: var(--color-sage);
}
.home-invite-banner.is-sage .home-invite-dot {
  background: var(--color-sage);
}
.cal-day .cal-dot.is-invite {
  background: var(--color-amber);
}
.cal-day.has-invite:not(.selected) {
  font-weight: 600;
}
.event-month-row.is-invite.is-sel {
  background: var(--color-amber-light, #FAE8C8);
  border-color: rgba(204, 130, 40, 0.35);
}
.event-month-row.is-invite.is-sel .event-month-day {
  background: var(--color-amber);
  color: var(--color-cream);
}
.event-invite-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--color-terra);
  background: var(--color-terra-light);
  border-radius: 999px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.invite-dish-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-cream);
}
.menu-item-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-cream);
}
.event-guest-cover {
  border-radius: var(--radius);
  overflow: hidden;
  height: 160px;
  margin: 0 0 16px;
  background: var(--color-olive);
  box-shadow: var(--shadow);
}
.event-guest-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guest-rsvp-list {
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.guest-rsvp-group-hint {
  font-size: 12px;
  color: var(--color-ink-muted);
  margin: 0 0 8px;
  line-height: 1.4;
}
.asistentes-list--grouped .guest-rsvp-group {
  margin-bottom: 16px;
}
.asistentes-list--grouped .guest-rsvp-group-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.guest-rsvp-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 11px;
  font-size: 13px;
  color: var(--color-ink);
}
.guest-rsvp-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.guest-rsvp-row .kb-action-badge {
  flex-shrink: 0;
}
@media (max-width: 575.98px) {
  .guest-rsvp-actions {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .guest-rsvp-row .guest-rsvp-actions .kb-action-badge {
    font-size: 10px;
    padding: 5px 8px 5px 6px;
    min-height: 26px;
    gap: 3px;
  }
  .guest-rsvp-row .guest-rsvp-actions .kb-action-badge .kb-icon-wrap {
    width: 12px;
    height: 12px;
  }
}
.guest-rsvp-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-ink);
}
.guest-rsvp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.rsvp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.rsvp-badge .kb-icon-wrap {
  flex-shrink: 0;
  color: inherit;
}
.rsvp-badge.is-yes {
  background: var(--color-sage-light);
  color: var(--color-sage);
  border: 1px solid rgba(78, 125, 80, 0.25);
}
.rsvp-badge.is-wait {
  background: var(--color-amber-light);
  color: var(--color-amber);
  border: 1px solid rgba(204, 130, 40, 0.25);
}
.rsvp-badge.is-off {
  background: var(--color-cream);
  color: var(--color-ink-muted);
  border: 1px solid var(--color-border);
}
.rsvp-badge.is-no {
  background: var(--color-terra-light);
  color: var(--color-terra);
  border: 1px solid rgba(192, 80, 48, 0.25);
}
button.rsvp-badge {
  font: inherit;
  cursor: pointer;
  min-height: 32px;
  padding: 6px 12px 6px 8px;
  appearance: none;
  -webkit-appearance: none;
}
button.rsvp-badge:hover {
  filter: brightness(0.96);
}
.guest-rsvp-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--color-amber);
}
.guest-rsvp-status.is-yes { color: var(--color-sage); }
.guest-rsvp-status.is-no { color: var(--color-terra); }
.guest-rsvp-status.is-wait { color: var(--color-amber); }
.guest-rsvp-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--color-ink-muted);
}
.aporte-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.shop-export-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.kb-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.kb-suggest-kicker {
  margin: 0 0 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
}
.suggest-recipe-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.suggest-recipe-btn:hover {
  background: var(--color-surface);
  border-color: var(--color-olive);
}
.suggest-recipe-title { flex: 1; }
.kb-feedback-guest {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}
.kb-feedback-guest h2 {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  color: var(--color-ink);
  margin: 0 0 12px;
}
.kb-feedback-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
}
.kb-feedback-dish {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.kb-feedback-tog {
  display: flex;
  gap: 8px;
}
.kb-feedback-tog label {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink-muted);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.kb-feedback-tog label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.kb-feedback-tog label:has(input[value="gusto"]:checked),
.kb-feedback-tog label.is-like {
  background: var(--color-sage);
  border-color: var(--color-sage);
  color: var(--color-cream);
}
.kb-feedback-tog label:has(input[value="no_gusto"]:checked),
.kb-feedback-tog label.is-dislike {
  background: var(--color-terra);
  border-color: var(--color-terra);
  color: var(--color-cream);
}

.plan-compare {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
}
.plan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.plan-card.is-active {
  border-color: var(--color-olive);
  box-shadow: var(--shadow), 0 0 0 1px var(--color-olive);
}
.plan-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.plan-card-name {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 20px;
  font-weight: 500;
  color: var(--color-ink);
  margin: 0;
}
.plan-card-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-terra);
}
.plan-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-ink-muted);
}
.plan-card.is-active .plan-card-list {
  color: var(--color-ink);
}
.plan-card-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--color-border);
}
.plan-card-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.plan-card-list li span:last-child {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-ink);
  flex-shrink: 0;
}
.plan-card-since {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-ink-muted);
}
.plan-card-select {
  width: 100%;
  margin-top: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
}
@media (prefers-reduced-motion: reduce) {
  .plan-card { transition: none; }
}

/* ============================================================
   Móvil: nada se sale del ancho; textos cortos pero legibles
   ============================================================ */
.kb-title-short { display: none; }
@media (max-width: 575.98px) {
  .app-shell,
  .page-wrapper > .container.app-shell {
    max-width: 100%;
    overflow-x: clip;
  }

  .kb-page-head {
    gap: 8px;
  }
  .kb-page-head .kb-page-title,
  .kb-page-head h1 {
    font-size: 16px !important;
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.2;
    text-align: center;
  }
  .kb-page-head .kb-action-badge {
    flex-shrink: 0;
  }
  .kb-page-head.has-export {
    flex-wrap: wrap;
  }
  .kb-page-head.has-export .shop-export-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  .filter-chips,
  .kb-rail {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .filter-chips::-webkit-scrollbar,
  .kb-rail::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  .profile-pref-head {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .profile-pref-head .form-check {
    margin-left: auto;
  }

  .recipe-form-tabs .nav-tabs {
    flex-wrap: nowrap;
  }
  .recipe-form-tabs .nav-link {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 4px;
    font-size: 12px;
    text-align: center;
  }
  .recipe-form-tabs .nav-link i {
    display: none;
  }

  .event-show-title,
  .recipe-show-title,
  .profile-name,
  .more-hero-name,
  .event-hero-body h3,
  .guest-row .name,
  .pantry-row .name,
  .home-invite-banner span,
  .brand-title {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
  }
  .more-hero-mail {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .home-plan {
    white-space: normal;
    max-width: 7.5rem;
    text-align: right;
  }
  .event-hero-title-row h3 {
    min-width: 0;
  }
  .more-list-text,
  .more-list-text strong,
  .more-list-text span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .plan-card-list li span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .guest-row .name {
    flex: 1 1 auto;
  }
  .content-card .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 8px;
  }

  .restriction-row .row,
  .ingredient-row .row,
  .step-form-row .row {
    min-width: 0;
  }

  .cal-month span {
    min-width: 0;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .more-hero-stats .l {
    font-size: 9px;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 0 2px;
  }
}

@media (max-width: 420px) {
  .kb-page-head .kb-action-label {
    display: none;
  }
  .kb-page-head .kb-action-badge {
    padding: 6px 8px;
  }
  .kb-share-extra {
    display: none;
  }
  .kb-title-full,
  .more-list-text span.kb-title-full,
  .more-list-text strong .kb-title-full,
  .more-hero-stats .kb-title-full,
  .home-quick-btn .kb-title-full,
  .more-plan-btn .kb-title-full {
    display: none;
  }
  .kb-title-short,
  .more-list-text strong .kb-title-short,
  .more-hero-stats .kb-title-short,
  .home-quick-btn .kb-title-short,
  .more-plan-btn .kb-title-short {
    display: inline;
  }
  .more-list-text span.kb-title-short {
    display: block;
  }
  .shop-export-actions .kb-action-label {
    display: none;
  }
  .more-plan-btn {
    font-size: 12px;
    padding: 9px 12px;
  }
  .kb-form-actions {
    flex-wrap: wrap;
  }
  .kb-form-actions .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }
}
