:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #f7f0df;
  background: #111820;
  color-scheme: dark;
  --amber: #e8b477;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
#entry {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  padding: 40px max(24px, 6vw);
  background: linear-gradient(110deg, #111820f5, #111820e8 65%, #111820a8);
}
h1 {
  font-family: Georgia, serif;
  font-weight: normal;
  font-size: clamp(60px, 8vw, 100px);
  line-height: 1;
  letter-spacing: -0.055em;
  margin: 0 0 12px;
  color: var(--amber);
}
.invitation {
  font:
    20px Georgia,
    serif;
  margin: 0 0 28px;
  color: #d9d3c8;
}
form {
  width: 100%;
}
.lobby-name {
  max-width: 340px;
  margin-bottom: 32px;
}
.lobby-columns {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 340px;
  gap: clamp(28px, 5vw, 80px);
  max-width: 1100px;
}
.directory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.directory-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}
.directory-heading button {
  padding: 9px 14px;
  background: #263641;
  color: #f7f0df;
}
#directory-status,
#visibility-hint,
.join-help {
  font-size: 13px;
  line-height: 1.55;
  color: #b7c1c7;
}
#rooms-empty {
  padding: 32px 0;
  max-width: 340px;
  line-height: 1.6;
  color: #d9d3c8;
}
#rooms-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  text-align: left;
}
#rooms-table th,
#rooms-table td {
  padding: 16px 12px 16px 0;
  border-bottom: 1px solid #35444e;
}
#rooms-table thead th {
  font-size: 12px;
  color: #b7c1c7;
  font-weight: 400;
}
#rooms-table tbody th {
  font-weight: 500;
  overflow-wrap: anywhere;
}
#rooms-table td:nth-child(2) {
  white-space: nowrap;
  color: #c8c5bd;
}
#rooms-table td:last-child {
  text-align: right;
  padding-right: 0;
}
#rooms-table button {
  padding: 8px 16px;
}
#rooms-table button:disabled {
  cursor: not-allowed;
}
.room-entry {
  padding: 24px;
  background: #1e2b35;
  align-self: start;
  border-radius: 8px;
}
.room-modes {
  display: flex;
  border-bottom: 1px solid #51606b;
}
.room-modes button {
  flex: 1;
  background: transparent;
  color: #c8c5bd;
  padding: 12px 4px;
  border-bottom: 2px solid transparent;
}
.room-modes button[aria-pressed="true"] {
  color: #f7f0df;
  border-color: var(--amber);
}
#room-visibility {
  width: 100%;
  padding: 12px 10px;
  background: #111820;
  color: #f7f0df;
  border: 1px solid #687071;
  font: inherit;
}
select:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
label {
  display: block;
  font-size: 12px;
  margin: 20px 0 9px;
}
label span {
  color: #a8aaa8;
  font-size: 11px;
  margin-left: 5px;
}
input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #687071;
  background: rgba(15, 24, 32, 0.5);
  padding: 12px 10px;
  border-radius: 0;
  color: #fff;
  transition: border-color 0.18s;
}
input:hover,
input:focus {
  border-color: var(--amber);
}
#code {
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
#code::placeholder {
  text-transform: none;
  letter-spacing: normal;
}
button {
  border: 0;
  background: var(--amber);
  color: #172027;
  padding: 14px 20px;
  font-weight: 600;
  transition:
    background 0.18s,
    transform 0.18s;
}
button:hover {
  background: #f3c995;
  transform: translateY(-1px);
}
#enter {
  width: 100%;
  margin-top: 24px;
}
#message {
  font-size: 12px;
  line-height: 1.5;
  min-height: 36px;
  color: #ecc299;
  margin: 13px 0;
}
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.room {
  position: absolute;
  z-index: 2;
  top: 26px;
  left: 32px;
  right: 32px;
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 12px;
  text-shadow: 0 1px 8px #000;
}
.room strong {
  letter-spacing: 0.2em;
}
.room button {
  padding: 8px 12px;
  background: #12202bd9;
  color: #f5e8d0;
  font-size: 11px;
  pointer-events: auto;
}
.room button span {
  color: var(--amber);
  padding-left: 10px;
  font-family: monospace;
}
.room #count {
  margin-left: auto;
}
#pause {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #101923aa;
  pointer-events: auto;
  backdrop-filter: blur(4px);
}
h2 {
  font:
    normal clamp(28px, 4vw, 48px) Georgia,
    serif;
}
.quiet {
  background: transparent;
  color: #e5ddcc;
  font-size: 12px;
  margin-top: 16px;
}
.quiet:hover {
  background: #ffffff12;
}
#play-message {
  font-size: 12px;
}
.controls {
  font-size: 12px;
  color: #bcc4c8;
}
.controls kbd {
  margin: 0 5px 0 15px;
}
#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 24px;
  transform: translate(-50%, -50%);
}
#markers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.marker {
  position: absolute;
  transform: translate(-50%, -100%);
  font-size: 12px;
  background: #16212ad9;
  padding: 6px 9px;
  border-bottom: 2px solid var(--amber);
  white-space: nowrap;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 850px) {
  .lobby-columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .room-entry {
    max-width: 480px;
  }
}
@media (max-width: 600px) {
  #entry {
    padding: 24px;
  }
  .room {
    left: 14px;
    right: 14px;
    gap: 10px;
  }
  .controls {
    font-size: 8px;
  }
  .controls span {
    margin-right: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

kbd {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 22px;
  padding: 3px 5px;
  border: 1px solid #ffffff30;
  border-bottom-width: 2px;
  border-radius: 4px;
  color: #e6e5df;
  font:
    10px ui-monospace,
    monospace;
  line-height: 1;
}
.inventory {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 320px;
  height: 160px;
  font-size: 11px;
  color: #d0d4d3;
}
.inventory-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  border: 1px solid #ffffff35;
  border-radius: 5px;
  background: #0d171fed;
  box-shadow: 0 5px 24px #0005;
}
.inventory-slot {
  position: relative;
  width: 60px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 6px 4px 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #ffffff05;
  color: #aeb5b9;
  pointer-events: auto;
  font-size: 10px;
  font-weight: 500;
  transition:
    background 0.16s,
    border-color 0.16s,
    color 0.16s;
}
.inventory-slot:hover {
  background: #ffffff10;
  transform: none;
}
.inventory-slot[aria-pressed="true"] {
  border-color: #e8b47795;
  background: #e8b47717;
  color: #f5dfbd;
}
.inventory-slot kbd {
  position: absolute;
  top: 5px;
  left: 5px;
  min-width: 15px;
  font-size: 9px;
  padding: 2px 3px;
}
.inventory-slot > span,
.inventory-slot > small {
  display: none;
}
.item-icon {
  width: 46px;
  height: 33px;
  overflow: visible;
}
.inventory-slot[data-present="false"] .item-icon {
  opacity: 0.28;
}
.pack-paper {
  fill: #e9e2d2;
  stroke: #b5ac98;
  stroke-width: 1;
}
.pack-lid {
  fill: #f4edde;
}
.pack-band {
  fill: #9d593e;
}
.pack-mark {
  fill: #e6c9a1;
}
#pack-count {
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-size: 10px;
  color: #f4edde;
  text-shadow: 0 1px 3px #000;
}
.cig-paper {
  fill: #e9e2d2;
  transform: scaleX(var(--paper, 1));
  transform-origin: 20px 24px;
}
.cig-filter {
  fill: #bd8b51;
}
.cig-ember {
  stroke: #ffc78b;
  stroke-width: 3;
  opacity: 0;
}
.cig-smoke {
  stroke: #c5bca8;
  stroke-width: 1.3;
  fill: none;
  opacity: 0;
}
.inventory-slot[data-lit="true"] .cig-smoke {
  opacity: 0.6;
}
.inventory-slot[data-lit="true"] .cig-ember {
  opacity: 1;
  transform: translateX(calc((var(--paper, 1) - 1) * 33px));
}
.bottle-outline {
  fill: none;
  stroke: #c5d4c9;
  stroke-width: 1.5;
}
.bottle-label {
  fill: #b2ad96;
}
#bottle-icon-liquid {
  fill: #b58a4d;
  transition:
    y 0.12s,
    height 0.12s;
}
.breathing {
  position: absolute;
  bottom: 89px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  text-shadow: 0 1px 5px #000;
}
.breath-heading {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: #a5afb5;
}
.breath-heading svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #c5c7bd;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.lung-meter {
  height: 7px;
  border-radius: 3px;
  overflow: hidden;
  background: #101b26c9;
  border: 1px solid #ffffff35;
  margin: 5px 0 0;
}
#lung-fill {
  height: 100%;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition:
    transform 0.1s linear,
    background 0.2s;
}
#breath-state {
  position: absolute;
  top: 5px;
  right: 0;
  font-size: 9px;
  color: #9ba9b1;
}
.breathing[data-state="inhaling"] .breath-heading svg {
  stroke: var(--amber);
}
.breathing[data-state="recovering"] #lung-fill {
  background: #b8bdb1;
}
.breathing[data-state="recovering"] #breath-state {
  color: #e8b477;
}
.inventory-footer {
  position: absolute;
  bottom: 67px;
  left: 0;
  right: 0;
  text-align: center;
  color: #d9dedb;
  font-size: 10px;
  text-shadow: 0 1px 4px #000;
}
.inventory-menu {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: calc(100% + 10px);
  white-space: nowrap;
  font-size: 9px;
  color: #a9b3b9;
}
#gesture {
  letter-spacing: 0.13em;
}
.inventory-menu kbd {
  padding: 2px 4px;
  font-size: 8px;
}
.action-hints {
  position: absolute;
  bottom: 131px;
  left: 0;
  right: 0;
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  min-height: 27px;
  padding: 0 4px 8px;
  text-shadow: 0 1px 5px #000;
}
.action-hints > span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}
.action-hints kbd {
  background: #111d26e8;
}
#action-message {
  position: absolute;
  bottom: 162px;
  width: 100%;
  color: #ffcd9b;
  background: #111d26ed;
  border-left: 2px solid var(--amber);
  padding: 9px 12px;
  line-height: 1.5;
  border-radius: 3px;
}
#action-message:empty {
  display: none;
}
.world-hint {
  position: absolute;
  left: 50%;
  top: calc(50% + 32px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  background: #111d26ed;
  padding: 9px 14px 9px 9px;
  border-radius: 6px;
  font-size: 12px;
}
.world-hint kbd {
  color: var(--amber);
  border-color: #e8b47770;
}
@media (max-width: 600px) {
  .inventory {
    bottom: 8px;
    width: min(320px, calc(100vw - 24px));
  }
}

@media (max-height: 700px) {
  .inventory-slot {
    height: 44px;
  }
  .inventory-footer {
    bottom: 60px;
  }
}

.voice-panel {
  position: absolute;
  top: 76px;
  right: 32px;
  max-width: 300px;
  pointer-events: auto;
  font-size: 12px;
}
.voice-panel button,
.voice-panel select {
  font: inherit;
  padding: 8px 12px;
}
.voice-panel select {
  background: #15232d;
  color: #fff3d9;
  border: 1px solid #38444e;
}
.voice-panel label {
  display: inline;
}
#voice-status {
  color: #acb7be;
  margin: 8px 0;
}
#voice-level {
  width: 100%;
  height: 5px;
}
#voice-people {
  display: flex;
  flex-wrap: wrap;
}

