/* The original pantry backdrop appears only during play at night. */
body[data-scene="night"] {
  background:
    linear-gradient(180deg, #14261de5, #14261d8c 34%, #101f1bbf 72%, #101f1b),
    url("/assets/night-pantry.jpg") center top / cover no-repeat #101f1b;
}

:lang(zh) {
  --serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
}
html:lang(zh) { font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
html:lang(zh) :is(.stage-title, .wordmark, .title-logo) { letter-spacing: 0; }

.secret-card { border-radius: 8px; }
.secret-card .role-faction {
  color: var(--role-accent);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .025em;
  border-block-end: 1px solid var(--role-edge);
}
.secret-card.is-concealed .private-toggle.primary {
  min-height: 46px;
  color: #23180c;
  border-color: #ffe1a0;
  background: linear-gradient(#ffdf93, #edb755);
  box-shadow: 0 2px 0 #755427;
}
.private-alliance {
  display: grid;
  gap: 6px;
  padding-block: 7px;
  border-block: 1px solid var(--role-edge);
  width: 100%;
}
.private-alliance .button {
  justify-self: start;
  min-height: 44px;
  padding-inline: 8px;
}
.button.card-review { border-color: #d1a765; color: #ffe5a6; }

.pantry-seat[data-you="true"] .seat-visual::before {
  content: "";
  position: absolute;
  inline-size: min(92%, 69px);
  block-size: 67%;
  inset-block-end: 4%;
  border: 1px solid #ffe19f;
  border-radius: 50%;
  background: #b18c4d41;
  box-shadow: 0 0 9px #e8a95450;
}
.pantry-seat[data-you="true"] .seat-name { border: 1px solid #d1a765; }
.pantry-seat .seat-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  white-space: normal;
}
.pantry-center .pantry-status {
  inline-size: max-content;
  max-inline-size: none;
  font-size: clamp(.68rem, 1.8vw, .88rem);
  white-space: nowrap;
}
.seat-self {
  display: block;
  margin-top: 2px;
  color: #ffdfa0;
  font-size: .69rem;
  font-weight: 750;
  text-transform: uppercase;
}
.table-you {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  padding: 5px;
  color: #ffefcf;
  text-align: center;
  font-size: .86rem;
  font-weight: 700;
}
.table-you bdi { overflow-wrap: anywhere; }
.table-you-label { color: #eebe73; font-size: .73rem; text-transform: uppercase; }
.night-choice { display: grid; align-content: start; justify-content: start; gap: 6px; }
.night-choice .button { min-height: 46px; }
.night-choice + .recruitment { margin-block-start: 0; }
.recruitment .recruit-skip { min-height: 44px; margin-block-start: 6px; }
.pantry-steal .table-platter::after {
  position: absolute;
  z-index: 3;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 35% 24%, #dfbf85, #8e673b 63%, #4f3824);
  box-shadow: inset 0 -4px #4e3724, 0 4px 9px #1a130c90;
  content: "";
  animation: steal-cover 800ms var(--ease-out) both;
  pointer-events: none;
}
@keyframes steal-cover {
  0% { transform: none; opacity: 1; }
  30%, 58% { transform: translate(24%, -62%) rotate(21deg); opacity: .84; }
  100% { transform: none; opacity: 0; }
}
.verdict-alliance { color: inherit; font-size: .88rem; }

@media (min-width: 520px) and (max-height: 465px) and (orientation: landscape) {
  .scene-night:has(.pantry-board):has(:is(.night-choice, .steal-receipt)):not(:has(.recruitment)) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.28fr);
    grid-template-areas:
      "steps steps"
      "heading board"
      "progress board"
      "choice board"
      "utility board"
      "recruit recruit"
      "host host";
  }
  .scene-night:has(.recruitment):has(:is(.night-choice, .steal-receipt)) {
    grid-template-areas:
      "steps steps"
      "heading utility"
      "progress progress"
      "choice side"
      "recruit side";
  }
  .scene-night[data-mode="online"]:has(.recruitment):has(:is(.night-choice, .steal-receipt)) {
    grid-template-areas:
      "steps steps"
      "heading utility"
      "choice side"
      "recruit side";
  }
  .scene-night .scene-main > :is(.night-choice, .steal-receipt) {
    grid-area: choice;
    align-self: start;
    min-width: 0;
  }
  .scene-night .pantry-status {
    translate: 0 -9px;
    border-radius: 3px;
    background: #13231ce8;
  }
  .scene-night[data-mode="table"]:has([data-focus="steal-cheese"]):not(:has(.recruitment))
    .scene-main > :is(.night-choice, .scene-utility) { translate: 0 -23px; }
}

@media (max-width: 680px) {
  body[data-scene="night"] {
    background:
      linear-gradient(180deg, #172d24d9, #10231d8a 34%, #101f1bd9 75%, #101f1b),
      url("/assets/night-pantry-compact.jpg") center top / auto min(73svh, 580px) no-repeat #101f1b;
  }
}

:root[data-reduce-motion] *, :root[data-reduce-motion] *::before, :root[data-reduce-motion] *::after {
  animation: none !important;
  transition: none !important;
}
:root[data-reduce-motion] .tumbling-die, :root[data-reduce-motion] .pantry-steal .table-platter::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  .tumbling-die, .pantry-steal .table-platter::after { display: none; }
}
