/*
 * DTC Customer Portal — Android-style mobile application shell
 * Scope: authenticated customer portal at phone widths only.
 * Desktop/admin surfaces are intentionally untouched.
 */

@media (min-width: 761px) {
  .dtc-mobile-only { display: none !important; }
}

@media (max-width: 760px) {
  :root {
    --mobile-app-bg: #f5f7ff;
    --mobile-app-surface: #ffffff;
    --mobile-app-soft: #f8faff;
    --mobile-app-ink: #111827;
    --mobile-app-muted: #64748b;
    --mobile-app-line: #e7eaf3;
    --mobile-app-navy: #3157e5;
    --mobile-app-navy-2: #2445c4;
    --mobile-app-accent: #3157e5;
    --mobile-app-accent-soft: #edf1ff;
    --mobile-app-success: #24734b;
    --mobile-app-success-soft: #eaf5ef;
    --mobile-app-warning: #946116;
    --mobile-app-warning-soft: #fbf3e5;
    --mobile-app-danger: #963d45;
    --mobile-app-danger-soft: #faeaec;
    --mobile-app-nav-height: 74px;
    --mobile-app-top-height: 72px;
    --mobile-app-shadow: 0 14px 36px rgba(16, 42, 76, .11);
  }

  @keyframes dtcMobileBarIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes dtcMobileNavIn {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes dtcMobilePageIn {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
  }
  @keyframes dtcMobileCardIn {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes dtcMobileAttention {
    0%, 100% { box-shadow: 0 8px 24px rgba(148, 97, 22, .08); }
    50% { box-shadow: 0 8px 30px rgba(148, 97, 22, .18); }
  }
  @keyframes dtcMobileProgress {
    from { transform: translateX(-100%); }
    to { transform: translateX(310%); }
  }
  @keyframes dtcMobileSheetIn {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
  }

  html {
    min-height: 100%;
    background: var(--mobile-app-bg);
    overscroll-behavior-y: none;
  }

  body {
    min-height: 100dvh;
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: var(--mobile-app-bg) !important;
    color: var(--mobile-app-ink);
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
  }

  body::before,
  body::after {
    display: none !important;
  }

  body.portal-logged-out {
    background: #eef2f7 !important;
  }

  body:not(.result-mode) .portal-shell {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
  }

  body:not(.result-mode) .form-panel {
    min-height: 100dvh;
    padding: calc(26px + env(safe-area-inset-top)) 22px calc(30px + env(safe-area-inset-bottom));
    justify-content: flex-start;
    background: linear-gradient(180deg, #f7f9fc 0, #ffffff 31%);
  }

  body:not(.result-mode) .mobile-brand {
    margin: 0 0 34px;
    padding: 0;
  }

  body:not(.result-mode) .mobile-brand .logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: var(--mobile-app-navy);
    box-shadow: 0 10px 24px rgba(16, 42, 76, .18);
    animation: dtcMobileBarIn .38s ease both;
  }

  body:not(.result-mode) .mobile-brand strong {
    color: var(--mobile-app-navy);
    font-size: .95rem;
  }

  body:not(.result-mode) .mobile-brand span {
    color: var(--mobile-app-muted);
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .08em;
  }

  body:not(.result-mode) .step-progress {
    width: 100%;
    margin-bottom: 28px;
  }

  body:not(.result-mode) .form-block {
    width: 100%;
    max-width: none;
    margin: 0;
    animation: dtcMobilePageIn .35s cubic-bezier(.22, .75, .25, 1) both;
  }

  body:not(.result-mode) .form-icon,
  body:not(.result-mode) .field-icon,
  body:not(.result-mode) .security-note svg,
  body:not(.result-mode) .primary-btn svg {
    display: none !important;
  }

  body:not(.result-mode) .text-input {
    padding-left: 16px !important;
  }

  body:not(.result-mode) .form-block h2 {
    color: var(--mobile-app-navy);
    font-size: 1.85rem;
    letter-spacing: -.045em;
  }

  body:not(.result-mode) .form-lead {
    margin-bottom: 26px;
    color: var(--mobile-app-muted);
    font-size: .91rem;
  }

  body:not(.result-mode) .text-input {
    height: 58px;
    border-radius: 14px;
    background: #f8fafc;
  }

  body:not(.result-mode) .primary-btn {
    height: 56px;
    border-radius: 14px;
    background: var(--mobile-app-navy);
    box-shadow: 0 12px 25px rgba(16, 42, 76, .2);
  }

  body:not(.result-mode) .security-note {
    border-radius: 14px;
    background: var(--mobile-app-soft);
  }

  /* Authenticated full-screen application shell */
  body.result-mode {
    min-height: 100dvh;
    padding: 0 !important;
    background: var(--mobile-app-bg) !important;
    overflow-x: hidden;
  }

  body.result-mode .portal-shell {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--mobile-app-bg);
    box-shadow: none;
    overflow: visible;
    animation: none;
  }

  body.result-mode .form-panel {
    min-height: 100dvh;
    padding: 0 0 calc(var(--mobile-app-nav-height) + 22px + env(safe-area-inset-bottom));
    background: var(--mobile-app-bg);
  }

  body.result-mode #step-result {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  body.result-mode .result-brand,
  body.result-mode .result-header,
  body.result-mode .result-foot,
  body.result-mode .mobile-brand,
  body.result-mode .step-progress {
    display: none !important;
  }

  body.result-mode,
  body.result-mode .portal-shell,
  body.result-mode .form-panel,
  body.result-mode #step-result {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .dtc-mobile-app-bar {
    position: sticky;
    top: 0;
    z-index: 90;
    min-height: calc(var(--mobile-app-top-height) + env(safe-area-inset-top));
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: calc(11px + env(safe-area-inset-top)) 16px 11px;
    border-bottom: 1px solid rgba(223, 229, 237, .96);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(18px);
    animation: dtcMobileBarIn .38s ease both;
  }

  .dtc-mobile-app-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    text-align: left;
  }

  .dtc-mobile-wordmark {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--mobile-app-navy);
    color: #ffffff;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .04em;
    box-shadow: 0 8px 20px rgba(16, 42, 76, .18);
  }

  .dtc-mobile-app-copy {
    min-width: 0;
  }

  .dtc-mobile-app-copy strong,
  .dtc-mobile-app-copy span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .dtc-mobile-app-copy strong {
    color: var(--mobile-app-navy);
    font-size: .83rem;
  }

  .dtc-mobile-app-copy span {
    max-width: 180px;
    margin-top: 2px;
    color: var(--mobile-app-muted);
    font-size: .59rem;
    text-transform: uppercase;
    letter-spacing: .075em;
  }

  .dtc-mobile-app-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .dtc-mobile-action-button {
    position: relative;
    min-height: 39px;
    border: 1px solid var(--mobile-app-line);
    border-radius: 11px;
    background: #ffffff;
    color: var(--mobile-app-navy);
    padding: 0 11px;
    font-size: .65rem;
    font-weight: 850;
  }

  .dtc-mobile-action-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: var(--mobile-app-danger);
    color: #ffffff;
    padding: 0 4px;
    font-size: .53rem;
  }

  .dtc-mobile-home {
    padding: 19px 15px 10px;
    animation: dtcMobilePageIn .32s cubic-bezier(.22, .75, .25, 1) both;
  }

  .dtc-mobile-welcome {
    margin-bottom: 15px;
  }

  .dtc-mobile-welcome small,
  .dtc-mobile-welcome strong {
    display: block;
  }

  .dtc-mobile-welcome small {
    color: var(--mobile-app-muted);
    font-size: .7rem;
  }

  .dtc-mobile-welcome strong {
    margin-top: 4px;
    color: var(--mobile-app-navy);
    font-size: 1.35rem;
    letter-spacing: -.035em;
  }

  .dtc-mobile-balance-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border-radius: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--mobile-app-navy), var(--mobile-app-navy-2));
    box-shadow: 0 16px 34px rgba(16, 42, 76, .2);
    animation: dtcMobileCardIn .38s .04s ease both;
  }

  .dtc-mobile-balance-card::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -75px;
    top: -80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
  }

  .dtc-mobile-balance-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .dtc-mobile-balance-card small,
  .dtc-mobile-balance-card strong {
    display: block;
  }

  .dtc-mobile-balance-card small {
    color: rgba(255, 255, 255, .72);
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .075em;
  }

  .dtc-mobile-balance-card strong {
    margin-top: 6px;
    font-size: 1.85rem;
    letter-spacing: -.045em;
  }

  .dtc-mobile-balance-open {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 10px;
    background: rgba(255, 255, 255, .11);
    color: #ffffff;
    padding: 9px 11px;
    font-size: .62rem;
    font-weight: 850;
  }

  .dtc-mobile-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 13px;
  }

  .dtc-mobile-metric {
    padding: 13px 10px;
    border: 1px solid var(--mobile-app-line);
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 7px 19px rgba(16, 42, 76, .05);
    animation: dtcMobileCardIn .36s ease both;
  }

  .dtc-mobile-metric:nth-child(1) { animation-delay: .08s; }
  .dtc-mobile-metric:nth-child(2) { animation-delay: .12s; }
  .dtc-mobile-metric:nth-child(3) { animation-delay: .16s; }

  .dtc-mobile-metric strong,
  .dtc-mobile-metric span {
    display: block;
  }

  .dtc-mobile-metric strong {
    color: var(--mobile-app-navy);
    font-size: 1.12rem;
  }

  .dtc-mobile-metric span {
    margin-top: 4px;
    color: var(--mobile-app-muted);
    font-size: .58rem;
    line-height: 1.3;
  }

  .dtc-mobile-action-card {
    display: none;
    margin-top: 13px;
    padding: 16px;
    border: 1px solid #ead2a9;
    border-radius: 17px;
    background: var(--mobile-app-warning-soft);
    color: #654212;
    animation: dtcMobileAttention 1.9s ease-in-out infinite, dtcMobileCardIn .36s .18s ease both;
  }

  .dtc-mobile-action-card.visible {
    display: block;
  }

  .dtc-mobile-action-card small,
  .dtc-mobile-action-card strong,
  .dtc-mobile-action-card span {
    display: block;
  }

  .dtc-mobile-action-card small {
    color: var(--mobile-app-warning);
    font-size: .57rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
  }

  .dtc-mobile-action-card strong {
    margin-top: 7px;
    font-size: .79rem;
  }

  .dtc-mobile-action-card span {
    margin-top: 5px;
    color: #795620;
    font-size: .64rem;
    line-height: 1.5;
  }

  .dtc-mobile-action-card a {
    display: inline-flex;
    margin-top: 12px;
    border-radius: 10px;
    background: var(--mobile-app-warning);
    color: #ffffff;
    padding: 10px 13px;
    text-decoration: none;
    font-size: .63rem;
    font-weight: 850;
  }

  .dtc-mobile-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 21px 2px 10px;
  }

  .dtc-mobile-section-heading strong {
    color: var(--mobile-app-navy);
    font-size: .83rem;
  }

  .dtc-mobile-section-heading button {
    border: 0;
    background: transparent;
    color: var(--mobile-app-accent);
    padding: 3px 0;
    font-size: .62rem;
    font-weight: 850;
  }

  .dtc-mobile-status-list {
    overflow: hidden;
    border: 1px solid var(--mobile-app-line);
    border-radius: 17px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(16, 42, 76, .05);
    animation: dtcMobileCardIn .36s .21s ease both;
  }

  .dtc-mobile-status-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    border-bottom: 1px solid var(--mobile-app-line);
    background: transparent;
    color: inherit;
    padding: 15px;
    text-align: left;
  }

  .dtc-mobile-status-row:last-child {
    border-bottom: 0;
  }

  .dtc-mobile-status-copy strong,
  .dtc-mobile-status-copy span {
    display: block;
  }

  .dtc-mobile-status-copy strong {
    color: var(--mobile-app-ink);
    font-size: .72rem;
  }

  .dtc-mobile-status-copy span {
    margin-top: 3px;
    color: var(--mobile-app-muted);
    font-size: .58rem;
  }

  .dtc-mobile-status-count {
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--mobile-app-accent-soft);
    color: var(--mobile-app-navy);
    font-size: .68rem;
    font-weight: 900;
  }

  .dtc-mobile-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dtc-mobile-quick-button {
    min-height: 94px;
    border: 1px solid var(--mobile-app-line);
    border-radius: 16px;
    background: #ffffff;
    color: inherit;
    padding: 15px;
    text-align: left;
    box-shadow: 0 7px 20px rgba(16, 42, 76, .05);
    animation: dtcMobileCardIn .36s ease both;
  }

  .dtc-mobile-quick-button:nth-child(1) { animation-delay: .24s; }
  .dtc-mobile-quick-button:nth-child(2) { animation-delay: .28s; }
  .dtc-mobile-quick-button:nth-child(3) { animation-delay: .32s; }
  .dtc-mobile-quick-button:nth-child(4) { animation-delay: .36s; }

  .dtc-mobile-quick-button small,
  .dtc-mobile-quick-button strong,
  .dtc-mobile-quick-button span {
    display: block;
  }

  .dtc-mobile-quick-button small {
    color: var(--mobile-app-accent);
    font-size: .55rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
  }

  .dtc-mobile-quick-button strong {
    margin-top: 10px;
    color: var(--mobile-app-navy);
    font-size: .72rem;
  }

  .dtc-mobile-quick-button span {
    margin-top: 4px;
    color: var(--mobile-app-muted);
    font-size: .57rem;
    line-height: 1.4;
  }

  .dtc-mobile-page-enter {
    animation: dtcMobilePageIn .3s cubic-bezier(.22, .75, .25, 1) both !important;
  }

  .dtc-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    min-height: calc(var(--mobile-app-nav-height) + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: 2px;
    padding: 7px 7px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--mobile-app-line);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -12px 32px rgba(16, 42, 76, .08);
    backdrop-filter: blur(18px);
    animation: dtcMobileNavIn .42s .06s ease both;
  }

  .dtc-mobile-nav-button {
    position: relative;
    min-width: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--mobile-app-muted);
    padding: 10px 2px 8px;
    font-size: .58rem;
    font-weight: 850;
  }

  .dtc-mobile-nav-button::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 5px;
    width: 19px;
    height: 3px;
    border-radius: 999px;
    background: transparent;
    transform: translateX(-50%);
    transition: background .2s ease, width .2s ease;
  }

  .dtc-mobile-nav-button.active {
    background: var(--mobile-app-accent-soft);
    color: var(--mobile-app-navy);
  }

  .dtc-mobile-nav-button.active::before {
    width: 25px;
    background: var(--mobile-app-accent);
  }

  .dtc-mobile-nav-button:active,
  .dtc-mobile-action-button:active,
  .dtc-mobile-balance-open:active,
  .dtc-mobile-quick-button:active,
  .dtc-mobile-status-row:active,
  .portal-tab:active,
  .order-link:active,
  .portal-wallet-submit:active {
    transform: scale(.97);
  }

  /* Page visibility controlled by the mobile application router. */
  body[data-dtc-mobile-view="home"] .portal-tabs-shell,
  body[data-dtc-mobile-view="home"] #portal-pending-prompt,
  body[data-dtc-mobile-view="home"] #portal-wallet-section,
  body[data-dtc-mobile-view="home"] #portal-shop-section,
  body[data-dtc-mobile-view="home"] #portal-orders-panel,
  body[data-dtc-mobile-view="home"] #subscription-total {
    display: none !important;
  }

  body[data-dtc-mobile-view="orders"] .dtc-mobile-home,
  body[data-dtc-mobile-view="orders"] #portal-wallet-section,
  body[data-dtc-mobile-view="orders"] #portal-shop-section {
    display: none !important;
  }

  body[data-dtc-mobile-view="shop"] .dtc-mobile-home,
  body[data-dtc-mobile-view="shop"] .portal-tabs-shell,
  body[data-dtc-mobile-view="shop"] #portal-pending-prompt,
  body[data-dtc-mobile-view="shop"] #portal-wallet-section,
  body[data-dtc-mobile-view="shop"] #portal-orders-panel,
  body[data-dtc-mobile-view="shop"] #subscription-total {
    display: none !important;
  }

  body[data-dtc-mobile-view="wallet"] .dtc-mobile-home,
  body[data-dtc-mobile-view="wallet"] .portal-tabs-shell,
  body[data-dtc-mobile-view="wallet"] #portal-pending-prompt,
  body[data-dtc-mobile-view="wallet"] #portal-shop-section,
  body[data-dtc-mobile-view="wallet"] #portal-orders-panel,
  body[data-dtc-mobile-view="wallet"] #subscription-total {
    display: none !important;
  }

  /* Orders become a Material-style status screen. */
  body[data-dtc-mobile-view="orders"] .portal-tabs-shell {
    position: relative;
    top: auto;
    z-index: 70;
    margin: 0;
    padding: 11px 14px 9px;
    border: 0;
    border-bottom: 1px solid var(--mobile-app-line);
    border-radius: 0;
    background: rgba(241, 244, 248, .96);
    box-shadow: none;
    backdrop-filter: blur(15px);
  }

  body[data-dtc-mobile-view="orders"] .portal-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    overflow: visible;
    padding: 0;
  }

  body[data-dtc-mobile-view="orders"] .portal-tab[data-tab="wallet"],
  body[data-dtc-mobile-view="orders"] .portal-tab[data-tab="shop"] {
    display: none !important;
  }

  body[data-dtc-mobile-view="orders"] .portal-tab {
    min-width: 0;
    min-height: 43px;
    border: 1px solid var(--mobile-app-line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--mobile-app-muted);
    padding: 8px 5px;
    font-size: .62rem;
    box-shadow: 0 4px 12px rgba(16, 42, 76, .035);
  }

  body[data-dtc-mobile-view="orders"] .portal-tab.active {
    border-color: var(--mobile-app-navy);
    background: var(--mobile-app-navy);
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(16, 42, 76, .16);
  }

  body[data-dtc-mobile-view="orders"] .portal-tab-count {
    min-width: 20px;
    height: 20px;
    background: var(--mobile-app-soft);
    color: var(--mobile-app-navy);
    font-size: .56rem;
  }

  body[data-dtc-mobile-view="orders"] .portal-tab.active .portal-tab-count {
    background: rgba(255, 255, 255, .16);
    color: #ffffff;
  }

  body[data-dtc-mobile-view="orders"] .portal-tab-note {
    padding: 9px 3px 0;
    color: var(--mobile-app-muted);
    font-size: .59rem;
    line-height: 1.45;
  }

  body[data-dtc-mobile-view="orders"] #portal-pending-prompt {
    margin: 13px 14px 0;
  }

  body[data-dtc-mobile-view="orders"] #portal-orders-panel {
    position: relative;
    z-index: 1;
    padding-top: 24px !important;
    scroll-margin-top: calc(var(--mobile-app-top-height) + 132px + env(safe-area-inset-top));
  }

  body[data-dtc-mobile-view="orders"] .portal-tabs-shell + #portal-pending-prompt[hidden] + #portal-wallet-section + #portal-shop-section + #portal-orders-panel,
  body[data-dtc-mobile-view="orders"] .portal-tabs-shell ~ #portal-orders-panel {
    margin-top: 0 !important;
  }

  #portal-orders-panel,
  #portal-wallet-section,
  #portal-shop-section {
    margin: 0;
    padding: 14px;
  }

  #portal-orders-panel.dtc-mobile-page-enter,
  #portal-wallet-section.dtc-mobile-page-enter,
  #portal-shop-section.dtc-mobile-page-enter {
    display: block;
  }

  .subs-grid,
  .portal-section-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .portal-section {
    margin-top: 0;
  }

  .portal-section + .portal-section {
    margin-top: 18px;
  }

  .portal-section-title {
    margin: 0 2px 9px;
    color: var(--mobile-app-muted);
    font-size: .6rem;
    letter-spacing: .08em;
  }

  .sub-card {
    padding: 17px !important;
    border: 1px solid var(--mobile-app-line) !important;
    border-radius: 17px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 23px rgba(16, 42, 76, .055) !important;
    animation: dtcMobileCardIn .34s ease both !important;
  }

  .sub-card::after {
    display: none !important;
  }

  .sub-card:hover {
    transform: none !important;
  }

  .sub-top {
    align-items: flex-start;
    gap: 10px;
  }

  .sub-name {
    color: var(--mobile-app-navy);
    font-size: .79rem;
  }

  .sub-pkg {
    margin-top: 5px;
    color: var(--mobile-app-muted);
    font-size: .61rem;
    line-height: 1.4;
  }

  .status {
    flex: 0 0 auto;
    max-width: 42%;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: .56rem;
    white-space: normal;
    text-align: center;
  }

  .status::after {
    display: none !important;
  }

  .meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px !important;
    margin-top: 15px;
  }

  .meta-item {
    min-width: 0;
    padding: 11px;
    border: 0;
    border-radius: 12px;
    background: var(--mobile-app-soft);
  }

  .meta .k {
    margin-bottom: 4px;
    color: var(--mobile-app-muted);
    font-size: .53rem;
  }

  .meta .v {
    color: var(--mobile-app-ink);
    font-size: .64rem;
    line-height: 1.35;
  }

  .portal-action-alert,
  .admin-update {
    border-radius: 12px;
    font-size: .61rem;
  }

  .portal-card-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-top: 14px;
  }

  .portal-card-actions .order-link {
    width: 100%;
    min-height: 43px;
    margin: 0 !important;
    border-radius: 11px;
    font-size: .62rem;
  }

  .total {
    margin: 0 14px 15px;
    border-radius: 13px;
    background: #ffffff;
    text-align: center;
    font-size: .65rem;
  }

  .portal-tab-empty,
  .empty-state {
    border-radius: 17px;
    padding: 31px 18px;
    background: #ffffff;
    font-size: .65rem;
  }

  /* Wallet app screen */
  .portal-wallet-section {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .portal-wallet-hero {
    display: block !important;
    margin: 0 0 13px !important;
    padding: 20px !important;
    border: 0 !important;
    border-radius: 19px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--mobile-app-navy), var(--mobile-app-navy-2)) !important;
    box-shadow: 0 15px 32px rgba(16, 42, 76, .18) !important;
  }

  .portal-wallet-hero h2 {
    color: #ffffff !important;
    font-size: 1.05rem !important;
  }

  .portal-wallet-hero p {
    color: rgba(255, 255, 255, .72) !important;
    font-size: .63rem !important;
    line-height: 1.5 !important;
  }

  .portal-wallet-balances {
    margin-top: 16px !important;
  }

  .portal-wallet-balance {
    border-color: rgba(255, 255, 255, .16) !important;
    background: rgba(255, 255, 255, .1) !important;
  }

  .portal-wallet-balance span,
  .portal-wallet-balance strong {
    color: #ffffff !important;
  }

  .portal-wallet-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .portal-wallet-card {
    padding: 17px !important;
    border: 1px solid var(--mobile-app-line) !important;
    border-radius: 17px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 23px rgba(16, 42, 76, .055) !important;
  }

  .portal-wallet-card h3 {
    color: var(--mobile-app-navy) !important;
    font-size: .82rem !important;
  }

  .portal-wallet-field span {
    color: var(--mobile-app-muted) !important;
    font-size: .59rem !important;
  }

  .portal-wallet-field input,
  .portal-wallet-field select,
  .portal-wallet-field textarea {
    min-height: 47px !important;
    border-radius: 11px !important;
    background: var(--mobile-app-soft) !important;
    font-size: .68rem !important;
  }

  .portal-wallet-submit {
    min-height: 47px !important;
    border-radius: 11px !important;
    background: var(--mobile-app-navy) !important;
    font-size: .66rem !important;
  }

  /* Shop app screen */
  .portal-shop-section {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .portal-shop-header {
    display: block !important;
    margin: 0 0 12px !important;
    padding: 18px !important;
    border: 1px solid var(--mobile-app-line) !important;
    border-radius: 17px !important;
    background: #ffffff !important;
  }

  .portal-shop-title-icon {
    display: none !important;
  }

  .portal-shop-title strong {
    color: var(--mobile-app-navy) !important;
    font-size: .84rem !important;
  }

  .portal-shop-title span {
    margin-top: 5px !important;
    color: var(--mobile-app-muted) !important;
    font-size: .61rem !important;
    line-height: 1.5 !important;
  }

  .portal-shop-profile {
    margin-top: 13px !important;
    padding: 10px 11px !important;
    border-radius: 12px !important;
    background: var(--mobile-app-soft) !important;
  }

  .portal-shop-avatar {
    display: none !important;
  }

  .portal-shop-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    margin: 0 0 13px !important;
    padding: 0 !important;
  }

  .portal-shop-search,
  .portal-shop-filter {
    width: 100% !important;
    min-height: 47px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    font-size: .68rem !important;
  }

  .portal-shop-grid {
    grid-template-columns: repeat(var(--portal-shop-mobile-cols, 2), minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 0 !important;
  }

  .portal-shop-card {
    border-radius: 16px !important;
    box-shadow: 0 8px 22px rgba(16, 42, 76, .055) !important;
    animation: dtcMobileCardIn .34s ease both !important;
  }

  .portal-shop-card:hover {
    transform: none !important;
  }

  .portal-shop-cover {
    height: clamp(72px, var(--portal-shop-mobile-image-height, 104px), 150px) !important;
    display: grid !important;
    place-items: center !important;
    padding: 8px !important;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(26, 77, 140, .08) !important;
  }

  .portal-shop-cover.has-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 10px !important;
  }

  .portal-shop-cover.no-image .portal-shop-fallback {
    display: grid !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 13px !important;
  }

  .portal-shop-cover.has-image .portal-shop-fallback,
  .portal-shop-upload-icon,
  .portal-shop-badge {
    display: none !important;
  }

  .portal-shop-cover::after {
    content: none !important;
    display: none !important;
  }

  .portal-shop-mobile-product-mark {
    display: grid !important;
    width: 100%;
    height: 100%;
    place-items: center;
  }

  .portal-shop-card-body {
    padding: 13px !important;
  }

  .portal-shop-card h3 {
    color: var(--mobile-app-navy) !important;
    font-size: .7rem !important;
  }

  .portal-shop-description,
  .portal-shop-category {
    font-size: .55rem !important;
  }

  .portal-shop-product-icon {
    width: 72px !important;
    height: 72px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1px solid rgba(26, 77, 140, .12) !important;
    color: var(--mobile-app-navy) !important;
    font-size: .62rem !important;
    padding: 6px !important;
  }

  .portal-shop-product-icon.has-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .portal-shop-product-icon.has-image .portal-shop-mobile-product-mark {
    display: none !important;
  }

  .portal-shop-product-icon.no-image {
    background: var(--mobile-app-soft) !important;
  }

  /* Account and checkout become Android-style full-height sheets. */
  .portal-account-overlay,
  .portal-shop-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
    background: rgba(7, 20, 39, .48) !important;
  }

  .portal-account-modal,
  .portal-shop-modal {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100dvh - env(safe-area-inset-top)) !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 22px 22px 0 0 !important;
    box-shadow: 0 -22px 60px rgba(7, 20, 39, .24) !important;
    animation: dtcMobileSheetIn .3s cubic-bezier(.22, .75, .25, 1) both !important;
  }

  .portal-account-modal-head,
  .portal-shop-modal-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 3 !important;
    padding: 18px 17px !important;
    background: #ffffff !important;
  }

  .portal-account-modal-body {
    grid-template-columns: 1fr !important;
    padding: 17px 17px calc(24px + env(safe-area-inset-bottom)) !important;
  }

  .portal-account-save-row {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .portal-account-save-row button {
    min-height: 47px !important;
    background: var(--mobile-app-navy) !important;
  }

  .portal-shop-modal {
    min-height: 62dvh !important;
  }

  #portal-shop-modal-body {
    padding-bottom: calc(22px + env(safe-area-inset-bottom)) !important;
  }

  .portal-order-overlay {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
  }

  .portal-order-modal {
    width: 100% !important;
    height: 100dvh !important;
    max-height: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .portal-order-modal-head {
    min-height: calc(67px + env(safe-area-inset-top)) !important;
    padding: calc(12px + env(safe-area-inset-top)) 16px 12px !important;
    color: #ffffff !important;
    background: linear-gradient(115deg, var(--mobile-app-navy), #4864e9 58%, #7657f6) !important;
    border-bottom: 0 !important;
  }

  .portal-order-modal-head strong,
  .portal-order-modal-head span {
    color: #ffffff !important;
  }

  .portal-order-modal-head span { opacity: .76; }

  .portal-order-modal-head button {
    border-color: rgba(255,255,255,.28) !important;
    background: rgba(255,255,255,.12) !important;
    color: #ffffff !important;
  }

  .portal-order-modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 16px 14px calc(var(--mobile-app-nav-height) + 20px + env(safe-area-inset-bottom)) !important;
    background: var(--mobile-app-bg) !important;
  }

  .portal-order-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .portal-order-detail-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 17px -2px -2px;
    padding: 10px 0 max(4px, env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--mobile-app-bg) 76%, rgba(245,247,255,0));
  }

  /* Customer support works as a full-screen in-app conversation. */
  .portal-chat-launcher {
    display: none !important;
  }

  .portal-chat-section {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    overflow: hidden !important;
    z-index: 1200 !important;
  }

  body.dtc-mobile-chat-open {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    touch-action: none;
  }

  .portal-chat-section.open,
  .portal-chat-section.visible {
    display: flex !important;
    flex-direction: column !important;
    animation: dtcMobilePageIn .28s ease both !important;
  }

  .portal-chat-header {
    min-height: calc(67px + env(safe-area-inset-top)) !important;
    padding: calc(12px + env(safe-area-inset-top)) 15px 12px !important;
    color: #ffffff !important;
    background: linear-gradient(115deg, var(--mobile-app-navy), #4864e9 58%, #7657f6) !important;
    border-bottom: 0 !important;
    flex: 0 0 auto !important;
  }

  .portal-chat-heading strong,
  .portal-chat-heading span {
    color: #ffffff !important;
  }

  .portal-chat-heading span {
    opacity: .78;
  }

  .portal-chat-window-actions button {
    border-color: rgba(255,255,255,.28) !important;
    background: rgba(255,255,255,.12) !important;
    color: #ffffff !important;
  }

  .portal-chat-heading-icon {
    display: none !important;
  }

  .portal-chat-layout {
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
  }

  .portal-chat-sidebar {
    display: none !important;
  }

  .portal-chat-main {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
  }

  .portal-chat-context {
    flex: 0 0 auto !important;
  }

  .portal-chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch;
    padding: 16px 13px 20px !important;
  }

  .portal-chat-compose {
    position: relative !important;
    bottom: auto !important;
    z-index: 4 !important;
    flex: 0 0 auto !important;
    padding: 10px 11px max(12px, env(safe-area-inset-bottom)) !important;
    border-top: 1px solid var(--mobile-app-line) !important;
    background: #ffffff !important;
    box-shadow: 0 -10px 24px rgba(49,87,229,.08) !important;
  }

  .portal-chat-input {
    min-height: 44px !important;
    max-height: 112px !important;
    font-size: .78rem !important;
  }

  .portal-chat-attach,
  .portal-chat-send {
    min-height: 44px !important;
    height: 44px !important;
  }

  /* Prevent old floating headers and icons from duplicating the mobile app bar. */
  .portal-wallet-header-badge,
  .portal-account-button,
  .live-sync {
    display: none !important;
  }

  .portal-pending-prompt-icon,
  .portal-menu-icon,
  .result-foot svg,
  .portal-shop-title svg,
  .portal-chat-launcher-icon {
    display: none !important;
  }

  /* Visible pending prompt remains corporate and compact inside Orders. */
  .portal-pending-prompt {
    padding: 14px !important;
    border-radius: 15px !important;
    animation: dtcMobileAttention 1.9s ease-in-out infinite !important;
  }

  .portal-pending-prompt-copy {
    display: block !important;
  }

  .portal-pending-prompt a {
    width: 100%;
    margin-top: 11px;
    text-align: center;
  }

  #portal-boot-screen {
    background: var(--mobile-app-bg) !important;
  }

  #portal-boot-screen .boot-card {
    border-radius: 14px !important;
    color: var(--mobile-app-navy) !important;
  }

  #portal-boot-screen .boot-spinner {
    border-top-color: var(--mobile-app-navy) !important;
  }
}

