:root {
  color-scheme: light;
  --page: #f3f4f7;
  --surface: #fff;
  --ink: #191a1b;
  --muted: #66696f;
  --line: #edeef1;
  --orange: #ff3500;
  --orange-text: #d82d00;
  --orange-soft: #fff3ec;
  --frame: 375px;
  --gutter: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 14px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #bb310c;
  outline-offset: 3px;
}

.mobile-frame { width: 100%; max-width: var(--frame); min-height: 100dvh; margin: 0 auto; }
.navbar { height: 44px; position: relative; display: grid; place-items: center; background: var(--surface); }
.navbar h1 { font-size: 16px; font-weight: 600; letter-spacing: .04em; max-width: 68%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nav-back { position: absolute; inset: 0 auto 0 3px; width: 44px; display: grid; place-items: center; }
.nav-back span { width: 10px; height: 10px; transform: rotate(45deg); border-left: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; }

.showcase-hero { position: relative; display: grid; align-items: center; isolation: isolate; overflow: hidden; aspect-ratio: 2.7; }
.hero-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.peach { background: #fbd1b9; color: #6e2713; }
.jade { background: #082919; color: #fff6df; }
.custom { background: #7c432c; color: white; }
.custom::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #160906b5, #16090600 78%); }
.hero-copy { max-width: 62%; padding: 0 0 0 18px; }
.hero-copy p { font-size: clamp(20px, 6.1vw, 27px); font-weight: 800; letter-spacing: -.035em; line-height: 1.24; overflow-wrap: anywhere; }
.hero-copy span { display: block; margin-top: 7px; line-height: 1.4; font-size: 12px; font-weight: 500; letter-spacing: .055em; }
.jade .hero-copy span { color: #f2d69f; }
.hero-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.hero-link:focus-visible { outline-offset: -4px; }
.banner-pages { z-index: 2; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; }
.banner-pages button { display: grid; place-items: center; padding: 0; background: transparent; border: 0; width: 22px; height: 23px; }
.banner-pages button::after { content: ''; width: 5px; height: 5px; border-radius: 6px; background: #ffffffb3; }
.banner-pages button[aria-current]::after { width: 13px; background: white; }

.category-tabs {
  position: sticky; top: 0; z-index: 3; display: flex; overflow: auto; scrollbar-width: none;
  min-height: 46px; padding: 0 6px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs a { display: grid; place-items: center; position: relative; flex: 1 0 67px; min-height: 46px; color: #45464b; white-space: nowrap; padding: 0 7px; font-size: 13px; }
.category-tabs a[aria-current] { color: var(--orange-text); font-weight: 700; }
.category-tabs a[aria-current]::after { content: ''; position: absolute; bottom: 5px; width: 17px; height: 3px; background: var(--orange); border-radius: 4px; }
.category-tabs a:focus-visible { outline-offset: -4px; }
.brand-groups { display: grid; gap: 10px; padding: 10px var(--gutter) 24px; }
.brand-group { background: var(--surface); padding: 15px 12px 16px; border-radius: 11px; }
.brand-group h2 { font-size: 16px; font-weight: 700; margin: 0 0 13px 3px; letter-spacing: .01em; }
.brand-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px 6px; }
.brand-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; border-radius: 8px; }
.logo-tile { display: grid; place-items: center; width: min(100%, 67px); aspect-ratio: 1; border: 1px solid #eeeff1; border-radius: 12px; background: #fdfdfe; }
.brand-name { max-width: 100%; color: #27282b; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.brand-tile:hover .logo-tile { border-color: #ffc6ad; background: #fff9f5; }
.brand-logo { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; }
.brand-logo.sprite { background: url('assets/brand-reference.webp') calc(-1px * var(--sprite-x)) calc(-1px * var(--sprite-y)) / 407px 665px no-repeat; }
.brand-logo.lettermark { background: var(--mark-color); color: white; font-weight: 800; font-size: 14px; }
.mark-luckin { font-size: 10px !important; font-style: italic; }
.mark-mcdonalds { font-size: 25px !important; color: #ffe35b !important; }
.empty-state { padding: 60px 12px; color: var(--muted); text-align: center; }

.home-tools {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: 9px; min-height: 56px; padding: 6px var(--gutter); color: white;
  background: linear-gradient(110deg, #c74e1c, #ef6b2d 49%, #bb4319);
}
.home-location { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; white-space: nowrap; font-size: 13px; font-weight: 700; }
.home-location::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-2px) rotate(45deg); }
.home-search { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border-radius: 18px; background: var(--surface); color: var(--muted); font-size: 13px; }
.home-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-bind { display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 28px; min-height: 40px; font-size: 11px; line-height: 1.1; }
.home-bind-icon {
  --scan-horizontal: linear-gradient(90deg, currentColor 0 29%, transparent 29% 71%, currentColor 71%);
  --scan-vertical: linear-gradient(currentColor 0 29%, transparent 29% 71%, currentColor 71%);
  width: 17px; height: 17px;
  background: var(--scan-horizontal) top / 100% 1.5px no-repeat, var(--scan-horizontal) bottom / 100% 1.5px no-repeat,
    var(--scan-vertical) left / 1.5px 100% no-repeat, var(--scan-vertical) right / 1.5px 100% no-repeat;
}
.home-tools a:focus-visible { outline-color: white; outline-offset: 2px; }
.home-page main { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.home-banner { display: block; width: 100%; height: auto; background: #ffe5cf; }
.home-windows {
  position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: -16px var(--gutter) 0;
  padding: 6px 3px; border-radius: 10px; background: var(--surface);
}
.home-entry {
  display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 83px;
  padding: 6px 0; border-radius: 7px; text-align: center; color: var(--ink); font-size: 14px;
}
.home-entry span:last-child { max-width: 100%; overflow-wrap: anywhere; }
.home-entry:focus-visible { outline-offset: -2px; }
@media (hover: hover) {
  .home-entry:hover { background: #fff8f3; }
}
.home-entry:active { background: var(--orange-soft); }
.entry-icon { display: block; width: 48px; height: 48px; border-radius: 16px; object-fit: cover; }
.membership-icon { position: relative; display: grid; place-items: center; background: linear-gradient(140deg, #ffad63, #ff540b 70%); box-shadow: inset 0 0 0 1px #ffffff52; }
.membership-icon::before { content: ''; width: 24px; height: 18px; border: 1px solid #ffdfc1; border-radius: 5px; background: #ffffff2e; transform: rotate(-9deg); }
.membership-icon::after { content: ''; position: absolute; width: 0; height: 0; margin-inline-start: 2px; border-block: 5px solid transparent; border-inline-start: 8px solid #fff; }
.home-navigation { position: fixed; bottom: 0; left: 50%; z-index: 4; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, var(--frame)); transform: translateX(-50%); padding: 5px 0 calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; }
.home-nav-item { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 46px; color: #686b71; font-size: 11px; }
.home-navigation a[aria-current="page"] { color: var(--orange-text); }
.home-navigation a:focus-visible { outline-offset: -3px; }

.aggregate-page .navbar h1 { font-weight: 500; }
.aggregate-hero {
  height: 120px; padding: 20px 16px 0; background: #ff3500 url('entertainment/assets/aggregate-banner.png') center / cover no-repeat;
  color: #fff; font-size: 24px; font-weight: 700; line-height: 1.31;
}
.aggregate-hero span, .aggregate-hero strong { display: block; }
.aggregate-entries { position: relative; display: grid; gap: 12px; margin-top: -16px; padding: 20px 16px 32px; border-radius: 12px 12px 0 0; background: var(--surface); }
.aggregate-entry {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  min-height: 60px; padding: 10px; border-radius: 8px; background: #f5f6f7; color: var(--ink); font-size: 14px; font-weight: 600;
}
.aggregate-entry:active { background: #fff0e9; }
.aggregate-entry:focus-visible { outline-offset: -2px; }
.aggregate-icon { display: block; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.aggregate-music { display: grid; place-items: center; border: 3px solid white; background: linear-gradient(145deg, #a98cff, #7045ed); color: white; font-size: 25px; line-height: 1; }
.aggregate-cta { padding: 0 8px; border-radius: 12px; background: var(--orange); color: white; font-size: 12px; line-height: 24px; white-space: nowrap; }

.recharge-page main { padding: 12px 0 calc(76px + env(safe-area-inset-bottom)); }
.recharge-card, .recharge-details { margin: 0 var(--gutter) 10px; background: var(--surface); border-radius: 11px; padding: 15px; }
.brand-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.brand-heading h2 { font-size: 17px; }
.account-field { padding: 13px 0 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.account-field label { display: block; font-size: 13px; font-weight: 600; }
.account-field input {
  display: block; width: 100%; height: 44px; margin-top: 6px; padding: 0 12px;
  border: 0; border-radius: 8px; color: var(--ink); background: var(--page); font-size: 16px;
}
.account-field input:focus { outline: none; background: #ebedf2; }
.account-field input::placeholder { color: var(--muted); }
#account-error { padding-top: 4px; font-size: 12px; color: #c92810; }
fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
.recharge-card fieldset + fieldset { margin-top: 13px; }
legend { padding: 0; margin-bottom: 9px; font-size: 13px; font-weight: 600; }
.amount-legend { width: 100%; margin-bottom: 8px; }
.amount-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 24px; }
#amount-title { font-size: 14px; font-weight: 700; line-height: 1.35; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.product-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { display: grid; cursor: pointer; position: relative; }
.choice input { width: 1px; height: 1px; opacity: 0; position: absolute; }
.choice-card { display: grid; position: relative; align-content: center; justify-items: center; gap: 3px; min-height: 44px; padding: 6px 3px; border: 1px solid #e6e7ea; border-radius: 7px; background: #fff; color: #34363a; text-align: center; }
.choice-name { overflow-wrap: anywhere; font-size: 13px; }
.choice input:checked + .choice-card { border-color: var(--orange); color: var(--orange-text); background: var(--orange-soft); }
.choice input:checked + .choice-card::after { content: '✓'; position: absolute; bottom: -1px; right: -1px; display: grid; place-items: center; width: 15px; height: 14px; border-radius: 5px 0 7px 0; background: var(--orange); color: white; font-size: 10px; line-height: 1; }
.choice input:focus-visible + .choice-card { outline: 2px solid #b9330e; outline-offset: 2px; }
.product-types .choice-card { min-height: 48px; padding: 7px 13px; }
.choice input:disabled + .choice-card { color: var(--muted); background: var(--page); cursor: default; }
.amounts .choice-card { min-height: 73px; }
.choice-price { line-height: 1.12; font-size: 16px; }
.choice-price small { font-size: 10px; margin-right: 1px; }
.choice del { color: #77797d; font-size: 10px; line-height: 1.1; }
.spec-promotion:not([hidden]) {
  display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; white-space: nowrap;
}
.promotion-label { padding-inline: 5px; border-radius: 3px; background: var(--orange); color: white; font-size: 11px; font-weight: 400; line-height: 16px; }
.promotion-timer { display: inline-flex; align-items: baseline; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 16px; font-variant-numeric: tabular-nums; }
.recharge-details h2 { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; font-weight: 600; }
.recharge-details h2::before, .recharge-details h2::after { content: ''; display: block; width: 24px; height: 1px; background: #dcdde1; }
.product-overview { padding: 13px 0; }
.product-overview h3 { margin: 0; font-size: 14px; }
.product-overview p, .product-description { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.product-overview dl { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 9px 0 0; font-size: 12px; }
.product-overview dl div { display: flex; gap: 7px; }
.product-overview dt { color: var(--muted); }
.product-overview dd { margin: 0; }
.recharge-details img { display: block; width: 100%; height: auto; }

.recharge-dock { position: fixed; z-index: 4; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, var(--frame)); display: grid; padding: 9px 16px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.primary, .secondary { display: inline-grid; place-items: center; min-height: 40px; padding: 0 17px; border-radius: 100px; font-weight: 600; font-size: 14px; }
.primary { background: var(--orange); color: white; border: 1px solid var(--orange); }
.primary:hover { background: #e83202; }
.secondary { background: #fff; color: #41444b; border: 1px solid #dfe0e4; }
.recharge-submit { min-height: 44px; }
.recharge-submit:disabled { background: #e5e6eb; border-color: #e5e6eb; color: var(--muted); cursor: default; }

dialog { width: calc(min(100%, var(--frame)) - 40px); max-width: none; padding: 0; border: 0; border-radius: 15px; color: var(--ink); background: white; box-shadow: 0 14px 48px #1b1c2529; }
dialog::backdrop { background: #191a1b73; }
dialog:has(.recharge-review) { width: min(calc(100% - 40px), 312px); border-radius: 10px; }
.review-main { min-height: 147px; padding: 26px 16px 28px; text-align: center; }
.review-main h2 { font-size: 13px; line-height: 1.45; font-weight: 600; }
.review-account { display: grid; gap: 13px; margin-top: 14px; }
.review-account span { color: #77797d; font-size: 12px; }
.review-account strong { color: var(--orange-text); font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.review-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.review-actions button { min-height: 40px; padding: 6px; border: 0; background: var(--surface); color: var(--ink); font-size: 13px; }
.review-actions [data-confirm] { background: var(--orange); color: white; font-weight: 600; }
.review-actions button:focus-visible { outline-offset: -4px; }
.dialog-content { padding: 21px; }
.dialog-content h2 { text-align: center; font-size: 17px; }
.dialog-content p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.result { text-align: center; }
.result-icon { display: grid; place-items: center; margin: auto auto 10px; width: 43px; height: 43px; background: var(--orange-soft); border-radius: 50%; color: var(--orange-text); font-size: 21px; }
.result p { margin: 9px 0 16px; }
.result .primary { width: 100%; }

@media (min-width: 560px) {
  body:not(.admin-view) .mobile-frame { box-shadow: 0 0 30px #222b3c0a; }
}

@media (max-width: 350px) {
  :root { --gutter: 9px; }
  .brand-group { padding-inline: 9px; }
  .recharge-card, .recharge-details { padding-inline: 12px; }
}
