* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --pink: #ff4f9a;
  --teal: #2dd4bf;
  --yellow: #facc15;
  --bg: #101018;
  --panel: rgba(18, 18, 30, 0.88);
  --panel-border: rgba(255, 255, 255, 0.12);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: #f1f1f4;
  font-family: "Segoe UI", system-ui, sans-serif;
  user-select: none;
}

.hidden { display: none !important; }

.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
}

/* ============================ menu ============================ */

#menu-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.menu-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  pointer-events: none;
}
.menu-overlay > * { pointer-events: auto; }

.game-title {
  font-size: clamp(52px, 9vw, 110px);
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
}
.t-paint {
  background: linear-gradient(120deg, var(--pink), var(--yellow), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.t-amp { color: #ffffff; }
.t-seek { color: #cfd4ff; }

.tagline {
  font-size: 18px;
  color: #c9cbe0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.menu-card {
  margin-top: 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, 90vw);
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

input[type="text"] {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}
input[type="text"]:focus { border-color: var(--teal); }
#code-input {
  width: 110px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 6px;
  font-weight: 700;
}
.join-row { display: flex; gap: 10px; }
.join-row .btn { flex: 1; }

/* ============================ buttons ============================ */

.btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--panel-border);
  color: #fff;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.18); }
.btn:active { transform: scale(0.97); }
.btn-big { padding: 14px 20px; font-size: 17px; }
.btn-primary {
  background: linear-gradient(120deg, var(--pink), #b33bf0);
  border: none;
}
.btn-primary:hover { filter: brightness(1.15); background: linear-gradient(120deg, var(--pink), #b33bf0); }
.btn-primary:disabled { filter: grayscale(0.8); cursor: not-allowed; }
.btn-icon {
  position: absolute;
  bottom: 22px;
  right: 24px;
  font-size: 20px;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  padding: 0;
}
.btn-icon.off { opacity: 0.4; }

.error-text { color: #ff7b7b; font-size: 14px; min-height: 18px; }
.hint { color: #9aa0b8; font-size: 13px; }
.key-chip {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 12px;
  margin-left: 4px;
}

/* ============================ lobby ============================ */

#lobby-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  /* translucent scrim: the animated menu scene keeps looping behind it */
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(255, 79, 154, 0.12), transparent),
    radial-gradient(1000px 700px at 90% 100%, rgba(45, 212, 191, 0.1), transparent),
    rgba(10, 10, 18, 0.55);
}

.lobby-box {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 30px 34px;
  width: min(780px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.lobby-head h2 { font-size: 30px; display: flex; align-items: center; gap: 14px; }
.code-chip {
  background: linear-gradient(120deg, var(--teal), #4f9aff);
  color: #08222b;
  border-radius: 10px;
  padding: 3px 16px;
  letter-spacing: 8px;
  font-weight: 900;
}

.lobby-cols { display: flex; gap: 26px; flex-wrap: wrap; }
.lobby-players { flex: 1; min-width: 220px; }
.lobby-settings { flex: 1.2; min-width: 260px; display: flex; flex-direction: column; gap: 8px; }
.lobby-settings label { font-size: 13px; color: #9aa0b8; margin-top: 6px; }
.lobby-settings select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 15px;
}
.lobby-settings select:disabled { opacity: 0.55; }

.time-row { display: flex; gap: 12px; }
.time-row > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.time-row label { font-size: 13px; color: #9aa0b8; }
.time-row input[type="number"] {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 15px;
  width: 100%;
}
.time-row input[type="number"]:disabled { opacity: 0.55; }

.item-toggles {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.item-toggle {
  border: 2px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 5px 0 3px;
  text-align: center;
  cursor: pointer;
  font-size: 19px;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.item-toggle .it-role { display: block; font-size: 8px; color: #9aa0b8; letter-spacing: 0.5px; }
.item-toggle.off { opacity: 0.28; border-style: dashed; }
.item-toggle.locked { pointer-events: none; }

#player-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#player-list li {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
}
.host-star { color: var(--yellow); }
.role-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: 1px;
}
.role-badge.hunter { background: #7a1f2d; color: #ffb3c0; }
.role-badge.hider { background: #14532d; color: #a7f3d0; }
.role-badge.spectator { background: #333; color: #bbb; }

.map-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.map-tile {
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  width: 118px;
  transition: border-color 0.15s ease, transform 0.08s ease;
  background: rgba(255, 255, 255, 0.05);
}
.map-tile:hover { transform: translateY(-2px); }
.map-tile.selected { border-color: var(--teal); background: rgba(45, 212, 191, 0.12); }
.map-tile.disabled { pointer-events: none; opacity: 0.6; }
.map-swatch { height: 40px; border-radius: 7px; margin-bottom: 7px; }
.map-tile b { font-size: 14px; }
.map-tile p { font-size: 11px; color: #9aa0b8; margin-top: 2px; }

.lobby-actions { display: flex; justify-content: space-between; }

.toggle-row {
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin-top: 12px !important;
  font-size: 14px !important;
  color: #e6e8f5 !important;
  cursor: pointer;
}
.toggle-row input { width: 18px; height: 18px; accent-color: var(--teal); cursor: pointer; }
.toggle-row input:disabled { opacity: 0.5; }

/* lobby chat */
.lobby-chat {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#chat-messages {
  height: 110px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}
#chat-messages .chat-line b { color: var(--teal); }
#chat-messages .chat-line.system { color: #9aa0b8; font-style: italic; }
.chat-input-row { display: flex; gap: 8px; }
#chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: #fff;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 14px;
  outline: none;
}
#btn-chat-send { padding: 8px 14px; }

/* ============================ arcade lounge hud ============================ */

#lobby-hud { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
#lobby-hud .btn { pointer-events: auto; }

#btn-options {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--panel);
}
#lobby-code-mini {
  position: absolute;
  top: 18px;
  right: 16px;
  font-weight: 900;
  letter-spacing: 5px;
  color: var(--teal);
  text-shadow: 0 0 12px rgba(45, 212, 191, 0.6);
}
#arcade-hint {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 700;
  color: #ffe012;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  text-align: center;
}
.arcade-play {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(120deg, var(--pink), #b33bf0);
  border: none;
  font-size: 17px;
  padding: 12px 26px;
}
#btn-arcade-exit {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--panel);
}
#arcade-controls {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  pointer-events: auto;
}
.arcade-btn {
  min-width: 74px;
  height: 58px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(18, 18, 30, 0.75);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}
.arcade-btn:active { background: rgba(255, 224, 18, 0.5); }
.arcade-btn-big { min-width: 100px; height: 72px; font-size: 18px; }

#lobby-screen .lobby-box { position: relative; }

/* ============================ game hud ============================ */

#game-canvas, #lobby-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  touch-action: none;   /* no pull-to-refresh / pinch-zoom while playing */
}

#game-ui { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#game-ui .btn, #game-ui .popup { pointer-events: auto; }

#hud-top {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 8px 22px;
}
#hud-phase { font-weight: 900; letter-spacing: 2px; font-size: 14px; color: var(--yellow); }
#hud-phase.hunting { color: #ff6b6b; }
#hud-timer { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
#hud-hiders { font-size: 13px; color: #9aa0b8; }

#hud-role {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 8px 16px;
  font-weight: 800;
  letter-spacing: 1px;
}
#hud-role.hider { color: #6ee7b7; }
#hud-role.hunter { color: #ff8aa0; }
#hud-role.spectator { color: #aaa; }

#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 26px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
}
#crosshair.in-range { color: #ff4f4f; font-weight: 700; }

#cooldown-bar {
  position: absolute;
  top: calc(50% + 26px);
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 5px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  overflow: hidden;
}
#cooldown-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
  border-radius: 3px;
  transition: width 0.08s linear;
}

/* ============================ touch controls ============================ */

#touch-ui { position: fixed; inset: 0; pointer-events: none; z-index: 7; }

#joystick {
  position: absolute;
  bottom: 34px;
  left: 30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  pointer-events: auto;
  touch-action: none;
}
#joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: translate(-50%, -50%);
}

#touch-buttons {
  position: absolute;
  bottom: 34px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  pointer-events: auto;
}
.touch-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(18, 18, 30, 0.65);
  color: #fff;
  font-size: 24px;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.touch-btn.tb-big { width: 72px; height: 72px; font-size: 30px; }
