:root {
  --bg: #0f1115;
  --panel: #1a1d24;
  --panel2: #232734;
  --text: #e8eaf0;
  --muted: #8b93a7;
  --accent: #4ade80;
  --accent2: #22c55e;
  --danger: #f87171;
  --seek: #fbbf24;
  --flori: #ff6b3d;
  --luna: #f7a64a;
  --storybook: #82d4c0;
}

* { box-sizing: border-box; }

html {
  /* Stop the browser's pull-to-refresh/scroll-chaining gesture — an
     accidental swipe-down was reloading the page and booting the player
     out of their room mid-game. */
  overscroll-behavior-y: contain;
}
body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 12% 16%, rgba(130,212,192,.13), transparent 27rem),
    radial-gradient(circle at 88% 88%, rgba(247,166,74,.12), transparent 30rem),
    radial-gradient(circle at 50% -10%, #1b2d2c, var(--bg));
  color: var(--text);
  min-height: 100vh;
  overscroll-behavior-y: contain;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
input, select { user-select: text; }
.brand-mark {
  margin: 0 0 8px;
  color: #f7a64a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
}
.brand-mark span { color: #82d4c0; }

.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.screen.hidden { display: none; }

.panel {
  background: linear-gradient(155deg, rgba(35,39,52,.98), rgba(23,27,34,.98));
  border: 2px solid rgba(130,212,192,.28);
  border-radius: 24px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 22px 70px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.05);
}

h1 { margin: 0 0 4px; font-size: 30px; }
h2 { margin: 0 0 8px; }
h3 { margin: 0 0 10px; font-size: 15px; letter-spacing: .02em; }
.tag { color: var(--muted); margin: 0 0 22px; }
.hint { color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; margin-right: 12px; }

input, select, button {
  font: inherit;
  border-radius: 10px;
  border: 1px solid #333a49;
  background: var(--panel2);
  color: var(--text);
  padding: 11px 13px;
  outline: none;
}
input:focus { border-color: var(--accent); }
input { width: 100%; }
select#nameInput { width: 100%; }
.code { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-weight: 700; }

button {
  cursor: pointer;
  background: var(--panel2);
  transition: transform .05s ease, background .15s ease, border-color .15s;
}
button:hover { border-color: #46506a; }
button:active { transform: translateY(1px); }
button.primary { background: var(--accent2); border-color: var(--accent2); color: #06210f; font-weight: 700; }
button.primary:hover { background: var(--accent); }
.hero-play { width: 100%; min-height: 58px; font-size: 18px; box-shadow: 0 10px 26px rgba(34,197,94,.2); }
.bot-play { width: 100%; font-weight: 650; }
.quick-note { margin: 9px 0 20px; color: var(--muted); text-align: center; font-size: 12.5px; }
.grownup-hold {
  --hold-progress: 0;
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  font-weight: 700;
  touch-action: none;
}
.grownup-hold::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(74,222,128,.25);
  transform: scaleX(var(--hold-progress));
  transform-origin: left;
}
.parent-dialog {
  max-width: min(430px, calc(100vw - 28px));
  border: 1px solid #3d4658;
  border-radius: 18px;
  padding: 0;
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0,0,0,.65);
}
.parent-dialog::backdrop { background: rgba(5,8,12,.78); }
.parent-card { position: relative; padding: 28px; }
.parent-card p, .parent-card li { color: #bac2d1; line-height: 1.5; }
.parent-card ul { padding-left: 20px; }
.parent-card .primary { width: 100%; margin: 8px 0 14px; }
.parent-card a { color: #8be5cc; }
.dialog-close { position: absolute; right: 12px; top: 10px; padding: 4px 10px; font-size: 22px; }
.friends-play { border-top: 1px solid #2a2f3c; padding-top: 15px; }
.friends-play summary { cursor: pointer; color: var(--text); font-weight: 650; text-align: center; }
.friends-play[open] summary { margin-bottom: 12px; }
.dev-options { display: none !important; }
.invite-button, .sound-button { width: 100%; margin-top: 10px; }

.row { display: flex; gap: 10px; margin-top: 12px; }
.row .code { flex: 1; }

/* Keep lobby cards inside portrait-phone viewports. Text inputs have a wide
   intrinsic minimum in flex rows, so the room-code controls intentionally
   stack instead of forcing the centered panel beyond the iframe edge. */
@media (max-width: 480px) {
  #lobby.screen,
  #waiting.screen,
  #result.screen {
    padding: 12px;
  }

  #lobby .panel,
  #waiting .panel,
  #result .panel {
    min-width: 0;
    max-width: 100%;
    padding: 20px 16px;
  }

  #lobby h1 {
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.2;
  }

  #lobby .row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  #lobby .row .code,
  #lobby #joinBtn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
}

.divider { text-align: center; color: var(--muted); margin: 18px 0 4px; position: relative; font-size: 13px; }
.divider::before, .divider::after {
  content: ""; position: absolute; top: 50%; width: 38%; height: 1px; background: #2a2f3c;
}
.divider::before { left: 0; } .divider::after { right: 0; }

.error { color: var(--danger); min-height: 18px; margin: 12px 0 0; font-size: 14px; }

/* Waiting room */
.code-badge, .code-badge {
  background: var(--panel2); padding: 2px 12px; border-radius: 8px;
  letter-spacing: .25em; font-family: ui-monospace, monospace;
}
.players { list-style: none; padding: 0; margin: 16px 0; }
.players li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; background: var(--panel2); border-radius: 10px; margin-bottom: 7px;
}
.players .you { color: var(--accent); font-weight: 600; }
.players .tags { display: inline-flex; align-items: center; gap: 8px; }
.players .host-tag { font-size: 11px; color: var(--seek); }
.players .hunter-tag { font-size: 13px; }

