:root {
  --bg: #07090D;
  --card: #0c1220;
  --line: rgba(255,255,255,.08);
  --text: #f2f6ff;
  --muted: #8b9bb8;
  --mint: #5ee1a8;
  --sky: #4588C8;
  --gold: #FCCE2D;
  --violet: #a78bfa;
  --cyan: #67e8f9;
  --radius: 0px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  font-family: "Belink Inter","Inter",ui-sans-serif,system-ui,sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  width: 100vw; height: 100dvh;
  max-width: 100vw; max-height: 100dvh;
  background: #05070d; color: var(--text);
  overflow: hidden;
  touch-action: none;
}
body.ux2.portrait.fullscreen {
  background: #05070d;
  width: 100vw; height: 100dvh;
}

.app.stage-9x16 {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #05070d;
}

.field {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  max-height: none;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  box-shadow: none;
  background: #060a14;
  margin: 0;
}
#arena {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #060a14;
}

.gate {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 20px 16px; text-align: center;
  background: rgba(5,7,13,.84);
  backdrop-filter: blur(6px);
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 5;
}
.gate.gone {
  opacity: 0; pointer-events: none; visibility: hidden;
}
.gate-brand {
  font-weight: 800; letter-spacing: .16em; font-size: 13px; color: var(--muted);
  margin-bottom: 2px;
}
.gate-brand span { color: var(--mint); }
.name-wrap {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 11px; color: var(--muted);
  width: min(280px, 88vw); text-align: left;
}
.name-wrap input {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(0,0,0,.4); color: var(--text);
  font-size: 17px;
}

/* Boost FIRST — huge primary */
.cta {
  width: min(300px, 90vw);
  padding: 16px 20px;
  border: 0; border-radius: 16px;
  font-size: 18px; font-weight: 800; letter-spacing: .06em;
  color: #041018;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  box-shadow: 0 10px 28px rgba(94,225,168,.3);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.cta:active { transform: scale(.98); }
.cta:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.boost-cta {
  font-size: 22px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #ffe08a, var(--mint) 55%, var(--sky));
  box-shadow: 0 12px 36px rgba(255,209,102,.35), 0 0 0 2px rgba(94,225,168,.35);
  animation: boostPulse 1.6s ease-in-out infinite;
}
.boost-cta.done {
  animation: none;
  background: linear-gradient(135deg, #3a5a4a, #2a4050);
  color: #b8ffe0;
  opacity: .7;
}
.boost-cta .cta-ico { font-size: 22px; }
@keyframes boostPulse {
  0%, 100% { box-shadow: 0 12px 36px rgba(255,209,102,.3), 0 0 0 2px rgba(94,225,168,.3); }
  50% { box-shadow: 0 14px 44px rgba(255,209,102,.5), 0 0 0 4px rgba(94,225,168,.45); }
}
.boost-sub {
  margin: -4px 0 2px;
  font-size: 11px; font-weight: 600; color: var(--mint);
  letter-spacing: .02em;
}
.play-cta {
  background: linear-gradient(135deg, var(--sky), #8ab4ff);
  box-shadow: 0 8px 22px rgba(110,200,255,.25);
}
.play-cta.ready {
  opacity: 1;
  box-shadow: 0 10px 28px rgba(110,200,255,.4);
}
.status { margin: 0; font-size: 11px; color: var(--muted); }

/* Short tip sheet — instruction kootah */
.tip-sheet {
  width: min(300px, 90vw);
  margin-top: 6px;
  padding: 10px 12px 8px;
  border-radius: 14px;
  background: rgba(12,18,32,.92);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column; gap: 5px;
  text-align: left;
}
.tip-sheet.gone { display: none; }
.tip {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: #d8e4f8;
}
.tip-ico {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.tip-boost { background: rgba(255,209,102,.2); color: var(--gold); }
.tip-gold { background: rgba(255,209,102,.15); color: var(--gold); font-size: 14px; }
.tip-pac { background: rgba(167,139,250,.22); color: var(--violet); font-size: 14px; }
.tip-hole { background: rgba(180,80,255,.18); color: #c4a0ff; }
.tip-drag { background: rgba(94,225,168,.15); color: var(--mint); }
.tip-guard { background: rgba(124,240,197,.18); color: #7cf0c5; }
.tip-ok {
  align-self: flex-end;
  margin-top: 4px;
  padding: 5px 14px;
  border: 0; border-radius: 999px;
  background: rgba(94,225,168,.25); color: var(--mint);
  font-weight: 800; font-size: 11px; cursor: pointer;
}

.toast {
  position: absolute; left: 50%; top: 14%; transform: translate(-50%,-50%);
  font-size: 16px; font-weight: 800; color: var(--gold);
  text-shadow: 0 0 16px rgba(255,209,102,.55);
  pointer-events: none; z-index: 6; padding: 0 10px; text-align: center;
}

/* Directional slap / hit wave — screen change, no Blast text */
.slap-wave {
  position: absolute; inset: 0; pointer-events: none; z-index: 7;
  background: linear-gradient(105deg,
    transparent 0%,
    rgba(103,246,255,.0) 35%,
    rgba(167,139,250,.35) 50%,
    rgba(94,225,168,.25) 58%,
    transparent 75%);
  opacity: 0;
  transform: translateX(-18%) skewX(-8deg);
}
.slap-wave.on {
  animation: slapSweep .38s ease-out forwards;
}
@keyframes slapSweep {
  0% { opacity: 0; transform: translateX(-40%) skewX(-10deg); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateX(55%) skewX(-4deg); }
}

.corner-hud {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
}
.ch-lives {
  position: absolute;
  top: max(10px, var(--safe-top));
  left: max(12px, var(--safe-left));
  font-size: 13px; font-weight: 800; color: #ff6b8a;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.ch-score {
  position: absolute;
  top: max(10px, var(--safe-top));
  right: max(12px, var(--safe-right));
  font-size: 15px; font-weight: 800; color: var(--gold);
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}

.power-hud {
  position: absolute;
  top: max(36px, calc(var(--safe-top) + 28px));
  right: max(10px, var(--safe-right));
  display: flex; flex-direction: column; gap: 3px;
  z-index: 4; pointer-events: none;
}
.power-hud .pow {
  font-size: 10px; font-weight: 700;
  padding: 3px 7px; border-radius: 999px;
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.12);
  color: #e8f4ff;
}

.board { display: none !important; }

/* Joystick — larger hit area */
.stick-wrap {
  position: absolute;
  left: 50%;
  bottom: max(78px, calc(var(--safe-bottom) + 70px));
  transform: translateX(-50%);
  z-index: 4;
  display: flex; flex-direction: column; align-items: center;
  user-select: none; touch-action: none;
  pointer-events: auto;
  /* invisible padding expands hit target */
  padding: 28px;
  margin: -28px;
}
.joy-base {
  position: relative;
  width: 156px; height: 156px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(30,45,70,.88), rgba(8,12,22,.94));
  border: 2px solid rgba(94,225,168,.4);
  box-shadow: inset 0 0 24px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.35);
  cursor: grab;
}
.joy-base:active { cursor: grabbing; }
.joy-knob {
  position: absolute; left: 50%; top: 50%;
  width: 64px; height: 64px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, var(--mint), var(--sky));
  box-shadow: 0 4px 16px rgba(94,225,168,.45);
  pointer-events: none;
}

.boost-bar {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  z-index: 4;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding:
    8px max(12px, var(--safe-right))
    max(10px, var(--safe-bottom))
    max(12px, var(--safe-left));
  background: linear-gradient(180deg, transparent, rgba(5,7,13,.88) 30%);
  border: 0; border-radius: 0;
}
.boost-optin {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--mint); font-weight: 700;
  cursor: pointer;
}
.boost-ico { font-size: 14px; }
.boost-status { font-size: 10px; }
.share-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(110,200,255,.35);
  background: rgba(110,200,255,.2);
  color: #dff4ff; font-weight: 800; font-size: 14px; cursor: pointer;
}