.touch-btn:active { background: rgba(255, 255, 255, 0.3); }
.touch-btn.cooling { opacity: 0.35; }
.touch-btn.active { background: rgba(45, 212, 191, 0.45); border-color: var(--teal); }

/* ============================ paint studio ============================ */

.paint-studio { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.studio-wrap { position: relative; }
#paint3d {
  border-radius: 12px;
  background: #1a1a2b;
  touch-action: none;
  cursor: crosshair;
  max-width: 100%;
}
.zoom-btns {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.zoom-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(10, 10, 20, 0.7);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}
.zoom-btn:active { background: rgba(255, 255, 255, 0.25); }

.popup-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
}
.popup-x:hover { background: rgba(255, 80, 80, 0.4); }
.paint-tools { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.paint-tools > label { font-size: 12px; color: #9aa0b8; }

.brush-row { display: flex; gap: 8px; }
.brush-btn {
  width: 44px;
  height: 38px;
  border-radius: 9px;
  border: 2px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.brush-btn .dot { background: #fff; border-radius: 50%; display: block; }
.brush-btn.selected { border-color: var(--teal); background: rgba(45, 212, 191, 0.15); }

#hud-toast {
  position: absolute;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: center;
}
#hud-toast.show { opacity: 1; }

#hud-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  text-align: center;
}

#hud-buttons {
  position: absolute;
  bottom: 18px;
  right: 18px;
  display: flex;
  gap: 10px;
}
.hud-btn { background: var(--panel); }

/* pulsing red vignette while a nearby fire alarm rattles a hider's screen */
#alarm-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse at center,
    rgba(255, 20, 10, 0) 42%, rgba(255, 30, 16, 0.5) 100%);
  animation: alarm-flash 0.34s steps(2, jump-none) infinite;
}
@keyframes alarm-flash {
  0% { opacity: 0.25; }
  100% { opacity: 1; }
}

