/* Cardápio Colibri — portado de docs/reference/Main.dc.html.
   Sin estilos en línea (CSP): los valores dinámicos llegan como
   propiedades CSS (--color, --tint, --d…) puestas desde app.js. */

:root {
  --pink: #EA058B;
  --orange: #FFB513;
  --green: #4EF364;
  --blue: #96D1EC;
  --bg: #0A0806;
  --surface: #181410;
  --cream: #F4F0EA;
  --grey: #AAA29A;
  --amber: #C97820;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Jost', system-ui, sans-serif;
  --ease-pop: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}
body {
  font-family: var(--sans);
  color: var(--cream);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; cursor: pointer; margin: 0; }
button:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
h1, h2, p { margin: 0; }

/* ---------- Animaciones (idénticas al prototipo) ---------- */
@keyframes popA { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes popB { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes waveMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-3px) rotate(3deg); } }
@keyframes ripple { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }
@keyframes fabGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 5, 139, .55), 0 8px 24px rgba(0, 0, 0, .5); }
  50% { box-shadow: 0 0 0 12px rgba(234, 5, 139, 0), 0 8px 24px rgba(0, 0, 0, .5); }
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes burst {
  0% { transform: translate(0, 0) scale(.3); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(1); opacity: 0; }
}

.bob { animation: bob 3.4s ease-in-out infinite; }
.wv1 { animation: waveMove 6s linear infinite; }
.wv2 { animation: waveMove 9s linear infinite reverse; }
.sway { animation: sway 7s ease-in-out infinite alternate; }
.wheelmini { animation: spinSlow 7s linear infinite; }
.lt { animation: twinkle 1.4s ease-in-out infinite; }
.lt2 { animation-delay: .7s; }
.tick { animation: ticker 28s linear infinite; }

/* ---------- Estructura ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  flex-shrink: 0;
}
.logo { display: block; height: 70px; width: auto; max-width: 100%; min-width: 0; }
.langs { display: flex; gap: 2px; flex-shrink: 0; }
.lang {
  min-width: 44px;
  height: 44px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--grey);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
}
.lang[aria-pressed="true"] { border-color: var(--pink); color: var(--pink); font-weight: 600; }

/* Franja rosa */
.ticker {
  background: var(--pink);
  color: var(--bg);
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 7px 0 3px;
}
.ticker-track {
  display: inline-flex;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.4;
  animation-duration: var(--dur, 28s);
}
.ticker-item { padding-right: 26px; }
.ticker-sep { padding-left: 26px; opacity: .55; }
.wave { height: 10px; overflow: hidden; flex-shrink: 0; margin-top: -1px; }
.wave svg { display: block; width: 200%; height: 10px; fill: var(--pink); }

/* Pestañas */
.tabs { display: flex; gap: 6px; padding: 10px 20px 8px; flex-shrink: 0; }
.tab {
  flex: 1;
  min-width: 0;
  height: 64px;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 18px;
  border: 1px solid rgba(244, 240, 234, .14);
  background: var(--surface);
  color: var(--cream);
  transition: background .25s, color .25s, border-color .25s;
}
.tab-icon { width: 26px; height: 26px; display: flex; color: var(--color); }
.tab-label { font-size: 12px; font-weight: 600; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.tab[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: var(--bg); }
.tab[aria-pressed="true"] .tab-icon { color: var(--bg); }

/* Cabecera de categoría */
.cat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 6px 20px 10px;
  flex-shrink: 0;
}
.cat-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bar-label { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--amber); }
.cat-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--pink);
}
.chip {
  flex-shrink: 0;
  margin-bottom: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--color);
  color: var(--color);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Lista */
.list-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.palm {
  position: absolute;
  right: -26px;
  top: -18px;
  opacity: .16;
  transform-origin: 100% 0;
  pointer-events: none;
  fill: var(--green);
}
.list {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 20px 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rows { display: flex; flex-direction: column; gap: 6px; }

.row {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  min-height: 54px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .08);
  animation-duration: .5s;
  animation-fill-mode: both;
  animation-timing-function: var(--ease-pop);
  animation-delay: var(--d, 0ms);
}
.anim-a .row { animation-name: popA; }
.anim-b .row { animation-name: popB; }
.no-anim .row { animation: none; }

