[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; background: #7fcf5a; touch-action: none; }
#farm { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
/* Not display:none (iOS stops feeding hidden videos); just out of sight. */
#cam { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(31,42,77,0.35); overflow: auto; }
.overlay.bottom { align-items: flex-end; background: transparent; pointer-events: none; }
.overlay.bottom .card { pointer-events: auto; }
.overlay .card { padding: 24px 28px; max-width: 760px; width: 100%; }
.card.narrow { max-width: 520px; }
.card.wide { max-width: 860px; }
.center { text-align: center; }
h2 { margin: 6px 0 12px; font-size: 28px; }
p { font-size: 19px; font-weight: 600; margin: 8px 0; }
.tag { font-size: 22px; margin-top: 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.row .btn { margin-top: 10px; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.choice { font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 12px; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); }
.choice:hover, .choice.last { background: #fff6cf; }
.choice:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.choice b { font-size: 24px; }
.choice small { font-size: 15px; font-weight: 700; opacity: .75; }
.big { font-size: 56px; line-height: 1.1; }
.big2 { font-size: 26px; font-weight: 800; }
.lead { margin: 4px 0; }
.how { font-size: 17px; opacity: .8; }

#corner { position: fixed; top: 12px; right: 12px; display: flex; gap: 8px; align-items: center; z-index: 5; }
#langs { display: flex; padding: 3px; border-radius: 12px; box-shadow: 0 3px 0 var(--ink); border-width: 3px; }
#langs button { font: inherit; font-weight: 800; font-size: 14px; border: 0; background: none; color: var(--ink); padding: 4px 8px; border-radius: 8px; cursor: pointer; }
#langs button.on { background: var(--yellow); }
.round { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; box-shadow: 0 3px 0 var(--ink);
  font-size: 22px; cursor: pointer; padding: 0; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.round img { width: 100%; height: 100%; object-fit: cover; }
body.playing #corner { display: none; }

#hud { position: fixed; top: 12px; right: 12px; display: flex; gap: 10px; align-items: center; z-index: 4; }
#hud .btn { margin: 0; font-size: 16px; padding: 6px 14px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 18px; padding: 4px 12px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; }
.chip i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--ink); }
.chip.ok { background: #c9f2b4; }

.bar { height: 16px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .3s; }
.spin { display: inline-block; animation: drive 1.2s ease-in-out infinite alternate; }
@keyframes drive { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
.stars { font-size: 64px; letter-spacing: 6px; }
.stars .dim { filter: grayscale(1); opacity: .3; }

@media (max-width: 600px), (max-height: 520px) {
  .overlay .card { padding: 16px; }
  h1.logo { font-size: 40px; }
  .big { font-size: 40px; }
  .choice b { font-size: 20px; }
  p { font-size: 16px; }
  .big2 { font-size: 20px; }
}

.speed { margin-top: 10px; gap: 8px; }
.speed .btn { margin: 0; font-size: 26px; padding: 4px 14px; }
.speed .dots { display: inline-flex; gap: 6px; }
.speed .dots i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; }
.speed .dots i.on { background: var(--yellow); }
