:root {
  --ink: #e8f4ef;
  --muted: #8fb8a8;
  --deep: #021820;
  --teal: #0a6b6e;
  --sand: #c9a66b;
  --coral: #e85d4c;
  --foam: #7ee0c8;
  --line: rgba(120, 200, 180, 0.28);
}

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

html, body, #app {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--deep);
  color: var(--ink);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  touch-action: none;
  user-select: none;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
}

.hidden { display: none !important; }

/* ——— HUD ——— */
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

#score-box {
  position: absolute;
  top: 16px;
  background: rgba(4, 28, 32, 0.78);
  border: 1px solid var(--line);
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

#score-box {
  left: 16px;
  padding: 10px 14px;
  min-width: 110px;
}

#score-box .label,
.lb-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

#score {
  font-family: Impact, Haettenschweiler, 'Arial Black', 'Segoe UI', sans-serif;
  font-size: 32px;
  color: var(--foam);
  line-height: 1.05;
}

.diff-hud {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #f0d48a;
}

.room-hud {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: rgba(4, 28, 32, 0.88);
  border: 1px solid rgba(126, 224, 200, 0.4);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7ee0c8;
  white-space: nowrap;
  max-width: calc(100vw - 120px);
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 45;
  pointer-events: none;
}

/* Mute discreto — abaixo do pause (não sobrepõe) */
.mute-btn {
  position: fixed;
  top: max(66px, calc(env(safe-area-inset-top) + 54px));
  right: max(14px, env(safe-area-inset-right));
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(126, 224, 200, 0.28);
  background: rgba(4, 28, 32, 0.55);
  color: #9fd8c8;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  opacity: 0.72;
  backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Com controles touch: reserva espaço do pause (48px) acima */
body.touch-ui .mute-btn {
  top: max(72px, calc(env(safe-area-inset-top) + 64px));
}

.mute-btn:hover,
.mute-btn:focus-visible {
  opacity: 1;
  outline: none;
  border-color: rgba(126, 224, 200, 0.55);
}

.mute-btn.is-muted {
  opacity: 0.55;
  color: #8aa8a0;
}

.mute-btn .mute-svg {
  display: none;
}

.mute-btn:not(.is-muted) .mute-on,
.mute-btn.is-muted .mute-off {
  display: block;
}

.magnet-hud {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 800;
  color: var(--foam);
}

.scrap-hud {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #f0d48a;
}

/* Ranking só no overlay de pausa */
.pause-leaderboard,
#leaderboard.pause-leaderboard {
  position: relative;
  right: auto;
  top: auto;
  width: 100%;
  max-width: 280px;
  margin: 0 auto 14px;
  padding: 10px 12px;
  background: rgba(4, 28, 32, 0.72);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: left;
}

.lb-title { margin-bottom: 8px; }

#lb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#lb-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 4px;
}

#lb-list li.me {
  background: rgba(232, 93, 76, 0.22);
  color: #ffd2c8;
}

#lb-list .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 118px;
}

/* ——— Touch pad (APK / celular) ——— */
.touch-pad {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.touch-pad .touch-btn,
.touch-pad .stick {
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
}

.stick {
  position: absolute;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 128px;
  height: 128px;
}

.stick-base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(4, 28, 36, 0.45);
  border: 2px solid rgba(120, 200, 180, 0.35);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.35);
}

.stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7ee0c8, #0a6b6e 70%, #043038);
  border: 2px solid rgba(230, 255, 245, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.stick.active .stick-base {
  border-color: rgba(126, 224, 200, 0.65);
}

.touch-actions {
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}

.touch-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(126, 224, 200, 0.4);
  background: rgba(4, 28, 36, 0.62);
  color: #e8f4ef;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.touch-btn span {
  pointer-events: none;
}

.touch-btn.pressed,
.touch-btn:active {
  transform: scale(0.94);
  background: rgba(14, 70, 72, 0.85);
  border-color: rgba(240, 212, 138, 0.7);
}

.touch-dash {
  width: 88px;
  height: 88px;
  font-size: 15px;
  border-color: rgba(232, 93, 76, 0.55);
  background: rgba(60, 18, 24, 0.7);
}

.touch-light {
  font-size: 14px;
}

.touch-pause {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  font-size: 14px;
  letter-spacing: 0.12em;
  border-radius: 12px;
  background: rgba(4, 28, 36, 0.72);
}