.marker.speaking {
  color: #f6c982;
  border-bottom: 2px solid #f6c982;
}

/* Keep the bartender visible beside a compact, keyboard-accessible service menu. */
#bar-menu {
  position: fixed;
  inset: auto 4vw 24vh auto;
  margin: 0;
  width: min(340px, 90vw);
  padding: 24px;
  color: #f4e6cc;
  background: #15212bea;
  border: 1px solid #66716e;
  border-top: 3px solid #e7b47a;
  border-radius: 8px;
  box-shadow: 0 12px 36px #0007;
}
#bar-menu::backdrop {
  background: #06101724;
}
.bar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#bar-title {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
}
#bar-close {
  background: transparent;
  color: #c9d0cd;
  border: 0;
  padding: 6px;
  font-size: 13px;
}
#bar-close kbd {
  margin-left: 4px;
  font-size: 10px;
}
#bar-message {
  margin: 18px 0 20px;
  min-height: 2.6em;
  font-size: 16px;
  line-height: 1.4;
}
.bar-orders {
  display: grid;
  gap: 10px;
}
.bar-orders button {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  text-align: left;
  border: 1px solid #61716f;
  border-radius: 5px;
  background: #263943;
  color: #f4e6cc;
}
.bar-orders button:hover:enabled {
  background: #354951;
  border-color: #e7b47a;
}
.bar-orders button:disabled {
  opacity: 0.48;
  cursor: default;
}
.bar-orders svg {
  width: 32px;
  height: 46px;
  flex: none;
  color: #e7b47a;
}
.bar-orders strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
}
.bar-orders small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #c4cecb;
  line-height: 1.4;
}
#bar-menu button:focus-visible {
  outline: 2px solid #e7b47a;
  outline-offset: 3px;
}
#bartender-hint {
  position: fixed;
  left: 50%;
  top: 57%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #f4e6cc;
  background: #15212bdd;
  border-radius: 5px;
  font-size: 14px;
}
#bartender-hint[hidden] {
  display: none;
}
#bartender-hint kbd {
  border: 1px solid #e7b47a;
  border-radius: 3px;
  padding: 2px 5px;
}
@media (max-width: 600px) {
  #bar-menu {
    inset: auto 5vw 18vh;
    width: auto;
    padding: 18px;
  }
}

