/* Restaurank: oscuro y cálido (naranja tomate + estrellas ámbar), títulos
   en serif tipo carta de restó. Celu primero: barra de navegación abajo. */
:root {
  --bg: #faf7f2; --panel: #ffffff; --panel2: #f3eee6; --ink: #1d1b19; --muted: #6f6a63; --line: #e4ddd2;
  --accent: #e8552b; --accent-ink: #ffffff; --estrella: #f0a020; --vacia: #ddd5c8; --ok: #2f8f5b; --bad: #c0392b;
  --sombra: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121214; --panel: #1b1c20; --panel2: #23252b; --ink: #f2efe9; --muted: #9b9aa2; --line: #2d2f36;
  --accent: #ff6b3d; --accent-ink: #1a0d07; --estrella: #ffb347; --vacia: #3a3c44; --ok: #4cc38a; --bad: #ff7b6b;
  --sombra: none; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #121214; --panel: #1b1c20; --panel2: #23252b; --ink: #f2efe9; --muted: #9b9aa2; --line: #2d2f36;
  --accent: #ff6b3d; --accent-ink: #1a0d07; --estrella: #ffb347; --vacia: #3a3c44; --ok: #4cc38a; --bad: #ff7b6b;
  --sombra: none; color-scheme: dark }

* { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sans) }
a { color: inherit }
button, input, select, textarea { font: inherit; color: inherit }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
/* El área principal recibe el foco al cambiar de pantalla (lectores de pantalla): sin contorno. */
main:focus { outline: none }

/* Estructura */
.arriba { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line) }
.arriba-in { max-width: 680px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px }
.marca { font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: -.01em; text-decoration: none; display: flex; align-items: center; gap: 8px; margin-right: auto }
.marca img { width: 28px; height: 28px; border-radius: 8px }
.marca b { color: var(--accent) }
main { max-width: 680px; margin: 0 auto; padding: 16px 16px 110px; display: grid; gap: 16px }
.abajo { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom) }
.abajo-in { max-width: 680px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center }
.abajo a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 10px; font-size: 11px; color: var(--muted); text-decoration: none }
.abajo a svg { width: 24px; height: 24px }
.abajo a[aria-current="page"] { color: var(--ink) }
.abajo a.mas { color: var(--accent-ink) }
.abajo a.mas span.circulo { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; margin-top: -18px; box-shadow: 0 4px 14px rgba(232,85,43,.35) }
.abajo a.mas svg { width: 26px; height: 26px }
.abajo a.mas .etq { color: var(--muted) }

/* Tipografía */
h1, h2, h3 { font-family: var(--serif); margin: 0; line-height: 1.15; letter-spacing: -.01em }
h1 { font-size: 30px }
h2 { font-size: 22px }
h3 { font-size: 18px }
.sub { color: var(--muted); font-size: 14px; margin: 0 }
p { margin: 0 }
.chico { font-size: 13px; color: var(--muted) }

/* Piezas */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--sombra) }
.pila { display: grid; gap: 12px }
.fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; min-height: 44px }
.boton.primario { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.boton.chico { padding: 6px 12px; font-size: 13px; min-height: 34px }
.boton.peligro { color: var(--bad) }
.boton[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.boton:disabled { opacity: .55; cursor: default }
.boton.ancho { width: 100% }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600 }
input[type=text], input[type=email], input[type=search], input[type=url], input[type=date], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 12px 14px; font-size: 16px; font-weight: 400; min-width: 0 }
textarea { resize: vertical; min-height: 96px }
.ayuda { font-size: 13px; color: var(--muted); font-weight: 400 }
.error { color: var(--bad); font-size: 14px }
.segmentos { display: inline-flex; background: var(--panel2); border-radius: 999px; padding: 3px; gap: 2px }
.segmentos button { border: 0; background: transparent; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer }
.segmentos button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--sombra) }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin: 0 -16px; padding-inline: 16px }
.chips::-webkit-scrollbar { display: none }
.chips button { flex: none; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 7px 12px; font-size: 14px; cursor: pointer; white-space: nowrap }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.vacio { text-align: center; color: var(--muted); padding: 28px 12px; border: 1px dashed var(--line); border-radius: 14px }
.cargando { text-align: center; color: var(--muted); padding: 24px }