#light-bar {
  position: absolute;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(148px, calc(100vw - 300px));
  padding: 6px 10px 8px;
  background: rgba(4, 20, 28, 0.88);
  border: 1px solid rgba(120, 190, 180, 0.28);
  border-radius: 4px;
  z-index: 7;
  pointer-events: none;
}

body.touch-ui #light-bar {
  bottom: max(42px, env(safe-area-inset-bottom) + 18px);
}

#light-bar.active {
  border-color: rgba(240, 200, 100, 0.5);
}

.light-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.light-title { color: #9fd8c8; }
#light-state { color: rgba(180, 210, 200, 0.75); }
#light-state.on { color: #f0d48a; }

.light-track {
  height: 10px;
  border-radius: 2px;
  background: rgba(0, 10, 14, 0.8);
  overflow: hidden;
}

#light-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #1a6a70, #7ee0c8);
  transition: width 0.12s linear;
}

#light-fill.on {
  background: linear-gradient(90deg, #a86a18, #f0d48a);
}

#light-fill.low {
  background: linear-gradient(90deg, #8a2038, #e85d4c);
}

.light-tip {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(170, 200, 190, 0.7);
  text-align: center;
}

/* ——— Menu oceano ——— */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
}

.menu-overlay {
  background: transparent;
}

.sea-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(90, 220, 255, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(232, 93, 76, 0.18), transparent 50%),
    radial-gradient(ellipse 40% 35% at 15% 60%, rgba(40, 200, 160, 0.2), transparent 45%),
    linear-gradient(180deg, #045a78 0%, #067a7e 42%, #0a5a52 72%, #3d6b3a 100%);
}

.sea-rays {
  position: absolute;
  inset: -20% 0 30%;
  background:
    repeating-linear-gradient(
      105deg,
      transparent 0,
      transparent 55px,
      rgba(200, 255, 255, 0.07) 56px,
      rgba(200, 255, 255, 0.02) 90px,
      transparent 120px
    );
  animation: rays-drift 14s linear infinite;
  pointer-events: none;
}

@keyframes rays-drift {
  from { transform: translateX(-40px); }
  to { transform: translateX(40px); }
}

.sea-caustic {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.35) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 55%, rgba(255,255,255,0.25) 0 1.5px, transparent 3px),
    radial-gradient(circle at 40% 80%, rgba(180,255,230,0.3) 0 2px, transparent 4px);
  background-size: 180px 180px, 220px 160px, 140px 200px;
  animation: caustic 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes caustic {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-12px, 8px) scale(1.04); }
}

.sea-bubbles span {
  position: absolute;
  bottom: -20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(200, 255, 255, 0.45);
  background: rgba(200, 255, 255, 0.08);
  animation: bubble-up 9s linear infinite;
  pointer-events: none;
}

.sea-bubbles span:nth-child(1) { left: 8%; animation-duration: 8s; animation-delay: 0s; width: 6px; height: 6px; }
.sea-bubbles span:nth-child(2) { left: 18%; animation-duration: 11s; animation-delay: 1.2s; }
.sea-bubbles span:nth-child(3) { left: 32%; animation-duration: 9s; animation-delay: 0.4s; width: 11px; height: 11px; }
.sea-bubbles span:nth-child(4) { left: 47%; animation-duration: 12s; animation-delay: 2s; }
.sea-bubbles span:nth-child(5) { left: 58%; animation-duration: 7.5s; animation-delay: 0.8s; width: 5px; height: 5px; }
.sea-bubbles span:nth-child(6) { left: 68%; animation-duration: 10s; animation-delay: 1.6s; }
.sea-bubbles span:nth-child(7) { left: 76%; animation-duration: 8.5s; animation-delay: 3s; width: 9px; height: 9px; }
.sea-bubbles span:nth-child(8) { left: 84%; animation-duration: 13s; animation-delay: 0.2s; }
.sea-bubbles span:nth-child(9) { left: 91%; animation-duration: 9.5s; animation-delay: 2.4s; }
.sea-bubbles span:nth-child(10) { left: 40%; animation-duration: 14s; animation-delay: 4s; width: 7px; height: 7px; }

@keyframes bubble-up {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-110vh) translateX(18px); opacity: 0; }
}

