/* PVP.GAMES Modern Handheld Console Design System
 * Exact Brand Guide v1 tokens from `majomain/pvpgames-frontend/app/pvp-theme/tokens.css`:
 * Ink (#141413), Ink Raised (#1D1D1B), Overlay (#262623), Charcoal (#34332F),
 * Stone (#7A766F), Bone (#EEE7D7), Ash (#A6A29B), Bronze hardware tones, and Rubik/UnifrakturCook.
 */

@font-face {
  font-family: "UnifrakturCook";
  src: url("./fonts/UnifrakturCook-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("./fonts/Rubik-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("./fonts/rubik-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("./fonts/rubik-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Brand palette (PvP Games Social Brand Guide v1) */
  --pvp-ink: #141413;
  --pvp-ink-raised: #1D1D1B;
  --pvp-ink-overlay: #262623;
  --pvp-bone: #EEE7D7;
  --pvp-bone-rgb: 238 231 215;
  --pvp-ash: #A6A29B;
  --pvp-ash-deep: #66635D;
  --pvp-charcoal: #34332F;
  --pvp-stone: #7A766F;
  --pvp-green: #7FBF8E;
  --pvp-red: #E58A7F;
  --pvp-red-strong: #C8423A;

  /* Bronze hardware tones */
  --pvp-bronze-200: #b9a98d;
  --pvp-bronze-400: #6b5d4c;
  --pvp-bronze-500: #5a5045;
  --pvp-bronze-600: #3a342d;
  --pvp-bronze-700: #2c2823;
  --pvp-bronze-800: #22201c;
  --pvp-recess-top: #26231f;
  --pvp-recess-bottom: #1a1917;
  --pvp-bronze-glow: 226 190 140;
  --pvp-sheen: 255 246 228;

  /* Typography & Motion */
  --font-brand: "UnifrakturCook", Georgia, serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --ease-out: cubic-bezier(0.2, 0.75, 0.25, 1);

  --radius-shell: 32px;
  --pad-scale: 1;
  --pad-size: calc(158px * var(--pad-scale));
  font-family: var(--font-body);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 50% -12%, rgb(var(--pvp-bronze-glow) / 0.08) 0%, var(--pvp-ink) 56%);
  color: var(--pvp-bone);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

html.in-game, html.in-game body {
  overscroll-behavior: none;
}

.hidden { display: none !important; }
button, input, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--pvp-bone);
  outline-offset: 2px;
}

.pvp-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Minimal Sticky PVP.GAMES Header ─────────────────────────────────────── */
.pvp-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: max(8px, env(safe-area-inset-top)) clamp(12px, 3vw, 28px) 8px;
  background: rgb(20 20 19 / 0.92);
  backdrop-filter: saturate(1.1) blur(10px);
  -webkit-backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid var(--pvp-charcoal);
}

.pvp-bar-left, .pvp-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pvp-bar-left { flex: 1; overflow: hidden; }

.pvp-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--pvp-bone);
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}
.pvp-wordmark img {
  width: 30px;
  height: 30px;
  display: block;
  flex: none;
}
.pvp-wordmark span {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  color: var(--pvp-bone);
}

.pvp-bar-sep {
  width: 1px;
  height: 20px;
  background: var(--pvp-charcoal);
  flex: none;
}

.pvp-game-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 24px 2px 0;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 26px), transparent 100%);
}
.pvp-game-pills::-webkit-scrollbar { display: none; }

.pvp-game-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--pvp-charcoal);
  background: var(--pvp-ink-raised);
  color: var(--pvp-ash);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}
.pvp-game-pill:hover {
  border-color: var(--pvp-stone);
  color: var(--pvp-bone);
  background: var(--pvp-ink-overlay);
}
.pvp-game-pill.active {
  background: var(--pvp-bone);
  color: var(--pvp-ink);
  border-color: var(--pvp-bone);
  font-weight: 700;
}
.pvp-game-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pvp-green);
}
.pvp-game-pill.active .pill-dot {
  background: var(--pvp-ink);
  opacity: 0.7;
}

.pvp-icon-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  min-width: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--pvp-charcoal);
  background: transparent;
  color: var(--pvp-ash);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}
.pvp-icon-pill.icon-only { padding: 0; width: 36px; }
.pvp-icon-pill:hover {
  border-color: var(--pvp-stone);
  color: var(--pvp-bone);
  background: var(--pvp-ink-raised);
}
.pvp-icon-pill svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pvp-room-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pvp-green);
}

/* ── Main Centered Handheld Stage ─────────────────────────────────────────── */
.pvp-stage-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.4vh, 28px) clamp(10px, 2.5vw, 24px) max(18px, env(safe-area-inset-bottom));
}

