
/* ============================================================
   MISE v14 — Design System
   Font: Inter (variable, optical sizing)
   ============================================================ */

:root {
  --color-bg:        #f5f2ed;
  --color-surface:   #ffffff;
  --color-border:    #e8e2d9;
  --color-text:      #1a1714;
  --color-muted:     #8a7f74;
  --color-accent:    #993415;
  --color-accent-lt: #fdf0ec;
  --color-danger:    #c0392b;
  --color-like:      #e74c3c;
  --color-cooked:    #5a524a;

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.14);

  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Inter', system-ui, -apple-system, sans-serif;

  --nav-h:    64px;
  --fab-size: 56px;
  --max-w:    600px;
  --pad:      16px;
  --topbar-h: 52px;

  --icon-color: #5a524a;
  --icon-size: 22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  min-height: 100dvh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, textarea, select { font: inherit; }

/* ── App shell ──────────────────────────────────────────────── */
.app-shell { display: flex; flex-direction: column; min-height: 100dvh; }
.app-content {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: var(--topbar-h);
  padding-bottom: calc(var(--nav-h) + 24px);
  background: var(--color-bg);
}

/* ── Tipografía ─────────────────────────────────────────────── */
h1,h2,h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p  { font-size: .95rem; }
.text-muted { color: var(--color-muted); }

/* ── Página ─────────────────────────────────────────────────── */
.page { padding: 20px var(--pad) 40px; }
.page-header { margin-bottom: 20px; }

/* ── SVG Icon System ────────────────────────────────────────── */
.icon {
  width: var(--icon-size);
  height: var(--icon-size);
  stroke: var(--icon-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.icon--sm { --icon-size: 20px; }
.icon--xs { --icon-size: 18px; }
.icon--lg { --icon-size: 26px; }
.icon--nav { --icon-size: 22px; }
.icon--filled { fill: currentColor; stroke: currentColor; }
.icon--accent { stroke: var(--color-accent); }
.icon--muted { stroke: var(--color-muted); }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--max-w);
  height: var(--topbar-h);
  background: rgba(245,242,237,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 40;
  transition: transform .25s ease;
}
.topbar--hidden { transform: translateX(-50%) translateY(-100%); }
.topbar__inner {
  height: 100%; max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
}
.topbar__logo {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
  color: var(--color-accent); letter-spacing: -.02em;
}
.topbar__actions { display: flex; align-items: center; gap: 2px; position: relative; }
.topbar__btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-muted); cursor: pointer; background: none; border: none;
  position: relative; transition: background .15s, color .15s;
}
.topbar__btn:hover     { background: var(--color-border); color: var(--color-text); }
.topbar__btn--active   { color: var(--color-accent); }
.topbar__btn .icon     { stroke: currentColor; }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--color-danger); color: #fff;
  font-size: .58rem; font-weight: 700; min-width: 15px; height: 15px;
  border-radius: var(--radius-full); display: flex; align-items: center;
  justify-content: center; padding: 0 3px; border: 2px solid var(--color-bg);
}

/* ── Header menu ────────────────────────────────────────────── */
.header-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  min-width: 200px; z-index: 200; overflow: hidden;
}
.header-menu__item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; font-size: .9rem; color: var(--color-text);
  text-decoration: none; transition: background .12s;
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--font-sans);
}
.header-menu__item:hover { background: var(--color-accent-lt); }
.header-menu__item--danger { color: var(--color-danger); }
.header-menu__item--danger:hover { background: #fef2f2; }
.header-menu__divider { height: 1px; background: var(--color-border); margin: 4px 0; }
.header-menu__form { display: block; }

/* ── Bottom nav ─────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--max-w); height: var(--nav-h);
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 4px; z-index: 50;
}
.bottom-nav--guest { justify-content: flex-end; gap: 8px; padding: 0 16px; }
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--color-muted); font-size: .6rem; font-weight: 500;
  flex: 1; padding: 8px 4px; text-decoration: none; transition: color .15s;
  font-family: var(--font-sans);
}
.nav-item .icon { stroke: currentColor; }
.nav-item--active     { color: var(--color-accent); }
.nav-item--active .icon { stroke: var(--color-accent); }
.nav-item--fab-space  { flex: 1; pointer-events: none; }
.avatar--nav { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.avatar--nav-active { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ── FAB ────────────────────────────────────────────────────── */
.fab-container {
  position: fixed; bottom: calc(var(--nav-h)/2); left: 50%;
  transform: translate(-50%, 50%); z-index: 60;
}
.fab {
  width: var(--fab-size); height: var(--fab-size); border-radius: 50%;
  background: var(--color-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(153,52,21,.45);
  transition: box-shadow .2s;
}
.fab .icon { stroke: #fff; width: 26px; height: 26px; transition: transform .25s; }
.fab--open .icon { transform: rotate(45deg); }
.fab-menu {
  position: absolute; bottom: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(6px) scale(.95);
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; min-width: 210px;
}
.fab-menu--open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0) scale(1); }
.fab-option {
  display: flex; align-items: center; gap: 10px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 10px 16px;
  box-shadow: var(--shadow-md); color: var(--color-text);
  font-size: .9rem; font-weight: 500; transition: background .15s;
}
.fab-option:hover { background: var(--color-accent-lt); }
.fab-option__icon { font-size: 1.2rem; }
.fab-menu__divider { height: 1px; background: var(--color-border); margin: 2px 0; }

/* ── Post card tags ─────────────────────────────────────────── */
.post-card-tags {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 0 var(--pad) 10px;
}
.post-card-tag {
  font-size: .73rem; padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-accent-lt);
  color: var(--color-accent); font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: opacity .15s;
}
.post-card-tag:hover { opacity: .75; }

/* ── WIP pages ──────────────────────────────────────────────── */
.wip-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.wip-container { text-align: center; padding: 40px var(--pad); }
.wip-icon { font-size: 3.5rem; margin-bottom: 16px; }
.wip-title { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 10px; }
.wip-desc { color: var(--color-muted); font-size: .95rem; line-height: 1.6; margin-bottom: 24px; }

/* ── Botones ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; font-family: var(--font-sans);
  transition: opacity .15s, transform .1s; border: none; cursor: pointer;
  text-decoration: none; letter-spacing: .01em;
}
.btn:active { transform: scale(.97); }
.btn--primary   { background: var(--color-accent); color: #fff; box-shadow: 0 2px 8px rgba(153,52,21,.3); }
.btn--secondary { background: var(--color-surface); color: var(--color-text); border: 1.5px solid var(--color-border); }
.btn--danger    { background: var(--color-danger); color: #fff; }
.btn--ghost     { background: transparent; color: var(--color-accent); border: 1.5px solid var(--color-accent); }
.btn--sm        { padding: 7px 14px; font-size: .82rem; }
.btn--lg        { padding: 14px 24px; font-size: 1rem; border-radius: var(--radius-md); }
.btn-icon       { padding: 6px; border-radius: var(--radius-sm); color: var(--color-muted); transition: background .15s; }
.btn-icon:hover { background: var(--color-border); }

/* ── Action buttons (feed & detail) ─────────────────────────── */
.action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 0;
  font-size: .85rem; font-weight: 500; font-family: var(--font-sans);
  background: none; color: var(--icon-color);
  transition: all .15s; cursor: pointer; border: none;
}
.action-btn .icon { transition: all .15s; }
.action-btn span { font-variant-numeric: tabular-nums; }

/* Like active — only icon that gets color */
.action-btn.liked { color: var(--color-like); }
.action-btn.liked .icon { stroke: var(--color-like); fill: var(--color-like); }

/* Save active — filled in outline gray */
.action-btn.saved .icon { stroke: var(--icon-color); fill: var(--icon-color); }

/* Cooked active — filled in outline gray */
.action-btn.cooked .icon { stroke: var(--icon-color); fill: var(--icon-color); }

/* Share - no fill state */
.action-btn.share-btn:active { color: var(--color-accent); }

/* ── Formularios ────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: .85rem; font-weight: 600;
  margin-bottom: 6px; color: var(--color-text);
}
.form-hint { display: block; font-size: .78rem; color: var(--color-muted); margin-top: 4px; }
.form-control {
  width: 100%; padding: 11px 13px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: var(--font-sans);
  background: var(--color-surface); color: var(--color-text);
  transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(153,52,21,.12); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a7f74' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 28px; }

/* ── Auth ───────────────────────────────────────────────────── */
.auth-page {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px var(--pad);
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo span {
  font-family: var(--font-display); font-size: 2rem;
  color: var(--color-accent); font-weight: 700;
}
.auth-title { font-size: 1.25rem; margin-bottom: 4px; }
.auth-sub   { font-size: .88rem; color: var(--color-muted); margin-bottom: 24px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--color-muted); font-size: .82rem;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }
.auth-footer { text-align: center; margin-top: 20px; font-size: .88rem; color: var(--color-muted); }
.auth-footer a { color: var(--color-accent); font-weight: 600; }
.auth-version { text-align: center; margin-top: 16px; font-size: .72rem; color: var(--color-muted); opacity: .6; }
.auth-link-sm { font-size: .82rem; color: var(--color-muted); text-decoration: none; }
.auth-link-sm:hover { color: var(--color-accent); }

/* Password show/hide */
.input-password-wrap { position: relative; }
.input-password-wrap .form-control { padding-right: 44px; }
.password-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--color-muted); display: flex; align-items: center;
  transition: color .15s;
}
.password-toggle:hover { color: var(--color-accent); }
.password-toggle--visible { color: var(--color-accent); }

/* Topbar logo link */
.topbar__logo-link { display: block; line-height: 0; }

/* ── Alertas ────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 16px; font-size: .9rem; }
.alert--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert--info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Import page ── */
.import-hero            { margin-bottom: 1.5rem; }
.import-hero__desc      { color: var(--text-secondary); margin-bottom: .75rem; line-height: 1.6; }
.import-tips            { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.import-tips li         { font-size: .875rem; color: var(--text-secondary); }
.import-spinner         { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4);
                          border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; margin-left: .5rem; }
@keyframes spin         { to { transform: rotate(360deg); } }

/* ── Upload ─────────────────────────────────────────────────── */
.upload-dropzone {
  border: 2px dashed var(--color-border); border-radius: var(--radius-md);
  cursor: pointer; transition: all .15s;
}
.upload-dropzone:hover,.dropzone--over { border-color: var(--color-accent); background: var(--color-accent-lt); }
.upload-area__input  { display: none; }
.upload-area__body   { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px; color: var(--color-muted); }
.upload-area__icon   { font-size: 1.8rem; }
.upload-area__text   { font-size: .9rem; font-weight: 500; }
.upload-area--sm     { padding: 14px; font-size: .85rem; }
.photo-strip         { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.photo-strip__item   { position: relative; width: 88px; height: 88px; border-radius: var(--radius-sm); overflow: hidden; }
.photo-strip__item img { width: 100%; height: 100%; object-fit: cover; }
.photo-strip__badge  { position: absolute; bottom: 4px; left: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: .62rem; padding: 2px 5px; border-radius: 3px; }
.new-photos-strip    { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-new-preview   { position: relative; width: 88px; height: 88px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--color-border); }
.photo-new-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove-btn    { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: .85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ── Level selector (2 opciones) ───────────────────────────── */
.level-selector { display: flex; flex-direction: column; gap: 8px; }
.level-option {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border: 2px solid var(--color-border);
  border-radius: var(--radius-md); cursor: pointer; transition: all .15s;
}
.level-option input[type=radio] { display: none; }
.level-option--active   { border-color: var(--color-accent); background: var(--color-accent-lt); }
.level-option--disabled { opacity: .4; cursor: not-allowed; }
.level-option__icon     { font-size: 1.4rem; }
.level-option__name     { font-weight: 600; font-size: .92rem; display: block; }
.level-option__desc     { font-size: .78rem; color: var(--color-muted); }

/* ── Ingredientes ───────────────────────────────────────────── */
.ingredient-row { display: grid; grid-template-columns: 1fr 70px 130px 90px 30px; gap: 6px; margin-bottom: 8px; align-items: start; }
.ingredient-typeahead-wrap { position: relative; }
.typeahead-list { position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); z-index: 100; list-style: none; max-height: 200px; overflow-y: auto; box-shadow: var(--shadow-md); }
.typeahead-list.hidden { display: none; }
.typeahead-list li { padding: 9px 12px; cursor: pointer; font-size: .9rem; }
.typeahead-list li:hover { background: var(--color-accent-lt); }
.unit-select-wrap { display: flex; flex-direction: column; gap: 4px; }
.unit-custom.hidden { display: none; }

/* ── Pasos ──────────────────────────────────────────────────── */
.step-row { display: grid; grid-template-columns: 22px 1fr 90px 30px; gap: 8px; margin-bottom: 10px; align-items: start; }
.step-num { font-weight: 700; font-size: .88rem; color: var(--color-accent); padding-top: 11px; text-align: center; }

/* ── Tags ───────────────────────────────────────────────────── */
.tags-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-checkbox-label {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: var(--radius-full);
  font-size: .82rem; border: 1.5px solid var(--color-border);
  cursor: pointer; transition: all .15s; user-select: none;
  font-family: var(--font-sans);
}
.tag-checkbox-label input { display: none; }
.tag-checkbox-label:has(input:checked) { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.tags-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; scrollbar-width: none; }
.tags-strip::-webkit-scrollbar { display: none; }
.tag-pill { flex-shrink: 0; padding: 6px 14px; border-radius: var(--radius-full); font-size: .82rem; font-weight: 500; background: var(--color-surface); border: 1.5px solid var(--color-border); color: var(--color-text); text-decoration: none; transition: all .15s; white-space: nowrap; }
.tag-pill:hover   { border-color: var(--color-accent); color: var(--color-accent); }
.tag-pill--active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

/* ── Feed ───────────────────────────────────────────────────── */
.feed-grid { display: flex; flex-direction: column; gap: 0; }
.post-card { background: var(--color-surface); border-bottom: 1px solid var(--color-border); overflow: hidden; margin-bottom: 8px; }
.post-card-link { display: block; color: inherit; }

/* ── Feed carousel (multi-image) ────────────────────────────── */
.post-card-image { position: relative; width: 100%; aspect-ratio: 4/3; background: var(--color-border); overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-no-image { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; color: var(--color-muted); }

.feed-carousel { position: relative; width: 100%; aspect-ratio: 4/3; background: var(--color-border); overflow: hidden; }
.feed-carousel__track { display: flex; width: 100%; height: 100%; transition: transform .3s ease; }
.feed-carousel__slide { flex: 0 0 100%; width: 100%; height: 100%; }
.feed-carousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-carousel__dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.feed-carousel__dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; cursor: pointer; padding: 0; transition: background .15s; }
.feed-carousel__dot--active { background: #fff; }
.feed-carousel__counter { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5); color: #fff; font-size: .7rem; padding: 3px 8px; border-radius: var(--radius-full); }

.post-card-info { padding: 10px var(--pad) 4px; }
.post-card-title {
  font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px;
  color: var(--color-text); text-align: left;
}
.post-card-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--color-muted); text-align: left;
  padding-left: 0; margin-bottom: 2px;
}
.post-card-author { color: var(--color-accent); font-weight: 600; }
.post-card-desc {
  font-size: .85rem; color: var(--color-muted); line-height: 1.4;
  margin-top: 4px; text-align: left;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Actions right-aligned below image */
.post-card-actions {
  padding: 4px var(--pad) 12px;
  display: flex; gap: 16px; justify-content: flex-end; align-items: center;
}

.level-badge, .visibility-badge { position: absolute; top: 10px; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.level-badge      { right: 10px; }
.visibility-badge { left: 10px; }

/* ── Post detail ────────────────────────────────────────────── */
.post-gallery { }
.gallery-img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.gallery-swipe { position: relative; overflow: hidden; }
.gallery-slide { display: none; }
.gallery-slide--active { display: block; }
.gallery-dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0; }
.gallery-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-border); cursor: pointer; transition: background .15s; border: none; }
.gallery-dot--active { background: var(--color-accent); }