.sea-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background:
    radial-gradient(ellipse 40% 80% at 20% 100%, #2a8a5a 0%, transparent 70%),
    radial-gradient(ellipse 35% 70% at 75% 100%, #c94a6a 0%, transparent 65%),
    radial-gradient(ellipse 30% 60% at 50% 110%, #d4a04a 0%, transparent 60%),
    linear-gradient(180deg, transparent, rgba(40, 70, 40, 0.55) 40%, #5a4a28 100%);
  pointer-events: none;
}

.lang-switch {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.lang-btn {
  width: 42px;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(180, 150, 90, 0.4);
  border-radius: 2px;
  background: rgba(4, 22, 26, 0.75) !important;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.72;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  box-shadow: none !important;
}

.lang-btn:hover:not(:disabled) {
  opacity: 1;
  transform: translateY(-1px);
  filter: none;
}

.lang-btn.active {
  opacity: 1;
  border-color: var(--foam);
  box-shadow: 0 0 0 1px rgba(126, 232, 210, 0.35) !important;
}

.lang-flag {
  display: block;
  line-height: 0;
  border-radius: 1px;
  overflow: hidden;
}

.lang-flag svg {
  display: block;
  width: 28px;
  height: 20px;
}

.dive-board {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 28px 26px 22px;
  text-align: left;
  color: #f2ebe0;
  background:
    linear-gradient(165deg, rgba(18, 48, 52, 0.82) 0%, rgba(12, 36, 40, 0.9) 100%);
  border: 2px solid rgba(180, 150, 90, 0.45);
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 24px 60px rgba(0, 20, 30, 0.45);
  animation: surfacing 0.55s ease-out;
}

.dive-board::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(180, 150, 90, 0.28);
  pointer-events: none;
}

.dive-board.compact {
  text-align: center;
  padding-top: 32px;
}

@keyframes surfacing {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

.depth-mark {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7eb8a8;
  margin-bottom: 8px;
}

.dive-board h1 {
  font-family: Impact, Haettenschweiler, 'Arial Black', 'Segoe UI', sans-serif;
  font-size: clamp(48px, 11vw, 64px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
  color: #f4efe4;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 0 28px rgba(80, 220, 200, 0.25);
  margin-bottom: 6px;
}

.dive-board h1 span {
  color: var(--coral);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}

.online-count {
  font-family: Impact, Haettenschweiler, 'Arial Black', 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #7ee0c8;
  line-height: 1;
  min-height: 1em;
  margin-bottom: 10px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

.dive-board h2 {
  font-family: Impact, Haettenschweiler, 'Arial Black', 'Segoe UI', sans-serif;
  font-size: 34px;
  font-weight: 400;
  color: var(--coral);
  margin-bottom: 8px;
}

.tagline {
  color: #b8d0c4;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 20px;
  max-width: 34ch;
}

.dive-row label,
.diff-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8eb8a8;
  margin-bottom: 6px;
}

#nickname {
  width: 100%;
  height: 46px;
  border-radius: 2px;
  border: 2px solid rgba(160, 130, 70, 0.55);
  background: rgba(4, 22, 26, 0.85);
  color: #f2ebe0;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  padding: 0 12px;
  outline: none;
  margin-bottom: 16px;
}

#nickname:focus {
  border-color: var(--foam);
}

.diff-block {
  margin: 0 0 16px;
}

.diff-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.diff-btn {
  height: 40px;
  border-radius: 2px;
  border: 1px solid rgba(140, 180, 160, 0.35);
  background: rgba(6, 32, 36, 0.9);
  color: #d8ebe2;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.diff-btn:hover {
  border-color: var(--foam);
  filter: none;
  transform: none;
}

.diff-btn.active {
  background: #1a6b58;
  border-color: #7ee0c8;
  color: #f2fff8;
  box-shadow: none;
}

.diff-btn[data-diff="extra"].active {
  background: #6b2434;
  border-color: #e85d4c;
  color: #ffe8e4;
}

.diff-blurb {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #8eb8a8;
  line-height: 1.35;
  min-height: 2.4em;
}

button {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 2px;
  background: var(--coral);
  color: #2a0e0a;
  font-family: Impact, Haettenschweiler, 'Arial Black', 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 0 #8a3024;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
  box-shadow: none;
}

button:hover:not(:disabled) {
  filter: brightness(1.05);
}

button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #8a3024;
}

button.ghost {
  margin-top: 10px;
  height: 44px;
  background: transparent;
  color: #9ec4b4;
  border: 1px solid rgba(140, 180, 160, 0.4);
  font-family: 'Segoe UI', system-ui, Roboto, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
}

.loading-note {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #7ea898;
  text-align: center;
}

.controls {
  margin-top: 16px;
  color: #8eb8a8;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  display: grid;
  gap: 4px;
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 2px;
  background: rgba(4, 24, 28, 0.9);
  border: 1px solid rgba(140, 180, 160, 0.35);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #e8f4ef;
}

.school {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(180, 150, 90, 0.28);
  opacity: 0.9;
}

.school img {
  height: 34px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
  animation: drift-fish 4.5s ease-in-out infinite;
}

.school img:nth-child(odd) { animation-delay: -1.2s; }
.school img:nth-child(3n) { animation-delay: -2.4s; height: 28px; }

@keyframes drift-fish {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.rank-line {
  margin: 6px 0 16px;
  color: #8eb8a8;
  font-weight: 600;
}

#death .dive-board p { font-weight: 600; }

#death.overlay,
#pause.overlay {
  background: rgba(2, 18, 24, 0.55);
}

.pause-overlay {
  backdrop-filter: blur(5px);
  z-index: 12;
}

.pause-title {
  color: #e8f4ef !important;
  margin-bottom: 6px;
}

.pause-tip {
  color: #8eb8a8;
  font-weight: 600;
  margin: 0 0 12px;
}

.pause-board #resume-btn {
  margin-top: 2px;
}

.mp-block {
  margin: 14px 0 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 20, 28, 0.45);
  text-align: left;
}

