.mobile-header,
.mobile-bottom-nav,
.mobile-all-functions-layer,
.mobile-card-action,
.mobile-ranking-toggle,
.pwa-install-banner,
.pwa-guide-layer,
.mobile-theme-preference-card,
.payment-relay-host-close {
  display: none;
}

@media (max-width: 780px) {
  :root {
    --mobile-header-height: 58px;
    --mobile-nav-height: 64px;
  }

  html {
    overflow-x: hidden;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
  }

  body.mobile-menu-open,
  body.pwa-guide-open,
  body.mobile-detail-open {
    overflow: hidden;
  }

  .sidebar,
  .topbar {
    display: none;
  }

  .shell {
    width: 100%;
    margin-left: 0;
    padding: calc(var(--mobile-header-height) + env(safe-area-inset-top) + 14px) 12px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 18px);
  }

  .mobile-header {
    position: fixed;
    z-index: 95;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: calc(var(--mobile-header-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 4px 18px rgba(27, 42, 69, .06);
    backdrop-filter: blur(14px);
  }

  .mobile-header-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
  }

  .mobile-brand-mark {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: #eaf2ff;
    color: var(--blue);
  }

  .mobile-brand-mark svg {
    width: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 5;
  }

  .mobile-view-title {
    overflow: hidden;
    color: var(--text);
    font-size: 17px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-all-functions-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid #ccd9ed;
    border-radius: 10px;
    background: #f7faff;
    color: #244468;
    font-weight: 800;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 96;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    padding: 5px 4px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 26px rgba(27, 42, 69, .08);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-item {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 52px;
    padding: 3px 1px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #6a788d;
    font-size: 11px;
    font-weight: 800;
  }

  .mobile-bottom-item > span {
    font-size: 19px;
    line-height: 1;
  }

  .mobile-bottom-item.active {
    background: #eaf2ff;
    color: var(--blue);
  }

  .mobile-message-item.has-message::after {
    content: "";
    position: absolute;
    top: 7px;
    left: calc(50% + 9px);
    width: 7px;
    height: 7px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ef4444;
  }

  .mobile-all-functions-layer {
    position: fixed;
    z-index: 140;
    inset: 0;
    display: block;
    visibility: hidden;
    pointer-events: none;
  }

  .mobile-all-functions-layer.open {
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-all-functions-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(15, 23, 42, .44);
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .mobile-all-functions-layer.open .mobile-all-functions-backdrop {
    opacity: 1;
  }

  .mobile-all-functions-drawer {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(88vw, 380px);
    height: 100dvh;
    padding-top: env(safe-area-inset-top);
    border-left: 1px solid var(--line);
    background: #fff;
    box-shadow: -20px 0 50px rgba(15, 23, 42, .16);
    transform: translateX(100%);
    transition: transform 230ms cubic-bezier(.2, .8, .2, 1);
  }

  .mobile-all-functions-layer.open .mobile-all-functions-drawer {
    transform: translateX(0);
  }

  .mobile-all-functions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-all-functions-head p,
  .mobile-all-functions-head h2 {
    margin: 0;
  }

  .mobile-all-functions-head p {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
  }

  .mobile-all-functions-head h2 {
    font-size: 21px;
  }

  .mobile-all-functions-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f9fc;
    color: var(--text);
    font-size: 26px;
    line-height: 1;
  }

  .mobile-all-functions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
    overflow-y: auto;
    padding: 16px;
  }

  .mobile-all-functions-grid button,
  .mobile-all-functions-actions button {
    min-height: 46px;
    border: 1px solid #dce4f0;
    border-radius: 11px;
    background: #f8fafc;
    color: #263a54;
    font-weight: 800;
    text-align: left;
  }

  .mobile-all-functions-grid button {
    padding: 10px 12px;
  }

  .mobile-all-functions-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
  }

  .mobile-all-functions-actions button {
    padding: 9px 10px;
    text-align: center;
  }

  .mobile-all-functions-actions .pwa-install-action {
    grid-column: 1 / -1;
  }

  .pwa-install-banner[hidden],
  .pwa-guide-layer[hidden] {
    display: none;
  }

  .pwa-install-banner {
    position: fixed;
    z-index: 94;
    left: 50%;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 10px);
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px 12px;
    width: min(calc(100% - 24px), 520px);
    padding: 13px;
    border: 1px solid #bdd1ef;
    border-radius: 15px;
    background: rgba(250, 252, 255, .98);
    box-shadow: 0 18px 48px rgba(23, 54, 99, .2);
    transform: translateX(-50%);
    backdrop-filter: blur(14px);
  }

  .pwa-install-banner > img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .pwa-install-banner-copy {
    display: grid;
    align-content: center;
    gap: 3px;
    min-width: 0;
  }

  .pwa-install-banner-copy strong {
    color: var(--text);
    font-size: 15px;
  }

  .pwa-install-banner-copy span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
  }

  .pwa-install-banner-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .pwa-install-banner-actions button {
    min-height: 39px;
  }

  body.pwa-banner-visible .utility-tools-launcher {
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 142px);
  }

  .pwa-guide-layer {
    position: fixed;
    z-index: 160;
    inset: 0;
    display: block;
    visibility: hidden;
    pointer-events: none;
  }

  .pwa-guide-layer.open {
    visibility: visible;
    pointer-events: auto;
  }

  .pwa-guide-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(15, 23, 42, .48);
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .pwa-guide-layer.open .pwa-guide-backdrop {
    opacity: 1;
  }

  .pwa-guide-sheet {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: min(100%, 520px);
    max-height: 88dvh;
    overflow-y: auto;
    padding: 0 16px calc(18px + env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: #fff;
    box-shadow: 0 -24px 64px rgba(15, 23, 42, .2);
    transform: translate(-50%, 100%);
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
  }

  .pwa-guide-layer.open .pwa-guide-sheet {
    transform: translate(-50%, 0);
  }

  .pwa-guide-head {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 0 13px;
    border-bottom: 1px solid var(--line);
    background: inherit;
  }

  .pwa-guide-head p,
  .pwa-guide-head h2 {
    margin: 0;
  }

  .pwa-guide-head p {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
  }

  .pwa-guide-head h2 {
    font-size: 21px;
  }

  .pwa-guide-close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f9fc;
    color: var(--text);
    font-size: 26px;
    line-height: 1;
  }

  .pwa-guide-intro {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 13px;
    padding: 18px 0 15px;
  }

  .pwa-guide-intro img {
    width: 64px;
    height: 64px;
    border-radius: 15px;
  }

  .pwa-guide-intro > div {
    display: grid;
    align-content: center;
    gap: 5px;
  }

  .pwa-guide-intro strong {
    font-size: 17px;
  }

  .pwa-guide-intro span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
  }

  .pwa-guide-steps {
    counter-reset: pwa-step;
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .pwa-guide-steps li {
    counter-increment: pwa-step;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 11px;
    border-radius: 11px;
    background: #f3f7fd;
    color: #2d405b;
    font-size: 14px;
    line-height: 1.45;
  }

  .pwa-guide-steps li::before {
    content: counter(pwa-step);
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #dceaff;
    color: #2457a7;
    font-weight: 900;
  }

  .pwa-guide-steps li.has-icon::before {
    display: none;
  }

  .pwa-guide-step-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #bed2f1;
    border-radius: 9px;
    background: #e7f0ff;
    color: #1769d2;
  }

  .pwa-guide-step-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
  }

  .pwa-guide-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding-top: 16px;
  }

  .pwa-guide-actions button {
    min-height: 44px;
  }

  #pwaGuideInstallButton[hidden] + #pwaGuideLaterButton {
    grid-column: 1 / -1;
  }

  .profile-head {
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 13px;
  }

  body.mobile-profile-inbox .profile-head,
  body.mobile-profile-follows .profile-head {
    display: none;
  }

  .profile-avatar {
    width: 54px;
    height: 54px;
    font-size: 20px;
  }

  .profile-head h2 {
    font-size: 21px;
  }

  .profile-status {
    margin-left: 0;
    padding: 5px 9px;
    font-size: 11px;
  }

  .profile-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .profile-menu {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .profile-menu::-webkit-scrollbar {
    display: none;
  }

  .profile-menu-item {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 13px;
    white-space: nowrap;
  }

  .profile-card {
    min-height: 0;
    padding: 16px;
    border-radius: 13px;
  }

  .market-section,
  .market-section > *,
  .market-section-head > div,
  .sentiment-overview,
  .sentiment-score-card,
  .sentiment-kpi-grid,
  .sentiment-panel-card,
  .hot-ranking-layout,
  .hot-ranking-card,
  .risk-layout,
  .risk-stack {
    min-width: 0;
    max-width: 100%;
  }

  .market-section-head {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
  }

  .market-section-head h2 {
    max-width: 100%;
    font-size: clamp(21px, 6.2vw, 25px);
    line-height: 1.28;
    word-break: keep-all;
    overflow-wrap: normal;
    text-wrap: balance;
  }

  .market-section-description {
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .market-section-head .date-query {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    white-space: normal;
  }

  .market-section-head .date-query label {
    flex: 1 1 210px;
    min-width: 0;
  }

  .market-section-head .date-query input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  .sentiment-overview,
  .sentiment-two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .sentiment-score-card {
    padding: 20px 16px;
  }

  .sentiment-score-copy {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sentiment-score-copy strong {
    font-size: clamp(42px, 14vw, 58px);
  }

  .sentiment-meter,
  .sentiment-scale {
    width: 100%;
    max-width: 100%;
  }

  .sentiment-kpi-grid article > strong {
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  #hotRankingPanel .hot-ranking-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  #hotRankingPanel .hot-ranking-row[data-mobile-ranking-overflow="true"] {
    display: none;
  }

  #hotRankingPanel .hot-ranking-card.mobile-ranking-expanded .hot-ranking-row[data-mobile-ranking-overflow="true"] {
    display: grid;
  }

  #hotRankingPanel .mobile-ranking-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    margin-top: 12px;
    border: 1px solid #bfd2ee;
    border-radius: 9px;
    background: #f4f8fe;
    color: #2457a7;
    font-weight: 900;
  }

  #hotRankingPanel .mobile-ranking-toggle i {
    font-style: normal;
  }

  #dragonTigerPanel .dragon-filter-toolbar {
    gap: 8px;
  }

  #dragonTigerPanel .dragon-filter-toolbar .searchbox,
  #dragonTigerPanel .dragon-mapped-follow-list {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
  }

  #dragonTigerPanel .dragon-filter-toolbar .searchbox {
    min-height: 44px;
  }

  #dragonTigerPanel .dragon-mapped-follow-list {
    gap: 6px;
    padding-top: 0;
  }

  #riskWarningPanel .risk-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  #riskWarningPanel .risk-nav-card {
    position: static;
    order: -1;
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-height: none;
    overflow-x: auto;
    padding: 10px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  #riskWarningPanel .risk-nav-card::-webkit-scrollbar {
    display: none;
  }

  #riskWarningPanel .risk-nav-head {
    flex: 0 0 82px;
    align-content: center;
    display: grid;
    padding: 5px 8px;
    border: 0;
    border-right: 1px solid #e1e9f4;
  }

  #riskWarningPanel .risk-nav-head small {
    margin-top: 3px;
  }

  #riskWarningPanel .risk-nav-card button {
    flex: 0 0 176px;
    min-height: 54px;
    scroll-snap-align: start;
  }

  #riskWarningPanel .risk-category-row {
    scroll-margin-top: calc(var(--mobile-header-height) + env(safe-area-inset-top) + 14px);
  }

  .profile-tab-head,
  .custom-message-head,
  .inbox-register-nudge,
  .follow-item {
    align-items: stretch;
    flex-direction: column;
  }

  .digest-preference-card,
  .mobile-theme-preference-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border-radius: 11px;
  }

  .digest-preference-icon,
  .mobile-theme-preference-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    font-size: 16px;
  }

  .digest-preference-copy,
  .mobile-theme-preference-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .digest-preference-copy strong,
  .mobile-theme-preference-copy strong {
    font-size: 14px;
    line-height: 1.3;
  }

  .digest-preference-copy span,
  .mobile-theme-preference-copy span {
    font-size: 11px;
    line-height: 1.35;
  }

  .digest-preference-copy small,
  .mobile-theme-preference-copy small {
    font-size: 11px;
    line-height: 1.3;
  }

  .digest-preference-switch {
    grid-column: auto;
    justify-self: auto;
    width: 46px;
    height: 27px;
  }

  .digest-preference-switch span {
    top: 3px;
    left: 3px;
    width: 19px;
    height: 19px;
  }

  .digest-preference-switch.on span {
    transform: translateX(20px);
  }

  .mobile-theme-preference-card {
    margin-top: 9px;
    border: 1px solid #cbd8e9;
    border-left: 5px solid #6b7d97;
    background: #f7f9fc;
    box-shadow: 0 7px 18px rgba(31, 51, 79, .07);
  }

  .mobile-theme-preference-icon {
    background: #e8edf4;
    color: #51647e;
    font-size: 20px;
  }

  .mobile-theme-preference-copy strong {
    color: #17345f;
  }

  .mobile-theme-preference-copy span {
    color: #566983;
  }

  .mobile-theme-preference-copy small {
    color: #7b899d;
  }

  .mobile-theme-mode-toggle {
    width: 52px;
    height: 30px;
  }

  .mobile-theme-mode-toggle .theme-mode-icon {
    top: 6px;
  }

  .mobile-theme-mode-toggle .theme-mode-thumb {
    width: 22px;
    height: 22px;
  }

  [data-color-mode="dark"] .mobile-theme-mode-toggle .theme-mode-thumb {
    transform: translateX(22px);
  }

  .follow-inbox-item summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-content: stretch;
    gap: 6px;
    min-width: 0;
    padding: 11px 12px;
  }

  .follow-inbox-item summary strong {
    display: -webkit-box;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    writing-mode: horizontal-tb;
    font-size: 14px;
    line-height: 1.45;
  }

  .follow-inbox-item summary span {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    writing-mode: horizontal-tb;
    font-size: 11px;
    line-height: 1.4;
  }

  .follow-inbox-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .follow-inbox-tabs button {
    flex: 0 0 auto;
  }

  .table-wrap,
  .data-table-wrap,
  .stock-table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }

  .data-table-card.mobile-data-table {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-data-table table[data-mobile-cards="ready"],
  .mobile-data-table table[data-mobile-cards="ready"] tbody {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .mobile-data-table table[data-mobile-cards="ready"] thead {
    display: none;
  }

  .mobile-data-table table[data-mobile-cards="ready"] tbody {
    display: grid;
    gap: 10px;
  }

  .mobile-data-table table[data-mobile-cards="ready"] tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(27, 42, 69, .06);
  }

  .mobile-data-table table[data-mobile-cards="ready"] tbody td {
    display: grid;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    gap: 4px;
    padding: 0 !important;
    border: 0;
    overflow: visible;
    white-space: normal;
    text-align: left !important;
    text-overflow: clip;
    font-variant-numeric: tabular-nums;
  }

  .mobile-data-table table[data-mobile-cards="ready"] tbody td::before {
    content: attr(data-mobile-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
  }

  .mobile-data-table table[data-mobile-cards="ready"] tbody td:first-child {
    grid-column: 1 / -1;
  }

  .mobile-data-table table[data-mobile-cards="ready"] .mobile-secondary-cell {
    display: none;
  }

  .mobile-data-table table[data-mobile-cards="ready"] .mobile-row-expanded .mobile-secondary-cell {
    display: grid;
  }

  .mobile-data-table table[data-mobile-cards="ready"] .mobile-card-action {
    display: block;
    grid-column: 1 / -1;
    padding-top: 2px !important;
  }

  .mobile-data-table .mobile-row-expand {
    width: 100%;
    min-height: 39px;
    border: 1px solid #c8d8ee;
    border-radius: 9px;
    background: #f6f9fe;
    color: #2457a7;
    font-weight: 800;
  }

  .mobile-data-table .mobile-table-empty-row {
    display: block !important;
  }

  .mobile-data-table .mobile-table-empty-row td {
    display: block !important;
  }

  .mobile-data-table .mobile-table-empty-row td::before {
    content: none !important;
  }

  .utility-tools-launcher {
    right: 12px;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 10px);
  }

  .dragon-detail-drawer,
  .utility-tools-drawer {
    width: 100vw;
    max-width: none;
    border-left: 0;
  }

  #importantDetailDialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
  }

  #importantDetailDialog .dialog-card {
    width: 100%;
    min-height: 100%;
    border-radius: 0;
    padding: calc(22px + env(safe-area-inset-top)) 16px calc(22px + env(safe-area-inset-bottom));
    animation: mobile-detail-enter 210ms cubic-bezier(.2, .8, .2, 1);
  }

  #importantDetailDialog.mobile-ai-drawer .important-dialog-body {
    display: grid;
    gap: 12px;
  }

  #importantDetailDialog.mobile-ai-drawer .important-ai-result {
    display: grid;
    gap: 10px;
  }

  #importantDetailDialog.mobile-ai-drawer .important-ai-result > section {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7faff;
  }

  #importantDetailDialog.mobile-ai-drawer .important-ai-result :is(h3, p) {
    margin: 0;
  }

  #importantDetailDialog.mobile-ai-drawer .important-ai-result p {
    margin-top: 7px;
    line-height: 1.7;
  }

  #fundFlowPanel .flow-market-list,
  #fundFlowPanel .flow-sector-list,
  #fundFlowPanel .flow-metric-grid,
  #fundFlowPanel .flow-sector-card .flow-metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #fundFlowPanel .flow-metric-grid {
    display: grid;
    width: 100%;
  }

  #fundFlowPanel .flow-card-item,
  #fundFlowPanel .flow-metric-grid span {
    min-width: 0;
    width: 100%;
  }

  #fundFlowPanel .flow-card-head,
  #fundFlowPanel .flow-metric-grid span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  #fundFlowPanel .flow-metric-grid span {
    min-height: 46px;
  }

  #fundFlowPanel .flow-card-head :is(strong, small),
  #fundFlowPanel .flow-metric-grid :is(em, strong) {
    min-width: 0;
    writing-mode: horizontal-tb;
    word-break: keep-all;
  }

  #fundFlowPanel .flow-card-head small,
  #fundFlowPanel .flow-metric-grid strong {
    text-align: right;
    white-space: nowrap;
  }

  .payment-relay-host-close {
    position: fixed;
    z-index: 2;
    top: calc(10px + env(safe-area-inset-top));
    right: 12px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 50%;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    box-shadow: 0 8px 24px rgba(2, 6, 23, .28);
    font-size: 28px;
    line-height: 1;
    backdrop-filter: blur(10px);
  }

  #importantDetailDialog .dialog-card,
  .dragon-detail-drawer,
  .utility-tools-drawer {
    touch-action: pan-y;
    will-change: transform;
  }

  .mobile-all-functions-button:active,
  .mobile-bottom-item:active,
  .mobile-all-functions-grid button:active,
  .mobile-all-functions-actions button:active,
  .mobile-all-functions-close:active {
    transform: scale(.98);
  }

  [data-color-mode="dark"] .mobile-header,
  [data-color-mode="dark"] .mobile-bottom-nav,
  [data-color-mode="dark"] .mobile-all-functions-drawer {
    background: rgba(15, 23, 42, .97);
  }

  [data-color-mode="dark"] .mobile-all-functions-button,
  [data-color-mode="dark"] .mobile-all-functions-close,
  [data-color-mode="dark"] .mobile-all-functions-grid button,
  [data-color-mode="dark"] .mobile-all-functions-actions button {
    border-color: #334155;
    background: #172033;
    color: #dbe7f5;
  }

  [data-color-mode="dark"] .pwa-install-banner,
  [data-color-mode="dark"] .pwa-guide-sheet {
    border-color: #334155;
    background: rgba(15, 23, 42, .98);
  }

  [data-color-mode="dark"] .pwa-guide-close,
  [data-color-mode="dark"] .pwa-guide-steps li {
    border-color: #334155;
    background: #172033;
    color: #dbe7f5;
  }

  [data-color-mode="dark"] .pwa-guide-steps li::before {
    background: #19365f;
    color: #b8d3ff;
  }

  [data-color-mode="dark"] .pwa-guide-step-icon {
    border-color: #365883;
    background: #19365f;
    color: #b8d3ff;
  }

  [data-color-mode="dark"] .mobile-data-table table[data-mobile-cards="ready"] tbody tr {
    border-color: #334155;
    background: #111c2f;
    box-shadow: 0 8px 22px rgba(2, 6, 23, .2);
  }

  [data-color-mode="dark"] .mobile-data-table .mobile-row-expand {
    border-color: #3c5d87;
    background: #172b47;
    color: #b8d3ff;
  }

  [data-color-mode="dark"] #hotRankingPanel .mobile-ranking-toggle {
    border-color: #3c5d87;
    background: #172b47;
    color: #b8d3ff;
  }

  [data-color-mode="dark"] .mobile-bottom-item.active {
    background: #19365f;
  }

  [data-color-mode="dark"] #importantDetailDialog.mobile-ai-drawer .important-ai-result > section {
    border-color: #334155;
    background: #111c2f;
  }
}

@keyframes mobile-detail-enter {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@media (max-width: 780px) and (hover: hover) and (pointer: fine) {
  .mobile-all-functions-button:hover,
  .mobile-all-functions-grid button:hover,
  .mobile-all-functions-actions button:hover,
  .pwa-guide-close:hover {
    border-color: #8db9ff;
    background: #eef5ff;
  }
}

@media (max-width: 780px) and (prefers-reduced-motion: reduce) {
  .mobile-all-functions-backdrop,
  .mobile-all-functions-drawer,
  .pwa-guide-backdrop,
  .pwa-guide-sheet,
  #importantDetailDialog .dialog-card,
  .dragon-detail-drawer,
  .utility-tools-drawer {
    transition: none;
    animation: none;
  }
}