.post-actions-bar {
  display: flex; gap: 4px; padding: 8px var(--pad);
  border-bottom: 1px solid var(--color-border);
  align-items: center;
}
.post-actions-bar .action-btn { flex-shrink: 0; }
.post-actions-bar .share-btn  { margin-left: auto; }
.post-actions-bar__owner {
  display: flex; gap: 4px; align-items: center;
  margin-left: 6px; padding-left: 8px;
  border-left: 1px solid var(--color-border);
}
.action-btn--owner { color: var(--color-muted); }
.action-btn--owner:hover { color: var(--color-accent); }
.action-btn--danger { color: var(--color-muted); }
.action-btn--danger:hover { color: var(--color-danger); }

/* #7 — author aligned left, matches title */
.post-header      { padding: 12px var(--pad) 4px; }
.post-author      { display: flex; align-items: center; gap: 10px; }
.author-name      { font-weight: 600; color: var(--color-accent); font-size: .95rem; }
.post-time        { font-size: .75rem; color: var(--color-muted); display: block; }
.post-title       { font-size: 1.35rem; padding: 0 var(--pad) 6px; text-align: left; }
.post-description { padding: 0 var(--pad) 10px; font-size: .95rem; color: var(--color-muted); text-align: left; }

/* Post tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 var(--pad) 12px; }
.post-tag {
  font-size: .75rem; padding: 3px 10px; border-radius: var(--radius-full);
  background: var(--color-accent-lt); color: var(--color-accent);
  font-weight: 500; text-decoration: none; border: 1px solid transparent;
  transition: border-color .15s;
}
.post-tag:hover { border-color: var(--color-accent); }

/* ── Tags input ────────────────────────────────────────────── */
.tags-input-wrap { position: relative; }
.tags-input-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.tag-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--color-accent-lt); color: var(--color-accent); font-size: .8rem; font-weight: 500; padding: 4px 8px; border-radius: 12px; }
.tag-pill__remove { background: none; border: none; color: var(--color-accent); font-size: .9rem; cursor: pointer; padding: 0; line-height: 1; }
.tags-text-input { font-size: .85rem; }
.tags-suggestions { position: absolute; left: 0; right: 0; top: 100%; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); max-height: 150px; overflow-y: auto; z-index: 50; list-style: none; margin: 2px 0 0; padding: 0; }
.tags-suggestions.hidden { display: none; }
.tags-suggestion-item { padding: 8px 12px; font-size: .85rem; cursor: pointer; }
.tags-suggestion-item:hover { background: var(--color-accent-lt); }

/* Tags sugeridos en formulario */
.tags-suggested { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag-suggested-pill {
  padding: 4px 12px; border-radius: var(--radius-full); font-size: .8rem; font-weight: 500;
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  color: var(--color-muted); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.tag-suggested-pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.tag-suggested-pill--active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

/* Fix nombre corrido — garantizar que post-card-info no hereda offsets */
.post-card-info { padding: 10px var(--pad) 4px; overflow: hidden; }
.post-card-meta { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--color-muted); padding-left: 0 !important; margin-left: 0 !important; margin-bottom: 2px; }

.recipe-locked-notice { margin: 0 var(--pad) 12px; background: var(--color-accent-lt); border-radius: var(--radius-md); padding: 10px 14px; font-size: .88rem; color: var(--color-accent); }
.recipe-meta { display: flex; gap: 16px; padding: 0 var(--pad) 12px; font-size: .88rem; color: var(--color-muted); }
.recipe-ingredients,.recipe-steps,.post-comments,.post-logs { padding: 0 var(--pad); margin-bottom: 24px; }
.recipe-ingredients h2,.recipe-steps h2,.post-comments h2,.post-logs h2 { font-size: 1rem; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.portions-control { display: flex; align-items: center; gap: 10px; padding-right: 16px; }
.portions-control button { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--color-border); background: var(--color-surface); font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .15s; }
.portions-control button:hover { border-color: var(--color-accent); color: var(--color-accent); }
.ingredients-list { list-style: none; }
.ingredient-item  { display: flex; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--color-border); font-size: .92rem; align-items: baseline; }
.ing-qty   { font-weight: 700; min-width: 36px; color: var(--color-text); }
.ing-unit  { color: var(--color-muted); font-size: .82rem; }
.ing-name  { color: var(--color-text); }
.ing-notes { color: var(--color-muted); font-size: .82rem; font-style: italic; }
.steps-list { list-style: none; }
.step-item  { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.step-item.completed .step-content p { text-decoration: line-through; opacity: .5; }
.step-check input { width: 20px; height: 20px; cursor: pointer; margin-top: 3px; accent-color: var(--color-accent); }
.step-content p   { font-size: .93rem; line-height: 1.65; margin-bottom: 8px; }
.timer-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 13px; background: var(--color-accent-lt); color: var(--color-accent); border: 1px solid rgba(153,52,21,.3); border-radius: var(--radius-full); font-size: .82rem; font-weight: 600; cursor: pointer; }

