/* 3D beta page — builds on ../css/style.css tokens */
.page3d { background: var(--sand); }
.beta-pill { margin-left: 12px; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.nav .nav-cta { margin-left: auto; }

.wrap3d { width: min(1180px, calc(100% - 32px)); margin: 24px auto 60px; }
.arena { background: var(--foam); border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 10px 0 var(--ink); overflow: hidden; }

.hud { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 12px 20px; background: var(--ink); color: var(--foam); }
.hud-score { display: flex; flex-direction: column; align-items: center; min-width: 96px; }
.hud-score span { font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; opacity: .85; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-score strong { font-family: var(--display); font-size: 2.3rem; line-height: 1; color: var(--sun); }
.hud-score-b strong { color: var(--seafoam); }
.hud-mid { text-align: center; }
.hud-msg { font-weight: 900; font-size: 1.02rem; }
.hud-wind { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; opacity: .9; margin-top: 2px; }
.wind-arrow { width: 18px; height: 18px; transition: transform .4s var(--ease); }

  .stage { position: relative; background: #BFE9F7; aspect-ratio: 16 / 9; max-height: 72vh; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: crosshair; }
#gl { display: block; width: 100%; height: 100%; }

.loft { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(20, 50, 71, .85); color: var(--foam); border: 2px solid var(--foam); border-radius: 999px; padding: 8px 14px; pointer-events: none; }
.loft[hidden] { display: none; }
.loft-label { font-size: .7rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.loft-bar { width: 160px; height: 12px; border-radius: 999px; background: rgba(255, 251, 242, .25); overflow: hidden; }
.loft-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--seafoam), var(--sun) 60%, var(--coral)); }
.loft-hint { font-size: .72rem; font-weight: 700; opacity: .85; }

.pop { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.8rem); color: var(--ink); background: var(--sun); border: 3px solid var(--ink); border-radius: 999px; padding: 6px 22px; box-shadow: 0 5px 0 var(--ink); animation: popIn .35s var(--ease); pointer-events: none; white-space: nowrap; }
.pop[hidden] { display: none; }
@keyframes popIn { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }

.kick-btn {
  position: absolute; right: 14px; bottom: 14px; width: 92px; height: 92px; border-radius: 50%;
  background: var(--coral); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  font-family: var(--display); font-size: 1.3rem; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; cursor: pointer;
}
.kick-btn small { font-family: var(--body); font-weight: 900; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.kick-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
@media (max-width: 640px) { .loft { left: 14px; transform: none; bottom: 22px; } .kick-btn { width: 84px; height: 84px; } }

.hard-btn {
  position: absolute; left: 14px; top: 14px; border-radius: 999px; padding: 8px 14px;
  font-family: var(--body); font-weight: 900; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  background: var(--foam); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); cursor: pointer; touch-action: manipulation;
}
.hard-btn.on { background: var(--coral); animation: hardPulse .9s ease-in-out infinite; }
@keyframes hardPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 50, 71, .6); padding: 16px; }
.overlay[hidden] { display: none; }
.card { background: var(--foam); border: 3px solid var(--ink); border-radius: 22px; padding: 22px 26px; box-shadow: 0 8px 0 var(--ink); max-width: 460px; width: 100%; text-align: center; }
.card h2 { font-size: 2rem; }
.card-sub { font-weight: 700; margin: 8px 0 14px; }
.mode-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.mode { position: relative; }
.mode input { position: absolute; opacity: 0; inset: 0; }
.mode span { display: inline-block; padding: 8px 16px; border: 3px solid var(--ink); border-radius: 999px; font-weight: 900; background: var(--foam); cursor: pointer; }
.mode input:checked + span { background: var(--sun); box-shadow: 0 3px 0 var(--ink); }
.mode input:focus-visible + span { outline: 3px solid var(--ocean); outline-offset: 2px; }
.name-fields { display: grid; gap: 10px; margin-bottom: 14px; text-align: left; }
.name-fields label { font-size: .74rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--ocean-deep); display: grid; gap: 4px; }
.name-fields label[hidden] { display: none; }
.name-fields input { font: inherit; font-weight: 700; padding: 10px 14px; border-radius: 999px; border: 3px solid var(--ink); background: #fff; }

.controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 20px; border-top: 3px solid var(--ink); }
.help { font-size: .88rem; color: #3E5A6E; }

.notes { margin-top: 32px; background: var(--foam); border: 3px solid var(--ink); border-radius: 22px; padding: 20px 24px; box-shadow: 0 6px 0 var(--ink); }
.notes h3 { margin-bottom: 10px; }
.notes ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.notes-foot { margin-top: 14px; font-size: .9rem; color: #3E5A6E; }

@media (max-width: 640px) {
  .hud { grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 10px 14px; }
  .hud-mid { grid-column: 1 / -1; order: 2; }
  .hud-score { min-width: 0; }
  .hud-score strong { font-size: 1.8rem; }
  .stage { aspect-ratio: 4 / 3; }
  .loft-bar { width: 110px; }
  .loft-hint { display: none; }
  .wind-arrow { width: 26px; height: 26px; }
  .hud-wind { font-size: .9rem; }
}
