.dressing-orbit {
  position: fixed;
  inset: 0;
  z-index: 60;
  touch-action: none;
  cursor: grab;
  background: transparent;
}
.dressing-orbit:active {
  cursor: grabbing;
}
.dressing-orbit[hidden],
.dressing[hidden] {
  display: none;
}
.dressing {
  position: fixed;
  z-index: 61;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(440px, 44vw);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--parchment);
  color: var(--ink);
  box-shadow: var(--bevel), var(--ledge);
  font: 14px/1.45 var(--read);
  text-shadow: none;
}
.dressing-head {
  flex: none;
  padding: 14px 16px 2px;
}
.dressing-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 16px 10px;
}
.dressing-foot {
  flex: none;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 16px 12px;
  border-top: 2px solid var(--ink);
  background: var(--parchment);
  border-radius: 0 0 9px 9px;
  box-shadow: 0 -3px 0 rgba(43, 29, 14, 0.12);
}
.dressing-head h2 {
  margin: 0;
  color: #a8436b;
  font: 20px/1.3 var(--blocks);
}
.dressing-hint {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: .85;
}
.dressing-stations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dressing-station {
  flex: 1 1 0;
  min-width: auto;
  min-height: 40px;
  padding: 6px 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 700 13px/1.2 var(--read);
  cursor: pointer;
}
.dressing-station[aria-pressed=true] {
  background: #f2c6d6;
  outline: 3px solid #a8436b;
  outline-offset: -3px;
}
.dressing-choices {
  flex: none;
  position: relative;
}
.dressing-show-gear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.dressing-show-gear input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--leaf-deep);
  color-scheme: light;
}
.dressing p {
  margin: 0;
}
.dressing-cost:empty,
.dressing-status:empty {
  display: none;
}
.dressing-own {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dressing-own:empty {
  display: none;
}
.dressing-own-buy {
  min-height: 36px;
  padding: 4px 10px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: 700 12px var(--read);
  cursor: pointer;
}
.dressing-cost,
.dressing-status {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.dressing-actions {
  display: flex;
  gap: 10px;
}
.dressing-actions button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 46px;
  padding: 8px 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  hyphens: auto;
  font: 700 15px var(--read);
  border: 2px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
}
.dressing-actions .dressing-done {
  flex-grow: 2;
  background: var(--evergreen);
  color: var(--paper);
}
.dressing-actions button:disabled {
  opacity: .55;
  cursor: default;
}
.dressing :focus-visible {
  outline: 3px solid var(--leaf-deep);
  outline-offset: 2px;
}
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .dressing {
    top: auto;
    left: 6px;
    right: 6px;
    bottom: 6px;
    width: auto;
    max-height: max(46dvh, min(300px, 62dvh));
    border-radius: 12px 12px 8px 8px;
  }
  .dressing-head {
    padding: 10px 12px 0;
  }
  .dressing-body {
    gap: 5px;
    padding: 6px 12px 8px;
  }
  .dressing-foot {
    padding: 6px 12px 8px;
    border-radius: 0 0 5px 5px;
  }
  .dressing-head h2 {
    font-size: 17px;
  }
  .dressing-hint {
    display: none;
  }
  .dressing-station {
    min-height: 38px;
    font-size: 12px;
    padding: 4px 6px;
  }
  .dressing-actions button {
    min-height: 44px;
    padding: 6px 10px;
    font-size: 14px;
  }
  .dressing-status {
    font-size: 12px;
    line-height: 1.3;
  }
}
body.dressing-on #game > :not(#view) {
  visibility: hidden !important;
}
