* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body { height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
  font: 600 15px system-ui, sans-serif; background: #111; color: #eee; }
header { display: flex; gap: 14px; align-items: center; padding: 0 10px; height: 30px; flex: none; }
header h1 { color: #ff7a59; font-size: inherit; font-weight: 700; }
#age { font-size: 11px; opacity: .6; border: 1px solid #666; border-radius: 4px; padding: 0 4px; }
#solved { margin-left: auto; opacity: .6; }
#info { width: 22px; height: 22px; padding: 0; border: 1px solid #666; border-radius: 50%; background: none;
  color: #bbb; font: italic 700 13px Georgia, serif; cursor: pointer; }
#disclaimer { position: fixed; inset: 0; z-index: 20; background: #000b; display: flex; align-items: center;
  justify-content: center; padding: 16px; }
#disclaimer[hidden] { display: none; }
#disclaimer > div { max-width: 360px; background: #1c1c1c; border-radius: 12px; padding: 20px; text-align: center; }
#disclaimer h2 { font-size: 16px; margin-bottom: 8px; }
#disclaimer p { font-weight: 400; line-height: 1.4; margin-bottom: 16px; }
#dClose { padding: 8px 22px; border: 0; border-radius: 8px; background: #ff7a59; color: #fff; font: inherit; cursor: pointer; }
#row { display: flex; flex: none; }
#boards { display: flex; gap: 6px; flex: none; }
.board { position: relative; overflow: hidden; touch-action: manipulation; cursor: crosshair; }
.board img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }

/* Las .ad rellenan todo el hueco que dejan las fotos; JS oculta las demasiado pequeñas. */
.ad { flex: 1; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center;
  overflow: hidden; }
.ad:empty::before { content: "Ad"; font-size: 11px; opacity: .3; }
.ad.off { visibility: hidden; }

/* cargando: fotos ocultas, spinner y sin toques hasta que las dos estén descargadas */
#boards.loading .board { pointer-events: none; background: #1b1b1b; }
#boards.loading .board img { visibility: hidden; }
#boards.loading .board::after { content: ""; position: absolute; left: 50%; top: 50%; width: 32px; height: 32px;
  margin: -16px; border: 4px solid #333; border-top-color: #ff7a59; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* éxito: flash verde que rodea toda la pantalla */
#flash { position: fixed; inset: 0; pointer-events: none; z-index: 10; box-shadow: inset 0 0 0 10px #2fd36b, inset 0 0 60px 20px #2fd36baa; opacity: 0; }
#flash.on { animation: flash .9s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

.mark { position: absolute; border: 4px solid #2fd36b; border-radius: 50%; transform: translate(-50%, -50%);
  pointer-events: none; animation: pop .2s ease-out; }
.miss { position: absolute; width: 30px; height: 30px; margin: -15px; border-radius: 50%; pointer-events: none;
  background: #e5484d88; animation: fade .5s forwards; }


@keyframes pop { from { transform: translate(-50%, -50%) scale(.3); } }
@keyframes fade { to { opacity: 0; transform: scale(1.8); } }
