:root {
  --room-night: #39271e;
  --room-ink: #fff4dc;
  --room-muted: #ead3b2;
  --room-control: #503728;
  --room-rule: rgba(255, 233, 192, .35);
  --room-copper: #ffe0a4;
}
body {
  --room-night: #39271e;
  --room-ink: #fff4dc;
  --room-muted: #ead3b2;
  --room-control: #503728;
  --room-rule: rgba(255, 233, 192, .35);
  --room-copper: #ffe0a4;
}
.handheld {
  --room-image-depth: calc(36% + var(--safe-top) * .67);
  background: #c3976b url("./assets/afternoon-room.webp") 50% 0 / 100% var(--room-image-depth) no-repeat;
}
.handheld.memory-open { visibility: hidden; }
.handheld .object-stage { background: none; }
.handheld .object-stage::before, .handheld .object-stage::after { display: none; }
.hud-button, #memory-rail .hud-button {
  background: #44332a;
  border-color: rgba(255, 229, 186, .44);
  box-shadow: 0 2px 4px rgba(58, 34, 23, .24);
}
.hud-button:active, .hud-button[aria-expanded="true"] {
  background: #67472e;
  border-color: #ffe0a4;
}
.hud-surface {
  background: #4b3427;
  color: #fff4dc;
  border-color: rgba(255, 233, 192, .34);
}
.hud-surface button:active { background: #67472e; }
.hud-surface .object-play { color: #34251c; background: #f1ca86; }
.handheld :focus, #memory-rail :focus, #afternoon-album :focus {
  outline: 2px solid #ffebbb;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #463126;
}
.handheld :focus:not(:focus-visible), #memory-rail :focus:not(:focus-visible), #afternoon-album :focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

#memory-rail {
  position: fixed;
  z-index: 22;
  top: calc(10px + var(--safe-top));
  left: calc(12px + var(--safe-left));
  right: calc(12px + var(--safe-right));
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
#memory-rail > button { pointer-events: auto; }
#memory-rail .player-feedback-entry { color: #fff4dc; }

.gallery-title {
  top: calc(10px + var(--safe-top));
  right: calc(12px + var(--safe-right));
  left: calc(12px + var(--safe-left));
  max-width: none;
}
.gallery-title h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.gallery-feedback-rail {
  justify-content: space-between;
  min-height: 44px;
}
.gallery-feedback-rail .gallery-kicker {
  font-size: 13px;
  line-height: inherit;
  letter-spacing: .03em;
  color: var(--room-ink);
}
#feedback-entry-gallery {
  position: static;
}
.room-sound {
  position: relative;
  flex: 0 0 44px;
  margin-right: 5px;
  font-size: 18px;
}
.room-sound[aria-pressed="false"]::after {
  position: absolute;
  width: 21px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 1px #3d2b21;
  transform: rotate(-45deg);
  content: "";
  pointer-events: none;
}
.fan-level {
  flex: 0 0 auto;
  min-width: 54px;
  margin-right: 5px;
  padding: 0 7px;
}
#gallery-fan, #memory-fan { margin-left: auto; }
#feedback-entry-room { margin-left: 0; }
.machine-gallery .machine-tag {
  display: none;
  min-height: 23px;
  bottom: 11px;
  padding: 2px 7px;
  border-radius: 8px;
  background: #463025;
}
.machine-gallery [data-recent="true"] .machine-tag,
.machine-gallery .machine-list button:active .machine-tag,
.machine-gallery .machine-list button:focus-visible .machine-tag { display: flex; }
.machine-gallery .machine-tag strong { font-size: 11px; }
.machine-gallery .machine-games { display: none; }
.machine-gallery .flat-device { pointer-events: none; }

