/* RUAY55 电脑版「简洁整洁」v2（2026-11-17）
 * v2 = v1 全部 ＋ 运营方 18:xx 三张图：我的中心框高不一/订单记录太矮/VIP积分要在上面；转账页青色提示条、按钮字靠右、右卡太矮；好友页拉太宽、返回钮空长条。
 * v1 原说明：
 * 运营方：电脑版很多框粘着、压着、太高太大；电脑版走干净整洁，不照搬手机端；千万不能影响手机版。
 * 硬约束：整份包在 @media (min-width:1100px) 里（电脑版断点），手机/平板一条都不生效。
 * 为什么放进 @layer vip-source-lock、选择器用 #root#root#root：
 *   已有电脑版规则里有写在 vip-source-lock 层里的 !important（例：player-mobile-fit-v23 把首页钱包按钮钉成 210px），
 *   分层的 !important 永远压过不分层的 !important，只能进同一层再用更高优先级压过。
 * 回滚：壳里删掉这一行 link。
 */
@layer vip-source-lock {
@media (min-width: 1100px) {

  /* 1. 内容紧贴顶栏：留出 24px */
  html body #root#root#root .player-shell .page-content { padding-top: 24px !important; }

  /* 2. 右下角「หน้าหลัก」悬浮钮：电脑版左栏已有首页入口，它压在卡片和游戏格上。
   *    它的 display/visibility/pointer-events 是脚本写的内联 !important，只能用裁剪藏（裁掉后也点不到） */
  html body .player-home-float.player-home-float { opacity: 0 !important; clip-path: inset(50%) !important; }

  /* 3. 首页右侧钱包卡：内容挤在左上、右边一条空竖线 → 垂直居中、按钮均分整行 */
  html body #root#root#root .player-shell .reference-wallet-summary {
    align-content: center !important; justify-items: stretch !important; padding: 28px 32px !important; row-gap: 22px !important;
  }
  html body #root#root#root .player-shell .reference-wallet-summary .wallet-title { border-right: 0 !important; width: 100% !important; height: auto !important; }
  html body #root#root#root .player-shell .reference-wallet-summary .wallet-title > div { width: 100% !important; }
  html body #root#root#root .player-shell .reference-wallet-summary .wallet-title strong { font-size: 34px !important; line-height: 1.15 !important; }
  html body #root#root#root .player-shell .reference-wallet-summary .wallet-actions {
    width: 100% !important; max-width: none !important; justify-self: stretch !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 12px !important;
  }
  html body #root#root#root .player-shell .reference-wallet-summary .wallet-actions > button {
    width: 100% !important; height: 84px !important; min-height: 0 !important; align-content: center !important; justify-items: center !important;
  }

  /* 4. 首页红包横幅：背景图只有约 410px 宽，右边接底色有一条接缝 → 叠一层同色渐变把图的右缘融掉 */
  html body #root#root#root .player-shell .grab-red-packet-banner {
    background-image: linear-gradient(90deg, rgba(255,242,235,0) 0, rgba(255,242,235,0) 300px, rgb(255,242,235) 412px),
                      url("/assets/ruay55-red-packet-light-card-v4-optimized.jpg") !important;
    background-size: 100% 100%, auto 100% !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: 0 0, 0 50% !important;
  }

  /* 4b. 历史页（?view=records）：这页把主区上边距压成 10px，标题和返回钮整条被顶栏盖住、左右也贴边；空记录框 409px 太高 */
  html body #root#root#root .player-shell .main-area:has(.transaction-records-page) { padding-top: 72px !important; }
  html body #root#root#root .player-shell .page-content:has(> .transaction-records-page) { padding: 24px 28px 36px !important; }
  html body #root#root#root .player-shell .transaction-records-page .detailed-record-list { min-height: 180px !important; }

  /* 4c. 钱包页（全屏子页）：顶部币种/存提按钮铺满整屏、跟下面 1100px 宽的卡片不对齐；两张卡一高一矮；
   *     「ถอน」图标被 .subtle-button svg:last-child{margin-left:auto} 推到右边 */
  html body .wallet-page.wallet-page.wallet-page .wallet-vip-eyebrow,
  html body .wallet-page.wallet-page.wallet-page .wallet-vip-controls {
    max-width: 1100px !important; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box !important;
  }
  html body .wallet-page.wallet-page.wallet-page .wallet-cards { align-items: stretch !important; }
  html body .wallet-page.wallet-page.wallet-page .wallet-cards > .wallet-vip-bonus {
    height: auto !important; max-height: none !important; align-self: stretch !important; align-content: start !important;
  }
  html body .wallet-page.wallet-page.wallet-page .wallet-vip-actions > button > svg { margin: 0 !important; }

  /* 4d. 顶栏语言钮：「Lang TH」是补丁脚本另插的 span.language-current，好友页重绘后被冲掉、没补回，只剩地球图标。
   *     插入的字不在时，直接把那个透明的 <select> 显示出来（显示「TH · ไทย」） */
  html body #root#root#root .player-shell .topbar .language-select:not(:has(.language-current)) > select {
    opacity: 1 !important; color: rgb(18,59,90) !important; -webkit-text-fill-color: rgb(18,59,90) !important;
    font-weight: 700 !important; background: transparent !important; border: 0 !important;
    -webkit-appearance: none !important; appearance: none !important; cursor: pointer !important;
    padding: 0 6px 0 42px !important; font-size: 15px !important; text-overflow: clip !important;
  }

  /* 5. 游戏页：分类一行放下，「ทั้งหมด」不再单独掉一行 */
  html body #root#root#root .player-shell .category-strip { gap: 8px !important; margin-top: 16px !important; }
  html body #root#root#root .player-shell .category-strip > button { padding: 0 12px !important; }

  /* 6. 游戏页厂商格：原来只露名字＋小圆点，厂商图片卡被压成 62px、透明叠在下面 → 直接显示图片卡（同首页） */
  html body #root#root#root .player-shell .provider-list {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 16px !important; margin-top: 20px !important; height: auto !important;
  }
  html body #root#root#root .player-shell .provider-list > .provider-section {
    display: block !important; height: auto !important; min-height: 0 !important; max-height: none !important;
    padding: 0 !important; overflow: hidden !important; position: relative !important; border-radius: 16px !important;
    background: none !important; border: 0 !important; box-shadow: none !important;
  }
  html body #root#root#root .player-shell .provider-list > .provider-section > .provider-heading { display: none !important; }
  html body #root#root#root .player-shell .provider-list > .provider-section > .game-grid {
    position: static !important; opacity: 1 !important; display: block !important;
    height: auto !important; inset: auto !important; width: auto !important; transform: none !important;
  }
  html body #root#root#root .player-shell .provider-list > .provider-section .game-card:first-child {
    position: static !important; height: auto !important; inset: auto !important; width: 100% !important; margin: 0 !important;
    padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
  }
  html body #root#root#root .player-shell .provider-list > .provider-section .game-card:first-child .cover {
    aspect-ratio: 1 / 1 !important; height: auto !important; border-radius: 16px !important;
  }
  html body #root#root#root .player-shell .provider-list > .provider-section .game-card:first-child .cover img {
    width: 100% !important; height: 100% !important; object-fit: cover !important;
  }
  /* 没有厂商图、用通用占位图的格（目前是 DB Live）：图片底部叠上厂商名，免得认不出 */
  html body #root#root#root .player-shell .provider-list > .provider-section:has(.game-card:first-child img[src*="game-blue-vault"]) > .provider-heading {
    display: flex !important; position: absolute !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
    z-index: 3 !important; justify-content: center !important; align-items: center !important; padding: 28px 10px 14px !important; margin: 0 !important;
    background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.72)) !important; border: 0 !important; pointer-events: none !important;
    height: auto !important; border-radius: 0 0 16px 16px !important;
  }
  html body #root#root#root .player-shell .provider-list > .provider-section:has(.game-card:first-child img[src*="game-blue-vault"]) > .provider-heading strong {
    color: #fff !important; font-size: 18px !important; font-weight: 800 !important; letter-spacing: .02em !important; white-space: nowrap !important;
  }
  html body #root#root#root .player-shell .provider-list > .provider-section:has(.game-card:first-child img[src*="game-blue-vault"]) > .provider-heading :is(button, svg, .provider-symbol) {
    display: none !important;
  }

  /* ===== v2 新增 ===== */
  /* 7. 我的中心：VIP、积分商城挪到身份卡下面并等高；左右两张卡等高（右边撑到左边的高度，左边保持原高）；
   *    订单记录原来限高 150px 把第三行切掉 → 按内容高全部显示 */
  html body #root#root#root .player-shell .profile-page { align-items: stretch !important; }
  html body #root#root#root .player-shell .profile-page > div:has(> .wv-badge) { grid-row: 2 !important; grid-column: 1 !important; height: auto !important; min-height: 64px !important; align-content: center !important; }
  html body #root#root#root .player-shell .profile-page > div:has(> .wm-left) { grid-row: 2 !important; grid-column: 2 !important; height: auto !important; min-height: 64px !important; align-items: center !important; }
  html body #root#root#root .player-shell .profile-page > .profile-wallet-card { grid-row: 3 !important; grid-column: 1 !important; }
  html body #root#root#root .player-shell .profile-page > .profile-tools { grid-row: 3 !important; grid-column: 2 !important; }
  html body #root#root#root .player-shell .profile-page > .profile-turnover-card { grid-row: 4 !important; grid-column: 1 !important; }
  html body #root#root#root .player-shell .profile-page > .downline-overview { grid-row: 4 !important; grid-column: 2 !important; }
  html body #root#root#root .player-shell .profile-page > .profile-record-preview { grid-row: 5 !important; }
  html body #root#root#root .player-shell .profile-page > .profile-record-preview-list { grid-row: 6 !important; height: auto !important; max-height: none !important; overflow: visible !important; }
  html body #root#root#root .player-shell .profile-page > :is(.profile-tools, .downline-overview) {
    align-self: stretch !important; height: auto !important; max-height: none !important; box-sizing: border-box !important;
    display: flex !important; flex-direction: column !important;
  }
  html body #root#root#root .player-shell .profile-page > .profile-tools > .profile-tool-grid { flex: 1 1 auto !important; height: auto !important; grid-template-rows: 1fr 1fr !important; align-content: stretch !important; margin-top: 8px !important; }
  html body #root#root#root .player-shell .profile-page > .profile-tools > .profile-tool-grid > * { height: auto !important; min-height: 0 !important; align-self: stretch !important; }
  html body #root#root#root .player-shell .profile-page > .downline-overview > :last-child { flex: 1 1 auto !important; align-content: center !important; align-items: center !important; }

  /* 8. 按钮图标被 .subtle-button svg:last-child{margin-left:auto} 连字推到右边（转账页「相机扫码/输入玩家ID」等） */
  html body #root#root#root .player-shell .subtle-button > svg { margin-inline: 0 !important; }

  /* 9. 转账页：右边规则卡跟左边表单等高；青绿色提示条换成同页「现金」框那套米金色 */
  html body #root#root#root .player-shell .transfer-layout { align-items: stretch !important; }
  html body #root#root#root .player-shell .transfer-layout > .rules-panel { align-self: stretch !important; height: auto !important; max-height: none !important; }
  html body #root#root#root .player-shell .transfer-form > .notice {
    background: rgb(251,243,226) !important; color: rgb(138,100,32) !important;
    border: 1px solid rgba(196,147,50,.28) !important; border-radius: 13px !important;
  }
  html body #root#root#root .player-shell .transfer-form > .notice svg { color: rgb(176,128,40) !important; }

  /* 10. 好友页：整页 1172px 拉满、每行两头空一大片 → 收窄到 960px 居中；返回钮是 132px 空长条 → 40px 小圆钮 */
  html body #root#root#root .player-shell .friends-page.friend-vault-page {
    max-width: 960px !important; width: 100% !important; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box !important;
  }
  html body #root#root#root .player-shell .friend-vault-header > .friend-vault-page-back {
    width: 40px !important; min-width: 40px !important; height: 40px !important; padding: 0 !important;
    display: grid !important; place-items: center !important; grid-template-columns: none !important;
    border-radius: 999px !important; flex: 0 0 40px !important;
  }

  /* 11. 优惠页：原来限宽 1040px、左右列 613/409、右边两卡加起来比左边红包卡矮一截且中间空白、右边小字 10–12px
   *     → 用满宽、两列等宽；「其他优惠」撑满、记录贴底，跟红包卡等高；右边说明字 13px */
  html body #root#root#root .player-shell .promotions-redesign {
    max-width: none !important; width: 100% !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; grid-template-rows: auto 1fr auto !important;
    align-items: stretch !important; column-gap: 20px !important;
  }
  html body #root#root#root .player-shell .promotions-redesign > .promo-other-section { grid-row: 2 !important; align-self: stretch !important; display: flex !important; flex-direction: column !important; margin: 0 !important; }
  html body #root#root#root .player-shell .promotions-redesign > .promo-history-entry { grid-row: 3 !important; align-self: end !important; margin: 0 !important; }
  html body #root#root#root .player-shell .promotions-redesign > .promo-other-section :is(small, p, em) { font-size: 13px !important; line-height: 1.45 !important; }
  html body #root#root#root .player-shell .promotions-redesign > .promo-other-section > .promo-offer-list {
    flex: 1 1 auto !important; height: auto !important; grid-template-rows: 1fr 1fr !important; align-content: stretch !important; margin-top: 14px !important;
  }
  html body #root#root#root .player-shell .promotions-redesign > .promo-other-section > .promo-offer-list > .promo-offer-row {
    height: auto !important; min-height: 0 !important; align-content: center !important; align-items: center !important;
  }
}
}
