:root {
  --bg: #100d0c;
  --bg-sunken: #080605;
  --surface: #1c1513;
  --surface-hi: #281a18;
  --footer: #140f0d;
  --line: #3d2320;
  --line-hi: #4d2b27;
  --line-accent: #8c2430;
  --accent: #c41e3a;
  --accent-hi: #e2445c;
  --ink: #f2e6e2;
  --ink-2: #ddc7c1;
  --ink-3: #96807b;
  --ink-4: #5f4b47;
  --ink-dim: var(--ink-2);
  --wood: #4a3018;
  --leather: #6b4527;
  --ivory: #fdfbf6;
  --ivory-edge: #d8cdb8;
  --danger: #b5402f;
  --danger-ink: #e08171;
  --danger-fill: rgba(181, 64, 47, 0.16);
  --ok: #2f7d4f;
  --ok-ink: #79c093;
  --ok-fill: rgba(47, 125, 79, 0.14);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 100px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 4px;
}

h1 { font-size: 2.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; }
p { color: var(--ink-2); line-height: 1.5; }

.tagline { color: var(--ink-2); margin-bottom: 28px; font-size: 0.95rem; }

.card {
  background: linear-gradient(180deg, #241a17 0%, #1c1513 42%, #150f0d 100%);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow:
    inset 0 1px 0 rgba(244, 236, 224, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 6px 14px -6px rgba(0, 0, 0, 0.6);
}

label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 6px;
}

input[type="text"] {
  width: 100%;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.1rem;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}
input[type="text"]:focus { outline: 2px solid var(--accent); }

button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
button:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-primary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  background: linear-gradient(180deg, #e2445c 0%, #c41e3a 55%, #8f1529 100%);
  color: #f9ecec;
  border: 1px solid #7a1626;
  border-radius: 11px;
  width: 100%;
  padding: 13px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 220, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 3px 0 #6e1220,
    0 8px 16px -6px rgba(0, 0, 0, 0.6);
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 0 #6e1220;
}

.btn-secondary {
  background: linear-gradient(180deg, #241a17 0%, #1c1513 100%);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  width: 100%;
  padding: 13px 18px;
  box-shadow:
    inset 0 1px 0 rgba(244, 236, 224, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 6px 12px -6px rgba(0, 0, 0, 0.5);
}
.btn-secondary:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.btn-danger, .btn-ok {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 11px;
  padding: 13px 18px;
}
.btn-danger {
  background: linear-gradient(180deg, rgba(181, 64, 47, 0.24), rgba(181, 64, 47, 0.1));
  border: 1px solid #7d3529;
  color: var(--danger-ink);
  box-shadow: inset 0 1px 0 rgba(255, 200, 190, 0.1), 0 2px 0 rgba(0, 0, 0, 0.45), 0 6px 14px -8px rgba(0, 0, 0, 0.6);
}
.btn-ok {
  background: linear-gradient(180deg, rgba(47, 125, 79, 0.24), rgba(47, 125, 79, 0.1));
  border: 1px solid #205c3a;
  color: var(--ok-ink);
  box-shadow: inset 0 1px 0 rgba(190, 255, 210, 0.1), 0 2px 0 rgba(0, 0, 0, 0.45), 0 6px 14px -8px rgba(0, 0, 0, 0.6);
}
.btn-danger:active, .btn-ok:active { transform: translateY(1px); }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.code-display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.6rem;
  color: var(--accent-hi);
  letter-spacing: 0.12em;
  text-align: center;
  padding: 10px 0;
}

.players {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(180deg, #241a17 0%, #1c1513 100%);
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(244, 236, 224, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}
.player.turn {
  background: linear-gradient(180deg, #2e1a1a 0%, #281a18 100%);
  border-color: var(--line-accent);
  box-shadow:
    inset 0 1px 0 rgba(244, 236, 224, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(196, 30, 58, 0.22),
    0 8px 18px -8px rgba(0, 0, 0, 0.65);
}
.player.turn .player-name::after {
  content: '· turno';
  font-family: var(--font-mono);
  color: var(--accent-hi);
  font-weight: 600;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-left: 4px;
}
.player.eliminated { opacity: 0.4; }
.player-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3); }

/* Mesa de poker: fieltro verde con reborde de laton, rivales sentados arriba. */
.table-felt {
  position: relative;
  border-radius: 26px;
  padding: 20px 14px 26px;
  margin: 14px 0 10px;
  background:
    radial-gradient(ellipse 100% 70% at 50% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 120% 90% at 50% 115%, rgba(0, 0, 0, 0.55) 0%, transparent 60%),
    linear-gradient(175deg, #2e4a35 0%, #223923 55%, #16241a 100%);
  box-shadow:
    inset 0 3px 14px rgba(0, 0, 0, 0.6),
    inset 0 0 50px rgba(0, 0, 0, 0.35),
    0 14px 26px -12px rgba(0, 0, 0, 0.6);
  border: 2px solid #1c1513;
}
.table-felt::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 20px;
  border: 1px solid rgba(196, 30, 58, 0.25);
  pointer-events: none;
}

.seats-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; position: relative; }
.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 14px;
  padding: 9px 8px 8px;
  min-width: 98px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 3px 8px -4px rgba(0, 0, 0, 0.5);
}
.seat.turn {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 14px -4px rgba(196, 30, 58, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.seat.eliminated { opacity: 0.4; }
.seat-token {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid rgba(0, 0, 0, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.seat.turn .seat-token { box-shadow: 0 0 0 2px var(--accent-hi), 0 3px 10px rgba(196, 30, 58, 0.5); }
.seat-name {
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
}
.seat-dice { display: flex; gap: 2px; }

.table-center { display: flex; align-items: center; justify-content: center; min-height: 64px; }
.table-center .bid-banner {
  display: inline-block;
  background: linear-gradient(180deg, #241a17 0%, #150f0d 100%);
  border: 1px solid var(--line-accent);
  border-radius: 10px;
  padding: 10px 22px;
  margin: 0;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(244, 236, 224, 0.08);
}
.table-center .center-msg { margin: 0; }

.your-seat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(180deg, #241a17 0%, #1c1513 100%);
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  margin-bottom: 10px;
  box-shadow: inset 0 1px 0 rgba(244, 236, 224, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}
.your-seat.eliminated { opacity: 0.4; }
.your-seat.turn {
  border-color: var(--line-accent);
  box-shadow:
    inset 0 1px 0 rgba(244, 236, 224, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(196, 30, 58, 0.22),
    0 8px 18px -8px rgba(0, 0, 0, 0.65);
}
.your-seat.turn .player-name::after {
  content: '· turno';
  font-family: var(--font-mono);
  color: var(--accent-hi);
  font-weight: 600;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-left: 4px;
}

.bot-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
.bot-picker { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0; }
.bot-picker .qty-value { font-family: var(--font-display); font-weight: 600; font-size: 1.8rem; min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.bot-picker button {
  width: 42px; height: 42px; border-radius: 50%; padding: 0;
  background: var(--bg-sunken); border: 1px solid var(--line); color: var(--ink); font-size: 1.2rem;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6);
}
.divider-text {
  text-align: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin: 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.player-dice { display: flex; gap: 3px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.offline-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }

.die {
  width: 54px;
  height: 54px;
  position: relative;
  background: var(--ivory);
  border-radius: 6px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35), 0 4px 9px -3px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--ivory-edge);
  overflow: hidden;
}
.die .die-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 4px;
  box-sizing: border-box;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.dice-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }

.dice-row.rolling .die {
  --tilt: 0deg;
  animation: dieFallRoll 0.68s cubic-bezier(.22, .61, .36, 1) both;
}
.dice-row.rolling .die:nth-child(1) { animation-delay: 0s; }
.dice-row.rolling .die:nth-child(2) { animation-delay: 0.07s; }
.dice-row.rolling .die:nth-child(3) { animation-delay: 0.14s; }
.dice-row.rolling .die:nth-child(4) { animation-delay: 0.21s; }
.dice-row.rolling .die:nth-child(5) { animation-delay: 0.28s; }

/* Cae desde arriba, pega un rebote y rueda hasta quedar en un angulo natural (--tilt). */
@keyframes dieFallRoll {
  0% { transform: translateY(-170px) rotate(-260deg) scale(0.35); opacity: 0; }
  48% { opacity: 1; }
  55% { transform: translateY(12px) rotate(50deg) scale(1.1); }
  70% { transform: translateY(-9px) rotate(-16deg) scale(0.97); }
  84% { transform: translateY(3px) rotate(10deg) scale(1.02); }
  100% { transform: translateY(0) rotate(var(--tilt)) scale(1); opacity: 1; }
}

.your-dice-section {
  text-align: center;
  margin: 18px 0;
  padding: 26px 12px 20px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0px, rgba(0, 0, 0, 0.16) 2px, transparent 2px, transparent 13px),
    linear-gradient(175deg, #5c3d24 0%, var(--wood) 60%, #3c2712 100%);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.55),
    inset 0 -1px 0 rgba(244, 236, 224, 0.05),
    inset 0 0 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.45);
}

.cup-tap {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  width: 120px;
}
.cup-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.55));
  animation: cupIdle 2.2s ease-in-out infinite;
  transform-origin: 50% 90%;
}
.cup-img.cup-shaking { animation: cupShake 0.45s ease-in-out; }
.cup-img.cup-zooming { animation: cupZoomIn 0.38s ease-in forwards; }
.reveal-hint { font-size: 0.85rem; margin-top: 2px; color: var(--ink-2); }

@keyframes cupIdle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
@keyframes cupShake {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  15% { transform: rotate(-14deg) translateX(-4px); }
  30% { transform: rotate(12deg) translateX(4px); }
  45% { transform: rotate(-16deg) translateX(-5px); }
  60% { transform: rotate(14deg) translateX(5px); }
  75% { transform: rotate(-8deg) translateX(-2px); }
  90% { transform: rotate(6deg) translateX(2px); }
}
@keyframes cupZoomIn {
  0% { transform: scale(1); opacity: 1; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.55)) blur(0px); }
  100% { transform: scale(4.5); opacity: 0; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.55)) blur(3px); }
}

