:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1d1d1f;
  background: #f5f5f7;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --accent: #0071e3;
  --muted: #6e6e73;
  --line: #ebebee;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--accent); text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #0071e3; outline-offset: 4px; }
.shell { width: min(640px, calc(100% - 48px)); margin: clamp(48px, 8vh, 96px) auto 48px; }
.page-heading { margin-bottom: 40px; text-align: center; }
h1 { margin: 0; font-size: 42px; line-height: 1.2; font-weight: 600; letter-spacing: -1.7px; }
.claim-heading { margin-bottom: 26px; }
.section-label { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.claim-heading h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.7px; line-height: 1.4; }
.claim-heading h2 span { margin: 0 3px; color: #c5c5ca; font-weight: 400; }
.activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; align-items: stretch; }
.activity-card { min-width: 0; border: 1px solid #ececef; border-radius: 22px; background: #fff; overflow: hidden; }
.activity-launch { display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 16px; height: 100%; min-height: 120px; padding: 20px 22px; color: #1d1d1f; }
.activity-launch:hover { background: #fafafa; }
.activity-launch:focus-visible { outline-offset: -4px; border-radius: 22px; }
.activity-icon { grid-column: 1; grid-row: 1; display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 11px; background: #fff0eb; color: #d25631; font-size: 20px; font-weight: 600; }
.activity-icon-blue { background: #ecf4ff; color: #0071e3; font-size: 17px; }
.activity-title { grid-column: 1 / -1; grid-row: 2; font-size: 17px; font-weight: 500; line-height: 1.5; text-wrap: balance; }
.activity-arrow { grid-column: 2; grid-row: 1; color: #a1a1a6; font-size: 20px; }
.claim-card { padding: 36px; background: #fff; border: 1px solid #ececef; border-radius: 26px; box-shadow: 0 12px 40px #00000003; }
.explanation { margin: 0 0 22px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.8; }
.main-action { width: 100%; min-height: 50px; padding: 13px 20px; border: 0; border-radius: 13px; background: var(--accent); color: white; font-size: 15px; font-weight: 500; line-height: 1.5; transition: background .15s; }
.main-action:hover:enabled, .app-launch:hover { background: #0077ed; }
.main-action[data-loading="true"]::before { content: ""; display: inline-block; vertical-align: -2px; margin-right: 9px; width: 15px; height: 15px; border: 2px solid #ffffff66; border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
.state-pill { margin: 16px 0 0; color: var(--muted); font-size: 11px; text-align: center; line-height: 1.8; }
.state-pill[data-tone="success"] { color: #248a3d; }
.state-pill[data-tone="error"] { color: #b33a30; }
.auth-box { padding-top: 24px; text-align: center; }
.auth-heading { margin: 0 0 8px; font-size: 14px; font-weight: 500; }
.auth-qr { display: block; width: min(208px, 100%); height: auto; aspect-ratio: 1; margin: 0 auto 12px; background: white; }
.app-launch { display: table; margin: 10px auto 16px; padding: 12px 22px; border-radius: 24px; background: var(--accent); color: white; font-size: 13px; }
.app-launch[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.auth-link { display: inline-block; padding: 9px 8px; font-size: 11px; }
.auth-link:hover, .text-action:hover { text-decoration: underline; }
.muted { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; text-align: center; }
.return-hint { margin: 6px 0; color: var(--muted); font-size: 11px; }
.expiry { margin: 8px 0 0; color: #909096; font-size: 10px; font-variant-numeric: tabular-nums; }
.action-error { padding: 12px; margin: 18px 0 0; border-radius: 10px; background: #fff6f5; color: #a93831; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.text-action { display: block; margin: 10px auto 0; padding: 7px 10px; border: 0; background: none; color: var(--accent); font-size: 12px; }
.progress-box { padding: 25px 4px 4px; text-align: center; color: var(--muted); font-size: 12px; }
.spinner { display: inline-block; width: 23px; height: 23px; border: 2px solid #e5e5ea; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.results { margin-top: 24px; }
.results h2 { margin: 0 0 16px; font-size: 17px; font-weight: 600; line-height: 1.5; }
.channel-results { display: grid; gap: 8px; margin-bottom: 16px; }
.channel-row { padding: 11px 12px; border-radius: 10px; background: #f5f5f7; }
.channel-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; }
.channel-name { font-weight: 600; }
.channel-state { color: var(--muted); }
.channel-row[data-state="done"] .channel-state, .channel-row[data-state="already"] .channel-state { color: #248a3d; }
.channel-row[data-state="issuing"] .channel-state { color: var(--accent); }
.channel-row[data-state="error"] .channel-state { color: #b33a30; }
.channel-error { margin: 8px 0 0; color: #a7453c; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.coupon-list { display: grid; gap: 10px; }
.coupon { display: flex; align-items: center; gap: 10px; padding: 15px 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.coupon-value { flex: 0 0 75px; text-align: center; color: #285f9e; font-size: 18px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.coupon-body { flex: 1; min-width: 0; padding-left: 12px; border-left: 1px solid var(--line); }
.coupon-body h3 { margin: 0 0 5px; font-size: 12px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.coupon-body p { margin: 4px 0; color: var(--muted); font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.coupon-tag { display: inline-block; margin-top: 5px; color: #8993a0; font-size: 9px; }
.empty-result { margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.9; text-align: center; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.pager button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 16px; color: var(--accent); background: white; font-size: 11px; }
.pager span { color: var(--muted); font-size: 11px; }
.result-footnote { margin: 18px 0 0; color: #909096; font-size: 10px; line-height: 1.8; text-align: center; }
.reset-area { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.secondary-action { display: block; margin: auto; padding: 10px 15px; min-height: 44px; border: 1px solid #dedee3; border-radius: 20px; background: white; color: #6e6e73; font-size: 12px; }
.secondary-action:hover:enabled { background: #f5f5f7; }
.diagnostics { margin-top: 20px; color: #86868b; font-size: 10px; }
.diagnostics summary { width: fit-content; margin: auto; padding: 6px; cursor: pointer; }
.diagnostics pre { max-height: 240px; overflow: auto; padding: 12px; border-radius: 10px; background: #f5f5f7; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 10px; }
.community-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.community-card { display: flex; flex-direction: column; align-items: center; min-width: 0; margin: 0; padding: 20px 16px; border: 1px solid #ececef; border-radius: 22px; background: #fff; }
.community-card figcaption { margin-bottom: 12px; font-size: 14px; font-weight: 500; line-height: 1.6; }
.community-card a { display: block; width: 100%; border-radius: 8px; }
.community-card img { display: block; width: 100%; max-width: 200px; height: auto; margin: auto; }
.footer { padding-top: 26px; color: #909096; font-size: 10px; text-align: center; line-height: 1.8; }
@media (max-width: 480px) { .community-grid { gap: 12px; margin-top: 20px; } .community-card { padding: 16px 10px; border-radius: 19px; } .community-card figcaption { margin-bottom: 10px; font-size: 13px; } }
@media (max-width: 480px) { .shell { width: calc(100% - 32px); margin-top: 32px; } .page-heading { margin-bottom: 26px; } .claim-card { padding: 28px 24px; border-radius: 22px; } h1 { font-size: 34px; letter-spacing: -1.2px; } .claim-heading h2 { font-size: 22px; } .activity-grid { gap: 12px; margin-bottom: 20px; } .activity-launch { min-height: 112px; padding: 17px 16px; row-gap: 14px; } .activity-title { font-size: 15px; } .activity-card { border-radius: 19px; } }
@media (max-width: 340px) { .shell { width: calc(100% - 24px); } .claim-card { padding: 22px 18px; } .coupon-value { flex-basis: 60px; font-size: 15px; } .claim-heading h2 { font-size: 20px; } .activity-grid { gap: 10px; } .activity-launch { padding: 15px 12px; } .activity-title { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
