:root {
  --bg: #0a0a0b;
  --panel: #121214;
  --panel-2: #17171a;
  --line: #27272b;
  --text: #f2f2f3;
  --muted: #9a9aa2;
  --gold: #e3b341;
  --gold-dim: #c9a227;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; max-width: 100%; overflow-x: hidden; }

body {
  background:
    radial-gradient(900px 500px at 50% -200px, rgba(227, 179, 65, 0.16), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.page {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 18px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-x: hidden;
}

/* banner */
.notice-banner {
  display: block;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 11px 14px;
  border-radius: 999px;
  color: #0a0a0b;
  background: linear-gradient(90deg, var(--gold), #f4d27a);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.notice-banner:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* account summary */
.account-summary {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
}

.balance-box,
.account-number-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.balance-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.balance-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.balance-amount {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.balance-sub { font-size: 12px; color: var(--muted); }

.add-balance-button {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  min-height: 44px;
  font: inherit;
  font-weight: 600;
  color: #0a0a0b;
  background: var(--gold);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
  touch-action: manipulation;
}
.add-balance-button:hover { filter: brightness(1.07); transform: translateY(-1px); }

.account-number-value {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: clamp(18px, 5vw, 26px);
  letter-spacing: 0.1em;
  color: var(--gold);
  word-break: break-all;
}

/* brand */
.brand {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}

.brand-mascot {
  width: 140px;
  height: 140px;
  border-radius: 18px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--line);
}

.brand-copy h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.03em;
}
.brand-copy h1 span { color: var(--gold); }

.brand-copy p {
  margin: 0 0 12px;
  color: var(--muted);
  max-width: 54ch;
}

.brand-links { display: flex; gap: 10px; flex-wrap: wrap; }

.brand-links a {
  font-size: 13px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 7px 13px;
  border-radius: 999px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.brand-links a:hover { border-color: var(--gold); color: var(--gold); }

/* tabs */
.tabs {
  display: flex;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
}

.tab-button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
}
.tab-button:hover { color: var(--text); }
.tab-button[aria-selected="true"] { background: var(--gold); color: #0a0a0b; }

/* panels */
.tab-panel { display: flex; flex-direction: column; gap: 14px; }
.tab-panel[hidden] { display: none; }

.search-wrap { display: flex; }

.search-wrap input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  min-height: 44px;
  padding: 12px 14px;
}
.search-wrap input::placeholder { color: #6d6d75; }
.search-wrap input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  padding: 13px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(39, 39, 43, 0.7);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(227, 179, 65, 0.05); }

td.card-logo-cell { width: 52px; padding-right: 0; }
.card-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
}

td.card-name { font-weight: 600; white-space: normal; }
td.card-name small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--panel-2);
}
.pill.virtual { color: #7fd1c1; border-color: rgba(127, 209, 193, 0.4); }
.pill.physical { color: var(--gold); border-color: rgba(227, 179, 65, 0.45); }

.buy-button {
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  min-height: 40px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
}
.buy-button:hover { background: var(--gold); color: #0a0a0b; }

.table-note { margin: 0; font-size: 13px; color: var(--muted); }

.rate-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid rgba(227, 179, 65, 0.35);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-weight: 600;
}
.rate-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

/* how it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.step-index {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--gold);
  color: #0a0a0b;
  font-weight: 700;
  font-size: 13px;
}
.step h3 { margin: 12px 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }

details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
details[open] { border-color: rgba(227, 179, 65, 0.4); }
summary { cursor: pointer; font-weight: 600; }
summary::marker { color: var(--gold); }
details p { margin: 10px 0 0; color: var(--muted); }

/* footer */
.site-footer {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: #74747c;
  font-size: 12px;
}
.site-footer p { margin: 0 0 6px; }

/* dialogs */
dialog {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 18px;
  padding: 20px;
  width: min(440px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(3px); }

.dialog-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.dialog-top h2 { margin: 0; font-size: 19px; }

.dialog-close {
  border: 0;
  background: var(--panel-2);
  color: var(--muted);
  width: 40px; height: 40px;
  flex: 0 0 auto;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.dialog-close:hover { color: var(--text); }

.dialog-rows { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.dialog-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  border-bottom: 1px dashed rgba(39, 39, 43, 0.9);
  padding-bottom: 7px;
}
.dialog-row span:first-child { color: var(--muted); }
.dialog-row strong { font-variant-numeric: tabular-nums; }

.dialog-note { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

.dialog-action {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  min-height: 46px;
  font: inherit;
  font-weight: 600;
  color: #0a0a0b;
  background: var(--gold);
  cursor: pointer;
  touch-action: manipulation;
}
.dialog-action:hover { filter: brightness(1.07); }
.dialog-action[disabled] { opacity: 0.5; cursor: not-allowed; }

.dialog-amounts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.amount-chip {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  padding: 9px 14px;
  min-height: 42px;
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
}
.amount-chip:hover, .amount-chip[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }

.account-content { text-align: center; display: flex; flex-direction: column; gap: 12px; }
.account-content h2 { margin: 0; font-size: 20px; }
.account-content p { margin: 0; color: var(--muted); font-size: 14px; }
.account-number {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 34px;
  letter-spacing: 0.22em;
  color: var(--gold);
}
.account-warning { font-size: 12px; }
.account-confirm {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  min-height: 46px;
  font: inherit;
  font-weight: 600;
  background: var(--gold);
  color: #0a0a0b;
  cursor: pointer;
  touch-action: manipulation;
}

@media (max-width: 820px) {
  .account-summary { grid-template-columns: 1fr; }
  .brand { flex-direction: column; text-align: center; align-items: center; }
  .brand-copy p { max-width: none; }
  .brand-links { justify-content: center; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .brand-mascot { width: 96px; height: 96px; }
  .brand { padding: 18px; gap: 14px; }
  .balance-box, .account-number-box { padding: 16px; justify-content: center; text-align: center; }
  .balance-copy { align-items: center; }
  .add-balance-button { width: 100%; }
  .tabs { border-radius: 14px; }
  .tab-button { font-size: 13px; padding: 9px 4px; }
  .brand-links a { font-size: 12px; padding: 7px 11px; }
  table { min-width: 640px; }
  .rate-banner { flex-direction: column; align-items: flex-start; }
  dialog { padding: 16px; }
  .dialog-row { flex-wrap: wrap; }
  .account-number { font-size: 26px; letter-spacing: 0.14em; }
}
