/* Tutorial de primera entrada · identidad Bloopy, aislada de los estilos de la app. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6-02DA, U+02DC-02FF, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./assets/fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./assets/fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6-02DA, U+02DC-02FF, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./assets/fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

#bloopy-tour {
  --tour-ink: #1f1419;
  --tour-muted: #6e6068;
  --tour-glass: rgba(255, 252, 246, .94);
  --tour-edge: rgba(255, 255, 255, .92);
  --tour-shade: rgba(7, 28, 30, .54);
  position: fixed;
  inset: 0;
  z-index: 20000;
  pointer-events: none;
  font-family: "Figtree", "Manrope", "Segoe UI", sans-serif;
}

dialog#bloopy-tour[open] {
  display: block;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
}

dialog#bloopy-tour::backdrop { background: transparent; }

html[data-theme="dark"] #bloopy-tour {
  --tour-ink: #fbeff2;
  --tour-muted: #a9bdb9;
  --tour-glass: rgba(22, 56, 59, .96);
  --tour-edge: rgba(255, 255, 255, .2);
  --tour-shade: rgba(1, 9, 10, .7);
}

#bloopy-tour .tour-shade {
  position: fixed;
  background: var(--tour-shade);
  pointer-events: auto;
}

#bloopy-tour .tour-focus {
  position: fixed;
  box-sizing: border-box;
  border: 2px solid #ff4d8b;
  border-radius: 16px;
  box-shadow: 0 0 0 5px rgba(255, 77, 139, .28), 0 12px 32px rgba(31, 10, 19, .12);
  pointer-events: none;
  transition: left 200ms cubic-bezier(.2,.7,.2,1), top 200ms cubic-bezier(.2,.7,.2,1), width 200ms cubic-bezier(.2,.7,.2,1), height 200ms cubic-bezier(.2,.7,.2,1);
}

#bloopy-tour .tour-card {
  position: fixed;
  box-sizing: border-box;
  width: min(376px, calc(100vw - 32px));
  /* Alto visible real (viewport.js): con el teclado abierto la tarjeta no queda debajo. */
  max-height: calc(var(--vv-height, 100vh) - 32px);
  overflow-y: auto;
  padding: 20px 22px 18px;
  color: var(--tour-ink);
  background: var(--tour-glass);
  border: 1px solid var(--tour-edge);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(90, 40, 60, .2), inset 0 1px 0 rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  pointer-events: auto;
}

html[data-theme="dark"] #bloopy-tour .tour-card {
  box-shadow: 0 18px 48px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .1);
}

#bloopy-tour .tour-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 12px;
}

#bloopy-tour .tour-brand {
  color: var(--tour-ink);
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}

#bloopy-tour .tour-brand span {
  color: #c8215f;
}

html[data-theme="dark"] #bloopy-tour .tour-brand span {
  color: #ff7aa8;
}

#bloopy-tour .tour-step-count {
  color: var(--tour-muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
}

#bloopy-tour .tour-close {
  display: grid;
  place-items: center;
  margin-left: auto;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--tour-ink);
  background: transparent;
  border: 0;
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
}

#bloopy-tour .tour-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

#bloopy-tour .tour-close:hover,
#bloopy-tour .tour-text-button:hover { background: rgba(255, 77, 139, .11); }

#bloopy-tour h2 {
  margin: 0 0 8px;
  color: var(--tour-ink);
  font-family: "Bricolage Grotesque", "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(22px, 4vw, 26px);
  font-weight: 780;
  line-height: 1.12;
  letter-spacing: -.03em;
  text-wrap: balance;
}

#bloopy-tour p {
  margin: 0;
  color: var(--tour-muted);
  font-size: 15px;
  font-weight: 450;
  line-height: 1.55;
}

#bloopy-tour .tour-progress {
  height: 4px;
  margin: 20px 0 18px;
  border-radius: 999px;
  background: #ddd2f7;
  overflow: hidden;
}

#bloopy-tour .tour-progress::before {
  content: "";
  display: block;
  width: var(--tour-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: #c8215f;
  transition: width 200ms ease;
}

#bloopy-tour .tour-actions,
#bloopy-tour .tour-actions > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

#bloopy-tour .tour-actions { justify-content: space-between; }

#bloopy-tour .tour-actions button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

#bloopy-tour .tour-text-button {
  padding-inline: 8px !important;
  color: var(--tour-muted);
  background: transparent;
  border: 0;
}

#bloopy-tour .tour-secondary {
  color: var(--tour-ink);
  background: transparent;
  border: 1px solid rgba(110, 96, 104, .38);
}

#bloopy-tour .tour-primary {
  color: #1f0a13;
  background: #ff4d8b;
  border: 1px solid #ff4d8b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .52);
}

#bloopy-tour button:focus-visible {
  outline: 3px solid #c8215f;
  outline-offset: 2px;
}

#bloopy-tour button[hidden] { display: none; }

@media (max-width: 540px) {
  #bloopy-tour .tour-card { padding: 16px; border-radius: 20px; }
  #bloopy-tour .tour-actions { gap: 4px; }
  #bloopy-tour .tour-actions button { padding-inline: 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #bloopy-tour .tour-focus,
  #bloopy-tour .tour-progress::before { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
  #bloopy-tour { --tour-glass: #fcf7ea; }
  html[data-theme="dark"] #bloopy-tour { --tour-glass: #123033; }
  #bloopy-tour .tour-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Qué puedes y qué no */
#bloopy-tour .tour-limits { display: grid; gap: 10px; margin-top: 12px; }
#bloopy-tour .tour-limit strong { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
#bloopy-tour .tour-limit-can strong { color: #17715e; }
#bloopy-tour .tour-limit-cannot strong { color: #b3261e; }
html[data-theme="dark"] #bloopy-tour .tour-limit-can strong { color: #6fd8bd; }
html[data-theme="dark"] #bloopy-tour .tour-limit-cannot strong { color: #ff9a92; }
#bloopy-tour .tour-limit ul { margin: 0; padding-left: 18px; color: var(--tour-ink); font-size: 14px; line-height: 1.45; }
#bloopy-tour .tour-limit li + li { margin-top: 3px; }
#bloopy-tour .tour-limits[hidden], #bloopy-tour #tour-description[hidden] { display: none; }

/* Botón «Guía» de la barra superior */
.topbar .guide-button { flex: none; }
body:not([data-tour-ready]) .guide-button { display: none; }

.modal-head .tour-modal-trigger { margin-left: auto; order: 1; flex: none; min-height: 44px; }
.modal-head [data-action="close-modal"] { order: 2; }
