/**
 * [INPUT]: 依赖 account-detail-panels.css 的统一弹层外壳、shrine-collection.ts 的交引/夺宝/传闻/藏品语义，以及 public/app-assets 的 A7 素材
 * [OUTPUT]: 提供交引商品与购买控件、夺宝状态与投入表单、两级传闻时间线、夺宝藏品图鉴及刷新操作的响应式视觉
 * [POS]: public 的 A7 社区活动视觉叶子；只扩展交引与动态社区内容，不定义首页布局、通用弹层或业务请求
 * [PROTOCOL]: 变更时更新此头部，然后检查 CLAUDE.md
 */

.shrine-modal-heading {
  position: relative;
}

.shrine-heading-action {
  width: 38px;
  height: 38px;
  padding: 5px;
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), transform 120ms var(--ease-out);
}

.shrine-heading-action img {
  width: 27px;
  height: 27px;
  display: block;
}

.shrine-heading-action:active {
  transform: scale(0.9);
}

.shrine-modal-treasure .shrine-modal-sheet {
  width: min(100%, 560px);
}

.shrine-modal-treasure .shrine-modal-content {
  padding: 24px 30px 28px;
}

.shrine-treasure-prize {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.shrine-treasure-prize img {
  width: 108px;
  height: 108px;
  display: block;
  object-fit: contain;
}

.shrine-treasure-prize strong {
  color: var(--treasure-quality, #e29b25);
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.2;
}

.shrine-treasure-facts {
  margin: 24px 0 21px;
  display: grid;
  gap: 13px;
  color: #30323b;
  font-family: var(--font-display);
  font-size: 17px;
}

.shrine-treasure-facts > div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.shrine-treasure-facts dt {
  color: #282b35;
}

.shrine-treasure-facts dd {
  margin: 0;
  color: #555b6c;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.shrine-treasure-facts .is-balance {
  color: #d15e58;
}

.shrine-treasure-winner dd {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shrine-treasure-winner dd img {
  width: 30px;
  height: 30px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(65, 70, 84, 0.16);
  border-radius: 7px;
  object-fit: cover;
}

.shrine-treasure-form {
  display: grid;
  gap: 12px;
}

.shrine-treasure-form label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #3c404b;
  font-family: var(--font-display);
  font-size: 16px;
}

.shrine-treasure-form output {
  min-width: 2ch;
  color: #222631;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.shrine-treasure-form input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  accent-color: #7b86aa;
  cursor: pointer;
}

.shrine-treasure-form .btn {
  width: 100%;
  min-height: 50px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.shrine-treasure-feedback {
  min-height: 20px;
  margin: 0;
  color: #6b7180;
  font-size: 13px;
  text-align: center;
}

.shrine-treasure-feedback.is-error {
  color: var(--danger);
}

.shrine-modal-voucher .shrine-modal-content {
  padding: 0 30px 26px;
}

.voucher-shop {
  min-width: 0;
  color: #2d303a;
  font-family: var(--font-display);
}

.voucher-shop-balance {
  margin: 0;
  color: #7a7f8c;
  font-size: 17px;
  line-height: 1.35;
  text-align: center;
}

.voucher-shop-balance strong {
  color: #424754;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.voucher-shop-divider {
  height: 1px;
  margin: 20px 0 8px;
  background: #e6e7ee;
}

.voucher-shop-list {
  display: grid;
  gap: 2px;
}

.voucher-shop-item {
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #343743;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background-color 140ms var(--ease-out), transform 120ms var(--ease-out);
}

.voucher-shop-item:active {
  transform: scale(0.985);
}

.voucher-shop-item.is-selected {
  background: #f1f2fb;
}

.voucher-shop-item-name {
  min-width: 0;
  overflow: hidden;
  color: var(--voucher-quality, #d25b57);
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voucher-shop-item-price {
  flex: 0 0 auto;
  color: #777c89;
  font-family: var(--font-sans);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.voucher-shop-empty,
.voucher-shop-message {
  min-height: 48px;
  margin: 0;
  display: grid;
  place-items: center;
  color: #7b808d;
  font-size: 17px;
  text-align: center;
}

.voucher-shop-purchase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.7fr);
  gap: 10px;
  align-items: stretch;
}

.voucher-shop-message[hidden],
.voucher-shop-purchase[hidden] {
  display: none;
}

.voucher-shop-quantity {
  min-height: 46px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #e1e3eb;
  border-radius: 7px;
  background: #fff;
}

.voucher-shop-quantity button {
  min-width: 42px;
  border: 0;
  background: transparent;
  color: #3b3f4b;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
}

.voucher-shop-quantity button:disabled {
  color: #b5b8c2;
  cursor: default;
}

.voucher-shop-quantity output {
  display: grid;
  place-items: center;
  color: #30343e;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.voucher-shop-buy {
  min-height: 46px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.voucher-shop-feedback {
  min-height: 20px;
  margin: 11px 0 0;
  color: #7a7f8d;
  font-family: var(--font-sans);
  font-size: 13px;
  text-align: center;
}

.voucher-shop-feedback.is-error {
  color: var(--danger);
}

.shrine-treasure-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  color: #6b7180;
  font-family: var(--font-display);
  font-size: 17px;
}

.shrine-rumor-feed {
  display: grid;
  gap: 25px;
}

.shrine-rumor-group + .shrine-rumor-group {
  padding-top: 22px;
  border-top: 1px solid #ececf2;
}

.shrine-rumor-group h4 {
  margin: 0 0 14px;
  color: #272b36;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
}

.shrine-rumor-item {
  min-width: 0;
  padding: 7px 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.shrine-rumor-item + .shrine-rumor-item {
  margin-top: 5px;
}

.shrine-rumor-item > img {
  width: 42px;
  height: 42px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(65, 70, 84, 0.12);
  border-radius: 50%;
  background: #f4f5fb;
  object-fit: cover;
}

.shrine-rumor-item strong {
  display: block;
  overflow: hidden;
  color: #282b35;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shrine-rumor-item p {
  margin: 2px 0 0;
  color: #777b89;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.45;
}

.shrine-rumor-item p span {
  color: var(--rumor-quality, #d29b26);
  font-weight: 700;
}

.shrine-medal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 10px;
}

.shrine-medal-item {
  min-width: 0;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.shrine-medal-item img {
  width: min(100%, 96px);
  aspect-ratio: 1;
  display: block;
  object-fit: contain;
}

.shrine-medal-item figcaption {
  max-width: 100%;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #656b79;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.25;
}

.shrine-medal-item figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shrine-medal-item figcaption small {
  color: #8a8e9b;
  font-family: var(--font-sans);
  font-size: 11px;
}

@media (hover: hover) and (pointer: fine) {
  .shrine-heading-action:hover {
    background: #f2f4fb;
  }
}

@media (max-width: 680px) {
  .shrine-modal {
    padding: 24px;
  }

  .shrine-modal-sheet {
    max-height: calc(100dvh - 48px);
  }

  .shrine-modal-treasure .shrine-modal-content {
    padding: 20px 18px 22px;
  }

  .shrine-heading-action {
    top: 14px;
    right: 14px;
  }

  .shrine-treasure-prize img {
    width: 88px;
    height: 88px;
  }

  .shrine-treasure-prize strong {
    font-size: 21px;
  }

  .shrine-modal-voucher .shrine-modal-content {
    padding: 0 18px 22px;
  }

  .voucher-shop-item {
    min-height: 52px;
    padding-inline: 8px;
  }

  .voucher-shop-item-name {
    font-size: 16px;
  }

  .voucher-shop-item-price {
    font-size: 14px;
  }

  .voucher-shop-purchase {
    grid-template-columns: 1fr;
  }

  .voucher-shop-buy {
    width: 100%;
  }

  .shrine-treasure-facts {
    margin-top: 19px;
    font-size: 16px;
  }

  .shrine-rumor-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
  }

  .shrine-rumor-item > img {
    width: 36px;
    height: 36px;
  }

  .shrine-rumor-item strong {
    font-size: 16px;
  }

  .shrine-rumor-item p {
    font-size: 13px;
  }

  .shrine-medal-grid {
    gap: 13px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shrine-heading-action,
  .shrine-treasure-form input[type="range"],
  .voucher-shop-item {
    transition: none;
  }
}
