/* Off-Meta: Party (Hot Pick). Setup, same-device game, online rooms, lobby and settings. */
.player-chip {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 12px;
  display: flex; gap: 6px; align-items: center;
}
.player-chip button { background: none; border: 0; color: var(--muted); font-size: 16px; }
.seats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.seat.out { opacity: .35; text-decoration: line-through; }
.seat .lives { font-size: 13px; letter-spacing: 2px; }
.bomb-wrap { text-align: center; margin: 18px 0 6px; }
.holder { font-size: 20px; font-weight: 700; color: var(--gold2); margin-top: 4px; }
.chips .chip { animation: chipIn .35s cubic-bezier(.2, 1.6, .4, 1) backwards; animation-delay: calc(var(--i, 0) * 25ms); }
.chip.found { border-color: var(--gold); color: var(--gold2); box-shadow: 0 0 10px rgba(228, 181, 79, .35); }
.bomb { font-size: 64px; display: inline-block; animation: wobble 0.9s ease-in-out infinite; animation-duration: var(--wobble, .9s); }
.bomb.pass { animation: toss .35s cubic-bezier(.3, 1.6, .5, 1); }
.bomb.boom { animation: boom .7s ease forwards; }
.seat {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; text-align: center;
  min-width: 84px; transition: transform .25s cubic-bezier(.2, 1.6, .4, 1), border-color .2s, box-shadow .2s;
}
.seat.turn { border-color: var(--gold); box-shadow: 0 0 16px rgba(228, 181, 79, .3); transform: translateY(-4px) scale(1.06); }
.seat.hurt { animation: hurt .6s ease; }
.seat.shielded { animation: shieldGlow 1.6s ease-in-out infinite; }
.holder.change { animation: holderIn .35s cubic-bezier(.2, 1.6, .4, 1); }
#party-used .chip.new { animation: chipIn .4s cubic-bezier(.2, 1.6, .4, 1); }
#party-game.danger { animation: dangerTint 1s ease-in-out infinite; }
.holder, .seat > div:first-child { font-family: var(--font-display); letter-spacing: .02em; }
.dev-danger { color: var(--bad); }
#online-create { margin-top: 10px; }
.lobby .row { justify-content: center; }
.seat.gone { opacity: .35; }
.holder.mine { color: var(--gem); text-shadow: 0 0 14px rgba(111, 240, 255, .5); }
.typing { min-height: 20px; margin-top: 4px; color: var(--muted); font-size: 14px; font-style: italic; }
#party-setup, #online-lobby, #party-game, #party-over, #party-local, #party-online {
  animation: swapIn .42s cubic-bezier(.2, .9, .3, 1) both;
}
.seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.seg button {
  width: 42px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font-weight: 800; transition: background .2s, color .2s, transform .1s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--gold); color: #1a1406; }
.seg button:active { transform: scale(.92); }
/* Party game spacing to match the daily board */
#party-game .prompt-card { margin-top: 4px; }
#party-game .seats { margin-bottom: 16px; }
.lobby-player.me { border-color: rgba(111, 240, 255, .45); box-shadow: 0 0 14px rgba(111, 240, 255, .1); }
.lp-icons { display: inline-flex; gap: 4px; min-width: 22px; justify-content: center; }
.lp-crown { font-size: 16px; }
.lp-star { color: #4ea4ff; font-size: 17px; text-shadow: 0 0 10px rgba(78, 164, 255, .6); }
.danger-btn {
  display: block; width: 100%; margin-top: 12px; padding: 11px 16px; border-radius: 10px; border: 1px solid #c23b4a;
  background: rgba(239, 93, 106, .14); color: #ff8a95; font-weight: 700;
  transition: background .15s, color .15s, transform .1s;
}
.danger-btn:hover { background: var(--bad); color: #fff; }
.danger-btn:active { transform: scale(.97); }
/* Room code pill in the Party header while in an online room */
.room-pill {
  cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; color: var(--muted);
  border-color: rgba(111, 240, 255, .4); transition: border-color .15s, box-shadow .15s, transform .1s;
}
.room-pill b { font-family: var(--font-display); font-size: 14px; letter-spacing: .12em; color: var(--gem); margin-left: 4px; }
.room-pill:hover { border-color: var(--gem); box-shadow: 0 0 12px rgba(111, 240, 255, .25); }
.room-pill:active { transform: scale(.95); }
/* Online game: End game (host) + Leave room (everyone) */
.game-actions { display: flex; gap: 8px; margin-top: 22px; }
.game-actions > * { flex: 1; margin-top: 0; }
.game-actions .ghost { padding: 11px 16px; }
.game-actions [hidden] { display: none !important; }
.settings-card-head span:last-child:not(:first-child) {
  letter-spacing: .02em; text-transform: none; font-weight: 600; color: var(--gold2);
}
.set-row + .set-row { border-top: 1px solid rgba(42, 58, 99, .6); }
.seg button:disabled { cursor: default; }
.settings-card.readonly .seg button:not(.on) { opacity: .45; }
.settings-card.readonly .seg button.on { cursor: default; }
.settings-card:not(.readonly) .seg[data-setting="max"] button:disabled { opacity: .3; text-decoration: line-through; }
#party-used {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; min-height: 64px;
  align-content: flex-start;
}
.lobby { text-align: center; padding: 14px 18px 16px; }
.room-code-label { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.room-code-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 4px; }
.room-code {
  font-family: var(--font-display); font-weight: 800; color: var(--gem);
  text-shadow: 0 0 22px rgba(111, 240, 255, .35); font-size: 40px; margin: 0; letter-spacing: .16em;
}
.room-code-row .ghost { padding: 7px 12px; font-size: 13px; }
.lobby-players {
  flex-wrap: wrap; list-style: none; margin: 0 0 6px; padding: 0; display: grid; text-align: left;
  justify-content: stretch; grid-template-columns: 1fr 1fr; gap: 6px;
}
.lobby-player {
  display: flex; align-items: center; gap: 10px; border-radius: 10px; background: var(--bg2);
  border: 1px solid var(--line); font-weight: 600; animation: swapIn .35s cubic-bezier(.2, 1.2, .3, 1) both;
  padding: 8px 12px; font-size: 14px; min-width: 0;
}
.lp-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lobby-note { min-height: 0; }
#lobby-note:not(:empty) { margin-top: 6px; }
.settings-card {
  border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); text-align: left; margin: 10px 0 4px;
  padding: 8px 12px 6px;
}
.settings-card-head {
  display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; }