.hunter-toggle {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  margin: 0 0 4px; padding: 10px 12px; border-radius: 10px;
  background: var(--panel2); border: 1px solid #333a49; color: var(--text); font-size: 14px;
}
.hunter-toggle input { width: auto; accent-color: var(--seek); cursor: pointer; }
.hunter-note { font-size: 12px; margin: 0 0 12px; }
#hostControls { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

/* In-game HUD */
#game { flex-direction: column; gap: 12px; align-items: center; }
#hud {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid #2a2f3c; border-radius: 12px;
  padding: 10px 18px; width: 960px; max-width: 100%;
}
.badge { padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.badge.hider { background: rgba(74,222,128,.15); color: var(--accent); }
.badge.seeker { background: rgba(251,191,36,.16); color: var(--seek); }
.badge.dead { background: rgba(248,113,113,.16); color: var(--danger); }
.timer { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; }
.move-mode { font-size: 12px; }

#stageWrap { display: flex; gap: 14px; align-items: flex-start; max-width: 100%; }
#playColumn {
  display: flex; flex: 1 1 960px; min-width: 0; width: 960px; max-width: 100%;
  flex-direction: column; gap: 10px;
}
#stageBox { position: relative; width: 100%; line-height: 0; max-width: 100%; }
#stage {
  display: block; background: #000; border-radius: 12px; cursor: crosshair;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
  max-width: 100%; height: auto; touch-action: none;
}

/* Touch controls — fixed at the bottom thumb zones; only on touch devices */
#joystick, #moveModeBtn, #zoomControls, #swingStick { display: none; }
body.touch #joystick {
  display: block; position: fixed; left: 18px; bottom: 24px; z-index: 6;
  width: 128px; height: 128px; border-radius: 50%;
  background: rgba(26,29,36,.5); border: 2px solid rgba(255,255,255,.18);
  touch-action: none; user-select: none;
}
#joyNub {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: rgba(74,222,128,.6); border: 2px solid rgba(255,255,255,.35);
  box-shadow: 0 4px 12px rgba(0,0,0,.4); pointer-events: none;
}
body.touch #moveModeBtn {
  display: block; position: fixed; left: 156px; bottom: 26px; z-index: 6;
  width: 44px; height: 44px; border-radius: 50%; padding: 0; font-size: 16px;
  background: rgba(34,197,94,.5); color: #fff; border: 1px solid rgba(255,255,255,.25);
}

