/**
 * QieYun Mobile v3.64.38 — 全局响应式修复 (<768px)
 * 最后加载，覆盖各页面/弹窗移动端布局问题
 */

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  .qy-dashboard-layout.fw-layout,
  .qy-dashboard-layout .qy-main {
    overflow-x: clip;
    max-width: 100vw;
  }

  .qy-dashboard-layout .qy-main,
  .qy-dashboard-layout.fw-layout .qy-main {
    padding-top: 12px !important;
    padding-inline: 14px !important;
    padding-bottom: 18px !important;
    background: transparent !important;
  }

  .has-bottom-nav.qy-dashboard-layout .qy-main.qy-main-with-bottom-nav,
  .has-bottom-nav.qy-dashboard-layout.fw-layout .qy-main.qy-main-with-bottom-nav {
    padding-bottom: calc(var(--qy-mobile-bottom-nav-h, 88px) + env(safe-area-inset-bottom, 0px)) !important;
    scroll-padding-bottom: calc(var(--qy-mobile-bottom-nav-h, 88px) + env(safe-area-inset-bottom, 0px)) !important;
  }

  .qy-pg-navbar .fw-nav-utils,
  .fw-navbar-v3 .fw-navbar-actions.fw-nav-utils {
    gap: 8px !important;
  }

  .qy-pg-navbar .qy-brand.qy-nav-mobile-brand,
  .qy-pg-navbar .fw-brand.qy-nav-mobile-brand {
    flex: 0 0 auto !important;
    width: max-content !important;
    max-width: calc(100vw - 168px) !important;
    min-width: 0 !important;
    align-self: center !important;
  }

  .qy-pg-navbar .qy-brand-name {
    max-width: min(120px, 34vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .qy-pg-navbar .qy-navbar-inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* ===== 仪表盘移动端：强制单列，修复「重要通知」被挤压成左侧竖条 ===== */
  .qy-dx-dash.qy-dx-mobile .qy-ref-grid,
  .qy-dx-dash.qy-dx-mobile .qy-ref-grid.qy-dx-mobile-grid,
  .qy-pg-dash.qy-dx-mobile .qy-ref-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .qy-dx-dash.qy-dx-mobile .qy-ref-main,
  .qy-dx-dash.qy-dx-mobile .qy-ref-side,
  .qy-pg-dash.qy-dx-mobile .qy-ref-main,
  .qy-pg-dash.qy-dx-mobile .qy-ref-side {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .qy-dx-mobile .qy-dx-mobile-notice {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .qy-dx-mobile .qy-dx-mobile-notice .qy-ref-card-head,
  .qy-dx-mobile .qy-dx-mobile-notice .qy-ref-card-head-row {
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .qy-dx-mobile .qy-dx-mobile-notice .qy-ref-card-head h2,
  .qy-dx-mobile .qy-dx-mobile-notice .qy-dx-notice-title {
    white-space: normal !important;
    word-break: break-word !important;
    writing-mode: horizontal-tb !important;
  }

  .qy-dx-mobile .qy-dx-download,
  .qy-dx-mobile .qy-ref-download {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* 仪表盘下载区 — 2×2 平台大卡片网格 */
  .qy-dx-download-v3 .qy-dx-fc-grid--platform,
  .qy-dx-download.qy-dx-download-v3 > .qy-dx-fc-grid--platform {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .qy-dx-download-v3 .qy-dx-fc-grid--platform > .qy-dx-fc-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 164px !important;
    height: auto !important;
  }

  .qy-dx-download-v3 .qy-dx-fc-grid--platform .qy-dx-fc-body-mobile {
    display: block !important;
  }

  .qy-dx-download-v3 .qy-dx-fc-grid--platform .qy-dx-fc-body-desktop,
  .qy-dx-download-v3 .qy-dx-fc-grid--platform .qy-dx-fc-foot {
    display: none !important;
  }

  .qy-dx-download-v3 .qy-dx-fc-grid--platform .qy-dx-fc-active-wrap {
    display: block !important;
  }

  .qy-dx-download-v3 .qy-dx-fc-clients-section {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* ===== 系统公告弹窗 — 移动端垂直居中 ===== */
  .qy-notice-modal-overlay {
    align-items: center !important;
    justify-content: center !important;
    padding:
      max(12px, env(safe-area-inset-top, 0px))
      12px
      max(12px, env(safe-area-inset-bottom, 0px)) !important;
    z-index: 100050 !important;
  }

  .qy-notice-modal-overlay .qy-notice-modal.qy-notice-premium {
    display: flex !important;
    flex-direction: column !important;
    width: min(92vw, 392px) !important;
    max-width: 392px !important;
    min-height: 0 !important;
    max-height: min(
      88dvh,
      calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px)
    ) !important;
    margin: 0 !important;
    border-radius: 24px !important;
    overflow: hidden !important;
  }

  .qy-notice-premium-bar,
  .qy-notice-premium-foot {
    flex-shrink: 0 !important;
  }

  .qy-notice-premium-hero {
    flex-shrink: 0 !important;
    overflow: hidden !important;
  }

  .qy-notice-premium-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  .qy-notice-premium-foot {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .qy-notice-premium-cta {
    min-height: 48px !important;
  }

  .has-bottom-nav .qy-notice-modal-overlay .qy-notice-modal.qy-notice-premium {
    max-height: min(
      84dvh,
      calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 28px)
    ) !important;
  }

  /* 智能弹窗：移动端全宽底栏 */
  .qy-smart-popup-overlay {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .qy-smart-popup-overlay .qy-sp-premium,
  .qy-smart-popup-overlay .qy-smart-popup {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ===== 套餐页 qp-plan ===== */
  .qp-page {
    padding: 4px 0 20px;
    gap: 18px;
  }

  .qp-header {
    flex-direction: column;
    align-items: stretch;
    padding: 20px 16px;
    gap: 16px;
  }

  .qp-header__aside {
    width: 100%;
    flex-direction: column;
  }

  .qp-stat {
    min-width: 0;
    width: 100%;
  }

  .qp-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .qp-grid > .qp-card {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0 !important;
  }

  .qp-card {
    min-height: 0 !important;
  }

  .qp-features {
    min-height: 0 !important;
    flex: 1 1 auto;
  }

  .qp-features__list {
    min-height: 0 !important;
    max-height: min(42vh, 280px);
  }

  .qp-card__footer {
    margin-top: auto;
    flex-shrink: 0;
  }

  .qp-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .qp-tabs::-webkit-scrollbar {
    display: none;
  }

  .qp-tabs__btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* 旧版套餐卡 */
  .fw-plan-card-v4.fw-plan-glass,
  .qy-plan-premium .fw-plan-card-v4 {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
  }

  .qy-plan-premium .fw-plan-grid-v4 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* ===== 节点列表 ===== */
  .fw-server-page-v2,
  .fw-server-page-v3 {
    gap: 14px !important;
  }

  .fw-server-toolbar {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .fw-server-search-v2 {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    max-height: 44px !important;
    padding: 4px 6px 4px 12px !important;
  }

  .fw-server-search-v2:focus-within {
    transform: none !important;
  }

  .fw-server-search-v2 input {
    font-size: 14px !important;
  }

  .fw-server-refresh-v2 {
    flex: 0 0 auto !important;
    min-height: 40px !important;
    padding: 0 12px !important;
  }

  .fw-server-search,
  .fw-server-page .fw-server-search {
    min-height: 40px !important;
    padding: 8px 12px !important;
  }

  .fw-server-search input {
    font-size: 14px !important;
  }

  /* ===== 订单页 ===== */
  .fw-order-list-page-v3,
  .fw-order-detail-page-v3 {
    overflow-x: clip;
  }

  .fw-order-toolbar-v3 {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .fw-order-search-v3 {
    min-height: 40px !important;
    padding: 8px 12px !important;
  }

  .fw-order-search-v3 input {
    font-size: 14px !important;
  }

  .fw-order-detail-amount-v3 {
    margin: 0 0 16px !important;
    border-radius: 16px !important;
  }

  .fw-order-detail-done-v3__actions,
  .fw-order-card-v3__actions {
    position: relative;
    z-index: 1;
  }

  .fw-order-card-v3__actions .fw-order-btn-v3 {
    min-height: 44px !important;
  }

  /* ===== 个人资料 ===== */
  .fw-profile-page-v3 {
    gap: 14px !important;
  }

  .fw-profile-card-v3 {
    padding: 18px 16px !important;
  }

  .fw-profile-setting-row {
    padding: 14px 0 !important;
    font-size: 14px !important;
  }

  .fw-profile-kv-v3__val,
  .fw-profile-kv-v3__val code {
    word-break: break-all;
    font-size: 12px !important;
  }

  .fw-profile-share-v3 input,
  .fw-profile-share-v3 textarea {
    min-width: 0;
    font-size: 13px !important;
  }

  .fw-profile-btn-v3 {
    min-height: 44px !important;
  }

  /* ===== 邀请页 ===== */
  .fw-invite-page-v3 {
    overflow-x: clip;
  }

  .fw-invite-records-v3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ===== 礼品卡 premium 弹窗 — 垂直居中 ===== */
  .qy-gift-overlay--premium {
    position: fixed !important;
    inset: 0 !important;
    min-height: 100dvh !important;
    min-height: 100svh !important;
    padding:
      max(16px, env(safe-area-inset-top, 0px))
      16px
      max(16px, env(safe-area-inset-bottom, 0px)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-y: auto !important;
  }

  .qy-gift-premium-shell {
    width: min(100%, 360px) !important;
    max-width: 360px !important;
    margin: auto !important;
    transform: translateY(-32px) !important;
  }

  .qy-gift-modal-premium {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 22px !important;
    max-height: calc(100dvh - max(32px, env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px))) !important;
  }

  /* ===== 充值弹窗 v3 ===== */
  .qy-recharge-overlay,
  .qy-gift-overlay:not(.qy-gift-overlay--premium) {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .qy-recharge-modal-v3,
  .qy-recharge-modal-v2,
  .qy-gift-modal-v2 {
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(92dvh, 100%) !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .qy-recharge-step-amount,
  .qy-recharge-step,
  .qy-gift-step {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .qy-recharge-v3-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .qy-recharge-v3-actions {
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
  }

  .qy-recharge-v3-reset {
    flex: 0 0 auto !important;
    min-width: 84px !important;
    min-height: 48px !important;
  }

  .qy-recharge-v3-submit {
    flex: 1 1 auto !important;
    min-height: 48px !important;
    min-width: 0 !important;
  }

  .qy-recharge-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .qy-recharge-footer,
  .qy-gift-overlay .qy-recharge-footer {
    flex-direction: column !important;
    gap: 10px !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .qy-recharge-footer .qy-btn,
  .qy-gift-overlay .qy-recharge-footer .qy-btn {
    width: 100% !important;
    min-height: 48px !important;
  }

  /* ===== 支付二维码（安卓：可滚动 + vmin 限尺寸） ===== */
  .fw-pay-qr-overlay,
  .qy-modal-overlay.fw-pay-qr-overlay,
  .fw-pay-qr-overlay.qy-pay-qr-overlay--center,
  .qy-modal-overlay.fw-pay-qr-overlay.qy-pay-qr-overlay--center {
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    height: 100% !important;
    max-height: 100dvh !important;
  }

  .qy-pay-qr-premium,
  .fw-pay-qr-modal-v7 {
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(94dvh, 100%) !important;
    border-radius: 20px 20px 0 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .qy-pay-qr-premium__body {
    padding: 14px 12px 10px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .qy-pay-qr-frame--canvas,
  .qy-pay-qr-canvas-host {
    min-width: 0 !important;
    min-height: 0 !important;
    width: auto !important;
    height: auto !important;
  }

  .qy-pay-qr-premium__qr-wrap {
    max-width: 100%;
    margin-bottom: 12px;
  }

  .qy-pay-qr-premium__qr-frame {
    padding: 10px !important;
    max-width: min(280px, 72vmin) !important;
    width: fit-content !important;
    margin: 0 auto;
  }

  .qy-pay-qr-premium__qr-frame img,
  .qy-pay-qr-canvas-host img,
  .qy-pay-qr-canvas-host canvas {
    width: auto !important;
    height: auto !important;
    max-width: min(260px, 68vmin) !important;
    max-height: min(260px, 68vmin) !important;
    touch-action: pan-x pan-y pinch-zoom;
  }

  .qy-pay-qr-premium__amount {
    font-size: 32px !important;
    margin-bottom: 6px !important;
  }

  .qy-pay-qr-premium__channel {
    margin-bottom: 14px !important;
  }

  .qy-pay-qr-premium__scan-tip {
    font-size: 13px !important;
    margin-bottom: 12px !important;
  }

  .qy-pay-qr-mobile-jump {
    margin-bottom: 12px !important;
  }

  .qy-pay-qr-premium__actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    padding: 0 4px;
  }

  .qy-pay-qr-premium__actions .qy-btn {
    width: 100% !important;
    min-height: 48px !important;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .fw-pay-qr-overlay,
  .qy-modal-overlay.fw-pay-qr-overlay,
  .fw-pay-qr-overlay.qy-pay-qr-overlay--center,
  .qy-modal-overlay.fw-pay-qr-overlay.qy-pay-qr-overlay--center {
    align-items: center !important;
    padding: 8px !important;
  }

  .qy-pay-qr-premium,
  .fw-pay-qr-modal-v7 {
    max-height: min(96dvh, 100%) !important;
    border-radius: 16px !important;
    margin: 8px auto !important;
    width: min(100%, 520px) !important;
  }

  .qy-pay-qr-premium__qr-frame img,
  .qy-pay-qr-canvas-host img,
  .qy-pay-qr-canvas-host canvas {
    max-width: min(220px, 56vmin) !important;
    max-height: min(220px, 56vmin) !important;
  }

  .qy-pay-qr-premium__amount {
    font-size: 28px !important;
    margin-bottom: 4px !important;
  }

  .qy-pay-qr-premium__channel {
    margin-bottom: 10px !important;
  }

  /* ===== 套餐购买弹窗 qp-checkout ===== */
  .qp-overlay--premium {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .qp-checkout--premium {
    width: 100% !important;
    max-height: min(92dvh, 100%) !important;
    border-radius: 20px 20px 0 0 !important;
  }

  .qp-checkout__mobile-bar {
    display: flex !important;
    flex-shrink: 0;
  }

  .qp-btn--pay-mobile {
    min-height: 48px !important;
  }

  /* ===== 通用弹窗 ===== */
  .qy-modal-overlay:not(.qp-overlay--premium):not(.qy-recharge-overlay):not(.fw-pay-qr-overlay) {
    padding: 12px !important;
    align-items: flex-end !important;
  }

  .qy-modal:not(.qp-checkout--premium):not(.qy-pay-qr-premium) {
    width: 100% !important;
    max-height: min(88dvh, 100%) !important;
    border-radius: 18px 18px 0 0 !important;
    overflow-y: auto;
  }

  .qy-knowledge-modal-overlay {
    padding: 12px !important;
  }

  .qy-knowledge-modal {
    max-height: min(88dvh, 100%) !important;
    width: 100% !important;
  }

  /* ===== Premium purchase fallback ===== */
  .fw-purchase-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .fw-purchase-modal-v3,
  .qy-plan-premium-modal .fw-purchase-modal-v3 {
    width: 100% !important;
    max-height: min(92dvh, 100%) !important;
    border-radius: 20px 20px 0 0 !important;
    overflow-y: auto;
  }

  .fw-purchase-footer .fw-btn-primary,
  .fw-purchase-footer .fw-btn {
    min-height: 48px !important;
    width: 100%;
  }

  /* ===== 表格横向滚动 ===== */
  .qy-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ===== 未支付浮层 ===== */
  .qy-unpaid-global-bar--float {
    top: max(8px, env(safe-area-inset-top, 0px)) !important;
    padding: 0 12px !important;
  }

  .qy-unpaid-global-bar__inner {
    flex-wrap: wrap;
    gap: 8px;
  }

  .qy-unpaid-global-bar__pay {
    min-height: 40px !important;
  }
}

@media (max-width: 480px) {
  .qp-header__title {
    font-size: 22px;
  }

  .qy-pg-navbar .fw-nav-utils,
  .fw-navbar-v3 .fw-navbar-actions.fw-nav-utils {
    gap: 6px !important;
  }

  .qy-pg-navbar .qy-brand-name {
    max-width: min(120px, 38vw);
  }

  .qy-dx-mobile .qy-dx-stats {
    grid-template-columns: 1fr !important;
  }

  .qp-card__amount {
    font-size: 32px;
  }

  .fw-server-refresh-v2 span:not(.fw-server-refresh-v2__icon) {
    display: none !important;
  }

  .fw-server-refresh-v2 {
    min-width: 40px !important;
    padding: 0 10px !important;
  }

  .qy-recharge-v3-balance {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .fw-invite-commission-v3__stats {
    grid-template-columns: 1fr !important;
  }

  .qp-pay-qr__actions .qp-btn--premium,
  .qp-pay-qr__actions .qp-btn--premium-outline {
    width: 100% !important;
  }

  /* ===== 使用文档 — 分类卡片移动端优化 ===== */
  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid.qy-dx-fc-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
    overflow-x: visible !important;
    padding: 0 !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid > .qy-dx-fc-card {
    flex: unset !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 196px !important;
    min-height: 196px !important;
    max-height: 196px !important;
    border-radius: 16px !important;
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.16),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--all {
    background: linear-gradient(180deg, #ecfeff 0%, #cffafe 32%, #67e8f9 70%, #06b6d4 100%) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid > .qy-dx-fc-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: calc(50% - 5px) !important;
    max-width: calc(50% - 5px) !important;
    justify-self: center;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid > .qy-dx-fc-card.is-active {
    transform: none !important;
    box-shadow:
      0 8px 28px rgba(0, 0, 0, 0.22),
      0 0 0 2px rgba(255, 255, 255, 0.65),
      0 0 0 1px rgba(255, 255, 255, 0.12) inset !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid > .qy-dx-fc-card:active {
    transform: scale(0.98) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-visual {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 26px 12px 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-platform-logo {
    width: 80px !important;
    height: 80px !important;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.14)) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-os-svg {
    width: 64px !important;
    height: 64px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-os-svg--android,
  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-os-svg--windows {
    width: 60px !important;
    height: 60px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-body {
    padding: 0 10px 6px !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-title {
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-desc {
    display: none !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-foot {
    padding: 4px 10px !important;
    min-height: 24px !important;
    border-radius: 0 0 16px 16px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-action {
    font-size: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-action-ico {
    width: 24px !important;
    height: 20px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-action-ico .qy-ico {
    width: 11px !important;
    height: 11px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--all .qy-dx-fc-foot {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.96) 0%, rgba(8, 145, 178, 0.98) 100%) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--all .qy-dx-fc-action {
    color: #ecfeff !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--all .qy-dx-fc-action-ico {
    color: #0891b2 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 1px 6px rgba(8, 145, 178, 0.35) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--ios .qy-dx-fc-foot {
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.94) 0%, rgba(76, 29, 149, 0.97) 100%) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--ios .qy-dx-fc-action-ico {
    color: #6d28d9 !important;
    background: rgba(255, 255, 255, 0.95) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--android .qy-dx-fc-foot {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.94) 0%, rgba(4, 120, 87, 0.97) 100%) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--android .qy-dx-fc-action-ico {
    color: #047857 !important;
    background: rgba(255, 255, 255, 0.95) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--windows .qy-dx-fc-foot {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.94) 0%, rgba(29, 78, 216, 0.97) 100%) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--windows .qy-dx-fc-action-ico {
    color: #1d4ed8 !important;
    background: rgba(255, 255, 255, 0.95) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--macos .qy-dx-fc-foot {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.94) 0%, rgba(67, 56, 202, 0.97) 100%) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-card--macos .qy-dx-fc-action-ico {
    color: #4338ca !important;
    background: rgba(255, 255, 255, 0.95) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-badge {
    top: 8px !important;
    right: 8px !important;
    padding: 2px 7px !important;
    border-radius: 5px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    line-height: 1.4 !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-badge--hot {
    color: #fecaca !important;
    background: rgba(127, 29, 29, 0.9) !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-badge--rec {
    color: #bbf7d0 !important;
    background: rgba(20, 83, 45, 0.9) !important;
  }
}

@media (max-width: 360px) {
  .qy-dashboard-layout .qy-main,
  .qy-dashboard-layout.fw-layout .qy-main {
    padding-top: 10px !important;
    padding-inline: 12px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid.qy-dx-fc-grid {
    gap: 8px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid > .qy-dx-fc-card {
    height: 186px !important;
    min-height: 186px !important;
    max-height: 186px !important;
    border-radius: 14px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-platform-logo {
    width: 72px !important;
    height: 72px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-os-svg {
    width: 56px !important;
    height: 56px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-os-svg--android,
  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-os-svg--windows {
    width: 52px !important;
    height: 52px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-title {
    font-size: 12px !important;
  }

  .fw-layout .qy-knowledge-page .qy-knowledge-fc-grid .qy-dx-fc-action {
    font-size: 10px !important;
  }

  .qp-tabs__btn {
    padding: 8px 10px !important;
    font-size: 13px !important;
  }

  .fw-order-card-v3__amount {
    font-size: 22px !important;
  }
}