/* Estrellas (medias incluidas) */
.estrellas { display: inline-flex; gap: 1px; color: var(--vacia); letter-spacing: 0; line-height: 1; white-space: nowrap }
.estrellas i { font-style: normal }
.estrellas i.llena { color: var(--estrella) }
.estrellas i.media { background: linear-gradient(90deg, var(--estrella) 50%, var(--vacia) 50%); -webkit-background-clip: text; background-clip: text; color: transparent }
.estrellas.grandes { font-size: 26px }
.puntuar { display: inline-flex; font-size: 42px; line-height: 1; cursor: pointer; touch-action: none; user-select: none; color: var(--vacia); gap: 2px; border-radius: 8px }
.puntuar i { font-style: normal }
.puntuar i.llena { color: var(--estrella) }
.puntuar i.media { background: linear-gradient(90deg, var(--estrella) 50%, var(--vacia) 50%); -webkit-background-clip: text; background-clip: text; color: transparent }

/* Lugares en lista */
.lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
.lugar-fila { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; text-decoration: none; box-shadow: var(--sombra) }
.icono { width: 44px; height: 44px; border-radius: 12px; background: var(--panel2); display: grid; place-items: center; font-size: 22px; grid-row: span 2 }
.lugar-fila .nom { font-family: var(--serif); font-weight: 700; font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.lugar-fila .meta { font-size: 13px; color: var(--muted); grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.lugar-fila .pun { grid-column: 3; grid-row: 1 / span 2; text-align: right; font-size: 13px; color: var(--muted) }
.lugar-fila .pun b { display: block; font-size: 17px; color: var(--ink) }

/* Página del lugar */
.cabecera { display: grid; gap: 6px }
.cabecera .tipo { font-size: 14px; color: var(--muted) }
.promedio { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center }
.promedio .num { font-family: var(--serif); font-size: 46px; font-weight: 700; line-height: 1; grid-row: span 2 }
.histo { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; align-items: end; height: 46px; margin-top: 4px }
.histo i { background: var(--estrella); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85 }
.histo-pie { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted) }
.acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.mapa { width: 100%; height: 220px; border: 0; border-radius: 14px; background: var(--panel2); display: block }
.amigos { display: flex; gap: 6px; flex-wrap: wrap }
.amigos a { background: var(--panel2); border-radius: 999px; padding: 4px 10px; font-size: 13px; text-decoration: none }

/* Reseñas y actividad */
.resena { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line) }
.resena:first-child { border-top: 0; padding-top: 0 }
.resena .quien { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14px }
.resena .quien a { font-weight: 700; text-decoration: none }
.resena .texto { white-space: pre-wrap; overflow-wrap: anywhere }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; text-transform: uppercase }
.act { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line) }
.act:first-child { border-top: 0 }
.act .linea { font-size: 15px }
.act .linea a { font-weight: 700; text-decoration: none }
.act .linea a.lug { font-family: var(--serif) }
.act .cita { margin-top: 4px; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap }

/* Perfil */
.perfil-cab { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center }
.perfil-cab .avatar { width: 64px; height: 64px; font-size: 28px; grid-row: span 2 }
.cuentas { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; gap: 4px }
.cuentas b { display: block; font-size: 20px; font-family: var(--serif) }
.cuentas span { font-size: 12px; color: var(--muted) }
.cuentas.dos { grid-template-columns: repeat(2, 1fr) }

/* Aviso flotante */
.aviso { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.25) }

/* Login */
.portada { min-height: 70vh; display: grid; align-content: center; gap: 18px; text-align: center }
.portada h1 { font-size: 40px }
.portada h1 b { color: var(--accent) }
.portada form { text-align: left }

input[type=password] { width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 12px 14px; font-size: 16px; font-weight: 400; min-width: 0 }
.clave-caja { position: relative; display: block }
.clave-caja input { padding-right: 84px }
.ojo { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 10px; cursor: pointer }
.segmentos.centrado { justify-self: center }
.histo-caja { grid-column: 1 / -1 }
.crece { flex: 1; min-width: 180px }
.logo-grande { margin: 0 auto; border-radius: 22px }
details summary { cursor: pointer; font-weight: 600 }
details[open] summary { margin-bottom: 10px }
ol { margin: 0; padding-left: 20px; display: grid; gap: 4px }

@media (min-width: 700px) { h1 { font-size: 36px } .mapa { height: 280px } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto } }
