/*
  [server extension] 收银台 (index.html / cashier.js; the owner, 2026-10-19: 收银台高级, 卡片 内容 字体 布局, 支付通道自动排列自适应): over
  site.css. The hero's 排行 plaque; the checkout as the three steps beside a sticky order card (one column below 1024 px, with a pay bar
  at the foot); the step seals (壹 贰 叁); the account's characters with their class portraits; the product tabs and cards (a coin
  product shows the client's shop coin art by its tier, the others their rewards as the game's item slots by grade); the methods any open
  channel takes, then the channels that take the one picked; the coin pass; the order card.
*/

.hero--cashier {
  --hero-art: url('/cashier/art/hero-cashier.webp');
}

/* ---- the 排行 plaque ---- */

.plaque {
  position: relative;
  display: flex;
  flex: none;
  gap: 4px;
  align-items: center;
  padding: 10px 26px 10px 10px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 0% 0%, rgb(216 178 106 / 20%), transparent 60%),
    linear-gradient(135deg, rgb(26 31 42 / 92%), rgb(10 12 17 / 94%));
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / 6%);
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s ease;
}

.plaque:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.plaque__flag {
  width: 58px;
  height: auto;
  margin: -6px 0;
  filter: drop-shadow(0 6px 14px rgb(0 0 0 / 60%));
}

.plaque__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plaque__title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold-hi);
}

.plaque__sub {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.plaque__go {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}

.plaque__go svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  transition: transform 0.3s var(--ease);
}

.plaque:hover .plaque__go svg {
  transform: translateX(4px);
}

/* ---- the checkout ---- */

.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.checkout__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.checkout__side {
  position: sticky;
  top: 88px;
}

.step {
  padding: 24px 26px 26px;
}

.step__head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.step__no {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-hi);
  background:
    radial-gradient(circle at 30% 25%, rgb(255 255 255 / 18%), transparent 60%),
    linear-gradient(160deg, var(--red), var(--red-dark));
  border: 1px solid rgb(255 150 120 / 35%);
  border-radius: 10px;
  box-shadow: 0 6px 16px -6px rgb(218 30 21 / 80%);
  transform: rotate(-4deg);
}

.step__title {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.step__sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.account {
  display: flex;
  gap: 10px;
}

/* ---- characters ---- */

.roles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.roles:not(:empty) {
  margin-top: 16px;
}

.role {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 10px 14px 10px 10px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(135deg, rgb(26 31 42 / 80%), rgb(12 15 21 / 90%));
  border: 1px solid var(--ink-4);
  border-radius: 12px;
  transition:
    border-color 0.25s ease,
    transform 0.25s var(--ease),
    box-shadow 0.25s ease;
}

.role:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.role[aria-checked='true'] {
  background:
    radial-gradient(120% 100% at 0% 50%, rgb(216 178 106 / 18%), transparent 60%),
    linear-gradient(135deg, rgb(32 36 46 / 90%), rgb(14 16 22 / 92%));
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(216 178 106 / 16%), 0 12px 30px -16px rgb(216 178 106 / 60%);
}

.portrait {
  position: relative;
  flex: none;
  width: 64px;
  height: 72px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgb(216 178 106 / 22%), rgb(10 12 17 / 90%) 70%);
  border: 1px solid var(--line-strong);
  border-radius: 32px 32px 10px 10px;
}

.portrait img {
  width: 100%;
  height: 128%;
  object-fit: cover;
  object-position: 50% 8%;
}

.role__lines {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.role__name {
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role__world {
  font-size: 12.5px;
  color: var(--muted);
}

.role__level {
  align-self: flex-start;
  margin-top: 6px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-hi);
  background: rgb(216 178 106 / 12%);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  width: 22px;
  height: 22px;
  padding: 4px;
  color: #241703;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  border-radius: 50%;
  box-shadow: 0 2px 8px rgb(0 0 0 / 50%);
}

.check path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[aria-checked='true'] > .check {
  display: block;
}

/* ---- product tabs and cards ---- */

.tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 18px;
  overflow-x: auto;
  background: rgb(4 5 8 / 60%);
  border: 1px solid var(--ink-4);
  border-radius: 14px;
  scrollbar-width: none;
}

