:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: #34352f;
  background: #ffffff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #34352f;
  --muted: #7a7b74;
  --subtle: #96988e;
  --purple: #34352f;
  --purple-light: #fff4c2;
  --surface: #fff;
  --canvas: #ffffff;
  --soft: #f4f3ef;
  --line: #e7e6e2;
  --green: #187542;
  --green-bg: #e5f5ea;
  --orange: #aa5806;
  --orange-bg: #fff2e2;
  --red: #bd3731;
  --red-bg: #fdebe9;
  --shadow: 0 8px 28px rgba(52, 53, 47, .035);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(245, 206, 79, .6); outline-offset: 2px; }
.hidden, [hidden] { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; letter-spacing: .02em; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 28px 16px 20px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.16rem; line-height: 1.18; }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; width: 44px; height: 44px; flex: none; object-fit: contain; }
.brand-name { white-space: nowrap; }
.brand-loading-mark { display: block; width: 72px; height: 72px; margin: 0 auto 20px; object-fit: contain; }
.nav-list { margin-top: 42px; display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 14px; min-height: 43px; border-radius: 10px; padding: 8px 14px; color: var(--muted); font-size: .92rem; font-weight: 600; }
.nav-link svg { width: 20px; height: 20px; flex: none; }
.nav-link:hover { text-decoration: none; color: var(--purple); background: #eeede7; }
.nav-link.active { color: var(--purple); background: var(--purple-light); }
.sidebar-user { margin-top: auto; min-height: 64px; padding: 12px; border-radius: 10px; background: #f0efe9; display: flex; gap: 8px; align-items: center; font-size: .85rem; font-weight: 650; }
.sidebar-account { flex: 1; min-width: 0; color: var(--ink); }
.sidebar-account span, .sidebar-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account small { margin-top: 4px; color: var(--subtle); font-size: .7rem; font-weight: 500; }
.sidebar-logout { display: grid; justify-items: center; gap: 4px; flex: none; border: 0; color: var(--muted); background: transparent; padding: 6px; font-size: .69rem; }
.sidebar-logout:hover { color: var(--purple); }
.main { min-width: 0; }
.content { max-width: 1320px; padding: 32px 48px 64px; margin: 0 auto; }
.mobile-header, .mobile-tabbar { display: none; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; min-height: 26px; }
.topline .crumb { color: var(--subtle); font-size: .85rem; }
.service-health { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.service-health .dot { width: 7px; height: 7px; border-radius: 50%; background: #9da0b3; }
.service-health.is-online .dot { background: var(--green); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.75rem, 2.2vw, 2.2rem); line-height: 1.25; margin-bottom: 8px; letter-spacing: -.02em; }
h2 { font-size: 1.18rem; line-height: 1.35; margin-bottom: 12px; }
h3 { font-size: .98rem; line-height: 1.45; margin-bottom: 10px; }
p { line-height: 1.65; }
.page-lead { color: var(--muted); font-size: .96rem; margin-bottom: 0; }
.eyebrow { color: var(--purple); font-weight: 750; font-size: .79rem; letter-spacing: .04em; margin-bottom: 10px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.card-pad { padding: 28px; }
.soft-box { background: #f7f6f3; border-radius: 14px; padding: 18px 20px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .9fr); gap: 22px; align-items: start; }
.stack { display: grid; gap: 20px; }
.account-links { gap: 9px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.flex-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; padding: 10px 17px; font-size: .9rem; font-weight: 700; border: 1px solid transparent; text-align: center; line-height: 1.25; }
.button:hover { text-decoration: none; filter: brightness(.97); }
.button.primary { background: var(--purple); color: white; }
.button.secondary { background: white; color: var(--ink); border-color: #e0dfd8; }
.button.ghost { background: transparent; color: var(--purple); padding-left: 8px; padding-right: 8px; }
.button.danger { background: white; color: var(--red); border-color: var(--red); }
.button:disabled { background: #f0efea; color: #96988e; border-color: transparent; filter: none; }
.button.full { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.link-button { background: none; border: none; padding: 0; color: var(--purple); font-weight: 700; }
.link-button:hover { text-decoration: underline; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; background: #f0efea; color: #6d6f63; padding: 5px 10px; font-size: .77rem; font-weight: 700; white-space: nowrap; line-height: 1.15; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { color: var(--green); background: var(--green-bg); }
.badge.orange { color: var(--orange); background: var(--orange-bg); }
.badge.red { color: var(--red); background: var(--red-bg); }
.badge.purple { color: var(--purple); background: var(--purple-light); }
.badge.no-dot::before { display: none; }
.alias-avatar { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--purple-light); color: var(--purple); font-size: 1.22rem; font-weight: 800; }
.alias-avatar.alt { background: #f5f3ea; color: #67634c; }
.alias-title { font-size: 1.18rem; font-weight: 800; line-height: 1.2; margin-bottom: 4px; }

.notice { display: flex; align-items: flex-start; gap: 13px; padding: 16px 18px; border-radius: 13px; background: #f7f6f3; color: #67685f; margin-bottom: 22px; }
.notice .icon { flex: none; width: 21px; height: 21px; }
.notice strong { display: block; color: var(--ink); margin-bottom: 3px; }
.notice p { margin-bottom: 0; font-size: .88rem; }
.notice.warn { background: #fff4e6; color: #96520b; }
.notice.warn strong { color: #3d2a18; }
.notice.error { background: var(--red-bg); color: var(--red); }
.notice.success { background: var(--green-bg); color: var(--green); }
.notice.error strong, .notice.success strong { color: inherit; }
.notice:last-child { margin-bottom: 0; }
.empty-state { text-align: center; padding: 56px 30px; }
.empty-icon { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 22px; background: var(--purple-light); color: var(--purple); }
.empty-state h2 { font-size: 1.28rem; margin-bottom: 12px; }
.empty-state p { color: var(--muted); max-width: 520px; margin: 0 auto 24px; }
.empty-state .button { min-width: 200px; }

.number-card { padding: 25px; display: grid; gap: 22px; }
.number-card .snippet { min-height: 88px; padding: 18px; }
.number-card .snippet .small { color: var(--subtle); }
.number-card .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.explain-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; background: #f7f6f3; padding: 24px; border-radius: 16px; margin-top: 24px; }
.step-number { background: white; border: 1px solid var(--line); width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; margin-right: 8px; }
.explain-steps strong { font-size: .91rem; }
.explain-steps p { color: var(--muted); font-size: .79rem; margin: 8px 0 0; line-height: 1.5; }

.profile-header { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.profile-header h1 { margin: 0; }
.profile-header .phone { color: var(--subtle); font-size: .86rem; margin-top: 6px; }
.profile-header .settings-link { margin-left: auto; }
.stage-card { padding: 28px; min-height: 500px; }
.stage-steps { display: flex; align-items: center; margin-bottom: 60px; gap: 8px; }
.stage-step { display: flex; align-items: center; gap: 8px; color: #96988e; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.stage-step.done, .stage-step.active { color: var(--purple); }
.stage-step .step-ball { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #e2e1d9; background: white; }
.stage-step.done .step-ball, .stage-step.active .step-ball { border-color: var(--purple); }
.stage-step.done .step-ball { color: white; background: var(--purple); }
.stage-line { flex: 1; min-width: 8px; height: 3px; background: #e7e6e2; }
.stage-line.done { background: var(--purple); }
.stage-main { text-align: center; max-width: 640px; margin: 0 auto; }
.stage-main h2 { font-size: 1.45rem; margin-bottom: 12px; }
.stage-main p { color: var(--muted); }
.stage-illustration { margin: 0 auto 20px; width: 82px; height: 82px; border-radius: 50%; background: var(--purple-light); color: var(--purple); display: grid; place-items: center; }
.stage-illustration.danger { background: var(--red-bg); color: var(--red); }
.stage-illustration.green { background: var(--green-bg); color: var(--green); }
.stage-metric { font-size: clamp(2.7rem, 5vw, 4.5rem); font-weight: 800; line-height: 1.1; margin: 12px 0; font-variant-numeric: tabular-nums; }
.stage-metric.ready { color: var(--purple); }
.stage-footnote { margin-top: 42px; }
.detail-list { margin: 0; }
.detail-list div { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 14px 0; }
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--subtle); }
.detail-list dd { margin: 0; text-align: right; font-weight: 700; }
.record-code { padding: 17px; border-radius: 11px; background: #f7f6f3; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .84rem; }

.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-weight: 700; font-size: .88rem; }
.field .hint { color: var(--subtle); font-size: .78rem; margin-top: 1px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #deddd6; border-radius: 10px; background: white; color: var(--ink); padding: 12px 14px; min-height: 45px; outline: none; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(245, 206, 79, .18); }
.field input::placeholder, .field textarea::placeholder { color: #a0a195; }
.field .error-text { color: var(--red); font-size: .82rem; }
.check-label { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.check-label input { margin-top: 3px; accent-color: var(--purple); width: 17px; height: 17px; }
.segmented { display: flex; gap: 4px; padding: 5px; border-radius: 12px; background: #f4f3ef; margin-bottom: 18px; }
.segmented button { flex: 1; background: transparent; color: var(--muted); border: 0; padding: 11px 10px; border-radius: 9px; font-weight: 700; }
.segmented button.active { color: var(--ink); background: white; box-shadow: 0 2px 7px rgba(20, 23, 43, .07); }
.upload-drop { min-height: 176px; border: 1.5px dashed #deddd6; border-radius: 14px; display: grid; place-content: center; text-align: center; color: var(--muted); background: #fdfcf9; padding: 20px; }
.upload-drop strong { color: var(--ink); }
.upload-drop input { margin: 15px auto 0; max-width: 100%; }
.camera-preview { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #1c1d30; border-radius: 14px; }
.form-footer { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: 40% minmax(0, 1fr); background: white; }
.auth-hero { background: linear-gradient(155deg, #fff9df 0%, #f7f6f3 100%); padding: 54px clamp(26px, 5vw, 90px); display: flex; flex-direction: column; }
.auth-hero .brand { margin-bottom: auto; }
.auth-hero h1 { font-size: clamp(2rem, 3.6vw, 3.3rem); line-height: 1.22; max-width: 560px; margin-bottom: 28px; }
.auth-hero p { color: var(--muted); max-width: 550px; font-size: 1.03rem; }
.auth-points { margin: 30px 0 50px; display: grid; gap: 18px; color: var(--muted); font-size: .9rem; }
.auth-point { display: flex; gap: 10px; align-items: center; }
.auth-point .icon { width: 30px; height: 30px; border-radius: 9px; background: white; color: var(--purple); display: grid; place-items: center; }
.auth-hero small { color: var(--subtle); }
.auth-panel { padding: 54px 32px; display: flex; align-items: center; justify-content: center; }
.auth-box { width: min(100%, 420px); }
.auth-box h1 { font-size: 1.72rem; }
.auth-box .button.full { min-height: 48px; }
.auth-switch { text-align: center; margin-top: 25px; color: var(--muted); }
.registration-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.registration-code-row input { min-width: 0; }
.registration-code-row .button { white-space: nowrap; padding-inline: 12px; }
.registration-code-row + p { margin: 8px 0 0; }

.inbox-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, 1fr); gap: 20px; align-items: start; }
.message-group { overflow: hidden; margin-bottom: 18px; }
.message-group-header { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.message-group-header .alias-avatar { width: 36px; height: 36px; font-size: .94rem; }
.message-entry { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: white; text-align: left; padding: 14px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.message-entry:last-child { border-bottom: 0; }
.message-entry:hover, .message-entry.selected { background: #fffbed; }
.message-entry strong { font-size: .88rem; }
.message-entry p { color: var(--muted); margin: 6px 0 0; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.message-entry .small { color: var(--subtle); text-align: right; }
.message-detail { position: sticky; top: 28px; min-height: 390px; padding: 22px; }
.message-detail .body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; margin: 18px 0; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-tab { border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 999px; padding: 8px 14px; font-size: .83rem; font-weight: 700; }
.filter-tab.active { color: white; background: var(--ink); border-color: var(--ink); }
.search-input { border: 1px solid var(--line); border-radius: 11px; min-height: 43px; padding: 10px 13px; width: min(100%, 310px); }
.notification-row { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.notification-row:last-child { border-bottom: 0; }
.notification-row .icon-wrap { flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--purple-light); color: var(--purple); display: grid; place-items: center; }
.notification-bell { position: relative; }
.notification-bell-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #e9b929; top: 7px; right: 7px; border: 1px solid white; }
.notification-page { gap: 24px; }
.notification-section-heading { margin-bottom: 12px; }
.notification-section-heading h2 { margin: 0; }
.notification-tabs { max-width: 360px; margin-bottom: 12px; }
.notification-list { overflow: hidden; }
.notification-row.is-unread { background: #fffdf5; }
.notification-row-body { min-width: 0; flex: 1; }
.notification-row-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.notification-row-heading > .small { margin-left: auto; }
.notification-row-body > p { margin: 7px 0 10px; overflow-wrap: anywhere; }
.notification-channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.notification-channel-card { border: 1px solid var(--line); background: white; border-radius: 12px; padding: 17px; }
.notification-channel-card > p { margin: 9px 0 12px; }
.notification-more-channels { margin-top: 14px; }
.notification-more-channels > summary { font-size: .85rem; color: var(--muted); padding: 8px 0; cursor: pointer; }
.notification-more-channels > .notification-channel-grid { margin-top: 8px; }
.notification-channel-status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.notification-channel-fields .field:last-child { margin-bottom: 16px; }
.notification-check { display: flex; gap: 10px; align-items: flex-start; margin: 15px 0; cursor: pointer; }
.notification-check > input { flex: none; width: 17px; height: 17px; margin-top: 3px; accent-color: #e9b929; }
.notification-check strong { display: block; font-size: .88rem; }
.notification-check small { display: block; color: var(--muted); font-size: .77rem; line-height: 1.6; margin-top: 4px; }
.notification-body-consent { border: 1px solid #ede5c9; background: #fffdf5; border-radius: 10px; padding: 13px; }
.notification-test { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin: 12px 0; }
.notification-test .row-between { gap: 12px; align-items: center; }
.notification-test-result { margin: 8px 0 0; }
.notification-test-result.is-success { color: var(--green); }
.notification-test-result.is-error { color: var(--red); }
.message-deliveries { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.message-deliveries h3 { font-size: .95rem; margin: 0 0 8px; }
.message-delivery-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.message-delivery-list li { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.message-delivery-list li p { margin: 4px 0 0; }
.notification-more { display: flex; justify-content: center; padding: 14px 0 4px; }
@media (max-width: 640px) { .notification-test .row-between { flex-direction: column; align-items: stretch; } }
.notification-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
@media (max-width: 1000px) { .notification-channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .notification-channel-grid { grid-template-columns: 1fr; }
  .notification-row { padding: 16px; gap: 10px; }
  .notification-row .icon-wrap { width: 32px; height: 32px; }
  .notification-row-heading > .small { margin-left: 0; flex-basis: 100%; }
  .notification-section-heading { gap: 8px; align-items: flex-start; }
  .notification-section-heading h2 { font-size: 1rem; }
}
.table-list { border-top: 1px solid var(--line); }
.table-row { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1.4fr); gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.table-row:last-child { border-bottom: 0; }
.table-row .key { color: var(--muted); }
.help-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.help-item:last-child { border-bottom: 0; }
.help-item h3 { margin-bottom: 5px; }
.help-item p { color: var(--muted); font-size: .87rem; margin: 0; }
.account-group { overflow: hidden; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 21px; border-bottom: 1px solid var(--line); }
.account-row:last-child { border-bottom: 0; }
.account-row .key { min-width: 110px; color: var(--subtle); }
.account-row .value { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.qr-secret { padding: 22px; border-radius: 13px; border: 1px solid #deddd6; background: #fffbed; font-size: .94rem; overflow-wrap: anywhere; user-select: all; }
.admin-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.admin-stat { padding: 16px 19px; display: grid; gap: 7px; }
.admin-stat strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.admin-form { max-width: 610px; }
.token-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(17, 18, 35, .6); display: grid; place-items: center; padding: 20px; }
.token-dialog { width: min(100%, 540px); padding: 28px; }
.token-value { display: block; margin-top: 8px; padding: 18px; background: #f0efe9; border-radius: 10px; font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 26px; transform: translateX(-50%); max-width: min(90vw, 480px); background: #34352f; color: white; padding: 11px 18px; border-radius: 10px; box-shadow: 0 10px 35px rgba(0,0,0,.18); font-size: .88rem; text-align: center; }

@media (max-width: 1100px) {
  .content { padding: 27px 25px 60px; }
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .two-column { grid-template-columns: minmax(0, 1.5fr) minmax(245px, .9fr); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .mobile-header { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: var(--canvas); }
  .mobile-header .brand { font-size: 1.1rem; }
  .mobile-header .brand-mark { width: 36px; height: 36px; }
  .mobile-header .icon-button { width: 35px; height: 35px; border: 0; background: transparent; color: var(--ink); }
  .mobile-tabbar { position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 4px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; }
  .mobile-tabbar a { display: grid; justify-items: center; gap: 2px; color: var(--subtle); font-size: .68rem; font-weight: 700; padding: 3px 0; }
  .mobile-tabbar a.active { color: var(--purple); }
  .mobile-tabbar a svg { width: 23px; height: 23px; }
  .content { padding: 15px 18px 42px; }
  .topline { display: none; }
  .page-heading { align-items: start; margin-bottom: 20px; }
  .page-heading .button { white-space: nowrap; }
  h1 { font-size: 1.7rem; }
  .page-lead { font-size: .9rem; }
  .card-grid, .two-column, .inbox-layout { display: grid; grid-template-columns: 1fr; gap: 15px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-pad { padding: 20px; }
  .number-card { padding: 18px; gap: 17px; }
  .number-card .actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .number-card .actions .button.primary { width: 100%; }
  .explain-steps { grid-template-columns: 1fr; padding: 20px; gap: 12px; }
  .explain-steps p { margin-top: 2px; padding-left: 36px; }
  .profile-header { flex-wrap: wrap; margin-bottom: 16px; }
  .profile-header .settings-link { width: 100%; margin-left: 0; }
  .stage-card { padding: 18px; min-height: 400px; }
  .stage-steps { gap: 2px; margin-bottom: 42px; }
  .stage-step { flex-direction: column; gap: 4px; font-size: .62rem; text-align: center; white-space: normal; min-width: 48px; }
  .stage-step .step-ball { width: 24px; height: 24px; }
  .stage-line { align-self: flex-start; margin-top: 11px; min-width: 2px; }
  .stage-main h2 { font-size: 1.25rem; }
  .stage-metric { font-size: 3.6rem; }
  .stage-footnote { margin-top: 28px; }
  .message-detail { position: static; min-height: auto; }
  .search-input { width: 100%; }
  .auth-layout { display: block; }
  .auth-hero { display: none; }
  .auth-panel { min-height: 100vh; align-items: flex-start; padding: 50px 24px 35px; }
  .auth-box { margin: 0 auto; }
  .auth-mobile-brand { display: flex !important; margin-bottom: 52px; }
  .auth-box h1 { font-size: 1.75rem; }
}

@media (max-width: 440px) {
  .page-heading { display: block; }
  .page-heading > .button { margin-top: 15px; }
  .button-row .button { flex: 1; }
  .stage-step { min-width: 43px; }
  .account-row { align-items: flex-start; flex-wrap: wrap; }
  .account-row .value { flex-basis: 60%; }
}
.usage-note{white-space:pre-wrap;overflow-wrap:anywhere}

/* Dense lists keep the primary information visible; detail stays in a dialog. */
.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; }
.list-content { padding: 24px 36px 24px; }
.list-content .topline { margin-bottom: 16px; }
.list-content .page-heading { margin-bottom: 18px; }
.list-content h1 { font-size: 1.8rem; }
.list-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.scope-tabs { display: flex; gap: 6px; flex: none; }
.scope-tabs .filter-tab { padding: 8px 16px; }
.data-panel { overflow: hidden; border-radius: 14px; }
.data-scroll { overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.number-scroll { max-height: max(220px, calc(100dvh - 280px)); }
.message-scroll { max-height: max(220px, calc(100dvh - 320px)); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .86rem; }
.data-table th { color: var(--muted); font-size: .77rem; background: #f7f6f3; font-weight: 650; position: sticky; top: 0; z-index: 1; padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 15px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fdfcf8; }
.data-table td > strong { display: block; font-size: .86rem; }
.data-table td > .small { display: block; margin-top: 4px; }
.number-identity { display: flex; gap: 11px; align-items: center; }
.number-identity .alias-avatar { width: 36px; height: 36px; font-size: .94rem; border-radius: 10px; }
.number-identity strong { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.number-identity .small { display: block; margin-top: 4px; }
.table-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.table-actions .button, .data-table .button { min-height: 32px; padding: 7px 10px; font-size: .79rem; }
.list-footer { border-top: 1px solid var(--line); background: white; padding: 12px 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; color: var(--subtle); font-size: .76rem; }
.list-note { color: var(--subtle); font-size: .77rem; margin: 12px 0 0; }
.inbox-toolbar .search-input { flex: 1; min-width: 220px; max-width: 360px; min-height: 38px; font-size: .82rem; }
.inbox-number-tabs { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 0 0 18px; min-width: 0; }
.inbox-number-tab { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 3px; align-items: center; flex: 0 1 auto; max-width: min(260px, 100%); min-width: 0; min-height: 48px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; line-height: 1.35; }
.inbox-number-tab:hover { border-color: #d9d7cc; background: var(--sidebar); }
.inbox-number-tab.active { border-color: #e8d781; background: var(--active); }
.inbox-number-label { grid-column: 1; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 550; font-variant-numeric: tabular-nums; }
.inbox-number-tab.active .inbox-number-label { font-weight: 650; }
.inbox-number-alias { grid-column: 1; grid-row: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .7rem; }
.inbox-number-count { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; min-width: 25px; padding: 3px 6px; border-radius: 999px; color: var(--muted); background: var(--soft); font-size: .7rem; font-variant-numeric: tabular-nums; }
.inbox-number-tab.active .inbox-number-count { color: var(--ink); background: rgba(255, 255, 255, .65); }
.message-table { table-layout: fixed; }
.message-table th:nth-child(1) { width: 132px; }
.message-table th:nth-child(2) { width: 155px; }
.message-table th:nth-child(3) { width: 140px; }
.message-table th:last-child { width: 84px; }
.message-table td { padding-top: 12px; padding-bottom: 12px; }
.message-table td:last-child .button { white-space: nowrap; }
.message-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.message-time small { display: block; margin-top: 5px; color: var(--subtle); font-size: .69rem; }
.message-table td > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-number-status, .mobile-message-sender { display: none; }
.message-table .badge { margin-top: 5px; font-size: .66rem; }
.message-summary { display: block; width: 100%; text-align: left; padding: 8px 0; background: transparent; border: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .86rem; }
.message-summary:hover { color: var(--purple); }
.receive-banner { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 14px 18px; margin-bottom: 16px; border-color: #e9db9e; }
.receive-banner > div:first-child > span { display: block; margin-top: 3px; }
.window-countdown { color: var(--purple); font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.receive-banner ~ .data-panel .message-scroll { max-height: max(200px, calc(100dvh - 410px)); }
.customer-dialog { width: min(640px, calc(100vw - 40px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: white; box-shadow: 0 24px 80px rgba(52,53,47,.18); overflow: auto; }
.customer-dialog::backdrop { background: rgba(52,53,47,.32); backdrop-filter: blur(3px); }
.customer-dialog.wide-dialog { width: min(960px, calc(100vw - 40px)); }
.dialog-heading { display: flex; gap: 15px; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: white; z-index: 2; }
.dialog-heading h2 { margin: 0; font-size: 1.08rem; }
.dialog-close { width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: #f0efe9; color: var(--muted); font-size: 1.5rem; line-height: 1; }
.dialog-content { padding: 24px; }
.dialog-content > .card { border: 0; box-shadow: none; padding: 0; }
.dialog-content .card-pad { padding: 20px; }
.dialog-content > .card.card-pad { padding: 0; }
.customer-dialog .page-heading { display: none; }
.customer-dialog .two-column { grid-template-columns: minmax(0, 1.7fr) minmax(230px, 1fr); gap: 18px; }
.customer-dialog .message-detail { position: static; min-height: 0; padding: 0; }
.message-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.message-meta strong, .message-meta span { display: block; margin-bottom: 5px; overflow-wrap: anywhere; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.8; padding: 20px; margin: 18px 0; background: #f7f6f3; border-radius: 12px; }
.message-detail .button-row { margin-top: 20px; }

@media (max-width: 1100px) {
  .list-content { padding: 24px 22px; }
  .number-table th:nth-child(3), .number-table td:nth-child(3) { display: none; }
  .message-table th:nth-child(2) { width: 130px; }
  .message-table th:nth-child(3) { width: 120px; }
}
@media (max-width: 760px) {
  .list-content { padding: 14px 16px 20px; }
  .list-content h1 { font-size: 1.55rem; }
  .list-content .page-heading { gap: 10px; }
  .list-content .page-lead { font-size: .81rem; }
  .list-content .page-heading .button { min-height: 35px; padding: 9px 11px; font-size: .8rem; }
  .list-toolbar { gap: 10px; margin-bottom: 12px; }
  .list-toolbar > .small { font-size: .75rem; }
  .scope-tabs .filter-tab { padding: 7px 13px; font-size: .76rem; }
  .number-scroll { max-height: max(220px, calc(100dvh - 330px)); }
  .data-table th { padding: 11px 12px; }
  .data-table td { padding: 12px; }
  .number-table th:nth-child(2), .number-table td:nth-child(2) { display: none; }
  .mobile-number-status { display: block; margin-top: 7px; }
  .mobile-number-status .badge { font-size: .67rem; padding: 4px 7px; }
  .number-identity { gap: 7px; min-width: 126px; }
  .number-identity .alias-avatar { display: none; }
  .table-actions { flex-wrap: wrap; white-space: normal; width: 136px; }
  .table-actions .button { padding: 7px; }
  .number-table th:last-child { width: 160px; }
  .inbox-toolbar .search-input { width: 100%; max-width: none; flex-basis: 100%; min-width: 0; }
  .inbox-number-tabs { gap: 7px; margin-bottom: 14px; }
  .inbox-number-tab { column-gap: 8px; min-height: 44px; padding: 8px 10px; }
  .inbox-number-label { font-size: .78rem; }
  .inbox-number-alias, .inbox-number-count { font-size: .67rem; }
  .message-table th:nth-child(1) { width: 80px; }
  .message-table th:nth-child(2) { width: 112px; }
  .message-table th:nth-child(3), .message-table td:nth-child(3), .message-table th:last-child, .message-table td:last-child { display: none; }
  .message-time { white-space: normal; font-size: .72rem; }
  .message-time small { display: none; }
  .message-table td > strong { font-size: .75rem; }
  .message-table td > .small { font-size: .65rem; }
  .mobile-message-sender { display: block; margin-top: 5px; color: var(--muted); font-size: .67rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .message-summary { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.5; max-height: 3em; font-size: .79rem; padding: 0; }
  .message-scroll { max-height: max(200px, calc(100dvh - 370px)); }
  .receive-banner { align-items: flex-start; padding: 12px; flex-wrap: wrap; gap: 8px; }
  .receive-banner .row { width: 100%; justify-content: space-between; }
  .receive-banner ~ .data-panel .message-scroll { max-height: max(160px, calc(100dvh - 490px)); }
  .customer-dialog, .customer-dialog.wide-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 32px); border-radius: 14px; }
  .dialog-heading { padding: 16px 18px; }
  .dialog-heading h2 { font-size: .95rem; }
  .dialog-content { padding: 18px; }
  .customer-dialog .two-column { grid-template-columns: 1fr; }
  .customer-dialog .two-column > aside { display: none; }
  .customer-dialog .detail-list div { flex-wrap: wrap; gap: 7px; }
  .customer-dialog .detail-list dd { font-size: .8rem; }
}

/* Shared workspace style: white header, warm sidebar and quiet yellow selection. */
:root { --sidebar: #f7f6f3; --accent: #f5ce4f; --active: #fff4c2; --header-height: 72px; --sidebar-width: 224px; }
.app-shell { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.app-header { position: fixed; inset: 0 0 auto; height: var(--header-height); z-index: 40; display: flex; align-items: center; gap: 22px; padding: 0 26px; border-bottom: 1px solid var(--line); background: #fff; }
.app-header .brand { min-width: 172px; font-size: 1.2rem; }
.app-header .brand-mark { width: 42px; height: 42px; }
.header-product { font-size: .8rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 22px; white-space: nowrap; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.header-actions .service-health { margin-right: 16px; font-size: .75rem; }
.header-utility { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 8px 10px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: .8rem; }
.header-utility:hover { background: var(--sidebar); color: var(--ink); text-decoration: none; }
.header-account { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 8px 12px; border-radius: 999px; color: var(--ink); font-size: .78rem; max-width: 230px; }
.header-account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-account svg { flex: none; }
.header-account:hover { background: var(--sidebar); text-decoration: none; }
.header-logout { display: none; }
.sidebar { position: fixed; top: var(--header-height); bottom: 0; left: 0; width: var(--sidebar-width); height: auto; padding: 26px 14px 18px; background: var(--sidebar); border-right: 1px solid var(--line); }
.nav-caption { padding: 0 15px; color: var(--subtle); font-size: .69rem; letter-spacing: .04em; }
.nav-list { margin-top: 15px; gap: 6px; }
.nav-link { min-height: 43px; gap: 13px; border-radius: 9px; padding: 10px 14px; color: #67695f; font-weight: 500; font-size: .86rem; }
.nav-link.active { color: var(--ink); background: var(--active); font-weight: 650; }
.sidebar-user { background: transparent; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 8px 0; gap: 5px; }
.sidebar-account span { font-size: .78rem; font-weight: 500; }
.sidebar-account small { font-size: .68rem; }
.main { grid-column: 2; padding-top: var(--header-height); background: #fff; }
.content, .list-content { max-width: 1420px; padding: 25px 36px 32px; }
.topline, .list-content .topline { margin-bottom: 18px; min-height: 18px; }
.topline .crumb { font-size: .75rem; }
.page-heading, .list-content .page-heading { margin-bottom: 20px; align-items: center; }
h1, .list-content h1 { font-size: 1.7rem; letter-spacing: -.02em; margin-bottom: 7px; font-weight: 650; }
h2 { font-size: 1.06rem; font-weight: 650; }
.page-lead { font-size: .84rem; line-height: 1.65; }
.card { border-radius: 12px; box-shadow: 0 3px 14px rgba(52,53,47,.025); }
.card-pad { padding: 22px; }
.button { border-radius: 999px; min-height: 39px; padding: 10px 18px; font-weight: 550; font-size: .84rem; }
.button.primary { background: var(--ink); color: white; }
.button.secondary { border-color: var(--line); }
.button.ghost { color: #626459; }
.button.danger { border-color: #e9c6c3; }
.notice { background: var(--sidebar); border: 1px solid var(--line); padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; }
.notice strong { font-size: .83rem; font-weight: 650; }
.notice p { font-size: .79rem; line-height: 1.65; }
.notice.warn { border-color: #f0dfbd; background: #fffaef; }
.notice.error { border-color: #f2d3d0; }
.notice.success { border-color: #cfe4d5; }
.list-toolbar { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; }
.scope-tabs { align-self: stretch; gap: 21px; }
.scope-tabs .filter-tab { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 9px 0; background: transparent; color: var(--muted); font-size: .81rem; font-weight: 500; }
.scope-tabs .filter-tab.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 650; }
.data-panel { border-radius: 10px; }
.data-table th { font-weight: 500; color: var(--muted); font-size: .75rem; padding-top: 12px; padding-bottom: 12px; }
.data-table td { padding-top: 14px; padding-bottom: 14px; }
.data-table td > strong, .number-identity strong { font-weight: 550; }
.number-identity .alias-avatar { background: var(--sidebar); border: 1px solid var(--line); font-weight: 550; border-radius: 9px; }
.list-footer { font-size: .73rem; background: #fdfcf9; }
.number-scroll { max-height: max(220px, calc(100dvh - 350px)); }
.message-scroll { max-height: max(220px, calc(100dvh - 390px)); }
.receive-banner ~ .data-panel .message-scroll { max-height: max(180px, calc(100dvh - 480px)); }
.search-input { border-radius: 8px; background: #fff; }
.empty-state { padding: 42px 24px; }
.empty-state p { font-size: .85rem; }
.empty-icon { border-radius: 18px; background: var(--sidebar); }
.explain-steps { background: var(--sidebar); border: 1px solid var(--line); padding: 18px; gap: 14px; border-radius: 10px; margin-top: 20px; }
.explain-steps strong { font-weight: 550; font-size: .8rem; }
.explain-steps p { font-size: .73rem; }
.step-number { width: 25px; height: 25px; font-weight: 550; }
.stage-card { min-height: 390px; padding: 23px; }
.stage-steps { margin-bottom: 32px; }
.stage-footnote { margin-top: 25px; }
.stage-illustration { width: 68px; height: 68px; margin-bottom: 16px; }
.stage-main h2 { font-size: 1.28rem; }
.stage-main p { font-size: .85rem; }
.stage-metric { font-size: clamp(2.7rem, 4vw, 3.7rem); }
.customer-dialog { border-radius: 14px; }
.customer-dialog::backdrop { backdrop-filter: blur(2px); }
.dialog-heading { padding: 18px 22px; }
.dialog-content { padding: 22px; }
.auth-hero { background: #f7f6f3; border-right: 1px solid var(--line); }
.auth-hero h1 { font-weight: 650; font-size: clamp(2rem, 3.1vw, 2.9rem); }
.auth-point .icon { background: var(--active); }
.auth-hero .brand-mark { width: 48px; height: 48px; }
.auth-box .button.full { min-height: 44px; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 204px; }
  .app-header { padding: 0 20px; gap: 16px; }
  .app-header .brand { min-width: 156px; }
  .header-product { display: none; }
  .header-actions .service-health { margin-right: 7px; }
  .content, .list-content { padding: 24px; }
}
@media (max-width: 760px) {
  :root { --header-height: 62px; }
  .app-shell { display: block; }
  .app-header { padding: 0 16px; gap: 10px; }
  .app-header .brand { min-width: 0; gap: 8px; font-size: 1.05rem; }
  .app-header .brand-mark { width: 34px; height: 34px; }
  .header-actions { gap: 1px; }
  .header-actions .service-health, .header-utility[href], .header-account { display: none; }
  .header-utility { width: 34px; height: 34px; padding: 8px; }
  .header-logout { display: inline-flex; }
  .main { padding-top: var(--header-height); padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .content, .list-content { padding: 20px 16px 26px; }
  .page-heading, .list-content .page-heading { margin-bottom: 17px; align-items: flex-start; }
  h1, .list-content h1 { font-size: 1.5rem; }
  .page-lead, .list-content .page-lead { font-size: .78rem; }
  .page-heading .button { min-height: 35px; padding: 8px 12px; font-size: .77rem; }
  .page-heading > .button-row { flex: none; gap: 7px; }
  .mobile-tabbar a.active { color: var(--ink); }
  .mobile-tabbar a.active::before { content: ""; position: absolute; width: 46px; height: 37px; z-index: -1; top: 5px; border-radius: 10px; background: var(--active); }
  .mobile-tabbar a { position: relative; isolation: isolate; }
  .list-toolbar { gap: 10px; padding-bottom: 11px; }
  .scope-tabs { gap: 20px; }
  .scope-tabs .filter-tab { padding: 8px 0; font-size: .75rem; }
  .number-scroll { max-height: max(220px, calc(100dvh - 345px)); }
  .message-scroll { max-height: max(200px, calc(100dvh - 385px)); }
  .receive-banner ~ .data-panel .message-scroll { max-height: max(160px, calc(100dvh - 485px)); }
  .explain-steps { padding: 16px; gap: 10px; }
  .stage-card { min-height: 340px; padding: 18px; }
  .stage-steps { margin-bottom: 29px; }
  .card-pad { padding: 18px; }
}
@media (max-width: 440px) {
  .page-heading { display: block; }
  .page-heading > .button-row { margin-top: 13px; }
  .header-utility { width: 32px; }
}

/* Compact customer add-number form; native image picking remains keyboard accessible. */
.customer-dialog.add-number-dialog { width: min(900px, calc(100vw - 40px)); scroll-padding-bottom: 88px; }
.add-number-card { min-width: 0; }
.add-number-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 18px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.add-number-intro p { margin: 0; }
.add-number-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 26px; }
.add-number-grid > section { min-width: 0; }
.add-number-grid h3 { margin: 0 0 12px; font-size: .88rem; font-weight: 650; }
.add-number-details { border-left: 1px solid var(--line); padding-left: 26px; }
.add-number-card .field { gap: 6px; margin-bottom: 13px; }
.add-number-card .field input, .add-number-card .field textarea { min-height: 42px; padding: 10px 12px; font-size: .84rem; border-radius: 8px; }
.add-number-card .field label { font-size: .81rem; font-weight: 550; }
.add-number-card .field .hint { font-size: .72rem; line-height: 1.5; }
.add-input-modes { margin-bottom: 12px; padding: 4px; border-radius: 9px; }
.add-input-modes button { min-width: 0; padding: 8px 10px; font-size: .78rem; font-weight: 550; border-radius: 6px; }
.add-number-card .qr-upload { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-content: center; gap: 5px 12px; min-height: 132px; padding: 16px; border: 1px dashed #cfcec3; border-radius: 10px; background: #fcfbf7; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.add-number-card .qr-upload:hover { border-color: #b6a568; background: #fff9e3; }
.add-number-card .qr-upload.selected { border-style: solid; border-color: #e2cf86; background: #fff9e3; }
.add-number-card .qr-upload.is-busy { cursor: progress; background: #f4f3ef; }
.add-number-card .qr-upload:focus-within { outline: 2px solid #c6a132; outline-offset: 2px; border-color: #c6a132; box-shadow: 0 0 0 3px #f5ce4f30; }
.add-number-card .qr-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
.qr-upload-icon { grid-column: 1; grid-row: 1 / span 3; align-self: center; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: #716333; background: var(--active); border-radius: 10px; }
.qr-upload-icon svg { width: 22px; height: 22px; }
.add-number-card .qr-upload > strong { grid-column: 2; color: var(--ink); font-size: .85rem; font-weight: 550; overflow-wrap: anywhere; }
.add-number-card .qr-upload > small, .add-number-card .qr-upload > p { grid-column: 2; margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.45; overflow-wrap: anywhere; }
.add-number-card .qr-upload > .qr-file-name { grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .72rem; }
.add-number-card .qr-upload > .button { grid-column: 2; justify-self: start; min-height: 32px; max-width: 100%; padding: 7px 13px; font-size: .75rem; pointer-events: none; }
.qr-read-status { margin: 10px 0; color: var(--muted); font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.qr-read-status.error { color: var(--red); }
.qr-read-status.success { color: var(--green); }
.add-number-card .decoded-field { margin-top: 12px; margin-bottom: 0; }
.add-number-card .decoded-field textarea { min-height: 68px; max-height: 140px; line-height: 1.5; }
.add-number-confirm { margin-top: 17px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fcfbf7; }
.add-number-confirm .check-label { gap: 8px; font-size: .76rem; line-height: 1.55; }
.add-number-confirm .check-label input { flex: none; }
.add-number-reuse { margin-top: 12px; color: var(--muted); font-size: .74rem; line-height: 1.55; }
.add-number-reuse summary { width: fit-content; max-width: 100%; cursor: pointer; color: var(--ink); }
.add-number-reuse .check-label { margin-top: 8px; font-size: .74rem; }
.add-number-reuse p { margin: 7px 0 0; }
.add-number-note { margin: 17px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.55; }
.add-number-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); background: white; }
.add-number-actions .button { min-width: 104px; }
@media (max-width: 760px) {
  .customer-dialog.add-number-dialog { width: calc(100vw - 24px); scroll-padding-top: 60px; scroll-padding-bottom: 84px; }
  .add-number-dialog .dialog-content { padding: 16px; }
  .add-number-intro { gap: 5px 8px; margin-bottom: 13px; font-size: .74rem; }
  .add-number-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .add-number-grid h3 { margin-bottom: 10px; font-size: .83rem; }
  .add-number-details { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .add-number-card .qr-upload { min-height: 120px; padding: 13px; gap: 5px 10px; }
  .add-number-card .field { margin-bottom: 11px; }
  .add-number-card input, .add-number-card textarea, .add-number-card summary { scroll-margin-bottom: 88px; }
  .add-number-confirm { margin-top: 13px; padding: 10px; }
  .add-number-note { margin-top: 13px; font-size: .71rem; }
  .add-number-actions { position: sticky; bottom: 0; z-index: 3; margin: 16px -16px 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); box-shadow: 0 -5px 14px rgba(52, 53, 47, .035); }
  .add-number-actions .button { flex: 1; min-width: 0; }
}
@media (forced-colors: active) {
  .add-number-card .qr-upload { border-color: ButtonText; background: Canvas; }
  .add-number-card .qr-upload:focus-within { outline-color: Highlight; border-color: Highlight; box-shadow: none; }
  .qr-upload-icon { border: 1px solid ButtonText; color: ButtonText; background: Canvas; }
}

/* Shared single-value select style; retain native keyboard and touch pickers. */
:where(select:not([multiple]):not([size]), select[size="1"]:not([multiple])) { max-width:100%; }
:where(.field) select:not([multiple]):not([size]), :where(.field) select[size="1"]:not([multiple]) { width:100%; }
:root select:not([multiple]):not([size]), :root select[size="1"]:not([multiple]) {
  -webkit-appearance:none; appearance:none; color-scheme:light;
  min-width:0; min-height:42px;
  border:1px solid #deddd6; border-radius:8px;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%237a7b74' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
  padding:9px 40px 9px 12px;
  color:#34352f; font:400 14px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  text-overflow:ellipsis; cursor:pointer;
  transition:border-color .15s,box-shadow .15s,background-color .15s;
}
:root select:not([multiple]):not([size]):hover:not(:disabled), :root select[size="1"]:not([multiple]):hover:not(:disabled) {
  border-color:#bdbdb2; background-color:#fdfcf8;
}
:root select:not([multiple]):not([size]):focus, :root select[size="1"]:not([multiple]):focus {
  border-color:#c6a132; box-shadow:0 0 0 3px #f5ce4f30; outline:none;
}
:root select:not([multiple]):not([size]):focus-visible, :root select[size="1"]:not([multiple]):focus-visible {
  outline:2px solid #c6a132; outline-offset:2px;
}
:root select:not([multiple]):not([size]):disabled, :root select[size="1"]:not([multiple]):disabled {
  background-color:#f4f3ef; border-color:#e7e6e2; color:#8b8d82; cursor:not-allowed; opacity:1;
}
:root select option { background:#fff; color:#34352f; }
:root select option:disabled { color:#8b8d82; }
@media(forced-colors:active) {
  :root select:not([multiple]):not([size]), :root select[size="1"]:not([multiple]) {
    -webkit-appearance:auto; appearance:auto; background-image:none;
    color:CanvasText; background-color:Canvas; border-color:ButtonText; box-shadow:none;
  }
  :root select:not([multiple]):not([size]):hover:not(:disabled), :root select[size="1"]:not([multiple]):hover:not(:disabled) {
    background-color:Canvas; border-color:Highlight;
  }
  :root select:not([multiple]):not([size]):focus, :root select[size="1"]:not([multiple]):focus {
    border-color:Highlight; box-shadow:none;
  }
  :root select:not([multiple]):not([size]):focus-visible, :root select[size="1"]:not([multiple]):focus-visible { outline:2px solid Highlight; }
  :root select:not([multiple]):not([size]):disabled, :root select[size="1"]:not([multiple]):disabled {
    color:GrayText; background-color:Canvas; border-color:GrayText;
  }
  :root select option { color:CanvasText; background:Canvas; }
  :root select option:disabled { color:GrayText; }
}

/* Current-number inbox with explicit, locally refreshed pages. */
.inbox-page-footer { gap:12px; align-items:center; }
.inbox-pagination { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.inbox-page-label { min-width:64px; text-align:center; color:var(--muted); font-size:.86rem; white-space:nowrap; }
.inbox-pagination .button { min-height:36px; padding:7px 13px; }
@media (max-width:640px) {
  .inbox-page-footer { display:flex; flex-direction:column; align-items:stretch; }
  .inbox-pagination { justify-content:space-between; }
  .inbox-pagination .button { flex:1; }
}

/* Customer workspace: select a number and operate without leaving its list. */
.numbers-workspace { display:grid; grid-template-columns:260px minmax(0,1fr); gap:18px; align-items:start; }
.numbers-picker { overflow:hidden; position:sticky; top:20px; }
.numbers-picker-heading { display:flex; justify-content:space-between; align-items:center; padding:17px 16px; border-bottom:1px solid var(--line); font-size:.88rem; }
.numbers-choices { display:flex; flex-direction:column; padding:8px; max-height:calc(100dvh - 260px); overflow:auto; }
.number-choice { display:flex; gap:11px; align-items:center; width:100%; padding:13px 10px; border:1px solid transparent; border-radius:10px; text-align:left; background:white; color:var(--ink); }
.number-choice:hover { background:var(--soft); }
.number-choice.active { background:var(--active); border-color:#ebdfa6; }
.number-choice .alias-avatar { width:34px; height:34px; border-radius:9px; flex:none; }
.number-choice-identity { display:flex; flex:1; flex-direction:column; align-items:flex-start; gap:5px; min-width:0; }
.number-choice-identity strong { max-width:100%; overflow:hidden; text-overflow:ellipsis; font-size:.86rem; }
.number-choice-identity .badge { font-size:.67rem; }
.number-choice > svg { flex:none; color:var(--subtle); }
.numbers-scope-row { display:flex; align-items:center; gap:10px; margin:-4px 0 14px; flex-wrap:wrap; }
.numbers-scope-row .button { min-height:30px; padding:6px 10px; font-size:.75rem; }
.number-detail-panel { display:grid; gap:15px; min-width:0; }
.number-detail-heading { padding:21px 23px; }
.number-detail-heading .profile-header { margin:0 0 15px; gap:14px; }
.number-detail-heading .profile-header h1 { font-size:1.35rem; margin:0; }
.number-detail-heading .profile-header .phone { font-size:.9rem; }
.number-detail-heading .profile-header .alias-avatar { width:46px; height:46px; }
.number-management-actions { gap:8px; }
.number-management-actions .button { min-height:34px; font-size:.78rem; padding:8px 12px; }
.number-facts { display:flex; gap:22px; flex-wrap:wrap; padding-top:18px; margin-top:17px; border-top:1px solid var(--line); }
.number-facts > div { display:grid; gap:5px; font-size:.76rem; min-width:120px; }
.number-facts span,.number-facts small { color:var(--subtle); }
.number-facts strong { font-weight:550; max-width:320px; white-space:pre-wrap; overflow-wrap:anywhere; }
.number-receive-stage { padding:20px 23px; }
.number-receive-stage .stage-steps { margin-bottom:12px; }
.number-receive-stage .stage-main { min-height:0; padding:16px 10px 20px; }
.number-receive-stage .stage-illustration { width:48px; height:48px; margin-bottom:14px; }
.number-receive-stage .stage-illustration svg { width:26px; height:26px; }
.number-receive-stage h2 { font-size:1.14rem; margin:0 0 10px; }
.number-receive-stage .stage-main p { max-width:560px; font-size:.84rem; margin:8px auto 16px; }
.number-receive-stage .stage-metric { font-size:2.4rem; margin:12px 0; }
.number-ready-note { border-top:1px solid var(--line); padding:14px 0 0; line-height:1.6; }
.number-archived { padding:20px; border:1px solid var(--line); border-radius:12px; }
.home-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.home-summary > div { display:flex; align-items:center; justify-content:space-between; border:1px solid var(--line); border-radius:12px; padding:18px 20px; background:white; }
.home-summary span { color:var(--muted); font-size:.83rem; }
.home-summary strong { font-size:1.5rem; font-weight:600; }
.home-workspace { display:grid; grid-template-columns:minmax(0,1fr) 260px; align-items:start; gap:20px; }
.home-section-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:18px 20px; border-bottom:1px solid var(--line); }
.home-section-heading h2,.home-shortcuts h2 { font-size:.95rem; margin:0; }
.home-section-heading .text-link { font-size:.77rem; }
.home-idle { padding:28px 22px; display:flex; align-items:center; flex-wrap:wrap; gap:15px; }
.home-idle > div { flex:1; min-width:200px; }
.home-idle h3 { font-size:.95rem; margin:0 0 8px; }
.home-idle p { line-height:1.7; margin:0; }
.home-idle > .button { margin-left:43px; }
.home-receive-row { display:flex; align-items:center; flex-wrap:wrap; gap:14px; padding:18px 20px; border-bottom:1px solid var(--line); }
.home-receive-row:last-child { border:0; }
.home-receive-row > div:first-child { flex:1; min-width:150px; display:grid; gap:6px; }
.home-countdown { display:block; text-align:center; margin-top:6px; font-size:.86rem; font-variant-numeric:tabular-nums; }
.home-message-row { display:block; width:100%; text-align:left; border:0; border-bottom:1px solid var(--line); padding:15px 20px; background:white; color:var(--ink); }
.home-message-row:hover { background:var(--sidebar); }
.home-message-row:last-child { border:0; border-radius:0 0 12px 12px; }
.home-message-row strong { font-size:.82rem; }
.home-message-row p { margin:8px 0; color:var(--muted); font-size:.82rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-no-messages { padding:20px; }
.home-shortcuts { padding:20px; }
.home-shortcut { display:flex; align-items:center; gap:12px; padding:17px 0; border-bottom:1px solid var(--line); color:var(--ink); font-size:.84rem; }
.home-shortcut small { display:block; margin-top:6px; color:var(--subtle); font-size:.72rem; line-height:1.5; }
.home-shortcuts > p { line-height:1.7; margin-top:17px; }
@media(max-width:1100px) {
 .numbers-workspace { grid-template-columns:220px minmax(0,1fr); gap:14px; }
 .home-workspace { grid-template-columns:minmax(0,1fr) 230px; gap:15px; }
}
@media(max-width:900px) {
 .numbers-workspace,.home-workspace { grid-template-columns:1fr; }
 .numbers-picker { position:static; }
 .numbers-picker-heading { padding:12px 14px; }
 .numbers-choices { flex-direction:row; max-height:none; overflow-x:auto; }
 .number-choice { width:220px; flex:none; }
 .home-shortcuts { display:none; }
}
@media(max-width:640px) {
 .number-detail-heading,.number-receive-stage { padding:17px 15px; }
 .number-detail-heading .profile-header h1 { font-size:1.14rem; }
 .number-management-actions { gap:6px; }
 .number-management-actions .button { font-size:.74rem; padding:7px 9px; }
 .number-facts { gap:15px; }
 .number-facts > div { min-width:105px; }
 .number-receive-stage .stage-main { padding:15px 0; }
 .number-receive-stage h2 { font-size:1.04rem; }
 .number-receive-stage .stage-steps { gap:5px; }
 .number-receive-stage .stage-step { font-size:.63rem; }
 .home-summary { gap:7px; }
 .home-summary > div { padding:13px 10px; display:grid; gap:8px; }
 .home-summary span { font-size:.69rem; }
 .home-summary strong { font-size:1.25rem; }
 .home-section-heading,.home-message-row,.home-receive-row { padding:15px; }
 .home-idle { padding:22px 15px; }
}

.number-detail-heading .profile-header h2 { font-size:1.35rem; margin:0; }
.number-more-actions { position:relative; }
.number-more-actions > summary { cursor:pointer; color:var(--muted); font-size:.78rem; list-style:none; padding:9px 10px; border-radius:8px; }
.number-more-actions > summary:hover { background:var(--soft); }
.number-more-actions > summary::after { content:"⌄"; margin-left:7px; }
.number-more-actions > div { position:absolute; right:0; top:100%; z-index:3; display:grid; min-width:190px; padding:7px; border:1px solid var(--line); border-radius:10px; background:white; box-shadow:0 8px 24px rgba(30,30,20,.08); }
.number-more-actions .button { justify-content:flex-start; white-space:nowrap; }
@media(max-width:640px) { .number-detail-heading .profile-header h2 { font-size:1.14rem; } }

/* Keep the primary controls visible on shorter laptop screens. */
.numbers-picker .numbers-scope-row { margin:0; padding:9px; border-top:1px solid var(--line); }
.number-detail-heading { padding:15px 20px; }
.number-detail-heading .profile-header { margin-bottom:10px; }
.number-facts { padding-top:11px; margin-top:11px; gap:18px; }
.number-facts > div { gap:4px; }
.number-receive-stage { min-height:0; padding:18px 20px; }
.number-receive-stage .stage-main { padding:13px 8px 12px; }
.number-receive-stage .stage-illustration { display:none; }
.number-receive-stage .stage-main p { margin:6px auto 10px; line-height:1.6; }
.number-receive-stage .stage-metric { font-size:2.1rem; margin:8px 0; }
#inbox-message-panel .message-scroll { max-height:max(170px,calc(100dvh - 550px)); }
@media(max-width:640px) {
 .number-detail-heading,.number-receive-stage { padding:12px 15px; }
 .numbers-picker .numbers-scope-row { padding:5px 8px; }
 .numbers-picker .numbers-scope-row .button { min-height:26px; padding:4px 8px; }
 .numbers-page-heading .page-heading { display:flex; align-items:center; gap:10px; }
 .numbers-page-heading .page-lead { display:none; }
 .numbers-page-heading .page-heading > .button { margin-top:0; }
 .numbers-picker-heading { padding:8px 12px; font-size:.78rem; }
 .numbers-choices { padding:6px; }
 .number-choice { padding:6px 8px; width:200px; }
 .number-choice > svg { display:none; }
 .number-choice .alias-avatar { width:28px; height:28px; }
 .number-choice-identity { gap:4px; }
 .number-management-actions .button { flex:none; white-space:nowrap; }
 .number-facts { padding-top:8px; margin-top:8px; }
 .number-receive-stage { padding:12px 15px; }
 .number-receive-stage .stage-main { padding:4px 0; }
 .number-receive-stage .stage-steps { margin-bottom:8px; }
 .number-receive-stage h2 { margin-bottom:6px; }
 .number-receive-stage .stage-main p { margin:4px auto 6px; }
 .number-receive-stage .stage-metric { font-size:1.8rem; }
 .inbox-number-tabs { flex-wrap:nowrap; overflow-x:auto; }
 .inbox-number-tabs .inbox-number-tab { flex:none; }
 #inbox-message-panel .message-scroll { max-height:max(160px,calc(100dvh - 670px)); }
}
/* Account-wide credits purchased on Xianyu and redeemed by the customer. */
.usage-wallet {display:flex;align-items:center;gap:28px;flex-wrap:wrap;margin:20px 0;}
.usage-wallet>div {display:grid;gap:5px;}
.usage-wallet>div:first-child {margin-right:auto;}
.usage-wallet>div:first-child strong {font-size:32px;}
.usage-wallet small {font-size:14px;font-weight:400;}
.usage-packages {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:20px 0;}
.usage-price {font-size:32px;font-weight:700;margin:16px 0;}
.usage-price span {font-size:16px;font-weight:400;color:var(--muted);}
.usage-package>.button {width:100%;}
.usage-redeem {margin:20px 0;}
.usage-redeem form {display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;}
.usage-redeem .field {flex:1;min-width:220px;margin-bottom:0;}
.usage-redeem input {font-family:var(--font-mono,monospace);}
.usage-redeem .usage-order-retry {margin-top:18px;padding-top:16px;border-top:1px solid var(--line);}
.usage-rules,.usage-order-retry {margin-bottom:20px;}
.usage-rules p {line-height:1.8;}
.usage-order-retry {border-color:var(--orange);}
@media(max-width:680px) {.usage-packages {grid-template-columns:1fr;}.usage-wallet {gap:18px;}.usage-wallet>.button {width:100%;}.usage-redeem form>.button {width:100%;}.usage-redeem .field {min-width:0;flex-basis:100%;}}

/* Device progress belongs beside the account, leaving the number layout stable. */
.header-actions .service-health { min-width:0; max-width:330px; line-height:1.4; }
.service-health .dot { flex:none; }
.service-health.is-preparing, .service-health.is-offline { padding:7px 10px; border-radius:10px; }
.service-health.is-preparing { color:#7d5c18; background:#fff7dd; }
.service-health.is-preparing .dot { background:#c79828; }
.service-health.is-offline { color:#985538; background:#fff3eb; }
.service-health.is-offline .dot { background:#cb7850; }
.header-preparation-time { white-space:nowrap; font-variant-numeric:tabular-nums; font-weight:600; }
.preparation-estimate { display:flex; align-items:center; justify-content:center; gap:14px; margin:22px 0; color:var(--muted); font-size:.86rem; }
.preparation-time { color:var(--ink); font-size:1.7rem; font-weight:650; font-variant-numeric:tabular-nums; }
@media(max-width:640px) {
  .app-header .header-actions .service-health { display:flex; max-width:190px; margin-right:4px; font-size:.68rem; gap:6px; }
  .service-health.is-preparing, .service-health.is-offline { padding:6px 8px; border-radius:8px; }
  .preparation-estimate { margin:18px 0; }
}
@media(max-width:380px) {
  .app-header .header-actions .service-health { max-width:155px; font-size:.65rem; }
}