@media (max-width: 390px) {
  .dtc-mobile-app-copy span { max-width: 126px; }
  .dtc-mobile-action-button { padding: 0 9px; }
  .portal-shop-grid { grid-template-columns: repeat(var(--portal-shop-mobile-cols, 2), minmax(0, 1fr)) !important; }
  .dtc-mobile-metric { padding: 11px 8px; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .dtc-mobile-app-bar,
  .dtc-mobile-bottom-nav,
  .dtc-mobile-home,
  .dtc-mobile-balance-card,
  .dtc-mobile-metric,
  .dtc-mobile-action-card,
  .dtc-mobile-status-list,
  .dtc-mobile-quick-button,
  .dtc-mobile-page-enter,
  .sub-card,
  .portal-shop-card,
  .portal-account-modal,
  .portal-shop-modal,
  .portal-chat-section {
    animation: none !important;
    transition: none !important;
  }
}

/* 2026-07-23 — Fixed mobile header and screenshot-matched footer navigation. */
@media (max-width: 760px) {
  :root {
    --mobile-app-top-height: 74px;
    --mobile-app-nav-height: 72px;
  }

  body.result-mode #step-result {
    padding-top: calc(var(--mobile-app-top-height) + env(safe-area-inset-top));
    animation: none !important;
    transform: none !important;
  }

  .dtc-mobile-app-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 110;
    min-height: calc(var(--mobile-app-top-height) + env(safe-area-inset-top));
    align-items: center;
    padding: calc(9px + env(safe-area-inset-top)) 12px 9px;
    background: rgba(255, 255, 255, .985);
    box-shadow: 0 7px 22px rgba(16, 42, 76, .08);
  }

  .dtc-mobile-app-identity {
    flex: 1 1 auto;
    gap: 9px;
    min-width: 0;
  }

  .dtc-mobile-wordmark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: .71rem;
  }

  .dtc-mobile-app-copy strong {
    font-size: .78rem;
  }

  .dtc-mobile-app-copy span {
    max-width: 132px;
    font-size: .52rem;
  }

  .dtc-mobile-app-actions {
    position: relative;
    flex: 0 0 auto;
    gap: 7px;
  }

  .dtc-mobile-fixed-wallet {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #d8e2ef;
    border-radius: 12px;
    background: linear-gradient(135deg, #f7faff, #edf4fc);
    color: var(--mobile-app-navy);
    padding: 5px 8px;
    box-shadow: 0 6px 16px rgba(16, 42, 76, .06);
  }

  .dtc-mobile-fixed-wallet svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--mobile-app-accent);
  }

  .dtc-mobile-fixed-wallet span,
  .dtc-mobile-fixed-wallet small,
  .dtc-mobile-fixed-wallet strong {
    display: block;
    min-width: 0;
    text-align: left;
  }

  .dtc-mobile-fixed-wallet small {
    color: #78879a;
    font-size: .48rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
  }

  .dtc-mobile-fixed-wallet strong {
    max-width: 74px;
    margin-top: 2px;
    overflow: hidden;
    color: #173b65;
    font-size: .57rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .dtc-mobile-profile {
    position: relative;
  }

  .dtc-mobile-profile-button {
    min-width: 43px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 1px solid #d8e2ef;
    border-radius: 12px;
    background: #ffffff;
    color: var(--mobile-app-navy);
    padding: 3px 5px;
    box-shadow: 0 6px 16px rgba(16, 42, 76, .06);
  }

  .dtc-mobile-profile-button > svg {
    width: 13px;
    height: 13px;
    color: #718096;
    transition: transform .18s ease;
  }

  .dtc-mobile-profile-button[aria-expanded="true"] > svg {
    transform: rotate(180deg);
  }

  .dtc-mobile-profile-avatar {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--mobile-app-navy);
    color: #ffffff;
    font-size: .59rem;
    font-weight: 900;
    letter-spacing: .03em;
  }

  .dtc-mobile-profile-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    width: min(278px, calc(100vw - 24px));
    display: none;
    overflow: hidden;
    border: 1px solid var(--mobile-app-line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(7, 20, 39, .2);
    animation: dtcMobileSheetIn .2s ease both;
  }

  .dtc-mobile-profile-menu.open {
    display: block;
  }

  .dtc-mobile-profile-identity {
    padding: 15px 16px 13px;
    border-bottom: 1px solid var(--mobile-app-line);
    background: #f7f9fc;
  }

  .dtc-mobile-profile-identity small,
  .dtc-mobile-profile-identity strong {
    display: block;
  }

  .dtc-mobile-profile-identity small {
    color: var(--mobile-app-muted);
    font-size: .55rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .07em;
  }

  .dtc-mobile-profile-identity strong {
    margin-top: 5px;
    overflow-wrap: anywhere;
    color: var(--mobile-app-navy);
    font-size: .7rem;
  }

  .dtc-mobile-profile-menu > button {
    width: 100%;
    display: block;
    border: 0;
    border-bottom: 1px solid var(--mobile-app-line);
    background: #ffffff;
    color: var(--mobile-app-ink);
    padding: 13px 16px;
    text-align: left;
  }

  .dtc-mobile-profile-menu > button:last-child {
    border-bottom: 0;
  }

  .dtc-mobile-profile-menu > button span,
  .dtc-mobile-profile-menu > button small {
    display: block;
  }

  .dtc-mobile-profile-menu > button span {
    font-size: .68rem;
    font-weight: 850;
  }

  .dtc-mobile-profile-menu > button small {
    margin-top: 3px;
    color: var(--mobile-app-muted);
    font-size: .56rem;
  }

  .dtc-mobile-profile-menu > button.danger span {
    color: var(--mobile-app-danger);
  }

  .dtc-mobile-bottom-nav {
    min-height: calc(var(--mobile-app-nav-height) + env(safe-area-inset-bottom));
    gap: 0;
    padding: 5px 4px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid #dfe5ed;
    background: rgba(255, 255, 255, .99);
    box-shadow: 0 -8px 24px rgba(16, 42, 76, .08);
  }

  .dtc-mobile-nav-button {
    min-height: 61px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 0;
    color: #828b99;
    padding: 5px 2px 3px;
    font-size: .56rem;
    font-weight: 760;
    line-height: 1.1;
    transition: color .18s ease, transform .14s ease;
  }

  .dtc-mobile-nav-button::before {
    display: none;
  }

  .dtc-mobile-nav-button.active {
    background: transparent;
    color: #3157c8;
  }

  .dtc-mobile-nav-icon {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    color: currentColor;
  }

  .dtc-mobile-nav-icon svg {
    width: 25px;
    height: 25px;
  }

  .dtc-mobile-nav-button:active,
  .dtc-mobile-fixed-wallet:active,
  .dtc-mobile-profile-button:active {
    transform: scale(.95);
  }

  body.dtc-mobile-profile-open::after {
    content: "";
    display: block !important;
    position: fixed;
    inset: calc(var(--mobile-app-top-height) + env(safe-area-inset-top)) 0 0;
    z-index: 105;
    background: rgba(7, 20, 39, .12);
    pointer-events: none;
  }

  body[data-dtc-mobile-view="orders"] .portal-tabs-shell {
    position: relative !important;
    top: auto !important;
  }
}


