.exchange-panel {
  position: absolute; left: 321px; top: 113px; width: 734px; height: 558px;
  color: #483526; font: 24px/1.25 var(--serif, "Songti SC", serif);
  background: url("../assets/exchange/paper.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 5px 8px #2f26354a);
}
.exchange-panel button {
  cursor: pointer; color: inherit; font: inherit; border: 0; padding: 0; margin: 0;
  background-color: transparent; background-position: center; background-size: 100% 100%; background-repeat: no-repeat;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.exchange-panel button:focus-visible, .exchange-panel input:focus-visible {
  outline: 2px solid #79578b; outline-offset: 1px; border-radius: 22px;
}
.exchange-panel button:disabled { cursor: default; opacity: .48; }
.exchange-panel button:not(:disabled):active { transform: translateY(1px); }
.exchange-panel .exchange-close {
  position: absolute; z-index: 2; right: 9px; top: 12px; width: 45px; height: 43px;
  background-image: url("../assets/exchange/close.webp"); background-size: 39px 37px;
}
.exchange-tabs {
  position: absolute; left: 37px; top: 48px; display: flex; height: 58px;
  align-items: center; border-bottom: 1px solid #b8a48a4f;
}
.exchange-tabs button { position: relative; width: 190px; height: 57px; font-weight: 600; font-size: 26px; }
.exchange-tabs button + button { width: 163px; }
.exchange-tabs button[aria-selected="true"] {
  background-image: url("../assets/exchange/tab.webp"); filter: drop-shadow(0 2px 3px #8f785347);
}
.exchange-wallet { position: absolute; display: flex; gap: 1px; left: 419px; top: 76px; align-items: center; }
.exchange-wallet span {
  height: 41px; display: grid; align-items: center; justify-content: center; white-space: nowrap;
  padding-left: 28px; color: #fff9ec; font: 19px/1 var(--serif, "Songti SC", serif);
  font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #615648;
  background-position: center; background-size: 100% 100%; background-repeat: no-repeat;
  filter: drop-shadow(0 2px 2px #685c604d);
}
.exchange-pages { width: 139px; background-image: url("../assets/exchange/pages-wallet.webp"); }
.exchange-wallet .exchange-tickets { width: 150px; padding-left: 31px; background-image: url("../assets/exchange/tickets-wallet.webp"); }
.exchange-body[hidden] { display: none; }
.exchange-body { position: absolute; inset: 0; pointer-events: none; }
.exchange-body button, .exchange-body input { pointer-events: auto; }
.exchange-item {
  position: absolute; top: 126px; display: flex; flex-direction: column; align-items: center;
  width: 190px; font-size: 28px; font-weight: 500; line-height: 1.25; white-space: nowrap;
}
.exchange-item b { font-weight: inherit; }
.exchange-item.is-pages { left: 133px; }
.exchange-item.is-tickets { left: 410px; }
.exchange-illustration { width: 172px; height: 164px; background: center / contain no-repeat; }
.exchange-item.is-pages .exchange-illustration { background-image: url("../assets/exchange/page-art.webp"); }
.exchange-item.is-tickets .exchange-illustration { width: 176px; background-image: url("../assets/exchange/ticket-art.webp"); }
.exchange-arrow {
  position: absolute; left: 320px; top: 175px; width: 93px; height: 68px;
  background: url("../assets/exchange/arrow.webp") center / contain no-repeat;
}
.exchange-quantity {
  position: absolute; left: 66px; right: 85px; top: 355px; height: 49px; display: grid;
  grid-template-columns: 109px 47px minmax(0,1fr) 48px 89px; gap: 4px; align-items: center;
}
.exchange-quantity label { justify-self: end; margin-right: 6px; white-space: nowrap; pointer-events: auto; font-size: 24px; }
.exchange-count { font-size: .77em; font-variant-numeric: tabular-nums; }
.exchange-quantity button { width: 100%; height: 49px; filter: drop-shadow(0 2px 2px #685c6040); }
.exchange-quantity [data-exchange="minus"] { background-image: url("../assets/exchange/minus.webp"); }
.exchange-quantity [data-exchange="plus"] { background-image: url("../assets/exchange/plus.webp"); }
.exchange-quantity [data-exchange="max"] { background-image: url("../assets/exchange/max.webp"); }
.exchange-quantity input {
  --exchange-progress: 0%; width: 100%; min-width: 0; height: 40px; margin: 0; padding: 0;
  appearance: none; align-self: center; background: transparent; cursor: pointer; touch-action: pan-y;
}
.exchange-quantity input:disabled { cursor: default; }
.exchange-quantity input::-webkit-slider-runnable-track {
  height: 13px; border-radius: 8px; border: 1px solid #c9c0bd;
  background: linear-gradient(90deg, #d5b971 0, #f3d79b var(--exchange-progress), #c7c0bc var(--exchange-progress), #c7c0bc);
  box-shadow: inset 0 1px 3px #8d7f6d66, 0 1px 1px #fff9f0;
}
.exchange-quantity input::-webkit-slider-thumb {
  appearance: none; margin-top: -10px; width: 33px; height: 33px; border: 0;
  background: url("../assets/exchange/knob.webp") center / contain no-repeat; filter: drop-shadow(0 2px 2px #6951356b);
}
.exchange-quantity input::-moz-range-track {
  height: 11px; border: 1px solid #c9c0bd; border-radius: 8px; background: #c7c0bc;
}
.exchange-quantity input::-moz-range-progress { height: 11px; border-radius: 8px; background: #ddc38a; }
.exchange-quantity input::-moz-range-thumb {
  width: 33px; height: 33px; border: 0; background: url("../assets/exchange/knob.webp") center / contain no-repeat;
}
.exchange-cost, .exchange-supply-note {
  position: absolute; left: 20px; right: 20px; top: 406px; margin: 0;
  font-size: 24px; text-align: center; font-variant-numeric: tabular-nums;
}
.exchange-supply-note { top: 374px; color: #78634d; }
.exchange-actions { position: absolute; left: 106px; right: 104px; top: 455px; display: flex; justify-content: space-between; }
.exchange-actions button { width: 244px; height: 74px; font-size: 31px; font-weight: 550; filter: drop-shadow(0 3px 3px #6a514643); }
.exchange-actions .exchange-secondary { background-image: url("../assets/exchange/cancel.webp"); }
.exchange-actions .exchange-primary { background-image: url("../assets/exchange/confirm.webp"); }
@media (hover:hover) { .exchange-panel button:not(:disabled):hover { filter: brightness(1.05) drop-shadow(0 2px 2px #97734d40); } }
.portrait .exchange-panel { left: 12px; top: 50%; width: 396px; height: 463px; transform: translateY(-50%); }
.portrait .exchange-panel .exchange-close { right: 8px; top: 5px; width: 42px; height: 42px; background-size: 33px 31px; }
.portrait .exchange-tabs { top: 23px; left: 17px; height: 46px; }
.portrait .exchange-tabs button, .portrait .exchange-tabs button + button { width: 139px; height: 44px; font-size: 21px; }
.portrait .exchange-wallet { top: 74px; left: 45px; right: 45px; gap: 4px; justify-content: center; }
.portrait .exchange-wallet span { height: 33px; font-size: 16px; }
.portrait .exchange-pages { width: 121px; }
.portrait .exchange-wallet .exchange-tickets { width: 131px; }
.portrait .exchange-item { width: 145px; top: 112px; font-size: 23px; }
.portrait .exchange-item.is-pages { left: 30px; }
.portrait .exchange-item.is-tickets { left: 221px; }
.portrait .exchange-illustration, .portrait .exchange-item.is-tickets .exchange-illustration { width: 143px; height: 135px; }
.portrait .exchange-arrow { left: 171px; top: 157px; width: 54px; height: 41px; }
.portrait .exchange-quantity { left: 14px; right: 14px; top: 297px; height: 43px; grid-template-columns: 66px 38px minmax(0,1fr) 38px 66px; gap: 2px; }
.portrait .exchange-quantity label { font-size: 18px; margin-right: 1px; }
.portrait .exchange-quantity button { height: 41px; }
.portrait .exchange-cost, .portrait .exchange-supply-note { top: 349px; font-size: 19px; }
.portrait .exchange-supply-note { top: 311px; }
.portrait .exchange-actions { left: 20px; right: 20px; top: 383px; }
.portrait .exchange-actions button { width: 171px; height: 56px; font-size: 24px; }
.exchange-feedback {
  position: absolute; top: 329px; left: 24px; right: 24px; margin: 0; color: #6a4a30;
  font-size: 17px; font-weight: 600; text-align: center; pointer-events: none;
}
.portrait .exchange-feedback { top: 277px; left: 12px; right: 12px; font-size: 15px; }