/* ── Comentarios ────────────────────────────────────────────── */
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.comment-root { margin-bottom: 14px; }
.comment { padding: 10px 13px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.comment--reply { margin-left: 20px; margin-top: 6px; }
.comment strong { font-size: .88rem; font-weight: 600; }
.comment p { font-size: .88rem; margin: 4px 0; color: var(--color-text); }
.comment-footer { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.comment-time { font-size: .72rem; color: var(--color-muted); }
.reply-toggle { color: var(--color-accent); font-size: .78rem; font-weight: 600; cursor: pointer; }
.reply-form { margin: 6px 0 0 20px; display: flex; flex-direction: column; gap: 6px; }

/* ── Bitácora ───────────────────────────────────────────────── */
.log-form-wrap summary { list-style: none; cursor: pointer; }
.log-form-wrap summary::-webkit-details-marker { display: none; }
.log-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.logs-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.log-entry { padding: 12px 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.log-date  { font-size: .72rem; color: var(--color-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 6px; }
.log-photo { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 8px; }
.log-note  { font-size: .9rem; }

/* ── Perfil ─────────────────────────────────────────────────── */
.profile-header { display: flex; gap: 12px; align-items: flex-start; padding: 16px var(--pad) 16px; border-bottom: 1px solid var(--color-border); overflow: hidden; }
.avatar { border-radius: 50%; object-fit: cover; }
.avatar--lg  { width: 72px; height: 72px; flex-shrink: 0; }
.avatar--sm  { width: 34px; height: 34px; }
.avatar--placeholder { display: block; }
.profile-info { flex: 1; min-width: 0; text-align: left; }
.profile-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; text-align: left; min-width: 0; }
.profile-name-row h2 { font-size: 1.15rem; word-break: break-word; min-width: 0; }
.profile-username { color: var(--color-muted); font-size: .85rem; margin: 0 0 6px 0; padding: 0; text-align: left; }
.profile-bio { font-size: .88rem; margin-bottom: 8px; color: var(--color-text); text-align: left; }
.profile-stats { display: flex; gap: 10px 14px; font-size: .82rem; color: var(--color-muted); margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.profile-stats strong { font-weight: 700; color: var(--color-text); }
.badge       { display: inline-block; padding: 2px 9px; border-radius: var(--radius-full); font-size: .72rem; font-weight: 700; }
.badge--pro  { background: var(--color-accent); color: #fff; }
.profile-pro-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { display: inline-block; padding: 3px 10px; background: var(--color-accent-lt); color: var(--color-accent); border-radius: var(--radius-full); font-size: .78rem; font-weight: 500; }
.tag--link { text-decoration: none; cursor: pointer; }
.tag--link:hover { text-decoration: underline; }

/* Profile view toggle */
.profile-view-toggle {
  display: flex; justify-content: center; gap: 0;
  border-bottom: 1px solid var(--color-border);
}
.profile-view-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 12px 0; background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; color: var(--color-muted);
  transition: all .15s;
}
.profile-view-btn .icon { stroke: currentColor; }
.profile-view-btn--active { color: var(--color-text); border-bottom-color: var(--color-text); }

/* Profile grid with overlay */
.profile-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; }
.profile-thumb { position: relative; aspect-ratio: 1; overflow: hidden; display: block; background: var(--color-border); }
.profile-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.profile-thumb:hover img { transform: scale(1.03); }
.profile-thumb__empty { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2rem; }

/* Grid overlay stats */
.profile-thumb__overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; gap: 14px;
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.profile-thumb:hover .profile-thumb__overlay { opacity: 1; }
/* Always show overlay on touch devices */
@media (hover: none) {
  .profile-thumb__overlay { opacity: 1; background: linear-gradient(transparent 50%, rgba(0,0,0,.5)); align-items: flex-end; padding-bottom: 8px; gap: 12px; }
}
.profile-thumb__stat {
  display: flex; align-items: center; gap: 3px;
  color: #fff; font-size: .78rem; font-weight: 600;
}
.profile-thumb__stat .icon { stroke: #fff; width: 14px; height: 14px; }

.thumb-badge,.thumb-vis { position: absolute; top: 5px; right: 5px; font-size: .7rem; }

/* Profile feed view */
.profile-feed { display: none; }
.profile-feed.active { display: flex; flex-direction: column; gap: 0; }
.profile-grid.active { display: grid; }
.profile-grid:not(.active) { display: none; }

/* ── Guardados — vista toggle ───────────────────────────────── */
.saved-view-toggle {
  display: flex; gap: 0; margin-bottom: 0;
  border-bottom: 1px solid var(--color-border);
}
.saved-view-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 10px 0; background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; color: var(--color-muted);
  transition: all .15s;
}
.saved-view-btn .icon { stroke: currentColor; }
.saved-view-btn--active { color: var(--color-text); border-bottom-color: var(--color-text); }

.saved-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; }
.saved-grid-item { position: relative; aspect-ratio: 1; overflow: hidden; display: block; background: var(--color-border); }
.saved-grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.saved-grid-item__title {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: #fff; font-size: .72rem; font-weight: 600;
  padding: 16px 6px 6px; line-height: 1.2;
}

/* ── Búsqueda ───────────────────────────────────────────────── */
.search-form { display: flex; gap: 8px; margin-bottom: 16px; }
.search-input-wrap { flex: 1; position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 10px; color: var(--color-muted); width: 18px; height: 18px; flex-shrink: 0; }
.search-input { width: 100%; padding: 10px 36px; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); font-size: .95rem; font-family: var(--font-sans); background: var(--color-surface); color: var(--color-text); }
.search-input:focus { outline: none; border-color: var(--color-accent); }
.search-clear { position: absolute; right: 10px; color: var(--color-muted); font-size: 1.2rem; }
.search-count { font-size: .82rem; color: var(--color-muted); margin-bottom: 12px; }

/* ── Notificaciones ─────────────────────────────────────────── */
.notif-list { display: flex; flex-direction: column; }
.notif-item { display: flex; gap: 12px; padding: 14px var(--pad); border-bottom: 1px solid var(--color-border); text-decoration: none; color: var(--color-text); transition: background .12s; }
.notif-item:hover { background: var(--color-accent-lt); }
.notif-item--unread { background: #fffbf5; }
.notif-avatar { position: relative; flex-shrink: 0; }
.notif-type-icon { position: absolute; bottom: -2px; right: -4px; font-size: .75rem; }
.notif-body { flex: 1; }
.notif-body strong { font-size: .9rem; display: block; }
.notif-body span { font-size: .85rem; color: var(--color-muted); }
.notif-time { font-size: .75rem; color: var(--color-muted); display: block; margin-top: 3px; }

/* ── Landing ────────────────────────────────────────────────── */
.landing { display: flex; flex-direction: column; align-items: center; min-height: 100dvh; padding: 48px var(--pad) 32px; text-align: center; gap: 32px; }
.landing__hero { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.landing__logo-wrap { display: flex; flex-direction: column; align-items: center; }
.landing__logo-img { height: 64px; width: auto; }
.landing__tagline { font-size: 1.05rem; color: var(--color-muted); line-height: 1.6; }
.landing__actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 300px; }
.landing__preview { width: 100%; max-width: 400px; }
.landing__preview-label { font-size: .78rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.landing__carousel { overflow: hidden; border-radius: var(--radius-md); }
.landing__carousel-track {
  display: flex;
  transition: transform .4s ease;
}
.landing__carousel-page {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  min-width: 100%;
  flex-shrink: 0;
}
.landing__carousel-slide { aspect-ratio: 1; overflow: hidden; background: var(--color-border); display: flex; align-items: center; justify-content: center; }
.landing__carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.landing__carousel-placeholder { font-size: 1.5rem; }
.landing__carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.landing__carousel-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--color-border); cursor: pointer; padding: 0; transition: background .2s; }
.landing__carousel-dot--active { background: var(--color-accent); }
.landing__version { font-size: .7rem; color: var(--color-muted); opacity: .5; }
.landing__footer { font-size: .78rem; color: var(--color-muted); }
.landing__footer a { color: var(--color-accent); }

/* ── Update banner ─────────────────────────────────────────── */
.update-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; background: var(--color-accent); color: #fff; font-size: .85rem; font-weight: 500; }
.update-banner.hidden { display: none; }
.update-banner .btn { background: #fff; color: var(--color-accent); border: none; }
.update-banner__dismiss { background: none; border: none; color: rgba(255,255,255,.7); font-size: 1.1rem; cursor: pointer; padding: 0 4px; }

/* ── Confirm modal ─────────────────────────────────────────── */
.confirm-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.confirm-overlay.hidden { display: none; }
.confirm-modal { background: var(--color-surface); border-radius: var(--radius-md); padding: 24px; max-width: 320px; width: 100%; text-align: center; }
.confirm-modal__msg { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.confirm-modal__warn { font-size: .82rem; color: var(--color-muted); margin-bottom: 20px; }
.confirm-modal__actions { display: flex; gap: 10px; justify-content: center; }
.btn--danger { background: #c0392b; color: #fff; border: none; }
.btn--danger:hover { background: #a93226; }

/* ── Timer done flash ──────────────────────────────────────── */
.cm-timer--done { color: #c0392b; animation: timerPulse 0.6s ease infinite alternate; }
@keyframes timerPulse { from { opacity: 1; } to { opacity: .4; } }

/* ── Install banner ─────────────────────────────────────────── */
.install-banner { position: fixed; bottom: calc(var(--nav-h) + 12px); left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: calc(var(--max-w) - 32px); background: var(--color-text); color: #fff; border-radius: var(--radius-md); padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); z-index: 80; animation: slideUp .3s ease; }
@keyframes slideUp { from { opacity:0; transform: translateX(-50%) translateY(16px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
.install-banner__icon   { font-size: 1.6rem; flex-shrink: 0; }
.install-banner__text   { flex: 1; }
.install-banner__text strong { display: block; font-size: .9rem; margin-bottom: 2px; }
.install-banner__text span   { font-size: .78rem; opacity: .75; }
.install-banner__actions { display: flex; gap: 8px; flex-shrink: 0; }
.install-banner__btn { padding: 7px 14px; border-radius: var(--radius-sm); font-size: .82rem; font-weight: 600; cursor: pointer; border: none; font-family: var(--font-sans); }
.install-banner__btn--primary  { background: var(--color-accent); color: #fff; }
.install-banner__btn--dismiss  { background: rgba(255,255,255,.15); color: #fff; }

/* ── Toast ──────────────────────────────────────────────────── */
.toast { position: fixed; bottom: calc(var(--nav-h) + 12px); left: 50%; transform: translateX(-50%); background: var(--color-text); color: #fff; padding: 9px 20px; border-radius: var(--radius-full); font-size: .85rem; z-index: 200; pointer-events: none; animation: toastIn .2s ease; }
@keyframes toastIn { from { opacity:0; transform: translateX(-50%) translateY(8px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* ── Under construction ─────────────────────────────────────── */
.under-construction {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px var(--pad); text-align: center; gap: 12px;
}
.under-construction .icon { width: 48px; height: 48px; stroke: var(--color-muted); }
.under-construction h2 { font-size: 1.2rem; color: var(--color-text); }
.under-construction p { font-size: .9rem; color: var(--color-muted); max-width: 280px; }

/* ── Utilidades ─────────────────────────────────────────────── */
.hidden      { display: none !important; }
.inline-form { display: inline; }
.empty-state { text-align: center; padding: 32px 0; color: var(--color-muted); font-size: .9rem; }
.empty-feed  { text-align: center; padding: 48px var(--pad); }

/* ── Followers / Following ──────────────────────────────────── */
.follow-list-page { padding-bottom: 80px; }
.follow-list__header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px var(--pad); border-bottom: 1px solid var(--color-border);
}
.follow-list__header h1 { font-size: 1rem; font-weight: 600; }
.follow-list__back { font-size: 1.2rem; text-decoration: none; color: var(--color-text); }
.follow-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px var(--pad); border-bottom: 1px solid var(--color-border);
}
.follow-item__avatar { flex-shrink: 0; }
.follow-item__info { flex: 1; min-width: 0; }
.follow-item__name { font-weight: 600; font-size: .95rem; display: block; color: var(--color-text); }
.follow-item__username { font-size: .8rem; color: var(--color-muted); }
.follow-item__action { flex-shrink: 0; }

/* ── Stats de autor ─────────────────────────────────────────── */
.stats-page { padding-bottom: 80px; }
.stats-page__header {
  padding: 16px var(--pad); border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; background: var(--color-bg); z-index: 10;
  display: flex; align-items: center; gap: 12px;
}
.stats-page__header h1 { font-size: 1rem; font-weight: 600; }
.stats-totals {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 1px; background: var(--color-border); margin-bottom: 1px;
}
.stats-total-card {
  background: var(--color-surface); padding: 16px 8px; text-align: center;
}
.stats-total-card__num { font-size: 1.5rem; font-weight: 700; font-family: var(--font-display); display: block; }
.stats-total-card__lbl { font-size: .72rem; color: var(--color-muted); margin-top: 2px; display: block; }
.stats-table-wrap { overflow-x: auto; }
.stats-table {
  width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 480px;
}
.stats-table th {
  padding: 10px 12px; text-align: left; font-size: .75rem;
  font-weight: 600; color: var(--color-muted); text-transform: uppercase;
  letter-spacing: .06em; border-bottom: 2px solid var(--color-border);
  white-space: nowrap; cursor: pointer; user-select: none;
}
.stats-table th.sort-asc::after  { content: ' ↑'; }
.stats-table th.sort-desc::after { content: ' ↓'; }
.stats-table td { padding: 12px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.stats-table tr:hover td { background: var(--color-accent-lt); }
.stats-table__title a { color: var(--color-text); font-weight: 500; text-decoration: none; }
.stats-table__title a:hover { text-decoration: underline; }
.stats-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Profile stats link ─────────────────────────────────────── */
.profile-stats__link { color: var(--color-text); text-decoration: none; }
.profile-stats__link:hover { text-decoration: underline; }

/* ── Búsqueda: sección y resultados de usuarios ─────────────── */
.search-section { margin-bottom: 24px; }
.search-section-title { font-size: .82rem; font-weight: 600; color: var(--color-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.users-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 12px var(--pad); background: var(--color-surface); border-bottom: 1px solid var(--color-border); text-decoration: none; color: var(--color-text); transition: background .12s; }
.user-row:hover { background: var(--color-accent-lt); }
.user-row__info { flex: 1; }
.user-row__name { font-weight: 600; font-size: .9rem; display: block; }
.user-row__username { font-size: .8rem; color: var(--color-muted); }

/* ── Modo cocina — fullscreen ───────────────────────────────── */
.cook-mode {
  position: fixed; inset: 0; background: var(--color-bg);
  z-index: 500; overflow-y: auto;
  display: flex; flex-direction: column;
}
.cook-mode__header {
  position: sticky; top: 0; background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 12px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
}
.cook-mode__title { font-family: var(--font-display); font-size: 1.1rem; }
.cook-mode__close { font-size: 1.4rem; cursor: pointer; background: none; border: none; }
.cook-mode__body  { flex: 1; padding: var(--pad); }
.cook-mode__section { margin-bottom: 24px; }
.cook-mode__section h3 { font-size: .9rem; font-weight: 600; color: var(--color-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.cook-mode-trigger {
  display: block; width: 100%; margin: 16px 0;
  padding: 14px; font-size: 1rem; border-radius: 12px;
}
.cm-progress { height: 4px; background: var(--color-border); border-radius: 2px; margin-bottom: 20px; overflow: hidden; }
.cm-progress__bar { height: 100%; background: var(--color-accent); border-radius: 2px; transition: width .3s ease; }
.cm-ing-list { list-style: none; padding: 0; margin: 0 0 16px; }
.cm-ing-item { border-bottom: 1px solid var(--color-border); }
.cm-check-label { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; cursor: pointer; width: 100%; }
.cm-check-label input[type="checkbox"] { display: none; }
.cm-check-box {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px;
  border: 2px solid var(--color-border); margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.cm-ing-check:checked + .cm-check-box { background: var(--color-accent); border-color: var(--color-accent); }
.cm-ing-check:checked + .cm-check-box::after { content: '✓'; color: #fff; font-size: .8rem; }
.cm-ing-item.cm-checked .cm-ing-text { text-decoration: line-through; opacity: .5; }
.cm-ing-notes { font-size: .82rem; color: var(--color-muted); }
.cm-btn-next { display: block; width: 100%; margin-top: 8px; padding: 14px; font-size: 1rem; }
.cm-steps-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 8px; }
.cm-step-counter { font-size: .85rem; color: var(--color-muted); white-space: nowrap; }
.cm-step { display: none; }
.cm-step--active { display: block; }
.cm-step__number {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; margin-bottom: 16px;
}
.cm-step__text { font-size: 1.1rem; line-height: 1.6; margin-bottom: 20px; }
.cm-timer { background: var(--color-surface); border-radius: 12px; padding: 16px; text-align: center; margin-top: 12px; }
.cm-timer__display {
  font-size: 3.5rem; font-weight: 700;
  font-family: var(--font-display); color: var(--color-accent);
  letter-spacing: .04em; margin-bottom: 12px; line-height: 1;
}
.cm-timer__controls { display: flex; gap: 10px; justify-content: center; }
.cm-done { text-align: center; padding: 40px 0; }
.cm-done__icon { font-size: 3rem; display: block; margin-bottom: 12px; }
.cm-done h3 { font-size: 1.6rem; font-family: var(--font-display); margin-bottom: 8px; }

/* ── Fix perfil — nombre siempre izquierda ───────────────────── */
.profile-page,
.profile-page * { text-align: left; }
.profile-grid   { text-align: left; }

/* ── Desktop ────────────────────────────────────────────────── */
@media (min-width: 640px) {
  body { background: #e8e4df; }
  .app-content { box-shadow: 0 0 40px rgba(0,0,0,.08); background: var(--color-bg); }
  .topbar { border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); }
  .bottom-nav { border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); }
}

/* ── Gamification: Level badge ───────────────────────────────── */
.level-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px var(--pad); background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.level-card__emoji { font-size: 2rem; flex-shrink: 0; }
.level-card__info { flex: 1; min-width: 0; }
.level-card__name { font-weight: 700; font-size: .95rem; display: block; }
.level-card__desc { font-size: .78rem; color: var(--color-muted); }
.level-card__pts { font-size: .72rem; color: var(--color-muted); margin-top: 4px; display: block; }
.level-progress { height: 6px; background: var(--color-border); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.level-progress__bar { height: 100%; background: var(--color-accent); border-radius: 3px; transition: width .4s ease; }

/* ── Notification dropdown panel ────────────────────────────── */
.notif-panel {
  position: fixed; top: var(--topbar-h); right: 0; left: 0;
  max-width: var(--max-w); margin: 0 auto;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  z-index: 45; max-height: 70vh; overflow-y: auto;
  transform: translateY(-10px); opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
  pointer-events: none;
}
.notif-panel--open {
  transform: translateY(0); opacity: 1; pointer-events: auto;
}
.notif-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--pad); border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; background: var(--color-surface); z-index: 1;
}
.notif-panel__header h3 { font-size: .9rem; font-weight: 700; }
.notif-panel__see-all { font-size: .8rem; color: var(--color-accent); font-weight: 600; }
.notif-panel__empty { padding: 24px; text-align: center; color: var(--color-muted); font-size: .85rem; }
.notif-time { display: block; font-size: .72rem; color: var(--color-muted); margin-top: 2px; }

/* ── Saved lists tabs ───────────────────────────────────────── */
.saved-lists-bar {
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--pad);
}
.saved-lists-bar::-webkit-scrollbar { display: none; }
.saved-list-tab {
  flex-shrink: 0; padding: 10px 16px;
  font-size: .82rem; font-weight: 500; color: var(--color-muted);
  border-bottom: 2px solid transparent; cursor: pointer;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: var(--font-sans); white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.saved-list-tab--active { color: var(--color-text); border-bottom-color: var(--color-accent); }
.saved-list-tab:hover { color: var(--color-text); }

/* ── Country selector ───────────────────────────────────────── */
.country-selector { position: relative; }
.country-selector__trigger {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: var(--font-sans);
  background: var(--color-surface); color: var(--color-text);
  cursor: pointer; user-select: none;
}
.country-selector__trigger:focus { outline: none; border-color: var(--color-accent); }
.country-selector__label { flex: 1; }
.country-selector__chevron { flex-shrink: 0; color: var(--color-muted); }
.country-selector__dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); z-index: 100;
  box-shadow: var(--shadow-md); overflow: hidden;
}
.country-selector__dropdown.hidden { display: none; }
.country-selector__search {
  width: 100%; padding: 10px 13px; border: none; border-bottom: 1px solid var(--color-border);
  font-size: .9rem; font-family: var(--font-sans);
  background: var(--color-surface); color: var(--color-text); outline: none;
  box-sizing: border-box;
}
.country-selector__list {
  max-height: 220px; overflow-y: auto; list-style: none;
}
.country-selector__item {
  padding: 9px 14px; cursor: pointer; font-size: .9rem;
  display: flex; align-items: center; gap: 10px;
}
.country-selector__item:hover { background: var(--color-accent-lt); }
.fi { border-radius: 2px; }


/* ── Scale inverse button ───────────────────────────────────── */
.scale-inverse-wrap { margin-top: 8px; }
.scale-inverse-btn {
  font-size: .78rem; color: var(--color-accent); font-weight: 500;
  cursor: pointer; background: none; border: none; padding: 0;
  font-family: var(--font-sans);
}
.scale-inverse-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px; font-size: .85rem;
}
.scale-inverse-row input {
  width: 60px; padding: 6px 8px; text-align: center;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: .85rem;
}
.scale-inverse-row .btn { padding: 6px 12px; font-size: .78rem; }

/* ── Responsive forms ───────────────────────────────────────── */
@media (max-width: 480px) {
  .ingredient-row { grid-template-columns: 1fr 58px 100px 75px 26px; gap: 4px; }
  .step-row       { grid-template-columns: 18px 1fr 70px 26px; }
  .form-row       { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   MISE v16 — New styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Avatar extra-small ─────────────────────────────────────── */
.avatar--xs {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
svg.avatar--xs { display: block; }

/* ── Author row (avatar + name + time) ──────────────────────── */
.post-card-author-row {
  display: flex; align-items: center; gap: 7px;
  font-size: .82rem; color: var(--color-muted);
  padding: 8px var(--pad) 2px;
}
.post-card-author-link {
  display: flex; align-items: center; gap: 7px;
  text-decoration: none; color: inherit; flex-shrink: 0;
}
.post-card-author-row .post-card-author {
  color: var(--color-text); font-weight: 600; font-size: .85rem;
}
.post-card-author-row .post-card-time {
  color: var(--color-muted); font-size: .78rem; margin-left: auto;
}

/* ── Post card info — remove old padding conflict ───────────── */
.post-card-info { padding: 0 0 4px; }

/* ── Post card actions — immediately below image ────────────── */
.post-card-actions {
  display: flex; align-items: center; gap: 14px;
  padding: 8px var(--pad) 0;
  border-top: none;
}

/* ── Landing stats ───────────────────────────────────────────── */
.landing__stats {
  display: flex; justify-content: center; gap: 28px;
  margin: 20px 0 8px;
  padding: 16px var(--pad);
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}
.landing__stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.landing__stat-num {
  font-size: 1.6rem; font-weight: 700; color: var(--color-accent);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.landing__stat-label {
  font-size: .72rem; color: var(--color-muted); text-transform: uppercase;
  letter-spacing: .06em; font-weight: 500;
}

/* ── Profile country ─────────────────────────────────────────── */
.profile-country {
  display: flex; align-items: center; gap: 6px;
  font-size: .85rem; color: var(--color-muted);
  margin: 2px 0 6px;
}
.profile-country .fi { border-radius: 2px; }
.profile-country__name { color: var(--color-muted); }

/* ── Profile public stats ────────────────────────────────────── */
.profile-public-stats {
  display: flex; gap: 16px; margin: 8px 0;
  flex-wrap: wrap;
}
.profile-public-stat {
  display: flex; align-items: center; gap: 5px;
  font-size: .82rem; color: var(--color-muted);
}
.profile-public-stat strong { color: var(--color-text); font-weight: 600; }
.profile-public-stat .icon { color: var(--color-muted); opacity: .7; }

/* ── Search mode tabs ────────────────────────────────────────── */
.search-mode-tabs {
  display: flex; gap: 0;
  border-bottom: 1.5px solid var(--color-border);
  margin: 12px 0 0;
}
.search-mode-tab {
  flex: 1; text-align: center;
  padding: 10px 8px;
  font-size: .85rem; font-weight: 500; color: var(--color-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.search-mode-tab--active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.search-ingredient-label {
  font-size: .85rem; color: var(--color-muted);
  margin-bottom: 12px;
}

/* ── Preferences form ────────────────────────────────────────── */
.prefs-checkgrid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.prefs-check {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--color-border); border-radius: 20px;
  font-size: .85rem; cursor: pointer; transition: all .15s;
  user-select: none;
}
.prefs-check input { display: none; }
.prefs-check:has(input:checked),
.prefs-check--active {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
  color: var(--color-accent); font-weight: 500;
}
.form-hint { font-size: .78rem; color: var(--color-muted); margin-top: 4px; display: block; }
.btn--full { width: 100%; margin-top: 8px; }

/* ── FAB option cards: Solo foto / Receta completa ───────────── */
.fab-menu .fab-option--card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 12px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); text-decoration: none; color: var(--color-text);
  transition: border-color .15s, background .15s;
  min-width: 90px; text-align: center;
}
.fab-menu .fab-option--card:hover, .fab-menu .fab-option--card:active {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 6%, var(--color-surface));
}
.fab-menu .fab-cards-row {
  display: flex; gap: 10px; padding: 12px var(--pad) 4px;
}
.fab-option--card .fab-option__emoji {
  font-size: 1.5rem; line-height: 1;
}
.fab-option--card .fab-option__label {
  font-size: .78rem; font-weight: 600; color: var(--color-text);
}
.fab-option--card .fab-option__desc {
  font-size: .7rem; color: var(--color-muted); line-height: 1.3;
}

/* ── New icon sizes in FAB placeholder items ─────────────────── */
.fab-option .icon { opacity: .75; }

/* ═══════════════════════════════════════════════════════════════
   MISE v17 — New styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Post card bar (Line 1: avatar + name + time + actions) ─── */
.post-card-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px var(--pad) 4px;
  flex-wrap: nowrap;
}
.post-card-author-link {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; flex-shrink: 0;
  max-width: 140px; overflow: hidden;
}
.post-card-bar .post-card-author {
  font-size: .82rem; font-weight: 600; color: var(--color-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.post-card-bar .post-card-time {
  font-size: .75rem; color: var(--color-muted); flex-shrink: 0;
}
.post-card-bar .post-card-actions {
  margin-left: auto; display: flex; align-items: center;
  gap: 10px; flex-shrink: 0; padding: 0;
}

/* Reset old post-card-info padding */
.post-card-body {
  padding: 2px var(--pad) 4px;
}
.post-card-body .post-card-title {
  font-size: .95rem; font-weight: 600; color: var(--color-text);
  margin: 0 0 3px;
}
.post-card-body .post-card-desc {
  font-size: .82rem; color: var(--color-muted); line-height: 1.45;
  margin: 0;
}

/* ── Search row inside topbar (2-row topbar) ────────────────── */
:root {
  --topbar-h: 52px;
  --search-row-h: 44px;
  --topbar-total-h: calc(var(--topbar-h) + var(--search-row-h));
}
.topbar__search-row {
  padding: 6px var(--pad) 8px;
  border-top: 1px solid var(--color-border);
}
.global-search-wrap {
  position: relative; display: flex; align-items: center;
}
.global-search-icon {
  position: absolute; left: 10px; pointer-events: none;
  color: var(--color-muted); stroke: currentColor;
}
.global-search-input {
  width: 100%; padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: .9rem; font-family: var(--font-sans);
  background: var(--color-bg); color: var(--color-text);
}
.global-search-input:focus { outline: none; border-color: var(--color-accent); }

/* ── Tags block (flex-wrap, not scroll) ─────────────────────── */
.tags-block {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px var(--pad);
}
.tags-block .tag-pill {
  flex-shrink: 0;
}

/* ── Stats cards (no table, no horizontal scroll) ───────────── */
.stats-sort-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px var(--pad) 4px;
}
.stats-sort-label { font-size: .78rem; color: var(--color-muted); }
.stats-sort-btn {
  padding: 5px 12px; font-size: .78rem; font-weight: 500;
  border: 1.5px solid var(--color-border); border-radius: 20px;
  background: none; font-family: var(--font-sans); cursor: pointer;
  color: var(--color-muted); transition: all .15s;
}
.stats-sort-btn--active {
  border-color: var(--color-accent); color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
}
.stats-cards { padding: 0 0 40px; }
.stats-row {
  display: flex; flex-direction: column;
  padding: 12px var(--pad);
  border-bottom: 1px solid var(--color-border);
}
.stats-row__title {
  font-size: .9rem; font-weight: 500; color: var(--color-text);
  text-decoration: none; margin-bottom: 6px;
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stats-row__title:hover { color: var(--color-accent); }
.stats-row__nums {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.stats-row__num {
  display: flex; align-items: center; gap: 4px;
  font-size: .85rem; color: var(--color-muted);
}
.stats-row__icon { font-size: .9rem; }

/* ── Level card-option (form: Solo foto | Receta completa) ───── */
.level-selector-cards {
  display: flex; gap: 12px; margin-top: 4px;
}
.level-card-option {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 16px 12px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all .15s; text-align: center;
  background: var(--color-surface);
}
.level-card-option input { display: none; }
.level-card-option__emoji, .level-card-option__icon { font-size: 1.8rem; line-height: 1; }
.level-card-option__name { font-size: .9rem; font-weight: 600; color: var(--color-text); }
.level-card-option__desc { font-size: .75rem; color: var(--color-muted); line-height: 1.3; }
.level-card-option--active {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 6%, var(--color-surface));
}
.level-card-option--disabled { opacity: .45; pointer-events: none; }

/* ── Search count line ───────────────────────────────────────── */
.search-count { padding: 10px var(--pad) 0; font-size: .85rem; color: var(--color-muted); }

/* ═══════════════════════════════════════════════════════════════
   MISE v17b — CSS fixes
   ═══════════════════════════════════════════════════════════════ */

/* Z-index hierarchy — corrected v17c */
/* topbar=100 (contains search row), notif-panel=110, header-menu=110, fab-menu=80 */

/* Punto 3: Level card active state — stronger visual */
.level-card-option {
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.level-card-option--active {
  border-color: var(--color-accent) !important;
  background: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface)) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 25%, transparent);
}
.level-card-option__name { transition: color .15s; }
.level-card-option--active .level-card-option__name { color: var(--color-accent); }
.level-card-option--active .level-card-option__emoji, .level-card-option__icon { filter: none; }
.level-card-option:not(.level-card-option--active) { opacity: .7; }

/* Punto 4: Profile feed grid — use feed-grid layout */
.profile-feed.feed-grid { display: flex; flex-direction: column; gap: 0; }

/* Punto 5: SVG icon consistency — ensure all icons have stroke, no fill by default */
.icon { fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; }
.icon--filled { fill: currentColor; }
.notif-type-icon .icon { width: 12px; height: 12px; }
.stats-total-card__lbl .icon,
.stats-row__num .icon { width: 14px; height: 14px; vertical-align: middle; }

/* ═══════════════════════════════════════════════════════════════
   MISE v17c — Consolidated fixes
   ═══════════════════════════════════════════════════════════════ */

/* ── Topbar: 2-row, total height used for padding ───────────── */
.topbar {
  height: auto !important; /* override fixed 52px to allow 2 rows */
}
.topbar__inner { height: var(--topbar-h); }
.app-content   { padding-top: var(--topbar-total-h) !important; }

/* ── Z-index: topbar contains everything, dropdowns above ────── */
.topbar       { z-index: 100; }
.notif-panel  { z-index: 110; top: var(--topbar-total-h) !important; }
.header-menu  { z-index: 110; }
.fab-menu     { z-index: 80; }

/* ── Topbar hide: hides entire 2-row topbar ─────────────────── */
.topbar--hidden {
  transform: translateX(-50%) translateY(calc(-1 * var(--topbar-total-h))) !important;
}

/* ── Post card — narrow variant for Saved list + Profile list ── */
/* Full-width only in main feed (#feedGrid at root level) */
.feed-grid > .post-card { width: 100%; }

/* Contained post card (saved feed view, profile feed view) */
#savedFeed.feed-grid .post-card,
.saved-feed-wrap .post-card,
.profile-feed .post-card {
  max-width: 480px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 12px;
  overflow: hidden;
}

/* ── Profile: grid + feed not shown simultaneously ───────────── */
#profileGrid.active  { display: grid; }
#profileGrid:not(.active) { display: none; }
#profileFeed.active  { display: flex; flex-direction: column; }
#profileFeed:not(.active) { display: none; }

/* ── Level card — stronger active state ─────────────────────── */
.level-card-option {
  transition: border-color .15s, background .15s, box-shadow .15s;
  opacity: 1;
}
.level-card-option:not(.level-card-option--active):not(.level-card-option--disabled) {
  opacity: .65;
  border-color: var(--color-border);
}
.level-card-option--active {
  border-color: var(--color-accent) !important;
  background: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface)) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 20%, transparent);
  opacity: 1 !important;
}
.level-card-option--active .level-card-option__name { color: var(--color-accent); }

/* ── SVG icon baseline consistency ──────────────────────────── */
.icon { fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon--filled { fill: currentColor; }

/* ── IMPORT / GENERAR CON IA ─────────────────────────────── */
.import-step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
}
.import-step__header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .9rem;
}
.import-step__num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.import-step__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}
.import-prompt-block {
  margin-top: .75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: .75rem;
}
.import-prompt-block__label {
  font-size: .78rem;
  color: var(--color-muted);
  margin-bottom: .5rem;
}
.import-prompt-pre {
  font-family: inherit;
  font-size: .8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--color-text);
  max-height: 10rem;
  overflow-y: auto;
  margin: 0 0 .5rem;
}
.import-json-input {
  font-family: monospace;
  font-size: .82rem;
  resize: vertical;
}
.import-preview {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: .75rem;
  margin-bottom: .75rem;
  background: var(--color-bg);
}
.import-preview__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--color-text);
}
.import-preview__desc {
  font-size: .9rem;
  color: var(--color-muted);
  margin-bottom: .4rem;
}
.import-preview__meta {
  font-size: .82rem;
  color: var(--color-muted);
  margin-bottom: .5rem;
}
.import-preview__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: .6rem;
}
.import-preview__section {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-muted);
  margin: .75rem 0 .3rem;
}
.import-preview__list {
  padding-left: 1.2rem;
  margin: 0;
  font-size: .88rem;
  line-height: 1.7;
  color: var(--color-text);
}

/* ── IMPORT TABS ─────────────────────────────────────────── */
.import-tabs {
  display: flex;
  gap: .4rem;
  margin-bottom: .75rem;
}
.import-tab {
  flex: 1;
  padding: .5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.import-tab--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ── Topbar scroll: compact mode (oculta solo la fila logo+acciones) ── */
.topbar__inner {
  transition: transform .25s ease, opacity .25s ease;
}
.topbar--compact .topbar__inner {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}
/* En compact: el topbar solo muestra la search row */
.topbar--compact {
  transform: translateX(-50%) translateY(0) !important; /* sobreescribe --hidden si aplica */
}
/* Suprimir el translateY total en favor del compact */
.topbar--hidden {
  transform: translateX(-50%) translateY(calc(-1 * var(--topbar-total-h))) !important;
}

/* ── Suerte — nueva disposición del header ──────────────── */
.suerte-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 8px;
}
.suerte-otra-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--color-accent);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  transition: transform .15s, box-shadow .15s;
  flex-shrink: 0;
}
.suerte-otra-btn:active { transform: scale(.96); }
.suerte-hint {
  font-size: .83rem;
  color: var(--color-muted);
}
/* Eliminar el FAB flotante si existía */
.suerte-fab-wrap { display: none; }

/* ── wip-icon SVG ───────────────────────────────────────── */
.wip-icon--svg { font-size: 0; }
.wip-icon--svg .icon { width: 56px; height: 56px; stroke: var(--color-accent); }

/* ── icon--xl ───────────────────────────────────────────── */
.icon--xl { width: 48px; height: 48px; }

/* Ingredient validation error */
.ing-qty.input--error {
  border-color: var(--color-danger, #e53e3e);
  box-shadow: 0 0 0 2px rgba(229,62,62,.2);
  animation: shake .3s ease;
}
@keyframes shake {
  0%,100%{transform:translateX(0)}
  25%{transform:translateX(-4px)}
  75%{transform:translateX(4px)}
}
.save-collection-modal { text-align: left; max-width: 340px; }
.save-collection-modal .confirm-modal__msg { text-align: center; }
.save-collection-modal .confirm-modal__actions { justify-content: space-between; }
.unit-select { font-size: .85rem; padding: 6px 28px 6px 10px; min-width: 80px; }

/* ── Calendario "Es mi turno" ───────────────────────────── */
.cal-page { padding-bottom: calc(var(--nav-h) + 24px); }

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--pad);
  position: sticky;
  top: var(--topbar-h, 56px);
  background: var(--color-bg);
  z-index: 10;
  border-bottom: 1px solid var(--color-border);
}
.cal-month-label { font-size: 1rem; font-weight: 700; text-align: center; flex: 1; }
.cal-nav-btn {
  background: none; border: none; padding: 6px; cursor: pointer;
  color: var(--color-text); border-radius: var(--radius-sm);
  display: flex; align-items: center;
}
.cal-nav-btn:active { background: var(--color-surface); }

/* Cabecera días */
.cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 6px 4px 2px;
  background: var(--color-bg);
}
.cal-dow-row span {
  text-align: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Grid mensual */
.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 2px 4px 8px;
}
.cal-loading { grid-column: 1/-1; text-align: center; padding: 32px; color: var(--color-muted); font-size: .9rem; }

/* Celdas de día */
.cal-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: visible;
  gap: 2px;
  padding: 2px;
  transition: border-color .15s;
}
.cal-day:active { opacity: .7; }
.cal-day--filler { background: transparent; border-color: transparent; cursor: default; pointer-events: none; }
.cal-day--today { border-color: var(--color-accent); }

