/* AzPay v1 — 小さく・静かに・洗練。数字は大きく、ラベルは小さく。 */
:root {
  --navy: #0a1e3c;
  --navy-2: #123058;
  --mint: #2fbf9b;
  --ink: #16283f;
  --grey: #8a94a3;
  --grey-2: #b7bfc9;
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e7eaef;
  --green: #1d9e63;
  --green-bg: #e9f7ef;
  --red: #c0574f;
  --ease: cubic-bezier(.32, .72, 0, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: #dde2e9;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.ic { width: 20px; height: 20px; flex: none; }

/* ---- アプリの器（全画面・ページスクロールなし） ---- */
#app {
  position: relative;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(10, 30, 60, .18);
}

/* ---- スプラッシュ ---- */
#splash {
  position: absolute; inset: 0; z-index: 60;
  background: linear-gradient(160deg, var(--navy) 0%, #0d3350 60%, #10524a 130%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  transition: opacity .55s var(--ease), visibility .55s;
}
#splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-mark { width: 76px; height: 76px; }
.splash-name { color: #fff; font-size: 24px; font-weight: 700; letter-spacing: .14em; margin-top: 6px; }
.splash-sub { color: rgba(255,255,255,.55); font-size: 10px; letter-spacing: .42em; }

/* ---- ヘッダー ---- */
#app-header {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .04em; color: var(--navy); }
.member-chip { display: flex; align-items: center; gap: 7px; }
.member-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600;
}
.member-name { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; color: var(--grey); }

/* ---- 画面 ---- */
#screens { position: relative; flex: 1; min-height: 0; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 12px;
  padding: 6px 16px 12px;
  opacity: 0; transform: translateX(12px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.screen.active { opacity: 1; transform: none; pointer-events: auto; }

/* ホーム：残高ヒーロー */
.hero {
  flex: none;
  border-radius: 24px;
  padding: 20px 20px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, #0d3a5c 55%, #11655c 115%);
  box-shadow: 0 12px 24px -12px rgba(10, 30, 60, .45);
}
.hero-label { font-size: 11px; letter-spacing: .12em; color: rgba(255,255,255,.72); }
.hero-balance { font-size: 46px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums; }
.hero-unit { font-size: 17px; font-weight: 600; margin-left: 6px; color: rgba(255,255,255,.85); }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.coin-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.14); border-radius: 999px;
  padding: 5px 12px 5px 9px; font-size: 12.5px;
}
.coin-pill strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.ic-coin { width: 17px; height: 17px; color: var(--mint); }
.hero-note { font-size: 10px; color: rgba(255,255,255,.62); text-align: right; }

/* 今月の増減 */
.summary-card {
  flex: none;
  background: var(--card); border-radius: 18px;
  display: flex; align-items: stretch;
  padding: 13px 18px;
  border: 1px solid var(--line);
}
.summary-col { flex: 1; }
.summary-col:last-child { text-align: right; }
.summary-label { font-size: 10.5px; color: var(--grey); letter-spacing: .06em; }
.summary-value { font-size: 20px; font-weight: 700; margin-top: 1px; font-variant-numeric: tabular-nums; }
.summary-value.plus { color: var(--green); }
.summary-unit { font-size: 11px; font-weight: 600; margin-left: 3px; color: var(--grey); }
.summary-divider { width: 1px; background: var(--line); margin: 2px 4px; }

/* 主要アクション（バブルボタン） */
.action-row { flex: none; display: flex; gap: 10px; }
.btn-primary {
  flex: 1.5;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; border-radius: 999px;
  background: var(--navy); color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: .04em;
  transition: transform .18s var(--ease), background .18s, opacity .18s;
}
.btn-primary:active { transform: scale(.975); }
.btn-primary:disabled { background: var(--grey-2); opacity: .65; }
.btn-primary.wide { flex: none; width: 100%; }
.btn-ghost {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 52px; border-radius: 999px;
  background: var(--card); color: var(--navy);
  border: 1px solid var(--line);
  font-size: 14.5px; font-weight: 600;
  transition: transform .18s var(--ease);
}
.btn-ghost:active { transform: scale(.975); }
.btn-text { height: 46px; font-size: 13.5px; color: var(--grey); width: 100%; }

