/* ==========================================================
   LE VOYAGE AU PANAMA — feuille de style
   Palette tropicale : océan profond, sable, corail, mangue
   ========================================================== */

:root {
  --ocean-deep: #083d44;
  --ocean: #0d5c63;
  --ocean-light: #17838c;
  --lagoon: #44b8b1;
  --sand: #f6ecd9;
  --sand-dark: #e8d9bc;
  --coral: #ff6f59;
  --coral-dark: #e5533d;
  --mango: #ffb443;
  --leaf: #3f9d63;
  --leaf-dark: #2e7a4b;
  --ink: #1e2b2d;
  --white: #fffdf7;
  --danger: #d63e3e;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(8, 61, 68, .25);
  --font: 'Fredoka', system-ui, -apple-system, sans-serif;
  --font-hand: 'Caveat', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  color: var(--ink);
  background: var(--ocean-deep);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.hidden { display: none !important; }

/* ---------- écrans ---------- */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--ocean-light) 0%, var(--ocean) 45%, var(--ocean-deep) 100%);
}
.screen.active { display: flex; }

/* ---------- boutons ---------- */
.btn {
  font-family: var(--font);
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--white);
  background: var(--ocean-light);
  padding: 14px 22px;
  font-size: 1.05rem;
  box-shadow: var(--shadow);
  transition: transform .12s ease, filter .12s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(.96); filter: brightness(1.1); }