.cal-day__num {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text);
}
.cal-day--today .cal-day__num {
  background: var(--color-accent);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
}

/* + en celda vacía */
.cal-day__plus {
  color: var(--color-muted);
  opacity: .35;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-day:not(.cal-day--filler):hover .cal-day__plus { opacity: .7; color: var(--color-accent); }

/* Puntos de slot */
.cal-day__dots {
  display: flex;
  flex-direction: row;
  gap: 3px;
  justify-content: center;
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
}
.cal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* Modal slot ocupado */
.cal-slot-modal { min-width: 240px; }
.cal-slot-dots-modal { display: flex; gap: 6px; justify-content: center; margin: 8px 0 12px; flex-wrap: wrap; }
.cal-slot-pill {
  border: none;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  background: color-mix(in srgb, var(--pill-color) 15%, transparent);
  color: var(--pill-color);
  border: 1.5px solid transparent;
  transition: border-color .15s;
}
.cal-slot-pill--active { border-color: var(--pill-color); }

/* Botón agregar desde show */
.cal-add-wrap { padding: 10px var(--pad) 0; display: flex; }
.cal-add-trigger { display: inline-flex; align-items: center; gap: 6px; }

/* Modal agregar al calendario */
.cal-add-modal { min-width: 280px; }
.cal-slot-picker {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  justify-content: center;
}
.cal-slot-option { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.cal-slot-option input[type="radio"] { display: none; }
.cal-slot-label {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: .8rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--sc) 12%, transparent);
  color: var(--sc);
  border: 1.5px solid transparent;
  transition: border-color .15s;
  cursor: pointer;
}
.cal-slot-option input[type="radio"]:checked + .cal-slot-label { border-color: var(--sc); }

