/* Sitio del comensal: diseño compacto, primero para el celular.
   Solo se carga en el sitio del comensal (html.comensal); el restaurante y la plataforma no lo usan. */

/* --- Encabezado compacto --- */
html.comensal .site-header .nav { padding: .4rem 0; }
html.comensal .site-header .brand img { width: 44px; height: 44px; }
html.comensal-app .nav-diner-desktop .nav-count { margin-left: .3rem; }

/* --- Barra inferior (4 apartados) --- */
.tabbar { display: none; }
@media (max-width: 860px) {
  html.comensal-app body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  html.comensal-app .nav-diner-desktop { display: none !important; }
  html.comensal-app .site-footer--app { display: none; }
  html.comensal-app .site-header { padding-top: env(safe-area-inset-top); }
  html.comensal-app .site-header .brand small { display: none; }
  html.comensal-app .site-header .brand strong { font-size: 1.05rem; }
  html.comensal-app .site-header .brand img, html.comensal-app .site-header.rt-brand .brand img,
  html.comensal-app .site-header.rt-brand .brand .rt-ini { width: 38px; height: 38px; }
  html.comensal-app .site-header .header-avatar { width: 40px; height: 40px; margin-left: .35rem; }
  html.comensal-app .site-header .header-palette { margin-left: auto; }
  html.comensal-app .site-header .nav { gap: .5rem; }
  html.comensal-app .site-header .header-avatar { margin-left: 0; }
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--bar); color: rgba(255,255,255,.78);
    padding: .35rem .35rem calc(.35rem + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(0,0,0,.18);
    border-top: 1px solid rgba(255,255,255,.08);
  }
  html.comensal-app .section { padding: 1rem 0 1.5rem; }
}
.tabbar-item {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .15rem;
  min-height: 56px; padding: .3rem .1rem .2rem; border-radius: 14px;
  color: inherit; font-size: .72rem; font-weight: 600; letter-spacing: .01em; line-height: 1.1;
  -webkit-tap-highlight-color: transparent; text-align: center;
}
.tabbar-item:hover, .tabbar-item:focus-visible { color: #fff; }
.tabbar-item:focus-visible { outline: 2px solid #F4C27A; outline-offset: -2px; }
.tabbar-item.is-active { color: #fff; }
.tabbar-item.is-active:not(.tabbar-qr) svg { background: rgba(255,255,255,.16); border-radius: 999px; padding: 3px 14px; width: 52px; height: 30px; box-sizing: border-box; }
.tabbar-item.is-active span:last-child { color: #FFE3B0; }
.tabbar-ico { position: relative; display: inline-flex; }
.tabbar-badge {
  position: absolute; top: -5px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #E5484D; color: #fff; font-size: .68rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--bar); line-height: 1;
}
.tabbar-item.is-active .tabbar-badge { top: -4px; right: -2px; }
.tabbar-badge[hidden] { display: none; }
.tabbar-qr-bubble {
  width: 52px; height: 52px; margin-top: -22px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--orange), #C85A16);
  box-shadow: 0 6px 16px rgba(224,122,47,.45), 0 0 0 4px var(--bar);
  transition: transform .15s;
}
.tabbar-qr.is-active .tabbar-qr-bubble { background: linear-gradient(140deg, #EA8740, #B9520F); box-shadow: 0 6px 16px rgba(0,0,0,.3), 0 0 0 3px #fff, 0 0 0 6px var(--bar); }
.tabbar-qr:active .tabbar-qr-bubble { transform: scale(.94); }

/* --- Estructura de las pestañas --- */
.app-main { padding: 1rem 0 1.6rem; }
@media (min-width: 861px) { .app-main { padding: 2rem 0 2.5rem; } }
.app-hello { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; }
.app-hello h1 { font-size: 1.45rem; margin: 0; }
.app-hello p { margin: .1rem 0 0; font-size: .9rem; }
.app-qr-chip {
  flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .85rem;
  border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; font-size: .85rem;
  box-shadow: var(--shadow);
}
.app-qr-chip:hover { color: #fff; filter: brightness(1.1); }
.app-section { margin-top: 1.1rem; }
.app-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-bottom: .55rem; }
.app-section-head h2 { font-size: 1.12rem; margin: 0; }
.app-section-head > span { white-space: nowrap; flex: none; }
@media (min-width: 861px) { .only-mobile { display: none; } }
.app-empty { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.1rem; }
.comensal .install-banner { margin: .6rem 0; padding: .55rem .7rem; }

/* Mis tarjetas: carrusel horizontal en el celular */
@media (max-width: 860px) {
  .lcards--rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: 86%; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; gap: .8rem;
    margin: 0 -4vw 0; padding: .2rem 4vw .9rem; scrollbar-width: none;
  }
  .lcards--rail::-webkit-scrollbar { display: none; }
  .lcards--rail > .lcard { scroll-snap-align: center; }
  .lcards--rail:has(> .lcard:only-child) { grid-auto-columns: 100%; }
}

/* Control segmentado Todos / Favoritos */
.seg { display: flex; background: var(--cream-2); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: .7rem; }
.seg-item { flex: 1; text-align: center; padding: .45rem .6rem; border-radius: 999px; color: var(--text); font-weight: 600; font-size: .9rem; }
.seg-item.is-on { background: var(--card, #fff); color: var(--orange-2); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.app-search { margin-bottom: .8rem; }
.app-search input { border-radius: 999px; padding-left: 1rem; }
.app-search .btn { padding: .55em .9em; }

/* Restaurantes de la comunidad */
.community-list { display: grid; grid-template-columns: 1fr; gap: .7rem; }
@media (min-width: 700px) { .community-list { grid-template-columns: 1fr 1fr; } }
.comensal .community-card { gap: .55rem; padding: .85rem .9rem; border-left: 5px solid var(--cc, var(--orange)); border-top: 0; }
.comensal .community-card .logo-sm, .comensal .community-card .avatar { width: 48px; height: 48px; }
.comensal .community-top .person { gap: .65rem; }
.comensal .person-txt { min-width: 0; }
.comensal .person-txt strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-member { color: var(--teal); font-weight: 700; }
.comensal .community-foot { justify-content: flex-start; }
.comensal .fav-btn { width: 40px; height: 40px; font-size: 1.2rem; flex: none; }
.cc-map { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--cream); }
.cc-map summary { list-style: none; display: flex; align-items: center; gap: .4rem; padding: .45rem .6rem; cursor: pointer; font-size: .85rem; color: var(--muted); }
.cc-map summary::-webkit-details-marker { display: none; }
.cc-map summary svg { flex: none; color: #C4452D; }
.cc-addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-map-go { flex: none; font-weight: 700; color: var(--orange-2); }
.cc-map[open] .cc-map-go::after { content: ' ▴'; }
.cc-map:not([open]) .cc-map-go::after { content: ' ▾'; }
.cc-map-frame { height: 170px; background: #E9E4DA; }
.cc-map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.cc-directions { display: block; padding: .4rem .6rem; font-weight: 600; text-align: right; }

/* --- Personalización --- */
.app-profile { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.app-profile h1 { font-size: 1.45rem; margin: 0; }
.profile-photo--sm { width: 64px; height: 64px; font-size: 1.3rem; border-width: 3px; }
.app-card { padding: 1rem 1.05rem; margin-bottom: .8rem; }
.app-card h2 { font-size: 1.05rem; margin-bottom: .3rem; }
.app-card > p { margin: 0 0 .5rem; }
.toggle--row { margin: .5rem 0 .8rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; }
.comensal .swatches { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: .45rem; }
.comensal .swatch > span { width: 40px; height: 40px; }
.comensal .swatch small { font-size: .72rem; line-height: 1.15; max-width: 100%; overflow-wrap: anywhere; }
.app-actions { margin-top: .8rem; flex-wrap: wrap; }
.app-fold summary { list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; cursor: pointer; }
.app-fold summary::-webkit-details-marker { display: none; }
.app-fold summary h2 { margin: 0; }
.app-fold[open] summary { margin-bottom: .4rem; }
.app-links { padding: .2rem 0; }
.app-link { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.05rem; color: var(--text); font-weight: 600; border-bottom: 1px solid var(--line); }
.app-link:last-child { border-bottom: 0; }
.app-link:hover { color: var(--orange-2); }
.comensal .install-steps-grid { gap: .6rem; }
.comensal .install-step-card { padding: .7rem .8rem; }
.comensal .install-step-card h3 { font-size: .95rem; }
.comensal .install-step-card ol { padding-left: 1.1rem; margin: .3rem 0; font-size: .9rem; }

/* --- Mi QR --- */
.myqr { text-align: center; max-width: 420px; margin: 0 auto; }
.myqr h1 { font-size: 1.45rem; margin: 0; }
.myqr-sub { margin: .2rem auto .9rem; font-size: .92rem; }
.myqr-card {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 100%;
  background: #fff; color: #111; border: 0; border-radius: 24px; padding: 1.1rem 1.1rem 1rem; cursor: zoom-in;
  box-shadow: 0 0 0 3px var(--orange), 0 18px 40px -12px rgba(27,42,74,.35); font: inherit;
}
.myqr-svg { display: block; width: min(76vw, 300px); aspect-ratio: 1; }
.myqr-svg svg { width: 100%; height: 100%; display: block; }
.myqr-name { font-weight: 700; color: #1B2A4A; margin-top: .2rem; }
.myqr-code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .08em; color: #1B2A4A; background: #F3E6D4; padding: .2rem .7rem; border-radius: 8px; word-break: break-all; }
.myqr-tip { margin: .8rem 0; }
.myqr-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .4rem 0 .8rem; }
.myqr-facts div { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; padding: .55rem; display: flex; flex-direction: column; }
.myqr-facts strong { font: 800 1.3rem 'Poppins', sans-serif; color: var(--orange-2); }
.myqr-facts span { font-size: .78rem; color: var(--muted); }
.myqr-full { position: fixed; inset: 0; z-index: 100; background: #fff; display: grid; place-items: center; padding: 1rem; }
.myqr-full[hidden] { display: none; }
.myqr-full-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.myqr-full .myqr-svg { width: min(92vw, 80vh, 520px); }

/* --- Soporte (chat) --- */
.chat-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.chat-head h1 { font-size: 1.35rem; margin: 0; }
.chat-head p { margin: 0; }
.chat-head .badge { margin-left: auto; }
.chat-avatar img { width: 44px; height: 44px; border-radius: 50%; box-shadow: var(--shadow); }
.chat { display: flex; flex-direction: column; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.chat-thread { display: flex; flex-direction: column; gap: .5rem; padding: .9rem .8rem; min-height: 46vh; max-height: calc(100vh - 290px); max-height: calc(100dvh - 290px); overflow-y: auto; background: linear-gradient(180deg, rgba(243,230,212,.35), transparent 120px); }
.chat-empty { margin: auto 0; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem .8rem; font-size: .92rem; }
.chat-empty strong { color: var(--text); font-size: 1.05rem; }
.chat-empty[hidden] { display: none; }
.bubble { max-width: 82%; padding: .55rem .8rem .4rem; border-radius: 18px; word-wrap: break-word; overflow-wrap: anywhere; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.bubble-body { display: block; white-space: pre-wrap; font-size: .95rem; line-height: 1.4; }
.bubble-meta { display: block; font-size: .7rem; opacity: .75; margin-top: .2rem; }
.bubble-mine { align-self: flex-end; background: var(--orange); color: #fff; border-bottom-right-radius: 6px; }
.bubble-theirs { align-self: flex-start; background: #EAF4F2; color: #17312E; border-bottom-left-radius: 6px; }
.bubble-system { border-left: 4px solid var(--teal); }
.bubble.is-sending { opacity: .6; }
.chat-form { display: flex; align-items: flex-end; gap: .5rem; padding: .55rem; border-top: 1px solid var(--line); background: var(--card, #fff); }
.chat-form textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; border-radius: 22px; padding: .6rem .9rem; margin: 0; font-size: 1rem; line-height: 1.35; }
.chat-send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-send:hover { background: var(--orange-2); }
.chat-send:disabled { opacity: .5; cursor: default; }
.chat-error { color: var(--danger); margin: 0; padding: 0 .9rem .6rem; }

/* --- Sin sesión: portada, entrar y registro más compactos en el celular --- */
@media (max-width: 640px) {
  html.comensal .hero { padding: 1.4rem 0 1.8rem; }
  html.comensal .hero-grid { gap: 1rem; }
  html.comensal .hero-logo { order: -1; }
  html.comensal .hero-logo img { width: 128px; }
  html.comensal .hero h1 { font-size: 1.65rem; }
  html.comensal .hero .lead { font-size: .98rem; margin: .4rem 0 0; }
  html.comensal .hero-actions { margin-top: 1rem; gap: .5rem; }
  html.comensal .section { padding: 1.6rem 0; }
  html.comensal .grid-3 { gap: .6rem; }
  html.comensal .grid-3 .card { display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; align-items: start; padding: .9rem; }
  html.comensal .grid-3 .card .icon-bubble { grid-row: span 2; margin: 0; }
  html.comensal .grid-3 .card h3 { font-size: 1rem; margin: 0 0 .2rem; }
  html.comensal .grid-3 .card p { margin: 0; font-size: .9rem; }
  html.comensal .auth-page { padding: 1rem .8rem; place-items: start center; padding-top: max(1rem, env(safe-area-inset-top)); }
  html.comensal .auth-card { padding: 1.2rem 1rem; border-radius: 18px; }
  html.comensal .auth-card .brand-center { margin-bottom: .7rem; }
  html.comensal .auth-card .brand-center img { width: 64px; height: 64px; margin-bottom: .3rem; }
  html.comensal .auth-card h1 { font-size: 1.25rem; margin-bottom: .2rem; }
  html.comensal .auth-card .brand-center p { margin: 0; font-size: .9rem; }
  html.comensal .auth-card input { font-size: 16px; }
  html.comensal .site-footer { padding: 1.2rem 0; margin-top: 1rem; }
}

/* --- Modo oscuro --- */
html[data-theme="dark"] .seg { background: #241E19; }
html[data-theme="dark"] .seg-item { color: var(--text); }
html[data-theme="dark"] .seg-item.is-on { background: #3A2F26; color: #F0A867; }
html[data-theme="dark"] .cc-map { background: #1E1914; }
html[data-theme="dark"] .cc-map-go { color: #F0A867; }
html[data-theme="dark"] .app-link { color: var(--text); }
html[data-theme="dark"] .chat-thread { background: transparent; }
html[data-theme="dark"] .bubble-theirs { background: #1F3532; color: #DDF2EE; }
html[data-theme="dark"] .chat-form { background: var(--card); }
html[data-theme="dark"] .myqr-facts div { background: var(--card); }
html[data-theme="dark"] .myqr-card { box-shadow: 0 0 0 3px var(--orange), 0 18px 40px -12px rgba(0,0,0,.8); }
html[data-theme="dark"] .app-qr-chip { background: #2E3D60; }
html[data-theme="dark"] .toggle--row { border-color: var(--line); }
html[data-theme="dark"] .tabbar-item { color: rgba(255,255,255,.72); }
html[data-theme="dark"] .tabbar-item.is-active, html[data-theme="dark"] .tabbar-item:hover { color: #fff; }
html[data-theme="dark"] .app-qr-chip, html[data-theme="dark"] .app-qr-chip:hover { color: #fff; }
html[data-theme="dark"] .seg-item.is-on { color: #F0A867; }

/* Personalizar: solo el ícono de paleta, arriba a la derecha junto a la foto del comensal */
.site-header .header-palette {
  order: 3; flex: none; width: 44px; height: 44px; margin-left: .4rem; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.35); -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.site-header .header-palette:hover { color: #fff; background: rgba(255,255,255,.22); }
.site-header .header-palette:focus-visible { outline: 2px solid #F4C27A; outline-offset: 2px; }
.site-header .header-palette.is-active { background: var(--orange); border-color: #fff; color: #fff; box-shadow: 0 0 0 3px rgba(244,194,122,.45); }
.site-header .header-avatar { order: 4; }
.site-header.rt-brand .header-palette { color: var(--rt-text); border-color: var(--rt-soft); background: var(--rt-hover); }
html[data-theme="dark"] .site-header .header-palette, html[data-theme="dark"] .site-header .header-palette:hover { color: #fff; }
html[data-theme="dark"] .site-header.rt-brand .header-palette { color: var(--rt-text); }
html[data-theme="dark"] .site-header .header-palette.is-active { color: #fff; }
.site-header.rt-brand .header-palette.is-active { background: var(--orange); border-color: #fff; color: #fff; }

/* --- Personalizar: tu foto y bienvenida (sentido de pertenencia) --- */
.me-hero { position: relative; text-align: center; padding: 1.4rem 1rem 1.1rem; margin-bottom: .9rem; overflow: hidden;
  background: radial-gradient(circle at 50% -20%, rgba(224,122,47,.22), transparent 60%), var(--card, #fff); }
.me-hero::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--orange), var(--teal), #1F5FA8); }
.me-photo-wrap { position: relative; width: 132px; height: 132px; margin: .2rem auto .7rem; }
.me-photo { width: 132px; height: 132px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--teal)); color: #fff; font: 800 2.6rem 'Poppins', sans-serif;
  border: 4px solid var(--card, #fff); box-shadow: 0 0 0 3px var(--orange), 0 14px 30px -10px rgba(27,42,74,.45); }
.me-photo img { width: 100%; height: 100%; object-fit: cover; }
.me-cam { position: absolute; right: -2px; bottom: 2px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; border: 3px solid var(--card, #fff); cursor: pointer; box-shadow: var(--shadow); }
.me-cam:hover { filter: brightness(1.15); }
.me-hero h1 { font-size: 1.6rem; margin: 0 0 .15rem; }
.me-member { margin: 0 auto; max-width: 320px; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.me-member strong { color: var(--orange-2); }
.me-stats { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; margin: .6rem 0 0; }
.me-stats span { background: var(--cream-2); border-radius: 999px; padding: .2rem .7rem; font-weight: 600; color: var(--text); }
.me-photo-form { margin-top: .9rem; }
.me-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.me-actions { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.me-actions[hidden] { display: none; }
.me-actions .btn { min-height: 44px; cursor: pointer; }
.me-help { margin-top: .5rem; }
.me-help.is-error { color: var(--danger); font-weight: 600; }
.me-remove { margin-top: .3rem; }
.me-section-title { font-size: 1.1rem; margin: 1.1rem 0 .55rem; }
html[data-theme="dark"] .me-hero { background: radial-gradient(circle at 50% -20%, rgba(224,122,47,.25), transparent 60%), var(--card); }
html[data-theme="dark"] .me-stats span { background: #2A231D; color: var(--text); }
html[data-theme="dark"] .me-member strong { color: #F0A867; }
html[data-theme="dark"] .me-cam { background: #2E3D60; color: #fff; }

/* --- Soporte: ícono de agente y «Síguenos en nuestras redes» --- */
.nav-diner-desktop .nav-soporte { display: inline-flex; align-items: center; gap: .35rem; }
.chat-avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--teal), #1F5E59); box-shadow: var(--shadow); }
.follow-strip { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 .7rem;
  padding: .5rem .55rem .5rem .9rem; border-radius: 16px; background: var(--card, #fff); border: 1px solid var(--line);
  border-left: 4px solid var(--orange); }
.follow-strip h2 { font-size: .95rem; margin: 0; line-height: 1.25; }
.follow-links { display: flex; gap: .45rem; flex: none; }
.follow-btn { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; box-shadow: 0 4px 10px -4px rgba(0,0,0,.35); transition: transform .12s; }
.follow-btn:hover, .follow-btn:focus-visible { color: #fff; transform: translateY(-1px); }
.follow-btn:focus-visible { outline: 3px solid #F4C27A; outline-offset: 2px; }
.follow-btn:active { transform: scale(.95); }
.follow-tiktok { background: #111; box-shadow: -2px -2px 0 #25F4EE inset, 2px 2px 0 #FE2C55 inset, 0 4px 10px -4px rgba(0,0,0,.35); }
.follow-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.follow-facebook { background: #1877F2; }
html[data-theme="dark"] .follow-btn, html[data-theme="dark"] .follow-btn:hover { color: #fff; }
html[data-theme="dark"] .follow-tiktok { background: #000; }
html[data-theme="dark"] .follow-strip { background: var(--card); }
@media (max-width: 360px) { .follow-strip { flex-direction: column; align-items: flex-start; } }

/* --- A domicilio (4 pestañas: Comunidad · Mi QR · A domicilio · Soporte) --- */
.tabbar { grid-template-columns: repeat(3, 1fr); }
.tabbar-item { white-space: nowrap; font-size: .7rem; }
.dlv-head { display: flex; gap: .8rem; align-items: center; margin: .2rem 0 .9rem; }
.dlv-head h1 { margin: 0; font-size: 1.5rem; }
.dlv-head p { margin: .1rem 0 0; }
.dlv-avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--orange), #C85A16); }
.dlv-card { padding: 1rem; }
.dlv-form label { display: block; font-weight: 600; margin: .75rem 0 .3rem; }
.dlv-form label:first-of-type { margin-top: 0; }
.dlv-form select, .dlv-form input[type=text] { width: 100%; min-height: 48px; font-size: 1rem; }
.dlv-money { position: relative; }
.dlv-money span { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--navy); }
.dlv-money input { padding-left: 1.8rem !important; font-size: 1.25rem !important; font-weight: 700; }
.dlv-estimate { min-height: 1.4em; margin: .55rem 0 0; font-weight: 600; color: var(--muted, #6b6b6b); }
.dlv-estimate.is-ok { color: var(--teal); font-size: 1.15rem; }
.dlv-estimate.is-ok::before { content: '★ '; color: var(--orange); }
.dlv-estimate.is-warn { color: #B4441B; }
.dlv-join { margin: .35rem 0 0; }
.dlv-qr-id { display: flex; align-items: center; gap: .4rem; margin: 1rem 0 .7rem; font-size: .88rem; color: var(--navy); background: #F6EFE6; border-radius: 12px; padding: .55rem .7rem; }
.dlv-qr-id code { font-weight: 700; letter-spacing: .03em; }
.dlv-fine { margin: .6rem 0 0; }
.dlv-mine { margin-top: 1.4rem; }
.dlv-mine h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.dlv-empty { padding: .9rem 1rem; border: 1px dashed #D9CFC2; border-radius: 14px; color: #6b6b6b; font-size: .92rem; }
.dlv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.dlv-item { background: #fff; border: 1px solid #EDE4D8; border-radius: 14px; padding: .75rem .9rem; position: relative; }
.dlv-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.dlv-rest { font-size: 1rem; }
.dlv-status { font-size: .75rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.dlv-status-pending { background: #FFF1DC; color: #9A5A00; }
.dlv-status-approved { background: #DDF2EE; color: #1F5E59; }
.dlv-status-rejected { background: #FDE3E1; color: #A3271F; }
.dlv-status-cancelled { background: #ECEAE6; color: #6b6b6b; }
.dlv-meta { display: flex; flex-wrap: wrap; gap: .25rem .8rem; margin-top: .3rem; font-size: .9rem; }
.dlv-gain { color: var(--teal); font-weight: 700; }
.dlv-reason, .dlv-note { margin: .35rem 0 0; }
.dlv-cancel { margin-top: .35rem; }
.dlv-cancel .btn { min-height: 40px; padding-left: 0; }
html[data-theme="dark"] .dlv-item { background: #1F2430; border-color: #343B4A; }
html[data-theme="dark"] .dlv-qr-id { background: #2A2F3A; color: #F3EEE6; }
html[data-theme="dark"] .dlv-money span { color: #F3EEE6; }

/* Monto sin envío */
.dlv-hint { display: flex; gap: .5rem; align-items: flex-start; margin: 0 0 .5rem; padding: .6rem .75rem; border-radius: 12px; background: #FFF4E8; border: 1px solid #F2C08F; color: #7A3A0C; font-size: .95rem; line-height: 1.35; }
.dlv-hint svg { flex: none; margin-top: .05rem; color: #C85A16; }
.dlv-hint strong { font-weight: 700; }
html[data-theme="dark"] .dlv-hint { background: #3A2A1C; border-color: #7A4A20; color: #F6D9B8; }
html[data-theme="dark"] .dlv-hint svg { color: #F4A261; }

/* Consejo: dar seguimiento con la caja */
.dlv-tip { display: flex; gap: .5rem; align-items: flex-start; margin: .2rem 0 .8rem; padding: .65rem .8rem; border-radius: 12px; background: #E8F4F2; border: 1px solid #A9D3CC; color: #1F4D49; font-size: .95rem; line-height: 1.4; }
.dlv-tip .dlv-tip-ico { flex: none; color: var(--teal); margin-top: .05rem; }
.dlv-tip-item { margin: .5rem 0 .4rem; font-size: .9rem; }
.dlv-contact { display: flex; flex-wrap: wrap; gap: .5rem; margin: .1rem 0 .2rem; }
.dlv-contact-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; font-weight: 700; font-size: .92rem; text-decoration: none; }
.dlv-contact-btn svg { fill: currentColor; }
.dlv-call { background: var(--navy); color: #fff; }
.dlv-call:hover, .dlv-call:focus-visible { color: #fff; background: #263a63; }
.dlv-wa { background: #1FA855; color: #fff; }
.dlv-wa:hover, .dlv-wa:focus-visible { color: #fff; background: #178a45; }
html[data-theme="dark"] .dlv-tip { background: #1B3330; border-color: #2F5A54; color: #CDEBE6; }
html[data-theme="dark"] .dlv-tip .dlv-tip-ico { color: #7FD1C5; }

/* --- Campanita de notificaciones (junto a la paleta) --- */
.site-header .header-bell { position: relative; }
@media (max-width: 860px) { html.comensal-app .site-header .header-bell + .header-palette { margin-left: .4rem; } }
.site-header .header-bell + .header-palette { margin-left: .4rem; }
.bell-badge {
  position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: #E5484D; color: #fff; font-size: .7rem; font-weight: 800; line-height: 1; display: grid; place-items: center;
  border: 2px solid var(--bar);
}
.bell-badge[hidden] { display: none; }
.notif-head { display: flex; gap: .8rem; align-items: center; margin: .2rem 0 1rem; }
.notif-head h1 { margin: 0; font-size: 1.5rem; }
.notif-head p { margin: .1rem 0 0; }
.notif-head-ico { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--teal), #1F5E59); }
.notif-empty { display: grid; gap: .5rem; justify-items: start; padding: 1.1rem; border: 1px dashed #D9CFC2; border-radius: 16px; background: #fff; }
.notif-empty span { color: #5f5f5f; font-size: .95rem; line-height: 1.45; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.notif-item { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem .9rem; background: #fff; border: 1px solid #EDE4D8; border-radius: 16px; color: var(--navy); text-decoration: none; }
.notif-item:hover { color: var(--navy); border-color: #E2CDB4; }
.notif-item.is-unread { border-left: 4px solid var(--orange); background: #FFFAF4; }
.notif-av { width: 44px; height: 44px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; font-weight: 800; font-size: .95rem; background: #eee; }
.notif-av img { width: 100%; height: 100%; object-fit: cover; }
.notif-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.notif-top { display: flex; justify-content: space-between; gap: .4rem; align-items: center; }
.notif-rest { font-size: .82rem; font-weight: 700; color: #6b5a45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-kind { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .5rem; border-radius: 999px; flex: none; }
.notif-kind-reward { background: #FFF1DC; color: #9A5A00; }
.notif-kind-program { background: #DDF2EE; color: #1F5E59; }
.notif-kind-announcement { background: #E4E9F5; color: #2A3D6B; }
.notif-kind-near { background: #FFF1DC; color: #9A5A00; }
.notif-kind-ready { background: #DDF2EE; color: #1F5E59; }
.notif-kind-birthday { background: #FDE4EC; color: #8A1F45; }
.notif-kind-expiry { background: #FDE8E1; color: #9A3412; }
.notif-kind-prize { background: #FFF1DC; color: #9A5A00; }
.notif-title { font-size: 1rem; line-height: 1.3; }
.notif-body { font-size: .92rem; color: #4d4d4d; line-height: 1.4; overflow-wrap: anywhere; }
.notif-time { font-size: .78rem; color: #7a7a7a; }
.notif-time b { color: var(--orange); }
html[data-theme="dark"] .notif-item, html[data-theme="dark"] .notif-empty { background: #1F2430; border-color: #343B4A; color: #F3EEE6; }
html[data-theme="dark"] .notif-item.is-unread { background: #2A2620; border-left-color: var(--orange); }
html[data-theme="dark"] .notif-rest { color: #D8C3A5; }
html[data-theme="dark"] .notif-body, html[data-theme="dark"] .notif-empty span { color: #C9C4BC; }
html[data-theme="dark"] .notif-time { color: #A7A39B; }

/* --- Chat de soporte en el encabezado: [soporte] [campanita] [paleta] --- */
.site-header .header-support + .header-bell { margin-left: .4rem; }
.site-header .nav > .brand { min-width: 0; }
.site-header .nav > .brand > span { min-width: 0; }
.site-header .nav > .brand strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  html.comensal-app .site-header .header-support + .header-bell { margin-left: .35rem; }
  html.comensal-app .site-header .header-bell + .header-palette { margin-left: .35rem; }
}
@media (max-width: 400px) {
  html.comensal-app .site-header .nav { gap: .4rem; }
  html.comensal-app .site-header .brand { gap: .4rem; }
  html.comensal-app .site-header .brand strong { font-size: .95rem; }
  html.comensal-app .site-header .header-support + .header-bell,
  html.comensal-app .site-header .header-bell + .header-palette { margin-left: .3rem; }
}
@media (max-width: 380px) {
  html.comensal-app .site-header .container { width: calc(100% - 20px); }
  html.comensal-app .site-header .brand img, html.comensal-app .site-header.rt-brand .brand img,
  html.comensal-app .site-header.rt-brand .brand .rt-ini { width: 34px; height: 34px; }
  html.comensal-app .site-header .brand strong { font-size: .9rem; letter-spacing: 0; }
}

/* «Mantener sesión iniciada» en /entrar */
.keep-check { display: flex !important; align-items: center; gap: .55rem; min-height: 44px; margin: .2rem 0 .6rem; font-weight: 500; }
.keep-check input { width: 22px; height: 22px; flex: none; accent-color: var(--orange); }

/* --- Avisos push: tarjeta «Activar avisos en este teléfono» (/notificaciones) e interruptor (/cuenta) --- */
.push-card { margin-bottom: 1rem; padding: 1rem 1.05rem; border-radius: 18px; border: 1px solid #F1D9BF; background: linear-gradient(160deg, #FFF6EC, #fff 70%); }
.push-card[hidden] { display: none; }
.push-card--cuenta { background: #fff; border-color: var(--line); }
.push-row { display: flex; align-items: center; gap: .75rem; }
.push-ico { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--orange), #C8601F); }
.push-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.push-text h2 { margin: 0; font-size: 1.05rem; line-height: 1.25; }
.push-pill { align-self: flex-start; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .55rem; border-radius: 999px; background: #EEE7DD; color: #6b5a45; }
.push-pill:empty { display: none; }
.push-card[data-state="on"] .push-pill { background: #DDF2EE; color: #1F5E59; }
.push-card[data-state="blocked"] .push-pill { background: #FBE3DE; color: #A3381F; }
.push-msg { margin: .7rem 0 0; font-size: .93rem; line-height: 1.45; color: #4d4d4d; }
.push-msg p { margin: 0 0 .45rem; }
.push-msg ul { margin: .2rem 0 .5rem; padding-left: 1.1rem; display: grid; gap: .35rem; }
.push-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.push-actions:not(:has(> :not([hidden]))) { display: none; }
.push-on { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.push-feedback { margin: .6rem 0 0; font-size: .88rem; font-weight: 600; color: #1F5E59; }
.push-feedback.is-error { color: #A3381F; }
.push-card [data-push-show][hidden] { display: none !important; }
.push-switch { position: relative; flex: none; width: 56px; height: 32px; border-radius: 999px; border: 0; padding: 0; background: #CFC6BA; cursor: pointer; transition: background .15s; }
.push-switch span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.push-switch[aria-checked="true"] { background: var(--teal); }
.push-switch[aria-checked="true"] span { transform: translateX(24px); }
.push-switch:focus-visible { outline: 3px solid #F4C27A; outline-offset: 2px; }
.push-switch[disabled] { opacity: .5; cursor: default; }
.push-switch::before { content: ''; position: absolute; inset: -6px; }
html[data-theme="dark"] .push-card { background: #1F2430; border-color: #343B4A; }
html[data-theme="dark"] .push-msg { color: #C9C4BC; }
html[data-theme="dark"] .push-pill { background: #343B4A; color: #E6DED2; }
html[data-theme="dark"] .push-card[data-state="on"] .push-pill { background: #1E4A45; color: #BFEDE6; }
html[data-theme="dark"] .push-card[data-state="blocked"] .push-pill { background: #4A2620; color: #F6C3B8; }
html[data-theme="dark"] .push-feedback { color: #8FD9CF; }
html[data-theme="dark"] .push-feedback.is-error { color: #F6A493; }
.push-card--cuenta .push-on { display: none !important; }

/* Tarjetas de la comunidad: toda la tarjeta abre el restaurante (enlace estirado sobre el nombre). */
.community-card.cc-tap { position: relative; cursor: pointer; padding-right: 1.8rem; transition: box-shadow .15s, transform .15s; }
.community-card.cc-tap:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.community-card.cc-tap:active { transform: scale(.995); }
.cc-link { color: inherit; text-decoration: none; }
.cc-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.cc-link:focus-visible { outline: none; }
.community-card.cc-tap:has(.cc-link:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.cc-above { position: relative; z-index: 2; }
.cc-chev { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; line-height: 1; color: var(--muted); pointer-events: none; }
.cc-addr-line { display: flex; align-items: center; gap: .25rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cc-addr-line svg { flex: none; color: #C4452D; }
.comensal .community-top .person { display: flex; align-items: center; min-width: 0; flex: 1; }

/* Soporte: tarjeta compacta «Mi cuenta y personalización» (la paleta salió del encabezado). */
.me-mini { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .8rem; margin-bottom: .8rem; flex-wrap: wrap; }
.me-mini-main { display: flex; align-items: center; gap: .6rem; min-width: 0; flex: 1 1 10rem; color: var(--text); text-decoration: none; }
.me-mini-photo { width: 48px; height: 48px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--orange); color: #fff; font-weight: 800; }
.me-mini-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-mini-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me-mini-txt strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-mini-actions { display: flex; gap: .4rem; align-items: center; }
.me-mini-actions form { margin: 0; }
.me-back { display: inline-block; margin: 0 0 .5rem; font-weight: 700; color: var(--orange-2); }
html[data-theme="dark"] .me-mini-main { color: var(--text); }

/* Barras fijas en verde azulado: la portada y las pantallas de acceso usan el mismo tono (antes café). */
html.comensal .hero { background: radial-gradient(circle at 85% 20%, rgba(224,122,47,.35), transparent 45%), linear-gradient(135deg, var(--bar) 0%, #1E5C57 55%, var(--bar-2) 100%); }
html.comensal .auth-page { background: linear-gradient(160deg, var(--bar), #1E5C57 50%, var(--bar-2)); }

/* --- Mi historial, regalos y vencimientos (tarjeta del comensal) --- */
.hist-list { list-style: none; padding: 0; margin: 0; }
.hist-item { display: flex; align-items: flex-start; gap: .65rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.hist-item:last-child { border-bottom: 0; }
.hist-ico { flex: 0 0 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: #EEF5F4; font-size: 1rem; }
.hist-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.hist-title { font-weight: 700; font-size: .93rem; line-height: 1.3; overflow-wrap: anywhere; }
.hist-meta { font-size: .78rem; color: var(--muted); }
.hist-tag { display: inline-block; margin-left: .2rem; padding: 0 .4rem; border-radius: 999px; background: #E4F1EF; color: #1F5E59; font-size: .7rem; font-weight: 800; vertical-align: 1px; }
.hist-delta { flex: 0 0 auto; font-weight: 800; font-size: .86rem; color: var(--muted); white-space: nowrap; }
.hist-delta.is-plus { color: #1F7A4D; }
.hist-more { margin-top: .6rem; width: 100%; }
.hist-note { margin: .6rem 0 0; }
.gift-card { margin: 0 0 1rem; padding: .85rem 1rem; border-radius: 16px; background: linear-gradient(135deg, #FFF4E5, #FDE4EC); border: 1px solid #F6CFA0; }
.gift-row { display: flex; gap: .7rem; align-items: flex-start; }
.gift-row + .gift-row { margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed #EBC08F; }
.gift-ico { font-size: 1.6rem; line-height: 1; }
.gift-main { display: flex; flex-direction: column; gap: .15rem; color: #3B2A1E; }
.gift-due { font-size: .8rem; font-weight: 800; color: #9A3412; }
.rw-due { display: inline-block; margin-left: .3rem; padding: .05rem .45rem; border-radius: 999px; background: #FDE8E1; color: #9A3412; font-size: .74rem; font-weight: 800; }
.bday-row { display: grid; grid-template-columns: 5.2rem 1fr 5.2rem; gap: .45rem; }
.app-card .bday-row select, .bday-row select { padding-left: .7rem; padding-right: 1.7rem; background-position: right .5rem center; }
.bday-row input { text-align: center; }
.bday-row select, .bday-row input { width: 100%; }
html[data-theme="dark"] .hist-ico { background: #26302F; }
html[data-theme="dark"] .hist-tag { background: #1F3A37; color: #9ED8CF; }
html[data-theme="dark"] .hist-delta.is-plus { color: #7FD4A8; }
html[data-theme="dark"] .gift-card { background: linear-gradient(135deg, #3A2A1C, #3A2230); border-color: #6B4A2A; }
html[data-theme="dark"] .gift-main { color: #F5E9DD; }
html[data-theme="dark"] .gift-due, html[data-theme="dark"] .rw-due { color: #FFB59A; }
html[data-theme="dark"] .rw-due { background: #44261C; }

/* --- «Envíos gratis» (A domicilio) --- */
.eg-tile { display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; padding: .85rem 1rem; border-radius: 18px; text-decoration: none; color: #fff; background: linear-gradient(135deg, #246B65, #2F8A82); box-shadow: 0 6px 18px rgba(36, 107, 101, .28); }
.eg-tile:hover, .eg-tile:focus-visible { color: #fff; filter: brightness(1.05); }
.eg-tile-ico { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); color: #fff; }
.eg-tile-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.eg-tile-main strong { font-size: 1.08rem; }
.eg-tile-main span { font-size: .84rem; opacity: .92; }
.eg-tile-go { font-size: 1.6rem; line-height: 1; opacity: .9; }
.eg-hero { text-align: center; padding: 1.3rem 1.1rem; }
.eg-hero h1 { margin: .55rem 0 .35rem; font-size: 1.55rem; }
.eg-hero p { margin: 0; line-height: 1.45; }
.eg-ico { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; color: #fff; background: linear-gradient(140deg, #246B65, #2F8A82); box-shadow: 0 6px 16px rgba(36, 107, 101, .3); }
.eg-steps h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.eg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.eg-list li { display: flex; gap: .7rem; align-items: flex-start; line-height: 1.4; }
.eg-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; color: #1F5E59; background: #DDF2EE; }
.eg-share { margin: 1rem 0 .4rem; }
.eg-wa { display: flex; align-items: center; justify-content: center; gap: .55rem; background: #25D366; border-color: #25D366; color: #0B2E1A; font-weight: 800; text-decoration: none; box-shadow: 0 6px 16px rgba(37, 211, 102, .35); }
.eg-wa:hover, .eg-wa:focus-visible { background: #1EBE5A; border-color: #1EBE5A; color: #0B2E1A; }
.eg-other { margin-top: .6rem; }
.eg-icons { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.eg-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; color: #fff; text-decoration: none; padding: 0; }
.eg-fb { background: #1877F2; } .eg-ms { background: linear-gradient(135deg, #0084FF, #A033FF); } .eg-x { background: #111; } .eg-tg { background: #229ED9; }
.eg-cp { background: #E4F1EF; color: #1F5E59; }
html[data-theme="dark"] .eg-cp { background: #1F3A37; color: #9ED8CF; }
html[data-theme="dark"] .eg-x { background: #000; box-shadow: inset 0 0 0 1px #555; }
.eg-copied { min-height: 1.2em; margin: .4rem 0 0; text-align: center; }
.eg-note { text-align: center; margin: .4rem 0 1rem; }
html[data-theme="dark"] .eg-num { background: #1F3A37; color: #9ED8CF; }
html[data-theme="dark"] .eg-tile { box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.eg-hero + .eg-steps { margin-top: .8rem; }
html[data-theme="dark"] .eg-share a.eg-wa, html[data-theme="dark"] .eg-share a.eg-wa:hover { color: #0B2E1A; }
html[data-theme="dark"] .eg-share a.eg-ic { color: #fff; }
/* --- Envíos gratis: invitados, boletos, premio, historial y bases --- */
.eg-stats, .eg-hist, .eg-bases, .eg-win { margin-top: .8rem; }
.eg-stats h2, .eg-hist h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.eg-nums { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.eg-nums div { padding: .6rem .5rem; border-radius: 14px; background: #EEF5F4; text-align: center; display: flex; flex-direction: column; gap: .1rem; }
.eg-nums b { font-size: 1.6rem; line-height: 1.1; color: #1F5E59; }
.eg-nums span { font-size: .8rem; color: var(--muted); }
.eg-tickets { margin: .7rem 0 0; font-weight: 600; }
.eg-tickets strong { font-size: 1.15rem; color: #1F5E59; }
.eg-link { margin: .35rem 0 0; overflow-wrap: anywhere; }
.eg-win { display: flex; gap: .7rem; align-items: center; padding: .85rem 1rem; border-radius: 16px; background: linear-gradient(135deg, #FFF4E5, #FDE4EC); border: 1px solid #F6CFA0; color: #3B2A1E; }
.eg-win-ico { font-size: 1.8rem; }
.eg-win div { display: flex; flex-direction: column; gap: .15rem; }
.eg-hist-list { list-style: none; margin: 0; padding: 0; }
.eg-hist-list li { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.eg-hist-list li:last-child { border-bottom: 0; }
.eg-hist-m { font-weight: 700; }
.eg-hist-r { color: var(--muted); font-size: .82rem; }
.eg-bases summary { cursor: pointer; font-weight: 800; }
.eg-bases ul { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .88rem; line-height: 1.45; display: grid; gap: .35rem; }
.ref-invited { margin: 0 0 .8rem; padding: .7rem .9rem; border-radius: 14px; background: #E4F1EF; color: #1F5E59; }
html[data-theme="dark"] .eg-nums div { background: #26302F; }
html[data-theme="dark"] .eg-nums b, html[data-theme="dark"] .eg-tickets strong { color: #9ED8CF; }
html[data-theme="dark"] .eg-win { background: linear-gradient(135deg, #3A2A1C, #3A2230); border-color: #6B4A2A; color: #F5E9DD; }
html[data-theme="dark"] .ref-invited { background: #1F3A37; color: #9ED8CF; }

/* --- Tu próxima recompensa (pantalla principal) --- */
.nextup { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; padding: .8rem .95rem; border-radius: 18px; text-decoration: none;
  background: var(--white); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); }
.nextup:hover, .nextup:focus-visible { color: var(--text); border-color: #246B65; }
.nextup-ico { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 1.3rem; background: #E3F1EF; color: #246B65; }
.nextup-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.nextup-kicker { font-size: .75rem; font-weight: 700; color: #246B65; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nextup-label { font-size: .95rem; line-height: 1.3; }
.nextup-bar { display: block; height: 8px; border-radius: 999px; background: #E3F1EF; overflow: hidden; margin-top: .15rem; }
.nextup-bar > span { display: block; height: 100%; min-width: 6px; border-radius: inherit; background: linear-gradient(90deg, #246B65, #2F8A82); }
.nextup-go { flex: none; font-size: 1.5rem; line-height: 1; color: var(--muted); }
.nextup.is-ready { background: linear-gradient(135deg, #246B65, #2F8A82); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(36,107,101,.3); }
.nextup.is-ready .nextup-kicker, .nextup.is-ready .nextup-go { color: #DFF3F0; }
.nextup.is-ready .nextup-ico { background: rgba(255,255,255,.2); color: #FFD27A; }
html[data-theme="dark"] .nextup:not(.is-ready) { background: var(--card); }
html[data-theme="dark"] .nextup-ico, html[data-theme="dark"] .nextup-bar { background: #18322F; }
html[data-theme="dark"] .nextup-ico, html[data-theme="dark"] .nextup-kicker { color: #6FC3B9; }
html[data-theme="dark"] .nextup.is-ready .nextup-kicker { color: #DFF3F0; }
html[data-theme="dark"] .nextup:hover { color: var(--text); }
html[data-theme="dark"] .nextup.is-ready, html[data-theme="dark"] .nextup.is-ready:hover { color: #fff; }

/* --- Cerca de mí + Abierto ahora --- */
.near-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .7rem; margin: -.3rem 0 .8rem; }
.near-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .85rem; border-radius: 999px; border: 1.5px solid #246B65; background: transparent;
  color: #246B65; font: 700 .86rem Inter, system-ui, sans-serif; cursor: pointer; min-height: 38px; }
.near-btn.is-on { background: #246B65; color: #fff; }
.near-btn:disabled { opacity: .6; cursor: progress; }
.near-msg { flex: 1 1 12rem; }
.cc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .45rem; margin-top: .25rem; }
.cc-open { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 800; line-height: 1.5; }
.cc-open::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cc-open.is-open { background: #E3F1EF; color: #1F6A52; }
.cc-open.is-closed { background: #F1ECE6; color: #7A6E62; }
.cc-open-sub { font-size: .76rem; color: var(--muted); }
.cc-dist { display: inline-flex; align-items: center; padding: .08rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 800; background: #FBE9DA; color: #A4521A; }
html[data-theme="dark"] .near-btn { border-color: #6FC3B9; color: #6FC3B9; }
html[data-theme="dark"] .near-btn.is-on { background: #2F8A82; border-color: #2F8A82; color: #fff; }
html[data-theme="dark"] .cc-open.is-open { background: #18322F; color: #7FD3B4; }
html[data-theme="dark"] .cc-open.is-closed { background: #2A231D; color: #B5A999; }
html[data-theme="dark"] .cc-dist { background: #3A2A1D; color: #F0A867; }

/* Horario en la página del restaurante */
.rt-hours .loc-pin { background: #E3F1EF; color: #246B65; }
.rt-hours-now { margin: .15rem 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.rt-hours-list { margin: .6rem 0 0; display: grid; gap: .25rem; }
.rt-hours-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.rt-hours-list > div:last-child { border-bottom: 0; }
.rt-hours-list dt { font-weight: 600; } .rt-hours-list dd { margin: 0; color: var(--muted); text-align: right; }
html[data-theme="dark"] .rt-hours .loc-pin { background: #18322F; color: #6FC3B9; }

/* --- Recorrido de bienvenida --- */
html.tour-lock, html.tour-lock body { overflow: hidden; }
.tour { position: fixed; inset: 0; z-index: 2147482000; display: grid; place-items: end center; padding: 0; background: rgba(15, 30, 28, .55);
  animation: tour-in .25s ease-out both; }
.tour[hidden] { display: none; }
.tour.is-out { animation: tour-out .22s ease-in forwards; }
.tour-box { width: 100%; max-width: 30rem; background: var(--white); color: var(--text); border-radius: 26px 26px 0 0; padding: 1rem 1.2rem calc(1.1rem + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: .8rem; animation: tour-up .3s ease-out both; }
@media (min-width: 640px) { .tour { place-items: center; padding: 1rem; } .tour-box { border-radius: 26px; } }
.tour-top { display: flex; align-items: center; gap: .55rem; }
.tour-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #246B65; }
.tour-brand { font: 800 1rem Poppins, sans-serif; color: #246B65; flex: 1; }
.tour-skip { border: 0; background: transparent; color: var(--muted); font: 700 .9rem Inter, system-ui, sans-serif; padding: .5rem .6rem; border-radius: 999px; cursor: pointer; }
.tour-slides { min-height: 15.5rem; display: grid; }
.tour-slide { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: .4rem .3rem; animation: tour-fade .3s ease-out both; }
.tour-slide h2 { margin: .3rem 0 0; font-size: 1.35rem; }
.tour-slide p { margin: 0; color: var(--muted); line-height: 1.5; max-width: 22rem; }
.tour-ico { width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #246B65, #2F8A82); box-shadow: 0 10px 24px rgba(36,107,101,.3); margin-top: .4rem; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tour-dots { display: flex; gap: .4rem; }
.tour-dots i { width: 8px; height: 8px; border-radius: 999px; background: #CFE3E0; transition: width .2s ease, background .2s ease; }
.tour-dots i.is-on { width: 22px; background: #246B65; }
.tour-next { min-width: 8.5rem; background: #246B65; border-color: #246B65; }
.tour-next:hover { background: #1E5A55; border-color: #1E5A55; }
.tour-open { display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left; margin: 0 0 1rem; padding: .8rem .95rem; border: 1px solid var(--line); font: inherit; color: var(--text); cursor: pointer; }
.tour-open-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #E3F1EF; color: #246B65; }
.tour-open-txt { flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.tour-open-go { font-size: 1.5rem; color: var(--muted); }
html[data-theme="dark"] .tour-box { background: var(--card); }
html[data-theme="dark"] .tour-brand { color: #6FC3B9; }
html[data-theme="dark"] .tour-dots i { background: #2E4A47; } html[data-theme="dark"] .tour-dots i.is-on { background: #6FC3B9; }
html[data-theme="dark"] .tour-open-ico { background: #18322F; color: #6FC3B9; }
@keyframes tour-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tour-out { to { opacity: 0; } }
@keyframes tour-up { from { transform: translateY(24px); } to { transform: none; } }
@keyframes tour-fade { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tour, .tour-box, .tour-slide, .tour.is-out { animation: none; } }

/* --- Historial de visitas --- */
.hist-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.hist-head h2 { margin-bottom: .5rem; }
.hist-all { font-weight: 700; color: #246B65; white-space: nowrap; flex: none; text-decoration: none; }
.hist-all:hover { text-decoration: underline; }
.app-section-head:has(.hist-all) h2 { margin-right: auto; }
.hist-jump { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; padding: .7rem .95rem; border-radius: 14px; border: 1px solid var(--line);
  background: var(--white); color: #246B65; font-weight: 700; text-decoration: none; min-height: 44px; }
.hist-jump > span:last-child { margin-left: auto; font-size: 1.3rem; line-height: 1; color: var(--muted); }
.hist-jump:hover { border-color: #246B65; color: #246B65; }
.hist-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0 0 .5rem; }
.hist-sum > div { display: flex; flex-direction: column; align-items: center; padding: .5rem .3rem; border-radius: 12px; background: #E3F1EF; }
.hist-sum strong { font-size: 1.15rem; color: #1F5E59; line-height: 1.2; }
.hist-sum span { font-size: .74rem; color: #3D6E69; }
.hist-last { margin: 0 0 .3rem; }
.hist-rest { font-size: .74rem; font-weight: 800; color: #246B65; text-transform: uppercase; letter-spacing: .03em; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-k-canje .hist-ico, .hist-k-regalo .hist-ico { background: #FFF3DA; }
.hist-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: 1rem .5rem; }
.hist-empty-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: #E3F1EF; }
.hist-h1 { font-size: 1.45rem; margin: .2rem 0 .25rem; }
.hist-sub { margin: 0 0 .8rem; font-size: .92rem; }
.hist-chips { display: flex; gap: .45rem; overflow-x: auto; padding: 0 0 .7rem; margin: 0 0 .2rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hist-chips::-webkit-scrollbar { display: none; }
.hist-chip { flex: none; padding: .38rem .85rem; border-radius: 999px; border: 1.5px solid #246B65; color: #246B65; font-weight: 700; font-size: .85rem; text-decoration: none; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; }
.hist-chip.is-on { background: #246B65; color: #fff; }
.myqr-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
html[data-theme="dark"] .hist-all, html[data-theme="dark"] .hist-rest, html[data-theme="dark"] .hist-jump { color: #6FC3B9; }
html[data-theme="dark"] .hist-jump { background: var(--card); }
html[data-theme="dark"] .hist-sum > div, html[data-theme="dark"] .hist-empty-ico { background: #18322F; }
html[data-theme="dark"] .hist-sum strong { color: #9ED8CF; }
html[data-theme="dark"] .hist-sum span { color: #8FB8B3; }
html[data-theme="dark"] .hist-k-canje .hist-ico, html[data-theme="dark"] .hist-k-regalo .hist-ico { background: #3A3220; }
html[data-theme="dark"] .hist-chip { border-color: #6FC3B9; color: #6FC3B9; }
html[data-theme="dark"] .hist-chip.is-on { background: #2F8A82; border-color: #2F8A82; color: #fff; }
.hist-delta.is-voided { text-decoration: line-through; opacity: .55; }
.tour-slide p.tour-note { margin-top: .7rem; padding: .5rem .8rem; border-radius: 12px; background: #E3F1EF; color: #1F5E59; font-size: .9rem; }
html[data-theme="dark"] .tour-slide p.tour-note { background: #18322F; color: #9ED8CF; }

/* --- Invitación a activar avisos (hoja inferior sobre la barra) --- */
.push-ask { position: fixed; left: .6rem; right: .6rem; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 90; max-width: 30rem; margin: 0 auto;
  background: var(--white); color: var(--text); border: 1px solid var(--line); border-radius: 22px; padding: 1rem 1rem .8rem; box-shadow: 0 14px 40px rgba(15, 30, 28, .28);
  transform: translateY(16px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
.push-ask.is-in { transform: none; opacity: 1; }
.push-ask[hidden] { display: none; }
.push-ask-box { display: flex; gap: .8rem; align-items: flex-start; }
.push-ask-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #246B65, #2F8A82); box-shadow: 0 6px 16px rgba(36,107,101,.3); }
.push-ask-txt h2 { font-size: 1.05rem; margin: 0 0 .25rem; line-height: 1.25; }
.push-ask-txt p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.push-ask-txt a { color: #246B65; font-weight: 700; }
.push-ask-actions { display: flex; flex-direction: column; gap: .35rem; margin-top: .8rem; }
.push-ask-actions .btn { min-height: 44px; }
@media (min-width: 900px) { .push-ask { bottom: 1.2rem; left: auto; right: 1.2rem; width: 26rem; } }
html[data-theme="dark"] .push-ask { background: var(--card); border-color: #2C3634; box-shadow: 0 14px 40px rgba(0,0,0,.5); }
html[data-theme="dark"] .push-ask-txt a { color: #6FC3B9; }
a.tour-open { text-decoration: none; }

/* A domicilio: selector de restaurante con buscador (botones de opción; sin JS se ve la lista completa) */
.dlv-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.dlv-pick legend { font-weight: 600; margin: 0 0 .4rem; padding: 0; }
.dlv-search { position: relative; margin-bottom: .55rem; }
.dlv-search[hidden] { display: none; }
.dlv-search svg { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #8A7F73; pointer-events: none; }
.dlv-form .dlv-search input { width: 100%; min-height: 50px; font-size: 1rem; padding-left: 2.6rem; border-radius: 14px; }
.dlv-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; margin-bottom: .55rem; }
.dlv-group[hidden] { display: none; }
.dlv-group-h { margin: .3rem 0 .05rem; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8A7F73; }
.dlv-pick.is-picked .dlv-group-h, .dlv-pick.is-picked .dlv-search { display: none; }
.dlv-form label.dlv-opt { display: flex; align-items: center; gap: .75rem; margin: 0; min-height: 64px; padding: .6rem .8rem; border: 1.5px solid #E6DCCF; border-radius: 16px; background: #fff; cursor: pointer; font-weight: 400; position: relative; -webkit-tap-highlight-color: transparent; transition: border-color .15s, background .15s, box-shadow .15s; }
.dlv-form label.dlv-opt[hidden] { display: none; }
.dlv-opt input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.dlv-opt-logo { width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; background: #F3ECE3; }
.dlv-opt-av { display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.dlv-opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dlv-opt-txt strong { font-size: 1.02rem; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlv-opt-txt span { font-size: .84rem; color: #7A6F63; }
.dlv-opt-check { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid #CFC3B4; display: grid; place-items: center; }
.dlv-opt:active { background: #FBF6EF; }
.dlv-opt:has(input:focus-visible) { outline: 3px solid rgba(224, 122, 47, .45); outline-offset: 2px; }
.dlv-opt:has(input:checked) { border-color: var(--orange); background: #FFF6EC; box-shadow: 0 0 0 1px var(--orange) inset; }
.dlv-opt:has(input:checked) .dlv-opt-check { border-color: var(--orange); background: var(--orange); }
.dlv-opt:has(input:checked) .dlv-opt-check::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.dlv-none { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border: 1px dashed #D9CFC2; border-radius: 14px; color: #6b6b6b; font-size: .9rem; margin-bottom: .5rem; }
.dlv-none[hidden] { display: none; }
.dlv-none strong { color: var(--navy); font-size: .98rem; }
.dlv-change { margin: .1rem 0 .2rem; }
.dlv-change[hidden] { display: none; }
html[data-theme="dark"] .dlv-form label.dlv-opt { background: #1F2430; border-color: #343B4A; }
html[data-theme="dark"] .dlv-opt-txt strong, html[data-theme="dark"] .dlv-none strong { color: #F3EEE6; }
html[data-theme="dark"] .dlv-opt-txt span, html[data-theme="dark"] .dlv-group-h { color: #A9A196; }
html[data-theme="dark"] .dlv-opt-check { border-color: #5A6273; }
html[data-theme="dark"] .dlv-opt:has(input:checked) { background: #3A2A1C; border-color: #F0A867; box-shadow: 0 0 0 1px #F0A867 inset; }
html[data-theme="dark"] .dlv-opt:has(input:checked) .dlv-opt-check { background: #F0A867; border-color: #F0A867; }
html[data-theme="dark"] .dlv-opt:active { background: #262C39; }
html[data-theme="dark"] .dlv-none { border-color: #434A5A; color: #B9B1A6; }
html[data-theme="dark"] .dlv-search svg { color: #A9A196; }

/* --- Modo invitado: hoja «Crea tu cuenta gratis…», aviso en Comunidad y perfil del restaurante --- */
.gsheet { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-end; justify-content: center; }
.gsheet[hidden] { display: none; }
.gsheet-bg { position: absolute; inset: 0; background: rgba(15, 20, 30, .5); opacity: 0; transition: opacity .2s; }
.gsheet-box { position: relative; width: 100%; max-width: 30rem; background: var(--card, #fff); color: var(--text); border-radius: 22px 22px 0 0; padding: .7rem 1.2rem calc(1.1rem + env(safe-area-inset-bottom, 0px)); text-align: center; box-shadow: 0 -10px 40px rgba(0,0,0,.25); transform: translateY(100%); transition: transform .22s ease-out; outline: none; max-height: 92vh; overflow-y: auto; }
.gsheet.is-in .gsheet-bg { opacity: 1; }
.gsheet.is-in .gsheet-box { transform: none; }
.gsheet-grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line, #ddd); margin: 0 auto .8rem; }
.gsheet-logo { width: 72px; height: 72px; border-radius: 50%; display: block; margin: 0 auto .5rem; }
.gsheet h2 { font-size: 1.25rem; margin: 0 0 .35rem; line-height: 1.25; }
.gsheet p { margin: 0 0 .7rem; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.gsheet-perks { list-style: none; padding: 0; margin: 0 auto .9rem; text-align: left; display: inline-flex; flex-direction: column; gap: .3rem; font-size: .92rem; }
.gsheet-perks li::before { content: '✓'; color: #16A34A; font-weight: 800; margin-right: .45rem; }
.gsheet .btn { margin-top: .45rem; min-height: 48px; }
.gsheet .btn-ghost { min-height: 44px; }
html.gsheet-open { overflow: hidden; }
@media (min-width: 900px) { .gsheet { align-items: center; } .gsheet-box { border-radius: 22px; transform: translateY(24px); opacity: 0; transition: transform .2s, opacity .2s; } .gsheet.is-in .gsheet-box { opacity: 1; } .gsheet-grab { display: none; } }
@media (prefers-reduced-motion: reduce) { .gsheet-box, .gsheet-bg { transition: none; } }
.guest-cta { margin: 0 0 1rem; border-left: 5px solid #16A34A; }
.guest-cta h2 { font-size: 1.05rem; margin: 0 0 .25rem; }
.guest-cta p { margin: 0 0 .7rem; }
.guest-cta-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.guest-cta-actions .btn { min-height: 44px; padding-left: .6rem; padding-right: .6rem; }
.rt-join { margin-bottom: 1rem; }
.rt-join p { margin-top: 0; }
.rt-join-alt { margin: .7rem 0 0; }
.rt-rw { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.rt-rw:last-child { border-bottom: 0; }
.guest-why { background: #ECFDF3; border: 1px solid #BBF7D0; color: #14532D; border-radius: 12px; padding: .6rem .8rem; font-size: .92rem; margin: 0 0 .8rem; }
.auth-signup { margin-top: 1rem; }
.guest-explore { margin-top: .5rem; color: var(--teal-2, #1F5E59); font-weight: 700; }
html[data-theme="dark"] .guest-why { background: #12261B; border-color: #1F4D33; color: #BBF7D0; }
html[data-theme="dark"] .guest-explore { color: #6FC3B9; }
.need-account { text-align: center; padding: 1.4rem 1.2rem; margin-top: .4rem; }
.need-account h1 { font-size: 1.35rem; margin: .6rem 0 .4rem; line-height: 1.25; }
.need-account p { margin: 0 0 .8rem; }
.need-account .btn { margin-top: .5rem; min-height: 48px; }
.need-ico { width: 72px; height: 72px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; background: linear-gradient(135deg, #E07A2F, #D35400); }

/* Entrar / registro sin contraseña: botón de Google (blanco, como pide Google) y separador «o con tu correo» */
.btn-google { display: flex; align-items: center; justify-content: center; gap: .6rem; background: #fff; color: #1f1f1f; border: 1px solid #747775; font-weight: 600; margin: .4rem 0 0; }
.btn-google:hover { background: #f6f8fb; }
html[data-theme="dark"] .btn-google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
.auth-or { display: flex; align-items: center; gap: .7rem; margin: 1rem 0 .4rem; color: var(--muted, #6B6B6B); font-size: .85rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .3; }
.auth-alt { margin-top: .9rem; }
.auth-alt a { font-weight: 600; }

/* Google primero (registro / entrar): un solo botón grande; el correo queda detrás de «Usar mi correo».
   Tema oscuro oficial de Google (#131314 / #E3E3E3 / borde #8E918F) para que destaque como acción principal. */
.btn-google-main { min-height: 56px; font-size: 1.08rem; font-weight: 700; gap: .75rem; border-radius: 999px; margin-top: .8rem;
  background: #131314; color: #E3E3E3; border: 1px solid #8E918F; box-shadow: 0 6px 18px rgba(19,19,20,.22); }
.btn-google-main:hover, .btn-google-main:focus-visible { background: #2a2a2c; color: #fff; }
.btn-google-main .g-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; }
html[data-theme="dark"] .btn-google-main { background: #fff; color: #1f1f1f; border-color: #747775; }
.g-help { margin: .5rem 0 .2rem; }
.legal-consent.center { text-align: center; margin: .2rem 0 .4rem; }
.email-reveal { margin: .6rem 0 .2rem; }
.email-reveal > summary { list-style: none; cursor: pointer; text-align: center; font-weight: 700; color: var(--teal-2, #1F5E59); padding: .6rem 0; font-size: .98rem; }
.email-reveal > summary::-webkit-details-marker { display: none; }
.email-reveal > summary::after { content: " ▾"; font-size: .85em; }
.email-reveal[open] > summary::after { content: " ▴"; }
.email-reveal[open] > summary { margin-bottom: .2rem; }
html[data-theme="dark"] .email-reveal > summary { color: #6FC3B9; }
.auth-new { margin-top: 1rem; }
.auth-new a { font-weight: 700; }

/* ===== /registro y /entrar (sin restaurante): pantalla completa «hero» =====
   Arriba, sobre el verde azulado: logotipo grande, título y 3 beneficios. Abajo, una hoja blanca al alcance del
   pulgar con «Continuar con Google» a todo lo ancho y los enlaces pequeños. Llena 100dvh sin huecos; si se abre
   «Usar mi correo», la hoja crece y la página se desplaza. Tamaños con clamp() según la altura (390×844 … 360×640). */
html.comensal body.auth-hero { display: block; padding: 0; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(120% 70% at 50% 0%, #2F8C84 0%, var(--bar, #246B65) 45%, #17504B 100%); }
.hero-wrap { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; width: 100%; max-width: 480px; margin: 0 auto; }
.hero-top { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff;
  padding: max(1rem, env(safe-area-inset-top)) 1.4rem clamp(.8rem, 2.5vh, 1.6rem); gap: clamp(.35rem, 1.2vh, .7rem); }
.hero-logo { width: clamp(92px, 21vh, 180px); height: auto; aspect-ratio: 1; border-radius: 50%; background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.28), 0 0 0 5px rgba(255,255,255,.14); }
.hero-title { color: #fff; font-size: clamp(1.3rem, 2.8vh + .3rem, 1.85rem); line-height: 1.15; margin: clamp(.2rem, 1vh, .5rem) 0 0; letter-spacing: -.01em;
  text-wrap: balance; text-shadow: 0 2px 10px rgba(0,0,0,.18); }
.hero-sub { margin: 0; color: rgba(255,255,255,.86); font-size: clamp(.92rem, 1.6vh + .3rem, 1.05rem); }
.hero-benefits { list-style: none; padding: 0; margin: clamp(.3rem, 1.6vh, 1rem) 0 0; width: 100%; display: grid; gap: clamp(.35rem, 1vh, .55rem); text-align: left; }
.hero-benefits li { display: flex; align-items: center; gap: .8rem; padding: clamp(.45rem, 1.1vh, .7rem) .85rem; border-radius: 16px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.hero-benefits strong { display: block; color: #fff; font-size: .98rem; line-height: 1.2; }
.hero-benefits small { display: block; color: rgba(255,255,255,.78); font-size: .82rem; line-height: 1.25; }
.hb-ico { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #FFF3E6; color: #D9661F; }
.hero-sheet { flex: 0 0 auto; background: #fff; color: #1f2a2a; border-radius: 26px 26px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.18);
  padding: 1.15rem 1.25rem calc(.9rem + env(safe-area-inset-bottom)); }
.hero-sheet .btn-google-main { margin-top: 0; }
.hero-sheet .g-help { margin: .45rem 0 0; font-size: .84rem; }
.hero-sheet .email-reveal { margin: .35rem 0 0; }
.hero-sheet .email-reveal > summary { padding: .55rem 0; }
.hero-sheet .legal-consent.center { margin: .25rem 0 0; font-size: .8rem; color: #6B6B6B; }
.hero-sheet .guest-why { margin: 0 0 .7rem; }
.hero-sheet .flash, .hero-sheet .errors, .hero-sheet .ref-invited { margin-bottom: .7rem; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem 1.1rem; margin: .55rem 0 0; text-align: center; }
.hero-links a { font-weight: 700; }
.hero-links .guest-explore, .hero-links .guest-explore-link { margin: 0; color: var(--teal-2, #1F5E59); }
/* Pantallas bajas (p. ej. 360×640): sin subtítulos en los beneficios y todo más compacto. */
@media (max-height: 700px) {
  .hero-top { gap: .3rem; padding-bottom: .7rem; }
  .hero-logo { width: 15vh; }
  .hero-title { font-size: 1.28rem; }
  .hero-sub { font-size: .9rem; }
  .hero-benefits { margin-top: .25rem; gap: .3rem; }
  .hero-benefits small { display: none; }
  .hero-benefits li { padding: .3rem .7rem; border-radius: 12px; }
  .hero-benefits strong { font-size: .92rem; }
  .hero-sheet .btn-google-main { min-height: 50px; }
  .hero-sheet .email-reveal > summary { padding: .4rem 0; }
  .hero-sheet .legal-consent.center { font-size: .76rem; }
  .hero-links { margin-top: .35rem; }
  .hb-ico { width: 32px; height: 32px; border-radius: 10px; }
  .hb-ico svg { width: 18px; height: 18px; }
  .hero-sheet { padding-top: .8rem; padding-bottom: calc(.6rem + env(safe-area-inset-bottom)); }
  .hero-sheet .g-help { display: none; }
}
@media (max-height: 600px) { .hero-benefits { display: none; } }
/* Pantalla ancha: la hoja flota con esquinas redondas. */
@media (min-width: 560px) and (min-height: 760px) {
  .hero-wrap { justify-content: center; padding: 1.5rem 0; }
  .hero-top { flex: 0 0 auto; }
  .hero-sheet { border-radius: 26px; }
}
/* Modo oscuro: preferencia del comensal (data-theme) o del teléfono (los invitados no tienen preferencia guardada). */
html.comensal[data-theme="dark"] body.auth-hero { background: radial-gradient(120% 70% at 50% 0%, #1E5A55 0%, #123F3B 45%, #0B2624 100%); }
html[data-theme="dark"] .hero-sheet { background: #161C1C; color: #E6ECEB; box-shadow: 0 -10px 30px rgba(0,0,0,.45); }
html[data-theme="dark"] .hero-sheet .legal-consent.center, html[data-theme="dark"] .hero-sheet .g-help { color: #A9B5B3; }
html[data-theme="dark"] .hero-links .guest-explore, html[data-theme="dark"] .hero-links .guest-explore-link { color: #6FC3B9; }
html[data-theme="dark"] .hb-ico { background: rgba(255,179,120,.16); color: #FFB378; }
/* (El modo «Automático» lo resuelve el script del <head>, que pone data-theme="dark" si el teléfono está en oscuro.) */
html.comensal[data-theme="dark"] body.auth-hero { background: radial-gradient(120% 70% at 50% 0%, #1E5A55 0%, #123F3B 45%, #0B2624 100%); }
html[data-theme="dark"] .hero-sheet { background: #161C1C; color: #E6ECEB; box-shadow: 0 -10px 30px rgba(0,0,0,.45); }
html[data-theme="dark"] .hero-sheet label, html[data-theme="dark"] .hero-sheet .check { color: #E6ECEB; }
html[data-theme="dark"] .hero-sheet .help, html[data-theme="dark"] .hero-sheet .legal-consent.center, html[data-theme="dark"] .hero-sheet .g-help, html[data-theme="dark"] .hero-sheet .guest-why { color: #A9B5B3; }
html[data-theme="dark"] .hero-sheet input:not([type=checkbox]) { background: #0F1414; color: #E6ECEB; border-color: #34403F; }
html[data-theme="dark"] .hero-sheet a { color: #FFB378; }
html[data-theme="dark"] .hero-links .guest-explore, html[data-theme="dark"] .hero-links .guest-explore-link, html[data-theme="dark"] .hero-sheet .email-reveal > summary { color: #6FC3B9; }
html[data-theme="dark"] .hero-sheet .btn-outline { color: #FFB378; border-color: #FFB378; background: transparent; }
html[data-theme="dark"] .hero-sheet .btn-google-main { background: #fff; color: #1f1f1f; border-color: #747775; }
html[data-theme="dark"] .hb-ico { background: rgba(255,179,120,.16); color: #FFB378; }

/* Personalización → Apariencia: Automático · Claro · Oscuro */
.theme-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin: .4rem 0 .2rem; }
.theme-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; cursor: pointer;
  padding: .7rem .4rem .65rem; border: 2px solid #E3DDD3; border-radius: 16px; background: #fff; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt strong { font-size: .92rem; line-height: 1.1; }
.theme-opt small { font-size: .74rem; color: var(--muted, #6B6B6B); line-height: 1.15; }
.theme-opt:has(input:checked) { border-color: var(--teal, #2A7A73); box-shadow: 0 0 0 3px rgba(42,122,115,.18); }
.theme-opt:has(input:focus-visible) { outline: 3px solid #E07A2F; outline-offset: 2px; }
.theme-swatch { width: 52px; height: 36px; border-radius: 10px; border: 1px solid rgba(0,0,0,.14); }
.theme-swatch--light { background: linear-gradient(#246B65 0 30%, #FBF6EE 30%); }
.theme-swatch--dark { background: linear-gradient(#123F3B 0 30%, #14181F 30%); }
.theme-swatch--auto { background: linear-gradient(135deg, #FBF6EE 0 50%, #14181F 50%); }
html[data-theme="dark"] .theme-opt { background: #1B2029; border-color: #343B47; }
html[data-theme="dark"] .theme-opt:has(input:checked) { border-color: #6FC3B9; box-shadow: 0 0 0 3px rgba(111,195,185,.2); }
html[data-theme="dark"] .theme-opt small { color: #A9B5B3; }