.mp-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8eb8a8;
  margin-bottom: 6px;
}

.mp-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.35;
}

.mp-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}

.mp-btn {
  flex: 0 0 auto;
  padding: 8px 12px !important;
  font-size: 13px !important;
  margin: 0 !important;
}

.mp-primary {
  width: 100%;
  background: linear-gradient(180deg, #1a8a7a, #0d5c52) !important;
  border-color: #2ab89a !important;
}

#mp-code {
  flex: 1 1 90px;
  min-width: 90px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(0, 12, 18, 0.7);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mp-status {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #7ee0c8;
  min-height: 1.2em;
}

.mp-status.err {
  color: #ff8a7a;
}

.mp-lobby {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(126, 224, 200, 0.18);
}

.mp-lobby-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mp-lobby-code {
  font-family: Impact, Haettenschweiler, 'Arial Black', 'Segoe UI', sans-serif;
  font-size: 22px;
  letter-spacing: 0.12em;
  color: #7ee0c8;
}

.mp-lobby-meta {
  font-size: 11px;
  font-weight: 700;
  color: #8eb8a8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mp-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.mp-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid rgba(126, 224, 200, 0.2);
  background: rgba(0, 16, 22, 0.55);
  font-size: 12px;
  font-weight: 700;
  color: #c8ddd4;
}

.mp-slot.empty {
  color: #5a7a70;
  border-style: dashed;
  opacity: 0.75;
}

.mp-slot.bot {
  color: #f0d48a;
  border-color: rgba(240, 212, 138, 0.28);
}

.mp-slot.me {
  border-color: rgba(126, 224, 200, 0.55);
  color: #e8fff6;
}

.mp-slot-idx {
  width: 16px;
  opacity: 0.55;
  font-size: 11px;
}

.mp-slot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #5a7a70;
}

.mp-slot-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-lobby-host {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-bot-row {
  display: flex;
  gap: 8px;
}

.mp-bot-btn {
  flex: 1;
}

.mp-start {
  width: 100%;
}

.mp-lobby-wait {
  font-size: 12px;
  font-weight: 600;
  color: #8eb8a8;
  margin: 0 0 8px;
}

.mp-leave {
  width: 100%;
  margin-top: 6px;
}

@media (max-width: 640px) {
  .mp-slots {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #light-bar {
    bottom: max(36px, env(safe-area-inset-bottom) + 12px);
    width: min(130px, calc(100vw - 268px));
    padding: 5px 8px 6px;
  }
  #light-bar .light-meta {
    font-size: 10px;
    margin-bottom: 4px;
  }
  #light-bar .light-track {
    height: 8px;
  }
  .stick { width: 118px; height: 118px; }
  .touch-dash { width: 80px; height: 80px; }
  .dive-board { padding: 22px 18px 18px; }
}