/* ── Upload area icon SVG ───────────────────────────────── */
.upload-area__icon { display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.upload-area__icon .icon { width: 36px; height: 36px; stroke: var(--color-muted); }

/* ── Level card icon SVG ────────────────────────────────── */
.level-card-option__icon { display: flex; align-items: center; justify-content: center; }
.level-card-option__icon .icon { width: 28px; height: 28px; }

/* ── Book badge en post-card ────────────────────────────── */
.level-badge .icon { width: 16px; height: 16px; stroke: var(--color-accent); }

/* ── Unit Selector (custom dropdown) ───────────────────── */
.unit-selector { position: relative; }
.unit-selector__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  width: 100%; padding: 8px 10px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: .88rem; font-family: var(--font-sans);
  background: var(--color-surface); color: var(--color-text);
  cursor: pointer; user-select: none;
  white-space: nowrap; overflow: hidden;
}
.unit-selector__trigger:focus-within { border-color: var(--color-accent); }
.unit-selector__label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.unit-selector__dropdown {
  position: absolute; top: calc(100% + 3px); left: 0;
  min-width: 140px;
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); z-index: 200;
  box-shadow: var(--shadow-md); overflow: hidden;
}
.unit-selector__dropdown.hidden { display: none; }
.unit-selector__list { max-height: 200px; overflow-y: auto; list-style: none; margin: 0; padding: 4px 0; }
.unit-selector__group {
  padding: 5px 12px 2px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--color-muted);
}
.unit-selector__item {
  padding: 7px 14px; cursor: pointer; font-size: .88rem;
}
.unit-selector__item:hover { background: var(--color-accent-lt); }
.unit-selector__item--active { color: var(--color-accent); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   PATCH v22.4 — UX fixes
   ═══════════════════════════════════════════════════════════ */

/* ── Ítem 3: Feed top gap — primer post no tapado por topbar ── */
.app-content > .feed-grid:first-child,
.app-content > .page:first-child,
.app-content > .rest-profile:first-child {
  padding-top: 20px;
}

/* ── Ítem 5: level-badge icon color — crema claro ──────────── */
.level-badge .icon {
  stroke: #f5ede0 !important;
}
.level-badge {
  background: rgba(0,0,0,.45) !important;
}

/* ── Ítem 6: list-mode first post top gap ───────────────────── */
#savedFeed.feed-grid .post-card:first-child,
#profileFeed.active .post-card:first-child {
  margin-top: 12px;
}

/* ── Ítem 7: notif panel below search bar ───────────────────── */
.notif-panel {
  top: var(--topbar-total-h, calc(var(--topbar-h, 52px) + 44px)) !important;
}

/* ── Ítem 8: About modal styles ─────────────────────────────── */
.about-modal {
  text-align: center;
  max-width: 300px;
  padding: 28px 24px 20px;
}
.about-modal__name {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--color-text);
}
.about-modal__tagline {
  font-size: .85rem;
  color: var(--color-muted);
  margin: 0 0 12px;
}
.about-modal__version {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: .03em;
}
.about-modal__copy {
  font-size: .75rem;
  color: var(--color-muted);
  margin: 0;
}

/* ── Update banner: siempre visible hasta acción del usuario ─── */
.update-banner {
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}


/* ═══════════════════════════════════════════════════════════
   PATCH v22.4 — Calendario día panel
   ═══════════════════════════════════════════════════════════ */

