.score-card {
  min-height: 300px;
  padding: 16px;
}

.candidate-scene {
  min-height: 245px;
  height: auto;
  margin-top: 8px;
  padding-bottom: 112px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.candidate-speech {
  position: relative;
  z-index: 4;
  width: min(98%, 300px);
  margin: 0 auto 31px;
  padding: 10px 12px;
  border: 2px solid var(--candidate-color);
  border-radius: 17px;
  color: #4b3430;
  background: #fff;
  box-shadow: none;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
  overflow: visible;
}

.candidate-speech span {
  display: block;
  position: relative;
  z-index: 1;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.candidate-speech.card-draw-status {
  font-size: 14px;
  line-height: 1.35;
}

.candidate-speech::before {
  content: none;
}

.candidate-speech::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 20px;
  height: 20px;
  /* Keep the white overlap below the text so it only hides the bubble's bottom border. */
  z-index: 0;
  background: #fff;
  border: 0;
  border-right: 2px solid var(--candidate-color);
  border-bottom: 2px solid var(--candidate-color);
  border-radius: 0;
  clip-path: none;
  transform: translateX(-50%) rotate(45deg);
}

.candidate-sprite {
  position: absolute;
  bottom: 0;
  width: 144px;
  height: 112px;
  object-fit: contain;
}

.candidate-sprite.mayor-sprite {
  width: min(100%, 225px);
  height: 192px;
}

.score-card.elected-mayor {
  border-color: #e2a526;
  background: linear-gradient(155deg, #fff9df, #ffedb5);
  box-shadow: 0 0 0 3px #f7d36f, 0 5px 22px #e1b14d55;
}

.election-result {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow-wrap: anywhere;
}

.action-panel .election-result h3 {
  font-size: clamp(28px, 4vw, 46px);
  margin: 8px 0;
}

.election-result p {
  color: var(--muted);
  margin: 6px 0;
}

.game-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

#leaveGameButton {
  white-space: nowrap;
  background: #fff;
}

@media (max-width: 900px) {
  .game-header-actions { grid-column: 1 / -1; }
}

.home-actions .menu-button {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 16px 20px;
}

.home-actions .menu-button > img {
  display: none;
}

.home-actions .menu-button::before {
  content: "";
  width: 54px;
  height: 54px;
  background-color: currentColor;
  -webkit-mask: var(--menu-icon) center / contain no-repeat;
  mask: var(--menu-icon) center / contain no-repeat;
}

#createRoomButton { --menu-icon: url("assets/menu/create-room-v1.webp?v=20261025-2"); }
#joinRoomButton { --menu-icon: url("assets/menu/join-room-v1.webp?v=20261025-2"); }
#instructionsButton { --menu-icon: url("assets/menu/instructions-v1.webp?v=20261025-2"); }
.home-actions .menu-button.ghost { --menu-icon: url("assets/menu/official-site-v1.webp?v=20261025-2"); }
#reportButton { --menu-icon: url("assets/menu/report-v1.webp?v=20261025-2"); }

.home-actions #reportButton {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc((100% - 13px) / 2);
  min-height: 98px;
  position: relative;
  grid-template-columns: 1fr;
  gap: 0;
  place-items: center;
  text-align: center;
}

.home-actions #reportButton::before { position: absolute; left: 20px; }

.home-actions #reportButton strong { width: 100%; text-align: center; white-space: nowrap; }

.home-actions .menu-button strong {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 900;
}

@media (max-width: 620px) {
  .home-actions .menu-button { grid-template-columns: 48px minmax(0,1fr); gap:10px; padding:12px 16px; }
  .home-actions .menu-button::before { width:44px; height:44px; }
  .home-actions .menu-button strong { font-size:24px; }
  .home-actions #reportButton {
    grid-column: auto;
    justify-self: stretch;
    width: 100%;
    min-height: 78px;
    grid-template-columns: 48px minmax(0,1fr);
    gap: 10px;
    place-items: initial;
    align-items: center;
    text-align: left;
  }
  .home-actions #reportButton::before { position: static; left:auto; }
  .home-actions #reportButton strong { text-align: left; }
}

/* Game guide: rules, card effects and live card-pool odds. */
.help-modal {
  width: min(1180px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
}

.help-modal .help-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 28px);
  padding: 26px;
}

.help-modal .help-card h2 { margin: 0 0 14px; font-size: clamp(26px, 3vw, 36px); }