/* Finder tag button — fixed bottom-right (shown during the search). */
#swingStick {
  position: fixed; right: 18px; bottom: 22px; z-index: 6;
  width: 92px; height: 92px; border-radius: 50%;
  align-items: center; justify-content: center; font-size: 17px; font-weight: 900;
  background: rgba(34,197,94,.68); border: 2px solid rgba(255,255,255,.35); color: #fff;
  touch-action: none; user-select: none; box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
#swingStick:active { background: rgba(74,222,128,.9); }
#swingStick { --cd: 0; } /* 0 = ready, 1 = just swung */
.swing-icon { position: relative; z-index: 1; pointer-events: none; }
.cooldown-ring {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(rgba(10,12,16,.62) calc(var(--cd) * 360deg), transparent 0);
  transition: opacity .15s;
  opacity: var(--cd);
}

/* Explicit camera controls are easier to discover than a cycling zoom button.
   Show them on every narrow viewport, even when a browser does not reliably
   advertise touch support. */
.zoom-controls {
  position: absolute; right: 8px; top: 8px; z-index: 6;
  align-items: center; gap: 2px; padding: 3px; border-radius: 999px;
  background: rgba(26,29,36,.82); color: #e8eaf0; border: 1px solid #333a49;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.zoom-controls button {
  display: grid; width: 42px; height: 42px; padding: 0; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.08);
  color: #fff; font-size: 24px; font-weight: 800;
}
.zoom-controls button:disabled { opacity: .38; cursor: default; }
.zoom-controls output {
  min-width: 46px; padding-inline: 2px; text-align: center;
  font-size: 13px; font-weight: 800; line-height: 1;
}

.paint-controls { display: contents; }

aside {
  width: 248px; background: var(--panel); border: 1px solid #2a2f3c;
  border-radius: 12px; padding: 16px;
}
.kit-hint { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.4; }
.lobby-hint, .lobby-colors { display: none; }
#paintPanel.in-lobby > .kit-hint:not(.lobby-hint) { display: none; }
#paintPanel.in-lobby .lobby-hint, #paintPanel.in-lobby .lobby-colors { display: block; }
.lobby-colors { margin-bottom: 6px; }
/* Docked in the waiting room: center the paint kit under the player list. */
#waiting #paintPanel { margin: 14px auto 0; }

