:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #202739;
  background: #f4f6fa;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.receipt { max-width: 1080px; margin: 0 auto; padding: 28px 26px 52px; }
.receipt-nav { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid #e1e6ef; }
.receipt-nav a { font-size: .9rem; text-decoration: none; }
.receipt-nav .brand { color: #202739; font-size: 1.05rem; font-weight: 750; }
.receipt-header { margin: 35px 0 25px; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.25rem; }
h3 { margin-top: 0; }
.muted,.receipt-delivery-header p { color: #596781; font-size: .86rem; line-height: 1.65; }
.card { min-width: 0; padding: 24px; border: 1px solid #e2e7ef; border-radius: 20px; background: #fff; box-shadow: 0 4px 18px #20365908; }
#receiptLookup { max-width: 620px; }
.receipt-columns { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(260px,1fr); gap: 18px; align-items: start; }
.receipt-summary { grid-column: 2; grid-row: 1; }
.receipt-primary { grid-column: 1; grid-row: 1; }
.toolbar,.actions,.receipt-delivery-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toolbar { margin-bottom: 16px; }
#receiptState { display: inline-block; border-radius: 8px; background: #edf3ff; color: #2854a4; padding: 6px 9px; font-size: .77rem; font-weight: 650; }
#receiptState[data-state=fulfilled] { color: #0c6853; background: #e5f6ee; }
#receiptState[data-state=paid_attention],#receiptState[data-state=refund_pending],#receiptState[data-state=expired] { color: #805222; background: #fcf0dc; }
#receiptRefresh { background: #f1f4f9; color: #334667; }
#receiptMessage { font-size: .85rem; line-height: 1.65; color: #596781; }
.receipt-summary dl { margin: 16px 0 0; }
.receipt-summary dl > div { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 12px; padding: 11px 0; border-top: 1px solid #edf0f5; font-size: .83rem; }
dt { color: #596781; }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.receipt-delivery-header { align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid #edf0f5; }
.receipt-delivery-header p { margin: 7px 0 0; }
.receipt-delivered-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 12px; background: #e5f6ee; color: #0c6853; font-weight: 720; }
.receipt-service { margin-top: 18px; }
.receipt-service > summary { font-size: 1.03rem; font-weight: 650; cursor: pointer; }
.receipt-service[open] > summary { margin-bottom: 15px; }
button { border: 0; border-radius: 11px; padding: 10px 14px; background: #2461c3; color: #fff; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
a { color: #2854a4; }
a:focus-visible,button:focus-visible,summary:focus-visible { outline: 2px solid #2062d1; outline-offset: 3px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #e2e7ef; border-radius: 12px; padding: 15px; line-height: 1.55; }
#receiptError { color: #a14226; font-size: .85rem; }
#receiptError:empty { display: none; }
.actions { margin-top: 18px; flex-wrap: wrap; }
input,#receiptSupportForm :is(select,textarea) { width: 100%; border: 1px solid #dce3ef; background: #fff; border-radius: 11px; padding: 11px; font: inherit; font-size: .88rem; }
#receiptLookup input,#receiptPaymentForm input { margin: 10px 0 14px; }
#receiptSupportForm { display: grid; gap: 10px; }
#receiptSupportForm label { font-size: .82rem; color: #596781; }
#receiptSupportForm button { justify-self: start; }
.receipt-case { border-bottom: 1px solid #e2e7ef; padding: 10px 0; margin-bottom: 14px; }
.receipt-case p { font-size: .84rem; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 680px) {
  .receipt { padding: 18px 14px 30px; }
  .receipt-header { margin: 25px 0 17px; }
  .receipt-columns { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .receipt-primary,.receipt-summary { grid-column: auto; grid-row: auto; }
  .card { padding: 16px; border-radius: 16px; }
}
