:root {
  --tool-yellow: #ffba14;
  --warehouse-ink: #10191c;
}
.warehouse-header {
  background: #101a1e;
}
#warehouse-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: calc(100vh - 58px);
  height: calc(100dvh - 58px);
  min-height: 300px;
  background: radial-gradient(ellipse at 55% 37%, #443e31, #151f24 71%);
}
#warehouse-view,
.warehouse-arrival {
  display: block;
  width: 100%;
  height: 100%;
}
#warehouse-view {
  touch-action: none;
}
#warehouse-view:focus-visible {
  outline-offset: -4px;
}
.warehouse-arrival {
  position: absolute;
  inset: 0;
  object-fit: cover;
  pointer-events: none;
}
.aisle-navigation {
  position: absolute;
  left: clamp(14px, 3.1vw, 55px);
  top: clamp(12px, 2.8vh, 30px);
  display: flex;
  align-items: center;
  gap: 3px;
  background: #101c21f0;
  border: 1px solid #69726e;
  border-radius: 5px;
  padding: 3px;
}
.aisle-navigation button {
  appearance: none;
  background: none;
  color: #e7ece8;
  border: 0;
  padding: 9px 12px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
}
.aisle-navigation [aria-pressed='true'] {
  background: #eed6a5;
  color: #2d2821;
  font-weight: 650;
}
.aisle-navigation button:hover {
  background: #495249;
  color: white;
}
.warehouse-status {
  position: absolute;
  top: 65px;
  left: clamp(14px, 3.1vw, 55px);
  margin: 0;
  padding: 6px 10px;
  background: #101c22ed;
  border: 1px solid #57646a;
  border-radius: 3px;
  font-size: 12px;
  max-width: calc(100% - 30px);
}
.warehouse-console {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  pointer-events: none;
  background: linear-gradient(transparent, #071014ba 60%, #081215f7);
  padding: 60px clamp(16px, 3.5vw, 66px) max(23px, env(safe-area-inset-bottom));
}
.warehouse-heading h1 {
  font-size: clamp(35px, 4.7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.066em;
  font-weight: 550;
  margin: 0;
}
.warehouse-heading p {
  font-size: clamp(12px, 1.05vw, 17px);
  color: #dfe7e8;
  margin: 9px 0 0;
}
.warehouse-actions {
  display: flex;
  align-items: stretch;
  gap: 7px;
  pointer-events: auto;
}
.warehouse-actions button,
.warehouse-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 clamp(13px, 1.4vw, 23px);
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font:
    600 14px/1.25 Geist,
    system-ui,
    sans-serif;
}
#shelf-list-button {
  background: #112126e8;
  border: 1px solid #729096;
  color: #e3f2ef;
}
#shelf-list-button:hover {
  border-color: #a9e0e5;
}
#open-order {
  gap: 9px;
  background: var(--tool-yellow);
  color: #202323;
  border: 1px solid #ffcc62;
}
#open-order:hover {
  background: #ffca49;
}
#order-count {
  font:
    600 11px/1 Plex,
    monospace;
  color: #fff8e6;
  background: #253032;
  border-radius: 3px;
  min-width: 20px;
  text-align: center;
  padding: 4px;
}
.pick-feedback {
  position: absolute;
  right: clamp(16px, 3.5vw, 66px);
  bottom: calc(100% - 43px);
  margin: 0;
  border-left: 3px solid var(--tool-yellow);
  background: #101d21ed;
  color: #fff4d9;
  padding: 8px 13px;
  font-size: 13px;
  border-radius: 2px;
  max-width: calc(100% - 32px);
}
.pick-feedback:empty {
  display: none;
}
#portal {
  min-height: calc(100dvh - 58px);
  background: #ebede8;
  color: #202628;
  padding: 0 0 max(24px, env(safe-area-inset-bottom));
  color-scheme: light;
}
.portal-nav {
  max-width: 1480px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 clamp(12px, 3vw, 50px);
}
.portal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #254650;
  font-size: 12px;
  text-decoration: none;
}
.portal-nav a:hover,
.sheet-foot a:hover {
  text-decoration: underline;
}
#order-host {
  max-width: 1420px;
  width: 94%;
  margin: auto;
  outline: none;
}
dialog {
  color-scheme: light;
  color: #17262b;
  background: #f6f5ee;
  width: min(540px, 94vw);
  max-height: 86dvh;
  overflow: auto;
  margin: auto;
  padding: clamp(16px, 2.2vw, 28px);
  border: 1px solid #839392;
  border-radius: 6px;
  box-shadow: 0 20px 80px #020a10aa;
}
dialog::backdrop {
  background: #071319bd;
  backdrop-filter: blur(4px);
}
.sheet-head,
.sheet-foot,
.tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sheet-head {
  border-bottom: 2px solid #d7ac40;
  padding-bottom: 12px;
}
.sheet-head h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.05em;
  font-weight: 600;
}
.close-sheet,
.pick-tool,
.find-tool {
  border-radius: 3px;
  cursor: pointer;
}
.close-sheet {
  border: 1px solid #b6c4c3;
  background: transparent;
  font-size: 20px;
  color: #19353a;
  width: 35px;
  height: 35px;
}
.tool-row {
  padding: 9px 0;
  border-bottom: 1px solid #cbd3cd;
  gap: 8px;
}
.tool-copy {
  flex: 1;
  min-width: 0;
}
.tool-copy strong,
.tool-copy small {
  display: block;
}
.tool-thumb {
  width: 49px;
  height: 42px;
  object-fit: contain;
  mix-blend-mode: multiply;
  border-radius: 3px;
}
.tool-copy strong {
  font-size: 15px;
}
.tool-copy small,
.system-link small {
  font:
    10px Plex,
    monospace;
  color: #53686d;
  margin-top: 4px;
}
.find-tool,
.pick-tool {
  font:
    600 12px Geist,
    sans-serif;
  padding: 9px 11px;
  min-height: 35px;
}
.find-tool {
  color: #29434a;
  background: transparent;
  border: 1px solid #b5c1bd;
}
.pick-tool {
  color: #2c291a;
  background: var(--tool-yellow);
  border: 1px solid #de9e04;
}
.sheet-foot {
  margin-top: 15px;
  flex-wrap: wrap;
}
.sheet-foot a {
  font-size: 13px;
  font-weight: 600;
  color: #254c56;
  text-decoration: none;
}
#list-feedback {
  font-size: 12px;
  color: #355458;
}
.system-link {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid #cbd3cd;
  color: #223132;
  text-decoration: none;
}
.system-link:hover strong {
  text-decoration: underline;
}
.system-link small {
  margin-left: 8px;
}
.system-link p {
  font-size: 13px;
  line-height: 1.45;
  margin: 5px 0 0;
  color: #4c5e62;
}
.no-script {
  padding: 24px;
}
#warehouse-stage[data-renderer='unavailable'] .aisle-navigation,
body:has(#warehouse-stage[data-renderer='unavailable']) .tool-row .find-tool {
  display: none;
}
@media (max-width: 440px) {
  .tool-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 0 9px;
    padding: 6px 0;
  }
  .tool-thumb {
    grid-area: 1/1/3/2;
    width: 40px;
    height: 41px;
  }
  .tool-copy {
    grid-area: 1/2/2/3;
  }
  .tool-copy strong {
    font-size: 14px;
  }
  .tool-row .find-tool {
    grid-area: 2/2/3/3;
    justify-self: start;
    border: 0;
    padding: 0;
    min-height: 25px;
    text-decoration: underline;
    font-size: 11px;
  }
  .tool-row .pick-tool {
    grid-area: 1/3/3/4;
  }
}
@media (max-width: 690px) {
  .warehouse-console {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
    padding-top: 38px;
    padding-bottom: max(15px, env(safe-area-inset-bottom));
  }
  .warehouse-actions {
    gap: 6px;
  }
  .warehouse-heading p {
    margin-top: 5px;
  }
  .warehouse-actions a,
  .warehouse-actions button {
    min-height: 40px;
  }
  .aisle-navigation button {
    padding: 8px 10px;
    font-size: 11px;
  }
  .pick-feedback {
    bottom: calc(100% - 24px);
    left: 16px;
    right: auto;
  }
}
@media (max-width: 620px) {
  #warehouse-stage {
    height: calc(100dvh - 50px);
  }
  #order-host {
    width: calc(100% - 14px);
  }
  #portal {
    min-height: calc(100dvh - 50px);
  }
}
@media (max-width: 425px) {
  .warehouse-header nav {
    gap: 10px;
    font-size: 10px;
  }
  .warehouse-header .back-chamber {
    gap: 4px;
  }
  .warehouse-header .forge-prefix {
    display: none;
  }
  .warehouse-heading h1 {
    font-size: 35px;
  }
}
@media (max-width: 370px) {
  .warehouse-header {
    padding-inline: 8px;
    gap: 4px;
  }
  .warehouse-header nav {
    gap: 8px;
    white-space: nowrap;
  }
  .warehouse-header .back-chamber {
    font-size: 11px;
    white-space: nowrap;
  }
  .warehouse-header .back-chamber img {
    width: 20px;
    height: 20px;
  }
}
@media (max-height: 510px) and (orientation: landscape) {
  .warehouse-header {
    height: 42px;
  }
  #warehouse-stage {
    height: calc(100dvh - 42px);
    min-height: 225px;
  }
  .warehouse-console {
    flex-direction: row;
    align-items: end;
    padding: 20px 14px 8px;
  }
  .warehouse-heading h1 {
    font-size: 25px;
  }
  .warehouse-heading p {
    font-size: 11px;
  }
  .aisle-navigation {
    top: 8px;
    left: 14px;
  }
}