#spectatePanel {
  position: static;
  width: 100%; padding: 10px 12px;
  transform: none; line-height: 1.2;
  border-color: rgba(255,255,255,.2); background: rgba(18,22,29,.9);
  box-shadow: 0 8px 28px rgba(0,0,0,.38);
}
.spectate-status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 0; margin-bottom: 8px; text-align: center;
}
.spectate-status strong { flex: 0 0 auto; color: var(--accent); font-size: 13px; }
.spectate-status span {
  min-width: 0; overflow: hidden; color: #fff; font-size: 14px; font-weight: 750;
  text-overflow: ellipsis; white-space: nowrap;
}
.spectate-controls { display: grid; grid-template-columns: minmax(0,1fr) 46px minmax(0,1fr); gap: 8px; }
.spectate-controls.without-taunt { grid-template-columns: repeat(2, minmax(0,1fr)); }
.spectate-controls button {
  display: flex; min-width: 0; min-height: 44px; align-items: center; justify-content: center;
  gap: 7px; padding: 8px 10px; font-size: 14px; font-weight: 750;
  background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2);
}
#tauntBtn { padding-inline: 0; font-size: 20px; }
.swatch-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.swatch { width: 34px; height: 34px; border-radius: 8px; border: 2px solid #3a4150; background: #fff; }
.editor-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.preview-label { font-size: 11px; margin-top: -2px; }
#blobPreview {
  width: 140px; height: 140px; background: #11141a; border-radius: 10px;
}
#bodyEditor {
  width: 216px; height: 216px; image-rendering: pixelated;
  background: #11141a; border-radius: 10px; cursor: cell; touch-action: none;
}
.brush { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; color: var(--muted); }
.brush input { width: auto; flex: 1; }
.pose-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pose-row .muted { width: 100%; font-size: 12px; }
button.pose { padding: 7px 12px; font-size: 13px; }
button.pose.active { background: var(--accent2); border-color: var(--accent2); color: #06210f; }

.size-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.size-row .muted { width: 100%; font-size: 12px; }
button.sizeb { padding: 7px 14px; font-size: 13px; font-weight: 600; }
button.sizeb.active { background: var(--accent2); border-color: var(--accent2); color: #06210f; }
button.sizeb:disabled, button.pose:disabled { opacity: 0.4; cursor: not-allowed; }

/* Size and the square/round shapes are a lobby-only pick — hidden entirely
   (not just disabled) once the paint kit is docked in-game. */
button.pose.lobby-only, .size-row.lobby-only { display: none; }
#paintPanel.in-lobby button.pose.lobby-only { display: inline-block; }
#paintPanel.in-lobby .size-row.lobby-only { display: flex; }
.rotate { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; color: var(--muted); }
.rotate input { width: auto; flex: 1; }

.color-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 4px 0 14px; }
.color-swatches .sw {
  aspect-ratio: 1; border-radius: 8px; border: 2px solid #2a2f3c; padding: 0; cursor: pointer;
}
.color-swatches .sw.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent2); }
#colorPicker { width: 48px; height: 32px; padding: 2px; cursor: pointer; }

.big-message {
  position: fixed; left: 50%; top: 78px; transform: translateX(-50%);
  z-index: 60; pointer-events: none; max-width: 92%;
  font-size: 18px; font-weight: 700; text-align: center;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(12,14,18,.85); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.big-message.hidden { display: none; }
.tutorial {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70;
  display: flex; align-items: center; gap: 14px; max-width: min(620px, 92vw);
  padding: 12px 14px 12px 18px; border: 1px solid rgba(74,222,128,.5);
  border-radius: 14px; background: rgba(18,23,29,.96); box-shadow: 0 14px 36px rgba(0,0,0,.55);
}
.tutorial span { line-height: 1.35; }
.tutorial button { padding: 7px 11px; font-size: 12px; flex: 0 0 auto; }

.modal { background: rgba(8,10,14,.72); position: fixed; inset: 0; z-index: 100; }
#resultTitle.win { color: var(--accent); }
#resultTitle.lose { color: var(--danger); }

.artpack { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; font-size: 13px; }
.artpack + .artpack { margin-top: 8px; }
button.art, button.char { padding: 6px 12px; font-size: 12.5px; }
button.art.active, button.char.active { background: var(--accent2); border-color: var(--accent2); color: #06210f; font-weight: 700; }
.builder-link { margin-left: auto; color: var(--accent); text-decoration: none; font-size: 13px; }
.builder-link:hover { text-decoration: underline; }

/* ===== Mobile: map on top, draw kit on bottom ===== */
@media (max-width: 860px) {
  /* The game screen becomes a fixed-height column: HUD, then map, then a paint
     kit that fills the leftover space and SCROLLS internally — so it can never
     slide under the fixed thumb-control strip reserved at the bottom. */
  #game {
    height: 100vh; height: 100dvh;
    padding: 6px 6px 14px; gap: 8px; justify-content: flex-start; overflow: hidden;
  }
  body.touch #game { padding-bottom: 160px; } /* reserve the thumb-control strip */
  #hud { flex: 0 0 auto; width: 100%; border-radius: 10px; padding: 8px 12px; gap: 8px 14px; font-size: 13px; flex-wrap: wrap; }
  .timer { font-size: 16px; }
  #stageWrap { flex: 1 1 auto; min-height: 0; flex-direction: column; width: 100%; gap: 8px; align-items: stretch; overflow: hidden; }
  #playColumn { flex: 0 0 auto; width: 100%; gap: 8px; }
  #stageBox { flex: 0 0 auto; width: 100%; }
  #zoomControls { display: flex; }
  #spectatePanel { width: 100%; padding: 8px; }
  /* cap map height so short/wide windows keep room for the paint kit + controls */
  #stage { display: block; width: 100%; max-width: min(100%, 60vh); height: auto; margin: 0 auto; }
  aside { width: 100% !important; padding: 12px; }
  #paintPanel {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: start;
  }
  #paintPanel h3 { grid-column: 1 / -1; margin: 0; }
  #paintPanel .kit-hint { display: none; }
  /* Lobby-only bits span the full row — otherwise their unconstrained text
     forces the "auto" editor column to blow out and collapses the controls
     column to ~0 width. */
  #paintPanel.in-lobby .lobby-hint, #paintPanel.in-lobby .lobby-colors { grid-column: 1 / -1; }
  /* The wrapper (not its children) owns the grid column now — keeps column-1
     sizing identical to before (still bounded by #bodyEditor's 140px). */
  .editor-col { grid-column: 1; }
  #blobPreview { width: 90px; height: 90px; }
  #bodyEditor { width: 140px; height: 140px; }
  .paint-controls { grid-column: 2; display: flex; flex-direction: column; gap: 10px; }
  .pose-row, .size-row { gap: 6px; }
  .swatch-row, .brush { margin: 0; }
  .color-swatches { grid-template-columns: repeat(8, 1fr); }
  .tutorial { bottom: 166px; font-size: 13px; }
}

