:root {
  color-scheme: light;
  --ink: #152846;
  --mute: #486078;
  --paper: #f0f5f9;
  --line: #d6e2ec;
  --white: #fff;
  --accent: #005d6f;
  --tint: #e4f1f2;
  --warn: #79432a;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--accent); text-underline-offset: .2em; }
.frame { width: min(1072px, calc(100% - 36px)); margin-inline: auto; }
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.shell { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { color: var(--ink); font: 800 1.1rem/1 system-ui, sans-serif; text-decoration: none; white-space: nowrap; }
.brand-mark { color: white; background: var(--accent); display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; margin-right: 6px; }
nav { display: flex; gap: 3px; }
nav a { text-decoration: none; color: var(--mute); padding: 8px 10px; border-radius: 7px; }
nav [aria-current] { background: var(--tint); color: var(--accent); font-weight: 700; }
.intro { margin: clamp(30px, 7vw, 78px) 0 22px; }
.eyebrow { color: var(--accent); font-size: .83rem; font-weight: 700; margin: 0; }
h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); margin: .12em 0; line-height: 1.15; letter-spacing: -.025em; }
h2 { margin: 0; font-size: 1.2rem; }
p { margin: .55em 0; }
.subtitle, .muted { color: var(--mute); }
.connection { background: var(--tint); border: 1px solid var(--line); border-radius: 9px; padding: 11px 15px; color: var(--accent); margin: 0 0 18px; font-size: .92rem; }
.connection[data-offline] { background: #fff8ef; color: var(--warn); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(295px, 100%), 1fr)); gap: 16px; }
.card { background: var(--white); padding: clamp(17px, 3vw, 26px); border: 1px solid var(--line); border-radius: 13px; min-width: 0; }
.card > p:last-child { margin-bottom: 0; }
.card-head, .section-head, .actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.section-head { margin-bottom: 12px; }
.actions { justify-content: flex-start; margin-top: 12px; }
.pill { color: var(--accent); background: var(--tint); border-radius: 22px; padding: 4px 10px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.pill.warn { color: var(--warn); background: #fff3e7; }
button, .button { border: 1px solid transparent; border-radius: 8px; padding: 8px 13px; font: inherit; font-weight: 700; color: white; background: var(--accent); cursor: pointer; display: inline-block; text-decoration: none; }
button.secondary { background: white; color: var(--accent); border-color: var(--line); }
button:disabled { opacity: .52; cursor: default; }
:focus-visible { outline: 3px solid #007b9a; outline-offset: 3px; }
dl { margin: 14px 0 0; }
dl div { display: grid; grid-template-columns: minmax(88px, .7fr) minmax(0, 1fr); gap: 7px; padding: 7px 0; border-top: 1px solid var(--line); }
dt { color: var(--mute); }
dd { margin: 0; overflow-wrap: anywhere; }
details { margin-top: 14px; }
summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.number, .code { font: 700 clamp(1.45rem, 4vw, 2.4rem)/1.22 ui-monospace, monospace; overflow-wrap: anywhere; margin: .35em 0; font-variant-numeric: tabular-nums; }
.code { color: var(--accent); letter-spacing: .15em; }
.message { background: var(--tint); border-radius: 8px; padding: 10px 13px; margin: 14px 0; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.receipt { margin-bottom: 16px; border-top: 4px solid var(--accent); }
.notice { color: var(--warn); }
.footer { color: var(--mute); border-top: 1px solid var(--line); display: flex; justify-content: space-between; margin-top: 40px; padding-block: 13px 28px; font-size: .85rem; }
.platform-cards { grid-template-columns: repeat(auto-fit, minmax(min(222px, 100%), 1fr)); }
.orders { margin-top: 24px; }
@media (max-width: 450px) {
  nav a { padding-inline: 6px; font-size: .875rem; }
}
dialog { border: 1px solid var(--line); border-radius: 13px; color: var(--ink); max-width: min(480px, calc(100% - 24px)); }
dialog::backdrop { background: #15284677; }
dialog li { margin-block: 8px; }

.sms-body { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper); border-radius: 6px; padding: 8px; }
button.danger { background: #9b3224; }
#storage-dialog ul { padding-left: 0; list-style: none; }