.bid-banner {
  text-align: center;
  padding: 16px;
  margin: 14px 0;
}
.bid-banner .amount { font-family: var(--font-display); font-weight: 600; font-size: 2rem; font-variant-numeric: tabular-nums; }

.palifico-banner {
  background: var(--danger-fill);
  border: 1px solid #7d3529;
  color: var(--danger-ink);
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-size: 0.72rem;
}

.face-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 12px; }
.face-picker button {
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0;
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
.face-picker button.selected {
  border-color: var(--line-accent);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(196, 30, 58, 0.35);
}
.face-picker .die { width: 34px; height: 34px; border-radius: 5px; }
.face-picker .die .die-face { padding: 5px; }

.qty-stepper { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 14px; }
.qty-stepper .qty-value { font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; min-width: 50px; text-align: center; font-variant-numeric: tabular-nums; }
.qty-stepper button {
  width: 44px; height: 44px; border-radius: 50%; padding: 0;
  background: var(--bg-sunken); border: 1px solid var(--line); color: var(--ink); font-size: 1.4rem;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6);
}

.action-bar { display: flex; gap: 10px; margin-top: 10px; }

.log {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.log div { border-bottom: 1px dashed var(--line); padding-bottom: 5px; }

.center-msg { text-align: center; margin: 30px 0; color: var(--ink-2); }

.error-toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  max-width: 90vw;
  text-align: center;
  z-index: 10;
}