/* Matte Ink & Brushed-Bronze Hardware Chassis */
.pvp-handheld {
  width: min(1140px, 100%);
  position: relative;
  display: grid;
  grid-template-columns: var(--pad-size) minmax(0, 1fr) var(--pad-size);
  grid-template-areas: "left screen right";
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
  padding: clamp(16px, 2.2vw, 26px) clamp(18px, 2.6vw, 32px);
  border-radius: var(--radius-shell);
  border: 1px solid var(--pvp-bronze-600);
  background: linear-gradient(160deg, #272521 0%, var(--pvp-ink-raised) 48%, var(--pvp-ink) 100%);
  box-shadow:
    inset 0 1px 0 rgb(var(--pvp-sheen) / 0.1),
    inset 0 -5px 0 rgb(0 0 0 / 0.45),
    0 24px 64px rgb(0 0 0 / 0.6);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
}

.pvp-handheld[data-pad-size="s"] { --pad-scale: 0.86; }
.pvp-handheld[data-pad-size="m"] { --pad-scale: 1; }
.pvp-handheld[data-pad-size="l"] { --pad-scale: 1.13; }
.pvp-handheld.drag-over {
  border-color: var(--pvp-bone);
  box-shadow: 0 0 0 2px var(--pvp-bone), 0 24px 64px rgb(0 0 0 / 0.7);
}

.hh-left { grid-area: left; }
.hh-screen-unit { grid-area: screen; min-width: 0; position: relative; }
.hh-right { grid-area: right; }

/* Recessed Ink Glass Display Framed in Bronze-Charcoal */
.hh-bezel {
  padding: 8px 10px 10px;
  border-radius: 18px 18px 28px 18px;
  border: 1px solid var(--pvp-bronze-600);
  background: linear-gradient(180deg, #121110 0%, #0b0b0a 100%);
  box-shadow:
    inset 0 6px 18px rgb(0 0 0 / 0.75),
    0 1px 0 rgb(var(--pvp-sheen) / 0.06);
}

.hh-bezel-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  padding: 0 4px 7px;
}

.hh-power-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pvp-bronze-500);
  transition: background var(--duration-base), box-shadow var(--duration-base);
}
.hh-power-led.live {
  background: var(--pvp-green);
  box-shadow: 0 0 8px rgb(127 191 142 / 0.75);
}

.hh-bezel-title {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pvp-ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hh-room-badge {
  flex: none;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgb(127 191 142 / 0.45);
  background: rgb(127 191 142 / 0.12);
  color: var(--pvp-green);
}

.hh-bezel-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hh-micro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--pvp-charcoal);
  background: var(--pvp-ink-raised);
  color: var(--pvp-ash);
  cursor: pointer;
}
.hh-micro-btn:hover { border-color: var(--pvp-bone); color: var(--pvp-bone); }
.hh-micro-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hh-glass {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #0c0c0b;
}

.hh-core-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0c0c0b;
}

/* Editorial Minimal Launch Screen Inside Glass (Ink + Bone + Bronze) */
.hh-launch-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 24%, rgb(var(--pvp-bronze-glow) / 0.11), transparent 62%),
    linear-gradient(180deg, #171614 0%, #0e0e0d 100%);
}

.hh-launch-inner {
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.hh-sys-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pvp-bronze-200);
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--pvp-bronze-600);
  background: rgb(var(--pvp-bronze-glow) / 0.06);
}

.hh-game-title {
  margin: 12px 0 6px;
  font-family: var(--font-body);
  font-size: clamp(1.55rem, 3.1vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--pvp-bone);
}

.hh-game-sub {
  margin: 0 0 22px;
  font-size: 0.85rem;
  color: var(--pvp-ash);
  line-height: 1.5;
}

.hh-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Primary CTA matches `.pvp-btn--primary` (Bone on Ink) */
.pvp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--pvp-bone);
  color: var(--pvp-ink);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}
.pvp-cta:hover { background: color-mix(in srgb, var(--pvp-bone) 86%, var(--pvp-ash)); }
.pvp-cta:active { transform: scale(0.97); }
.pvp-cta.full { width: 100%; }
.pvp-cta svg { width: 15px; height: 15px; }

/* Secondary CTA matches `.pvp-btn--secondary` (Stone outline) */
.pvp-cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--pvp-stone);
  background: transparent;
  color: var(--pvp-bone);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}
.pvp-cta-ghost:hover { border-color: var(--pvp-bone); background: rgb(var(--pvp-bone-rgb) / 0.06); }
.pvp-cta-ghost:active { transform: scale(0.97); }

.hh-empty-note { margin: 0 0 14px; font-size: 0.85rem; color: var(--pvp-ash); }