.bar-conversation #action-hints,
.bar-conversation #pickup-hint {
  visibility: hidden;
}

.game-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: #b4bdc4;
}
.game-audio input {
  width: 10rem;
  accent-color: #e8b676;
}

#hud:has(#pause:not([hidden]))
  :is(#bartender-hint, #pickup-hint, #action-hints) {
  visibility: hidden;
}

/* A directional ring keeps every gesture equally close to the pointer. */
#gesture-menu {
  width: min(500px, 94vw, 82dvh);
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  color: #f4e6cc;
  background: transparent;
}
#gesture-menu::backdrop {
  background: #06101745;
}
.gesture-wheel {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}
.gesture-sectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.gesture-sectors path {
  fill: #15212bef;
  stroke: #81908b70;
  stroke-width: 0.25;
}
.gesture-sectors path[data-selected="true"] {
  fill: #39403df5;
  stroke: #e7b47a;
  stroke-width: 0.7;
}
.gesture-sectors path[data-blocked="true"] {
  fill: #15212bc9;
}
#gesture-menu .gesture-choice {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 27%;
  height: 20%;
  padding: 0;
  background: transparent;
  border: 0;
  color: #f4e6cc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: clamp(11px, 2.5vw, 15px);
}
.gesture-choice strong {
  font-weight: 600;
}
.gesture-choice kbd {
  font-size: 11px;
  color: #9ba7ad;
}
#gesture-menu .gesture-choice[aria-disabled="true"] {
  color: #9ba7ad;
  cursor: default;
}
.gesture-choice[aria-disabled="true"] .gesture-symbol {
  opacity: 0.35;
}
#gesture-menu .gesture-choice[data-selected="true"] {
  color: #e7b47a;
}
.gesture-symbol {
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.1;
}
.gesture-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 36%;
  text-align: center;
}
#gesture-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: #9ba7ad;
}
#gesture-selection {
  margin: 0;
  font-size: clamp(14px, 3vw, 20px);
  font-weight: 600;
}
#gesture-detail {
  min-height: 2.5em;
  margin: 7px 0;
  font-size: 12px;
  color: #c9d0cd;
}
#gesture-close {
  background: #15212bdd;
  color: #f4e6cc;
  border: 0;
  border-radius: 4px;
  padding: 6px 9px;
  font-size: 12px;
}
#gesture-menu button:focus-visible {
  outline: 2px solid #e7b47a;
  outline-offset: 4px;
}
.gesture-controls {
  text-align: center;
  color: #c9d0cd;
  font-size: 12px;
  margin: 0;
  text-shadow: 0 1px 3px #000;
}
#gesture-open {
  background: transparent;
  border: 0;
  padding: 0;
  top: calc(50% - 21px);
  cursor: pointer;
  pointer-events: auto;
}

