/* guide.css — 🧭 «Tu guía» (js/guide.js, 2026-10-30): the pop (the guide slides in at the left edge, pointing at its speech
   bubble: one line, one big button, ✕), the round bubble that waits in the corner, and the «¿Quién te acompaña?» sheet.
   The home's palette (Rojo Imperial, Oro, Crema). Never over the phone's tabs; never blocking: only the pop's own box
   takes taps. Reduced motion: nothing slides or bounces, the still pictures. */
.dg-pop, .dg-dot, .dg-sheet {
  --dg-rojo: #5a1010; --dg-oro: #b88b2c; --dg-oro-claro: #e8c878; --dg-paper: #fffdf8; --dg-crema: #f7f1e4; --dg-ink: #1c1a17; --dg-soft: #5d5044;
  --dg-green: #24804f; --dg-green-deep: #17573a; --dg-ease: cubic-bezier(.23, 1, .32, 1);
  font-family: 'Noto Sans', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
/* ── the pop ── */
.dg-pop {
  position: fixed; z-index: 60; left: 8px; right: 8px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 540px;
  display: grid; grid-template-columns: 118px minmax(0, 1fr); align-items: end; gap: 0; pointer-events: none;
}
#screen-list.has-tabs .dg-pop { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.dg-pop.is-in { animation: dgIn .5s var(--dg-ease) both; }
.dg-pop.is-in .dg-say { animation: dgSay .42s var(--dg-ease) .16s both; }
.dg-pop.is-out { animation: dgOut .24s ease-in both; }
@keyframes dgIn { from { transform: translateX(-110%); } to { transform: none; } }
@keyframes dgSay { from { transform: scale(.86) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dgOut { to { transform: translateX(-30px); opacity: 0; } }
.dg-fig { position: relative; height: 170px; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.dg-fig::after {
  content: ''; position: absolute; left: 14%; right: 14%; bottom: -4px; height: 16px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 20, 4, .38), rgba(40, 20, 4, 0));
}
.dg-fig-img { position: relative; z-index: 1; display: block; max-width: 100%; max-height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 6px 10px rgba(30, 14, 4, .28)); }
.dg-say {
  position: relative; margin: 0 0 18px 2px; padding: 12px 14px 14px; border-radius: 20px; pointer-events: auto;
  background: var(--dg-paper); box-shadow: 0 10px 28px rgba(28, 14, 4, .28), inset 0 0 0 2.5px var(--dg-oro-claro);
}
/* its little tail, towards the guide's pointing hand */
.dg-say::before {
  content: ''; position: absolute; left: -9px; bottom: 30px; width: 18px; height: 18px; transform: rotate(45deg);
  background: var(--dg-paper); box-shadow: -2px 2px 0 0 var(--dg-oro-claro); border-radius: 3px;
}
.dg-who { margin: 0 34px 2px 0; font: 800 13px/1.2 'Baloo 2', 'Nunito', system-ui, sans-serif; letter-spacing: .02em; color: var(--dg-oro); text-transform: uppercase; }
.dg-line { margin: 0 6px 10px 0; font: 700 16px/1.35 'Noto Sans', 'Nunito', system-ui, sans-serif; color: var(--dg-ink); }
.dg-extra { margin: -4px 0 10px; font: 700 14px/1.35 'Noto Sans', 'Nunito', system-ui, sans-serif; color: var(--dg-rojo); }
.dg-pop.is-cheer .dg-line { margin-bottom: 2px; font-size: 18px; }
.dg-go {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 0 14px; border: 0; border-radius: 14px;
  background: var(--dg-green); color: #fff; box-shadow: 0 4px 0 var(--dg-green-deep); cursor: pointer;
  font: 800 17px/1.1 'Baloo 2', 'Nunito', system-ui, sans-serif; transition: transform .12s var(--dg-ease), box-shadow .12s var(--dg-ease);
}
.dg-go:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--dg-green-deep); }
.dg-go:focus-visible, .dg-x:focus-visible, .dg-dot:focus-visible { outline: 3px solid var(--dg-rojo); outline-offset: 3px; }
.dg-x {
  position: absolute; top: 4px; right: 4px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--dg-crema); color: var(--dg-rojo); cursor: pointer; pointer-events: auto; box-shadow: inset 0 0 0 2px #e2d4b4;
}
.dg-who { padding-top: 6px; }
@media (min-width: 700px) {
  .dg-pop { left: 20px; right: auto; width: 520px; grid-template-columns: 150px minmax(0, 1fr); bottom: 24px; }
  .dg-fig { height: 230px; }
  .dg-line { font-size: 17px; }
}
/* ── the round bubble in the corner ── */
.dg-dot {
  position: fixed; z-index: 55; left: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 64px; height: 64px; padding: 0; border: 0;
  border-radius: 50%; overflow: hidden; cursor: pointer; background: #fff7e2;
  box-shadow: 0 6px 16px rgba(28, 14, 4, .3), inset 0 0 0 3px var(--dg-oro-claro), 0 0 0 3px rgba(255, 253, 248, .9);
  transition: transform .16s var(--dg-ease), opacity .2s ease;
}
#screen-list.has-tabs .dg-dot { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.dg-dot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; pointer-events: none; }
.dg-dot:active { transform: scale(.93); }
.dg-dot.is-hidden { opacity: 0; pointer-events: none; transform: scale(.6); }
@media (prefers-reduced-motion: no-preference) {
  .dg-dot:not(.is-hidden) { animation: dgBob 4.6s cubic-bezier(.37, 0, .63, 1) infinite; }
}
@keyframes dgBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (min-width: 700px) { .dg-dot { left: 20px; bottom: 24px; width: 72px; height: 72px; } }

