html, body { margin: 0; min-height: 100dvh; background: #fff; color: #191919;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK SC", "Noto Sans CJK KR", sans-serif;
  -webkit-font-smoothing: antialiased; }
.shell { min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.shell-main { flex: 1; display: flex; flex-direction: column; justify-content: center; width: min(360px, 100%); margin: 0 auto; }
.mark { width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 22px; background: #13213f;
  display: grid; place-items: center; box-shadow: none; overflow: hidden; }
.mark img, .mark svg { width: 100%; height: 100%; display: block; }
h1 { margin: 0 0 8px; font-size: 22px; font-weight: 400; letter-spacing: 0.18em; text-align: center; }
.shell-main h1 { font-weight: 400; }
.lead { margin: 0 0 28px; font-size: 14px; color: #8d8d8d; text-align: center; line-height: 1.5; }
.btn { display: block; width: 100%; height: 48px; border: 0; border-radius: 0; background: #1c1c1c;
  font-size: 14px; font-weight: 400; letter-spacing: 0.14em; color: #fff; cursor: pointer; }
.btn:disabled { opacity: .5; }
.btn-ghost { background: #f7f7f8; margin-top: 10px; font-weight: 600; }
.link { display: block; text-align: center; margin-top: 16px; font-size: 13px; color: #576b95; text-decoration: none; }
.disclaimer { margin-top: auto; padding-top: 28px; text-align: center; font-size: 11px; color: #9a9a9a; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; text-align: left; }
.field label { font-size: 13px; color: #666; }
.field input { height: 48px; border: 0; border-radius: 12px; background: #f7f7f8; padding: 0 14px;
  font-size: 16px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); outline: none; }
.char-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 20px; }
.char-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #f7f7f8;
  border: 2px solid transparent; cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; }
.char-card.selected { border-color: #fee500; background: #fffceb; }
.char-card .av { width: 56px; height: 56px; border-radius: 50%; background: #fff4e8; overflow: hidden; flex: none; }
.char-card .av img { width: 100%; height: 100%; object-fit: cover; }
.char-card .meta { flex: 1; min-width: 0; }
.char-card .meta b { display: block; font-size: 16px; }
.char-card .meta span { font-size: 12px; color: #8d8d8d; }
.pkg-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.pkg { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
  border-radius: 14px; background: #f7f7f8; border: 0; width: 100%; font: inherit; cursor: pointer; text-align: left; }
.pkg:active { background: #fffceb; }
.pkg .name { font-weight: 700; font-size: 15px; }
.pkg .coins { font-size: 13px; color: #8d8d8d; margin-top: 2px; }
.pkg .price { font-size: 18px; font-weight: 800; color: #e5484d; }
.pkg .unavailable { font-size: 13px; font-weight: 600; color: #777; }
.pkg .tag { position: absolute; top: -8px; right: 12px; background: #fee500; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; }
.balance { text-align: center; padding: 18px; border-radius: 16px; background: linear-gradient(135deg,#fff4e8,#ffe8c8); }
.balance .n { font-size: 36px; font-weight: 800; }
.balance .l { font-size: 13px; color: #8d8d8d; }
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; max-width: 86%; text-align: center; }
.toast.show { opacity: 1; }
.dots { display: flex; gap: 8px; justify-content: center; margin: 24px 0; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #fee500; animation: bounce 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,80%,100%{transform:translateY(0);opacity:.4} 40%{transform:translateY(-8px);opacity:1} }
.topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.topbar button { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; width: 36px; }
.topbar h1 { flex: 1; font-size: 18px; margin: 0; text-align: center; padding-right: 36px; letter-spacing: 0; }

.topbar h1 img, .balance .n img { vertical-align: -4px; }
#claim, #recharge, #ledger { scroll-margin-top: 20px; }
.availability-note { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: #fff8dc; color: #64531c; font-size: 13px; line-height: 1.5; text-align: center; }
.section-title { margin: 24px 0 0; font-size: 16px; font-weight: 600; }
#redeem-panel { margin-top: 14px; }
#ledger { margin-top: 24px; }