/* Short viewports (landscape phones): shrink the map + thumb controls so the
   split layout still fits without spilling over the controls. */
@media (max-width: 860px) and (max-height: 520px) {
  body.touch #game { padding-bottom: 112px; }
  #stage { max-width: min(100%, 42vh); }
  body.touch #joystick { width: 92px; height: 92px; left: 12px; bottom: 10px; }
  #joyNub { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  body.touch #moveModeBtn { width: 38px; height: 38px; left: 112px; bottom: 12px; }
  #swingStick { width: 70px; height: 70px; right: 12px; bottom: 12px; font-size: 24px; }
}

.hidden { display: none !important; }

/* ===== Flori & Luna storybook identity ===== */
.lobby-panel {
  position: relative;
  max-width: 600px;
  padding: 22px 34px 30px;
  overflow: hidden;
  text-align: center;
}
.lobby-panel::before,
.lobby-panel::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border: 26px solid rgba(130,212,192,.06);
  border-radius: 64% 36% 68% 32%;
  transform: rotate(28deg);
  pointer-events: none;
}
.lobby-panel::before { left: -94px; top: 130px; }
.lobby-panel::after { right: -100px; bottom: 28px; border-color: rgba(247,166,74,.07); }
.lobby-brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
}
.lobby-brand-lockup img { width: 156px; height: auto; }
.lobby-brand-lockup span,
.room-brand span {
  padding: 5px 9px;
  border: 1px solid rgba(247,166,74,.4);
  border-radius: 999px;
  color: #ffd29a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.chameleon-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 110px;
  align-items: end;
  min-height: 176px;
  margin: 0 -16px;
}
.hero-friend {
  width: 128px;
  max-height: 170px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 12px rgba(0,0,0,.32));
}
.hero-flori { justify-self: end; transform: rotate(-4deg) translateX(8px); }
.hero-luna { justify-self: start; transform: rotate(4deg) translateX(-8px); }
.hero-copy { position: relative; z-index: 2; align-self: center; }
.game-emblem {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 0 auto 3px;
  border: 3px solid #c8ffb7;
  border-radius: 50%;
  background: linear-gradient(145deg, #83dc5b, #249553);
  box-shadow: 0 7px 0 #145f3d, 0 13px 28px rgba(0,0,0,.28);
  overflow: hidden;
}
.game-emblem-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  /* The mascot's curled tail makes its transparent silhouette right-heavy.
     A tiny optical shift centers the face, not just the image canvas. */
  transform: translate(-2px, 2px);
}
.lobby-panel h1 {
  margin: 10px 0 7px;
  color: #fff7dd;
  font-size: clamp(29px, 6vw, 42px);
  font-weight: 950;
  line-height: .92;
  letter-spacing: -.045em;
  text-shadow: 0 3px 0 #275c40, 0 7px 20px rgba(0,0,0,.45);
}
.lobby-panel .tag { margin: 0; color: #c9efe5; font-size: 15px; font-weight: 750; }
.friend-tips {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: -1px 0 17px;
  flex-wrap: wrap;
}
.friend-tips span {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px 12px 12px 4px;
  background: rgba(255,255,255,.07);
  color: #d8dee9;
  font-size: 12px;
}
.friend-tips span:last-child { border-radius: 12px 12px 4px 12px; }
.friend-tips b { color: #ffac77; }
.friend-tips span:last-child b { color: #ffd070; }
.lobby-panel > label { position: relative; z-index: 1; text-align: left; }
.lobby-panel > button,
.lobby-panel > .row,
.lobby-panel > .divider,
.lobby-panel > .quick-note,
.lobby-panel > .error { position: relative; z-index: 1; }
.lobby-panel button.primary {
  border: 2px solid #abff8e;
  border-bottom-color: #14703c;
  border-radius: 15px;
  background: linear-gradient(#55df74, #24ad59);
  box-shadow: 0 6px 0 #11693a, 0 13px 28px rgba(34,197,94,.22);
}
.lobby-panel button.primary:active { transform: translateY(4px); box-shadow: 0 2px 0 #11693a; }
.room-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -10px 0 16px;
}
.room-brand img { width: 104px; height: auto; }
#hud {
  border-color: rgba(130,212,192,.3);
  background: linear-gradient(90deg, rgba(24,52,46,.98), rgba(31,35,45,.98));
  box-shadow: 0 7px 24px rgba(0,0,0,.25);
}
.hud-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffe0a8;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .05em;
}
.hud-brand img { width: 30px; height: 30px; object-fit: contain; }
#paintPanel,
#seekerPanel,
#spectatePanel {
  border-color: rgba(130,212,192,.32);
  box-shadow: 0 12px 34px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.04);
}
.result-card { max-width: 480px; overflow: hidden; text-align: center; }
.result-friends {
  display: grid;
  grid-template-columns: 92px 1fr 92px;
  align-items: end;
  min-height: 112px;
  margin: -16px -8px 8px;
}
.result-friends img {
  width: 104px;
  max-height: 118px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 7px 8px rgba(0,0,0,.25));
}
.result-friends div { align-self: center; }
.result-friends .result-mascot { width: 72px; height: 72px; margin: 0 auto 2px; }
.result-friends small { display: block; color: #ffd29a; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.result-card h2 { font-size: 29px; }

@media (max-width: 480px) {
  #lobby .lobby-panel { padding: 16px 14px 22px; }
  .lobby-brand-lockup { gap: 7px; }
  .lobby-brand-lockup img { width: 122px; }
  .lobby-brand-lockup span { padding: 4px 7px; font-size: 9px; }
  .chameleon-hero {
    grid-template-columns: 74px minmax(0, 1fr) 74px;
    min-height: 136px;
    margin-inline: -8px;
  }
  .hero-friend { width: 92px; max-height: 124px; }
  .game-emblem { width: 54px; height: 54px; }
  .game-emblem-img { width: 50px; height: 50px; }
  .lobby-panel h1 { margin-top: 8px; font-size: clamp(27px, 9vw, 36px); }
  .lobby-panel .tag { font-size: 13px; }
  .friend-tips { margin: 5px 0 14px; }
  .friend-tips span { padding: 5px 7px; font-size: 10.5px; }
  .result-friends { grid-template-columns: 72px 1fr 72px; }
  .result-friends img { width: 82px; max-height: 96px; }
}

@media (max-width: 860px) {
  .hud-brand { font-size: 0; }
  .hud-brand img { width: 28px; height: 28px; }
}