/* ── Animated PVP.GAMES OLED Console Boot Graphic ────────────────────────── */
.hh-launch-screen {
  transition: opacity 220ms var(--ease-out);
}
.hh-launch-screen.is-fading {
  opacity: 0;
  pointer-events: none;
}

.hh-boot-anim {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 42%, rgb(var(--pvp-bronze-glow) / 0.16) 0%, rgb(20 20 19 / 0.96) 62%, #090908 100%);
  overflow: hidden;
}

.boot-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(var(--pvp-bone-rgb) / 0.11) 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: radial-gradient(circle at 50% 48%, #000 18%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 48%, #000 18%, transparent 78%);
  pointer-events: none;
}

.boot-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  top: -32%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgb(var(--pvp-bronze-glow) / 0.06) 45%,
    rgb(var(--pvp-bone-rgb) / 0.16) 50%,
    rgb(var(--pvp-bronze-glow) / 0.05) 56%,
    transparent 100%
  );
  animation: boot-scan 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

.boot-core-visual {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  max-width: 340px;
  width: 100%;
}

.boot-orb {
  position: relative;
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.boot-ring-outer {
  fill: none;
  stroke: var(--pvp-bronze-600);
  stroke-width: 1.2;
  stroke-dasharray: 18 8 4 8;
  transform-origin: 60px 60px;
  animation: boot-spin-cw 11s linear infinite;
}

.boot-ring-inner {
  fill: none;
  stroke: rgb(var(--pvp-bronze-glow) / 0.42);
  stroke-width: 1;
  stroke-dasharray: 10 12;
  transform-origin: 60px 60px;
  animation: boot-spin-ccw 7.5s linear infinite;
}

.boot-arc-track {
  fill: none;
  stroke: rgb(var(--pvp-bone-rgb) / 0.1);
  stroke-width: 3;
}

.boot-arc-fill {
  fill: none;
  stroke: var(--pvp-bone);
  stroke-width: 3.2;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  transition: stroke-dashoffset 220ms var(--ease-out), stroke 220ms var(--ease-out);
  filter: drop-shadow(0 0 6px rgb(var(--pvp-bronze-glow) / 0.5));
}
.boot-arc-fill.is-done {
  stroke: var(--pvp-green);
}

.boot-crest-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #22201d 0%, #121110 100%);
  border: 1px solid var(--pvp-bronze-500);
  box-shadow: 0 0 22px rgb(var(--pvp-bronze-glow) / 0.2), inset 0 1px 0 rgb(var(--pvp-sheen) / 0.15);
  animation: boot-crest-pulse 2s ease-in-out infinite;
}
.boot-crest-wrap img {
  width: 34px;
  height: 34px;
  display: block;
}

.boot-pct {
  position: absolute;
  bottom: -6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--pvp-ink);
  border: 1px solid var(--pvp-bronze-600);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--pvp-bone);
  font-variant-numeric: tabular-nums;
}

.boot-eq {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 14px;
  margin-top: 2px;
}
.boot-eq span {
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: var(--pvp-bronze-200);
  animation: boot-eq 0.9s ease-in-out infinite;
}
.boot-eq span:nth-child(2) { animation-delay: 0.14s; background: var(--pvp-bone); }
.boot-eq span:nth-child(3) { animation-delay: 0.28s; background: var(--pvp-green); }
.boot-eq span:nth-child(4) { animation-delay: 0.42s; background: var(--pvp-bone); }
.boot-eq span:nth-child(5) { animation-delay: 0.56s; }

.boot-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.boot-sys-tag {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pvp-bronze-200);
}
.boot-title {
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--pvp-bone);
}

.boot-stages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.boot-stage {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--pvp-charcoal);
  background: rgb(20 20 19 / 0.72);
  color: var(--pvp-ash-deep);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 180ms, color 180ms, background 180ms;
}
.boot-stage i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pvp-charcoal);
}
.boot-stage.active {
  border-color: var(--pvp-bronze-200);
  color: var(--pvp-bone);
  background: rgb(var(--pvp-bronze-glow) / 0.12);
}
.boot-stage.active i {
  background: var(--pvp-bronze-200);
  box-shadow: 0 0 6px rgb(var(--pvp-bronze-glow) / 0.75);
}
.boot-stage.done {
  border-color: rgb(127 191 142 / 0.5);
  color: var(--pvp-green);
  background: rgb(127 191 142 / 0.08);
}
.boot-stage.done i {
  background: var(--pvp-green);
}

.boot-telemetry {
  margin: 0;
  font-size: 0.72rem;
  color: var(--pvp-ash);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  min-height: 18px;
}