.room-rail {
  top: calc(10px + var(--safe-top));
  left: calc(12px + var(--safe-left));
  right: calc(12px + var(--safe-right));
}
.room-rail .machine-label {
  margin-left: 9px;
  color: #311e14;
  text-shadow: 0 0 4px #ffefd1, 0 0 2px #ffefd1;
}
.room-rail .machine-label p { color: #3b2719; }
.room-rail .room-back i, .room-rail .menu-dots { color: #ffe0a4; }
@media (max-width: 351px) {
  .room-rail .room-back, #feedback-entry-room { padding-right: 7px; padding-left: 7px; }
  .room-rail .machine-label { margin-left: 6px; }
  .room-rail .fan-level, .room-rail .room-sound { margin-right: 3px; }
  #feedback-entry-room + .room-more { margin-left: 3px; }
}
.handheld[data-scene-guide="hidden"] .object-primary { display: none; }
.handheld[data-scene-guide="visible"] .object-primary {
  bottom: calc(67px + var(--safe-bottom));
  background: #463025;
}
.handheld[data-scene-guide="visible"] #object-guide { color: #fff0cf; }

.object-battery-actions {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  bottom: calc(12px + var(--safe-bottom));
  left: calc(12px + var(--safe-left));
  right: calc(12px + var(--safe-right));
  pointer-events: none;
}
.object-battery-actions button { pointer-events: auto; margin: 0 3px; }
.object-battery-actions #battery-seat,
.object-battery-actions [data-battery-primary="true"],
#battery-tray-toggle[data-battery-primary="true"] {
  background: #f1ca86;
  border-color: #ffe2a8;
  color: #34251c;
}
#battery-tray-toggle {
  position: absolute;
  left: calc(100% - 50px - var(--safe-right));
  top: calc(78% + var(--safe-top) * .2);
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: auto;
  min-height: 44px;
  padding: 0 8px;
}
#battery-tray {
  position: absolute;
  z-index: 9;
  bottom: calc(66px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 282px;
  max-width: calc(100% - 24px - var(--safe-left) - var(--safe-right));
  padding: 9px 12px 13px;
  pointer-events: auto;
  box-shadow: 0 10px 24px rgba(43, 24, 15, .39);
}
#battery-tray header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff3da;
}
#battery-tray header button { font-size: 24px; margin-left: 4px; }
.spare-packs { display: flex; justify-content: center; }
.spare-packs button {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  min-height: 82px;
  padding: 6px;
  color: #402c1d;
  background: #f5e4be;
  border: 1px solid #d6b577;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px rgba(255, 247, 223, .5);
  font-size: 12px;
  font-weight: 700;
}
.spare-packs small { display: block; min-height: 13px; font-size: 10px; }
.spare-packs button[data-pack="open"] {
  border-color: #ffe9bc;
  background: #fff0c9;
  box-shadow: inset 0 0 0 2px #9e7548;
}
.spare-packs i {
  position: relative;
  display: block;
  width: 66px;
  height: 41px;
  margin-bottom: 5px;
}
.spare-packs i::before, .spare-packs i::after {
  position: absolute;
  content: "";
  top: 2px;
  height: 33px;
}
.spare-packs [data-spare="A"] i::before, .spare-packs [data-spare="A"] i::after {
  width: 13px;
  border-top: 4px solid #d4cdc0;
  border-bottom: 3px solid #ada89d;
  border-radius: 2px;
  background: linear-gradient(90deg,#3a3930,#705436 30%,#bd8550 62%,#433325);
  box-shadow: 2px 2px 3px rgba(62, 37, 20, .4);
  transform: rotate(16deg);
}
.spare-packs [data-spare="A"] i::before { left: 16px; }
.spare-packs [data-spare="A"] i::after { left: 34px; }
.spare-packs [data-spare="B"] i::before {
  left: 15px;
  width: 35px;
  height: 35px;
  background: linear-gradient(145deg,#eee9dc,#9e9f94 45%,#e0e1d8 58%,#979489);
  border: 3px double #7e8078;
  border-radius: 50%;
  box-shadow: 2px 3px 3px rgba(62, 37, 20, .4);
}
.spare-packs button:active { color: #fff4df; }

@media (max-width: 520px) {
  .view-menu { left: calc(9px + var(--safe-left)); bottom: calc(63px + var(--safe-bottom)); }
}
@media (min-width: 521px) {
  .handheld { background-size: 100% auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .handheld.table-arrival .object-stage { animation: table-arrival 230ms ease-out; }
}
@keyframes table-arrival {
  from { opacity: .55; }
  to { opacity: 1; }
}