/* 履歴 */
.section-label { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--grey); padding: 2px 4px 0; }
.section-label.first { padding-top: 6px; }
.hist-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.hist-list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.hist-row + .hist-row { border-top: 1px solid var(--line); }
.hist-icon {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #eef2f7; color: var(--navy);
}
.hist-icon .ic { width: 19px; height: 19px; }
.hist-icon.tone-green { background: var(--green-bg); color: var(--green); }
.hist-icon.tone-mint { background: #e5f6f1; color: #159a77; }
.hist-main { flex: 1; min-width: 0; }
.hist-title { font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-date { font-size: 11px; color: var(--grey); }
.hist-amount { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hist-amount.plus { color: var(--green); }

/* カード画面 */
.paycard {
  flex: none;
  border-radius: 22px;
  aspect-ratio: 1.586;
  padding: 20px 22px;
  color: #fff;
  background: linear-gradient(130deg, var(--navy) 0%, #14406e 48%, #12705f 125%);
  box-shadow: 0 18px 30px -14px rgba(10, 30, 60, .5);
  display: flex; flex-direction: column;
}
.paycard-top { display: flex; align-items: center; justify-content: space-between; }
.paycard-brand { font-size: 17px; font-weight: 700; letter-spacing: .1em; }
.ic-paycard-coin { width: 26px; height: 26px; color: var(--mint); }
.paycard-chip { width: 38px; height: 30px; color: rgba(255,255,255,.75); margin-top: 20px; }
.paycard-number { font-size: 17px; letter-spacing: .18em; margin-top: 12px; font-variant-numeric: tabular-nums; }
.paycard-bottom { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; }
.paycard-caption { font-size: 9px; letter-spacing: .24em; color: rgba(255,255,255,.6); }
.paycard-name { font-size: 15px; font-weight: 600; letter-spacing: .14em; margin-top: 2px; }
.paycard-member { font-size: 11px; color: rgba(255,255,255,.75); letter-spacing: .06em; }
.info-list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; flex: none; }
.info-row { padding: 14px 16px; }
.info-row + .info-row { border-top: 1px solid var(--line); }
.info-title { font-size: 13.5px; font-weight: 600; }
.info-note { font-size: 12px; color: var(--grey); margin-top: 3px; line-height: 1.6; }

/* 使える場所 */
.places-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 12px; }
.place-list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; flex: none; }
.place-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; min-height: 56px; transition: background .15s; }
.place-row:active { background: #f0f3f7; }
.place-row + .place-row { border-top: 1px solid var(--line); }
.place-icon { width: 38px; height: 38px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; background: #eef2f7; color: var(--navy); }
.place-icon .ic { width: 20px; height: 20px; }
.place-main { flex: 1; min-width: 0; }
.place-name { font-size: 14px; font-weight: 600; }
.place-note { font-size: 11.5px; color: var(--grey); }
.place-chev { color: var(--grey-2); }
.place-chev .ic { width: 17px; height: 17px; }
.places-foot { font-size: 11px; color: var(--grey); line-height: 1.7; padding: 0 4px; margin: 0; }

/* チャージ */
.charge-head { flex: none; padding: 2px 4px 0; }
.charge-title { font-size: 16px; font-weight: 700; color: var(--navy); }
.charge-note { font-size: 12px; color: var(--grey); margin: 5px 0 0; line-height: 1.65; }
.charge-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pack-list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.pack-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 60px; }
.pack-row + .pack-row { border-top: 1px solid var(--line); }
.pack-coin { width: 38px; height: 38px; border-radius: 50%; background: #e5f6f1; color: #159a77; display: flex; align-items: center; justify-content: center; flex: none; }
.pack-coin .ic { width: 21px; height: 21px; }
.pack-main { flex: 1; }
.pack-amount { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pack-amount .pack-unit { font-size: 11px; font-weight: 600; color: var(--grey); margin-left: 3px; }
.pack-bonus { font-size: 11px; color: var(--green); font-weight: 600; }
.pack-price { text-align: right; margin-right: 2px; }
.pack-price-value { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.btn-soon {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px;
  background: #eef0f3; color: var(--grey); font-size: 12px; font-weight: 600;
}

/* タブバー */
#tabbar {
  flex: none;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; height: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--grey-2); font-size: 10px; font-weight: 600; letter-spacing: .02em;
  transition: color .2s;
}
.tab .ic-tab { width: 22px; height: 22px; }
.tab.active { color: var(--navy); }

/* ---- 送るフロー ---- */
#send-layer {
  position: absolute; inset: 0; z-index: 40;
  background: var(--bg);
  transform: translateY(103%);
  transition: transform .38s var(--ease);
  visibility: hidden;
}
#send-layer.open { transform: none; visibility: visible; }
.send-step {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: calc(10px + env(safe-area-inset-top)) 16px calc(14px + env(safe-area-inset-bottom));
  opacity: 0; pointer-events: none; transform: translateX(14px);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.send-step.active { opacity: 1; pointer-events: auto; transform: none; }
.send-head { flex: none; display: flex; align-items: center; justify-content: space-between; }
.send-title { font-size: 15.5px; font-weight: 700; color: var(--navy); }
.send-head-spacer { width: 40px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
}
.send-sub { flex: none; font-size: 12.5px; color: var(--grey); padding: 14px 4px 10px; }
.member-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.member-list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.member-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; min-height: 60px; transition: background .15s; }
.member-row:active { background: #f0f3f7; }
.member-row + .member-row { border-top: 1px solid var(--line); }
.member-row .member-avatar { width: 38px; height: 38px; font-size: 14px; }
.member-row .member-avatar.tone-1 { background: #14406e; }
.member-row .member-avatar.tone-2 { background: #12705f; }
.member-row .member-avatar.tone-3 { background: #5b4a8a; }
.member-row .member-avatar.tone-4 { background: #8a5a2b; }
.member-row .member-avatar.tone-5 { background: #33608c; }
.member-main { flex: 1; }
.member-row-name { font-size: 14.5px; font-weight: 600; }
.member-row-sub { font-size: 11px; color: var(--grey); }

/* 金額入力 */
.send-to { flex: none; display: flex; align-items: center; gap: 9px; padding: 16px 4px 0; font-size: 14.5px; font-weight: 600; }
.send-to .member-avatar { width: 34px; height: 34px; font-size: 13px; }
.send-to-suffix { color: var(--grey); font-weight: 500; font-size: 13px; }
.amount-display { flex: none; text-align: center; font-size: 46px; font-weight: 700; letter-spacing: -.01em; margin-top: 18px; font-variant-numeric: tabular-nums; min-height: 56px; }
.amount-unit { font-size: 16px; font-weight: 600; color: var(--grey); margin-left: 5px; }
.amount-balance { flex: none; text-align: center; font-size: 12px; color: var(--grey); margin-top: 2px; }
.amount-warn { flex: none; text-align: center; font-size: 12px; color: var(--red); height: 18px; margin-top: 4px; visibility: hidden; }
.amount-warn.show { visibility: visible; }
.keypad { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: center; padding: 8px 2px; }
.keypad button {
  height: 58px; border-radius: 18px;
  font-size: 23px; font-weight: 550; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.keypad button:active { background: #e6eaf0; }
.ic-key { width: 25px; height: 25px; }
.send-foot { flex: none; padding-top: 6px; }

/* 確認シート */
#confirm-wrap { position: absolute; inset: 0; z-index: 50; }
#confirm-wrap[hidden] { display: none; }
.confirm-dim { position: absolute; inset: 0; background: rgba(9, 22, 40, .45); animation: fade-in .25s var(--ease); }
.confirm-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(16px + env(safe-area-inset-bottom));
  animation: sheet-up .34s var(--ease);
}
@keyframes sheet-up { from { transform: translateY(48px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet-title { font-size: 15px; font-weight: 700; color: var(--navy); text-align: center; }
.sheet-rows { margin: 16px 0 18px; }
.sheet-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 2px; }
.sheet-row + .sheet-row { border-top: 1px solid var(--line); }
.sheet-row dt { font-size: 12.5px; color: var(--grey); }
.sheet-row dd { margin: 0; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.confirm-sheet .btn-text { margin-top: 2px; }

/* 成功画面 */
#success-layer {
  position: absolute; inset: 0; z-index: 55;
  background: var(--green-bg);
  display: flex; align-items: center; justify-content: center;
  animation: fade-in .3s var(--ease);
}
#success-layer[hidden] { display: none; }
.success-inner { text-align: center; padding: 0 32px; }
.success-circle {
  width: 86px; height: 86px; margin: 0 auto;
  border: 2px solid var(--green); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  animation: pop-in .45s var(--ease);
}
@keyframes pop-in { from { transform: scale(.82); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-check { width: 46px; height: 46px; }
.success-check path { stroke-dasharray: 52; stroke-dashoffset: 52; }
#success-layer.play .success-check path { animation: draw-check .5s .15s var(--ease) forwards; }
@keyframes draw-check { to { stroke-dashoffset: 0; } }
.success-title { font-size: 17.5px; font-weight: 700; color: var(--ink); margin-top: 20px; }
.success-sub { font-size: 13px; color: #4c6a58; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .success-check path { stroke-dashoffset: 0; }
}

/* ================= v2 追加 ================= */

/* 有効期限（ヒーロー内） */
.hero-expiry { font-size: 10px; color: rgba(255,255,255,.62); text-align: right; font-variant-numeric: tabular-nums; }

/* スクロールの連鎖を止める */
.hist-scroll, .places-scroll, .charge-scroll, .member-scroll { overscroll-behavior: contain; }

/* 履歴の絞り込みチップ */
.chip-row { flex: none; display: flex; gap: 8px; padding: 0 2px; }
.chip {
  height: 34px; padding: 0 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--grey); font-size: 12.5px; font-weight: 600;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* 履歴リストの入場（小さなスタッガード） */
.hist-list .hist-row {
  opacity: 0; transform: translateY(6px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  transition-delay: var(--d, 0ms);
}
.hist-list.in .hist-row { opacity: 1; transform: none; }
.hist-empty { padding: 20px 14px; text-align: center; color: var(--grey); font-size: 12.5px; }

/* 失効が近いお知らせ行 */
.notice-row {
  display: flex; align-items: center; gap: 9px;
  background: #fff8ea; border: 1px solid #efe3bd; border-radius: 14px;
  padding: 10px 12px; margin-bottom: 10px;
  font-size: 11.5px; color: #7a5b17; line-height: 1.55;
}
.notice-row[hidden] { display: none; }
.notice-row .ic { width: 17px; height: 17px; color: #b98a1d; }

/* ポイント明細 */
.breakdown {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px 16px 13px; margin-top: 12px;
}
.breakdown-head { font-size: 12px; font-weight: 700; color: var(--navy); letter-spacing: .04em; display: flex; justify-content: space-between; align-items: baseline; }
.breakdown-sub { font-size: 10px; color: var(--grey); font-weight: 500; letter-spacing: 0; }
.bd-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.bd-label { width: 74px; flex: none; font-size: 11.5px; font-weight: 550; }
.bd-track { flex: 1; height: 6px; border-radius: 3px; background: #edf0f4; overflow: hidden; }
.bd-fill { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--navy-2), var(--mint)); transition: width .85s var(--ease); }
.bd-value { flex: none; width: 106px; text-align: right; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bd-unit { font-size: 10px; color: var(--grey); margin-left: 2px; font-weight: 600; }
.bd-pct { font-size: 10px; color: var(--grey); margin-left: 6px; font-weight: 500; }

/* プル・トゥ・リフレッシュ */
.ptr { height: 0; display: flex; justify-content: center; align-items: flex-start; overflow: hidden; }
.ptr.snap { transition: height .3s var(--ease); }
.ptr-coin { width: 30px; height: 30px; color: var(--mint); opacity: 0; margin-top: 7px; display: block; flex: none; }
.ptr-coin svg { width: 100%; height: 100%; }
.ptr.on .ptr-coin { animation: coin-bloom .85s var(--ease) both; }
@keyframes coin-bloom { 0% { opacity: 0; transform: scale(.55); } 55% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }

/* スケルトン */
.sk-overlay {
  position: absolute; inset: 0; z-index: 6;
  background: var(--bg);
  padding: 6px 16px 12px;
  display: flex; flex-direction: column; gap: 12px;
  opacity: 0; pointer-events: none;
  transition: opacity .32s var(--ease);
}
.sk-overlay.show { opacity: 1; }
#home-skeleton { opacity: 1; pointer-events: auto; }
#home-skeleton.hide { opacity: 0; pointer-events: none; }
.sk {
  border-radius: 14px; flex: none;
  background: linear-gradient(100deg, #e7ebf0 42%, #f2f4f7 50%, #e7ebf0 58%);
  background-size: 220% 100%;
  animation: sk-shimmer 1.15s linear infinite;
}
@keyframes sk-shimmer { from { background-position: 180% 0; } to { background-position: -20% 0; } }
.sk-hero { height: 158px; border-radius: 24px; }
.sk-summary { height: 64px; border-radius: 18px; }
.sk-actions { height: 52px; border-radius: 999px; }
.sk-card { height: 228px; border-radius: 22px; }
.sk-line { height: 14px; width: 100%; border-radius: 7px; }
.sk-line.w40 { width: 40%; }
.sk-line.w55 { width: 55%; }
.sk-rows { display: flex; flex-direction: column; gap: 10px; flex: none; }
.sk-row { height: 58px; border-radius: 16px; list-style: none; }

/* カードの傾き・グレア */
.paycard { position: relative; will-change: transform; }
.paycard-glare { position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 2; }
.paycard > *:not(.paycard-glare) { position: relative; z-index: 1; }
.exchange-rate-note { flex: none; text-align: center; font-size: 11px; color: var(--grey); margin-top: -4px; }

/* 交換フロー */
#exchange-layer {
  position: absolute; inset: 0; z-index: 40;
  background: var(--bg);
  transform: translateY(103%);
  transition: transform .38s var(--ease);
  visibility: hidden;
}
#exchange-layer.open { transform: none; visibility: visible; }
.ex-rate-card {
  flex: none; margin-top: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; text-align: center;
}
.ex-rate-main { font-size: 16px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.ex-rate-arrow { color: var(--mint); margin: 0 2px; }
.ex-rate-balances { font-size: 12px; color: var(--grey); margin-top: 4px; }
.ex-rate-balances strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.ex-get { flex: none; text-align: center; font-size: 13px; color: var(--grey); margin-top: 2px; }
.ex-get strong { color: var(--green); font-variant-numeric: tabular-nums; }
#ex-confirm-wrap { position: absolute; inset: 0; z-index: 50; }
#ex-confirm-wrap[hidden] { display: none; }
#ex-success-layer {
  position: absolute; inset: 0; z-index: 55;
  background: var(--green-bg);
  display: flex; align-items: center; justify-content: center;
  animation: fade-in .3s var(--ease);
}
#ex-success-layer[hidden] { display: none; }
#ex-success-layer.play .success-check path { animation: draw-check .5s .15s var(--ease) forwards; }

/* 払う（会員コード） */
#pay-layer { position: absolute; inset: 0; z-index: 45; visibility: hidden; }
#pay-layer.open { visibility: visible; }
.pay-dim { position: absolute; inset: 0; background: rgba(9, 22, 40, .5); opacity: 0; transition: opacity .3s var(--ease); }
#pay-layer.open .pay-dim { opacity: 1; }
.pay-card {
  position: absolute; left: 50%; top: 50%;
  width: min(320px, calc(100% - 48px));
  transform: translate(-50%, -48%) scale(.97); opacity: 0;
  background: var(--card); border-radius: 26px;
  padding: 26px 24px 22px; text-align: center;
  box-shadow: 0 24px 48px -18px rgba(9, 22, 40, .45);
  transition: transform .38s var(--ease), opacity .3s var(--ease);
}
#pay-layer.open .pay-card { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.pay-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--navy); letter-spacing: .05em; }
.pay-brand-mark { width: 30px; height: 30px; }
.pay-qr { width: 172px; height: 172px; margin: 20px auto 14px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.pay-qr svg { width: 100%; height: 100%; display: block; }
.pay-number { font-size: 17px; font-weight: 700; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.pay-member { font-size: 11.5px; color: var(--grey); margin-top: 3px; letter-spacing: .06em; }
.pay-note { font-size: 11px; color: var(--grey); line-height: 1.7; margin: 14px 0 18px; }
