:root {
  --bg: #f2f6fb;
  --surface: #fbfdff;
  --surface-soft: #edf3fa;
  --border: #d6e1ee;
  --text: #172033;
  --muted: #66758c;
  --accent: #2865e8;
  --accent-dark: #1f53c3;
  --accent-soft: #e7efff;
  --success: #0b986a;
  --success-soft: #dcf8eb;
  --warning: #b77a00;
  --warning-soft: #fff1c7;
  --danger: #c64242;
  --radius: 12px;
  --shadow: 0 18px 55px rgba(44, 72, 109, .12);
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); }
.contact-jump { color: var(--accent-dark); font-weight: 800; text-underline-offset: 3px; }
#contactSupport { scroll-margin-top: 20px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
.toast {
  position: fixed;
  z-index: 100;
  top: calc(18px + env(safe-area-inset-top));
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 9px;
  background: #172433;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 45%, rgba(40, 101, 232, .08), transparent 34%),
    var(--bg);
}

.login-card {
  width: min(560px, 100%);
  padding: 44px 44px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.brand-logo { display: block; width: min(224px, 62%); height: auto; margin: 0 auto 22px; }
.login-card h1 { margin: 0; font-size: clamp(27px, 5.4vw, 34px); letter-spacing: -.03em; }
.login-copy { margin: 12px auto 30px; color: var(--muted); font-size: 15px; }
.login-card form { text-align: left; }
label { display: block; margin-bottom: 8px; font-weight: 700; color: #45546b; }
.login-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
input {
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #bdcde0;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  outline: none;
}
input::placeholder { color: #7c8798; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(40, 101, 232, .15); }
.safety-note { margin: 26px 0 0; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; line-height: 1.7; }
.form-error { min-height: 22px; margin: 8px 0 0; color: var(--danger); font-size: 14px; }
.purchase-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}
.purchase-entry .secondary { min-height: 40px; padding: 0 18px; }
.purchase-entry .text-button { min-height: 40px; padding: 0 14px; }
.purchase-recovery {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid #b9ecd4;
  border-radius: 10px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}
.purchase-recovery:hover { border-color: var(--success); }
.login-contact {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid #cfe0f7;
  border-radius: 12px;
  background: var(--accent-soft);
}
.login-contact strong { color: var(--accent-dark); font-size: 19px; letter-spacing: .01em; overflow-wrap: anywhere; }
.login-contact span { color: #5b6c86; font-size: 13px; }
.login-contact span i { margin: 0 8px; color: #a9bcd8; font-style: normal; }

.purchase-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(23, 32, 51, .24);
}
.purchase-dialog::backdrop { background: rgba(18, 31, 49, .52); backdrop-filter: blur(3px); }
.purchase-dialog-body { position: relative; padding: 34px; }
.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 25px;
  line-height: 1;
}
.dialog-close:hover { color: var(--text); background: #e2eaf4; }
.purchase-eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.purchase-dialog h2 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.purchase-copy { margin: 12px 0 22px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.purchase-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
}
.purchase-summary span { min-width: 0; font-weight: 800; line-height: 1.4; }
.purchase-summary strong { flex: 0 0 auto; color: var(--accent); font-size: 18px; white-space: nowrap; }
.purchase-state { margin-top: 18px; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.pay-method:hover { border-color: color-mix(in srgb, var(--pay-brand, var(--accent)) 45%, var(--border)); }
.pay-method[aria-checked="true"] {
  border-color: var(--pay-brand, var(--accent));
  background: color-mix(in srgb, var(--pay-brand, var(--accent)) 7%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pay-brand, var(--accent)) 16%, transparent);
}
.pay-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--pay-brand, var(--muted));
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.pay-logo { flex: 0 0 auto; width: 26px; height: 26px; object-fit: contain; }
.pay-method[data-pay="alipay"] { --pay-brand: #1677ff; }
.pay-method[data-pay="wxpay"] { --pay-brand: #07c160; }
.pay-method[data-pay="qqpay"] { --pay-brand: #12b7f5; }
.pay-method[data-pay="jdpay"] { --pay-brand: #e1251b; }
.pay-method[data-pay="usdt"] { --pay-brand: #26a17b; }
.purchase-order-line { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.purchase-order-line code { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; text-align: right; }
.purchase-pay-link { display: flex; align-items: center; justify-content: center; min-height: 52px; text-decoration: none; }
.purchase-status { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.purchase-restart { display: block; width: 100%; margin-top: 12px; font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 5px var(--warning-soft); }
.purchase-success { text-align: center; }
.success-mark { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; color: #fff; background: var(--success); font-size: 28px; font-weight: 900; }
.purchase-success h3 { margin: 0 0 20px; font-size: 20px; }
.purchase-success label { text-align: left; }
.purchase-success input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 19px; font-weight: 800; letter-spacing: .08em; text-align: center; }
.purchase-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.purchase-error { margin-top: 12px; text-align: center; }
.purchase-footnote { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }

.history-list { display: grid; gap: 10px; max-height: min(46dvh, 380px); overflow-y: auto; }
.history-empty { margin: 4px 0; color: var(--muted); font-size: 14px; }
.history-row { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.history-row-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-row-top time { color: var(--muted); font-size: 13px; }
.history-status { font-size: 13px; font-weight: 800; }
.history-status.paid { color: var(--success); }
.history-status.pending { color: var(--warning); }
.history-status.muted { color: var(--muted); }
.history-key { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.history-key code { flex: 1; min-width: 0; font: 800 15px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; overflow-wrap: anywhere; }
.history-key .text-button, .history-row > .text-button { min-height: 34px; }
.history-row > .text-button { justify-self: start; color: var(--accent); border-color: #c4d7f6; }

.primary, .secondary, .text-button {
  min-height: 46px;
  border-radius: 9px;
  border: 1px solid transparent;
  padding: 0 22px;
  font-weight: 800;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.primary { background: var(--accent); color: #f8fbff; }
.primary:hover:not(:disabled) { background: var(--accent-dark); }
.secondary { border-color: #c8d7e9; background: var(--accent-soft); color: var(--accent); }
.secondary:hover:not(:disabled) { border-color: #98b4e9; }
.text-button { min-height: 38px; padding: 0 14px; background: transparent; border-color: var(--border); color: var(--muted); }
.primary:active:not(:disabled), .secondary:active:not(:disabled), .text-button:active:not(:disabled) { transform: translateY(1px); }
.wide { width: 100%; }

.console-page { min-height: 100dvh; }
.workspace { max-width: 1440px; margin: 0 auto; padding: 18px 30px 34px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  border: 1px solid #dbe6f6;
  border-radius: var(--radius);
  background: linear-gradient(115deg, #ffffff 0%, #f2f7ff 55%, #e8f0ff 100%);
  box-shadow: 0 10px 26px rgba(44, 72, 109, .08);
}
@media (min-width: 761px) {
  .topbar { position: sticky; top: 14px; z-index: 5; }
}
.topbar-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-logo { display: block; width: 46px; height: auto; }
.kicker, .step-label { display: block; margin: 0 0 8px; color: #718199; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.topbar .kicker { margin-bottom: 3px; color: #8195b0; }
.topbar h1, .panel h2 { margin: 0; letter-spacing: -.03em; }
.topbar h1 { font-size: 25px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.top-link {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #cfdef4;
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
  color: #45546b;
  font-size: 14px;
  font-weight: 700;
}
.top-link:hover { border-color: #a9c4ec; color: var(--accent-dark); }
.badge, .state-chip { padding: 9px 12px; border-radius: 9px; background: var(--surface-soft); color: #526178; font-size: 13px; font-weight: 800; }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.error { background: #fde8e8; color: var(--danger); }

.notice { margin-top: 16px; padding: 14px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 430px); gap: 12px 32px; align-items: start; }
.notice-tips { min-width: 0; }
.notice-tips summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.notice-tips summary:hover { border-color: #b9cdea; }
.notice-tips summary::-webkit-details-marker { display: none; }
.notice-tips summary::after { content: "▾"; margin-left: auto; padding-left: 10px; color: var(--muted); font-size: 13px; }
.notice-tips[open] summary::after { content: "▴"; }
.tips-icon { flex: 0 0 auto; width: 30px; height: auto; margin: -2px -2px -2px 0; }
.tips-flag { flex: 0 0 auto; padding: 3px 8px; border-radius: 6px; background: #fff1cf; color: #8a5b06; font-size: 12px; }
.tips-hint { min-width: 0; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.6; }
.notice-tips[open] .tips-hint { display: none; }
.notice ol { margin: 12px 0 4px; padding-left: 24px; color: #526178; line-height: 1.9; }
.access-login .form-error { min-height: 0; margin-top: 8px; }
.access-login .form-error:empty { display: none; }
.notice li strong { color: var(--text); }
.access-login { min-width: 0; max-width: 100%; display: grid; gap: 10px; }
.vpn-ad {
  display: block;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #102a6b;
  line-height: 0;
  text-decoration: none;
}
.vpn-ad:not([href]) { pointer-events: none; cursor: default; }
.vpn-ad img { display: block; width: 100%; max-width: 100%; height: auto; }
.current-key { display: flex; align-items: center; gap: 12px; margin-bottom: 0; padding: 8px 8px 8px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); }
.current-key > span { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 800; }
.current-key code { flex: 1; min-width: 0; color: var(--text); font: 800 17px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; overflow-wrap: anywhere; }
.current-key .text-button { flex: 0 0 auto; min-height: 34px; }
.access-login-row { display: grid; grid-template-columns: minmax(0, 1fr) 88px 84px; gap: 10px; }
.access-login-row input { min-width: 0; height: 46px; font-size: 17px; letter-spacing: .08em; }
.access-login-row button { height: 46px; padding: 0; }
.access-exit { border-color: transparent; background: #e7efff; color: var(--accent); }
.access-exit:hover { background: #dce8ff; }

.steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr) minmax(0, 1fr); gap: 18px; margin-top: 16px; }
.step-card { min-height: 480px; padding: 22px; }
.step-heading, .timeline-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.step-heading h2 { font-size: 22px; }
.step-label { display: flex; align-items: center; gap: 9px; }
.step-no {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-style: normal;
}
.conversation-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.conversation-notice { margin: 0; padding: 10px 12px; border: 1px solid #f6dca4; border-radius: 9px; background: #fff8e8; color: #8a5b06; font-size: 13px; font-weight: 700; line-height: 1.55; }
.state-chip { white-space: nowrap; }
.state-chip.waiting { background: var(--warning-soft); color: var(--warning); }
.state-chip.success { background: var(--success-soft); color: var(--success); }
.state-chip.error { background: #fde8e8; color: var(--danger); }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.route-metric { grid-column: 1 / -1; }
.metric, .stock-box, .session-metrics > div { padding: 16px; border-radius: 9px; background: var(--surface-soft); }
.metric span, .stock-box span, .number-box span, .code-box span, .session-metrics span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.metric strong { font-size: 18px; }
.route-metric label { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.route-select-shell {
  position: relative;
  isolation: isolate;
  min-height: 62px;
  overflow: visible;
  border: 1px solid #b9cce4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow: 0 4px 12px rgba(42, 76, 126, .06);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.route-select-shell::after { content: ''; position: absolute; z-index: 2; top: 30px; right: 19px; width: 9px; height: 9px; border-right: 2px solid #64748b; border-bottom: 2px solid #64748b; transform: translateY(-70%) rotate(45deg); pointer-events: none; transition: transform .15s ease; }
.route-select-shell.open { z-index: 30; }
.route-select-shell.open::after { transform: translateY(-20%) rotate(225deg); }
.route-select-shell.locked { border-color: #d6dee9; background: #edf2f7; box-shadow: none; }
.route-select-shell.locked::before { content: ''; position: absolute; z-index: 0; inset: 0 auto 0 0; width: var(--route-lock-progress, 0%); border-radius: inherit; background: rgba(255, 255, 255, .78); box-shadow: 5px 0 12px rgba(255, 255, 255, .55); transition: width .35s linear; }
.route-select-shell.locked::after { content: attr(data-lock-label); top: 50%; right: 12px; width: auto; height: auto; padding: 4px 7px; border: 0; border-radius: 6px; background: #dbe3ed; color: #718096; font-size: 11px; font-weight: 800; line-height: 1; transform: translateY(-50%); }
.route-select-shell.locked .route-select-display { padding-right: 68px; }
.route-select-shell.locked .route-flag { opacity: .7; filter: grayscale(.35); }
.route-select-shell.locked .route-copy strong { color: #5f6f82; }
.route-select-shell.locked .route-copy small { color: #8a98a9; }
.route-select-shell:hover { border-color: #8cadd8; }
.route-select-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(40, 101, 232, .15), 0 6px 16px rgba(42, 76, 126, .08); }
.route-select-display { position: relative; z-index: 1; width: 100%; min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 8px 48px 8px 14px; border: 0; border-radius: 11px; background: transparent; text-align: left; }
.route-select-display:disabled { cursor: not-allowed; opacity: 1; }
.route-select-display .route-flag { display: block; flex: 0 0 32px; width: 32px; height: 20px; margin: 0; border-radius: 2px; box-shadow: 0 0 0 1px rgba(15, 31, 50, .12); object-fit: cover; }
.route-select-display .route-copy { min-width: 0; display: grid; gap: 2px; margin: 0; }
.route-copy strong { overflow: hidden; color: var(--text); font-size: 16px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.route-copy small { overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.route-native-select { display: none; }
.route-options { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; left: 0; overflow: hidden; padding: 6px; border: 1px solid #b9cce4; border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(29, 54, 88, .2); }
.route-option { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.route-option:hover, .route-option:focus-visible { background: #edf4ff; outline: none; }
.route-option.selected { background: #e5efff; color: var(--accent-dark); }
.route-option img { flex: 0 0 32px; width: 32px; height: 20px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(15, 31, 50, .12); object-fit: cover; }
.route-option span { min-width: 0; display: grid; gap: 2px; margin: 0; }
.route-option strong { overflow: hidden; font-size: 15px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.route-option small { overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.stock-box { display: grid; margin-bottom: 22px; background: #fff; border: 1px solid var(--border); }
.stock-box strong { font-size: 24px; }
.stock-box small { margin-top: 5px; color: var(--muted); }
.acquire-error { margin: -10px 0 14px; color: var(--danger); font-size: 14px; font-weight: 800; line-height: 1.5; }
.acquire-error:empty { display: none; }
.number-box { display: grid; gap: 12px; margin: 22px 0 18px; padding: 20px; border: 1px solid var(--border); border-radius: 9px; }
.number-box strong { min-height: 50px; font-size: clamp(28px, 4vw, 42px); letter-spacing: .02em; }
.session-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.session-metrics strong { overflow-wrap: anywhere; }
.progress { height: 10px; margin-top: 18px; overflow: hidden; border-radius: 6px; background: #dfe7f1; }
.progress > div { width: 0; height: 100%; background: var(--accent); transition: width .3s ease; }
.code-box { display: grid; place-items: center; min-height: 220px; margin: 22px 0; padding: 24px; border: 1px solid var(--border); border-radius: 9px; text-align: center; }
.code-box strong { color: var(--success); font-size: clamp(34px, 5vw, 60px); letter-spacing: .04em; overflow-wrap: anywhere; }
.step-card > .wide + .wide { margin-top: 10px; }

.timeline { margin-top: 20px; padding: 24px 28px; }
.timeline-heading { align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.log-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; padding-top: 16px; }
.log-entry { display: flex; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; color: #4b5b72; background: #fff; }
.log-entry time { color: var(--muted); white-space: nowrap; font-size: 12px; }
.log-empty { margin: 0; color: var(--muted); }
.contact { margin-top: 20px; padding: 40px clamp(28px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); align-items: stretch; gap: clamp(32px, 7vw, 96px); }
.contact-left { display: grid; align-content: center; gap: 18px; width: min(100%, 580px); justify-self: center; min-width: 0; }
.contact-copy { width: 100%; padding: clamp(30px, 4vw, 44px); border: 1px solid #c8daf8; border-radius: 14px; text-align: center; background: #f3f7ff; box-shadow: 0 18px 44px rgba(40, 101, 235, .08); }
.contact-vpn-ad { width: 100%; }
.contact-copy h2 { margin-top: 8px; font-size: clamp(30px, 3vw, 40px); }
.contact-services { display: grid; width: fit-content; gap: 8px; margin: 26px auto 0; color: var(--text); font-size: clamp(20px, 2vw, 25px); font-weight: 900; line-height: 1.35; }
.contact-services p { display: flex; align-items: center; gap: 12px; margin: 0; }
.contact-arrow { color: var(--accent); font-size: clamp(25px, 2.5vw, 34px); font-weight: 400; line-height: 1; letter-spacing: .28em; white-space: nowrap; }
.contact-guide { display: grid; justify-items: start; margin-top: 14px; color: var(--accent); }
.contact-down { font-size: clamp(28px, 3vw, 38px); font-weight: 400; line-height: 1; letter-spacing: .12em; white-space: nowrap; }
.contact-details { display: grid; gap: 8px; margin: 16px 0 0; color: var(--text); font-weight: 700; }
.contact-copy .contact-details strong { color: var(--accent); font-size: clamp(22px, 2.2vw, 28px); }
.contact-details span { color: #34445b; }
.contact-qr { width: 100%; margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #fff; transform: translateX(-48px); }
.contact-qr img { display: block; width: 100%; height: auto; }

.not-found-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.not-found-card { width: min(100%, 520px); padding: clamp(36px, 8vw, 64px); text-align: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 24px 70px rgba(41, 77, 126, .10); }
.not-found-logo { display: block; width: 62px; height: auto; margin: 0 auto 28px; }
.not-found-code { margin: 0; color: var(--accent); font-size: clamp(64px, 18vw, 112px); font-weight: 900; line-height: .9; letter-spacing: -.06em; }
.not-found-card h1 { margin-top: 24px; font-size: clamp(28px, 7vw, 38px); }
.not-found-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 30px; padding: 0 28px; border-radius: 9px; color: #fff; background: var(--accent); font-weight: 800; text-decoration: none; }
.not-found-link:focus-visible { outline: 3px solid rgba(40, 101, 235, .28); outline-offset: 3px; }
.not-found-link:active { transform: translateY(1px); }

@media (max-width: 1180px) {
  .notice { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step-card:last-child { grid-column: 1 / -1; min-height: auto; }
}

@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .login-page { padding: 16px; }
  .login-card { padding: 32px 22px 28px; }
  .login-copy { margin: 12px auto 24px; line-height: 1.65; }
  .safety-note { margin-top: 26px; padding-top: 20px; }
  .login-row { grid-template-columns: 1fr; }
  .purchase-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .purchase-dialog-body { padding: 28px 20px 22px; }
  .purchase-summary { gap: 12px; }
  .purchase-actions { grid-template-columns: 1fr; }
  .workspace { padding: calc(12px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .topbar, .notice, .contact { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
  .topbar { gap: 14px; padding: 16px 18px; }
  .topbar-logo { width: 42px; }
  .topbar h1 { font-size: 22px; }
  .top-actions { justify-content: flex-start; }
  .notice { gap: 12px; padding: 14px 16px; }
  .notice-tips summary { font-size: 15px; }
  .notice ol { margin-top: 6px; padding-left: 21px; font-size: 14px; line-height: 1.75; }
  .access-login-row { grid-template-columns: minmax(0, 1fr) 76px 72px; }
  .access-login-row input { font-size: 16px; }
  .conversation-heading { grid-template-columns: minmax(0, 1fr) auto; }
  .conversation-heading .state-chip { grid-column: 2; grid-row: 1; }
  .conversation-notice { grid-column: 1 / -1; grid-row: 2; }
  .steps { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .step-card, .step-card:last-child { grid-column: auto; min-height: auto; padding: 18px; }
  .route-select-shell { min-height: 64px; border-radius: 11px; }
  .route-select-display { min-height: 62px; padding-right: 44px; }
  .route-select-shell::after { right: 17px; }
  .number-box strong { font-size: 30px; overflow-wrap: anywhere; }
  .code-box { min-height: 160px; margin: 18px 0; padding: 18px; }
  .code-box strong { font-size: clamp(32px, 12vw, 48px); }
  .primary, .secondary, .text-button { min-height: 50px; }
  .timeline { margin-top: 12px; padding: 20px; }
  .timeline-heading { align-items: flex-start; flex-direction: column; }
  .metric-grid, .session-metrics { grid-template-columns: 1fr 1fr; }
  .log-entry { flex-direction: column; gap: 5px; }
  .contact { gap: 24px; padding: 28px 20px; }
  .contact-left { width: 100%; justify-self: stretch; }
  .contact-copy { width: 100%; justify-self: stretch; padding: 26px 20px; text-align: center; }
  .contact-services { margin-top: 20px; }
  .contact-services p { gap: 0; }
  .contact-arrow, .contact-down { display: none; }
  .contact-guide { display: none; }
  .contact-details { margin-top: 16px; overflow-wrap: anywhere; }
  .contact-qr { width: min(100%, 340px); justify-self: center; transform: none; }
}

@media (max-width: 420px) {
  .top-actions { gap: 7px; }
  .badge, .state-chip { padding: 8px 10px; }
  .step-heading { gap: 10px; }
  .step-heading h2 { font-size: 20px; }
  .metric, .stock-box, .session-metrics > div { padding: 14px; }
  .number-box { padding: 16px; }
  .number-box strong { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
