/* NateBox — player (phone) chrome: join form, waiting screens, lobby,
   personal results, header. Phone-first: big targets, no hover reliance. */

.view-play { height: 100dvh; overflow: hidden; }

.pshell-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px calc(8px);
  padding-top: calc(8px + env(safe-area-inset-top));
  background: rgba(18, 4, 31, 0.9);
  border-bottom: 2px solid var(--card2);
}
.pshell-head.is-hidden { display: none; }
.pshell-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pshell-name { font-weight: 900; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 26vw; }
.pshell-room { display: flex; align-items: center; gap: 6px; font-weight: 900; letter-spacing: 0.14em; color: var(--ink-dim); font-size: 14px; }
.rail-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: inline-block; }

.pshell-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }

/* ---------- join form ---------- */
.join {
  display: flex; flex-direction: column; gap: 8px;
  padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
  max-width: 440px; width: 100%; margin: 0 auto;
}
.logo-join { font-size: clamp(34px, 10vw, 46px); margin-bottom: 12px; }
.join-err {
  background: rgba(255, 59, 59, 0.15);
  border: 2px solid var(--red);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-weight: 700; font-size: 14px;
  text-align: center;
}
.join-label { color: var(--ink-dim); font-weight: 900; font-size: 12px; letter-spacing: 0.22em; margin-top: 10px; }
.join-code, .join-name {
  font-family: var(--body);
  background: var(--card);
  border: 2px solid var(--card2);
  border-radius: var(--r-md);
  color: var(--ink);
  padding: 14px 16px;
  font-size: 22px;
  font-weight: 900;
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease;
}
.join-code { letter-spacing: 0.5em; text-align: center; text-transform: uppercase; font-family: var(--display); }
.join-code:focus, .join-name:focus { border-color: var(--pink); }
.join-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.join-avatar {
  background: transparent; border: 3px solid transparent; border-radius: 14px;
  padding: 2px; cursor: pointer; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s ease;
}
.join-avatar.is-sel { border-color: var(--yellow); background: rgba(255, 213, 30, 0.12); transform: scale(1.08); }
.join .btn-primary { margin-top: 18px; }

/* ---------- waiting / drop / intro ---------- */
.pwait, .pdrop, .pintro, .presult {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 30px 24px;
}
.pwait-big, .pdrop-emoji, .presult-emoji { font-size: 74px; animation: introEmoji 0.9s cubic-bezier(0.34, 1.56, 0.64, 1); }
.pwait-msg, .pdrop-msg { font-size: 20px; font-weight: 900; }
.pwait-sub, .presult-note { color: var(--ink-dim); font-weight: 700; font-size: 14px; }
.pwait-spin {
  width: 54px; height: 54px; border-radius: 50%;
  border: 6px solid var(--card2); border-top-color: var(--pink);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pdrop .btn { min-width: 220px; }

.pintro-title { font-family: var(--display); font-size: clamp(30px, 9vw, 44px); color: var(--yellow); }
.pintro-tag { font-style: italic; font-weight: 700; color: var(--ink-dim); }
.pintro-ready { font-family: var(--display); font-size: 22px; margin-top: 20px; animation: fadePulse 1s infinite; }

.presult-big { font-family: var(--display); font-size: clamp(30px, 9vw, 46px); }
.presult.is-winner .presult-big { color: var(--yellow); text-shadow: 0 0 40px rgba(255, 213, 30, 0.5); }
.presult-score { font-size: 24px; font-weight: 900; color: var(--cyan); }

/* ---------- player lobby ---------- */
.plobby {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 26px 22px; text-align: center;
}
.plobby-chip { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.plobby-name { font-family: var(--display); font-size: 26px; }
.plobby-vip {
  background: var(--yellow); color: #3c2c00;
  font-weight: 900; font-size: 13px;
  border-radius: 999px; padding: 4px 14px;
}
.plobby-game {
  background: var(--card);
  border-top: 6px solid var(--gcolor, var(--purple));
  border-radius: var(--r-lg);
  padding: 18px 26px;
  width: min(86vw, 340px);
  animation: tilePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.plobby-game-emoji { font-size: 44px; }
.plobby-game-title { font-family: var(--display); font-size: 24px; color: var(--gcolor, var(--ink)); }
.plobby-game-tag { color: var(--ink-dim); font-size: 13px; font-style: italic; margin-top: 4px; }
.plobby-vipctl { display: flex; align-items: center; gap: 12px; }
.plobby-arrow { font-size: 22px; padding: 14px 18px; }
.plobby-hint { color: var(--ink-dim); font-weight: 700; font-size: 14px; }

/* ---------- tutorial slide (phone mirror) ---------- */
.ptut {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 26px 24px;
}
.ptut-badge {
  background: var(--gcolor, var(--purple)); color: #14041f;
  font-weight: 900; letter-spacing: 0.16em; font-size: 12px;
  border-radius: 999px; padding: 5px 16px;
}
.ptut-emoji { font-size: 70px; animation: introEmoji 0.7s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ptut-title { font-family: var(--display); font-size: 26px; color: var(--gcolor, var(--yellow)); }
.ptut-text { font-weight: 700; font-size: 16px; line-height: 1.5; color: var(--ink); max-width: 340px; }
.ptut-dots { display: flex; gap: 8px; margin-top: 6px; }
.ptut-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--card2); }
.ptut-dot.is-on { background: var(--gcolor, var(--yellow)); transform: scale(1.35); }
.ptut-hint { color: var(--ink-dim); font-weight: 700; font-size: 13px; animation: fadePulse 1.4s infinite; }
.ptut-skip { margin-top: 8px; }

/* game controllers get the whole stage */
.pgame { flex: 1; min-height: 0; display: flex; flex-direction: column; }