.btn-primary { background: linear-gradient(160deg, var(--coral), var(--coral-dark)); }
.btn-secondary { background: linear-gradient(160deg, var(--ocean-light), var(--ocean)); }
.btn-mango { background: linear-gradient(160deg, var(--mango), #f09a1a); color: #4a3208; }
.btn-leaf { background: linear-gradient(160deg, var(--leaf), var(--leaf-dark)); }
.btn-big {
  font-size: 1.25rem;
  padding: 18px 28px;
  width: 100%;
  max-width: 420px;
}
.btn-small { font-size: .85rem; padding: 8px 14px; border-radius: 12px; }
.btn-ghost { background: transparent; box-shadow: none; color: rgba(255,255,255,.7); text-decoration: underline; }
.btn-ceviche { background: linear-gradient(160deg, #ffd97a, var(--mango)); color: #5a3c00; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* ---------- cartes ---------- */
.card {
  background: var(--sand);
  border-radius: calc(var(--radius) + 6px);
  padding: 22px;
  box-shadow: var(--shadow);
  color: var(--ink);
}

/* ---------- connexion ---------- */
.login-wrap {
  margin: auto;
  width: min(92vw, 480px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  padding: 20px 0;
}
.login-stamp { font-size: 3rem; }
.login-title {
  color: var(--white);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 700;
  text-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.login-sub { color: rgba(255,255,255,.85); font-size: 1.05rem; }

.login-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.login-progress .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--sand-dark);
  border: 2px solid var(--ocean-light);
}
.login-progress .dot.done { background: var(--leaf); border-color: var(--leaf-dark); }
.login-progress .dot.current { background: var(--mango); border-color: #d98d13; }

.login-question {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.35;
}
.login-input {
  width: 100%;
  font-family: var(--font);
  font-size: 1.1rem;
  padding: 14px 16px;
  border-radius: 14px;
  border: 3px solid var(--ocean-light);
  background: var(--white);
  color: var(--ink);
  outline: none;
  margin-bottom: 14px;
  user-select: text;
  -webkit-user-select: text;
}
.login-input:focus { border-color: var(--coral); }
.login-error {
  color: var(--danger);
  font-weight: 600;
  min-height: 1.5em;
  margin-bottom: 10px;
  animation: wiggle .4s ease;
}
.login-hint {
  background: var(--sand-dark);
  border-left: 5px solid var(--mango);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .98rem;
  margin-bottom: 14px;
  text-align: left;
}
.login-hint.last-hint {
  border-left-color: var(--leaf);
  background: #e4f1e2;
  font-weight: 600;
}

@keyframes wiggle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ---------- carte du Panama ---------- */
.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: var(--white);
}
.map-title { font-size: 1.3rem; font-weight: 700; }
.map-title-sub { font-weight: 400; font-size: .85rem; opacity: .75; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-sound {
  background: rgba(255, 253, 247, .14);
  box-shadow: none;
  padding: 8px 10px;
  font-size: 1rem;
}
.ceviche-counter {
  background: rgba(255, 217, 122, .95);
  color: #5a3c00;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  animation: pop-in .4s ease;
}

#map-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  min-height: 0;
}
#map-container svg {
  width: 100%;
  height: 100%;
  max-height: 72vh;
}

.map-footer {
  padding: 14px 18px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.map-status {
  color: var(--white);
  text-align: center;
  font-size: 1rem;
  min-height: 1.4em;
  opacity: .9;
}

/* étiquettes de villes */
.city-label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  fill: var(--white);
  paint-order: stroke;
  stroke: rgba(8, 61, 68, .55);
  stroke-width: 3px;
}
.city-dot { transition: fill .3s ease; }
.vehicle { font-size: 20px; }

/* ---------- écran de jeu ---------- */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: var(--white);
  gap: 10px;
}
.game-title { font-size: 1.1rem; font-weight: 700; line-height: 1.2; }

#game-container {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 16px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.game-inner {
  width: min(100%, 480px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.game-text {
  color: var(--white);
  font-size: 1.05rem;
  line-height: 1.45;
  text-align: center;
}
.game-text.big { font-size: 1.35rem; font-weight: 600; }

.narration {
  background: rgba(255, 253, 247, .1);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.45;
  animation: fade-up .4s ease;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop-in {
  0% { transform: scale(0); }
  80% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes shake-screen {
  0%, 100% { transform: translate(0,0); }
  20% { transform: translate(-8px, 4px); }
  40% { transform: translate(7px, -5px); }
  60% { transform: translate(-6px, -4px); }
  80% { transform: translate(6px, 5px); }
}
.shaking { animation: shake-screen .45s ease; }
.shaking-forever { animation: shake-screen .45s ease infinite; }

/* ---------- modale ---------- */
#modal-layer {
  position: fixed;
  inset: 0;
  background: rgba(8, 30, 34, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 20px;
}
.modal {
  width: min(92vw, 420px);
  background: var(--sand);
  border-radius: calc(var(--radius) + 6px);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: pop-in .3s ease;
  max-height: 85vh;
  overflow-y: auto;
}
.modal h3 { font-size: 1.25rem; margin-bottom: 12px; }
.modal p { font-size: 1rem; line-height: 1.45; margin-bottom: 16px; }
.modal .modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal label.checkline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  font-size: .98rem;
  margin-bottom: 16px;
  background: var(--sand-dark);
  padding: 12px;
  border-radius: 12px;
}
.modal label.checkline input { width: 22px; height: 22px; flex: none; margin-top: 1px; }

/* ---------- toasts ---------- */
#toast-layer {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 95;
  pointer-events: none;
}
.toast {
  background: var(--sand);
  color: var(--ink);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  max-width: 88vw;
  text-align: center;
  animation: toast-in .3s ease;
}
.toast.toast-dark { background: var(--ink); color: var(--white); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast.leaving { opacity: 0; transition: opacity .4s ease; }

/* ---------- canvas effets ---------- */
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99;
}

/* ---------- jeu du chat ---------- */
.boarding-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 2px dashed var(--ocean-light);
  padding: 18px;
  text-align: center;
}
.boarding-card .bc-head {
  font-size: .78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ocean);
  margin-bottom: 6px;
}
.boarding-card .bc-route { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.chat-arena {
  position: relative;
  flex: 1;
  min-height: 46vh;
  border-radius: var(--radius);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  overflow: hidden;
}
.btn-chat {
  position: absolute;
  font-size: 1.1rem;
  padding: 16px 22px;
  background: linear-gradient(160deg, var(--mango), #f09a1a);
  color: #4a3208;
  transition: none;
}
.btn-fish {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  font-size: 1.3rem;
  padding: 20px 30px;
  background: linear-gradient(160deg, var(--lagoon), var(--ocean-light));
}
.loading-bar-wrap {
  background: rgba(255,255,255,.15);
  border-radius: 999px;
  height: 22px;
  overflow: hidden;
  margin: 8px 0;
}
.loading-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lagoon), var(--mango));
  transition: width .35s ease;
}
.admin-photo {
  width: 120px; height: 120px;
  margin: 12px auto;
  border-radius: 50%;
  background: var(--sand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ocean);
  border: 3px solid var(--coral);
  overflow: hidden;
  flex: none;
}
.admin-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- yams ---------- */
.yams-table {
  background: radial-gradient(circle at 50% 30%, #1d7a54, #115239);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.turn-label {
  color: var(--white);
  text-align: center;
  font-weight: 600;
  font-size: .95rem;
  min-height: 1.3em;
}
.dice-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  min-height: 58px;
}
.die {
  width: 52px; height: 52px;
  background: #fffdf7;
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 7px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12), 0 3px 8px rgba(0,0,0,.35);
  transition: transform .15s ease;
  cursor: pointer;
}
.die .pip {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #22333c;
  place-self: center;
}
.die.blue { background: #eaf4ff; }
.die.blue .pip { background: #1c6dae; }
.die.red { background: #ffeeea; }
.die.red .pip { background: #c43a24; }
.die.held { outline: 3px solid var(--mango); transform: translateY(-5px); }
.die.rolling { animation: die-tumble .5s cubic-bezier(.3, .7, .4, 1.1); }
@keyframes die-tumble {
  0% { transform: translateY(-26px) rotate(-160deg) scale(.6); opacity: .4; }
  60% { transform: translateY(4px) rotate(20deg) scale(1.08); opacity: 1; }
  100% { transform: translateY(0) rotate(0) scale(1); }
}
.sheet {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--sand);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .95rem;
  box-shadow: var(--shadow);
}
.sheet th, .sheet td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--sand-dark);
  text-align: center;
}
.sheet th { background: var(--ocean); color: var(--white); font-weight: 600; }
.sheet th.k { color: #bfe0ff; }
.sheet th.a { color: #ffc9bd; }
.sheet td.cat { text-align: left; font-weight: 600; }
.sheet td.ghost { color: #b3a88e; font-style: italic; }
.sheet td.can-score {
  background: #ffedc2;
  color: #8a6d1d;
  font-weight: 700;
  font-style: normal;
  cursor: pointer;
}
.sheet tr.totals td {
  background: var(--sand-dark);
  font-weight: 700;
  border-bottom: none;
  font-size: 1.05rem;
}

/* ---------- san blas ---------- */
.clock-display {
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.sea-msg {
  position: absolute;
  left: 0; right: 0;
  top: 10px;
  text-align: center;
  color: var(--white);
  font-weight: 600;
  text-shadow: 0 2px 3px rgba(0,0,0,.4);
  padding: 0 14px;
}

/* ---------- san blas : la traversée en lancha ---------- */
.lancha-scene {
  position: relative;
  flex: 1;
  min-height: 48vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #2ea4b8 0%, #1b7f96 55%, #10606f 100%);
}
.lancha-waves {
  position: absolute;
  inset: -240px 0 0 0;
  background-image:
    radial-gradient(ellipse 26px 7px at 15% 12%, rgba(255,255,255,.26) 60%, transparent 61%),
    radial-gradient(ellipse 20px 6px at 65% 30%, rgba(255,255,255,.2) 60%, transparent 61%),
    radial-gradient(ellipse 30px 8px at 35% 58%, rgba(255,255,255,.16) 60%, transparent 61%),
    radial-gradient(ellipse 22px 6px at 85% 78%, rgba(255,255,255,.22) 60%, transparent 61%);
  background-size: 300px 240px;
  animation: waves-scroll 2s linear infinite;
}
@keyframes waves-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(240px); }
}
.lancha-progress {
  position: absolute;
  top: 8px; left: 12px; right: 12px;
  z-index: 6;
  color: rgba(255,255,255,.85);
  font-size: .68rem;
  letter-spacing: 1px;
  font-weight: 600;
}
.lancha-progress .bar {
  height: 8px;
  background: rgba(255,255,255,.25);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 3px;
}
.lancha-progress .fill {
  height: 100%;
  width: 0%;
  background: var(--sand);
  transition: width .4s linear;
}
.lancha-msg {
  position: absolute;
  top: 36px; left: 0; right: 0;
  text-align: center;
  color: var(--white);
  font-weight: 600;
  font-size: .92rem;
  text-shadow: 0 2px 3px rgba(0,0,0,.45);
  padding: 0 14px;
  z-index: 6;
}
.lancha-boat {
  position: absolute;
  bottom: 14%;
  left: 50%;
  width: 62px;
  height: 106px;
  transform: translateX(-50%);
  will-change: transform, left;
  z-index: 3;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.35));
}
.lancha-boat .wake {
  position: absolute;
  top: 98%;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 64px;
  background: linear-gradient(180deg, rgba(255,255,255,.5), transparent);
  border-radius: 50% 50% 0 0 / 30% 30% 0 0;
}
.lancha-kenza {
  position: absolute;
  top: 20%; left: 50%;
  transform: translateX(-50%);
  font-size: 17px;
}
.lancha-bottle {
  position: absolute;
  top: 46%; left: 30%;
  font-size: 13px;
  transform: rotate(90deg);
}
.lancha-bottle.rolling { animation: bottle-roll 2.6s ease-in-out infinite alternate; }
@keyframes bottle-roll {
  from { left: 22%; transform: rotate(70deg); }
  to { left: 62%; transform: rotate(290deg); }
}
.lancha-guide {
  position: absolute;
  top: 58%; left: 50%;
  font-size: 22px;
  transform-origin: 50% 90%;
  animation: drunk-sway 1.1s ease-in-out infinite alternate;
}
@keyframes drunk-sway {
  from { transform: translateX(-50%) rotate(-20deg); }
  to { transform: translateX(-50%) rotate(19deg); }
}
.guide-bubble {
  position: absolute;
  bottom: 102%;
  left: 50%;
  transform: translateX(-50%);
  background: #fffdf7;
  color: var(--ink);
  font-weight: 600;
  font-size: .78rem;
  padding: 6px 10px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 5;
  pointer-events: none;
}
.guide-bubble.show { opacity: 1; }
.guide-bubble::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: #fffdf7;
}
.lancha-obstacle {
  position: absolute;
  font-size: 30px;
  transform: translateX(-50%);
  z-index: 2;
  will-change: top;
}
.lancha-island {
  position: absolute;
  top: -22%;
  left: 0; right: 0;
  text-align: center;
  font-size: 46px;
  letter-spacing: 10px;
  transition: top 1.8s ease;
  z-index: 2;
  text-shadow: 0 4px 8px rgba(0,0,0,.3);
}
.lancha-island.landed { top: 2%; }
.steer-row { display: flex; gap: 12px; }
.steer-btn {
  flex: 1;
  font-size: 1.7rem;
  padding: 18px 0;
  background: linear-gradient(160deg, var(--ocean-light), var(--ocean));
  user-select: none;
  touch-action: none;
}
.steer-btn.active { filter: brightness(1.3); transform: scale(.97); }
.drunk-title {
  font-size: 2.6rem;
  display: inline-block;
  transform-origin: 50% 90%;
  animation: drunk-sway-center 1.3s ease-in-out infinite alternate;
}
@keyframes drunk-sway-center {
  from { transform: rotate(-15deg); }
  to { transform: rotate(14deg); }
}