@keyframes boot-spin-cw {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes boot-spin-ccw {
  from { transform: rotate(360deg); }
  to   { transform: rotate(0deg); }
}
@keyframes boot-scan {
  0%   { top: -32%; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { top: 104%; opacity: 0; }
}
@keyframes boot-crest-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 18px rgb(var(--pvp-bronze-glow) / 0.16); }
  50%      { transform: scale(1.045); box-shadow: 0 0 28px rgb(var(--pvp-bronze-glow) / 0.34); }
}
@keyframes boot-eq {
  0%, 100% { height: 4px; opacity: 0.45; }
  50%      { height: 14px; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .boot-scanline, .boot-ring-outer, .boot-ring-inner, .boot-crest-wrap, .boot-eq span {
    animation: none !important;
  }
}

.hh-err {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgb(200 66 58 / 0.14);
  border: 1px solid var(--pvp-red-strong);
  color: var(--pvp-red);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* ── Left & Right Brushed-Bronze & Charcoal Hardware Grips ───────────────── */
.hh-grip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  touch-action: none;
}

/* Curved Matte Shoulder Bumpers */
.hh-bumper {
  width: 100%;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 16px 16px 10px 10px;
  border: 1px solid #0e0d0c;
  background: linear-gradient(180deg, var(--pvp-bronze-600) 0%, var(--pvp-bronze-800) 100%);
  color: var(--pvp-bone);
  box-shadow: 0 4px 0 #0a0a09, inset 0 1px 0 rgb(var(--pvp-sheen) / 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  touch-action: none;
  transition: transform 60ms, box-shadow 60ms, border-color 60ms, background 60ms;
}
.hh-bumper b { font-size: 0.88rem; font-weight: 700; color: var(--pvp-bone); }
.hh-bumper small {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--pvp-ash);
  text-transform: uppercase;
}
.hh-bumper.is-pressed {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #0a0a09, inset 0 2px 6px rgb(0 0 0 / 0.55);
  background: linear-gradient(180deg, var(--pvp-bronze-500) 0%, var(--pvp-bronze-700) 100%);
  border-color: var(--pvp-bronze-200);
}

/* Recessed Hardware Analog Thumbstick (Bronze-Charcoal Well) */
.hh-stick {
  width: var(--pad-size);
  aspect-ratio: 1;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle, #0e0d0c 0 48%, var(--pvp-bronze-700) 49% 55%, var(--pvp-recess-bottom) 57% 71%, var(--pvp-bronze-600) 73%);
  box-shadow: inset 0 3px 10px rgb(0 0 0 / 0.72), 0 1px 0 rgb(var(--pvp-sheen) / 0.08);
  touch-action: none;
  cursor: grab;
}
.hh-stick-ring {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  border: 1px solid rgb(var(--pvp-bronze-glow) / 0.16);
  pointer-events: none;
}
.hh-stick-dir {
  position: absolute;
  font-size: 10px;
  color: rgb(var(--pvp-bone-rgb) / 0.32);
  pointer-events: none;
}
.hh-stick-dir.up { top: 8px; left: 50%; transform: translateX(-50%); }
.hh-stick-dir.down { bottom: 8px; left: 50%; transform: translateX(-50%); }
.hh-stick-dir.left { left: 9px; top: 50%; transform: translateY(-50%); }
.hh-stick-dir.right { right: 9px; top: 50%; transform: translateY(-50%); }
.hh-stick-dir.is-pressed { color: var(--pvp-bone); text-shadow: 0 0 8px rgb(var(--pvp-bronze-glow) / 0.65); }

.hh-stick-cap {
  position: absolute;
  left: 28%;
  top: 28%;
  width: 44%;
  height: 44%;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #6d665c, #443f38 46%, #24221e 76%);
  border: 1px solid #100f0e;
  box-shadow: 0 5px 0 #090908, 0 9px 14px rgb(0 0 0 / 0.65), inset 0 2px 2px rgb(var(--pvp-sheen) / 0.22);
  pointer-events: none;
  transition: transform 35ms linear;
}
.hh-stick-cap::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 2px solid rgb(18 16 14 / 0.48);
  box-shadow: inset 0 0 0 3px rgb(var(--pvp-bronze-glow) / 0.14);
}
.hh-stick-cap.is-tilted { border-color: var(--pvp-bronze-200); }

