html, body.player-app { height: 100%; }

body.player-app {
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #082c27;
  color: #17211e;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

.player-screen {
  display: grid;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  height: var(--player-vh, 100dvh);
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  place-items: center;
}

.player-panel {
  width: min(100%, 520px);
  max-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 18px;
  background: #f8faf8;
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
}

.player-join { padding: clamp(22px, 6vw, 36px); }
.player-kicker { margin: 0 0 6px; color: #8d1838; font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.player-join h1, .player-vote h1 { margin: 0; color: #0b4037; font-size: clamp(1.75rem, 8vw, 2.35rem); line-height: 1; }
.player-instruction { margin: 12px 0 22px; color: #52615d; }
.player-join-form { display: grid; gap: 12px; }
.player-join-form label { color: #0b4037; font-weight: 800; }
.player-join-form input { min-height: 54px; border: 2px solid #71857f; border-radius: 10px; background: #fff; padding: 10px 12px; color: #17211e; font-size: 16px; }
.player-join-form button { min-height: 54px; width: 100%; border-radius: 10px; font-size: 1rem; font-weight: 900; }
.player-help { margin: 18px 0 0; color: #687773; font-size: .82rem; text-align: center; }

.player-game { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; height: 100%; }
.player-summary { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(2,minmax(0,.7fr)); background: #0b4037; color: #fff; }
.player-summary div { min-width: 0; padding: 11px 12px; border-right: 1px solid rgba(255,255,255,.18); }
.player-summary div:last-child { border-right: 0; }
.player-summary span, .player-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-summary span { color: #c7d8d3; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.player-summary strong { margin-top: 2px; font-size: 1.02rem; }
.player-round { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #d9e1de; background: #eef3f1; color: #43534e; font-size: .83rem; font-weight: 800; }
.player-round strong { color: #9b6718; font-size: 1.05rem; }
.player-vote { display: grid; min-height: 0; gap: 12px; padding: clamp(14px, 4vw, 22px); }
.player-vote h1 { align-self: end; font-size: clamp(1.35rem, 6vw, 1.8rem); }
.player-choices { display: grid; min-height: 0; grid-template-rows: repeat(3,minmax(58px,1fr)); gap: 10px; }
.player-choice { min-height: 58px; border: 0; border-radius: 12px; color: #fff; font: inherit; font-size: clamp(1rem, 5vw, 1.25rem); font-weight: 950; letter-spacing: .02em; text-transform: uppercase; touch-action: manipulation; }
.player-choice--safe { background: #176b4f; }
.player-choice--suspicious { background: #9b6718; }
.player-choice--phishing { background: #9a2342; }
.player-choice:disabled { opacity: .42; filter: grayscale(.25); }
.player-choice.is-selected { opacity: 1; filter: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #4ca5e8; }
.player-choice.is-selected::after { content: " ✓"; }
.player-choice:focus-visible { outline: 4px solid #4ca5e8; outline-offset: 2px; }
.player-status { min-height: 50px; margin: 0; padding: 12px 14px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #d9e1de; background: #fff; color: #31423d; font-size: .88rem; font-weight: 750; }

body[data-platform="ios"] .player-panel { border-radius: 22px; }
body[data-platform="android"] .player-choice { border-radius: 8px; }

@media (max-height: 620px) {
  .player-screen { padding-top: max(7px, env(safe-area-inset-top)); padding-bottom: max(7px, env(safe-area-inset-bottom)); }
  .player-vote { gap: 7px; padding: 10px 12px; }
  .player-choices { grid-template-rows: repeat(3,minmax(48px,1fr)); gap: 7px; }
  .player-choice { min-height: 48px; }
  .player-status { min-height: 42px; padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}

@media (min-width: 700px) and (min-height: 700px) {
  .player-game { height: min(760px, calc(100dvh - 40px)); }
}

@media (prefers-reduced-motion: reduce) {
  .player-app * { scroll-behavior: auto !important; }
}