/* ---------- cascade ---------- */
.trail-choice {
  display: flex;
  gap: 12px;
}
.trail-choice .btn { flex: 1; padding: 22px 10px; font-size: 1.05rem; }
.megaphone-banner {
  background: var(--mango);
  color: #4a3208;
  font-weight: 700;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  font-size: 1.1rem;
  animation: megaphone-pulse .5s ease infinite alternate;
}
@keyframes megaphone-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}
.rescue-counter {
  position: sticky;
  top: 0;
  background: rgba(8,61,68,.85);
  color: var(--white);
  text-align: center;
  border-radius: 12px;
  padding: 8px;
  font-weight: 600;
  z-index: 5;
}
.follower-scene {
  position: relative;
  flex: 1;
  min-height: 40vh;
  background: linear-gradient(180deg, #2a6b48 0%, #1d4d34 100%);
  border-radius: var(--radius);
  overflow: hidden;
}
.walker { position: absolute; bottom: 20px; font-size: 40px; transition: left 1s linear; }
.walker.shadow-man { filter: brightness(0) opacity(.75); }

/* ---------- surf ---------- */
.surf-scene {
  position: relative;
  flex: 1;
  min-height: 44vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #a7e0f0 0%, #4fc3d9 45%, #1188a5 100%);
}
.surfer { position: absolute; font-size: 46px; left: 34%; bottom: 34%; transition: transform .3s ease; }
.timing-bar-wrap {
  position: relative;
  height: 30px;
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  overflow: hidden;
}
.timing-zone {
  position: absolute;
  top: 0; bottom: 0;
  background: rgba(63,157,99,.8);
}
.timing-cursor {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 8px;
  background: var(--white);
  border-radius: 4px;
}
.score-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 1rem;
}
.score-table th, .score-table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid var(--sand-dark);
}
.score-table th { background: var(--ocean); color: var(--white); font-weight: 600; }
.score-table .highlight-col { background: #ffe9e5; font-weight: 700; color: var(--coral-dark); }

/* ---------- photos ---------- */
.viewfinder {
  position: relative;
  flex: 1;
  min-height: 44vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, #1a7f9e 0%, #0b4f66 60%, #073246 100%);
}
.viewfinder::after {
  content: '';
  position: absolute;
  inset: 12%;
  border: 2px solid rgba(255,255,255,.65);
  border-radius: 8px;
  pointer-events: none;
}
.viewfinder .corner-info {
  position: absolute;
  top: 8px; left: 12px;
  color: rgba(255,255,255,.8);
  font-size: .75rem;
  letter-spacing: 1px;
}
.sea-creature { position: absolute; will-change: transform, left, top; }
.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.flash.go { animation: flash-anim .35s ease; }
@keyframes flash-anim { 0% { opacity: .95; } 100% { opacity: 0; } }
.contact-sheet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.contact-sheet .shot {
  aspect-ratio: 1;
  border-radius: 10px;
  background: #0b4f66;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: rgba(255,255,255,.85);
  border: 2px solid rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.contact-sheet .shot .shot-label {
  position: absolute;
  bottom: 2px; left: 0; right: 0;
  font-size: .55rem;
  color: rgba(255,255,255,.75);
}
.contact-sheet .shot.good { border-color: var(--mango); box-shadow: 0 0 12px rgba(255,180,67,.6); }
.sincere-moment {
  position: fixed;
  inset: 0;
  background: #04252c;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 32px;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.sincere-moment.visible { opacity: 1; }
.sincere-moment p {
  color: var(--white);
  font-size: 1.45rem;
  line-height: 1.5;
  text-align: center;
  font-weight: 500;
}

/* ---------- david ---------- */
.bus-board {
  background: #101820;
  border-radius: var(--radius);
  padding: 18px;
  color: #ffb443;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.bus-board .destination { font-size: 1.2rem; font-weight: 700; letter-spacing: 2px; }
.bus-board .status {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 8px;
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .25; } }
.pollo-card {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.pollo-card .pollo-emoji { font-size: 3rem; }

/* ---------- boquete ---------- */
.boquete-map {
  position: relative;
  flex: 1;
  min-height: 44vh;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 70%, #2e5c40 0%, transparent 50%),
    radial-gradient(circle at 75% 30%, #24483a 0%, transparent 45%),
    linear-gradient(180deg, #12263a 0%, #1d3b2f 100%);
}
.countdown-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--danger);
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
  border-radius: 999px;
  padding: 6px 16px;
  z-index: 5;
  font-variant-numeric: tabular-nums;
}
.spot-quality {
  position: absolute;
  top: 10px; left: 10px;
  right: 90px;
  z-index: 5;
  color: var(--white);
  font-size: .75rem;
}
.spot-quality .bar {
  height: 10px;
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 3px;
}
.spot-quality .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--danger), var(--mango), var(--leaf));
  transition: width .5s ease;
}
.fake-notif {
  position: absolute;
  left: 8px; right: 8px;
  background: rgba(255,253,247,.95);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: .9rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: notif-in .3s ease;
  z-index: 6;
}
@keyframes notif-in {
  from { transform: translateY(-14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.fake-notif.doubt {
  border-left: 5px solid var(--mango);
  background: rgba(255, 244, 214, .97);
  font-style: italic;
}
.map-pin {
  position: absolute;
  font-size: 34px;
  transform: translate(-50%, -90%);
  animation: pop-in .3s ease;
  z-index: 4;
}
.munecos { position: absolute; bottom: 6px; font-size: 22px; opacity: .85; }
.calm-message {
  position: fixed;
  inset: 0;
  background: #050f1a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 32px;
  opacity: 0;
  transition: opacity 2s ease;
}
.calm-message.visible { opacity: 1; }
.calm-message p {
  color: var(--white);
  font-size: 1.45rem;
  text-align: center;
  line-height: 1.5;
  font-weight: 500;
}

/* ---------- piment ---------- */
.piment-scene {
  position: relative;
  flex: 1;
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #2b4a5e 0%, #1b3140 100%);
  overflow: hidden;
  padding-bottom: 18px;
}
.hot-bottle {
  width: 90px;
  cursor: pointer;
  transition: transform .1s ease;
  z-index: 3;
  -webkit-user-drag: none;
}
.hot-bottle.shaking { animation: bottle-shake .3s ease; }
@keyframes bottle-shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-14deg); }
  75% { transform: rotate(14deg); }
}
.plate {
  width: 180px; height: 60px;
  background: radial-gradient(ellipse at center, #fff 55%, #d9d9d9 100%);
  border-radius: 50%;
  position: relative;
  z-index: 2;
}
.plate .sauce {
  position: absolute;
  inset: 12% 20%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #ff5a1f, #c62b09);
  transform: scale(0);
  transition: transform .35s cubic-bezier(.2, 1.6, .4, 1);
}
.scoville {
  font-variant-numeric: tabular-nums;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--mango);
  text-align: center;
}
body.on-fire .screen { background: radial-gradient(circle at 50% 40%, #a3170a 0%, #5c0b04 100%) !important; }

/* ---------- générique ---------- */
.credits-screen { background: #000 !important; }
#credits-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.credits-roll {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  color: #f4f0e6;
  padding: 0 24px;
  animation: credits-scroll linear forwards;
}
.credits-roll h2 {
  font-size: 2rem;
  letter-spacing: 6px;
  margin-bottom: 40px;
}
.credits-roll .credit-role {
  font-size: .8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #b8b09a;
  margin-top: 34px;
}
.credits-roll .credit-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.4;
}
.credits-roll .credit-note {
  font-size: .95rem;
  font-style: italic;
  color: #cfc8b4;
  margin-top: 60px;
  line-height: 1.6;
}
@keyframes credits-scroll {
  from { transform: translateY(100vh); }
  to { transform: translateY(calc(-100% + 52vh)); }
}
.credits-end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 60px;
  gap: 30px;
  opacity: 0;
  transition: opacity 1.5s ease;
}
.credits-end.visible { opacity: 1; }
.final-secret {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.final-secret p {
  color: #f4f0e6;
  font-size: 1.3rem;
  line-height: 1.6;
  text-align: center;
  white-space: pre-line;
}

/* ---------- divers ---------- */
.manta-shot {
  background: linear-gradient(180deg, #4db6d8 0%, #1a7396 60%, #0d5a78 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hand { font-family: var(--font-hand); font-size: 1.5rem; }
.spacer { flex: 1; }
.center { text-align: center; }