.tab {
  display: inline-flex;
  flex: 1 0 auto;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.tab img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.tab__count {
  min-width: 22px;
  padding: 0 6px;
  font-size: 12px;
  line-height: 20px;
  color: var(--faint);
  background: rgb(255 255 255 / 6%);
  border-radius: 999px;
}

.tab:hover {
  color: var(--text);
}

.tab[aria-selected='true'] {
  color: var(--gold-hi);
  background: linear-gradient(180deg, rgb(216 178 106 / 18%), rgb(216 178 106 / 6%));
  border-color: var(--line-strong);
}

.tab[aria-selected='true'] .tab__count {
  color: #241703;
  background: var(--gold);
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(180deg, rgb(26 31 42 / 92%), rgb(11 13 18 / 96%));
  border: 1px solid var(--ink-4);
  border-radius: 14px;
  transition:
    border-color 0.25s ease,
    transform 0.25s var(--ease),
    box-shadow 0.25s ease;
}

.product:hover:not(:disabled) {
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px -22px rgb(216 178 106 / 55%);
  transform: translateY(-3px);
}

.product[aria-checked='true'] {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(216 178 106 / 18%), 0 20px 44px -20px rgb(216 178 106 / 70%);
}

.product:disabled {
  cursor: not-allowed;
  filter: grayscale(0.85);
  opacity: 0.55;
}

.product__art {
  position: relative;
  display: grid;
  place-items: center;
  height: 132px;
  background:
    radial-gradient(70% 80% at 50% 70%, rgb(216 178 106 / 22%), transparent 70%),
    linear-gradient(180deg, rgb(255 255 255 / 3%), transparent);
  border-bottom: 1px solid var(--line);
}

.product__cash {
  width: auto;
  height: 112px;
  filter: drop-shadow(0 12px 20px rgb(0 0 0 / 60%));
  transition: transform 0.4s var(--ease);
}

.product:hover .product__cash {
  transform: scale(1.06) translateY(-2px);
}

.showcase {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.product__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
}

.product__name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.product__gives {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--gold-hi);
}

.product__gives img {
  width: 18px;
  height: 18px;
}

.product__price {
  display: flex;
  align-items: baseline;
  margin-top: auto;
  font-family: var(--display);
  font-weight: 900;
  color: var(--gold-hi);
}

.product__price small {
  font-size: 15px;
}

.product__price b {
  font-size: 28px;
  line-height: 1;
}

.product__price em {
  font-size: 14px;
  font-style: normal;
  color: var(--gold);
}

.ribbon {
  position: absolute;
  top: 12px;
  left: -2px;
  z-index: 1;
  padding: 3px 12px 3px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(90deg, var(--red-deep), var(--red));
  border-radius: 0 6px 6px 0;
  box-shadow: 0 4px 12px rgb(218 30 21 / 45%);
}

.product__sold {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--text);
  background: rgb(7 8 11 / 55%);
}

/* ---- methods and channels ---- */

.methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.method,
.lane {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(135deg, rgb(26 31 42 / 80%), rgb(12 15 21 / 90%));
  border: 1px solid var(--ink-4);
  border-radius: 12px;
  transition:
    border-color 0.2s ease,
    transform 0.2s var(--ease),
    box-shadow 0.2s ease;
}

.method:hover:not(:disabled),
.lane:hover:not(:disabled) {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.method[aria-checked='true'],
.lane[aria-checked='true'] {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(216 178 106 / 16%);
}

.method:disabled,
.lane:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.method__mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #fff;
  background: var(--mark, var(--ink-4));
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 25%);
}

.method__mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.method__mark img {
  width: 32px;
  height: 32px;
}