/* Día seleccionado en grid */
.cal-day--selected {
  background: color-mix(in srgb, var(--color-accent) 12%, var(--color-surface));
  border-radius: var(--radius-sm);
}
.cal-day--selected .cal-day__num {
  color: var(--color-accent);
  font-weight: 700;
}
.cal-day--today.cal-day--selected .cal-day__num { color: #fff; }
.cal-day--past .cal-day__num { color: var(--color-muted); }
.cal-day--past { opacity: .6; }

/* Panel del día */
.cal-day-panel {
  margin: 16px 0 0;
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}
.cal-day-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 var(--pad);
}
.cal-day-panel__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-text);
}
.cal-day-panel__add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform .15s;
}
.cal-day-panel__add:active { transform: scale(.92); }
.cal-day-panel__add .icon { stroke: #fff; }

/* Filas de slots */
.cal-day-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 var(--pad) 16px;
}
/* 2B — tarjeta horizontal: foto | SLOT / título */
.cal-slot-row {
  display: flex;
  align-items: stretch;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 64px;
}
.cal-slot-row--empty {
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  min-height: 52px;
  opacity: .5;
}
.cal-slot-badge {
  flex-shrink: 0;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--sc, var(--color-accent));
}
.cal-slot-hint {
  font-size: .82rem;
  color: var(--color-muted);
  flex: 1;
}
.cal-slot-card {
  display: flex;
  align-items: stretch;
  flex: 1;
  text-decoration: none;
  color: var(--color-text);
  overflow: hidden;
  min-width: 0;
}
.cal-slot-card__img {
  width: 64px;
  min-height: 64px;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  align-self: stretch;
}
.cal-slot-card__img-ph {
  width: 64px;
  min-height: 64px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  flex-shrink: 0;
  align-self: stretch;
}
.cal-slot-card__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 10px;
  flex: 1;
  min-width: 0;
}
.cal-slot-card__title {
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
}
.cal-slot-remove {
  background: none;
  border: none;
  border-left: 1px solid var(--color-border);
  padding: 0 10px;
  cursor: pointer;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.cal-slot-remove:hover { color: var(--color-danger, #e53e3e); background: var(--color-bg); }

/* ═══════════════════════════════════════════════════════════
   PATCH v22.4 — Import UX
   ═══════════════════════════════════════════════════════════ */

.page-subheader {
  font-size: .85rem;
  color: var(--color-muted);
  margin: 2px 0 0;
}

/* Paso: padding interno con respiro */
.import-step {
  padding: 1.1rem 1rem 1.1rem !important;
}

/* Número de paso más llamativo */
.import-step__num {
  width: 2rem !important;
  height: 2rem !important;
  font-size: .88rem !important;
  box-shadow: 0 2px 8px rgba(153,52,21,.3);
}

/* Separador visual entre header y contenido */
.import-step__header {
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: .9rem !important;
}

.import-textarea--ghost,
.import-input--ghost {
  background: var(--color-bg);
  color: var(--color-text);
}
.import-textarea--ghost::placeholder,
.import-input--ghost::placeholder {
  color: var(--color-muted);
  opacity: .5;
}
.import-ia-logos {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.import-ia-logo {
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--color-border);
  color: var(--color-text);
  letter-spacing: .01em;
}
.import-copy-btn {
  width: 100%;
  margin-top: 8px;
}
/* JSON input legible */
.import-json-input {
  background: var(--color-bg);
  color: var(--color-text);
}
.import-json-input::placeholder {
  color: var(--color-muted);
  opacity: .45;
  font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════
   PATCH v22.4 — Gestor de colecciones
   ═══════════════════════════════════════════════════════════ */

.collections-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  display: flex;
  align-items: flex-end;
}
.collections-overlay.hidden { display: none; }

.collections-panel {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px var(--pad) calc(var(--nav-h) + 20px);
  max-height: 75vh;
  overflow-y: auto;
}
.collections-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.collections-panel__header h3 {
  font-size: 1rem;
  font-weight: 700;
}
.collections-panel__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-muted);
  display: flex;
  align-items: center;
}

.collections-new {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.collections-new .form-control {
  flex: 1;
}

.collections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.collections-loading {
  color: var(--color-muted);
  font-size: .85rem;
  text-align: center;
  padding: 16px 0;
}

.collection-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.collection-row__info {
  flex: 1;
  overflow: hidden;
}
.collection-row__name {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collection-row__count {
  display: block;
  font-size: .76rem;
  color: var(--color-muted);
  margin-top: 2px;
}
.collection-row__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.collection-row__btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  cursor: pointer;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  transition: color .12s, border-color .12s;
}
.collection-row__btn:hover { color: var(--color-text); border-color: var(--color-text); }
.collection-row__btn--danger:hover { color: var(--color-danger, #e53e3e); border-color: var(--color-danger, #e53e3e); }


/* ═══════════════════════════════════════════════════════════
   PATCH v22.4b — Suerte centrado
   ═══════════════════════════════════════════════════════════ */

.suerte-header--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px var(--pad) 14px;
  gap: 10px;
}

.suerte-tagline {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  max-width: 280px;
  line-height: 1.4;
}

/* override: el botón Otra receta centrado */
.suerte-header--centered .suerte-otra-btn {
  margin: 0;
}

.suerte-header--centered .suerte-hint {
  font-size: .78rem;
  color: var(--color-muted);
  margin: 0;
  max-width: 260px;
}


/* ── v22.10 — Username input ── */
.username-input-wrap {
  display: flex; align-items: center;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); overflow: hidden;
}
.username-input-prefix {
  padding: 0 8px 0 12px; color: var(--color-muted);
  font-size: .95rem; font-weight: 500; user-select: none;
}
.username-input {
  border: none !important; background: transparent !important;
  padding-left: 0 !important; flex: 1;
}
.username-input:focus { outline: none; }
.username-input-wrap:focus-within {
  border-color: var(--color-accent);
}
.form-error {
  font-size: .8rem; color: var(--color-danger, #e53e3e);
  margin-top: 4px; display: block;
}

/* ═══════════════════════════════════════════════════════════
   PATCH v22.12
   ═══════════════════════════════════════════════════════════ */

/* ── 8A/10A — Level card premium ── */
.level-card-premium {
  display: flex; align-items: center; gap: 12px;
  padding: 14px var(--pad);
  background: var(--color-accent-lt);
  border: 1px solid color-mix(in srgb, var(--color-accent) 20%, var(--color-border));
  border-radius: var(--radius);
  margin: 12px var(--pad) 4px;
  cursor: pointer; transition: background .15s;
  user-select: none;
}
.level-card-premium:hover { background: color-mix(in srgb, var(--color-accent) 10%, var(--color-accent-lt)); }
.level-card-premium__left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.level-card-premium__emoji { font-size: 1.8rem; flex-shrink: 0; line-height: 1; }
.level-card-premium__text { display: flex; flex-direction: column; min-width: 0; }
.level-card-premium__name { font-size: .9rem; font-weight: 700; color: var(--color-text); }
.level-card-premium__desc { font-size: .75rem; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.level-card-premium__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.level-card-premium__pts { font-size: .78rem; font-weight: 700; color: var(--color-accent); }
.level-card-premium__next { font-size: .68rem; color: var(--color-muted); }
.level-progress-slim { width: 80px; height: 4px; background: var(--color-border); border-radius: 2px; overflow: hidden; }
.level-progress-slim__bar { height: 100%; background: var(--color-accent); border-radius: 2px; transition: width .4s; }
.level-card-premium__chevron { font-size: 1.3rem; color: var(--color-muted); flex-shrink: 0; line-height: 1; }

/* Modal nivel */
.level-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 300; display: flex; align-items: flex-end; justify-content: center;
}
.level-modal-overlay.hidden { display: none; }
.level-modal {
  background: var(--color-surface); border-radius: 20px 20px 0 0;
  padding: 32px 24px 40px; width: 100%; max-width: 480px;
  text-align: center; position: relative;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.level-modal__close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 1.4rem;
  color: var(--color-muted); cursor: pointer; line-height: 1;
}
.level-modal__emoji { font-size: 4rem; line-height: 1; margin-bottom: 10px; }
.level-modal__name { font-size: 1.3rem; font-weight: 800; color: var(--color-text); margin-bottom: 4px; }
.level-modal__desc { font-size: .85rem; color: var(--color-muted); margin-bottom: 20px; }
.level-modal__progress-wrap { margin-bottom: 20px; }
.level-modal__progress {
  height: 8px; background: var(--color-border); border-radius: 4px;
  overflow: hidden; margin-bottom: 6px;
}
.level-modal__progress-bar { height: 100%; background: var(--color-accent); border-radius: 4px; transition: width .5s; }
.level-modal__pts-row { display: flex; justify-content: space-between; font-size: .75rem; color: var(--color-muted); }
.level-modal__metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; padding-top: 16px; border-top: 1px solid var(--color-border);
}
.level-modal__metric { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.level-modal__metric-num { font-size: 1.2rem; font-weight: 800; color: var(--color-text); }
.level-modal__metric-label { font-size: .7rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; }

/* ── 21A — Accordion ingredientes/preparación ── */
.recipe-accordion {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin: 0 var(--pad) 10px;
  overflow: hidden;
}
/* Header row: trigger + portions side by side */
.recipe-accordion__header {
  display: flex; align-items: center;
}
.recipe-accordion__trigger {
  display: flex; align-items: center; gap: 10px;
  flex: 1; background: none; border: none;
  padding: 14px 16px; cursor: pointer; text-align: left;
  font-family: var(--font-sans); min-width: 0;
}
.recipe-accordion__trigger:hover { background: color-mix(in srgb, var(--color-accent) 4%, var(--color-surface)); }
.recipe-accordion__title {
  flex: 1; font-size: 1rem; font-weight: 700; color: var(--color-text);
}
.recipe-accordion__count { font-size: .78rem; font-weight: 400; color: var(--color-muted); margin-left: 4px; }
.recipe-accordion__chevron { flex-shrink: 0; transition: transform .25s; color: var(--color-muted); }
.recipe-accordion__trigger--open .recipe-accordion__chevron { transform: rotate(180deg); }
.recipe-accordion__body { padding: 0 16px 16px; display: none; }
.recipe-accordion__body.open { display: block; border-top: 1px solid var(--color-border); padding-top: 14px; }
/* Portions inside header, outside trigger */
#portionsControl { flex-shrink: 0; }

/* ── 21B — Calc-by row integrado ── */
.calc-row {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--color-border);
  flex-wrap: wrap;
}
.calc-row__label { font-size: .78rem; font-weight: 600; color: var(--color-muted); flex-shrink: 0; }
.calc-row__select {
  flex: 1; min-width: 0; padding: 5px 8px; font-size: .82rem;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-bg); color: var(--color-text);
}
.calc-row__input {
  width: 70px; padding: 5px 8px; font-size: .82rem;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-bg); color: var(--color-text); flex-shrink: 0;
}
.btn--accent {
  background: var(--color-accent); color: #fff; border: none;
  padding: 5px 12px; border-radius: var(--radius-sm); font-weight: 700;
  cursor: pointer; font-family: var(--font-sans);
}
.btn--accent:hover { background: var(--color-accent-dark, #b8421a); }

/* ═══════════════════════════════════════════════════════════
   PATCH v22.13 — CSS fixes
   ═══════════════════════════════════════════════════════════ */

/* Topbar search inner + botón Suerte */
.topbar__search-row {
  padding: 6px var(--pad) 8px;
  border-top: 1px solid var(--color-border);
}
.topbar__search-inner {
  display: flex; align-items: center; gap: 8px;
}
.topbar__search-inner .global-search-form { flex: 1; min-width: 0; }
.topbar__buscar-btn {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 5px;
  padding: 0 10px; height: 36px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--color-muted);
  text-decoration: none; transition: all .15s; white-space: nowrap;
}
.topbar__buscar-label { font-size: .78rem; font-weight: 600; }
.topbar__buscar-btn:hover,
.topbar__buscar-btn.active {
  border-color: var(--color-accent); color: var(--color-accent);
  background: var(--color-accent-lt);
}
/* Forzar stroke visible en iconos dentro del botón Suerte */
.topbar__buscar-btn .icon { stroke: currentColor; }

/* Cal nav btn — flechas visibles */
.cal-nav-btn .icon { stroke: var(--color-text); }

/* ═══════════════════════════════════════════════════════════
   Lista de compras — v22.14
   ═══════════════════════════════════════════════════════════ */

/* Página ─────────────────────────────────────────────────── */
.shop-page { padding: 16px var(--pad) calc(var(--nav-h) + 32px); }

/* Header ─────────────────────────────────────────────────── */
.shop-header { margin-bottom: 16px; }
.shop-header__top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.shop-title {
  font-family: var(--font-display); font-size: 1.4rem;
  color: var(--color-text); margin: 0;
}
.shop-counter {
  background: var(--color-accent); color: #fff;
  font-size: .75rem; font-weight: 700; padding: 3px 10px;
  border-radius: var(--radius-full);
}
.shop-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.shop-clear-all { color: var(--color-danger) !important; border-color: var(--color-danger) !important; }
.shop-clear-all:hover { background: #fef2f2 !important; }

/* Formulario añadir ──────────────────────────────────────── */
.shop-add-form {
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md); padding: 12px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.shop-add-row { display: flex; gap: 8px; }
.shop-add-input {
  flex: 1; padding: 9px 12px; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-bg);
  color: var(--color-text); font-size: .9rem; outline: none;
  transition: border-color .15s;
}
.shop-add-input:focus { border-color: var(--color-accent); }
.shop-add-details {
  display: none; gap: 8px; margin-top: 10px;
}
.shop-add-details--open { display: flex; flex-wrap: wrap; }
.shop-add-qty {
  width: 76px; padding: 7px 10px; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-bg);
  color: var(--color-text); font-size: .85rem;
}
.shop-add-unit {
  width: 90px; padding: 7px 10px; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-bg);
  color: var(--color-text); font-size: .85rem;
}
.shop-add-cat {
  flex: 1; min-width: 120px; padding: 7px 10px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-bg); color: var(--color-text); font-size: .85rem;
}

/* Grupo / categoría ──────────────────────────────────────── */
.shop-group { margin-bottom: 18px; }
.shop-group__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0 6px; border-bottom: 1.5px solid var(--color-border);
  margin-bottom: 6px;
}
.shop-group__name {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--color-muted);
}
.shop-group__count {
  font-size: .72rem; color: var(--color-muted);
  background: var(--color-border); border-radius: var(--radius-full);
  padding: 1px 7px;
}

/* Ítem ───────────────────────────────────────────────────── */
.shop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid var(--color-border);
  transition: opacity .2s;
}
.shop-item:last-child { border-bottom: none; }
.shop-item--checked { opacity: .45; }
.shop-item--checked .shop-item__name { text-decoration: line-through; }

.shop-item__check {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--color-border); background: transparent;
  cursor: pointer; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; transition: all .15s;
  padding: 0;
}
.shop-item__check:hover { border-color: var(--color-accent); }
.shop-item--checked .shop-item__check {
  background: var(--color-accent); border-color: var(--color-accent);
}
.shop-check-icon { display: none; stroke: #fff; }
.shop-item--checked .shop-check-icon { display: block; }

.shop-item__body { flex: 1; min-width: 0; }
.shop-item__name { display: block; font-size: .92rem; color: var(--color-text); }
.shop-item__qty {
  display: block; font-size: .78rem; color: var(--color-muted); margin-top: 1px;
}

.shop-item__badge {
  color: var(--color-accent); opacity: .7; flex-shrink: 0;
}
.shop-item__del {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: var(--radius-sm);
  color: var(--color-muted); background: none; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s; padding: 0;
}
.shop-item__del:hover { color: var(--color-danger); background: var(--color-border); }

/* Modal: desde el plan ───────────────────────────────────── */
.shop-cal-modal { max-width: 360px; }
.shop-cal-desc {
  font-size: .88rem; color: var(--color-muted); margin-bottom: 16px; line-height: 1.5;
}
.shop-cal-field { margin-bottom: 14px; }
.shop-cal-field .form-label {
  display: block; font-size: .78rem; font-weight: 600;
  color: var(--color-muted); margin-bottom: 5px;
}
.shop-cal-field input[type="date"] {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-bg);
  color: var(--color-text); font-size: .9rem;
}
.shop-cal-mode { display: flex; gap: 12px; }
.shop-cal-opt { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: .88rem; }
.shop-cal-opt input[type="radio"] { accent-color: var(--color-accent); }
.shop-cal-opt__label { color: var(--color-text); }

/* Toast error ────────────────────────────────────────────── */
.toast--error { background: var(--color-danger); }

/* ═══════════════════════════════════════════════════════════
   Modal genérico — v22.15
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 0 env(safe-area-inset-bottom);
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--color-surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 480px;
  box-shadow: 0 -4px 32px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  max-height: 90dvh; overflow: hidden;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.modal-title {
  font-size: 1rem; font-weight: 700; color: var(--color-text);
}

.modal-body {
  padding: 20px; overflow-y: auto; flex: 1;
}

.modal-footer {
  padding: 12px 20px 20px; border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}
.modal-footer .btn { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════════════════
   Múltiples listas + Plan days — v22.16
   ═══════════════════════════════════════════════════════════ */

/* Formulario nueva lista ─────────────────────────────────── */
.shop-new-form {
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md); padding: 12px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

/* Tarjetas de lista ──────────────────────────────────────── */
.shop-lists { display: flex; flex-direction: column; gap: 10px; }

.shop-list-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md); padding: 14px 12px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
  flex-wrap: wrap;
}
.shop-list-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-md); }

.shop-list-card__body { flex: 1; min-width: 0; }
.shop-list-card__name {
  display: block; font-weight: 700; font-size: .95rem; color: var(--color-text);
}
.shop-list-card__meta {
  display: block; font-size: .78rem; color: var(--color-muted); margin-top: 2px;
}

.shop-list-card__bar {
  width: 100%; height: 4px; background: var(--color-border);
  border-radius: var(--radius-full); margin-top: 8px; order: 10; flex-basis: 100%;
}
.shop-list-card__bar-fill {
  height: 100%; background: var(--color-accent);
  border-radius: var(--radius-full); transition: width .3s;
}