@media (max-width: 760px) {
  /* Pending orders are the only status that blinks. Active orders stay stable. */
  body[data-dtc-mobile-view="orders"] .portal-tab.has-action,
  body[data-dtc-mobile-view="orders"] .portal-tab.active.has-action {
    border-color: #dc3545 !important;
    background: #fff0f1 !important;
    color: #b42332 !important;
    animation: dtcMobilePendingRed 1s steps(2, end) infinite !important;
  }

  body[data-dtc-mobile-view="orders"] .portal-tab.has-action .portal-tab-count,
  body[data-dtc-mobile-view="orders"] .portal-tab.active.has-action .portal-tab-count {
    background: #dc3545 !important;
    color: #ffffff !important;
  }

  @keyframes dtcMobilePendingRed {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, .04); }
    50% { box-shadow: 0 0 0 4px rgba(220, 53, 69, .18); }
  }

  /* Keep the first processing order clear of the fixed app header and status filters. */
  body[data-dtc-mobile-view="orders"] #portal-orders-panel {
    position: relative;
    z-index: 1;
    display: block !important;
    padding-top: 18px !important;
    scroll-margin-top: calc(var(--mobile-app-top-height) + 116px + env(safe-area-inset-top));
  }

  body[data-dtc-mobile-view="orders"] #subs {
    position: relative;
    z-index: 1;
  }

  body[data-dtc-mobile-view="orders"] .portal-tabs-shell {
    min-height: 92px;
  }

}