.set-row > span { color: var(--text); font-weight: 600; font-size: 13.5px; }
.set-row .seg { flex-wrap: wrap; justify-content: flex-end; padding: 2px; }
.set-row .seg button { width: auto; height: 27px; min-width: 34px; padding: 0 9px; font-size: 12.5px; }
.lobby-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.lobby-actions > * { margin: 0; }
.lobby-actions .big { flex: 2; padding: 11px 18px; font-size: 16px; }
.lobby-actions .danger-btn { flex: 1; width: auto; padding: 11px 16px; }
.lobby-actions #lobby-wait { flex: 2; text-align: center; }
#view-party .view-head { margin-bottom: 10px; }
.lobby-list-head {
  display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: 10px 2px 6px; margin-top: 8px;
}
.lp-wins {
  font-size: 12px; font-weight: 700; color: var(--gold2); background: rgba(228, 181, 79, .12);
  border: 1px solid rgba(228, 181, 79, .35); border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.lp-kick {
  flex: none; width: 24px; height: 24px; border-radius: 6px; border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 12px; line-height: 1; display: grid; place-items: center;
  transition: color .15s, background .15s, border-color .15s;
}
.lp-kick:hover { color: #fff; background: var(--bad); border-color: var(--bad); }
.local-settings .set-row .seg button { height: 28px; min-width: 34px; padding: 0 10px; font-size: 12.5px; }
/* Icons on used-answer chips and in the daily summary */
.chip {
  font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 6px;
}
#party-used .chip { padding: 3px 10px 3px 4px; }
/* Party setup: a little tighter so the whole form fits a laptop screen. */
#party-local .lead { margin-bottom: 10px; font-size: 15px; }
#party-players { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; margin-bottom: 2px; }
.local-settings { margin: 8px 0 2px; padding: 8px 12px 6px; }
.local-settings .set-row { padding: 3px 0; }
#party-start { margin-top: 10px; }
#party-pic img { width: 60px; height: 60px; border-radius: 12px; }
.chip.t-trivia { border-color: rgba(95, 211, 154, .55); color: var(--good); }
.set-row.na { opacity: .45; }
.set-row.na .seg { pointer-events: none; }
/* Party setup: "Same device" and "Online" share one cell, so the box keeps the same height when switching. */
.party-panes { display: grid; }
.party-panes > #party-local, .party-panes > #party-online { grid-area: 1 / 1; min-width: 0; }
.party-panes > [hidden] { display: block !important; visibility: hidden; pointer-events: none; }
#party-online:not([hidden]) { display: flex; flex-direction: column; justify-content: space-between; }
#party-online .lead { margin-bottom: 10px; font-size: 15px; }
#party-online .online-card { margin: 12px 0 0; padding: 10px 14px 14px; }
#party-online .online-card p { margin: 0 0 10px; font-size: 14px; }
#party-online .online-card #online-create { margin-top: 0; }
#party-online .online-card .guess-form { margin: 0; }
#party-online #online-status { min-height: 0; margin: 8px 0 0; }
#party-online #online-status:empty { display: none; }

@media (max-width: 560px) {
  .lobby-players { grid-template-columns: 1fr; }
  .room-code { font-size: 34px; }
  /* Party: labels beside their buttons again, smaller buttons */
  .set-row { flex-direction: row; align-items: center; gap: 8px; }
  .bomb-wrap { margin: 8px 0 2px; }
  .bomb { font-size: 46px; }
  .seats { gap: 6px; margin-bottom: 8px; }
  .seat { padding: 4px 10px; min-width: 70px; }
  #party-game .seats { margin-bottom: 8px; }
  #party-used { margin-top: 6px; }
  .set-row .seg { justify-content: flex-end; flex-wrap: nowrap; }
  .local-settings .set-row .seg button, .set-row .seg button { height: 26px; min-width: 30px; padding: 0 6px; font-size: 11.5px; }
  .set-row > span { font-size: 13px; }
  #party-side { display: none; }
  .lobby { padding: 14px 14px; }
  .settings-card-head { margin-bottom: 2px; }
  #party-local .lead { line-height: 1.45; font-size: 13px; margin-bottom: 8px; }
  #party-players .chip, #party-players > * { padding-top: 4px; padding-bottom: 4px; }
  #party-add input { padding-top: 9px; padding-bottom: 9px; }
  #party-add button { min-height: 40px; }
  #party-pic img { width: 48px; height: 48px; }
  #party-online .lead { font-size: 13px; margin-bottom: 8px; }
  #party-online .online-card { margin-top: 8px; padding: 8px 12px 10px; }
  #party-online .online-card p { font-size: 13px; margin-bottom: 8px; }
}