.shop-list-card__actions {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.shop-list-card__arrow { color: var(--color-muted); }
.shop-list-del { color: var(--color-muted); }
.shop-list-del:hover { color: var(--color-danger); }

/* Header lista activa ────────────────────────────────────── */
.shop-back { margin-right: 4px; }
.shop-title--active { flex: 1; font-size: 1.1rem; }

/* Modal plan days ────────────────────────────────────────── */
.shop-plan-loading {
  display: flex; align-items: center; gap: 10px;
  color: var(--color-muted); font-size: .9rem; padding: 8px 0;
}
.shop-plan-spinner {
  width: 18px; height: 18px; border: 2px solid var(--color-border);
  border-top-color: var(--color-accent); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.shop-plan-empty { color: var(--color-muted); font-size: .9rem; line-height: 1.6; }
.shop-plan-empty .link-accent { color: var(--color-accent); text-decoration: none; font-weight: 600; }

.shop-plan-days { display: flex; flex-direction: column; gap: 8px; }

.shop-plan-day {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; background: var(--color-bg);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
}
.shop-plan-day__info { flex: 1; min-width: 0; }
.shop-plan-day__date {
  display: block; font-weight: 700; font-size: .88rem; color: var(--color-text);
}
.shop-plan-day__recipes {
  display: block; font-size: .78rem; color: var(--color-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
.shop-plan-day__btn--done {
  background: var(--color-accent) !important; color: #fff !important;
  border-color: var(--color-accent) !important;
}

/* ── Restaurante — Perfil público ─────────────────────────── */
.rest-profile { max-width: 720px; margin: 0 auto; padding: 0 0 16px; }

.rest-header {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--color-bg);
  border-top: 3px solid var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding: 24px 20px 20px;
  margin-bottom: 16px;
}
.rest-header__logo { flex-shrink: 0; }
.rest-header__logo img {
  width: 80px; height: 80px; border-radius: 12px; object-fit: cover;
  border: 1px solid var(--color-border);
}
.rest-header__logo-placeholder {
  width: 80px; height: 80px; border-radius: 12px;
  background: var(--color-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800;
}
.rest-header__info { flex: 1; min-width: 0; }
.rest-header__name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rest-header__name { font-size: 1.3rem; font-weight: 800; color: var(--color-text); }
.rest-header__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.rest-header__desc { font-size: .9rem; color: var(--color-muted); line-height: 1.5; }

.rest-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700;
}
.rest-badge--verified { background: #1a3a1a; color: #4caf50; }
.rest-badge--unclaimed { background: #2a1a1a; color: #f88; }

.rest-meta-tag {
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: 20px; padding: 2px 10px; font-size: .78rem; color: var(--color-muted);
}
.rest-meta-location { font-size: .82rem; color: var(--color-muted); }

.rest-claim-cta {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px; font-size: .9rem; color: var(--color-muted);
}

.rest-section { margin-top: 20px; }
.rest-section__title { font-size: 1rem; font-weight: 700; color: var(--color-text); margin-bottom: 14px; }

.rest-menu-grid { display: flex; flex-direction: column; gap: 10px; }
.rest-menu-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: 14px;
}
.rest-menu-item__photo {
  width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--color-border);
}
.rest-menu-item__body { flex: 1; min-width: 0; }
.rest-menu-item__name { font-weight: 700; font-size: .95rem; color: var(--color-text); }
.rest-menu-item__desc { font-size: .82rem; color: var(--color-muted); margin-top: 4px; line-height: 1.4; }
.rest-menu-item__price { font-size: .9rem; font-weight: 700; color: var(--color-accent); margin-top: 6px; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 200;
  align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 24px; width: 100%; max-width: 420px;
  max-height: 90vh; overflow-y: auto; }
.modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal__header h3 { font-size: .95rem; font-weight: 700; }
.modal__close { background: none; border: none; color: var(--color-muted); cursor: pointer; font-size: 1rem; }
.modal__desc { font-size: .85rem; color: var(--color-muted); margin-bottom: 16px; line-height: 1.5; }
.modal__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.form-error { background: #2a0f0f; color: #f88; border-radius: 6px;
  padding: 8px 12px; font-size: .83rem; margin-top: 8px; }

/* ── Restaurante — Formulario público de creación ─────────── */
.rest-create-wrap {
  max-width: 480px; margin: 0 auto; padding: 24px 16px;
}
.rest-create-header { margin-bottom: 24px; }
.rest-create-header h1 { font-size: 1.2rem; font-weight: 800; color: var(--color-text); margin-bottom: 8px; }
.rest-create-header p { font-size: .88rem; color: var(--color-muted); line-height: 1.5; }
.rest-create-form { display: flex; flex-direction: column; gap: 4px; }
.rest-create-note {
  font-size: .78rem; color: var(--color-muted); line-height: 1.5;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 4px;
}
.rest-create-success {
  text-align: center; padding: 40px 16px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.rest-create-success__icon { font-size: 3rem; margin-bottom: 12px; }
.rest-create-success h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 10px; }
.rest-create-success p { font-size: .88rem; color: var(--color-muted); line-height: 1.5; }

/* ── Restaurante — nombre en header sin truncar ──────────── */
.rest-header__name { font-size: 1.3rem; font-weight: 800; color: var(--color-text); word-break: break-word; }

/* ── Restaurante — Seguir + redes ───────────────────────── */
.rest-header__bottom { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.rest-follow-row { display: flex; align-items: center; gap: 12px; }
.rest-follow-count { font-size: .82rem; color: var(--color-muted); }

/* ── Restaurante — Social icons row ─────────────────────── */
.rest-social-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rest-social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  color: var(--color-muted); text-decoration: none;
  cursor: pointer; transition: color .15s, border-color .15s;
}
.rest-social-btn:hover { color: var(--color-text); border-color: var(--color-text); }
.rest-social-btn--instagram:hover { color: #e1306c; border-color: #e1306c; }
.rest-social-btn--whatsapp:hover  { color: #25d366; border-color: #25d366; }
.rest-social-btn--facebook:hover  { color: #1877f2; border-color: #1877f2; }
.rest-social-btn--youtube:hover   { color: #ff0000; border-color: #ff0000; }
.rest-social-btn--tiktok:hover    { color: var(--color-text); border-color: var(--color-text); }

/* ── Restaurante — Tabs ──────────────────────────────────── */
.rest-tabs {
  display: flex; gap: 0; margin-top: 20px;
  border-bottom: 1px solid var(--color-border);
}
.rest-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 20px; background: none; border: none;
  font-family: inherit; font-size: .85rem; font-weight: 600;
  color: var(--color-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.rest-tab:hover { color: var(--color-text); }
.rest-tab--active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.rest-tab-panel { margin-top: 16px; }
.rest-tab-panel--hidden { display: none; }
.rest-empty-tab { text-align: center; padding: 40px 16px; color: var(--color-muted); font-size: .9rem; }

/* ── Restaurante — Horario (modal) ──────────────────────── */
.rest-schedule-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.rest-schedule-item {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .87rem; padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
}
.rest-schedule-item:last-child { border-bottom: none; }
.rest-schedule-item__day { color: var(--color-text); font-weight: 600; }
.rest-schedule-item__hours { color: var(--color-muted); }
.rest-schedule-item--closed .rest-schedule-item__day { color: var(--color-muted); font-weight: 400; }
.rest-schedule-item--closed .rest-schedule-item__hours { color: var(--color-border); }

/* ── Restaurante — Editor de links dinámicos ─────────────── */
.rest-links-editor { display: flex; flex-direction: column; gap: 8px; }
.rest-link-row {
  display: flex; gap: 8px; align-items: center;
}
.rest-link-type { width: 130px !important; flex-shrink: 0; }
.rest-link-url  { flex: 1; }
.rest-link-remove { flex-shrink: 0; padding: 6px 10px !important; }

/* ── Restaurante — Formulario: secciones ─────────────────── */
.rest-form-section {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--color-border);
}
.rest-form-section__title {
  font-size: .9rem; font-weight: 700;
  color: var(--color-text); margin-bottom: 16px;
}

/* ── Restaurante — Input con prefijo (@) ─────────────────── */
.rest-input-prefix-wrap {
  display: flex; align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.rest-input-prefix {
  padding: 0 10px; font-size: .9rem;
  color: var(--color-muted);
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  line-height: 42px; height: 42px;
  display: flex; align-items: center;
}
.rest-input-prefixed {
  border: none !important;
  border-radius: 0 !important;
  flex: 1;
}

/* ── Restaurante — Editor de horario (formulario) ────────── */
.rest-schedule-editor {
  display: flex; flex-direction: column; gap: 8px;
}
.rest-schedule-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.rest-schedule-toggle {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; min-width: 110px;
}
.rest-schedule-toggle input[type=checkbox] { cursor: pointer; accent-color: var(--color-accent); }
.rest-schedule-day { font-size: .85rem; font-weight: 600; color: var(--color-text); }
.rest-schedule-hours {
  display: flex; align-items: center; gap: 6px; flex: 1;
}
.rest-schedule-select {
  width: auto !important; padding: 4px 6px !important;
  font-size: .82rem !important; height: auto !important;
}
.rest-schedule-sep { color: var(--color-muted); font-size: .85rem; }
.rest-schedule-closed { font-size: .82rem; color: var(--color-muted); }

/* ── Restaurante — Menú CRUD (panel propietario) ─────────── */
.menu-item-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.menu-item-row__photo {
  width: 56px; height: 56px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
}
.menu-item-row__no-photo {
  width: 56px; height: 56px; border-radius: 8px;
  background: var(--color-bg); border: 1px dashed var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.menu-item-row__body  { flex: 1; min-width: 0; }
.menu-item-row__name  { font-weight: 700; font-size: .9rem; color: var(--color-text); }
.menu-item-row__desc  { font-size: .8rem; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item-row__meta  { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.menu-item-row__price { font-size: .82rem; font-weight: 600; color: var(--color-accent); }
.menu-item-row__avail { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.menu-item-row__avail--on  { background: #e8f5e9; color: #388e3c; }
.menu-item-row__avail--off { background: var(--color-surface-alt); color: var(--color-muted); }
.menu-item-row__actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ── Context switch ─────────────────────────────────────── */
.header-menu__actor {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px 8px; border-bottom: 1px solid var(--color-border); margin-bottom: 4px;
}
.header-menu__actor-logo {
  width: 36px; height: 36px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--color-border); flex-shrink: 0;
}
.header-menu__actor-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.header-menu__actor-name {
  display: block; font-size: .85rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}
.header-menu__actor-handle { display: block; font-size: .75rem; color: var(--color-muted); }
.header-menu__actor--restaurant .header-menu__actor-name { color: var(--color-accent); }
.header-menu__section-label {
  display: block; padding: 6px 16px 2px;
  font-size: .72rem; font-weight: 600; color: var(--color-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.header-menu__item--restaurant { display: flex; align-items: center; gap: 10px; }
.header-menu__restaurant-logo {
  width: 24px; height: 24px; border-radius: 5px; object-fit: cover;
  border: 1px solid var(--color-border); flex-shrink: 0;
}
.avatar--nav-restaurant { border-radius: 6px; }



/* ── Chip de modo restaurante (topbar) ──────────────────── */
.actor-chip__form { margin: 0; display: flex; }
.actor-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 4px;
  background: var(--color-accent); color: #fff;
  border: none; border-radius: 20px; cursor: pointer;
  font-family: inherit; font-size: .75rem; font-weight: 600;
  max-width: 200px; overflow: hidden;
  transition: background .15s;
}
.actor-chip:hover { background: #7a2810; }
.actor-chip__logo {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid rgba(255,255,255,.4); flex-shrink: 0;
}
.actor-chip__icon { font-size: .95rem; line-height: 1; flex-shrink: 0; }
.actor-chip__name {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 160px;
}
.actor-chip__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; opacity: .7; flex-shrink: 0; margin-left: 2px;
}

/* ── Avatar cuadrado para posts de restaurante ──────────── */
.avatar--restaurant { border-radius: 6px !important; }

/* ── Grid de posts en perfil de restaurante ─────────────── */
.rest-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.rest-post-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  display: block;
  background: var(--color-border);
}
.rest-post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}
.rest-post-thumb:hover img { transform: scale(1.04); }
.rest-post-thumb__title {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  color: #fff; font-size: .7rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── v23.32 additions ───────────────────────────────────── */

/* Splash screen */
.app-splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .4s ease, visibility .4s;
}
.app-splash__logo { height: 40px; width: auto; display: block; animation: splashPulse .8s ease-out; }
.app-splash--out { opacity: 0; visibility: hidden; }
@keyframes splashPulse {
  0%   { opacity: 0; transform: scale(.88); }
  60%  { opacity: 1; transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Overscroll indicator */
.overscroll-indicator {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%) translateY(-28px);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 20px; padding: 6px 10px;
  color: var(--color-accent); opacity: 0;
  pointer-events: none; z-index: 999;
  transition: opacity .15s;
}

/* Saved grid — botón mover */
.saved-grid-item { position: relative; }
.saved-grid-item__link { position: absolute; inset: 0; display: block; }
.saved-grid-item__link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.saved-grid-item__move {
  position: absolute; top: 5px; right: 5px; z-index: 2;
  background: rgba(0,0,0,.55); color: #fff;
  border: none; border-radius: 50%; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transition: opacity .15s;
  padding: 0;
}
.saved-grid-item:hover .saved-grid-item__move,
.saved-grid-item:focus-within .saved-grid-item__move { opacity: 1; }

/* Foto preview remove button */
.photo-new-preview { position: relative; }
.photo-new-preview__remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.6); color: #fff; border: none;
  border-radius: 50%; width: 20px; height: 20px;
  font-size: .7rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; z-index: 2;
}
.photo-new-preview__remove:hover { background: rgba(200,50,30,.85); }

/* Badge restaurante en perfil */
.tag--restaurant-link {
  display: inline-flex; align-items: center; gap: 5px;
  background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-accent) 25%, var(--color-border));
  color: var(--color-accent); border-radius: 20px;
  padding: 4px 10px; font-size: .78rem; font-weight: 600;
  text-decoration: none;
}
.tag--restaurant-link:hover { background: color-mix(in srgb, var(--color-accent) 18%, var(--color-surface)); }
.tag--restaurant-link strong { font-weight: 700; }

/* Thumb badge receta (consistente con feed) */
.thumb-badge--recipe {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,.55); border-radius: 4px;
  padding: 2px 4px; display: flex;
}
.thumb-badge--recipe .icon { stroke: #fff; width: 12px; height: 12px; }

/* Slug editor */
.slug-editor { display: flex; align-items: center; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }
.slug-editor__prefix { padding: 0 8px; font-size: .75rem; color: var(--color-muted); white-space: nowrap; background: var(--color-surface-alt); border-right: 1px solid var(--color-border); line-height: 40px; }
.slug-editor__input { border: none !important; border-radius: 0 !important; flex: 1; }
.slug-editor__input:focus { outline: none; }
.form-hint--ok { color: #4caf50; }
.form-hint--err { color: var(--color-danger, #e55); }

/* Menú digital section header */
.rest-menu-section__header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px; gap: 12px;
}

/* Suerte disabled btn */
.suerte-otra-btn--disabled {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius);
  background: var(--color-surface-alt); color: var(--color-muted);
  font-size: .95rem; cursor: default;
}

/* ── v23.33 additions ───────────────────────────────────── */

/* Post sin foto — placeholder en perfil */
.profile-thumb--no-photo { background: color-mix(in srgb, var(--color-accent) 5%, var(--color-surface)); }
.profile-thumb__placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 6px; padding: 8px; text-align: center;
  color: var(--color-muted);
}
.profile-thumb__placeholder .icon { width: 22px; height: 22px; stroke: var(--color-muted); }
.profile-thumb__placeholder span { font-size: .65rem; line-height: 1.3; word-break: break-word; }

/* ═══════════════════════════════════════════════════════════
   V24.0 — Perfil público restaurante (rp-*)
   ═══════════════════════════════════════════════════════════ */

/* ── Contenedor global ──────────────────────────────────── */
.rp {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* ── Hero ───────────────────────────────────────────────── */
.rp-hero {
  position: relative;
  width: 100%;
  min-height: 260px;
  background-color: var(--color-surface);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0;
}
.rp-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.18) 0%, rgba(0,0,0,.72) 100%);
  z-index: 0;
}
.rp-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.rp-hero__logo {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.25);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  flex-shrink: 0;
  margin-bottom: 4px;
}
.rp-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rp-hero__logo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
}
.rp-hero__name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  line-height: 1.2;
  word-break: break-word;
}
.rp-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.rp-hero__tag {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .78rem;
  font-weight: 600;
}
.rp-hero__follow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.rp-hero__followers {
  font-size: .82rem;
  color: rgba(255,255,255,.75);
}
.rp-follow-btn {
  padding: 7px 18px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.rp-follow-btn:hover { background: #fff; color: var(--color-bg); }
.rp-follow-btn--following {
  background: rgba(255,255,255,.2);
}

/* ── Barra de iconos ────────────────────────────────────── */
.rp-iconbar {
  display: flex;
  gap: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rp-iconbar::-webkit-scrollbar { display: none; }
.rp-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  color: var(--color-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: .7rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color .15s;
  flex-shrink: 0;
}
.rp-icon-btn:hover { color: var(--color-text); }
.rp-icon-btn svg { flex-shrink: 0; }
.rp-icon-btn--instagram:hover { color: #e1306c; }
.rp-icon-btn--whatsapp:hover  { color: #25d366; }
.rp-icon-btn--tiktok:hover    { color: var(--color-text); }
.rp-icon-btn--facebook:hover  { color: #1877f2; }
.rp-icon-btn--youtube:hover   { color: #ff0000; }

/* ── Descripción ────────────────────────────────────────── */
.rp-desc {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.rp-desc p {
  font-size: .9rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── CTA Reclamo ────────────────────────────────────────── */
.rp-claim-cta {
  margin: 12px 16px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-accent) 25%, var(--color-border));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--color-muted);
}
.rp-claim-cta strong { color: var(--color-text); }

/* ── Tabs ───────────────────────────────────────────────── */
.rp-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-top: 4px;
}
.rp-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.rp-tab:hover { color: var(--color-text); }
.rp-tab--active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.rp-tab-panel { padding: 16px; }
.rp-tab-panel--hidden { display: none; }

/* ── Acción dentro de tab ───────────────────────────────── */
.rp-tab-action {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

/* ── Menú: cards grandes ────────────────────────────────── */
.rp-menu-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rp-menu-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rp-menu-card__photo {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: color-mix(in srgb, var(--color-accent) 6%, var(--color-surface));
  flex-shrink: 0;
}
.rp-menu-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.rp-menu-card:hover .rp-menu-card__photo img { transform: scale(1.03); }
.rp-menu-card__photo--clickable { cursor: zoom-in; }
.rp-menu-card__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  height: 140px;
}
.rp-menu-card__body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rp-menu-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}
.rp-menu-card__desc {
  font-size: .85rem;
  color: var(--color-muted);
  line-height: 1.5;
}
.rp-menu-card__price {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-top: 2px;
}

/* ── Posts grid (igual al anterior) ────────────────────── */
.rp-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: -16px;
}
.rp-post-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  display: block;
  background: var(--color-border);
}
.rp-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}
.rp-post-thumb:hover img { transform: scale(1.04); }
.rp-post-thumb__title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Empty state ────────────────────────────────────────── */
.rp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 16px;
  color: var(--color-muted);
  font-size: .9rem;
  text-align: center;
}

/* ── Reseñas: resumen ───────────────────────────────────── */
.rp-rating-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.rp-rating-summary__score {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}
.rp-rating-summary__stars {
  display: flex;
  gap: 2px;
}
.rp-rating-summary__count {
  font-size: .82rem;
  color: var(--color-muted);
}

/* ── Reseñas: formulario ────────────────────────────────── */
.rp-review-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rp-review-form__title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--color-text);
}
.rp-stars-input {
  display: flex;
  gap: 4px;
}
.rp-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--color-border);
  transition: color .1s, transform .1s;
  line-height: 1;
}
.rp-star-btn--on { color: var(--color-accent); }
.rp-star-btn:hover { transform: scale(1.15); }
.rp-review-form__body {
  resize: vertical;
  min-height: 72px;
}
.rp-review-form__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rp-review-form__feedback {
  font-size: .82rem;
  color: var(--color-muted);
}
.rp-review-login {
  padding: 16px 0;
  text-align: center;
  margin-bottom: 16px;
}

