body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at center, #251019 0%, #09080b 60%, #030204 100%);
  color: #efe8df;
  font-family: Georgia, "Times New Roman", serif;
}

/* ================= V274 NEW HOST PLEASE ================= */

.request-new-host-btn {
  border-color: rgba(178, 68, 68, .58) !important;
  color: #f2c7bd !important;
  background: linear-gradient(180deg, rgba(84, 23, 27, .76), rgba(35, 10, 14, .9)) !important;
}

.request-new-host-btn:hover,
.request-new-host-btn:focus-visible {
  border-color: rgba(231, 134, 103, .9) !important;
  color: #fff1d2 !important;
}

.host-transfer-overlay {
  position: fixed;
  inset: 0;
  z-index: 26000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 18%, rgba(116, 24, 32, .2), transparent 38%),
    rgba(2, 2, 5, .9);
  backdrop-filter: blur(7px);
}

.host-transfer-overlay.hidden {
  display: none !important;
}

.host-transfer-card {
  width: min(580px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow-y: auto;
  box-sizing: border-box;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(209, 156, 75, .55);
  border-radius: 18px;
  color: #eee4d3;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(37, 13, 17, .98), rgba(9, 9, 13, .99) 62%),
    #09090d;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .78), inset 0 0 42px rgba(150, 39, 42, .08);
}

.host-transfer-kicker {
  margin-bottom: 9px;
  color: #d1a152;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .17em;
}

.host-transfer-card h2 {
  margin: 0 0 14px;
  color: #f0d28b;
}

.host-transfer-summary {
  margin: 0 auto 18px;
  max-width: 46ch;
  line-height: 1.55;
}

.host-transfer-progress {
  margin: 14px 0;
  padding: 12px 15px;
  border: 1px solid rgba(209, 156, 75, .32);
  border-radius: 11px;
  color: #f1d89b;
  background: rgba(209, 156, 75, .08);
  font-weight: 800;
  letter-spacing: .035em;
}

.host-transfer-details {
  display: grid;
  gap: 7px;
  margin: 15px 0;
  text-align: left;
}

.host-transfer-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
}

.host-transfer-details span {
  color: #cfae79;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .065em;
  text-align: right;
}

.host-transfer-details p,
.host-transfer-status {
  color: #c9bdad;
  font-size: .88rem;
  line-height: 1.5;
}

.host-transfer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.host-transfer-actions #closeHostTransferBtn {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .host-transfer-overlay {
    padding: 10px;
  }

  .host-transfer-card {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 24px 16px;
  }

  .host-transfer-actions {
    grid-template-columns: 1fr;
  }

  .host-transfer-actions #closeHostTransferBtn {
    grid-column: auto;
  }

  .host-transfer-details > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .host-transfer-details span {
    text-align: left;
  }
}

.hidden {
  display: none !important;
}

.landing-page,
#app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.landing-content,
.panel {
  width: min(700px, 94vw);
  text-align: center;
  padding: 28px;
  background: rgba(8, 6, 10, 0.82);
  border: 1px solid rgba(214, 168, 79, 0.28);
  border-radius: 24px;
  box-shadow: 0 0 70px rgba(0,0,0,.65);
}

h1 {
  letter-spacing: .12em;
  font-size: clamp(2.4rem, 7vw, 5rem);
  margin-bottom: 6px;
}

h2,
.tagline,
.prove-it,
strong {
  color: #d6a84f;
}

p {
  line-height: 1.45;
}

label {
  display: block;
  text-align: left;
  margin-top: 14px;
  color: #a99699;
  text-transform: uppercase;
  font-size: .8rem;
}

input {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0f0b12;
  color: white;
  box-sizing: border-box;
}

button {
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: #9d1723;
  color: white;
  cursor: pointer;
  letter-spacing: .08em;
}

button.secondary {
  background: #342332;
}

#connectionStatus,
#roomResult {
  color: #d6a84f;
}
.lobby-panel {
  margin-top: 20px;
}

.lobby-label {
  margin: 0;
  color: #a99699;
  font-size: .8rem;
  letter-spacing: .12em;
}

.room-code-display {
  margin: 8px auto 12px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.45);
  border-radius: 16px;
  background: rgba(0,0,0,.35);
  color: #d6a84f;
  font-size: 2rem;
  letter-spacing: .16em;
}

.player-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.player-row {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.25);
}

.late-join-waiting-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.28);
  border-radius: 16px;
  background: rgba(0,0,0,.32);
  text-align: center;
}

.late-join-waiting-panel h3 {
  margin-top: 0;
  color: #d6a84f;
}

.late-join-waiting-panel p {
  line-height: 1.45;
}

.pending-join-panel {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.pending-join-panel h3 {
  margin-top: 0;
  color: #d6a84f;
}

.pending-join-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.pending-join-row {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.25);
}

.pending-join-name {
  color: #efe8df;
  font-weight: bold;
  margin-bottom: 8px;
}

.pending-join-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pending-join-actions button {
  margin-top: 0;
  padding: 10px;
  font-size: .75rem;
}

#startGameBtn {
  margin-top: 18px;
  background: #9d1723;
}
.game-room-panel {
  margin-top: 22px;
}

.game-status-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.game-status-row > div {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.25);
}

.small-label {
  display: block;
  color: #a99699;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.room-table {
  position: relative;
  min-height: 280px;
  margin-top: 18px;
  border-radius: 50%;
  border: 2px solid rgba(214,168,79,.3);
  background: radial-gradient(circle, #3b1c20 0%, #160b0f 62%, transparent 63%);
  box-shadow: inset 0 0 50px rgba(0,0,0,.7);
}

.table-center-text {
  position: absolute;
  inset: 42% 0 auto;
  text-align: center;
  color: #d6a84f;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.room-player-list {
  position: absolute;
  inset: 0;
}

.room-player-seat {
  position: absolute;
  width: 100px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.55);
  text-align: center;
  transform: translate(-50%, -50%);
  font-size: .85rem;
}

.raven-box {
  margin-top: 18px;
  padding: 14px;
  border-left: 4px solid #9d1723;
  background: rgba(0,0,0,.3);
}
.role-text {
  font-size: .9rem;
  font-weight: normal;
  letter-spacing: .02em;
  color: #efe8df;
  margin-top: 8px;
  line-height: 1.4;
}

.role-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(214,168,79,.2);
  border-radius: 10px;
  background: rgba(0,0,0,.2);
}
.role-instruction-box {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
  text-align: left;
  font-size: .95rem;
  line-height: 1.45;
}

.role-instruction-box p {
  margin-bottom: 10px;
}
#phaseTimerDisplay {
  color: #d6a84f;
  font-size: 1.2rem;
}

.table-of-deception-panel,
.secret-messages-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 16px;
  background: rgba(0,0,0,.28);
  text-align: left;
}

.table-of-deception-panel h3,
.secret-messages-panel h3,
.raven-box h4 {
  margin-top: 0;
  color: #d6a84f;
  text-align: center;
}

.table-of-deception-messages {
  height: 180px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(0,0,0,.32);
}

.table-of-deception-message {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.table-of-deception-name {
  color: #d6a84f;
  font-weight: bold;
}

.table-of-deception-text {
  margin-top: 3px;
  color: #efe8df;
  word-wrap: break-word;
}

.table-of-deception-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.table-of-deception-input-row input {
  margin: 0;
}

.table-of-deception-input-row button {
  width: auto;
  margin: 0;
  padding: 0 18px;
}

.raven-feed-list {
  margin-top: 12px;
  max-height: 180px;
  overflow-y: auto;
  text-align: left;
  font-size: .85rem;
}

.raven-feed-item {
  padding: 8px;
  margin-bottom: 6px;
  border-left: 3px solid rgba(214,168,79,.55);
  background: rgba(0,0,0,.24);
  color: #d7cfc8;
}

@media (max-width: 650px) {
  .game-status-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-of-deception-input-row {
    grid-template-columns: 1fr;
  }

  .table-of-deception-input-row button {
    width: 100%;
    padding: 13px;
  }
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.raven-side-panel {
  position: sticky;
  top: 14px;
}

.raven-box {
  margin-top: 0;
}

.raven-box h4 {
  color: #d6a84f;
  margin-bottom: 8px;
  text-align: center;
}

.table-side-panel {
  min-width: 0;
}

.raven-feed-list {
  max-height: 330px;
}

@media (max-width: 800px) {
  .game-layout {
    grid-template-columns: 1fr;
  }

  .raven-side-panel {
    position: static;
    order: -1;
  }

  .raven-feed-list {
    max-height: 180px;
  }
}
.secret-messages-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.secret-unread-count {
  min-width: 24px;
  height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #9d1723;
  color: #fff;
  font-size: .8rem;
  font-weight: bold;
  display: inline-grid;
  place-items: center;
}

.raven-role-reminder-btn {
  margin: 12px 0 14px;
  background: linear-gradient(180deg, #b7842f, #7a4d12);
  color: #120b05;
  border: 1px solid rgba(255, 226, 150, .55);
  box-shadow:
    0 0 18px rgba(214,168,79,.18),
    inset 0 0 12px rgba(255,255,255,.08);
  font-weight: bold;
  letter-spacing: .08em;
}

.raven-role-reminder-btn:hover {
  filter: brightness(1.08);
}

.secret-message-notice {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgba(214,168,79,.35);
  border-radius: 12px;
  background: rgba(157,23,35,.18);
  color: #d6a84f;
  text-align: center;
  font-style: italic;
}

.secret-message-form {
  margin-top: 12px;
}

.secret-message-form select,
.secret-message-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0f0b12;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}

.secret-message-form select {
  padding: 12px;
}

.secret-message-form textarea {
  min-height: 90px;
  padding: 12px;
  resize: vertical;
}

.secret-message-divider {
  height: 1px;
  margin: 16px 0;
  background: rgba(255,255,255,.12);
}

.secret-inbox-title {
  color: #d6a84f;
  text-align: center;
  margin: 8px 0 10px;
}

.secret-messages-inbox {
  display: grid;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
}

.secret-message-card {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.26);
}

.secret-message-card.sealed {
  cursor: pointer;
  text-align: center;
}

.secret-message-card.sealed:focus-visible {
  outline: 2px solid #efd79b;
  outline-offset: 2px;
}

.secret-message-sealed-title {
  color: #d6a84f;
  font-weight: bold;
  margin-bottom: 6px;
}

.secret-message-sealed-meta {
  color: #a99699;
  font-size: .8rem;
}

.secret-message-card.unread {
  border-color: rgba(214,168,79,.45);
  background: rgba(214,168,79,.08);
}

.secret-message-from {
  color: #d6a84f;
  font-weight: bold;
  margin-bottom: 5px;
}

.secret-message-text {
  color: #efe8df;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.secret-message-meta {
  margin-top: 8px;
  color: #a99699;
  font-size: .75rem;
}

.secret-message-card button {
  margin-top: 8px;
  padding: 9px;
  font-size: .75rem;
  background: #342332;
}

@media (max-width: 650px) {
  .secret-messages-inbox {
    max-height: 180px;
  }
}
.phase-control-panel,
.challenge-placeholder-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 16px;
  background: rgba(0,0,0,.28);
  text-align: center;
}

.phase-control-panel h3,
.challenge-placeholder-panel h3 {
  margin-top: 0;
  color: #d6a84f;
}

.challenge-placeholder-panel {
  border-left: 4px solid #9d1723;
}
.challenge-waiting-box,
.active-challenge-box,
.challenge-result-box,
.challenge-host-controls {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.active-challenge-box h3,
.active-challenge-box h4,
.challenge-result-box h4 {
  color: #d6a84f;
  text-align: center;
}

.challenge-instructions,
.challenge-tiebreaker {
  text-align: left;
  line-height: 1.45;
}

.challenge-host-controls label {
  margin-top: 14px;
}

.challenge-host-controls select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0f0b12;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}
.voting-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 16px;
  background: rgba(0,0,0,.28);
  text-align: center;
}

.voting-panel h3,
.vote-status-box h4,
.voting-result-box h4 {
  color: #d6a84f;
  margin-top: 0;
}

.voting-instruction-box,
.vote-form-box,
.vote-status-box,
.voting-result-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.vote-form-box select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0f0b12;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}

.vote-status-list {
  display: grid;
  gap: 8px;
  text-align: left;
}

.vote-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.08);
}

.vote-status-row.voted {
  border-color: rgba(214,168,79,.35);
}

.vote-status-name {
  color: #efe8df;
}

.vote-status-state {
  color: #d6a84f;
  font-size: .85rem;
}
.final-reveal-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(214,168,79,.28);
  border-radius: 16px;
  background: rgba(0,0,0,.34);
  text-align: center;
}

.final-reveal-panel h3,
.final-winner-box h4,
.final-role-list-box h4 {
  color: #d6a84f;
  margin-top: 0;
}

.final-winner-box,
.final-role-list-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.final-role-list {
  display: grid;
  gap: 8px;
  text-align: left;
}

.final-role-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px;
  border-radius: 10px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.08);
}

.final-role-row.soul {
  opacity: .65;
}

.final-role-name {
  color: #efe8df;
}

.final-role-value {
  color: #d6a84f;
  font-weight: bold;
}
.soul-collection-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(190, 38, 38, .4);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(120, 15, 15, .24), rgba(0,0,0,.38)),
    rgba(0,0,0,.34);
  text-align: center;
  box-shadow: 0 0 18px rgba(120, 15, 15, .18);
}

.soul-collection-panel h3 {
  color: #d6a84f;
  margin-top: 0;
  letter-spacing: .04em;
}

.soul-collection-panel p {
  line-height: 1.45;
}

#soulCollectionText {
  color: #efe8df;
  font-size: 1.02rem;
}

/* ================= HOST JOIN REQUEST ALERT V1 ================= */

.host-join-request-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(0, 0, 0, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.host-join-request-alert-overlay.hidden {
  display: none;
}

.host-join-request-alert-card {
  width: min(540px, 92vw);
  padding: 24px;
  border: 1px solid rgba(214,168,79,.42);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(24, 14, 22, .97), rgba(0, 0, 0, .97));
  box-shadow:
    0 0 44px rgba(0,0,0,.8),
    inset 0 0 24px rgba(214,168,79,.08);
  text-align: center;
}

.host-join-request-alert-card h2 {
  color: #d6a84f;
  margin: 8px 0 12px;
  letter-spacing: .06em;
}

.host-join-request-alert-card p {
  line-height: 1.45;
}

.host-join-request-alert-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ================= SECRET MESSAGE ARRIVAL POPUP V1 ================= */

.secret-message-arrival-overlay {
  position: fixed;
  inset: 0;
  z-index: 99997;
  background: rgba(0, 0, 0, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.secret-message-arrival-overlay.hidden {
  display: none;
}

.secret-message-arrival-card {
  width: min(520px, 92vw);
  padding: 24px;
  border: 1px solid rgba(214,168,79,.38);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(24, 14, 22, .96), rgba(0, 0, 0, .96));
  box-shadow:
    0 0 38px rgba(0,0,0,.75),
    inset 0 0 24px rgba(214,168,79,.08);
  text-align: center;
}

.secret-raven-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.secret-message-arrival-card h2 {
  color: #d6a84f;
  margin: 8px 0 12px;
  letter-spacing: .06em;
}

.secret-message-arrival-card p {
  line-height: 1.45;
}

.secret-message-read-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.secret-message-read-overlay.hidden {
  display: none;
}

.secret-message-read-card {
  width: min(560px, 92vw);
  padding: 24px;
  border: 1px solid rgba(214,168,79,.42);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(24, 14, 22, .97), rgba(0, 0, 0, .97));
  box-shadow:
    0 0 44px rgba(0,0,0,.8),
    inset 0 0 24px rgba(214,168,79,.08);
  text-align: center;
}

.secret-message-read-card h3 {
  color: #d6a84f;
  margin: 8px 0 12px;
}

.secret-message-read-text {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.35);
  color: #efe8df;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ================= ROLE REVEAL FULL SCREEN OVERLAY ================= */

.role-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background:
    radial-gradient(circle at center, rgba(214, 168, 79, .18), rgba(0, 0, 0, .94)),
    rgba(0, 0, 0, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.role-reveal-overlay.hidden {
  display: none;
}

.role-reveal-card {
  width: min(720px, 92vw);
  padding: 32px 24px;
  border: 1px solid rgba(214, 168, 79, .45);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(35, 18, 22, .94), rgba(0, 0, 0, .96));
  box-shadow:
    0 0 50px rgba(214, 168, 79, .18),
    inset 0 0 30px rgba(214, 168, 79, .08);
  text-align: center;
}

.role-reveal-card h2 {
  color: #d6a84f;
  font-size: clamp(2.6rem, 11vw, 5.6rem);
  letter-spacing: .1em;
  margin: 18px 0;
  text-transform: uppercase;
  white-space: pre-line;
}

.role-reveal-card h2.role-reveal-warning-title {
  color: #efe8df;
  font-size: clamp(2rem, 9vw, 4.4rem);
  letter-spacing: .08em;
}

.role-reveal-warning {
  color: #efe8df;
  font-style: italic;
  line-height: 1.45;
}

/* ================= DOCTOR GRAVEN FULL SCREEN OVERLAY ================= */

.doctor-death-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background:
    radial-gradient(circle at center, rgba(130, 0, 0, .34), rgba(0, 0, 0, .95)),
    rgba(0, 0, 0, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.doctor-death-overlay.hidden {
  display: none;
}

.doctor-death-card {
  width: min(720px, 92vw);
  padding: 28px;
  border: 1px solid rgba(214, 168, 79, .35);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(35, 0, 0, .9), rgba(0, 0, 0, .96));
  box-shadow:
    0 0 40px rgba(120, 0, 0, .45),
    inset 0 0 30px rgba(214, 168, 79, .08);
  text-align: center;
}

.doctor-death-card h2 {
  color: #d6a84f;
  letter-spacing: .08em;
  margin-top: 0;
}

#doctorDeathText {
  color: #efe8df;
  font-size: 1.2rem;
  line-height: 1.5;
}

.doctor-death-raven-line {
  color: #aaa;
  font-style: italic;
  margin-top: 18px;
}

#closeDoctorDeathOverlayBtn {
  margin-top: 18px;
}

/* ================= END GAME DECISION PLACEHOLDER ================= */

.end-game-decision-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(214,168,79,.28);
  border-radius: 16px;
  background: rgba(0,0,0,.34);
  text-align: center;
}

.end-game-decision-panel h3,
.end-game-decision-box h4 {
  color: #d6a84f;
  margin-top: 0;
}

.end-game-decision-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.end-game-decision-box p {
  line-height: 1.45;
}

/* ================= END GAME DECISION VOTING V1 ================= */

.end-game-vote-box,
.end-game-status-box,
.end-game-decision-result-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.end-game-vote-box h4,
.end-game-status-box h4,
.end-game-decision-result-box h4 {
  color: #d6a84f;
  margin-top: 0;
}

.end-game-vote-box button {
  margin: 6px;
}

.end-game-vote-status-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.end-game-vote-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px;
  border-radius: 10px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.08);
}

.end-game-vote-status-row.voted {
  border-color: rgba(214,168,79,.35);
}

.end-game-vote-name {
  color: #efe8df;
}

.end-game-vote-state {
  color: #d6a84f;
  font-weight: bold;
}
/* ================= FINAL REVEAL POLISH V1 ================= */

.final-role-reveal-row {
  transition:
    opacity 0.75s ease,
    transform 0.75s ease,
    border-color 0.75s ease,
    background 0.75s ease;
}

.final-role-pending {
  opacity: 0;
  transform: translateY(10px);
}

.final-role-visible {
  opacity: 1;
  transform: translateY(0);
}

.final-role-deceiver {
  color: #ff5c5c;
  text-shadow: 0 0 10px rgba(157, 23, 35, .45);
}

.final-role-innocent {
  color: #d6a84f;
}

.final-role-row:has(.final-role-deceiver) {
  border-color: rgba(157, 23, 35, .42);
  background:
    linear-gradient(90deg, rgba(157, 23, 35, .18), rgba(0,0,0,.28));
}
/* ================= FINAL JUDGMENT OVERLAY V1 ================= */

.final-judgment-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background:
    radial-gradient(circle at center, rgba(214, 168, 79, .18), rgba(0, 0, 0, .94)),
    rgba(0, 0, 0, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.final-judgment-overlay.hidden {
  display: none !important;
}

.final-judgment-card {
  width: min(720px, 92vw);
  padding: 30px 24px;
  border: 1px solid rgba(214, 168, 79, .45);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(35, 18, 22, .96), rgba(0, 0, 0, .98));
  box-shadow:
    0 0 52px rgba(214, 168, 79, .18),
    inset 0 0 30px rgba(214, 168, 79, .08);
  text-align: center;
}

.final-judgment-card h2 {
  color: #d6a84f;
  font-size: clamp(2.1rem, 8vw, 4.8rem);
  letter-spacing: .1em;
  margin: 14px 0 8px;
  text-transform: uppercase;
}

.final-judgment-card h3 {
  color: #efe8df;
  font-size: clamp(1.15rem, 4vw, 2rem);
  letter-spacing: .08em;
  margin: 8px 0 18px;
  text-transform: uppercase;
}

.final-judgment-body {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.35);
  color: #efe8df;
  font-size: 1.1rem;
  line-height: 1.5;
}

.final-judgment-raven-line {
  color: #d6a84f;
  font-style: italic;
  line-height: 1.5;
  margin-top: 16px;
}
/* ================= FINAL REVEAL CINEMATIC OVERLAY V1 ================= */

.final-reveal-cinematic-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background:
    radial-gradient(circle at center, rgba(214, 168, 79, .18), rgba(0, 0, 0, .95)),
    rgba(0, 0, 0, .97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.final-reveal-cinematic-overlay.hidden {
  display: none !important;
}

.final-reveal-cinematic-card {
  width: min(760px, 92vw);
  min-height: 420px;
  padding: 34px 24px;
  border: 1px solid rgba(214, 168, 79, .46);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(35, 18, 22, .97), rgba(0, 0, 0, .98));
  box-shadow:
    0 0 58px rgba(214, 168, 79, .18),
    inset 0 0 34px rgba(214, 168, 79, .08);
  text-align: center;
  display: grid;
  align-content: center;
}

.final-reveal-cinematic-card h2 {
  color: #d6a84f;
  font-size: clamp(2rem, 8vw, 4.6rem);
  letter-spacing: .1em;
  margin: 12px 0;
  text-transform: uppercase;
}

.final-reveal-cinematic-card h3 {
  color: #efe8df;
  font-size: clamp(1.7rem, 7vw, 4.2rem);
  letter-spacing: .08em;
  margin: 12px 0;
  text-transform: uppercase;
}

.final-reveal-cinematic-role {
  color: #d6a84f;
  font-size: clamp(2.2rem, 10vw, 5.4rem);
  font-weight: bold;
  letter-spacing: .12em;
  margin: 12px 0;
  text-transform: uppercase;
}

.final-reveal-cinematic-subtext {
  color: #a99699;
  font-style: italic;
  line-height: 1.5;
  min-height: 44px;
}

.cinematic-role-deceiver {
  color: #ff5c5c;
  text-shadow: 0 0 18px rgba(157, 23, 35, .7);
}

.cinematic-role-innocent {
  color: #d6a84f;
  text-shadow: 0 0 14px rgba(214, 168, 79, .35);
}

.final-reveal-cinematic-card.cinematic-deceiver-card {
  border-color: rgba(157, 23, 35, .62);
  background:
    radial-gradient(circle at center, rgba(157, 23, 35, .25), rgba(0,0,0,.98)),
    linear-gradient(180deg, rgba(35, 18, 22, .97), rgba(0, 0, 0, .98));
  box-shadow:
    0 0 70px rgba(157, 23, 35, .32),
    inset 0 0 38px rgba(157, 23, 35, .12);
}

.final-reveal-cinematic-card.cinematic-innocent-card {
  border-color: rgba(214, 168, 79, .52);
}
/* ================= FINAL MONEY CELEBRATION OVERLAY V1 ================= */

.final-money-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background:
    radial-gradient(circle at center, rgba(214, 168, 79, .24), rgba(0, 0, 0, .96)),
    rgba(0, 0, 0, .97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.final-money-celebration-overlay.hidden {
  display: none !important;
}

.final-money-celebration-card {
  width: min(780px, 92vw);
  padding: 34px 24px;
  border: 1px solid rgba(214, 168, 79, .54);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(35, 18, 22, .97), rgba(0, 0, 0, .98));
  box-shadow:
    0 0 68px rgba(214, 168, 79, .22),
    inset 0 0 36px rgba(214, 168, 79, .08);
  text-align: center;
}

.final-money-celebration-card h2 {
  color: #d6a84f;
  font-size: clamp(1.8rem, 7vw, 4.2rem);
  letter-spacing: .08em;
  margin: 12px 0;
  text-transform: uppercase;
}

.final-money-subtitle {
  color: #efe8df;
  font-size: 1.1rem;
  line-height: 1.45;
  margin: 10px auto 18px;
  max-width: 620px;
}

.final-money-pot-box {
  margin: 22px auto;
  padding: 20px 14px;
  border: 1px solid rgba(214, 168, 79, .45);
  border-radius: 18px;
  background:
    radial-gradient(circle at center, rgba(214,168,79,.18), rgba(0,0,0,.45));
  box-shadow:
    0 0 34px rgba(214, 168, 79, .16),
    inset 0 0 24px rgba(214, 168, 79, .08);
}

.final-money-pot-label {
  color: #a99699;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.final-money-pot-amount {
  color: #d6a84f;
  font-size: clamp(2.8rem, 12vw, 6.4rem);
  font-weight: bold;
  letter-spacing: .04em;
  text-shadow:
    0 0 14px rgba(214,168,79,.42),
    0 0 32px rgba(214,168,79,.22);
}

.final-money-split-line {
  color: #efe8df;
  font-size: clamp(1.25rem, 4vw, 2.15rem);
  font-weight: bold;
  margin: 16px 0 8px;
}

.final-money-raven-line {
  color: #d6a84f;
  font-style: italic;
  line-height: 1.5;
  margin: 16px auto 22px;
  max-width: 620px;
}

/* ================= HIDE FINAL TABLE UNTIL CINEMATIC COMPLETE ================= */

.final-table-hidden-until-complete {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#finalRevealPanel.final-table-hidden-until-complete {
  display: none !important;
}

/* ================= PERMANENT RAVEN CLOCK PANEL - STRONG VERSION ================= */

.legacy-phase-timer-box {
  display: none !important;
}

.phase-timer-hidden-during-voting {
  display: none !important;
}

#ravenClockPanel,
.raven-clock-panel {
  position: relative !important;
  z-index: 50 !important;
  width: min(520px, 94vw);
  margin: 18px auto 46px !important;
  padding: 22px 16px 20px;
  border: 2px solid rgba(214, 168, 79, .72);
  border-radius: 22px;
  background:
    radial-gradient(circle at center, rgba(214,168,79,.24), rgba(0,0,0,.74)),
    linear-gradient(180deg, rgba(40,20,12,.92), rgba(0,0,0,.9));
  box-shadow:
    0 0 44px rgba(214,168,79,.32),
    0 0 90px rgba(120,35,20,.22),
    inset 0 0 28px rgba(214,168,79,.12);
  text-align: center;
  pointer-events: none;
}

.raven-clock-label {
  color: #d6a84f;
  font-size: .82rem;
  font-weight: bold;
  letter-spacing: .24em;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(214,168,79,.35);
}

.raven-clock-value {
  color: #f0c15c;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: .95;
  text-shadow:
    0 0 14px rgba(214,168,79,.6),
    0 0 34px rgba(214,168,79,.34),
    0 0 70px rgba(120,35,20,.28);
}

.raven-clock-countdown-mode .raven-clock-value {
  font-size: clamp(3.25rem, 11vw, 6.4rem);
}

.raven-clock-status-mode .raven-clock-value {
  font-size: clamp(1.65rem, 6vw, 3.1rem);
  letter-spacing: .14em;
  opacity: .82;
}
.raven-clock-subtext {
  margin-top: 12px;
  color: #efe8df;
  font-size: .92rem;
  font-style: italic;
  opacity: .9;
}

/* Adds breathing room so the table/player names cannot cover the clock */
.game-layout {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.room-table {
  position: relative;
  z-index: 1;
}
/* ================= ROLE REVEAL HEARTBEAT BUTTON V1 ================= */

#revealRoleBtn {
  position: relative;
  overflow: hidden;
}

#revealRoleBtn:not(.hidden) {
  animation: roleRevealHeartbeat 2.15s ease-in-out infinite;
  box-shadow:
    0 0 18px rgba(157, 23, 35, .38),
    0 0 38px rgba(214, 168, 79, .12);
}

#revealRoleBtn:not(.hidden)::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background:
    radial-gradient(circle at center, rgba(214,168,79,.28), transparent 62%);
  opacity: 0;
  pointer-events: none;
  animation: roleRevealGlowBreath 2.15s ease-in-out infinite;
}

#revealRoleBtn:not(.hidden)::after {
  content: "THE RAVEN WAITS";
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.62);
  font-size: .58rem;
  letter-spacing: .16em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  animation: roleRevealWhisper 4.3s ease-in-out infinite;
}

@keyframes roleRevealHeartbeat {
  0% {
    transform: scale(1);
    background: #9d1723;
  }

  10% {
    transform: scale(1.035);
    background: #b51b29;
  }

  18% {
    transform: scale(1);
  }

  28% {
    transform: scale(1.055);
    background: #c21f2e;
  }

  40% {
    transform: scale(1);
    background: #9d1723;
  }

  100% {
    transform: scale(1);
    background: #9d1723;
  }
}

@keyframes roleRevealGlowBreath {
  0%, 42%, 100% {
    opacity: 0;
  }

  12% {
    opacity: .45;
  }

  28% {
    opacity: .7;
  }
}

@keyframes roleRevealWhisper {
  0%, 45%, 100% {
    opacity: 0;
  }

  58%, 78% {
    opacity: .72;
  }
}
/* ================= HOST COMMAND CONTROLS V1 ================= */

.phase-control-panel,
.challenge-host-controls {
  position: relative;
  border: 2px solid rgba(214, 168, 79, .72) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), rgba(0,0,0,.42)),
    linear-gradient(180deg, rgba(47, 20, 10, .92), rgba(0, 0, 0, .88)) !important;
  box-shadow:
    0 0 34px rgba(214,168,79,.22),
    0 0 70px rgba(157,23,35,.14),
    inset 0 0 24px rgba(214,168,79,.08);
  animation: hostCommandGlow 3.4s ease-in-out infinite;
}

.phase-control-panel::before,
.challenge-host-controls::before {
  content: "HOST COMMAND";
  display: inline-block;
  margin: -4px auto 10px;
  padding: 6px 12px;
  border: 1px solid rgba(214,168,79,.6);
  border-radius: 999px;
  background: rgba(0,0,0,.56);
  color: #d6a84f;
  font-size: .72rem;
  font-weight: bold;
  letter-spacing: .18em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(214,168,79,.18);
}

.phase-control-panel h3,
.challenge-host-controls h3,
.challenge-host-controls label {
  color: #d6a84f !important;
}

.phase-control-panel .hint,
.challenge-host-controls .hint {
  color: #efe8df;
}

.phase-control-panel button,
.challenge-host-controls button,
#finalizeVotingBtn:not(.hidden),
#continueNextRoundBtn:not(.hidden),
#proceedEndGameDecisionBtn:not(.hidden),
#proceedFinalRevealBtn:not(.hidden),
#finalizeEndGameDecisionBtn:not(.hidden) {
  border: 1px solid rgba(255, 226, 150, .55);
  background:
    linear-gradient(180deg, #c82636, #7d111c) !important;
  color: #fff;
  font-weight: bold;
  letter-spacing: .11em;
  box-shadow:
    0 0 22px rgba(157,23,35,.42),
    0 0 34px rgba(214,168,79,.12);
  animation: hostButtonPulse 2.4s ease-in-out infinite;
}

.phase-control-panel button::before,
.challenge-host-controls button::before,
#finalizeVotingBtn:not(.hidden)::before,
#continueNextRoundBtn:not(.hidden)::before,
#proceedEndGameDecisionBtn:not(.hidden)::before,
#proceedFinalRevealBtn:not(.hidden)::before,
#finalizeEndGameDecisionBtn:not(.hidden)::before {
  content: "👑 ";
}

.challenge-host-controls select {
  border: 1px solid rgba(214,168,79,.42) !important;
  background: #120b0d !important;
  box-shadow: inset 0 0 14px rgba(214,168,79,.08);
}

@keyframes hostCommandGlow {
  0%, 100% {
    box-shadow:
      0 0 24px rgba(214,168,79,.14),
      0 0 60px rgba(157,23,35,.1),
      inset 0 0 20px rgba(214,168,79,.06);
  }

  50% {
    box-shadow:
      0 0 42px rgba(214,168,79,.3),
      0 0 90px rgba(157,23,35,.2),
      inset 0 0 28px rgba(214,168,79,.1);
  }
}

@keyframes hostButtonPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.025);
    filter: brightness(1.15);
  }
}
/* ================= HOST COMMAND TOP BANNER V1 ================= */

.host-command-banner {
  position: sticky;
  top: 10px;
  z-index: 200;
  width: min(620px, 94vw);
  margin: 14px auto 18px;
  padding: 16px 14px;
  border: 2px solid rgba(214, 168, 79, .78);
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.22), rgba(0,0,0,.78)),
    linear-gradient(180deg, rgba(55, 20, 12, .96), rgba(0, 0, 0, .94));
  box-shadow:
    0 0 38px rgba(214,168,79,.28),
    0 0 80px rgba(157,23,35,.18),
    inset 0 0 24px rgba(214,168,79,.1);
  text-align: center;
  animation: hostCommandBannerGlow 3.2s ease-in-out infinite;
}

.host-command-banner-label {
  color: #d6a84f;
  font-size: .78rem;
  font-weight: bold;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(214,168,79,.38);
}

.host-command-banner-text {
  color: #efe8df;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 10px;
}

.host-command-jump-btn {
  width: auto;
  min-width: 220px;
  margin: 4px auto 0;
  padding: 11px 18px;
  border: 1px solid rgba(255, 226, 150, .58);
  background:
    linear-gradient(180deg, #c82636, #7d111c) !important;
  color: #fff;
  font-weight: bold;
  letter-spacing: .12em;
  box-shadow:
    0 0 24px rgba(157,23,35,.42),
    0 0 38px rgba(214,168,79,.12);
  animation: hostCommandJumpPulse 2.1s ease-in-out infinite;
}

.host-command-jump-btn::before {
  content: "👑 ";
}

.host-command-attention {
  animation: hostCommandAttentionFlash 1.8s ease-in-out;
}

@keyframes hostCommandBannerGlow {
  0%, 100% {
    box-shadow:
      0 0 26px rgba(214,168,79,.18),
      0 0 60px rgba(157,23,35,.1),
      inset 0 0 20px rgba(214,168,79,.08);
  }

  50% {
    box-shadow:
      0 0 44px rgba(214,168,79,.34),
      0 0 90px rgba(157,23,35,.2),
      inset 0 0 30px rgba(214,168,79,.12);
  }
}

@keyframes hostCommandJumpPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.035);
    filter: brightness(1.18);
  }
}

@keyframes hostCommandAttentionFlash {
  0%, 100% {
    box-shadow:
      0 0 34px rgba(214,168,79,.22),
      0 0 70px rgba(157,23,35,.14),
      inset 0 0 24px rgba(214,168,79,.08);
  }

  35%, 70% {
    box-shadow:
      0 0 70px rgba(214,168,79,.55),
      0 0 120px rgba(157,23,35,.32),
      inset 0 0 38px rgba(214,168,79,.18);
    transform: scale(1.015);
  }
}
/* ================= CLEAN STATUS ROW AFTER RAVEN CLOCK ================= */

.game-status-row {
  grid-template-columns: repeat(3, 1fr) !important;
}

.legacy-phase-timer-box {
  display: none !important;
}
/* ================= SHIELD CHOICE / RAVEN DAGGER V1 ================= */

.shield-choice-panel {
  margin-top: 18px;
  padding: 18px;
  border: 2px solid rgba(214, 168, 79, .72);
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.2), rgba(0,0,0,.52)),
    linear-gradient(180deg, rgba(45, 20, 11, .94), rgba(0,0,0,.9));
  box-shadow:
    0 0 42px rgba(214,168,79,.22),
    0 0 80px rgba(157,23,35,.16),
    inset 0 0 24px rgba(214,168,79,.09);
  text-align: center;
  animation: shieldChoiceGlow 3.2s ease-in-out infinite;
}

.shield-choice-panel h3 {
  color: #d6a84f;
  margin-top: 0;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.shield-choice-warning {
  color: #efe8df;
  font-size: 1.05rem;
  font-weight: bold;
}

.shield-choice-box {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(0,0,0,.28);
  text-align: left;
}

.shield-choice-box p {
  margin: 8px 0;
  line-height: 1.45;
}

.shield-choice-panel select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(214,168,79,.42);
  background: #0f0b12;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}

#keepShieldChoiceBtn {
  background:
    linear-gradient(180deg, #b7842f, #7a4d12) !important;
  color: #120b05;
  font-weight: bold;
}

#transferShieldChoiceBtn {
  background:
    linear-gradient(180deg, #5e3c70, #2c1938) !important;
}

#convertShieldToDaggerBtn {
  background:
    linear-gradient(180deg, #c82636, #7d111c) !important;
  border: 1px solid rgba(255, 226, 150, .44);
  box-shadow:
    0 0 22px rgba(157,23,35,.35),
    0 0 34px rgba(214,168,79,.1);
}

@keyframes shieldChoiceGlow {
  0%, 100% {
    box-shadow:
      0 0 28px rgba(214,168,79,.14),
      0 0 60px rgba(157,23,35,.1),
      inset 0 0 20px rgba(214,168,79,.07);
  }

  50% {
    box-shadow:
      0 0 46px rgba(214,168,79,.3),
      0 0 90px rgba(157,23,35,.2),
      inset 0 0 30px rgba(214,168,79,.12);
  }
}
/* ================= SHIELD / DAGGER VOTING NOTICES V1 ================= */

.dagger-vote-notice,
.shield-vote-notice {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  animation: tablePowerNoticeGlow 3s ease-in-out infinite;
}

.dagger-vote-notice {
  border: 2px solid rgba(157, 23, 35, .72);
  background:
    radial-gradient(circle at top, rgba(157,23,35,.28), rgba(0,0,0,.48)),
    linear-gradient(180deg, rgba(40, 5, 8, .96), rgba(0,0,0,.9));
  box-shadow:
    0 0 36px rgba(157,23,35,.34),
    inset 0 0 22px rgba(214,168,79,.08);
}

.shield-vote-notice {
  border: 2px solid rgba(214, 168, 79, .72);
  background:
    radial-gradient(circle at top, rgba(214,168,79,.24), rgba(0,0,0,.48)),
    linear-gradient(180deg, rgba(46, 27, 9, .96), rgba(0,0,0,.9));
  box-shadow:
    0 0 36px rgba(214,168,79,.28),
    inset 0 0 22px rgba(214,168,79,.08);
}

.dagger-vote-notice h4,
.shield-vote-notice h4 {
  color: #d6a84f;
  margin: 0 0 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dagger-vote-notice p,
.shield-vote-notice p {
  margin: 6px 0;
}

@keyframes tablePowerNoticeGlow {
  0%, 100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.12);
  }
}
/* ================= RAVEN CLOCK DANGER MODE ================= */

.raven-clock-danger-mode {
  border-color: rgba(255, 78, 78, .82) !important;
  box-shadow:
    0 0 54px rgba(255, 78, 78, .42),
    0 0 92px rgba(214,168,79,.22),
    inset 0 0 30px rgba(255, 78, 78, .13) !important;
  animation: ravenClockDangerPulse 1.1s ease-in-out infinite;
}

.raven-clock-danger-mode .raven-clock-value {
  color: #ff6b6b;
  text-shadow:
    0 0 16px rgba(255, 78, 78, .74),
    0 0 38px rgba(255, 78, 78, .42),
    0 0 74px rgba(214,168,79,.22);
}

@keyframes ravenClockDangerPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.035);
    filter: brightness(1.2);
  }
}
/* ================= MOBILE / SCREEN CENTERING FIX V1 ================= */

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-shell,
main,
.panel,
.game-room-panel {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.panel,
.game-room-panel {
  box-sizing: border-box;
}

@media (max-width: 700px) {
  body {
    padding-left: 10px;
    padding-right: 10px;
  }

  .app-shell,
  main,
  .panel,
  .game-room-panel {
    width: 100%;
    max-width: 100%;
  }

  .game-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .table-panel,
  .raven-side-panel,
  .players-panel,
  .challenge-panel,
  .voting-panel,
  .phase-control-panel,
  .host-command-banner,
  .raven-clock-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .game-status-row {
    width: 100%;
    grid-template-columns: 1fr !important;
  }

  .game-status-row > div {
    width: 100%;
    box-sizing: border-box;
  }
}
/* ================= FINAL MONEY SCREEN MOBILE CLIPPING FIX V1 ================= */

.final-money-celebration-overlay {
  align-items: flex-start !important;
  justify-content: center !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 24px 14px !important;
  box-sizing: border-box !important;
}

.final-money-celebration-card {
  width: min(94vw, 680px) !important;
  max-height: none !important;
  margin: 18px auto 32px !important;
  padding-top: 28px !important;
  padding-bottom: 28px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.final-money-celebration-card img,
.final-money-celebration-card .raven-icon,
.final-money-celebration-card .final-money-raven,
.final-money-celebration-card .final-raven-icon {
  display: block !important;
  max-width: 96px !important;
  max-height: 96px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 auto 14px !important;
  object-fit: contain !important;
  overflow: visible !important;
}

.final-money-celebration-card button,
.final-money-celebration-card .primary-btn,
.final-money-celebration-card .danger-btn {
  display: block !important;
  width: 100% !important;
  max-width: 360px !important;
  min-height: 48px !important;
  margin: 18px auto 0 !important;
  white-space: normal !important;
}

@media (max-width: 700px) {
  .final-money-celebration-overlay {
    padding-top: 18px !important;
    padding-bottom: 26px !important;
  }

  .final-money-celebration-card {
    width: 94vw !important;
    margin-top: 8px !important;
    margin-bottom: 28px !important;
    padding: 22px 16px 24px !important;
  }

  .final-money-pot-amount {
    font-size: clamp(2rem, 11vw, 3.2rem) !important;
    line-height: 1.05 !important;
    word-break: break-word !important;
  }
}
/* ================= DOCTOR GRAVEN / LAST WORDS OVERLAYS V1 ================= */

.death-cinematic-overlay,
.last-words-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(circle at top, rgba(120, 0, 0, .32), transparent 42%),
    radial-gradient(circle at bottom, rgba(214, 168, 79, .12), transparent 38%),
    rgba(0, 0, 0, .92);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.death-cinematic-card,
.last-words-card {
  width: min(94vw, 680px);
  margin: 18px auto 34px;
  padding: 24px 18px;
  border-radius: 22px;
  border: 2px solid rgba(120, 0, 0, .74);
  background:
    linear-gradient(180deg, rgba(24, 4, 6, .98), rgba(5, 5, 8, .98)),
    radial-gradient(circle at center, rgba(214, 168, 79, .12), transparent 62%);
  box-shadow:
    0 0 48px rgba(120, 0, 0, .52),
    0 0 92px rgba(0, 0, 0, .82),
    inset 0 0 28px rgba(214, 168, 79, .08);
  text-align: center;
  box-sizing: border-box;
  animation: deathCardRise 520ms ease-out;
}

.death-cinematic-card h2,
.last-words-card h2 {
  margin: 10px 0 14px;
  color: #f0c15c;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1.08;
  text-shadow:
    0 0 14px rgba(214, 168, 79, .45),
    0 0 38px rgba(120, 0, 0, .38);
}

.death-cinematic-card p,
.last-words-card p {
  color: rgba(255, 255, 255, .86);
  line-height: 1.5;
}

.death-cinematic-kicker,
.last-words-kicker {
  color: rgba(255, 255, 255, .64);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-top: 14px;
}

.death-image-placeholder {
  min-height: 180px;
  border-radius: 18px;
  border: 1px solid rgba(214, 168, 79, .34);
  background:
    radial-gradient(circle at 70% 35%, rgba(214, 168, 79, .18), transparent 26%),
    radial-gradient(circle at 30% 70%, rgba(120, 0, 0, .36), transparent 34%),
    linear-gradient(135deg, rgba(0,0,0,.96), rgba(35, 6, 10, .96));
  box-shadow:
    inset 0 0 38px rgba(0, 0, 0, .68),
    0 0 24px rgba(120, 0, 0, .26);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 18px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.death-image-placeholder::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,.05) 45%, transparent 72%);
  transform: rotate(8deg);
  animation: deathImageSweep 4.8s ease-in-out infinite;
}

.death-image-label {
  color: #f0c15c;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(214, 168, 79, .42);
  position: relative;
  z-index: 1;
}

.death-image-subtext {
  color: rgba(255, 255, 255, .58);
  font-size: .86rem;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.death-cinematic-warning {
  margin: 16px auto;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(214, 168, 79, .34);
  background: rgba(0, 0, 0, .34);
  color: #f0c15c !important;
  font-weight: 700;
}

.death-cinematic-btn {
  margin-top: 16px;
  min-height: 48px;
  width: min(100%, 360px);
  border-radius: 14px;
  border: 1px solid rgba(214, 168, 79, .5);
  background:
    linear-gradient(180deg, #9d1723, #650b13);
  color: #fff;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow:
    0 0 24px rgba(157, 23, 35, .42),
    inset 0 0 12px rgba(255, 255, 255, .08);
}

.death-cinematic-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.last-words-intro {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.last-words-timer-row {
  margin: 16px auto 18px;
  padding: 12px 14px;
  width: min(100%, 420px);
  border-radius: 16px;
  border: 1px solid rgba(214, 168, 79, .38);
  background: rgba(0, 0, 0, .42);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}

.last-words-timer-row span {
  color: rgba(255, 255, 255, .68);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-weight: 800;
}

#lastWordsTimerDisplay {
  color: #f0c15c;
  font-size: 1.45rem;
  text-shadow:
    0 0 12px rgba(214, 168, 79, .52),
    0 0 28px rgba(157, 23, 35, .32);
}

.last-words-timer-danger #lastWordsTimerDisplay {
  color: #ff6b6b;
  animation: lastWordsTimerPulse 1s ease-in-out infinite;
}

.last-words-slots {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.last-words-slot {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(214, 168, 79, .25);
  background: rgba(0, 0, 0, .38);
  display: grid;
  gap: 9px;
  text-align: left;
}

.last-words-slot label {
  color: #f0c15c;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}

.last-words-slot select {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(214, 168, 79, .32);
  background: rgba(8, 8, 10, .96);
  color: #fff;
  padding: 0 10px;
  box-sizing: border-box;
}

.last-words-hint {
  margin-top: 14px;
  color: rgba(255, 255, 255, .62) !important;
  font-style: italic;
}

.raven-feed-last-words {
  border: 2px solid rgba(214, 168, 79, .74) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.22), rgba(0,0,0,.42)),
    linear-gradient(180deg, rgba(45, 7, 11, .96), rgba(0,0,0,.9)) !important;
  box-shadow:
    0 0 32px rgba(214,168,79,.28),
    0 0 52px rgba(157,23,35,.22) !important;
  animation: lastWordsFeedGlow 3s ease-in-out infinite;
}

@keyframes deathCardRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes deathImageSweep {
  0%, 100% {
    transform: translateX(-42%) rotate(8deg);
    opacity: .22;
  }

  50% {
    transform: translateX(42%) rotate(8deg);
    opacity: .44;
  }
}

@keyframes lastWordsTimerPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.12);
    filter: brightness(1.22);
  }
}

@keyframes lastWordsFeedGlow {
  0%, 100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.18);
  }
}

@media (max-width: 700px) {
  .death-cinematic-overlay,
  .last-words-overlay {
    padding: 14px 10px 24px;
  }

  .death-cinematic-card,
  .last-words-card {
    width: 94vw;
    margin-top: 8px;
    padding: 20px 14px 22px;
    border-radius: 18px;
  }

  .death-image-placeholder {
    min-height: 150px;
  }

  .death-cinematic-card h2,
  .last-words-card h2 {
    font-size: clamp(1.35rem, 7vw, 2rem);
  }

  .last-words-timer-row {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}
/* ================= RAVEN FEED LAST WORDS POLISH V1 ================= */

.raven-feed-last-words-title {
  color: #f0c15c;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
  text-shadow:
    0 0 10px rgba(214,168,79,.48),
    0 0 24px rgba(157,23,35,.32);
}

.raven-feed-last-words-message {
  color: rgba(255,255,255,.92);
  font-style: italic;
  line-height: 1.45;
}
/* ================= LAST WORDS BROADCAST POPUP V1 ================= */

.last-words-broadcast-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), transparent 38%),
    radial-gradient(circle at bottom, rgba(120,0,0,.32), transparent 42%),
    rgba(0,0,0,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
}

.last-words-broadcast-card {
  width: min(94vw, 620px);
  padding: 24px 18px;
  border-radius: 22px;
  border: 2px solid rgba(214,168,79,.76);
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), transparent 48%),
    linear-gradient(180deg, rgba(34,5,8,.98), rgba(3,3,6,.98));
  box-shadow:
    0 0 44px rgba(214,168,79,.34),
    0 0 82px rgba(157,23,35,.28),
    inset 0 0 28px rgba(214,168,79,.08);
  text-align: center;
  animation: lastWordsBroadcastRise 460ms ease-out;
}

.last-words-broadcast-kicker {
  color: rgba(255,255,255,.66);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.last-words-broadcast-card h2 {
  margin: 0 0 16px;
  color: #f0c15c;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1.08;
  text-shadow:
    0 0 14px rgba(214,168,79,.5),
    0 0 34px rgba(157,23,35,.38);
}

.last-words-broadcast-card p {
  color: rgba(255,255,255,.9);
  font-style: italic;
  line-height: 1.5;
  margin: 0 auto 18px;
  max-width: 520px;
}

#lastWordsBroadcastTiming:not([hidden]) {
  display: block;
  margin: 8px auto 0;
  color: #e1cdae;
  font-size: .9rem;
  line-height: 1.4;
}

@keyframes lastWordsBroadcastRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 700px) {
  .last-words-broadcast-card {
    padding: 22px 14px;
  }

  .last-words-broadcast-card h2 {
    font-size: clamp(1.25rem, 7vw, 1.9rem);
  }
}
/* ================= CHARACTER INTRO MONTAGE PLACEHOLDER V1 ================= */

.character-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), transparent 36%),
    radial-gradient(circle at bottom, rgba(120,0,0,.34), transparent 42%),
    rgba(0,0,0,.94);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.character-intro-card {
  width: min(94vw, 720px);
  margin: 16px auto 34px;
  padding: 24px 18px;
  border-radius: 24px;
  border: 2px solid rgba(214,168,79,.58);
  background:
    radial-gradient(circle at top, rgba(214,168,79,.16), transparent 46%),
    linear-gradient(180deg, rgba(20,4,7,.98), rgba(3,3,8,.98));
  box-shadow:
    0 0 54px rgba(214,168,79,.24),
    0 0 94px rgba(157,23,35,.28),
    inset 0 0 30px rgba(214,168,79,.07);
  text-align: center;
  box-sizing: border-box;
  animation: characterIntroRise 520ms ease-out;
}

.character-intro-image-placeholder {
  min-height: 240px;
  border-radius: 20px;
  border: 1px solid rgba(214,168,79,.36);
  background:
    radial-gradient(circle at 50% 28%, rgba(214,168,79,.18), transparent 28%),
    radial-gradient(circle at 70% 75%, rgba(157,23,35,.28), transparent 34%),
    linear-gradient(135deg, rgba(0,0,0,.98), rgba(28,5,9,.98));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  box-shadow:
    inset 0 0 44px rgba(0,0,0,.72),
    0 0 28px rgba(157,23,35,.2);
}

.character-intro-image-placeholder::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,.055) 45%, transparent 72%);
  transform: rotate(8deg);
  animation: characterIntroSweep 4.6s ease-in-out infinite;
}

.character-intro-image-label {
  position: relative;
  z-index: 1;
  color: #f0c15c;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-shadow:
    0 0 16px rgba(214,168,79,.46),
    0 0 34px rgba(157,23,35,.3);
}

.character-intro-kicker {
  margin-top: 18px;
  color: rgba(255,255,255,.62);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.character-intro-card h2 {
  margin: 10px 0 12px;
  color: #f0c15c;
  text-transform: uppercase;
  letter-spacing: .1em;
  line-height: 1.08;
  text-shadow:
    0 0 14px rgba(214,168,79,.48),
    0 0 36px rgba(157,23,35,.34);
}

.character-intro-card p {
  max-width: 580px;
  margin: 0 auto;
  color: rgba(255,255,255,.88);
  line-height: 1.55;
  font-size: 1rem;
}

.character-intro-progress {
  margin: 18px auto 0;
  color: rgba(255,255,255,.55);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
}

.character-intro-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.character-intro-actions button {
  min-width: 150px;
  min-height: 46px;
}

@keyframes characterIntroRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes characterIntroSweep {
  0%, 100% {
    transform: translateX(-42%) rotate(8deg);
    opacity: .22;
  }

  50% {
    transform: translateX(42%) rotate(8deg);
    opacity: .44;
  }
}

@media (max-width: 700px) {
  .character-intro-overlay {
    padding: 14px 10px 24px;
  }

  .character-intro-card {
    width: 94vw;
    margin-top: 8px;
    padding: 20px 14px 22px;
    border-radius: 20px;
  }

  .character-intro-image-placeholder {
    min-height: 170px;
  }

  .character-intro-card h2 {
    font-size: clamp(1.35rem, 7vw, 2rem);
  }

  .character-intro-actions {
    flex-direction: column-reverse;
  }

  .character-intro-actions button {
    width: 100%;
  }
}
/* ================= HARD HIDE SAFETY FIX ================= */

[hidden] {
  display: none !important;
}

.character-intro-overlay.hidden,
.death-cinematic-overlay.hidden,
.last-words-overlay.hidden,
.last-words-broadcast-overlay.hidden {
  display: none !important;
}

/* ================= MOBILE RIGHT-SHIFT / OVERFLOW FIX V2 ================= */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  margin: 0;
  padding: 0;
}

body {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

#app,
.landing-page,
.game-room-panel,
.panel,
.game-layout,
.table-side-panel,
.raven-side-panel,
.room-table,
.raven-clock-panel,
.host-command-banner {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 700px) {
  body {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .landing-page,
  #app {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    overflow-x: hidden !important;
  }

  .landing-content,
  .panel,
  .game-room-panel {
    width: 100% !important;
    max-width: calc(100vw - 20px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .game-layout {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow-x: hidden !important;
  }

  .raven-side-panel,
  .table-side-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .room-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .room-player-seat {
    max-width: 86px !important;
    font-size: .74rem !important;
    padding: 6px !important;
  }

  button,
  input,
  select,
  textarea {
    max-width: 100% !important;
  }
}
/* ================= STUDY THE MASKS BUTTON V1 ================= */

.study-masks-btn {
  margin: 10px auto 14px;
  padding: 10px 12px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(214,168,79,.38);
  background:
    linear-gradient(180deg, rgba(52,35,50,.96), rgba(14,9,17,.96));
  color: #d6a84f;
  font-size: .78rem;
  font-weight: bold;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow:
    0 0 18px rgba(214,168,79,.1),
    inset 0 0 12px rgba(214,168,79,.05);
}

.study-masks-btn:hover {
  filter: brightness(1.12);
}
/* ================= ROLE REVEAL WAITING THROB V1 ================= */

.raven-waiting-after-role-reveal {
  border-color: rgba(214, 168, 79, .92) !important;
  animation: ravenWaitingRoleRevealPanelPulse 2.2s ease-in-out infinite;
}

.raven-waiting-after-role-reveal .raven-clock-subtext {
  color: #f0c15c !important;
  font-weight: bold;
  animation: ravenWaitingRoleRevealTextThrob 1.45s ease-in-out infinite;
  text-shadow:
    0 0 10px rgba(214, 168, 79, .55),
    0 0 24px rgba(214, 168, 79, .28);
}

.raven-waiting-after-role-reveal .raven-clock-value {
  animation: ravenWaitingRoleRevealValueGlow 1.8s ease-in-out infinite;
}

@keyframes ravenWaitingRoleRevealTextThrob {
  0%, 100% {
    opacity: .62;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.045);
  }
}

@keyframes ravenWaitingRoleRevealValueGlow {
  0%, 100% {
    filter: brightness(.92);
  }

  50% {
    filter: brightness(1.25);
  }
}

@keyframes ravenWaitingRoleRevealPanelPulse {
  0%, 100% {
    box-shadow:
      0 0 30px rgba(214,168,79,.22),
      0 0 70px rgba(120,35,20,.16),
      inset 0 0 24px rgba(214,168,79,.08);
  }

  50% {
    box-shadow:
      0 0 54px rgba(214,168,79,.42),
      0 0 110px rgba(120,35,20,.26),
      inset 0 0 34px rgba(214,168,79,.14);
  }
}
.studio-tag {
  margin: -2px 0 10px;
  color: rgba(214, 168, 79, .78);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: bold;
}
/* ================= CHALLENGE MODE PICKER V1 ================= */

.challenge-mode-panel {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.35);
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), transparent 55%),
    rgba(0,0,0,.35);
}

.challenge-mode-panel label {
  display: block;
  margin-bottom: 8px;
  color: #d6a84f;
  font-weight: bold;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}

.challenge-mode-panel select {
  width: 100%;
  margin-bottom: 10px;
}

/* ================= RAVEN PREFERENCE PANEL V1 ================= */

.raven-preference-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(214,168,79,.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), transparent 58%),
    rgba(0,0,0,.30);
  text-align: center;
}

.raven-preference-title {
  margin-top: 0;
  color: #d6a84f;
  letter-spacing: .08em;
}

.raven-preference-copy,
.raven-preference-description {
  color: #efe8df;
  font-style: italic;
  line-height: 1.45;
}

.raven-preference-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.raven-preference-grid label {
  margin-top: 0;
}

.raven-preference-grid select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid rgba(214,168,79,.32);
  background: #0f0b12;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}

#submitRavenPreferenceBtn {
  margin-top: 8px;
}

#ravenPreferenceStatus {
  color: #d6a84f;
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .raven-preference-grid {
    grid-template-columns: 1fr;
  }
}
/* ================= FINAL CHARACTER / RAVEN / DOCTOR GRAVEN IMAGE INTEGRATION V1 ================= */

/* ---------- Raven UI Images ---------- */

.raven-ui-icon {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin: 0 auto 12px;
  filter:
    drop-shadow(0 0 14px rgba(214, 168, 79, .28))
    drop-shadow(0 0 22px rgba(0, 0, 0, .65));
}

.raven-secret-alert-image {
  display: block;
  width: min(220px, 72vw);
  max-height: 180px;
  object-fit: contain;
  margin: 0 auto 14px;
  border-radius: 16px;
  filter:
    drop-shadow(0 0 16px rgba(214, 168, 79, .25))
    drop-shadow(0 0 26px rgba(0, 0, 0, .72));
}

.secret-message-arrival-card .raven-secret-alert-image {
  margin-top: -4px;
}

.secret-message-read-card .raven-ui-icon,
.host-join-request-alert-card .raven-ui-icon {
  margin-bottom: 10px;
}


/* ---------- Character Intro Montage Images ---------- */

.character-intro-card {
  width: min(94vw, 760px);
}

.character-intro-image {
  display: block;
  width: min(100%, 520px);
  max-height: min(62vh, 680px);
  margin: 0 auto 18px;
  border-radius: 20px;
  border: 1px solid rgba(214, 168, 79, .42);
  object-fit: contain;
  background:
    radial-gradient(circle at center, rgba(214, 168, 79, .12), rgba(0, 0, 0, .72)),
    rgba(0, 0, 0, .62);
  box-shadow:
    0 0 34px rgba(214, 168, 79, .18),
    0 0 62px rgba(157, 23, 35, .18),
    inset 0 0 24px rgba(0, 0, 0, .58);
}

.character-intro-card h2 {
  margin-top: 10px;
}

.character-intro-card p {
  max-width: 640px;
}

.character-intro-kicker {
  margin-top: 12px;
}


/* ---------- Doctor Graven Main Overlay Image ---------- */

.doctor-death-card {
  width: min(760px, 94vw);
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(18, 2, 4, .98), rgba(0, 0, 0, .98));
}

.doctor-death-overlay-image {
  display: block;
  width: 100%;
  max-height: min(58vh, 620px);
  object-fit: cover;
  object-position: center;
  border-bottom: 1px solid rgba(214, 168, 79, .32);
}

.doctor-death-overlay-content {
  padding: 24px 22px 26px;
}

.doctor-death-overlay-content h2 {
  margin-top: 0;
}


/* ---------- Doctor Graven Elimination / Last Words Images ---------- */

.death-image-frame {
  width: 100%;
  min-height: 180px;
  border-radius: 18px;
  border: 1px solid rgba(214, 168, 79, .34);
  background:
    radial-gradient(circle at center, rgba(120, 0, 0, .2), rgba(0, 0, 0, .74)),
    rgba(0, 0, 0, .78);
  box-shadow:
    inset 0 0 38px rgba(0, 0, 0, .68),
    0 0 24px rgba(120, 0, 0, .26);
  overflow: hidden;
}

.death-cinematic-image {
  display: block;
  width: 100%;
  height: clamp(190px, 42vh, 420px);
  object-fit: cover;
  object-position: center;
}

.personal-death-card .death-cinematic-image {
  object-position: center;
}

.living-death-card .death-cinematic-image {
  object-position: center;
}


/* ---------- Mobile Polish ---------- */

@media (max-width: 700px) {
  .raven-ui-icon {
    width: 76px;
    height: 76px;
  }

  .raven-secret-alert-image {
    width: min(190px, 78vw);
    max-height: 150px;
  }

  .character-intro-image {
    width: 100%;
    max-height: 58vh;
    border-radius: 16px;
  }

  .character-intro-card {
    width: 94vw;
    padding: 18px 12px 20px;
  }

  .doctor-death-overlay-image {
    max-height: 48vh;
  }

  .doctor-death-overlay-content {
    padding: 20px 16px 22px;
  }

  .death-cinematic-image {
    height: clamp(170px, 34vh, 320px);
  }
}
/* ================= DOCTOR GRAVEN FULL IMAGE VISIBILITY FIX V1 ================= */

.doctor-death-overlay-image {
  width: 100% !important;
  max-height: min(70vh, 760px) !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #050305 !important;
}

.death-cinematic-image {
  width: 100% !important;
  height: auto !important;
  max-height: min(56vh, 620px) !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #050305 !important;
}

.death-image-frame {
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  min-height: 240px !important;
  background:
    radial-gradient(circle at center, rgba(120, 0, 0, .2), rgba(0, 0, 0, .88)),
    #050305 !important;
}
/* ================= FINAL JUDGMENT RAVEN EMBLEM FIX V1 ================= */

.final-money-celebration-card .final-money-raven {
  display: block !important;
  width: 118px !important;
  height: 118px !important;
  max-width: 118px !important;
  max-height: 118px !important;
  object-fit: contain !important;
  margin: 0 auto 16px !important;
  filter:
    drop-shadow(0 0 16px rgba(214, 168, 79, .32))
    drop-shadow(0 0 26px rgba(0, 0, 0, .72));
}

/* ================= BASIC RULES MODAL / BUTTON V1 ================= */

.see-rules-btn {
  margin: 12px 0 10px;
  background: linear-gradient(180deg, #b7842f, #7a4d12);
  color: #120b05;
  border: 1px solid rgba(255, 226, 150, .55);
  box-shadow:
    0 0 18px rgba(214,168,79,.18),
    inset 0 0 12px rgba(255,255,255,.08);
  font-weight: bold;
  letter-spacing: .08em;
}

.see-rules-btn.rules-throb {
  animation: seeRulesThrob 1.45s ease-in-out infinite;
}

@keyframes seeRulesThrob {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
    box-shadow:
      0 0 18px rgba(214,168,79,.2),
      inset 0 0 12px rgba(255,255,255,.08);
  }

  50% {
    transform: scale(1.045);
    filter: brightness(1.18);
    box-shadow:
      0 0 34px rgba(214,168,79,.48),
      0 0 70px rgba(157,23,35,.18),
      inset 0 0 18px rgba(255,255,255,.12);
  }
}

.basic-rules-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, .82);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px;
  overflow-y: auto;
  box-sizing: border-box;
}

.basic-rules-overlay.hidden {
  display: none !important;
}

.basic-rules-card {
  width: min(760px, 94vw);
  margin: 20px auto 34px;
  padding: 24px;
  border: 1px solid rgba(214,168,79,.42);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(24, 14, 22, .98), rgba(0, 0, 0, .98));
  box-shadow:
    0 0 44px rgba(0,0,0,.8),
    inset 0 0 24px rgba(214,168,79,.08);
  text-align: center;
}

.basic-rules-card h2 {
  color: #d6a84f;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 8px 0 18px;
}

.basic-rules-body {
  max-height: 62vh;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(0,0,0,.34);
  text-align: left;
}

.basic-rules-body h3 {
  color: #d6a84f;
  margin: 18px 0 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.basic-rules-body h3:first-child {
  margin-top: 0;
}

.basic-rules-body p {
  margin: 8px 0;
  line-height: 1.48;
}

/* ================= RAVEN'S QUIZ V1 ================= */

.raven-quiz-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(214, 168, 79, .32);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.11), rgba(0,0,0,.26)),
    rgba(0,0,0,.3);
  text-align: left;
}

.raven-quiz-panel h4 {
  color: #d6a84f;
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.raven-quiz-panel .raven-quiz-subtitle {
  color: #efe8df;
  text-align: center;
  font-style: italic;
  margin: 6px 0 14px;
}

.raven-quiz-question {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.24);
}

.raven-quiz-question-title {
  color: #d6a84f;
  font-weight: bold;
  margin-bottom: 8px;
}

.raven-quiz-choice-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  color: #efe8df;
}

.raven-quiz-choice-row input {
  width: auto;
  margin: 2px 0 0;
}

.raven-quiz-standings {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.raven-quiz-standing-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.26);
}

.raven-quiz-standing-row.raven-quiz-top-row {
  border-color: rgba(214,168,79,.48);
  background: rgba(214,168,79,.08);
}

.raven-quiz-standing-name {
  color: #efe8df;
  font-weight: bold;
}

.raven-quiz-standing-score {
  color: #d6a84f;
  white-space: nowrap;
}

@media (max-width: 650px) {
  .raven-quiz-standing-row {
    display: grid;
    gap: 4px;
  }
}
/* Prevent iPhone double-tap zoom during Raven's Path */
.raven-path-panel,
.raven-path-panel *,
.raven-path-game,
.raven-path-game *,
.raven-path-controls,
.raven-path-controls *,
.raven-path-control-btn,
.raven-path-canvas {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* ================= THE RAVEN'S PLACEMENT V2 ================= */

.raven-placement-active > :not(#ravenJudgmentPanel) {
  display: none !important;
}

.raven-placement-panel,
.ravens-placement-panel {
  width: min(980px, 94vw) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center;
}

.ravens-placement-shell {
  position: relative;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid rgba(214, 168, 79, 0.46);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 168, 79, 0.20), transparent 34%),
    radial-gradient(circle at 15% 18%, rgba(115, 23, 35, 0.20), transparent 35%),
    radial-gradient(circle at 85% 24%, rgba(68, 35, 70, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(24, 12, 19, 0.98), rgba(4, 4, 8, 0.98));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.72),
    inset 0 0 58px rgba(214, 168, 79, 0.07);
  overflow: hidden;
}

.ravens-placement-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(214, 168, 79, 0.08), transparent),
    radial-gradient(circle at 50% 50%, transparent 42%, rgba(0, 0, 0, 0.50));
  opacity: 0.82;
}

.ravens-placement-shell::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(214, 168, 79, 0.16);
  border-radius: 20px;
  pointer-events: none;
}

.ravens-placement-raven-mark {
  position: relative;
  z-index: 1;
  margin: 0 auto 4px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214, 168, 79, 0.35);
  border-radius: 999px;
  color: #d6a84f;
  background: rgba(0, 0, 0, 0.28);
  font-size: 2.1rem;
  line-height: 1;
  box-shadow: 0 0 24px rgba(214, 168, 79, 0.12);
}

.ravens-placement-title {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  color: #d6a84f;
  text-align: center;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 4.4vw, 2.85rem);
  text-shadow: 0 0 22px rgba(214, 168, 79, 0.22);
}

.ravens-placement-kicker {
  position: relative;
  z-index: 1;
  margin: 0 auto 18px;
  max-width: 680px;
  text-align: center;
  color: rgba(239, 232, 223, 0.80);
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  line-height: 1.42;
}

.ravens-placement-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(290px, 1.06fr) minmax(275px, 0.94fr);
  gap: clamp(14px, 3vw, 24px);
  align-items: center;
  padding: clamp(13px, 2.5vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 30%, rgba(214, 168, 79, 0.08), transparent 46%),
    rgba(0, 0, 0, 0.30);
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.28);
}

.ravens-placement-ink-side {
  display: grid;
  place-items: center;
}

.ravens-placement-inkblot-frame {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(238, 226, 207, 0.16), rgba(118, 92, 58, 0.10)),
    rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(214, 168, 79, 0.30);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.58),
    inset 0 0 22px rgba(214, 168, 79, 0.05);
}

.raven-placement-inkblot-svg,
.ravens-placement-inkblot-frame svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 17px;
  filter:
    contrast(1.1)
    saturate(0.92)
    drop-shadow(0 0 16px rgba(214, 168, 79, 0.12));
}

.ravens-placement-response {
  text-align: center;
  padding: clamp(8px, 2vw, 16px);
}

.ravens-placement-look {
  margin: 0 0 8px;
  color: rgba(214, 168, 79, 0.92);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.ravens-placement-prompt {
  display: block;
  color: #efe8df;
  font-weight: 900;
  letter-spacing: 0.06em;
  margin: 0 auto 12px;
  text-align: center;
  text-transform: none;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
}

.ravens-placement-input {
  width: 100%;
  max-width: 430px;
  margin: 0 auto 12px;
  display: block;
  box-sizing: border-box;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(214, 168, 79, 0.42);
  background: rgba(0, 0, 0, 0.60);
  color: #efe8df;
  text-align: center;
  font-size: 1.06rem;
  outline: none;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.46);
}

.ravens-placement-input:focus {
  border-color: rgba(214, 168, 79, 0.82);
  box-shadow:
    0 0 0 3px rgba(214, 168, 79, 0.10),
    inset 0 0 18px rgba(0, 0, 0, 0.46);
}

.ravens-placement-input::placeholder {
  color: rgba(239, 232, 223, 0.52);
}

.ravens-placement-influence {
  max-width: 440px;
  margin: 12px auto 14px;
  color: rgba(239, 232, 223, 0.76);
  font-size: 0.94rem;
  line-height: 1.42;
}

.ravens-placement-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 430px;
  margin: 0 auto;
}

.ravens-placement-actions button {
  margin-top: 0;
}

@media (max-width: 820px) {
  .ravens-placement-card {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .ravens-placement-shell {
    padding: 18px 14px;
    border-radius: 22px;
  }

  .ravens-placement-raven-mark {
    width: 50px;
    height: 50px;
    font-size: 1.75rem;
  }

  .ravens-placement-inkblot-frame {
    max-width: 500px;
    padding: 9px;
  }
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at center, #251019 0%, #09080b 60%, #030204 100%);
  color: #efe8df;
  font-family: Georgia, "Times New Roman", serif;
}

.hidden {
  display: none !important;
}

.landing-page,
#app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.landing-content,
.panel {
  width: min(700px, 94vw);
  text-align: center;
  padding: 28px;
  background: rgba(8, 6, 10, 0.82);
  border: 1px solid rgba(214, 168, 79, 0.28);
  border-radius: 24px;
  box-shadow: 0 0 70px rgba(0,0,0,.65);
}

h1 {
  letter-spacing: .12em;
  font-size: clamp(2.4rem, 7vw, 5rem);
  margin-bottom: 6px;
}

h2,
.tagline,
.prove-it,
strong {
  color: #d6a84f;
}

p {
  line-height: 1.45;
}

label {
  display: block;
  text-align: left;
  margin-top: 14px;
  color: #a99699;
  text-transform: uppercase;
  font-size: .8rem;
}

input {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0f0b12;
  color: white;
  box-sizing: border-box;
}

button {
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: #9d1723;
  color: white;
  cursor: pointer;
  letter-spacing: .08em;
}

button.secondary {
  background: #342332;
}

#connectionStatus,
#roomResult {
  color: #d6a84f;
}
.lobby-panel {
  margin-top: 20px;
}

.lobby-label {
  margin: 0;
  color: #a99699;
  font-size: .8rem;
  letter-spacing: .12em;
}

.room-code-display {
  margin: 8px auto 12px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.45);
  border-radius: 16px;
  background: rgba(0,0,0,.35);
  color: #d6a84f;
  font-size: 2rem;
  letter-spacing: .16em;
}

.player-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.player-row {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.25);
}

.late-join-waiting-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.28);
  border-radius: 16px;
  background: rgba(0,0,0,.32);
  text-align: center;
}

.late-join-waiting-panel h3 {
  margin-top: 0;
  color: #d6a84f;
}

.late-join-waiting-panel p {
  line-height: 1.45;
}

.pending-join-panel {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.pending-join-panel h3 {
  margin-top: 0;
  color: #d6a84f;
}

.pending-join-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.pending-join-row {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.25);
}

.pending-join-name {
  color: #efe8df;
  font-weight: bold;
  margin-bottom: 8px;
}

.pending-join-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pending-join-actions button {
  margin-top: 0;
  padding: 10px;
  font-size: .75rem;
}

#startGameBtn {
  margin-top: 18px;
  background: #9d1723;
}
.game-room-panel {
  margin-top: 22px;
}

.game-status-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.game-status-row > div {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.25);
}

.small-label {
  display: block;
  color: #a99699;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.room-table {
  position: relative;
  min-height: 280px;
  margin-top: 18px;
  border-radius: 50%;
  border: 2px solid rgba(214,168,79,.3);
  background: radial-gradient(circle, #3b1c20 0%, #160b0f 62%, transparent 63%);
  box-shadow: inset 0 0 50px rgba(0,0,0,.7);
}

.table-center-text {
  position: absolute;
  inset: 42% 0 auto;
  text-align: center;
  color: #d6a84f;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.room-player-list {
  position: absolute;
  inset: 0;
}

.room-player-seat {
  position: absolute;
  width: 100px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.55);
  text-align: center;
  transform: translate(-50%, -50%);
  font-size: .85rem;
}

.raven-box {
  margin-top: 18px;
  padding: 14px;
  border-left: 4px solid #9d1723;
  background: rgba(0,0,0,.3);
}
.role-text {
  font-size: .9rem;
  font-weight: normal;
  letter-spacing: .02em;
  color: #efe8df;
  margin-top: 8px;
  line-height: 1.4;
}

.role-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(214,168,79,.2);
  border-radius: 10px;
  background: rgba(0,0,0,.2);
}
.role-instruction-box {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
  text-align: left;
  font-size: .95rem;
  line-height: 1.45;
}

.role-instruction-box p {
  margin-bottom: 10px;
}
#phaseTimerDisplay {
  color: #d6a84f;
  font-size: 1.2rem;
}

.table-of-deception-panel,
.secret-messages-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 16px;
  background: rgba(0,0,0,.28);
  text-align: left;
}

.table-of-deception-panel h3,
.secret-messages-panel h3,
.raven-box h4 {
  margin-top: 0;
  color: #d6a84f;
  text-align: center;
}

.table-of-deception-messages {
  height: 180px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(0,0,0,.32);
}

.table-of-deception-message {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.table-of-deception-name {
  color: #d6a84f;
  font-weight: bold;
}

.table-of-deception-text {
  margin-top: 3px;
  color: #efe8df;
  word-wrap: break-word;
}

.table-of-deception-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.table-of-deception-input-row input {
  margin: 0;
}

.table-of-deception-input-row button {
  width: auto;
  margin: 0;
  padding: 0 18px;
}

.raven-feed-list {
  margin-top: 12px;
  max-height: 180px;
  overflow-y: auto;
  text-align: left;
  font-size: .85rem;
}

.raven-feed-item {
  padding: 8px;
  margin-bottom: 6px;
  border-left: 3px solid rgba(214,168,79,.55);
  background: rgba(0,0,0,.24);
  color: #d7cfc8;
}

@media (max-width: 650px) {
  .game-status-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-of-deception-input-row {
    grid-template-columns: 1fr;
  }

  .table-of-deception-input-row button {
    width: 100%;
    padding: 13px;
  }
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.raven-side-panel {
  position: sticky;
  top: 14px;
}

.raven-box {
  margin-top: 0;
}

.raven-box h4 {
  color: #d6a84f;
  margin-bottom: 8px;
  text-align: center;
}

.table-side-panel {
  min-width: 0;
}

.raven-feed-list {
  max-height: 330px;
}

@media (max-width: 800px) {
  .game-layout {
    grid-template-columns: 1fr;
  }

  .raven-side-panel {
    position: static;
    order: -1;
  }

  .raven-feed-list {
    max-height: 180px;
  }
}
.secret-messages-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.secret-unread-count {
  min-width: 24px;
  height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #9d1723;
  color: #fff;
  font-size: .8rem;
  font-weight: bold;
  display: inline-grid;
  place-items: center;
}

.raven-role-reminder-btn {
  margin: 12px 0 14px;
  background: linear-gradient(180deg, #b7842f, #7a4d12);
  color: #120b05;
  border: 1px solid rgba(255, 226, 150, .55);
  box-shadow:
    0 0 18px rgba(214,168,79,.18),
    inset 0 0 12px rgba(255,255,255,.08);
  font-weight: bold;
  letter-spacing: .08em;
}

.raven-role-reminder-btn:hover {
  filter: brightness(1.08);
}

.secret-message-notice {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgba(214,168,79,.35);
  border-radius: 12px;
  background: rgba(157,23,35,.18);
  color: #d6a84f;
  text-align: center;
  font-style: italic;
}

.secret-message-form {
  margin-top: 12px;
}

.secret-message-form select,
.secret-message-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0f0b12;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}

.secret-message-form select {
  padding: 12px;
}

.secret-message-form textarea {
  min-height: 90px;
  padding: 12px;
  resize: vertical;
}

.secret-message-divider {
  height: 1px;
  margin: 16px 0;
  background: rgba(255,255,255,.12);
}

.secret-inbox-title {
  color: #d6a84f;
  text-align: center;
  margin: 8px 0 10px;
}

.secret-messages-inbox {
  display: grid;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
}

.secret-message-card {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.26);
}

.secret-message-card.sealed {
  cursor: pointer;
  text-align: center;
}

.secret-message-sealed-title {
  color: #d6a84f;
  font-weight: bold;
  margin-bottom: 6px;
}

.secret-message-sealed-meta {
  color: #a99699;
  font-size: .8rem;
}

.secret-message-card.unread {
  border-color: rgba(214,168,79,.45);
  background: rgba(214,168,79,.08);
}

.secret-message-from {
  color: #d6a84f;
  font-weight: bold;
  margin-bottom: 5px;
}

.secret-message-text {
  color: #efe8df;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.secret-message-meta {
  margin-top: 8px;
  color: #a99699;
  font-size: .75rem;
}

.secret-message-card button {
  margin-top: 8px;
  padding: 9px;
  font-size: .75rem;
  background: #342332;
}

@media (max-width: 650px) {
  .secret-messages-inbox {
    max-height: 180px;
  }
}
.phase-control-panel,
.challenge-placeholder-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 16px;
  background: rgba(0,0,0,.28);
  text-align: center;
}

.phase-control-panel h3,
.challenge-placeholder-panel h3 {
  margin-top: 0;
  color: #d6a84f;
}

.challenge-placeholder-panel {
  border-left: 4px solid #9d1723;
}
.challenge-waiting-box,
.active-challenge-box,
.challenge-result-box,
.challenge-host-controls {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.active-challenge-box h3,
.active-challenge-box h4,
.challenge-result-box h4 {
  color: #d6a84f;
  text-align: center;
}

.challenge-instructions,
.challenge-tiebreaker {
  text-align: left;
  line-height: 1.45;
}

.challenge-host-controls label {
  margin-top: 14px;
}

.challenge-host-controls select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0f0b12;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}
.voting-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 16px;
  background: rgba(0,0,0,.28);
  text-align: center;
}

.voting-panel h3,
.vote-status-box h4,
.voting-result-box h4 {
  color: #d6a84f;
  margin-top: 0;
}

.voting-instruction-box,
.vote-form-box,
.vote-status-box,
.voting-result-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.vote-form-box select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0f0b12;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}

.vote-status-list {
  display: grid;
  gap: 8px;
  text-align: left;
}

.vote-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.08);
}

.vote-status-row.voted {
  border-color: rgba(214,168,79,.35);
}

.vote-status-name {
  color: #efe8df;
}

.vote-status-state {
  color: #d6a84f;
  font-size: .85rem;
}
.final-reveal-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(214,168,79,.28);
  border-radius: 16px;
  background: rgba(0,0,0,.34);
  text-align: center;
}

.final-reveal-panel h3,
.final-winner-box h4,
.final-role-list-box h4 {
  color: #d6a84f;
  margin-top: 0;
}

.final-winner-box,
.final-role-list-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.final-role-list {
  display: grid;
  gap: 8px;
  text-align: left;
}

.final-role-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px;
  border-radius: 10px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.08);
}

.final-role-row.soul {
  opacity: .65;
}

.final-role-name {
  color: #efe8df;
}

.final-role-value {
  color: #d6a84f;
  font-weight: bold;
}
.soul-collection-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(190, 38, 38, .4);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(120, 15, 15, .24), rgba(0,0,0,.38)),
    rgba(0,0,0,.34);
  text-align: center;
  box-shadow: 0 0 18px rgba(120, 15, 15, .18);
}

.soul-collection-panel h3 {
  color: #d6a84f;
  margin-top: 0;
  letter-spacing: .04em;
}

.soul-collection-panel p {
  line-height: 1.45;
}

#soulCollectionText {
  color: #efe8df;
  font-size: 1.02rem;
}

/* ================= HOST JOIN REQUEST ALERT V1 ================= */

.host-join-request-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(0, 0, 0, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.host-join-request-alert-overlay.hidden {
  display: none;
}

.host-join-request-alert-card {
  width: min(540px, 92vw);
  padding: 24px;
  border: 1px solid rgba(214,168,79,.42);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(24, 14, 22, .97), rgba(0, 0, 0, .97));
  box-shadow:
    0 0 44px rgba(0,0,0,.8),
    inset 0 0 24px rgba(214,168,79,.08);
  text-align: center;
}

.host-join-request-alert-card h2 {
  color: #d6a84f;
  margin: 8px 0 12px;
  letter-spacing: .06em;
}

.host-join-request-alert-card p {
  line-height: 1.45;
}

.host-join-request-alert-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ================= SECRET MESSAGE ARRIVAL POPUP V1 ================= */

.secret-message-arrival-overlay {
  position: fixed;
  inset: 0;
  z-index: 99997;
  background: rgba(0, 0, 0, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.secret-message-arrival-overlay.hidden {
  display: none;
}

.secret-message-arrival-card {
  width: min(520px, 92vw);
  padding: 24px;
  border: 1px solid rgba(214,168,79,.38);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(24, 14, 22, .96), rgba(0, 0, 0, .96));
  box-shadow:
    0 0 38px rgba(0,0,0,.75),
    inset 0 0 24px rgba(214,168,79,.08);
  text-align: center;
}

.secret-raven-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.secret-message-arrival-card h2 {
  color: #d6a84f;
  margin: 8px 0 12px;
  letter-spacing: .06em;
}

.secret-message-arrival-card p {
  line-height: 1.45;
}

.secret-message-read-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.secret-message-read-overlay.hidden {
  display: none;
}

.secret-message-read-card {
  width: min(560px, 92vw);
  padding: 24px;
  border: 1px solid rgba(214,168,79,.42);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(24, 14, 22, .97), rgba(0, 0, 0, .97));
  box-shadow:
    0 0 44px rgba(0,0,0,.8),
    inset 0 0 24px rgba(214,168,79,.08);
  text-align: center;
}

.secret-message-read-card h3 {
  color: #d6a84f;
  margin: 8px 0 12px;
}

.secret-message-read-text {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.35);
  color: #efe8df;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ================= ROLE REVEAL FULL SCREEN OVERLAY ================= */

.role-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background:
    radial-gradient(circle at center, rgba(214, 168, 79, .18), rgba(0, 0, 0, .94)),
    rgba(0, 0, 0, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.role-reveal-overlay.hidden {
  display: none;
}

.role-reveal-card {
  width: min(720px, 92vw);
  padding: 32px 24px;
  border: 1px solid rgba(214, 168, 79, .45);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(35, 18, 22, .94), rgba(0, 0, 0, .96));
  box-shadow:
    0 0 50px rgba(214, 168, 79, .18),
    inset 0 0 30px rgba(214, 168, 79, .08);
  text-align: center;
}

.role-reveal-card h2 {
  color: #d6a84f;
  font-size: clamp(2.6rem, 11vw, 5.6rem);
  letter-spacing: .1em;
  margin: 18px 0;
  text-transform: uppercase;
  white-space: pre-line;
}

.role-reveal-card h2.role-reveal-warning-title {
  color: #efe8df;
  font-size: clamp(2rem, 9vw, 4.4rem);
  letter-spacing: .08em;
}

.role-reveal-warning {
  color: #efe8df;
  font-style: italic;
  line-height: 1.45;
}

/* ================= DOCTOR GRAVEN FULL SCREEN OVERLAY ================= */

.doctor-death-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background:
    radial-gradient(circle at center, rgba(130, 0, 0, .34), rgba(0, 0, 0, .95)),
    rgba(0, 0, 0, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.doctor-death-overlay.hidden {
  display: none;
}

.doctor-death-card {
  width: min(720px, 92vw);
  padding: 28px;
  border: 1px solid rgba(214, 168, 79, .35);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(35, 0, 0, .9), rgba(0, 0, 0, .96));
  box-shadow:
    0 0 40px rgba(120, 0, 0, .45),
    inset 0 0 30px rgba(214, 168, 79, .08);
  text-align: center;
}

.doctor-death-card h2 {
  color: #d6a84f;
  letter-spacing: .08em;
  margin-top: 0;
}

#doctorDeathText {
  color: #efe8df;
  font-size: 1.2rem;
  line-height: 1.5;
}

.doctor-death-raven-line {
  color: #aaa;
  font-style: italic;
  margin-top: 18px;
}

#closeDoctorDeathOverlayBtn {
  margin-top: 18px;
}

/* ================= END GAME DECISION PLACEHOLDER ================= */

.end-game-decision-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(214,168,79,.28);
  border-radius: 16px;
  background: rgba(0,0,0,.34);
  text-align: center;
}

.end-game-decision-panel h3,
.end-game-decision-box h4 {
  color: #d6a84f;
  margin-top: 0;
}

.end-game-decision-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.end-game-decision-box p {
  line-height: 1.45;
}

/* ================= END GAME DECISION VOTING V1 ================= */

.end-game-vote-box,
.end-game-status-box,
.end-game-decision-result-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}

.end-game-vote-box h4,
.end-game-status-box h4,
.end-game-decision-result-box h4 {
  color: #d6a84f;
  margin-top: 0;
}

.end-game-vote-box button {
  margin: 6px;
}

.end-game-vote-status-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.end-game-vote-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px;
  border-radius: 10px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.08);
}

.end-game-vote-status-row.voted {
  border-color: rgba(214,168,79,.35);
}

.end-game-vote-name {
  color: #efe8df;
}

.end-game-vote-state {
  color: #d6a84f;
  font-weight: bold;
}
/* ================= FINAL REVEAL POLISH V1 ================= */

.final-role-reveal-row {
  transition:
    opacity 0.75s ease,
    transform 0.75s ease,
    border-color 0.75s ease,
    background 0.75s ease;
}

.final-role-pending {
  opacity: 0;
  transform: translateY(10px);
}

.final-role-visible {
  opacity: 1;
  transform: translateY(0);
}

.final-role-deceiver {
  color: #ff5c5c;
  text-shadow: 0 0 10px rgba(157, 23, 35, .45);
}

.final-role-innocent {
  color: #d6a84f;
}

.final-role-row:has(.final-role-deceiver) {
  border-color: rgba(157, 23, 35, .42);
  background:
    linear-gradient(90deg, rgba(157, 23, 35, .18), rgba(0,0,0,.28));
}
/* ================= FINAL JUDGMENT OVERLAY V1 ================= */

.final-judgment-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background:
    radial-gradient(circle at center, rgba(214, 168, 79, .18), rgba(0, 0, 0, .94)),
    rgba(0, 0, 0, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.final-judgment-overlay.hidden {
  display: none !important;
}

.final-judgment-card {
  width: min(720px, 92vw);
  padding: 30px 24px;
  border: 1px solid rgba(214, 168, 79, .45);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(35, 18, 22, .96), rgba(0, 0, 0, .98));
  box-shadow:
    0 0 52px rgba(214, 168, 79, .18),
    inset 0 0 30px rgba(214, 168, 79, .08);
  text-align: center;
}

.final-judgment-card h2 {
  color: #d6a84f;
  font-size: clamp(2.1rem, 8vw, 4.8rem);
  letter-spacing: .1em;
  margin: 14px 0 8px;
  text-transform: uppercase;
}

.final-judgment-card h3 {
  color: #efe8df;
  font-size: clamp(1.15rem, 4vw, 2rem);
  letter-spacing: .08em;
  margin: 8px 0 18px;
  text-transform: uppercase;
}

.final-judgment-body {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.35);
  color: #efe8df;
  font-size: 1.1rem;
  line-height: 1.5;
}

.final-judgment-raven-line {
  color: #d6a84f;
  font-style: italic;
  line-height: 1.5;
  margin-top: 16px;
}
/* ================= FINAL REVEAL CINEMATIC OVERLAY V1 ================= */

.final-reveal-cinematic-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background:
    radial-gradient(circle at center, rgba(214, 168, 79, .18), rgba(0, 0, 0, .95)),
    rgba(0, 0, 0, .97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.final-reveal-cinematic-overlay.hidden {
  display: none !important;
}

.final-reveal-cinematic-card {
  width: min(760px, 92vw);
  min-height: 420px;
  padding: 34px 24px;
  border: 1px solid rgba(214, 168, 79, .46);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(35, 18, 22, .97), rgba(0, 0, 0, .98));
  box-shadow:
    0 0 58px rgba(214, 168, 79, .18),
    inset 0 0 34px rgba(214, 168, 79, .08);
  text-align: center;
  display: grid;
  align-content: center;
}

.final-reveal-cinematic-card h2 {
  color: #d6a84f;
  font-size: clamp(2rem, 8vw, 4.6rem);
  letter-spacing: .1em;
  margin: 12px 0;
  text-transform: uppercase;
}

.final-reveal-cinematic-card h3 {
  color: #efe8df;
  font-size: clamp(1.7rem, 7vw, 4.2rem);
  letter-spacing: .08em;
  margin: 12px 0;
  text-transform: uppercase;
}

.final-reveal-cinematic-role {
  color: #d6a84f;
  font-size: clamp(2.2rem, 10vw, 5.4rem);
  font-weight: bold;
  letter-spacing: .12em;
  margin: 12px 0;
  text-transform: uppercase;
}

.final-reveal-cinematic-subtext {
  color: #a99699;
  font-style: italic;
  line-height: 1.5;
  min-height: 44px;
}

.cinematic-role-deceiver {
  color: #ff5c5c;
  text-shadow: 0 0 18px rgba(157, 23, 35, .7);
}

.cinematic-role-innocent {
  color: #d6a84f;
  text-shadow: 0 0 14px rgba(214, 168, 79, .35);
}

.final-reveal-cinematic-card.cinematic-deceiver-card {
  border-color: rgba(157, 23, 35, .62);
  background:
    radial-gradient(circle at center, rgba(157, 23, 35, .25), rgba(0,0,0,.98)),
    linear-gradient(180deg, rgba(35, 18, 22, .97), rgba(0, 0, 0, .98));
  box-shadow:
    0 0 70px rgba(157, 23, 35, .32),
    inset 0 0 38px rgba(157, 23, 35, .12);
}

.final-reveal-cinematic-card.cinematic-innocent-card {
  border-color: rgba(214, 168, 79, .52);
}
/* ================= FINAL MONEY CELEBRATION OVERLAY V1 ================= */

.final-money-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background:
    radial-gradient(circle at center, rgba(214, 168, 79, .24), rgba(0, 0, 0, .96)),
    rgba(0, 0, 0, .97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.final-money-celebration-overlay.hidden {
  display: none !important;
}

.final-money-celebration-card {
  width: min(780px, 92vw);
  padding: 34px 24px;
  border: 1px solid rgba(214, 168, 79, .54);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(35, 18, 22, .97), rgba(0, 0, 0, .98));
  box-shadow:
    0 0 68px rgba(214, 168, 79, .22),
    inset 0 0 36px rgba(214, 168, 79, .08);
  text-align: center;
}

.final-money-celebration-card h2 {
  color: #d6a84f;
  font-size: clamp(1.8rem, 7vw, 4.2rem);
  letter-spacing: .08em;
  margin: 12px 0;
  text-transform: uppercase;
}

.final-money-subtitle {
  color: #efe8df;
  font-size: 1.1rem;
  line-height: 1.45;
  margin: 10px auto 18px;
  max-width: 620px;
}

.final-money-pot-box {
  margin: 22px auto;
  padding: 20px 14px;
  border: 1px solid rgba(214, 168, 79, .45);
  border-radius: 18px;
  background:
    radial-gradient(circle at center, rgba(214,168,79,.18), rgba(0,0,0,.45));
  box-shadow:
    0 0 34px rgba(214, 168, 79, .16),
    inset 0 0 24px rgba(214, 168, 79, .08);
}

.final-money-pot-label {
  color: #a99699;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.final-money-pot-amount {
  color: #d6a84f;
  font-size: clamp(2.8rem, 12vw, 6.4rem);
  font-weight: bold;
  letter-spacing: .04em;
  text-shadow:
    0 0 14px rgba(214,168,79,.42),
    0 0 32px rgba(214,168,79,.22);
}

.final-money-split-line {
  color: #efe8df;
  font-size: clamp(1.25rem, 4vw, 2.15rem);
  font-weight: bold;
  margin: 16px 0 8px;
}

.final-money-raven-line {
  color: #d6a84f;
  font-style: italic;
  line-height: 1.5;
  margin: 16px auto 22px;
  max-width: 620px;
}

/* ================= HIDE FINAL TABLE UNTIL CINEMATIC COMPLETE ================= */

.final-table-hidden-until-complete {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#finalRevealPanel.final-table-hidden-until-complete {
  display: none !important;
}

/* ================= PERMANENT RAVEN CLOCK PANEL - STRONG VERSION ================= */

.legacy-phase-timer-box {
  display: none !important;
}

.phase-timer-hidden-during-voting {
  display: none !important;
}

#ravenClockPanel,
.raven-clock-panel {
  position: relative !important;
  z-index: 50 !important;
  width: min(520px, 94vw);
  margin: 18px auto 46px !important;
  padding: 22px 16px 20px;
  border: 2px solid rgba(214, 168, 79, .72);
  border-radius: 22px;
  background:
    radial-gradient(circle at center, rgba(214,168,79,.24), rgba(0,0,0,.74)),
    linear-gradient(180deg, rgba(40,20,12,.92), rgba(0,0,0,.9));
  box-shadow:
    0 0 44px rgba(214,168,79,.32),
    0 0 90px rgba(120,35,20,.22),
    inset 0 0 28px rgba(214,168,79,.12);
  text-align: center;
  pointer-events: none;
}

.raven-clock-label {
  color: #d6a84f;
  font-size: .82rem;
  font-weight: bold;
  letter-spacing: .24em;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(214,168,79,.35);
}

.raven-clock-value {
  color: #f0c15c;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: .95;
  text-shadow:
    0 0 14px rgba(214,168,79,.6),
    0 0 34px rgba(214,168,79,.34),
    0 0 70px rgba(120,35,20,.28);
}

.raven-clock-countdown-mode .raven-clock-value {
  font-size: clamp(3.25rem, 11vw, 6.4rem);
}

.raven-clock-status-mode .raven-clock-value {
  font-size: clamp(1.65rem, 6vw, 3.1rem);
  letter-spacing: .14em;
  opacity: .82;
}
.raven-clock-subtext {
  margin-top: 12px;
  color: #efe8df;
  font-size: .92rem;
  font-style: italic;
  opacity: .9;
}

/* Adds breathing room so the table/player names cannot cover the clock */
.game-layout {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.room-table {
  position: relative;
  z-index: 1;
}
/* ================= ROLE REVEAL HEARTBEAT BUTTON V1 ================= */

#revealRoleBtn {
  position: relative;
  overflow: hidden;
}

#revealRoleBtn:not(.hidden) {
  animation: roleRevealHeartbeat 2.15s ease-in-out infinite;
  box-shadow:
    0 0 18px rgba(157, 23, 35, .38),
    0 0 38px rgba(214, 168, 79, .12);
}

#revealRoleBtn:not(.hidden)::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background:
    radial-gradient(circle at center, rgba(214,168,79,.28), transparent 62%);
  opacity: 0;
  pointer-events: none;
  animation: roleRevealGlowBreath 2.15s ease-in-out infinite;
}

#revealRoleBtn:not(.hidden)::after {
  content: "THE RAVEN WAITS";
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.62);
  font-size: .58rem;
  letter-spacing: .16em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  animation: roleRevealWhisper 4.3s ease-in-out infinite;
}

@keyframes roleRevealHeartbeat {
  0% {
    transform: scale(1);
    background: #9d1723;
  }

  10% {
    transform: scale(1.035);
    background: #b51b29;
  }

  18% {
    transform: scale(1);
  }

  28% {
    transform: scale(1.055);
    background: #c21f2e;
  }

  40% {
    transform: scale(1);
    background: #9d1723;
  }

  100% {
    transform: scale(1);
    background: #9d1723;
  }
}

@keyframes roleRevealGlowBreath {
  0%, 42%, 100% {
    opacity: 0;
  }

  12% {
    opacity: .45;
  }

  28% {
    opacity: .7;
  }
}

@keyframes roleRevealWhisper {
  0%, 45%, 100% {
    opacity: 0;
  }

  58%, 78% {
    opacity: .72;
  }
}
/* ================= HOST COMMAND CONTROLS V1 ================= */

.phase-control-panel,
.challenge-host-controls {
  position: relative;
  border: 2px solid rgba(214, 168, 79, .72) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), rgba(0,0,0,.42)),
    linear-gradient(180deg, rgba(47, 20, 10, .92), rgba(0, 0, 0, .88)) !important;
  box-shadow:
    0 0 34px rgba(214,168,79,.22),
    0 0 70px rgba(157,23,35,.14),
    inset 0 0 24px rgba(214,168,79,.08);
  animation: hostCommandGlow 3.4s ease-in-out infinite;
}

.phase-control-panel::before,
.challenge-host-controls::before {
  content: "HOST COMMAND";
  display: inline-block;
  margin: -4px auto 10px;
  padding: 6px 12px;
  border: 1px solid rgba(214,168,79,.6);
  border-radius: 999px;
  background: rgba(0,0,0,.56);
  color: #d6a84f;
  font-size: .72rem;
  font-weight: bold;
  letter-spacing: .18em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(214,168,79,.18);
}

.phase-control-panel h3,
.challenge-host-controls h3,
.challenge-host-controls label {
  color: #d6a84f !important;
}

.phase-control-panel .hint,
.challenge-host-controls .hint {
  color: #efe8df;
}

.phase-control-panel button,
.challenge-host-controls button,
#finalizeVotingBtn:not(.hidden),
#continueNextRoundBtn:not(.hidden),
#proceedEndGameDecisionBtn:not(.hidden),
#proceedFinalRevealBtn:not(.hidden),
#finalizeEndGameDecisionBtn:not(.hidden) {
  border: 1px solid rgba(255, 226, 150, .55);
  background:
    linear-gradient(180deg, #c82636, #7d111c) !important;
  color: #fff;
  font-weight: bold;
  letter-spacing: .11em;
  box-shadow:
    0 0 22px rgba(157,23,35,.42),
    0 0 34px rgba(214,168,79,.12);
  animation: hostButtonPulse 2.4s ease-in-out infinite;
}

.phase-control-panel button::before,
.challenge-host-controls button::before,
#finalizeVotingBtn:not(.hidden)::before,
#continueNextRoundBtn:not(.hidden)::before,
#proceedEndGameDecisionBtn:not(.hidden)::before,
#proceedFinalRevealBtn:not(.hidden)::before,
#finalizeEndGameDecisionBtn:not(.hidden)::before {
  content: "👑 ";
}

.challenge-host-controls select {
  border: 1px solid rgba(214,168,79,.42) !important;
  background: #120b0d !important;
  box-shadow: inset 0 0 14px rgba(214,168,79,.08);
}

@keyframes hostCommandGlow {
  0%, 100% {
    box-shadow:
      0 0 24px rgba(214,168,79,.14),
      0 0 60px rgba(157,23,35,.1),
      inset 0 0 20px rgba(214,168,79,.06);
  }

  50% {
    box-shadow:
      0 0 42px rgba(214,168,79,.3),
      0 0 90px rgba(157,23,35,.2),
      inset 0 0 28px rgba(214,168,79,.1);
  }
}

@keyframes hostButtonPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.025);
    filter: brightness(1.15);
  }
}
/* ================= HOST COMMAND TOP BANNER V1 ================= */

.host-command-banner {
  position: sticky;
  top: 10px;
  z-index: 200;
  width: min(620px, 94vw);
  margin: 14px auto 18px;
  padding: 16px 14px;
  border: 2px solid rgba(214, 168, 79, .78);
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.22), rgba(0,0,0,.78)),
    linear-gradient(180deg, rgba(55, 20, 12, .96), rgba(0, 0, 0, .94));
  box-shadow:
    0 0 38px rgba(214,168,79,.28),
    0 0 80px rgba(157,23,35,.18),
    inset 0 0 24px rgba(214,168,79,.1);
  text-align: center;
  animation: hostCommandBannerGlow 3.2s ease-in-out infinite;
}

.host-command-banner-label {
  color: #d6a84f;
  font-size: .78rem;
  font-weight: bold;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(214,168,79,.38);
}

.host-command-banner-text {
  color: #efe8df;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 10px;
}

.host-command-jump-btn {
  width: auto;
  min-width: 220px;
  margin: 4px auto 0;
  padding: 11px 18px;
  border: 1px solid rgba(255, 226, 150, .58);
  background:
    linear-gradient(180deg, #c82636, #7d111c) !important;
  color: #fff;
  font-weight: bold;
  letter-spacing: .12em;
  box-shadow:
    0 0 24px rgba(157,23,35,.42),
    0 0 38px rgba(214,168,79,.12);
  animation: hostCommandJumpPulse 2.1s ease-in-out infinite;
}

.host-command-jump-btn::before {
  content: "👑 ";
}

.host-command-attention {
  animation: hostCommandAttentionFlash 1.8s ease-in-out;
}

@keyframes hostCommandBannerGlow {
  0%, 100% {
    box-shadow:
      0 0 26px rgba(214,168,79,.18),
      0 0 60px rgba(157,23,35,.1),
      inset 0 0 20px rgba(214,168,79,.08);
  }

  50% {
    box-shadow:
      0 0 44px rgba(214,168,79,.34),
      0 0 90px rgba(157,23,35,.2),
      inset 0 0 30px rgba(214,168,79,.12);
  }
}

@keyframes hostCommandJumpPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.035);
    filter: brightness(1.18);
  }
}

@keyframes hostCommandAttentionFlash {
  0%, 100% {
    box-shadow:
      0 0 34px rgba(214,168,79,.22),
      0 0 70px rgba(157,23,35,.14),
      inset 0 0 24px rgba(214,168,79,.08);
  }

  35%, 70% {
    box-shadow:
      0 0 70px rgba(214,168,79,.55),
      0 0 120px rgba(157,23,35,.32),
      inset 0 0 38px rgba(214,168,79,.18);
    transform: scale(1.015);
  }
}
/* ================= CLEAN STATUS ROW AFTER RAVEN CLOCK ================= */

.game-status-row {
  grid-template-columns: repeat(3, 1fr) !important;
}

.legacy-phase-timer-box {
  display: none !important;
}
/* ================= SHIELD CHOICE / RAVEN DAGGER V1 ================= */

.shield-choice-panel {
  margin-top: 18px;
  padding: 18px;
  border: 2px solid rgba(214, 168, 79, .72);
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.2), rgba(0,0,0,.52)),
    linear-gradient(180deg, rgba(45, 20, 11, .94), rgba(0,0,0,.9));
  box-shadow:
    0 0 42px rgba(214,168,79,.22),
    0 0 80px rgba(157,23,35,.16),
    inset 0 0 24px rgba(214,168,79,.09);
  text-align: center;
  animation: shieldChoiceGlow 3.2s ease-in-out infinite;
}

.shield-choice-panel h3 {
  color: #d6a84f;
  margin-top: 0;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.shield-choice-warning {
  color: #efe8df;
  font-size: 1.05rem;
  font-weight: bold;
}

.shield-choice-box {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(0,0,0,.28);
  text-align: left;
}

.shield-choice-box p {
  margin: 8px 0;
  line-height: 1.45;
}

.shield-choice-panel select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(214,168,79,.42);
  background: #0f0b12;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}

#keepShieldChoiceBtn {
  background:
    linear-gradient(180deg, #b7842f, #7a4d12) !important;
  color: #120b05;
  font-weight: bold;
}

#transferShieldChoiceBtn {
  background:
    linear-gradient(180deg, #5e3c70, #2c1938) !important;
}

#convertShieldToDaggerBtn {
  background:
    linear-gradient(180deg, #c82636, #7d111c) !important;
  border: 1px solid rgba(255, 226, 150, .44);
  box-shadow:
    0 0 22px rgba(157,23,35,.35),
    0 0 34px rgba(214,168,79,.1);
}

@keyframes shieldChoiceGlow {
  0%, 100% {
    box-shadow:
      0 0 28px rgba(214,168,79,.14),
      0 0 60px rgba(157,23,35,.1),
      inset 0 0 20px rgba(214,168,79,.07);
  }

  50% {
    box-shadow:
      0 0 46px rgba(214,168,79,.3),
      0 0 90px rgba(157,23,35,.2),
      inset 0 0 30px rgba(214,168,79,.12);
  }
}
/* ================= SHIELD / DAGGER VOTING NOTICES V1 ================= */

.dagger-vote-notice,
.shield-vote-notice {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  animation: tablePowerNoticeGlow 3s ease-in-out infinite;
}

.dagger-vote-notice {
  border: 2px solid rgba(157, 23, 35, .72);
  background:
    radial-gradient(circle at top, rgba(157,23,35,.28), rgba(0,0,0,.48)),
    linear-gradient(180deg, rgba(40, 5, 8, .96), rgba(0,0,0,.9));
  box-shadow:
    0 0 36px rgba(157,23,35,.34),
    inset 0 0 22px rgba(214,168,79,.08);
}

.shield-vote-notice {
  border: 2px solid rgba(214, 168, 79, .72);
  background:
    radial-gradient(circle at top, rgba(214,168,79,.24), rgba(0,0,0,.48)),
    linear-gradient(180deg, rgba(46, 27, 9, .96), rgba(0,0,0,.9));
  box-shadow:
    0 0 36px rgba(214,168,79,.28),
    inset 0 0 22px rgba(214,168,79,.08);
}

.dagger-vote-notice h4,
.shield-vote-notice h4 {
  color: #d6a84f;
  margin: 0 0 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dagger-vote-notice p,
.shield-vote-notice p {
  margin: 6px 0;
}

@keyframes tablePowerNoticeGlow {
  0%, 100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.12);
  }
}
/* ================= RAVEN CLOCK DANGER MODE ================= */

.raven-clock-danger-mode {
  border-color: rgba(255, 78, 78, .82) !important;
  box-shadow:
    0 0 54px rgba(255, 78, 78, .42),
    0 0 92px rgba(214,168,79,.22),
    inset 0 0 30px rgba(255, 78, 78, .13) !important;
  animation: ravenClockDangerPulse 1.1s ease-in-out infinite;
}

.raven-clock-danger-mode .raven-clock-value {
  color: #ff6b6b;
  text-shadow:
    0 0 16px rgba(255, 78, 78, .74),
    0 0 38px rgba(255, 78, 78, .42),
    0 0 74px rgba(214,168,79,.22);
}

@keyframes ravenClockDangerPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.035);
    filter: brightness(1.2);
  }
}
/* ================= MOBILE / SCREEN CENTERING FIX V1 ================= */

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-shell,
main,
.panel,
.game-room-panel {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.panel,
.game-room-panel {
  box-sizing: border-box;
}

@media (max-width: 700px) {
  body {
    padding-left: 10px;
    padding-right: 10px;
  }

  .app-shell,
  main,
  .panel,
  .game-room-panel {
    width: 100%;
    max-width: 100%;
  }

  .game-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .table-panel,
  .raven-side-panel,
  .players-panel,
  .challenge-panel,
  .voting-panel,
  .phase-control-panel,
  .host-command-banner,
  .raven-clock-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .game-status-row {
    width: 100%;
    grid-template-columns: 1fr !important;
  }

  .game-status-row > div {
    width: 100%;
    box-sizing: border-box;
  }
}
/* ================= FINAL MONEY SCREEN MOBILE CLIPPING FIX V1 ================= */

.final-money-celebration-overlay {
  align-items: flex-start !important;
  justify-content: center !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 24px 14px !important;
  box-sizing: border-box !important;
}

.final-money-celebration-card {
  width: min(94vw, 680px) !important;
  max-height: none !important;
  margin: 18px auto 32px !important;
  padding-top: 28px !important;
  padding-bottom: 28px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.final-money-celebration-card img,
.final-money-celebration-card .raven-icon,
.final-money-celebration-card .final-money-raven,
.final-money-celebration-card .final-raven-icon {
  display: block !important;
  max-width: 96px !important;
  max-height: 96px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 auto 14px !important;
  object-fit: contain !important;
  overflow: visible !important;
}

.final-money-celebration-card button,
.final-money-celebration-card .primary-btn,
.final-money-celebration-card .danger-btn {
  display: block !important;
  width: 100% !important;
  max-width: 360px !important;
  min-height: 48px !important;
  margin: 18px auto 0 !important;
  white-space: normal !important;
}

@media (max-width: 700px) {
  .final-money-celebration-overlay {
    padding-top: 18px !important;
    padding-bottom: 26px !important;
  }

  .final-money-celebration-card {
    width: 94vw !important;
    margin-top: 8px !important;
    margin-bottom: 28px !important;
    padding: 22px 16px 24px !important;
  }

  .final-money-pot-amount {
    font-size: clamp(2rem, 11vw, 3.2rem) !important;
    line-height: 1.05 !important;
    word-break: break-word !important;
  }
}
/* ================= DOCTOR GRAVEN / LAST WORDS OVERLAYS V1 ================= */

.death-cinematic-overlay,
.last-words-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(circle at top, rgba(120, 0, 0, .32), transparent 42%),
    radial-gradient(circle at bottom, rgba(214, 168, 79, .12), transparent 38%),
    rgba(0, 0, 0, .92);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.death-cinematic-card,
.last-words-card {
  width: min(94vw, 680px);
  margin: 18px auto 34px;
  padding: 24px 18px;
  border-radius: 22px;
  border: 2px solid rgba(120, 0, 0, .74);
  background:
    linear-gradient(180deg, rgba(24, 4, 6, .98), rgba(5, 5, 8, .98)),
    radial-gradient(circle at center, rgba(214, 168, 79, .12), transparent 62%);
  box-shadow:
    0 0 48px rgba(120, 0, 0, .52),
    0 0 92px rgba(0, 0, 0, .82),
    inset 0 0 28px rgba(214, 168, 79, .08);
  text-align: center;
  box-sizing: border-box;
  animation: deathCardRise 520ms ease-out;
}

.death-cinematic-card h2,
.last-words-card h2 {
  margin: 10px 0 14px;
  color: #f0c15c;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1.08;
  text-shadow:
    0 0 14px rgba(214, 168, 79, .45),
    0 0 38px rgba(120, 0, 0, .38);
}

.death-cinematic-card p,
.last-words-card p {
  color: rgba(255, 255, 255, .86);
  line-height: 1.5;
}

.death-cinematic-kicker,
.last-words-kicker {
  color: rgba(255, 255, 255, .64);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-top: 14px;
}

.death-image-placeholder {
  min-height: 180px;
  border-radius: 18px;
  border: 1px solid rgba(214, 168, 79, .34);
  background:
    radial-gradient(circle at 70% 35%, rgba(214, 168, 79, .18), transparent 26%),
    radial-gradient(circle at 30% 70%, rgba(120, 0, 0, .36), transparent 34%),
    linear-gradient(135deg, rgba(0,0,0,.96), rgba(35, 6, 10, .96));
  box-shadow:
    inset 0 0 38px rgba(0, 0, 0, .68),
    0 0 24px rgba(120, 0, 0, .26);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 18px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.death-image-placeholder::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,.05) 45%, transparent 72%);
  transform: rotate(8deg);
  animation: deathImageSweep 4.8s ease-in-out infinite;
}

.death-image-label {
  color: #f0c15c;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(214, 168, 79, .42);
  position: relative;
  z-index: 1;
}

.death-image-subtext {
  color: rgba(255, 255, 255, .58);
  font-size: .86rem;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.death-cinematic-warning {
  margin: 16px auto;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(214, 168, 79, .34);
  background: rgba(0, 0, 0, .34);
  color: #f0c15c !important;
  font-weight: 700;
}

.death-cinematic-btn {
  margin-top: 16px;
  min-height: 48px;
  width: min(100%, 360px);
  border-radius: 14px;
  border: 1px solid rgba(214, 168, 79, .5);
  background:
    linear-gradient(180deg, #9d1723, #650b13);
  color: #fff;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow:
    0 0 24px rgba(157, 23, 35, .42),
    inset 0 0 12px rgba(255, 255, 255, .08);
}

.death-cinematic-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.last-words-intro {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.last-words-timer-row {
  margin: 16px auto 18px;
  padding: 12px 14px;
  width: min(100%, 420px);
  border-radius: 16px;
  border: 1px solid rgba(214, 168, 79, .38);
  background: rgba(0, 0, 0, .42);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}

.last-words-timer-row span {
  color: rgba(255, 255, 255, .68);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-weight: 800;
}

#lastWordsTimerDisplay {
  color: #f0c15c;
  font-size: 1.45rem;
  text-shadow:
    0 0 12px rgba(214, 168, 79, .52),
    0 0 28px rgba(157, 23, 35, .32);
}

.last-words-timer-danger #lastWordsTimerDisplay {
  color: #ff6b6b;
  animation: lastWordsTimerPulse 1s ease-in-out infinite;
}

.last-words-slots {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.last-words-slot {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(214, 168, 79, .25);
  background: rgba(0, 0, 0, .38);
  display: grid;
  gap: 9px;
  text-align: left;
}

.last-words-slot label {
  color: #f0c15c;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}

.last-words-slot select {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(214, 168, 79, .32);
  background: rgba(8, 8, 10, .96);
  color: #fff;
  padding: 0 10px;
  box-sizing: border-box;
}

.last-words-hint {
  margin-top: 14px;
  color: rgba(255, 255, 255, .62) !important;
  font-style: italic;
}

.raven-feed-last-words {
  border: 2px solid rgba(214, 168, 79, .74) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.22), rgba(0,0,0,.42)),
    linear-gradient(180deg, rgba(45, 7, 11, .96), rgba(0,0,0,.9)) !important;
  box-shadow:
    0 0 32px rgba(214,168,79,.28),
    0 0 52px rgba(157,23,35,.22) !important;
  animation: lastWordsFeedGlow 3s ease-in-out infinite;
}

@keyframes deathCardRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes deathImageSweep {
  0%, 100% {
    transform: translateX(-42%) rotate(8deg);
    opacity: .22;
  }

  50% {
    transform: translateX(42%) rotate(8deg);
    opacity: .44;
  }
}

@keyframes lastWordsTimerPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.12);
    filter: brightness(1.22);
  }
}

@keyframes lastWordsFeedGlow {
  0%, 100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.18);
  }
}

@media (max-width: 700px) {
  .death-cinematic-overlay,
  .last-words-overlay {
    padding: 14px 10px 24px;
  }

  .death-cinematic-card,
  .last-words-card {
    width: 94vw;
    margin-top: 8px;
    padding: 20px 14px 22px;
    border-radius: 18px;
  }

  .death-image-placeholder {
    min-height: 150px;
  }

  .death-cinematic-card h2,
  .last-words-card h2 {
    font-size: clamp(1.35rem, 7vw, 2rem);
  }

  .last-words-timer-row {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}
/* ================= RAVEN FEED LAST WORDS POLISH V1 ================= */

.raven-feed-last-words-title {
  color: #f0c15c;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
  text-shadow:
    0 0 10px rgba(214,168,79,.48),
    0 0 24px rgba(157,23,35,.32);
}

.raven-feed-last-words-message {
  color: rgba(255,255,255,.92);
  font-style: italic;
  line-height: 1.45;
}
/* ================= LAST WORDS BROADCAST POPUP V1 ================= */

.last-words-broadcast-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), transparent 38%),
    radial-gradient(circle at bottom, rgba(120,0,0,.32), transparent 42%),
    rgba(0,0,0,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
}

.last-words-broadcast-card {
  width: min(94vw, 620px);
  padding: 24px 18px;
  border-radius: 22px;
  border: 2px solid rgba(214,168,79,.76);
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), transparent 48%),
    linear-gradient(180deg, rgba(34,5,8,.98), rgba(3,3,6,.98));
  box-shadow:
    0 0 44px rgba(214,168,79,.34),
    0 0 82px rgba(157,23,35,.28),
    inset 0 0 28px rgba(214,168,79,.08);
  text-align: center;
  animation: lastWordsBroadcastRise 460ms ease-out;
}

.last-words-broadcast-kicker {
  color: rgba(255,255,255,.66);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.last-words-broadcast-card h2 {
  margin: 0 0 16px;
  color: #f0c15c;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1.08;
  text-shadow:
    0 0 14px rgba(214,168,79,.5),
    0 0 34px rgba(157,23,35,.38);
}

.last-words-broadcast-card p {
  color: rgba(255,255,255,.9);
  font-style: italic;
  line-height: 1.5;
  margin: 0 auto 18px;
  max-width: 520px;
}

@keyframes lastWordsBroadcastRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 700px) {
  .last-words-broadcast-card {
    padding: 22px 14px;
  }

  .last-words-broadcast-card h2 {
    font-size: clamp(1.25rem, 7vw, 1.9rem);
  }
}
/* ================= CHARACTER INTRO MONTAGE PLACEHOLDER V1 ================= */

.character-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), transparent 36%),
    radial-gradient(circle at bottom, rgba(120,0,0,.34), transparent 42%),
    rgba(0,0,0,.94);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.character-intro-card {
  width: min(94vw, 720px);
  margin: 16px auto 34px;
  padding: 24px 18px;
  border-radius: 24px;
  border: 2px solid rgba(214,168,79,.58);
  background:
    radial-gradient(circle at top, rgba(214,168,79,.16), transparent 46%),
    linear-gradient(180deg, rgba(20,4,7,.98), rgba(3,3,8,.98));
  box-shadow:
    0 0 54px rgba(214,168,79,.24),
    0 0 94px rgba(157,23,35,.28),
    inset 0 0 30px rgba(214,168,79,.07);
  text-align: center;
  box-sizing: border-box;
  animation: characterIntroRise 520ms ease-out;
}

.character-intro-image-placeholder {
  min-height: 240px;
  border-radius: 20px;
  border: 1px solid rgba(214,168,79,.36);
  background:
    radial-gradient(circle at 50% 28%, rgba(214,168,79,.18), transparent 28%),
    radial-gradient(circle at 70% 75%, rgba(157,23,35,.28), transparent 34%),
    linear-gradient(135deg, rgba(0,0,0,.98), rgba(28,5,9,.98));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  box-shadow:
    inset 0 0 44px rgba(0,0,0,.72),
    0 0 28px rgba(157,23,35,.2);
}

.character-intro-image-placeholder::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,.055) 45%, transparent 72%);
  transform: rotate(8deg);
  animation: characterIntroSweep 4.6s ease-in-out infinite;
}

.character-intro-image-label {
  position: relative;
  z-index: 1;
  color: #f0c15c;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-shadow:
    0 0 16px rgba(214,168,79,.46),
    0 0 34px rgba(157,23,35,.3);
}

.character-intro-kicker {
  margin-top: 18px;
  color: rgba(255,255,255,.62);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.character-intro-card h2 {
  margin: 10px 0 12px;
  color: #f0c15c;
  text-transform: uppercase;
  letter-spacing: .1em;
  line-height: 1.08;
  text-shadow:
    0 0 14px rgba(214,168,79,.48),
    0 0 36px rgba(157,23,35,.34);
}

.character-intro-card p {
  max-width: 580px;
  margin: 0 auto;
  color: rgba(255,255,255,.88);
  line-height: 1.55;
  font-size: 1rem;
}

.character-intro-progress {
  margin: 18px auto 0;
  color: rgba(255,255,255,.55);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
}

.character-intro-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.character-intro-actions button {
  min-width: 150px;
  min-height: 46px;
}

@keyframes characterIntroRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes characterIntroSweep {
  0%, 100% {
    transform: translateX(-42%) rotate(8deg);
    opacity: .22;
  }

  50% {
    transform: translateX(42%) rotate(8deg);
    opacity: .44;
  }
}

@media (max-width: 700px) {
  .character-intro-overlay {
    padding: 14px 10px 24px;
  }

  .character-intro-card {
    width: 94vw;
    margin-top: 8px;
    padding: 20px 14px 22px;
    border-radius: 20px;
  }

  .character-intro-image-placeholder {
    min-height: 170px;
  }

  .character-intro-card h2 {
    font-size: clamp(1.35rem, 7vw, 2rem);
  }

  .character-intro-actions {
    flex-direction: column-reverse;
  }

  .character-intro-actions button {
    width: 100%;
  }
}
/* ================= HARD HIDE SAFETY FIX ================= */

[hidden] {
  display: none !important;
}

.character-intro-overlay.hidden,
.death-cinematic-overlay.hidden,
.last-words-overlay.hidden,
.last-words-broadcast-overlay.hidden {
  display: none !important;
}

/* ================= MOBILE RIGHT-SHIFT / OVERFLOW FIX V2 ================= */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  margin: 0;
  padding: 0;
}

body {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

#app,
.landing-page,
.game-room-panel,
.panel,
.game-layout,
.table-side-panel,
.raven-side-panel,
.room-table,
.raven-clock-panel,
.host-command-banner {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 700px) {
  body {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .landing-page,
  #app {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    overflow-x: hidden !important;
  }

  .landing-content,
  .panel,
  .game-room-panel {
    width: 100% !important;
    max-width: calc(100vw - 20px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .game-layout {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow-x: hidden !important;
  }

  .raven-side-panel,
  .table-side-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .room-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .room-player-seat {
    max-width: 86px !important;
    font-size: .74rem !important;
    padding: 6px !important;
  }

  button,
  input,
  select,
  textarea {
    max-width: 100% !important;
  }
}
/* ================= STUDY THE MASKS BUTTON V1 ================= */

.study-masks-btn {
  margin: 10px auto 14px;
  padding: 10px 12px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(214,168,79,.38);
  background:
    linear-gradient(180deg, rgba(52,35,50,.96), rgba(14,9,17,.96));
  color: #d6a84f;
  font-size: .78rem;
  font-weight: bold;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow:
    0 0 18px rgba(214,168,79,.1),
    inset 0 0 12px rgba(214,168,79,.05);
}

.study-masks-btn:hover {
  filter: brightness(1.12);
}
/* ================= ROLE REVEAL WAITING THROB V1 ================= */

.raven-waiting-after-role-reveal {
  border-color: rgba(214, 168, 79, .92) !important;
  animation: ravenWaitingRoleRevealPanelPulse 2.2s ease-in-out infinite;
}

.raven-waiting-after-role-reveal .raven-clock-subtext {
  color: #f0c15c !important;
  font-weight: bold;
  animation: ravenWaitingRoleRevealTextThrob 1.45s ease-in-out infinite;
  text-shadow:
    0 0 10px rgba(214, 168, 79, .55),
    0 0 24px rgba(214, 168, 79, .28);
}

.raven-waiting-after-role-reveal .raven-clock-value {
  animation: ravenWaitingRoleRevealValueGlow 1.8s ease-in-out infinite;
}

@keyframes ravenWaitingRoleRevealTextThrob {
  0%, 100% {
    opacity: .62;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.045);
  }
}

@keyframes ravenWaitingRoleRevealValueGlow {
  0%, 100% {
    filter: brightness(.92);
  }

  50% {
    filter: brightness(1.25);
  }
}

@keyframes ravenWaitingRoleRevealPanelPulse {
  0%, 100% {
    box-shadow:
      0 0 30px rgba(214,168,79,.22),
      0 0 70px rgba(120,35,20,.16),
      inset 0 0 24px rgba(214,168,79,.08);
  }

  50% {
    box-shadow:
      0 0 54px rgba(214,168,79,.42),
      0 0 110px rgba(120,35,20,.26),
      inset 0 0 34px rgba(214,168,79,.14);
  }
}
.studio-tag {
  margin: -2px 0 10px;
  color: rgba(214, 168, 79, .78);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: bold;
}
/* ================= CHALLENGE MODE PICKER V1 ================= */

.challenge-mode-panel {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.35);
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), transparent 55%),
    rgba(0,0,0,.35);
}

.challenge-mode-panel label {
  display: block;
  margin-bottom: 8px;
  color: #d6a84f;
  font-weight: bold;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}

.challenge-mode-panel select {
  width: 100%;
  margin-bottom: 10px;
}

/* ================= RAVEN PREFERENCE PANEL V1 ================= */

.raven-preference-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(214,168,79,.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), transparent 58%),
    rgba(0,0,0,.30);
  text-align: center;
}

.raven-preference-title {
  margin-top: 0;
  color: #d6a84f;
  letter-spacing: .08em;
}

.raven-preference-copy,
.raven-preference-description {
  color: #efe8df;
  font-style: italic;
  line-height: 1.45;
}

.raven-preference-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.raven-preference-grid label {
  margin-top: 0;
}

.raven-preference-grid select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid rgba(214,168,79,.32);
  background: #0f0b12;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
}

#submitRavenPreferenceBtn {
  margin-top: 8px;
}

#ravenPreferenceStatus {
  color: #d6a84f;
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .raven-preference-grid {
    grid-template-columns: 1fr;
  }
}
/* ================= FINAL CHARACTER / RAVEN / DOCTOR GRAVEN IMAGE INTEGRATION V1 ================= */

/* ---------- Raven UI Images ---------- */

.raven-ui-icon {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin: 0 auto 12px;
  filter:
    drop-shadow(0 0 14px rgba(214, 168, 79, .28))
    drop-shadow(0 0 22px rgba(0, 0, 0, .65));
}

.raven-secret-alert-image {
  display: block;
  width: min(220px, 72vw);
  max-height: 180px;
  object-fit: contain;
  margin: 0 auto 14px;
  border-radius: 16px;
  filter:
    drop-shadow(0 0 16px rgba(214, 168, 79, .25))
    drop-shadow(0 0 26px rgba(0, 0, 0, .72));
}

.secret-message-arrival-card .raven-secret-alert-image {
  margin-top: -4px;
}

.secret-message-read-card .raven-ui-icon,
.host-join-request-alert-card .raven-ui-icon {
  margin-bottom: 10px;
}


/* ---------- Character Intro Montage Images ---------- */

.character-intro-card {
  width: min(94vw, 760px);
}

.character-intro-image {
  display: block;
  width: min(100%, 520px);
  max-height: min(62vh, 680px);
  margin: 0 auto 18px;
  border-radius: 20px;
  border: 1px solid rgba(214, 168, 79, .42);
  object-fit: contain;
  background:
    radial-gradient(circle at center, rgba(214, 168, 79, .12), rgba(0, 0, 0, .72)),
    rgba(0, 0, 0, .62);
  box-shadow:
    0 0 34px rgba(214, 168, 79, .18),
    0 0 62px rgba(157, 23, 35, .18),
    inset 0 0 24px rgba(0, 0, 0, .58);
}

.character-intro-card h2 {
  margin-top: 10px;
}

.character-intro-card p {
  max-width: 640px;
}

.character-intro-kicker {
  margin-top: 12px;
}


/* ---------- Doctor Graven Main Overlay Image ---------- */

.doctor-death-card {
  width: min(760px, 94vw);
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(18, 2, 4, .98), rgba(0, 0, 0, .98));
}

.doctor-death-overlay-image {
  display: block;
  width: 100%;
  max-height: min(58vh, 620px);
  object-fit: cover;
  object-position: center;
  border-bottom: 1px solid rgba(214, 168, 79, .32);
}

.doctor-death-overlay-content {
  padding: 24px 22px 26px;
}

.doctor-death-overlay-content h2 {
  margin-top: 0;
}


/* ---------- Doctor Graven Elimination / Last Words Images ---------- */

.death-image-frame {
  width: 100%;
  min-height: 180px;
  border-radius: 18px;
  border: 1px solid rgba(214, 168, 79, .34);
  background:
    radial-gradient(circle at center, rgba(120, 0, 0, .2), rgba(0, 0, 0, .74)),
    rgba(0, 0, 0, .78);
  box-shadow:
    inset 0 0 38px rgba(0, 0, 0, .68),
    0 0 24px rgba(120, 0, 0, .26);
  overflow: hidden;
}

.death-cinematic-image {
  display: block;
  width: 100%;
  height: clamp(190px, 42vh, 420px);
  object-fit: cover;
  object-position: center;
}

.personal-death-card .death-cinematic-image {
  object-position: center;
}

.living-death-card .death-cinematic-image {
  object-position: center;
}


/* ---------- Mobile Polish ---------- */

@media (max-width: 700px) {
  .raven-ui-icon {
    width: 76px;
    height: 76px;
  }

  .raven-secret-alert-image {
    width: min(190px, 78vw);
    max-height: 150px;
  }

  .character-intro-image {
    width: 100%;
    max-height: 58vh;
    border-radius: 16px;
  }

  .character-intro-card {
    width: 94vw;
    padding: 18px 12px 20px;
  }

  .doctor-death-overlay-image {
    max-height: 48vh;
  }

  .doctor-death-overlay-content {
    padding: 20px 16px 22px;
  }

  .death-cinematic-image {
    height: clamp(170px, 34vh, 320px);
  }
}
/* ================= DOCTOR GRAVEN FULL IMAGE VISIBILITY FIX V1 ================= */

.doctor-death-overlay-image {
  width: 100% !important;
  max-height: min(70vh, 760px) !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #050305 !important;
}

.death-cinematic-image {
  width: 100% !important;
  height: auto !important;
  max-height: min(56vh, 620px) !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #050305 !important;
}

.death-image-frame {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 240px !important;
  background:
    radial-gradient(circle at center, rgba(120, 0, 0, .2), rgba(0, 0, 0, .88)),
    #050305 !important;
}
/* ================= FINAL JUDGMENT RAVEN EMBLEM FIX V1 ================= */

.final-money-celebration-card .final-money-raven {
  display: block !important;
  width: 118px !important;
  height: 118px !important;
  max-width: 118px !important;
  max-height: 118px !important;
  object-fit: contain !important;
  margin: 0 auto 16px !important;
  filter:
    drop-shadow(0 0 16px rgba(214, 168, 79, .32))
    drop-shadow(0 0 26px rgba(0, 0, 0, .72));
}

/* ================= BASIC RULES MODAL / BUTTON V1 ================= */

.see-rules-btn {
  margin: 12px 0 10px;
  background: linear-gradient(180deg, #b7842f, #7a4d12);
  color: #120b05;
  border: 1px solid rgba(255, 226, 150, .55);
  box-shadow:
    0 0 18px rgba(214,168,79,.18),
    inset 0 0 12px rgba(255,255,255,.08);
  font-weight: bold;
  letter-spacing: .08em;
}

.see-rules-btn.rules-throb {
  animation: seeRulesThrob 1.45s ease-in-out infinite;
}

@keyframes seeRulesThrob {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
    box-shadow:
      0 0 18px rgba(214,168,79,.2),
      inset 0 0 12px rgba(255,255,255,.08);
  }

  50% {
    transform: scale(1.045);
    filter: brightness(1.18);
    box-shadow:
      0 0 34px rgba(214,168,79,.48),
      0 0 70px rgba(157,23,35,.18),
      inset 0 0 18px rgba(255,255,255,.12);
  }
}

.basic-rules-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, .82);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px;
  overflow-y: auto;
  box-sizing: border-box;
}

.basic-rules-overlay.hidden {
  display: none !important;
}

.basic-rules-card {
  width: min(760px, 94vw);
  margin: 20px auto 34px;
  padding: 24px;
  border: 1px solid rgba(214,168,79,.42);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(24, 14, 22, .98), rgba(0, 0, 0, .98));
  box-shadow:
    0 0 44px rgba(0,0,0,.8),
    inset 0 0 24px rgba(214,168,79,.08);
  text-align: center;
}

.basic-rules-card h2 {
  color: #d6a84f;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 8px 0 18px;
}

.basic-rules-body {
  max-height: 62vh;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(0,0,0,.34);
  text-align: left;
}

.basic-rules-body h3 {
  color: #d6a84f;
  margin: 18px 0 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.basic-rules-body h3:first-child {
  margin-top: 0;
}

.basic-rules-body p {
  margin: 8px 0;
  line-height: 1.48;
}

/* ================= RAVEN'S QUIZ V1 ================= */

.raven-quiz-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(214, 168, 79, .32);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.11), rgba(0,0,0,.26)),
    rgba(0,0,0,.3);
  text-align: left;
}

.raven-quiz-panel h4 {
  color: #d6a84f;
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.raven-quiz-panel .raven-quiz-subtitle {
  color: #efe8df;
  text-align: center;
  font-style: italic;
  margin: 6px 0 14px;
}

.raven-quiz-question {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.24);
}

.raven-quiz-question-title {
  color: #d6a84f;
  font-weight: bold;
  margin-bottom: 8px;
}

.raven-quiz-choice-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  color: #efe8df;
}

.raven-quiz-choice-row input {
  width: auto;
  margin: 2px 0 0;
}

.raven-quiz-standings {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.raven-quiz-standing-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.26);
}

.raven-quiz-standing-row.raven-quiz-top-row {
  border-color: rgba(214,168,79,.48);
  background: rgba(214,168,79,.08);
}

.raven-quiz-standing-name {
  color: #efe8df;
  font-weight: bold;
}

.raven-quiz-standing-score {
  color: #d6a84f;
  white-space: nowrap;
}

@media (max-width: 650px) {
  .raven-quiz-standing-row {
    display: grid;
    gap: 4px;
  }
}
/* Prevent iPhone double-tap zoom during Raven's Path */
.raven-path-panel,
.raven-path-panel *,
.raven-path-game,
.raven-path-game *,
.raven-path-controls,
.raven-path-controls *,
.raven-path-control-btn,
.raven-path-canvas {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* ================= THE RAVEN'S PLACEMENT V3 - CINEMATIC SCREEN ================= */

.raven-placement-active > :not(#ravenJudgmentPanel) {
  display: none !important;
}

.raven-placement-panel,
.ravens-placement-panel {
  width: min(1660px, 98vw) !important;
  min-height: min(920px, calc(100vh - 44px));
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center;
}

.ravens-placement-cinematic-shell {
  position: relative;
  min-height: min(920px, calc(100vh - 44px));
  padding: clamp(14px, 2vw, 26px);
  border: 1px solid rgba(214, 168, 79, .62);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 28%, rgba(214, 168, 79, .14), transparent 26%),
    radial-gradient(circle at 28% 22%, rgba(111, 25, 33, .18), transparent 30%),
    linear-gradient(90deg, rgba(5, 5, 8, .98), rgba(13, 10, 12, .96) 44%, rgba(2, 3, 5, .98));
  box-shadow:
    0 0 90px rgba(0, 0, 0, .88),
    inset 0 0 70px rgba(214, 168, 79, .055);
}

.ravens-placement-cinematic-shell::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(214, 168, 79, .28);
  border-radius: 14px;
  pointer-events: none;
  z-index: 6;
}

.ravens-placement-cinematic-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.58), transparent 18%, transparent 72%, rgba(0,0,0,.70)),
    radial-gradient(circle at 50% 50%, transparent 44%, rgba(0, 0, 0, .44) 100%);
  z-index: 5;
}

.ravens-placement-frame-glow {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(214,168,79,.03) 0, rgba(214,168,79,.03) 1px, transparent 1px, transparent 36px),
    radial-gradient(circle at 50% 0%, rgba(214,168,79,.14), transparent 32%);
  opacity: .58;
  pointer-events: none;
  z-index: 0;
}

.ravens-placement-left-rail {
  position: absolute;
  z-index: 7;
  left: clamp(18px, 2vw, 34px);
  top: clamp(86px, 11vw, 138px);
  width: 130px;
  padding: 15px 10px;
  border: 1px solid rgba(214,168,79,.36);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(8,7,9,.78), rgba(0,0,0,.44));
  box-shadow: inset 0 0 24px rgba(214,168,79,.05), 0 18px 50px rgba(0,0,0,.45);
}

.ravens-placement-rail-item {
  display: grid;
  gap: 7px;
  justify-items: center;
  color: rgba(214,168,79,.86);
  font-size: .75rem;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.ravens-placement-rail-icon {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(214,168,79,.38);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #d6a84f;
  background: rgba(0,0,0,.34);
  font-size: 1.4rem;
}

.ravens-placement-rail-divider {
  height: 1px;
  margin: 14px auto;
  width: 74%;
  background: linear-gradient(90deg, transparent, rgba(214,168,79,.48), transparent);
}

.ravens-placement-main-stage {
  position: relative;
  z-index: 7;
  min-height: calc(min(920px, 100vh - 44px) - 52px);
  display: flex;
  flex-direction: column;
}

.ravens-placement-heading-block {
  padding: 8px 140px 10px;
  text-align: center;
}

.ravens-placement-brand {
  color: rgba(214,168,79,.64);
  text-transform: uppercase;
  letter-spacing: .42em;
  font-size: clamp(.72rem, 1vw, .92rem);
  margin-bottom: 4px;
}

.ravens-placement-title {
  margin: 0;
  color: #d6a84f;
  font-size: clamp(2.3rem, 5.4vw, 5.2rem);
  line-height: .95;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 500;
  text-shadow: 0 0 18px rgba(214,168,79,.28), 0 2px 0 rgba(0,0,0,.65);
}

.ravens-placement-kicker {
  margin: 12px auto 0;
  color: rgba(239,232,223,.82);
  font-size: clamp(.92rem, 1.35vw, 1.16rem);
  line-height: 1.36;
}

.ravens-placement-content-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(440px, 1fr) minmax(360px, .47fr);
  gap: clamp(16px, 2.2vw, 28px);
  align-items: stretch;
  padding: 8px clamp(16px, 3vw, 54px) 22px clamp(152px, 12vw, 190px);
}

.ravens-placement-interaction-card {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 0;
}

.ravens-placement-look {
  margin: 0 0 2px;
  color: rgba(214,168,79,.82);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .88rem;
}

.ravens-placement-inkblot-frame {
  width: min(760px, 100%);
  aspect-ratio: 1.55 / 1;
  padding: clamp(7px, 1vw, 11px);
  border-radius: 20px;
  border: 1px solid rgba(214,168,79,.60);
  background:
    linear-gradient(180deg, rgba(214,168,79,.10), rgba(0,0,0,.22)),
    rgba(0,0,0,.36);
  box-shadow:
    0 26px 62px rgba(0,0,0,.70),
    inset 0 0 24px rgba(214,168,79,.08);
  overflow: hidden;
}

.ravens-placement-inkblot-img,
.raven-placement-inkblot-svg,
.ravens-placement-inkblot-frame svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 15px;
  filter: contrast(1.08) saturate(.95) drop-shadow(0 0 14px rgba(214,168,79,.12));
}

.ravens-placement-fallback-ink {
  width: 100%;
  height: 100%;
}

.ravens-placement-response-panel {
  width: min(650px, 94%);
  margin-top: -3px;
  padding: 15px clamp(16px, 2.4vw, 34px) 18px;
  border: 1px solid rgba(214,168,79,.42);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(14,12,14,.88), rgba(0,0,0,.72));
  box-shadow: 0 18px 44px rgba(0,0,0,.52), inset 0 0 26px rgba(214,168,79,.045);
}

.ravens-placement-question {
  margin: 0;
  color: #d6a84f;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: clamp(1.15rem, 2.6vw, 2.05rem);
  line-height: 1.1;
}

.ravens-placement-word-note {
  margin: 5px 0 12px;
  color: rgba(239,232,223,.64);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .82rem;
}

.ravens-placement-input-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ravens-placement-input {
  width: 100%;
  margin: 0 auto 12px;
  display: block;
  box-sizing: border-box;
  padding: 14px 15px;
  border-radius: 8px;
  border: 1px solid rgba(214,168,79,.48);
  background: rgba(3, 4, 6, .78);
  color: #efe8df;
  text-align: center;
  font-size: 1.06rem;
  font-family: Georgia, "Times New Roman", serif;
  outline: none;
  box-shadow: inset 0 0 20px rgba(0,0,0,.65);
}

.ravens-placement-input:focus {
  border-color: rgba(214,168,79,.88);
  box-shadow: 0 0 0 3px rgba(214,168,79,.10), inset 0 0 20px rgba(0,0,0,.65);
}

.ravens-placement-input::placeholder {
  color: rgba(239,232,223,.48);
  font-style: italic;
}

.ravens-placement-influence {
  margin: 10px auto 14px;
  color: rgba(239,232,223,.72);
  font-size: clamp(.78rem, 1.1vw, .93rem);
  line-height: 1.38;
}

.ravens-placement-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 auto;
}

.ravens-placement-actions button {
  margin-top: 0;
  min-height: 49px;
  border: 1px solid rgba(214,168,79,.56);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(104,65,20,.68), rgba(30,20,15,.92));
  color: #f2d18a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.8rem, 1.2vw, 1rem);
  letter-spacing: .13em;
  text-transform: uppercase;
  box-shadow: inset 0 0 18px rgba(214,168,79,.06), 0 10px 24px rgba(0,0,0,.42);
}

.ravens-placement-actions button.secondary {
  background:
    linear-gradient(180deg, rgba(26,25,29,.82), rgba(3,4,6,.94));
  color: rgba(239,232,223,.86);
}

.ravens-placement-raven-panel {
  position: relative;
  min-height: 560px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0,0,0,.38), rgba(0,0,0,.05)),
    var(--ravens-placement-raven-image, url("/images/ravens-placement/raven-inkblot.webp")) center center / cover no-repeat;
  box-shadow: inset 0 0 80px rgba(0,0,0,.38);
}

.ravens-placement-raven-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.42));
}

.ravens-placement-raven-figure {
  position: absolute;
  inset: 0;
}

.ravens-placement-raven-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  padding: 14px 16px;
  border: 1px solid rgba(214,168,79,.32);
  border-radius: 12px;
  background: rgba(0,0,0,.58);
  color: rgba(239,232,223,.82);
  display: grid;
  gap: 5px;
  text-align: left;
  font-size: .88rem;
}

.ravens-placement-raven-caption strong {
  color: #d6a84f;
  font-weight: normal;
}

@media (max-width: 1180px) {
  .ravens-placement-left-rail {
    display: none;
  }

  .ravens-placement-heading-block {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ravens-placement-content-grid {
    padding-left: clamp(14px, 3vw, 32px);
    grid-template-columns: minmax(420px, 1fr) minmax(280px, .42fr);
  }
}

@media (max-width: 900px) {
  .ravens-placement-cinematic-shell {
    min-height: auto;
  }

  .ravens-placement-content-grid {
    grid-template-columns: 1fr;
    padding: 8px 10px 18px;
  }

  .ravens-placement-raven-panel {
    order: -1;
    min-height: 260px;
    background-position: center 28%;
  }

  .ravens-placement-raven-caption {
    display: none;
  }

  .ravens-placement-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .raven-placement-panel,
  .ravens-placement-panel {
    width: 96vw !important;
  }

  .ravens-placement-cinematic-shell {
    padding: 12px;
  }

  .ravens-placement-title {
    font-size: clamp(1.9rem, 11vw, 3rem);
    letter-spacing: .06em;
  }

  .ravens-placement-brand {
    letter-spacing: .24em;
  }

  .ravens-placement-inkblot-frame {
    width: 100%;
    aspect-ratio: 1.35 / 1;
  }

  .ravens-placement-response-panel {
    width: 100%;
    box-sizing: border-box;
  }
}
/* ================= RAVEN'S PLACEMENT V3 CENTER / RAVEN VISIBILITY FIX ================= */

.raven-placement-active {
  min-height: 100vh;
  width: 100%;
  display: grid !important;
  place-items: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

.raven-placement-panel,
.ravens-placement-panel {
  width: min(1320px, 96vw) !important;
  max-width: 1320px !important;
  margin: 0 auto !important;
}

.ravens-placement-cinematic-shell {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: min(860px, calc(100vh - 32px)) !important;
}

.ravens-placement-content-grid {
  grid-template-columns: minmax(420px, 1.05fr) minmax(320px, 0.75fr) !important;
  padding: 8px clamp(18px, 3vw, 42px) 22px clamp(18px, 3vw, 42px) !important;
  align-items: center !important;
}

.ravens-placement-left-rail {
  display: none !important;
}

.ravens-placement-raven-panel {
  min-height: 560px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-color: rgba(0, 0, 0, 0.18) !important;
}

.ravens-placement-raven-panel::before {
  background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.18)) !important;
}

@media (max-width: 900px) {
  .raven-placement-active {
    align-items: start !important;
    padding: 10px !important;
  }

  .ravens-placement-content-grid {
    grid-template-columns: 1fr !important;
    padding: 8px 10px 18px !important;
  }

  .ravens-placement-raven-panel {
    order: -1 !important;
    min-height: 360px !important;
    background-size: contain !important;
    background-position: center center !important;
  }
}

@media (max-width: 560px) {
  .ravens-placement-raven-panel {
    min-height: 300px !important;
  }
}

/* ================= RAVEN'S PLACEMENT FOUR SYSTEM V1 ================= */

.ravens-placement-mode-label {
  color: #d6a84f;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: clamp(.85rem, 1.4vw, 1.05rem);
  margin-bottom: 7px;
  text-shadow: 0 0 16px rgba(214,168,79,.25);
}

.ravens-placement-mode-intro {
  color: rgba(239,232,223,.86);
  margin: 0 auto 14px;
  max-width: 760px;
  line-height: 1.45;
  font-size: .98rem;
}

.ravens-placement-choice-question {
  color: #efe8df;
  font-size: clamp(1.1rem, 2.1vw, 1.65rem);
  line-height: 1.25;
  margin: 8px auto 18px;
  max-width: 680px;
}

.ravens-placement-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px auto 6px;
  max-width: 720px;
}

.ravens-placement-choice-card,
.ravens-placement-relic-card {
  margin: 0;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(214,168,79,.38);
  background:
    linear-gradient(180deg, rgba(32,24,18,.92), rgba(5,4,4,.94));
  color: #e6d3a5;
  box-shadow:
    inset 0 0 14px rgba(214,168,79,.08),
    0 0 18px rgba(0,0,0,.32);
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: transform .15s ease, border-color .15s ease, filter .15s ease;
}

.ravens-placement-choice-card:hover,
.ravens-placement-relic-card:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: rgba(255,218,134,.72);
}

.ravens-placement-choice-card.selected,
.ravens-placement-relic-card.selected {
  border-color: rgba(255,218,134,.92);
  background:
    radial-gradient(circle at center, rgba(214,168,79,.22), transparent 68%),
    linear-gradient(180deg, rgba(45,32,18,.98), rgba(7,5,4,.98));
  color: #ffe1a0;
  box-shadow:
    0 0 20px rgba(214,168,79,.28),
    inset 0 0 18px rgba(214,168,79,.12);
}

.ravens-placement-relic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px auto 10px;
  max-width: 880px;
}

.ravens-placement-relic-card {
  min-height: 132px;
  padding: 14px 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
}

.ravens-placement-relic-icon {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214,168,79,.44);
  color: #d6a84f;
  font-size: 2rem;
  background: rgba(0,0,0,.28);
  box-shadow: inset 0 0 14px rgba(214,168,79,.08);
}

.ravens-placement-relic-label {
  font-size: .86rem;
}

.ravens-placement-subtle-note {
  color: rgba(239,232,223,.62);
  font-size: .82rem;
  margin: 8px auto 0;
  font-style: italic;
}

.ravens-placement-mirror-stage {
  width: min(410px, 86vw);
  aspect-ratio: 1 / .78;
  margin: 4px auto 14px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background:
    radial-gradient(circle at center, rgba(214,168,79,.08), transparent 62%),
    rgba(0,0,0,.18);
}

.ravens-placement-mirror-glass {
  width: min(245px, 62vw);
  aspect-ratio: .78 / 1;
  border-radius: 50%;
  border: 8px double rgba(214,168,79,.56);
  background:
    radial-gradient(circle at 38% 28%, rgba(255,255,255,.16), transparent 18%),
    radial-gradient(circle at center, rgba(52,60,68,.64), rgba(1,3,5,.95) 72%);
  box-shadow:
    0 0 34px rgba(0,0,0,.65),
    inset 0 0 28px rgba(255,255,255,.06),
    inset 0 0 70px rgba(0,0,0,.82);
  position: relative;
}

.ravens-placement-mirror-glass::before,
.ravens-placement-mirror-glass::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 70px;
  border-left: 3px solid rgba(214,168,79,.46);
  border-right: 3px solid rgba(214,168,79,.46);
}

.ravens-placement-mirror-glass::before {
  top: -62px;
  border-top: 3px solid rgba(214,168,79,.34);
  border-radius: 18px 18px 0 0;
}

.ravens-placement-mirror-glass::after {
  bottom: -62px;
  border-bottom: 3px solid rgba(214,168,79,.34);
  border-radius: 0 0 18px 18px;
}

.ravens-placement-raven-panel {
  background-image:
    radial-gradient(circle at 62% 44%, rgba(214,168,79,.16), transparent 34%),
    linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.12)),
    var(--ravens-placement-raven-image, url("/images/ravens-placement/raven-inkblot.webp")) !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  min-height: 560px !important;
  overflow: hidden;
}

.ravens-placement-raven-panel::after {
  content: "";
  position: absolute;
  inset: auto 8% 8% auto;
  width: 180px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.62), transparent 72%);
  pointer-events: none;
}

.ravens-placement-raven-figure {
  display: none;
}

.ravens-placement-raven-prop {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(0,0,0,.7));
}

.ravens-placement-raven-prop-inkblot {
  right: 16%;
  bottom: 18%;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  border: 2px solid rgba(214,168,79,.42);
  background:
    radial-gradient(circle at center, rgba(0,0,0,.92), rgba(20,12,6,.98));
}

.ravens-placement-raven-prop-inkblot::before {
  content: "";
  position: absolute;
  left: 44%;
  bottom: 42%;
  width: 5px;
  height: 128px;
  background: linear-gradient(180deg, rgba(214,168,79,.75), #090706 30%, #090706 100%);
  transform: rotate(-18deg);
  border-radius: 999px;
}

.ravens-placement-raven-prop-relic {
  right: 11%;
  bottom: 15%;
  width: 230px;
  height: 88px;
  border-radius: 18px;
  border: 1px solid rgba(214,168,79,.28);
  background:
    linear-gradient(90deg, rgba(214,168,79,.15) 0 18%, transparent 18% 20%, rgba(214,168,79,.12) 20% 38%, transparent 38% 40%, rgba(214,168,79,.11) 40% 58%, transparent 58% 60%, rgba(214,168,79,.12) 60% 78%, transparent 78% 80%, rgba(214,168,79,.13) 80% 100%),
    rgba(0,0,0,.46);
  opacity: .72;
}

.ravens-placement-raven-prop-choice {
  right: 20%;
  bottom: 13%;
  width: 170px;
  height: 104px;
  border-radius: 10px;
  border: 1px solid rgba(214,168,79,.42);
  background:
    linear-gradient(145deg, rgba(238,213,159,.7), rgba(74,50,28,.86));
  transform: rotate(-8deg);
  opacity: .76;
}

.ravens-placement-raven-prop-choice::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-top: 1px solid rgba(29,16,9,.5);
  border-bottom: 1px solid rgba(29,16,9,.38);
}

.ravens-placement-raven-prop-mirror {
  right: 15%;
  bottom: 14%;
  width: 150px;
  height: 190px;
  border-radius: 50%;
  border: 7px double rgba(214,168,79,.55);
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,.16), transparent 18%),
    radial-gradient(circle at center, rgba(43,51,59,.7), rgba(0,0,0,.96) 72%);
  opacity: .8;
}

.ravens-placement-mode-relic .ravens-placement-raven-panel {
  background-position: center 44% !important;
}

.ravens-placement-mode-choice .ravens-placement-raven-panel {
  background-position: center 42% !important;
}

.ravens-placement-mode-mirror .ravens-placement-raven-panel {
  background-position: center 42% !important;
}

.ravens-placement-mode-relic .ravens-placement-interaction-card,
.ravens-placement-mode-choice .ravens-placement-interaction-card,
.ravens-placement-mode-mirror .ravens-placement-interaction-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ravens-placement-mode-choice .ravens-placement-response-panel,
.ravens-placement-mode-relic .ravens-placement-response-panel,
.ravens-placement-mode-mirror .ravens-placement-response-panel {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .ravens-placement-choice-grid,
  .ravens-placement-relic-grid {
    grid-template-columns: 1fr;
  }

  .ravens-placement-relic-card {
    min-height: 82px;
    grid-template-columns: 54px 1fr;
    text-align: left;
    place-items: center start;
    padding: 12px 16px;
  }

  .ravens-placement-raven-panel {
    min-height: 340px !important;
    background-size: contain !important;
  }

  .ravens-placement-raven-prop {
    transform: scale(.78);
    transform-origin: right bottom;
  }
}

@media (max-width: 560px) {
  .ravens-placement-choice-grid,
  .ravens-placement-relic-grid {
    gap: 8px;
  }

  .ravens-placement-raven-panel {
    min-height: 285px !important;
  }

  .ravens-placement-raven-prop {
    display: none;
  }
}


/* ================= RAVEN'S PLACEMENT 4-SYSTEM V1.1 - MODE-SPECIFIC RAVEN ART HOOKS ================= */

.ravens-placement-raven-inkblot {
  --ravens-placement-raven-image: url("/images/ravens-placement/raven-inkblot.webp");
}

.ravens-placement-raven-relic {
  --ravens-placement-raven-image: url("/images/ravens-placement/raven-relic.webp");
}

.ravens-placement-raven-choice {
  --ravens-placement-raven-image: url("/images/ravens-placement/raven-choice.webp");
}

.ravens-placement-raven-mirror {
  --ravens-placement-raven-image: url("/images/ravens-placement/raven-mirror.webp");
}

/* Relic mode: the prop/card spread stays centered so the Raven never appears to recommend one card. */
.ravens-placement-raven-prop-relic {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  bottom: 10% !important;
}

.ravens-placement-raven-prop-relic::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 22px;
  border: 1px solid rgba(214,168,79,.08);
  pointer-events: none;
}


/* ================= THE TABLE OF DECEPTION V1.2 PATCH - RAVEN PLACEMENT / DOCTOR GRAVEN ================= */

.secret-raven-image,
.secret-raven-icon.secret-raven-image {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: contain;
  margin: 0 auto 10px;
  filter: drop-shadow(0 0 16px rgba(214,168,79,.22));
}

.ravens-placement-relic-card {
  min-height: 54px;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: bold;
}

.ravens-placement-relic-icon {
  display: none !important;
}

.ravens-placement-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ravens-placement-choice-card {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-weight: bold;
}

.ravens-placement-mode-inkblot .ravens-placement-raven-panel {
  min-height: 440px !important;
  background-position: center center !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
}

.ravens-placement-mode-inkblot .ravens-placement-raven-panel::before {
  opacity: .48;
}

.ravens-placement-mode-inkblot .ravens-placement-raven-caption {
  background: linear-gradient(180deg, rgba(0,0,0,.16), rgba(0,0,0,.70));
}

.doctor-death-jumpscare-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.doctor-death-jumpscare-overlay.hidden {
  display: none !important;
}

.doctor-death-jumpscare-image {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center center;
  display: block;
  animation: doctorDeathJumpscarePulse 3s ease-in-out forwards;
}

@keyframes doctorDeathJumpscarePulse {
  0% { transform: scale(1.04); filter: brightness(.72) contrast(1.12); }
  12% { transform: scale(1.00); filter: brightness(1.16) contrast(1.3); }
  82% { transform: scale(1.015); filter: brightness(.95) contrast(1.18); }
  100% { transform: scale(1.04); filter: brightness(.35) contrast(1.08); }
}

.survivor-elimination-overlay {
  z-index: 1000000;
  background: #000;
  padding: 0;
}

.survivor-elimination-scene {
  position: relative;
  width: min(100vw, 1600px);
  height: min(100vh, 1200px);
  margin: auto;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 60px rgba(0,0,0,.85);
}

.survivor-elimination-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.survivor-elimination-plaque {
  position: absolute;
  left: 50%;
  bottom: clamp(84px, 8.8vh, 142px);
  width: min(46vw, 610px);
  min-height: clamp(74px, 10vw, 138px);
  transform: translateX(-50%) perspective(900px) rotateX(2deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, .55vw, 8px);
  padding: clamp(8px, 1.3vw, 18px) clamp(18px, 2.4vw, 34px);
  color: #1d1307;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255,234,176,.34);
  pointer-events: none;
}

.survivor-elimination-plaque h2 {
  margin: 0;
  width: 100%;
  color: #211405;
  font-size: clamp(1.15rem, 2.2vw, 2.65rem);
  line-height: .95;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.survivor-elimination-plaque-lines {
  display: grid;
  gap: clamp(1px, .24vw, 5px);
  width: 100%;
  color: #261706;
  font-size: clamp(.56rem, .95vw, 1.08rem);
  line-height: 1.05;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.survivor-elimination-bottom-line {
  position: absolute;
  left: 50%;
  bottom: clamp(46px, 4.8vh, 78px);
  transform: translateX(-50%);
  margin: 0;
  width: min(84vw, 780px);
  color: rgba(239,232,223,.88);
  text-align: center;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: clamp(.62rem, 1.05vw, .98rem);
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
  pointer-events: none;
}

.survivor-elimination-btn {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 1.6vh, 28px);
  transform: translateX(-50%);
  width: min(300px, 72vw);
  margin: 0;
  z-index: 2;
}

@media (max-width: 760px) {
  .ravens-placement-choice-grid {
    grid-template-columns: 1fr;
  }

  .survivor-elimination-scene {
    width: 100vw;
    height: 100vh;
  }

  .survivor-elimination-bg {
    object-position: center center;
  }

  .survivor-elimination-plaque {
    bottom: clamp(82px, 9.2vh, 126px);
    width: min(72vw, 560px);
  }

  .survivor-elimination-plaque h2 {
    font-size: clamp(1rem, 4.2vw, 1.8rem);
  }

  .survivor-elimination-plaque-lines {
    font-size: clamp(.52rem, 2.35vw, .84rem);
  }
}


/* ================= V1.2.2 CLEANUP: COMPACT GAME MODE + ROLE REVEAL ================= */

.compact-game-mode-panel {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(214,168,79,.28);
  border-radius: 16px;
  background: rgba(0,0,0,.26);
  text-align: left;
}

.game-mode-title {
  margin: 0 0 10px;
  color: #d6a84f;
  text-align: center;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.game-mode-select-label {
  margin-top: 6px;
}

.game-mode-select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid rgba(214,168,79,.28);
  background: #0f0b12;
  color: #efe8df;
  font-family: Georgia, "Times New Roman", serif;
}

.game-mode-short-description {
  margin: 6px 0 0;
  text-align: center;
}

.game-mode-details {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
}

.game-mode-details summary {
  color: #d6a84f;
  cursor: pointer;
  text-align: center;
  letter-spacing: .04em;
}

.game-mode-details-body {
  margin-top: 10px;
  color: #d7cfc8;
  font-size: .92rem;
}

.game-mode-details-body p {
  margin: 7px 0;
}

.role-reveal-card,
#roleRevealOverlayText {
  white-space: pre-line;
}

#roleRevealOverlayText {
  text-align: center;
}

.role-reveal-confirm {
  width: min(100%, 520px);
  margin: 20px auto 0;
  padding: 14px 22px;
  border: 1px solid rgba(236, 190, 91, .82);
  border-radius: 10px;
  background: linear-gradient(180deg, #8b160f, #4c0907);
  color: #fff4dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.98rem, 2vw, 1.16rem);
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  box-shadow: 0 0 22px rgba(196, 38, 25, .24);
  cursor: pointer;
}

.role-reveal-confirm:hover,
.role-reveal-confirm:focus-visible {
  border-color: #ffe2a0;
  background: linear-gradient(180deg, #ad2419, #610b08);
  outline: 2px solid rgba(255, 226, 160, .4);
  outline-offset: 3px;
}

/* ================= V1.2.3 SURGICAL VISUAL POLISH =================
   Fixes:
   - Make Magic Genie wish wording stand apart visually.
   - Remove duplicate/odd generated props from Raven image panel.
   - Simplify the Mirror input prop so it does not show strange U-shaped handles.
   These are CSS-only visual fixes. The actual Raven art remains unchanged.
============================================================= */

/* The magic genie line is the intro text, not the question text. */
.ravens-placement-mode-choice .ravens-placement-mode-intro {
  position: relative !important;
  margin: 8px auto 16px !important;
  padding: 18px 18px 16px !important;
  max-width: 720px !important;
  border: 1px solid rgba(214, 168, 79, .68) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at top, rgba(214, 168, 79, .24), transparent 58%),
    linear-gradient(180deg, rgba(55, 33, 16, .94), rgba(7, 5, 5, .97)) !important;
  box-shadow:
    0 0 28px rgba(214, 168, 79, .20),
    inset 0 0 18px rgba(255, 225, 160, .08) !important;
  color: #ffe1a0 !important;
  font-size: clamp(1.22rem, 2.35vw, 1.85rem) !important;
  line-height: 1.18 !important;
  letter-spacing: .035em !important;
  text-align: center !important;
  text-shadow:
    0 0 14px rgba(214, 168, 79, .38),
    0 2px 10px rgba(0, 0, 0, .78) !important;
}

.ravens-placement-mode-choice .ravens-placement-mode-intro::before {
  content: "THE WISH";
  display: block;
  margin-bottom: 8px;
  color: rgba(214, 168, 79, .82);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.ravens-placement-mode-choice .ravens-placement-question {
  margin: 0 auto 16px !important;
  color: #d6a84f !important;
  font-size: clamp(1.45rem, 2.7vw, 2.25rem) !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 16px rgba(214, 168, 79, .28), 0 2px 9px #000 !important;
}

/* The actual Raven images already contain their props. Hide CSS-generated extras that created circles/lines/duplicate mirrors. */
.ravens-placement-raven-prop,
.ravens-placement-raven-prop::before,
.ravens-placement-raven-prop::after,
.ravens-placement-raven-panel::after {
  display: none !important;
  content: none !important;
}

/* Keep the Mirror input-side visual, but remove the strange top/bottom U-shaped decorations. */
.ravens-placement-mirror-glass::before,
.ravens-placement-mirror-glass::after {
  display: none !important;
  content: none !important;
}

.ravens-placement-mirror-stage {
  width: min(360px, 74vw) !important;
  margin: 0 auto 16px !important;
  background:
    radial-gradient(circle at center, rgba(214,168,79,.075), transparent 62%),
    rgba(0,0,0,.12) !important;
}

.ravens-placement-mirror-glass {
  width: min(220px, 54vw) !important;
  border: 6px double rgba(214,168,79,.55) !important;
  box-shadow:
    0 0 28px rgba(0,0,0,.68),
    0 0 18px rgba(214,168,79,.10),
    inset 0 0 28px rgba(255,255,255,.05),
    inset 0 0 70px rgba(0,0,0,.86) !important;
}

/* Make the Raven panel image cleaner and less visually busy after hiding the generated props. */
.ravens-placement-raven-panel {
  background-image:
    radial-gradient(circle at 62% 44%, rgba(214,168,79,.10), transparent 34%),
    linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.08)),
    var(--ravens-placement-raven-image, url("/images/ravens-placement/raven-inkblot.webp")) !important;
}

@media (max-width: 900px) {
  .ravens-placement-mode-choice .ravens-placement-mode-intro {
    padding: 14px 14px 13px !important;
    font-size: clamp(1.05rem, 5vw, 1.45rem) !important;
  }

  .ravens-placement-mode-choice .ravens-placement-question {
    font-size: clamp(1.15rem, 6vw, 1.7rem) !important;
    letter-spacing: .08em !important;
  }
}

/* ================= V1.2.4 FINAL POLISH =================
   - Mirror screen uses the real Raven mirror image instead of fake CSS mirror.
   - Role reveal warning/role screens are visually distinct and less oversized.
   - Remote mode is the safer default and appears first in the dropdown.
============================================================= */

.ravens-placement-mode-mirror .ravens-placement-content-grid {
  grid-template-columns: minmax(0, 940px) !important;
  justify-content: center !important;
}

.ravens-placement-mode-mirror .ravens-placement-interaction-card {
  max-width: 940px !important;
  margin: 0 auto !important;
}

.ravens-placement-mirror-stage,
.ravens-placement-mirror-glass {
  display: none !important;
}

.ravens-placement-mirror-art {
  width: min(760px, 92vw) !important;
  margin: 0 auto 18px !important;
  border: 1px solid rgba(214, 168, 79, .35) !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background: rgba(0, 0, 0, .55) !important;
  box-shadow:
    0 0 36px rgba(0,0,0,.54),
    inset 0 0 24px rgba(214,168,79,.07) !important;
}

.ravens-placement-mirror-art-img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 10 !important;
  object-fit: cover !important;
  object-position: center center !important;
}

.ravens-placement-mirror-response-panel {
  /* A fixed-width child of this flex column otherwise hugs the left edge.
     Keep the mirror question directly beneath the centered artwork. */
  margin: 0 auto !important;
}

.role-reveal-card h2.role-reveal-warning-title {
  color: #efe8df !important;
  font-size: clamp(2.15rem, 8vw, 4.8rem) !important;
  letter-spacing: .1em !important;
  line-height: 1.08 !important;
}

.role-reveal-card h2.role-reveal-warning-title::first-line {
  color: #d6a84f;
}

.role-reveal-card h2.role-reveal-role-title {
  color: #d6a84f !important;
  font-size: clamp(1.8rem, 6vw, 3.4rem) !important;
  letter-spacing: .14em !important;
  line-height: 1.05 !important;
  margin: 18px 0 !important;
  text-shadow:
    0 0 18px rgba(214, 168, 79, .26),
    0 3px 12px rgba(0,0,0,.85) !important;
}

.role-reveal-warning {
  max-width: 520px !important;
  margin: 14px auto 0 !important;
  color: rgba(239,232,223,.72) !important;
  font-size: .95rem !important;
}

#gamePlayModeSelect option[value="remote"] {
  font-weight: bold;
}



/* ================= V1.2.5 CINEMATIC + ROLE REVEAL REFINEMENT ================= */

/* Role warning: one clean white headline, with the secret-role line smaller underneath. */
.role-reveal-card h2.role-reveal-warning-title {
  color: #efe8df !important;
  font-size: clamp(2.35rem, 7.2vw, 5.4rem) !important;
  letter-spacing: .12em !important;
  line-height: 1.02 !important;
  margin: 0 !important;
  text-align: center !important;
  text-shadow: 0 0 22px rgba(0,0,0,.9), 0 3px 12px rgba(0,0,0,.92) !important;
}

.role-reveal-card h2.role-reveal-warning-title::first-line {
  color: inherit !important;
}

.role-reveal-main-line {
  display: block !important;
  color: #efe8df !important;
  font-size: 1em !important;
  line-height: 1.02 !important;
}

.role-reveal-sub-line {
  display: block !important;
  margin-top: clamp(10px, 1.5vw, 18px) !important;
  color: rgba(239,232,223,.86) !important;
  font-size: clamp(1.05rem, 2.7vw, 2.05rem) !important;
  letter-spacing: .16em !important;
  line-height: 1.12 !important;
}

.role-reveal-card h2.role-reveal-role-title {
  color: #d6a84f !important;
  font-size: clamp(1.35rem, 4.2vw, 2.7rem) !important;
  letter-spacing: .16em !important;
  line-height: 1.05 !important;
  margin: 12px 0 !important;
  text-shadow: 0 0 16px rgba(214,168,79,.22), 0 3px 12px rgba(0,0,0,.88) !important;
}

/* Doctor Graven jump-scare: less cropped on desktop, still intense on phones. */
.doctor-death-jumpscare-image {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #000 !important;
}

@media (max-width: 720px) {
  .doctor-death-jumpscare-image {
    object-fit: cover !important;
  }
}

@keyframes doctorDeathJumpscarePulse {
  0% { transform: scale(1.00); filter: brightness(.74) contrast(1.10); }
  12% { transform: scale(.985); filter: brightness(1.12) contrast(1.22); }
  82% { transform: scale(1.00); filter: brightness(.96) contrast(1.14); }
  100% { transform: scale(1.01); filter: brightness(.40) contrast(1.06); }
}

/* Survivor plaque: move text down onto the brass plaque and make it read like engraved metal. */
.survivor-elimination-plaque {
  bottom: clamp(46px, 5.6vh, 96px) !important;
  color: #120905 !important;
  text-shadow:
    0 1px 0 rgba(255,221,137,.20),
    0 -1px 0 rgba(0,0,0,.42),
    1px 0 0 rgba(0,0,0,.22) !important;
  mix-blend-mode: multiply !important;
  opacity: .96 !important;
}

.survivor-elimination-plaque h2 {
  color: #100704 !important;
  font-size: clamp(1.08rem, 2.02vw, 2.38rem) !important;
  font-weight: 900 !important;
  letter-spacing: .07em !important;
}

.survivor-elimination-plaque-lines {
  color: #150905 !important;
  font-size: clamp(.54rem, .96vw, 1.02rem) !important;
  font-weight: 900 !important;
  letter-spacing: .065em !important;
}

.survivor-elimination-bottom-line {
  bottom: clamp(72px, 7.6vh, 118px) !important;
  z-index: 4 !important;
}

.survivor-elimination-btn {
  left: 50% !important;
  bottom: clamp(12px, 1.6vh, 26px) !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  z-index: 5 !important;
}

.survivor-elimination-btn:hover,
.survivor-elimination-btn:focus {
  transform: translateX(-50%) !important;
}

@media (max-width: 760px) {
  .survivor-elimination-plaque {
    bottom: clamp(48px, 6vh, 86px) !important;
  }

  .survivor-elimination-bottom-line {
    bottom: clamp(74px, 8.4vh, 120px) !important;
  }
}

.last-words-mark select option:disabled {
  color: rgba(169,150,153,.48) !important;
}


/* ================= V1.2.6 GAMEPLAY POLISH ================= */

.game-room-code-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 10px auto 14px;
  padding: 10px 12px;
  border: 1px solid rgba(214,168,79,.34);
  border-radius: 14px;
  background: rgba(0,0,0,.32);
  box-shadow: inset 0 0 18px rgba(214,168,79,.05);
  text-align: center;
}

.game-room-code-label,
.game-room-code-hint {
  color: #a99699;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.game-room-code-badge strong {
  color: #d6a84f;
  font-size: clamp(1rem, 2.8vw, 1.45rem);
  letter-spacing: .18em;
}

.vote-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000003;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0,0,0,.78);
}

.vote-confirm-overlay.hidden {
  display: none !important;
}

.vote-confirm-card {
  width: min(520px, 92vw);
  padding: 24px;
  border: 1px solid rgba(214,168,79,.45);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30,15,20,.98), rgba(0,0,0,.98));
  box-shadow: 0 0 44px rgba(0,0,0,.82), inset 0 0 20px rgba(214,168,79,.08);
  text-align: center;
}

.vote-confirm-card h2 {
  margin: 0 0 12px;
  color: #d6a84f;
  letter-spacing: .12em;
}

.vote-confirm-card p {
  font-size: 1.08rem;
  line-height: 1.4;
}

.vote-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.vote-confirm-actions button {
  margin-top: 0;
}

/* Doctor Graven jump-scare: pulled back further so the full face reads on desktop. */
.doctor-death-jumpscare-image {
  width: min(100vw, 1180px) !important;
  height: min(100vh, 860px) !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #000 !important;
}

@media (max-width: 720px) {
  .doctor-death-jumpscare-image {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain !important;
  }
}

@keyframes doctorDeathJumpscarePulse {
  0% { transform: scale(.96); filter: brightness(.74) contrast(1.10); }
  12% { transform: scale(.94); filter: brightness(1.12) contrast(1.20); }
  82% { transform: scale(.955); filter: brightness(.96) contrast(1.12); }
  100% { transform: scale(.965); filter: brightness(.40) contrast(1.06); }
}


/* ================= V1.2.7 CINEMATIC + LAST WORDS REFINEMENT ================= */

/* Doctor Graven jump scare now stays long enough to read the face details. */
.doctor-death-jumpscare-image {
  animation-duration: 5s !important;
}

/* Survivor screen: remove the bottom slogan entirely. */
.survivor-elimination-bottom-line {
  display: none !important;
}

/* Survivor plaque: lower the text onto the plaque and make it feel engraved/readable. */
.survivor-elimination-plaque {
  bottom: clamp(22px, 3.4vh, 64px) !important;
  width: min(48vw, 640px) !important;
  min-height: clamp(82px, 10.6vw, 146px) !important;
  color: #080302 !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  text-shadow:
    0 1px 0 rgba(255, 226, 154, .28),
    0 -1px 0 rgba(0, 0, 0, .76),
    1px 0 0 rgba(0, 0, 0, .42),
    -1px 0 0 rgba(255, 211, 126, .10) !important;
}

.survivor-elimination-plaque h2 {
  color: #070201 !important;
  font-weight: 950 !important;
  font-size: clamp(1.18rem, 2.18vw, 2.58rem) !important;
  letter-spacing: .065em !important;
}

.survivor-elimination-plaque-lines {
  color: #070201 !important;
  font-weight: 950 !important;
  font-size: clamp(.60rem, 1.04vw, 1.12rem) !important;
  letter-spacing: .055em !important;
}

/* Survivor screen: place the return button in the chair area, not over bottom text. */
.survivor-elimination-btn {
  left: 50% !important;
  bottom: clamp(135px, 20vh, 250px) !important;
  width: min(250px, 54vw) !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
}

.survivor-elimination-btn:hover,
.survivor-elimination-btn:focus {
  transform: translateX(-50%) !important;
}

@media (max-width: 760px) {
  .survivor-elimination-plaque {
    bottom: clamp(26px, 4vh, 62px) !important;
    width: min(76vw, 570px) !important;
  }

  .survivor-elimination-btn {
    bottom: clamp(122px, 18vh, 210px) !important;
    width: min(240px, 62vw) !important;
  }
}


/* ================= V1.2.8 PLAQUE + LAST WORDS FINAL POLISH ================= */

/* The JS-injected cinematic styles are now updated too, but these stay here as a final safety override. */
.survivor-elimination-bottom-line {
  display: none !important;
}

.survivor-elimination-plaque {
  bottom: clamp(-12px, -1.1vh, 6px) !important;
  width: min(50vw, 660px) !important;
  min-height: clamp(92px, 11.4vw, 158px) !important;
  color: #050101 !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  text-shadow:
    0 1px 0 rgba(255, 225, 142, .38),
    0 -1px 0 rgba(0, 0, 0, .92),
    1px 0 0 rgba(0, 0, 0, .58),
    -1px 0 0 rgba(0, 0, 0, .28) !important;
}

.survivor-elimination-plaque h2 {
  color: #040101 !important;
  font-weight: 950 !important;
  font-size: clamp(1.22rem, 2.22vw, 2.64rem) !important;
  letter-spacing: .065em !important;
}

.survivor-elimination-plaque-lines {
  color: #040101 !important;
  font-weight: 950 !important;
  font-size: clamp(.64rem, 1.10vw, 1.18rem) !important;
  letter-spacing: .055em !important;
}

.survivor-elimination-btn {
  left: 50% !important;
  bottom: clamp(145px, 22vh, 270px) !important;
  width: min(250px, 54vw) !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
}

.survivor-elimination-btn:hover,
.survivor-elimination-btn:focus {
  transform: translateX(-50%) !important;
}

.last-words-broadcast-card p {
  text-align: left !important;
  max-height: min(48vh, 420px) !important;
  overflow-y: auto !important;
}

@media (max-width: 760px) {
  .survivor-elimination-plaque {
    bottom: clamp(-10px, -1vh, 4px) !important;
    width: min(78vw, 600px) !important;
  }

  .survivor-elimination-btn {
    bottom: clamp(124px, 19vh, 220px) !important;
  }
}


/* ================= RAVEN CIPHER / LOCK VISUALS V1 ================= */
.raven-special-challenge-panel {
  margin-top: 16px;
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid rgba(214,168,79,.42);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), transparent 38%),
    linear-gradient(180deg, rgba(22, 12, 18, .92), rgba(2, 2, 4, .94));
  box-shadow:
    0 0 34px rgba(0,0,0,.45),
    inset 0 0 28px rgba(214,168,79,.06);
  text-align: left;
}

.raven-special-challenge-panel h4 {
  margin: 0 0 10px;
  color: #d6a84f;
  text-align: center;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.raven-special-subtitle {
  text-align: center;
  color: #efe8df;
  line-height: 1.45;
  margin: 6px 0 12px;
}

.raven-special-standings,
.raven-special-submitted,
.raven-cipher-question,
.raven-lock-question {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.34);
}

.raven-special-standing-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px;
  margin-top: 7px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.25);
}

/* Raven's Path shows competitors who are still in the air, so a player who
   strikes out early does not mistake an unfinished standings list for a
   frozen game. */
.raven-path-still-flying-row {
  opacity: 0.78;
}

.raven-path-still-flying-row strong {
  color: #9fcbe5;
  font-style: italic;
}

.raven-special-top-row {
  border-color: rgba(214,168,79,.5);
  background: rgba(214,168,79,.08);
}

.raven-cipher-scrambled {
  padding: 16px 12px;
  border: 1px solid rgba(214,168,79,.32);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(214,168,79,.09), rgba(0,0,0,.36));
  color: #d6a84f;
  text-align: center;
  font-size: clamp(1.25rem, 4vw, 2.2rem);
  letter-spacing: .16em;
  line-height: 1.25;
  text-transform: uppercase;
}

.raven-cipher-answer {
  margin-top: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.raven-cipher-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.raven-cipher-actions > button {
  width: 100%;
  margin: 0;
}

@media (max-width: 620px) {
  .raven-cipher-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.raven-lock-question h5 {
  margin: 0 0 10px;
  color: #d6a84f;
  text-align: center;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.raven-lock-setup {
  padding: 12px;
  border-radius: 12px;
  background: rgba(214,168,79,.06);
  border: 1px solid rgba(214,168,79,.18);
  color: #efe8df;
  text-align: center;
  line-height: 1.55;
  font-weight: bold;
}

.raven-lock-clues {
  margin: 12px 0;
  padding-left: 22px;
  line-height: 1.45;
  color: #d7cfc8;
}

.raven-lock-choices {
  display: grid;
  gap: 8px;
}

.raven-lock-choice-row,
.raven-quiz-choice-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.raven-lock-choice-row {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  background: rgba(0,0,0,.28);
  color: #efe8df;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.raven-lock-choice-row:hover {
  border-color: rgba(214,168,79,.42);
  background: rgba(214,168,79,.08);
}

.raven-lock-choice-row input {
  width: auto;
  margin: 0;
}

/* ================= FINAL JUDGMENT LAPTOP FIT FIX V1 ================= */
.final-judgment-overlay,
.final-reveal-cinematic-overlay,
.final-money-celebration-overlay {
  align-items: flex-start !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 16px 12px 28px !important;
  box-sizing: border-box !important;
}

.final-judgment-card,
.final-reveal-cinematic-card,
.final-money-celebration-card {
  width: min(94vw, 680px) !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 8px auto 28px !important;
  padding: clamp(18px, 2.5vw, 26px) clamp(16px, 2.5vw, 24px) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.final-judgment-card .secret-raven-image,
.final-reveal-cinematic-card .secret-raven-image,
.final-money-celebration-card .final-money-raven {
  display: block !important;
  max-width: clamp(70px, 10vw, 118px) !important;
  max-height: clamp(70px, 10vw, 118px) !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 auto 10px !important;
}

.final-judgment-card h2,
.final-reveal-cinematic-card h2,
.final-money-celebration-card h2 {
  font-size: clamp(1.7rem, 5vw, 3.5rem) !important;
  margin: 8px 0 !important;
  line-height: 1.05 !important;
}

.final-reveal-cinematic-card h3 {
  font-size: clamp(1.25rem, 4vw, 2.8rem) !important;
  margin: 8px 0 !important;
  line-height: 1.1 !important;
}

.final-reveal-cinematic-role {
  font-size: clamp(1.7rem, 6vw, 3.8rem) !important;
  margin: 8px 0 !important;
  line-height: 1.05 !important;
}

.final-judgment-body,
.final-reveal-cinematic-subtext,
.final-money-subtitle,
.final-money-raven-line {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

.final-judgment-card button,
.final-reveal-cinematic-card button,
.final-money-celebration-card button {
  display: block !important;
  width: 100% !important;
  max-width: 360px !important;
  min-height: 46px !important;
  margin: 14px auto 0 !important;
}


/* ================= RAVEN CIPHER / LOCK BUGFIX + LOCK-IN POLISH V1 ================= */
.raven-lock-instructions {
  display: grid;
  gap: 6px;
  margin: 14px auto;
  padding: 13px 14px;
  border: 1px solid rgba(214,168,79,.32);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(214,168,79,.10), rgba(0,0,0,.25));
  color: #efe8df;
  line-height: 1.35;
  text-align: left;
}

.raven-lock-instructions strong {
  color: #d6a84f;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.raven-question-number {
  color: #a99699;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .76rem;
  margin-bottom: 8px;
}

.raven-lock-status {
  margin: 12px 0;
  padding: 11px 13px;
  border: 1px solid rgba(214,168,79,.34);
  border-radius: 999px;
  background: rgba(0,0,0,.30);
  color: #d6a84f;
  text-align: center;
  font-weight: bold;
  letter-spacing: .06em;
}

.raven-lock-lock-btn {
  margin-top: 12px;
  background: linear-gradient(180deg, #b7842f, #70420d);
  color: #120b05;
  border: 1px solid rgba(255,226,150,.48);
  font-weight: 900;
}

.raven-lock-lock-btn.locked,
.raven-lock-lock-btn:disabled {
  background: linear-gradient(180deg, #2f4935, #16251b);
  color: #d8f0dd;
  cursor: default;
  opacity: .95;
}

.raven-lock-question-locked {
  border-color: rgba(97, 188, 112, .35);
  box-shadow: inset 0 0 16px rgba(97, 188, 112, .06);
}

.raven-lock-choice-locked {
  border-color: rgba(97,188,112,.46) !important;
  background: rgba(97,188,112,.10) !important;
}


/* ================= FIREPANTS: COOL HIM DOWN ================= */
.firepants-cooldown-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000001;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 42%, rgba(185, 48, 20, .22), rgba(0,0,0,.88) 58%, #000 100%),
    rgba(0,0,0,.92);
  overflow: hidden;
}

.firepants-cooldown-overlay.hidden { display: none !important; }

.firepants-cooldown-card {
  width: min(1080px, 96vw);
  max-height: min(920px, 94vh);
  overflow: hidden;
  border: 1px solid rgba(255, 180, 74, .42);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(34, 10, 8, .98), rgba(6, 3, 5, .98));
  box-shadow:
    0 0 70px rgba(0,0,0,.88),
    0 0 44px rgba(210, 63, 21, .22),
    inset 0 0 30px rgba(255, 170, 54, .08);
  color: #f5e9dd;
  position: relative;
}

.firepants-ready-layout {
  display: grid;
  grid-template-columns: minmax(180px, 340px) 1fr;
  gap: 22px;
  align-items: center;
  padding: 26px;
}

.firepants-kicker {
  color: #ffb85f;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: .78rem;
  margin: 0 0 8px;
}

.firepants-cooldown-card h2 {
  margin: 0 0 10px;
  color: #ffd28a;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 86, 36, .28);
}

.firepants-subtitle {
  font-size: 1.05rem;
  color: #f4d7b8;
}

.firepants-character {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  filter: drop-shadow(0 20px 34px rgba(0,0,0,.7)) drop-shadow(0 0 20px rgba(255, 76, 22, .22));
}

.firepants-rules-box {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(255, 184, 95, .22);
  border-radius: 16px;
  background: rgba(0,0,0,.3);
  text-align: left;
}

.firepants-game-card {
  height: min(860px, 94vh);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.firepants-game-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 184, 95, .18);
  background: rgba(0,0,0,.28);
}

.firepants-game-topbar h2 { font-size: clamp(1rem, 2.1vw, 1.55rem); }

.firepants-timer {
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 184, 95, .3);
  background: rgba(0,0,0,.38);
  color: #ffd28a;
  font-size: 1.25rem;
  font-weight: bold;
  text-align: center;
}

.firepants-arena {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background:
    radial-gradient(circle at 50% 85%, rgba(255, 70, 22, .22), transparent 36%),
    linear-gradient(180deg, rgba(18,7,8,.5), rgba(0,0,0,.72));
}

.firepants-character-wrap {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: min(250px, 32vw);
  transform: translateX(-50%);
  pointer-events: none;
  opacity: .88;
}

.firepants-character.in-game {
  max-height: 330px;
}

.firepants-pants-flames {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  font-size: clamp(1.5rem, 4vw, 3.2rem);
  animation: firepantsFlamePulse .38s infinite alternate;
  filter: drop-shadow(0 0 15px rgba(255, 66, 18, .8));
}

@keyframes firepantsFlamePulse {
  from { transform: translateX(-50%) scale(.95) rotate(-2deg); opacity: .82; }
  to { transform: translateX(-50%) scale(1.08) rotate(2deg); opacity: 1; }
}

.firepants-speech {
  position: absolute;
  left: 18px;
  top: 16px;
  max-width: min(430px, 68vw);
  padding: 12px 14px;
  border: 1px solid rgba(255, 216, 142, .34);
  border-radius: 18px 18px 18px 4px;
  background: rgba(255, 239, 204, .92);
  color: #2a1007;
  font-weight: 900;
  letter-spacing: .035em;
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}

.firepants-falling-item {
  position: absolute;
  width: auto;
  min-width: 86px;
  max-width: 150px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .055em;
  z-index: 4;
  transform: translateX(-50%);
  box-shadow: 0 10px 18px rgba(0,0,0,.42);
  user-select: none;
  touch-action: manipulation;
}

.firepants-falling-item .firepants-item-icon { font-size: 1.55rem; line-height: 1; }
.firepants-falling-item.cool {
  background: linear-gradient(180deg, rgba(225, 250, 255, .96), rgba(82, 169, 210, .96));
  color: #061724;
}
.firepants-falling-item.hot {
  background: linear-gradient(180deg, rgba(255, 189, 89, .98), rgba(176, 33, 22, .98));
  color: #fff5e6;
}

.firepants-heat-wrap {
  padding: 12px 18px 6px;
  background: rgba(0,0,0,.34);
}
.firepants-heat-label,
.firepants-heat-legend {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #ffd28a;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.firepants-heat-bar {
  height: 24px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(40,95,135,.8), rgba(50,50,50,.72));
  margin: 7px 0;
}
.firepants-heat-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd15f, #ff641f, #b60017);
  box-shadow: 0 0 18px rgba(255, 72, 19, .55);
  transition: width .14s linear;
}
.firepants-item-guide {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px 14px;
  color: #e8d8c8;
  font-size: .82rem;
  background: rgba(0,0,0,.34);
}
.firepants-item-guide .cool { color: #9edfff; }
.firepants-item-guide .hot { color: #ffaf73; }
.firepants-final-card {
  width: min(720px, 94vw);
  padding: 34px 24px;
  text-align: center;
}
.firepants-final-card.exploded {
  animation: firepantsScreenBoom .5s ease-in-out 2;
}
.firepants-fx-burst {
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 1;
  margin-bottom: 12px;
}
.firepants-quote {
  color: #ffd28a;
  font-size: 1.15rem;
  font-style: italic;
}
@keyframes firepantsScreenBoom {
  0%, 100% { transform: translate(0,0) rotate(0deg); filter: brightness(1); }
  25% { transform: translate(-8px, 5px) rotate(-.5deg); filter: brightness(1.35); }
  50% { transform: translate(7px, -5px) rotate(.5deg); filter: brightness(.8); }
  75% { transform: translate(-5px, -4px) rotate(-.35deg); filter: brightness(1.15); }
}
@media (max-width: 760px) {
  .firepants-ready-layout { grid-template-columns: 1fr; padding: 18px; }
  .firepants-character { max-height: 250px; }
  .firepants-game-card { height: 94vh; }
  .firepants-arena { min-height: 380px; }
  .firepants-character-wrap { width: min(210px, 48vw); }
  .firepants-game-topbar { align-items: flex-start; }
  .firepants-speech { max-width: 78vw; font-size: .78rem; }
  .firepants-falling-item { min-width: 78px; font-size: .68rem; padding: 8px 9px; }
  .firepants-item-guide { flex-direction: column; text-align: center; }
}



/* ================= FIREPANTS: COOL HIM DOWN V1.3 PREMIUM POLISH ================= */

.firepants-cooldown-overlay {
  --firepants-orange: #ff7a18;
  --firepants-red: #b20f1a;
  --firepants-gold: #d6a84f;
  --firepants-heat-glow: rgba(255, 82, 0, .65);
}

.firepants-cooldown-card.firepants-game-card {
  width: min(1180px, 96vw);
  min-height: min(760px, 94vh);
  padding: clamp(14px, 2vw, 24px);
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 85, 0, .18), transparent 30%),
    radial-gradient(circle at 18% 82%, rgba(214, 168, 79, .10), transparent 34%),
    linear-gradient(180deg, rgba(30, 10, 10, .98), rgba(5, 4, 7, .985));
  border: 1px solid rgba(255, 156, 41, .42);
  box-shadow:
    0 0 70px rgba(255, 68, 0, .22),
    0 0 110px rgba(0, 0, 0, .88),
    inset 0 0 46px rgba(255, 122, 24, .08);
  overflow: hidden;
}

.firepants-game-card::before,
.firepants-game-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
}

.firepants-game-card::before {
  background:
    radial-gradient(circle at 22% 92%, rgba(255, 102, 0, .18), transparent 22%),
    radial-gradient(circle at 82% 96%, rgba(255, 40, 0, .16), transparent 24%);
  mix-blend-mode: screen;
}

.firepants-game-card::after {
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.018) 15px 16px),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.28) 100%);
  opacity: .65;
}

.firepants-game-topbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px 14px;
  border: 1px solid rgba(214,168,79,.28);
  border-radius: 18px;
  background: rgba(0,0,0,.34);
}

.firepants-game-topbar h2 {
  margin: 3px 0 0;
  color: #fff4df;
  font-size: clamp(1rem, 2vw, 1.55rem);
  letter-spacing: .08em;
  text-shadow: 0 0 12px rgba(255,92,0,.45);
}

.firepants-timer {
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 170, 67, .38);
  background: radial-gradient(circle at center, rgba(255, 115, 0, .16), rgba(0,0,0,.5));
  color: #ffe3a6;
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  font-weight: 900;
  letter-spacing: .08em;
  text-shadow: 0 0 14px rgba(255, 90, 0, .55);
}

.firepants-arena {
  position: relative;
  z-index: 3;
  height: clamp(430px, 62vh, 620px);
  margin: 14px 0 10px;
  border: 1px solid rgba(255, 146, 35, .36);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 82%, rgba(255, 77, 0, .22), transparent 24%),
    radial-gradient(circle at 50% 55%, rgba(214, 168, 79, .07), transparent 38%),
    linear-gradient(180deg, rgba(0,0,0,.24), rgba(0,0,0,.72));
  box-shadow:
    inset 0 0 46px rgba(0,0,0,.75),
    inset 0 -28px 60px rgba(255,75,0,.12);
}

.firepants-character-wrap {
  --firepants-heat: .88;
  position: absolute;
  left: 50%;
  bottom: -2%;
  width: min(360px, 44vw);
  height: min(560px, 70vh);
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  transition: filter .2s ease, transform .2s ease;
}

.firepants-character.in-game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter:
    drop-shadow(0 0 calc(20px + 24px * var(--firepants-heat)) rgba(255, 90, 0, calc(.24 + .52 * var(--firepants-heat))))
    drop-shadow(0 14px 28px rgba(0,0,0,.72));
}

.firepants-aura {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 5%;
  height: 48%;
  border-radius: 42% 42% 16% 16%;
  background:
    radial-gradient(ellipse at 50% 85%, rgba(255, 235, 160, calc(.04 + .22 * var(--firepants-heat))), transparent 26%),
    radial-gradient(ellipse at 50% 62%, rgba(255, 90, 0, calc(.18 + .42 * var(--firepants-heat))), transparent 58%);
  filter: blur(18px);
  opacity: calc(.36 + .64 * var(--firepants-heat));
  animation: firepantsAuraPulse 1.15s ease-in-out infinite alternate;
}

.firepants-pants-flames {
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: 6%;
  height: 45%;
  display: grid;
  place-items: end center;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  letter-spacing: -.2em;
  opacity: calc(.20 + .80 * var(--firepants-heat));
  filter:
    blur(calc(1px - .6px * var(--firepants-heat)))
    drop-shadow(0 0 calc(16px + 34px * var(--firepants-heat)) rgba(255, 87, 0, .92));
  transform: scale(calc(.68 + .50 * var(--firepants-heat)));
  transform-origin: bottom center;
  animation: firepantsFlameDance .42s infinite alternate;
}

.firepants-ember-cloud {
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 38%;
  background:
    radial-gradient(circle at 24% 72%, rgba(255, 180, 58, calc(.12 + .42 * var(--firepants-heat))), transparent 7%),
    radial-gradient(circle at 68% 58%, rgba(255, 74, 0, calc(.12 + .45 * var(--firepants-heat))), transparent 8%),
    radial-gradient(circle at 50% 86%, rgba(255, 208, 84, calc(.13 + .38 * var(--firepants-heat))), transparent 10%);
  filter: blur(9px);
  opacity: calc(.18 + .64 * var(--firepants-heat));
}

.firepants-character-wrap[data-heat-state="critical"] {
  animation: firepantsCriticalShake .14s linear infinite;
}

.firepants-character-wrap[data-heat-state="cool"] .firepants-pants-flames {
  opacity: .14;
  filter: blur(2px) drop-shadow(0 0 8px rgba(255, 115, 0, .25));
}

.firepants-speech {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 50%;
  max-width: min(640px, 82vw);
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 1px solid rgba(255, 220, 139, .55);
  border-radius: 18px 18px 18px 4px;
  background:
    linear-gradient(180deg, rgba(255, 238, 190, .98), rgba(236, 194, 112, .96));
  color: #190704;
  box-shadow:
    0 8px 28px rgba(0,0,0,.55),
    0 0 24px rgba(255, 125, 0, .20);
  font-weight: 950;
  letter-spacing: .035em;
  text-align: center;
  line-height: 1.18;
}

.firepants-status-pill {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 18px;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 122, .42);
  background: rgba(0,0,0,.55);
  color: #ffdf9b;
  font-weight: 900;
  letter-spacing: .12em;
  text-shadow: 0 0 10px rgba(255,70,0,.55);
}

.firepants-falling-item {
  z-index: 10;
  min-width: 92px;
  min-height: 76px;
  padding: 8px 12px;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,.16);
  background: rgba(7, 5, 8, .90);
  box-shadow:
    0 10px 26px rgba(0,0,0,.55),
    inset 0 0 16px rgba(255,255,255,.05);
  transform: translateX(-50%);
  transition: transform .08s ease, filter .08s ease;
}

.firepants-falling-item:hover,
.firepants-falling-item:focus {
  transform: translateX(-50%) scale(1.08);
}

.firepants-falling-item .firepants-item-icon {
  display: block;
  font-size: clamp(2.3rem, 5vw, 4.25rem);
  line-height: 1;
  margin-bottom: 3px;
}

.firepants-falling-item .firepants-item-label {
  display: block;
  color: #fff4df;
  font-size: clamp(.62rem, 1.15vw, .9rem);
  font-weight: 950;
  letter-spacing: .06em;
  text-shadow: 0 2px 6px #000;
}

.firepants-falling-item.cool {
  border-color: rgba(125, 210, 255, .75);
  background: radial-gradient(circle at top, rgba(126, 221, 255, .26), rgba(4, 13, 25, .92));
  box-shadow: 0 0 26px rgba(96, 206, 255, .26), 0 10px 28px rgba(0,0,0,.55);
}

.firepants-falling-item.hot,
.firepants-falling-item.danger,
.firepants-falling-item.character_danger {
  border-color: rgba(255, 98, 41, .82);
  background: radial-gradient(circle at top, rgba(255, 96, 26, .28), rgba(24, 4, 4, .94));
  box-shadow: 0 0 28px rgba(255, 58, 0, .32), 0 10px 28px rgba(0,0,0,.55);
}

.firepants-falling-item.power,
.firepants-falling-item.character {
  min-width: 126px;
  border-color: rgba(214, 168, 79, .95);
  background:
    radial-gradient(circle at top, rgba(214,168,79,.28), rgba(20, 13, 4, .94));
  box-shadow:
    0 0 34px rgba(214,168,79,.36),
    0 10px 28px rgba(0,0,0,.58);
  animation: firepantsSpecialPulse .8s ease-in-out infinite alternate;
}

.firepants-falling-item.legendary,
.firepants-falling-item.power,
.firepants-falling-item.character {
  transform: translateX(-50%) scale(1.05);
}

.firepants-falling-item.accused {
  outline: 4px solid rgba(255, 255, 255, .86);
  box-shadow:
    0 0 0 6px rgba(255, 0, 0, .42),
    0 0 38px rgba(255, 40, 0, .58);
}

.firepants-floating-text {
  position: absolute;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(0,0,0,.72);
  color: #fff2d5;
  font-weight: 950;
  letter-spacing: .08em;
  text-shadow: 0 2px 8px #000;
  pointer-events: none;
  animation: firepantsFloatUp 1.2s ease-out forwards;
}

.firepants-floating-text.cool {
  color: #c9f4ff;
  border-color: rgba(112, 223, 255, .7);
}

.firepants-floating-text.power {
  color: #ffe199;
  border-color: rgba(214,168,79,.72);
}

.firepants-floating-text.danger {
  color: #ffb0a0;
  border-color: rgba(255, 74, 22, .72);
}

.firepants-heat-fill {
  transition: width .18s ease;
}

.firepants-critical .firepants-game-card {
  animation: firepantsScreenPanic .12s linear infinite;
}

.firepants-cooling .firepants-game-card {
  box-shadow:
    0 0 70px rgba(60, 194, 255, .20),
    0 0 110px rgba(0, 0, 0, .88),
    inset 0 0 46px rgba(126, 222, 255, .08);
}

@keyframes firepantsAuraPulse {
  from { transform: scale(.95); opacity: .55; }
  to { transform: scale(1.06); opacity: .95; }
}

@keyframes firepantsFlameDance {
  from { transform: scale(calc(.68 + .45 * var(--firepants-heat))) rotate(-2deg); }
  to { transform: scale(calc(.72 + .52 * var(--firepants-heat))) rotate(2deg); }
}

@keyframes firepantsCriticalShake {
  0%, 100% { transform: translateX(-50%) translate(0,0); }
  25% { transform: translateX(-50%) translate(2px,-1px); }
  50% { transform: translateX(-50%) translate(-2px,1px); }
  75% { transform: translateX(-50%) translate(1px,1px); }
}

@keyframes firepantsSpecialPulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.18); }
}

@keyframes firepantsFloatUp {
  0% { opacity: 0; transform: translateY(12px) scale(.96); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-48px) scale(1.04); }
}

@keyframes firepantsScreenPanic {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(1px,-1px); }
}

@media (max-width: 760px) {
  .firepants-cooldown-card.firepants-game-card {
    min-height: 94vh;
    padding: 12px;
  }

  .firepants-game-topbar {
    align-items: center;
  }

  .firepants-game-topbar h2 {
    font-size: .86rem;
  }

  .firepants-arena {
    height: 58vh;
  }

  .firepants-character-wrap {
    width: min(310px, 72vw);
    height: 58vh;
    bottom: -1%;
  }

  .firepants-speech {
    top: 10px;
    padding: 9px 12px;
    font-size: .82rem;
  }

  .firepants-falling-item {
    min-width: 78px;
    min-height: 66px;
    padding: 7px 9px;
  }

  .firepants-falling-item .firepants-item-icon {
    font-size: clamp(2.2rem, 10vw, 3.55rem);
  }

  .firepants-item-guide {
    font-size: .68rem;
  }
}


/* ================= FIREPANTS V1.2.16 LAYOUT / VOICE POLISH ================= */

.firepants-choose-different-btn {
  margin-top: 10px;
  background:
    linear-gradient(180deg, rgba(55, 32, 43, .98), rgba(22, 12, 18, .98));
  border: 1px solid rgba(214, 168, 79, .32);
}

.firepants-choose-different-btn:hover {
  filter: brightness(1.08);
}

.firepants-character-wrap {
  bottom: -14% !important;
  width: min(432px, 52vw) !important;
  height: min(660px, 82vh) !important;
}

.firepants-character.in-game {
  object-position: center bottom !important;
}

.firepants-pants-flames {
  bottom: 10% !important;
}

.firepants-ember-cloud {
  bottom: 5% !important;
}

.firepants-speech {
  z-index: 9 !important;
  top: 16px !important;
  max-width: min(560px, 76vw) !important;
  opacity: .96;
}

.firepants-voice-echo {
  position: absolute;
  z-index: 4;
  max-width: min(540px, 70vw);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 210, 124, .34);
  background:
    linear-gradient(180deg, rgba(255, 224, 145, .28), rgba(255, 89, 16, .10));
  color: rgba(255, 229, 174, .84);
  font-weight: 950;
  font-size: clamp(.72rem, 1.15vw, 1.05rem);
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 2px 10px rgba(0,0,0,.88),
    0 0 16px rgba(255, 105, 20, .42);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.62);
  filter: blur(.15px);
  animation: firepantsVoiceToUser 1.85s ease-out forwards;
}

@keyframes firepantsVoiceToUser {
  0% {
    opacity: 0;
    transform: translate(-50%, -10%) scale(.48);
    filter: blur(1.6px);
  }
  15% {
    opacity: .50;
    filter: blur(.45px);
  }
  50% {
    opacity: .24;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -165%) scale(1.85);
    filter: blur(2.2px);
  }
}

@media (max-width: 760px) {
  .firepants-character-wrap {
    bottom: -11% !important;
    width: min(300px, 64vw) !important;
    height: min(500px, 68vh) !important;
  }

  .firepants-speech {
    top: 10px !important;
    max-width: 82vw !important;
  }

  .firepants-voice-echo {
    max-width: 78vw;
    font-size: .70rem;
  }
}


/* ================= FIREPANTS V1.2.17 CENTERING / VOICE-ONLY POLISH ================= */

/* The old fixed speech bubble covered FirePants' face. Sayings now live as drifting voice echoes. */
.firepants-speech,
#firepantsSpeech {
  display: none !important;
}

/* Center FirePants as the star of the arena. The transparent cutout sits lower and larger. */
.firepants-character-wrap {
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: -22% !important;
  transform: translateX(-50%) !important;
  width: min(520px, 60vw) !important;
  height: min(790px, 92vh) !important;
  z-index: 5 !important;
}

.firepants-character-wrap::before {
  inset: 18% 8% 4% !important;
  opacity: .88 !important;
}

.firepants-character.in-game {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  filter:
    drop-shadow(0 24px 34px rgba(0,0,0,.72))
    drop-shadow(0 0 18px rgba(255, 82, 18, .28)) !important;
}

.firepants-pants-flames {
  left: 50% !important;
  bottom: 7% !important;
  width: 46% !important;
  height: 30% !important;
  transform: translateX(-50%) !important;
  z-index: 6 !important;
}

.firepants-ember-cloud {
  left: 50% !important;
  bottom: 1% !important;
  width: 58% !important;
  height: 34% !important;
  transform: translateX(-50%) !important;
  z-index: 4 !important;
}

/* Keep drops above the character enough to play, but voice never blocks clicks. */
.firepants-drop {
  z-index: 12 !important;
}

.firepants-voice-echo {
  z-index: 8 !important;
  max-width: min(680px, 76vw) !important;
  padding: 10px 18px !important;
  border: 1px solid rgba(255, 218, 141, .58) !important;
  background:
    linear-gradient(180deg, rgba(255, 230, 165, .46), rgba(255, 112, 28, .22)) !important;
  color: rgba(255, 238, 198, .96) !important;
  opacity: 0;
  font-size: clamp(.82rem, 1.32vw, 1.22rem) !important;
  box-shadow:
    0 0 18px rgba(255, 109, 28, .22),
    inset 0 0 14px rgba(255,255,255,.08) !important;
  text-shadow:
    0 2px 10px rgba(0,0,0,.94),
    0 0 12px rgba(255, 120, 32, .58),
    0 0 2px rgba(0,0,0,.95) !important;
  pointer-events: none !important;
  animation: firepantsVoiceToUserV2 1.95s ease-out forwards !important;
}

@keyframes firepantsVoiceToUserV2 {
  0% {
    opacity: 0;
    transform: translate(-50%, 8%) scale(.50);
    filter: blur(1.2px);
  }
  16% {
    opacity: .72;
    transform: translate(-50%, -20%) scale(.72);
    filter: blur(.25px);
  }
  48% {
    opacity: .52;
    transform: translate(-50%, -74%) scale(1.12);
    filter: blur(.15px);
  }
  78% {
    opacity: .24;
    transform: translate(-50%, -124%) scale(1.48);
    filter: blur(.85px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -184%) scale(1.92);
    filter: blur(2.1px);
  }
}

@media (max-width: 760px) {
  .firepants-character-wrap {
    bottom: -18% !important;
    width: min(390px, 78vw) !important;
    height: min(640px, 78vh) !important;
  }

  .firepants-voice-echo {
    max-width: 84vw !important;
    font-size: .78rem !important;
    padding: 8px 12px !important;
  }
}

@media (max-height: 720px) and (min-width: 761px) {
  .firepants-character-wrap {
    bottom: -28% !important;
    width: min(500px, 54vw) !important;
    height: min(700px, 96vh) !important;
  }
}


/* ================= FIREPANTS V1.2.18 GAMEPLAY FIXES ================= */

/* Face/top visibility fix: anchor the transparent cutout in the middle/lower arena instead of letting the top crop out. */
.firepants-character-wrap {
  left: 50% !important;
  right: auto !important;
  top: 56% !important;
  bottom: auto !important;
  transform: translate(-50%, -36%) !important;
  width: min(500px, 58vw) !important;
  height: min(620px, 78vh) !important;
  z-index: 5 !important;
}

.firepants-character.in-game {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.firepants-pants-flames {
  left: 50% !important;
  bottom: 8% !important;
  width: 44% !important;
  height: 29% !important;
  transform: translateX(-50%) !important;
}

.firepants-ember-cloud {
  left: 50% !important;
  bottom: 1% !important;
  width: 58% !important;
  height: 32% !important;
  transform: translateX(-50%) !important;
}

/* Make the game less about blue-vs-red reflex and more about reading the actual drop. */
.firepants-falling-item.cool,
.firepants-falling-item.hot,
.firepants-falling-item.danger,
.firepants-falling-item.character_danger {
  border-color: rgba(214, 168, 79, .58) !important;
  background:
    radial-gradient(circle at top, rgba(255, 221, 151, .16), rgba(19, 10, 12, .95)) !important;
  color: #fff1d2 !important;
  box-shadow:
    0 0 22px rgba(214, 168, 79, .18),
    0 10px 28px rgba(0,0,0,.62) !important;
}

.firepants-falling-item.cool .firepants-item-icon,
.firepants-falling-item.hot .firepants-item-icon,
.firepants-falling-item.danger .firepants-item-icon,
.firepants-falling-item.character_danger .firepants-item-icon {
  filter:
    drop-shadow(0 0 8px rgba(255, 169, 54, .28))
    drop-shadow(0 2px 4px rgba(0,0,0,.72));
}

/* Keep specials visually special, but still not a simple good/bad color code. */
.firepants-falling-item.power,
.firepants-falling-item.character {
  border-color: rgba(255, 218, 122, .90) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.30), rgba(20, 13, 4, .94)) !important;
}

.firepants-item-guide {
  color: rgba(239, 232, 223, .84) !important;
  font-size: .78rem !important;
}

.firepants-item-guide .cool,
.firepants-item-guide .hot {
  color: inherit !important;
}

/* Voice text stays readable but not click-blocking. */
.firepants-voice-echo {
  color: rgba(255, 240, 202, .98) !important;
  border-color: rgba(255, 226, 150, .68) !important;
  background:
    linear-gradient(180deg, rgba(255, 230, 165, .52), rgba(255, 112, 28, .26)) !important;
}

@media (max-width: 760px) {
  .firepants-character-wrap {
    top: 58% !important;
    transform: translate(-50%, -38%) !important;
    width: min(390px, 76vw) !important;
    height: min(520px, 72vh) !important;
  }
}

@media (max-height: 720px) and (min-width: 761px) {
  .firepants-character-wrap {
    top: 58% !important;
    transform: translate(-50%, -34%) !important;
    width: min(460px, 52vw) !important;
    height: min(540px, 74vh) !important;
  }
}


/* ================= RAVEN UI ASSET BADGES V1.2.19 ================= */

.player-row-with-assets {
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-identity {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
}

.player-identity.compact {
  gap: 3px;
}

.player-display-name,
.host-wing-player-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.host-wing-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
  color: #ffe1a0;
  font-weight: 950;
  letter-spacing: .035em;
  text-shadow:
    0 2px 8px rgba(0,0,0,.85),
    0 0 12px rgba(214,168,79,.24);
}

.host-wing-name.compact {
  gap: 3px;
  font-size: .82rem;
  line-height: 1.05;
}

.host-wing {
  width: 30px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
  filter:
    drop-shadow(0 0 7px rgba(214,168,79,.34))
    drop-shadow(0 2px 4px rgba(0,0,0,.68));
}

.host-wing-name.compact .host-wing {
  width: 19px;
  height: 15px;
}

.host-wing-player-name {
  min-width: 0;
}

.player-status-badges {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

.player-status-badges.compact {
  gap: 3px;
}

.player-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(214,168,79,.24);
  background: rgba(0,0,0,.32);
  color: #d6a84f;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.player-status-badges.compact .player-status-badge {
  min-height: 18px;
  padding: 2px 5px;
  font-size: .58rem;
}

.asset-status-badge img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
  filter:
    drop-shadow(0 0 7px rgba(214,168,79,.28))
    drop-shadow(0 2px 3px rgba(0,0,0,.62));
}

.player-status-badges.compact .asset-status-badge img {
  width: 15px;
  height: 15px;
}

.host-text-badge {
  color: #110905;
  background: linear-gradient(180deg, #f2ca74, #9e661e);
  border-color: rgba(255,232,166,.55);
}

.shield-status-badge {
  border-color: rgba(214,168,79,.38);
}

.dagger-status-badge {
  border-color: rgba(214,168,79,.38);
}

.soul-status-badge {
  color: #cfc7ff;
  border-color: rgba(180,170,255,.28);
}

.waiting-status-badge {
  color: #cfd6dd;
  border-color: rgba(210,218,225,.24);
}

.room-player-seat {
  overflow: visible;
}

.room-player-seat .player-identity.compact {
  width: 100%;
}

.room-player-seat .host-wing-player-name,
.room-player-seat .player-display-name {
  max-width: 92px;
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 650px) {
  .host-wing {
    width: 24px;
    height: 18px;
  }

  .host-wing-name.compact .host-wing {
    width: 16px;
    height: 13px;
  }

  .room-player-seat .host-wing-player-name,
  .room-player-seat .player-display-name {
    max-width: 78px;
  }

  .player-status-badges.compact .player-status-badge span {
    display: none;
  }
}


/* ================= RAVEN SHIELD CLEANUP V1.2.20 ================= */

.inline-raven-shield-icon,
.inline-raven-dagger-icon {
  display: inline-block;
  width: 1.22em;
  height: 1.22em;
  object-fit: contain;
  vertical-align: -0.22em;
  margin-right: .18em;
  filter:
    drop-shadow(0 0 6px rgba(214,168,79,.32))
    drop-shadow(0 1px 2px rgba(0,0,0,.65));
}

.challenge-result-box .inline-raven-shield-icon,
.voting-result-box .inline-raven-shield-icon,
.raven-feed-item .inline-raven-shield-icon {
  width: 1.35em;
  height: 1.35em;
}

/* Hide any legacy emoji-style shield markers that might remain as decorative spans/classes. */
.legacy-shield-icon,
.shield-emoji,
.old-shield-icon {
  display: none !important;
}


/* ================= RAVEN SHIELD AWARD REVEAL V1.2.21 ================= */

.shield-awarded-icon-wrap {
  position: relative;
  width: min(230px, 52vw);
  height: min(230px, 52vw);
  margin: 10px auto 16px !important;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.shield-awarded-glow-ring {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 224, 144, .52) 0%, rgba(214,168,79,.18) 34%, rgba(157,23,35,.08) 56%, transparent 72%);
  box-shadow:
    0 0 34px rgba(214,168,79,.38),
    0 0 80px rgba(157,23,35,.20);
  animation: ravenShieldRevealGlow 2.45s ease-in-out infinite;
  z-index: 0;
}

.shield-awarded-icon-image {
  position: relative;
  z-index: 1;
  width: min(210px, 46vw) !important;
  height: min(210px, 46vw) !important;
  object-fit: contain;
  animation: ravenShieldRevealFloat 2.65s ease-in-out infinite;
  filter:
    drop-shadow(0 0 18px rgba(214,168,79,.78))
    drop-shadow(0 0 34px rgba(214,168,79,.42))
    drop-shadow(0 18px 20px rgba(0,0,0,.65)) !important;
}

.shield-awarded-card h2 {
  margin-top: 8px !important;
}

.challenge-result-shield-icon {
  width: 1.75em !important;
  height: 1.75em !important;
  vertical-align: -0.42em !important;
}

@keyframes ravenShieldRevealFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.035);
  }
}

@keyframes ravenShieldRevealGlow {
  0%, 100% {
    opacity: .72;
    transform: scale(.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@media (max-width: 650px) {
  .shield-awarded-icon-wrap {
    width: min(190px, 54vw);
    height: min(190px, 54vw);
  }

  .shield-awarded-icon-image {
    width: min(170px, 48vw) !important;
    height: min(170px, 48vw) !important;
  }
}




/* ================= V1.2.24: THE TABLE OF TRUTH ================= */

/* Survivor death image phone-safe placement. */
@media (max-width: 760px), (max-height: 760px) {
  .survivor-elimination-plaque {
    bottom: clamp(58px, 10vh, 118px) !important;
    width: min(84vw, 620px) !important;
    min-height: clamp(78px, 11vh, 124px) !important;
    padding: clamp(8px, 1.4vh, 14px) clamp(14px, 4vw, 24px) !important;
  }

  .survivor-elimination-plaque h2 {
    font-size: clamp(1.02rem, 5.2vw, 1.72rem) !important;
  }

  .survivor-elimination-plaque-lines {
    font-size: clamp(.58rem, 3vw, .94rem) !important;
  }

  .survivor-elimination-btn {
    bottom: clamp(190px, 27vh, 285px) !important;
  }
}

/* FirePants field-test readability/return hotfix. */
.firepants-return-btn {
  margin-top: 14px !important;
  width: min(280px, 82vw) !important;
}

.firepants-item-guide span:nth-child(2),
.firepants-item-guide span:nth-child(3) {
  color: #d7cfc8;
}

/* Afterlife entry panel. */
.deceivers-truth-afterlife-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(214, 168, 79, .30);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(214, 168, 79, .10), transparent 56%),
    rgba(0,0,0,.34);
  text-align: center;
  box-shadow:
    0 0 26px rgba(0,0,0,.42),
    inset 0 0 18px rgba(214,168,79,.05);
}

.deceivers-truth-afterlife-panel h3 {
  margin: 0 0 8px;
  color: #d6a84f;
  letter-spacing: .14em;
}

.deceivers-truth-afterlife-actions {
  margin-top: 12px;
}

.deceivers-truth-death-btn {
  margin-top: 10px !important;
}

/* Full-screen overlay. */
.deceivers-truth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000004;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at center, rgba(214,168,79,.12), rgba(0,0,0,.94) 62%),
    rgba(0,0,0,.96);
  box-sizing: border-box;
}

.deceivers-truth-overlay.hidden {
  display: none !important;
}

.deceivers-truth-shell {
  position: relative;
  width: min(1480px, 98vw);
  height: min(930px, 96vh);
  border: 1px solid rgba(214,168,79,.36);
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(18, 9, 13, .98), rgba(0,0,0,.98));
  box-shadow:
    0 0 70px rgba(0,0,0,.88),
    0 0 40px rgba(214,168,79,.16),
    inset 0 0 44px rgba(214,168,79,.06);
}

.deceivers-truth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(214,168,79,.34);
  background: rgba(0,0,0,.58);
  color: #ffe3a5;
  font-size: 1.7rem;
  line-height: 1;
}

.deceivers-truth-content {
  height: 100%;
  min-height: 0;
}

/* Intro screen using the Table of Truth image. */
.deceivers-truth-intro {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: min(900px, 96vh);
  overflow: hidden;
}

.deceivers-truth-intro-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(.78) contrast(1.08) saturate(.96);
}

.deceivers-truth-intro-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.12) 42%, rgba(0,0,0,.72)),
    radial-gradient(circle at center, transparent 0%, rgba(0,0,0,.24) 56%, rgba(0,0,0,.70) 100%);
  pointer-events: none;
}

.deceivers-truth-intro-copy {
  position: absolute;
  z-index: 2;
  top: clamp(26px, 4vh, 58px);
  left: 50%;
  width: min(760px, 88vw);
  transform: translateX(-50%);
  text-align: center;
  padding: 16px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(0,0,0,.48), rgba(0,0,0,.18));
  border: 1px solid rgba(214,168,79,.18);
  box-shadow: 0 0 34px rgba(0,0,0,.36);
}

.deceivers-truth-intro-copy h2 {
  margin: 6px 0 8px;
  color: #d6a84f;
  font-size: clamp(2rem, 4.6vw, 4.7rem);
  letter-spacing: .105em;
  text-shadow:
    0 2px 12px rgba(0,0,0,.9),
    0 0 20px rgba(214,168,79,.22);
}

.deceivers-truth-intro-copy p {
  margin: 8px 0;
  color: #f3e7da;
  font-size: clamp(.95rem, 1.38vw, 1.28rem);
  line-height: 1.45;
  text-shadow: 0 2px 8px rgba(0,0,0,.88);
}

.deceivers-truth-intro-copy h3 {
  margin: 10px 0 0;
  color: #fff0c7;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.deceivers-truth-kicker {
  color: #a99699;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.deceivers-truth-path-choice {
  position: absolute;
  z-index: 3;
  width: min(214px, 20vw);
  min-height: min(310px, 37vh);
  margin: 0;
  padding: 12px 12px 14px;
  border: 1px solid rgba(214,168,79,.52);
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.24), rgba(0,0,0,.76) 58%),
    rgba(8,5,6,.78);
  box-shadow:
    0 0 24px rgba(0,0,0,.62),
    0 0 24px rgba(214,168,79,.15),
    inset 0 0 18px rgba(214,168,79,.06);
  color: #efe8df;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  transform: translate(-50%, -50%);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    filter .18s ease;
}

.deceivers-truth-path-choice:hover,
.deceivers-truth-path-choice:focus {
  transform: translate(-50%, -50%) scale(1.045);
  border-color: rgba(255, 226, 150, .82);
  filter: brightness(1.08);
  box-shadow:
    0 0 34px rgba(0,0,0,.72),
    0 0 36px rgba(214,168,79,.30),
    inset 0 0 22px rgba(214,168,79,.08);
}

.deceivers-truth-path-choice img {
  width: 100%;
  max-height: min(190px, 22vh);
  object-fit: cover;
  object-position: top center;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 18px rgba(0,0,0,.42);
}

.deceivers-truth-choice-mode {
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d7532f, #67180e);
  color: #fff2df;
  font-size: .66rem;
  font-weight: 950;
  letter-spacing: .14em;
}

.deceivers-truth-choice-mode.calm {
  background: linear-gradient(180deg, #e6bd66, #8e5617);
  color: #160a05;
}

.deceivers-truth-path-choice strong {
  color: #ffe0a1;
  font-size: clamp(.92rem, 1.28vw, 1.18rem);
  letter-spacing: .07em;
}

.deceivers-truth-path-choice small {
  color: #d7cfc8;
  line-height: 1.25;
  font-size: .72rem;
}

.deceivers-truth-path-choice.firepants-choice {
  left: 22.8%;
  top: 75.4%;
}

.deceivers-truth-path-choice.goody-choice {
  left: 77.4%;
  top: 75.4%;
}

/* Card game screen. */
.deceivers-truth-game {
  height: 100%;
  overflow-y: auto;
  padding: clamp(18px, 2.4vw, 34px);
  box-sizing: border-box;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.08), transparent 40%),
    linear-gradient(180deg, rgba(13,7,9,.98), rgba(0,0,0,.98));
}

.deceivers-truth-game-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 240px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
}

.deceivers-truth-game-header h2 {
  margin: 4px 0 8px;
  color: #d6a84f;
  font-size: clamp(1.8rem, 4vw, 3.25rem);
  letter-spacing: .08em;
}

.deceivers-truth-game-header p {
  margin: 0;
  color: #d7cfc8;
}

.deceivers-truth-status-card {
  padding: 14px;
  border: 1px solid rgba(214,168,79,.25);
  border-radius: 18px;
  background: rgba(0,0,0,.32);
  text-align: center;
}

.deceivers-truth-status-card span {
  display: block;
  color: #a99699;
  font-size: .72rem;
  letter-spacing: .16em;
}

.deceivers-truth-status-card strong {
  display: block;
  margin-top: 6px;
  color: #ffe0a1;
  font-size: 1.25rem;
}

.deceivers-truth-status-card small {
  display: block;
  margin-top: 4px;
  color: #a99699;
}

.deceivers-truth-final-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(214,168,79,.34);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(214,168,79,.13), rgba(0,0,0,.30));
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.deceivers-truth-final-notice strong {
  color: #ffe0a1;
  letter-spacing: .08em;
}

.deceivers-truth-final-notice span {
  color: #d7cfc8;
  font-size: .9rem;
}

.deceivers-truth-final-notice button {
  width: auto;
  margin: 0;
  padding: 10px 14px;
}

.deceivers-truth-score-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 auto 14px;
  width: min(760px, 100%);
}

.deceivers-truth-score-row div {
  padding: 10px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 14px;
  background: rgba(0,0,0,.28);
  text-align: center;
}

.deceivers-truth-score-row span {
  display: block;
  color: #a99699;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.deceivers-truth-score-row strong {
  color: #ffe0a1;
  font-size: 1.22rem;
}

.deceivers-truth-raven-line {
  margin: 0 auto 18px;
  width: min(860px, 100%);
  min-height: 48px;
  padding: 14px 18px;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), transparent 70%),
    rgba(0,0,0,.30);
  color: #efe8df;
  text-align: center;
  font-size: clamp(.95rem, 1.25vw, 1.12rem);
  line-height: 1.45;
}


.deceivers-truth-actions {
  margin: 18px auto 0;
  width: min(900px, 100%);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.deceivers-truth-actions button {
  width: auto;
  min-width: 180px;
  margin: 0;
}


@media (max-width: 900px) {
  .deceivers-truth-game-header {
    grid-template-columns: 1fr;
  }

  .deceivers-truth-final-notice {
    grid-template-columns: 1fr;
  }

  .deceivers-truth-final-notice button {
    width: 100%;
  }

}

@media (max-width: 760px) {
  .deceivers-truth-shell {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .deceivers-truth-overlay {
    padding: 0;
  }

  .deceivers-truth-intro {
    min-height: 100vh;
  }

  .deceivers-truth-intro-copy {
    top: 52px;
    width: 86vw;
    padding: 12px;
  }

  .deceivers-truth-intro-copy h2 {
    font-size: clamp(1.55rem, 7.6vw, 2.8rem);
  }

  .deceivers-truth-intro-copy p {
    font-size: clamp(.82rem, 3.3vw, 1rem);
  }

  .deceivers-truth-path-choice {
    width: min(150px, 40vw);
    min-height: 232px;
    padding: 9px;
  }

  .deceivers-truth-path-choice img {
    max-height: 138px;
  }

  .deceivers-truth-path-choice.firepants-choice {
    left: 27%;
    top: 76%;
  }

  .deceivers-truth-path-choice.goody-choice {
    left: 73%;
    top: 76%;
  }

  .deceivers-truth-game {
    padding: 56px 10px 18px;
  }

  .deceivers-truth-score-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .deceivers-truth-score-row div {
    padding: 8px 4px;
  }

  .deceivers-truth-score-row span {
    font-size: .54rem;
  }

  .deceivers-truth-score-row strong {
    font-size: 1rem;
  }


  .deceivers-truth-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .deceivers-truth-actions button {
    width: 100%;
  }
}





/* ================= V1.2.24.3 MOBILE / VISIBILITY HOTFIXES ================= */

.emoji-status-icon {
  display: inline-block;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  vertical-align: -0.12em;
  filter: none !important;
  opacity: 1 !important;
  font-size: 1.05em;
  line-height: 1;
}

.emoji-asset-status-badge img {
  display: none !important;
}

.emoji-asset-status-badge .badge-emoji {
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.75));
}

@media (max-width: 760px), (max-height: 760px) {
  .survivor-elimination-scene {
    width: 100vw !important;
    height: 100svh !important;
    min-height: 100svh !important;
    overflow: hidden !important;
  }

  .survivor-elimination-bg {
    object-position: center center !important;
  }

  .survivor-elimination-plaque {
    top: 57svh !important;
    bottom: auto !important;
    left: 50% !important;
    width: min(88vw, 520px) !important;
    min-height: 92px !important;
    max-height: 23svh !important;
    transform: translate(-50%, -50%) !important;
    z-index: 5 !important;
    padding: 10px 16px !important;
    gap: 4px !important;
    background:
      radial-gradient(circle at top, rgba(255, 231, 150, .82), rgba(167, 103, 28, .78) 62%, rgba(79, 42, 9, .88)),
      linear-gradient(180deg, rgba(230, 176, 75, .95), rgba(92, 47, 11, .94)) !important;
    border: 2px solid rgba(255, 226, 140, .78) !important;
    border-radius: 18px !important;
    box-shadow:
      0 12px 26px rgba(0,0,0,.78),
      inset 0 0 18px rgba(48, 23, 3, .42),
      inset 0 0 0 1px rgba(45, 20, 2, .55) !important;
    color: #150b03 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .survivor-elimination-plaque h2 {
    display: block !important;
    color: #160c03 !important;
    font-size: clamp(.98rem, 5.1vw, 1.62rem) !important;
    line-height: 1.02 !important;
    letter-spacing: .055em !important;
    opacity: 1 !important;
    visibility: visible !important;
    white-space: nowrap !important;
    text-shadow: 0 1px 0 rgba(255, 232, 166, .38) !important;
  }

  .survivor-elimination-plaque-lines {
    display: grid !important;
    color: #1a0f04 !important;
    font-size: clamp(.62rem, 3.1vw, .90rem) !important;
    line-height: 1.08 !important;
    letter-spacing: .045em !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: 0 1px 0 rgba(255, 232, 166, .30) !important;
  }

  .survivor-elimination-bottom-line {
    bottom: 74px !important;
    font-size: clamp(.52rem, 2.4vw, .72rem) !important;
    opacity: .84 !important;
  }

  .survivor-elimination-btn {
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    z-index: 6 !important;
  }
}


@media (max-width: 760px) {
  .deceivers-truth-game {
    height: 100svh !important;
    overflow-y: auto !important;
    padding: 52px 8px 12px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .deceivers-truth-game-header {
    gap: 6px !important;
    margin-bottom: 6px !important;
  }

  .deceivers-truth-game-header h2 {
    font-size: clamp(1.25rem, 6.2vw, 2rem) !important;
    margin-bottom: 4px !important;
  }

  .deceivers-truth-game-header p {
    font-size: clamp(.76rem, 3.2vw, .92rem) !important;
    line-height: 1.25 !important;
  }

  .deceivers-truth-status-card {
    padding: 7px !important;
  }

  .deceivers-truth-score-row {
    margin-bottom: 6px !important;
  }

  .deceivers-truth-raven-line {
    min-height: auto !important;
    margin-bottom: 8px !important;
    padding: 8px 10px !important;
    font-size: clamp(.78rem, 3.3vw, .94rem) !important;
    line-height: 1.25 !important;
  }


  .deceivers-truth-actions {
    margin-top: 8px !important;
    gap: 6px !important;
  }

  .deceivers-truth-actions button {
    min-width: 0 !important;
    width: 100% !important;
    padding: 10px 12px !important;
  }
}


.final-reveal-panel {
  text-align: center !important;
}

.final-role-list {
  width: min(760px, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

.final-role-row.final-role-reveal-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  text-align: left !important;
}

.final-role-row.final-role-reveal-row .final-role-name {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

@media (max-width: 560px) {
  .final-role-row.final-role-reveal-row {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 5px !important;
    text-align: center !important;
  }

  .final-role-row.final-role-reveal-row .final-role-name,
  .final-role-row.final-role-reveal-row .final-role-value {
    text-align: center !important;
    width: 100% !important;
  }
}



/* ================= V1.2.24.4 FLOW / AFTERLIFE / LOBBY HOTFIXES ================= */

/* Lobby: when 4+ players are present, guide host down to Start Game. */
#startGameBtn.lobby-start-ready-throb {
  animation: lobbyStartReadyPulse 1.05s ease-in-out infinite;
  box-shadow:
    0 0 0 0 rgba(214,168,79,.58),
    0 0 28px rgba(214,168,79,.32) !important;
  border-color: rgba(255, 226, 150, .86) !important;
}

@keyframes lobbyStartReadyPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
    box-shadow:
      0 0 0 0 rgba(214,168,79,.45),
      0 0 18px rgba(214,168,79,.24);
  }
  50% {
    transform: scale(1.035);
    filter: brightness(1.15);
    box-shadow:
      0 0 0 10px rgba(214,168,79,0),
      0 0 36px rgba(214,168,79,.48);
  }
}

/* Reserve the action row first. The portrait gives up height before the
   story scrolls, so the player can always reach Last Words. */
.personal-death-card {
  --portrait-height: min(56svh, 620px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  max-height: 100%;
  margin: auto;
}

.personal-death-story {
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.personal-death-story > * {
  flex: none;
}

.personal-death-story .death-image-personal {
  position: relative;
  flex: 0 1 var(--portrait-height);
  min-height: min(6rem, 20svh) !important;
}

.personal-death-story .death-cinematic-image {
  height: 100% !important;
  max-height: var(--portrait-height) !important;
  object-fit: contain;
}

/* Fit the painted coordinates to the same centered box as the portrait. */
.soul-collection-pulse {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  max-height: var(--portrait-height);
  mix-blend-mode: screen;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .soul-collection-pulse { display: none; }
}

.death-afterlife-action-dock {
  position: sticky;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 50;
  width: min(420px, 94%);
  margin: 18px auto 0;
  padding: 12px;
  border: 1px solid rgba(214,168,79,.30);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.16), transparent 65%),
    rgba(0,0,0,.74);
  box-shadow:
    0 12px 30px rgba(0,0,0,.72),
    0 0 22px rgba(214,168,79,.16);
  display: grid;
  gap: 10px;
  opacity: .08;
  transform: translateY(18px);
  pointer-events: none;
  transition:
    opacity .45s ease,
    transform .45s ease;
}

.death-cinematic-overlay.death-actions-ready .death-afterlife-action-dock {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.death-afterlife-action-dock button {
  width: 100% !important;
  margin: 0 !important;
  min-height: 48px;
}

.death-afterlife-action-dock .last-words-complete-in-dock {
  opacity: .72;
}

/* The Table of Truth overlay must never fall into normal page flow. */
.deceivers-truth-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000004 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deceivers-truth-overlay.hidden,
#deceiversTruthOverlay.hidden {
  display: none !important;
}

.deceivers-truth-content {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 760px) {
  .death-afterlife-action-dock {
    width: min(390px, 92vw);
    padding: 10px;
  }

  .death-cinematic-card p,
  .last-words-card p {
    font-size: .92rem;
    line-height: 1.36;
  }
}


/* ================= V1.2.24.5 TABLE OF TRUTH POLISH ================= */

.deceivers-truth-win-banner {
  width: min(760px, 100%);
  margin: 0 auto 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,226,150,.62);
  background:
    radial-gradient(circle at top, rgba(214,168,79,.24), transparent 72%),
    linear-gradient(180deg, rgba(22,14,12,.96), rgba(7,4,5,.94));
  text-align: center;
  box-shadow: 0 0 28px rgba(214,168,79,.18), 0 12px 26px rgba(0,0,0,.5);
  animation: deceiversTruthVictoryPulse 1.15s ease-in-out infinite;
}

.truth-win-banner-kicker {
  display: block;
  color: #d6a84f;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .2em;
  margin-bottom: 4px;
}

.deceivers-truth-win-banner strong {
  color: #fff0c3;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  letter-spacing: .04em;
}

.deceivers-truth-raven-line.truth-found-line {
  border-color: rgba(255,226,150,.58);
  box-shadow: 0 0 22px rgba(214,168,79,.16), inset 0 0 20px rgba(214,168,79,.08);
}

.deceivers-truth-status-card.truth-round-won {
  border-color: rgba(255,226,150,.7);
  box-shadow: 0 0 28px rgba(214,168,79,.18), inset 0 0 18px rgba(214,168,79,.08);
}

.deceivers-truth-round-number.throb,
.truth-next-round-btn {
  animation: deceiversTruthVictoryPulse 1.15s ease-in-out infinite;
}

.truth-next-round-btn {
  border-color: rgba(255,226,150,.8) !important;
  box-shadow: 0 0 24px rgba(214,168,79,.22), 0 10px 18px rgba(0,0,0,.38) !important;
}

@keyframes deceiversTruthVictoryPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.035);
    filter: brightness(1.13);
  }
}

@media (max-width: 760px) {
  .deceivers-truth-win-banner {
    padding: 10px 10px;
    margin-bottom: 10px;
  }
}



/* ================= V1.2.24.6 CAREFUL MOBILE + CARD FIX PASS ================= */

/* Doctor Graven buttons: after the scene breathes, make the choices impossible to miss. */
.death-cinematic-overlay.death-actions-ready .death-afterlife-action-dock {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.death-cinematic-overlay.death-actions-ready .death-afterlife-action-dock button,
.death-cinematic-overlay.death-actions-ready #enterLastWordsBtn,
.death-cinematic-overlay.death-actions-ready #openDeceiversTruthFromDeathBtn {
  background:
    radial-gradient(circle at top, rgba(255, 232, 156, .34), transparent 62%),
    linear-gradient(180deg, #d6a84f, #8a561c 62%, #3b1d07) !important;
  color: #160b03 !important;
  border: 1px solid rgba(255, 235, 170, .92) !important;
  box-shadow:
    0 0 0 0 rgba(214,168,79,.55),
    0 0 28px rgba(214,168,79,.34),
    0 10px 18px rgba(0,0,0,.52) !important;
  text-shadow: 0 1px 0 rgba(255,236,180,.36) !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
  animation: deathActionGoldThrob 1.15s ease-in-out infinite !important;
}

.death-cinematic-overlay.death-actions-ready #openDeceiversTruthFromDeathBtn {
  background:
    radial-gradient(circle at top, rgba(255, 232, 156, .42), transparent 66%),
    linear-gradient(180deg, #f0c15c, #9b6222 62%, #3a1807) !important;
}

@keyframes deathActionGoldThrob {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.045);
    filter: brightness(1.18);
  }
}


/* Make a won round feel like a won round. */
.deceivers-truth-game.truth-round-won .deceivers-truth-status-card,
.deceivers-truth-game.truth-round-won .deceivers-truth-raven-line,
.deceivers-truth-game.truth-round-won .deceivers-truth-win-banner {
  border-color: rgba(255, 235, 166, .95) !important;
  box-shadow:
    0 0 34px rgba(214,168,79,.34),
    0 12px 26px rgba(0,0,0,.50),
    inset 0 0 24px rgba(214,168,79,.15) !important;
}

.deceivers-truth-game.truth-round-won .deceivers-truth-win-banner {
  display: block !important;
  background:
    radial-gradient(circle at top, rgba(255, 226, 150, .32), transparent 70%),
    linear-gradient(180deg, rgba(47, 28, 7, .98), rgba(8,4,2,.96)) !important;
  animation: truthVictoryGlowStrong 1s ease-in-out infinite !important;
}

.deceivers-truth-game.truth-round-won .deceivers-truth-round-number.throb {
  display: inline-block !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: rgba(214,168,79,.22) !important;
  color: #fff0c3 !important;
  font-style: normal !important;
  animation: truthVictoryGlowStrong 1s ease-in-out infinite !important;
}

.deceivers-truth-game.truth-round-won .truth-next-round-btn,
.deceivers-truth-actions .truth-next-round-btn {
  background:
    radial-gradient(circle at top, rgba(255, 236, 170, .30), transparent 60%),
    linear-gradient(180deg, #d6a84f, #7e4b16 64%, #2a1204) !important;
  color: #140902 !important;
  border: 2px solid rgba(255, 236, 170, .92) !important;
  font-weight: 950 !important;
  box-shadow:
    0 0 38px rgba(214,168,79,.46),
    0 12px 24px rgba(0,0,0,.55) !important;
  animation: truthVictoryGlowStrong 1s ease-in-out infinite !important;
}


/* Mobile survivor plaque: move it down, away from the Return button and closer to the original plaque area. */
@media (max-width: 760px), (max-height: 760px) {
  .survivor-elimination-plaque {
    top: 70svh !important;
    bottom: auto !important;
    width: min(86vw, 520px) !important;
    min-height: 82px !important;
    max-height: 18svh !important;
    padding: 8px 14px !important;
    z-index: 4 !important;
  }

  .survivor-elimination-plaque h2 {
    font-size: clamp(.88rem, 4.6vw, 1.42rem) !important;
    line-height: 1 !important;
  }

  .survivor-elimination-plaque-lines {
    font-size: clamp(.54rem, 2.7vw, .78rem) !important;
    line-height: 1.04 !important;
    gap: 2px !important;
  }

  .survivor-elimination-btn {
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    width: min(270px, 70vw) !important;
    z-index: 6 !important;
  }

  .survivor-elimination-bottom-line {
    bottom: 58px !important;
    font-size: clamp(.45rem, 2.1vw, .62rem) !important;
  }
}



/* ================= V1.2.24.7 DOCTOR GRAVEN + PLAYABLE SHUFFLE FIX ================= */

/* Let Doctor Graven text breathe first. Then show RED. Then change to GOLD. */
.death-afterlife-action-dock {
  position: relative !important;
  bottom: auto !important;
  z-index: 20 !important;
  margin-top: 18px !important;
  opacity: 0 !important;
  transform: translateY(10px) !important;
  pointer-events: none !important;
}

.death-cinematic-overlay.death-actions-ready .death-afterlife-action-dock {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.death-cinematic-overlay.death-actions-ready .death-afterlife-action-dock button,
.death-cinematic-overlay.death-lastwords-delivered-red .death-afterlife-action-dock button {
  background:
    radial-gradient(circle at top, rgba(255, 85, 85, .26), transparent 62%),
    linear-gradient(180deg, #7c1016, #3d0508 64%, #160102) !important;
  color: #ffe6e6 !important;
  border: 1px solid rgba(255, 126, 126, .86) !important;
  box-shadow:
    0 0 26px rgba(140, 0, 0, .54),
    0 10px 18px rgba(0,0,0,.60) !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.85) !important;
  animation: deathActionRedPulse 1.1s ease-in-out infinite !important;
}

.death-cinematic-overlay.death-actions-gold .death-afterlife-action-dock button {
  background:
    radial-gradient(circle at top, rgba(255, 232, 156, .40), transparent 62%),
    linear-gradient(180deg, #d6a84f, #8a561c 62%, #3b1d07) !important;
  color: #160b03 !important;
  border: 1px solid rgba(255, 235, 170, .96) !important;
  box-shadow:
    0 0 0 0 rgba(214,168,79,.55),
    0 0 34px rgba(214,168,79,.42),
    0 10px 18px rgba(0,0,0,.52) !important;
  text-shadow: 0 1px 0 rgba(255,236,180,.42) !important;
  animation: deathActionGoldThrob 1.1s ease-in-out infinite !important;
}

@keyframes deathActionRedPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.035); filter: brightness(1.16); }
}


/* Make winning unavoidable to notice. */
.deceivers-truth-game.truth-round-won .deceivers-truth-win-banner {
  display: block !important;
  border: 2px solid rgba(255, 235, 166, 1) !important;
  background:
    radial-gradient(circle at top, rgba(255, 226, 150, .45), transparent 70%),
    linear-gradient(180deg, rgba(72, 43, 10, .98), rgba(9,4,2,.97)) !important;
  box-shadow:
    0 0 42px rgba(214,168,79,.48),
    0 12px 26px rgba(0,0,0,.55),
    inset 0 0 24px rgba(214,168,79,.18) !important;
  animation: truthVictoryGlowStrong 850ms ease-in-out infinite !important;
}

.deceivers-truth-game.truth-round-won .truth-next-round-btn,
.deceivers-truth-actions .truth-next-round-btn {
  background:
    radial-gradient(circle at top, rgba(255, 236, 170, .42), transparent 60%),
    linear-gradient(180deg, #f0c15c, #9b6222 64%, #341606) !important;
  color: #130801 !important;
  border: 2px solid rgba(255, 236, 170, 1) !important;
  font-weight: 950 !important;
  box-shadow:
    0 0 44px rgba(214,168,79,.56),
    0 12px 24px rgba(0,0,0,.58) !important;
  animation: truthVictoryGlowStrong 850ms ease-in-out infinite !important;
}

.deceivers-truth-game.truth-round-won .deceivers-truth-round-number.throb {
  display: inline-block !important;
  padding: 2px 9px !important;
  border-radius: 999px !important;
  background: rgba(214,168,79,.30) !important;
  color: #fff2c6 !important;
  font-style: normal !important;
  animation: truthVictoryGlowStrong 850ms ease-in-out infinite !important;
}


/* Mobile survivor plaque: lower and compact, clear of Return button. */
@media (max-width: 760px), (max-height: 760px) {
  .survivor-elimination-plaque {
    top: 72svh !important;
    bottom: auto !important;
    width: min(84vw, 500px) !important;
    min-height: 76px !important;
    max-height: 16svh !important;
    padding: 7px 12px !important;
    z-index: 4 !important;
  }

  .survivor-elimination-plaque h2 {
    font-size: clamp(.78rem, 4.1vw, 1.28rem) !important;
    line-height: 1 !important;
  }

  .survivor-elimination-plaque-lines {
    font-size: clamp(.48rem, 2.45vw, .70rem) !important;
    line-height: 1.02 !important;
    gap: 1px !important;
  }

  .survivor-elimination-btn {
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: min(250px, 68vw) !important;
    z-index: 7 !important;
  }

  .survivor-elimination-bottom-line {
    bottom: 54px !important;
    font-size: clamp(.42rem, 1.9vw, .58rem) !important;
  }
}



/* ================= V1.2.24.8 SLOW TRACKABLE SHUFFLE + MOBILE DEATH FIX ================= */

/* Mobile Doctor Graven: zoomed out, centered, and not jammed against the top. */
@media (max-width: 760px) {
  .death-cinematic-overlay {
    align-items: center !important;
    justify-content: center !important;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
  }

  .personal-death-card {
    --portrait-height: 40svh;
    width: min(94vw, 560px) !important;
    padding: 12px 12px 14px !important;
  }

  .personal-death-story {
    gap: 7px;
  }

  .personal-death-story .death-image-personal {
    border-radius: 16px;
  }

  .death-cinematic-kicker {
    margin-top: 4px !important;
    font-size: .58rem !important;
    letter-spacing: .16em !important;
  }

  .death-cinematic-card h2 {
    margin: 3px 0 4px !important;
    font-size: clamp(1.05rem, 5.6vw, 1.55rem) !important;
    line-height: 1.03 !important;
  }

  .death-cinematic-card p {
    margin: 4px 0 !important;
    font-size: clamp(.76rem, 3.3vw, .92rem) !important;
    line-height: 1.22 !important;
  }

  .death-cinematic-warning {
    font-size: clamp(.72rem, 3.1vw, .86rem) !important;
  }

  .death-afterlife-action-dock {
    margin-top: 8px !important;
    padding: 8px !important;
    gap: 8px !important;
  }

  .death-afterlife-action-dock button {
    min-height: 44px !important;
    padding: 10px 12px !important;
    font-size: .82rem !important;
  }
}

/* Last Words Delivered must visibly start red before turning gold. */
.death-cinematic-overlay.death-lastwords-delivered-red .death-afterlife-action-dock button,
.death-cinematic-overlay.death-lastwords-delivered-red #enterLastWordsBtn,
.death-cinematic-overlay.death-lastwords-delivered-red #openDeceiversTruthFromDeathBtn {
  background:
    radial-gradient(circle at top, rgba(255, 85, 85, .34), transparent 62%),
    linear-gradient(180deg, #8d1018, #470408 66%, #160102) !important;
  color: #ffe9e9 !important;
  border: 2px solid rgba(255, 135, 135, .96) !important;
  box-shadow:
    0 0 34px rgba(160, 0, 0, .66),
    0 10px 18px rgba(0,0,0,.60) !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.9) !important;
  animation: deathActionRedPulse 850ms ease-in-out infinite !important;
}


/* Survivor plaque: slightly lower, Return button slightly higher. */
@media (max-width: 760px), (max-height: 760px) {
  .survivor-elimination-plaque {
    top: 75svh !important;
    width: min(83vw, 500px) !important;
    min-height: 70px !important;
    max-height: 15svh !important;
    padding: 6px 12px !important;
  }

  .survivor-elimination-plaque h2 {
    font-size: clamp(.72rem, 3.9vw, 1.18rem) !important;
  }

  .survivor-elimination-plaque-lines {
    font-size: clamp(.44rem, 2.25vw, .66rem) !important;
    line-height: 1.01 !important;
  }

  .survivor-elimination-btn {
    bottom: max(34px, calc(env(safe-area-inset-bottom) + 22px)) !important;
    width: min(250px, 66vw) !important;
  }

  .survivor-elimination-bottom-line {
    bottom: 78px !important;
  }
}


/* ================= V1.2.24.9 DRAGGED CARDS + RAVEN PATH FULLSCREEN ================= */


/* Raven's Path: full-screen challenge modal with clearer maze walls. */
#ravenPathPanel:not(.hidden),
.raven-path-panel:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  margin: 0 !important;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at center, rgba(64,24,12,.50), transparent 58%),
    linear-gradient(180deg, rgba(8,3,5,.98), rgba(0,0,0,.98)) !important;
  overflow-y: auto !important;
  text-align: center !important;
  box-shadow: inset 0 0 90px rgba(0,0,0,.88) !important;
}

#ravenPathPanel:not(.hidden)::before,
.raven-path-panel:not(.hidden)::before {
  content: "🐦‍⬛  RAVEN'S PATH  🛡️";
  display: block;
  margin: 0 auto 10px;
  color: #f0c15c;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(214,168,79,.35), 0 2px 10px rgba(0,0,0,.9);
}

.raven-path-board-shell {
  width: min(92vmin, 720px) !important;
  margin: 10px auto 12px !important;
  padding: 8px !important;
  border-radius: 20px !important;
  border: 2px solid rgba(214,168,79,.72) !important;
  background:
    linear-gradient(180deg, rgba(214,168,79,.13), rgba(0,0,0,.34)),
    rgba(0,0,0,.74) !important;
  box-shadow:
    0 0 42px rgba(214,168,79,.18),
    inset 0 0 36px rgba(0,0,0,.76) !important;
}

.raven-path-canvas {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: min(72vh, 720px) !important;
  border-radius: 14px !important;
  border: 2px solid rgba(255,226,150,.82) !important;
  background: #030102 !important;
  box-shadow:
    0 0 28px rgba(214,168,79,.22),
    inset 0 0 34px rgba(0,0,0,.82) !important;
  image-rendering: auto !important;
}

.raven-path-control-pad {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: min(330px, 88vw) !important;
  margin: 12px auto !important;
}

.raven-path-control-pad button {
  min-height: 48px !important;
  border: 1px solid rgba(255,226,150,.72) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.24), transparent 70%),
    linear-gradient(180deg, #2a1710, #0b0506) !important;
  color: #f0c15c !important;
  font-size: 1.25rem !important;
  font-weight: 950 !important;
  box-shadow: 0 0 18px rgba(214,168,79,.12) !important;
}

@media (max-width: 760px) {
  #ravenPathPanel:not(.hidden),
  .raven-path-panel:not(.hidden) {
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)) !important;
  }

  #ravenPathPanel:not(.hidden)::before,
  .raven-path-panel:not(.hidden)::before {
    font-size: .86rem;
    letter-spacing: .09em;
    margin-bottom: 6px;
  }

  #ravenPathPanel h4 {
    margin: 4px 0 4px !important;
    font-size: 1rem !important;
  }

  #ravenPathPanel .raven-path-subtitle,
  #ravenPathPanel .hint {
    margin: 4px auto !important;
    font-size: .78rem !important;
    line-height: 1.22 !important;
  }

  .raven-path-board-shell {
    width: min(94vw, 70vh) !important;
    margin-top: 6px !important;
    padding: 5px !important;
  }

  .raven-path-canvas {
    max-height: 58vh !important;
  }

  .raven-path-control-pad {
    width: min(270px, 82vw) !important;
    gap: 6px !important;
    margin: 8px auto !important;
  }

  .raven-path-control-pad button {
    min-height: 42px !important;
  }

  #ravenPathPanel .raven-path-standings {
    max-height: 120px !important;
    overflow-y: auto !important;
    margin-top: 8px !important;
  }
}



/* Raven's Path host escape hatch, matching the FirePants "Choose Another Game" idea. */
.raven-path-choose-different-btn {
  margin-top: 10px !important;
  border-color: rgba(214,168,79,.42) !important;
  color: #f0c15c !important;
}

#ravenPathPanel:not(.hidden) .raven-path-choose-different-btn {
  width: min(320px, 88vw) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}




/* ================= V1.2.24.12 LAST WORDS CHIP JUDGMENT ================= */

.last-words-overlay {
  align-items: stretch !important;
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
}

.last-words-card {
  width: min(96vw, 860px) !important;
  max-height: calc(100dvh - 18px) !important;
  margin: auto !important;
  padding: 14px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.last-words-card h2 {
  margin: 6px 0 8px !important;
}

.last-words-intro {
  margin-top: 0 !important;
  margin-bottom: 6px !important;
  font-size: .9rem !important;
  line-height: 1.3 !important;
}

.last-words-timer-row {
  margin: 8px auto 10px !important;
  padding: 8px 12px !important;
}

.last-words-mark-board {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid rgba(214,168,79,.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), transparent 48%),
    rgba(0,0,0,.34);
  padding: 10px;
  overflow: hidden;
}

.last-words-board-status {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(214,168,79,.18);
  background: rgba(0,0,0,.34);
  color: rgba(255,255,255,.82);
  font-size: .86rem;
  line-height: 1.22;
  padding: 6px 8px;
}

.last-words-board-status strong {
  color: #f0c15c;
}

.last-words-player-tray {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.last-words-player-chip,
.last-words-placed-chip {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(214,168,79,.50);
  background:
    radial-gradient(circle at top, rgba(214,168,79,.22), transparent 70%),
    linear-gradient(180deg, rgba(40,18,10,.95), rgba(8,5,6,.96));
  color: #fff;
  min-height: 38px;
  padding: 0 13px;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 0 14px rgba(214,168,79,.11);
  white-space: nowrap;
}

.last-words-player-chip.selected {
  color: #14090a;
  background:
    linear-gradient(180deg, #f5d787, #b77b25);
  box-shadow:
    0 0 18px rgba(214,168,79,.45),
    0 0 34px rgba(157,23,35,.24);
}

.last-words-player-chip:disabled {
  opacity: .42;
}

.last-words-empty-chip {
  flex: 0 0 auto;
  color: rgba(255,255,255,.55);
  font-style: italic;
  padding: 8px 4px;
}

.last-words-archetype-strip {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 2px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.last-words-archetype-card {
  flex: 0 0 min(74vw, 250px);
  min-height: 172px;
  scroll-snap-align: center;
  border-radius: 18px;
  border: 1px solid rgba(214,168,79,.34);
  background:
    linear-gradient(180deg, rgba(40,15,13,.98), rgba(5,5,8,.98)),
    radial-gradient(circle at top, rgba(214,168,79,.12), transparent 60%);
  color: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  box-shadow:
    inset 0 0 24px rgba(214,168,79,.06),
    0 0 20px rgba(0,0,0,.42);
}

.last-words-archetype-card.ready-to-place {
  border-color: rgba(240,193,92,.78);
  box-shadow:
    0 0 20px rgba(214,168,79,.24),
    inset 0 0 20px rgba(214,168,79,.08);
}

.last-words-card-title {
  display: block;
  color: #f0c15c;
  font-size: .98rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.last-words-card-subtitle {
  display: block;
  color: rgba(255,255,255,.72);
  font-size: .78rem;
  line-height: 1.22;
  min-height: 32px;
}

.last-words-card-chip-zone {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 7px;
  min-height: 52px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.last-words-card-chip-zone em {
  color: rgba(255,255,255,.36);
  font-size: .78rem;
}

.last-words-placed-chip {
  min-height: 32px;
  padding: 0 10px;
  font-size: .78rem;
  cursor: pointer;
}

.last-words-placed-chip::after {
  content: " ×";
  color: rgba(255,255,255,.58);
}

.last-words-placed-chip.landed {
  animation: lastWordsChipLand 420ms ease-out;
}

.last-words-legacy-selects {
  display: none !important;
}

.last-words-hint {
  margin: 8px auto 0 !important;
  font-size: .78rem !important;
  line-height: 1.25 !important;
}

.last-words-card .death-cinematic-btn {
  margin-top: 10px !important;
  min-height: 44px !important;
}

.last-words-mark-board.needs-player {
  animation: lastWordsBoardNudge 500ms ease-in-out;
}

@keyframes lastWordsChipLand {
  0% { transform: translateY(-18px) scale(.72); opacity: .2; }
  70% { transform: translateY(2px) scale(1.06); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes lastWordsBoardNudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (max-width: 640px) {
  .last-words-kicker {
    font-size: .58rem !important;
    letter-spacing: .15em !important;
    margin-top: 4px !important;
  }

  .last-words-card h2 {
    font-size: 1.15rem !important;
  }

  .last-words-intro {
    font-size: .76rem !important;
  }

  .last-words-timer-row span {
    font-size: .62rem !important;
  }

  #lastWordsTimerDisplay {
    font-size: 1.05rem !important;
  }

  .last-words-board-status {
    font-size: .74rem;
    min-height: 30px;
  }

  .last-words-player-chip {
    min-height: 34px;
    padding: 0 11px;
    font-size: .78rem;
  }

  .last-words-archetype-card {
    flex-basis: 72vw;
    min-height: 152px;
    padding: 10px;
  }

  .last-words-card-title {
    font-size: .82rem;
  }

  .last-words-card-subtitle {
    font-size: .68rem;
    min-height: 26px;
  }

  .last-words-card-chip-zone {
    min-height: 44px;
  }

  .last-words-placed-chip {
    min-height: 28px;
    font-size: .68rem;
  }
}

/* ================= V330 FIREPANTS: THE BOILING POINT =================
   One readable decision, not a field of moving targets. The breaking point
   and every scoring band remain visible; only the seeded pressure curve moves. */

.mg-boiling-point {
  --firepants-heat: 0;
  display: grid;
  grid-template-columns: minmax(150px, .72fr) minmax(330px, 1.45fr);
  align-items: stretch;
  height: 330px;
  border: 1px solid rgba(214, 168, 79, .28);
  background:
    radial-gradient(circle at 18% 84%, rgba(255, 86, 15, calc(.08 + var(--firepants-heat) * .34)), transparent 34%),
    linear-gradient(145deg, #170904, #080403 66%, #160805);
  box-shadow: inset 0 0 44px rgba(0, 0, 0, .82), 0 15px 36px rgba(0, 0, 0, .35);
}

.mg-boiling-scene {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid rgba(214, 168, 79, .18);
  background: radial-gradient(ellipse at 50% 92%, #641F0B 0%, #1B0904 48%, #080403 100%);
}

.mg-boiling-point .mg-fp-wrap {
  left: 50% !important;
  right: auto !important;
  top: 8px !important;
  bottom: auto !important;
  width: min(190px, 86%) !important;
  height: 312px !important;
  transform: translateX(-50%) !important;
}

.mg-boiling-point .mg-fp-says {
  bottom: 13px;
  width: 88%;
  color: #F2D1B4;
  text-shadow: 0 2px 4px #000, 0 0 12px rgba(255, 90, 20, .56);
}

.mg-boiling-point .firepants-character {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  filter:
    brightness(1.12)
    contrast(1.05)
    drop-shadow(0 0 calc(8px + 18px * var(--firepants-heat)) rgba(255, 105, 30, .72)) !important;
}

.mg-boiling-point .firepants-pants-flames { display: none !important; }

.mg-boiling-console {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 23px 26px 20px;
  background: linear-gradient(180deg, #1D1009, #090504);
}

.mg-boiling-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 17px;
}

.mg-boiling-readout > span {
  padding: 8px 7px;
  border: 1px solid rgba(214, 168, 79, .25);
  border-radius: 6px;
  background: #0A0604;
  text-align: center;
}

.mg-boiling-readout small,
.mg-boiling-readout b { display: block; }
.mg-boiling-readout small {
  margin-bottom: 2px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 8px;
  letter-spacing: .18em;
  color: #8F7A59;
}
.mg-boiling-readout b {
  font-family: "Cinzel", Georgia, serif;
  font-size: 18px;
  color: #F2D696;
}
.mg-boiling-readout [data-mg="strikes"] { color: #FF8A73; letter-spacing: .16em; }

.mg-boiling-gauge {
  position: relative;
  height: 66px;
  margin: 4px 7px 12px;
  border: 2px solid #7E5A26;
  border-radius: 9px;
  overflow: visible;
  background: #080504;
  box-shadow: inset 0 0 14px #000, 0 0 18px rgba(255, 90, 15, calc(var(--firepants-heat) * .32));
}

.mg-boiling-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
  border-right: 1px solid rgba(255, 244, 210, .28);
  transition: left .25s ease, width .25s ease;
}
.mg-boiling-zone em {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(6px, .75vw, 9px);
  font-style: normal;
  letter-spacing: .07em;
  color: rgba(255, 247, 225, .82);
  white-space: nowrap;
  text-shadow: 0 1px 2px #000;
}
.mg-boiling-zone.is-cold { background: linear-gradient(90deg, #171815, #4F3820); }
.mg-boiling-zone.is-bronze { background: linear-gradient(90deg, #72502A, #9A672C); }
.mg-boiling-zone.is-gold { background: linear-gradient(90deg, #A87318, #E6B43E); }
.mg-boiling-zone.is-crimson { background: linear-gradient(90deg, #A53220, #C40E19); }
.mg-boiling-zone.is-white { background: linear-gradient(90deg, #F03B20, #FFF1BF); }

.mg-boiling-fill {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 75%, rgba(255, 255, 255, .34));
  border-right: 2px solid rgba(255, 250, 224, .9);
  box-shadow: 5px 0 13px rgba(255, 96, 20, .62);
}

.mg-boiling-needle {
  position: absolute;
  z-index: 4;
  top: -8px;
  bottom: -8px;
  left: 0;
  width: 3px;
  transform: translateX(-1px);
  border-radius: 2px;
  background: #FFF7D9;
  box-shadow: 0 0 5px #FFF, 0 0 14px #FF6018;
  pointer-events: none;
}

.mg-boiling-limit {
  position: absolute;
  z-index: 5;
  top: -5px;
  bottom: -5px;
  width: 2px;
  background: #FF3B35;
  box-shadow: 0 0 9px #FF2C24;
  pointer-events: none;
}
.mg-boiling-limit i {
  position: absolute;
  right: 0;
  top: -18px;
  width: max-content;
  white-space: nowrap;
  font: normal 8px/1 "Cinzel", Georgia, serif;
  letter-spacing: .1em;
  color: #FF8276;
}

.mg-boiling-status {
  min-height: 23px;
  margin-bottom: 8px;
  text-align: center;
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  letter-spacing: .12em;
  color: #F0D89F;
  text-shadow: 0 1px 2px #000;
}

.mg-boiling-vent {
  position: relative;
  width: 100%;
  min-height: 58px;
  border: 1px solid #E3B149;
  border-radius: 8px;
  background: linear-gradient(180deg, #A42B15, #5E100B);
  box-shadow: inset 0 1px rgba(255, 220, 145, .35), 0 8px 18px rgba(0, 0, 0, .42);
  color: #FFF1CE;
  font-family: "Cinzel", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .1em;
  cursor: pointer;
  touch-action: manipulation;
}
.mg-boiling-vent:hover,
.mg-boiling-vent:focus-visible {
  outline: none;
  border-color: #FFE29A;
  filter: brightness(1.12);
}
.mg-boiling-vent:active { transform: translateY(1px); }

.mg-boiling-key {
  margin: 8px 0 0;
  text-align: center;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 12px;
  color: #B8A688;
}
.mg-boiling-key kbd {
  padding: 1px 5px;
  border: 1px solid rgba(214, 168, 79, .28);
  border-radius: 3px;
  background: rgba(0, 0, 0, .35);
  font: inherit;
  color: #C9B78E;
}

.mg-boiling-point.is-critical .mg-boiling-console {
  background: linear-gradient(180deg, rgba(53, 11, 5, .88), rgba(10, 3, 2, .82));
}
.mg-boiling-point.is-flare .mg-boiling-status {
  color: #FFAD72;
  animation: mgBoilingWarning .34s ease-in-out 2 alternate;
}
.mg-boiling-point.is-venting .mg-boiling-gauge { animation: mgBoilingVent .38s ease-out; }
.mg-boiling-point.is-meltdown { animation: mgBoilingStrike .18s linear 3; }
@keyframes mgBoilingWarning { to { letter-spacing: .2em; text-shadow: 0 0 11px #FF5B20; } }
@keyframes mgBoilingVent { 50% { filter: brightness(1.9); transform: scaleY(.9); } }
@keyframes mgBoilingStrike { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

@media (max-width: 640px) {
  .mg-boiling-point {
    grid-template-columns: 1fr;
    grid-template-rows: 150px auto;
    height: 455px;
  }
  .mg-boiling-scene { border-right: 0; border-bottom: 1px solid rgba(214, 168, 79, .18); }
  .mg-boiling-point .mg-fp-wrap {
    top: 3px !important;
    bottom: auto !important;
    width: min(94px, 28%) !important;
    height: 144px !important;
  }
  .mg-boiling-point .mg-fp-says { left: 72%; bottom: 56px; width: 46%; font-size: 8px; }
  .mg-boiling-console { padding: 17px 14px 14px; }
  .mg-boiling-readout { margin-bottom: 13px; }
  .mg-boiling-gauge { height: 58px; margin-left: 2px; margin-right: 2px; }
  .mg-boiling-zone em { font-size: 6px; letter-spacing: 0; }
  .mg-boiling-vent { min-height: 62px; font-size: 14px; }
  .mg-boiling-key { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .mg-boiling-point,
  .mg-boiling-point * { animation: none !important; transition: none !important; }
}


/* ================= V1.2.24.13 CLEAN CANVAS MONTE + NO SIDEWAYS LAST WORDS ================= */

/* The Table of Truth is now a single canvas board. No DOM card shuffling, no flashing cards. */
.deceivers-truth-board {
  width: min(1120px, 100%);
  margin: 0 auto 12px;
  border-radius: 24px;
  border: 1px solid rgba(214,168,79,.32);
  background:
    radial-gradient(circle at center, rgba(214,168,79,.10), transparent 54%),
    linear-gradient(180deg, rgba(31,11,12,.95), rgba(0,0,0,.96));
  box-shadow:
    inset 0 0 42px rgba(0,0,0,.74),
    0 0 26px rgba(214,168,79,.12);
  overflow: hidden;
}

#deceiversTruthCanvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(58vh, 520px);
  touch-action: manipulation;
}

@media (max-width: 760px) {
  .deceivers-truth-board {
    border-radius: 16px;
  }

  #deceiversTruthCanvas {
    max-height: 44vh;
  }
}

/* Last Words: no sideways scrolling. Use compact grids that fit the phone much better. */
.last-words-player-tray {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
  overflow: visible !important;
  padding: 2px !important;
}

.last-words-player-chip,
.last-words-empty-chip {
  min-width: 0 !important;
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.last-words-archetype-strip {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 2px 2px 8px !important;
  scroll-snap-type: none !important;
}

.last-words-archetype-card {
  flex: initial !important;
  min-height: 116px !important;
  width: 100% !important;
  scroll-snap-align: none !important;
  padding: 9px !important;
}

.last-words-card-title {
  font-size: .72rem !important;
  line-height: 1.06 !important;
}

.last-words-card-subtitle {
  font-size: .58rem !important;
  min-height: 24px !important;
  line-height: 1.16 !important;
}

.last-words-card-chip-zone {
  min-height: 34px !important;
  gap: 4px !important;
}

.last-words-placed-chip {
  min-height: 24px !important;
  max-width: 100% !important;
  padding: 0 7px !important;
  font-size: .58rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 640px) {
  .last-words-card {
    padding: 10px 8px !important;
  }

  .last-words-mark-board {
    gap: 7px !important;
    padding: 8px !important;
  }

  .last-words-player-tray {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-height: 88px !important;
    overflow-y: auto !important;
  }

  .last-words-archetype-strip {
    max-height: 42vh !important;
  }

  .last-words-archetype-card {
    min-height: 102px !important;
    padding: 7px !important;
  }

  .last-words-card-title {
    font-size: .62rem !important;
  }

  .last-words-card-subtitle {
    display: none !important;
  }
}


/* ================= V1.2.24.14 POLISH: HARDER MONTE + LAST WORDS RULE FIX ================= */

.deceivers-truth-actions-top {
  margin: 10px auto 12px !important;
  padding: 10px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(214,168,79,.22) !important;
  background: rgba(0,0,0,.24) !important;
}

.deceivers-truth-actions-top #startDeceiversTruthRoundBtn {
  border-color: rgba(240,193,92,.78) !important;
  box-shadow: 0 0 20px rgba(214,168,79,.16) !important;
}

.last-words-archetype-card.has-mark {
  border-color: rgba(240,193,92,.62) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), transparent 58%),
    linear-gradient(180deg, rgba(46,18,14,.98), rgba(5,5,8,.98)) !important;
}

.last-words-archetype-card.has-mark.ready-to-place {
  box-shadow: none !important;
}

.last-words-archetype-card.has-mark .last-words-card-chip-zone em {
  display: none !important;
}


/* ================= V1.2.24.15 EASY VISUAL FIXES ================= */

/* Shield awarded screen: keep the bottom Return button fully visible on phones. */
.shield-awarded-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: max(12px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)) !important;
  overflow-y: auto !important;
}

.shield-awarded-card {
  max-height: calc(100dvh - 28px) !important;
  width: min(94vw, 680px) !important;
  overflow-y: auto !important;
  padding: clamp(14px, 2.2vh, 28px) clamp(14px, 4vw, 30px) !important;
  box-sizing: border-box !important;
}

.shield-awarded-card button,
#closeShieldAwardedOverlayBtn {
  position: sticky !important;
  bottom: 0 !important;
  margin-top: 12px !important;
  width: min(320px, 88vw) !important;
  min-height: 46px !important;
  z-index: 3 !important;
}

@media (max-width: 650px), (max-height: 760px) {
  .shield-awarded-icon-wrap {
    width: min(138px, 38vw) !important;
    height: min(138px, 38vw) !important;
    margin: 4px auto 8px !important;
  }

  .shield-awarded-icon-image {
    width: min(124px, 34vw) !important;
    height: min(124px, 34vw) !important;
  }

  .shield-awarded-card h2 {
    font-size: clamp(1.1rem, 6vw, 1.65rem) !important;
    margin: 5px 0 !important;
  }

  .shield-awarded-card h3 {
    font-size: clamp(.9rem, 4.5vw, 1.18rem) !important;
    margin: 5px 0 !important;
  }

  .shield-awarded-text,
  .shield-awarded-raven-line {
    font-size: .78rem !important;
    line-height: 1.25 !important;
    margin: 6px auto !important;
  }
}

/* The Table of Truth canvas: center the moving cards/Raven marks more cleanly. */
.deceivers-truth-board {
  display: grid !important;
  place-items: center !important;
}

#deceiversTruthCanvas {
  margin: 0 auto !important;
}


/* ================= V1.2.24.16 MAIN SCREEN CLEANUP + REMOTE CHALLENGE FULLSCREEN ================= */

/* Host command now lives inside The Raven's Clock instead of creating a separate box. */
.raven-clock-panel {
  pointer-events: auto !important;
  margin-bottom: 18px !important;
}

.raven-clock-panel .host-command-banner {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
  width: auto !important;
  margin: 16px auto 0 !important;
  padding: 12px 12px !important;
  border-width: 1px !important;
  border-radius: 16px !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), rgba(0,0,0,.46)),
    linear-gradient(180deg, rgba(55,20,12,.76), rgba(0,0,0,.64)) !important;
  box-shadow:
    0 0 22px rgba(214,168,79,.18),
    inset 0 0 18px rgba(214,168,79,.08) !important;
}

.raven-clock-panel .host-command-banner-label {
  font-size: .64rem !important;
  letter-spacing: .16em !important;
  margin-bottom: 5px !important;
}

.raven-clock-panel .host-command-banner-text {
  font-size: .82rem !important;
  line-height: 1.25 !important;
  margin-bottom: 7px !important;
}

.raven-clock-panel .host-command-jump-btn {
  min-width: 0 !important;
  width: min(300px, 86vw) !important;
  padding: 10px 12px !important;
  font-size: .78rem !important;
}

/* Secret Messages are now encouraged but tucked behind a button above The Table. */
.secret-messages-dock {
  margin: 12px auto 10px !important;
  width: min(520px, 100%) !important;
  display: flex;
  justify-content: center;
}

.secret-message-toggle-btn {
  position: relative;
  width: min(420px, 94vw) !important;
  min-height: 50px;
  border: 1px solid rgba(255,226,150,.54) !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.16), transparent 62%),
    linear-gradient(180deg, #c82636, #711018) !important;
  color: #fff !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase;
  box-shadow:
    0 0 18px rgba(157,23,35,.42),
    0 0 30px rgba(214,168,79,.10) !important;
  overflow: visible !important;
  animation: secretMessageOccasionalGoldPulse 7.5s ease-in-out infinite;
}

.secret-message-toggle-btn::before {
  content: "✉ ";
  color: #f0c15c;
}

.secret-message-toggle-btn.secret-message-toggle-open {
  background:
    radial-gradient(circle at top, rgba(214,168,79,.28), transparent 66%),
    linear-gradient(180deg, #9b1723, #33080c) !important;
  box-shadow:
    0 0 22px rgba(214,168,79,.28),
    0 0 34px rgba(157,23,35,.24) !important;
}

.secret-message-toggle-btn.secret-message-toggle-has-unread,
.secret-message-toggle-btn.secret-message-arrival-throb {
  animation: secretMessageUrgentGoldPulse 1.35s ease-in-out infinite !important;
}

.secret-message-toggle-btn .secret-unread-count {
  position: absolute;
  right: -6px;
  top: -9px;
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f0c15c;
  color: #170608;
  font-size: .78rem;
  font-weight: 950;
  border: 2px solid rgba(20,5,8,.95);
  box-shadow: 0 0 18px rgba(214,168,79,.54);
}

.secret-message-drawer {
  margin: 8px auto 12px !important;
  width: min(720px, 100%) !important;
  animation: secretDrawerOpen 260ms ease-out;
}

.secret-message-drawer.hidden {
  display: none !important;
}

@keyframes secretDrawerOpen {
  from {
    transform: translateY(-10px) scale(.985);
    opacity: .35;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes secretMessageOccasionalGoldPulse {
  0%, 78%, 100% {
    box-shadow:
      0 0 18px rgba(157,23,35,.42),
      0 0 30px rgba(214,168,79,.10);
    filter: brightness(1);
  }
  84% {
    box-shadow:
      0 0 28px rgba(214,168,79,.48),
      0 0 42px rgba(157,23,35,.24);
    filter: brightness(1.12);
  }
  90% {
    box-shadow:
      0 0 18px rgba(157,23,35,.42),
      0 0 30px rgba(214,168,79,.10);
    filter: brightness(1);
  }
}

@keyframes secretMessageUrgentGoldPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 18px rgba(157,23,35,.48),
      0 0 24px rgba(214,168,79,.22);
  }
  50% {
    transform: scale(1.035);
    box-shadow:
      0 0 30px rgba(214,168,79,.72),
      0 0 48px rgba(157,23,35,.36);
  }
}

/* Full-screen treatment for every remote/auto-scored game, matching FirePants/Raven's Path direction. */
.raven-quiz-panel:not(.hidden),
.raven-memory-panel:not(.hidden),
.raven-special-challenge-panel:not(.hidden),
.raven-cipher-panel:not(.hidden),
.raven-lock-panel:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999998 !important;
  margin: 0 !important;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.14), transparent 46%),
    linear-gradient(180deg, rgba(10,4,6,.99), rgba(0,0,0,.99)) !important;
  box-shadow: inset 0 0 90px rgba(0,0,0,.88) !important;
  overflow-y: auto !important;
  text-align: center !important;
}

.raven-quiz-panel:not(.hidden)::before,
.raven-memory-panel:not(.hidden)::before,
.raven-special-challenge-panel:not(.hidden)::before,
.raven-cipher-panel:not(.hidden)::before,
.raven-lock-panel:not(.hidden)::before {
  content: "🐦‍⬛  THE RAVEN'S CHALLENGE  🛡️";
  display: block;
  margin: 0 auto 10px;
  color: #f0c15c;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 18px rgba(214,168,79,.35), 0 2px 10px rgba(0,0,0,.9);
}

/* Make challenge content feel intentionally modal instead of like old inline cards. */
.raven-quiz-panel:not(.hidden) > *,
.raven-memory-panel:not(.hidden) > *,
.raven-special-challenge-panel:not(.hidden) > *,
.raven-cipher-panel:not(.hidden) > *,
.raven-lock-panel:not(.hidden) > * {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.raven-quiz-standings,
.raven-memory-standings,
.raven-special-standings {
  max-height: 32vh;
  overflow-y: auto;
}

@media (max-width: 760px) {
  .secret-message-toggle-btn {
    min-height: 46px;
    font-size: .78rem !important;
    letter-spacing: .06em !important;
  }

  .secret-message-form {
    display: grid;
    gap: 6px;
  }

  .secret-message-form textarea {
    min-height: 70px;
  }

  .raven-quiz-panel:not(.hidden),
  .raven-memory-panel:not(.hidden),
  .raven-special-challenge-panel:not(.hidden),
  .raven-cipher-panel:not(.hidden),
  .raven-lock-panel:not(.hidden) {
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)) !important;
  }

  .raven-quiz-panel:not(.hidden)::before,
  .raven-memory-panel:not(.hidden)::before,
  .raven-special-challenge-panel:not(.hidden)::before,
  .raven-cipher-panel:not(.hidden)::before,
  .raven-lock-panel:not(.hidden)::before {
    font-size: .78rem;
    letter-spacing: .08em;
  }
}


/* ================= V1.2.24.17 HOST COMMAND BOX CORRECTION ================= */
/* Host command is back under the clock, not inside the clock.
   The discussion phase-control command now lives neatly inside that host box. */

.raven-clock-panel {
  margin-bottom: 12px !important;
}

#hostCommandBanner.host-command-banner {
  position: sticky !important;
  top: 10px !important;
  z-index: 210 !important;
  width: min(640px, 94vw) !important;
  margin: 10px auto 18px !important;
  padding: 14px 14px 16px !important;
  border: 2px solid rgba(214,168,79,.72) !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.22), rgba(0,0,0,.78)),
    linear-gradient(180deg, rgba(55,20,12,.96), rgba(0,0,0,.94)) !important;
  box-shadow:
    0 0 38px rgba(214,168,79,.24),
    0 0 80px rgba(157,23,35,.14),
    inset 0 0 24px rgba(214,168,79,.10) !important;
  text-align: center !important;
  animation: hostCommandBannerGlow 3.2s ease-in-out infinite !important;
}

#hostCommandBanner .host-command-banner-label {
  color: #d6a84f !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
  letter-spacing: .20em !important;
  text-transform: uppercase !important;
  margin-bottom: 7px !important;
}

#hostCommandBanner .host-command-banner-text {
  color: #efe8df !important;
  font-size: .92rem !important;
  line-height: 1.35 !important;
  margin: 0 auto 10px !important;
  max-width: 560px !important;
}

.host-command-phase-control {
  margin: 10px auto 0 !important;
  padding: 12px !important;
  border: 1px solid rgba(255,226,150,.28) !important;
  border-radius: 16px !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.12), transparent 65%),
    rgba(0,0,0,.34) !important;
  box-shadow: inset 0 0 18px rgba(214,168,79,.06) !important;
}

.host-command-phase-control h3 {
  margin: 0 0 6px !important;
  color: #f0c15c !important;
  font-size: .88rem !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}

.host-command-phase-control .hint {
  margin: 0 auto 9px !important;
  font-size: .82rem !important;
  line-height: 1.25 !important;
}

.host-command-phase-control #endDiscussionBtn {
  width: min(360px, 88vw) !important;
  margin: 6px auto 0 !important;
  border-color: rgba(255,226,150,.58) !important;
  background:
    linear-gradient(180deg, #c82636, #7d111c) !important;
  box-shadow:
    0 0 22px rgba(157,23,35,.35),
    0 0 34px rgba(214,168,79,.12) !important;
}

#hostCommandBanner #hostCommandJumpBtn.hidden {
  display: none !important;
}

#hostCommandBanner #hostCommandJumpBtn:not(.hidden) {
  width: min(330px, 86vw) !important;
  margin: 8px auto 0 !important;
}

@media (max-width: 650px) {
  #hostCommandBanner.host-command-banner {
    padding: 12px 10px 13px !important;
    margin-top: 8px !important;
  }

  .host-command-phase-control {
    padding: 10px !important;
  }

  .host-command-phase-control .hint {
    font-size: .75rem !important;
  }
}


/* ================= V1.2.24.18 REPUTATION LABEL + LAST WORDS 3-COLUMN BOARD ================= */

#rpPotDisplay::after {
  content: " points";
  display: block;
  margin-top: 2px;
  color: rgba(240,193,92,.72);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Last Words: two mask columns with living player names centered between them. */
.last-words-card {
  width: min(97vw, 980px) !important;
}

.last-words-mark-board {
  overflow: hidden !important;
}

.last-words-judgment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, .78fr) minmax(0, 1fr);
  gap: 9px;
  min-height: 0;
  align-items: stretch;
}

.last-words-archetype-column {
  display: grid;
  grid-template-rows: repeat(4, minmax(68px, 1fr));
  gap: 7px;
  min-width: 0;
}

.last-words-player-column {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(214,168,79,.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.13), transparent 68%),
    rgba(0,0,0,.30);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.last-words-player-column-title {
  color: #f0c15c;
  font-size: .66rem;
  font-weight: 950;
  letter-spacing: .10em;
  text-transform: uppercase;
  text-align: center;
}

.last-words-player-column .last-words-player-tray {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: min(42vh, 380px) !important;
  padding: 0 2px 3px !important;
}

.last-words-player-column .last-words-player-chip,
.last-words-player-column .last-words-empty-chip {
  width: 100% !important;
  min-height: 34px !important;
  padding: 0 8px !important;
  font-size: .74rem !important;
  border-radius: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.last-words-archetype-column .last-words-archetype-card {
  width: 100% !important;
  min-height: 68px !important;
  padding: 7px !important;
  border-radius: 13px !important;
}

.last-words-archetype-column .last-words-card-title {
  font-size: .64rem !important;
  line-height: 1.05 !important;
  letter-spacing: .04em !important;
}

.last-words-archetype-column .last-words-card-subtitle {
  display: none !important;
}

.last-words-archetype-column .last-words-card-chip-zone {
  min-height: 24px !important;
  padding-top: 4px !important;
  margin-top: auto !important;
  gap: 3px !important;
}

.last-words-archetype-column .last-words-card-chip-zone em {
  font-size: .56rem !important;
}

.last-words-archetype-column .last-words-placed-chip {
  width: 100% !important;
  min-height: 22px !important;
  padding: 0 5px !important;
  font-size: .56rem !important;
  justify-content: center !important;
  border-radius: 999px !important;
}

#lastWordsArchetypeStrip {
  display: none !important;
}

@media (max-width: 640px) {
  .last-words-card {
    width: 98vw !important;
    padding: 8px 6px !important;
  }

  .last-words-intro {
    font-size: .70rem !important;
    margin-bottom: 4px !important;
  }

  .last-words-timer-row {
    margin: 5px auto 7px !important;
    padding: 6px 9px !important;
  }

  .last-words-board-status {
    font-size: .66rem !important;
    min-height: 26px !important;
    padding: 5px 6px !important;
  }

  .last-words-judgment-grid {
    grid-template-columns: minmax(0, 1fr) minmax(84px, .70fr) minmax(0, 1fr);
    gap: 5px;
  }

  .last-words-archetype-column {
    gap: 5px;
    grid-template-rows: repeat(4, minmax(56px, 1fr));
  }

  .last-words-archetype-column .last-words-archetype-card {
    min-height: 56px !important;
    padding: 5px !important;
  }

  .last-words-archetype-column .last-words-card-title {
    font-size: .52rem !important;
  }

  .last-words-archetype-column .last-words-card-chip-zone em {
    font-size: .48rem !important;
  }

  .last-words-player-column {
    padding: 5px !important;
    gap: 5px !important;
  }

  .last-words-player-column-title {
    font-size: .52rem !important;
    letter-spacing: .06em !important;
  }

  .last-words-player-column .last-words-player-chip {
    min-height: 30px !important;
    font-size: .64rem !important;
    padding: 0 5px !important;
  }

  .last-words-hint {
    font-size: .62rem !important;
    margin-top: 5px !important;
  }

  .last-words-card .death-cinematic-btn {
    min-height: 39px !important;
    margin-top: 6px !important;
  }
}


/* ================= V1.2.24.19 REPUTATION ECONOMY ================= */

#rpPotDisplay {
  color: #f0c15c !important;
  text-shadow:
    0 0 12px rgba(214,168,79,.36),
    0 0 28px rgba(214,168,79,.12);
}

.reputation-change-feed {
  border-color: rgba(240,193,92,.50) !important;
}


/* V1.2.24.21:
   Challenge Reputation remains active at all player counts because the winner is public knowledge.
   Vote-based Reputation still freezes below six to avoid revealing eliminated roles. */


/* ================= V1.2.24.22 REMOTE CHALLENGE CENTERING + SHIELD CLOSE FIX ================= */

/* Critical: prior CSS forced this overlay to flex even when hidden.
   This makes Return To The Table reliably close it and keeps it from blocking the table. */
.shield-awarded-overlay.hidden {
  display: none !important;
  pointer-events: none !important;
}

.shield-awarded-overlay {
  pointer-events: auto !important;
}

.shield-awarded-card {
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
}

#closeShieldAwardedOverlayBtn {
  position: relative !important;
  z-index: 9999999 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: rgba(240,193,92,.28) !important;
}

/* Center every "new" full-screen remote challenge as an actual stage.
   The previous version made them fullscreen but left several internal sections behaving like old inline panels. */
.raven-quiz-panel:not(.hidden),
.raven-memory-panel:not(.hidden),
.raven-special-challenge-panel:not(.hidden),
.raven-cipher-panel:not(.hidden),
.raven-lock-panel:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100vw !important;
  max-width: none !important;
  min-height: 100dvh !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

/* Main content width/centering. */
.raven-quiz-panel:not(.hidden) > *,
.raven-memory-panel:not(.hidden) > *,
.raven-special-challenge-panel:not(.hidden) > *,
.raven-cipher-panel:not(.hidden) > *,
.raven-lock-panel:not(.hidden) > * {
  width: min(920px, calc(100vw - 28px)) !important;
  max-width: 920px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

/* Center the pre-game instruction blocks and standings. */
.raven-quiz-subtitle,
.raven-memory-subtitle,
.raven-special-subtitle,
.raven-lock-instructions,
.raven-quiz-standings,
.raven-memory-standings,
.raven-special-standings {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

/* Center game-specific layouts that were still acting like old inline content. */
.raven-quiz-question,
.raven-quiz-answer-list,
.raven-memory-grid,
.raven-cipher-items,
.raven-lock-puzzle-list,
.raven-lock-puzzle,
.raven-special-standing-row,
.raven-memory-standing-row,
.raven-quiz-standing-row {
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Keep actual answer text readable; centered container, but answer labels can still read naturally. */
.raven-quiz-answer-list,
.raven-cipher-items,
.raven-lock-puzzle-list {
  width: min(760px, 100%) !important;
}

.raven-quiz-answer-list label,
.raven-cipher-items label,
.raven-lock-puzzle label {
  text-align: left !important;
}

/* Memory board should sit in the middle instead of hugging one side. */
.raven-memory-grid {
  justify-content: center !important;
  align-content: center !important;
  place-content: center !important;
}

/* Mobile safe centering. */
@media (max-width: 760px) {
  .raven-quiz-panel:not(.hidden) > *,
  .raven-memory-panel:not(.hidden) > *,
  .raven-special-challenge-panel:not(.hidden) > *,
  .raven-cipher-panel:not(.hidden) > *,
  .raven-lock-panel:not(.hidden) > * {
    width: min(100%, calc(100vw - 14px)) !important;
  }

  .raven-quiz-panel:not(.hidden),
  .raven-memory-panel:not(.hidden),
  .raven-special-challenge-panel:not(.hidden),
  .raven-cipher-panel:not(.hidden),
  .raven-lock-panel:not(.hidden) {
    padding-left: 7px !important;
    padding-right: 7px !important;
  }
}


/* ================= V1.2.24.23 RAVEN SPEAKS + ROLE REMINDER MOVE + MAIL ALARM ================= */

/* Raven side box now holds utility buttons only. */
.raven-box {
  padding: 12px !important;
}

.raven-box .see-rules-btn,
.raven-box .raven-role-reminder-btn,
.raven-box .study-masks-btn {
  width: 100% !important;
  margin: 8px 0 !important;
}

/* The Raven Speaks sits above the table and is intentionally shorter. */
.raven-speaks-panel {
  margin: 0 auto 12px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(214,168,79,.26);
  border-left: 4px solid rgba(214,168,79,.58);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), transparent 65%),
    rgba(0,0,0,.28);
  text-align: left;
}

.raven-speaks-panel h3 {
  margin: 0 0 6px !important;
  color: #d6a84f;
  font-size: .92rem;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
}

.raven-speaks-feed,
.raven-feed-list {
  max-height: 108px !important;
}

.raven-speaks-feed {
  margin-top: 0 !important;
  overflow-y: auto !important;
  font-size: .76rem !important;
}

.raven-speaks-feed .raven-feed-item,
.raven-feed-item {
  padding: 6px 8px !important;
  margin-bottom: 5px !important;
  line-height: 1.22 !important;
}

/* Mail waiting alarm: distracting on purpose. */
.secret-messages-dock.secret-mail-waiting {
  animation: secretMailboxDockShake 1.25s ease-in-out infinite !important;
}

.secret-message-toggle-btn.secret-message-toggle-has-unread,
.secret-message-toggle-btn.secret-message-arrival-throb {
  color: #1a0507 !important;
  border-color: rgba(255,255,255,.96) !important;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.98), rgba(240,193,92,.80) 44%, rgba(157,23,35,.92) 100%) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.42) !important;
  animation: secretMailWhiteAlarm 0.78s ease-in-out infinite !important;
}

.secret-message-toggle-btn.secret-message-toggle-has-unread::before,
.secret-message-toggle-btn.secret-message-arrival-throb::before {
  content: "✉ ";
  color: #fff !important;
  text-shadow:
    0 0 8px rgba(255,255,255,1),
    0 0 18px rgba(255,255,255,.88),
    0 0 34px rgba(240,193,92,.78) !important;
}

.secret-message-drawer.secret-mail-waiting,
.secret-messages-panel.secret-mail-waiting {
  border-color: rgba(255,255,255,.86) !important;
  box-shadow:
    0 0 18px rgba(255,255,255,.55),
    0 0 42px rgba(240,193,92,.36),
    inset 0 0 26px rgba(255,255,255,.08) !important;
  animation: secretMailboxPanelPulse 1.05s ease-in-out infinite !important;
}

.secret-message-drawer.secret-mail-waiting .secret-messages-header h3::after {
  content: "  • MAIL WAITING";
  color: #fff;
  font-size: .72em;
  text-shadow:
    0 0 10px rgba(255,255,255,.95),
    0 0 18px rgba(240,193,92,.78);
}

@keyframes secretMailWhiteAlarm {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 16px rgba(255,255,255,.52),
      0 0 26px rgba(240,193,92,.38),
      0 0 44px rgba(157,23,35,.34);
    filter: brightness(1.02);
  }
  50% {
    transform: scale(1.055);
    box-shadow:
      0 0 28px rgba(255,255,255,.95),
      0 0 52px rgba(240,193,92,.70),
      0 0 76px rgba(157,23,35,.46);
    filter: brightness(1.32);
  }
}

@keyframes secretMailboxPanelPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

@keyframes secretMailboxDockShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-2px); }
  30% { transform: translateX(2px); }
  45% { transform: translateX(-1px); }
  60% { transform: translateX(1px); }
}

.room-table {
  margin-bottom: 10px !important;
}

.table-of-deception-panel {
  margin-top: 12px !important;
}

@media (max-width: 800px) {
  .raven-speaks-panel {
    margin-top: 6px !important;
  }

  .raven-speaks-feed,
  .raven-feed-list {
    max-height: 86px !important;
  }

  .raven-side-panel {
    position: static !important;
  }
}


/* ================= V1.2.24.24 SECRET MESSAGE REDESIGN + BUTTON COLOR LANGUAGE ================= */

/* Button color language:
   emerald = safe/help/reference
   blue/silver = information/mailbox
   red = secret/danger/private
   gold = lore/character/world */
.see-rules-btn,
.raven-role-reminder-btn,
#closeShieldAwardedOverlayBtn,
.return-to-table-btn {
  border-color: rgba(83, 230, 165, .68) !important;
  color: #f4fff8 !important;
  background:
    linear-gradient(180deg, rgba(16,121,83,.96), rgba(5,54,40,.96)) !important;
  box-shadow:
    0 0 18px rgba(83,230,165,.22),
    inset 0 0 14px rgba(255,255,255,.06) !important;
}

.raven-role-reminder-btn {
  border-color: rgba(154,210,255,.64) !important;
  background:
    linear-gradient(180deg, rgba(38,83,121,.96), rgba(10,28,54,.96)) !important;
  box-shadow:
    0 0 18px rgba(154,210,255,.20),
    inset 0 0 14px rgba(255,255,255,.06) !important;
}

.study-masks-btn {
  border-color: rgba(214,168,79,.72) !important;
  color: #fff5d7 !important;
  background:
    linear-gradient(180deg, rgba(132,88,24,.98), rgba(58,33,10,.98)) !important;
  box-shadow:
    0 0 18px rgba(214,168,79,.22),
    inset 0 0 14px rgba(255,255,255,.05) !important;
}

.secret-message-action-bar {
  margin: 10px auto 8px !important;
  padding: 8px !important;
  border: 1px solid rgba(214,168,79,.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.09), transparent 70%),
    rgba(0,0,0,.24);
}

.secret-message-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.secret-message-compose-btn,
.secret-message-toggle-btn {
  min-height: 42px !important;
  width: 100% !important;
  margin: 0 !important;
  border-radius: 14px !important;
  font-weight: 950 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
}

.secret-message-compose-btn {
  color: #ffecef !important;
  border-color: rgba(255,125,140,.62) !important;
  background:
    linear-gradient(180deg, rgba(157,23,35,.98), rgba(74,8,16,.98)) !important;
  box-shadow:
    0 0 18px rgba(157,23,35,.26),
    inset 0 0 14px rgba(255,255,255,.05) !important;
}

.secret-message-compose-btn.secret-message-pick-active {
  color: #170505 !important;
  border-color: rgba(255,255,255,.92) !important;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.95), rgba(240,193,92,.78), rgba(157,23,35,.95)) !important;
  animation: secretMailWhiteAlarm .78s ease-in-out infinite !important;
}

.secret-message-toggle-btn {
  color: #edf7ff !important;
  border-color: rgba(154,210,255,.64) !important;
  background:
    linear-gradient(180deg, rgba(38,83,121,.96), rgba(9,24,49,.98)) !important;
  box-shadow:
    0 0 18px rgba(154,210,255,.20),
    inset 0 0 14px rgba(255,255,255,.05) !important;
}

.secret-message-pick-prompt {
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 12px;
  color: #fff;
  background: rgba(157,23,35,.28);
  text-align: center;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: secretMailboxPanelPulse 1.05s ease-in-out infinite !important;
}

/* Make the big Secret Messages panel a floating modal so it never pushes public chat down. */
.secret-message-modal {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 999997 !important;
  width: min(92vw, 520px) !important;
  max-height: min(82dvh, 680px) !important;
  overflow-y: auto !important;
  margin: 0 !important;
  text-align: left !important;
  box-shadow:
    0 0 0 9999px rgba(0,0,0,.56),
    0 0 42px rgba(214,168,79,.24),
    0 0 80px rgba(0,0,0,.70) !important;
}

.secret-messages-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.secret-message-close-btn {
  width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: rgba(157,23,35,.84) !important;
  border: 1px solid rgba(255,255,255,.35) !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
}

/* Compose mode only shows send form. Mailbox mode only shows received mail. */
.secret-message-modal.secret-compose-mode .secret-message-divider,
.secret-message-modal.secret-compose-mode .secret-inbox-title,
.secret-message-modal.secret-compose-mode .secret-messages-inbox {
  display: none !important;
}

.secret-message-modal.secret-mailbox-mode .hint,
.secret-message-modal.secret-mailbox-mode .secret-message-form,
.secret-message-modal.secret-mailbox-mode #secretMessageNotice {
  display: none !important;
}

.secret-message-modal.secret-mailbox-mode .secret-message-divider {
  display: none !important;
}

.secret-message-form select {
  pointer-events: none !important;
  opacity: .78 !important;
  background: rgba(0,0,0,.50) !important;
}

.secret-message-form label[for="secretRecipientSelect"]::after {
  content: " — chosen from the table";
  color: rgba(214,168,79,.78);
  font-size: .78em;
}

.room-table.secret-recipient-pick-mode {
  box-shadow:
    0 0 28px rgba(255,255,255,.26),
    0 0 46px rgba(240,193,92,.24),
    inset 0 0 36px rgba(157,23,35,.18) !important;
}

.room-player-list.secret-recipient-pick-mode .room-player-seat {
  cursor: pointer !important;
  animation: secretRecipientSeatPulse 1.1s ease-in-out infinite !important;
}

.room-player-list.secret-recipient-pick-mode .room-player-seat:hover,
.room-player-list.secret-recipient-pick-mode .room-player-seat:focus {
  transform: translate(-50%, -50%) scale(1.08) !important;
  z-index: 20 !important;
  border-color: rgba(255,255,255,.82) !important;
}

.room-player-seat {
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  cursor: default;
}

@keyframes secretRecipientSeatPulse {
  0%, 100% {
    border-color: rgba(255,255,255,.28);
    box-shadow: 0 0 8px rgba(255,255,255,.10);
  }
  50% {
    border-color: rgba(255,255,255,.78);
    box-shadow:
      0 0 18px rgba(255,255,255,.58),
      0 0 30px rgba(240,193,92,.36);
  }
}

@media (max-width: 760px) {
  .secret-message-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .secret-message-compose-btn,
  .secret-message-toggle-btn {
    min-height: 40px !important;
    font-size: .68rem !important;
    letter-spacing: .04em !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .secret-message-modal {
    width: min(96vw, 520px) !important;
    max-height: 84dvh !important;
  }
}

/* ================= V1.2.24.25 PREMIUM TABLE OF DECEPTION ================= */
/* Layout intentionally unchanged. This patch only upgrades the visual treatment of the table. */

.room-table {
  position: relative !important;
  isolation: isolate !important;
  overflow: visible !important;
  min-height: 280px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(204, 154, 63, 0.48) !important;
  background:
    radial-gradient(circle at 50% 46%, rgba(83, 24, 30, 0.96) 0%, rgba(46, 16, 22, 0.95) 26%, rgba(28, 12, 16, 0.98) 42%, rgba(14, 7, 10, 0.99) 64%, rgba(5, 3, 4, 0.98) 80%),
    radial-gradient(circle at 50% 48%, rgba(255, 214, 138, 0.06) 0%, rgba(255, 214, 138, 0) 48%),
    repeating-radial-gradient(circle at 50% 49%, rgba(115, 64, 34, 0.10) 0 8px, rgba(57, 27, 18, 0.12) 8px 15px, rgba(0, 0, 0, 0) 15px 28px),
    linear-gradient(135deg, rgba(78, 43, 22, 0.18), rgba(0, 0, 0, 0) 36%, rgba(114, 65, 31, 0.12) 62%, rgba(0, 0, 0, 0) 100%) !important;
  box-shadow:
    inset 0 0 0 2px rgba(255, 229, 176, 0.08),
    inset 0 0 0 10px rgba(88, 55, 28, 0.26),
    inset 0 0 34px rgba(255, 188, 87, 0.08),
    inset 0 -22px 36px rgba(0, 0, 0, 0.58),
    inset 0 28px 40px rgba(255, 214, 140, 0.04),
    0 16px 34px rgba(0, 0, 0, 0.56),
    0 0 36px rgba(214, 168, 79, 0.12) !important;
}

.room-table::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  border: 1px solid rgba(214, 168, 79, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 233, 187, 0.05),
    inset 0 0 18px rgba(214, 168, 79, 0.06);
  background:
    radial-gradient(circle at 50% 46%, rgba(125, 49, 47, 0.20) 0%, rgba(26, 10, 14, 0.04) 50%, rgba(0, 0, 0, 0) 64%),
    radial-gradient(circle at 28% 24%, rgba(255, 220, 153, 0.08) 0%, rgba(255, 220, 153, 0) 18%),
    radial-gradient(circle at 72% 28%, rgba(255, 220, 153, 0.06) 0%, rgba(255, 220, 153, 0) 16%),
    radial-gradient(circle at 52% 74%, rgba(255, 220, 153, 0.04) 0%, rgba(255, 220, 153, 0) 20%),
    repeating-linear-gradient(24deg, rgba(255, 255, 255, 0.018) 0 2px, rgba(0, 0, 0, 0) 2px 10px),
    repeating-linear-gradient(-28deg, rgba(0, 0, 0, 0.055) 0 3px, rgba(0, 0, 0, 0) 3px 12px);
}

.room-table::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132px;
  height: 132px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 226, 174, 0.12) 0%, rgba(214, 168, 79, 0.06) 26%, rgba(0, 0, 0, 0) 58%),
    url("/images/ui/raven-shield-ornate.webp") center/68% no-repeat;
  opacity: 0.30;
  filter: drop-shadow(0 0 12px rgba(214,168,79,.22)) drop-shadow(0 0 22px rgba(214,168,79,.14));
}

.room-player-list {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
}

.table-center-text {
  z-index: 1 !important;
  inset: 44% 0 auto !important;
  text-align: center !important;
  color: #e6c27b !important;
  font-weight: 900 !important;
  font-size: 0.98rem !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  text-shadow:
    0 1px 0 rgba(255, 235, 199, 0.24),
    0 0 10px rgba(214, 168, 79, 0.18),
    0 3px 12px rgba(0, 0, 0, 0.82) !important;
}

.table-center-text::before,
.table-center-text::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  margin: 0 12px 0 12px;
  vertical-align: middle;
  background: linear-gradient(90deg, rgba(214,168,79,0), rgba(214,168,79,0.85), rgba(214,168,79,0));
  box-shadow: 0 0 8px rgba(214,168,79,.18);
}

.room-player-seat {
  width: 112px !important;
  min-height: 62px !important;
  padding: 10px 8px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(216, 177, 97, 0.34) !important;
  background:
    linear-gradient(180deg, rgba(48, 21, 18, 0.96), rgba(18, 7, 10, 0.97)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 227, 180, 0.12),
    inset 0 -8px 16px rgba(0, 0, 0, 0.44),
    0 6px 18px rgba(0, 0, 0, 0.48),
    0 0 12px rgba(214, 168, 79, 0.10) !important;
  backdrop-filter: blur(1.5px);
}

.room-player-seat::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 12px;
  pointer-events: none;
  border: 1px solid rgba(255, 229, 185, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 236, 200, 0.04), rgba(255, 236, 200, 0) 36%),
    radial-gradient(circle at 50% 120%, rgba(214, 168, 79, 0.10), rgba(214, 168, 79, 0) 62%);
}

.room-player-seat::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: -6px;
  height: 10px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 220, 156, 0.22), rgba(255, 220, 156, 0) 72%);
  opacity: 0.9;
}

.room-player-seat:hover,
.room-player-seat:focus-visible {
  border-color: rgba(239, 199, 114, 0.64) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 205, 0.16),
    inset 0 -10px 18px rgba(0, 0, 0, 0.52),
    0 10px 22px rgba(0, 0, 0, 0.52),
    0 0 20px rgba(214, 168, 79, 0.20) !important;
}

.room-player-seat .player-identity.compact {
  position: relative;
  z-index: 2;
}

.room-player-seat .player-display-name,
.room-player-seat .host-wing-player-name {
  color: #f5e7c4 !important;
  font-weight: 850 !important;
  letter-spacing: 0.03em !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.8) !important;
}

.room-player-seat .player-status-badges.compact {
  gap: 4px !important;
}

.room-player-seat .player-status-badges.compact .player-status-badge {
  border-color: rgba(214,168,79,.20) !important;
  background: rgba(0,0,0,.38) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
}

.room-player-seat .host-wing-name.compact {
  color: #ffe3a0 !important;
}

.room-player-seat .host-wing {
  filter:
    drop-shadow(0 0 8px rgba(214,168,79,.34))
    drop-shadow(0 2px 6px rgba(0,0,0,.68)) !important;
}

@media (max-width: 900px) {
  .room-table::after {
    width: 110px;
    height: 110px;
    background:
      radial-gradient(circle at 50% 42%, rgba(255, 226, 174, 0.11) 0%, rgba(214, 168, 79, 0.05) 26%, rgba(0, 0, 0, 0) 58%),
      url('/images/ui/raven-shield-ornate.webp') center/56% no-repeat;
  }

  .table-center-text {
    font-size: 0.90rem !important;
    letter-spacing: 0.18em !important;
  }

  .room-player-seat {
    width: 104px !important;
    min-height: 58px !important;
    padding: 8px 7px !important;
  }
}

@media (max-width: 650px) {
  .room-table {
    min-height: 270px !important;
    box-shadow:
      inset 0 0 0 2px rgba(255, 229, 176, 0.06),
      inset 0 0 0 8px rgba(88, 55, 28, 0.22),
      inset 0 0 28px rgba(255, 188, 87, 0.06),
      inset 0 -18px 30px rgba(0, 0, 0, 0.54),
      0 12px 24px rgba(0, 0, 0, 0.48),
      0 0 24px rgba(214, 168, 79, 0.10) !important;
  }

  .room-table::before {
    inset: 12px;
  }

  .room-table::after {
    width: 92px;
    height: 92px;
    opacity: 0.22;
    background:
      radial-gradient(circle at 50% 42%, rgba(255, 226, 174, 0.10) 0%, rgba(214, 168, 79, 0.05) 28%, rgba(0, 0, 0, 0) 60%),
      url('/images/ui/raven-emblem.webp') center/54% no-repeat;
  }

  .table-center-text {
    inset: 44.5% 8px auto !important;
    font-size: 0.74rem !important;
    letter-spacing: 0.12em !important;
    line-height: 1.2 !important;
  }

  .table-center-text::before,
  .table-center-text::after {
    width: 18px;
    margin: 0 6px;
  }

  .room-player-seat {
    width: 92px !important;
    min-height: 54px !important;
    padding: 7px 6px !important;
    border-radius: 14px !important;
  }

  .room-player-seat .host-wing-player-name,
  .room-player-seat .player-display-name {
    max-width: 72px !important;
    font-size: .72rem !important;
  }

  .room-player-seat .player-status-badges.compact {
    gap: 2px !important;
  }

  .room-player-seat .player-status-badges.compact .player-status-badge {
    min-height: 16px !important;
    padding: 1px 5px !important;
    font-size: .5rem !important;
  }
}


/* ================= V1.2.24.26 TABLE TEXT + SECRET DOCK PLACEMENT FIX ================= */
/* Secret Messages now sits under The Raven Speaks and above the table in HTML.
   These styles just make that placement breathe correctly without moving anything else. */

.raven-speaks-panel + .secret-message-action-bar {
  margin-top: 10px !important;
  margin-bottom: 12px !important;
}

.secret-message-action-bar + .room-table {
  margin-top: 12px !important;
}

/* Keep the Table of Deception title inside the open center of the table.
   It no longer stretches across the whole table where side player boxes can cover it. */
.room-table .table-center-text {
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  inset: auto !important;
  transform: translate(-50%, -50%) !important;
  width: min(48%, 260px) !important;
  max-width: 260px !important;
  padding: 9px 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(214, 168, 79, 0.20) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.12), rgba(0,0,0,0) 58%),
    rgba(12, 6, 8, 0.42) !important;
  box-shadow:
    inset 0 0 14px rgba(0,0,0,.42),
    0 0 18px rgba(214,168,79,.10) !important;
  white-space: normal !important;
  line-height: 1.22 !important;
  overflow-wrap: normal !important;
  z-index: 1 !important;
}

/* The decorative lines were making the title wider than the safe middle area.
   Keep the engraving feel without letting it run under player names. */
.room-table .table-center-text::before,
.room-table .table-center-text::after {
  width: 18px !important;
  margin: 0 7px !important;
}

/* Slightly slimmer premium nameplates reduce crowding while keeping the upgraded table style. */
.room-table .room-player-seat {
  width: 100px !important;
  min-height: 58px !important;
  padding: 8px 7px !important;
}

.room-table .room-player-seat .host-wing-player-name,
.room-table .room-player-seat .player-display-name {
  max-width: 84px !important;
}

/* When choosing a secret-message recipient, the player seats can still glow clearly
   without covering the center wording. */
.room-player-list.secret-recipient-pick-mode .room-player-seat:hover,
.room-player-list.secret-recipient-pick-mode .room-player-seat:focus {
  z-index: 4 !important;
}

@media (max-width: 900px) {
  .room-table .table-center-text {
    width: min(46%, 220px) !important;
    max-width: 220px !important;
    padding: 8px 10px !important;
    font-size: .78rem !important;
    letter-spacing: .12em !important;
  }

  .room-table .room-player-seat {
    width: 92px !important;
    min-height: 54px !important;
    padding: 7px 6px !important;
  }

  .room-table .room-player-seat .host-wing-player-name,
  .room-table .room-player-seat .player-display-name {
    max-width: 76px !important;
  }
}

@media (max-width: 650px) {
  .room-table .table-center-text {
    width: min(44%, 168px) !important;
    max-width: 168px !important;
    padding: 7px 8px !important;
    font-size: .62rem !important;
    letter-spacing: .08em !important;
    line-height: 1.18 !important;
  }

  .room-table .table-center-text::before,
  .room-table .table-center-text::after {
    display: none !important;
  }

  .room-table .room-player-seat {
    width: 82px !important;
    min-height: 50px !important;
    padding: 6px 5px !important;
  }

  .room-table .room-player-seat .host-wing-player-name,
  .room-table .room-player-seat .player-display-name {
    max-width: 66px !important;
    font-size: .68rem !important;
  }
}

@media (max-width: 420px) {
  .room-table .table-center-text {
    width: min(42%, 136px) !important;
    max-width: 136px !important;
    font-size: .55rem !important;
    letter-spacing: .055em !important;
  }

  .room-table .room-player-seat {
    width: 76px !important;
    min-height: 48px !important;
  }

  .room-table .room-player-seat .host-wing-player-name,
  .room-table .room-player-seat .player-display-name {
    max-width: 60px !important;
    font-size: .64rem !important;
  }
}


/* ================= V1.2.24.27 TABLE TITLE CENTER + OPAQUE SECRET CONTROLS FIX ================= */
/* The previous patch accidentally put `inset:auto` after left/top, which let the browser
   ignore the intended center placement. This forces the center title into the table again. */
.room-table .table-center-text {
  position: absolute !important;
  inset: auto !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  z-index: 3 !important;
  width: min(38%, 210px) !important;
  max-width: 210px !important;
  min-width: 128px !important;
  padding: 8px 10px !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.18), rgba(0,0,0,0) 58%),
    linear-gradient(180deg, rgba(20, 10, 11, .94), rgba(7, 4, 5, .90)) !important;
  border: 1px solid rgba(214, 168, 79, 0.34) !important;
  box-shadow:
    inset 0 0 16px rgba(0,0,0,.70),
    0 0 18px rgba(214,168,79,.18),
    0 6px 18px rgba(0,0,0,.48) !important;
  pointer-events: none !important;
}

/* Keep player seats above the table, but no longer above the title unless they are actively hovered. */
.room-table .room-player-seat {
  z-index: 2 !important;
}

.room-table .room-player-seat:hover,
.room-table .room-player-seat:focus-visible {
  z-index: 4 !important;
}

/* Secret message buttons sit over busy parts of the page, so make the control bar and buttons solid. */
.secret-message-action-bar {
  position: relative !important;
  z-index: 10 !important;
  background:
    linear-gradient(180deg, rgba(12, 7, 9, .98), rgba(5, 3, 5, .98)) !important;
  border-color: rgba(214,168,79,.42) !important;
  box-shadow:
    inset 0 0 16px rgba(0,0,0,.72),
    0 8px 24px rgba(0,0,0,.54),
    0 0 18px rgba(214,168,79,.10) !important;
  backdrop-filter: none !important;
}

.secret-message-compose-btn {
  background:
    linear-gradient(180deg, rgb(157, 23, 35), rgb(74, 8, 16)) !important;
  box-shadow:
    inset 0 0 12px rgba(255,255,255,.05),
    0 0 18px rgba(157,23,35,.32),
    0 5px 14px rgba(0,0,0,.54) !important;
}

.secret-message-toggle-btn {
  background:
    linear-gradient(180deg, rgb(38, 83, 121), rgb(9, 24, 49)) !important;
  box-shadow:
    inset 0 0 12px rgba(255,255,255,.05),
    0 0 18px rgba(154,210,255,.24),
    0 5px 14px rgba(0,0,0,.54) !important;
}

.secret-message-pick-prompt {
  background:
    linear-gradient(180deg, rgba(105, 15, 25, .98), rgba(35, 5, 9, .98)) !important;
  box-shadow:
    inset 0 0 10px rgba(0,0,0,.60),
    0 0 12px rgba(255,255,255,.10) !important;
}

/* Floating compose/mailbox modal also needs to be opaque so no table/chat text bleeds through. */
.secret-message-modal,
.secret-messages-panel.secret-message-modal {
  background:
    linear-gradient(180deg, rgba(15, 9, 12, .99), rgba(5, 3, 5, .99)) !important;
  border-color: rgba(214,168,79,.50) !important;
  backdrop-filter: none !important;
}

.secret-message-modal .secret-message-form,
.secret-message-modal .secret-messages-inbox,
.secret-message-modal textarea,
.secret-message-modal select {
  background-color: rgba(0,0,0,.82) !important;
}

/* Mobile/tablet refinements for title center. */
@media (max-width: 900px) {
  .room-table .table-center-text {
    width: min(34%, 178px) !important;
    max-width: 178px !important;
    min-width: 112px !important;
    font-size: .70rem !important;
    letter-spacing: .09em !important;
    padding: 7px 8px !important;
  }
}

@media (max-width: 650px) {
  .room-table .table-center-text {
    width: min(32%, 132px) !important;
    max-width: 132px !important;
    min-width: 92px !important;
    font-size: .54rem !important;
    letter-spacing: .045em !important;
    padding: 6px 7px !important;
  }
}

@media (max-width: 420px) {
  .room-table .table-center-text {
    width: min(31%, 112px) !important;
    max-width: 112px !important;
    min-width: 84px !important;
    font-size: .48rem !important;
    letter-spacing: .035em !important;
    padding: 5px 6px !important;
  }
}


/* ================= V1.2.24.28 THE TABLE OF DECEPTION COLOR LANGUAGE PASS ================= */
/*
  Goal: make adjacent controls stand apart while still feeling like one world.
  Palette:
  - Raven Gold: lore, archetypes, Raven actions
  - Blood Ruby: secret, danger, vote, deception
  - Emerald Oath: rules, safe return, guidance
  - Moonsteel Blue: information, mailbox, reminders
  - Bone/Ivory: text, readability, focused highlights
*/

:root {
  --deceived-black: #050305;
  --deceived-black-2: #0b0608;
  --deceived-smoke: #151015;
  --deceived-raven-gold: #d6a84f;
  --deceived-hot-gold: #f1cf7a;
  --deceived-old-gold: #7c4b13;
  --deceived-blood: #9d1723;
  --deceived-blood-dark: #4d0710;
  --deceived-blood-bright: #d9444f;
  --deceived-emerald: #0f7a52;
  --deceived-emerald-dark: #053c2e;
  --deceived-emerald-glow: #54e6a5;
  --deceived-moon: #315f89;
  --deceived-moon-dark: #091a34;
  --deceived-moon-glow: #9ad2ff;
  --deceived-bone: #f4ead3;
  --deceived-muted: #b7a892;
}

/* Unify the gothic world underneath every control without flattening the distinct colors. */
button,
.button,
input[type="button"],
input[type="submit"] {
  text-shadow: 0 2px 8px rgba(0,0,0,.78) !important;
}

/* Shared premium button shell. */
button:not(.secret-message-close-btn):not(.last-words-card):not(.last-words-player-pill) {
  border-width: 1px !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.11),
    inset 0 -9px 18px rgba(0,0,0,.28),
    0 6px 16px rgba(0,0,0,.38) !important;
}

/* Emerald Oath: help, safety, rules, returning to the table. */
#seeRulesBtn,
.see-rules-btn,
.rules-btn,
.return-to-table-btn,
#closeShieldAwardedOverlayBtn,
#backToTableBtn,
#returnToTableBtn,
#returnToTableAfterDeathBtn,
button[data-action="return"],
button[data-action="rules"] {
  color: #f5fff8 !important;
  border-color: rgba(84, 230, 165, .72) !important;
  background:
    linear-gradient(180deg, rgba(20, 135, 91, .98) 0%, rgba(6, 72, 52, .98) 58%, rgba(4, 35, 28, .99) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(214,255,235,.18),
    inset 0 -11px 20px rgba(0,0,0,.34),
    0 0 20px rgba(84,230,165,.22),
    0 7px 16px rgba(0,0,0,.45) !important;
}

/* Moonsteel: private info, role reminder, mailbox, neutral knowledge. */
#ravenRoleReminderBtn,
.raven-role-reminder-btn,
#secretMessagesToggleBtn,
.secret-message-toggle-btn,
#closeRulesBtn,
#closeRoleReminderBtn,
button.secondary,
.secondary {
  color: #edf8ff !important;
  border-color: rgba(154, 210, 255, .68) !important;
  background:
    linear-gradient(180deg, rgba(50, 98, 139, .98) 0%, rgba(13, 40, 77, .98) 58%, rgba(6, 17, 36, .99) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(219,243,255,.16),
    inset 0 -11px 20px rgba(0,0,0,.34),
    0 0 20px rgba(154,210,255,.20),
    0 7px 16px rgba(0,0,0,.45) !important;
}

/* Raven Gold: lore, archetypes, masks, general Raven page/world actions. */
#studyMasksBtn,
.study-masks-btn,
#determineFateBtn,
#submitRavenPlacementBtn,
#letFateDecideBtn,
#drawChallengeBtn,
#rerollChallengeBtn,
#awardShieldBtn,
#beginVotingBtn,
#startGameBtn,
#createRoomBtn,
#joinRoomBtn,
#submitRavenPreferenceBtn,
button.raven-action,
button.gold-action {
  color: #fff5d7 !important;
  border-color: rgba(241, 207, 122, .70) !important;
  background:
    linear-gradient(180deg, rgba(142, 91, 23, .98) 0%, rgba(83, 45, 10, .99) 56%, rgba(33, 18, 5, .99) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,238,185,.18),
    inset 0 -12px 20px rgba(0,0,0,.34),
    0 0 20px rgba(214,168,79,.22),
    0 7px 16px rgba(0,0,0,.45) !important;
}

/* Blood Ruby: secret, vote, danger, deception, destructive actions. */
#secretComposeBtn,
.secret-message-compose-btn,
#sendSecretMessageBtn,
#submitVoteBtn,
#endDiscussionBtn,
#finalizeVoteBtn,
#noChallengeWinnerBtn,
#deleteRoomBtn,
button.danger,
.danger,
button.vote-btn {
  color: #fff0f1 !important;
  border-color: rgba(255, 126, 140, .66) !important;
  background:
    linear-gradient(180deg, rgba(167, 24, 38, .99) 0%, rgba(94, 9, 21, .99) 58%, rgba(38, 4, 10, .99) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,210,216,.16),
    inset 0 -12px 20px rgba(0,0,0,.36),
    0 0 20px rgba(157,23,35,.28),
    0 7px 16px rgba(0,0,0,.45) !important;
}

/* Addressing the public table is not as dangerous as voting or secret mail:
   give it brass-black so it does not sit beside red or blue as the same visual weight. */
#addressTableBtn {
  color: #fff1cc !important;
  border-color: rgba(214, 168, 79, .62) !important;
  background:
    linear-gradient(180deg, rgba(92, 58, 18, .99), rgba(29, 18, 8, .99)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,232,181,.13),
    inset 0 -10px 18px rgba(0,0,0,.34),
    0 0 14px rgba(214,168,79,.18),
    0 6px 14px rgba(0,0,0,.42) !important;
}

/* Mail waiting should intentionally break the normal palette and scream unread. */
#secretMessagesToggleBtn.secret-message-toggle-has-unread,
.secret-message-toggle-btn.secret-message-toggle-has-unread {
  color: #190a05 !important;
  border-color: rgba(255, 255, 255, .96) !important;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.96) 0%, rgba(255,235,178,.90) 34%, rgba(241,207,122,.78) 58%, rgba(119,63,14,.96) 100%) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -12px 20px rgba(92,50,10,.22),
    0 0 24px rgba(255,255,255,.75),
    0 0 46px rgba(241,207,122,.48),
    0 7px 16px rgba(0,0,0,.45) !important;
}

/* Strong focus/hover language across colors. */
button:not(:disabled):hover,
.button:not(:disabled):hover {
  filter: brightness(1.12) saturate(1.08) !important;
}

button:not(:disabled):active {
  filter: brightness(.95) saturate(1.02) !important;
  transform: translateY(1px);
}

button:focus-visible,
.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(244, 234, 211, .86) !important;
  outline-offset: 2px !important;
}

/* Panels: make the whole page feel like one candlelit gothic world. */
.panel,
.raven-box,
.raven-speaks-panel,
.secret-message-action-bar,
.table-of-deception-panel,
.secret-messages-panel,
.challenge-placeholder-panel,
.voting-panel,
.end-game-decision-panel,
.final-reveal-panel,
.role-instruction-box,
.late-join-waiting-panel,
.pending-join-panel,
.game-status-row > div {
  border-color: rgba(214,168,79,.26) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.055), rgba(0,0,0,0) 52%),
    linear-gradient(180deg, rgba(14, 8, 11, .92), rgba(6, 3, 5, .94)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,235,190,.05),
    inset 0 -16px 28px rgba(0,0,0,.28),
    0 8px 20px rgba(0,0,0,.36) !important;
}

/* Raven Speaks gets the narrator blue-black look rather than generic red/black. */
.raven-speaks-panel {
  border-color: rgba(214,168,79,.38) !important;
  background:
    radial-gradient(circle at 18% 20%, rgba(154,210,255,.10), rgba(0,0,0,0) 34%),
    radial-gradient(circle at 82% 6%, rgba(214,168,79,.10), rgba(0,0,0,0) 38%),
    linear-gradient(180deg, rgba(13, 21, 30, .96), rgba(6, 5, 8, .98)) !important;
}

.raven-speaks-panel h3,
.table-of-deception-panel h3,
.secret-messages-panel h3,
.panel h2,
.panel h3 {
  color: var(--deceived-hot-gold) !important;
  text-shadow:
    0 0 10px rgba(214,168,79,.24),
    0 3px 12px rgba(0,0,0,.88) !important;
}

/* Input fields should sit back instead of competing with the buttons. */
input,
textarea,
select {
  color: var(--deceived-bone) !important;
  border-color: rgba(214,168,79,.22) !important;
  background:
    linear-gradient(180deg, rgba(7,5,7,.96), rgba(2,2,3,.98)) !important;
  box-shadow:
    inset 0 0 14px rgba(0,0,0,.64),
    0 0 0 1px rgba(255,255,255,.02) !important;
}

input::placeholder,
textarea::placeholder {
  color: rgba(244,234,211,.45) !important;
}

/* Status numbers retain the Reputation/gold identity. */
#rpPotDisplay,
#phaseTimerDisplay,
.game-status-row strong,
.status-number,
.reputation-value {
  color: var(--deceived-hot-gold) !important;
  text-shadow:
    0 0 12px rgba(214,168,79,.24),
    0 2px 8px rgba(0,0,0,.75) !important;
}

/* Special result/status chips. */
.player-status-badge {
  background:
    linear-gradient(180deg, rgba(17,12,12,.90), rgba(2,2,3,.92)) !important;
}

.shield-status-badge {
  color: #dffdec !important;
  border-color: rgba(84,230,165,.42) !important;
}

.dagger-status-badge {
  color: #ffd5d8 !important;
  border-color: rgba(255,126,140,.42) !important;
}

.waiting-status-badge {
  color: #ddecff !important;
  border-color: rgba(154,210,255,.34) !important;
}

.soul-status-badge {
  color: #d8cef9 !important;
  border-color: rgba(190,170,255,.36) !important;
}

/* Keep side-by-side utility buttons distinct in the Raven Guidance block. */
.raven-utility-buttons > button:nth-child(1),
.raven-guidance-buttons > button:nth-child(1) {
  background:
    linear-gradient(180deg, rgba(20, 135, 91, .98), rgba(6, 72, 52, .98) 58%, rgba(4, 35, 28, .99)) !important;
}

.raven-utility-buttons > button:nth-child(2),
.raven-guidance-buttons > button:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(50, 98, 139, .98), rgba(13, 40, 77, .98) 58%, rgba(6, 17, 36, .99)) !important;
}

.raven-utility-buttons > button:nth-child(3),
.raven-guidance-buttons > button:nth-child(3) {
  background:
    linear-gradient(180deg, rgba(142, 91, 23, .98), rgba(83, 45, 10, .99) 56%, rgba(33, 18, 5, .99)) !important;
}

@media (max-width: 650px) {
  button:not(.secret-message-close-btn):not(.last-words-card):not(.last-words-player-pill) {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.10),
      inset 0 -7px 14px rgba(0,0,0,.28),
      0 4px 12px rgba(0,0,0,.34) !important;
  }
}


/* ================= V1.2.24.29 OPTION 3 DESKTOP + MOBILE LAYOUT LOCK ================= */
/*
  Desktop: true two-column command-board layout.
  Mobile: single stacked gameplay flow.
  Keeps all existing controls and game logic; rearranges only layout/presentation.
*/

#gameRoomPanel.deceived-layout-v3 {
  width: min(1380px, 96vw) !important;
  max-width: 1380px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

#gameRoomPanel.deceived-layout-v3 > hr {
  display: none !important;
}

#gameRoomPanel.deceived-layout-v3 > h2 {
  margin: 0 0 14px !important;
  letter-spacing: .18em !important;
  text-transform: uppercase !important;
  font-size: clamp(1.35rem, 2.1vw, 2.15rem) !important;
  color: #f1cf7a !important;
  text-shadow:
    0 0 16px rgba(214,168,79,.22),
    0 4px 18px rgba(0,0,0,.85) !important;
}

/* Mobile-first order after the HTML reorder:
   Clock -> room/status -> main table/chat/phase panels -> host command/utilities. */
#gameRoomPanel.deceived-layout-v3 .game-layout {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

#gameRoomPanel.deceived-layout-v3 .table-side-panel {
  order: 1 !important;
  min-width: 0 !important;
}

#gameRoomPanel.deceived-layout-v3 .raven-side-panel {
  order: 2 !important;
  position: static !important;
  top: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

/* On mobile, the host action sits below chat/phase panels and utility buttons stay below it. */
#gameRoomPanel.deceived-layout-v3 .raven-side-panel .host-command-banner {
  order: 1 !important;
}

#gameRoomPanel.deceived-layout-v3 .raven-side-panel .raven-box {
  order: 2 !important;
}

/* Make the Raven utility box compact and button-forward. */
#gameRoomPanel.deceived-layout-v3 .raven-box {
  padding: 14px !important;
  border-radius: 18px !important;
}

#gameRoomPanel.deceived-layout-v3 .raven-box h3 {
  margin-bottom: 6px !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}

#gameRoomPanel.deceived-layout-v3 #ravenMessageDisplay {
  margin: 8px 0 12px !important;
  font-size: .92rem !important;
  color: rgba(244,234,211,.86) !important;
}

/* Host command is allowed to be lower in the layout because it visibly calls the host when needed. */
#gameRoomPanel.deceived-layout-v3 .host-command-banner {
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 14px !important;
  border-radius: 18px !important;
}

#gameRoomPanel.deceived-layout-v3 .host-command-needs-action {
  animation:
    hostCommandBannerGlow 2.65s ease-in-out infinite,
    deceivedHostCommandPulse 1.45s ease-in-out infinite !important;
}

#gameRoomPanel.deceived-layout-v3 .host-command-needs-action button:not(.hidden) {
  animation: hostCommandJumpPulse 1.35s ease-in-out infinite !important;
}

@keyframes deceivedHostCommandPulse {
  0%, 100% {
    filter: brightness(1);
    border-color: rgba(214,168,79,.64);
  }
  50% {
    filter: brightness(1.16);
    border-color: rgba(255,236,186,.95);
  }
}

/* Chat is important in this game. Keep it readable and closer to the table on mobile. */
#gameRoomPanel.deceived-layout-v3 #tableOfDeceptionPanel {
  margin-top: 14px !important;
}

#gameRoomPanel.deceived-layout-v3 .table-of-deception-messages {
  height: clamp(210px, 34dvh, 360px) !important;
}

/* Utility buttons can form a clean row on phones that are wide enough. */
#gameRoomPanel.deceived-layout-v3 .raven-box button {
  margin-top: 8px !important;
}

@media (min-width: 560px) and (max-width: 979px) {
  #gameRoomPanel.deceived-layout-v3 .raven-box {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  #gameRoomPanel.deceived-layout-v3 .raven-box h3,
  #gameRoomPanel.deceived-layout-v3 #ravenMessageDisplay {
    grid-column: 1 / -1 !important;
  }

  #gameRoomPanel.deceived-layout-v3 .raven-box button {
    margin-top: 0 !important;
    min-height: 48px !important;
  }
}

/* Desktop / wide tablet: Option 3 two-column layout. */
@media (min-width: 980px) {
  #gameRoomPanel.deceived-layout-v3 {
    display: grid !important;
    grid-template-columns: minmax(290px, 330px) minmax(0, 1fr) !important;
    grid-auto-rows: auto !important;
    column-gap: 18px !important;
    row-gap: 12px !important;
    align-items: start !important;
    padding: 24px !important;
  }

  #gameRoomPanel.deceived-layout-v3 > h2 {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  #gameRoomPanel.deceived-layout-v3 #ravenClockPanel {
    grid-column: 1 !important;
    grid-row: 2 !important;
    margin: 0 !important;
    width: 100% !important;
  }

  #gameRoomPanel.deceived-layout-v3 #gameRoomCodeBadge {
    grid-column: 1 !important;
    grid-row: 3 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #gameRoomPanel.deceived-layout-v3 > .game-status-row {
    grid-column: 1 !important;
    grid-row: 4 !important;
    grid-template-columns: 1fr !important;
    margin: 0 !important;
    gap: 8px !important;
  }

  #gameRoomPanel.deceived-layout-v3 > .game-status-row > div {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    text-align: left !important;
    min-height: 48px !important;
  }

  #gameRoomPanel.deceived-layout-v3 > .game-status-row .small-label {
    margin: 0 !important;
  }

  #gameRoomPanel.deceived-layout-v3 .game-layout {
    display: contents !important;
  }

  #gameRoomPanel.deceived-layout-v3 .table-side-panel {
    grid-column: 2 !important;
    grid-row: 2 / span 20 !important;
    order: initial !important;
    min-width: 0 !important;
  }

  #gameRoomPanel.deceived-layout-v3 .raven-side-panel {
    grid-column: 1 !important;
    grid-row: 5 !important;
    order: initial !important;
    position: sticky !important;
    top: 14px !important;
    align-self: start !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-width: 0 !important;
  }

  #gameRoomPanel.deceived-layout-v3 .raven-side-panel .host-command-banner {
    order: 1 !important;
  }

  #gameRoomPanel.deceived-layout-v3 .raven-side-panel .raven-box {
    order: 2 !important;
  }

  #gameRoomPanel.deceived-layout-v3 .ravenSpeaksPanel,
  #gameRoomPanel.deceived-layout-v3 .raven-speaks-panel {
    margin-top: 0 !important;
  }

  #gameRoomPanel.deceived-layout-v3 .room-table {
    min-height: clamp(360px, 42vw, 560px) !important;
    margin-top: 14px !important;
  }

  #gameRoomPanel.deceived-layout-v3 .table-of-deception-messages {
    height: clamp(240px, 26vh, 340px) !important;
  }

  #gameRoomPanel.deceived-layout-v3 .raven-box button {
    width: 100% !important;
    min-height: 46px !important;
  }
}

/* Large desktop gets a more cinematic board scale. */
@media (min-width: 1280px) {
  #gameRoomPanel.deceived-layout-v3 {
    grid-template-columns: 340px minmax(0, 1fr) !important;
    column-gap: 22px !important;
  }

  #gameRoomPanel.deceived-layout-v3 .room-table {
    min-height: 590px !important;
  }
}

/* Narrow phones: keep the top status compact and avoid giant utility buttons. */
@media (max-width: 520px) {
  #gameRoomPanel.deceived-layout-v3 {
    padding: 16px 12px !important;
  }

  #gameRoomPanel.deceived-layout-v3 > h2 {
    font-size: 1.18rem !important;
    letter-spacing: .12em !important;
  }

  #gameRoomPanel.deceived-layout-v3 .game-status-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #gameRoomPanel.deceived-layout-v3 .game-status-row > div {
    padding: 8px 5px !important;
  }

  #gameRoomPanel.deceived-layout-v3 .game-status-row strong {
    font-size: .92rem !important;
  }

  #gameRoomPanel.deceived-layout-v3 .small-label {
    font-size: .56rem !important;
    letter-spacing: .06em !important;
  }

  #gameRoomPanel.deceived-layout-v3 .table-of-deception-messages {
    height: min(34dvh, 280px) !important;
  }
}


/* ================= V1.2.24.30 LOBBY HIDE + CHAT COLORS + MAIL ALARM FIX ================= */

/* The Option 3 desktop grid was overriding .hidden on the game room panel.
   This keeps "The Room" from appearing at the bottom of the Create/Join lobby screen. */
#gameRoomPanel.deceived-layout-v3.hidden {
  display: none !important;
}

/* Lobby/player list readability: make HOST and status chips visible against the dark row. */
.player-list .player-row,
.player-list .player-row-with-assets,
.pending-join-row {
  background:
    linear-gradient(180deg, rgba(16,10,12,.94), rgba(5,3,5,.96)) !important;
  border-color: rgba(214,168,79,.30) !important;
}

.player-list .player-display-name,
.player-list .host-wing-player-name,
.pending-join-name {
  color: #f4ead3 !important;
  text-shadow:
    0 0 8px rgba(0,0,0,.85),
    0 2px 8px rgba(0,0,0,.88) !important;
}

.player-list .host-text-badge,
.player-row .host-text-badge {
  color: #fff7dc !important;
  background:
    linear-gradient(180deg, rgba(151, 32, 44, .98), rgba(74, 8, 16, .98)) !important;
  border-color: rgba(255, 126, 140, .64) !important;
  text-shadow: 0 2px 7px rgba(0,0,0,.82) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 0 14px rgba(157,23,35,.24) !important;
}

/* Main chat: player names are now stable, player-specific colors.
   They still share the Deceived palette so it does not become rainbow/cartoon. */
.table-of-deception-name {
  color: var(--table-chat-name-color, #f1cf7a) !important;
  font-weight: 950 !important;
  letter-spacing: .035em !important;
  text-shadow:
    0 0 10px color-mix(in srgb, var(--table-chat-name-color, #f1cf7a) 38%, transparent),
    0 2px 8px rgba(0,0,0,.90) !important;
}

.table-of-deception-message {
  border-left: 3px solid color-mix(in srgb, var(--table-chat-name-color, #d6a84f) 46%, transparent) !important;
  padding-left: 9px !important;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--table-chat-name-color, #d6a84f) 8%, transparent), rgba(0,0,0,0)) !important;
}

/* Relentless unread mail alarm:
   It breathes down for a moment, then overtakes the eye again.
   It never fully stops while unread mail remains. */
.secret-message-action-bar.secret-mail-waiting,
#secretMessagesDock.secret-mail-waiting {
  animation:
    secretMailboxDockShake 4.8s ease-in-out infinite,
    secretMailDockRelentlessGlow 4.8s ease-in-out infinite !important;
  border-color: rgba(255,255,255,.70) !important;
}

.secret-message-toggle-btn.secret-message-toggle-has-unread,
#secretMessagesToggleBtn.secret-message-toggle-has-unread {
  animation: secretMailRelentlessOvertake 4.8s ease-in-out infinite !important;
  color: #190805 !important;
  border-color: rgba(255,255,255,.96) !important;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.98) 0%, rgba(255,235,178,.92) 34%, rgba(241,207,122,.82) 58%, rgba(119,63,14,.98) 100%) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.56) !important;
}

.secret-message-toggle-btn.secret-message-toggle-has-unread .secret-unread-count,
#secretMessagesToggleBtn.secret-message-toggle-has-unread .secret-unread-count {
  animation: secretUnreadBadgeRelentless 4.8s ease-in-out infinite !important;
}

.secret-message-toggle-btn.secret-message-toggle-has-unread::before,
#secretMessagesToggleBtn.secret-message-toggle-has-unread::before {
  content: "✉ ";
  display: inline-block;
  animation: secretEnvelopeRelentless 4.8s ease-in-out infinite !important;
}

@keyframes secretMailRelentlessOvertake {
  0%, 22%, 100% {
    transform: scale(1);
    filter: brightness(1.05);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.55),
      0 0 18px rgba(255,255,255,.42),
      0 0 28px rgba(241,207,122,.34),
      0 7px 16px rgba(0,0,0,.45);
  }
  28% {
    transform: scale(1.035);
    filter: brightness(1.28);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.72),
      0 0 34px rgba(255,255,255,.92),
      0 0 58px rgba(241,207,122,.72),
      0 0 84px rgba(157,23,35,.36),
      0 7px 16px rgba(0,0,0,.45);
  }
  38% {
    transform: scale(1.0);
    filter: brightness(1.08);
  }
  62% {
    transform: scale(1.06);
    filter: brightness(1.42);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.85),
      0 0 42px rgba(255,255,255,1),
      0 0 72px rgba(241,207,122,.86),
      0 0 104px rgba(157,23,35,.46),
      0 7px 16px rgba(0,0,0,.45);
  }
  72% {
    transform: scale(1.018);
    filter: brightness(1.16);
  }
}

@keyframes secretMailDockRelentlessGlow {
  0%, 22%, 100% {
    box-shadow:
      inset 0 0 16px rgba(0,0,0,.72),
      0 8px 24px rgba(0,0,0,.54),
      0 0 18px rgba(214,168,79,.10);
  }
  28%, 62% {
    box-shadow:
      inset 0 0 20px rgba(255,255,255,.08),
      0 8px 24px rgba(0,0,0,.54),
      0 0 30px rgba(255,255,255,.46),
      0 0 62px rgba(241,207,122,.36);
  }
}

@keyframes secretUnreadBadgeRelentless {
  0%, 24%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  30%, 64% {
    transform: scale(1.22);
    filter: brightness(1.25);
  }
}

@keyframes secretEnvelopeRelentless {
  0%, 24%, 100% {
    transform: rotate(0deg) scale(1);
  }
  28% {
    transform: rotate(-9deg) scale(1.18);
  }
  32% {
    transform: rotate(8deg) scale(1.18);
  }
  36% {
    transform: rotate(0deg) scale(1.08);
  }
  62% {
    transform: rotate(-10deg) scale(1.24);
  }
  66% {
    transform: rotate(10deg) scale(1.24);
  }
  70% {
    transform: rotate(0deg) scale(1.08);
  }
}


/* ================= V1.2.24.31 TABLE NAMEPLATES + FINAL JUDGMENT RAVEN CENTER ================= */
/* Player names on the table now behave more like transparent PNG/name decals:
   no heavy box, no single-letter ellipsis, better readable full names. */

.room-table {
  overflow: visible !important;
}

/* Replace the small raven emblem with the Final Judgment Raven image in the table center. */
.room-table::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: clamp(118px, 20vw, 235px) !important;
  height: clamp(118px, 20vw, 235px) !important;
  transform: translate(-50%, -50%) !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  z-index: 1 !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,.12), rgba(0,0,0,0) 62%),
    url('/images/final-judgment/raven-final-judgment.webp') center / contain no-repeat !important;
  opacity: .34 !important;
  filter:
    saturate(.95)
    contrast(1.08)
    brightness(.82)
    drop-shadow(0 0 18px rgba(214,168,79,.18))
    drop-shadow(0 12px 22px rgba(0,0,0,.62)) !important;
}

/* Keep the text as a small engraved plaque under the image, not stretched under player names. */
.room-table .table-center-text {
  top: 60% !important;
  z-index: 3 !important;
  width: min(34%, 190px) !important;
  max-width: 190px !important;
  min-width: 118px !important;
  padding: 6px 8px !important;
  font-size: clamp(.50rem, .72vw, .72rem) !important;
  letter-spacing: .075em !important;
  line-height: 1.14 !important;
  background:
    linear-gradient(180deg, rgba(19,10,10,.78), rgba(5,3,4,.66)) !important;
  border-color: rgba(214,168,79,.22) !important;
  box-shadow:
    inset 0 0 12px rgba(0,0,0,.56),
    0 0 14px rgba(214,168,79,.10) !important;
}

/* Table seats are now invisible click zones with a polished name decal instead of a big rectangle. */
.room-table .room-player-seat {
  width: clamp(104px, 10vw, 148px) !important;
  min-height: 38px !important;
  padding: 2px 3px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

.room-table .room-player-seat::before,
.room-table .room-player-seat::after {
  display: none !important;
  content: none !important;
}

.room-table .room-player-seat:hover,
.room-table .room-player-seat:focus-visible {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* The name itself becomes the visual object: translucent, glowing, and readable. */
.room-table .room-player-seat .player-identity.compact {
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 5px 8px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(214,168,79,.20) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), rgba(0,0,0,0) 58%),
    linear-gradient(180deg, rgba(8,4,5,.34), rgba(3,2,3,.22)) !important;
  box-shadow:
    0 0 10px rgba(0,0,0,.46),
    0 0 13px rgba(214,168,79,.07) !important;
  backdrop-filter: none !important;
}

.room-table .room-player-seat .player-display-name,
.room-table .room-player-seat .host-wing-player-name {
  display: inline !important;
  max-width: none !important;
  width: auto !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  color: #f8edcf !important;
  font-size: clamp(.64rem, .78vw, .84rem) !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
  letter-spacing: .02em !important;
  text-shadow:
    0 1px 0 rgba(0,0,0,.95),
    0 0 7px rgba(0,0,0,.96),
    0 0 12px rgba(214,168,79,.24) !important;
}

/* Host wings can be too wide at the table. Keep the host readable without crushing the name. */
.room-table .host-wing-name.compact {
  gap: 2px !important;
  max-width: 100% !important;
}

.room-table .host-wing-name.compact .host-wing {
  width: 13px !important;
  height: 10px !important;
  opacity: .82 !important;
}

/* Status badges become small floating chips under the decal, not a second big row. */
.room-table .room-player-seat .player-status-badges.compact {
  margin-top: 2px !important;
  gap: 2px !important;
}

.room-table .room-player-seat .player-status-badges.compact .player-status-badge {
  min-height: 14px !important;
  padding: 1px 4px !important;
  font-size: .48rem !important;
  background: rgba(0,0,0,.42) !important;
  border-color: rgba(214,168,79,.16) !important;
}

/* Secret recipient pick mode: make the invisible name decals flare clearly. */
.room-player-list.secret-recipient-pick-mode .room-player-seat {
  animation: none !important;
}

.room-player-list.secret-recipient-pick-mode .room-player-seat .player-identity.compact {
  animation: secretRecipientNameDecalPulse 1.05s ease-in-out infinite !important;
  cursor: pointer !important;
}

.room-player-list.secret-recipient-pick-mode .room-player-seat:hover .player-identity.compact,
.room-player-list.secret-recipient-pick-mode .room-player-seat:focus .player-identity.compact {
  border-color: rgba(255,255,255,.84) !important;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.28), rgba(214,168,79,.12) 56%, rgba(0,0,0,.12)) !important;
  box-shadow:
    0 0 20px rgba(255,255,255,.46),
    0 0 36px rgba(214,168,79,.30),
    0 8px 18px rgba(0,0,0,.46) !important;
}

@keyframes secretRecipientNameDecalPulse {
  0%, 100% {
    border-color: rgba(214,168,79,.24);
    box-shadow:
      0 0 10px rgba(0,0,0,.46),
      0 0 13px rgba(214,168,79,.10);
    filter: brightness(1);
  }
  50% {
    border-color: rgba(255,255,255,.70);
    box-shadow:
      0 0 16px rgba(255,255,255,.34),
      0 0 30px rgba(214,168,79,.28);
    filter: brightness(1.18);
  }
}

@media (max-width: 900px) {
  .room-table::after {
    width: clamp(100px, 25vw, 168px) !important;
    height: clamp(100px, 25vw, 168px) !important;
    opacity: .31 !important;
  }

  .room-table .table-center-text {
    top: 60% !important;
    width: min(32%, 150px) !important;
    max-width: 150px !important;
    min-width: 96px !important;
    font-size: .52rem !important;
    letter-spacing: .045em !important;
  }

  .room-table .room-player-seat {
    width: clamp(86px, 18vw, 114px) !important;
    min-height: 34px !important;
  }

  .room-table .room-player-seat .player-identity.compact {
    padding: 4px 6px !important;
  }

  .room-table .room-player-seat .player-display-name,
  .room-table .room-player-seat .host-wing-player-name {
    font-size: .64rem !important;
  }
}

@media (max-width: 650px) {
  .room-table::after {
    width: clamp(78px, 27vw, 118px) !important;
    height: clamp(78px, 27vw, 118px) !important;
    opacity: .28 !important;
  }

  .room-table .table-center-text {
    top: 60.5% !important;
    width: min(31%, 112px) !important;
    max-width: 112px !important;
    min-width: 80px !important;
    padding: 4px 5px !important;
    font-size: .44rem !important;
    letter-spacing: .03em !important;
  }

  .room-table .room-player-seat {
    width: clamp(72px, 22vw, 92px) !important;
    min-height: 30px !important;
    padding: 1px !important;
  }

  .room-table .room-player-seat .player-identity.compact {
    padding: 3px 5px !important;
    border-radius: 12px !important;
  }

  .room-table .room-player-seat .player-display-name,
  .room-table .room-player-seat .host-wing-player-name {
    font-size: .56rem !important;
    line-height: 1.0 !important;
  }

  .room-table .host-wing-name.compact .host-wing {
    width: 10px !important;
    height: 8px !important;
  }

  .room-table .room-player-seat .player-status-badges.compact .player-status-badge {
    min-height: 12px !important;
    padding: 0 3px !important;
    font-size: .42rem !important;
  }
}

@media (max-width: 420px) {
  .room-table .room-player-seat {
    width: clamp(64px, 22vw, 78px) !important;
  }

  .room-table .room-player-seat .player-display-name,
  .room-table .room-player-seat .host-wing-player-name {
    font-size: .51rem !important;
  }

  .room-table .table-center-text {
    max-width: 94px !important;
    font-size: .40rem !important;
  }
}


/* ================= V1.2.24.32 MAIL ALARM / CHALLENGE WAIT / TRUTH CARD / CELEBRATION ================= */

/* Truth-card in the middle of the Table of Deception instead of the Final Judgment Raven. */
.room-table::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,.12), rgba(0,0,0,0) 62%),
    url('/images/ravens-board/truth-card.webp') center / contain no-repeat !important;
  opacity: .38 !important;
  filter:
    saturate(1.05)
    contrast(1.08)
    brightness(.92)
    drop-shadow(0 0 18px rgba(214,168,79,.24))
    drop-shadow(0 12px 22px rgba(0,0,0,.64)) !important;
}

/* Secret messages should scream like Role Reminder when unread. */
.secret-message-action-bar.secret-mail-waiting,
#secretMessagesDock.secret-mail-waiting {
  border-color: rgba(255,255,255,.96) !important;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.24), rgba(241,207,122,.14) 28%, rgba(157,23,35,.12) 54%, rgba(0,0,0,.96) 100%),
    linear-gradient(180deg, rgba(24, 10, 8, .99), rgba(4, 2, 3, .99)) !important;
  animation:
    roleReminderSecretMailTakeover 3.6s ease-in-out infinite,
    secretMailboxDockShake 3.6s ease-in-out infinite !important;
}

#secretMessagesToggleBtn.secret-message-toggle-has-unread,
.secret-message-toggle-btn.secret-message-toggle-has-unread {
  color: #180705 !important;
  border: 2px solid rgba(255,255,255,.98) !important;
  background:
    radial-gradient(circle at top, rgba(255,255,255,1) 0%, rgba(255,245,206,.98) 26%, rgba(241,207,122,.96) 56%, rgba(157,23,35,.94) 100%) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.68) !important;
  animation: roleReminderSecretMailButtonTakeover 3.6s ease-in-out infinite !important;
}

#secretMessagesToggleBtn.secret-message-toggle-has-unread .secret-unread-count {
  animation: roleReminderSecretUnreadBadge 3.6s ease-in-out infinite !important;
}

@keyframes roleReminderSecretMailTakeover {
  0%, 58%, 100% {
    box-shadow:
      inset 0 0 16px rgba(0,0,0,.72),
      0 8px 24px rgba(0,0,0,.54),
      0 0 24px rgba(214,168,79,.22);
    filter: brightness(1);
  }
  68%, 78% {
    box-shadow:
      inset 0 0 26px rgba(255,255,255,.14),
      0 0 34px rgba(255,255,255,.86),
      0 0 72px rgba(241,207,122,.74),
      0 0 102px rgba(157,23,35,.48);
    filter: brightness(1.28);
  }
}

@keyframes roleReminderSecretMailButtonTakeover {
  0%, 58%, 100% {
    transform: scale(1);
    filter: brightness(1.08);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.70),
      0 0 24px rgba(255,255,255,.42),
      0 0 42px rgba(241,207,122,.34),
      0 7px 16px rgba(0,0,0,.45);
  }
  68% {
    transform: scale(1.075);
    filter: brightness(1.48);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.90),
      0 0 44px rgba(255,255,255,1),
      0 0 82px rgba(241,207,122,.92),
      0 0 118px rgba(157,23,35,.56),
      0 7px 16px rgba(0,0,0,.45);
  }
  78% {
    transform: scale(1.02);
    filter: brightness(1.22);
  }
}

@keyframes roleReminderSecretUnreadBadge {
  0%, 58%, 100% { transform: scale(1); }
  68%, 78% { transform: scale(1.32); }
}

/* Vote target menu: dark, readable, no white washed-out dropdown. */
#voteTargetSelect,
#challengeWinnerSelect,
#secretRecipientSelect {
  background: #090608 !important;
  color: #f4ead3 !important;
  border-color: rgba(214,168,79,.46) !important;
}

#voteTargetSelect option,
#challengeWinnerSelect option,
#secretRecipientSelect option {
  background: #090608 !important;
  color: #f4ead3 !important;
}

/* If the browser supports it, make selected menu text stand out. */
#voteTargetSelect:focus,
#challengeWinnerSelect:focus,
#secretRecipientSelect:focus {
  box-shadow:
    inset 0 0 14px rgba(0,0,0,.68),
    0 0 0 2px rgba(214,168,79,.22),
    0 0 24px rgba(214,168,79,.22) !important;
}

/* After finishing a virtual challenge early, make it obvious the game is still waiting on the clock. */
.challenge-finished-wait-card {
  margin: 12px auto 0;
  padding: 13px 14px;
  max-width: 420px;
  border: 1px solid rgba(154,210,255,.56);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(154,210,255,.16), rgba(0,0,0,0) 52%),
    rgba(0,0,0,.42);
  color: #edf8ff;
  text-align: center;
  box-shadow:
    inset 0 0 16px rgba(255,255,255,.04),
    0 0 20px rgba(154,210,255,.16);
}

.challenge-finished-wait-card .challenge-finished-wait-label {
  margin: 0 0 5px;
  color: #9ad2ff;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.challenge-finished-wait-card strong {
  display: block;
  color: #fff;
  font-size: clamp(1.6rem, 5vw, 2.45rem);
  line-height: 1;
  margin: 6px 0;
  text-shadow:
    0 0 18px rgba(154,210,255,.42),
    0 3px 14px rgba(0,0,0,.78);
}

.challenge-finished-wait-card span {
  display: block;
  color: rgba(244,234,211,.86);
}

/* Choose another game buttons should be visible in all virtual pre-start panels. */
.raven-special-choose-different-btn,
.raven-memory-choose-different-btn,
.raven-path-choose-different-btn,
.firepants-choose-different-btn {
  margin-top: 8px !important;
}

/* The Table of Truth: reduce perceived jump/flicker during fast canvas animation. */
#deceiversTruthCanvas {
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: auto;
}

.deceivers-truth-board {
  transform: translateZ(0);
  contain: layout paint;
}

/* Final Reputation celebration screen/card. */
.final-reputation-celebration {
  margin: 14px auto 18px;
  padding: clamp(16px, 4vw, 28px);
  border: 2px solid rgba(241,207,122,.72);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.18), rgba(241,207,122,.13) 24%, rgba(157,23,35,.10) 52%, rgba(0,0,0,.70) 100%),
    linear-gradient(180deg, rgba(26,14,8,.98), rgba(6,3,4,.98));
  box-shadow:
    inset 0 0 28px rgba(255,255,255,.06),
    0 0 34px rgba(241,207,122,.34),
    0 0 82px rgba(157,23,35,.18);
  text-align: center;
  animation: finalReputationCelebrationGlow 2.4s ease-in-out infinite;
}

.final-reputation-kicker {
  color: #f1cf7a;
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.final-reputation-celebration h2 {
  margin: 7px 0 10px;
  color: #fff;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(241,207,122,.48),
    0 3px 18px rgba(0,0,0,.88);
}

.final-reputation-money {
  display: inline-block;
  margin: 4px auto 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.54);
  background:
    radial-gradient(circle at top, rgba(255,255,255,.90), rgba(241,207,122,.86) 44%, rgba(117,63,15,.96) 100%);
  color: #1a0904;
  font-size: clamp(1.7rem, 7vw, 3.6rem);
  font-weight: 950;
  letter-spacing: .04em;
  text-shadow: 0 1px 0 rgba(255,255,255,.54);
  box-shadow:
    0 0 24px rgba(255,255,255,.42),
    0 0 54px rgba(241,207,122,.38);
}

@keyframes finalReputationCelebrationGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.14); }
}


/* ================= V1.2.24.33 LAST WORDS BANK + REPUTATION BANNER + TIMER CLEANUP ================= */

/* The tiny legacy timer box is not part of the current design.
   The real active timer is The Raven's Clock. */
.legacy-phase-timer-box,
#phaseTimerDisplay {
  display: none !important;
}

/* Make Last Words broadcasts feel important and not repetitive. */
.raven-feed-last-words-message {
  line-height: 1.42 !important;
}

/* Reputation celebration / punishment banner after votes. */
.reputation-change-banner {
  margin: 12px auto 14px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 2px solid rgba(214,168,79,.42);
  background:
    radial-gradient(circle at top, rgba(214,168,79,.14), rgba(0,0,0,0) 58%),
    linear-gradient(180deg, rgba(13,8,8,.96), rgba(3,2,3,.97));
  box-shadow:
    inset 0 0 18px rgba(255,255,255,.04),
    0 0 24px rgba(0,0,0,.52);
  color: #f4ead3;
  text-align: center;
}

.reputation-change-banner.hidden {
  display: none !important;
}

.reputation-change-banner.reputation-gain {
  border-color: rgba(84,230,165,.72);
  box-shadow:
    inset 0 0 18px rgba(84,230,165,.06),
    0 0 24px rgba(84,230,165,.22),
    0 0 54px rgba(214,168,79,.18);
}

.reputation-change-banner.reputation-loss {
  border-color: rgba(255,93,108,.72);
  box-shadow:
    inset 0 0 18px rgba(255,93,108,.06),
    0 0 24px rgba(157,23,35,.30),
    0 0 54px rgba(0,0,0,.42);
}

.reputation-change-banner.reputation-change-fresh {
  animation: reputationBannerArrival 4.8s ease-in-out;
}

.reputation-change-kicker {
  color: rgba(244,234,211,.78);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.reputation-change-main {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 7px 0 8px;
}

.reputation-change-main strong {
  color: #fff;
  font-size: clamp(1rem, 3vw, 1.45rem);
  letter-spacing: .10em;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(214,168,79,.28);
}

.reputation-change-main span {
  font-size: clamp(1.35rem, 5vw, 2.4rem);
  font-weight: 950;
  line-height: 1;
}

.reputation-gain .reputation-change-main span {
  color: #54e6a5;
  text-shadow:
    0 0 14px rgba(84,230,165,.50),
    0 0 34px rgba(214,168,79,.22);
}

.reputation-loss .reputation-change-main span {
  color: #ff8c96;
  text-shadow:
    0 0 14px rgba(255,93,108,.50),
    0 0 34px rgba(157,23,35,.28);
}

.reputation-change-banner p {
  margin: 0;
  color: rgba(244,234,211,.88);
  line-height: 1.35;
}

.raven-feed-reputation {
  border-left-color: rgba(84,230,165,.70) !important;
  background:
    linear-gradient(90deg, rgba(84,230,165,.10), rgba(0,0,0,.24)) !important;
  color: #f4ead3 !important;
  font-weight: 750;
}

@keyframes reputationBannerArrival {
  0% {
    transform: scale(.97);
    opacity: .35;
    filter: brightness(.86);
  }
  18% {
    transform: scale(1.025);
    opacity: 1;
    filter: brightness(1.28);
  }
  38% {
    transform: scale(1);
    filter: brightness(1.02);
  }
  62% {
    transform: scale(1.016);
    filter: brightness(1.18);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}


/* ================= V1.2.24.34 MINI-GAME ANSWER REVIEW + SMALL-GAME REPUTATION LOCK ================= */

.raven-answer-review {
  margin: 14px 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(154,210,255,.38);
  background:
    radial-gradient(circle at top, rgba(154,210,255,.12), rgba(0,0,0,0) 62%),
    rgba(0,0,0,.36);
}

.raven-answer-review h4 {
  margin: 0 0 6px;
  text-align: center;
  color: #9ad2ff;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.raven-answer-review-row {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.32);
}

.raven-answer-review-row.correct {
  border-color: rgba(84,230,165,.36);
  background:
    linear-gradient(90deg, rgba(84,230,165,.08), rgba(0,0,0,.30));
}

.raven-answer-review-row.wrong {
  border-color: rgba(255,93,108,.42);
  background:
    linear-gradient(90deg, rgba(157,23,35,.14), rgba(0,0,0,.32));
}

.raven-answer-review-question {
  color: #f4ead3;
  font-weight: 900;
  margin-bottom: 7px;
}

.raven-answer-review-answer,
.raven-answer-review-correct {
  color: rgba(244,234,211,.88);
  line-height: 1.35;
}

.raven-answer-review-answer span {
  color: #ff8c96;
  font-weight: 950;
}

.raven-answer-review-correct span {
  color: #54e6a5;
  font-weight: 950;
}


/* ================= V1.2.24.36 TABLE CENTER FINAL OVERRIDE + CLOCK RESTORE ================= */
/* Final table-center override. This is the winning rule for the center artwork.
   Current artwork: /images/ravens-board/card-back.webp */
.room-table::after,
#gameRoomPanel .room-table::after,
#gameRoomPanel.deceived-layout-v3 .room-table::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: clamp(118px, 20vw, 235px) !important;
  height: clamp(118px, 20vw, 235px) !important;
  transform: translate(-50%, -50%) !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  z-index: 1 !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,226,174,.12), rgba(214,168,79,.08) 34%, rgba(0,0,0,0) 64%),
    url('/images/ravens-board/card-back.webp') center / contain no-repeat !important;
  opacity: .36 !important;
  filter:
    saturate(1.08)
    contrast(1.05)
    brightness(.92)
    drop-shadow(0 0 18px rgba(214,168,79,.28))
    drop-shadow(0 0 34px rgba(214,168,79,.16))
    drop-shadow(0 12px 22px rgba(0,0,0,.62)) !important;
}

/* The Raven's Clock should be hidden only while the full game room itself is hidden/lobby-hidden.
   If the room is on screen, force the clock to show. */
#gameRoomPanel.deceived-layout-v3:not(.hidden) #ravenClockPanel,
#gameRoomPanel.deceived-layout-v3:not(.hidden) .raven-clock-panel {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Preserve normal hidden behavior when the entire game room is hidden. */
#gameRoomPanel.deceived-layout-v3.hidden #ravenClockPanel,
#gameRoomPanel.deceived-layout-v3.hidden .raven-clock-panel {
  display: none !important;
}

@media (max-width: 900px) {
  #gameRoomPanel.deceived-layout-v3 .room-table::after {
    width: clamp(100px, 25vw, 168px) !important;
    height: clamp(100px, 25vw, 168px) !important;
    opacity: .34 !important;
  }
}

@media (max-width: 650px) {
  #gameRoomPanel.deceived-layout-v3 .room-table::after {
    width: clamp(84px, 27vw, 126px) !important;
    height: clamp(84px, 27vw, 126px) !important;
    opacity: .32 !important;
  }
}


/* ================= V1.2.24.37 FIREPANTS ENTER GAME PERCH ================= */
/* Put firepants-sitting.webp at: public/images/firepants/firepants-sitting.webp */

#joinPanel.enter-game-panel {
  position: relative !important;
  overflow: visible !important;
  isolation: isolate !important;
}

#enterGameFirepants.enter-game-firepants {
  position: absolute !important;
  right: clamp(10px, 3vw, 28px) !important;
  top: clamp(-116px, -8.3vw, -82px) !important;
  width: clamp(150px, 18vw, 235px) !important;
  height: auto !important;
  z-index: 8 !important;
  pointer-events: none !important;
  user-select: none !important;
  opacity: .98 !important;
  filter:
    drop-shadow(0 0 18px rgba(214,168,79,.18))
    drop-shadow(0 18px 24px rgba(0,0,0,.72)) !important;
}

/* Give the box just enough top breathing room so his head stays in the page, not up by the browser bar. */
#joinPanel.enter-game-panel:not(.hidden) {
  margin-top: clamp(72px, 8.6vw, 112px) !important;
}

/* The intro screen should still feel balanced after FirePants sits on the corner. */
#joinPanel.enter-game-panel > h2,
#joinPanel.enter-game-panel > #connectionStatus {
  position: relative !important;
  z-index: 4 !important;
}

#joinPanel.enter-game-panel > label,
#joinPanel.enter-game-panel > input,
#joinPanel.enter-game-panel > button,
#joinPanel.enter-game-panel > p,
#joinPanel.enter-game-panel > section {
  position: relative !important;
  z-index: 3 !important;
}

/* Hide him once the player is inside a room/lobby/role flow. */
#enterGameFirepants.hidden,
#joinPanel:has(#lobbyPanel:not(.hidden)) #enterGameFirepants,
#joinPanel:has(#roleRevealPanel:not(.hidden)) #enterGameFirepants {
  display: none !important;
}

/* Desktop wide: keep him perched, not floating near the browser chrome. */
@media (min-width: 1100px) {
  #enterGameFirepants.enter-game-firepants {
    right: 12px !important;
    top: -108px !important;
    width: 230px !important;
  }
}

/* Tablet: smaller and tucked into the corner. */
@media (max-width: 900px) {
  #joinPanel.enter-game-panel:not(.hidden) {
    margin-top: 76px !important;
  }

  #enterGameFirepants.enter-game-firepants {
    width: 172px !important;
    top: -84px !important;
    right: 8px !important;
  }
}

/* Phone: very small, decorative, and never covering the form. */
@media (max-width: 640px) {
  #joinPanel.enter-game-panel:not(.hidden) {
    margin-top: 50px !important;
  }

  #enterGameFirepants.enter-game-firepants {
    width: 112px !important;
    top: -48px !important;
    right: 6px !important;
    opacity: .92 !important;
  }
}

@media (max-width: 420px) {
  #enterGameFirepants.enter-game-firepants {
    width: 92px !important;
    top: -38px !important;
    right: 4px !important;
  }
}


/* ================= V1.2.24.38 CRITICAL CLOCK / FIREPANTS / RAVEN LOCK HOTFIX ================= */

/* The Raven's Clock must show whenever the real game room is visible. */
#gameRoomPanel:not(.hidden) #ravenClockPanel,
#gameRoomPanel:not(.hidden) .raven-clock-panel,
#gameRoomPanel.deceived-layout-v3:not(.hidden) #ravenClockPanel,
#gameRoomPanel.deceived-layout-v3:not(.hidden) .raven-clock-panel {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 94px !important;
}

/* Only hide the clock when the game room itself is hidden. */
#gameRoomPanel.hidden #ravenClockPanel,
#gameRoomPanel.hidden .raven-clock-panel {
  display: none !important;
}

/* FirePants should be visible on the first Create/Join screen and only disappear after lobby/role/game UI appears. */
#joinPanel.enter-game-panel:not(.hidden) > #enterGameFirepants.enter-game-firepants:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: .98 !important;
}

#joinPanel.enter-game-panel #lobbyPanel:not(.hidden) ~ #enterGameFirepants,
#joinPanel.enter-game-panel #roleRevealPanel:not(.hidden) ~ #enterGameFirepants {
  display: none !important;
}

/* Keep him above the box but below browser chrome. */
#enterGameFirepants.enter-game-firepants {
  position: absolute !important;
  right: clamp(10px, 3vw, 28px) !important;
  top: clamp(-104px, -7.4vw, -76px) !important;
  width: clamp(145px, 16vw, 218px) !important;
  z-index: 20 !important;
}

/* Make Choose Another Game buttons consistent and obvious. */
.raven-special-choose-different-btn,
#chooseDifferentRavenLockChallengeBtn,
#forceDifferentRavenLockChallengeBtn {
  margin-top: 10px !important;
  width: min(360px, 100%) !important;
}

@media (max-width: 640px) {
  #enterGameFirepants.enter-game-firepants {
    width: 108px !important;
    top: -44px !important;
    right: 6px !important;
  }

  #joinPanel.enter-game-panel:not(.hidden) {
    margin-top: 52px !important;
  }
}


/* ================= V1.2.24.39 VIRTUAL CHALLENGE BUTTON CLEANUP ================= */
/* No browser confirm popup for Choose Another Game anymore.
   These rules make every virtual-game "Begin" and "Choose Another Game" button line up consistently. */

.raven-special-standings > button,
.raven-quiz-standings > button,
.raven-memory-standings > button,
.raven-path-standings > button,
.firepants-standings > button,
#beginRavenQuizBtn,
#beginRavenCipherBtn,
#beginRavenLockBtn,
#beginRavenMemoryBtn,
#beginRavenPathBtn,
#beginFirepantsBtn,
.raven-special-choose-different-btn,
.raven-memory-choose-different-btn,
.raven-path-choose-different-btn,
.firepants-choose-different-btn,
[id^="chooseDifferentRaven"][id$="ChallengeBtn"],
[id^="forceDifferentRaven"][id$="ChallengeBtn"] {
  display: block !important;
  width: min(360px, 92%) !important;
  max-width: 360px !important;
  margin: 12px auto 0 !important;
  text-align: center !important;
}

#beginRavenQuizBtn,
#beginRavenCipherBtn,
#beginRavenLockBtn,
#beginRavenMemoryBtn,
#beginRavenPathBtn,
#beginFirepantsBtn {
  width: min(720px, 96%) !important;
  max-width: 720px !important;
}

.raven-special-choose-different-btn,
.raven-memory-choose-different-btn,
.raven-path-choose-different-btn,
.firepants-choose-different-btn,
[id^="chooseDifferentRaven"][id$="ChallengeBtn"],
[id^="forceDifferentRaven"][id$="ChallengeBtn"] {
  background:
    linear-gradient(180deg, rgba(43,92,137,.96), rgba(11,33,59,.98)) !important;
  border-color: rgba(154,210,255,.42) !important;
  color: #efe8df !important;
  box-shadow:
    inset 0 0 16px rgba(154,210,255,.10),
    0 8px 18px rgba(0,0,0,.42) !important;
}

.raven-special-choose-different-btn:hover,
.raven-memory-choose-different-btn:hover,
.raven-path-choose-different-btn:hover,
.firepants-choose-different-btn:hover,
[id^="chooseDifferentRaven"][id$="ChallengeBtn"]:hover,
[id^="forceDifferentRaven"][id$="ChallengeBtn"]:hover {
  filter: brightness(1.08) !important;
}

@media (max-width: 640px) {
  .raven-special-standings > button,
  .raven-quiz-standings > button,
  .raven-memory-standings > button,
  .raven-path-standings > button,
  .firepants-standings > button,
  .raven-special-choose-different-btn,
  .raven-memory-choose-different-btn,
  .raven-path-choose-different-btn,
  .firepants-choose-different-btn,
  [id^="chooseDifferentRaven"][id$="ChallengeBtn"],
  [id^="forceDifferentRaven"][id$="ChallengeBtn"] {
    width: 94% !important;
    max-width: 94% !important;
  }
}


/* ================= V1.2.24.40 AUTO NO-WINNER RETURN + FIREPANTS SCREEN GUARD ================= */

.virtual-no-winner-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999998 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 22px !important;
  background:
    radial-gradient(circle at center, rgba(214,168,79,.18), rgba(0,0,0,.86) 58%, rgba(0,0,0,.96) 100%) !important;
}

.virtual-no-winner-overlay.hidden {
  display: none !important;
}

.virtual-no-winner-card {
  width: min(620px, 92vw) !important;
  padding: clamp(20px, 4vw, 34px) !important;
  border: 2px solid rgba(154,210,255,.55) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at top, rgba(154,210,255,.16), rgba(214,168,79,.10) 28%, rgba(0,0,0,.88) 100%),
    linear-gradient(180deg, rgba(20,12,10,.98), rgba(0,0,0,.98)) !important;
  box-shadow:
    inset 0 0 28px rgba(255,255,255,.06),
    0 0 34px rgba(154,210,255,.22),
    0 0 90px rgba(0,0,0,.82) !important;
  text-align: center !important;
}

.virtual-no-winner-kicker {
  color: #9ad2ff !important;
  font-size: .78rem !important;
  font-weight: 950 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
  margin: 0 0 10px !important;
}

.virtual-no-winner-card h2 {
  color: #f1cf7a !important;
  margin: 8px 0 12px !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 18px rgba(214,168,79,.22) !important;
}

.virtual-no-winner-card p {
  color: #f4ead3 !important;
  line-height: 1.45 !important;
}

#returnToTableFromNoWinnerBtn,
.virtual-return-to-table-btn {
  display: block !important;
  width: min(340px, 92%) !important;
  margin: 18px auto 0 !important;
  text-align: center !important;
}

/* FirePants on the enter screen must never leak into lobby, role reveal, or game screens. */
#joinPanel:not(.hidden) #lobbyPanel:not(.hidden) ~ #enterGameFirepants,
#joinPanel:not(.hidden) #roleRevealPanel:not(.hidden) ~ #enterGameFirepants,
#gameRoomPanel:not(.hidden) ~ #joinPanel #enterGameFirepants,
#enterGameFirepants.hidden {
  display: none !important;
}

#enterGameFirepants[style*="display: none"] {
  display: none !important;
}


/* ================= TABLE OF DECEPTION / CHOSEN REBRAND PATCH ================= */

#enterGameFirepants {
  display: none !important;
}

/* ================= UNIFIED CHALLENGE LIBRARY V1 ================= */

#challengePlaceholderPanel.challenge-placeholder-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 2.3vw, 30px) !important;
  border: 1px solid rgba(214, 168, 79, .44) !important;
  border-left-width: 1px !important;
  background:
    radial-gradient(circle at 50% -12%, rgba(214,168,79,.13), transparent 34%),
    radial-gradient(circle at 8% 12%, rgba(123,19,34,.12), transparent 28%),
    linear-gradient(180deg, rgba(15,8,10,.97), rgba(3,2,4,.985)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,238,190,.08),
    inset 0 0 70px rgba(0,0,0,.52),
    0 20px 54px rgba(0,0,0,.52) !important;
}

#challengePlaceholderPanel.challenge-placeholder-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(214,168,79,.12);
  border-radius: 12px;
  pointer-events: none;
}

.challenge-phase-heading {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto 22px;
  text-align: center;
}

.challenge-phase-kicker {
  margin: 0 0 7px;
  color: rgba(241,207,122,.76);
  font-family: Cinzel, Georgia, serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
}

#challengePlaceholderPanel .challenge-phase-heading h3 {
  margin: 0;
  color: #f1cf7a !important;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow:
    0 0 20px rgba(214,168,79,.24),
    0 4px 18px rgba(0,0,0,.86);
}

.challenge-phase-subtitle {
  margin: 9px 0 0;
  color: rgba(244,234,211,.76);
  font-size: clamp(.92rem, 1.7vw, 1.08rem);
}

.challenge-library-panel {
  position: relative;
  z-index: 1;
  transition: opacity .2s ease, filter .2s ease;
}

.challenge-library-panel.is-selecting {
  opacity: .64;
  filter: saturate(.72);
  pointer-events: none;
}

.challenge-library-mode-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto 25px;
  padding: clamp(15px, 2vw, 20px);
  border: 1px solid rgba(154,210,255,.34);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(154,210,255,.12), transparent 40%),
    linear-gradient(135deg, rgba(13,24,36,.92), rgba(8,6,11,.95));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 12px 30px rgba(0,0,0,.34);
  text-align: left;
}

.challenge-library-mode-banner.is-unlocked {
  border-color: rgba(84,230,165,.42);
  background:
    radial-gradient(circle at 0 0, rgba(84,230,165,.12), transparent 40%),
    linear-gradient(135deg, rgba(8,35,28,.90), rgba(8,6,11,.95));
}

.challenge-library-mode-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(241,207,122,.48);
  border-radius: 50%;
  color: #f1cf7a;
  background: rgba(0,0,0,.34);
  box-shadow: inset 0 0 16px rgba(214,168,79,.12);
  font-size: 1.05rem;
}

.challenge-library-mode-copy span,
.challenge-library-mode-copy strong {
  display: block;
}

.challenge-library-mode-copy span {
  margin-bottom: 3px;
  color: rgba(154,210,255,.82);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.is-unlocked .challenge-library-mode-copy span {
  color: rgba(84,230,165,.88);
}

.challenge-library-mode-copy strong {
  color: #fff7df;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1rem, 2vw, 1.28rem);
  letter-spacing: .05em;
}

.challenge-library-mode-copy p {
  margin: 4px 0 0;
  color: rgba(244,234,211,.82);
  line-height: 1.35;
}

.challenge-library-group {
  margin-top: 28px;
  scroll-margin-top: 18px;
}

.challenge-library-group + .challenge-library-group {
  padding-top: 24px;
}

.challenge-library-section-divider {
  display: grid;
  grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr);
  align-items: center;
  gap: 13px;
  margin: 0 0 18px;
  color: rgba(241, 207, 122, .88);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(.66rem, 1.2vw, .78rem);
  font-weight: 900;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(214, 168, 79, .22);
}

.challenge-library-section-divider span {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(214, 168, 79, .58),
    rgba(241, 207, 122, .18)
  );
  box-shadow: 0 0 10px rgba(214, 168, 79, .16);
}

.challenge-library-section-divider span:last-child {
  transform: scaleX(-1);
}

.challenge-library-group-mind .challenge-library-section-divider {
  color: rgba(166, 218, 255, .9);
  text-shadow: 0 0 14px rgba(88, 166, 225, .24);
}

.challenge-library-group-mind .challenge-library-section-divider span {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(134, 202, 251, .56),
    rgba(214, 168, 79, .16)
  );
}

.challenge-library-group-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 2px 13px;
  text-align: left;
}

.challenge-library-group-heading > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
}

.challenge-library-group-heading span {
  grid-row: 1 / span 2;
  align-self: start;
  color: rgba(214,168,79,.45);
  font-family: Cinzel, Georgia, serif;
  font-size: 1.35rem;
}

.challenge-library-group-heading h4 {
  margin: 0;
  color: #f1cf7a;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.challenge-library-group-heading p {
  margin: 3px 0 0;
  color: rgba(244,234,211,.62);
  font-size: .86rem;
}

.challenge-library-group-heading em {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(84,230,165,.26);
  border-radius: 999px;
  color: rgba(84,230,165,.86);
  background: rgba(84,230,165,.055);
  font-size: .65rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.challenge-library-group.is-preview .challenge-library-group-heading em {
  border-color: rgba(154,210,255,.22);
  color: rgba(154,210,255,.62);
  background: rgba(154,210,255,.04);
}

.challenge-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.challenge-library-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 280px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(214,168,79,.27);
  border-radius: 16px;
  background:
    radial-gradient(circle at 15% 0, rgba(214,168,79,.075), transparent 38%),
    linear-gradient(155deg, rgba(25,15,14,.93), rgba(6,4,7,.97));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.045),
    0 10px 24px rgba(0,0,0,.32);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease;
}

.challenge-library-card.is-available:hover {
  transform: translateY(-2px);
  border-color: rgba(241,207,122,.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 22px rgba(214,168,79,.10),
    0 14px 30px rgba(0,0,0,.44);
}

.challenge-library-card.is-locked {
  border-color: rgba(154,210,255,.12);
  background:
    linear-gradient(155deg, rgba(14,16,20,.70), rgba(5,5,8,.86));
  filter: saturate(.48);
}

.challenge-library-card.is-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(0,0,0,.06), rgba(0,0,0,.24));
}

.challenge-library-card-topline,
.challenge-library-card h5,
.challenge-library-summary,
.challenge-library-meta,
.challenge-library-win,
.challenge-library-select-btn,
.challenge-library-host-note,
.challenge-library-lock-note {
  position: relative;
  z-index: 1;
}

.challenge-library-card-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 23px;
}

.challenge-library-type,
.challenge-library-played {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid rgba(214,168,79,.24);
  border-radius: 999px;
  color: rgba(241,207,122,.84);
  background: rgba(214,168,79,.055);
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.challenge-library-played {
  border-color: rgba(154,210,255,.18);
  color: rgba(154,210,255,.68);
  background: rgba(154,210,255,.04);
}

.challenge-library-card h5 {
  margin: 12px 0 7px;
  color: #fff3d0;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  letter-spacing: .035em;
}

.challenge-library-summary {
  margin: 0;
  color: rgba(244,234,211,.82);
  line-height: 1.38;
}

.challenge-library-meta {
  display: grid;
  grid-template-columns: minmax(90px, .75fr) minmax(0, 1.6fr);
  gap: 9px;
  margin-top: 13px;
}

.challenge-library-meta span {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  color: rgba(244,234,211,.72);
  background: rgba(0,0,0,.24);
  font-size: .78rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.challenge-library-meta b {
  display: block;
  margin-bottom: 2px;
  color: rgba(214,168,79,.65);
  font-size: .57rem;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.challenge-library-win {
  flex: 1 1 auto;
  margin: 11px 0 14px;
  color: rgba(244,234,211,.66);
  font-size: .8rem;
  line-height: 1.35;
}

.challenge-library-win b {
  color: rgba(241,207,122,.78);
}

.challenge-library-select-btn,
.challenge-library-host-note,
.challenge-library-lock-note {
  width: 100%;
  min-height: 42px;
  margin-top: auto;
  border-radius: 10px;
  box-sizing: border-box;
}

.challenge-library-select-btn {
  border: 1px solid rgba(241,207,122,.58) !important;
  color: #fff5d7 !important;
  background:
    linear-gradient(180deg, rgba(142,91,23,.98), rgba(70,35,8,.99)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,238,185,.16),
    0 0 16px rgba(214,168,79,.12),
    0 7px 16px rgba(0,0,0,.36) !important;
  font-size: .73rem !important;
  letter-spacing: .09em !important;
  text-transform: uppercase;
}

.challenge-library-host-note,
.challenge-library-lock-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid rgba(154,210,255,.14);
  color: rgba(154,210,255,.58);
  background: rgba(8,16,25,.42);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .10em;
  text-align: center;
  text-transform: uppercase;
}

.challenge-library-host-note {
  border-color: rgba(214,168,79,.18);
  color: rgba(241,207,122,.66);
  background: rgba(35,21,8,.35);
}

.challenge-library-lock-note span {
  color: rgba(154,210,255,.68);
  font-size: .95rem;
}

@media (max-width: 780px) {
  .challenge-library-grid {
    grid-template-columns: 1fr;
  }

  .challenge-library-card {
    min-height: 0;
  }
}

@media (max-width: 540px) {
  .challenge-library-mode-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .challenge-library-mode-mark {
    margin: 0 auto;
  }

  .challenge-library-group-heading {
    align-items: flex-start;
  }

  .challenge-library-group-heading > div {
    grid-template-columns: 1fr;
  }

  .challenge-library-group-heading span {
    display: none;
  }

  .challenge-library-group-heading p {
    font-size: .78rem;
  }

  .challenge-library-section-divider {
    gap: 8px;
    letter-spacing: .08em;
    line-height: 1.35;
  }

  .challenge-library-meta {
    grid-template-columns: 1fr;
  }
}

.role-reveal-card h2.role-reveal-role-title {
  color: #d6a84f;
  font-size: clamp(1.75rem, 6vw, 3.35rem);
  letter-spacing: .08em;
  line-height: 1.18;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.role-reveal-role-title .role-reveal-main-line {
  display: block;
  font-size: clamp(2rem, 7vw, 3.8rem);
  color: #d6a84f;
}

.role-reveal-role-title .role-reveal-sub-line {
  display: block;
  max-width: 18ch;
  font-size: clamp(1rem, 2.7vw, 1.35rem);
  color: #f1eadf;
  letter-spacing: .03em;
  line-height: 1.35;
}

.role-reveal-role-title .role-reveal-list-label {
  display: block;
  margin-top: 2px;
  font-size: clamp(.95rem, 2.4vw, 1.15rem);
  color: #d6a84f;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.role-reveal-role-title .role-reveal-name-list {
  display: block;
  font-size: clamp(1rem, 2.8vw, 1.3rem);
  color: #f5efe5;
  line-height: 1.42;
}
/* ================= ARCHETYPE REVEAL DESKTOP BALANCED SIZE FIX ================= */

@media (min-width: 701px) {
  .character-intro-overlay {
    min-height: 100dvh !important;
    height: 100dvh !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 18px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .character-intro-card {
    width: min(900px, 94vw) !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 16px 22px 18px !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  .character-intro-image {
    width: auto !important;
    max-width: min(100%, 540px) !important;
    max-height: min(56dvh, 610px) !important;
    margin: 0 auto 6px !important;
    object-fit: contain !important;
  }

  .character-intro-kicker {
    margin-top: 0 !important;
    font-size: .72rem !important;
  }

  .character-intro-card h2 {
    margin: 3px 0 6px !important;
    line-height: 1.04 !important;
  }

  .character-intro-card p {
    margin: 0 auto !important;
    max-width: 760px !important;
    line-height: 1.28 !important;
    font-size: 1rem !important;
  }

  .character-intro-progress {
    margin: 6px auto 0 !important;
  }

  .character-intro-actions {
    margin-top: 8px !important;
    gap: 8px !important;
  }

  .character-intro-actions button {
    min-height: 40px !important;
    padding: 9px 14px !important;
    margin-top: 5px !important;
  }
}


/* ================= V1.2.33 KNAVE ROLE PRIMER ================= */
.role-primer-box { width:min(760px,100%); margin:14px auto; padding:clamp(16px,3vw,24px); text-align:left; border:1px solid rgba(214,168,79,.34); background:radial-gradient(circle at top,rgba(214,168,79,.08),transparent 42%),rgba(0,0,0,.34); box-shadow:inset 0 0 28px rgba(214,168,79,.05); }
.role-primer-intro { margin:0 0 14px; color:#efe8df; text-align:center; line-height:1.5; }
.role-primer-definition { display:grid; grid-template-columns:minmax(110px,150px) 1fr; gap:14px; align-items:start; margin:10px 0; padding:13px 14px; border:1px solid rgba(255,255,255,.10); border-radius:12px; background:rgba(0,0,0,.26); }
.role-primer-definition strong { color:#d6a84f; font-size:1.05rem; letter-spacing:.08em; text-transform:uppercase; }
.role-primer-definition span { color:#efe8df; line-height:1.45; }
.role-primer-countdown { margin:15px 0 0; padding:11px 12px; border:1px solid rgba(214,168,79,.30); border-radius:10px; background:rgba(157,23,35,.14); color:#d6a84f; text-align:center; font-weight:bold; line-height:1.4; }
#revealRoleBtn:disabled { cursor:wait; opacity:.92; }
@media (max-width:620px) { .role-primer-definition { grid-template-columns:1fr; gap:6px; text-align:center; } .role-primer-definition span { text-align:left; } }


/* ================= V1.2.34 KNAVE PRIMARY COMMAND ================= */

.role-primer-definition-copy {
  display: grid;
  gap: 10px;
}

.knave-primary-command {
  position: relative;
  padding: 12px 14px;
  border: 1px solid rgba(238, 194, 94, .72);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(122, 22, 29, .38), rgba(48, 8, 14, .54)),
    rgba(0, 0, 0, .28);
  color: #fff0bd;
  font-weight: 800;
  line-height: 1.42;
  text-align: center;
  letter-spacing: .015em;
  box-shadow:
    0 0 0 1px rgba(214, 168, 79, .10),
    0 0 16px rgba(214, 168, 79, .16),
    inset 0 0 18px rgba(214, 168, 79, .08);
  animation: knavePrimaryCommandPulse 2.4s ease-in-out infinite;
}

.knave-primary-command::before {
  content: "MOST IMPORTANT";
  display: block;
  margin-bottom: 5px;
  color: #d6a84f;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

@keyframes knavePrimaryCommandPulse {
  0%, 100% {
    border-color: rgba(214, 168, 79, .52);
    box-shadow:
      0 0 0 1px rgba(214, 168, 79, .08),
      0 0 12px rgba(214, 168, 79, .12),
      inset 0 0 16px rgba(214, 168, 79, .06);
    transform: scale(1);
  }

  50% {
    border-color: rgba(255, 220, 132, .94);
    box-shadow:
      0 0 0 1px rgba(255, 220, 132, .18),
      0 0 25px rgba(214, 168, 79, .30),
      inset 0 0 22px rgba(214, 168, 79, .12);
    transform: scale(1.012);
  }
}

@media (prefers-reduced-motion: reduce) {
  .knave-primary-command {
    animation: none;
  }
}

@media (max-width: 620px) {
  .role-primer-definition-copy {
    text-align: left;
  }

  .knave-primary-command {
    padding: 11px 12px;
    font-size: .96rem;
  }
}


/* ================= V1.2.35 ROLE PRIMER CONTINUE FLOW ================= */

.knave-pronunciation {
  display: inline;
  color: #efe8df;
  font-size: .78em;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  white-space: nowrap;
}

#revealRoleBtn {
  cursor: pointer;
}

#revealRoleBtn:disabled {
  cursor: wait;
}


/* ================= V140 VOTING INSTRUCTION POPUPS ================= */

.voting-instruction-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000015;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(3px);
}

.voting-instruction-overlay.hidden {
  display: none !important;
}

.voting-instruction-card {
  width: min(680px, 94vw);
  max-height: min(88vh, 820px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(214, 168, 79, .58);
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(157, 23, 35, .18), transparent 38%),
    linear-gradient(180deg, rgba(25, 13, 21, .99), rgba(4, 3, 5, .99));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, .88),
    0 0 34px rgba(214, 168, 79, .12),
    inset 0 0 30px rgba(214, 168, 79, .06);
  text-align: center;
}

.voting-instruction-raven-mark {
  margin-bottom: 8px;
  color: #a99699;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.voting-instruction-card h2 {
  margin: 4px 0 12px;
  color: #d6a84f;
  letter-spacing: .08em;
}

.voting-instruction-lead {
  margin: 0 auto 16px;
  color: #efe8df;
  line-height: 1.5;
}

.voting-instruction-command {
  margin: 16px auto 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 218, 126, .82);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(157, 23, 35, .38), rgba(68, 10, 17, .58));
  color: #fff1bd;
  font-size: clamp(1rem, 3.7vw, 1.22rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: .045em;
  box-shadow:
    0 0 0 1px rgba(214, 168, 79, .10),
    0 0 18px rgba(214, 168, 79, .18),
    inset 0 0 18px rgba(214, 168, 79, .08);
  animation: votingInstructionCommandPulse 2.35s ease-in-out infinite;
}

.voting-instruction-body {
  color: #efe8df;
  text-align: left;
  line-height: 1.52;
}

.voting-instruction-body p {
  margin: 11px 0;
}

.voting-instruction-body strong {
  color: #e1bd72;
}

.voting-instruction-alliance-line {
  color: #d6a84f;
  font-style: italic;
  text-align: center;
}

.voting-instruction-divider {
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(214, 168, 79, .50),
    transparent
  );
}

.voting-instruction-revote-warning,
.voting-instruction-final-warning {
  text-align: center;
}

.voting-instruction-dagger-warning {
  padding: 10px 12px;
  border: 1px solid rgba(214, 168, 79, .24);
  border-radius: 10px;
  background: rgba(214, 168, 79, .06);
}

#votingInstructionPopupBtn {
  margin-top: 18px;
  background: linear-gradient(180deg, #a61a29, #76101b);
  border: 1px solid rgba(255, 220, 132, .30);
  box-shadow: 0 0 18px rgba(157, 23, 35, .25);
  font-weight: 800;
}

@keyframes votingInstructionCommandPulse {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(214, 168, 79, .58);
    box-shadow:
      0 0 0 1px rgba(214, 168, 79, .08),
      0 0 12px rgba(214, 168, 79, .12),
      inset 0 0 16px rgba(214, 168, 79, .06);
  }

  50% {
    transform: scale(1.012);
    border-color: rgba(255, 222, 134, .96);
    box-shadow:
      0 0 0 1px rgba(255, 222, 134, .16),
      0 0 28px rgba(214, 168, 79, .30),
      inset 0 0 22px rgba(214, 168, 79, .11);
  }
}

@media (prefers-reduced-motion: reduce) {
  .voting-instruction-command {
    animation: none;
  }
}

@media (max-width: 620px) {
  .voting-instruction-overlay {
    padding: 12px;
  }

  .voting-instruction-card {
    width: 96vw;
    max-height: 91vh;
    padding: 19px 16px;
  }

  .voting-instruction-body {
    font-size: .94rem;
  }
}


/* ================= V142 CHARACTER PLAYER ENGINE ================= */

.character-lobby-panel {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(214, 168, 79, .30);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(214,168,79,.055), rgba(0,0,0,.24));
  text-align: left;
}

.character-lobby-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.character-lobby-heading h4 {
  margin: 0 0 4px;
  color: #d6a84f;
}

.character-lobby-heading p {
  margin: 0;
}

.character-lobby-badge,
.character-status-badge,
.table-chat-character-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214,168,79,.34);
  border-radius: 999px;
  background: rgba(214,168,79,.08);
  color: #d9bb7d;
  font-size: .60rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  white-space: nowrap;
}

.character-lobby-badge {
  padding: 6px 8px;
  margin-top: 2px;
}

.character-status-badge {
  padding: 4px 6px;
}

.character-lobby-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 13px;
}

.character-lobby-add-row select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: #0f0b12;
  color: #efe8df;
  font-family: Georgia, "Times New Roman", serif;
}

.character-lobby-add-row button {
  width: auto;
  margin: 0;
  padding-inline: 14px;
}

#fillEmptySeatsWithCharactersBtn {
  margin-top: 10px;
}

.character-lobby-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.character-lobby-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  background: rgba(0,0,0,.22);
}

.character-lobby-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.character-lobby-identity img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid rgba(214,168,79,.26);
  border-radius: 50%;
  background: rgba(0,0,0,.32);
}

.character-lobby-identity strong,
.character-lobby-identity span {
  display: block;
}

.character-lobby-identity strong {
  color: #efe8df;
}

.character-lobby-identity span {
  margin-top: 2px;
  color: #a99699;
  font-size: .72rem;
}

.character-remove-btn {
  width: auto;
  margin: 0;
  padding: 8px 10px;
  font-size: .68rem;
}

.character-lobby-empty {
  padding: 9px;
  border: 1px dashed rgba(255,255,255,.10);
  border-radius: 10px;
  color: #a99699;
  text-align: center;
  font-size: .82rem;
}

.character-lobby-status {
  margin: 10px 0 0;
  text-align: center;
}

.table-chat-character-badge {
  margin-left: 7px;
  padding: 3px 5px;
  vertical-align: middle;
  font-size: .52rem;
}

@media (max-width: 620px) {
  .character-lobby-add-row {
    grid-template-columns: 1fr;
  }

  .character-lobby-add-row button {
    width: 100%;
  }

  .character-lobby-row {
    align-items: center;
  }
}


/* ================= RAVEN PREFERENCE COMPACT V2 ================= */
.raven-preference-panel.raven-preference-compact {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  margin-block: 0.65rem;
}

.raven-preference-panel.raven-preference-compact.hidden {
  display: none !important;
}

.raven-preference-open-btn {
  width: auto;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
}

.raven-preference-compact-status {
  font-size: 0.82rem;
  opacity: 0.82;
}

.raven-preference-details {
  width: 100%;
}

.raven-preference-details.hidden {
  display: none !important;
}

.raven-preference-panel.raven-preference-expanded {
  display: block;
}

.raven-preference-panel.raven-preference-expanded .raven-preference-open-btn {
  margin-bottom: 0.7rem;
}

.raven-preference-truth {
  font-weight: 700;
  margin: 0.45rem 0;
}

.raven-preference-warning {
  margin: 0.45rem 0 0.75rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.raven-preference-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}

.raven-preference-actions button {
  margin: 0;
}

@media (max-width: 640px) {
  .raven-preference-panel.raven-preference-compact {
    align-items: stretch;
    flex-direction: column;
  }

  .raven-preference-open-btn {
    width: 100%;
  }
}

/* ================= RESPONSIVE ROOM BACKGROUND V160 ================= */
html {
  background: #030204;
}

body {
  background-color: #030204;
  background-image: url("/images/background/background-desktop.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

/* The Room shell used to hide almost all of the body background. */
#gameRoomPanel.game-room-panel.panel {
  background: linear-gradient(180deg, rgba(8, 5, 8, 0.30), rgba(5, 3, 6, 0.38));
  box-shadow:
    0 0 70px rgba(0, 0, 0, 0.48),
    inset 0 0 80px rgba(0, 0, 0, 0.08);
}

#app {
  background: transparent;
}

@media (max-width: 700px) {
  body {
    background-image: url("/images/background/background-mobile.webp");
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
  }

  #gameRoomPanel.game-room-panel.panel {
    background: linear-gradient(180deg, rgba(8, 5, 8, 0.34), rgba(5, 3, 6, 0.42));
  }
}

/* ================= TOP-LEVEL SHELL TRANSPARENCY V162 ================= */
/* Keep the room visible. Inner cards/panels retain their own darker surfaces. */
#joinPanel.enter-game-panel.panel,
#gameRoomPanel.game-room-panel.panel {
  background:
    linear-gradient(180deg, rgba(8, 5, 8, 0.12), rgba(5, 3, 6, 0.18)) !important;
  box-shadow:
    0 0 42px rgba(0, 0, 0, 0.24),
    inset 0 0 46px rgba(0, 0, 0, 0.035) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (max-width: 700px) {
  #joinPanel.enter-game-panel.panel,
  #gameRoomPanel.game-room-panel.panel {
    background:
      linear-gradient(180deg, rgba(8, 5, 8, 0.16), rgba(5, 3, 6, 0.22)) !important;
    box-shadow:
      0 0 34px rgba(0, 0, 0, 0.25),
      inset 0 0 38px rgba(0, 0, 0, 0.04) !important;
  }
}


/* ================= V164 SIDE-VIEW TABLE OF DECEPTION PNG ================= */
/* The table now uses the transparent side-view PNG asset. Player seat positioning and
   click targets stay in the existing .room-table / .room-player-list system. */

#gameRoomPanel .room-table,
#gameRoomPanel.deceived-layout-v3 .room-table {
  position: relative !important;
  isolation: isolate !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Support either common UI-folder layout. If both exist, the identical image
   simply layers over itself; if one path is absent, the other still renders. */
#gameRoomPanel .table-of-deception-artwork,
#gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
  position: absolute !important;
  inset: -2% 2% !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background-image:
    url('/ui/table-of-deception-side.webp'),
    url('/images/ui/table-of-deception-side.webp') !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  background-size: contain, contain !important;
  filter:
    drop-shadow(0 12px 20px rgba(0,0,0,.72))
    drop-shadow(0 0 18px rgba(214,168,79,.10)) !important;
}

/* Retire every old CSS-drawn table surface / center card / raven layer. */
#gameRoomPanel .room-table::before,
#gameRoomPanel .room-table::after,
#gameRoomPanel.deceived-layout-v3 .room-table::before,
#gameRoomPanel.deceived-layout-v3 .room-table::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* The side-view PNG already contains THE TABLE OF DECEPTION plaque and soul-ball center. */
#gameRoomPanel .room-table .table-center-text,
#gameRoomPanel.deceived-layout-v3 .room-table .table-center-text {
  display: none !important;
}

/* Keep interactive player/name layers above the artwork. */
#gameRoomPanel .room-player-list,
#gameRoomPanel.deceived-layout-v3 .room-player-list {
  z-index: 2 !important;
}

@media (max-width: 700px) {
  #gameRoomPanel .table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
    inset: 0 !important;
    filter:
      drop-shadow(0 9px 15px rgba(0,0,0,.70))
      drop-shadow(0 0 12px rgba(214,168,79,.08)) !important;
  }
}


/* ================= V167 UNIFIED TABLE VOICE - THE RAVEN JOINS DISCUSSION =================
   The separate Raven Speaks feed is retired. Public Raven narration now appears
   chronologically inside The Table of Deception conversation, with game-flow
   lines visually stronger than occasional personality observations.
============================================================================== */

.raven-table-message {
  --table-chat-name-color: #d6a84f;
  position: relative;
  margin: 8px 0 !important;
  padding: 11px 12px 11px 13px !important;
  border: 1px solid rgba(214, 168, 79, .18) !important;
  border-left: 4px solid rgba(226, 184, 91, .86) !important;
  border-radius: 0 11px 11px 0 !important;
  background:
    linear-gradient(90deg, rgba(214,168,79,.13), rgba(68,34,16,.055) 58%, rgba(0,0,0,0)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    0 7px 18px rgba(0,0,0,.13) !important;
}

.raven-table-message.raven-flow-message {
  border-left-color: rgba(245, 205, 112, .98) !important;
  background:
    linear-gradient(90deg, rgba(214,168,79,.19), rgba(87,44,17,.08) 64%, rgba(0,0,0,0)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,242,196,.04),
    inset 0 0 22px rgba(214,168,79,.045),
    0 8px 20px rgba(0,0,0,.16) !important;
}

.raven-table-message.raven-commentary-message {
  border-color: rgba(174, 132, 60, .14) !important;
  border-left-color: rgba(194, 148, 65, .68) !important;
  background:
    linear-gradient(90deg, rgba(154,108,42,.105), rgba(0,0,0,0) 70%) !important;
}

.raven-table-name {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  color: #f0cf7c !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-variant: small-caps;
  font-weight: 900 !important;
  letter-spacing: .13em !important;
  line-height: 1.1 !important;
  text-shadow:
    0 0 11px rgba(214,168,79,.31),
    0 2px 8px rgba(0,0,0,.95) !important;
}

.raven-table-name-title {
  font-size: 1.07rem;
}

.raven-table-emblem {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(235, 203, 126, .44);
  border-radius: 50%;
  background: rgba(0,0,0,.52);
  box-shadow:
    0 0 0 2px rgba(0,0,0,.42),
    0 0 12px rgba(214,168,79,.17);
}

.raven-table-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  padding: 3px 6px 2px;
  border: 1px solid rgba(214,168,79,.30);
  border-radius: 999px;
  background: rgba(10,7,7,.55);
  color: #bfa266;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .49rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1;
}

.raven-table-text {
  margin-top: 6px !important;
  color: #eee2ca !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: .96rem !important;
  line-height: 1.54 !important;
  font-style: italic;
  text-shadow: 0 2px 7px rgba(0,0,0,.88);
}

.raven-flow-message .raven-table-text {
  color: #f6ead0 !important;
  font-style: normal;
  font-weight: 650;
}

.raven-last-words-message {
  border-left-color: rgba(178, 49, 62, .92) !important;
  background:
    linear-gradient(90deg, rgba(118,20,31,.19), rgba(214,168,79,.075) 58%, rgba(0,0,0,0)) !important;
}

.raven-last-words-message .raven-table-name-title {
  color: #f2d28a;
}

.table-history-trimmed {
  justify-content: center;
  padding: 7px 12px !important;
  color: rgba(232, 211, 167, .72) !important;
  font-size: .82rem;
  font-style: italic;
  text-align: center;
  border-style: dashed !important;
  background: rgba(0, 0, 0, .2) !important;
}

.table-of-deception-readonly #tableOfDeceptionHint {
  color: #c4ad7a;
}

.table-of-deception-readonly .table-of-deception-messages {
  border-color: rgba(214,168,79,.20) !important;
  box-shadow: inset 0 0 24px rgba(0,0,0,.18);
}

.raven-tools-box {
  padding-top: 12px !important;
}

.raven-tools-box > h3 {
  margin-bottom: 8px !important;
  color: #c9ad70 !important;
  font-size: .84rem !important;
  letter-spacing: .13em !important;
  text-transform: uppercase;
}

@media (max-width: 620px) {
  .raven-table-message {
    padding: 9px 9px 9px 10px !important;
  }

  .raven-table-name {
    gap: 6px !important;
    letter-spacing: .09em !important;
  }

  .raven-table-name-title {
    font-size: .94rem;
  }

  .raven-table-emblem {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .raven-table-role {
    font-size: .44rem;
    padding: 3px 5px 2px;
  }

  .raven-table-text {
    font-size: .91rem !important;
  }
}

/* ================= V168 QUIETER UNREAD MAIL + BRANDED ROOM HEADER =================
   Keep unread Secret Mail noticeable without letting it dominate the room.
   This final override intentionally wins over the earlier alarm/takeover styles.
=============================================================================== */

#gameRoomPanel.deceived-layout-v3 > h2 {
  text-transform: none !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(1.22rem, 1.75vw, 1.78rem) !important;
  font-weight: 800 !important;
  letter-spacing: .095em !important;
  color: #e8c56d !important;
  text-shadow:
    0 0 10px rgba(214,168,79,.16),
    0 3px 13px rgba(0,0,0,.82) !important;
}

/* Stop the whole dock from shaking or flashing. */
.secret-message-action-bar.secret-mail-waiting,
#secretMessagesDock.secret-mail-waiting {
  animation: none !important;
  border-color: rgba(214,168,79,.42) !important;
  background:
    linear-gradient(180deg, rgba(12,7,9,.98), rgba(5,3,5,.98)) !important;
  box-shadow:
    inset 0 0 16px rgba(0,0,0,.72),
    0 8px 24px rgba(0,0,0,.54),
    0 0 16px rgba(214,168,79,.09) !important;
  filter: none !important;
}

/* Unread mail: dark crimson/gold, softly breathing instead of white-hot. */
#secretMessagesToggleBtn.secret-message-toggle-has-unread,
#secretMessagesToggleBtn.secret-message-arrival-throb,
.secret-message-toggle-btn.secret-message-toggle-has-unread,
.secret-message-toggle-btn.secret-message-arrival-throb {
  color: #f7e8c8 !important;
  border: 1px solid rgba(238,195,95,.78) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(240,193,92,.16), transparent 52%),
    linear-gradient(180deg, #8b1825 0%, #56101a 54%, #2b080d 100%) !important;
  text-shadow:
    0 1px 0 rgba(0,0,0,.78),
    0 0 8px rgba(240,193,92,.10) !important;
  animation: v168MailWaitingPulse 1.85s ease-in-out infinite !important;
  filter: none !important;
}

#secretMessagesToggleBtn.secret-message-toggle-has-unread::before,
#secretMessagesToggleBtn.secret-message-arrival-throb::before,
.secret-message-toggle-btn.secret-message-toggle-has-unread::before,
.secret-message-toggle-btn.secret-message-arrival-throb::before {
  content: "✉ " !important;
  color: #efc45f !important;
  text-shadow: 0 0 7px rgba(239,196,95,.24) !important;
  animation: none !important;
}

#secretMessagesToggleBtn.secret-message-toggle-has-unread .secret-unread-count,
#secretMessagesToggleBtn.secret-message-arrival-throb .secret-unread-count,
.secret-message-toggle-btn.secret-message-toggle-has-unread .secret-unread-count,
.secret-message-toggle-btn.secret-message-arrival-throb .secret-unread-count {
  background: #efc45f !important;
  color: #180607 !important;
  border-color: rgba(21,5,7,.96) !important;
  box-shadow:
    0 0 0 1px rgba(239,196,95,.16),
    0 0 10px rgba(239,196,95,.34) !important;
  animation: v168UnreadBadgePulse 1.85s ease-in-out infinite !important;
}

.secret-message-drawer.secret-mail-waiting,
.secret-messages-panel.secret-mail-waiting {
  animation: none !important;
  border-color: rgba(214,168,79,.50) !important;
  box-shadow:
    0 8px 24px rgba(0,0,0,.54),
    0 0 16px rgba(214,168,79,.12),
    inset 0 0 20px rgba(0,0,0,.38) !important;
  filter: none !important;
}

.secret-message-drawer.secret-mail-waiting .secret-messages-header h3::after {
  color: #efc45f !important;
  text-shadow: 0 0 7px rgba(239,196,95,.22) !important;
}

@keyframes v168MailWaitingPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.07),
      0 0 14px rgba(139,24,37,.34),
      0 0 15px rgba(239,196,95,.12),
      0 5px 14px rgba(0,0,0,.48);
  }
  50% {
    transform: scale(1.018);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.10),
      0 0 20px rgba(139,24,37,.44),
      0 0 24px rgba(239,196,95,.25),
      0 6px 16px rgba(0,0,0,.50);
  }
}

@keyframes v168UnreadBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.10); }
}

@media (max-width: 520px) {
  #gameRoomPanel.deceived-layout-v3 > h2 {
    font-size: 1.02rem !important;
    letter-spacing: .055em !important;
  }
}



/* ================= V169 DIRECT SECRET-MESSAGE NAME SHORTCUTS =================
   Keep the original Secret Message button/pick workflow, but let eligible
   player and Character names open the same composer directly.
=============================================================================== */

.room-table .room-player-seat.secret-message-shortcut {
  cursor: pointer !important;
}

.room-table .room-player-seat.secret-message-shortcut .player-identity.compact {
  transition:
    border-color .16s ease,
    background .16s ease,
    box-shadow .16s ease,
    filter .16s ease !important;
}

.room-table .room-player-seat.secret-message-shortcut:hover .player-identity.compact,
.room-table .room-player-seat.secret-message-shortcut:focus-visible .player-identity.compact {
  border-color: rgba(232,197,109,.48) !important;
  background:
    radial-gradient(circle at top, rgba(232,197,109,.16), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(12,6,7,.44), rgba(3,2,3,.28)) !important;
  box-shadow:
    0 0 11px rgba(0,0,0,.50),
    0 0 16px rgba(214,168,79,.14) !important;
  filter: brightness(1.08);
}

.table-of-deception-name.secret-message-recipient-shortcut {
  width: fit-content;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  outline: none;
  transition:
    border-color .15s ease,
    filter .15s ease,
    text-shadow .15s ease;
}

.table-of-deception-name.secret-message-recipient-shortcut:hover,
.table-of-deception-name.secret-message-recipient-shortcut:focus-visible {
  border-bottom-color: color-mix(
    in srgb,
    var(--table-chat-name-color, #f1cf7a) 62%,
    transparent
  );
  filter: brightness(1.15);
  text-shadow:
    0 0 12px color-mix(
      in srgb,
      var(--table-chat-name-color, #f1cf7a) 52%,
      transparent
    ),
    0 2px 8px rgba(0,0,0,.92) !important;
}

.table-of-deception-name.secret-message-recipient-shortcut::after {
  content: "✉";
  margin-left: 5px;
  font-size: .68em;
  line-height: 1;
  opacity: 0;
  transform: translateY(-1px);
  transition: opacity .15s ease;
}

.table-of-deception-name.secret-message-recipient-shortcut:hover::after,
.table-of-deception-name.secret-message-recipient-shortcut:focus-visible::after {
  opacity: .62;
}

@media (hover: none) {
  .table-of-deception-name.secret-message-recipient-shortcut::after {
    opacity: .48;
  }

  .table-of-deception-name.secret-message-recipient-shortcut {
    min-height: 28px;
    padding: 3px 2px;
    touch-action: manipulation;
  }
}


/* ================= V170 ELIMINATED SEAT CLARITY =================
   An eliminated player gets one unmistakable final state:
   struck-through name + ELIMINATED. No stacked CHARACTER / SOUL clutter.
============================================================================ */

.player-identity.eliminated-player .player-display-name,
.player-identity.eliminated-player .host-wing-player-name {
  text-decoration-line: line-through !important;
  text-decoration-thickness: 2px !important;
  text-decoration-color: rgba(194, 75, 75, .92) !important;
  text-decoration-skip-ink: none !important;
}

.player-status-badge.eliminated-status-badge {
  color: #d98a82 !important;
  border-color: rgba(184, 70, 65, .46) !important;
  background: linear-gradient(180deg, rgba(65, 13, 16, .66), rgba(22, 5, 7, .72)) !important;
  letter-spacing: .09em !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .86) !important;
}

.room-table .room-player-seat.eliminated-seat .player-identity.compact {
  border-color: rgba(142, 69, 63, .24) !important;
  background:
    radial-gradient(circle at top, rgba(135, 47, 45, .09), rgba(0, 0, 0, 0) 58%),
    linear-gradient(180deg, rgba(7, 4, 5, .30), rgba(2, 2, 3, .20)) !important;
  box-shadow:
    0 0 9px rgba(0, 0, 0, .42),
    0 0 10px rgba(114, 38, 38, .05) !important;
  filter: grayscale(.22) saturate(.72) !important;
}

.room-table .room-player-seat.eliminated-seat .player-display-name,
.room-table .room-player-seat.eliminated-seat .host-wing-player-name {
  color: #c9beb7 !important;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, .96),
    0 0 7px rgba(0, 0, 0, .92) !important;
}

.room-table .room-player-seat.eliminated-seat .player-status-badges.compact {
  display: flex !important;
  width: 100% !important;
  justify-content: center !important;
  margin-top: 3px !important;
}

.room-table .room-player-seat.eliminated-seat .eliminated-status-badge {
  min-height: 14px !important;
  padding: 1px 6px !important;
  font-size: .48rem !important;
  color: #dc8178 !important;
  border-color: rgba(184, 70, 65, .38) !important;
  background: rgba(29, 5, 7, .64) !important;
}


/* =========================================================
   V171 - CURRENT HOST LABEL
   ========================================================= */
.room-table .room-player-seat .host-text-badge {
  white-space: nowrap;
  font-size: .52rem;
  letter-spacing: .11em;
  padding-inline: 7px;
}


/* =========================================================
   V172 - CENTERED HOST / WAITING STRIP ABOVE THE TABLE
   Keeps game-flow status in the same visual lane as Secret Messages + table.
   ========================================================= */

#gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-banner,
#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-banner {
  position: relative !important;
  top: auto !important;
  z-index: 55 !important;
  width: min(760px, 92%) !important;
  margin: 8px auto 10px !important;
  padding: 8px 12px 9px !important;
  border: 1px solid rgba(210, 163, 70, .42) !important;
  border-radius: 13px !important;
  background:
    linear-gradient(180deg, rgba(31, 20, 12, .78), rgba(9, 7, 8, .72)) !important;
  box-shadow:
    0 7px 18px rgba(0, 0, 0, .30),
    inset 0 0 16px rgba(215, 166, 72, .035) !important;
  text-align: center !important;
  animation: none !important;
  backdrop-filter: blur(2px);
}

#gameRoomPanel .table-side-panel > #hostCommandBanner .host-command-banner-label {
  margin: 0 0 3px !important;
  color: #d9ae59 !important;
  font-size: clamp(.58rem, .82vw, .70rem) !important;
  font-weight: 900 !important;
  letter-spacing: .16em !important;
  line-height: 1.15 !important;
  text-transform: uppercase !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner .host-command-banner-text {
  margin: 0 auto !important;
  max-width: 680px !important;
  color: rgba(245, 237, 220, .90) !important;
  font-size: clamp(.72rem, .92vw, .84rem) !important;
  line-height: 1.28 !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-waiting-view {
  border-color: rgba(184, 145, 70, .32) !important;
  background:
    linear-gradient(180deg, rgba(25, 19, 13, .69), rgba(8, 7, 8, .65)) !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-waiting-view .host-command-banner-label {
  color: #caa35a !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view {
  border-color: rgba(224, 176, 78, .50) !important;
}

/* Only pulse when the game truly needs an action to move forward. */
#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-needs-action {
  animation: v172HostWaitingPulse 2.25s ease-in-out infinite !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-needs-action button:not(.hidden) {
  animation: none !important;
}

@keyframes v172HostWaitingPulse {
  0%, 100% {
    border-color: rgba(210, 163, 70, .42);
    box-shadow:
      0 7px 18px rgba(0, 0, 0, .30),
      0 0 0 rgba(210, 163, 70, 0),
      inset 0 0 16px rgba(215, 166, 72, .035);
    filter: brightness(1);
  }
  50% {
    border-color: rgba(238, 193, 99, .78);
    box-shadow:
      0 7px 18px rgba(0, 0, 0, .30),
      0 0 18px rgba(210, 163, 70, .19),
      inset 0 0 18px rgba(215, 166, 72, .07);
    filter: brightness(1.06);
  }
}

/* The actual Discussion host command stays compact inside the strip. */
#gameRoomPanel .table-side-panel > #hostCommandBanner .host-command-phase-control {
  margin: 7px auto 0 !important;
  padding: 7px 9px !important;
  border: 0 !important;
  border-top: 1px solid rgba(225, 183, 91, .18) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner .host-command-phase-control h3 {
  display: none !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner .host-command-phase-control .hint {
  margin: 0 auto 6px !important;
  color: rgba(240, 229, 207, .80) !important;
  font-size: .72rem !important;
  line-height: 1.2 !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner .host-command-phase-control #endDiscussionBtn,
#gameRoomPanel .table-side-panel > #hostCommandBanner #hostCommandJumpBtn:not(.hidden) {
  width: min(330px, 86%) !important;
  min-height: 36px !important;
  margin: 3px auto 0 !important;
  padding: 7px 12px !important;
  font-size: .72rem !important;
  line-height: 1.15 !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 13px rgba(0,0,0,.28) !important;
}

/* The Raven utility column no longer owns the Host Command. */
#gameRoomPanel.deceived-layout-v3 .raven-side-panel {
  gap: 10px !important;
}

@media (max-width: 650px) {
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-banner,
  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-banner {
    width: calc(100% - 14px) !important;
    margin: 7px auto 9px !important;
    padding: 7px 9px 8px !important;
  }

  #gameRoomPanel .table-side-panel > #hostCommandBanner .host-command-banner-label {
    letter-spacing: .11em !important;
    font-size: .57rem !important;
  }

  #gameRoomPanel .table-side-panel > #hostCommandBanner .host-command-banner-text {
    font-size: .70rem !important;
  }
}

/* =========================================================
   V175 - RAVEN PREFERENCE + UPPER TABLE GATHERING POLISH
   ========================================================= */

/* Raven Preference validation is now an in-game centered notice instead of
   a browser-owned alert that Edge/Chrome position near the top of the window. */
.raven-preference-notice-layer {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .46);
  backdrop-filter: blur(2px);
}

.raven-preference-notice-card {
  width: min(430px, calc(100vw - 36px));
  padding: 18px 20px 16px;
  border: 1px solid rgba(222, 177, 82, .58);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, rgba(29, 17, 15, .98), rgba(7, 4, 6, .99));
  box-shadow:
    0 18px 48px rgba(0,0,0,.70),
    0 0 24px rgba(214,168,79,.13),
    inset 0 1px 0 rgba(255,235,190,.08);
  text-align: center;
}

.raven-preference-notice-title {
  color: #e5bc69;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .16em;
}

.raven-preference-notice-text {
  margin: 12px 0 15px;
  color: #f2e7d3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .98rem;
  line-height: 1.4;
}

.raven-preference-notice-card button {
  width: min(180px, 70%);
  margin: 0 auto;
}

/* The host status is intentionally visible under the host's name even in the
   compact table-seat presentation. */
.room-table .room-player-seat .player-status-badges.compact .host-text-badge {
  display: inline-flex !important;
  color: #f3ca75 !important;
  border-color: rgba(226, 181, 87, .38) !important;
  background: rgba(35, 20, 7, .72) !important;
  font-size: .46rem !important;
  letter-spacing: .10em !important;
  white-space: nowrap !important;
}

/* Keep the upper gathering readable over the side-view artwork. */
.room-table .room-player-seat {
  z-index: 4 !important;
}

@media (max-width: 650px) {
  .raven-preference-notice-card {
    padding: 15px 14px 14px;
  }

  .raven-preference-notice-text {
    font-size: .88rem;
  }

  .room-table .room-player-seat .player-status-badges.compact .host-text-badge {
    font-size: .40rem !important;
    letter-spacing: .07em !important;
  }
}

/* ================= V176 LIVE CHARACTER FIGURES AROUND THE TABLE =================
   Selected Character Players use their existing *-transparent.webp assets as live
   figures behind/beside the side-view Table of Deception. The table artwork stays
   in front so its plaque, pedestal, and soul orb remain unobstructed. */

#gameRoomPanel .character-player-stage,
#gameRoomPanel.deceived-layout-v3 .character-player-stage {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  overflow: visible !important;
}

/* Character bodies are behind the actual transparent table PNG. */
#gameRoomPanel .table-of-deception-artwork,
#gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
  z-index: 2 !important;
}

/* Human name seats remain the highest interactive layer. */
#gameRoomPanel .room-player-list,
#gameRoomPanel.deceived-layout-v3 .room-player-list {
  z-index: 4 !important;
}

.character-table-figure-seat {
  position: absolute !important;
  transform: translateX(-50%) !important;
  transform-origin: top center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
  cursor: default !important;
  z-index: 1 !important;
}

/* The current source PNGs are wide transparent canvases with the person occupying
   only the center portion. A wider image box lets the actual figure fill the slot
   without changing or cropping the PNG file itself. */
.character-table-figure-image {
  position: absolute !important;
  left: 50% !important;
  bottom: 0 !important;
  width: 300% !important;
  height: 100% !important;
  transform: translateX(-50%) !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
  filter:
    drop-shadow(0 12px 13px rgba(0,0,0,.80))
    drop-shadow(0 0 8px rgba(214,168,79,.10)) !important;
}

/* Small identity plaque above each Character's head. */
.character-table-figure-label {
  position: absolute !important;
  left: 50% !important;
  top: -4px !important;
  transform: translate(-50%, -100%) !important;
  z-index: 3 !important;
  width: max-content !important;
  max-width: 118px !important;
  pointer-events: none !important;
}

.character-table-figure-label .player-identity.compact {
  width: auto !important;
  max-width: 118px !important;
  padding: 3px 6px !important;
  border: 1px solid rgba(214,168,79,.18) !important;
  border-radius: 12px !important;
  background: rgba(5,3,4,.48) !important;
  box-shadow:
    0 6px 14px rgba(0,0,0,.54),
    0 0 9px rgba(214,168,79,.07) !important;
  backdrop-filter: blur(1px) !important;
  -webkit-backdrop-filter: blur(1px) !important;
}

.character-table-figure-label .player-display-name,
.character-table-figure-label .host-wing-player-name {
  font-size: clamp(.52rem, .70vw, .68rem) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  color: #f3ead7 !important;
  text-shadow: 0 2px 5px rgba(0,0,0,.95) !important;
}

.character-table-figure-label .player-status-badges.compact {
  margin-top: 2px !important;
  gap: 2px !important;
}

.character-table-figure-label .player-status-badges.compact .player-status-badge {
  min-height: 12px !important;
  padding: 0 3px !important;
  font-size: .38rem !important;
  background: rgba(0,0,0,.48) !important;
}

.character-table-figure-seat.eliminated-character-figure .character-table-figure-image {
  opacity: .28 !important;
  filter:
    grayscale(.88)
    brightness(.55)
    drop-shadow(0 8px 10px rgba(0,0,0,.72)) !important;
}

.character-table-figure-seat.waiting-character-figure .character-table-figure-image {
  opacity: .48 !important;
  filter:
    grayscale(.45)
    brightness(.72)
    drop-shadow(0 8px 10px rgba(0,0,0,.70)) !important;
}

.character-table-figure-seat.character-figure-image-missing {
  min-width: 96px !important;
}

/* Clicking a Character itself keeps the existing Secret Message shortcut. */
.character-table-figure-seat.secret-message-shortcut {
  cursor: pointer !important;
}

.room-table.secret-recipient-pick-mode .character-table-figure-seat.secret-message-shortcut .character-table-figure-image,
.character-table-figure-seat.secret-message-shortcut:hover .character-table-figure-image,
.character-table-figure-seat.secret-message-shortcut:focus-visible .character-table-figure-image {
  filter:
    brightness(1.10)
    drop-shadow(0 0 10px rgba(255,255,255,.28))
    drop-shadow(0 0 20px rgba(214,168,79,.24))
    drop-shadow(0 12px 13px rgba(0,0,0,.80)) !important;
}

.room-table.secret-recipient-pick-mode .character-table-figure-seat.secret-message-shortcut .character-table-figure-label .player-identity.compact {
  border-color: rgba(255,255,255,.56) !important;
  box-shadow:
    0 0 14px rgba(255,255,255,.22),
    0 0 24px rgba(214,168,79,.18),
    0 6px 14px rgba(0,0,0,.54) !important;
}

@media (max-width: 900px) {
  .character-table-figure-image {
    width: 315% !important;
  }

  .character-table-figure-label,
  .character-table-figure-label .player-identity.compact {
    max-width: 100px !important;
  }

  .character-table-figure-label .player-display-name,
  .character-table-figure-label .host-wing-player-name {
    font-size: .52rem !important;
  }
}

@media (max-width: 650px) {
  .character-table-figure-image {
    width: 330% !important;
  }

  .character-table-figure-label {
    top: -2px !important;
  }

  .character-table-figure-label,
  .character-table-figure-label .player-identity.compact {
    max-width: 82px !important;
  }

  .character-table-figure-label .player-identity.compact {
    padding: 2px 4px !important;
    border-radius: 9px !important;
  }

  .character-table-figure-label .player-display-name,
  .character-table-figure-label .host-wing-player-name {
    font-size: .44rem !important;
  }

  .character-table-figure-label .player-status-badges.compact .player-status-badge {
    font-size: .29rem !important;
  }
}

/* ================= V177 LIFE-SIZE CHARACTER GATHERING =================
   V176 proved the live PNG system. V177 treats each source PNG's visible alpha
   bounds as the Character itself, so large transparent canvases no longer make
   the people look like tiny figurines. Character bodies remain behind the table;
   their attached nameplates stay above the artwork in the normal name layer. */

.character-table-figure-seat {
  width: auto !important;
  min-width: 0 !important;
  aspect-ratio: var(--character-visible-aspect) !important;
  transform: translateX(-50%) !important;
  transform-origin: center bottom !important;
  overflow: visible !important;
}

/* Map the selected crop of the ORIGINAL transparent PNG exactly into the visible
   Character box. clip-path hides transparent canvas and, for The Mimic, the
   smaller echoes so only the large front figure reads at the table. */
.character-table-figure-image {
  left: var(--character-image-left) !important;
  top: var(--character-image-top) !important;
  right: auto !important;
  bottom: auto !important;
  width: var(--character-image-width) !important;
  height: var(--character-image-height) !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  object-fit: fill !important;
  object-position: center !important;
  clip-path: inset(
    var(--character-clip-top)
    var(--character-clip-right)
    var(--character-clip-bottom)
    var(--character-clip-left)
  ) !important;
}

/* Labels are now siblings of the figures in .room-player-list. That lets the
   physical table cover waists/legs while the Character's name stays directly
   above the head and readable. */
.character-table-figure-label {
  z-index: 5 !important;
  transform: translate(-50%, -108%) !important;
  pointer-events: none !important;
}

.character-table-figure-label .player-identity.compact {
  background:
    radial-gradient(circle at top, rgba(214,168,79,.10), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(7,4,5,.56), rgba(2,2,3,.40)) !important;
  border-color: rgba(214,168,79,.24) !important;
  box-shadow:
    0 4px 12px rgba(0,0,0,.68),
    0 0 10px rgba(214,168,79,.08) !important;
}

/* The table is the foreground occluder. Character bodies sit behind it, while
   human seats and Character labels remain above it. */
#gameRoomPanel .character-player-stage,
#gameRoomPanel.deceived-layout-v3 .character-player-stage {
  z-index: 1 !important;
}

#gameRoomPanel .table-of-deception-artwork,
#gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
  z-index: 2 !important;
}

#gameRoomPanel .room-player-list,
#gameRoomPanel.deceived-layout-v3 .room-player-list {
  z-index: 4 !important;
}

/* Keep the hover/recipient glow on the visible body instead of the enormous
   transparent source canvas. */
.room-table.secret-recipient-pick-mode .character-table-figure-seat.secret-message-shortcut .character-table-figure-image,
.character-table-figure-seat.secret-message-shortcut:hover .character-table-figure-image,
.character-table-figure-seat.secret-message-shortcut:focus-visible .character-table-figure-image {
  filter:
    brightness(1.09)
    drop-shadow(0 0 9px rgba(255,255,255,.22))
    drop-shadow(0 0 16px rgba(214,168,79,.19))
    drop-shadow(0 12px 14px rgba(0,0,0,.82)) !important;
}

@media (max-width: 900px) {
  .character-table-figure-label {
    max-width: 96px !important;
    transform: translate(-50%, -104%) !important;
  }
}

@media (max-width: 650px) {
  .character-table-figure-label {
    max-width: 78px !important;
    transform: translate(-50%, -102%) !important;
  }

  .character-table-figure-label .player-identity.compact {
    padding: 2px 4px !important;
  }
}

/* Side figures dissolve into the dark floor instead of ending like poster cards.
   This also keeps any tiny branding sitting at the very bottom of legacy source
   PNGs from becoming a repeated visual element around the live table. */
.character-table-figure-seat.character-table-edge-figure .character-table-figure-image {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 70%,
    rgba(0,0,0,.92) 78%,
    rgba(0,0,0,.42) 90%,
    transparent 100%
  ) !important;
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 70%,
    rgba(0,0,0,.92) 78%,
    rgba(0,0,0,.42) 90%,
    transparent 100%
  ) !important;
}

/* ================= V178 FULL-FIGURE CHARACTER TABLE ASSETS =================
   V177's runtime crop math magnified pieces of the legacy landscape PNGs.
   V178 uses tightly trimmed, purpose-built standing transparent PNGs instead.
   No CSS crop/zoom is applied: each Character remains a complete figure and the
   existing Table of Deception artwork naturally occludes the lower body. */

.character-table-figure-seat {
  width: auto !important;
  min-width: 0 !important;
  transform: translateX(-50%) !important;
  transform-origin: center bottom !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.character-table-figure-image {
  position: absolute !important;
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  opacity: 1;
  filter:
    drop-shadow(0 12px 14px rgba(0,0,0,.82))
    drop-shadow(0 0 8px rgba(214,168,79,.08)) !important;
}

/* The two outside figures are allowed to read as fuller silhouettes beside the
   table. They no longer fade into the floor or lose their feet. */
.character-table-figure-seat.character-table-edge-figure .character-table-figure-image {
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.character-table-figure-label {
  transform: translate(-50%, -112%) !important;
  z-index: 5 !important;
}

/* The table remains the foreground layer; figures are behind it and labels/human
   seats stay above it. */
#gameRoomPanel .character-player-stage,
#gameRoomPanel.deceived-layout-v3 .character-player-stage {
  z-index: 1 !important;
}

#gameRoomPanel .table-of-deception-artwork,
#gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
  z-index: 2 !important;
}

#gameRoomPanel .room-player-list,
#gameRoomPanel.deceived-layout-v3 .room-player-list {
  z-index: 4 !important;
}

.room-table.secret-recipient-pick-mode .character-table-figure-seat.secret-message-shortcut .character-table-figure-image,
.character-table-figure-seat.secret-message-shortcut:hover .character-table-figure-image,
.character-table-figure-seat.secret-message-shortcut:focus-visible .character-table-figure-image {
  filter:
    brightness(1.08)
    drop-shadow(0 0 10px rgba(255,255,255,.20))
    drop-shadow(0 0 18px rgba(214,168,79,.18))
    drop-shadow(0 12px 14px rgba(0,0,0,.82)) !important;
}

@media (max-width: 900px) {
  .character-table-figure-label {
    transform: translate(-50%, -106%) !important;
  }
}

@media (max-width: 650px) {
  .character-table-figure-label {
    transform: translate(-50%, -103%) !important;
  }
}


/* ================= V179 CHARACTER FIGURE WIDTH CASCADE FIX =================
   V178 correctly switched to the purpose-built standing PNGs, but V177 left an
   !important width:auto + obsolete aspect-ratio variable in the cascade. With
   absolutely positioned images, that can collapse the Character seat to zero
   width. V179 gives the final figure box explicit width/aspect variables from JS. */
.character-table-figure-seat {
  width: var(--character-figure-width, 12%) !important;
  aspect-ratio: var(--character-figure-aspect, .66) !important;
}

@media (max-width: 900px) {
  .character-table-figure-seat {
    width: var(--character-figure-width, 12%) !important;
  }
}

@media (max-width: 650px) {
  .character-table-figure-seat {
    width: var(--character-figure-width, 12%) !important;
  }
}

/* ================= V180 PROVEN FULL-FIGURE CHARACTER RENDER =================
   Return the live Character layer to the V176 box model that visibly rendered
   in-game. The V178 table-specific PNGs are already tightly trimmed, so the
   image fills one concrete figure box with no crop math or aspect reconstruction. */

#gameRoomPanel .character-player-stage,
#gameRoomPanel.deceived-layout-v3 .character-player-stage {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  overflow: visible !important;
}

.character-table-figure-seat {
  position: absolute !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateX(-50%) !important;
  transform-origin: center bottom !important;
  overflow: visible !important;
  pointer-events: auto !important;
  z-index: 1 !important;
}

.character-table-figure-image {
  display: block !important;
  visibility: visible !important;
  position: absolute !important;
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  pointer-events: none !important;
  opacity: 1;
  filter:
    drop-shadow(0 12px 14px rgba(0,0,0,.82))
    drop-shadow(0 0 8px rgba(214,168,79,.09)) !important;
}

/* Character name follows its actual figure instead of living in a separate row. */
.character-table-figure-label {
  position: absolute !important;
  left: 50% !important;
  top: 1% !important;
  bottom: auto !important;
  transform: translate(-50%, -92%) !important;
  width: max-content !important;
  max-width: 118px !important;
  z-index: 3 !important;
  pointer-events: none !important;
}

/* The physical table is the foreground occluder. */
#gameRoomPanel .table-of-deception-artwork,
#gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
  z-index: 2 !important;
}

#gameRoomPanel .room-player-list,
#gameRoomPanel.deceived-layout-v3 .room-player-list {
  z-index: 4 !important;
}

@media (max-width: 900px) {
  .character-table-figure-label {
    transform: translate(-50%, -88%) !important;
    max-width: 96px !important;
  }
}

@media (max-width: 650px) {
  .character-table-figure-label {
    transform: translate(-50%, -84%) !important;
    max-width: 78px !important;
  }
}

/* ================= V182 LARGER + DIRECTLY CLICKABLE CHARACTER FIGURES =================
   Characters are now intentionally larger around the live Table of Deception.
   The visible figure itself is an explicit Secret Message hit target whenever that
   Character is an eligible recipient. The foreground table artwork remains visually
   above the bodies but never intercepts pointer input. */

#gameRoomPanel .table-of-deception-artwork,
#gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
  pointer-events: none !important;
}

.character-table-figure-seat {
  touch-action: manipulation !important;
}

.character-table-figure-seat.secret-message-shortcut,
.character-table-figure-seat.secret-message-shortcut .character-table-figure-image {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Give the visible person a little breathing room as a click target without
   changing the visual dimensions of the PNG. */
.character-table-figure-seat.secret-message-shortcut::after {
  content: "";
  position: absolute;
  inset: -2% -6% -2%;
  z-index: 2;
  background: transparent;
  pointer-events: auto;
}

.character-table-figure-seat.secret-message-shortcut:hover .character-table-figure-image,
.character-table-figure-seat.secret-message-shortcut:focus-visible .character-table-figure-image {
  filter:
    brightness(1.12)
    drop-shadow(0 0 11px rgba(255,255,255,.24))
    drop-shadow(0 0 21px rgba(214,168,79,.22))
    drop-shadow(0 14px 16px rgba(0,0,0,.84)) !important;
}

.character-table-figure-seat.secret-message-shortcut:focus-visible {
  outline: none !important;
}

/* ================= V183 CHARACTER CLICK-THROUGH + 20% SMALLER TABLE =================
   The full-size human-seat overlay sits above the Character layer. It must not
   intercept clicks in empty space; only the actual human seat buttons remain
   interactive. The table artwork is also scaled down about 20% to give the
   gathered Characters more visual room without changing the room/table stage. */

#gameRoomPanel .room-player-list,
#gameRoomPanel.deceived-layout-v3 .room-player-list {
  pointer-events: none !important;
}

#gameRoomPanel .room-player-list .room-player-seat,
#gameRoomPanel.deceived-layout-v3 .room-player-list .room-player-seat {
  pointer-events: auto !important;
}

/* Keep live Character figure buttons available underneath the click-through
   name layer. The image itself remains visually unchanged. */
#gameRoomPanel .character-table-figure-seat,
#gameRoomPanel.deceived-layout-v3 .character-table-figure-seat {
  pointer-events: auto !important;
}

/* Reduce only the rendered table artwork, not the room-table coordinate system.
   This keeps Character and human-seat positioning stable while opening more room
   around the table for the life-size Character figures. */
#gameRoomPanel .table-of-deception-artwork,
#gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
  transform: scale(.80) !important;
  transform-origin: center center !important;
}


/* ================= V184 BIGGER CHARACTERS + ISOLATED HOVER + UNDER-TABLE MAIL BAR =================
   - Character figures enlarged about 15% on desktop so they read more like gathered people.
   - Remove the oversized pseudo click blanket that was causing one Character to steal hover/click
     from neighboring Characters. The hit target is now the Character's own seat box only.
   - Move the Secret Message controls under the table. On desktop they sit in the same under-table
     utility row as Recruit Next Knave when that compact panel is present. On mobile the controls are
     explicitly shown below the table as a full-width bar. */

/* 1) Make the live Character figures larger without changing their placements. */
#gameRoomPanel .character-table-figure-seat,
#gameRoomPanel.deceived-layout-v3 .character-table-figure-seat {
  transform: translateX(-50%) scale(1.15) !important;
  transform-origin: center bottom !important;
}

@media (max-width: 900px) {
  #gameRoomPanel .character-table-figure-seat,
  #gameRoomPanel.deceived-layout-v3 .character-table-figure-seat {
    transform: translateX(-50%) scale(1.10) !important;
  }
}

@media (max-width: 650px) {
  #gameRoomPanel .character-table-figure-seat,
  #gameRoomPanel.deceived-layout-v3 .character-table-figure-seat {
    transform: translateX(-50%) scale(1.08) !important;
  }
}

/* 2) The hover/select area must stay isolated to the intended Character.
   The V182 pseudo element expanded each hit area far enough to overlap adjacent Characters,
   which is why hovering one Character could select another. Remove that blanket entirely. */
.character-table-figure-seat.secret-message-shortcut::after {
  content: none !important;
  display: none !important;
}

#gameRoomPanel .character-table-figure-seat.secret-message-shortcut,
#gameRoomPanel.deceived-layout-v3 .character-table-figure-seat.secret-message-shortcut {
  pointer-events: auto !important;
  cursor: pointer !important;
}

#gameRoomPanel .character-table-figure-seat.secret-message-shortcut:hover,
#gameRoomPanel .character-table-figure-seat.secret-message-shortcut:focus-visible,
#gameRoomPanel.deceived-layout-v3 .character-table-figure-seat.secret-message-shortcut:hover,
#gameRoomPanel.deceived-layout-v3 .character-table-figure-seat.secret-message-shortcut:focus-visible {
  z-index: 6 !important;
}

/* 3) Put the message controls under the table instead of above it. Desktop gets an under-table
   utility row; mobile gets a full-width dock immediately below the table so the controls are
   always visible. */
#gameRoomPanel .table-side-panel,
#gameRoomPanel.deceived-layout-v3 .table-side-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

#gameRoomPanel .table-side-panel > #pendingJoinPanel,
#gameRoomPanel .table-side-panel > #lateJoinWaitingPanel,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #pendingJoinPanel,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #lateJoinWaitingPanel {
  order: 1 !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner {
  order: 2 !important;
}

#gameRoomPanel .table-side-panel > .room-table,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > .room-table {
  order: 3 !important;
}

#gameRoomPanel .table-side-panel > #secretMessagesDock,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesDock {
  order: 4 !important;
  align-self: stretch !important;
  width: 100% !important;
  margin: 0 !important;
}

#gameRoomPanel .table-side-panel > #secretMessagesPanel,
#gameRoomPanel .table-side-panel > #tableOfDeceptionPanel,
#gameRoomPanel .table-side-panel > #challengePlaceholderPanel,
#gameRoomPanel .table-side-panel > #votingPanel,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesPanel,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #tableOfDeceptionPanel,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #challengePlaceholderPanel,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #votingPanel {
  order: 10 !important;
}

/* Figures extend outside the tabletop. Keep the final ballot in its own
   full row above their pointer targets, including after a viewport resize. */
#gameRoomPanel .table-side-panel > #endGameDecisionPanel {
  position: relative;
  z-index: 2;
  order: 9 !important;
  grid-column: 1 / -1;
}
#gameRoomPanel .table-side-panel:has(> #endGameDecisionPanel:not(.hidden)) > .room-table {
  z-index: 0 !important;
}

#gameRoomPanel .table-side-panel > #secretMessagesDock .secret-message-actions,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesDock .secret-message-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

#gameRoomPanel .table-side-panel > #secretMessagesDock .secret-message-compose-btn,
#gameRoomPanel .table-side-panel > #secretMessagesDock .secret-message-toggle-btn,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesDock .secret-message-compose-btn,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesDock .secret-message-toggle-btn {
  min-height: 48px !important;
}

/* Desktop: share the under-table band with the compact Recruit Next Knave panel when it exists. */
@media (min-width: 980px) {
  #gameRoomPanel .table-side-panel,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr) !important;
    column-gap: 14px !important;
    row-gap: 12px !important;
    align-items: start !important;
  }

  #gameRoomPanel .table-side-panel > #pendingJoinPanel,
  #gameRoomPanel .table-side-panel > #lateJoinWaitingPanel,
  #gameRoomPanel .table-side-panel > #hostCommandBanner,
  #gameRoomPanel .table-side-panel > .room-table,
  #gameRoomPanel .table-side-panel > #secretMessagesPanel,
  #gameRoomPanel .table-side-panel > #tableOfDeceptionPanel,
  #gameRoomPanel .table-side-panel > #challengePlaceholderPanel,
  #gameRoomPanel .table-side-panel > #votingPanel,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #pendingJoinPanel,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #lateJoinWaitingPanel,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > .room-table,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesPanel,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #tableOfDeceptionPanel,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #challengePlaceholderPanel,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #votingPanel {
    grid-column: 1 / -1 !important;
  }

  #gameRoomPanel .table-side-panel > #secretMessagesDock,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesDock {
    grid-column: 1 !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #gameRoomPanel .table-side-panel > .raven-preference-panel.raven-preference-compact:not(.hidden),
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > .raven-preference-panel.raven-preference-compact:not(.hidden) {
    grid-column: 2 !important;
    align-self: stretch !important;
    margin: 0 !important;
    min-height: 64px !important;
    display: grid !important;
    align-items: center !important;
  }
}

/* Mobile / tablet: dock stays immediately below the table and remains visible. */
@media (max-width: 979px) {
  #gameRoomPanel .table-side-panel > #secretMessagesDock,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesDock {
    width: 100% !important;
    margin-top: 2px !important;
  }

  #gameRoomPanel .table-side-panel > #secretMessagesDock .secret-message-actions,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesDock .secret-message-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 560px) {
  #gameRoomPanel .table-side-panel > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel .table-side-panel > #secretMessagesDock .secret-message-toggle-btn,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #secretMessagesDock .secret-message-toggle-btn {
    min-height: 46px !important;
    font-size: .72rem !important;
    letter-spacing: .05em !important;
  }
}

/* ================= V185 HUMAN PLAYERS IN FRONT OF THE TABLE =================
   Human users use the player-transparent back-view set and stand on the near side
   of the physical Table of Deception. Character Players remain behind the table.
   The center lane stays deliberately open so the soul ball and engraved plaque
   remain readable even with several human players in the room. */

#gameRoomPanel .human-player-stage,
#gameRoomPanel.deceived-layout-v3 .human-player-stage {
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
  pointer-events: none !important;
  overflow: visible !important;
  isolation: isolate !important;
}

.human-player-figure-seat {
  position: absolute !important;
  width: auto !important;
  max-width: 34% !important;
  min-width: 76px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translateX(-50%) !important;
  transform-origin: center bottom !important;
  pointer-events: none !important;
  overflow: visible !important;
}

.human-player-figure-image {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
  filter:
    drop-shadow(0 14px 15px rgba(0,0,0,.88))
    drop-shadow(0 0 9px rgba(214,168,79,.08)) !important;
  transition: filter .16s ease, opacity .16s ease !important;
}

/* The image boxes can be wide because some transparent PNGs use a square canvas.
   Keep the actual Secret Message target concentrated over the person's body so one
   player cannot steal hover/clicks from a neighboring figure. */
.human-player-message-hitbox {
  position: absolute !important;
  z-index: 6 !important;
  left: 50% !important;
  top: 5% !important;
  width: 48% !important;
  height: 84% !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 44% 44% 24% 24% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 0 !important;
  touch-action: manipulation !important;
}

.human-player-message-hitbox:disabled {
  pointer-events: none !important;
  cursor: default !important;
}

.human-player-figure-seat.human-player-secret-hover .human-player-figure-image,
.room-table.secret-recipient-pick-mode .human-player-figure-seat.human-player-secret-recipient .human-player-figure-image {
  filter:
    brightness(1.10)
    drop-shadow(0 0 12px rgba(255,255,255,.17))
    drop-shadow(0 0 22px rgba(214,168,79,.19))
    drop-shadow(0 15px 16px rgba(0,0,0,.88)) !important;
}

.human-player-figure-identity {
  position: absolute !important;
  z-index: 8 !important;
  left: 50% !important;
  top: 2% !important;
  transform: translate(-50%, -94%) !important;
  width: max-content !important;
  max-width: 142px !important;
  pointer-events: auto !important;
  text-align: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

.human-player-figure-identity:disabled {
  pointer-events: none !important;
  opacity: 1 !important;
}

.human-player-figure-identity.secret-message-shortcut {
  cursor: pointer !important;
}

.human-player-figure-identity.secret-message-shortcut:hover .player-identity.compact,
.human-player-figure-identity.secret-message-shortcut:focus-visible .player-identity.compact {
  border-color: rgba(255,235,176,.72) !important;
  box-shadow: 0 0 17px rgba(214,168,79,.22), 0 0 10px rgba(0,0,0,.72) !important;
}

.human-player-figure-identity .player-identity.compact {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  width: max-content !important;
  max-width: 142px !important;
  padding: 4px 7px !important;
  border: 1px solid rgba(214,168,79,.23) !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.11), rgba(0,0,0,0) 58%),
    linear-gradient(180deg, rgba(8,4,5,.68), rgba(3,2,3,.54)) !important;
  box-shadow:
    0 0 11px rgba(0,0,0,.67),
    0 0 14px rgba(214,168,79,.07) !important;
}

.human-player-figure-identity .player-display-name,
.human-player-figure-identity .host-wing-player-name {
  color: #f8edcf !important;
  font-size: clamp(.62rem, .76vw, .82rem) !important;
  line-height: 1.04 !important;
  font-weight: 950 !important;
  letter-spacing: .015em !important;
  white-space: normal !important;
  text-align: center !important;
  text-shadow:
    0 1px 0 rgba(0,0,0,.98),
    0 0 8px rgba(0,0,0,.96),
    0 0 12px rgba(214,168,79,.20) !important;
}

.human-player-figure-identity .host-wing-name.compact {
  gap: 2px !important;
}

.human-player-figure-identity .host-wing-name.compact .host-wing {
  width: 12px !important;
  height: 9px !important;
  opacity: .82 !important;
}

.human-player-figure-identity .player-status-badges.compact {
  margin-top: 1px !important;
  gap: 2px !important;
}

.human-player-figure-identity .player-status-badge {
  min-height: 13px !important;
  padding: 1px 4px !important;
  font-size: .44rem !important;
  letter-spacing: .07em !important;
  background: rgba(0,0,0,.57) !important;
}

.human-player-figure-identity .host-text-badge {
  display: inline-flex !important;
  color: #f3ca75 !important;
  border-color: rgba(226,181,87,.38) !important;
  background: rgba(35,20,7,.76) !important;
  white-space: nowrap !important;
}

.human-player-change-character-btn {
  position: absolute !important;
  z-index: 10 !important;
  left: 50% !important;
  bottom: 8% !important;
  transform: translateX(-50%) !important;
  width: max-content !important;
  min-width: 0 !important;
  min-height: 25px !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  border: 1px solid rgba(224,184,91,.62) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(180deg, rgba(73,42,12,.94), rgba(22,11,4,.96)) !important;
  color: #f7d98d !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: .49rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  box-shadow:
    0 5px 13px rgba(0,0,0,.68),
    inset 0 1px 0 rgba(255,241,187,.10) !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  touch-action: manipulation !important;
}

.human-player-change-character-btn:hover,
.human-player-change-character-btn:focus-visible {
  border-color: rgba(255,219,129,.90) !important;
  color: #fff0bb !important;
  filter: brightness(1.13) !important;
  outline: none !important;
  box-shadow:
    0 0 12px rgba(214,168,79,.24),
    0 6px 14px rgba(0,0,0,.72) !important;
}

.eliminated-human-figure .human-player-figure-image {
  opacity: .44 !important;
  filter:
    grayscale(.82)
    brightness(.68)
    drop-shadow(0 12px 14px rgba(0,0,0,.88)) !important;
}

.waiting-human-figure .human-player-figure-image {
  opacity: .52 !important;
  filter:
    grayscale(.30)
    brightness(.72)
    drop-shadow(0 12px 14px rgba(0,0,0,.84)) !important;
}

/* During recipient-pick mode, pulse the eligible human body rather than a giant
   rectangular PNG canvas. */
.room-table.secret-recipient-pick-mode .human-player-message-hitbox.secret-message-shortcut {
  opacity: .01 !important;
  box-shadow:
    0 0 0 2px rgba(240,207,124,.36),
    0 0 22px rgba(214,168,79,.22) !important;
  animation: humanRecipientTargetPulse 1.08s ease-in-out infinite !important;
}

@keyframes humanRecipientTargetPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(214,168,79,.22), 0 0 12px rgba(214,168,79,.10); }
  50% { box-shadow: 0 0 0 2px rgba(255,232,166,.62), 0 0 28px rgba(214,168,79,.30); }
}

/* ================= V185 CHANGE CHARACTER PICKER ================= */
body.human-avatar-picker-open {
  overflow: hidden !important;
}

.human-avatar-picker-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 30000 !important;
  display: grid !important;
  place-items: center !important;
  padding: 24px !important;
  background: rgba(1,1,2,.82) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}

.human-avatar-picker-modal {
  width: min(1080px, 96vw) !important;
  max-height: min(860px, 92vh) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid rgba(214,168,79,.52) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 50% -15%, rgba(214,168,79,.15), transparent 38%),
    linear-gradient(180deg, rgba(22,13,13,.99), rgba(4,3,5,.99)) !important;
  box-shadow:
    0 28px 90px rgba(0,0,0,.90),
    inset 0 0 44px rgba(214,168,79,.035) !important;
}

.human-avatar-picker-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px !important;
  padding: 18px 20px 15px !important;
  border-bottom: 1px solid rgba(214,168,79,.18) !important;
}

.human-avatar-picker-eyebrow {
  margin-bottom: 4px !important;
  color: #c69b48 !important;
  font-size: .62rem !important;
  font-weight: 900 !important;
  letter-spacing: .16em !important;
}

.human-avatar-picker-header h2 {
  margin: 0 !important;
  color: #efcc79 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(1.35rem, 2.4vw, 2rem) !important;
  letter-spacing: .04em !important;
}

.human-avatar-picker-header p {
  margin: 5px 0 0 !important;
  color: #d7cec2 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: .88rem !important;
  line-height: 1.35 !important;
}

.human-avatar-picker-close {
  flex: 0 0 38px !important;
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(214,168,79,.32) !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,.54) !important;
  color: #edd18d !important;
  font-size: 1.45rem !important;
  line-height: 1 !important;
}

.human-avatar-picker-grid {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 16px 18px 20px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

.human-avatar-choice {
  position: relative !important;
  min-width: 0 !important;
  min-height: 0 !important;
  aspect-ratio: .76 !important;
  margin: 0 !important;
  padding: 7px 5px 24px !important;
  overflow: hidden !important;
  border: 1px solid rgba(214,168,79,.17) !important;
  border-radius: 11px !important;
  background:
    radial-gradient(circle at 50% 20%, rgba(214,168,79,.08), transparent 52%),
    rgba(0,0,0,.38) !important;
  box-shadow: inset 0 0 14px rgba(0,0,0,.36) !important;
}

.human-avatar-choice:hover,
.human-avatar-choice:focus-visible {
  border-color: rgba(238,202,118,.72) !important;
  background: rgba(42,26,12,.53) !important;
  outline: none !important;
  box-shadow: 0 0 16px rgba(214,168,79,.16) !important;
}

.human-avatar-choice.selected {
  border-color: rgba(255,220,133,.92) !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.21), transparent 58%),
    rgba(55,31,9,.56) !important;
  box-shadow:
    0 0 0 1px rgba(214,168,79,.22),
    0 0 20px rgba(214,168,79,.18) !important;
}

.human-avatar-choice img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  pointer-events: none !important;
  filter: drop-shadow(0 7px 7px rgba(0,0,0,.62)) !important;
}

.human-avatar-choice-number {
  position: absolute !important;
  left: 7px !important;
  bottom: 6px !important;
  color: #d9bd7b !important;
  font-size: .66rem !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
}

.human-avatar-choice-selected {
  display: none !important;
  position: absolute !important;
  right: 6px !important;
  bottom: 6px !important;
  color: #ffdf8f !important;
  font-size: .48rem !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
}

.human-avatar-choice.selected .human-avatar-choice-selected {
  display: block !important;
}

@media (max-width: 1000px) {
  .human-player-figure-seat {
    transform: translateX(-50%) scale(.92) !important;
    transform-origin: center bottom !important;
  }

  .human-avatar-picker-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #gameRoomPanel .human-player-stage,
  #gameRoomPanel.deceived-layout-v3 .human-player-stage {
    z-index: 5 !important;
  }

  .human-player-figure-seat {
    transform: translateX(-50%) scale(.80) !important;
    transform-origin: center bottom !important;
  }

  .human-player-figure-identity {
    transform: translate(-50%, -84%) !important;
    max-width: 96px !important;
  }

  .human-player-figure-identity .player-identity.compact {
    max-width: 96px !important;
    padding: 3px 5px !important;
  }

  .human-player-figure-identity .player-display-name,
  .human-player-figure-identity .host-wing-player-name {
    font-size: .56rem !important;
  }

  .human-player-change-character-btn {
    bottom: 5% !important;
    padding: 4px 6px !important;
    font-size: .42rem !important;
  }

  .human-avatar-picker-overlay {
    padding: 10px !important;
  }

  .human-avatar-picker-modal {
    width: 98vw !important;
    max-height: 94vh !important;
  }

  .human-avatar-picker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
    padding: 10px 10px 14px !important;
  }
}

@media (max-width: 500px) {
  .human-player-figure-seat {
    transform: translateX(-50%) scale(.68) !important;
  }

  .human-player-change-character-btn {
    font-size: .38rem !important;
    letter-spacing: .05em !important;
  }

  .human-avatar-picker-header {
    padding: 13px 12px 11px !important;
  }

  .human-avatar-picker-header p {
    font-size: .76rem !important;
  }

  .human-avatar-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* ================= V186 MARBLE TABLE + INTEGRATED MAIL + LARGER HUMAN PLAYERS =================
   The brighter white-marble Table of Deception is the physical centerpiece, but it
   is deliberately toned down slightly so the red glass soul ball remains the only
   strong red element. Secret Message + Secret Mail are real HTML buttons aligned
   over the two recessed black-marble panels built into the table artwork. */

/* Use one authoritative new table asset so an older fallback table cannot show
   through the transparent PNG underneath it. */
#gameRoomPanel .table-of-deception-artwork,
#gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
  inset: -2% 1% !important;
  z-index: 2 !important;
  background-image: url('/ui/table-of-deception-marble-controls.webp') !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  transform: scale(.86) !important;
  transform-origin: center center !important;
  opacity: .97 !important;
  filter:
    brightness(.88)
    saturate(.92)
    contrast(1.04)
    drop-shadow(0 13px 21px rgba(0,0,0,.68))
    drop-shadow(0 0 16px rgba(214,168,79,.08)) !important;
  pointer-events: none !important;
}

/* The mail controls now belong to the table, not to the surrounding page layout. */
#gameRoomPanel .room-table > #secretMessagesDock,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock {
  position: absolute !important;
  z-index: 7 !important;
  left: 50% !important;
  top: 59.5% !important;
  width: min(52%, 610px) !important;
  min-width: 320px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate(-50%, -50%) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}

#gameRoomPanel .room-table > #secretMessagesDock:not(.hidden),
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock:not(.hidden) {
  display: block !important;
}

#gameRoomPanel .room-table > #secretMessagesDock .secret-message-actions,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 8.5% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

#gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
#gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: clamp(45px, 5.2vw, 62px) !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(221,181,91,.48) !important;
  border-radius: 13px !important;
  background:
    radial-gradient(circle at top, rgba(214,168,79,.08), transparent 56%),
    linear-gradient(180deg, rgba(24,22,20,.88), rgba(5,5,6,.94)) !important;
  color: #efd18b !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(.62rem, .86vw, .82rem) !important;
  font-weight: 900 !important;
  letter-spacing: .055em !important;
  line-height: 1.12 !important;
  text-shadow: 0 1px 5px rgba(0,0,0,.95) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,244,205,.07),
    inset 0 0 18px rgba(0,0,0,.34),
    0 2px 8px rgba(0,0,0,.32) !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: filter .15s ease, border-color .15s ease, box-shadow .15s ease !important;
}

#gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn:hover,
#gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn:focus-visible,
#gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn:hover,
#gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn:focus-visible {
  border-color: rgba(255,224,146,.82) !important;
  filter: brightness(1.13) !important;
  outline: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255,247,216,.12),
    0 0 15px rgba(214,168,79,.20),
    0 3px 9px rgba(0,0,0,.40) !important;
}

/* Unread mail stays noticeable without introducing another red object on the table. */
#gameRoomPanel .room-table > #secretMessagesDock.secret-mail-waiting,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock.secret-mail-waiting {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
}

#gameRoomPanel .room-table #secretMessagesToggleBtn.secret-message-toggle-has-unread,
#gameRoomPanel.deceived-layout-v3 .room-table #secretMessagesToggleBtn.secret-message-toggle-has-unread {
  color: #fff0bd !important;
  border-color: rgba(255,226,145,.92) !important;
  background:
    radial-gradient(circle at top, rgba(255,240,191,.16), transparent 54%),
    linear-gradient(180deg, rgba(66,44,15,.96), rgba(14,10,7,.97)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,248,216,.13),
    0 0 16px rgba(235,195,103,.25),
    0 3px 9px rgba(0,0,0,.42) !important;
  animation: v186TableMailPulse 1.9s ease-in-out infinite !important;
}

#gameRoomPanel .room-table #secretUnreadCount,
#gameRoomPanel.deceived-layout-v3 .room-table #secretUnreadCount {
  background: #e9bd62 !important;
  border-color: rgba(255,238,185,.92) !important;
  color: #1e1205 !important;
  box-shadow: 0 0 9px rgba(235,195,103,.32) !important;
}

@keyframes v186TableMailPulse {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.10); transform: scale(1.015); }
}

/* Recipient-pick instruction floats just below the two in-table buttons. */
#gameRoomPanel .room-table > #secretMessagesDock .secret-message-pick-prompt,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-pick-prompt {
  position: absolute !important;
  left: 50% !important;
  top: calc(100% + 7px) !important;
  transform: translateX(-50%) !important;
  width: max-content !important;
  max-width: 88vw !important;
  margin: 0 !important;
  padding: 5px 10px !important;
  border: 1px solid rgba(214,168,79,.26) !important;
  border-radius: 999px !important;
  background: rgba(5,4,5,.82) !important;
  color: #e7d2a0 !important;
  font-size: .64rem !important;
  box-shadow: 0 5px 13px rgba(0,0,0,.46) !important;
  pointer-events: none !important;
}

/* Human players are intentionally larger in V186. JS also lowers/pushes the
   first rows outward so these larger bodies do not sit on top of the new table controls. */
.human-player-figure-seat {
  max-width: 38% !important;
  min-width: 86px !important;
}

/* Keep the real user layer above the table art, while the table controls sit above
   the human layer if a very wide transparent avatar canvas brushes a button edge. */
#gameRoomPanel .human-player-stage,
#gameRoomPanel.deceived-layout-v3 .human-player-stage {
  z-index: 5 !important;
}

#gameRoomPanel .room-table > #secretMessagesDock,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock {
  z-index: 8 !important;
}

/* ================= V186 QUIETER RAVEN PREFERENCE =================
   Recruitment preference remains available, but its collapsed control now lives
   quietly at the bottom of the main table flow instead of competing with the table. */
#gameRoomPanel .table-side-panel > .raven-preference-panel.raven-preference-compact,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > .raven-preference-panel.raven-preference-compact {
  order: 90 !important;
  grid-column: 1 / -1 !important;
  justify-self: end !important;
  align-self: flex-end !important;
  width: auto !important;
  max-width: 240px !important;
  min-height: 0 !important;
  margin: 22px 8px 4px auto !important;
  padding: 0 !important;
  gap: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: .66 !important;
}

#gameRoomPanel .raven-preference-panel.raven-preference-compact .raven-preference-open-btn,
#gameRoomPanel.deceived-layout-v3 .raven-preference-panel.raven-preference-compact .raven-preference-open-btn {
  min-height: 31px !important;
  padding: 6px 10px !important;
  border: 1px solid rgba(174,134,60,.32) !important;
  border-radius: 9px !important;
  background: rgba(14,9,9,.72) !important;
  color: rgba(225,196,126,.82) !important;
  font-size: .62rem !important;
  letter-spacing: .04em !important;
  box-shadow: none !important;
}

#gameRoomPanel .raven-preference-panel.raven-preference-compact:hover,
#gameRoomPanel.deceived-layout-v3 .raven-preference-panel.raven-preference-compact:hover {
  opacity: .92 !important;
}

#gameRoomPanel .table-side-panel > .raven-preference-panel.raven-preference-expanded,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > .raven-preference-panel.raven-preference-expanded {
  justify-self: stretch !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: none !important;
  margin: 20px 0 4px !important;
  padding: 14px !important;
  border: 1px solid rgba(214,168,79,.30) !important;
  border-radius: 14px !important;
  background: rgba(10,6,8,.84) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.32) !important;
  opacity: 1 !important;
}

/* ================= V186 CONCISE HOST COMMAND ================= */
#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view {
  width: min(640px, 88%) !important;
  margin: 6px auto 8px !important;
  padding: 7px 10px 9px !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-banner-label {
  margin-bottom: 3px !important;
  font-size: clamp(.58rem, .78vw, .68rem) !important;
  letter-spacing: .13em !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-banner-text {
  margin: 0 auto 4px !important;
  color: #ead9b5 !important;
  font-size: clamp(.74rem, .92vw, .86rem) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-phase-control {
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
}

/* The banner line itself now says Next: Challenge/Voting, so do not repeat it. */
#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-phase-control .hint {
  display: none !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-phase-control #endDiscussionBtn,
#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view #hostCommandJumpBtn:not(.hidden) {
  width: min(270px, 82%) !important;
  min-height: 34px !important;
  margin: 2px auto 0 !important;
  padding: 7px 12px !important;
  font-size: .72rem !important;
}

@media (max-width: 900px) {
  #gameRoomPanel .table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
    transform: scale(.89) !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock {
    top: 59% !important;
    width: min(57%, 510px) !important;
    min-width: 280px !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn {
    min-height: 43px !important;
    font-size: .66rem !important;
  }
}

@media (max-width: 650px) {
  #gameRoomPanel .table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
    inset: 0 !important;
    transform: scale(.94) !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock {
    top: 59% !important;
    width: 61% !important;
    min-width: 236px !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-actions,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-actions {
    gap: 7% !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn {
    min-height: 38px !important;
    padding: 5px 6px !important;
    border-radius: 9px !important;
    font-size: .56rem !important;
    letter-spacing: .02em !important;
  }

  #gameRoomPanel .table-side-panel > .raven-preference-panel.raven-preference-compact,
  #gameRoomPanel.deceived-layout-v3 .table-side-panel > .raven-preference-panel.raven-preference-compact {
    align-self: flex-end !important;
    width: auto !important;
    margin-top: 18px !important;
  }

  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view {
    width: calc(100% - 20px) !important;
    padding: 6px 8px 8px !important;
  }
}

/* Keep the saved-status whisper from making the collapsed recruitment control wider. */
#gameRoomPanel .raven-preference-panel.raven-preference-compact:not(.raven-preference-expanded) .raven-preference-compact-status,
#gameRoomPanel.deceived-layout-v3 .raven-preference-panel.raven-preference-compact:not(.raven-preference-expanded) .raven-preference-compact-status {
  display: none !important;
}


/* ================= V187 TABLE PATH + HUMAN INTERACTION/POLISH =================
   Reuse the original proven table asset path, move human identity onto the back,
   prevent click-through on non-messageable humans, and give Recruit Next Knave
   enough color to remain discoverable without competing with the table. */

/* The new marble table now replaces the same authoritative filename the game
   already used successfully. This avoids a second deploy-sensitive asset path. */
#gameRoomPanel .table-of-deception-artwork,
#gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
  background-image: url('/ui/table-of-deception-side.webp') !important;
  transform: scale(.90) !important;
  opacity: 1 !important;
  filter:
    brightness(.90)
    saturate(.91)
    contrast(1.03)
    drop-shadow(0 13px 21px rgba(0,0,0,.68))
    drop-shadow(0 0 14px rgba(214,168,79,.07)) !important;
}

/* Put the human's identity on the middle-upper back rather than floating above
   the head. This reads like a player nameplate and keeps the far-side Character
   labels visually separate. */
.human-player-figure-identity {
  top: 43% !important;
  transform: translate(-50%, -50%) !important;
  max-width: 128px !important;
}

.human-player-figure-identity .player-identity.compact {
  padding: 3px 7px !important;
  background: rgba(5,4,5,.74) !important;
  border-color: rgba(226,184,91,.38) !important;
  box-shadow:
    0 3px 10px rgba(0,0,0,.72),
    0 0 10px rgba(214,168,79,.08) !important;
}

/* Never allow a human body to become transparent to pointer input. For your own
   figure this is a neutral blocker: Change Character remains independently clickable. */
.human-player-message-hitbox.human-player-message-blocker {
  pointer-events: auto !important;
  cursor: default !important;
  opacity: 0 !important;
}

/* Keep the change control low on the figure so it does not collide with the
   new mid-back identity plate. */
.human-player-change-character-btn {
  bottom: 5% !important;
}

/* Recruit Next Knave stays compact at the bottom, but is no longer nearly invisible. */
#gameRoomPanel .table-side-panel > .raven-preference-panel.raven-preference-compact,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > .raven-preference-panel.raven-preference-compact {
  opacity: 1 !important;
}

#gameRoomPanel .raven-preference-panel.raven-preference-compact .raven-preference-open-btn,
#gameRoomPanel.deceived-layout-v3 .raven-preference-panel.raven-preference-compact .raven-preference-open-btn {
  border-color: rgba(222,174,78,.68) !important;
  background: linear-gradient(180deg, rgba(142,28,42,.96), rgba(88,13,24,.98)) !important;
  color: #fff0c4 !important;
  box-shadow:
    inset 0 1px 0 rgba(255,234,174,.10),
    0 4px 10px rgba(0,0,0,.42) !important;
}

#gameRoomPanel .raven-preference-panel.raven-preference-compact .raven-preference-open-btn:hover,
#gameRoomPanel.deceived-layout-v3 .raven-preference-panel.raven-preference-compact .raven-preference-open-btn:hover {
  filter: brightness(1.10) !important;
  border-color: rgba(246,202,103,.88) !important;
}

@media (max-width: 700px) {
  .human-player-figure-identity {
    top: 42% !important;
    transform: translate(-50%, -50%) !important;
  }

  #gameRoomPanel .table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 .table-of-deception-artwork {
    transform: scale(.94) !important;
  }
}


/* ================= V188 HARD-RENDER TABLE IMAGE =================
   V187 still depended on a CSS background image. The live page showed the
   controls and player layers but no physical table, which means the table
   artwork itself was not becoming a reliable rendered element. V188 makes the
   table a real <img> in index.html, uses a brand-new asset filename to defeat
   stale browser/CDN caching, and pins that image into the existing room-table
   coordinate system. No game logic changes are required. */

#gameRoomPanel img.table-of-deception-artwork,
#gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {
  display: block !important;
  visibility: visible !important;
  position: absolute !important;
  inset: auto !important;
  left: 50% !important;
  top: 50% !important;
  width: 96% !important;
  height: 96% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate(-50%, -50%) scale(.92) !important;
  transform-origin: center center !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  z-index: 2 !important;
  pointer-events: none !important;
  filter:
    brightness(.90)
    saturate(.91)
    contrast(1.03)
    drop-shadow(0 13px 21px rgba(0,0,0,.68))
    drop-shadow(0 0 14px rgba(214,168,79,.07)) !important;
}

@media (max-width: 900px) {
  #gameRoomPanel img.table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {
    width: 98% !important;
    height: 98% !important;
    transform: translate(-50%, -50%) scale(.94) !important;
  }
}

@media (max-width: 650px) {
  #gameRoomPanel img.table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {
    width: 100% !important;
    height: 100% !important;
    transform: translate(-50%, -50%) scale(.96) !important;
  }
}

/* ================= V191 TABLE / PLAYER PROPORTION POLISH =================
   Keep the purpose-built recessed Secret Message + Secret Mail openings as part
   of the physical table. Desktop only: make the table slightly less dominant,
   lower it without pulling its feet upward, keep the live controls aligned to
   their recesses, and bring the near-side human row slightly inward/upward.
   Character Player sizing and positions are intentionally unchanged. */

@media (min-width: 901px) {
  /* V188 proved the real <img> render. Preserve that method; only refine its
     composition. The smaller scale opens breathing room around the characters,
     while top:52% keeps the table base at almost the same visual floor line. */
  #gameRoomPanel img.table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {
    left: 50% !important;
    top: 52% !important;
    width: 94% !important;
    height: 94% !important;
    transform: translate(-50%, -50%) scale(.88) !important;
    transform-origin: center center !important;
  }

  /* The buttons remain IN the two openings built into the table. Their position
     and width are reduced by the same visual ratio as the table artwork. */
  #gameRoomPanel .room-table > #secretMessagesDock,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock {
    left: 50% !important;
    top: 61% !important;
    width: min(48.7%, 570px) !important;
    min-width: 300px !important;
    transform: translate(-50%, -50%) !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-actions,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-actions {
    gap: 8.5% !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn {
    min-height: clamp(42px, 4.9vw, 58px) !important;
    padding: 7px 9px !important;
  }

  /* The near-side humans stay large, but the front row comes inward from the
     extreme screen edges and rises just enough to feel gathered at this table.
     The broad center gap remains open so neither recessed control is covered. */
  #gameRoomPanel .human-player-stage .human-player-figure-seat:nth-child(1),
  #gameRoomPanel.deceived-layout-v3 .human-player-stage .human-player-figure-seat:nth-child(1) {
    left: 14% !important;
    bottom: -24% !important;
  }

  #gameRoomPanel .human-player-stage .human-player-figure-seat:nth-child(2),
  #gameRoomPanel.deceived-layout-v3 .human-player-stage .human-player-figure-seat:nth-child(2) {
    left: 28% !important;
    bottom: -23% !important;
  }

  #gameRoomPanel .human-player-stage .human-player-figure-seat:nth-child(3),
  #gameRoomPanel.deceived-layout-v3 .human-player-stage .human-player-figure-seat:nth-child(3) {
    left: 40% !important;
    bottom: -20% !important;
  }

  #gameRoomPanel .human-player-stage .human-player-figure-seat:nth-child(4),
  #gameRoomPanel.deceived-layout-v3 .human-player-stage .human-player-figure-seat:nth-child(4) {
    left: 78% !important;
    bottom: -20% !important;
  }

  #gameRoomPanel .human-player-stage .human-player-figure-seat:nth-child(5),
  #gameRoomPanel.deceived-layout-v3 .human-player-stage .human-player-figure-seat:nth-child(5) {
    left: 90% !important;
    bottom: -23% !important;
  }
}

/* ================= V192 DESKTOP SIZE + HOST COMMAND POLISH =================
   Keep the table's purpose-built Secret Message / Secret Mail recesses intact.
   This pass only refines visual scale: a slightly calmer table, subtly smaller
   near-side human figures, and a much more compact Host Command that no longer
   repeats a second HOST COMMAND pill inside itself. Character Players are left
   at the V184/V191 size that already reads correctly around the table. */

@media (min-width: 901px) {
  /* The table remains the visual anchor, but no longer crowds the people around it. */
  #gameRoomPanel img.table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {
    left: 50% !important;
    top: 52.4% !important;
    width: 93% !important;
    height: 93% !important;
    transform: translate(-50%, -50%) scale(.85) !important;
  }

  /* Keep both live controls centered inside the two recesses as the table scales. */
  #gameRoomPanel .room-table > #secretMessagesDock,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock {
    left: 50% !important;
    top: 61.2% !important;
    width: min(46.5%, 545px) !important;
    min-width: 292px !important;
    transform: translate(-50%, -50%) !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-actions,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-actions {
    gap: 8.25% !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn {
    min-height: clamp(40px, 4.55vw, 54px) !important;
    padding: 6px 8px !important;
  }

  /* Near-side humans stay intentionally large for perspective, just slightly
     calmer so they do not overpower the table or far-side Character Players. */
  #gameRoomPanel .human-player-figure-seat,
  #gameRoomPanel.deceived-layout-v3 .human-player-figure-seat {
    transform: translateX(-50%) scale(.96) !important;
    transform-origin: center bottom !important;
  }

  /* Compact Host Command: one heading, one Next line, one action. */
  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view {
    width: min(510px, 70%) !important;
    margin: 4px auto 6px !important;
    padding: 5px 8px 6px !important;
    border-radius: 11px !important;
  }

  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-banner-label {
    margin: 0 0 1px !important;
    font-size: clamp(.53rem, .66vw, .61rem) !important;
    letter-spacing: .12em !important;
    line-height: 1.05 !important;
  }

  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-banner-text {
    margin: 0 auto 2px !important;
    font-size: clamp(.67rem, .78vw, .76rem) !important;
    line-height: 1.08 !important;
  }

  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-phase-control {
    margin: 1px auto 0 !important;
    padding: 0 !important;
  }

  /* The banner already says HOST COMMAND • CURRENT HOST. Remove the old inner
     HOST COMMAND pill that made the control look like a second nested panel. */
  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-phase-control::before {
    content: none !important;
    display: none !important;
  }

  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-phase-control #endDiscussionBtn,
  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view #hostCommandJumpBtn:not(.hidden) {
    width: min(230px, 72%) !important;
    min-height: 30px !important;
    margin: 1px auto 0 !important;
    padding: 5px 10px !important;
    border-radius: 9px !important;
    font-size: .66rem !important;
    line-height: 1.08 !important;
    letter-spacing: .08em !important;
  }
}
\n\n/* ================= V193 SCALABLE TABLE CONTROLS + TRUE COMPACT HOST BAR =================\n   Structural fix for larger human tables:\n   - 1–2 humans: Secret Message + Secret Mail remain inside the purpose-built recesses.\n   - 3+ humans: the same controls move into a slim rail above the table so foreground\n     player figures can never cover or block mail.\n   - Host Command becomes a genuinely compact one-line desktop bar rather than another\n     large panel competing with the table.\n   No Character Player sizing is changed here. */\n\n@media (min-width: 901px) {\n  /* Make the host control visibly smaller, not just a few pixels tighter. */\n  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-host-view {\n    justify-self: center !important;\n    align-self: center !important;\n    width: min(590px, 72%) !important;\n    min-width: 0 !important;\n    max-width: 590px !important;\n    margin: 3px auto 5px !important;\n    padding: 4px 7px !important;\n    border-radius: 10px !important;\n    box-sizing: border-box !important;\n    display: grid !important;\n    grid-template-columns: auto auto minmax(170px, 220px) !important;\n    align-items: center !important;\n    justify-content: center !important;\n    column-gap: 9px !important;\n    row-gap: 0 !important;\n  }\n\n  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-banner-label,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-banner-label {\n    margin: 0 !important;\n    font-size: .50rem !important;\n    line-height: 1 !important;\n    letter-spacing: .10em !important;\n    white-space: nowrap !important;\n  }\n\n  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-banner-text,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-banner-text {\n    margin: 0 !important;\n    font-size: .64rem !important;\n    line-height: 1 !important;\n    white-space: nowrap !important;\n  }\n\n  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-phase-control,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-phase-control {\n    margin: 0 !important;\n    padding: 0 !important;\n    border: 0 !important;\n    width: 100% !important;\n    min-width: 0 !important;\n  }\n\n  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-phase-control #endDiscussionBtn,\n  #gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-host-view #hostCommandJumpBtn:not(.hidden),\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-host-view .host-command-phase-control #endDiscussionBtn,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-host-view #hostCommandJumpBtn:not(.hidden) {\n    width: 100% !important;\n    min-height: 27px !important;\n    margin: 0 !important;\n    padding: 4px 9px !important;\n    border-radius: 8px !important;\n    font-size: .61rem !important;\n    line-height: 1 !important;\n  }\n\n  /* When three or more HUMAN players are present, the real dock becomes the\n     narrow rail between Host Command and the physical table. */\n  #gameRoomPanel .table-side-panel.multi-human-secret-controls > #secretMessagesDock.secret-controls-above-table,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel.multi-human-secret-controls > #secretMessagesDock.secret-controls-above-table {\n    order: 3 !important;\n    grid-column: 1 / -1 !important;\n    justify-self: center !important;\n    align-self: center !important;\n    position: relative !important;\n    inset: auto !important;\n    left: auto !important;\n    top: auto !important;\n    right: auto !important;\n    bottom: auto !important;\n    transform: none !important;\n    width: min(500px, 68%) !important;\n    min-width: 360px !important;\n    max-width: 500px !important;\n    margin: 0 auto 5px !important;\n    padding: 0 !important;\n    z-index: 80 !important;\n    pointer-events: auto !important;\n    background: transparent !important;\n    border: 0 !important;\n    box-shadow: none !important;\n  }\n\n  #gameRoomPanel .table-side-panel.multi-human-secret-controls > .room-table,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel.multi-human-secret-controls > .room-table {\n    order: 4 !important;\n  }\n\n  #gameRoomPanel .table-side-panel.multi-human-secret-controls > #secretMessagesDock .secret-message-actions,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel.multi-human-secret-controls > #secretMessagesDock .secret-message-actions {\n    display: grid !important;\n    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;\n    gap: 8px !important;\n    width: 100% !important;\n  }\n\n  #gameRoomPanel .table-side-panel.multi-human-secret-controls > #secretMessagesDock .secret-message-compose-btn,\n  #gameRoomPanel .table-side-panel.multi-human-secret-controls > #secretMessagesDock .secret-message-toggle-btn,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel.multi-human-secret-controls > #secretMessagesDock .secret-message-compose-btn,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel.multi-human-secret-controls > #secretMessagesDock .secret-message-toggle-btn {\n    min-height: 35px !important;\n    padding: 5px 9px !important;\n    border-radius: 10px !important;\n    font-size: .64rem !important;\n    letter-spacing: .045em !important;\n  }\n\n  #gameRoomPanel .table-side-panel.multi-human-secret-controls > #secretMessagesDock .secret-message-pick-prompt,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel.multi-human-secret-controls > #secretMessagesDock .secret-message-pick-prompt {\n    margin-top: 4px !important;\n    font-size: .62rem !important;\n  }\n\n  /* A more noticeable but still conservative table-size correction. */\n  #gameRoomPanel img.table-of-deception-artwork,\n  #gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {\n    top: 52.2% !important;\n    width: 90% !important;\n    height: 90% !important;\n    transform: translate(-50%, -50%) scale(.82) !important;\n  }\n\n  /* Re-align the recessed controls for the 1–2-human version of the scene. */\n  #gameRoomPanel .room-table:not(.multi-human-secret-controls) > #secretMessagesDock,\n  #gameRoomPanel.deceived-layout-v3 .room-table:not(.multi-human-secret-controls) > #secretMessagesDock {\n    left: 50% !important;\n    top: 61.1% !important;\n    width: min(44.6%, 522px) !important;\n    min-width: 286px !important;\n    transform: translate(-50%, -50%) !important;\n  }\n}\n\n@media (max-width: 900px) {\n  /* Larger human groups keep the controls outside the figure layer on mobile too. */\n  #gameRoomPanel .table-side-panel.multi-human-secret-controls > #secretMessagesDock.secret-controls-above-table,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel.multi-human-secret-controls > #secretMessagesDock.secret-controls-above-table {\n    order: 3 !important;\n    position: relative !important;\n    inset: auto !important;\n    transform: none !important;\n    width: calc(100% - 16px) !important;\n    min-width: 0 !important;\n    max-width: none !important;\n    margin: 0 8px 8px !important;\n  }\n\n  #gameRoomPanel .table-side-panel.multi-human-secret-controls > .room-table,\n  #gameRoomPanel.deceived-layout-v3 .table-side-panel.multi-human-secret-controls > .room-table {\n    order: 4 !important;\n  }\n}\n

/* ================= V194 HOST NAME SHORTCUT + TABLETOP MAIL/QUILL ================= */
#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-banner,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-banner {
  display: none !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-banner.host-command-panel-open:not(.hidden),
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-banner.host-command-panel-open:not(.hidden) {
  display: block !important;
}

.human-player-figure-seat.host-command-shortcut-seat .human-player-figure-identity {
  pointer-events: auto !important;
}

.human-player-figure-seat.host-command-shortcut-seat .human-player-figure-identity .player-identity.compact {
  border-color: rgba(241, 200, 101, .72) !important;
  box-shadow:
    0 4px 14px rgba(0,0,0,.76),
    0 0 18px rgba(214,168,79,.18) !important;
  animation: hostNameShortcutPulse 1.95s ease-in-out infinite !important;
}

.human-player-figure-seat.host-command-shortcut-seat.host-command-panel-open .human-player-figure-identity .player-identity.compact {
  background:
    radial-gradient(circle at top, rgba(214,168,79,.22), rgba(0,0,0,0) 62%),
    linear-gradient(180deg, rgba(22,13,6,.92), rgba(6,4,4,.88)) !important;
  box-shadow:
    0 4px 14px rgba(0,0,0,.78),
    0 0 22px rgba(214,168,79,.26) !important;
}

@keyframes hostNameShortcutPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.035);
    filter: brightness(1.08);
  }
}

/* Lift the near-side nameplates back up to the middle back. */
.human-player-figure-identity {
  top: 35% !important;
  transform: translate(-50%, -50%) !important;
}

@media (max-width: 700px) {
  .human-player-figure-identity {
    top: 36% !important;
  }
}

/* The quill and the letter now act as the tabletop Secret Message controls. */
#gameRoomPanel .room-table > #secretMessagesDock,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock {
  position: absolute !important;
  inset: 0 !important;
  z-index: 9 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

#gameRoomPanel .room-table > #secretMessagesDock .secret-message-actions,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-actions {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
}

#gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn {
  position: absolute !important;
  left: 74.2% !important;
  top: 42.2% !important;
  width: 9.5% !important;
  height: 18% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate(-50%, -50%) rotate(-8deg) !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  text-shadow: none !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  overflow: visible !important;
}

#gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn {
  position: absolute !important;
  left: 31.7% !important;
  top: 47.8% !important;
  width: 13% !important;
  height: 10.5% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate(-50%, -50%) rotate(-9deg) !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  text-shadow: none !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  overflow: visible !important;
}

#gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn::after,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn::after {
  content: "";
  position: absolute;
  inset: -7% -15%;
  border-radius: 28px;
  border: 1px solid rgba(244, 210, 128, .42);
  box-shadow:
    0 0 16px rgba(214,168,79,.20),
    0 0 24px rgba(214,168,79,.10);
  opacity: .72;
  animation: tableQuillPulse 2.2s ease-in-out infinite;
}

#gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn::after,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn::after {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 14px;
  border: 1px solid rgba(232, 198, 118, .26);
  box-shadow: 0 0 12px rgba(214,168,79,.10);
  opacity: .36;
  transition: opacity .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn:hover::after,
#gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn:focus-visible::after,
#gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn:hover::after,
#gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn:focus-visible::after,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn:hover::after,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn:focus-visible::after,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn:hover::after,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn:focus-visible::after {
  opacity: .96;
  border-color: rgba(255,229,153,.78);
  box-shadow:
    0 0 18px rgba(214,168,79,.26),
    0 0 28px rgba(214,168,79,.16);
}

#gameRoomPanel .room-table > #secretMessagesDock #secretMessagesToggleBtn.secret-message-toggle-has-unread::after,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock #secretMessagesToggleBtn.secret-message-toggle-has-unread::after {
  opacity: 1;
  border-color: rgba(255,232,165,.88);
  box-shadow:
    0 0 18px rgba(241, 201, 109, .34),
    0 0 30px rgba(241, 201, 109, .22);
  animation: tableMailPulse 1.55s ease-in-out infinite;
}

#gameRoomPanel .room-table > #secretMessagesDock #secretUnreadCount,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock #secretUnreadCount {
  position: absolute !important;
  right: -8px !important;
  top: -8px !important;
  min-width: 24px !important;
  height: 24px !important;
  padding: 0 6px !important;
  border: 1px solid rgba(255,242,190,.92) !important;
  border-radius: 999px !important;
  background: #f0c66f !important;
  color: #241505 !important;
  font-size: .8rem !important;
  font-weight: 900 !important;
  display: inline-grid !important;
  place-items: center !important;
  box-shadow: 0 0 10px rgba(241, 201, 109, .30) !important;
}

#gameRoomPanel .room-table > #secretMessagesDock #secretUnreadCount.hidden,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock #secretUnreadCount.hidden {
  display: none !important;
}

#gameRoomPanel .room-table > #secretMessagesDock .secret-message-pick-prompt,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-pick-prompt {
  position: absolute !important;
  left: 73.5% !important;
  top: 29.5% !important;
  transform: translate(-50%, -50%) !important;
  width: max-content !important;
  max-width: 230px !important;
  margin: 0 !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(214,168,79,.34) !important;
  background: rgba(8,6,7,.86) !important;
  color: #ebd7ab !important;
  font-size: .65rem !important;
  box-shadow: 0 6px 14px rgba(0,0,0,.48) !important;
}

@keyframes tableQuillPulse {
  0%, 100% {
    opacity: .58;
    transform: scale(1);
  }
  50% {
    opacity: .98;
    transform: scale(1.05);
  }
}

@keyframes tableMailPulse {
  0%, 100% {
    opacity: .72;
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
    filter: brightness(1.10);
  }
}


/* ================= V195 CINEMATIC LAYOUT + HOST ACTION POLISH ================= */

/* Move the room title out of the Character head line. On desktop it belongs at
   the upper-left of the main table column, not centered behind the far-side cast. */
@media (min-width: 980px) {
  #gameRoomPanel.deceived-layout-v3 > h2 {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    align-self: start !important;
    width: auto !important;
    margin: -10px 0 2px 8px !important;
    text-align: left !important;
    white-space: nowrap !important;
    position: relative !important;
    z-index: 20 !important;
    font-size: clamp(1.30rem, 1.85vw, 1.85rem) !important;
    letter-spacing: .105em !important;
  }
}

/* Human figures intentionally overhang the physical table. Reserve enough real
   document space beneath them that their feet never cover the Discussion header. */
#gameRoomPanel .room-table.has-human-figures,
#gameRoomPanel.deceived-layout-v3 .room-table.has-human-figures {
  margin-bottom: 96px !important;
}

@media (max-width: 900px) {
  #gameRoomPanel .room-table.has-human-figures,
  #gameRoomPanel.deceived-layout-v3 .room-table.has-human-figures {
    margin-bottom: 76px !important;
  }
}

@media (max-width: 650px) {
  #gameRoomPanel .room-table.has-human-figures,
  #gameRoomPanel.deceived-layout-v3 .room-table.has-human-figures {
    margin-bottom: 62px !important;
  }
}

/* A normal Host Command remains tucked away until the host name is clicked.
   Once opened it gets its own vertical lane; the table/Characters move below it
   instead of the card covering a Character's head. */
#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-banner.host-command-panel-open:not(.hidden),
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-banner.host-command-panel-open:not(.hidden) {
  display: block !important;
  position: relative !important;
  z-index: 30 !important;
  width: min(760px, 94%) !important;
  margin: 8px auto 22px !important;
  padding: 13px 18px 14px !important;
  border: 1px solid rgba(231,188,91,.72) !important;
  border-radius: 16px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(214,168,79,.13), transparent 54%),
    linear-gradient(180deg, rgba(24,14,9,.98), rgba(8,5,6,.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,239,187,.10),
    0 12px 28px rgba(0,0,0,.62),
    0 0 22px rgba(214,168,79,.12) !important;
}

#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-panel-open:not(.hidden) + .room-table,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-panel-open:not(.hidden) + .room-table {
  margin-top: 24px !important;
}

/* When a timer/phase is actually waiting on the host, this should not look like
   ordinary UI. It becomes an unmistakable action card and opens automatically. */
#gameRoomPanel .table-side-panel > #hostCommandBanner.host-command-needs-action.host-command-panel-open:not(.hidden),
#gameRoomPanel.deceived-layout-v3 .table-side-panel > #hostCommandBanner.host-command-needs-action.host-command-panel-open:not(.hidden) {
  border: 2px solid rgba(245,191,69,.95) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(238,179,53,.24), transparent 58%),
    linear-gradient(180deg, rgba(91,20,22,.98), rgba(38,8,12,.99) 64%, rgba(13,5,7,.99)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,240,187,.18),
    0 14px 34px rgba(0,0,0,.70),
    0 0 24px rgba(206,39,53,.28),
    0 0 34px rgba(235,187,74,.18) !important;
}

#gameRoomPanel #hostCommandBanner.host-command-phase-ended .host-command-banner-label,
#gameRoomPanel.deceived-layout-v3 #hostCommandBanner.host-command-phase-ended .host-command-banner-label {
  color: #ffe3a0 !important;
  font-size: clamp(.78rem, 1vw, .95rem) !important;
  letter-spacing: .13em !important;
  text-shadow: 0 0 12px rgba(244,191,76,.34) !important;
}

#gameRoomPanel #hostCommandBanner.host-command-phase-ended .host-command-banner-text,
#gameRoomPanel.deceived-layout-v3 #hostCommandBanner.host-command-phase-ended .host-command-banner-text {
  color: #fff3d5 !important;
  font-size: clamp(.88rem, 1.12vw, 1.04rem) !important;
  margin-top: 4px !important;
}

#gameRoomPanel #hostCommandBanner.host-command-phase-ended #endDiscussionBtn,
#gameRoomPanel.deceived-layout-v3 #hostCommandBanner.host-command-phase-ended #endDiscussionBtn {
  min-height: 44px !important;
  border: 1px solid rgba(255,221,125,.88) !important;
  background: linear-gradient(180deg, #c21f35, #7b1020) !important;
  color: #fff7e4 !important;
  font-weight: 950 !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 0 16px rgba(207,36,54,.32),
    0 5px 12px rgba(0,0,0,.46) !important;
  animation: v195HostActionButtonPulse 1.65s ease-in-out infinite !important;
}

#gameRoomPanel #hostCommandBanner.host-command-opened-flash,
#gameRoomPanel.deceived-layout-v3 #hostCommandBanner.host-command-opened-flash {
  animation: v195HostCommandArrival 1.05s ease-out 1 !important;
}

@keyframes v195HostCommandArrival {
  0% {
    transform: scale(.96);
    filter: brightness(1.55);
    box-shadow: 0 0 0 rgba(0,0,0,0), 0 0 42px rgba(244,194,80,.62);
  }
  45% { transform: scale(1.025); filter: brightness(1.14); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes v195HostActionButtonPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.025); filter: brightness(1.13); }
}

/* The host-name shortcut gets a stronger state when the next action is urgent. */
.human-player-figure-seat.host-command-shortcut-seat .human-player-figure-identity.host-command-shortcut {
  cursor: pointer !important;
}

.human-player-figure-seat.host-command-shortcut-seat .human-player-figure-identity.host-command-shortcut:hover .player-identity.compact,
.human-player-figure-seat.host-command-shortcut-seat .human-player-figure-identity.host-command-shortcut:focus-visible .player-identity.compact {
  border-color: rgba(255,224,140,.96) !important;
  box-shadow:
    0 4px 14px rgba(0,0,0,.76),
    0 0 22px rgba(232,190,87,.32) !important;
  outline: none !important;
}

/* Slightly stronger presence for every far-side Character without changing the
   PNG itself. This is intentionally subtle; JS handles the real scale correction. */
.character-table-figure-seat .character-table-figure-image {
  filter:
    brightness(1.015)
    drop-shadow(0 13px 15px rgba(0,0,0,.84))
    drop-shadow(0 0 9px rgba(214,168,79,.10)) !important;
}


/* ================= V196 PRECISE CHARACTER HITBOX + CENTERED NOTICE + FIRST CHANGE PROMPT ================= */

/* Character art can overlap visually, but its container must never steal mouse
   input from a neighboring Character. Only the narrow body hitbox is clickable. */
#gameRoomPanel .character-table-figure-seat,
#gameRoomPanel.deceived-layout-v3 .character-table-figure-seat {
  pointer-events: none !important;
  cursor: default !important;
}

.character-table-message-hitbox {
  position: absolute !important;
  z-index: 7 !important;
  left: 50% !important;
  top: 4% !important;
  width: 48% !important;
  height: 90% !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 42% 42% 24% 24% !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
  color: transparent !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
}

/* Mimic's source figure is intentionally wider; keep his target centered on the
   actual torso instead of letting the wider canvas reach neighboring Characters. */
.character-table-figure-seat[data-character-id="mimic"] .character-table-message-hitbox {
  width: 38% !important;
}

.character-table-message-hitbox:disabled {
  pointer-events: none !important;
  cursor: default !important;
}

/* The visible name is an explicit alternative to the exposed figure target. */
button.character-table-figure-label {
  pointer-events: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
button.character-table-figure-label:disabled { pointer-events: none !important; }
button.character-table-figure-label:focus-visible .player-identity,
.character-table-message-hitbox:focus-visible {
  outline: 2px solid #edca78 !important;
  outline-offset: 3px !important;
}
.character-table-message-hitbox:focus-visible { opacity: 1 !important; }

.character-table-figure-seat.character-secret-hover .character-table-figure-image,
.room-table.secret-recipient-pick-mode .character-table-figure-seat.character-secret-recipient .character-table-figure-image {
  filter:
    brightness(1.10)
    drop-shadow(0 0 10px rgba(255,255,255,.24))
    drop-shadow(0 0 20px rgba(214,168,79,.24))
    drop-shadow(0 13px 15px rgba(0,0,0,.84)) !important;
}

.character-table-figure-seat.character-secret-hover .character-table-figure-label .player-identity.compact,
.room-table.secret-recipient-pick-mode .character-table-figure-seat.character-secret-recipient .character-table-figure-label .player-identity.compact {
  border-color: rgba(255,231,167,.68) !important;
  box-shadow:
    0 0 15px rgba(255,255,255,.12),
    0 0 20px rgba(214,168,79,.18),
    0 5px 13px rgba(0,0,0,.62) !important;
}

/* Replace the browser's unmovable white alert with a real centered game notice. */
.centered-game-notice-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100500 !important;
  display: grid !important;
  place-items: center !important;
  padding: 22px !important;
  background: rgba(1,1,2,.66) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
}

.centered-game-notice-card {
  width: min(510px, 92vw) !important;
  margin: 0 !important;
  padding: 25px 25px 22px !important;
  border: 1px solid rgba(225,181,82,.72) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(214,168,79,.14), transparent 56%),
    linear-gradient(180deg, rgba(29,17,10,.98), rgba(7,5,7,.99)) !important;
  color: #f2e6cf !important;
  text-align: center !important;
  box-shadow:
    inset 0 1px 0 rgba(255,241,196,.10),
    0 24px 60px rgba(0,0,0,.76),
    0 0 28px rgba(214,168,79,.14) !important;
  animation: v196CenteredNoticeArrival .24s ease-out 1 !important;
}

.centered-game-notice-kicker {
  color: #dcb45f !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
  letter-spacing: .17em !important;
  text-transform: uppercase !important;
}

.centered-game-notice-text {
  margin: 15px 0 18px !important;
  color: #f6ecd9 !important;
  font-size: clamp(1rem, 1.35vw, 1.15rem) !important;
  line-height: 1.45 !important;
}

.centered-game-notice-button {
  width: min(210px, 100%) !important;
  margin: 0 auto !important;
  border: 1px solid rgba(242,204,114,.70) !important;
  background: linear-gradient(180deg, #a51d2e, #68101d) !important;
  color: #fff4dc !important;
  font-weight: 900 !important;
  box-shadow: 0 5px 14px rgba(0,0,0,.42) !important;
}

@keyframes v196CenteredNoticeArrival {
  from { transform: translateY(12px) scale(.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* First-time discovery: draw the player's eye to Change Character until they
   actually pick a different table figure once. The state is then remembered. */
.human-player-change-character-btn.first-change-prompt {
  border-color: rgba(255,218,123,.96) !important;
  color: #fff0bd !important;
  background:
    radial-gradient(circle at top, rgba(255,226,145,.15), transparent 55%),
    linear-gradient(180deg, rgba(116,65,13,.98), rgba(39,18,4,.99)) !important;
  box-shadow:
    0 0 0 1px rgba(255,223,136,.18),
    0 0 15px rgba(235,190,83,.25),
    0 4px 10px rgba(0,0,0,.54) !important;
  animation: v196FirstCharacterChangePulse 1.65s ease-in-out infinite !important;
}

@keyframes v196FirstCharacterChangePulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translateX(-50%) scale(1.07);
    filter: brightness(1.16);
  }
}


/* ================= V197 TRANSPARENT LOBBY FIGURES + HOST-BACK COMMAND ================= */

/* Lobby rows use the same transparent standing Character art as the live table,
   rather than the circular poster/card crop. */
.character-lobby-identity img {
  width: 48px !important;
  height: 58px !important;
  flex: 0 0 48px !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 5px 6px rgba(0,0,0,.68)) !important;
}

.character-lobby-row {
  min-height: 64px !important;
}

/* Host Command no longer occupies a banner lane above the Characters. JS docks
   the existing live command panel into .room-table and anchors it to the host's back. */
#gameRoomPanel .room-table > #hostCommandBanner.host-command-banner,
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner.host-command-banner {
  position: absolute !important;
  z-index: 120 !important;
  left: var(--host-command-anchor-x, 12%) !important;
  bottom: var(--host-command-anchor-bottom, 5%) !important;
  top: auto !important;
  right: auto !important;
  width: clamp(190px, 17vw, 245px) !important;
  min-width: 0 !important;
  max-width: 245px !important;
  margin: 0 !important;
  padding: 10px 11px 11px !important;
  transform: translateX(var(--host-command-anchor-shift, -50%)) !important;
  border: 1px solid rgba(231,188,91,.78) !important;
  border-radius: 13px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(214,168,79,.18), transparent 58%),
    linear-gradient(180deg, rgba(26,15,9,.97), rgba(7,5,6,.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,239,187,.12),
    0 8px 20px rgba(0,0,0,.72),
    0 0 18px rgba(214,168,79,.13) !important;
  pointer-events: auto !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

#gameRoomPanel .room-table > #hostCommandBanner.host-command-banner.hidden,
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner.host-command-banner.hidden {
  display: none !important;
}

#gameRoomPanel .room-table > #hostCommandBanner .host-command-banner-label,
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner .host-command-banner-label {
  margin: 0 22px 3px 0 !important;
  color: #edca7c !important;
  font-size: clamp(.48rem, .56vw, .62rem) !important;
  line-height: 1.05 !important;
  letter-spacing: .105em !important;
  text-align: left !important;
  white-space: normal !important;
}

#gameRoomPanel .room-table > #hostCommandBanner .host-command-banner-text,
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner .host-command-banner-text {
  margin: 2px 0 6px !important;
  color: #f7ead0 !important;
  font-size: clamp(.62rem, .72vw, .76rem) !important;
  line-height: 1.17 !important;
  text-align: left !important;
  white-space: normal !important;
}

#gameRoomPanel .room-table > #hostCommandBanner .host-command-phase-control,
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner .host-command-phase-control {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#gameRoomPanel .room-table > #hostCommandBanner .host-command-phase-control h3,
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner .host-command-phase-control h3,
#gameRoomPanel .room-table > #hostCommandBanner .host-command-phase-control .hint,
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner .host-command-phase-control .hint {
  display: none !important;
}

#gameRoomPanel .room-table > #hostCommandBanner #endDiscussionBtn,
#gameRoomPanel .room-table > #hostCommandBanner #hostCommandJumpBtn:not(.hidden),
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner #endDiscussionBtn,
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner #hostCommandJumpBtn:not(.hidden) {
  width: 100% !important;
  min-height: 30px !important;
  margin: 3px 0 0 !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(245,204,112,.72) !important;
  background: linear-gradient(180deg, #b91e32, #73101f) !important;
  color: #fff4dc !important;
  font-size: clamp(.57rem, .66vw, .70rem) !important;
  font-weight: 900 !important;
  letter-spacing: .025em !important;
  box-shadow: 0 4px 9px rgba(0,0,0,.42) !important;
}

.host-command-minimize-btn {
  position: absolute !important;
  z-index: 5 !important;
  right: 7px !important;
  top: 6px !important;
  width: 23px !important;
  min-width: 23px !important;
  height: 23px !important;
  min-height: 23px !important;
  margin: 0 !important;
  padding: 0 0 3px !important;
  border: 1px solid rgba(226,188,98,.48) !important;
  border-radius: 999px !important;
  background: rgba(4,3,4,.74) !important;
  color: #e9c979 !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.42) !important;
}

.host-command-minimize-btn:hover,
.host-command-minimize-btn:focus-visible {
  color: #fff0bd !important;
  border-color: rgba(255,222,135,.86) !important;
  background: rgba(34,21,7,.90) !important;
  outline: none !important;
}

/* A normal available Host Command gives a periodic "remember me" pulse. Major
   transitions and urgent actions pulse more often/strongly. */
.human-player-figure-seat.host-command-shortcut-seat .human-player-figure-identity .player-identity.compact {
  animation: v197HostShortcutReminder 7.2s ease-in-out infinite !important;
}

.human-player-figure-seat.host-command-shortcut-seat.host-command-priority-seat .human-player-figure-identity .player-identity.compact {
  animation: v197HostShortcutPriority 3.2s ease-in-out infinite !important;
}

#gameRoomPanel .room-table > #hostCommandBanner.host-command-priority-pulse:not(.hidden),
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner.host-command-priority-pulse:not(.hidden) {
  animation: v197HostCardReminder 4.0s ease-in-out infinite !important;
}

#gameRoomPanel .room-table > #hostCommandBanner.host-command-needs-action:not(.hidden),
#gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner.host-command-needs-action:not(.hidden) {
  border-color: rgba(255,211,101,.96) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(238,179,53,.30), transparent 60%),
    linear-gradient(180deg, rgba(94,18,23,.98), rgba(36,7,11,.99)) !important;
  animation: v197HostCardUrgent 1.85s ease-in-out infinite !important;
}

@keyframes v197HostShortcutReminder {
  0%, 70%, 100% { transform: scale(1); filter: brightness(1); }
  76% { transform: scale(1.035); filter: brightness(1.12); }
  82% { transform: scale(1); filter: brightness(1); }
  88% { transform: scale(1.025); filter: brightness(1.08); }
}

@keyframes v197HostShortcutPriority {
  0%, 62%, 100% { transform: scale(1); filter: brightness(1); }
  72% { transform: scale(1.06); filter: brightness(1.18); }
  82% { transform: scale(.99); filter: brightness(1.03); }
  90% { transform: scale(1.045); filter: brightness(1.13); }
}

@keyframes v197HostCardReminder {
  0%, 66%, 100% { filter: brightness(1); box-shadow: inset 0 1px 0 rgba(255,239,187,.12), 0 8px 20px rgba(0,0,0,.72), 0 0 18px rgba(214,168,79,.13); }
  76% { filter: brightness(1.10); box-shadow: inset 0 1px 0 rgba(255,239,187,.16), 0 8px 20px rgba(0,0,0,.72), 0 0 30px rgba(229,190,91,.28); }
  86% { filter: brightness(1); }
}

@keyframes v197HostCardUrgent {
  0%, 100% { filter: brightness(1); box-shadow: 0 8px 20px rgba(0,0,0,.72), 0 0 20px rgba(226,61,72,.22), 0 0 20px rgba(238,194,82,.18); }
  50% { filter: brightness(1.15); box-shadow: 0 8px 20px rgba(0,0,0,.72), 0 0 32px rgba(226,61,72,.38), 0 0 35px rgba(238,194,82,.32); }
}

/* Make first-use Change Character impossible to miss, but only in short bursts.
   JS removes first-change-prompt permanently after the user chooses a different figure. */
.human-player-change-character-btn.first-change-prompt {
  min-height: 30px !important;
  padding: 6px 11px !important;
  border-width: 2px !important;
  border-color: rgba(255,230,150,.98) !important;
  color: #fff6d8 !important;
  background:
    radial-gradient(circle at top, rgba(255,235,170,.26), transparent 60%),
    linear-gradient(180deg, rgba(150,88,17,.99), rgba(47,21,4,.99)) !important;
  box-shadow:
    0 0 0 2px rgba(255,223,134,.12),
    0 0 22px rgba(239,196,91,.36),
    0 6px 12px rgba(0,0,0,.62) !important;
  animation: v197FirstCharacterChangeBurst 3.7s ease-in-out infinite !important;
}

.human-player-change-character-btn.first-change-prompt::after {
  content: "CLICK TO CHOOSE YOUR LOOK";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 170px;
  padding: 3px 7px;
  border: 1px solid rgba(239,199,102,.58);
  border-radius: 999px;
  background: rgba(8,5,4,.90);
  color: #f1d48e;
  font-size: .46rem;
  font-weight: 900;
  letter-spacing: .08em;
  white-space: nowrap;
  opacity: .78;
  pointer-events: none;
  box-shadow: 0 3px 8px rgba(0,0,0,.52);
}

@keyframes v197FirstCharacterChangeBurst {
  0%, 62%, 100% {
    transform: translateX(-50%) scale(1);
    filter: brightness(1);
  }
  70% {
    transform: translateX(-50%) scale(1.18);
    filter: brightness(1.48);
    box-shadow: 0 0 0 4px rgba(255,225,137,.18), 0 0 34px rgba(247,201,91,.62), 0 7px 14px rgba(0,0,0,.64);
  }
  77% {
    transform: translateX(-50%) scale(.96);
    filter: brightness(1.08);
  }
  84% {
    transform: translateX(-50%) scale(1.13);
    filter: brightness(1.34);
    box-shadow: 0 0 0 3px rgba(255,225,137,.15), 0 0 29px rgba(247,201,91,.52), 0 7px 14px rgba(0,0,0,.64);
  }
  92% {
    transform: translateX(-50%) scale(1);
    filter: brightness(1);
  }
}

@media (max-width: 700px) {
  #gameRoomPanel .room-table > #hostCommandBanner.host-command-banner,
  #gameRoomPanel.deceived-layout-v3 .room-table > #hostCommandBanner.host-command-banner {
    width: clamp(175px, 50vw, 220px) !important;
    max-width: 220px !important;
    padding: 9px 10px 10px !important;
  }
}


/* ================= V198 TOP-CLIP + ROOM BRAND PLACEMENT FIX =================
   The live game board is taller than one viewport on desktop. The generic #app
   grid used to vertically center it, which could push the top of the room above
   the viewport. When the game room is visible, anchor the board to the top.
   Also keep the website brand out of the far-side Character head line by giving
   it the left command column above the Raven clock. */

/* Modern browsers used by the game support :has(). This affects only the live
   room; the landing/join screens keep their original centered presentation. */
#app:has(> #gameRoomPanel:not(.hidden)) {
  place-items: start center !important;
  align-content: start !important;
  padding-top: 8px !important;
  padding-bottom: 24px !important;
}

@media (min-width: 980px) {
  #gameRoomPanel.deceived-layout-v3 {
    margin-top: 0 !important;
    align-self: start !important;
  }

  #gameRoomPanel.deceived-layout-v3 > h2 {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: stretch !important;
    align-self: end !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 0 4px 0 !important;
    padding: 0 4px !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    position: relative !important;
    z-index: 40 !important;
    font-size: clamp(.96rem, 1.20vw, 1.20rem) !important;
    line-height: 1.05 !important;
    letter-spacing: .075em !important;
  }

  /* Clock starts directly below the brand instead of sharing its row. */
  #gameRoomPanel.deceived-layout-v3 #ravenClockPanel {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  #gameRoomPanel.deceived-layout-v3 #gameRoomCodeBadge {
    grid-row: 3 !important;
  }

  #gameRoomPanel.deceived-layout-v3 > .game-status-row {
    grid-row: 4 !important;
  }

  #gameRoomPanel.deceived-layout-v3 .raven-side-panel {
    grid-row: 5 !important;
  }

  /* The table/character composition begins at the same clock row, leaving the
     site name completely outside the Character silhouettes. */
  #gameRoomPanel.deceived-layout-v3 .table-side-panel {
    grid-row: 2 / span 20 !important;
  }
}

@media (max-width: 979px) {
  #app:has(> #gameRoomPanel:not(.hidden)) {
    padding-top: 6px !important;
  }

  #gameRoomPanel.deceived-layout-v3 > h2 {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    position: relative !important;
    z-index: 40 !important;
  }
}


/* ================= V199 ROLE-REVEAL CLEARANCE + POST-REVEAL VIEWPORT RESET =================
   During the private role primer both #joinPanel and #gameRoomPanel are visible.
   Because #app is normally a grid, those two siblings occupied the same grid cell,
   allowing the far-side Character art to climb over the Reveal My Role button.
   Make that short phase a real vertical flow, keep the role card above the room,
   and leave enough clearance for the Character figures that overhang their table. */

#app:has(#roleRevealPanel:not(.hidden)) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: clamp(54px, 5.5vw, 88px) !important;
  min-height: 100vh !important;
  padding-top: 10px !important;
  padding-bottom: 28px !important;
}

#app:has(#roleRevealPanel:not(.hidden)) > #joinPanel.enter-game-panel {
  position: relative !important;
  z-index: 500 !important;
  flex: 0 0 auto !important;
  margin-top: 10px !important;
  margin-bottom: 0 !important;
}

#app:has(#roleRevealPanel:not(.hidden)) > #gameRoomPanel.game-room-panel {
  position: relative !important;
  z-index: 1 !important;
  flex: 0 0 auto !important;
  margin-top: 0 !important;
}

#joinPanel:has(#roleRevealPanel:not(.hidden)) #roleRevealPanel {
  position: relative !important;
  z-index: 510 !important;
}

#joinPanel:has(#roleRevealPanel:not(.hidden)) #revealRoleBtn {
  position: relative !important;
  z-index: 520 !important;
  margin-top: 18px !important;
  margin-bottom: 14px !important;
  box-shadow:
    0 8px 18px rgba(0,0,0,.42),
    0 0 18px rgba(190,35,53,.16) !important;
}

/* The live room itself must always begin at the real top of its document lane.
   The JS transition now scrolls here after the private role card collapses; these
   rules remove leftover margins that could make the top look clipped. */
#app:has(> #gameRoomPanel:not(.hidden)):not(:has(#roleRevealPanel:not(.hidden))) > #gameRoomPanel.deceived-layout-v3 {
  margin-top: 0 !important;
  scroll-margin-top: 8px !important;
}

@media (max-width: 700px) {
  #app:has(#roleRevealPanel:not(.hidden)) {
    gap: 42px !important;
    padding-top: 6px !important;
  }

  #app:has(#roleRevealPanel:not(.hidden)) > #joinPanel.enter-game-panel {
    margin-top: 6px !important;
  }
}


/* ================= V200 SECRET MESSAGE REPLY ACTIONS ================= */
.secret-message-read-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.secret-message-read-actions button {
  flex: 1 1 180px;
  max-width: 260px;
}

#replySecretMessageReadBtn {
  background: linear-gradient(180deg, rgba(57,40,17,.98), rgba(22,14,5,.98));
  color: #f6ddb0;
  border: 1px solid rgba(214,168,79,.55);
  box-shadow:
    inset 0 1px 0 rgba(255,240,198,.08),
    0 4px 12px rgba(0,0,0,.32);
}

#replySecretMessageReadBtn:hover,
#replySecretMessageReadBtn:focus-visible {
  filter: brightness(1.1);
  border-color: rgba(250,214,128,.84);
  outline: none;
}

@media (max-width: 600px) {
  .secret-message-read-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .secret-message-read-actions button {
    max-width: none;
  }
}


/* ================= V203 LIVE-ROOM TOP SAFE AREA =================
   The far-side Character labels intentionally sit just above their figures.
   After the tall private role-reveal panel collapses, the live room needs a
   small permanent ceiling so those labels never touch the browser viewport edge.
   This moves the whole live composition down slightly without shrinking the
   Characters or changing the table/player geometry. */
#app:has(> #gameRoomPanel:not(.hidden)):not(:has(#roleRevealPanel:not(.hidden))) > #gameRoomPanel.deceived-layout-v3 {
  box-sizing: border-box !important;
  padding-top: clamp(34px, 3.2vh, 48px) !important;
}

@media (max-width: 700px) {
  #app:has(> #gameRoomPanel:not(.hidden)):not(:has(#roleRevealPanel:not(.hidden))) > #gameRoomPanel.deceived-layout-v3 {
    padding-top: 30px !important;
  }
}


/* ================= V206 RAVEN SECRET MESSAGE DELIVERY ================= */
.secret-message-arrival-overlay,
.secret-message-read-overlay {
  background:
    radial-gradient(circle at center, rgba(109, 74, 18, .14), rgba(0,0,0,.88) 54%),
    rgba(0, 0, 0, .88);
  backdrop-filter: blur(2px);
}

.raven-secret-delivery-card.secret-message-arrival-card,
.raven-secret-read-card.secret-message-read-card {
  width: min(980px, 96vw);
  max-width: 980px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(214, 168, 79, .42);
  background:
    radial-gradient(circle at 65% 28%, rgba(214, 168, 79, .10), transparent 32%),
    linear-gradient(180deg, rgba(22, 12, 18, .97), rgba(0, 0, 0, .97));
  box-shadow:
    0 18px 54px rgba(0, 0, 0, .72),
    0 0 0 1px rgba(214,168,79,.10) inset,
    inset 0 0 26px rgba(214,168,79,.06);
}

.raven-secret-delivery-scene,
.raven-secret-read-scene {
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.raven-secret-messenger-image {
  display: block;
  width: 100%;
  max-width: 390px;
  max-height: 74vh;
  object-fit: contain;
  margin: 0 auto;
  filter:
    drop-shadow(0 12px 22px rgba(0, 0, 0, .66))
    drop-shadow(0 0 18px rgba(214, 168, 79, .15));
  user-select: none;
  pointer-events: none;
}

.raven-secret-read-image {
  max-width: 340px;
  max-height: 68vh;
}

.raven-secret-delivery-copy,
.raven-secret-read-copy {
  text-align: center;
  padding: 10px 10px 10px 0;
}

.raven-secret-delivery-copy .small-label,
.raven-secret-read-copy .small-label {
  margin-bottom: 10px;
}

.raven-secret-delivery-card h2 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  color: #e7c46b;
  letter-spacing: .05em;
}

.raven-secret-delivery-card p,
.raven-secret-read-card p {
  color: #f1e8da;
  line-height: 1.5;
}

.raven-secret-delivery-card .hint,
.raven-secret-read-card .hint {
  color: #d3c4a1;
}

.raven-secret-delivery-card #closeSecretMessageArrivalBtn {
  margin-top: 18px;
  min-width: 240px;
}

.raven-secret-read-card #secretMessageReadFrom {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2.3vw, 2.05rem);
  color: #e7c46b;
}

.raven-secret-read-card #secretMessageReadText {
  margin: 0 auto 16px;
  max-width: 560px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(214, 168, 79, .18);
  background: linear-gradient(180deg, rgba(6,6,8,.76), rgba(0,0,0,.80));
  box-shadow: inset 0 0 18px rgba(214,168,79,.04);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
}

.raven-secret-read-card .secret-message-read-actions {
  margin-top: 14px;
}

.raven-secret-read-card .secret-message-read-actions button {
  min-width: 180px;
}

@media (max-width: 860px) {
  .raven-secret-delivery-scene,
  .raven-secret-read-scene {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .raven-secret-delivery-card.secret-message-arrival-card,
  .raven-secret-read-card.secret-message-read-card {
    width: min(620px, 96vw);
    padding: 18px;
  }

  .raven-secret-messenger-image {
    max-width: min(72vw, 320px);
    max-height: 42vh;
  }

  .raven-secret-read-image {
    max-width: min(68vw, 280px);
  }

  .raven-secret-delivery-copy,
  .raven-secret-read-copy {
    padding: 0 4px 4px;
  }
}


/* ================= V207 DIRECT SECRET-MAIL CHOICE ================= */
.secret-message-arrival-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  width: min(560px, 100%);
  margin: 20px auto 0;
}

.secret-message-arrival-actions button {
  width: 100%;
  min-height: 48px;
  margin: 0 !important;
}

#openSecretMessageArrivalBtn {
  border-color: rgba(255, 224, 146, .66) !important;
  background:
    radial-gradient(circle at top, rgba(255, 229, 150, .10), transparent 54%),
    linear-gradient(180deg, #c92739, #86121f) !important;
  color: #fff7df !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 205, .10),
    0 5px 15px rgba(0, 0, 0, .38),
    0 0 18px rgba(198, 37, 55, .16) !important;
}

#openSecretMessageArrivalBtn:hover,
#openSecretMessageArrivalBtn:focus-visible {
  filter: brightness(1.10);
  border-color: rgba(255, 231, 164, .92) !important;
  outline: none;
}

#keepUnreadSecretMessageArrivalBtn {
  border-color: rgba(214, 168, 79, .46) !important;
  background:
    linear-gradient(180deg, rgba(48, 37, 25, .95), rgba(16, 11, 8, .98)) !important;
  color: #e9d3a3 !important;
}

#keepUnreadSecretMessageArrivalBtn:hover,
#keepUnreadSecretMessageArrivalBtn:focus-visible {
  filter: brightness(1.10);
  border-color: rgba(235, 194, 103, .74) !important;
  outline: none;
}

@media (max-width: 620px) {
  .secret-message-arrival-actions {
    grid-template-columns: 1fr;
  }
}


/* ================= V209 HUMAN PLAYER PRESENCE BOOST =================
   Push the near-side human avatars another step larger. The user wanted them to
   feel about 15% bigger so they read as true foreground participants at the table,
   especially when the uploaded PNG sits inside a roomy transparent canvas. */
#gameRoomPanel .human-player-figure-seat,
#gameRoomPanel.deceived-layout-v3 .human-player-figure-seat {
  max-width: 49% !important;
  min-width: 102px !important;
}

@media (min-width: 901px) {
  #gameRoomPanel .human-player-figure-seat,
  #gameRoomPanel.deceived-layout-v3 .human-player-figure-seat {
    transform: translateX(-50%) scale(1.17) !important;
    transform-origin: center bottom !important;
  }
}

/* ================= V210 TABLE MUSIC TOGGLE =================
   Music/sound on-off control living in Table Tools. Uses the existing
   Moonsteel palette (private info / neutral utility) via the .secondary
   class already applied in markup, so only layout and muted state are
   defined here. Additive only — nothing above this line is modified. */

.raven-box .table-music-toggle-btn {
  width: 100% !important;
  margin: 8px 0 !important;
}

.table-music-toggle-btn {
  letter-spacing: .08em;
}

/* Muted reads as dormant rather than broken: the moonsteel drains out
   but the button keeps its shape and position in the tool stack. */
.table-music-toggle-btn[data-music-muted="true"] {
  color: #9fb0be !important;
  border-color: rgba(154, 210, 255, .28) !important;
  background:
    linear-gradient(180deg, rgba(38, 52, 66, .96) 0%, rgba(14, 24, 38, .97) 58%, rgba(6, 11, 20, .98) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(219,243,255,.06),
    inset 0 -11px 20px rgba(0,0,0,.34),
    0 5px 12px rgba(0,0,0,.40) !important;
}

.table-music-toggle-btn[data-music-muted="true"]:hover {
  color: #d6e6f2 !important;
  border-color: rgba(154, 210, 255, .46) !important;
}

/* ================= V210 LANDING COPYRIGHT LINE =================
   Sits below DETERMINE YOUR FATE. Deliberately the quietest text on the
   page — present for the legal record, not competing with the pitch. */

.landing-legal {
  margin: 26px auto 4px !important;
  max-width: 430px;
  color: rgba(214, 168, 79, .34) !important;
  font-size: .66rem !important;
  line-height: 1.65 !important;
  letter-spacing: .06em;
  text-align: center;
}

.landing-legal a {
  color: inherit;
  text-decoration-color: rgba(214, 168, 79, .25);
  text-underline-offset: .18em;
}

.landing-legal a:hover,
.landing-legal a:focus-visible {
  color: rgba(239, 199, 94, .72);
}

/* ================= V212 ROUND TABLE POSITION + HUMAN SCALE POLISH =================
   Calibrated for the new round Table of Deception artwork:
   - the physical table is genuinely larger, but its floor line is held up so it
     no longer appears to sit on the far-side Characters' feet;
   - the invisible Secret Mail and quill buttons are moved onto the new tabletop props;
   - normalized human WebP figures gain foreground presence without covering those props;
   - extra space below the table keeps larger human feet clear of Discussion. */

@media (min-width: 901px) {
  #gameRoomPanel img.table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {
    left: 50% !important;
    top: 52.0% !important;
    width: 96% !important;
    height: 96% !important;
    transform: translate(-50%, -50%) scale(.90) !important;
    transform-origin: center center !important;
    object-position: center center !important;
  }

  /* The new black leather envelope sits higher and a little farther left than
     the previous parchment. This transparent button is the Secret Mail target. */
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn {
    left: 29.0% !important;
    top: 39.5% !important;
    width: 13.8% !important;
    height: 13.0% !important;
    transform: translate(-50%, -50%) rotate(-2deg) !important;
    border-radius: 16px !important;
  }

  /* The tall white quill with gold spine is farther right and reaches higher,
     so the compose target follows the visible feather rather than the old inkwell. */
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn {
    left: 78.2% !important;
    top: 36.6% !important;
    width: 11.2% !important;
    height: 22.0% !important;
    transform: translate(-50%, -50%) rotate(-8deg) !important;
    border-radius: 28px !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-pick-prompt,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-pick-prompt {
    left: 77.5% !important;
    top: 23.5% !important;
  }

  /* Human avatars are foreground people, not miniature game pieces. Because the
     transform origin is the feet, this makes them taller without moving the floor line. */
  #gameRoomPanel .human-player-figure-seat,
  #gameRoomPanel.deceived-layout-v3 .human-player-figure-seat {
    max-width: 56% !important;
    min-width: 112px !important;
    transform: translateX(-50%) scale(1.30) !important;
    transform-origin: center bottom !important;
  }

  /* Final desktop seat positions override the older V191 positions. They keep
     the letter/quill lanes open while spreading the humans across the foreground. */
  #gameRoomPanel .human-player-stage .human-player-figure-seat:nth-child(1),
  #gameRoomPanel.deceived-layout-v3 .human-player-stage .human-player-figure-seat:nth-child(1) {
    left: 7% !important;
    bottom: -33% !important;
  }

  #gameRoomPanel .human-player-stage .human-player-figure-seat:nth-child(2),
  #gameRoomPanel.deceived-layout-v3 .human-player-stage .human-player-figure-seat:nth-child(2) {
    left: 20% !important;
    bottom: -31% !important;
  }

  #gameRoomPanel .human-player-stage .human-player-figure-seat:nth-child(3),
  #gameRoomPanel.deceived-layout-v3 .human-player-stage .human-player-figure-seat:nth-child(3) {
    left: 36% !important;
    bottom: -27% !important;
  }

  #gameRoomPanel .human-player-stage .human-player-figure-seat:nth-child(4),
  #gameRoomPanel.deceived-layout-v3 .human-player-stage .human-player-figure-seat:nth-child(4) {
    left: 83% !important;
    bottom: -27% !important;
  }

  #gameRoomPanel .human-player-stage .human-player-figure-seat:nth-child(5),
  #gameRoomPanel.deceived-layout-v3 .human-player-stage .human-player-figure-seat:nth-child(5) {
    left: 96% !important;
    bottom: -31% !important;
  }

  #gameRoomPanel .room-table.has-human-figures,
  #gameRoomPanel.deceived-layout-v3 .room-table.has-human-figures {
    margin-bottom: 132px !important;
  }
}

/* Tablet keeps the round table a little higher while retaining larger human scale.
   Mobile remains intentionally more conservative so the tabletop controls stay usable. */
@media (min-width: 651px) and (max-width: 900px) {
  #gameRoomPanel img.table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {
    left: 50% !important;
    top: 48.5% !important;
    width: 100% !important;
    height: 100% !important;
    transform: translate(-50%, -50%) scale(.94) !important;
  }

  #gameRoomPanel .human-player-figure-seat,
  #gameRoomPanel.deceived-layout-v3 .human-player-figure-seat {
    transform: translateX(-50%) scale(.96) !important;
    transform-origin: center bottom !important;
  }
}

@media (max-width: 650px) {
  #gameRoomPanel img.table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {
    left: 50% !important;
    top: 49% !important;
    width: 100% !important;
    height: 100% !important;
    transform: translate(-50%, -50%) scale(.97) !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn {
    left: 29% !important;
    top: 40% !important;
    width: 15% !important;
    height: 13% !important;
    transform: translate(-50%, -50%) rotate(-2deg) !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn {
    left: 78% !important;
    top: 37% !important;
    width: 12.5% !important;
    height: 22% !important;
    transform: translate(-50%, -50%) rotate(-8deg) !important;
  }
}



/* ================= V213 TABLE LOWERING ONLY =================
   Desktop visual correction: lower the new round table so the lower brace/feet
   no longer appear to sit across the far-side Characters' feet. Mail/quill
   hitboxes intentionally remain untouched for this pass, per testing request. */

/* ================= V214 PHYSICAL TABLE CLICK SHIELD + PROP HITBOX CALIBRATION =================
   The solid table must behave like a real foreground object:
   Character Players behind it cannot be clicked through the visible tabletop/base.
   Human players remain above this shield and the real mail/quill controls remain above it.
   Prop positions are calibrated from the current solid-table screenshot. */

@media (min-width: 901px) {
  /* Invisible physical tabletop: catches clicks that would otherwise pass through
     the marble surface into a Character Player standing behind it. */
  #gameRoomPanel .room-table::before,
  #gameRoomPanel.deceived-layout-v3 .room-table::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 10.5% !important;
    top: 15.7% !important;
    width: 80.0% !important;
    height: 34.0% !important;
    border-radius: 50% !important;
    background: transparent !important;
    pointer-events: auto !important;
    cursor: default !important;
  }

  /* Invisible solid pedestal/body: blocks click-through across the new closed
     lower table while allowing the foreground human-player layer (z-index 5)
     and tabletop controls (z-index 9) to remain interactive. */
  #gameRoomPanel .room-table::after,
  #gameRoomPanel.deceived-layout-v3 .room-table::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 11.5% !important;
    top: 43.0% !important;
    width: 77.5% !important;
    height: 43.0% !important;
    border-radius: 10% 10% 16% 16% / 12% 12% 9% 9% !important;
    background: transparent !important;
    pointer-events: auto !important;
    cursor: default !important;
  }

  /* SECRET MAIL = the black leather envelope itself.
     Shifted left and tightened so the live target follows the visible envelope
     instead of occupying the large empty marble area shown in the screenshot. */
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn {
    left: 25.7% !important;
    top: 40.7% !important;
    width: 11.2% !important;
    height: 13.6% !important;
    transform: translate(-50%, -50%) rotate(-2deg) !important;
    border-radius: 13px !important;
    z-index: 10 !important;
  }

  /* SEND SECRET MESSAGE = the complete white quill + inkwell.
     Raised and shifted slightly left so the target follows the feather from tip
     through the inkwell rather than the lower/right empty tabletop. */
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn {
    left: 76.8% !important;
    top: 33.6% !important;
    width: 12.5% !important;
    height: 24.0% !important;
    transform: translate(-50%, -50%) rotate(-8deg) !important;
    border-radius: 28px !important;
    z-index: 10 !important;
  }

  /* Keep the visual discovery glows close to the actual props instead of making
     the active area look substantially larger than the item being clicked. */
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn::after,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn::after {
    inset: -5% !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn::after,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn::after {
    inset: -3% -6% !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-pick-prompt,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-pick-prompt {
    left: 76.8% !important;
    top: 20.5% !important;
  }
}

/* The physical table should also prevent click-through on narrower layouts.
   Use a slightly broader shield because the artwork fills more of the stage. */
@media (max-width: 900px) {
  #gameRoomPanel .room-table::before,
  #gameRoomPanel.deceived-layout-v3 .room-table::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 7% !important;
    top: 18% !important;
    width: 86% !important;
    height: 32% !important;
    border-radius: 50% !important;
    background: transparent !important;
    pointer-events: auto !important;
  }

  #gameRoomPanel .room-table::after,
  #gameRoomPanel.deceived-layout-v3 .room-table::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 8% !important;
    top: 44% !important;
    width: 84% !important;
    height: 40% !important;
    border-radius: 10% 10% 16% 16% / 12% 12% 9% 9% !important;
    background: transparent !important;
    pointer-events: auto !important;
  }
}

/* ================= V215 TRUE TABLE-SHAPE CLICK SHIELD + PROP ALIGNMENT =================
   Screenshot-calibrated correction:
   1. The V214 tabletop shield reached far above the actual marble table. V215 clips
      hit-testing to the physical tabletop/body instead of using one oversized region.
   2. Secret Mail follows the raised black leather envelope.
   3. Send Secret Message follows the white quill + inkwell.
   Human players remain above the shield; Character Players behind the table cannot
   be selected through the physical table. */

@media (min-width: 901px) {
  /* TABLETOP CLICK SHIELD
     Keep the active boundary ON the visible oval tabletop/rim. clip-path also
     limits hit-testing, so the invisible shield no longer extends into the
     Characters' torsos above the table. */
  #gameRoomPanel .room-table::before,
  #gameRoomPanel.deceived-layout-v3 .room-table::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 10.8% !important;
    top: 32.8% !important;
    width: 79.0% !important;
    height: 19.0% !important;
    border-radius: 0 !important;
    clip-path: ellipse(50% 48% at 50% 52%) !important;
    -webkit-clip-path: ellipse(50% 48% at 50% 52%) !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    outline: 0 !important;
    pointer-events: auto !important;
    cursor: default !important;
  }

  /* SOLID LOWER TABLE CLICK SHIELD
     Matches the closed pedestal/front instead of extending into the open room.
     The tapered polygon leaves the visible side Characters available outside the table. */
  #gameRoomPanel .room-table::after,
  #gameRoomPanel.deceived-layout-v3 .room-table::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 12.2% !important;
    top: 47.8% !important;
    width: 75.6% !important;
    height: 39.0% !important;
    border-radius: 0 !important;
    clip-path: polygon(
      2% 0%,
      98% 0%,
      96% 38%,
      92% 100%,
      8% 100%,
      4% 38%
    ) !important;
    -webkit-clip-path: polygon(
      2% 0%,
      98% 0%,
      96% 38%,
      92% 100%,
      8% 100%,
      4% 38%
    ) !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    outline: 0 !important;
    pointer-events: auto !important;
    cursor: default !important;
  }

  /* BLACK LEATHER ENVELOPE / SECRET MAIL
     Move the target upward onto the actual propped envelope and trim the excess
     marble below it. */
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn {
    left: 25.2% !important;
    top: 35.1% !important;
    width: 10.6% !important;
    height: 11.2% !important;
    transform: translate(-50%, -50%) rotate(-2deg) !important;
    border-radius: 12px !important;
    z-index: 10 !important;
  }

  /* WHITE QUILL + INKWELL / SEND SECRET MESSAGE
     Raise the target and move it slightly right so the live region follows the
     feather from the inkwell to the visible tip. */
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn {
    left: 78.2% !important;
    top: 29.5% !important;
    width: 11.2% !important;
    height: 21.0% !important;
    transform: translate(-50%, -50%) rotate(-8deg) !important;
    border-radius: 28px !important;
    z-index: 10 !important;
  }

  /* Discovery glows should hug the visible objects rather than revealing an
     oversized rectangular hitbox. */
  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn::after,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn::after {
    inset: -3% !important;
    border-radius: 12px !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn::after,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn::after {
    inset: -2% -4% !important;
    border-radius: 30px !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-pick-prompt,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-pick-prompt {
    left: 78.0% !important;
    top: 17.0% !important;
  }
}

/* Keep the same principle on tablet/mobile: shield only the physical table,
   never a broad invisible band above it. */
@media (max-width: 900px) {
  #gameRoomPanel .room-table::before,
  #gameRoomPanel.deceived-layout-v3 .room-table::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 8.0% !important;
    top: 34.0% !important;
    width: 84.0% !important;
    height: 18.0% !important;
    border-radius: 0 !important;
    clip-path: ellipse(50% 48% at 50% 52%) !important;
    -webkit-clip-path: ellipse(50% 48% at 50% 52%) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: auto !important;
  }

  #gameRoomPanel .room-table::after,
  #gameRoomPanel.deceived-layout-v3 .room-table::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 3 !important;
    left: 9.5% !important;
    top: 48.5% !important;
    width: 81.0% !important;
    height: 37.0% !important;
    border-radius: 0 !important;
    clip-path: polygon(2% 0%, 98% 0%, 95% 100%, 5% 100%) !important;
    -webkit-clip-path: polygon(2% 0%, 98% 0%, 95% 100%, 5% 100%) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: auto !important;
  }
}


/* ================= V215 THE RECKONING — LEDGER =================
   Both the voting screen and the record of who voted for whom. Docked in the
   table area between rounds; a full overlay while voting and while the verdict
   is read. Built entirely by raven-ledger.js — no markup lives in index.html
   except the Table Tools button that reopens the book. */

.raven-ledger {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity .35s ease;
}

.raven-ledger.is-hidden { opacity: 0; pointer-events: none; visibility: hidden; }

/* Docked: sits over the table area, measured at runtime. */
.raven-ledger.is-docked {
  inset: var(--rl-top, 0) auto auto var(--rl-left, 0);
  width: var(--rl-w, 100%);
  height: var(--rl-h, 100%);
  pointer-events: none;
}
.raven-ledger.is-docked .raven-ledger-backdrop { opacity: 0; }
.raven-ledger.is-docked .raven-ledger-book { max-height: 100%; opacity: .93; }

/* Overlay: voting, the reveal, and the book. */
.raven-ledger.is-overlay { inset: 0; width: auto; height: auto; pointer-events: auto; }
.raven-ledger.is-overlay .raven-ledger-backdrop { opacity: 1; }

.raven-ledger-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(24,12,4,.82), rgba(4,2,1,.95));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity .4s ease;
}

.raven-ledger-book {
  position: relative;
  max-height: 92vh;
  max-width: min(94vw, 620px);
  /* The page grows with the table — a fixed 700/880 sheet overflowed from ten
     players up. The ledger sets --rl-page-ratio to match its own viewBox, so
     the sheet is always exactly as long as the round needs. */
  aspect-ratio: var(--rl-page-ratio, 700 / 880);
  border-radius: 5px;
  overflow: visible;
  box-shadow:
    0 24px 58px rgba(0,0,0,.88),
    0 0 0 1px #241a10,
    0 0 0 7px #120c07,
    0 0 0 8px #2d2013;
  animation: rlOpen .45s cubic-bezier(.2,.9,.3,1);
}

@keyframes rlOpen {
  from { transform: scale(.96) translateY(10px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* The vote is deliberately staged like a camera move. It opens at the old
   distant view, then comes close enough to read without asking a new player to
   discover browser zoom. The reveal keeps this final scale. */
.raven-ledger.is-vote-focus {
  /* The previous focus was still close to the distant table view. A forty
     percent larger final scale makes the names and charge readable without
     asking players to discover browser zoom. */
  --rl-focus-scale: 1.62;
  --rl-focus-shift: 30px;
}

.raven-ledger.is-vote-focus .raven-ledger-book {
  transform-origin: center center;
  animation: rlVoteFocus 2000ms cubic-bezier(.22, .72, .2, 1) both;
}

@keyframes rlVoteFocus {
  0%   { transform: translateY(14px) scale(.88); opacity: .45; }
  28%  { opacity: 1; }
  100% { transform: translateY(var(--rl-focus-shift)) scale(var(--rl-focus-scale)); opacity: 1; }
}

.raven-ledger-sheet { border-radius: 5px; overflow: hidden; }
.raven-ledger-parch { display: block; width: 100%; height: auto; }
.raven-ledger-book.is-last-words-page .raven-ledger-parch { display: none !important; }
.raven-ledger-lastwords-page[hidden] { display: none !important; }

/* The final sheet of The Reckoning is a permanent archive rather than a
   staged vote animation. It keeps a readable type size and lets the parchment
   itself scroll when a long game leaves many voices behind. */
.raven-ledger-book.is-last-words-page {
  width: min(94vw, 620px);
  height: min(82vh, 900px);
  aspect-ratio: auto;
}

.raven-ledger-book.is-last-words-page .raven-ledger-sheet {
  height: 100%;
  overflow: hidden;
}

.raven-ledger-lastwords-page {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 46px clamp(28px, 7vw, 62px) 70px;
  color: #342014;
  background:
    radial-gradient(circle at 28% 12%, rgba(255, 222, 164, .30), transparent 31%),
    radial-gradient(circle at 46% 45%, transparent 43%, rgba(41, 20, 7, .42) 100%),
    linear-gradient(135deg, #c9b189 0%, #b89c6f 42%, #9c7f55 78%, #79603e 100%);
  box-shadow: inset 0 0 55px rgba(45, 22, 7, .52);
  scrollbar-color: #6b4526 rgba(80, 48, 22, .18);
  scrollbar-width: thin;
}

.raven-ledger-lastwords-page::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(78, 52, 24, .58);
  border-radius: 2px;
  pointer-events: none;
}

.raven-ledger-lastwords-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(94, 52, 24, .45);
}

.raven-ledger-lastwords-header span,
.raven-ledger-lastwords-round {
  display: block;
  color: #6b4526;
  font-family: "Cinzel", Georgia, serif;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .22em;
}

.raven-ledger-lastwords-header h2 {
  margin: 8px 0 6px;
  color: #5e3418;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  letter-spacing: .18em;
  text-shadow: 0 1px rgba(244, 218, 166, .38);
}

.raven-ledger-lastwords-header p {
  margin: 0;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
}

.raven-ledger-lastwords-entry {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 25px 2px 23px;
  border-bottom: 1px solid rgba(94, 52, 24, .28);
}

.raven-ledger-lastwords-entry:last-child { border-bottom: 0; }

.raven-ledger-lastwords-entry h3 {
  margin: 0 0 4px;
  color: #5a241c;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: .09em;
}

.raven-ledger-lastwords-line {
  margin: 15px 0 2px;
  padding: 0 0 0 18px;
  border-left: 2px solid rgba(90, 14, 8, .55);
  color: #2e1b11;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1.08rem, 3.2vw, 1.32rem);
  font-style: italic;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.raven-ledger-lastwords-line.is-silence,
.raven-ledger-lastwords-missing {
  color: rgba(62, 42, 22, .72);
}

.raven-ledger-lastwords-target {
  margin: 5px 0 0 20px;
  color: #6b4526;
  font-family: "Cinzel", Georgia, serif;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.raven-ledger-lastwords-missing,
.raven-ledger-lastwords-empty {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
}

.raven-ledger-lastwords-empty {
  position: relative;
  z-index: 1;
  padding: 70px 12px;
  text-align: center;
}

.raven-ledger-blade {
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(-4px 6px 8px rgba(0,0,0,.62));
}

/* The table's waiting notice occupies its own row, above the seats. */
#gameRoomPanel .table-task-status:not([hidden]) {
  display: flex;
  order: 2;
  grid-column: 1 / -1;
  justify-self: center;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  position: relative;
  z-index: 85;
  box-sizing: border-box;
  width: min(560px, 96%);
  margin: .25rem auto;
  padding: .65rem 1rem;
  border: 1px solid #866a42;
  border-radius: 14px;
  background: linear-gradient(145deg, #342820, #201917);
  color: #f2e6d6;
  text-align: left;
  box-shadow: 0 4px 16px #0008;
}
.table-task-status [data-task-heading], .table-task-status [data-task-detail] {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.table-task-status [data-task-heading] { color: #f1d39f; font-size: 1.06rem; }
.table-task-status [data-task-detail] { margin-top: .16rem; font-size: .91rem; }
.table-task-status [data-task-clock]:not(:empty) {
  flex: none;
  font-size: 1.28rem;
  font-variant-numeric: tabular-nums;
  color: #ffe4af;
}

/* ---- text on the page ---- */

.raven-ledger text.rl-head {
  font-family: "Cinzel", Georgia, serif;
  font-size: 12.5px; letter-spacing: .28em;
}
.raven-ledger text.rl-sub,
.raven-ledger text.rl-foot {
  font-family: "EB Garamond", Georgia, serif;
  font-style: italic; font-size: 13px;
}
.raven-ledger text.rl-clock {
  font-family: "Cinzel", Georgia, serif;
  font-size: 13px; letter-spacing: .2em;
}
.raven-ledger text.rl-charge-head {
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px; letter-spacing: .24em;
}
.raven-ledger text.rl-charge { font-family: "EB Garamond", Georgia, serif; font-size: 14.5px; }
.raven-ledger text.rl-warn   { font-style: italic; }

/* The roster and the entries are the only cursive on the page. */
.raven-ledger text.rl-entry,
.raven-ledger text.rl-big,
.raven-ledger text.rl-pick {
  font-family: "Tangerine", "Brush Script MT", cursive;
  paint-order: stroke fill;
  stroke: rgba(30,14,4,.30);
  stroke-width: 1px;
}
.raven-ledger text.rl-entry { font-size: 54px; }
.raven-ledger text.rl-big   { font-size: 64px; }
.raven-ledger text.rl-pick  { font-size: 56px; cursor: pointer; transition: filter .18s ease; }
.raven-ledger text.rl-pick.is-hover { filter: drop-shadow(0 0 8px rgba(154,20,10,.85)); }
.raven-ledger text.rl-pick.is-protected {
  opacity: 1;
  cursor: not-allowed;
  filter: none;
}
.raven-ledger text.rl-pick.is-protected.is-hover {
  filter: none;
}
.raven-ledger .rl-protection-mark { pointer-events: none; }
.raven-ledger .rl-protection-shield {
  opacity: .92;
  filter: drop-shadow(0 2px 2px rgba(54, 31, 10, .36));
}

.raven-ledger .rl-hit { fill: transparent; cursor: pointer; }
.raven-ledger .rl-hit.is-protected { cursor: not-allowed; }
.raven-ledger .rl-stroke { fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---- chrome: page turning and close ---- */

.raven-ledger-chrome {
  position: absolute;
  left: 0; right: 0; bottom: -54px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: auto;
}

/* Page turning belongs to the book. Voting and the reveal get the close
   button only — but they always get it. */
.raven-ledger-chrome:not(.is-book) [data-rl="prev"],
.raven-ledger-chrome:not(.is-book) [data-rl="next"],
.raven-ledger-chrome:not(.is-book) [data-rl="lastwords"],
.raven-ledger-chrome:not(.is-book) .rl-page { display: none; }
.raven-ledger-chrome.is-hidden { display: none; }

.raven-ledger .rl-btn {
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: #E4D9C0;
  background: linear-gradient(180deg, #241A0D, #17110B);
  border: 1px solid rgba(214,168,79,.34);
  border-radius: 3px;
  padding: 9px 15px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.raven-ledger .rl-btn:hover:not(:disabled) { border-color: #C9A24A; color: #EFD79B; }
.raven-ledger .rl-btn:disabled { opacity: .32; cursor: not-allowed; }
.raven-ledger .rl-lastwords {
  color: #d9b865;
  border-color: rgba(214,168,79,.58);
}
.raven-ledger .rl-lastwords.is-current {
  color: #17100a;
  background: linear-gradient(180deg, #d6b66c, #9f7730);
  border-color: #efd79b;
}
.raven-ledger .rl-hit:focus {
  outline: none;
  stroke: #7b2a35;
  stroke-width: 3px;
  fill: rgba(123, 42, 53, .08);
}
.raven-ledger .rl-hit.is-protected:focus {
  stroke: #31576b;
  fill: rgba(49, 87, 107, .08);
}
.raven-ledger .rl-page {
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px; letter-spacing: .2em; color: #8A7B62;
  min-width: 120px; text-align: center;
}

/* The Table Tools button that reopens the book. */
.raven-box .table-ledger-btn { width: 100% !important; margin: 8px 0 !important; }
.table-ledger-btn { letter-spacing: .08em; }

@media (max-width: 640px) {
  .raven-ledger-book { max-width: 96vw; max-height: 84vh; }
  .raven-ledger-chrome { bottom: -50px; }
  .raven-ledger-chrome.is-book { gap: 6px; }
  .raven-ledger-chrome.is-book .rl-btn { padding: 8px 9px; font-size: 9px; }
  .raven-ledger-chrome.is-book .rl-page { min-width: 74px; font-size: 9px; }
  .raven-ledger-book.is-last-words-page { width: 94vw; height: 80vh; }
  .raven-ledger-lastwords-page { padding: 38px 28px 58px; }
  .raven-ledger.is-vote-focus { --rl-focus-scale: 1.04; --rl-focus-shift: 8px; }
}

@media (max-height: 760px) and (min-width: 641px) {
  .raven-ledger.is-vote-focus { --rl-focus-scale: 1.22; --rl-focus-shift: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .raven-ledger-book { animation: none; }
  .raven-ledger.is-vote-focus .raven-ledger-book {
    animation: none;
    transform: translateY(var(--rl-focus-shift)) scale(var(--rl-focus-scale));
  }
}

/* ================= V216 SEAT THE TABLE =================
   A grid of figures the host taps to seat or unseat. Replaces the dropdown,
   the Add button, and the list of seated characters with Remove buttons —
   three controls answering one question, with the characters ending up listed
   twice on the same screen. */

.character-seat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
}

.character-seat-card {
  position: relative;
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 1px solid rgba(214, 168, 79, .22);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(180deg, #140E09 0%, #0C0806 100%);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.character-seat-card:hover:not(:disabled) { transform: translateY(-2px); }
.character-seat-card:focus-visible { outline: 2px solid #EFD79B; outline-offset: 2px; }
.character-seat-card:disabled { cursor: not-allowed; opacity: .45; transform: none; }

/* a pool of candlelight under the figure */
.character-seat-art {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 72% 44% at 50% 88%,
    rgba(214, 168, 79, .14), rgba(0, 0, 0, 0) 70%);
}

.character-seat-art img {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  height: 78%;
  width: auto;
  max-width: 96%;
  object-fit: contain;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, .72));
  transition: filter .2s ease;
}

.character-seat-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 5px 7px;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(10,6,4,.93) 55%);
  font-family: "Cinzel", Georgia, serif;
  font-size: 9.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: center;
  color: #C7B48A;
  transition: color .18s ease;
}

/* out of the game */
.character-seat-card[aria-pressed="false"] .character-seat-art img {
  filter: grayscale(1) brightness(.44) drop-shadow(0 4px 9px rgba(0,0,0,.6));
}
.character-seat-card[aria-pressed="false"] .character-seat-name { color: #6A5C46; }
.character-seat-card[aria-pressed="false"]:hover:not(:disabled) .character-seat-art img {
  filter: grayscale(.55) brightness(.72) drop-shadow(0 5px 11px rgba(0,0,0,.65));
}

/* seated */
.character-seat-card[aria-pressed="true"] {
  border-color: rgba(214, 168, 79, .85);
  box-shadow:
    0 0 0 1px rgba(214, 168, 79, .35),
    0 6px 20px rgba(0, 0, 0, .6),
    inset 0 0 30px rgba(214, 168, 79, .10);
}
.character-seat-card[aria-pressed="true"] .character-seat-name { color: #EFD79B; }

.character-seat-mark {
  position: absolute;
  top: 6px; right: 6px;
  width: 19px; height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  border-radius: 50%;
  color: #FFD9C0;
  background: linear-gradient(180deg, #5C1D0C, #371107);
  border: 1px solid #B33A1A;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .18s ease, transform .18s ease;
}
.character-seat-card[aria-pressed="true"] .character-seat-mark { opacity: 1; transform: scale(1); }

.character-seat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 6px;
}
.character-seat-actions button { flex: 1 1 auto; min-width: 132px; }

@media (max-width: 480px) {
  .character-seat-grid { grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 8px; }
  .character-seat-name { font-size: 8.5px; padding: 16px 3px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .character-seat-card { transition: none; }
  .character-seat-card:hover:not(:disabled) { transform: none; }
}

/* ================= V221 HINT BOX =================
   Lives on document.body with fixed positioning. Parenting it to the player's
   seat meant Firestore rebuilding the figures threw it away, and every element
   I tried measuring — the seat shell, the artwork canvas — is wider than the
   visible body, so "beside the figure" kept landing over the table. Fixed
   position answers to nothing but the viewport; JS sets left and top. */

.raven-hintbox {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 850;
  width: min(268px, 33vw);
  padding: 16px 14px 10px;
  border: 1px solid rgba(214, 168, 79, .72);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(38, 26, 14, .985), rgba(18, 12, 7, .985));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .8),
    0 0 22px rgba(214, 168, 79, .22),
    0 12px 32px rgba(0, 0, 0, .8);
  transition: opacity .25s ease;
  pointer-events: auto;
  text-align: left;
}

.raven-hintbox.is-hidden { opacity: 0; pointer-events: none; }

/* Lobby and role card have no figure to speak from, so the tail goes away and
   the box simply keeps you company in the corner. */
.raven-hintbox.is-floating::before,
.raven-hintbox.is-floating::after { display: none; }

/* The tail sits near the TOP of the box, not the bottom, so the box hangs
   below the anchor instead of standing on it. That drops it clear of the
   tabletop and puts the point level with the player's mouth. JS lines this
   exact point up with the anchor. */
.raven-hintbox::before,
.raven-hintbox::after {
  content: "";
  position: absolute;
  left: -9px; top: 28px; bottom: auto;
  width: 0; height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 10px solid rgba(214, 168, 79, .72);
}
.raven-hintbox::after { left: -7.5px; border-right-color: #241A0E; }

/* A tab straddling the top edge, so it names the box without taking a line of
   its own and without sharing a corner with any control. */
.raven-hintbox .rc-head {
  position: absolute;
  top: -9px; right: 13px; left: auto;
  padding: 1px 9px;
  border: 1px solid rgba(214, 168, 79, .75);
  border-radius: 3px;
  background: linear-gradient(180deg, #3A2A16, #1A1209);
  color: #EFD79B;
  font-family: "Cinzel", Georgia, serif;
  font-size: 9px;
  letter-spacing: .2em;
  line-height: 1.6;
  text-transform: uppercase;
  white-space: nowrap;
}

/* These are the important words on the screen, so they read like it. */
.raven-hintbox .rc-text {
  display: block;
  margin: 0;
  padding-left: 9px;
  padding-right: 24px;
  border-left: 2px solid rgba(214, 168, 79, .55);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  color: #F6EACC;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9);
}

/* Footer row: progress on the left, the way out on the right. The hide control
   used to sit in the header, where it stretched across the box unstyled and
   collided with the title. */
.raven-hintbox .rc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 0 11px;
}

.raven-hintbox .rc-dots { display: flex; gap: 5px; }
.raven-hintbox .rc-dots i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(214, 168, 79, .3);
}
.raven-hintbox .rc-dots i.on { background: #EFD79B; }

/* Advance by hand rather than waiting out the nine seconds. Sits against the
   right edge at reading height, where a page-turn belongs. */
.raven-hintbox .rc-next {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  min-width: 0;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(214, 168, 79, .28);
  border-radius: 4px;
  background: rgba(0, 0, 0, .3);
  color: #C9A24A;
  font-family: "Cinzel", Georgia, serif;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.host-quick-phase-button {
  position: absolute;
  left: 50%;
  bottom: 27%;
  z-index: 120;
  transform: translateX(-50%);
  width: max-content;
  min-width: 150px;
  padding: 7px 12px;
  border: 1px solid #D6A84F;
  border-radius: 999px;
  background: linear-gradient(180deg, #791925, #3B080E);
  color: #FFF0C0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .75);
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.host-quick-phase-button:hover {
  border-color: #FFE08A;
  filter: brightness(1.16);
}
.raven-hintbox .rc-next:hover {
  color: #EFD79B;
  border-color: rgba(214, 168, 79, .75);
  background: rgba(214, 168, 79, .12);
}

.raven-hintbox.is-min .rc-next { display: none !important; }

.raven-hintbox .rc-min {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 3px 10px;
  border: 1px solid rgba(214, 168, 79, .35);
  border-radius: 3px;
  background: rgba(0, 0, 0, .35);
  color: #9A8A6C;
  font-family: "Cinzel", Georgia, serif;
  font-size: 8.5px;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.raven-hintbox .rc-min:hover { color: #EFD79B; border-color: rgba(214, 168, 79, .7); }

/* Hidden, and it stays hidden across games. The pill says plainly what it is,
   because a faint word was too easy to lose against the room. */
.raven-hintbox .rc-reopen {
  display: none;
  color: #EFD79B;
  font-family: "Cinzel", Georgia, serif;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.raven-hintbox.is-min {
  width: auto;
  padding: 8px 14px;
  cursor: pointer;
  border-color: rgba(214, 168, 79, .8);
  box-shadow: 0 0 16px rgba(214, 168, 79, .3), 0 6px 18px rgba(0, 0, 0, .7);
}
/* The pill keeps its tail, centred on its own height, so collapsing looks
   like the bubble folding up at the player's mouth rather than a different
   object appearing somewhere else. */
.raven-hintbox.is-min::before,
.raven-hintbox.is-min::after {
  top: 50%;
  margin-top: -9px;
  bottom: auto;
}
.raven-hintbox.is-min .rc-text,
.raven-hintbox.is-min .rc-foot,
.raven-hintbox.is-min .rc-head { display: none; }
.raven-hintbox.is-min .rc-reopen { display: block; }
.raven-hintbox.is-min:hover { border-color: #EFD79B; }

/* ---- your name tag, when it is also your next action ---- */

.human-player-figure-identity.is-action {
  border-color: #B33A1A !important;
  background: linear-gradient(180deg, #5C1D0C, #2B0D06) !important;
  transform: scale(1.1);
  animation: hintCallToAct 1.15s ease-in-out infinite;
}

.human-player-figure-identity.is-action .human-player-action-tag,
.human-player-figure-identity.is-action .player-identity-role,
.human-player-figure-identity.is-action .player-identity-tag {
  color: #FFD9C0 !important;
  background: rgba(90, 14, 8, .7) !important;
  border-color: #B33A1A !important;
  letter-spacing: .1em;
}

.human-player-action-tag {
  display: block;
  margin-top: 3px;
  padding: 1px 7px;
  border: 1px solid #B33A1A;
  border-radius: 3px;
  background: rgba(90, 14, 8, .7);
  color: #FFD9C0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes hintCallToAct {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 74, 40, .55), 0 0 16px rgba(255, 74, 40, .30); }
  50%      { box-shadow: 0 0 0 7px rgba(255, 74, 40, 0), 0 0 26px rgba(255, 74, 40, .55); }
}

@media (max-width: 900px) {
  .raven-hintbox { width: min(232px, 62vw); padding: 15px 12px 9px; }
  .raven-hintbox .rc-text { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .human-player-figure-identity.is-action { animation: none; }
}

/* ================= V218 TABLE TOOLS, ONE COLOUR EACH =================
   Three of the five were the same blue, so nothing could be found by colour.
   Each tool now owns one: green for the rules, moonsteel for what only you can
   see, gold for the lore, oxblood for the record, slate for the comfort switch. */

.raven-box .table-ledger-btn,
.raven-box .table-ledger-btn.secondary {
  color: #FFD3C4 !important;
  border-color: rgba(179, 58, 26, .72) !important;
  background:
    linear-gradient(180deg, rgba(92, 29, 12, .96) 0%, rgba(58, 15, 8, .97) 58%, rgba(32, 8, 5, .98) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 200, 175, .10),
    inset 0 -11px 20px rgba(0, 0, 0, .36),
    0 5px 12px rgba(0, 0, 0, .42) !important;
}
.raven-box .table-ledger-btn:hover {
  color: #FFE6DA !important;
  border-color: rgba(255, 106, 60, .85) !important;
}

.raven-box .table-music-toggle-btn,
.raven-box .table-music-toggle-btn.secondary {
  color: #C9C6BC !important;
  border-color: rgba(150, 146, 134, .48) !important;
  background:
    linear-gradient(180deg, rgba(48, 47, 43, .95) 0%, rgba(28, 27, 24, .97) 58%, rgba(16, 15, 13, .98) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(230, 228, 220, .07),
    inset 0 -11px 20px rgba(0, 0, 0, .34),
    0 5px 12px rgba(0, 0, 0, .40) !important;
}
.raven-box .table-music-toggle-btn:hover {
  color: #EDEAE0 !important;
  border-color: rgba(190, 186, 174, .7) !important;
}

@media (max-width: 900px) {
  .raven-hintbox { width: min(244px, 54vw); padding: 14px 12px 10px; }
  .raven-hintbox .rc-text { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .human-player-figure-identity.is-action { animation: none; }
}

/* ================= V227 LAST WORDS =================
   The dead get three parting shots. Each lands over whoever it was aimed at,
   readable the instant it arrives — nothing plays in front of the line,
   because anything ahead of a joke is in the way of it. */

.lw-layer {
  position: absolute;
  inset: 0;
  z-index: 36;
  pointer-events: none;
  overflow: visible;
}

.lw-words {
  position: absolute;
  width: 430px;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  opacity: 0;
}

.lw-words.is-live { animation: lwRise var(--lw-hold, 6200ms) cubic-bezier(.2,.5,.3,1) forwards; }

@keyframes lwRise {
  0%   { opacity: 0; transform: translateX(-50%) translateY(26px) scale(.9);  filter: blur(7px); }
  10%  { opacity: 1; transform: translateX(-50%) translateY(6px)  scale(1);   filter: blur(0); }
  74%  { opacity: 1; transform: translateX(-50%) translateY(-42px) scale(1);  filter: blur(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-108px) scale(1.04); filter: blur(5px); }
}

.lw-who {
  display: block;
  margin-bottom: 9px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #FF8A5C;
  text-shadow: 0 0 10px rgba(255, 74, 40, .9);
}
.lw-who .lw-to { margin: 0 6px; letter-spacing: .1em; color: #7A6A52; }
.lw-who .lw-tgt { text-shadow: 0 0 10px currentColor, 0 1px 2px rgba(0, 0, 0, .9); }

.lw-said {
  display: block;
  font-family: "EB Garamond", Georgia, serif;
  font-style: italic;
  font-size: 31px;
  line-height: 1.3;
  color: #FFE2D2;
  text-shadow:
    0 0 12px rgba(255, 74, 40, .95),
    0 0 30px rgba(255, 40, 20, .6),
    0 2px 3px rgba(0, 0, 0, .9);
}

/* ---- the discharge ----
   A soul torn out of someone who was just stabbed in the back does not drift.
   It goes the way current finds a ground: up, out, and all at once. */

.lw-bolt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  transition: opacity .55s ease;
}
.lw-bolt.is-spent { opacity: 0; }

.lw-bolt path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lw-bolt-halo { stroke: rgba(255, 70, 30, .45); stroke-width: 9; }
.lw-bolt-core { stroke: #FFD7C4; stroke-width: 2.4; }
.lw-bolt-hair { stroke: rgba(255, 150, 100, .75); stroke-width: 1.1; }

.lw-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #FFB08A;
  box-shadow: 0 0 8px rgba(255, 110, 60, .95);
  pointer-events: none;
  animation: lwSpark 1300ms cubic-bezier(.2,.7,.4,1) forwards;
}
@keyframes lwSpark {
  0%   { opacity: 0; transform: translate(0, 0) scale(.4); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -70px)) scale(.15); }
}

/* the body it left, lit for exactly as long as the current runs */
.lw-discharging { animation: lwDrain 900ms ease-out; }
@keyframes lwDrain {
  0%   { filter: none; }
  18%  { filter: drop-shadow(0 0 20px rgba(255, 110, 60, .95)) brightness(1.35); }
  100% { filter: none; }
}

/* The shared reading keeps the portrait and the words together, including
   when the table underneath the dialog is scrolled out of sight. */
#lastWordsBroadcastOverlay .last-words-broadcast-card {
  position: relative;
  max-height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}
.lw-soul-portrait[hidden] { display: none; }
.lw-testimony:has(.lw-soul-portrait:not([hidden])) {
  display: grid;
  grid-template-columns: clamp(100px, 25%, 144px) minmax(0, 1fr);
  gap: 8px 18px;
  align-items: center;
  margin: 12px 0 16px;
  text-align: left;
}
.lw-soul-portrait {
  position: relative;
  grid-row: 1 / span 2;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
  border-radius: 48% 48% 12px 12px;
  background: radial-gradient(ellipse at 45% 63%, #63252a 0, #351e20 48%, #120e10 85%);
  box-shadow: inset 0 0 0 1px rgba(218, 176, 112, .33);
}
.lw-soul-portrait img {
  position: absolute;
  top: 2%;
  left: -20%;
  width: 140%;
  max-width: none;
  height: 170%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(2px 2px 4px #140b0a);
}
.lw-soul-portrait.is-guest img { top: -18%; }
.lw-soul-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 9, 12, .85), transparent 25%);
}
.lw-testimony:has(.lw-soul-portrait:not([hidden])) #lastWordsBroadcastTitle {
  align-self: end;
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.75rem);
  overflow-wrap: anywhere;
}
.lw-testimony:has(.lw-soul-portrait:not([hidden])) #lastWordsBroadcastMessage {
  align-self: start;
  width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}
.lw-soul-current {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  fill: none;
  stroke: #ff8d94;
  stroke-width: .8;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px #ff284d);
  animation: lwSoulRelease 1250ms ease-out both;
}
.lw-soul-current path:first-child { stroke: #ee153e; stroke-width: 3.6; }
.lw-soul-current path:nth-child(2) { stroke: #ffe4da; stroke-width: 1.1; }
@keyframes lwSoulRelease {
  0% { opacity: 0; stroke-dasharray: 1; stroke-dashoffset: 1; }
  16% { opacity: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
  42% { opacity: .95; }
  100% { opacity: 0; stroke-dasharray: 1; stroke-dashoffset: 0; }
}
@media (max-width: 520px) {
  .lw-testimony:has(.lw-soul-portrait:not([hidden])) { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
  .lw-soul-portrait { grid-row: 1; }
  .lw-testimony:has(.lw-soul-portrait:not([hidden])) #lastWordsBroadcastTitle { align-self: center; }
  .lw-testimony:has(.lw-soul-portrait:not([hidden])) #lastWordsBroadcastMessage { grid-column: 1 / -1; text-align: center; }
}
@media (max-height: 510px) {
  .lw-testimony:has(.lw-soul-portrait:not([hidden])) { grid-template-columns: 68px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .lw-soul-current { display: none; }
  #lastWordsBroadcastOverlay .last-words-broadcast-card { animation: none; }
}

/* ---- The Raven over a silence ----
   No bolt. Nothing was torn out of anyone; they simply had nothing to say.
   It should look peaceful, and only the words should be unkind. */

.lw-words.is-raven .lw-who {
  color: #C9A24A;
  text-shadow: 0 0 10px rgba(201, 162, 74, .8);
}
.lw-words.is-raven .lw-said {
  color: #EFE0BE;
  text-shadow:
    0 0 12px rgba(201, 162, 74, .7),
    0 0 28px rgba(160, 120, 50, .45),
    0 2px 3px rgba(0, 0, 0, .9);
}
.lw-words.is-raven.is-live { animation-timing-function: cubic-bezier(.25,.4,.3,1); }

/* ---- the composer ---- */

.lw-targets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 11px; }

.lw-target {
  font-family: "Cinzel", Georgia, serif;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #C7B48A;
  background: rgba(0, 0, 0, .4);
  border: 1px solid rgba(214, 168, 79, .3);
  border-radius: 4px;
  padding: 9px 13px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.lw-target:hover:not(:disabled) { border-color: #C9A24A; color: #EFD79B; }
.lw-target[aria-pressed="true"] {
  border-color: #B33A1A;
  color: #FFD9C0;
  background: linear-gradient(180deg, #5C1D0C, #2B0D06);
}
.lw-target:disabled { opacity: .3; cursor: not-allowed; }

.lw-row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

#lastWordsOverlay .last-words-card { width: min(760px, 94vw); box-sizing: border-box; }
#lastWordsComposer .lw-label { display: block; text-align: left; margin: 0 0 16px; color: #ebd6aa; font-size: 18px; }
#lastWordsComposer .lw-recipient,
#lastWordsComposer textarea.lw-input { display: block; box-sizing: border-box; width: 100%; margin-top: 8px; padding: 12px; font: 20px/1.45 Georgia, serif; color: #f3e8d1; background: #130d09; border: 1px solid #846336; border-radius: 8px; }
#lastWordsComposer textarea.lw-input { resize: vertical; min-height: 116px; }
#lastWordsComposer .lw-count { text-align: right; font-size: 15px; }
#lastWordsComposer .lw-inspiration { margin-top: 16px; text-align: left; border-top: 1px solid #755c32; padding-top: 14px; }
#lastWordsComposer summary { cursor: pointer; color: #e8ca84; font-size: 17px; }
#lastWordsComposer .lw-inspiration p { color: #c8b99c; font-size: 16px; }
#lastWordsComposer .lw-sayings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
#lastWordsComposer button.lw-saying { white-space: normal; text-transform: none; letter-spacing: normal; text-align: left; font: 17px/1.4 Georgia,serif; padding: 11px; min-width: 0; background: #21170f; color: #efe0be; border: 1px solid #74572e; border-radius: 7px; }
#lastWordsComposer button.lw-saying:hover { background: #392715; border-color: #d1ac61; }
#lastWordsComposer .lw-more { margin-top: 12px; width: auto; }
#lastWordsComposer .lw-error { color: #ffb7ac; font-size: 17px; min-height: 1.4em; }
@media(max-width: 520px) { #lastWordsComposer .lw-sayings { grid-template-columns: 1fr; } }

.lw-input {
  flex: 1;
  min-width: 220px;
  padding: 11px 12px;
  border: 1px solid rgba(214, 168, 79, .3);
  border-radius: 5px;
  background: #0F0A06;
  color: #F2E6C8;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 16px;
  font-style: italic;
}
.lw-input:focus { outline: none; border-color: #C9A24A; }
.lw-input:disabled { opacity: .5; }

.lw-count {
  min-width: 66px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 10px;
  letter-spacing: .1em;
  color: #8A7B62;
}
.lw-count.is-over { color: #FF7A5C; }

.lw-send {
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #FFD9C0;
  background: linear-gradient(180deg, #5C1D0C, #371107);
  border: 1px solid #B33A1A;
  border-radius: 4px;
  padding: 11px 18px;
  cursor: pointer;
}
.lw-send:disabled { opacity: .35; cursor: not-allowed; }

.lw-left { margin: 11px 0 0; font-size: 13px; color: #8A7B62; }
.lw-left b { color: #C9A24A; }

@media (max-width: 640px) {
  .lw-words { width: min(330px, 86vw); }
  .lw-said { font-size: 23px; }
  .lw-who { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .lw-spark, .lw-discharging { animation: none; }
}

/* ================= V230 RAVEN'S QUIZ, RESTYLED =================
   The mechanic was fine; a bare radio list in a candlelit hall is what read as
   lame. Native radios are hidden, the whole row is the target — which also
   matters a great deal on a phone — and each choice gets a lettered plate. */

.raven-quiz-progress {
  margin: 0 0 14px;
  text-align: center;
  font-family: "Cinzel", Georgia, serif;
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8A7B62;
  transition: color .2s ease;
}
.raven-quiz-progress.is-complete { color: #C9A24A; }

.raven-quiz-question {
  margin: 0 0 16px;
  padding: 15px 15px 13px;
  border: 1px solid rgba(214, 168, 79, .22);
  border-radius: 10px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(255, 170, 90, .05), rgba(0, 0, 0, 0) 70%),
    linear-gradient(180deg, rgba(26, 18, 10, .82), rgba(12, 8, 5, .9));
}

.raven-quiz-question-title {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 12px;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 17px;
  line-height: 1.4;
  color: #F2E6C8;
}

/* The number is a struck coin rather than "1." in the running text. */
.raven-quiz-num {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214, 168, 79, .5);
  border-radius: 50%;
  background: linear-gradient(180deg, #3A2A16, #1A1209);
  color: #EFD79B;
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  line-height: 1;
}

.raven-quiz-choices { display: flex; flex-direction: column; gap: 7px; }

.raven-quiz-choice-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid rgba(214, 168, 79, .18);
  border-radius: 7px;
  background: rgba(0, 0, 0, .38);
  cursor: pointer;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 16px;
  color: #DCCFB2;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Hidden, not removed — the radio is still what the form reads and what a
   screen reader announces. */
.raven-quiz-choice-row input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.raven-quiz-letter {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214, 168, 79, .34);
  border-radius: 5px;
  background: rgba(0, 0, 0, .5);
  color: #A8946E;
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  line-height: 1;
  transition: all .14s ease;
}

.raven-quiz-choice-text { flex: 1; }

.raven-quiz-choice-row:hover {
  border-color: rgba(214, 168, 79, .55);
  background: rgba(214, 168, 79, .07);
  color: #F2E6C8;
}
.raven-quiz-choice-row:hover .raven-quiz-letter {
  border-color: rgba(214, 168, 79, .7);
  color: #EFD79B;
}

/* Chosen. Unmistakable at a glance, so nobody has to squint at a dot. */
.raven-quiz-choice-row:has(input:checked) {
  border-color: rgba(214, 168, 79, .85);
  background: linear-gradient(180deg, rgba(58, 42, 22, .9), rgba(30, 21, 11, .92));
  color: #FBF0D6;
  box-shadow: inset 0 0 22px rgba(214, 168, 79, .1);
}
.raven-quiz-choice-row:has(input:checked) .raven-quiz-letter {
  border-color: #C9A24A;
  background: linear-gradient(180deg, #6B4E1E, #3A2A16);
  color: #FFF4DA;
}

.raven-quiz-choice-row:focus-within {
  outline: 1px solid rgba(239, 215, 155, .7);
  outline-offset: 2px;
}

.raven-quiz-choice-row:has(input:disabled) { cursor: default; opacity: .72; }
.raven-quiz-choice-row:has(input:disabled):hover {
  border-color: rgba(214, 168, 79, .18);
  background: rgba(0, 0, 0, .38);
  color: #DCCFB2;
}

.raven-quiz-subtitle {
  text-align: center;
  font-style: italic;
  color: #8A7B62;
  margin: 0 0 4px;
}

#submitRavenQuizBtn { width: 100%; margin-top: 4px; }

@media (max-width: 480px) {
  .raven-quiz-question { padding: 13px 12px 11px; }
  .raven-quiz-question-title { font-size: 16px; }
  .raven-quiz-choice-row { font-size: 15px; padding: 12px 11px; }
}

/* ================= V231 MIND CHALLENGES =================
   Six games behind one shell, so they share a look instead of each having
   grown its own. Every panel that hosts one gets .mg-host. */

.mg-host { display: block; }
.mg-body { display: block; }
.mg-host.mg-ended [data-mg="body"] {
  opacity: .52;
  filter: saturate(.58);
  pointer-events: none;
  transition: opacity .22s ease, filter .22s ease;
}
.mg-host.mg-ended .mg-ask { color: #D8C99F; }

.mg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(214, 168, 79, .28);
}
.mg-title {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #EFD79B;
  font-weight: 400;
}
.mg-clock { font-family: "Cinzel", Georgia, serif; font-size: 22px; color: #C9A24A; }
.mg-clock.is-low { color: #FF7A5C; }
.mg-ask { width: 100%; margin: 5px 0 0; font-size: 15px; font-style: italic; color: #F2E6C8; }

.mg-msg { min-height: 24px; margin: 12px 0 0; font-size: 15px; font-style: italic; color: #8A7B62; }
.mg-msg.is-good { color: #7ADCA0; font-style: normal; }
.mg-msg.is-bad { color: #FF9E85; font-style: normal; }

.mg-score {
  margin: 8px 0 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  letter-spacing: .12em;
  color: #8A7B62;
}
.mg-score b { color: #EFD79B; }

.mg-go {
  margin-top: 15px;
  padding: 12px 20px;
  border: 1px solid #B33A1A;
  border-radius: 4px;
  background: linear-gradient(180deg, #5C1D0C, #371107);
  color: #FFD9C0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
}
.mg-go:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Odd Face ---- */
.mg-faces { display: grid; gap: 9px; justify-content: center; margin: 0 auto; }
.mg-face {
  position: relative;
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 1px solid rgba(214, 168, 79, .22);
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, #170F09, #0B0705);
  cursor: pointer;
  transition: border-color .12s ease;
}
.mg-face:hover { border-color: #C9A24A; }
.mg-face svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mg-face.is-right {
  border-color: #54B87A;
  box-shadow: 0 0 0 2px rgba(84, 184, 122, .5), 0 0 22px rgba(84, 184, 122, .35);
}
.mg-face.is-wrong { animation: mgShake .36s; }
@keyframes mgShake { 0%,100%{transform:none} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

/* ---- Failing Light ---- */
.mg-hall {
  position: relative;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 50% 100%, #241809, #0A0604 72%);
}
.mg-candle { position: absolute; width: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.mg-flame {
  display: block;
  width: 13px; height: 26px;
  margin: 0 auto;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(ellipse at 50% 78%, #FFF3D0, #FFC24A 42%, #FF7A1E 72%, rgba(255,90,20,0));
  box-shadow: 0 0 16px rgba(255,170,60,.85), 0 0 34px rgba(255,120,30,.45);
  animation: mgFlick 1.1s ease-in-out infinite alternate;
}
@keyframes mgFlick { from{transform:scaleY(1)} to{transform:scaleY(1.14) translateY(-2px)} }
.mg-stick {
  display: block;
  width: 8px; height: 52px;
  margin: 2px auto 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #E8DCC0, #8A7A58);
}
.mg-candle.is-out .mg-flame { opacity: 0; box-shadow: none; transition: opacity .1s linear; }
.mg-candle.is-hit .mg-stick { background: linear-gradient(180deg, #BFF0CD, #4E8A63); }
.mg-candle.is-miss .mg-stick { background: linear-gradient(180deg, #F0BFBF, #8A4E4E); }
.mg-candle.is-smoke::after {
  content: "";
  position: absolute;
  left: 50%; top: -4px;
  width: 5px; height: 22px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(200, 190, 175, .3);
  filter: blur(3px);
  animation: mgSmoke 1.1s ease-out forwards;
}
@keyframes mgSmoke {
  0%{opacity:.6;transform:translate(-50%,0) scale(.7)}
  100%{opacity:0;transform:translate(-50%,-30px) scale(1.5)}
}

/* ---- Lock ---- */
.mg-plate {
  padding: 20px 16px;
  border: 1px solid rgba(214, 168, 79, .3);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22,15,8,.92), rgba(11,7,4,.96));
  text-align: center;
}
.mg-relics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}
.mg-relic {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214, 168, 79, .22);
  border-radius: 6px;
  background: rgba(0, 0, 0, .42);
}
.mg-lock-symbol {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: brightness(1.12) contrast(1.06) drop-shadow(0 3px 6px rgba(0, 0, 0, .78));
}
.mg-relic .mg-lock-symbol { width: 84%; height: 84%; }
.mg-relic .mg-lock-symbol-raven { width: 92%; height: 92%; filter: brightness(1.35) contrast(1.08) drop-shadow(0 3px 6px rgba(0, 0, 0, .86)); }
.mg-relic .mg-lock-symbol-candle { width: 70%; height: 88%; }
.mg-relic .mg-lock-symbol-dagger { width: 60%; height: 88%; }

.mg-dials { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.mg-dial { text-align: center; }
.mg-dial-cap {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-bottom: 6px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 9.5px; letter-spacing: .14em; color: #8A7B62;
}
.mg-dial-cap .mg-lock-symbol { width: 28px; height: 28px; flex: 0 0 28px; }
.mg-dial-cap .mg-lock-symbol-raven { filter: brightness(1.45) contrast(1.08) drop-shadow(0 2px 4px rgba(0,0,0,.85)); }
.mg-lock-seal .mg-lock-symbol { width: 58px; height: 58px; margin: 0 auto 6px; }
.mg-dial-num {
  display: block;
  min-width: 64px;
  padding: 7px 0;
  border: 1px solid rgba(214, 168, 79, .3);
  border-radius: 6px;
  background: rgba(0, 0, 0, .5);
  font-family: "Cinzel", Georgia, serif;
  font-size: 30px;
  color: #EFD79B;
}
.mg-dial-arrows { display: flex; gap: 5px; justify-content: center; margin-top: 6px; }
.mg-dial-arrows button {
  width: 30px; height: 28px;
  border: 1px solid rgba(214, 168, 79, .3);
  border-radius: 4px;
  background: rgba(0, 0, 0, .45);
  color: #C7B48A;
  font-size: 15px; line-height: 1;
  cursor: pointer;
}
.mg-dial-arrows button:hover { border-color: #C9A24A; color: #EFD79B; }

/* ---- Cipher ---- */
.mg-scram {
  font-family: "Cinzel", Georgia, serif;
  font-size: 34px;
  letter-spacing: .24em;
  color: #EFD79B;
  text-shadow: 0 0 16px rgba(214, 168, 79, .45);
  line-height: 1.5;
}
.mg-hint { margin: 12px 0 0; min-height: 22px; font-size: 14px; font-style: italic; color: #8A7B62; }
.mg-hint b { color: #EFD79B; font-style: normal; letter-spacing: .18em; }
.mg-row { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.mg-input {
  min-width: 250px;
  padding: 12px 14px;
  border: 1px solid rgba(214, 168, 79, .3);
  border-radius: 5px;
  background: #0F0A06;
  color: #F2E6C8;
  font-family: "Cinzel", Georgia, serif;
  font-size: 17px;
  letter-spacing: .1em;
  text-align: center;
  text-transform: uppercase;
}
.mg-input:focus { outline: none; border-color: #C9A24A; }
.mg-row .mg-go { margin-top: 0; }

/* ---- Path ---- */
.mg-sky {
  position: relative;
  height: 320px;
  border-radius: 8px;
  overflow: hidden;
  cursor: none;
  /* Lit deliberately: the old board bottomed out near black and you could
     not see a gap until you were in it. */
  background: linear-gradient(180deg, #33202A 0%, #1A1014 62%, #0C0709 100%);
}
.mg-pillar {
  position: absolute;
  width: 46px;
  border: 1px solid rgba(214, 168, 79, .45);
  border-radius: 3px;
  background: linear-gradient(90deg, #4A3524, #2A1E12);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .55);
}
.mg-bird { position: absolute; left: 70px; width: 46px; height: 34px; pointer-events: none; }
.mg-bird svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 7px rgba(0,0,0,.7)); }
.mg-path-dagger {
  position: absolute;
  z-index: 3;
  width: 82px;
  height: 54px;
  pointer-events: none;
  filter:
    drop-shadow(0 0 5px rgba(255, 190, 86, .5))
    drop-shadow(8px 0 7px rgba(150, 22, 18, .42));
}
.mg-path-dagger img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* The artwork is drawn roughly 24 degrees downward toward the right. It
     enters from the right and moves left, so rotate it past the half-turn to
     level the blade: point leads left, ring handle and light trails follow. */
  transform: rotate(156deg) scale(1.06);
  transform-origin: center;
}
.mg-path-dagger.is-hit { opacity: 0; }
.mg-bump { position: absolute; inset: 0; background: rgba(255,60,30,.22); opacity: 0; pointer-events: none; }
.mg-bump.is-on { animation: mgBump .3s ease-out; }
@keyframes mgBump { 0%{opacity:1} 100%{opacity:0} }

/* ---- FirePants ---- */
.mg-arena {
  position: relative;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 80% at 50% 100%, #2A1206, #0A0503 74%);
}
.mg-fp { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); text-align: center; pointer-events: none; }
.mg-fp-body { display: block; font-size: 60px; line-height: 1; }
.mg-fp-says {
  display: block; max-width: 230px; margin-top: 4px;
  font-family: "Cinzel", Georgia, serif; font-size: 10px; letter-spacing: .1em; color: #FFC49A;
}
.mg-drop {
  position: absolute;
  z-index: 3;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  font-size: 25px;
  cursor: pointer;
  user-select: none;
  animation: mgDropIn .18s ease-out;
}
@keyframes mgDropIn { from{transform:scale(.6);opacity:0} to{transform:scale(1);opacity:1} }
.mg-drop.is-cold { border-color: rgba(120,190,255,.5); box-shadow: 0 0 16px rgba(90,170,255,.32); }
.mg-drop.is-hot { border-color: rgba(255,120,60,.5); box-shadow: 0 0 16px rgba(255,110,40,.32); }
.mg-drop.is-gone { pointer-events: none; animation: mgPop .22s ease-in forwards; }
@keyframes mgPop { to{transform:scale(1.5);opacity:0} }

.mg-heat { margin-top: 12px; }
.mg-heat-cap {
  display: flex; justify-content: space-between; margin-bottom: 5px;
  font-family: "Cinzel", Georgia, serif; font-size: 10px; letter-spacing: .16em; color: #8A7B62;
}
.mg-heat-cap b { color: #EFD79B; }
.mg-heat-bar {
  display: block; height: 12px;
  border: 1px solid rgba(214, 168, 79, .3);
  border-radius: 6px; overflow: hidden; background: #0C0805;
}
.mg-heat-fill { display: block; height: 100%; transition: width .28s ease, background .28s ease; }

@media (max-width: 520px) {
  .mg-scram { font-size: 25px; letter-spacing: .16em; }
  .mg-relics { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .mg-dial-num { min-width: 52px; font-size: 25px; }
  .mg-hall, .mg-sky, .mg-arena { height: 250px; }
}

@media (prefers-reduced-motion: reduce) {
  .mg-flame { animation: none; }
  .mg-face.is-wrong { animation: none; }
}

/* The two module-only challenges share one panel, since the module draws its
   own board and only needs a container around it. */
.raven-module-game-panel .mg-host { margin-bottom: 4px; }
.raven-module-game-panel .raven-special-standings { margin-top: 16px; }

/* Nine-seat standings need a visible, comfortably draggable scrollbar. */
.raven-special-standings {
  scrollbar-width: auto;
  scrollbar-color: #D6A84F rgba(0, 0, 0, .62);
}
.raven-special-standings::-webkit-scrollbar { width: 14px; }
.raven-special-standings::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, .62);
  border-radius: 8px;
}
.raven-special-standings::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 3px solid rgba(0, 0, 0, .62);
  border-radius: 8px;
  background: #D6A84F;
}

/* ================= V248 FIREPANTS IN THE PANEL =================
   His original artwork, aura and meltdown, now inside the shared challenge
   panel rather than a full-screen overlay. The existing .firepants-* rules do
   the heavy lifting; these only size him for the smaller arena and add the
   meltdown the panel version needs. */

.mg-arena { --firepants-heat: .8; }

.mg-fp-wrap {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: min(150px, 34%);
  transform: translateX(-50%);
  pointer-events: none;
  /* Droplets sit in front of the transparent character — you are throwing
     water at him, so the visual and the hit target now agree. */
  z-index: 1;
}
.mg-fp-wrap .firepants-character {
  display: block;
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 0 calc(6px + 18px * var(--firepants-heat)) rgba(255, 110, 30, calc(.3 + .5 * var(--firepants-heat))))
    saturate(calc(1 + .5 * var(--firepants-heat)));
  transition: filter .3s ease;
}

/* Near the top he is visibly struggling. */
.mg-arena.is-critical .firepants-character { animation: mgFpPanic .16s linear infinite alternate; }
@keyframes mgFpPanic {
  from { transform: translateX(-1.5px) rotate(-.6deg); }
  to   { transform: translateX(1.5px)  rotate(.6deg); }
}

/* Cooled down, he settles. */
.mg-arena.is-cooling .firepants-character { animation: none; }
.mg-arena.is-cooling .firepants-pants-flames { opacity: .35; }

/* And if the heat tops out, he goes up. */
.mg-arena.is-meltdown .firepants-character { animation: mgFpBoom .7s ease-out forwards; }
@keyframes mgFpBoom {
  0%   { transform: scale(1); filter: brightness(1); opacity: 1; }
  35%  { transform: scale(1.35); filter: brightness(3.5) saturate(2); opacity: 1; }
  100% { transform: scale(2.4); filter: brightness(6) blur(9px); opacity: 0; }
}
.mg-arena.is-meltdown::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 78%, rgba(255,220,150,.95), rgba(255,90,20,.5) 32%, rgba(0,0,0,0) 66%);
  animation: mgFpFlash .7s ease-out forwards;
  pointer-events: none;
}
@keyframes mgFpFlash { 0% { opacity: 1; } 100% { opacity: 0; } }

.mg-fp-says {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  max-width: 240px;
  text-align: center;
  font-family: "Cinzel", Georgia, serif;
  font-size: 10px;
  letter-spacing: .1em;
  color: #FFC49A;
  text-shadow: 0 1px 3px rgba(0,0,0,.9);
  pointer-events: none;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .mg-arena.is-critical .firepants-character,
  .mg-arena.is-meltdown .firepants-character { animation: none; }
}

/* ================= V250 HOW YOU WIN =================
   Quiet by design. A player who already knows should be able to look past it;
   a player who does not should find it without hunting. */

.mg-how-to-win {
  margin: 14px 0 0;
  padding: 11px 13px;
  border: 1px solid rgba(214, 168, 79, .22);
  border-left: 2px solid rgba(214, 168, 79, .55);
  border-radius: 7px;
  background: rgba(0, 0, 0, .3);
}

.mg-how-prize {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 0 4px;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 15px;
  color: #EFD79B;
}

.mg-how-rule {
  margin: 0;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.5;
  color: #9C8B6E;
}

@media (max-width: 480px) {
  .mg-how-to-win { padding: 10px 11px; }
  .mg-how-prize { font-size: 14px; }
  .mg-how-rule { font-size: 13px; }
}

/* ================= V251 THE THREE LOCKS =================
   One lock was over in seconds. Three give the round somewhere to go, and
   each is a different mechanism rather than more of the same counting. */

.mg-lock-stage { display: block; }

.mg-lock-name {
  margin: 0 0 3px;
  text-align: center;
  font-family: "Cinzel", Georgia, serif;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #EFD79B;
}

.mg-lock-hint {
  margin: 0 0 13px;
  text-align: center;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 14px;
  font-style: italic;
  color: #9C8B6E;
}

.mg-dials { position: relative; }

/* ================= V252 ELIMINATED FIGURES, READABLE =================
   They were dropping to .28 opacity at .55 brightness, which on a dark table
   read as almost nothing — you could not tell who had gone, only that a gap
   had appeared. Still unmistakably out, but now visible. */

.room-table .character-table-figure-seat.eliminated-character-figure .character-table-figure-image {
  opacity: .58 !important;
  filter:
    grayscale(.8)
    brightness(.78)
    drop-shadow(0 8px 10px rgba(0, 0, 0, .72)) !important;
}

.room-table .eliminated-human-figure .human-player-figure-image,
.eliminated-human-figure .human-player-figure-image {
  opacity: .62 !important;
  filter:
    grayscale(.76)
    brightness(.82)
    drop-shadow(0 12px 14px rgba(0, 0, 0, .88)) !important;
}

/* ================= V252 THE LOCKS LOOK DIFFERENT =================
   They were three identical plates with a changed title. Each mechanism now
   announces itself before you touch it. */

/* Lock 1 — plain brass. The teaching lock. */
.mg-lock-stage.is-lock1 .mg-dial-num { border-color: rgba(214, 168, 79, .34); }

/* Lock 2 — true combination sliders. Each bar is independent, so moving one
   can never silently alter another value. */
.mg-lock-stage.is-lock2 .mg-dials { align-items: stretch; gap: 18px; }
.mg-lock-slider {
  width: min(220px, 28%);
  min-width: 150px;
  padding: 12px 13px 14px;
  border: 1px solid rgba(255, 150, 90, .42);
  border-radius: 8px;
  background: rgba(34, 15, 8, .74);
  text-align: center;
}
.mg-lock-slider .mg-dial-cap { color: #FFB48A; }
.mg-slider-value {
  display: block;
  margin: 2px 0 9px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 30px;
  color: #FFD2B4;
}
.mg-lock-slider input[type="range"] {
  width: 100%;
  accent-color: #C45B2E;
  cursor: ew-resize;
}

/* Lock 3 — a sequence lock. The numbered badges make the chosen order fully
   visible and Clear lets the player retry without hidden linked state. */
.mg-lock-stage.is-lock3 .mg-dials { gap: 20px; }
.mg-lock-seal {
  position: relative;
  width: 104px;
  min-height: 94px;
  padding: 13px 10px 10px;
  border: 1px solid rgba(150, 190, 220, .48);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(39, 58, 72, .82), rgba(8, 13, 17, .96));
  color: #DCEBF5;
  cursor: pointer;
  box-shadow: inset 0 0 18px rgba(120, 170, 210, .1);
}
.mg-lock-seal svg { display: block; width: 34px; height: 34px; margin: 0 auto 4px; }
.mg-lock-seal span {
  display: block;
  font-family: "Cinzel", Georgia, serif;
  font-size: 9px;
  letter-spacing: .12em;
}
.mg-lock-seal.is-chosen {
  border-color: #7ADCA0;
  color: #D9FFE7;
  box-shadow: 0 0 18px rgba(82, 190, 125, .28), inset 0 0 20px rgba(82, 190, 125, .14);
}
.mg-lock-seal.is-chosen::after {
  content: attr(data-order);
  position: absolute;
  top: -7px;
  right: -2px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #7ADCA0;
  border-radius: 50%;
  background: #10251A;
  color: #D9FFE7;
  font-family: "Cinzel", Georgia, serif;
  font-size: 13px;
}
.mg-lock-clear {
  display: block;
  margin: 10px auto 0;
  padding: 7px 14px;
  border: 1px solid rgba(150, 190, 220, .35);
  border-radius: 5px;
  background: rgba(8, 13, 17, .8);
  color: #A8C4D8;
  font-family: "Cinzel", Georgia, serif;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 560px) {
  .mg-lock-slider { width: 100%; }
  .mg-lock-seal { width: 86px; min-height: 80px; }
}

/* ================= V264 THE RAVEN'S SEALED LETTER =================
   Every living player gets one when somebody is recruited. It is a hard stop:
   nobody leaves this screen until they have opened theirs, which is precisely
   why everyone receives one. */

.raven-letter-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(60, 20, 10, .55), rgba(0, 0, 0, 0) 70%),
    rgba(3, 2, 2, .96);
  backdrop-filter: blur(3px);
}
.raven-letter-overlay.hidden { display: none; }

.raven-letter-card {
  width: min(600px, 100%);
  box-sizing: border-box;
  flex-shrink: 0;
  padding: 30px 26px 26px;
  text-align: center;
  border: 1px solid rgba(214, 168, 79, .4);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(30, 21, 12, .97), rgba(14, 9, 6, .98));
  box-shadow: 0 26px 70px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .8);
}

/* ---- sealed ---- */
.raven-letter-seal {
  display: block;
  width: 100%;
  padding: 0 8px 16px;
  margin: 8px 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.raven-letter-seal:hover {
  background: rgba(214,168,79,.035);
}
.raven-letter-seal:focus-visible { outline: 2px solid #EFD79B; outline-offset: 5px; }
.raven-letter-seal:disabled { cursor: wait; opacity: 1; }
.raven-letter-art {
  display: block;
  position: relative;
  width: min(420px, 100%, 52svh);
  aspect-ratio: 1;
  margin: 0 auto 8px;
  perspective: 900px;
  filter: drop-shadow(0 18px 22px rgba(0,0,0,.65));
}
.raven-letter-half {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.raven-letter-half-left {
  clip-path: polygon(0 0, 50% 0, 50% 32%, 48% 38%, 52% 44%, 49% 50%, 50% 58%, 50% 100%, 0 100%);
  transform-origin: 8% 40%;
}
.raven-letter-half-right {
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%, 50% 58%, 49% 50%, 52% 44%, 48% 38%, 50% 32%);
  transform-origin: 92% 40%;
}
.is-breaking .raven-letter-half-left { animation: raven-letter-break-left .85s ease-in forwards; }
.is-breaking .raven-letter-half-right { animation: raven-letter-break-right .85s ease-in forwards; }
.is-breaking .raven-letter-open-text { opacity: .35; }
@keyframes raven-letter-break-left {
  20% { transform: translateX(-3px) rotate(-2deg); }
  100% { transform: translate(-45px, 16px) rotateY(-38deg) rotate(-9deg); opacity: 0; }
}
@keyframes raven-letter-break-right {
  20% { transform: translateX(3px) rotate(2deg); }
  100% { transform: translate(45px, 16px) rotateY(38deg) rotate(9deg); opacity: 0; }
}

.raven-letter-open-text {
  font-family: "Cinzel", Georgia, serif;
  font-size: 16px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #EFD79B;
}

/* ---- opened ---- */
.raven-letter-contents.hidden,
.raven-letter-sealed.hidden,
.raven-letter-waiting.hidden { display: none; }

#ravenLetterHeading {
  margin: 14px 0 10px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 25px;
  letter-spacing: .06em;
  color: #EFD79B;
  text-shadow: 0 0 18px rgba(214, 168, 79, .35);
}

.raven-letter-body {
  margin: 0 0 18px;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  color: #E4D9C0;
}

.raven-letter-privacy {
  margin: 12px 0 0;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 16px;
  font-style: italic;
  color: #C7B797;
}

.raven-letter-overlay.is-letter-open .raven-letter-card {
  background: radial-gradient(ellipse at 50% 25%, #e7d7b0, #c1a575);
  border: 1px solid #9c7847;
  box-shadow: 0 25px 80px #000, inset 0 0 38px rgba(83,48,16,.3);
  color: #392817;
}
.raven-letter-overlay.is-letter-open .small-label { color: #5e432a; }
.raven-letter-overlay.is-letter-open #ravenLetterHeading { color: #392817; text-shadow: none; }
.raven-letter-overlay.is-letter-open .raven-letter-body { color: #392817; font-size: 20px; }
.raven-letter-overlay.is-letter-open .raven-letter-privacy { color: #5e432a; }
.raven-letter-contents:not(.hidden) { animation: raven-letter-read .3s ease-out; }
@keyframes raven-letter-read { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .raven-letter-half, .raven-letter-contents:not(.hidden) { animation: none !important; }
}
@media (max-height: 520px) {
  .raven-letter-overlay { align-items: flex-start; }
}

#ravenLetterDoneBtn {
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  border: 1px solid #B33A1A;
  border-radius: 6px;
  background: linear-gradient(180deg, #5C1D0C, #371107);
  color: #FFD9C0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}

#ravenLetterDoneBtn:disabled {
  cursor: wait;
  opacity: .72;
  filter: saturate(.7);
}

.raven-letter-waiting {
  margin: 18px 0 0;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 15px;
  font-style: italic;
  color: #C9A24A;
}

@media (max-width: 480px) {
  .raven-letter-card { padding: 24px 18px 20px; }
  #ravenLetterHeading { font-size: 21px; }
  .raven-letter-body { font-size: 16px; }
}

/* ================= V265 SPOKEN WORDS ON THE TABLE =================
   A narrow column down the speaker's body. Two words to a line is about
   102px against 108px of stage per seat, so it lives inside its own figure
   and can never reach a neighbour. Three words would be 145px and overlap. */

.tod-speech-layer {
  position: absolute;
  inset: 0;
  z-index: 34;
  pointer-events: none;
  overflow: visible;
}

.tod-speech {
  position: absolute;
  width: 104px;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 15px;
  line-height: 1.5;
  color: #F7ECD2;
  /* No panel — the words sit on the scene, which suits the candlelight and
     keeps the artwork visible behind them. The shadow does the legibility. */
  text-shadow:
    0 0 7px rgba(0, 0, 0, 1),
    0 0 16px rgba(0, 0, 0, .95),
    0 1px 2px rgba(0, 0, 0, 1);
}

.tod-speech-who {
  display: block;
  margin-bottom: 3px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--speech-ink, #C9A24A);
  opacity: .88;
}

/* The Raven speaks in the table's warm ritual gold. This applies to both his
   name and spoken words, while the heavier glow keeps them readable over his
   black feathers and gold-trimmed clothing. */
.tod-speech.is-raven {
  color: #F3CF73;
  font-weight: 600;
  text-shadow:
    0 0 5px rgba(255, 190, 58, .68),
    0 0 10px rgba(0, 0, 0, 1),
    0 0 18px rgba(0, 0, 0, 1),
    0 1px 2px #000;
}

.tod-speech.is-raven .tod-speech-who {
  display: none;
}

/* The Raven retains his dedicated gold rather than sharing the red recency
   signal used for human and Character Player speech. */
.tod-speech.is-raven i {
  animation: todSpeechLine .34s ease-out forwards;
  color: #F3CF73;
}

/* Human speech shares the narrow, unboxed Character columns and descends
   over the back of each figure, including the player using this screen. */
.tod-speech.is-human .tod-speech-who {
  color: #FFE19A;
  opacity: 1;
  text-shadow: 0 1px 2px #000, 0 0 8px #000;
}

/* Defeat older global/browser input themes so typed words and the caret are
   always visible inside the small figure-mounted composer. */
.tod-speak-banner .tod-speak-input,
.tod-speak-banner .tod-speak-input:focus {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  box-sizing: border-box !important;
  color: #FFF1CF !important;
  -webkit-text-fill-color: #FFF1CF !important;
  caret-color: #FFD56A !important;
  opacity: 1 !important;
}

.tod-speak-banner .tod-speak-send {
  flex: 0 0 70px !important;
  width: 70px !important;
  min-width: 70px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Hints are shared table guidance now, not a balloon spoken by the host or
   attached to a player's body. Dock them above Table Tools where every seat
   gets the same important, predictable location. */
#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  margin: 0 0 12px !important;
  z-index: 12 !important;
}

#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked::before,
#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked::after {
  display: none !important;
}

#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked.is-min {
  width: 100% !important;
  text-align: center;
}

#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked .rc-head {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  color: #FFE09A;
}

#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked .rc-text {
  font-size: 20px;
  line-height: 1.42;
  font-weight: 600;
  border-left-width: 3px;
}

.raven-hintbox .rc-action {
  display: none;
}

.raven-hintbox.is-min .rc-action { display: none !important; }

#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked .rc-action.is-visible {
  display: block;
  width: 100%;
  margin: 12px 0 4px;
  padding: 12px 10px;
  border: 2px solid #FF7055;
  border-radius: 8px;
  background: linear-gradient(180deg, #B91F32, #740D1B);
  color: #FFF3D4;
  font-family: "Cinzel", Georgia, serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(190, 30, 42, .38);
  cursor: pointer;
}

/* V284: the floating Host Command duplicated Table Guidance and the controls
   already present in each phase. Host identity badges are identity again. */
#gameRoomPanel #hostCommandBanner,
#gameRoomPanel .host-command-banner {
  display: none !important;
}

.raven-hintbox .rc-phase-alert {
  display: none;
}

#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked.phase-alert-active .rc-phase-alert {
  display: block;
  margin: 4px 0 12px;
  padding: 13px 10px;
  border: 2px solid #E9B94F;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(112, 20, 13, .97), rgba(48, 7, 5, .98));
  color: #FFF0B7;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(20px, 1.55vw, 28px);
  line-height: 1.12;
  letter-spacing: .055em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 2px #000, 0 0 12px rgba(255, 194, 60, .48);
  animation: todPhaseAnnouncement .9s ease-in-out 11;
}

#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked.phase-alert-urgent .rc-phase-alert {
  border-color: #FF6A50;
  background: linear-gradient(180deg, #861D13, #3B0806);
}

#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked.phase-alert-countdown .rc-phase-alert {
  border-color: #FFD36B;
  color: #FFF5D4;
}

@keyframes todPhaseAnnouncement {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.42); transform: scale(1.018); }
}

.next-phase-display {
  grid-column: 1 / -1;
  display: block;
  margin-top: 2px;
  color: #BBA77A;
  font-family: "Cinzel", Georgia, serif;
  font-size: 9px;
  letter-spacing: .1em;
  text-align: right;
  text-transform: uppercase;
}

.game-status-row > div.phase-twenty-second-warning {
  border-color: rgba(255, 203, 82, .95) !important;
  animation: todPhaseCardWarning 1s ease-in-out infinite;
}

@keyframes todPhaseCardWarning {
  0%, 100% { box-shadow: 0 0 0 1px rgba(214, 168, 79, .18), 0 0 8px rgba(214, 168, 79, .12); }
  50% { box-shadow: 0 0 0 2px rgba(255, 211, 106, .62), 0 0 24px rgba(228, 165, 40, .6); }
}

#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked.needs-attention {
  animation: todHintAttention 1.15s ease-out 2;
}

@keyframes todHintAttention {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), 0 0 22px rgba(214, 168, 79, .22), 0 12px 32px rgba(0, 0, 0, .8); }
  48% { box-shadow: 0 0 0 2px rgba(255, 211, 112, .9), 0 0 34px rgba(238, 174, 53, .72), 0 12px 32px rgba(0, 0, 0, .85); }
}

@media (prefers-reduced-motion: reduce) {
  #gameRoomPanel .raven-side-panel .raven-hintbox.is-docked.needs-attention { animation: none; }
  #gameRoomPanel .raven-side-panel .raven-hintbox.is-docked.phase-alert-active .rc-phase-alert,
  .game-status-row > div.phase-twenty-second-warning { animation: none; }
}

/* Lines arrive one at a time, in the direction the speech travels. */
.tod-speech i {
  display: block;
  font-style: normal;
  opacity: 0;
  animation:
    todSpeechLine .34s ease-out forwards,
    todSpeechAge 28s ease-out forwards;
}
@keyframes todSpeechAge {
  0%   { color: #FF4D45; text-shadow: 0 0 8px rgba(255, 38, 28, .8), 0 0 15px #000; }
  22%  { color: #E9857D; text-shadow: 0 0 5px rgba(170, 35, 28, .45), 0 0 14px #000; }
  100% { color: #F3D5CE; text-shadow: 0 0 7px #000, 0 0 16px #000; }
}
@keyframes todSpeechLine {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: none; }
}
.tod-speech.is-up i { animation-name: todSpeechLineUp, todSpeechAge; }
@keyframes todSpeechLineUp {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

/* Speech from the middle Character Players crosses the red soul globe. Give
   those lines a warm ivory/gold age instead of red so the words stay distinct
   from the artwork while retaining the same clear "just spoken" cue. */
.tod-speech.is-center-character i {
  animation:
    todSpeechLine .34s ease-out forwards,
    todCenterSpeechAge 28s ease-out forwards;
}
.tod-speech.is-center-character.is-up i {
  animation-name: todSpeechLineUp, todCenterSpeechAge;
}
@keyframes todCenterSpeechAge {
  0%   { color: #FFE08A; text-shadow: 0 0 7px rgba(255, 193, 54, .72), 0 0 14px #000, 0 2px 2px #000; }
  24%  { color: #F3DCA4; text-shadow: 0 0 5px rgba(190, 139, 38, .4), 0 0 14px #000, 0 2px 2px #000; }
  100% { color: #F5E9D0; text-shadow: 0 0 7px #000, 0 0 16px #000, 0 2px 2px #000; }
}

/* Local human speech often crosses a dark, patterned foreground cloak. Keep
   the red arrival signal, then brighten quickly toward warm ivory with a firm
   black edge so every word survives both black cloth and gold embroidery. */
.tod-speech.is-human i {
  -webkit-text-stroke: 0 transparent;
  animation:
    todSpeechLine .34s ease-out forwards,
    todLocalHumanSpeechAge 28s ease-out forwards;
}
@keyframes todLocalHumanSpeechAge {
  0% {
    color: #FF938A;
    text-shadow: 0 0 6px rgba(255, 48, 38, .75), 0 1px 2px #000,
                 0 0 12px #000;
  }
  20% {
    color: #FFE0D5;
    text-shadow: 0 1px 2px #000, 0 0 12px #000;
  }
  100% {
    color: #FFF4E4;
    text-shadow: 0 1px 2px #000, 0 0 14px #000;
  }
}

/* Held fully readable, then faded — decay you notice rather than decay you
   have to squint through. */
.tod-speech.is-fading { animation: todSpeechFade var(--speech-fade, 12s) linear forwards; }
@keyframes todSpeechFade { from { opacity: 1; } to { opacity: 0; } }

.tod-speech.is-replaced { animation: todSpeechOut .2s ease-in forwards; }
@keyframes todSpeechOut { to { opacity: 0; } }

/* The only clickable part, and only when there is genuinely more to read. */
.tod-speech-more {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 9px;
  border: 1px solid rgba(214, 168, 79, .5);
  border-radius: 9px;
  background: rgba(0, 0, 0, .6);
  color: #EFD79B;
  font-family: "Cinzel", Georgia, serif;
  font-size: 13px;
  line-height: 1.1;
  cursor: pointer;
  pointer-events: auto;
  transition: border-color .15s ease, background .15s ease;
}
.tod-speech-more:hover {
  border-color: #EFD79B;
  background: rgba(214, 168, 79, .22);
}

.tod-speech-more[hidden] { display: none; }

.tod-speech.is-reading > i,
.tod-speech.is-reading > .tod-speech-who,
.tod-speech.is-reading > .tod-speech-more { visibility: hidden; }
.tod-speech-readout {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  padding: 13px 16px 15px;
  overflow: auto;
  pointer-events: auto;
  border: 1px solid rgba(200, 170, 118, .55);
  border-radius: 13px;
  background: linear-gradient(155deg, #30231d, #171215 82%);
  color: #f5e7d2;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .65);
  text-align: left;
  overflow-wrap: anywhere;
}
.tod-speech-readout .tod-readout-name {
  display: block;
  margin-right: 25px;
  color: var(--speech-ink, #e7cb93);
  font: 600 12px/1.35 "Cinzel", Georgia, serif;
}
.tod-speech-readout p {
  margin: 5px 0 0;
  color: inherit;
  font: 18px/1.32 "EB Garamond", Georgia, serif;
  white-space: pre-line;
}
.tod-speech-readout .tod-readout-close {
  position: absolute;
  top: 2px;
  right: 3px;
  width: 32px;
  min-width: 0;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #e9d8b6;
  font: 21px/1 Georgia, serif;
  cursor: pointer;
}
.tod-readout-close:focus-visible, .tod-speech-more:focus-visible {
  outline: 2px solid #e6c78d;
  outline-offset: 1px;
}

/* The figure already has a nameplate. Preserve the short neck-to-nameplate
   space for words, including on a phone with a small back-view figure. */
.tod-speech.is-human .tod-speech-who { display: none; }
.tod-speech.is-human.is-compact-excerpt .tod-speech-more {
  position: absolute;
  left: 100%;
  bottom: 0;
  margin: 0;
  width: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  padding: 1px 0;
}

/* ---- the trip back ---- */

.table-of-deception-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.table-of-deception-head h3 { margin: 0; }

.back-to-table-btn {
  padding: 7px 13px;
  border: 1px solid rgba(214, 168, 79, .4);
  border-radius: 5px;
  background: rgba(0, 0, 0, .45);
  color: #C7B48A;
  font-family: "Cinzel", Georgia, serif;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.back-to-table-btn:hover { border-color: #C9A24A; color: #EFD79B; }

/* Landing on the right line matters more than getting to the log. */
.table-of-deception-message.is-highlighted,
.table-of-deception-raven-message.is-highlighted {
  animation: todFoundIt 2.6s ease-out;
  border-radius: 7px;
}
@keyframes todFoundIt {
  0%   { background: rgba(214, 168, 79, .3); box-shadow: 0 0 0 2px rgba(214, 168, 79, .55); }
  70%  { background: rgba(214, 168, 79, .12); box-shadow: 0 0 0 2px rgba(214, 168, 79, .2); }
  100% { background: rgba(214, 168, 79, 0); box-shadow: 0 0 0 2px rgba(214, 168, 79, 0); }
}

@media (max-width: 640px) {
  /* Nine columns will not fit a phone. Smaller type, narrower column. */
  .tod-speech { width: 84px; font-size: 13px; }
  .tod-speech-who { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .tod-speech i { animation: none; opacity: 1; }
}

/* ================= V352 THE WHISPERER'S INK =================
   The table and quill are dark now, so her own violet voice can return. Keep
   the words directly on the scene like every other Character: no panel, no
   blur, just a precise black edge behind the purple ink. */
.tod-speech.is-whisperer {
  padding: 0;
  border-radius: 0;
  background: none;
  filter: none;
  color: #E3B2FF;
  text-shadow:
    -1px 0 0 #000,
    1px 0 0 #000,
    0 -1px 0 #000,
    0 1px 0 #000;
}

.tod-speech.is-whisperer .tod-speech-who {
  color: #C56CF0;
  font-weight: 600;
  -webkit-text-stroke: 0 transparent;
  text-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 1px 0 #000;
}

.tod-speech.is-whisperer i {
  font-weight: 400;
  -webkit-text-stroke: 0 transparent;
  animation:
    todSpeechLine .34s ease-out forwards,
    todWhispererSpeechAge 28s ease-out forwards;
}

@keyframes todWhispererSpeechAge {
  0% {
    color: #C85CFF;
    text-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000;
  }
  24% {
    color: #D99AF7;
    text-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000;
  }
  100% {
    color: #E8D4EF;
    text-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000;
  }
}

/* ================= V267 THE RAVEN AT THE TABLE =================
   He squats in front of the table facing the players, so he sits above the
   tabletop but below the speech — legibility beats depth when the words are
   the whole point of the layer. */

.raven-table-figure-seat {
  position: absolute;
  left: 50%;
  bottom: 0;
  /* His art is 832 x 896, so the aspect is held rather than guessed. */
  width: min(300px, 26%);
  aspect-ratio: 832 / 896;
  transform: translateX(-50%);
  z-index: 12;
  pointer-events: none;
}

.raven-table-figure-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .85));
}

/* Missing art should leave a gap, not a broken frame in the middle of a
   candlelit hall. */
.raven-table-figure-seat.is-missing { display: none; }

/* Speech sits above him. When the middle characters speak, their words fall
   across him rather than behind him — hidden text is worse than broken depth. */
.tod-speech-layer { z-index: 34; }

@media (max-width: 640px) {
  .raven-table-figure-seat { width: min(180px, 34%); }
}

@media (prefers-reduced-motion: reduce) {
  .raven-table-figure-image { filter: none; }
}

/* ================= V272 THE SPEAKING BAR =================
   v269 tried an SVG arch with the input absolutely positioned inside it. The
   path and the field never agreed on where anything was and it read as a
   broken widget. A plain bar with a curved top edge carries the same idea and
   is unmistakably a place you can type — which matters more, on the one
   control used every single round.

   It sits at the neck of your own figure, so it reads as your voice rather
   than a toolbar that happens to be nearby. */

.tod-speak-banner {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(300px, 44%);
  padding: 7px 8px 7px 12px;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: auto;
  /* Bowed along the top, flatter underneath — a banner rather than a box. */
  border: 1px solid rgba(214, 168, 79, .55);
  border-radius: 22px 22px 9px 9px;
  background: linear-gradient(180deg, rgba(40, 28, 16, .97), rgba(15, 10, 6, .98));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .8);
}
.tod-speak-banner.hidden { display: none; }
.tod-speak-banner:focus-within { border-color: rgba(239, 215, 155, .95); }

.tod-speak-input {
  flex: 1;
  min-width: 0;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: #F2E6C8;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 15px;
  font-style: italic;
}
.tod-speak-input::placeholder { color: #8A7B62; }
.tod-speak-input:focus { outline: none; }

.tod-speak-send {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid rgba(214, 168, 79, .5);
  border-radius: 14px;
  background: linear-gradient(180deg, #5C1D0C, #371107);
  color: #FFD9C0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.tod-speak-send:hover { border-color: #EFD79B; }

@media (max-width: 640px) {
  .tod-speak-banner { width: min(240px, 62%); padding: 6px 7px 6px 10px; }
  .tod-speak-input { font-size: 14px; }
  .tod-speak-send { padding: 5px 9px; font-size: 9px; }
}


/* ================= V272 FIGURE FURNITURE, REPOSITIONED =================
   With the near figures lowered and grown, the name badge was floating well
   above a head it no longer belonged to. It reads better low on the back,
   where a name tag would actually sit. */

.human-player-stage .human-player-figure-identity {
  top: auto !important;
  bottom: 16% !important;
  transform: translate(-50%, 0) !important;
}

/* The Raven was too small against the bigger figures — he is the largest
   presence at this table and should look it. */
.raven-table-figure-seat {
  width: min(430px, 36%);
  bottom: -4%;
}

@media (max-width: 640px) {
  .raven-table-figure-seat { width: min(230px, 44%); }
}

/* ================= V275 GROUNDED TABLE + STABLE SPEECH ANCHORS =================
   The figure order is no longer used as seating data; app.js owns the stable
   coordinates. These final rules ground the physical scene and keep the local
   composer compact at the player's neck until they begin typing. */

.tod-speak-banner {
  width: min(var(--tod-speak-width, 176px), 44%) !important;
  min-width: 0 !important;
  transform: translate(-50%, -50%) !important;
  transition: width .18s ease, left .18s ease, top .18s ease,
              border-color .18s ease, box-shadow .18s ease !important;
}

.tod-speak-banner:not(.is-composing) .tod-speak-input {
  width: 34px;
}

.tod-speak-banner.is-composing {
  box-shadow: 0 8px 22px rgba(0, 0, 0, .8), 0 0 14px rgba(214, 168, 79, .13);
}

.raven-hintbox.points-right::before,
.raven-hintbox.points-right::after {
  left: auto;
  right: -9px;
  border-right-color: transparent;
  border-left: 10px solid rgba(214, 168, 79, .72);
}

.raven-hintbox.points-right::after {
  right: -7.5px;
  border-left-color: #241A0E;
}

.raven-table-figure-seat::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 16%;
  right: 16%;
  bottom: 1.5%;
  height: 7%;
  border-radius: 50%;
  background: rgba(0, 0, 0, .72);
  filter: blur(7px);
}

@media (min-width: 901px) {
  #gameRoomPanel img.table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {
    top: 60% !important;
    transform: translate(-50%, -50%) scale(.90) !important;
  }

  #gameRoomPanel .raven-table-figure-seat,
  #gameRoomPanel.deceived-layout-v3 .raven-table-figure-seat {
    bottom: -11% !important;
  }

  #gameRoomPanel .room-table.has-human-figures,
  #gameRoomPanel.deceived-layout-v3 .room-table.has-human-figures {
    margin-bottom: 148px !important;
  }

  #gameRoomPanel .room-table::before,
  #gameRoomPanel.deceived-layout-v3 .room-table::before {
    top: 40.8% !important;
  }

  #gameRoomPanel .room-table::after,
  #gameRoomPanel.deceived-layout-v3 .room-table::after {
    top: 55.8% !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-toggle-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-toggle-btn {
    left: 25.3% !important;
    top: 43.7% !important;
    width: 10% !important;
    height: 9.2% !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-compose-btn,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-compose-btn {
    left: 77.4% !important;
    top: 37.5% !important;
    width: 10.5% !important;
    height: 18% !important;
  }

  #gameRoomPanel .room-table > #secretMessagesDock .secret-message-pick-prompt,
  #gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock .secret-message-pick-prompt {
    left: 76% !important;
    top: 22% !important;
  }
}

@media (min-width: 651px) and (max-width: 900px) {
  #gameRoomPanel img.table-of-deception-artwork,
  #gameRoomPanel.deceived-layout-v3 img.table-of-deception-artwork {
    top: 53% !important;
  }

  #gameRoomPanel .raven-table-figure-seat,
  #gameRoomPanel.deceived-layout-v3 .raven-table-figure-seat {
    bottom: -5% !important;
  }
}

@media (max-width: 640px) {
  .tod-speak-banner {
    width: min(var(--tod-speak-width, 176px), 64%) !important;
  }
}

/* ================= V290 CLEAR THE FOREGROUND CLOAK =================
   The human figure intentionally overflows below the table. Keep the compact
   recruitment preference in normal document flow, but reserve enough space
   that it begins below the cloak instead of underneath its transparent PNG. */
#gameRoomPanel .table-side-panel > .raven-preference-panel.raven-preference-compact,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > .raven-preference-panel.raven-preference-compact {
  position: relative !important;
  z-index: 40 !important;
  margin-top: 72px !important;
}

#gameRoomPanel .table-side-panel > .raven-preference-panel.raven-preference-expanded,
#gameRoomPanel.deceived-layout-v3 .table-side-panel > .raven-preference-panel.raven-preference-expanded {
  margin-top: 72px !important;
}

/* ================= V304 FULL CHALLENGE STANDINGS =================
   The old inner scrollbar made a nine-player contest look like only one
   person had finished. Results now expand naturally and use two columns on
   wider screens so the whole table can be read at once. */
.raven-special-standings,
.raven-quiz-standings,
.raven-memory-standings,
.raven-path-standings,
.firepants-standings {
  max-height: none !important;
  overflow: visible !important;
  scrollbar-width: none !important;
}

.raven-special-standings,
.raven-quiz-standings,
.raven-memory-standings,
.raven-path-standings,
.firepants-standings,
[data-mg-standings] {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
}

.raven-special-standings > h4,
.raven-special-standings > p,
.raven-special-standings > button,
.raven-special-standings > [data-mg-standings],
.raven-quiz-standings > h4,
.raven-quiz-standings > p,
.raven-quiz-standings > button,
.raven-memory-standings > h4,
.raven-memory-standings > p,
.raven-memory-standings > button,
.raven-path-standings > h4,
.raven-path-standings > p,
.raven-path-standings > button,
.firepants-standings > h4,
.firepants-standings > p,
.firepants-standings > button {
  grid-column: 1 / -1;
}

.raven-special-standings::-webkit-scrollbar,
.raven-quiz-standings::-webkit-scrollbar,
.raven-memory-standings::-webkit-scrollbar,
.raven-path-standings::-webkit-scrollbar,
.firepants-standings::-webkit-scrollbar {
  display: none !important;
}

.raven-special-standing-row,
.raven-quiz-standing-row,
.raven-memory-standing-row,
.raven-path-standing-row {
  width: 100% !important;
  min-width: 0;
  margin-top: 0 !important;
}

@media (max-width: 700px) {
  .raven-special-standings,
  .raven-quiz-standings,
  .raven-memory-standings,
  .raven-path-standings,
  .firepants-standings,
  [data-mg-standings] {
    grid-template-columns: minmax(0, 1fr);
  }
  .raven-special-standing-row,
  .raven-quiz-standing-row,
  .raven-memory-standing-row,
  .raven-path-standing-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
  }
  .raven-special-standing-row > span,
  .raven-quiz-standing-row > span,
  .raven-memory-standing-row > span,
  .raven-path-standing-row > span {
    min-width: 0;
    word-break: normal !important;
    overflow-wrap: anywhere;
  }
  .raven-special-standing-row > strong,
  .raven-quiz-standing-row > strong,
  .raven-memory-standing-row > strong,
  .raven-path-standing-row > strong { text-align: left !important; }
}

/* ================= EARLY PLAYER NAME ENTRY V1 ================= */

.landing-name-entry {
  width: min(100%, 440px);
  margin: 20px auto 4px;
}

.landing-name-entry label {
  margin: 0 0 7px;
  color: #d6a84f;
  text-align: center;
  font-family: Cinzel, Georgia, serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.landing-name-entry input {
  margin: 0;
  padding: 13px 15px;
  border-color: rgba(214, 168, 79, 0.52);
  background: rgba(0, 0, 0, 0.72);
  color: #efe8df;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.5);
}

.landing-name-entry input:focus {
  border-color: rgba(214, 168, 79, 0.92);
  outline: none;
  box-shadow:
    0 0 0 3px rgba(214, 168, 79, 0.12),
    inset 0 0 18px rgba(0, 0, 0, 0.5);
}

.landing-name-entry input[aria-invalid="true"] {
  border-color: #c84a55;
}

.landing-name-entry input::placeholder {
  color: rgba(239, 232, 223, 0.48);
}

.landing-name-error {
  min-height: 1.15em;
  margin: 5px 0 0;
  color: #ef9aa1;
  font-size: 0.82rem;
  line-height: 1.25;
}

/* ================= COMPACT GAME SETUP GUIDE V1 ================= */

.game-mode-quick-guide {
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid rgba(214, 168, 79, 0.24);
  border-radius: 10px;
  background: rgba(214, 168, 79, 0.06);
  color: #d7cfc8;
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.3;
}

.game-mode-quick-guide p {
  margin: 4px 0;
}

.game-mode-quick-guide strong {
  color: #efe8df;
}

.game-mode-quick-guide b {
  color: #d6a84f;
}

.game-mode-short-description {
  color: #efe8df;
  font-size: 0.86rem;
  line-height: 1.3;
}

@media (max-width: 520px) {
  .game-mode-quick-guide {
    padding: 8px 9px;
    font-size: 0.78rem;
  }
}

/* ================= CLEAR CIPHER RESULTS + REPUTATION NOTICE V1 ================= */

.raven-cipher-standing-name {
  min-width: 0;
}

.raven-cipher-standing-result {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
  text-align: right;
}

.raven-cipher-standing-result small {
  color: rgba(244, 234, 211, 0.76);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: normal;
}

#gameRoomPanel .table-side-panel > .reputation-change-banner {
  position: relative !important;
  z-index: 1000 !important;
  isolation: isolate;
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.04),
    0 8px 34px rgba(0, 0, 0, 0.82) !important;
}

/* During the vote/reveal the page can be scrolled far below this banner's
   normal location. Keep the current reputation result fully inside the
   viewport, above the enlarged parchment, so both can be read together. */
body:has(.raven-ledger.is-vote-focus:not(.is-hidden)) #reputationChangeBanner:not(.hidden) {
  position: fixed !important;
  top: max(14px, env(safe-area-inset-top)) !important;
  left: 50% !important;
  translate: -50% 0;
  width: min(760px, calc(100vw - 28px)) !important;
  margin: 0 !important;
  padding: 10px 16px !important;
  z-index: 1100 !important;
}

body:has(.raven-ledger.is-vote-focus:not(.is-hidden)) #reputationChangeBanner .reputation-change-main {
  margin: 4px 0 5px;
}

@media (max-width: 640px) {
  body:has(.raven-ledger.is-vote-focus:not(.is-hidden)) #reputationChangeBanner:not(.hidden) {
    top: max(8px, env(safe-area-inset-top)) !important;
    width: calc(100vw - 16px) !important;
    padding: 8px 10px !important;
  }
}

@media (max-width: 700px) {
  .raven-cipher-standing-result small {
    font-size: 0.66rem;
  }
}

/* ================= RAVEN PATH FAIR FLIGHT V1 ================= */

.raven-path-panel .mg-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.raven-path-panel .mg-clock {
  font-size: 1.65rem;
  font-weight: 800;
}

.raven-path-panel .mg-ask,
.raven-path-panel .mg-msg {
  font-size: 1.08rem;
  line-height: 1.4;
}

.raven-path-panel .mg-score {
  font-size: 0.95rem;
  line-height: 1.35;
}

.raven-path-panel .raven-special-standings > h4,
.raven-path-panel .raven-path-standings > h4 {
  font-size: 1.2rem;
}

.raven-path-panel .raven-special-standing-row,
.raven-path-panel .raven-path-standing-row {
  padding: 11px 12px !important;
  font-size: 1rem;
  line-height: 1.3;
}

.raven-path-panel .mg-how-prize {
  font-size: 1.08rem;
}

.raven-path-panel .mg-how-rule {
  color: #d5c7aa;
  font-size: 1rem;
  line-height: 1.45;
}

.raven-path-panel > .raven-path-subtitle,
.raven-path-panel > .hint {
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

.mg-path-strike-rule {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 122, 92, 0.62);
  border-radius: 8px;
  background: rgba(95, 18, 18, 0.34);
  color: #ffd7ca;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.mg-path-strike-rule [data-mg="strikes"] {
  flex: 0 0 auto;
  color: #efd79b;
  font-weight: 800;
}

.mg-path-strike-rule [data-mg="strikes"].is-danger {
  color: #ff8d78;
  text-shadow: 0 0 12px rgba(255, 70, 52, 0.55);
}

.final-game-actions {
  width: min(100%, 620px);
  margin: 24px auto 4px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(214, 168, 79, .48);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 168, 79, .14), transparent 68%),
    rgba(5, 2, 3, .76);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, .5);
}

.final-play-again-btn {
  width: min(100%, 420px);
  min-height: 58px;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.final-game-actions p {
  margin: 10px 0 0;
  color: #bcae94;
  font-size: .88rem;
}

@media (max-width: 600px) {
  .mg-path-strike-rule {
    flex-direction: column;
    align-items: center;
    font-size: 0.82rem;
    text-align: center;
  }
}

/* ================= DIGITAL CHALLENGE READY UP V1 ================= */

.challenge-ready-up {
  width: min(100%, 860px);
  margin: 16px auto 10px;
  padding: 16px;
  border: 1px solid rgba(214, 168, 79, 0.68);
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 0%, rgba(160, 100, 24, 0.18), transparent 56%),
    rgba(8, 5, 6, 0.94);
  box-shadow: inset 0 0 24px rgba(214, 168, 79, 0.06), 0 14px 34px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 20;
  text-align: left;
}

.challenge-ready-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: #f0ce78;
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.challenge-ready-heading span {
  font-size: 1.25rem;
  font-weight: 850;
  text-shadow: 0 0 14px rgba(240, 184, 70, 0.35);
}

.challenge-ready-heading strong {
  font-size: 0.82rem;
  color: #f6ead0;
}

.challenge-ready-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.challenge-ready-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid rgba(139, 104, 57, 0.55);
  border-radius: 8px;
  background: rgba(40, 24, 18, 0.56);
  color: #eee5dc;
}

.challenge-ready-player span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-ready-player strong {
  flex: 0 0 auto;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.challenge-ready-player.is-ready {
  border-color: rgba(64, 214, 134, 0.74);
  background: rgba(10, 84, 49, 0.34);
}

.challenge-ready-player.is-ready strong,
.challenge-ready-self-confirmed {
  color: #70f0ad;
}

.challenge-ready-player.is-waiting strong {
  color: #ff9a81;
}

.challenge-ready-characters {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-left: 3px solid rgba(214, 168, 79, 0.7);
  color: #cbbd9e;
  font-size: 0.84rem;
}

.challenge-ready-self-btn,
.challenge-ready-begin-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border-radius: 9px;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.challenge-ready-self-btn {
  border: 1px solid #6db9ed;
  background: linear-gradient(180deg, #245b87, #0c2849);
  color: #f4fbff;
  box-shadow: 0 0 18px rgba(78, 164, 224, 0.2);
}

.challenge-ready-begin-btn {
  border: 1px solid #f0c55f;
  background: linear-gradient(180deg, #b51931, #730719);
  color: #fff4e4;
  box-shadow: 0 0 18px rgba(185, 25, 48, 0.24);
}

.challenge-ready-begin-btn:disabled {
  cursor: not-allowed;
  opacity: 0.54;
  filter: grayscale(0.25);
  box-shadow: none;
}

.challenge-ready-self-confirmed {
  margin-top: 11px;
  text-align: center;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.challenge-ready-note {
  margin: 10px 0 0;
  color: #d6cab4;
  font-size: 0.86rem;
  line-height: 1.4;
  text-align: center;
}

.challenge-sat-out-card {
  width: min(100%, 760px);
  margin: 18px auto;
  padding: 20px;
  border: 1px solid rgba(224, 97, 76, 0.76);
  border-radius: 13px;
  background: rgba(66, 13, 15, 0.82);
  color: #f6e7dc;
  text-align: center;
  box-shadow: 0 0 26px rgba(150, 22, 34, 0.22);
}

.challenge-sat-out-card h4 {
  margin: 0 0 8px;
  color: #ff9d82;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.challenge-sat-out-card p {
  margin: 6px 0;
  line-height: 1.45;
}

@media (max-width: 620px) {
  .challenge-ready-up {
    padding: 13px;
  }

  .challenge-ready-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .challenge-ready-list {
    grid-template-columns: 1fr;
  }
}


/* ================= V316 PHASE-CARD HOST CONTROL =================
   Host identity is identity only. The one optional phase action now lives
   beside the phase it changes, then becomes Begin Voting after a settled
   Same-Room challenge. */
.game-phase-status-card {
  overflow: visible !important;
}

#gameRoomPanel .phase-card-host-control {
  grid-column: 1 / -1;
  width: 100%;
  margin: 8px 0 0;
  padding: 8px 0 0;
  border: 0 !important;
  border-top: 1px solid rgba(214, 168, 79, .25) !important;
  background: transparent !important;
  box-shadow: none;
  animation: none !important;
  box-sizing: border-box;
}

#gameRoomPanel.deceived-layout-v3 > .game-status-row {
  position: relative !important;
  z-index: 900 !important;
  pointer-events: auto !important;
}

#gameRoomPanel .phase-card-host-control::before {
  content: none !important;
  display: none !important;
}

#gameRoomPanel .phase-card-host-control.hidden {
  display: none !important;
}

#gameRoomPanel .phase-card-host-control-text {
  margin: 0 0 6px;
  color: #c9a65c;
  font-family: "Cinzel", Georgia, serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

#gameRoomPanel .phase-card-host-control-button {
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(226, 183, 84, .78) !important;
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(122, 25, 37, .98), rgba(54, 7, 14, .99)) !important;
  color: #fff0c2;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(.62rem, .76vw, .72rem);
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.15;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 196, .10),
    0 4px 12px rgba(0, 0, 0, .42);
  animation: none !important;
}

#gameRoomPanel .phase-card-host-control-button::before {
  content: none !important;
  display: none !important;
}

#gameRoomPanel .phase-card-host-control-button:hover:not(:disabled),
#gameRoomPanel .phase-card-host-control-button:focus-visible {
  border-color: #ffe08a;
  filter: brightness(1.14);
}

#gameRoomPanel .phase-card-host-control.is-ready-for-voting {
  border-top-color: rgba(238, 194, 91, .48);
}

#gameRoomPanel .phase-card-host-control.is-ready-for-voting .phase-card-host-control-text {
  color: #f0d383;
}

#gameRoomPanel .phase-card-host-control.is-ready-for-voting .phase-card-host-control-button {
  background:
    linear-gradient(180deg, rgba(151, 84, 18, .98), rgba(75, 34, 6, .99)) !important;
  animation: v316PhaseActionReady 1.8s ease-in-out infinite !important;
}

@keyframes v316PhaseActionReady {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 242, 196, .10), 0 4px 12px rgba(0, 0, 0, .42), 0 0 0 rgba(225, 172, 59, 0); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 242, 196, .16), 0 4px 12px rgba(0, 0, 0, .46), 0 0 15px rgba(225, 172, 59, .25); }
}

/* The host name no longer behaves like an undisclosed command menu. */
.human-player-figure-identity.host-command-shortcut {
  cursor: default !important;
}

@media (max-width: 979px) {
  #gameRoomPanel .game-status-row:has(.phase-card-host-control:not(.hidden)) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #gameRoomPanel .game-status-row > .game-phase-status-card:has(.phase-card-host-control:not(.hidden)) {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #gameRoomPanel .phase-card-host-control.is-ready-for-voting .phase-card-host-control-button {
    animation: none;
  }
}

/* ================= V320 INTERACTION + SETTLED NOTICES ================= */

/* Once the result has had two full minutes on stage, keep the record without
   continuing to cover the table or voting parchment. */
#gameRoomPanel .reputation-change-banner.reputation-change-settled {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;
  translate: none !important;
  width: min(100%, 680px) !important;
  margin: 6px auto 10px !important;
  padding: 7px 12px !important;
  border-width: 1px !important;
  border-radius: 10px !important;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, .025), 0 4px 14px rgba(0, 0, 0, .5) !important;
}

#gameRoomPanel .reputation-change-banner.reputation-change-settled .reputation-change-kicker,
#gameRoomPanel .reputation-change-banner.reputation-change-settled > p {
  display: none;
}

#gameRoomPanel .reputation-change-banner.reputation-change-settled .reputation-change-main {
  margin: 0;
  gap: 8px;
}

#gameRoomPanel .reputation-change-banner.reputation-change-settled .reputation-change-main strong,
#gameRoomPanel .reputation-change-banner.reputation-change-settled .reputation-change-main span {
  font-size: .82rem;
  line-height: 1.2;
}

/* These controls must own their entire painted rectangles. Older broad button
   rules and overlapping table layers could otherwise leave only a narrow edge
   receiving clicks. */
#gameRoomPanel .phase-card-host-control {
  position: relative !important;
  z-index: 100 !important;
  isolation: isolate;
  pointer-events: auto !important;
}

#gameRoomPanel .phase-card-host-control-button {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  box-sizing: border-box !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}

#gameRoomPanel .raven-side-panel .raven-hintbox.is-docked .rc-next {
  z-index: 5 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
}

body:has(.raven-ledger.is-vote-focus:not(.is-hidden))
  #reputationChangeBanner.reputation-change-settled {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 10px !important;
  padding: 10px 14px !important;
  z-index: 20 !important;
  transform: none !important;
}

/* Full-screen challenges own the viewport. The table's high-z-index status
   controls must not paint above a challenge in another stacking context. */
#gameRoomPanel .game-layout:has(:is(.raven-quiz-panel, .raven-memory-panel,
  .raven-special-challenge-panel, .raven-cipher-panel, .raven-lock-panel):not(.hidden, .hidden *, [hidden], [hidden] *)) {
  /* z-index: 1 trapped every challenge below the clock/brand/status siblings,
     regardless of how large the challenge's own z-index was. */
  z-index: auto !important;
}

body:has(:is(.raven-quiz-panel, .raven-memory-panel, .raven-special-challenge-panel,
  .raven-cipher-panel, .raven-lock-panel):not(.hidden, .hidden *, [hidden], [hidden] *)) #gameRoomPanel > .game-status-row {
  visibility: hidden;
  pointer-events: none !important;
}

:is(.raven-quiz-panel, .raven-memory-panel, .raven-special-challenge-panel,
  .raven-cipher-panel, .raven-lock-panel):not(.hidden) {
  width: auto !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
}

:is(.raven-quiz-panel, .raven-memory-panel, .raven-special-challenge-panel,
  .raven-cipher-panel, .raven-lock-panel):not(.hidden) > * {
  width: min(920px, 100%) !important;
  max-width: 100% !important;
  min-width: 0;
  flex-shrink: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .raven-ledger-book.is-last-words-page {
    width: calc(100vw - 24px);
    height: calc(100dvh - 110px);
  }
  .raven-ledger-lastwords-page { padding: 26px 22px 45px; }
}

/* Keep Boiling Point's intentional console size above the older shared-arena
   defaults that load later in this long-lived stylesheet. */
.mg-arena.mg-boiling-point {
  height: 330px;
  background:
    radial-gradient(circle at 18% 84%, rgba(255, 86, 15, calc(.08 + var(--firepants-heat) * .34)), transparent 34%),
    linear-gradient(145deg, #170904, #080403 66%, #160805);
}
@media (max-width: 640px) {
  .mg-arena.mg-boiling-point { height: 455px; }
}
/* ================= RAVEN'S PLACEMENT V4 — ONE CONNECTED OPENING ================= */

.ravens-placement-progress {
  width: min(670px, 92%);
  margin: 15px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.ravens-placement-progress-mark {
  min-width: 0;
  padding: 7px 8px 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(214, 168, 79, .22);
  border-radius: 999px;
  color: rgba(239, 232, 223, .44);
  background: rgba(0, 0, 0, .28);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.ravens-placement-progress-mark b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: .72rem;
}

.ravens-placement-progress-mark em {
  overflow: hidden;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .68rem;
  text-overflow: ellipsis;
}

.ravens-placement-progress-mark.current {
  color: #f2d18a;
  border-color: rgba(214, 168, 79, .78);
  background: linear-gradient(180deg, rgba(104, 65, 20, .42), rgba(8, 7, 9, .58));
  box-shadow: 0 0 20px rgba(214, 168, 79, .12);
}

.ravens-placement-progress-mark.complete {
  color: rgba(112, 218, 167, .82);
  border-color: rgba(78, 199, 141, .34);
}

.ravens-placement-influence strong {
  color: #f2d18a;
  font-weight: 600;
}

.raven-placement-record-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(7px);
}

.raven-placement-record-overlay.hidden {
  display: none !important;
}

.raven-placement-record-card {
  width: min(680px, 96vw);
  max-height: 92vh;
  overflow: auto;
  box-sizing: border-box;
  padding: clamp(25px, 5vw, 48px);
  border: 1px solid rgba(214, 168, 79, .72);
  border-radius: 22px;
  color: #efe8df;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 168, 79, .12), transparent 34%),
    linear-gradient(180deg, rgba(23, 15, 16, .98), rgba(3, 3, 5, .99));
  box-shadow: 0 32px 100px rgba(0, 0, 0, .92), inset 0 0 45px rgba(214, 168, 79, .05);
}

.raven-placement-record-kicker {
  color: rgba(214, 168, 79, .72);
  letter-spacing: .28em;
  font-size: .72rem;
}

.raven-placement-record-card h2 {
  margin: 8px 0;
  color: #d6a84f;
  font-family: Cinzel, Georgia, serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.raven-placement-record-intro {
  margin: 0 auto 22px;
  max-width: 520px;
  color: rgba(239, 232, 223, .72);
  font-style: italic;
  line-height: 1.45;
}

.raven-placement-record-list {
  display: grid;
  gap: 9px;
  margin-bottom: 22px;
}

.raven-placement-record-row {
  display: grid;
  grid-template-columns: 34px 90px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(214, 168, 79, .25);
  border-radius: 10px;
  background: rgba(0, 0, 0, .32);
  text-align: left;
}

.raven-placement-record-number {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214, 168, 79, .5);
  border-radius: 50%;
  color: #d6a84f;
  font-size: .75rem;
}

.raven-placement-record-label {
  color: rgba(214, 168, 79, .68);
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .72rem;
}

.raven-placement-record-row strong {
  color: #efe8df;
  font-weight: 500;
  text-transform: capitalize;
}

.raven-placement-reminder-btn {
  border-color: rgba(214, 168, 79, .58) !important;
  color: #f2d18a !important;
  background: linear-gradient(180deg, rgba(74, 45, 18, .9), rgba(12, 8, 8, .96)) !important;
}

@media (max-width: 620px) {
  .ravens-placement-progress {
    gap: 5px;
  }

  .ravens-placement-progress-mark {
    grid-template-columns: 1fr;
    justify-items: center;
    border-radius: 12px;
    padding: 6px 3px;
  }

  .ravens-placement-progress-mark em {
    font-size: .56rem;
    letter-spacing: .04em;
  }

  .raven-placement-record-row {
    grid-template-columns: 30px 1fr;
  }

  .raven-placement-record-row strong {
    grid-column: 2;
  }
}
.challenge-result-controls {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #8c713f;
  border-radius: 12px;
  background: #18120e;
  color: #f4e5c7;
  text-align: center;
}
.challenge-result-controls p { margin: 0 0 12px; }
.challenge-result-controls p:last-child { margin: 12px 0 0; }
.challenge-result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.challenge-result-actions button { width: auto; margin: 0; min-height: 44px; }
.challenge-result-actions button[hidden] { display: none; }
.challenge-result-controls [data-result-code] { color: #efc97e; letter-spacing: .1em; white-space: nowrap; }
.room-recovery-panel { margin: 24px auto 0; max-width: 440px; }
.room-recovery-panel button { width: 100%; }
.room-recovery-panel .hint { margin-top: 10px; }
.challenge-library-group.has-available { scroll-margin-top: 20px; }

/* Read the outcome, the share, and the next action together. */
.final-money-pot-box, .final-reputation-celebration {
  container-type: inline-size;
}
.final-money-pot-amount, .final-reputation-money {
  /* Size to the result card, including when it occupies a narrow table column. */
  font-size: clamp(1.35rem, 13cqi, 4.5rem);
  line-height: 1.1;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}
.final-money-celebration-card { padding: clamp(18px, 3vh, 32px) !important; }
.final-money-celebration-card h2 { font-size: clamp(1.4rem, 3vw, 2.3rem) !important; }
.final-prize-unit { font-size: .8rem; letter-spacing: .12em; }
#eliminationPresentationWait { color: #f0d59c; text-align: center; }

/* Last Words: one scrollable reading area between the timer and Send. */
.tod-speak-banner { transition: width .18s ease, border-color .18s ease, box-shadow .18s ease !important; }
/* Keep unread mail visible inside the envelope's shaped click target. */
#gameRoomPanel .room-table > #secretMessagesDock #secretUnreadCount,
#gameRoomPanel.deceived-layout-v3 .room-table > #secretMessagesDock #secretUnreadCount { top: 20% !important; right: 12% !important; }
#lastWordsOverlay .last-words-card { width: min(760px, 96vw) !important; max-height: calc(100dvh - 20px) !important; }
#lastWordsOverlay .last-words-card > :not(#lastWordsMarkBoard) { flex-shrink: 0; }
#lastWordsOverlay #lastWordsMarkBoard { flex: 1 1 auto; min-height: 0; overflow-y: auto !important; overflow-x: hidden !important; overscroll-behavior: contain; touch-action: pan-y; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
#lastWordsOverlay #lastWordsMarkBoard > * { flex-shrink: 0; }
#lastWordsComposer { overflow: visible; }
#lastWordsComposer select.lw-category { display: block; width: 100%; margin-top: 6px; padding: 10px; font: 17px Georgia, serif; color: #f3e8d1; background: #130d09; border: 1px solid #846336; border-radius: 8px; }
#lastWordsComposer .lw-inspiration { scroll-margin-top: 12px; }
#lastWordsComposer button.lw-saying:focus-visible { outline: 2px solid #f0c15c; outline-offset: -3px; }
#lastWordsOverlay #submitLastWordsBtn { margin: 10px auto 0 !important; width: min(100%, 450px); }
@media (max-height: 600px) {
  #lastWordsOverlay .last-words-intro { display: none; }
  #lastWordsOverlay .last-words-card h2 { font-size: 1.25rem !important; }
  #lastWordsOverlay .last-words-timer-row { margin: 4px auto 6px !important; }
}

/* Live review: keep the tracking board visible before any cards move. */
#deceiversTruthOverlay .deceivers-truth-game {
  padding: 12px 16px 20px;
  overflow-anchor: none;
  scroll-behavior: auto;
}
#deceiversTruthOverlay .deceivers-truth-game-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 44px 6px 0;
}
#deceiversTruthOverlay .deceivers-truth-game-header h2 {
  font-size: clamp(1.1rem, 2.8vw, 1.9rem);
  margin: 2px 0;
}
#deceiversTruthOverlay .deceivers-truth-game-header p { font-size: .9rem; }
#deceiversTruthOverlay .deceivers-truth-status-card { padding: 6px 10px; }
#deceiversTruthOverlay .deceivers-truth-status-card strong { font-size: .95rem; margin: 2px 0; }
#deceiversTruthOverlay .deceivers-truth-raven-line {
  min-height: 2.8em;
  margin: 6px 0;
  padding: 6px 10px;
  font-size: .95rem;
  line-height: 1.25;
}
#deceiversTruthOverlay .deceivers-truth-board {
  width: min(100%, 1120px, calc((100dvh - 245px) * 2.15385));
  margin: 0 auto 8px;
  scroll-margin-block: 6px;
}
#deceiversTruthCanvas { width: 100%; height: auto; max-height: none; }
#deceiversTruthOverlay .deceivers-truth-actions-top {
  margin: 6px auto 10px !important;
  padding: 6px !important;
  gap: 6px;
}
#deceiversTruthOverlay .deceivers-truth-actions button { padding: 9px 12px; margin: 0; }
#secretMessageWordCount { margin: 3px 0; }
#secretMessageValidation { min-height: 1.4em; margin: 3px 0 8px; color: #f1cf7a; }
#secretMessageInput[aria-invalid="true"] { border-color: #ed8d85; }
.room-recovery-panel summary { cursor: pointer; padding: 10px; color: #f1cf7a; }
#roomCodeRecoveryForm { padding: 8px 12px; }
#roomCodeRecoveryInput { text-transform: uppercase; }
@media (max-width: 600px) {
  #deceiversTruthOverlay .deceivers-truth-game { padding: 10px 8px 16px; }
  #deceiversTruthOverlay .deceivers-truth-game-header { gap: 6px; margin-right: 40px; }
  #deceiversTruthOverlay .deceivers-truth-status-card { padding: 5px; }
  #deceiversTruthOverlay .deceivers-truth-status-card strong { display: none; }
  #deceiversTruthOverlay .deceivers-truth-game-header p { font-size: .8rem; }
}

/* One bounded scroll surface for challenge play, waiting, and results. A
   min-height-only fixed flex panel can grow beyond Safari's visual viewport;
   nested standings then trap swipes below an unreachable lower edge. */
:is(.raven-quiz-panel, .raven-memory-panel, .raven-special-challenge-panel,
  .raven-cipher-panel, .raven-lock-panel, .raven-path-panel):not(.hidden) {
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: 100dvh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-bottom: max(28px, env(safe-area-inset-bottom)) !important;
}
:is(.raven-quiz-panel, .raven-memory-panel, .raven-special-challenge-panel,
  .raven-cipher-panel, .raven-lock-panel, .raven-path-panel):not(.hidden)
  :is(.raven-quiz-standings, .raven-memory-standings, .raven-special-standings, .raven-path-standings) {
  max-height: none !important;
  overflow: visible !important;
  flex: 0 0 auto;
  touch-action: pan-y;
}
@media (max-width: 650px) {
  /* Human figures sit nearer the viewer than the far-side Characters.
     Preserve that scale on phones, including every real player's seat. */
  #gameRoomPanel .human-player-figure-seat,
  #gameRoomPanel.deceived-layout-v3 .human-player-figure-seat {
    transform: translateX(-50%) scale(1.08) !important;
    transform-origin: center bottom !important;
  }
  /* The near-side figures extend below the table. overflow-x:hidden on this
     ancestor also creates a vertical scroller and clips their feet/composer. */
  #gameRoomPanel.deceived-layout-v3 .game-layout {
    overflow: visible !important;
  }
}

/* Keep the phone composer at the player's shoulders without shrinking its
   typing area and touch controls to match the surrounding artwork. The stage
   bound leaves room for the existing anchor's six-pixel edge inset. Include
   fractional viewport widths below the tablet layout's 651px boundary. */
@media (max-width: 650.98px) {
  .tod-speak-banner {
    width: min(max(var(--tod-speak-width, 176px), 240px), calc(100% - 12px)) !important;
    box-sizing: border-box;
    padding: 6px;
  }

  .tod-speak-banner .tod-speak-input,
  .tod-speak-banner .tod-speak-input:focus {
    min-height: 44px;
    padding: 8px !important;
    font-size: 16px;
    line-height: 1.25;
  }

  .tod-speak-banner .tod-speak-send {
    flex-basis: 80px !important;
    width: 80px !important;
    min-width: 80px !important;
    min-height: 44px;
    padding: 8px 6px;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: .04em;
    touch-action: manipulation;
  }
}

/* Phones keep a fixed conversation panel. Desktop retains the original
   mouth-to-chest speech and the complete transcript further down the page. */
.table-conversation-controls { display: none; }
body.table-conversation-open #tableOfDeceptionPanel:not(.hidden) {
  position: fixed !important;
  z-index: 80 !important;
  left: var(--table-conversation-center, 50%) !important;
  right: auto !important;
  bottom: 14px !important;
  transform: translateX(-50%) !important;
  width: min(780px, calc(100% - 36px)) !important;
  height: clamp(310px, 43vh, 400px);
  max-height: calc(100dvh - 32px);
  margin: 0 !important;
  padding: 13px 17px 14px !important;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(193, 153, 102, .48) !important;
  border-radius: 20px 20px 15px 15px !important;
  background: linear-gradient(155deg, rgba(49, 27, 30, .98), rgba(20, 21, 27, .98)) !important;
  box-shadow: 0 14px 45px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 226, 183, .1);
}
body.table-conversation-open #tableOfDeceptionPanel.conversation-expanded {
  height: min(680px, calc(100dvh - 32px));
}
body.table-conversation-open #tableOfDeceptionPanel .table-of-deception-head { gap: 6px 14px; flex: 0 0 auto; }
body.table-conversation-open #tableOfDeceptionPanel .table-of-deception-head h3 {
  font-size: 14px; color: #e5c994; letter-spacing: .07em;
}
body.table-conversation-open #backToTableBtn,
body.table-conversation-open #tableOfDeceptionHint,
body.table-conversation-open .tod-speak-banner,
body.table-conversation-open .tod-speech-layer { display: none !important; }
body.table-conversation-open .table-conversation-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#tableConversationSpeaker { font: italic 14px/1.2 "EB Garamond", Georgia, serif; color: #e4d3bc; }
.table-conversation-controls button {
  width: auto !important; min-height: 30px; margin: 0 !important; padding: 5px 11px !important;
  border: 1px solid rgba(200, 174, 132, .38); border-radius: 12px;
  color: #f3e4cd; background: linear-gradient(#3c5061, #26313f); box-shadow: inset 0 1px 0 #ffffff10;
  font: 12px/1.2 Georgia, serif; letter-spacing: .015em;
}
.table-conversation-controls button[hidden] { display: none !important; }
body.table-conversation-open #tableOfDeceptionMessages {
  flex: 1 1 auto; min-height: 0; max-height: none !important; height: auto !important;
  margin: 0 !important; padding: 2px 8px 2px 0 !important; overflow-y: auto !important;
  overscroll-behavior: contain; scrollbar-color: #756047 #241d20; scrollbar-width: thin;
  background: transparent !important; border: 0 !important;
}
body.table-conversation-open #tableOfDeceptionMessages .table-of-deception-message {
  margin: 0 0 7px !important; padding: 8px 12px !important;
  border: 1px solid rgba(186, 157, 118, .16) !important; border-radius: 12px !important;
  background: rgba(11, 9, 12, .32) !important;
}
body.table-conversation-open #tableOfDeceptionMessages .tod-current-remark {
  background: linear-gradient(105deg, rgba(126, 84, 42, .24), rgba(73, 43, 43, .3)) !important;
  border-color: rgba(212, 172, 105, .52) !important;
}
body.table-conversation-open #tableOfDeceptionMessages .table-of-deception-name { margin-bottom: 3px; font-size: 13px; }
body.table-conversation-open #tableOfDeceptionMessages .table-of-deception-text { font: 16px/1.35 "EB Garamond", Georgia, serif; color: #f2e6d7; }
body.table-conversation-open #tableOfDeceptionInputRow { flex: 0 0 auto; margin: 0 !important; gap: 8px; }
body.table-conversation-open #tableOfDeceptionInput {
  min-height: 40px; margin: 0 !important; padding: 8px 12px; border-radius: 12px;
  border: 1px solid #b4946559; background: #120f14; color: #f5e9d7; font-size: 16px;
}
body.table-conversation-open #addressTableBtn { margin: 0 !important; border-radius: 12px; min-height: 40px; padding: 8px 16px; }
.tod-is-speaking .character-table-figure-image,
.tod-is-speaking .human-player-figure-image,
.tod-is-speaking > img {
  filter: drop-shadow(0 0 9px rgba(238, 188, 105, .68)) drop-shadow(0 0 24px rgba(191, 113, 60, .3)) !important;
}
.tod-is-speaking .character-table-figure-label,
.tod-is-speaking .human-player-figure-identity {
  color: #ffe4ad !important; text-shadow: 0 0 9px #bd7b3b, 0 2px 4px #000;
}
@media (max-width: 650px) {
  /* Leave a scrollable landing space above the fixed conversation. Enlarged
     foreground players and their controls must remain reachable on phones. */
  body.table-conversation-open #gameRoomPanel {
    padding-bottom: calc(clamp(265px, 40dvh, 360px) + max(8px, env(safe-area-inset-bottom)) + 18px) !important;
  }
  body.table-conversation-open #tableOfDeceptionPanel:not(.hidden) {
    width: calc(100% - 16px) !important; bottom: max(8px, env(safe-area-inset-bottom)) !important;
    height: clamp(265px, 40dvh, 360px); padding: 11px !important; border-radius: 17px;
  }
  body.table-conversation-open #tableOfDeceptionPanel.conversation-expanded { height: calc(100dvh - 24px); }
  body.table-conversation-open #tableOfDeceptionPanel .table-of-deception-head h3 { display: none; }
  body.table-conversation-open .table-conversation-controls { width: 100%; justify-content: space-between; }
  .table-conversation-controls button { min-height: 38px; }
  body.table-conversation-open #tableOfDeceptionInputRow { display: flex; }
  body.table-conversation-open #tableOfDeceptionInput { min-width: 0; flex: 1; width: 0; min-height: 44px; }
  body.table-conversation-open #addressTableBtn { width: auto; flex: 0 0 90px; min-height: 44px; font-size: 12px; }

  body.table-decision-conversation #gameRoomPanel {
    padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  }
  body.table-decision-conversation #tableOfDeceptionPanel:not(.hidden):not(.conversation-expanded) {
    height: auto;
    padding: 5px 9px !important;
  }
  body.table-decision-conversation #tableOfDeceptionPanel:not(.conversation-expanded) :is(
    #tableOfDeceptionMessages, #tableOfDeceptionInputRow, #tableConversationSpeaker,
    #tableConversationLatest, #tableConversationLastWords
  ) { display: none !important; }
  body.table-decision-conversation #tableConversationExpand {
    min-height: 44px;
    margin-inline: auto !important;
  }
}

/* Restore each desktop Character's own ink. Keep the original line reveal,
   angled columns, word limit, ellipsis, and final fade rather than letting the
   shared red ageing animation paint every Character's voice the same color. */
@media (min-width: 651px) {
  .tod-speech:not(.is-human):not(.is-raven):not(.is-whisperer) i {
    color: var(--speech-ink, #F7ECD2);
    animation: todSpeechLine .34s ease-out forwards;
    text-shadow: 0 0 7px #000, 0 0 16px #000, 0 1px 2px #000;
  }
  .tod-speech.is-up:not(.is-human):not(.is-raven):not(.is-whisperer) i {
    animation-name: todSpeechLineUp;
  }
}
@media (min-width: 651px) and (prefers-reduced-motion: reduce) {
  .tod-speech:not(.is-human):not(.is-raven):not(.is-whisperer) i {
    animation: none;
    opacity: 1;
  }
}

/* Illustrated Memory cards: the same cast and warm materials as the table. */
#ravenMemoryGrid.raven-memory-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin: 16px auto !important; width: min(640px, 100%) !important;
}
.raven-memory-grid .raven-memory-card {
  position: relative; isolation: isolate; overflow: hidden;
  width: 100%; aspect-ratio: 1 / 1.12; min-height: 110px;
  margin: 0 !important; padding: 0 !important; border-radius: 14px;
  border: 1px solid rgba(192, 150, 91, .6);
  background: radial-gradient(ellipse at 50% 30%, #5b3a3e, #281b24 65%, #16141c);
  box-shadow: inset 0 0 0 4px #130e1766, inset 0 0 22px #0007, 0 5px 12px #0005;
  color: #f0dfc3; cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s;
}
.raven-memory-grid .raven-memory-card::after {
  content: ""; position: absolute; inset: 5px; border: 1px solid #cfaa6d5c;
  border-radius: 10px; pointer-events: none;
}
.raven-memory-grid .raven-memory-card:hover:not(:disabled) { transform: translateY(-2px); border-color: #e1ba7b; box-shadow: 0 5px 16px #0008, 0 0 12px #d1a15a33; }
.raven-memory-grid .raven-memory-card:focus-visible { outline: 3px solid #f6d49a; outline-offset: 3px; }
.raven-memory-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.raven-memory-portrait { object-position: 50% 0; transform: scale(1.35); transform-origin: 50% 0; }
.raven-memory-object { object-fit: contain; padding: 8px 8px 20px; box-sizing: border-box; }
.raven-memory-seal { display: block; width: 67%; height: 70%; margin: 7% auto 0; object-fit: contain; filter: sepia(.12); mix-blend-mode: screen; }
.raven-memory-back-title { display: block; color: #e0c295; font: 11px/1.2 "Cinzel", Georgia, serif; letter-spacing: .12em; }
.raven-memory-label { position: absolute; inset: auto 0 0; min-height: 34px; padding: 16px 6px 8px;
  background: linear-gradient(transparent, #0b090ced 40%); color: #f5e7ce; font: 13px/1.2 "EB Garamond", Georgia, serif; letter-spacing: normal; overflow-wrap: normal; word-break: normal; text-shadow: 0 1px 3px #000; }
.raven-memory-grid .raven-memory-card-matched { opacity: .8; border-color: #a6ba8b; cursor: default; }
.raven-memory-matched-mark { position: absolute; top: 9px; right: 9px; border-radius: 50%; width: 22px; height: 22px;
  background: #273d2d; border: 1px solid #a8bc8d; color: #ecf4db; font: 15px/20px Georgia, serif; }
@media (max-width: 650px) {
  #ravenMemoryGrid.raven-memory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; width: min(420px, 100%) !important; }
  .raven-memory-grid .raven-memory-card { min-height: 70px; aspect-ratio: 1 / 1.05; border-radius: 12px; }
  .raven-memory-back-title { font-size: 8px; letter-spacing: .04em; }
  .raven-memory-label { font-size: 11px; padding: 12px 3px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .raven-memory-grid .raven-memory-card { transition: none; }
  .raven-memory-grid .raven-memory-card:hover:not(:disabled) { transform: none; }
}

/* Keep the complete Memory board and its submit control together. Results
   continue below on the challenge's own scroll surface, never the page behind it. */
html:has(.raven-memory-panel:not(.hidden, .hidden *, [hidden], [hidden] *)),
body:has(.raven-memory-panel:not(.hidden, .hidden *, [hidden], [hidden] *)) {
  overflow: hidden !important;
}

/* Foreground players share one physical scale at every screen width. The old
   percentage width cap and tablet-only shrink made them miniature on narrow
   screens. Artwork normalization only compensates for transparent headroom;
   the pose, back view, and feet baseline remain intact. */
#gameRoomPanel .human-player-figure-seat,
#gameRoomPanel.deceived-layout-v3 .human-player-figure-seat {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  transform: translateX(-50%) scale(var(--human-perspective-scale, 1.18)) !important;
  transform-origin: center bottom !important;
}

#gameRoomPanel .human-player-figure-image {
  transform: scale(var(--human-art-scale, 1)) !important;
  transform-origin: center bottom !important;
}

#gameRoomPanel .room-table.has-human-figures,
#gameRoomPanel.deceived-layout-v3 .room-table.has-human-figures {
  margin-bottom: var(--human-foreground-space, 148px) !important;
}
.raven-memory-panel:not(.hidden):has(> #ravenMemoryGrid) {
  --memory-board-rows: 3;
  --memory-card-height: clamp(70px, calc((100dvh - 250px) / var(--memory-board-rows)), 168px);
  gap: 6px !important;
}
.raven-memory-panel:has(> #ravenMemoryGrid > :nth-child(13)) { --memory-board-rows: 4; }
.raven-memory-panel:has(> #ravenMemoryGrid)::before {
  margin: 0 auto 4px !important;
  line-height: 1.3;
}
.raven-memory-panel:has(> #ravenMemoryGrid) > :is(h4, p) {
  margin: 0 auto !important;
  padding: 0 !important;
  line-height: 1.3;
}
.raven-memory-panel:has(> #ravenMemoryGrid) > h4 { font-size: 18px; }
.raven-memory-panel:has(> #ravenMemoryGrid) > .raven-memory-subtitle { font-size: 16px; }
.raven-memory-panel:has(> #ravenMemoryGrid) > .hint { font-size: 16px; }
#ravenMemoryGrid.raven-memory-grid {
  width: min(640px, 100%, calc(var(--memory-card-height, 168px) * 4 / 1.12 + 30px)) !important;
  gap: 10px;
  margin: 8px auto !important;
}
.raven-memory-panel:has(> #ravenMemoryGrid) .raven-memory-card { min-height: 70px; }
.raven-memory-panel:has(> #ravenMemoryGrid) > #submitRavenMemoryBtn {
  width: min(360px, 100%) !important;
  min-height: 44px;
  margin: 0 auto !important;
  padding: 9px 16px !important;
  border-radius: 12px;
}
@media (max-width: 650px) {
  .raven-memory-panel:has(> #ravenMemoryGrid) > h4 { font-size: 16px; }
  .raven-memory-panel:has(> #ravenMemoryGrid) > :is(.raven-memory-subtitle, .hint) { font-size: 14px; }
  #ravenMemoryGrid.raven-memory-grid {
    width: min(420px, 100%, calc(var(--memory-card-height, 100px) * 4 / 1.05 + 21px)) !important;
    gap: 7px;
  }
}

/* Gravenhour: keep the single-word title inside the landing panel at phone sizes. */
#landingPage .landing-content h1 {
  font-size: clamp(1.4rem, 7.3vw, 4rem);
  letter-spacing: .065em;
  line-height: 1.15;
}