/* Sculpted Continuous 3x3 Slide Cross D-Pad */
.hh-dpad {
  width: var(--pad-size);
  aspect-ratio: 1;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle, #100f0e 0 58%, var(--pvp-bronze-700) 60% 74%, var(--pvp-recess-bottom) 76%);
  box-shadow: inset 0 3px 10px rgb(0 0 0 / 0.72), 0 1px 0 rgb(var(--pvp-sheen) / 0.08);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 10%;
  gap: 3px;
  touch-action: none;
}
.hh-dpad-arm {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--pvp-bronze-600) 0%, var(--pvp-bronze-800) 100%);
  border: 1px solid #0e0d0c;
  box-shadow: 0 3px 0 #090908, inset 0 1px 0 rgb(var(--pvp-sheen) / 0.14);
  color: var(--pvp-ash);
  font-size: 12px;
  pointer-events: none;
  transition: background 50ms, color 50ms;
}
.hh-dpad-arm.empty { background: transparent; border: 0; box-shadow: none; }
.hh-dpad-arm.center {
  background: radial-gradient(circle, #1a1917 30%, #2a2621 100%);
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.55);
  color: transparent;
}
.hh-dpad-arm.is-pressed {
  background: linear-gradient(180deg, var(--pvp-bronze-400) 0%, var(--pvp-bronze-600) 100%);
  color: var(--pvp-bone);
  box-shadow: 0 1px 0 #090908, inset 0 2px 5px rgb(0 0 0 / 0.45);
}

/* Sculpted 3D Hardware Face Diamond (Refined Brand-Matched Tones) */
.hh-diamond {
  position: relative;
  width: var(--pad-size);
  aspect-ratio: 1;
  touch-action: none;
}

.hh-face {
  position: absolute;
  width: 38%;
  aspect-ratio: 1;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  border: 1px solid #0e0d0c;
  background: radial-gradient(circle at 34% 26%, #454039, var(--pvp-bronze-700) 56%, var(--pvp-recess-bottom) 100%);
  box-shadow: 0 5px 0 #090908, inset 0 1px 0 rgb(var(--pvp-sheen) / 0.2);
  color: var(--pvp-bone);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  cursor: pointer;
  touch-action: none;
  transition: transform 60ms, box-shadow 60ms, border-color 60ms, filter 60ms;
}
.hh-face b { font-size: 1rem; font-weight: 700; line-height: 1; }
.hh-face small {
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--pvp-ash);
  text-transform: uppercase;
}
.hh-face.north { top: 0; left: 31%; }
.hh-face.north b { color: var(--pvp-green); }
.hh-face.west  { left: 0; top: 31%; }
.hh-face.west b { color: var(--pvp-bronze-200); }
.hh-face.east  { right: 0; top: 31%; }
.hh-face.east b { color: var(--pvp-red); }
.hh-face.south { bottom: 0; left: 31%; border-color: var(--pvp-bronze-500); }
.hh-face.south b { color: var(--pvp-bone); }

.hh-face.is-pressed {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #090908, inset 0 2px 7px rgb(0 0 0 / 0.65);
  border-color: var(--pvp-bone);
  filter: brightness(1.18);
}
.hh-face.is-pressed small { color: var(--pvp-bone); }

/* 6-Button CPS-3 Arcade Grid (3rd Strike) */
.hh-sixgrid {
  width: var(--pad-size);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  touch-action: none;
}
.hh-sixgrid .hh-face {
  position: static;
  width: 100%;
  min-width: 44px;
  min-height: 44px;
}

.hh-caption {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--pvp-ash-deep);
  text-transform: uppercase;
}

/* Angled Rubber SELECT / START Pills */
.hh-system-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 10px;
}

.hh-pill-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 58px;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--pvp-ash);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  cursor: pointer;
  touch-action: none;
}
.hh-pill-bar {
  width: 38px;
  height: 9px;
  margin: 6px 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pvp-bronze-500) 0%, var(--pvp-bronze-700) 100%);
  box-shadow: 0 3px 0 #090908, inset 0 1px 0 rgb(var(--pvp-sheen) / 0.16);
  transform: rotate(-16deg);
  transition: transform 60ms, box-shadow 60ms;
}
.hh-pill-btn.is-pressed .hh-pill-bar {
  transform: rotate(-16deg) translateY(2px);
  box-shadow: 0 1px 0 #090908, inset 0 2px 4px rgb(0 0 0 / 0.55);
}
.hh-pill-btn.is-pressed small { color: var(--pvp-bone); }