.share-row { display: flex; gap: 8px; margin-top: 8px; }
.share-row input { flex: 1; margin-bottom: 0; font-size: 0.85rem; }
.share-row button { white-space: nowrap; }

/* Revelacion dramatica: se muestran los dados de todos al resolver un dudo/calzo. */
.reveal-panel {
  background: linear-gradient(180deg, #241a17 0%, #150f0d 100%);
  border: 1px solid var(--line-accent);
  border-radius: 14px;
  padding: 18px 16px;
  margin: 14px 0;
  box-shadow:
    inset 0 1px 0 rgba(244, 236, 224, 0.08),
    0 0 0 1px rgba(196, 30, 58, 0.18),
    0 10px 24px -10px rgba(0, 0, 0, 0.7);
  animation: revealPanelIn 0.35s ease-out both;
}
.reveal-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  text-align: center;
  margin-bottom: 4px;
}
.reveal-summary { text-align: center; color: var(--ink-2); font-size: 0.9rem; margin-bottom: 16px; }
.reveal-summary strong { color: var(--accent-hi); font-family: var(--font-display); font-size: 1.1rem; }

.reveal-hand {
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  animation: revealHandIn 0.4s ease-out both;
}
.reveal-hand:first-of-type { border-top: none; }
.reveal-hand:nth-child(1) { animation-delay: 0.05s; }
.reveal-hand:nth-child(2) { animation-delay: 0.15s; }
.reveal-hand:nth-child(3) { animation-delay: 0.25s; }
.reveal-hand:nth-child(4) { animation-delay: 0.35s; }
.reveal-hand:nth-child(5) { animation-delay: 0.45s; }
.reveal-hand:nth-child(6) { animation-delay: 0.55s; }
.reveal-hand.lost { background: var(--danger-fill); margin: 0 -16px; padding: 10px 16px; border-radius: 8px; }
.reveal-hand.gained { background: var(--ok-fill); margin: 0 -16px; padding: 10px 16px; border-radius: 8px; }