#blackout {
  position: absolute;
  inset: 0;
  background: #05050a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 6;
}
#blackout h2 { font-size: 34px; }
#blackout-timer { font-size: 90px; font-weight: 900; color: var(--yellow); font-variant-numeric: tabular-nums; }
.hunter-word { color: #ff6b6b; }

/* ============================ popups ============================ */

.popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 320px;
  max-width: 92vw;
  max-height: 94vh;
  overflow-y: auto;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 7;
}
.popup h3 { font-size: 21px; }
.popup h2 { font-size: 30px; }

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, 44px);
  gap: 9px;
}
.swatch {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.08s ease;
}
.swatch:hover { transform: scale(1.12); }
.swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px var(--teal); }

.custom-color-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #9aa0b8; }
input[type="color"] {
  width: 54px;
  height: 34px;
  border: none;
  border-radius: 7px;
  background: none;
  cursor: pointer;
}

.pose-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.pose-tile {
  border: 2px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 11px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  color: #fff;
  transition: transform 0.08s ease, border-color 0.15s ease;
}
.pose-tile:hover { transform: translateY(-2px); }
.pose-tile.selected { border-color: var(--pink); background: rgba(255, 79, 154, 0.13); }
.pose-tile .pose-emoji { font-size: 26px; display: block; margin-bottom: 5px; }
.pose-tile .pose-name { font-size: 12px; font-weight: 600; }