.hh-speaker {
  display: none;
  position: absolute;
  right: 12px;
  bottom: 4px;
  width: 46px;
  height: 28px;
  background-image: radial-gradient(circle, #0a0a09 0 38%, transparent 45%);
  background-size: 9px 9px;
  transform: rotate(-24deg);
  pointer-events: none;
}

.pvp-desktop-hint {
  margin: 14px 0 0;
  font-size: 0.75rem;
  color: var(--pvp-ash-deep);
  text-align: center;
}

@media (hover: none) and (pointer: coarse) {
  .pvp-desktop-hint { display: none; }
}

/* ── Mobile Portrait: Sleek Pocket Handheld ───────────────────────────────── */
@media (max-width: 820px) {
  .hide-xs { display: none; }
  .pvp-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  }
  .pvp-bar-left { display: contents; }
  .pvp-wordmark { grid-column: 1; grid-row: 1; justify-self: start; }
  .pvp-bar-right { grid-column: 2; grid-row: 1; justify-self: end; }
  .pvp-bar-sep { display: none; }
  .pvp-game-pills { grid-column: 1 / -1; grid-row: 2; padding-top: 0; }
  #btn-invite span { display: none; }
  #btn-invite { padding: 0; width: 36px; }
  .pvp-stage-wrap {
    justify-content: flex-start;
    padding: 8px 8px max(14px, env(safe-area-inset-bottom));
  }
  .pvp-handheld {
    --pad-size: min(calc((100vw - 68px) / 2), calc(154px * var(--pad-scale)));
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "screen screen"
      "left right";
    row-gap: 14px;
    column-gap: 10px;
    padding: 12px 12px 24px;
    border-radius: 24px 24px 48px 24px;
  }
  .hh-bezel { padding: 6px 8px 8px; border-radius: 14px 14px 24px 14px; }
  .hh-grip { gap: 10px; }
  .hh-speaker { display: block; }
  .hh-game-title { font-size: 1.45rem; }
  .hh-game-sub { margin-bottom: 14px; font-size: 0.78rem; }
}

/* ── Mobile Landscape & Fullscreen: Edge-to-Edge Handheld ─────────────────── */
@media (orientation: landscape) and (max-height: 540px) {
  .pvp-bar {
    display: flex;
    flex-wrap: nowrap;
    min-height: 40px;
    padding: 3px 12px;
  }
  .pvp-bar-left { display: flex; flex-wrap: nowrap; overflow: hidden; }
  .pvp-wordmark img { width: 24px; height: 24px; }
  .pvp-wordmark span { font-size: 0.84rem; }
  .pvp-bar-sep { display: block; }
  .pvp-game-pills { padding-top: 0; }
  .pvp-game-pill { min-height: 28px; padding: 0 11px; font-size: 0.76rem; }
  .pvp-icon-pill { min-height: 28px; min-width: 28px; padding: 0 10px; font-size: 0.74rem; }
  .pvp-icon-pill.icon-only { width: 28px; padding: 0; }
  #btn-invite { width: auto; padding: 0 10px; }
  #btn-invite span { display: inline; }
  .pvp-stage-wrap {
    padding: 3px max(8px, env(safe-area-inset-right)) 3px max(8px, env(safe-area-inset-left));
  }
  .pvp-handheld {
    --pad-size: min(132px, 31dvh);
    height: calc(100dvh - 46px);
    padding: 6px 14px;
    border-radius: 20px;
    gap: 10px;
    overflow: hidden;
  }
  .hh-grip { gap: 8px; }
  .hh-bumper { min-height: 34px; padding: 4px 10px; }
  .hh-bezel { padding: 4px 6px 5px; }
  .hh-bezel-top { min-height: 16px; padding-bottom: 4px; }
  .hh-glass {
    height: calc(100dvh - 140px);
    max-width: 100%;
    width: auto;
    margin: 0 auto;
  }
  .hh-system-row { margin-top: 5px; gap: 22px; }
  .hh-pill-btn { min-height: 26px; gap: 4px; }
  .hh-pill-bar { width: 32px; height: 7px; margin: 2px 0 3px; transform: rotate(-14deg); }
  .hh-caption { display: none; }
  .pvp-desktop-hint { display: none; }
  .boot-core-visual { gap: 5px; }
  .boot-orb { width: 78px; height: 78px; }
  .boot-crest-wrap { width: 42px; height: 42px; }
  .boot-crest-wrap img { width: 26px; height: 26px; }
  .boot-eq { height: 10px; }
  .boot-title { font-size: 0.96rem; }
}

.pvp-handheld:fullscreen {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  border-radius: 0;
  border: 0;
  padding: max(10px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}
.pvp-handheld:fullscreen .hh-glass {
  max-height: calc(100dvh - 110px);
  width: auto;
  margin: 0 auto;
}

/* ── Modal Sheets (Exact `.pvp-modal` Tokens: Ink Overlay + Charcoal) ────── */
.pvp-sheet {
  width: min(540px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--pvp-charcoal);
  background: var(--pvp-ink-overlay);
  color: var(--pvp-bone);
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.55);
}
.pvp-sheet.narrow { width: min(420px, calc(100vw - 24px)); }
.pvp-sheet::backdrop {
  background: rgb(20 20 19 / 0.78);
  backdrop-filter: blur(6px);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--pvp-charcoal);
}
.sheet-head h2 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.sheet-sub { margin: 4px 0 0; font-size: 0.78rem; color: var(--pvp-ash); line-height: 1.45; }
.sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--pvp-charcoal);
  background: transparent;
  color: var(--pvp-ash);
  cursor: pointer;
  flex: none;
}
.sheet-close:hover { border-color: var(--pvp-bone); color: var(--pvp-bone); }