/* ── Reseñas: lista ─────────────────────────────────────── */
.rp-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rp-review-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.rp-review-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.rp-review-item__author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rp-review-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.rp-review-item__avatar--placeholder {
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
}
.rp-review-item__name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--color-text);
}
.rp-review-item__date {
  font-size: .75rem;
  color: var(--color-muted);
  margin-top: 1px;
}
.rp-review-item__stars {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.rp-review-item__body {
  font-size: .88rem;
  color: var(--color-muted);
  line-height: 1.55;
  margin: 0;
}

/* ── Override: quitar padding extra en perfil ───────────── */
.app-content > .rp:first-child {
  padding-top: 0;
}

/* ── v24.0.1 — Responsive fix pantallas ≤ 380px ─────────── */

@media (max-width: 380px) {
  .profile-header { gap: 10px; padding: 14px 12px 14px; }
  .avatar--lg { width: 60px; height: 60px; }
  .profile-stats { gap: 8px 10px; font-size: .78rem; }
  .profile-name-row h2 { font-size: 1.05rem; }
  .level-card-premium { margin: 0 12px; padding: 12px; }
  .rp-icon-btn { padding: 10px 10px; font-size: .65rem; }
  .rp-hero__name { font-size: 1.25rem; }
  .page { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 320px) {
  .avatar--lg { width: 52px; height: 52px; }
  .profile-stats { font-size: .74rem; gap: 6px 8px; }
  .profile-name-row h2 { font-size: .98rem; }
}

/* ── v24.0.2 — Owner note en tab reseñas ────────────────── */
.rp-owner-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--color-accent) 6%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-accent) 20%, var(--color-border));
  border-radius: var(--radius);
  font-size: .83rem;
  color: var(--color-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── v24.1.0 — Lightbox fotos de menú + compartir ────────── */
.rp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.rp-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.85);
}
.rp-lightbox__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
}
.rp-lightbox__img {
  max-width: min(520px, 100%);
  max-height: 75vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.rp-lightbox__caption {
  color: #fff;
  font-size: .9rem;
  margin-top: 10px;
  text-align: center;
  opacity: .85;
}
.rp-lightbox__close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  opacity: .8;
}
.rp-lightbox__close:hover { opacity: 1; }

/* ── v24.2.0 ─────────────────────────────────────────────── */

/* ── Hero: carousel ────────────────────────────────────────── */
.rp-hero {
  position: relative;
  height: 300px;         /* era ~200px, ahora más alto */
  overflow: hidden;
  border-radius: 0;
}
.rp-hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .6s ease;
}
.rp-hero__slide--active { opacity: 1; }
.rp-hero__slide--empty { background: var(--color-surface-alt); }
.rp-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.12) 0%, rgba(0,0,0,.55) 100%);
  z-index: 1;
}

/* Logo: top-right absoluto */
.rp-hero__logo {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.3);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  background: var(--color-surface);
  flex-shrink: 0;
}
.rp-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rp-hero__logo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-surface-alt);
}

/* Dots del carousel */
.rp-hero__dots {
  position: absolute;
  bottom: 76px;   /* por encima del contenido */
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 6px;
}
.rp-hero__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  padding: 0;
  transition: background .2s;
}
.rp-hero__dot--active { background: #fff; }

/* Content dentro del hero */
.rp-hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 16px 14px;
}

/* ── Menú: grid 2 columnas con categorías ──────────────────── */
.rp-menu-category-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 20px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
}
.rp-menu-category-title:first-child { margin-top: 4px; }

.rp-menu-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rp-menu-card2 {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rp-menu-card2__photo {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-surface-alt);
}
.rp-menu-card2__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.rp-menu-card2__photo.rp-menu-card__photo--clickable { cursor: zoom-in; }
.rp-menu-card2__photo.rp-menu-card__photo--clickable:hover img { transform: scale(1.04); }
.rp-menu-card2__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  color: var(--color-muted);
}
.rp-menu-card2__body {
  padding: 8px 10px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rp-menu-card2__name {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.3;
}
.rp-menu-card2__desc {
  font-size: .76rem;
  color: var(--color-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rp-menu-card2__price {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: auto;
  padding-top: 4px;
}

/* ── Reseñas: likes y respuesta ─────────────────────────────── */
.rp-review-item__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.rp-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-size: .8rem;
  color: var(--color-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.rp-like-btn:hover { background: var(--color-surface-alt); color: var(--color-text); }
.rp-like-btn--liked { color: #e05; }
.rp-like-btn--liked:hover { color: #c03; }
.rp-like-count { min-width: 10px; }

.rp-reply-btn {
  background: none;
  border: none;
  font-size: .78rem;
  color: var(--color-primary);
  cursor: pointer;
  padding: 2px 4px;
}
.rp-reply-btn:hover { text-decoration: underline; }

.rp-owner-reply {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--color-surface-alt);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
}
.rp-owner-reply--hidden { display: none; }
.rp-owner-reply__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 4px;
  letter-spacing: .02em;
}
.rp-owner-reply__text {
  font-size: .83rem;
  color: var(--color-text);
  line-height: 1.5;
  margin: 0;
}

/* ── Acordeones en /mi-restaurante ─────────────────────────── */
.rest-accordion {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.rest-accordion__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--color-surface);
  border: none;
  font-size: .9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: var(--color-text);
}
.rest-accordion__toggle:hover { background: var(--color-surface-alt); }
.rest-accordion__arrow {
  transition: transform .2s;
  flex-shrink: 0;
}
.rest-accordion__toggle[aria-expanded="true"] .rest-accordion__arrow {
  transform: rotate(180deg);
}
.rest-accordion__body {
  padding: 6px 16px 16px;
  border-top: 1px solid var(--color-border);
  display: none;
}
.rest-accordion__body--open {
  display: block;
}

/* ── Hero slots en admin ───────────────────────────────────── */
.hero-slots {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.hero-slot {
  position: relative;
  width: calc(33.333% - 7px);
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  border: 2px dashed var(--color-border);
}
.hero-slot--filled { border-style: solid; }
.hero-slot--filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-slot--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-surface-alt);
  cursor: pointer;
}
.hero-slot__add {
  font-size: .75rem;
  color: var(--color-primary);
  cursor: pointer;
  font-weight: 600;
}
.hero-slot__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,.55);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  color: #fff;
  font-size: .7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.hero-slot__label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .65rem;
  padding: 1px 5px;
  border-radius: 4px;
}

/* ── Categorías admin: header en lista ─────────────────────── */
.menu-admin-cat-header {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 14px 0 4px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}
.cat-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

/* ── v24.2.3 — Fixes ────────────────────────────────────── */
/* Bottom nav tapa contenido */
.page { padding-bottom: 100px; }

/* [hidden] explícito para acordeones */
[hidden] { display: none !important; }

/* rest-menu-section fuera del form: debe respetar el padding del .page */
.rest-menu-section {
  box-sizing: border-box;
  width: 100%;
}

/* Homogenizar espaciado entre acordeones */
.rest-accordion + .rest-accordion {
  margin-top: 0;
}

/* Hero slots: responsive en móvil muy pequeño */
@media (max-width: 360px) {
  .hero-slot { width: calc(33.333% - 5px); }
}

/* ═══════════════════════════════════════════════════════════
   v24.3.0 — Patch multi-fixes
   ═══════════════════════════════════════════════════════════ */

/* 1. Logo restaurante: +30% y separado del borde superior */
.rp-hero__logo {
  width: 78px !important;
  height: 78px !important;
  top: 24px !important;
  border-radius: 12px !important;
}

/* 2. Badge "Siguiendo" hover visible */
.rp-follow-btn--following {
  background: rgba(255,255,255,.22) !important;
  border-color: rgba(255,255,255,.8) !important;
}
.rp-follow-btn--following:hover {
  background: #fff !important;
  color: var(--color-bg) !important;
  border-color: #fff !important;
}

/* 3. Lightbox: imagen a tamaño completo sin cap de 520px */
.rp-lightbox__img {
  max-width: calc(100vw - 40px) !important;
  max-height: 88vh !important;
  width: auto !important;
  height: auto !important;
}

/* 4. Botones acción por ítem de menú */
.rp-menu-card2__actions {
  display: flex;
  gap: 6px;
  padding: 0 10px 8px;
  margin-top: auto;
}
.rp-menu-card2__action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-muted);
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.rp-menu-card2__action-btn:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.rp-menu-card2__action-btn svg { flex-shrink: 0; }

/* 5. Hashtags en ítems de menú */
.rp-menu-card2__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 10px 8px;
}
.rp-menu-card2__tag {
  font-size: .65rem;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
  border-radius: 10px;
  padding: 1px 6px;
  text-decoration: none;
  font-weight: 600;
}

/* 6. Porciones-control fuera del acordeón (arriba de ingredientes) */
.recipe-portions-outer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  margin-bottom: 10px;
}
.recipe-portions-outer__label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--color-text);
}
.recipe-portions-outer .portions-control {
  display: flex;
  align-items: center;
  gap: 0;
}
.recipe-portions-outer .calc-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 7. Acordeones receta con estilo rest-accordion */
.recipe-accordion {
  border: 1px solid var(--color-border) !important;
  border-radius: 10px !important;
  margin-bottom: 12px !important;
  overflow: hidden !important;
  background: var(--color-surface) !important;
}
.recipe-accordion__trigger {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 16px !important;
  background: var(--color-surface) !important;
  border: none !important;
  font-size: .9rem !important;
  font-weight: 600 !important;
  text-align: left !important;
  cursor: pointer !important;
  color: var(--color-text) !important;
  border-bottom: none !important;
}
.recipe-accordion__trigger:hover {
  background: var(--color-surface-alt) !important;
}
.recipe-accordion__body {
  border-top: 1px solid var(--color-border) !important;
  padding: 14px 16px 16px !important;
}
.recipe-accordion__header {
  display: flex;
  align-items: stretch;
}
.recipe-accordion__header .recipe-accordion__trigger {
  flex: 1;
}

/* Ocultar portions-control del interior del acordeón */
#portionsControl { display: none !important; }


/* ── Notificaciones de restaurante ─────────────────────── */
.notif-item--restaurant {
  border-left: 3px solid var(--color-accent);
  padding-left: calc(var(--pad) - 3px);
}
.notif-restaurant-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-lt);
  border-radius: 4px;
  padding: 1px 6px;
  margin-bottom: 2px;
  letter-spacing: .01em;
}