#gameover-popup { text-align: center; }
#gameover-title.hiders { color: #6ee7b7; }
#gameover-title.hunters { color: #ff8aa0; }

/* ============================ power-ups ============================ */

#powerup-toast {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(120deg, rgba(255, 194, 26, 0.95), rgba(255, 122, 26, 0.95));
  color: #3a2500;
  border-radius: 16px;
  padding: 14px 24px;
  box-shadow: 0 10px 50px rgba(255, 180, 0, 0.45);
  animation: powerpop 0.35s ease;
  z-index: 6;
}
#powerup-emoji { font-size: 40px; }
#powerup-toast b { font-size: 19px; letter-spacing: 0.5px; }
#powerup-toast p { font-size: 13px; margin-top: 2px; }
@keyframes powerpop {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  70% { transform: translate(-50%, -50%) scale(1.12); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

#shield-badge {
  position: absolute;
  top: 64px;
  left: 16px;
  background: rgba(255, 107, 176, 0.2);
  border: 1px solid rgba(255, 107, 176, 0.6);
  color: #ffb3d5;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

/* item roulette (mario-kart style) */
#roulette {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 92px;
  border-radius: 20px;
  background: linear-gradient(140deg, #2a2a44, #14142a);
  border: 3px solid var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(250, 204, 21, 0.45);
  z-index: 6;
}
#roulette-emoji { font-size: 52px; }
#roulette.settled { animation: powerpop 0.3s ease; border-color: #fff; }

/* inventory slots */
#inventory {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  pointer-events: auto;
}
.inv-slot {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  border: 2px solid var(--panel-border);
  background: var(--panel);
  position: relative;
  cursor: pointer;
  color: #fff;
}
.inv-slot .inv-emoji { font-size: 28px; line-height: 54px; }
.inv-slot .inv-key {
  position: absolute;
  top: 2px;
  left: 6px;
  font-size: 10px;
  color: #9aa0b8;
  font-weight: 700;
}
.inv-slot.filled { border-color: var(--yellow); background: rgba(250, 204, 21, 0.12); }
.inv-slot.filled:hover { transform: translateY(-2px); }
.inv-slot:not(.filled) { opacity: 0.4; cursor: default; }

/* active effect countdown rings */
#active-effects {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.fx-ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.fx-ring::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: rgba(10, 10, 20, 0.8);
}
.fx-ring span { position: relative; z-index: 1; font-size: 22px; }

/* compact HUD on phone-sized screens */
@media (max-width: 980px) {
  #hud-role { font-size: 11px; padding: 5px 9px; top: 10px; left: 10px; }
  #hud-top { padding: 4px 12px; gap: 10px; top: 8px; }
  #hud-phase { font-size: 11px; }
  #hud-timer { font-size: 19px; }
  #hud-hiders { font-size: 11px; }
  #hud-hint { font-size: 10px; bottom: 5px; }
  #hud-buttons { bottom: auto; top: 52px; right: 12px; }
  .hud-btn { padding: 7px 12px; font-size: 13px; }

  #inventory { bottom: 30px; gap: 8px; }
  .inv-slot { width: 46px; height: 46px; }
  .inv-slot .inv-emoji { font-size: 22px; line-height: 42px; }
  #active-effects { top: 56px; }
  .fx-ring { width: 38px; height: 38px; }
  .fx-ring span { font-size: 18px; }

  /* paint studio has to fit a landscape phone */
  .popup { padding: 12px 16px; gap: 8px; }
  .popup h3 { font-size: 16px; }
  .popup > .hint { display: none; }
  #paint3d { height: 52vh; width: auto; }
  .paint-tools { min-width: 170px; gap: 6px; }
  .swatch-grid { grid-template-columns: repeat(6, 32px); gap: 6px; }
  .swatch { width: 32px; height: 32px; }
  #chat-messages { height: 80px; }
}