.sheet-body { padding: 16px 22px 22px; }
.sheet-lead { margin: 0 0 16px; font-size: 0.84rem; color: var(--pvp-ash); line-height: 1.5; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--pvp-charcoal);
}
.setting-row strong { display: block; font-size: 0.88rem; font-weight: 500; }
.setting-row small { display: block; font-size: 0.75rem; color: var(--pvp-ash); margin-top: 2px; }

.seg-control {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--pvp-charcoal);
  background: var(--pvp-ink);
}
.seg-control button {
  min-width: 44px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--pvp-ash);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
}
.seg-control button.active {
  background: var(--pvp-bone);
  color: var(--pvp-ink);
  font-weight: 700;
}

.toggle-pill {
  min-width: 60px;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--pvp-stone);
  background: transparent;
  color: var(--pvp-ash);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}
.toggle-pill[aria-pressed="true"] {
  border-color: var(--pvp-bone);
  background: var(--pvp-bone);
  color: var(--pvp-ink);
  font-weight: 700;
}

.setting-tip {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: var(--pvp-ink);
  border: 1px solid var(--pvp-charcoal);
  font-size: 0.78rem;
  color: var(--pvp-ash);
  line-height: 1.5;
}

/* Invite Form */
.invite-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.invite-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--pvp-ash);
}
.pvp-sheet input, .pvp-sheet select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--pvp-stone);
  background: var(--pvp-ink);
  color: var(--pvp-bone);
  font-size: 0.86rem;
}

.invite-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  color: var(--pvp-ash);
  font-size: 0.74rem;
}
.invite-divider::before, .invite-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--pvp-charcoal);
}

.join-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.seg-control.full {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}
.seg-control.compact button {
  min-height: 26px;
  padding: 0 9px;
  font-size: 0.7rem;
}

.mp-mode-block {
  margin-bottom: 12px;
}
.mp-mode-label {
  display: block;
  font-size: 0.74rem;
  color: var(--pvp-ash);
  margin-bottom: 6px;
}
.mp-mode-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--pvp-ash);
  line-height: 1.4;
}

.room-live-card {
  margin-top: 4px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--pvp-bronze-500);
  background: var(--pvp-ink-raised);
}
.room-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}
.room-head-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.room-ping-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--pvp-charcoal);
  background: var(--pvp-ink);
  color: var(--pvp-green);
  font-variant-numeric: tabular-nums;
}
.room-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  margin-bottom: 10px;
  border-top: 1px solid var(--pvp-charcoal);
  border-bottom: 1px solid var(--pvp-charcoal);
}
.room-mode-tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--pvp-bronze-200);
}
.pvp-mini-btn {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--pvp-bone);
  background: transparent;
  color: var(--pvp-bone);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
}
.pvp-mini-btn:hover { background: rgb(var(--pvp-bone-rgb) / 0.08); }
.pvp-mini-btn.muted {
  border-color: var(--pvp-charcoal);
  color: var(--pvp-ash);
}
.pvp-mini-btn.muted:hover { border-color: var(--pvp-stone); color: var(--pvp-bone); }
.room-roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}
.room-roster li { display: flex; align-items: center; justify-content: space-between; color: var(--pvp-ash); }
.room-roster strong { color: var(--pvp-bone); }
.room-roster .on { color: var(--pvp-green); font-weight: 500; }
.room-roster .wait { color: var(--pvp-bronze-200); }
.room-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.room-secondary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.room-secondary-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.room-pill-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.room-transport-pill,
.room-relays-pill {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--pvp-bronze-500);
  background: rgb(var(--pvp-bronze-glow) / 0.08);
  color: var(--pvp-bronze-200);
}
.room-transport-pill.is-p2p {
  border-color: rgb(127 191 142 / 0.55);
  background: rgb(127 191 142 / 0.14);
  color: var(--pvp-green);
}
.room-relays-pill {
  border-color: var(--pvp-charcoal);
  background: var(--pvp-ink);
  color: var(--pvp-ash);
  font-variant-numeric: tabular-nums;
}
.relay-config-details {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--pvp-charcoal);
}
.relay-config-details summary {
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--pvp-ash);
  user-select: none;
}
.relay-config-details summary:hover { color: var(--pvp-bone); }
.relay-config-hint {
  margin: 8px 0 8px;
  font-size: 0.72rem;
  color: var(--pvp-ash);
  line-height: 1.45;
}
.relay-config-hint code {
  color: var(--pvp-bronze-200);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.console-verify-badge {
  flex: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--pvp-charcoal);
  background: var(--pvp-ink);
  color: var(--pvp-ash);
  font-variant-numeric: tabular-nums;
}
.console-verify-badge.is-verified {
  border-color: rgb(127 191 142 / 0.5);
  background: rgb(127 191 142 / 0.12);
  color: var(--pvp-green);
}
.sheet-status { margin: 10px 0 0; font-size: 0.78rem; color: var(--pvp-bronze-200); min-height: 18px; }