/* Storage and equipment share the same numbered slot geometry. */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 5px;
}
.slot-grid .inventory-slot {
  width: 54px;
  height: 54px;
  border-bottom: 2px solid var(--rarity, #ffffff18);
}
.slot-grid .inventory-slot output {
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-size: 12px;
  color: #f7f0df;
  text-shadow: 0 1px 3px #000;
}
#backpack {
  width: min(620px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid #69747c;
  background: #111c25;
  color: #f7f0df;
  border-radius: 8px;
}
#backpack::backdrop {
  background: #050c16b8;
}
#backpack .slot-grid .inventory-slot {
  width: 100%;
  height: 56px;
}
#backpack .inventory-slot[aria-pressed="true"] {
  outline: 2px solid #e8b477;
}
#backpack h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 24px 0 10px;
}
.backpack-help {
  font-size: 13px;
  color: #b0b8bc;
  line-height: 1.6;
  margin: 12px 0 22px;
}
#backpack-item {
  min-height: 20px;
  color: #e8b477;
  font-size: 13px;
  margin-bottom: 0;
}
.inventory-bar {
  flex-wrap: wrap;
  width: 542px;
  justify-content: center;
}
#hotbar {
  flex-basis: 100%;
}
.inventory-menu {
  position: static;
  transform: none;
  padding: 4px 9px;
}
.breathing {
  position: absolute;
  bottom: calc(100% + 38px);
  left: 50%;
  transform: translateX(-50%);
}
.inventory-footer {
  bottom: 85px;
  white-space: nowrap;
}
.action-hints {
  bottom: 112px;
}
@media (max-width: 620px) {
  .inventory-bar {
    width: min(95vw, 480px);
  }
  #hotbar .inventory-slot {
    width: 100%;
    height: 46px;
  }
  .item-icon {
    width: 36px;
  }
  #backpack {
    padding: 14px;
  }
}

