/* Mobile workspace — ink, mineral white, signal teal. Scoped to verified page structures. */
#boyin-mobile-nav, .bi-overview, .bi-wallet-summary > .bi-circuit { display: none; }
@media (max-width: 767px) {
  body.bi-mobile {
    --background: #f3f6f6; --foreground: #172c31; --card: #fff; --card-foreground: #172c31;
    --muted: #e9efef; --muted-foreground: #62767a; --border: #dce6e5; --input: #d6e1e0;
    --primary: #087f73; --primary-foreground: #fff; --ring: #159a8c; --accent: #e7f3ef; --accent-foreground: #096c63;
    --sidebar: #f8fbfa; --sidebar-foreground: #172c31; --sidebar-primary: #087f73;
    --popover: #fff; --popover-foreground: #172c31; --sidebar-accent: #e7f3ef; --sidebar-accent-foreground: #096c63;
    --app-header-height: 60px;
    background: #f3f6f6 !important; color: #172c31; color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  .bi-mobile #root { width: 100%; }
  .bi-mobile #root [data-slot="sidebar-inset"] { background: #f3f6f6; height: calc(100svh - 60px); }
  .bi-mobile #root [data-slot="sidebar-inset"] > div { transform: none !important; filter: none !important; }
  .bi-mobile #root [data-slot="sidebar-inset"] main > [class~="overflow-auto"] { padding: 0 18px calc(94px + env(safe-area-inset-bottom)); overscroll-behavior-y: contain; }
  .bi-mobile #root [data-slot="sidebar-inset"] main > div:first-child { padding: 15px 20px 17px; }
  .bi-mobile #root [data-slot="sidebar-inset"] main > div:first-child h2 { font-size: 17px; font-weight: 650; letter-spacing: .02em; }
  .bi-mobile #root [data-slot="sidebar-inset"] main > div:first-child h2::after { content: ' / WORKSPACE'; font: 9px/1.2 ui-monospace, monospace; letter-spacing: .1em; margin-left: 10px; color: #74888a; }
  .bi-mobile-wallet #root [data-slot="sidebar-inset"] main > div:first-child h2::after { content: ' / BILLING'; }
  .bi-mobile #root .bi-app-header { height: 60px; background: #f3f6f6; border-bottom: 1px solid #e0e8e7; }
  .bi-mobile .bi-app-header > div { padding: 0 18px; gap: 8px; }
  .bi-mobile .bi-app-header [data-slot="sidebar-trigger"] { display: none; }
  .bi-mobile .bi-app-header button[aria-label="搜索"], .bi-mobile .bi-app-header button[aria-label="Search"] { display: inline-flex; flex: none; width: 30px; min-width: 30px; height: 36px; min-height: 36px; padding: 6px; justify-content: center; background: transparent; border: 0; }
  .bi-mobile .bi-app-header button[aria-label="搜索"] > span, .bi-mobile .bi-app-header button[aria-label="搜索"] > kbd, .bi-mobile .bi-app-header button[aria-label="Search"] > span, .bi-mobile .bi-app-header button[aria-label="Search"] > kbd { display: none; }
  .bi-mobile .bi-app-brand { padding: 0; height: 36px; gap: 9px; font-size: 13px; font-weight: 650; }
  .bi-mobile .bi-app-brand > div { display: none; }
  .bi-mobile .bi-app-brand::before { content: ''; width: 29px; height: 32px; border-radius: 8px; background: #14383b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%2394e0c9' stroke-width='1.5'%3E%3Cpath d='M9 8h8l6 8-6 8H9zm0 8h14M16 8v16'/%3E%3C/svg%3E") center/28px no-repeat; }
  .bi-mobile .bi-app-header [data-slot="avatar"] { width: 30px; height: 30px; }
  .bi-mobile .bi-app-header button:has([data-slot="avatar"]) { width: 38px; height: 38px; }
  .bi-mobile .bi-app-header [data-slot="avatar-fallback"] { background: #dcebe6 !important; color: #245c54 !important; font-size: 12px; border: 1px solid #c5dad2; }
  .bi-mobile #boyin-mobile-nav { position: fixed; z-index: 45; bottom: 0; inset-inline: 0; display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #d9e4e2; background: #fbfdfc; box-shadow: 0 -5px 20px #183f3a05; }
  #boyin-mobile-nav a, #boyin-mobile-nav button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; min-height: 48px; background: none; border: none; border-radius: 10px; color: #728481; font-family: inherit; font-size: 10px; cursor: pointer; }
  #boyin-mobile-nav span { font-size: 10px; font-weight: 500; }
  #boyin-mobile-nav svg { width: 20px; height: 20px; }
  #boyin-mobile-nav a[aria-current="page"] { color: #087f73; background: #e9f3ef; }
  .bi-mobile a:focus-visible, .bi-mobile button:focus-visible { outline: 2px solid #087f73; outline-offset: 3px; }
  .bi-mobile #root button { min-height: 40px; font-size: 12px; border-radius: 9px; box-shadow: none; }
  .bi-mobile #root input:not([type="checkbox"]):not([type="radio"]) { min-height: 46px; border-radius: 9px; background: #fff; font-size: 16px; }
  .bi-mobile #root [data-slot="card"], .bi-mobile-home #root section[class~="bg-card"], .bi-mobile-home #root div[class~="bg-card"] { border-radius: 14px; border: 1px solid #dfe8e6; box-shadow: none; --tw-ring-shadow: 0 0 #0000; }
  .bi-mobile #root [data-slot="card-title"] { font-size: 15px; }
  .bi-mobile #root [data-slot="card-description"] { font-size: 11px; line-height: 1.7; }
  .bi-mobile #root [data-slot="card-header"] { padding: 17px 16px !important; }
  .bi-mobile #root [data-slot="card-content"] { padding: 16px; }
  /* Overview is composed from the live native quota and usage values. */
  .bi-mobile-home .bi-overview { display: flex; flex-direction: column; gap: 17px; order: -2; }
  .bi-mobile-home .bi-native-usage, .bi-mobile-home .bi-onboarding { display: none !important; }
  .bi-mobile-home.bi-guide-open .bi-onboarding { display: grid !important; order: -1; scroll-margin-top: 16px; }
  .bi-balance { position: relative; overflow: hidden; padding: 19px 20px 17px; border-radius: 15px; background: #17383b; color: #f1f9f6; }
  .bi-balance-label { display: flex; align-items: center; gap: 7px; position: relative; font-size: 11px; color: #b3d0c9; }
  .bi-balance-label svg { width: 15px; height: 15px; }
  .bi-balance-label .bi-unit { margin-left: auto; font: 8px ui-monospace,monospace; letter-spacing: .15em; color: #8bb5ac; }
  .bi-balance-bottom { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; }
  .bi-balance-bottom strong { font: 550 29px/1.1 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: -.06em; overflow-wrap: anywhere; }
  .bi-balance-bottom a { display: flex; align-items: center; gap: 9px; flex-shrink: 0; min-height: 37px; padding: 8px 11px; background: #b8e5d6; border-radius: 7px; color: #1b4941; font-size: 11px; font-weight: 600; }
  .bi-balance-bottom a svg { width: 14px; height: 14px; }
  .bi-balance-caption { position: relative; margin-top: 19px; padding-top: 13px; border-top: 1px solid #ffffff18; color: #a7c4bd; font-size: 10px; letter-spacing: .03em; }
  .bi-circuit { width: 144px; height: 120px; position: absolute; right: -8px; top: -3px; color: #82c6b2; opacity: .15; pointer-events: none; }
  .bi-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 1px 0 5px; }
  .bi-metrics > div { padding: 0 12px; border-left: 1px solid #d9e3e1; min-width: 0; }
  .bi-metrics > div:first-child { border: 0; padding-left: 2px; }
  .bi-metrics span { display: block; font-size: 10px; color: #718580; white-space: nowrap; }
  .bi-metrics strong { display: block; margin-top: 7px; font: 550 18px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace; color: #233d3b; overflow-wrap: anywhere; }
  .bi-quick { padding: 16px 15px 14px; border: 1px solid #dfe8e6; border-radius: 14px; background: white; }
  .bi-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
  .bi-section-head h3 { font-size: 12px; font-weight: 600; }
  .bi-section-head button { display: inline-flex; align-items: center; gap: 3px; padding: 0 0 0 4px; min-height: 30px !important; color: #6a837b; background: none; border: none; font-size: 10px !important; }
  .bi-section-head button[hidden] { display: none; }
  .bi-section-head button svg { width: 12px; height: 12px; }
  .bi-quick-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; }
  .bi-quick-grid a { display: flex; align-items: center; flex-direction: column; gap: 9px; font-size: 10px; color: #405b56; }
  .bi-quick-grid a svg { box-sizing: content-box; width: 20px; height: 20px; padding: 12px; color: #34776b; background: #f0f6f3; border-radius: 12px; }
  .bi-quick-grid a:nth-child(2) svg { color: #477a91; background: #eff5f7; }
  .bi-quick-grid a:nth-child(3) svg { color: #806e40; background: #f6f4ec; }
  .bi-quick-grid a:nth-child(4) svg { color: #607283; background: #f0f3f6; }
  .bi-wallet-link { display: flex; align-items: center; gap: 12px; padding: 14px 15px; border-radius: 12px; border: 1px solid #dce7e3; background: #eaf2ee; }
  .bi-small-icon { display: grid; place-items: center; width: 32px; height: 32px; color: #477567; }
  .bi-small-icon svg { width: 23px; height: 23px; }
  .bi-wallet-link > span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .bi-wallet-link strong { font-size: 12px; font-weight: 600; color: #2c4d42; }
  .bi-wallet-link small { font-size: 10px; color: #71887f; }
  .bi-wallet-link > svg { width: 18px; height: 18px; color: #577d70; }
  .bi-mobile-home #root .bi-info-content { height: auto; min-height: 76px; max-height: 300px; padding: 20px; font-size: 11px; }
  .bi-mobile-home #root section[class~="bg-card"] > div:first-child { flex-wrap: wrap; }
  .bi-mobile-home #root section[class~="bg-card"] > div:first-child h3 { font-size: 12px; }
  .bi-mobile-home #root section[class~="bg-card"] > div:first-child > span { font-size: 9px; }
  .bi-mobile-home #root .bi-onboarding h3 { font-size: 16px; }
  /* Wallet: a ledger-style balance panel, denomination grid, and payment rows. */
  .bi-mobile-wallet .bi-wallet-stack { gap: 18px; }
  .bi-mobile-wallet .bi-wallet-summary { position: relative; overflow: hidden; border: none; border-radius: 15px; background: #17383b; color: #eff7f4; }
  .bi-mobile-wallet .bi-wallet-summary > .bi-circuit { display: block; top: -12px; right: 0; width: 155px; height: 128px; }
  .bi-mobile-wallet .bi-wallet-summary > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 19px 20px 16px; }
  .bi-mobile-wallet .bi-wallet-summary > div > div { padding: 0; border: 0; position: relative; }
  .bi-mobile-wallet .bi-wallet-summary > div > div:first-child { grid-column: 1/-1; padding-bottom: 18px; margin-bottom: 13px; border-bottom: 1px solid #ffffff1c; }
  .bi-mobile-wallet .bi-wallet-summary > div > div:not(:first-child) { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
  .bi-mobile-wallet .bi-wallet-summary > div > div:last-child { margin-left: 17px; padding-left: 17px; border-left: 1px solid #ffffff20; }
  .bi-mobile-wallet .bi-wallet-summary .text-muted-foreground { color: #aecbc2; font-size: 10px; letter-spacing: .02em; }
  .bi-mobile-wallet .bi-wallet-summary svg:not(.bi-circuit) { width: 13px; height: 13px; color: #9fc9bc; }
  .bi-mobile-wallet .bi-wallet-summary .font-mono { margin-top: 0; font: 500 14px/1.3 ui-monospace,monospace; color: #eff7f4; }
  .bi-mobile-wallet .bi-wallet-summary > div > div:first-child .font-mono { margin-top: 13px; font-size: 29px; letter-spacing: -.06em; }
  .bi-mobile-wallet .bi-topup-card [data-slot="card-header"] > div { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
  .bi-mobile-wallet .bi-topup-card [data-slot="card-header"] > div > div:last-child { width: auto; }
  .bi-mobile-wallet .bi-topup-card [data-slot="card-header"] button { min-height: 34px; padding: 6px 8px; border: 0; background: #f0f5f3; color: #40665a; font-size: 10px; gap: 4px; }
  .bi-mobile-wallet .bi-topup-card [data-slot="card-header"] > div > div:first-child > div:first-child { display: none; }
  .bi-mobile-wallet .bi-topup-card [data-slot="card-content"] { padding: 16px; }
  .bi-mobile-wallet .bi-topup-card label { font-size: 11px; color: #587068; letter-spacing: .02em; }
  .bi-mobile-wallet .bi-amount-options > label::before, .bi-mobile-wallet .bi-payment-methods > label::before { content: '01'; color: #087f73; background: #eaf4ef; padding: 3px 5px; border-radius: 4px; font: 9px ui-monospace,monospace; }
  .bi-mobile-wallet .bi-payment-methods > label::before { content: '02'; }
  .bi-mobile-wallet .bi-amount-options > div { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .bi-mobile-wallet #root .bi-amount-options button { position: relative; min-height: 65px; height: auto; padding: 11px; gap: 0; border: 1px solid #dce7e2; border-radius: 9px; background: #f8fbf9; }
  .bi-mobile-wallet #root .bi-amount-options button > div:first-child > div { font: 550 17px ui-monospace,monospace; }
  .bi-mobile-wallet #root .bi-amount-options button > div:last-child { margin-top: 7px; font-size: 9px; line-height: 1.4; color: #738a80; }
  .bi-mobile-wallet #root .bi-amount-options button[aria-pressed="true"] { border-color: #238a70; background: #edf8f1; color: #116d53; box-shadow: inset 0 0 0 1px #238a70; }
  .bi-mobile-wallet .bi-custom-amount > div { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .bi-mobile-wallet .bi-custom-amount > div > div { background: #f0f6f3; min-height: 46px; border: 1px solid #e0eae4; gap: 5px; padding: 8px 10px; }
  .bi-mobile-wallet .bi-custom-amount > div > div span:first-child { font-size: 9px; }
  .bi-mobile-wallet .bi-custom-amount > div > div span:last-child { color: #246c56; font: 600 16px ui-monospace,monospace; }
  .bi-mobile-wallet .bi-payment-methods > div { grid-template-columns: 1fr; gap: 8px; }
  .bi-mobile-wallet #root .bi-payment-methods button { min-height: 54px; height: auto; justify-content: flex-start; gap: 11px; padding: 10px 13px; border: 1px solid #dfe8e5; background: white; border-radius: 9px; font-size: 12px; }
  .bi-mobile-wallet .bi-payment-methods button::after { content: ''; margin-left: auto; width: 7px; height: 7px; border: solid #779187; border-width: 1px 1px 0 0; transform: rotate(45deg); }
  .bi-mobile-wallet .bi-payment-methods button > svg { box-sizing: content-box; width: 18px; height: 18px; padding: 7px; border-radius: 8px; background: #eff4f1; color: #57736b; }
  .bi-mobile-wallet .bi-payment-methods button[data-bi-pay="alipay"] > svg { background: #edf6ff; color: #2289cd; }
  .bi-mobile-wallet .bi-payment-methods button[data-bi-pay="wechat"] > svg { background: #edf8ef; color: #3b9861; }
  .bi-mobile-wallet .bi-payment-methods button:disabled { opacity: .48; }
  .bi-mobile-wallet .bi-redemption { padding-top: 17px; border-top-style: dashed; }
  .bi-mobile-wallet #root .bi-redemption button { min-height: 46px; background: #e6f0ea; color: #2b6954; border: 1px solid #cfe1d6; }
  .bi-mobile-wallet #root [data-slot="dialog-popup"], .bi-mobile-wallet #root [role="dialog"] { border-radius: 16px; }
  .bi-mobile [role="dialog"] { --background: #f8fbf9; --card: #fff; color: #172c31; font-size: 13px; }
  .bi-mobile [role="dialog"] button { min-height: 40px; }
  .bi-mobile [role="dialog"] input { font-size: 16px; }
  .bi-mobile [role="dialog"] [data-slot="dialog-title"] { font-size: 16px; }
  .bi-mobile-wallet [role="dialog"] table { font-size: 11px; }
  .bi-mobile-wallet [role="dialog"] td, .bi-mobile-wallet [role="dialog"] th { padding: 10px 8px; }
  .bi-mobile [role="dialog"] { background: #fff; }
  .bi-mobile-wallet [data-slot="alert-dialog-content"] { top: auto; bottom: max(14px,env(safe-area-inset-bottom)); left: 14px; width: calc(100% - 28px); max-width: none; max-height: calc(100dvh - 28px); overflow-y: auto; transform: none; translate: none; padding: 22px; border: 1px solid #d8e5de; border-radius: 18px; background: #fff; gap: 17px; box-shadow: 0 12px 50px #0a302a26; }
  .bi-mobile-wallet [data-slot="alert-dialog-header"] { place-items: start; text-align: left; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid #e2ebe6; }
  .bi-mobile-wallet [data-slot="alert-dialog-title"] { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
  .bi-mobile-wallet [data-slot="alert-dialog-title"]::before { content: ''; width: 28px; height: 28px; border-radius: 8px; background: #e7f3ec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23278064' stroke-width='1.5'%3E%3Cpath d='M5 5h14v14H5zM5 9h14m-5 5h3'/%3E%3C/svg%3E") center/22px no-repeat; }
  .bi-mobile-wallet [data-slot="alert-dialog-description"] { font-size: 11px; color: #71897e; }
  .bi-mobile-wallet [data-slot="alert-dialog-content"] > .space-y-3 { padding: 0 0 6px; }
  .bi-mobile-wallet [data-slot="alert-dialog-content"] .text-sm { font-size: 12px; }
  .bi-mobile-wallet [data-slot="alert-dialog-content"] .text-lg { font-size: 18px; }
  .bi-mobile-wallet [data-slot="alert-dialog-content"] .text-2xl { font-size: 24px; color: #126f53; }
  .bi-mobile-wallet [data-slot="alert-dialog-footer"] { margin: 0; padding: 16px 0 0; border-radius: 0; background: transparent; grid-template-columns: 1fr 1.6fr; }
  .bi-mobile-wallet [data-slot="alert-dialog-footer"] button { height: 44px; border-radius: 9px; font-size: 12px; }
  .bi-mobile-wallet .bi-billing-history { background: #f8fbf9; border: 1px solid #dce7e2; border-radius: 17px; overflow: hidden; }
  .bi-mobile-wallet .bi-billing-history [data-slot="dialog-title"] { color: #234739; font-size: 16px; }
  .bi-mobile-wallet .bi-billing-history [data-slot="dialog-description"] { font-size: 11px; }
  .bi-mobile-wallet .bi-billing-history [class~="rounded-xl"] { background: white; border-color: #dce7e2; border-radius: 10px; }
  .bi-mobile-wallet .bi-billing-history [class~="font-mono"] { font-size: 10px; overflow-wrap: anywhere; }
  .bi-mobile-wallet .bi-billing-history button { min-height: 40px; border-radius: 8px; }
  .bi-mobile-wallet .bi-billing-history .space-y-3 > [class~="rounded-lg"][class~="border"] { padding: 13px; border-radius: 10px; background: #fff; }
  .bi-mobile-wallet .bi-billing-history [class~="grid-cols-2"] { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .bi-mobile-wallet .bi-billing-history [class~="text-red-600"] { color: #2d6850; }
  .bi-mobile-wallet .bi-billing-history label { font-size: 10px; }
}
@media (max-width: 359px) {
  .bi-mobile #root [data-slot="sidebar-inset"] main > [class~="overflow-auto"] { padding-inline: 12px; }
  .bi-mobile .bi-app-header > div { padding-inline: 12px; }
  .bi-mobile-wallet .bi-topup-card [data-slot="card-header"] { padding-inline: 12px !important; }
  .bi-mobile-wallet .bi-topup-card [data-slot="card-content"] { padding: 12px; }
  .bi-balance { padding-inline: 16px; }
  .bi-metrics > div { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .bi-mobile *, .bi-mobile *::before, .bi-mobile *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
