/* La consulta del Dr. Gonzalo: lo propio de este juego. La cabecera, el pie, el ranking y la ventana final vienen de memory.css. */
.d-page { background: #BFE6FA; }
.d-play { gap: 14px; }

/* Inicio */
.d-intro { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; background: #FFFCF3; border: 4px solid #1A1A1F; border-radius: 26px;
  box-shadow: 7px 7px 0 #1A1A1F; padding: 18px 18px 24px; }
.d-intro .doc { width: min(190px, 46vw); height: auto; margin-bottom: -6px; }
.d-intro p { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.5; text-wrap: balance; max-width: 440px; }
.d-rules { display: grid; gap: 8px; width: 100%; max-width: 440px; text-align: left; }
.d-rule { display: flex; align-items: center; gap: 12px; background: #FFFFFF; border: 2px solid #1A1A1F; border-radius: 14px; padding: 8px 12px; font-size: 15px; line-height: 1.35; }
.d-rule .ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-size: 28px; line-height: 1; }
.d-rule canvas { width: 40px; height: 40px; }
.d-big { font: 800 20px 'Lexend', system-ui, sans-serif; color: #1A1A1F; background: #FFD23F; border: 3px solid #1A1A1F; border-radius: 16px; padding: 14px 34px;
  box-shadow: 5px 5px 0 #1A1A1F; cursor: pointer; }
.d-big:active { transform: translate(2px, 2px); box-shadow: 3px 3px 0 #1A1A1F; }
.d-big:disabled { opacity: .6; cursor: progress; }

/* Partida */
.d-game { position: relative; display: flex; flex-direction: column; gap: 10px; }
.d-hud { display: flex; align-items: center; gap: 8px; }
.d-pill { display: flex; align-items: center; gap: 6px; background: #FFFFFF; border: 3px solid #1A1A1F; border-radius: 999px; box-shadow: 3px 3px 0 #1A1A1F; padding: 4px 12px;
  font-weight: 800; font-size: 15px; white-space: nowrap; }
.d-pill b { font: 400 20px 'Bagel Fat One', 'Arial Rounded MT Bold', sans-serif; font-variant-numeric: tabular-nums; }
.d-lives { display: flex; gap: 2px; }
.d-lives svg { width: 24px; height: 24px; display: block; }
.d-hud .sp { flex: 1; }
.d-who { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.d-who img { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 3px solid #1A1A1F; background: #FFD23F; object-fit: cover; }
.d-bub { position: relative; flex: 1; min-width: 0; background: #FFFFFF; border: 3px solid #1A1A1F; border-radius: 18px; box-shadow: 3px 3px 0 #1A1A1F; padding: 7px 12px;
  font-size: 14px; font-weight: 600; line-height: 1.35; }
.d-bub b { display: block; font: 400 15px 'Bagel Fat One', 'Arial Rounded MT Bold', sans-serif; color: #1F3A5F; }
.d-bub::before { content: ""; position: absolute; left: -12px; top: 18px; border: 8px solid transparent; border-right: 10px solid #1A1A1F; }
.d-doc .d-bub::before { top: auto; bottom: 14px; }
.d-bub.on { animation: d-jump .35s ease-out; }
@keyframes d-jump { 0% { transform: scale(.92); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
.d-stage { position: relative; height: min(58vh, 470px); min-height: 330px; border: 4px solid #1A1A1F; border-radius: 26px; background: #F4FBF7; box-shadow: 6px 6px 0 #1A1A1F; overflow: hidden; }
.d-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: pointer; }
.d-time { position: absolute; left: 14px; right: 14px; top: 12px; height: 12px; border-radius: 99px; background: #DCEFE5; border: 2px solid #1A1A1F; overflow: hidden; z-index: 2; }
.d-time i { display: block; height: 100%; width: 100%; background: #FFD23F; transform-origin: left; }
.d-doc { display: flex; align-items: flex-end; gap: 10px; min-height: 60px; }
.d-doc img { flex: none; width: 60px; height: 60px; border-radius: 50%; border: 3px solid #1A1A1F; background: #FFFFFF; object-fit: cover; }

/* Entre paciente y paciente */
.d-next { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(191, 230, 250, .94); border-radius: 22px; }
.d-next .card { width: 100%; max-width: 400px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; background: #FFFCF3;
  border: 4px solid #1A1A1F; border-radius: 24px; box-shadow: 6px 6px 0 #1A1A1F; padding: 18px 16px 20px; }
.d-next h2 { margin: 0; font: 400 28px 'Bagel Fat One', 'Arial Rounded MT Bold', sans-serif; line-height: 1.05; }
.d-next .pts { font-size: 15px; font-weight: 800; color: #1F3A5F; }
.d-tip { display: flex; gap: 12px; align-items: center; text-align: left; background: #FFFFFF; border: 2px solid #1A1A1F; border-radius: 16px; padding: 10px 12px; }
.d-tip img { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 3px solid #1A1A1F; background: #FFFFFF; }
.d-tip p { margin: 0; font-size: 15px; line-height: 1.4; }
.d-tip small { display: block; font-family: 'Gochi Hand', cursive; font-size: 19px; color: #2E9E62; }
.d-nextp { display: flex; align-items: center; gap: 12px; }
.d-nextp img { width: 74px; height: 74px; border-radius: 50%; border: 3px solid #1A1A1F; background: #FFD23F; }
.d-nextp span { display: flex; flex-direction: column; text-align: left; font-size: 13px; color: #4A4A55; }
.d-nextp b { font: 400 24px 'Bagel Fat One', 'Arial Rounded MT Bold', sans-serif; color: #1A1A1F; }

/* Para madres y padres / otro juego / resumen final */
.d-parents { display: flex; flex-direction: column; gap: 8px; background: #FFFCF3; border: 3px solid #1A1A1F; border-radius: 22px; box-shadow: 5px 5px 0 #1A1A1F; padding: 18px 20px; margin-top: 6px; }
.d-parents h2 { margin: 0; font-size: 17px; font-weight: 800; }
.d-parents ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; font-size: 15px; line-height: 1.5; }
.d-parents p { margin: 0; font-size: 15px; line-height: 1.5; }
.d-other { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #1A1A1F; background: #FFD23F; border: 3px solid #1A1A1F; border-radius: 20px; box-shadow: 5px 5px 0 #1A1A1F; padding: 14px 18px; }
.d-other .k { font-family: 'Gochi Hand', cursive; font-size: 20px; color: #E4533D; display: block; }
.d-other b { font-size: 17px; }
.d-other img { width: 46px; height: auto; flex: none; }
.d-sum { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.d-sum li { display: flex; flex-direction: column; align-items: center; gap: 2px; background: #FFFFFF; border: 3px solid #1A1A1F; border-radius: 14px; padding: 8px 4px; text-align: center;
  font-size: 12px; font-weight: 700; line-height: 1.2; }
.d-sum li b { font: 400 24px 'Bagel Fat One', 'Arial Rounded MT Bold', sans-serif; }
.d-say { margin: 0; display: flex; gap: 12px; align-items: center; text-align: left; font-size: 15px; line-height: 1.4; }
.d-say img { flex: none; width: 54px; height: 54px; border-radius: 50%; border: 3px solid #1A1A1F; background: #FFFFFF; }

@media (max-width: 1023px) {
  .d-parents { display: none; }
  .d-stage { height: min(52vh, 440px); }
}
@media (prefers-reduced-motion: reduce) { .d-bub.on { animation: none; } }