#trade-panel {
  border-top: 1px solid #ffffff24;
  margin-top: 20px;
  padding-top: 4px;
  font-size: 13px;
  color: #c0c6c8;
}
#trade-panel button {
  margin: 4px 8px 4px 0;
  padding: 8px 12px;
  font-size: 12px;
}
#trade-panel p {
  line-height: 1.5;
}
.trade-offers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}
.trade-offers > div {
  padding: 12px;
  background: #ffffff06;
  border: 1px solid #ffffff15;
  border-radius: 4px;
}
.trade-offers ul {
  padding-left: 16px;
  line-height: 1.6;
}
#trade-notice {
  position: absolute;
  bottom: 190px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  pointer-events: auto;
}
#backpack-error {
  color: #edba60;
  min-height: 20px;
}
#backpack {
  max-height: 90vh;
  overflow-y: auto;
}

#machine-info {
  position: absolute;
  right: 24px;
  bottom: 145px;
  padding: 18px;
  width: 210px;
  background: #111c25ed;
  border: 1px solid #aa7849;
  border-radius: 5px;
  font-size: 12px;
}
#machine-info strong {
  color: #e8b477;
  letter-spacing: 0.12em;
}
#machine-info dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  color: #c0c6c8;
  margin-bottom: 0;
}
#machine-info dd {
  margin: 0;
}

#smoking-effect {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Collection shelves preserve the backpack's dark metal and warm paper palette. */
.backpack-pages {
  display: flex;
  gap: 0.5rem;
  margin: 0.6rem 0 1rem;
}
.backpack-pages button {
  background: transparent;
  color: #b4c0c8;
  border-bottom: 3px solid transparent;
}
.backpack-pages button[aria-pressed="true"] {
  color: #edba77;
  border-color: #edba77;
}
#collection-count {
  margin-left: 0.5rem;
  font-variant-numeric: tabular-nums;
}
#collection-shelves {
  display: grid;
  gap: 1.1rem;
}
#backpack .collection-shelf h3 {
  display: flex;
  justify-content: space-between;
  text-transform: none;
  letter-spacing: normal;
  margin: 0 0 0.4rem;
}
.collection-shelf h3 span {
  color: #b4c0c8;
  font-weight: normal;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.collection-pack {
  padding: 0.7rem;
  background: #24313b;
  border-bottom: 2px solid #52606a;
}
.collection-pack .item-icon {
  display: block;
  width: 100%;
  height: 78px;
}
.collection-pack h4 {
  margin: 0.3rem 0;
  font-size: 0.95rem;
}
.collection-pack p {
  margin: 0;
  color: #c1cbd2;
  font-size: 0.8rem;
  line-height: 1.4;
}
.collection-pack.undiscovered {
  background: #1b252d;
  border-color: #36414a;
}
.collection-pack.undiscovered h4,
.collection-pack.undiscovered p {
  color: #8e9ba5;
}
@media (max-width: 480px) {
  .collection-grid {
    gap: 0.35rem;
  }
  .collection-pack {
    padding: 0.4rem;
  }
  .collection-pack h4 {
    font-size: 0.8rem;
  }
  .collection-pack p {
    font-size: 0.72rem;
  }
}

#save-status {
  position: fixed;
  z-index: 6000;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 34rem;
  padding: 1rem;
  background: #382d1e;
  color: #f0d7af;
  border: 1px solid #be965e;
}