/* Hit / slap button — directional strike glyph, charge pip */
.slap-btn {
  margin-left: auto;
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(167,139,250,.55);
  background:
    radial-gradient(circle at 35% 35%, rgba(103,246,255,.35), transparent 55%),
    linear-gradient(145deg, rgba(167,139,250,.55), rgba(94,225,168,.35));
  color: #eef6ff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(167,139,250,.35);
}
.slap-btn:disabled { opacity: .28; cursor: not-allowed; box-shadow: none; }
.slap-btn:not(:disabled):active {
  transform: scale(.92) translateX(4px);
  box-shadow: 0 2px 10px rgba(103,246,255,.5);
}
.slap-ico {
  font-size: 22px; font-weight: 900;
  transform: translateX(1px);
  text-shadow: 0 0 10px rgba(103,246,255,.7);
}
.slap-charges {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1200;
  font-size: 10px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}

.lab, .link-status { display: none !important; }
.muted { opacity: .7; }

@media (max-height: 700px) {
  .joy-base { width: 128px; height: 128px; }
  .joy-knob { width: 54px; height: 54px; }
  .stick-wrap { bottom: max(68px, calc(var(--safe-bottom) + 60px)); }
  .boost-cta { font-size: 18px; padding: 14px 18px; }
}


/* Hole danger warn flash — brief violet edge, uncluttered */
body.hole-flash::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  box-shadow: inset 0 0 48px 12px rgba(167,139,250,0.55);
  animation: holeFlash 0.65s ease-out forwards;
}
@keyframes holeFlash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}


.install-cta{margin-top:10px;background:linear-gradient(135deg,#1a6dff,#00c2ff);color:#fff;border:none;font-weight:700}
.install-cta[hidden],#iosInstallHint[hidden]{display:none!important}
#iosInstallHint{opacity:.85;font-size:12px}


/* COMPLETE 20260927 compact tip lines + true 9:16 stage */
.tip-line { flex-wrap: wrap; justify-content: center; gap: 6px 8px; font-size: 12px; }
.tip-dot { opacity: .55; margin: 0 2px; }
@media (min-aspect-ratio: 10/16) {
  .app.stage-9x16 {
    width: min(100vw, calc(100dvh * 9 / 16));
    height: 100dvh;
    margin-inline: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}
