/* Native frames retain their corners at every control size and density. */
:is(
  .subtle-button,
  .enter-button,
  .page-controls button,
  .stock-pager button,
  .storage-tabs button,
  .armory-storage-tabs button,
  .storage-footer button,
  .monster-card button,
  .enemy-card button,
  .bestiary-card button,
  .talent-plus,
  .cube-recipes,
  .weapon-swap
) {
  background-image: none !important;
  background-color: transparent !important;
  border: 1px solid transparent;
  border-image-source: var(--control-art);
  border-image-slice: 24% 14% fill;
  border-image-width: 9px 20px;
  border-image-repeat: stretch;
  border-image-outset: 0;
  box-shadow: none !important;
  transform: none !important;
  animation: none !important;
  transition: color 0.08s linear;
  image-rendering: auto;
}
:is(
  .storage-tabs button,
  .storage-footer button,
  .monster-card button,
  .talent-plus,
  .weapon-swap
) {
  border-image-width: 6px 9px;
}
.enter-button:before,
.enter-button:after {
  display: none;
}
.select-trigger,
.select-options {
  animation: none;
  transform: none;
  transition: color 0.08s linear;
}
.select-options[popover] {
  margin: 0;
  inset: auto;
  box-sizing: border-box;
}
.select-options {
  overscroll-behavior: contain;
  max-width: calc(100vw - 16px);
}
.select-trigger img,
.select-options img,
.class-icon,
.brand-art,
.splash-head,
.native-paperdoll,
.native-storage,
.grid-item img,
.paper-slot img,
.item-tip img {
  image-rendering: auto;
}
.active-picker-panel:hover,
.active-picker-panel:focus-within {
  border-color: #c8ac6e;
  background-color: #33301e;
  box-shadow: inset 0 0 15px #b08d3420;
}
.native-storage .storage-label.storage-tabs {
  left: 15px;
  right: 15px;
  top: 8px;
  height: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.native-storage .storage-label.vendor-categories {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.native-storage .storage-label.storage-tabs button {
  width: 100%;
  height: 24px;
  min-height: 24px;
  padding: 1px 4px;
  line-height: 20px;
  font-size: 10px;
  letter-spacing: 0;
  border: 1px solid transparent;
  border-image-width: 5px 7px;
}
.native-storage .storage-label.vendor-categories button {
  padding-inline: 2px;
  font-size: 9px;
  border-image-width: 5px;
}
.cube-recipes {
  --control-up: var(--native-book-button-0);
  --control-over: var(--native-book-button-1);
  --control-down: var(--native-book-button-1);
  --control-disabled: var(--native-book-button-1);
  right: 11px;
  bottom: 11px;
  left: auto;
  top: auto;
  width: 38px;
  height: 38px;
  padding: 5px;
  border-image-slice: 25% 12% fill;
  border-image-width: 5px 8px;
}
.cube-recipes img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px #000);
}
.inventory-gold,
.stash-gold {
  justify-content: flex-start;
  text-align: left;
}
.inventory-gold output,
.stash-gold output {
  flex: 1;
  text-align: left;
  align-self: center;
  padding-left: 3px;
}
.item-sockets {
  display: none;
  position: absolute;
  inset: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  height: max-content;
  grid-template-columns: repeat(var(--socket-cols, 2), 24px);
  align-content: center;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
}
.item-sockets > span {
  width: 24px;
  height: 24px;
  justify-self: center;
}
.item-sockets[data-odd="true"] > span:last-child {
  grid-column: 1/-1;
}
.item-sockets img {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
}
.socket-mark {
  display: none !important;
}
.grid-item:is(:hover, .selected, :focus-visible) .item-sockets,
.paper-slot:is(:hover, .selected, :focus-visible) .item-sockets,
.result-item:is(:hover, .selected, :focus-visible) .item-sockets {
  display: grid;
}
.drop-preview {
  display: grid;
  position: absolute;
  pointer-events: none;
  z-index: 15;
  border: 1px solid #b7d774;
}
.drop-preview i {
  border: 1px solid #b7d774;
  background: #82b34244;
}
.drop-preview.invalid {
  border-color: #d55e45;
}
.drop-preview.invalid i {
  border-color: #d55e45;
  background: #ad3e304d;
}
.drop-valid {
  outline: 2px solid #b7d774 !important;
  background-color: #82b34244 !important;
}
.drop-invalid {
  outline: 2px solid #d55e45 !important;
  background-color: #ad3e304d !important;
}
.result-loot {
  flex-wrap: wrap;
  max-height: 160px;
  overflow: auto;
  padding: 4px;
}
.result-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 94px;
  flex: 0 0 64px;
  padding: 3px;
  background: #12110cd9;
  border: 1px solid #79613e;
}
.result-item:hover,
.result-item.selected,
.result-item:focus-visible {
  border-color: #d4bc7e;
  background: #302817;
}
.result-loot .result-item > img {
  border: 0;
  padding: 0;
  width: var(--art-width);
  height: var(--art-height);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: auto;
}
.coffee-button {
  width: auto;
  min-width: 0;
  gap: 6px;
  padding: 5px 9px;
  color: #cfb67c;
  white-space: nowrap;
}
.coffee-button span {
  font: 11px var(--body);
}
.coffee-button svg {
  flex: none;
  width: 19px;
  height: 21px;
}
.settings-dialog.options-dialog {
  display: flex;
  flex-direction: column;
  width: min(760px, 94vw);
  height: min(700px, 92dvh);
  max-height: 92dvh;
  overflow: hidden;
  padding: 24px;
}
.settings-title {
  display: flex;
  align-items: center;
  min-height: 34px;
  flex: none;
}
.settings-title h2 {
  margin: 0;
  text-align: left;
}
.settings-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  flex: none;
  margin: 14px 0;
}
.settings-tabs button {
  height: 36px;
  padding: 6px 10px;
}
.settings-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #8a724b #15130e;
  padding: 0 10px 10px 0;
}
.settings-scroll h3 {
  font: 15px var(--heading);
  color: #d1b780;
  margin: 20px 0 10px;
}
.settings-scroll .controls-table {
  font-size: 12px;
  margin-bottom: 15px;
  line-height: 1.6;
}
.settings-scroll .options-sections {
  margin: 3px 0 14px;
}
.settings-scroll .credits p {
  line-height: 1.8;
}
.settings-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex: none;
  margin-top: 14px;
  min-height: 42px;
}
.settings-footer > div {
  min-height: 42px;
  min-width: 150px;
}
.settings-footer .enter-button {
  width: 160px;
  min-height: 42px;
  padding: 8px 18px;
}
.settings-footer .subtle-button {
  min-height: 42px;
}
.spectator-controls {
  position: absolute;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #7c6643;
  background: #100e0bea;
  color: #d3bd86;
  pointer-events: auto;
  white-space: nowrap;
}
.spectator-controls span {
  min-width: 95px;
  max-width: 220px;
  text-align: center;
}
.spectator-controls strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spectator-controls small,
.spectator-controls strong {
  display: block;
}
.spectator-controls small {
  font-size: 10px;
  color: #8f8063;
  margin-bottom: 4px;
}
.spectator-controls button {
  min-width: 34px;
  height: 32px;
  padding: 4px 9px;
  border-image-width: 6px 9px;
}
.spectator-controls button:last-child {
  min-width: 130px;
}
.stock-pager button,
.page-controls button {
  border-image-width: 6px 9px;
}
.native-control-hints.spectating {
  visibility: hidden;
}
.native-hit:disabled {
  pointer-events: none;
}
@media (max-width: 700px) {
  .masthead {
    grid-template-rows: 64px 32px;
  }
  .masthead .brand {
    grid-column: 1/-1;
    grid-row: 1;
  }
  .masthead .header-actions {
    grid-column: 1/-1;
    grid-row: 2;
    justify-self: end;
  }
  .masthead .header-actions .coffee-button {
    width: auto;
  }
  .coffee-button span {
    font-size: 10px;
  }
  .settings-dialog.options-dialog {
    padding: 18px;
    width: 94vw;
  }
  .settings-scroll .controls-table {
    font-size: 11px;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .spectator-controls {
    max-width: 94vw;
    gap: 5px;
    bottom: 115px;
    padding: 6px;
  }
  .spectator-controls span {
    min-width: 95px;
  }
  .spectator-controls button {
    font-size: 10px;
  }
}