/* Add Cartridge Vault Sheet */
.drop-banner {
  display: block;
  text-align: center;
  padding: 20px 16px;
  border-radius: 10px;
  border: 1.5px dashed var(--pvp-stone);
  background: var(--pvp-ink-raised);
  cursor: pointer;
  margin-bottom: 18px;
  transition: border-color var(--duration-fast);
}
.drop-banner strong { display: block; font-size: 0.88rem; font-weight: 500; color: var(--pvp-bone); }
.drop-banner span { display: block; font-size: 0.75rem; color: var(--pvp-ash); margin-top: 4px; }
.drop-banner:hover { border-color: var(--pvp-bone); }

.vault-section h3 {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pvp-ash);
}

.vault-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vault-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--pvp-charcoal);
  background: var(--pvp-ink-raised);
  color: var(--pvp-bone);
  text-align: left;
  width: 100%;
}
.vault-row.clickable { cursor: pointer; transition: border-color var(--duration-fast), background var(--duration-fast); }
.vault-row.clickable:hover { border-color: var(--pvp-bone); background: var(--pvp-ink-overlay); }
.vault-row strong { display: block; font-size: 0.86rem; font-weight: 500; }
.vault-row small { display: block; font-size: 0.73rem; color: var(--pvp-ash); }
.vault-badge {
  flex: none;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--pvp-green);
  color: var(--pvp-green);
}
.vault-badge.missing {
  border-color: var(--pvp-charcoal);
  color: var(--pvp-ash);
}

.vault-missing-details {
  margin-top: 16px;
  border-top: 1px solid var(--pvp-charcoal);
  padding-top: 12px;
}
.vault-missing-details summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pvp-ash);
  margin-bottom: 10px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Fast Invite & Seamless Tab-Switch UX Controls ────────────────────────── */
button.hh-room-badge {
  cursor: pointer;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}
button.hh-room-badge:hover {
  border-color: var(--pvp-bone);
}
button.hh-room-badge.is-waiting {
  border-color: rgb(var(--pvp-bronze-glow) / 0.5);
  background: rgb(var(--pvp-bronze-glow) / 0.14);
  color: var(--pvp-bronze-200);
}

.hh-copy-badge {
  position: relative;
  flex: none;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--pvp-bone);
  background: var(--pvp-bone);
  color: var(--pvp-ink);
  cursor: pointer;
}
/* Keep the bezel chip visually small; expand the tappable area to 44×44. */
.hh-copy-badge::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.hh-copy-badge:hover { opacity: 0.9; }

.hh-toast {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 25;
  max-width: calc(100% - 24px);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--pvp-green) 55%, transparent);
  background: color-mix(in srgb, var(--pvp-ink) 92%, transparent);
  color: var(--pvp-bone);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--pvp-ink) 55%, transparent);
  pointer-events: none;
}

.hh-unmute-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 22;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--pvp-bone);
  background: color-mix(in srgb, var(--pvp-ink) 90%, transparent);
  color: var(--pvp-bone);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--pvp-ink) 55%, transparent);
}

.room-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.room-share-bar .room-invite-input {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  font-size: 0.76rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--pvp-ash);
}
.room-share-bar .room-share-btn {
  flex: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  font-size: 0.78rem;
}
.room-share-bar .pvp-mini-btn {
  flex: none;
  min-height: 44px;
  min-width: 44px;
}

.room-qr-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(238, 231, 215, 0.14);
  background: rgba(12, 12, 11, 0.72);
}
.room-qr-code {
  flex: none;
  width: 132px;
  height: 132px;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.room-qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}
.room-qr-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.room-qr-copy strong {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--pvp-bone);
}
.room-qr-copy span {
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--pvp-ash);
}
@media (max-width: 480px) {
  .room-qr-wrap {
    flex-direction: column;
    text-align: center;
  }
  .room-qr-code {
    width: 164px;
    height: 164px;
  }
}

.room-reassure {
  margin: 0 0 10px;
  font-size: 0.73rem;
  color: var(--pvp-ash);
  line-height: 1.4;
}

.room-autostart-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 4px;
  font-size: 0.72rem;
  color: var(--pvp-bone);
  cursor: pointer;
  user-select: none;
}
.room-autostart-pill input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  accent-color: var(--pvp-green);
  cursor: pointer;
  pointer-events: none;
}