.help-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.help-tabs button {
  min-height: 52px;
  padding: 10px 14px;
  border: 2px solid #e1c8c1;
  border-radius: 14px;
  color: #6f171f;
  background: #fffaf4;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.help-tabs button:hover { border-color: #a91f2b; background: #fff2e9; }
.help-tabs button.active { border-color: #8d1822; color: #fff; background: linear-gradient(145deg,#b62a36,#76131c); box-shadow: 0 4px 0 #5e0c13; }

.help-content {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  border: 1px solid #ead8ce;
  border-radius: 18px;
  background: #f8f1e6;
  scrollbar-color: #b72b36 #f1ded5;
}

.help-panel[hidden] { display: none !important; }
.help-section-intro { margin: 0 0 14px; color: #725f58; font-weight: 700; }
.mobile-gameplay-guide { display: none; }

.help-carousel {
  padding: 15px;
  border: 1px solid #e3cec3;
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: 0 7px 20px rgba(97,38,32,.08);
}

.help-carousel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 11px; }
.help-carousel-heading div { display: flex; align-items: center; gap: 11px; }
.help-carousel-heading span { display: grid; place-items: center; min-width: 68px; min-height: 34px; padding: 5px 11px; border-radius: 999px; color: #fff; background: #b5222f; font-size: 14px; font-weight: 900; }
.help-carousel-heading h3 { margin: 0; color: #78151e; font-size: 24px; }
.help-carousel-heading > strong { color: #7d635b; font-size: 15px; white-space: nowrap; }

.help-shot-wrap { display: grid; grid-template-columns: 48px minmax(0,1fr) 48px; gap: 10px; align-items: center; }
.help-shot-stage { position: relative; overflow: hidden; border: 2px solid #d9c2b8; border-radius: 14px; background: #f8eee1; }
.help-shot-stage > img { display: block; width: 100%; height: auto; aspect-ratio: 1240 / 860; object-fit: contain; }
.help-shot-markers { position: absolute; inset: 0; pointer-events: none; }
.help-shot-marker { position: absolute; z-index: 2; left: var(--marker-x); top: var(--marker-y); transform: translate(-50%,-50%); }
.help-shot-marker::after { content: ""; position: absolute; z-index: -1; inset: -7px; border: 3px solid rgba(255,255,255,.96); border-radius: 50%; box-shadow: 0 2px 8px rgba(73,15,20,.35); }
.help-shot-marker b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: #bc2431; font-size: 17px; box-shadow: 0 0 0 2px #8a1520; }
.help-carousel-arrow { display: grid; place-items: center; width: 46px; height: 68px; padding: 0; border: 0; border-radius: 14px; color: #fff; background: #84202a; box-shadow: 0 4px 0 #591018; cursor: pointer; font-size: 42px; font-family: serif; line-height: 1; }
.help-carousel-arrow:hover { background: #ab2733; }
.help-carousel-arrow:focus-visible { outline: 4px solid #f2bc2f; outline-offset: 3px; }
.help-shot-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 11px; }
.help-shot-legend span { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 11px 5px 6px; border: 1px solid #dfc9bf; border-radius: 999px; color: #65433f; background: #fff7ef; font-size: 14px; font-weight: 800; }
.help-shot-legend b { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #fff; background: #b5222f; font-size: 13px; }
.help-shot-description { margin: 11px auto 0; max-width: 860px; color: #554540; font-size: 15px; font-weight: 700; line-height: 1.6; text-align: center; }
.help-carousel-dots { display: flex; justify-content: center; gap: 7px; margin-top: 10px; }
.help-carousel-dots button { width: 11px; height: 11px; padding: 0; border: 0; border-radius: 999px; background: #d8c8c0; cursor: pointer; transition: width .2s ease, background .2s ease; }
.help-carousel-dots button.active { width: 30px; background: #aa202c; }

.help-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.help-effect-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 132px;
  padding: 12px;
  border: 1px solid #e2cec4;
  border-radius: 15px;
  background: #fff;
}

.help-effect-card img { width: 96px; height: 106px; object-fit: contain; }
.help-effect-card h3 { margin: 0 0 6px; color: #78151e; font-size: 17px; line-height: 1.35; }
.help-effect-card p { margin: 0; color: #594a45; font-size: 14px; line-height: 1.55; }

.help-pool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.help-pool-card { overflow: hidden; border: 2px solid #d9c7bd; border-radius: 17px; background: #fff; }
.help-pool-card > header { padding: 16px; color: #fff; background: #8f1b25; }
.help-pool-card.random > header { background: #263641; }
.help-pool-card.pickup > header { background: linear-gradient(135deg,#dc522e,#caa82e,#2baaa1,#624bb5); }
.help-pool-card h3 { margin: 0 0 4px; font-size: 23px; }
.help-pool-card header p { margin: 0; font-size: 13px; font-weight: 800; }
.help-pool-card ul { display: grid; gap: 0; margin: 0; padding: 8px 13px; list-style: none; }
.help-pool-card li { display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 49px; border-bottom: 1px solid #eee3dc; }
.help-pool-card li:last-child { border-bottom: 0; }
.help-pool-card li img { width: 38px; height: 42px; object-fit: contain; }
.help-pool-card li span { min-width: 0; color: #4e403b; font-size: 13px; font-weight: 800; line-height: 1.25; }
.help-pool-card li strong { color: #8e1721; font-size: 12px; text-align: right; white-space: nowrap; }
@media (max-width: 900px) {
  .help-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-pool-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .help-modal .help-card { padding: 18px 10px 12px; }
  .help-modal .close-button { top: 8px; right: 8px; }
  .help-modal .overline, .help-modal .help-card > h2 { padding-left: 4px; }
  .help-tabs { gap: 5px; }
  .help-tabs button { min-height: 46px; padding: 8px 5px; font-size: 15px; }
  .help-content { padding: 9px; }
  .help-card-grid { grid-template-columns: 1fr; }
  #helpGameplayPanel .help-carousel { display: none; }
  .mobile-gameplay-guide { display: grid; gap: 9px; }
  .mobile-gameplay-guide article { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid #e2c9bd; border-radius: 14px; background: #fffdf9; box-shadow: 0 4px 12px rgba(97,38,32,.07); }
  .mobile-gameplay-guide article > b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: linear-gradient(145deg,#bd2b37,#79121b); box-shadow: 0 3px 0 #5e0c13; font-size: 17px; }
  .mobile-gameplay-guide strong { display: block; margin: 1px 0 4px; color: #78151e; font-size: 17px; }
  .mobile-gameplay-guide p { margin: 0; color: #594a45; font-size: 13px; line-height: 1.55; }
  .help-carousel { padding: 9px; }
  .help-shot-wrap { grid-template-columns: 34px minmax(0,1fr) 34px; gap: 5px; }
  .help-carousel-arrow { width: 34px; height: 54px; border-radius: 10px; font-size: 32px; }
  .help-carousel-heading h3 { font-size: 20px; }
  .help-carousel-heading span { min-width: 58px; min-height: 30px; font-size: 12px; }
  .help-shot-marker b { width: 25px; height: 25px; font-size: 13px; }
  .help-shot-marker::after { inset: -5px; border-width: 2px; }
  .help-shot-legend { gap: 5px; }
  .help-shot-legend span { min-height: 30px; padding-right: 8px; font-size: 12px; }
  .help-shot-description { font-size: 13px; }
  .help-effect-card { grid-template-columns: 82px minmax(0,1fr); min-height: 112px; padding: 9px; }
  .help-effect-card img { width: 82px; height: 92px; }
  .help-pool-card li { grid-template-columns: 36px minmax(0,1fr) auto; }
}

.seat-card.me {
  outline: 4px solid #f2b82e;
  outline-offset: 3px;
  box-shadow: 0 0 0 9px rgba(255, 209, 68, .42), 0 0 28px 9px rgba(237, 169, 18, .52);
}

.candidate-person {
  position: absolute;
  z-index: 2;
  bottom: 33px;
  width: 62px;
  height: 76px;
}

.person-head {
  position: absolute;
  top: 0;
  left: 18px;
  width: 26px;
  height: 26px;
  border: 3px solid var(--candidate-color);
  border-radius: 50%;
  background: transparent;
}

.person-body {
  position: absolute;
  top: 27px;
  left: 10px;
  width: 42px;
  height: 48px;
  border: 3px solid var(--candidate-color);
  border-radius: 16px 16px 8px 8px;
  background: transparent;
}

.candidate-podium {
  position: absolute;
  z-index: 3;
  bottom: 0;
  width: 104px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 3px solid #9d6b3a;
  border-radius: 4px 4px 9px 9px;
  color: #fff;
  background: #d5a267;
  box-shadow: 0 4px 0 #a67440;
  font-size: 25px;
}

.candidate-podium::before {
  content: "";
  position: absolute;
  width: 118px;
  height: 8px;
  margin-top: -51px;
  border: 3px solid #9d6b3a;
  border-radius: 5px;
  background: #d5a267;
}

.candidate-podium span {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 1px rgba(50,25,10,.35));
}

.podium-food-image {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
}

.candidate-podium .emoji-food {
  font-size: 25px;
}

.score-stats {
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.score-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.score-stat img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.score-stats strong {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.score-stats strong small {
  font-size: 17px;
  color: var(--muted);
}

.bid-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.bid-limits {
  color: var(--red-dark);
  font-size: 14px;
}

.game-stage {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.turn-card,
.action-panel {
  min-height: 270px;
  padding: 18px;
}

.turn-card h3 {
  margin-bottom: 10px;
  font-size: 24px;
}

.turn-card p,
.policy-bubble {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.turn-card .coin-limit {
  margin-top: 14px;
  padding: 10px;
}

.field-stack {
  gap: 10px;
}

.field-stack textarea {
  min-height: 68px;
}

.policy-bubble {
  padding: 14px;
  font-size: 18px;
}

.choice-grid {
  margin-top: 12px;
}

.choice-button {
  min-height: 76px;
}

.score-card.me::after {
  top: 7px;
  right: 7px;
  padding: 5px 9px;
  font-size: 13px;
  box-shadow: 0 3px 8px rgba(36, 82, 63, .22);
}

.room-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.spectate-button {
  color: #19558a;
  border-color: #bddcf0;
  background: #eef8ff;
}

.spectate-button.joining {
  color: #286142;
  border-color: #9bc9ad;
  background: #edf9f1;
}

.appearance-button {
  margin-top: 9px;
  padding: 6px 10px;
  border: 1px solid var(--player-color);
  border-radius: 999px;
  color: var(--player-color);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.appearance-modal {
  width: min(680px, calc(100% - 28px));
}

.appearance-fieldset {
  margin: 16px 0 0;
  padding: 14px;
  border: 1px solid #e5cfc9;
  border-radius: 15px;
}

.appearance-fieldset legend {
  padding: 0 7px;
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 900;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 9px;
}

.color-option {
  min-width: 0;
  height: 48px;
  padding: 5px;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 11px;
  background: #f8f3ed;
  cursor: pointer;
}

.color-option span {
  width: 27px;
  height: 27px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--option-color);
  box-shadow: 0 0 0 1px rgba(45,32,32,.2);
}

.color-option.selected {
  border-color: var(--option-color);
  background: #fff;
}

.color-option:disabled {
  cursor: not-allowed;
  opacity: .3;
}

.color-option small {
  display: none;
}

.food-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.food-option {
  min-height: 70px;
  padding: 7px 4px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  background: #f8f3ed;
  cursor: pointer;
}

.food-option-visual {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}

.food-option-image {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
}

.food-option-visual .emoji-food {
  font-size: 29px;
}

.avatar-food-image {
  width: 62px;
  height: 62px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(40, 20, 15, .24));
}

.avatar .emoji-food {
  font-size: 31px;
}

.food-option small {
  font-size: 11px;
  font-weight: 900;
}

.food-option.selected {
  border-color: var(--gold);
  color: var(--red-dark);
  background: #fff8df;
}

.bot-seat-actions {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 12px;
  width: 100%;
}
.bot-seat-actions button {
  border: 1px solid #d3b893;
  border-radius: 10px;
  background: #fff7e8;
  color: #754514;
  padding: 9px 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.bot-seat-actions button:hover { background: #ffe9be; }
.bot-seat-actions button:focus-visible { outline: 3px solid #c27d19; outline-offset: 2px; }
.bot-seat-actions small { font-size: 11px; line-height: 1.5; color: #776359; }

.seat-join-button {
  width: calc(100% - 20px);
  min-height: 40px;
  margin-top: auto;
  padding: 8px 10px;
  border: 1px solid #97c7a9;
  border-radius: 11px;
  color: #286142;
  background: #edf9f1;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.seat-join-button:hover {
  transform: translateY(-1px);
  border-color: #5fa77b;
  background: #dcf3e4;
}

.seat-join-button:disabled {
  opacity: .55;
  cursor: wait;
  transform: none;
}

.phase-heading h2 { font-size:clamp(30px,3.7vw,44px); line-height:1.18; }

@media (min-width: 901px) {
  #gameScreen.screen {
    padding: 68px 20px 16px;
  }

  .game-shell {
    width: min(1240px, 100%);
    padding: 22px 28px;
    border-radius: 28px;
  }

  .game-header {
    gap: 16px;
    padding-bottom: 12px;
  }

  .round-chip {
    width: 104px;
    height: 70px;
    align-items: center;
    gap: 8px;
  }

  .round-chip span {
    font-size: 16px;
  }

  .round-chip strong {
    font-size: 35px;
  }

  .phase-heading h2 {
    font-size: 36px;
  }

  .timers > div {
    min-width: 94px;
    padding: 7px 10px;
  }

  .scoreboard {
    gap: 8px;
    margin: 12px 0;
  }

  .score-card {
    min-height: 225px;
    padding: 11px 12px;
  }

  .candidate-scene {
    min-height: 192px;
    margin-top: 4px;
    padding-bottom: 112px;
  }

  .candidate-speech {
    margin-bottom: 24px;
    padding: 7px 9px;
    border-width: 2px;
    font-size: 13px;
  }

  .candidate-person {
    bottom: 25px;
    width: 48px;
    height: 58px;
  }

  .person-head {
    left: 14px;
    width: 21px;
    height: 21px;
    border-width: 2.5px;
  }

  .person-body {
    top: 22px;
    left: 8px;
    width: 34px;
    height: 37px;
    border-width: 2.5px;
  }

  .candidate-podium {
    width: 82px;
    height: 38px;
    border-width: 2px;
    font-size: 19px;
  }

  .podium-food-image {
    width: 28px;
    height: 28px;
  }

  .candidate-podium::before {
    width: 94px;
    height: 6px;
    margin-top: -39px;
    border-width: 2px;
  }

  .score-stats {
    margin-top: 5px;
  }

  .game-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .turn-card,
  .action-panel {
    min-height: 225px;
    padding: 14px;
  }

  .turn-card h3,
  .action-panel h3 {
    font-size: 21px;
  }

  .turn-card p,
  .action-panel > p {
    margin: 7px 0;
    line-height: 1.48;
  }

  .turn-card .coin-limit {
    margin-top: 10px;
  }

  .field-stack {
    gap: 7px;
  }

  .field-stack label {
    gap: 4px;
  }

  .field-stack textarea,
  .field-stack input {
    padding: 9px 11px;
  }

  .field-stack textarea {
    min-height: 54px;
  }

  .action-submit {
    min-height: 40px;
  }

  .event-log-wrap {
    margin-top: 10px;
  }

  .log-toggle {
    padding: 8px;
  }
}

@media (max-width: 620px) {
  .avatar-food-image {
    width: 46px;
    height: 46px;
  }

  .score-card {
    min-height: 250px;
    padding: 10px 8px;
  }

  .candidate-scene {
    min-height: 205px;
    padding-bottom: 102px;
  }

  .candidate-speech {
    width: min(98%, 260px);
    font-size: 13px;
  }

  .color-options {
    grid-template-columns: repeat(4, 1fr);
  }

  .food-options {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Shared three-second policy cut-in. Artwork remains replaceable PNG files. */
.proposal-announcement[hidden] { display: none; }
.proposal-announcement {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: #fff8ecf5;
  backdrop-filter: blur(8px);
  overscroll-behavior: contain;
}
.announcement-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  color: #382724;
  font-size: 16px;
}
.announcement-toolbar strong { font-size: 22px; overflow-wrap: anywhere; }
.announcement-toolbar b { font-size: 25px; color: var(--announcement-color); }
.announcement-art {
  position: relative;
  container-type: inline-size;
  width: min(100%, calc((100dvh - 100px) * 1.5));
  aspect-ratio: 3 / 2;
  flex: 0 0 auto;
  animation: announcement-pop 180ms ease-out both;
}
.announcement-art > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.announcement-art > .announcement-card-art {
  position: absolute;
  z-index: 6;
  top: 31%;
  right: 2%;
  width: clamp(135px, 18cqw, 230px);
  height: auto;
  aspect-ratio: 1;
  padding: 10px;
  border: 4px solid #171717;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(35,18,20,.2);
}
.announcement-card-art[hidden] { display: none; }
.announcement-speech {
  position: absolute;
  top: 15%;
  left: 18%;
  width: 64%;
  min-height: 21%;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--announcement-color);
  border-radius: 28px;
  background: white;
  box-sizing: border-box;
}
.announcement-speech::after {
  content: '';
  position: absolute;
  top: calc(100% - 13px);
  left: calc(50% - 14px);
  width: 24px;
  height: 24px;
  border-right: 4px solid var(--announcement-color);
  border-bottom: 4px solid var(--announcement-color);
  background: white;
  transform: rotate(45deg);
}
.announcement-speech p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #382724;
  font-size: clamp(16px, 3cqw, 32px);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.announcement-speech p.long-policy { font-size: clamp(13px, 2cqw, 23px); }
@keyframes announcement-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 620px) {
  .announcement-toolbar { position: absolute; z-index: 10; top: max(54px, env(safe-area-inset-top)); left: 12px; right: 12px; gap: 6px 12px; font-size: 13px; }
  .announcement-toolbar strong { font-size: 18px; width: 100%; text-align: center; }
  .announcement-art { width: 100%; }
  .announcement-speech { top: auto; bottom: 66%; left: 8%; width: 84%; padding: 10px; border-width: 3px; border-radius: 18px; }
  .announcement-speech::after { border-width: 3px; }
  .announcement-art > .announcement-card-art { top: 37%; right: 2%; width: 27%; padding: 5px; border-width: 2px; border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) { .announcement-art { animation: none; } }

/* Card draw shop and the two-card hand shown before a proposal is locked. */
.proposal-layout {
  display: grid;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.proposal-hand,
.proposal-settings,
.card-draw-panel {
  min-width: 0;
}
.proposal-hand {
  padding: 14px;
  border: 2px solid #ead8ce;
  border-radius: 18px;
  background: #fffaf4;
}
.proposal-hand h3,
.proposal-settings h3,
.card-draw-panel h3 { margin: 0 0 5px; color: #7d1720; }
.proposal-hand > p,
.card-draw-heading p { margin: 0 0 10px; color: #75635c; font-size: 13px; }
.card-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.card-slot {
  min-height: 255px;
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 10px;
  border: 2px solid #171717;
  border-radius: 13px;
  background: #fff;
  color: #171717;
  text-align: center;
}
.card-slot.empty { border-style: dashed; border-color: #d7c7bf; background: #fff; color: #9a8b84; text-align: center; }
.card-slot .card-number { font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.card-slot .card-art { width: 100%; height: 90px; object-fit: contain; }
.card-slot > strong { font-size: 14px; line-height: 1.25; }
.card-slot > small { min-height: 2.5em; color: #675d58; line-height: 1.25; }
.card-slot label { display: grid; gap: 3px; font-size: 12px; font-weight: 700; }
.card-slot select,
.card-slot button {
  width: 100%;
  min-height: 34px;
  border: 1px solid #bca9a0;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.card-slot button { border: 0; color: #fff; background: #9f1d29; font-weight: 900; cursor: pointer; }
.card-slot button:disabled { opacity: .58; cursor: default; }
.truth-choice { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; padding:10px; border:2px solid #e4d1cb; border-radius:13px; }
.truth-choice legend { padding:0 5px; color:#594743; font-weight:900; }
.truth-choice label { display:flex; align-items:center; justify-content:center; gap:7px; min-height:46px; border:2px solid #d9c6bf; border-radius:11px; background:#fff; cursor:pointer; }
.truth-choice input { width:auto; accent-color:#a51d28; }
.truth-guess-dialog { width:min(92vw,520px); padding:0; border:0; border-radius:22px; background:transparent; color:#3e2925; }
.truth-guess-dialog::backdrop { background:rgba(35,18,20,.62); backdrop-filter:blur(4px); }
.truth-guess-dialog-card { position:relative; display:grid; gap:20px; padding:34px 28px 28px; border:2px solid #171717; border-radius:22px; background:#fffdf8; box-shadow:0 22px 60px rgba(35,18,20,.35); }
.truth-guess-dialog-card > p { margin:0; padding:10px 32px 0; color:#5f1018; font-size:clamp(16px,1.8vw,21px); font-weight:900; line-height:1.45; text-align:center; white-space:nowrap; }
.truth-guess-dialog-card > p strong { color:#a51d28; white-space:nowrap; }
.truth-guess-dialog-close { position:absolute; top:10px; right:10px; width:38px; height:38px; border:0; border-radius:50%; color:#7d1720; background:#f3e6df; font-size:26px; cursor:pointer; }
.truth-guess-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.truth-guess-buttons .choice-button { min-height:64px; }
.truth-guess-buttons .truth { color:#286142; border-color:#5c9d76; background:#e8f7ed; }
.truth-guess-buttons .lie { color:#a51d28; border-color:#d4626c; background:#fff0f1; }
.drawn-card-badge { position:absolute; z-index:5; right:2%; bottom:8px; width:88px; height:88px; padding:5px; object-fit:contain; border:3px solid #171717; border-radius:13px; background:#fff; box-shadow:0 7px 15px rgba(35,18,20,.17); }
.card-draw-heading { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.card-draw-result { max-width: 48%; padding: 8px 12px; border-radius: 10px; background: #fff4cf; color: #754c00; font-size: 13px; }
.card-shop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px,2vw,24px); margin: 16px auto; max-width: 980px; align-items:end; }
.card-pool-button,
.card-shop-skip {
  min-height: 210px;
  display: grid;
  place-content: center;
  gap: 3px;
  border: 0;
  border-radius: 18px;
  color: #4a2a18;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.card-pool-option { min-width: 0; display: grid; align-content: end; gap: 8px; }
.card-pool-button { width: 100%; min-height: 210px; padding: 0; }
.card-pool-button .pool-face {
  width: 150px;
  height: 188px;
  box-sizing: border-box;
  margin: auto;
  display: grid;
  place-content: center;
  border: 3px solid #111;
  border-radius: 10px;
  background: #fff;
  font: 900 clamp(60px,7vw,100px)/1 Arial,sans-serif;
}
.card-pool-button.relief .pool-face { color: #111; background: #b8b8b8; font-size: clamp(30px,4vw,54px); letter-spacing: -.04em; }
.card-pool-button.random .pool-face { color: #b41d2b; background: #fff; }
.card-pool-button.pickup .pool-face {
  color: #fff;
  background: linear-gradient(145deg,#ff4b4b 0%,#ffad32 22%,#46be72 48%,#398fe6 72%,#9a50d7 100%);
  font-size: clamp(26px,3.4vw,46px);
  text-shadow: 0 2px 2px rgba(0,0,0,.35);
}
.card-pool-button.pickup .pool-face span { display: block; }
.card-pool-button strong { font-size: 16px; }
.card-pool-button small { color: #675d58; }
.pickup-card-dialog {
  width: min(92vw, 480px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: #3e2925;
}
.pickup-card-dialog::backdrop { background: rgba(35,18,20,.62); backdrop-filter: blur(4px); }
.pickup-dialog-card { position:relative; display:grid; gap:13px; padding:28px; border:2px solid #171717; border-radius:20px; background:#fffdf8; box-shadow:0 22px 60px rgba(35,18,20,.35); }
.pickup-dialog-card h3,.pickup-dialog-card p { margin:0; }
.pickup-dialog-close { position:absolute; top:10px; right:10px; width:38px; height:38px; border:0; border-radius:50%; color:#7d1720; background:#f3e6df; font-size:26px; cursor:pointer; }
.pickup-choice { display:grid; gap:6px; font-size:13px; font-weight:900; text-align:left; }
.pickup-choice select { width:100%; min-height:46px; padding:0 12px; border:2px solid #aa9890; border-radius:10px; background:#fff; color:#3e2925; font:inherit; }
.pickup-card-preview { display:grid; justify-items:center; gap:5px; padding:10px; border:1px solid #e3d5cf; border-radius:14px; background:#fff; text-align:center; }
.pickup-card-preview img { width:150px; height:150px; object-fit:contain; }
.pickup-card-preview strong { color:#6f1018; font-size:14px; }
.pickup-card-preview small { color:#796762; font-size:12px; }
.pickup-confirm { min-height:48px; border:0; border-radius:11px; color:#fff; background:linear-gradient(145deg,#b92b36,#7c141d); box-shadow:0 5px 0 #5e0c13; font:900 15px/1 inherit; cursor:pointer; }
.card-shop-skip { min-height:210px;color:#9f1d29;font-weight:900; }
.card-shop-skip .skip-x { display:block;font:900 clamp(92px,10vw,150px)/.72 Arial,sans-serif;color:#d8222d;text-shadow:0 5px 0 #8d111b; }
.card-shop-skip strong { margin-top:18px;font-size:18px; }
.card-shop button:disabled { opacity: .45; cursor: default; filter: grayscale(.35); }

@media (max-width: 760px) {
  .proposal-layout { grid-template-columns: 1fr; }
  .card-shop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-pool-button { min-height: 185px; }
  .card-pool-option { align-content: start; }
  .card-pool-button { grid-template-rows: 140px auto auto; place-content: start stretch; align-items: start; }
  .card-pool-button .pool-face { width: 112px; height: 140px; margin: 0 auto; }
  .card-pool-button strong,
  .card-pool-button small { justify-self: center; }
  .card-pool-button small { font-size: 10px; line-height: 1.25; white-space: nowrap; }
  .card-draw-heading { display: block; }
  .card-draw-result { max-width: none; display: block; margin-bottom: 10px; }
}

/* Ten-second synchronized random event shown after the final regular proposer in a cycle. */
.random-event-overlay[hidden] { display: none; }
.random-event-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 36px);
  overflow: auto;
  background:
    radial-gradient(circle at 18% 14%, rgba(255,205,74,.35), transparent 30%),
    radial-gradient(circle at 82% 84%, rgba(201,45,65,.2), transparent 34%),
    rgba(255,248,236,.97);
  backdrop-filter: blur(10px);
  overscroll-behavior: contain;
}
.random-event-card {
  width: min(1120px, 100%);
  min-height: min(720px, calc(100dvh - 48px));
  display: grid;
  grid-template-columns: minmax(300px,.9fr) minmax(360px,1.1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 54px);
  padding: clamp(24px, 4vw, 54px);
  border: 3px solid rgba(165,29,40,.2);
  border-radius: 36px;
  background: rgba(255,253,248,.96);
  box-shadow: 0 30px 90px rgba(77,30,26,.2);
  animation: random-event-pop 240ms cubic-bezier(.2,.85,.3,1.1) both;
}
.random-event-copy .overline { margin: 0 0 8px; color: #bd7d08; font-weight: 900; letter-spacing: .18em; }
.random-event-copy h2 { margin: 0; color: #76131c; font-size: clamp(34px, 5vw, 62px); line-height: 1.12; }
.random-event-copy > p:not(.overline) { margin: 22px 0; color: #4f3b36; font-size: clamp(17px, 2vw, 24px); font-weight: 700; line-height: 1.65; }
.random-event-copy > strong { display: block; padding: 18px 20px; border-radius: 18px; color: #fff; background: linear-gradient(135deg,#bd2836,#8d1320); font-size: clamp(20px, 2.5vw, 30px); line-height: 1.35; box-shadow: 0 8px 0 #6f111b; }
.random-event-timer { margin-top: 26px; color: #7b6962; font-size: 16px; }
.random-event-timer b { color: #a51d28; font-size: 28px; }
.random-event-card > img { display: block; width: 100%; max-height: min(680px, 72dvh); object-fit: contain; filter: drop-shadow(0 18px 22px rgba(54,32,29,.12)); }
@keyframes random-event-pop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .random-event-card { min-height: 0; grid-template-columns: 1fr; gap: 12px; padding: 22px; border-radius: 24px; }
  .random-event-copy h2 { font-size: clamp(28px, 9vw, 42px); }
  .random-event-copy > p:not(.overline) { margin: 12px 0; font-size: 16px; }
  .random-event-copy > strong { padding: 13px 15px; font-size: 19px; }
  .random-event-timer { margin-top: 18px; }
  .random-event-card > img { max-height: 42dvh; order: -1; }
}
@media (prefers-reduced-motion: reduce) { .random-event-card { animation: none; } }

/* Compact in-game controls for phones. Lobby and desktop layouts stay unchanged. */
.mobile-proposal-launchers,
.mobile-action-backdrop,
.mobile-action-close {
  display: none;
}

.mobile-result-box { display: none; }

@media (max-width: 620px) {
  body.room-active .player-name-bar,
  body.room-active .version-badge {
    display: none;
  }

  body.room-active #lobbyScreen.screen {
    min-height: 100dvh;
    padding: 4px;
    place-items: start center;
  }

  body.room-active .lobby-shell {
    padding: 8px;
    border-radius: 16px;
  }

  body.room-active .room-header { align-items: center; gap: 6px; }
  body.room-active .room-header .overline { margin-bottom: 1px; font-size: 8px; }
  body.room-active .room-header h2 { font-size: 19px; line-height: 1.12; }
  body.room-active .room-header-actions { gap: 4px; }
  body.room-active .room-header .text-button { min-height: 34px; padding: 5px 7px; border-radius: 9px; font-size: 10px; }

  body.room-active .room-banner {
    margin: 6px 0;
    padding: 6px 8px;
    align-items: center;
    flex-direction: row;
    gap: 6px;
    border-radius: 11px;
  }

  body.room-active .room-banner > div:first-child { align-items: center; flex-direction: row; gap: 6px; }
  body.room-active .room-banner span { font-size: 9px; }
  body.room-active .room-banner strong { font-size: 21px; letter-spacing: .12em; }
  body.room-active .room-code-actions { align-self: auto; gap: 3px; }
  body.room-active .small-button { min-height: 30px; padding: 0 7px; gap: 4px; border-radius: 8px; font-size: 9px; }
  body.room-active #copyCodeButton { min-width: 58px; flex: 0 0 58px; white-space: nowrap; }
  body.room-active .copy-icon { width: 11px; height: 13px; border-width: 1.5px; }
  body.room-active .copy-icon::before { left: -4px; top: -4px; width: 8px; height: 10px; border-width: 1.5px; }
  body.room-active .spectator-notice { margin: 0 0 5px; padding: 5px 7px; font-size: 9px; }

  body.room-active .seat-grid { gap: 5px; }
  body.room-active .seat-card { min-height: 143px; padding: 5px 4px; border-radius: 12px; }
  body.room-active .seat-number { top: 4px; left: 5px; font-size: 8px; }
  body.room-active .host-badge { top: 4px; right: 4px; padding: 2px 5px; font-size: 8px; }
  body.room-active .avatar { width: 42px; height: 42px; margin: 7px 0 8px; box-shadow: 0 3px 9px color-mix(in srgb,var(--player-color) 38%,transparent) !important; }
  body.room-active .avatar-food-image { width: 37px; height: 37px; }
  body.room-active .seat-card h3 { font-size: 13px; line-height: 1.15; }
  body.room-active .seat-card p { margin-top: 2px; font-size: 8px; }
  body.room-active .appearance-button { margin-top: 3px; padding: 3px 5px; font-size: 8px; }
  body.room-active .bot-seat-actions { gap: 3px; padding-top: 4px; }
  body.room-active .bot-seat-actions button { padding: 4px 3px; border-radius: 7px; font-size: 8px; }
  body.room-active .bot-seat-actions small { font-size: 8px; }
  body.room-active .coin-field { padding-top: 3px; }
  body.room-active .coin-field label { margin-bottom: 2px; font-size: 8px; }
  body.room-active .coin-field input { padding: 4px; border-radius: 7px; font-size: 11px; }
  body.room-active .lobby-footer { margin-top: 6px; align-items: center; flex-direction: row; gap: 6px; }
  body.room-active .lobby-footer p { flex: 1; font-size: 9px; line-height: 1.25; }
  body.room-active .start-button { width: auto; min-width: 124px; min-height: 40px; border-radius: 11px; box-shadow: 0 4px 0 #590c13; font-size: 13px; }

  body.game-in-progress #gameScreen.screen {
    min-height: 100dvh;
    padding: 5px;
    place-items: start center;
  }

  body.game-in-progress .game-shell {
    padding: 8px;
    border-radius: 16px;
  }

  body.game-in-progress .game-header {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 5px 8px;
    padding-bottom: 6px;
  }

  body.game-in-progress .round-chip {
    width: 48px;
    height: 45px;
    gap: 3px;
    border-radius: 12px;
    box-shadow: 0 3px 0 #580b12;
  }

  body.game-in-progress .round-chip span { font-size: 9px; }
  body.game-in-progress .round-chip strong { font-size: 23px; }
  body.game-in-progress .phase-heading h2 { font-size: 18px; line-height: 1.25; }

  body.game-in-progress .game-header-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
  }

  body.game-in-progress .timers { grid-column: auto; gap: 5px; }
  body.game-in-progress .timers > div { min-width: 0; padding: 4px 6px; border-radius: 9px; }
  body.game-in-progress .timers small { font-size: 8px; }
  body.game-in-progress .timers strong { font-size: 14px; }
  body.game-in-progress #leaveGameButton { padding: 5px 7px; border-radius: 9px; font-size: 10px; }

  body.game-in-progress .scoreboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin: 6px 0;
  }

  body.game-in-progress .score-card {
    min-height: 160px;
    padding: 6px;
    border-radius: 11px;
  }

  body.game-in-progress .score-name {
    max-width: calc(100% - 22px);
    font-size: 11px;
  }

  body.game-in-progress .candidate-scene {
    min-height: 112px;
    height: 112px;
    margin-top: 5px;
    padding-bottom: 52px;
  }

  body.game-in-progress .candidate-speech {
    width: 98%;
    min-height: 44px;
    max-height: 44px;
    margin: 0 auto 9px;
    padding: 4px 5px;
    display: grid;
    place-items: center;
    border-width: 1.5px;
    border-radius: 9px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.25;
  }

  body.game-in-progress .candidate-speech span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body.game-in-progress .candidate-speech::-webkit-scrollbar { display: none; }

  body.game-in-progress .candidate-speech::after {
    bottom: -6px;
    width: 10px;
    height: 10px;
    border-width: 0 1.5px 1.5px 0;
  }

  body.game-in-progress .candidate-sprite {
    width: 73px;
    height: 57px;
  }

  body.game-in-progress .drawn-card-badge { right:2px; bottom:4px; width:48px; height:48px; padding:2px; border-width:2px; border-radius:8px; }

  body.game-in-progress .candidate-sprite.mayor-sprite {
    width: 96px;
    height: 76px;
  }

  body.game-in-progress .score-stats {
    gap: 4px 8px;
    margin-top: 2px;
  }

  body.game-in-progress .score-stat { gap: 2px; }
  body.game-in-progress .score-stat img { width: 17px; height: 17px; }
  body.game-in-progress .score-stats strong { font-size: 13px; }
  body.game-in-progress .score-stats strong small { font-size: 9px; }
  body.game-in-progress .score-card.me::after { top: 4px; right: 4px; padding: 2px 5px; font-size: 8px; }

  body.game-in-progress .guess-amount-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: var(--red-dark);
    font-weight: 900;
  }

  body.game-in-progress .guess-panel .guess-amount-row input { margin: 0; }

  body.game-in-progress .choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.game-in-progress .choice-button { min-height:64px; font-size:17px; }
  body.game-in-progress .truth-guess-dialog-card { gap:15px; padding:30px 16px 18px; }
  body.game-in-progress .truth-guess-dialog-card > p { padding:8px 24px 0; font-size:clamp(13px,4vw,17px); }
  body.game-in-progress .truth-guess-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.game-in-progress .truth-guess-buttons .choice-button { min-height:58px; font-size:16px; }
  body.game-in-progress .mobile-opposition-submit {
    width: 100%;
    min-height: 64px;
    margin-top: 12px;
    border: 2px solid #d4626c;
    border-radius: 17px;
    color: #a51d28;
    background: #fff0f1;
    box-shadow: none;
    font-size: 20px;
  }

  body.game-in-progress .desktop-result-box { display: none; }
  body.game-in-progress .mobile-result-box { display: block; padding: 13px; }
  body.game-in-progress .mobile-result-box h3 { margin-bottom: 8px; font-size: 20px; }
  body.game-in-progress .mobile-result-box .result-list { padding: 0; list-style: none; }
  body.game-in-progress .mobile-result-box .result-list li { margin: 6px 0; font-size: 13px; font-weight: 800; line-height: 1.4; }
  body.game-in-progress .results-countdown { margin: 9px 2px 2px; font-size: 11px; }

  body.game-in-progress .action-panel.proposal-mode {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.game-in-progress .action-panel.proposal-mode .proposal-layout { display: block; }
  body.game-in-progress .action-panel.proposal-mode .proposal-hand,
  body.game-in-progress .action-panel.proposal-mode .proposal-settings { display: none; }

  .mobile-proposal-launchers {
    position: static;
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 9px 5px 3px;
  }

  .mobile-action-launch {
    width: 70px;
    height: 70px;
    padding: 3px 4px 4px;
    display: grid;
    grid-template-rows: 48px auto;
    place-items: center;
    border: 2px solid #a52933;
    border-radius: 16px;
    color: var(--red-dark);
    background: #fffaf4;
    box-shadow: 0 3px 0 #7b161f;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
  }

  .mobile-action-launch.policy { border-color: #9b5c27; color: #6f3d18; box-shadow: 0 3px 0 #6f3d18; }
  .mobile-action-launch img { width: 46px; height: 46px; display: block; object-fit: contain; }

  .mobile-action-backdrop.mobile-panel-open {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: block;
    background: rgba(37, 12, 14, .64);
    backdrop-filter: blur(4px);
  }

  body.game-in-progress .action-panel.proposal-mode .proposal-hand.mobile-panel-open,
  body.game-in-progress .action-panel.proposal-mode .proposal-settings.mobile-panel-open {
    position: fixed;
    z-index: 51;
    inset: 50% auto auto 50%;
    width: min(92vw, 440px);
    max-height: min(82dvh, 650px);
    display: block;
    overflow: auto;
    padding: 18px;
    border: 2px solid #ead8ce;
    border-radius: 20px;
    background: #fffaf4;
    box-shadow: 0 24px 70px rgba(50, 14, 17, .35);
    transform: translate(-50%, -50%);
  }

  .mobile-action-close {
    position: sticky;
    z-index: 2;
    top: 0;
    float: right;
    width: 36px;
    height: 36px;
    margin: -6px -6px 4px 8px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--red-dark);
    background: #f4e5df;
    cursor: pointer;
    font-size: 25px;
  }

  body.mobile-proposal-open { overflow: hidden; }
  body.game-in-progress .proposal-hand .card-slots { clear: both; }
  body.game-in-progress .proposal-hand .card-slot { min-height: 235px; padding: 8px; }
  body.game-in-progress .proposal-hand .card-art { height: 72px; }
  body.game-in-progress .proposal-settings .field-stack textarea { min-height: 92px; }
  body.game-in-progress .event-log-wrap { margin-top: 5px; }
  body.game-in-progress .log-toggle { padding: 7px; font-size: 11px; }
}
