/* Player accounts UI — mobile-first, 44px targets */

.player-account-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.player-account-slot:empty {
  display: none;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--touch-min, 44px);
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.player-chip:hover,
.player-chip:focus-visible {
  border-color: rgba(124, 92, 255, 0.55);
  outline: none;
}

.player-chip .player-lvl {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min, 44px);
  min-width: var(--touch-min, 44px);
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.player-btn.primary {
  background: linear-gradient(135deg, var(--accent), #5a3fd4);
  border-color: transparent;
}

.player-btn.danger {
  background: rgba(255, 80, 100, 0.15);
  border-color: rgba(255, 80, 100, 0.35);
  color: #ffb3c0;
}

.player-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- account.html layout ---- */
.player-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px var(--page-pad, 16px) calc(40px + env(safe-area-inset-bottom, 0px));
}

.player-page h1 {
  font-size: 1.45rem;
  margin: 8px 0 4px;
}

.player-page .player-lead {
  color: var(--text-dim);
  margin: 0 0 20px;
  line-height: 1.5;
}

.player-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.player-tabs button {
  flex: 1;
  min-height: var(--touch-min, 44px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  cursor: pointer;
}

.player-tabs button[aria-selected="true"] {
  background: rgba(124, 92, 255, 0.2);
  color: var(--text);
  border-color: rgba(124, 92, 255, 0.45);
}

.player-card {
  background: var(--card, #1a1f2e);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 16px;
}

.player-card h2 {
  font-size: 1rem;
  margin: 0 0 12px;
}

.player-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.player-field label {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

.player-field input[type="text"],
.player-field input[type="email"],
.player-field input[type="password"] {
  min-height: var(--touch-min, 44px);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1rem;
  width: 100%;
}

.player-field input:focus {
  outline: 2px solid rgba(124, 92, 255, 0.55);
  border-color: transparent;
}

.player-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.player-check input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
}

.player-msg {
  min-height: 1.25em;
  font-size: 0.9rem;
  margin: 0 0 12px;
}

.player-msg.error {
  color: #ff8fa3;
}

.player-msg.ok {
  color: #6ee7b7;
}

.player-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.player-profile-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.player-profile-row:last-child {
  border-bottom: none;
}

.player-profile-row span:first-child {
  color: var(--text-dim);
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.player-hidden {
  display: none !important;
}

.player-disabled-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0 0 12px;
  line-height: 1.45;
}

.player-verify-status {
  font-weight: 700;
}

.player-verify-status.is-verified {
  color: #6ee7b7;
}

.player-verify-status.is-pending {
  color: #fbbf24;
}

.player-verify-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.player-verify-banner-ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(110, 231, 183, 0.35);
  color: #bbf7d0;
}

.player-verify-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.35);
  color: #ecfdf5;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Homepage minimal header: keep search + account */
.site-header-minimal .player-account-slot {
  margin-left: 8px;
}

@media (max-width: 420px) {
  .site-header-minimal .player-chip .player-name {
    max-width: 7ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ---- Gomini logo mark on play header ---- */
.logo-mark-img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
}

/* ---- Play page HUD ---- */
.player-hud {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: min(52vw, 280px);
}

.player-hud:empty {
  display: none;
}

.player-hud-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.player-hud-inner a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.player-hud .ph-name {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 10ch;
}

.player-hud .ph-lvl {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.player-hud .ph-xp {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* Floating chip — immersive only */
.player-hud-float {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 10px;
  z-index: 60;
  max-width: min(70vw, 220px);
  pointer-events: auto;
}

.player-hud-float .player-hud-inner {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  background: rgba(10, 12, 18, 0.88);
  backdrop-filter: blur(10px);
}

/* Hide header HUD in immersive; show float. Keep clear of exit (top-right) + anchor ad. */
body.play-immersive .play-header .player-hud {
  display: none !important;
}

body.play-immersive .player-hud-float:not([hidden]) {
  display: block;
}

body:not(.play-immersive) .player-hud-float {
  display: none !important;
}

@media (max-height: 420px) and (orientation: landscape) {
  .player-hud-float {
    top: calc(6px + env(safe-area-inset-top, 0px));
    left: 8px;
  }
  .player-hud-float .player-hud-inner {
    min-height: 30px;
    font-size: 0.75rem;
    padding: 2px 8px;
  }
}

/* XP toast */
.player-xp-toast {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 70;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 24, 40, 0.94);
  border: 1px solid rgba(124, 92, 255, 0.45);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

.player-xp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.play-immersive .player-xp-toast {
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}