.row-icon {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--color);
  display: flex;
  align-items: center;
  justify-content: center;
  animation-delay: var(--d, 0ms);
}
.row-text { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-name { font-size: 16px; font-weight: 500; line-height: 1.25; }
.row-desc { font-size: 12.5px; font-weight: 300; line-height: 1.35; color: var(--grey); }
.price {
  position: relative;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Ítem destacado (agua) */
.hero-waves { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; overflow: hidden; pointer-events: none; }
.hero-waves svg { position: absolute; left: 0; bottom: 0; width: 200%; }
.hero-waves .wv2 { height: 22px; fill: rgba(150, 209, 236, .14); }
.hero-waves .wv1 { height: 16px; fill: rgba(150, 209, 236, .26); }
.ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--blue);
  animation: ripple 2.4s ease-out infinite;
}
.ripple.r2 { animation-delay: 1.2s; }

/* Paginado */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 8px; }
.dots { display: flex; align-items: center; gap: 6px; }
.dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(244, 240, 234, .28);
  transition: width .3s, background .3s;
}
.dot.is-on { width: 22px; background: var(--color); }
.round-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(244, 240, 234, .24);
  background: transparent;
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Error de carga */
.load-error {
  margin: 32px auto 0;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  color: var(--cream);
}
.pill-btn {
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid rgba(244, 240, 234, .3);
  background: transparent;
  color: var(--cream);
  font-size: 14px;
  font-weight: 500;
}

/* Botón flotante */
.fab {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  margin: auto;
  width: max-content;
  max-width: calc(100% - 40px);
  min-height: 52px;
  padding: 0 22px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  z-index: 10;
  animation: fabGlow 2.6s ease-in-out infinite;
}
.fab svg { flex-shrink: 0; }

/* ---------- Ruleta (modal) ---------- */
.dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(10, 8, 6, .96);
  animation: fadeIn .3s both;
}
.dialog-inner {
  position: relative;
  max-width: 480px;
  min-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 62px 20px 20px;
}
.dialog-close { position: absolute; top: 10px; right: 14px; }
.wheel-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--pink);
  text-align: center;
}

.wheel-box {
  --w: 290px;
  position: relative;
  width: var(--w);
  height: calc(var(--w) + 20px);
  flex-shrink: 0;
  margin-top: 8px;
}
.wheel-pointer { position: absolute; top: 0; left: 50%; margin-left: -18px; z-index: 2; }
.wheel {
  position: absolute;
  left: 0;
  top: 18px;
  width: var(--w);
  height: var(--w);
  transform: rotate(var(--angle, 0deg));
}
.wheel.is-spinning { transition: transform 4200ms cubic-bezier(.12, .72, .1, 1); }
.wheel svg { display: block; width: 100%; height: 100%; }
.wheel-label { font-family: var(--sans); font-weight: 600; font-size: 14px; fill: var(--bg); }

.spin-btn {
  min-height: 52px;
  padding: 0 36px;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: var(--bg);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  transition: opacity .25s;
}
.spin-btn[aria-disabled="true"] { opacity: .45; cursor: default; }

.result-area { width: 100%; min-height: 176px; display: flex; align-items: center; justify-content: center; }
.result {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--color);
  animation: popA .5s var(--ease-pop) both;
}
.result-cat { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--color); }
.result-main { display: flex; align-items: center; gap: 12px; }
.result-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.result-name { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.1; }
.result-blurb { font-size: 13.5px; font-weight: 300; line-height: 1.35; color: var(--grey); }
.result .price { font-size: 20px; }

.confetti {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border-radius: 2px;
  animation: burst .9s .15s ease-out both;
}
.confetti.round { border-radius: 50%; }
.c1 { --x: -130px; --y: -60px; background: var(--pink); }
.c2 { --x: -90px; --y: -95px; background: var(--orange); }
.c3 { --x: -40px; --y: -110px; background: var(--green); }
.c4 { --x: 20px; --y: -115px; background: var(--blue); }
.c5 { --x: 80px; --y: -100px; background: var(--pink); }
.c6 { --x: 125px; --y: -70px; background: var(--orange); }
.c7 { --x: 140px; --y: -10px; background: var(--green); }
.c8 { --x: -140px; --y: 0px; background: var(--blue); }
.c9 { --x: -60px; --y: 60px; background: var(--pink); }
.c10 { --x: 70px; --y: 65px; background: var(--orange); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Pantallas bajas (p. ej. 360×640): ruleta más chica para que entre todo. */
@media (max-height: 700px) {
  .dialog-inner { padding-top: 58px; }
  .wheel-box { --w: 230px; }
  .wheel-title { font-size: 26px; }
}
@media (max-width: 359px) {
  .wheel-box { --w: 250px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* Sin animación, el confeti y las ondas quedarían quietos encima del contenido. */
  .confetti, .ripple { display: none; }
}