.reveal-hand-name { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.reveal-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: top center; border: 2px solid var(--line); }
.reveal-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  padding: 2px 6px;
  margin-left: auto;
}

.dice-row.reveal-dice { margin: 0; justify-content: flex-start; }
.die-match {
  box-shadow: 0 0 0 2px var(--accent-hi), 0 0 14px rgba(226, 68, 92, 0.55), 0 1px 1px rgba(0, 0, 0, 0.35);
}
.reveal-empty { color: var(--ink-4); font-size: 0.85rem; font-style: italic; }

@keyframes revealPanelIn {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes revealHandIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.room-header { display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; margin-bottom: 4px; }
.room-header h2 { margin: 0; }
.help-btn {
  position: absolute;
  right: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--font-display);
  font-weight: 600;
}

/* Tutorial visual tipo spotlight: oscurece todo salvo el elemento que se explica. */
.tour-overlay { position: fixed; inset: 0; z-index: 5000; }
.tour-spot {
  position: fixed;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(4, 2, 2, 0.8);
  transition: top 0.3s cubic-bezier(.4,1,.6,1), left 0.3s cubic-bezier(.4,1,.6,1), width 0.3s cubic-bezier(.4,1,.6,1), height 0.3s cubic-bezier(.4,1,.6,1);
  pointer-events: none;
}
.tour-finger {
  position: fixed;
  transform: translateX(-50%);
  font-size: 26px;
  animation: tourFingerBob 1s ease-in-out infinite;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
  pointer-events: none;
  z-index: 5001;
}
@keyframes tourFingerBob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -8px); }
}

.tour-tooltip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5002;
  background: linear-gradient(180deg, #241a17 0%, #150f0d 100%);
  border-top: 1px solid var(--line-accent);
  border-radius: 18px 18px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  animation: tourSheetIn 0.3s ease-out;
  max-width: 430px;
  margin: 0 auto;
}
@keyframes tourSheetIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.tour-step-count {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.tour-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin-bottom: 6px; }
.tour-body { color: var(--ink-2); font-size: 0.92rem; margin: 0 0 16px; line-height: 1.4; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-skip { background: none; border: none; color: var(--ink-3); font-size: 0.85rem; padding: 8px 4px; width: auto; }
.tour-nav { display: flex; gap: 8px; }
.tour-nav button { width: auto; padding: 11px 18px; }