@media (max-width: 370px) {
  .dtc-mobile-app-copy span { display: none; }
  .dtc-mobile-fixed-wallet strong { max-width: 59px; }
  .dtc-mobile-fixed-wallet { padding-left: 7px; padding-right: 7px; }
}

/* 2026-08-14 — Keep subscription notification bell visible in the generated mobile app header. */
@media (max-width: 760px) {
  .dtc-mobile-app-actions .portal-notification-center {
    position: relative;
    z-index: 135;
    flex: 0 0 auto;
    display: block !important;
  }

  .dtc-mobile-app-actions .portal-notification-button {
    width: 42px;
    height: 42px;
    border-color: #d8e2ef;
    border-radius: 12px;
    background: #ffffff;
    color: var(--mobile-app-navy);
    box-shadow: 0 6px 16px rgba(16, 42, 76, .06);
  }

  .dtc-mobile-app-actions .portal-notification-button:hover,
  .dtc-mobile-app-actions .portal-notification-button[aria-expanded="true"] {
    border-color: #c5d3e6;
    background: #f7faff;
    transform: none;
  }

  .dtc-mobile-app-actions .portal-notification-panel {
    position: fixed;
    top: calc(var(--mobile-app-top-height) + env(safe-area-inset-top) + 8px);
    right: 12px;
    left: 12px;
    z-index: 145;
    width: auto;
    max-height: calc(100dvh - var(--mobile-app-top-height) - env(safe-area-inset-top) - 28px);
  }
}

/* Three compact header actions need a little more room on narrow phones. */
@media (max-width: 430px) {
  .dtc-mobile-app-actions { gap: 5px; }
  .dtc-mobile-fixed-wallet {
    width: 42px;
    min-width: 42px;
    justify-content: center;
    padding: 0;
  }
  .dtc-mobile-fixed-wallet > span { display: none !important; }
  .dtc-mobile-app-copy span { display: none; }
}