/* ── «¿Quién te acompaña?» ── */
.dg-sheet {
  position: fixed; inset: 0; z-index: 9550; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 10, 4, .58);
}
body.dg-lock { overflow: hidden; }
.dg-sheet-card {
  position: relative; width: 100%; max-width: 760px; max-height: 100%; overflow: hidden auto; overscroll-behavior: contain;
  padding: 22px 16px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; background: var(--dg-crema); text-align: center;
}
@media (min-width: 700px) { .dg-sheet { align-items: center; padding: 24px; } .dg-sheet-card { border-radius: 26px; padding: 26px 24px 22px; } }
.dg-sheet-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--dg-paper); color: var(--dg-rojo); cursor: pointer; box-shadow: inset 0 0 0 2px #e2d4b4; }
.dg-sheet-t { margin: 0 52px 4px; font: 800 26px/1.15 'Baloo 2', 'Nunito', system-ui, sans-serif; color: var(--dg-rojo); }
.dg-sheet-t:focus { outline: none; }
.dg-sheet-s { margin: 0 0 14px; font: 600 15px/1.4 'Noto Sans', 'Nunito', system-ui, sans-serif; color: var(--dg-soft); }
.dg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .dg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dg-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 8px 6px 10px; border: 0; border-radius: 18px; cursor: pointer;
  background: var(--dg-paper); color: var(--dg-ink); box-shadow: inset 0 0 0 2.5px #e2d4b4, 0 3px 0 rgba(28, 26, 23, .08);
  font: inherit; -webkit-tap-highlight-color: transparent; transition: transform .14s var(--dg-ease), box-shadow .14s var(--dg-ease);
}
.dg-tile:active { transform: scale(.96); }
.dg-tile:focus-visible { outline: 3px solid var(--dg-rojo); outline-offset: 2px; }
.dg-tile.is-on { box-shadow: inset 0 0 0 3.5px var(--dg-oro), 0 0 0 3px rgba(232, 200, 120, .55); background: #fff7e2; }
.dg-tile-pic {
  display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 132px; border-radius: 14px;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, #f3e2b3, rgba(243, 226, 179, 0) 72%);
}
.dg-tile-img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; object-position: 50% 100%; pointer-events: none; }
.dg-tile-n { font: 800 17px/1.15 'Baloo 2', 'Nunito', system-ui, sans-serif; }
.dg-tile-s { font: 600 12.5px/1.25 'Noto Sans', 'Nunito', system-ui, sans-serif; color: var(--dg-soft); }
@media (prefers-reduced-motion: no-preference) {
  .dg-tile .dg-tile-img { animation: dgTile 3.4s cubic-bezier(.37, 0, .63, 1) calc(var(--i, 0) * -.43s) infinite; transform-origin: 50% 100%; }
  .dg-tile.is-on .dg-tile-img { animation: none; }
}
@keyframes dgTile { 0%, 100% { transform: none; } 50% { transform: translateY(-4px) scale(1.01, 1.02); } }
.dg-sheet-msg { min-height: 1.2em; margin: 10px 0 0; font: 700 14px/1.3 'Noto Sans', 'Nunito', system-ui, sans-serif; color: #b3261e; }
.dg-sheet-msg:empty { margin: 0; min-height: 0; }
.dg-later { margin: 10px auto 0; min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px; background: transparent; color: var(--dg-rojo); cursor: pointer; font: 800 16px/1 'Baloo 2', 'Nunito', system-ui, sans-serif; box-shadow: inset 0 0 0 2px #e2d4b4; }
.dg-sheet-n { margin: 8px 0 0; font: 600 13px/1.35 'Noto Sans', 'Nunito', system-ui, sans-serif; color: var(--dg-soft); }
@media (max-width: 380px) { .dg-tile-pic { height: 112px; } .dg-sheet-t { font-size: 23px; } }

/* (review 2026-10-30) the ✕ sits on the name's row, never over the line; a long line scrolls inside its bubble; the last
   things of the home never hide under the corner bubble */
.dg-who { display: flex; align-items: center; min-height: 40px; margin: 0 48px 2px 0; padding-top: 0; }
.dg-say { max-height: 46vh; max-height: 46dvh; overflow: auto; overscroll-behavior: contain; }
body.dg-on #screen-list.md.has-tabs .md-app { padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px)); }
body.dg-on #screen-list.md:not(.has-tabs) .md-app { padding-bottom: 112px; }
body .dg-sheet .dg-sheet-t:focus, body .dg-sheet .dg-sheet-t:focus-visible { outline: none !important; box-shadow: none !important; }
