/* 20261116 mobile visual sync. The small-program shell and business actions
   stay authoritative. Desktop/admin surfaces are deliberately not retargeted. */

/* A new official-notification status is phone-only; desktop markup stays quiet. */
.official-mobile-read-status { display: none; }

@media (max-width: 1023px) {
  body:not(.admin-console) {
    /* Same final deskui11 palette, with restrained phone shadows. */
    --xb-notice-fill: linear-gradient(165deg, #f4fcff 0%, #edf8ff 52%, #e4f5ff 100%);
    --xb-notice-border: #93cfef;
    --xb-notice-title: #173d62;
    --xb-notice-body: #405d76;
    --xb-card-fill: linear-gradient(180deg, #f8fbff 0%, #f0f6fe 58%, #eaf2fc 100%);
    --xb-card-border: #8fb4ea;
    --xb-bubble-fill: linear-gradient(180deg, #f7faff 0%, #f4f8ff 55%, #eef5ff 100%);
    --xb-bubble-border: #bfd3f8;
    --xb-bubble-title: #172554;
    --xb-bubble-body: #475569;
  }

  /* Keep every existing mobile font size and line height. */
  body:not(.admin-console) :is(.page-header, .section-head h2,
    .ip-hero > h1, .relay-hero > h1, .vps-hero > h1, .broadband-hero > h1,
    .airport-hero > h1, .account-hero > h1, .guide-hero > h1,
    .inbox-heading h1, .owned-title h1) {
    color: var(--xb-brand-navy, #0b3d88);
    font-weight: 700;
  }
  body:not(.admin-console) :is(.catalog-plus-card strong, .miya-isp-card strong,
    .country-card strong, .relay-card strong, .vps-card strong, .account-card strong,
    .recommendation h3, .detail-head h1, .app-card h2, .app-card h3) {
    color: var(--xb-navy, #0f172a);
    font-weight: 700;
  }
  body:not(.admin-console) :is(.catalog-plus-card small, .country-card small,
    .relay-card small, .vps-card small, .account-card small, .recommendation p,
    .provider-tab small, .compact-meta dt, .server-spec-grid dt, .order-detail-grid dt,
    .owned-footer, .owned-title p, .tutorial-heading p, .guide-card small,
    .feedback-form label small) {
    color: var(--xb-subtle, #51647b);
  }
  body:not(.admin-console) :is(.catalog-card-price, .miya-isp-price,
    .country-card > span, .vps-card b, .account-card b, .tier-card small,
    .recommendation .price, .price-row b, .pack-price, .order-price, .owned-balance) {
    color: var(--xb-primary-hover, #1d4ed8);
    font-family: var(--xb-font, inherit);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }

  /* Only this existing notice gains bounded internal breathing room. Its
     outer margin, position, width and content order stay untouched. */
  body:not(.admin-console) :is(#ipScreen, #relayScreen, #vpsScreen,
    #broadbandScreen, #airportScreen, #accountScreen) .xb-compact-info,
  body:not(.admin-console) #detailScreen.xb-resip-page .detail-card > .xb-required-section {
    padding: 12px 14px;
    border-color: var(--xb-notice-border);
    border-radius: var(--xb-radius, 16px);
    outline: 1px solid var(--xb-notice-border);
    outline-offset: -1px;
    background: var(--xb-notice-fill);
    box-shadow: 0 5px 14px #2563eb0e, inset 0 1px 0 #fffffff0;
    color: var(--xb-notice-body);
    animation: none;
  }
  body:not(.admin-console) .xb-compact-info :is(.xb-information-panel,
    .xb-topic-original, .xb-info-row-body, .xb-supplier-note, .xb-supplier-source,
    .xb-info-required, .xb-info-row-body p, .xb-information-panel p, .xb-guide-source),
  body:not(.admin-console) #detailScreen.xb-resip-page .xb-required-section :is(p,
    .xb-information-panel, .xb-topic-original, .xb-info-row-body, .xb-supplier-source) {
    color: var(--xb-notice-body);
  }
  body:not(.admin-console) .xb-compact-info :is(h2, .xb-prose-label, .xb-supplier-note > b),
  body:not(.admin-console) #detailScreen.xb-resip-page .xb-required-section :is(h2, h3, .xb-prose-label) {
    color: var(--xb-notice-title);
    font-weight: 700;
  }
  body:not(.admin-console) .xb-compact-info .xb-info-disclosure > summary {
    color: var(--xb-primary-hover, #1d4ed8);
  }

  /* Pale-blue-white cards deliberately differ from the cyan supplier notice. */
  body:not(.admin-console) :is(.catalog-plus-card, .miya-isp-card, .country-card,
    .relay-card, .vps-card, .account-card, .tier-card, .continent-row, .recommendation,
    .service-panel .service, .guide-card, .server-location-panel, .server-spec-panel) {
    border-color: var(--xb-card-border);
    border-radius: var(--xb-radius, 16px);
    outline: 1px solid var(--xb-card-border);
    outline-offset: -1px;
    background: var(--xb-card-fill);
    box-shadow: 0 4px 12px #1e3a8a0c, inset 0 1px 0 #ffffffee;
    animation: none;
  }
  body:not(.admin-console) :is(.tier-card.active, .country-card.selected,
    .relay-card.selected, .vps-card.selected, .account-card.selected,
    .catalog-plus-card.selected, .catalog-plus-card.is-selected, .miya-isp-card.selected) {
    border-color: var(--xb-primary, #2563eb);
    outline-color: var(--xb-primary, #2563eb);
    background: var(--xb-selected, #eaf2ff);
  }
  body:not(.admin-console) :is(.catalog-plus-card, .miya-isp-card, .country-card,
    .relay-card, .vps-card, .account-card, .tier-card, .continent-row, .recommendation):focus-visible {
    outline: 2px solid var(--xb-focus, #1d4ed8);
    outline-offset: 2px;
  }

  /* Paint only: existing account cards, statistics and menu retain their grid. */
  body:not(.admin-console) #personalScreen :is(.app-card, .dashboard-stats > article, .account-menu) {
    border-color: var(--xb-bubble-border);
    border-radius: var(--xb-radius, 16px);
    outline: 1px solid var(--xb-bubble-border);
    outline-offset: -1px;
    background: var(--xb-bubble-fill);
    box-shadow: 0 5px 15px #2563eb0d, inset 0 1px 0 #fffffff0;
    color: var(--xb-bubble-body);
  }
  body:not(.admin-console) #personalScreen :is(.personal-identity h1, .app-card h1,
    .app-card h2, .app-card h3, .dashboard-stats b, .invite-card strong) {
    color: var(--xb-bubble-title);
    font-weight: 700;
  }
  body:not(.admin-console) #personalScreen :is(.app-card p, .dashboard-stats span,
    .compact-meta dt, .account-menu span) {
    color: var(--xb-bubble-body);
  }
  body:not(.admin-console) #personalScreen .account-menu button {
    background: transparent;
    color: var(--xb-bubble-title);
    border-color: var(--xb-bubble-border);
  }

  /* The white parent remains visible in the EXISTING space between messages. */
  body:not(.admin-console) :is(.inbox-wrap, #inboxContent) { background: #fff; }
  body:not(.admin-console) .message-card {
    border-color: var(--xb-line-strong, #b9cde7);
    background: #fff;
    box-shadow: none;
    color: var(--xb-navy, #0f172a);
  }
  body:not(.admin-console) .message-card.unread {
    border-color: #7eb0f2;
    border-left-color: var(--xb-primary, #2563eb);
    background: var(--xb-info-bg, #edf6ff);
    box-shadow: 0 3px 10px #2563eb0d;
  }
  body:not(.admin-console) .message-card :is(h2, .message-meta dd) { color: var(--xb-navy, #0f172a); }
  body:not(.admin-console) .message-card :is(p, small, .message-meta dt) { color: var(--xb-subtle, #51647b); }
  body:not(.admin-console) .inbox-unread-toggle {
    color: var(--xb-danger, #b42332);
    font-weight: 700;
  }
  body:not(.admin-console) .inbox-read-label {
    color: var(--xb-muted, #64748b);
    font-weight: 600;
  }
  body:not(.admin-console) .official-mobile-read-status { display: inline; }
  body:not(.admin-console) .notification-destination {
    border-color: var(--xb-line-strong, #b9cde7);
    background: #fff;
    color: var(--xb-primary-hover, #1d4ed8);
    font-weight: 600;
  }

  /* Touch feedback changes paint only, never position or scale. */
  body:not(.admin-console) .service-panel .service:hover,
  body:not(.admin-console) .service-panel .service:active {
    transform: none;
    animation: none;
  }
  body:not(.admin-console) :is(.primary-action, .register-primary, .wallet-recharge,
    .order-bar button, .recharge-submit):not(:disabled):not([aria-disabled="true"]):active {
    background: var(--xb-primary-hover, #1d4ed8);
    border-color: var(--xb-primary-hover, #1d4ed8);
    color: #fff;
    box-shadow: inset 0 1px 3px #0b3d8826;
  }
  body:not(.admin-console) :is(.secondary-action, .owned-button, .notification-destination,
    .period, .provider-tab, .relay-tab, .vps-tab, .airport-tab,
    .account-menu button, .tutorial-filters button, .service,
    .xb-info-disclosure > summary):not(:disabled):not([aria-disabled="true"]):not(.danger):active {
    background: var(--xb-selected, #eaf2ff);
    border-color: #8fb4ea;
    color: var(--xb-primary-hover, #1d4ed8);
  }
  body:not(.admin-console) :is(.country-card, .relay-card, .vps-card, .account-card,
    .continent-row, .recommendation):not(:disabled):not(.is-oos):not([aria-disabled="true"]):active {
    border-color: #5b8fdc;
    outline-color: #5b8fdc;
    background: #eaf2ff;
    box-shadow: inset 0 1px 3px #1e3a8a14;
  }
  body:not(.admin-console) .inbox-unread-toggle:not(:disabled):active {
    color: #8f1826;
    text-decoration: underline;
  }
}

/* 20261116-card1: unify mobile/tablet service cards to the fig1 bubble
   template and restore in-card pickers. Desktop ≥1024 stays deskui19. */

@media (max-width: 1023px) {
  body:not(.admin-console) {
    --xb-card-fill: linear-gradient(180deg, #f8fbff 0%, #f0f6fe 58%, #eaf2fc 100%);
    --xb-card-border: #8fb4ea;
    --xb-card-title: #0f172a;
    --xb-card-spec: #51647b;
    --xb-card-price: #1d4ed8;
    --xb-card-plus: #2563eb;
    --xb-card-plus-press: #1d4ed8;
    --xb-card-radius: 18px;
  }

  /* Force two-column bubble grids. Overrides the 760px four-column rules. */
  body:not(.admin-console) #relayScreen .relay-grid,
  body:not(.admin-console) #vpsScreen .vps-grid,
  body:not(.admin-console) #airportScreen .vps-grid,
  body:not(.admin-console) #broadbandScreen .vps-grid,
  body:not(.admin-console) #broadbandScreen .broadband-group .vps-grid,
  body:not(.admin-console) #accountScreen .account-grid,
  body:not(.admin-console) #resipView .resip-mobile-grid,
  body:not(.admin-console) #miyaView .miya-isp-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Fig1 bubble chrome for every service listing card. */
  body:not(.admin-console) :is(
    .catalog-plus-card,
    .miya-isp-card,
    .relay-card,
    .vps-card,
    .account-card,
    .tier-card,
    .broadband-product-card,
    .airport-plan-card,
    .resip-mobile-card
  ) {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: auto;
    max-width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 112px;
    margin: 0;
    padding: 12px 12px 10px;
    text-align: left;
    color: var(--xb-card-title);
    border: 1px solid var(--xb-card-border);
    border-radius: var(--xb-card-radius);
    outline: 1px solid var(--xb-card-border);
    outline-offset: -1px;
    background: var(--xb-card-fill);
    box-shadow: 0 4px 12px #1e3a8a0c, inset 0 1px 0 #ffffffee;
    box-sizing: border-box;
    overflow: hidden;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card.is-menu-open,
    .relay-card.is-menu-open,
    .vps-card.is-menu-open,
    .resip-mobile-card.is-menu-open
  ) {
    overflow: visible;
    z-index: 12;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card > strong,
    .catalog-plus-card .country-name,
    .miya-isp-card .miya-isp-title,
    .miya-isp-card .miya-isp-title span,
    .account-card-body strong,
    .resip-mobile-card .resip-mobile-title
  ) {
    color: var(--xb-card-title);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card small,
    .relay-card-spec-desktop,
    .catalog-vendor-static,
    .airport-card-config,
    .account-card-body small,
    .resip-mobile-card .resip-mobile-spec
  ) {
    display: block;
    color: var(--xb-card-spec);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    margin-top: 4px;
    overflow-wrap: anywhere;
  }

  /* Show the real desktop picker/spec row on phones; hide the old dump list. */
  body:not(.admin-console) .relay-card-spec-desktop,
  body:not(.admin-console) .catalog-vendor-static,
  body:not(.admin-console) .catalog-dropdown-host,
  body:not(.admin-console) .catalog-dropdown-caret,
  body:not(.admin-console) .catalog-inline-host,
  body:not(.admin-console) .catalog-inline-trigger,
  body:not(.admin-console) .vps-card-location-row,
  body:not(.admin-console) .vps-card-period-row,
  body:not(.admin-console) .airport-card-period-row,
  body:not(.admin-console) .catalog-card-meta-desktop,
  body:not(.admin-console) .resip-mobile-pickers {
    display: block !important;
  }

  body:not(.admin-console) .catalog-inline-host,
  body:not(.admin-console) .catalog-dropdown-host.catalog-inline-host {
    display: inline-flex !important;
    position: relative;
    max-width: 100%;
    margin-top: 4px;
    vertical-align: top;
    z-index: 2;
  }

  body:not(.admin-console) .relay-card-spec-mobile,
  body:not(.admin-console) .catalog-card-meta-mobile {
    display: none !important;
  }

  body:not(.admin-console) .catalog-inline-trigger {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    min-height: 32px;
    margin: 0;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #1d4ed8;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
  }

  body:not(.admin-console) .catalog-inline-trigger-text {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body:not(.admin-console) .catalog-inline-trigger .catalog-dropdown-caret {
    display: inline-block !important;
    flex: none;
    font-size: 11px;
    line-height: 1;
  }

  body:not(.admin-console) .vps-card-location-row,
  body:not(.admin-console) .vps-card-period-row,
  body:not(.admin-console) .airport-card-period-row {
    margin-top: 2px;
    min-width: 0;
  }

  /* Price left, circular plus right — same language as fig1 miya cards. */
  body:not(.admin-console) .catalog-plus-card .catalog-card-meta,
  body:not(.admin-console) .miya-isp-card .miya-isp-meta,
  body:not(.admin-console) .resip-mobile-card .resip-mobile-meta {
    display: flex !important;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    padding-top: 12px;
    padding-right: 52px;
    min-height: 40px;
    box-sizing: border-box;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card .catalog-card-price,
    .miya-isp-card .miya-isp-price,
    .resip-mobile-card .resip-mobile-price
  ) {
    color: var(--xb-card-price);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card .catalog-card-plus,
    .miya-isp-card .miya-isp-plus,
    .resip-mobile-card .resip-mobile-plus
  ) {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--xb-card-plus);
    color: #fff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.28);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 0;
    font-size: 0;
    pointer-events: none;
    flex: none;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card .catalog-card-plus svg,
    .miya-isp-card .miya-isp-plus svg,
    .resip-mobile-card .resip-mobile-plus svg
  ) {
    display: block;
    width: 18px;
    height: 18px;
    stroke: #fff;
    color: #fff;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card,
    .miya-isp-card,
    .resip-mobile-card
  ):not(:disabled):not(.is-oos):not([aria-disabled="true"]):active :is(
    .catalog-card-plus,
    .miya-isp-plus,
    .resip-mobile-plus
  ) {
    background: var(--xb-card-plus-press);
    box-shadow: inset 0 1px 3px #0b3d8826;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card .catalog-card-oos,
    .miya-isp-card .miya-isp-oos,
    .resip-mobile-card .resip-mobile-oos
  ) {
    position: absolute;
    right: 10px;
    bottom: 12px;
    width: auto;
    max-width: 46%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: #8a93a6;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: right;
    overflow-wrap: anywhere;
    pointer-events: none;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card.is-oos,
    .catalog-plus-card:disabled,
    .catalog-plus-card[aria-disabled="true"],
    .miya-isp-card.is-oos,
    .miya-isp-card:disabled,
    .resip-mobile-card.is-oos
  ) {
    cursor: not-allowed;
    color: #8a93a6;
    background: #f7f8fa;
    box-shadow: none;
    filter: grayscale(.12);
  }

  body:not(.admin-console) :is(
    .catalog-plus-card.is-oos,
    .catalog-plus-card:disabled,
    .catalog-plus-card[aria-disabled="true"],
    .miya-isp-card.is-oos,
    .miya-isp-card:disabled,
    .resip-mobile-card.is-oos
  ) :is(.catalog-card-plus, .miya-isp-plus, .resip-mobile-plus) {
    display: none !important;
  }

  /* Account cards stay a stacked bubble; icon sits with the title. */
  body:not(.admin-console) .account-card.catalog-plus-card {
    flex-direction: column;
    gap: 8px;
  }

  body:not(.admin-console) .account-card.catalog-plus-card .account-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  body:not(.admin-console) .account-card.catalog-plus-card .account-card-body {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    flex: 1;
  }

  /* In-card menus: popover (few) or bottom sheet (many). Never stretch the card. */
  body:not(.admin-console) .catalog-overlay-menu {
    display: block !important;
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 40;
    width: max-content;
    min-width: 168px;
    max-width: min(280px, calc(100vw - 24px));
    max-height: 240px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 6px;
    border: 1px solid #b9d1f3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px #1e3a8a24;
    box-sizing: border-box;
  }

  body:not(.admin-console) .catalog-overlay-menu.is-sheet,
  body:not(.admin-console) .catalog-overlay-menu.is-sheet.catalog-overlay-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: min(68dvh, 520px);
    padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 18px 18px 0 0;
    z-index: 90;
  }

  body:not(.admin-console) .catalog-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 85;
    margin: 0;
    padding: 0;
    border: 0;
    background: #10182866;
    cursor: pointer;
  }

  body:not(.admin-console) .catalog-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 4px 10px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
  }

  body:not(.admin-console) .catalog-sheet-head button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f2f4f7;
    color: #334155;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  body:not(.admin-console) .catalog-overlay-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
  }

  body:not(.admin-console) .catalog-overlay-option + .catalog-overlay-option {
    margin-top: 2px;
  }

  body:not(.admin-console) .catalog-overlay-option.is-selected {
    background: #eef4ff;
    color: #1d4ed8;
    font-weight: 650;
  }

  body:not(.admin-console) .catalog-overlay-option.is-oos,
  body:not(.admin-console) .catalog-overlay-option:disabled {
    cursor: not-allowed;
    color: #8a93a6;
    background: #f7f8fa;
  }

  /* Confirm-order dialog: one inner scroller, clear of the tab bar and safe area.
     display:flex must be gated to [open]/:modal — a bare display rule overrides the UA
     dialog:not([open]){display:none} and leaves the modal visible after close(). */
  body:not(.admin-console) #purchaseDialog.qr-dialog:not([open]) {
    display: none !important;
  }
  body:not(.admin-console) #purchaseDialog.qr-dialog[open],
  body:not(.admin-console) #purchaseDialog.qr-dialog:modal {
    width: calc(100% - 24px);
    max-width: 520px;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
    margin: auto;
    padding: 16px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  body:not(.admin-console) #purchaseDialog .qr-dialog-head {
    flex: none;
    gap: 8px;
  }

  body:not(.admin-console) #purchaseDialog .qr-dialog-head button {
    width: 36px;
    height: 36px;
    flex: none;
  }

  body:not(.admin-console) #purchaseDialog #purchaseContent {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.admin-console) #purchaseDialog #purchaseError,
  body:not(.admin-console) #purchaseDialog .service-dialog-actions {
    flex: none;
  }

  body:not(.admin-console) #purchaseDialog .service-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
  }

  body:not(.admin-console) #purchaseDialog .service-dialog-actions button {
    min-height: 44px;
  }

  body:not(.admin-console) #purchaseDialog #purchaseConfirm {
    flex: 1 1 160px;
  }
}

@media (max-width: 359px) {
  body:not(.admin-console) :is(
    .catalog-plus-card > strong,
    .catalog-plus-card .country-name,
    .miya-isp-card .miya-isp-title,
    .account-card-body strong,
    .resip-mobile-card .resip-mobile-title
  ) {
    font-size: 13px;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card,
    .miya-isp-card,
    .resip-mobile-card,
    .account-card
  ) {
    padding: 10px 10px 8px;
  }

  body:not(.admin-console) :is(
    .catalog-plus-card .catalog-card-price,
    .miya-isp-card .miya-isp-price,
    .resip-mobile-card .resip-mobile-price
  ) {
    font-size: 15px;
  }
}

@media (min-width: 700px) and (max-width: 1023px) {
  body:not(.admin-console) :is(
    .catalog-plus-card,
    .miya-isp-card,
    .resip-mobile-card,
    .account-card
  ) {
    padding: 14px 14px 12px;
  }
}

/* New mobile-only period row must not appear on the desktop listing. */
@media (min-width: 1024px) {
  .vps-card-period-row,
  .catalog-sheet-backdrop,
  .catalog-sheet-head,
  .resip-mobile-grid,
  .resip-mobile-card {
    display: none !important;
  }
}


/* mobile-card-unify hotfix4: readable sheet options + portaled sheets */
@media (max-width: 1023px) {
  body:not(.admin-console) .app > .catalog-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 85;
    margin: 0;
    border: 0;
    background: #10182866;
    cursor: pointer;
  }
  body:not(.admin-console) .app > .catalog-overlay-menu.is-sheet {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: min(68dvh, 520px);
    padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -8px 28px #10203a22;
    z-index: 90;
    overflow: auto;
  }
  body:not(.admin-console) .catalog-overlay-option,
  body:not(.admin-console) .catalog-overlay-option span,
  body:not(.admin-console) .catalog-overlay-option b {
    color: #0f172a !important;
  }
  body:not(.admin-console) .catalog-overlay-option.is-selected,
  body:not(.admin-console) .catalog-overlay-option.is-selected span,
  body:not(.admin-console) .catalog-overlay-option.is-selected b {
    color: #1d4ed8 !important;
  }
  body:not(.admin-console) .catalog-overlay-option.is-oos,
  body:not(.admin-console) .catalog-overlay-option:disabled,
  body:not(.admin-console) .catalog-overlay-option.is-oos span,
  body:not(.admin-console) .catalog-overlay-option:disabled span,
  body:not(.admin-console) .catalog-overlay-option.is-oos b,
  body:not(.admin-console) .catalog-overlay-option:disabled b {
    color: #475569 !important;
  }
}


/* mobile-card-unify hotfix5: keep page title above scrolling provider notes */
@media (max-width: 1023px) {
  body:not(.admin-console) .screen.active > .page-header,
  body:not(.admin-console) .app .screen.active .page-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #ffffff;
    background: var(--page, #ffffff);
  }
}

/* modal-close-20261116: sheet close animation + no leftover pointer-events */
@media (max-width: 1023px) {
  body:not(.admin-console) .catalog-sheet-backdrop,
  body:not(.admin-console) .app > .catalog-sheet-backdrop {
    transition: opacity 180ms ease;
  }
  body:not(.admin-console) .catalog-overlay-menu.is-sheet,
  body:not(.admin-console) .app > .catalog-overlay-menu.is-sheet {
    transition: transform 180ms ease, opacity 180ms ease;
  }
  body:not(.admin-console) .catalog-sheet-backdrop.is-closing,
  body:not(.admin-console) .app > .catalog-sheet-backdrop.is-closing,
  body:not(.admin-console) .catalog-overlay-menu.is-sheet.is-closing,
  body:not(.admin-console) .app > .catalog-overlay-menu.is-sheet.is-closing {
    opacity: 0;
    pointer-events: none;
  }
  body:not(.admin-console) .catalog-overlay-menu.is-sheet.is-closing,
  body:not(.admin-console) .app > .catalog-overlay-menu.is-sheet.is-closing {
    transform: translateY(16px);
  }
}
@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  body:not(.admin-console) .catalog-sheet-backdrop,
  body:not(.admin-console) .app > .catalog-sheet-backdrop,
  body:not(.admin-console) .catalog-overlay-menu.is-sheet,
  body:not(.admin-console) .app > .catalog-overlay-menu.is-sheet {
    transition: none;
  }
}
/* 20261116-bubble1: visible light-blue product bubbles + restore ice-blue
   服务须知 / 供应商说明 bubbles on mobile/tablet. Desktop ≥1024 stays deskui19.

   Root cause of the missing notice bubble on the official 8765 preview:
   ui-information.css defaults .xb-compact-info to background:transparent
   with only a top border (plain text on a white page). The completed
   ice-blue notice chrome lives in ui-theme.css and ui-information.css
   inside @media (min-width: 1024px) only. The mobile restore was written
   into mobile-visual.css, but 8765's static allowlist does not serve that
   file (404). card-unify appended mobile card layout to ui-theme.css but
   did not port the notice bubble, so 8765 phones kept the transparent
   default. This block restores the notice on the file 8765 actually loads
   and strengthens product-card fills so they are no longer near-white. */

@media (max-width: 1023px) {
  body:not(.admin-console) {
    --xb-card-fill: linear-gradient(145deg, #F8FCFF 0%, #EEF6FF 55%, #E5F1FF 100%);
    --xb-card-border: #8FB8FF;
    --xb-card-shadow: 0 5px 16px rgba(45, 105, 190, 0.08);
    --xb-card-radius: 20px;
    --xb-card-oos-fill: linear-gradient(145deg, #F5F7FA 0%, #EEF1F5 55%, #E6EAEF 100%);
    --xb-card-oos-border: #B7C4D6;
    --xb-card-oos-shadow: 0 4px 12px rgba(71, 85, 105, 0.06);
    --xb-notice-fill: linear-gradient(145deg, #F5FCFF 0%, #EAF7FF 55%, #DFF1FF 100%);
    --xb-notice-border: #93CFEF;
    --xb-notice-shadow: 0 6px 18px rgba(40, 115, 170, 0.07);
    --xb-notice-radius: 18px;
    --xb-notice-title: #173D62;
    --xb-notice-body: #405D76;
    --xb-bubble-fill: linear-gradient(160deg, #F7FBFF 0%, #F1F7FF 58%, #EAF3FF 100%);
    --xb-bubble-border: #B7D0F5;
    --xb-bubble-shadow: 0 5px 14px rgba(45, 105, 190, 0.06);
    --xb-bubble-radius: 18px;
    --xb-bubble-title: #172554;
    --xb-bubble-body: #475569;
  }

  /* Product listing cards: keep the card1 two-column layout, only retint. */
  body:not(.admin-console) :is(
    .catalog-plus-card,
    .miya-isp-card,
    .relay-card,
    .vps-card,
    .account-card,
    .tier-card,
    .broadband-product-card,
    .airport-plan-card,
    .resip-mobile-card
  ) {
    border: 1px solid var(--xb-card-border);
    border-radius: var(--xb-card-radius);
    outline: 1px solid var(--xb-card-border);
    outline-offset: -1px;
    background: var(--xb-card-fill);
    box-shadow: var(--xb-card-shadow);
  }

  /* Sold-out cards keep the same rounded bubble silhouette, grey-blue, no plus. */
  body:not(.admin-console) :is(
    .catalog-plus-card.is-oos,
    .catalog-plus-card:disabled,
    .catalog-plus-card[aria-disabled="true"],
    .miya-isp-card.is-oos,
    .miya-isp-card:disabled,
    .relay-card.is-oos,
    .vps-card.is-oos,
    .account-card.is-oos,
    .broadband-product-card.is-oos,
    .airport-plan-card.is-oos,
    .resip-mobile-card.is-oos
  ) {
    border-color: var(--xb-card-oos-border);
    outline-color: var(--xb-card-oos-border);
    background: var(--xb-card-oos-fill);
    box-shadow: var(--xb-card-oos-shadow);
    filter: grayscale(0.14);
  }

  /* Restore 服务须知 / 供应商说明 as a distinct aqua bubble, not a thin rule. */
  body:not(.admin-console) :is(
    #ipScreen,
    #relayScreen,
    #vpsScreen,
    #broadbandScreen,
    #airportScreen,
    #accountScreen
  ) .xb-compact-info,
  body:not(.admin-console) #detailScreen.xb-resip-page .detail-card > .xb-required-section {
    margin: 10px 0 14px;
    padding: 14px 16px;
    border: 1px solid var(--xb-notice-border);
    border-radius: var(--xb-notice-radius);
    outline: 0;
    background: var(--xb-notice-fill);
    box-shadow: var(--xb-notice-shadow);
    color: var(--xb-notice-body);
    text-align: left;
    overflow: visible;
    isolation: isolate;
  }

  body:not(.admin-console) :is(
    #ipScreen,
    #relayScreen,
    #vpsScreen,
    #broadbandScreen,
    #airportScreen,
    #accountScreen
  ) .xb-compact-info :is(h2, .xb-prose-label, .xb-supplier-note > b, .server-bandwidth-info b, .xb-info-section-heading),
  body:not(.admin-console) #detailScreen.xb-resip-page .detail-card > .xb-required-section :is(h2, h3, .xb-prose-label, .xb-info-section-heading, b, strong) {
    color: var(--xb-notice-title);
    font-weight: 700;
    text-align: left;
  }

  body:not(.admin-console) :is(
    #ipScreen,
    #relayScreen,
    #vpsScreen,
    #broadbandScreen,
    #airportScreen,
    #accountScreen
  ) .xb-compact-info :is(
    .xb-information-panel,
    .xb-topic-original,
    .xb-info-row-body,
    .xb-supplier-note,
    .xb-supplier-source,
    .xb-info-required,
    .xb-guide-source,
    p
  ),
  body:not(.admin-console) #detailScreen.xb-resip-page .detail-card > .xb-required-section :is(
    p,
    .xb-information-panel,
    .xb-topic-original,
    .xb-info-row-body
  ) {
    color: var(--xb-notice-body);
    text-align: left;
  }

  /* Inner notes stay typography, not a second nested bubble. */
  body:not(.admin-console) :is(
    #ipScreen,
    #relayScreen,
    #vpsScreen,
    #broadbandScreen,
    #airportScreen,
    #accountScreen
  ) .xb-compact-info :is(
    .provider-note,
    .relay-note,
    .vps-note,
    .broadband-note,
    .airport-note,
    .server-bandwidth-info
  ) {
    width: auto;
    max-width: none;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: var(--xb-notice-body);
  }

  /* Softer information bubbles: 我的服务 / 个人中心 / related modules.
     Do not restyle form controls, QR images, toasts, or #purchaseDialog. */
  body:not(.admin-console) :is(
    #ownedScreen .owned-card,
    #ownedScreen .owned-title,
    #ownedDetailScreen .owned-card,
    #ownedDetailScreen .detail-card,
    #serviceDetailScreen .detail-card,
    #serviceDetailScreen .owned-card,
    #personalScreen .app-card,
    #personalScreen .dashboard-stats > article,
    #personalScreen .account-menu,
    #personalScreen .invite-card,
    #ordersScreen .app-card,
    #ordersScreen .owned-card,
    #ordersScreen .owned-table-wrap,
    #ordersScreen .client-order-table-wrap,
    #orderDetailScreen .detail-card,
    #ledgerScreen .app-card,
    #couponScreen .app-card,
    #guideScreen .guide-card,
    #tutorialScreen .guide-card,
    #feedbackScreen .feedback-form,
    #rechargeScreen .recharge-hero,
    #rechargeScreen .recharge-panel,
    #rechargeScreen .recharge-account-bar,
    #contactScreen .app-card,
    #productsScreen .app-card
  ) {
    border: 1px solid var(--xb-bubble-border);
    border-radius: var(--xb-bubble-radius);
    outline: 0;
    background: var(--xb-bubble-fill);
    box-shadow: var(--xb-bubble-shadow);
  }

  body:not(.admin-console) :is(
    #personalScreen .personal-identity h1,
    #personalScreen .app-card h1,
    #personalScreen .app-card h2,
    #personalScreen .app-card h3,
    #personalScreen .dashboard-stats b,
    #personalScreen .invite-card strong,
    #ownedScreen .owned-title h1,
    #ownedScreen .owned-title h2,
    #ownedScreen .owned-card h2,
    #ownedScreen .owned-card h3
  ) {
    color: var(--xb-bubble-title);
  }

  body:not(.admin-console) :is(
    #personalScreen .app-card p,
    #personalScreen .dashboard-stats span,
    #ownedScreen .owned-card p,
    #ownedScreen .owned-title p
  ) {
    color: var(--xb-bubble-body);
  }

  /* Inbox stays a reading surface: light bubble, not a product card. */
  body:not(.admin-console) #inboxScreen .message-card {
    border: 1px solid var(--xb-bubble-border);
    border-radius: 16px;
    background: linear-gradient(180deg, #F8FBFF 0%, #F4F8FF 100%);
    box-shadow: 0 3px 10px rgba(45, 105, 190, 0.05);
  }

  /* Keep inputs, QR, toasts and the confirm-order dialog off this language. */
  body:not(.admin-console) :is(
    #purchaseDialog,
    #purchaseDialog *,
    input,
    textarea,
    select,
    .qr-dialog,
    .config-qr,
    img[src*="qr"],
    .toast,
    .app-toast
  ) {
    /* no bubble fill inherited through these exceptions — left unforced */
  }
}

/* Sticky title bar stays opaque so notice text cannot punch through. */
@media (max-width: 1023px) {
  body:not(.admin-console) .screen.active > .page-header,
  body:not(.admin-console) .app .screen.active .page-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background-color: #ffffff;
    background: #ffffff;
    background: var(--page, #ffffff);
  }
}

/* 20261116-white1: mobile storefront main backgrounds → #FFFFFF.
   Desktop (≥1024px) is unchanged. Shared tokens in design-tokens.css are not edited.
   Product cards, notice/aqua bubbles, selected chips, prices, plus buttons,
   account info cards and status tags keep their existing blue-family fills. */
@media (max-width: 1023px) {
  html,
  body:not(.admin-console) {
    --page: #ffffff;
    --xb-page: #ffffff;
    background: #ffffff;
    background-color: #ffffff;
  }

  body:not(.admin-console) .app,
  body:not(.admin-console) .screen,
  body:not(.admin-console) .screen.active,
  body:not(.admin-console) .owned-page,
  body:not(.admin-console) .order-screen,
  body:not(.admin-console) .inbox-wrap,
  body:not(.admin-console) .feedback-page,
  body:not(.admin-console) .content,
  body:not(.admin-console) .terms-page,
  body:not(.admin-console) .ip-page,
  body:not(.admin-console) .relay-view,
  body:not(.admin-console) .vps-view,
  body:not(.admin-console) .broadband-view,
  body:not(.admin-console) .airport-view,
  body:not(.admin-console) .account-view,
  body:not(.admin-console) .registration-screen,
  body:not(.admin-console) .registration-shell,
  body:not(.admin-console) .registration-shell.xb-auth-surface,
  body:not(.admin-console).auth-screen,
  body:not(.admin-console) #homeScreen,
  body:not(.admin-console) #ipScreen,
  body:not(.admin-console) #relayScreen,
  body:not(.admin-console) #vpsScreen,
  body:not(.admin-console) #broadbandScreen,
  body:not(.admin-console) #airportScreen,
  body:not(.admin-console) #accountScreen,
  body:not(.admin-console) #guideScreen,
  body:not(.admin-console) #contactScreen,
  body:not(.admin-console) #detailScreen,
  body:not(.admin-console) #detailContent,
  body:not(.admin-console) #termsScreen,
  body:not(.admin-console) #rechargeScreen,
  body:not(.admin-console) #ordersScreen,
  body:not(.admin-console) #ordersContent,
  body:not(.admin-console) #orderDetailScreen,
  body:not(.admin-console) #inboxScreen,
  body:not(.admin-console) #inboxContent,
  body:not(.admin-console) #feedbackScreen,
  body:not(.admin-console) #ownedScreen,
  body:not(.admin-console) #ownedContent,
  body:not(.admin-console) #ownedDetailScreen,
  body:not(.admin-console) #productsScreen,
  body:not(.admin-console) #personalScreen,
  body:not(.admin-console) #personalContent,
  body:not(.admin-console) #couponScreen,
  body:not(.admin-console) #couponContent,
  body:not(.admin-console) #ledgerScreen,
  body:not(.admin-console) #ledgerContent,
  body:not(.admin-console) #serviceDetailScreen,
  body:not(.admin-console) #serviceDetailContent,
  body:not(.admin-console) #tutorialScreen,
  body:not(.admin-console) #clientScreen,
  body:not(.admin-console) #registerScreen,
  body:not(.admin-console) #registerView,
  body:not(.admin-console) #vpsView,
  body:not(.admin-console) #broadbandView,
  body:not(.admin-console) #airportView,
  body:not(.admin-console) #ipScreen .ip-page,
  body:not(.admin-console) #relayScreen .relay-view,
  body:not(.admin-console) #vpsScreen .vps-view,
  body:not(.admin-console) #broadbandScreen .broadband-view,
  body:not(.admin-console) #airportScreen .airport-view,
  body:not(.admin-console) #accountScreen .account-view,
  body:not(.admin-console) #ipScreen .ip-hero,
  body:not(.admin-console) #relayScreen .relay-hero,
  body:not(.admin-console) #vpsScreen .vps-hero,
  body:not(.admin-console) #broadbandScreen .broadband-hero,
  body:not(.admin-console) #airportScreen .airport-hero,
  body:not(.admin-console) #accountScreen .account-hero,
  body:not(.admin-console) #guideScreen .guide-hero,
  body:not(.admin-console) #rechargeScreen .recharge-hero,
  body:not(.admin-console) #contactScreen .contact-hero,
  body:not(.admin-console) #clientScreen .client-hero,
  body:not(.admin-console) #ownedDetailScreen .owned-page,
  body:not(.admin-console) #serviceDetailScreen .content,
  body:not(.admin-console) #orderDetailScreen .content,
  body:not(.admin-console) #ledgerScreen .content,
  body:not(.admin-console) #personalScreen .content,
  body:not(.admin-console) #couponScreen .content {
    background: #ffffff;
    background-color: #ffffff;
  }

  /* Sticky page title stays opaque and now matches the white page surface.
     Layout, position and z-index are unchanged. */
  body:not(.admin-console) .screen.active > .page-header,
  body:not(.admin-console) .app .screen.active .page-header {
    background-color: #ffffff;
    background: #ffffff;
    background: var(--page, #ffffff);
  }

  /* Hide the mid-page standalone 带宽说明 slot on mobile (it is moved into
     the top 服务须知 bubble). Once moved, this child selector no longer matches. */
  body:not(.admin-console) :is(#vpsView, #broadbandView) > .server-bandwidth-info {
    display: none;
  }

  /* Merged 带宽说明 typography: same level as other bold labels, no nested box,
     no extra rule, no first-line indent. Bubble height grows with content. */
  body:not(.admin-console) :is(#vpsScreen, #broadbandScreen) .xb-compact-info .server-bandwidth-info {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    border-top: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    color: var(--xb-notice-body, #334155);
    text-align: left;
  }
  body:not(.admin-console) :is(#vpsScreen, #broadbandScreen) .xb-compact-info .server-bandwidth-info b {
    display: inline;
    margin: 0;
    padding: 0;
    color: var(--xb-notice-title, #0f172a);
    font-size: 14px;
    line-height: 1.75;
    font-weight: 700;
    text-align: left;
  }
  body:not(.admin-console) :is(#vpsScreen, #broadbandScreen) .xb-compact-info .server-bandwidth-info p {
    display: inline;
    margin: 0;
    padding: 0;
    text-indent: 0;
    font-size: 14px;
    line-height: 1.75;
    font-weight: 400;
    color: var(--xb-notice-body, #334155);
    text-align: left;
  }
}


/* 20261117-fix1: keep mobile-visual in sync with ui-theme / delivery-display for loaded preview. */
@media (max-width: 1023px) {
  body:not(.admin-console) #vpsView > .server-location-panel,
  body:not(.admin-console) #vpsScreen #vpsView > section.server-location-panel {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
  }
  #rechargeScanPanel .recharge-platform-switch-row {
    display: flex !important;
  }
}