.method[data-method='1'] { --mark: linear-gradient(160deg, #3b9cff, #1677ff); }
.method[data-method='2'] { --mark: linear-gradient(160deg, #3fd47a, #07c160); }
.method[data-method='3'] { --mark: linear-gradient(160deg, #6d7891, #3f475a); }
.method[data-method='4'] { --mark: linear-gradient(160deg, #35c7a5, #1a9c80); }
.method[data-method='coin'] { --mark: linear-gradient(160deg, #3a2c12, #1b140a); }

.choice__lines {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.choice__title {
  font-weight: 700;
}

.choice__sub {
  overflow: hidden;
  font-size: 12px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lanes {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px dashed var(--line);
}

.lanes__label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.lanes__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.lane {
  padding: 12px 14px;
}

.lane__dot {
  flex: none;
  width: 10px;
  height: 10px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(79 191 138 / 18%);
}

.lane__tag {
  margin-left: 6px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: #241703;
  vertical-align: 1px;
  background: var(--gold);
  border-radius: 4px;
}

.coin {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px dashed var(--line);
}

.coin .hint:first-child {
  margin: 0 0 10px;
}

/* ---- the order card ---- */

.receipt {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  overflow: hidden;
}

.receipt::after {
  position: absolute;
  top: -40px;
  right: -60px;
  width: 220px;
  height: 220px;
  content: '';
  background: url('/cashier/art/taiji.webp') center / contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

.receipt__title {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.receipt__who {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: rgb(4 5 8 / 55%);
  border: 1px solid var(--ink-4);
  border-radius: 12px;
}

.receipt__portrait {
  display: grid;
  flex: none;
  place-items: center;
}

.receipt__portrait:empty {
  width: 64px;
  height: 72px;
  background: radial-gradient(circle at 50% 30%, rgb(216 178 106 / 14%), rgb(10 12 17 / 90%) 70%);
  border: 1px dashed var(--line-strong);
  border-radius: 32px 32px 10px 10px;
}

.receipt__lines {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.receipt__lines strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt__label {
  font-size: 12px;
  color: var(--faint);
}

.receipt__muted {
  font-size: 12.5px;
  color: var(--muted);
}

.receipt__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.receipt__rows div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.receipt__rows dt {
  flex: none;
  color: var(--faint);
}

.receipt__rows dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.receipt__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.receipt__total span {
  color: var(--muted);
}

.receipt__total strong {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  color: var(--gold-hi);
  text-shadow: 0 4px 20px rgb(216 178 106 / 35%);
}

.receipt__notes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--faint);
  list-style: none;
}

.receipt__notes li::before {
  margin-right: 6px;
  color: var(--gold);
  content: '◆';
}

/* ---- the pay bar (one column) ---- */

.paybar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: none;
  gap: 14px;
  align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgb(12 15 21 / 88%), rgb(7 8 11 / 98%));
  border-top: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
}

.paybar__sum {
  display: flex;
  flex: 1;
  flex-direction: column;
  line-height: 1.2;
}

.paybar__label {
  font-size: 12px;
  color: var(--muted);
}

.paybar__sum strong {
  font-family: var(--display);
  font-size: 24px;
  color: var(--gold-hi);
}

.paybar .btn--pay {
  width: auto;
  min-width: 150px;
  min-height: 48px;
}

@media (width <= 1023px) {
  .checkout {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkout__side {
    position: static;
  }

  .paybar:not([hidden]) {
    display: flex;
  }

  .site--cashier .foot {
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
  }
}

@media (width <= 760px) {
  .plaque {
    align-self: stretch;
  }

  .step {
    padding: 20px 16px;
  }

  .step__head {
    margin-bottom: 16px;
  }

  .account {
    flex-direction: column;
  }

  .roles {
    grid-template-columns: minmax(0, 1fr);
  }

  .tabs {
    gap: 4px;
    padding: 4px;
  }

  .tab {
    flex: 1 1 0;
    gap: 4px;
    min-width: 0;
    padding: 0 6px;
    font-size: 13px;
    letter-spacing: 0;
  }

  .tab img {
    width: 22px;
    height: 22px;
  }

  .tab__count {
    display: none;
  }

  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product__art {
    height: 104px;
  }

  .product__cash {
    height: 88px;
  }

  .slot--lead {
    width: 60px;
    height: 60px;
  }

  .slot {
    width: 40px;
    height: 40px;
  }

  .product__body {
    padding: 12px;
  }

  .product__name {
    font-size: 16px;
  }

  .product__price b {
    font-size: 22px;
  }

  .methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lanes__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .receipt {
    padding: 20px 16px;
  }
}
