:root {
  --ink: #f7f9ff;
  --muted: #aab7ce;
  --faint: #7989a7;
  --bg: #020817;
  --panel: #101b3d;
  --panel-2: #162243;
  --line: rgba(171, 191, 224, 0.18);
  --blue: #79b8ff;
  --blue-deep: #0a2d62;
  --green: #82d2ab;
  --bottom: rgba(24, 31, 46, 0.92);
  --shell: #020817;
  --body-bg: radial-gradient(circle at 50% -5%, #0b1940 0%, var(--bg) 39rem);
  --header: rgba(2, 8, 23, 0.96);
  --header-line: rgba(139, 160, 203, 0.14);
  --surface: linear-gradient(145deg, #141f42, #101a39);
  --search-surface: #07112a;
  --search-input: rgba(19, 36, 71, 0.9);
  --detail-surface: rgba(7, 30, 67, 0.9);
  --adjust-surface: linear-gradient(100deg, #061b3e, #072854);
  --promo-surface: linear-gradient(140deg, #252f50, #1b2647);
  --summary-label: #bdc8dc;
  --promo-text: #e4eaf7;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --ink: #12203a; --muted: #617089; --faint: #73809a; --bg: #eaf1fa; --panel: #ffffff; --panel-2: #f3f7fc;
    --line: rgba(68, 91, 130, 0.18); --blue: #0a61bd; --blue-deep: #dcecff; --green: #14714b; --bottom: rgba(255, 255, 255, 0.93);
    --shell: #f7faff; --body-bg: radial-gradient(circle at 50% -5%, #cde4ff 0%, var(--bg) 39rem); --header: rgba(249, 252, 255, 0.96); --header-line: rgba(82, 106, 146, 0.16);
    --surface: linear-gradient(145deg, #ffffff, #eef4fc); --search-surface: #f8fbff; --search-input: #eaf2fc; --detail-surface: #e9f3ff; --adjust-surface: linear-gradient(100deg, #d9ebff, #c8e3ff); --promo-surface: linear-gradient(140deg, #eff5fc, #e3edf9); --summary-label: #53647e; --promo-text: #43546e;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { height: 100%; background: var(--bottom); scroll-behavior: smooth; overflow: hidden; }
body { height: 100%; margin: 0; min-width: 320px; background: var(--body-bg); overflow: hidden; overscroll-behavior-y: none; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell { width: min(100%, 480px); height: 100svh; height: 100dvh; margin: 0 auto; position: relative; background: var(--shell); overflow: hidden; }
.app-header { position: absolute; z-index: 20; top: 0; right: 0; left: 0; width: min(100%, 480px); margin-inline: auto; padding-top: env(safe-area-inset-top); background: var(--header); border-bottom: 1px solid var(--header-line); backdrop-filter: blur(18px); }
.card-title-row { height: 76px; padding: 8px 19px 11px; display: flex; gap: 12px; align-items: center; }
.card-icon { position: relative; width: 38px; height: 30px; flex: 0 0 auto; border: 2px solid #81b4f9; border-radius: 3px; transform: translateY(-1px); }
.card-icon::before, .card-icon::after { content: ""; position: absolute; border: 2px solid #81b4f9; border-radius: 3px; width: 28px; height: 19px; background: var(--shell); }
.card-icon::before { right: -5px; top: -6px; z-index: -1; }
.card-icon::after { left: 4px; top: 9px; width: 10px; height: 5px; border-width: 1.7px; }
.card-title-wrap { min-width: 0; flex: 1; text-align: center; padding-top: 2px; }
.card-title-wrap h1 { margin: 0; font-size: 17px; line-height: 1.2; font-weight: 730; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-title-wrap p { margin: 2px 0 0; color: #f4f7fe; font-size: 12px; font-weight: 500; }
.icon-button { border: 0; width: 38px; height: 42px; background: transparent; color: var(--blue); display: grid; place-items: center; cursor: pointer; }
.icon-button svg, .search-input-wrap svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.icon-button:active { transform: scale(.91); }
.search-panel { position: absolute; left: 0; right: 0; top: 76px; padding: 12px 18px 15px; background: var(--search-surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.26); }
.search-panel label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 670; }
.search-input-wrap { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid rgba(121, 184, 255, .4); border-radius: 11px; background: var(--search-input); color: var(--blue); }
.search-input-wrap svg { width: 18px; height: 18px; }
.search-input-wrap input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.search-input-wrap input::placeholder { color: #7f8ca4; }
.search-input-wrap button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; }

main { height: 100%; padding: calc(97px + env(safe-area-inset-top)) 18px calc(103px + env(safe-area-inset-bottom)); overflow-x: clip; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
.account-overview { animation: fade-up .5s ease both; }
.gold-card-frame { width: 60%; margin: 36px auto 21px; filter: drop-shadow(0 14px 18px rgba(0,0,0,.45)); }
.gold-card-frame img { display: block; width: 100%; aspect-ratio: 1.57; border-radius: 12px; object-fit: cover; }
.summary-card, .transaction-card, .promo-card { background: var(--surface); border: 1px solid rgba(67, 90, 144, .12); border-radius: 16px; }
.summary-card { padding: 23px 20px 15px; }
.summary-label { margin: 0; color: var(--summary-label); font-size: 15px; }
.billing-dash { margin: 13px 0 22px; font-size: 36px; font-weight: 700; line-height: .7; }
dl { margin: 0; }
dl div { display: flex; gap: 8px; justify-content: space-between; padding: 4px 0; }
dt, dd { margin: 0; font-size: 15px; line-height: 1.35; }
dt { color: var(--summary-label); }
dd { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.info-dot { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 3px; border: 1.5px solid var(--blue); border-radius: 50%; color: var(--blue); font-size: 11px; font-weight: 800; vertical-align: 1px; }
.usage-link { width: 100%; margin-top: 14px; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--blue); text-align: left; font-weight: 720; font-size: 17px; cursor: pointer; }
.usage-link span { float: right; font-size: 24px; line-height: .7; }
.adjust-button { width: 100%; height: 51px; margin: 16px 0 28px; border: 1px solid rgba(57, 130, 232, .14); border-radius: 12px; color: var(--blue); background: var(--adjust-surface); box-shadow: inset 0 0 25px rgba(34, 116, 222, .10); font-size: 17px; font-weight: 760; cursor: pointer; }
.adjust-button:active { transform: scale(.985); }
.yen-circle { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 8px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 15px; }
.timeline-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; }
.timeline-heading h2 { margin: 0; font-size: 16px; color: var(--summary-label); font-weight: 650; }
#resultCount { color: var(--blue); font-size: 12px; }
.day-block { margin: 0 0 25px; animation: fade-up .45s ease both; }
.day-title { margin: 0 0 10px; font-size: 25px; line-height: 1; font-weight: 780; letter-spacing: -.02em; }
.transaction-card { overflow: hidden; }
.transaction-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; column-gap: 10px; min-height: 70px; padding: 15px 17px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background .16s ease; }
.transaction-row:last-of-type { border-bottom: 0; }
.transaction-row:hover { background: rgba(105, 151, 225, .045); }
.transaction-row:active { background: rgba(105, 151, 225, .10); }
.merchant { min-width: 0; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; letter-spacing: .005em; }
.amount-col { min-width: 77px; text-align: right; }
.amount { display: block; font-size: 16px; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.status { display: inline-block; margin-top: 4px; padding: 1px 5px 2px; border-radius: 5px; color: #eaf3ff; background: #0b2a59; font-size: 12px; font-weight: 720; white-space: nowrap; }
.status.pending { color: #b8c3d8; padding: 0; background: transparent; font-weight: 570; }
.chevron { color: #8b9abb; font-size: 31px; font-weight: 250; line-height: .7; }
.row-detail { display: none; margin: -4px 17px 13px; padding: 10px 12px; border-radius: 8px; background: var(--detail-surface); color: var(--muted); font-size: 12px; line-height: 1.55; }
.transaction-row[aria-expanded="true"] + .row-detail { display: block; }
.transaction-row[aria-expanded="true"] .chevron { color: var(--blue); transform: rotate(90deg); }
.promo-card { display: grid; grid-template-columns: 60px 1fr; gap: 14px; margin: -6px 0 28px; padding: 18px; background: var(--promo-surface); }
.promo-symbol { align-self: center; position: relative; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #e7edf9; color: #111a32; font-size: 28px; font-weight: 700; }
.promo-symbol.cash { background: transparent; color: #82d2ab; font-size: 41px; }
.promo-copy h3 { margin: 0 0 6px; font-size: 15px; line-height: 1.35; }
.promo-copy p { margin: 0; color: var(--promo-text); font-size: 13px; line-height: 1.4; }
.promo-copy .promo-strong { margin-top: 4px; color: var(--ink); font-weight: 770; }
.promo-copy .promo-expire { margin-top: 4px; color: var(--muted); }
.promo-link { display: inline-block; margin-top: 11px; padding: 6px 12px; border: 0; border-radius: 7px; background: #143765; color: #92c6ff; font-size: 14px; font-weight: 700; cursor: pointer; }
.empty-state { padding: 32px 14px; color: var(--muted); text-align: center; }
.bottom-nav { position: absolute; z-index: 30; right: 0; bottom: 0; left: 0; width: min(100%, 480px); min-height: calc(83px + env(safe-area-inset-bottom)); margin-inline: auto; padding: 9px 10px max(8px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bottom); border-top: 1px solid rgba(153, 173, 209, .13); backdrop-filter: blur(18px); }
.bottom-nav::after { content: ""; position: absolute; z-index: -1; right: 0; bottom: 0; left: 0; height: env(safe-area-inset-bottom); background: var(--bottom); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.nav-item.active { color: var(--blue); }
.nav-icon { width: 27px; height: 25px; display: grid; place-items: center; line-height: 1; }
.nav-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.home-icon svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.badge-icon svg { width: 25px; height: 25px; }
.offer-icon svg { width: 26px; height: 26px; }
.person-icon svg { width: 25px; height: 25px; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 95px; max-width: calc(100% - 38px); padding: 10px 14px; border: 1px solid rgba(138, 191, 255, .3); border-radius: 10px; color: #dfeeff; background: rgba(12, 33, 70, .96); box-shadow: 0 12px 30px rgba(0,0,0,.34); font-size: 13px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 520px) { body { padding: 24px 0; } .app-shell { height: calc(100vh - 48px); box-shadow: 0 0 0 1px rgba(100, 135, 205, .11), 0 25px 75px rgba(0,0,0,.4); border-radius: 22px; } .app-header, .bottom-nav { border-radius: 22px 22px 0 0; } .bottom-nav { border-radius: 0 0 22px 22px; } }
@supports (-webkit-touch-callout: none) { html { height: -webkit-fill-available; } body, .app-shell { min-height: -webkit-fill-available; } }
@media (max-width: 370px) { main { padding-left: 13px; padding-right: 13px; } .card-title-wrap h1 { font-size: 15px; } .gold-card-frame { width: 66%; } .transaction-row { padding-left: 14px; padding-right: 14px; } .merchant, .amount { font-size: 15px; } }
@media (max-height: 740px) and (max-width: 480px) { main { padding-top: calc(84px + env(safe-area-inset-top)); } .gold-card-frame { margin-top: 20px; margin-bottom: 16px; } .summary-card { padding-top: 18px; } .adjust-button { margin-bottom: 20px; } }
