/* 640px 起使用侧栏；按可用宽度排版，不区分设备型号。手机沿用原页面。 */
.jg-wide-nav { display: none; }
/* 所有页面共用即时可视高度，避免地址栏或键盘伸缩后沿用旧 --vh。 */
#app { height: var(--visual-viewport-height, 100%); }
#realapp:not(.checkin-source-scroll-shell) { height: 100% !important; min-height: 0; }
/* 背景图未配置或加载失败时，白色昵称仍有对比度。 */
.PersonalMain .topArea { background-color: #1c3153; }
.PersonalMain .topArea .head_area .top_back { filter: brightness(0) invert(1); }
/* 手机页面不横向漂移；个人中心只响应纵向滚动，保留双指缩放。 */
@media (max-width: 639px) {
  .jg-footer { padding-bottom: calc(1.58667rem + env(safe-area-inset-bottom)); }
  html, body { overflow-x: clip; overscroll-behavior-x: none; }
  .personPage { touch-action: pan-y pinch-zoom; }
  :root .personPage .van-pull-refresh { overflow-x: hidden !important; overscroll-behavior-x: none; }
}
@media (min-width: 640px) {
  :root { --jg-rail: 76px; --jg-gutter: 20px; --jg-page-max: 960px; font-size: 40px !important; }
  :root[data-jg-layout="hall"], :root[data-jg-layout="room"] { --jg-page-max: 1280px; }
  :root[data-jg-layout="auth"] { --jg-page-max: 1040px; }
  /* transform 让原页面的 fixed 头尾以内容区为基准，弹窗仍由原组件负责。 */
  #app { position: relative; width: min(calc(100% - var(--jg-rail) - var(--jg-gutter) * 2), var(--jg-page-max)) !important; height: 100%; height: var(--visual-viewport-height,100dvh); margin-left: calc(var(--jg-rail) + (100% - var(--jg-rail) - min(100% - var(--jg-rail) - var(--jg-gutter) * 2, var(--jg-page-max))) / 2); transform: translateZ(0); }
  #realapp, #realapp > *, .index-container > * { max-width: 100%; }
  #realapp { min-width: 0; height: 100% !important; }
  .jn-nav, .jg-wallet-nav, .bottom-taps { display: none !important; }
  .jg-wide-nav { position: fixed; inset: 0 auto 0 0; z-index: 10030; display: flex; flex-direction: column; width: var(--jg-rail); padding: max(16px,env(safe-area-inset-top)) 10px max(16px,env(safe-area-inset-bottom)); background: var(--jb-card); border-right: 1px solid var(--jb-line); color: var(--jb-ink); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; overscroll-behavior: contain; font-size: 14px; }
  .jg-wide-nav .jg-wide-brand { --jg-logo-inset: 8px; flex: none; display: flex; align-items: center; justify-content: center; position: relative; width: 48px; height: 44px; min-height: 44px; padding: 8px; margin: 0 auto 24px; background: transparent; border-radius: 14px; box-shadow: none; overflow: hidden; }
  .jg-wide-brand img { width: 142px; max-width: none; height: 32px; object-fit: contain; object-position: left; flex: none; margin-left: 106px; }
  .jg-wide-nav nav { display: grid; gap: 6px; }
  .jg-wide-nav :is(a:not(.jg-wide-brand),button) { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; width: 100%; border: 0; border-radius: 12px; padding: 10px; text-decoration: none; background: transparent; color: var(--jb-vice); font: inherit; cursor: pointer; }
  .jg-wide-nav svg { width: 23px; height: 23px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
  .jg-wide-nav :is(a,button) span, .jg-wide-nav__section > p { display: none; }
  .jg-wide-dot { position: absolute; top: 9px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: #f04452; box-shadow: 0 0 0 2px var(--jb-card, #fff); pointer-events: none; }
  .jg-wide-unread { position: absolute; top: 6px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: #f04452; color: #fff; font-style: normal; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--jb-card, #fff); pointer-events: none; }
  .jg-wide-nav :is(a,button):hover { background: var(--jb-soft); color: var(--jb-brand); }
  .jg-wide-nav [aria-current="page"] { background: var(--jb-soft) !important; color: var(--jb-brand) !important; font-weight: 700 !important; box-shadow: inset 3px 0 var(--jb-brand); }
  .jg-wide-nav :is(a,button):focus-visible { outline: 2px solid var(--jb-brand); outline-offset: 2px; }
  .jg-wide-nav__section { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--jb-line); }
  .jg-wide-nav__foot { margin-top: auto; padding-top: 24px; }
  :root[data-jg-mode="dark"] .jg-wide-nav :is(a:not(.jg-wide-brand),button) { color: #c1d0e6 !important; }
  :root[data-jg-mode="dark"] .jg-wide-nav a[aria-current="page"] { color: #85baff !important; background: #203754 !important; }
  .hallPage .maincontent { padding-bottom: 24px !important; }
  .hallPage .toppart { padding-inline: 0; }
  .hallPage.jg-hero-hall { --jg-hero-header: 68px; }
  .hallPage.jg-hero-hall > .head_area { width: 100%; max-width: none; padding-inline: 20px !important; }
  .hallPage.jg-hero-hall .jg-hero-brand { visibility: hidden; }
  :root .jg-hero-hall .jg-brand-hero { width: calc(100% - 24px); max-width: none; height: 250px; margin: 0 auto 16px; border-radius: 24px; }
  .jg-brand-hero__copy { padding: 28px 0 0 32px; width: 55%; }
  .jg-brand-hero__copy h2 { font-size: 38px; }
  .jg-brand-hero__copy p { font-size: 15px; margin-top: 18px; }
  .jg-brand-hero__person { right: 0; top: 0; height: 300px; }
  .hallPage .centerArea, .hallPage .noticecontent { width: calc(100% - 24px) !important; max-width: none; margin-inline: auto; }
  .jg-play-grid, .jg-extras { width: calc(100% - 24px); max-width: 620px; }
  .jg-play-grid { gap: 14px !important; }
  .jg-extras { margin-inline: auto; }
  body > .jg-sub, body > .sf-invite, body > .mp-page { left: var(--jg-rail); }
  .jg-sheet { left: var(--jg-rail); max-height: var(--visual-viewport-height,100dvh); }
  .jg-sheet__head { flex: none; min-height: 64px; padding-inline: 24px; }
  .jg-sheet__body { width: 100%; max-width: 1280px; align-self: center; padding: 24px; min-height: 0; }
  :root .jg-lobby__grid, .jg-art-grid, .jg-partner-games .jg-art-grid { grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 18px; }
  .jg-art-search { min-height: 44px; max-width: 520px; }
  .jg-art-filters button, .jg-art-more { min-height: 44px; }
  .jg-partner-list { grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); }
  .jg-lobby__seg { max-width: 720px; margin-inline: auto; }
  /* 固定视口宽度的旧页面改为所在内容区宽度。 */
  :is(.security-v3__panel,.invite-v3__footer,.down-line-list,.actual-transfer,.transfer-done,.people-bill-v3 .filter,.support-copy-menu-mask,.copy-menu-mask) { width: 100% !important; max-width: 100%; }
  .recent-games-v3 .accounts-list .accounts-swipe-cell { width: 100%; }
  .persondetail.person-detail-v3 .personhead { width: 100%; }
  .van-dialog { width: min(460px,calc(100% - 32px)) !important; max-height: calc(var(--visual-viewport-height,100dvh) - 32px); overflow-y: auto; }
  .van-popup--bottom:not(.pc28-standard-sheet--credit,.Login-window) { max-height: 90%; }
  body > .van-popup--bottom { left: var(--jg-rail); right: 0; width: calc(100% - var(--jg-rail)); }
  body > .poster-action-popup { width: calc(100% - var(--jg-rail)) !important; }
  body > .Login-window.van-popup { left: var(--jg-rail) !important; width: calc(100% - var(--jg-rail)) !important; }
  body > .van-popup--center, body > .van-dialog { left: calc(50% + var(--jg-rail) / 2); }
  .van-popup--center { max-width: calc(100% - 32px); max-height: calc(var(--visual-viewport-height,100dvh) - 32px); overflow-y: auto; }
  .jg-payments .rcinner, .jg-payments .withdrawMain { max-width: 720px; margin-inline: auto; }
  .jg-payments .newContent { padding-bottom: 28px !important; }
  .activity .activecont .activeinner { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 16px; padding: 20px; }
  .activity .activecont .activebox { width: 100%; height: auto; aspect-ratio: 2.3; margin: 0 !important; }
  .activity .activecont .activebox .itemBg { width: 100%; height: 100%; object-fit: cover; }
  .activity .contentsdsinner { max-width: 720px; margin-inline: auto; }
  /* 二级页面使用内容区宽度，保留原数据、操作和窄屏样式。 */
  :root .LifeVip .LifeVip_Content .dengjiquanyi .quanyi_table, :root .LifeVip .LifeVip_Content .quanyiRuleArea { width: calc(100% - 48px); max-width: 880px; margin-inline: auto; }
  .LifeVip .LifeVip_Content .dengjiquanyi .quanyi_table :is(.tablehead,.head_item,.l_item) { height: 40px !important; line-height: 40px !important; font-size: 14px !important; }
  .LifeVip .LifeVip_Content .top_content :is(.progress_text,.progress .right_Text) { color: #d4dcef; font-size: 12px; }
  :root .LifeVip .LifeVip_Content .top_content .cardArea .b_box .rbox .btn { height: 40px; line-height: 40px; }
  .MyLevelPage :is(.personal,.dengji,.div_tittle) { width: calc(100% - 48px); max-width: 720px; margin-inline: auto; }
  .PersonalMain .messageArea .touzhu, .PersonalMain .RecentPlayHistory .rewardDiv { width: calc(100% - 40px); }
  .invite-v3__link-page .top_bg { max-width: 560px; margin-inline: auto; }
  .hyplan .tuiGuang .mainDataDiv { width: calc(100% - 32px); }
  .hyplan .tablebox .tableboxinner .rtfixedbox { width: calc(100% - 2.3rem); }
  .hyplan #finaceyhhl .tablebox .rtfixedbox { width: calc(100% - 3.3rem); }
  .hyplan #finacptbaoobiao .tablebox .rtfixedbox { width: calc(100% - 2rem); }
  .hyplan #finaceactive .tablebox .rtfixedbox { width: calc(100% - 2.5rem); }
  .hyplan .tablebox .rtfixedboxinner { min-width: 100%; }
  .hyplan .tablebox .rtfixedboxinner .lineboxdiv { display: flex; }
  .hyplan .tablebox .rtfixedboxinner .lineboxdiv > div { flex-grow: 1; flex-shrink: 0; }
  .hyplan .tablebox > .nonedat { display: block; float: none; clear: both; margin-inline: auto; }
  .jg-crash-frame { left: var(--jg-rail) !important; width: calc(100% - var(--jg-rail)) !important; height: var(--visual-viewport-height,100dvh) !important; }
  /* 信用盘继续使用原 Vue 面板，只调整宽度及可点击面积。 */
  :root.jg-bet-room .pc28-standard-sheet--credit .pc28-credit-content { width: 100% !important; max-width: none !important; }
  :root.jg-bet-room .pc28-standard-sheet--credit .pc28-credit-center { margin: 0 12px !important; }
  :root.jg-bet-room .credit-option { min-height: 54px; }
  :root.jg-bet-room .credit-groups button { min-height: 44px; }
  :root.jg-bet-room .jg-bet-tabs button { min-height: 44px; }
  :root.jg-bet-room .jg-draw__balls { justify-content: center; gap: 20px; }
  :root.jg-bet-room .pc28-standard-sheet--credit .botconentent { flex: 0 0 auto !important; height: auto !important; }
  :root.jg-bet-room .botconentent .pc28-credit-amounts__bar { min-height: 44px; }
  :root.jg-bet-room .botconentent :is(.pc28-credit-amounts,.pc28-credit-amounts__bar,.bottom1-select) { height: 44px !important; }
  :root.jg-bet-room .botconentent :is(.bottom1-del,.moneyselectItem,.quick-entry,.setmoney) { min-height: 44px !important; }
  :root.jg-bet-room .zhuotou-source-chrome .header .back { position: absolute; left: 12px; width: 44px; }
  :root.jg-bet-room .zhuotou-source-chrome .header .right-set { position: absolute; right: 112px; width: 44px; }
  .liuhe-gameplay { max-width: 100% !important; }
  .jg-auth-page:not(#_) .loginInner { padding-inline: max(24px,calc(50% - 280px)); }
}
@media (min-width: 640px) and (max-width: 1099px) {
  .jg-wide-nav .jg-wide-brand::after { display: none; }
}
@media (min-width: 1100px) {
  :root { --jg-rail: 216px; --jg-gutter: 28px; }
  .jg-wide-nav { padding-inline: 18px; }
  .jg-wide-nav .jg-wide-brand { width: 172px; height: 48px; margin-bottom: 28px; border-radius: 999px; }
  .jg-wide-brand img { margin-left: 0; width: 148px; height: auto; }
  .jg-wide-nav :is(a:not(.jg-wide-brand),button) { justify-content: flex-start; padding-inline: 16px; }
  .jg-wide-nav :is(a,button) span { display: inline; }
  .jg-wide-dot { position: static; margin-left: auto; box-shadow: none; }
  .jg-wide-unread { position: static; margin-left: auto; box-shadow: none; }
  .jg-wide-nav__section > p { display: block; margin: 0 16px 12px; color: var(--jb-assist); font-size: 12px; }
  :root .hallPage .toppart { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; align-items: start; }
  .hallPage .toppart > .jg-brand-hero, .hallPage .toppart > .centerArea, .hallPage .toppart > .noticecontent { grid-column: 1 / -1; }
  :root .jg-hero-hall .jg-brand-hero { height: 240px; margin-bottom: 0; }
  .jg-brand-hero__copy { padding: 20px 0 0 44px; }
  .jg-brand-hero__copy h2 { font-size: 44px; }
  .jg-brand-hero__person { right: 10%; height: 310px; }
  .hallPage .centerArea { margin-block: 0 !important; }
  .jg-play-grid, .jg-extras { width: 100%; max-width: none; margin: 0 !important; }
  .jg-play-grid, .jg-extras { padding-inline: 12px; box-sizing: border-box; }
  :root .hallPage .jg-play-grid--tiles {
    grid-template-areas: "pc world ascend live sports" "pc slots ascend live sports";
    grid-template-columns: minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr) repeat(2,minmax(0,.75fr)); grid-template-rows: repeat(2,minmax(0,1fr));
    aspect-ratio: 3 / 1; min-height: 270px; max-height: 420px;
  }
  :root .hallPage .jg-play-grid--tiles .jg-play { grid-column: auto; grid-row: auto; aspect-ratio: auto; height: 100%; min-height: 0; }
  :root .hallPage .jg-play-grid--tiles .jg-play--pc20 { grid-area: pc; }
  :root .hallPage .jg-play-grid--tiles .jg-play--world { grid-area: world; }
  :root .hallPage .jg-play-grid--tiles .jg-play--slots { grid-area: slots; }
  :root .hallPage .jg-play-grid--tiles .jg-play--ascend { grid-area: ascend; }
  :root .hallPage .jg-play-grid--tiles .jg-play--live { grid-area: live; }
  :root .hallPage .jg-play-grid--tiles .jg-play--sports { grid-area: sports; }
  .jg-footer__panel { margin-top: 20px; }
  .jg-footer__contact { padding-block: 24px; }
  .jg-footer__contact h3 { font-size: 20px; }
  .jg-auth-page:not(#_) .loginInner { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,460px); grid-template-rows: auto 1fr; gap: 0 28px; align-content: start; align-items: center; min-height: 100%; padding: 28px 28px 40px; background-size: 100% 100%; }
  .jg-auth-page .jg-auth-header { grid-column: 1 / -1; margin: 0 0 24px; }
  .jg-auth-page .jg-auth-banner { height: 400px; margin: 0; align-self: center; }
  .jg-auth-banner__default { padding: 24px 8px 0; }
  .jg-auth-banner__default img { max-width: 100%; height: 82%; right: -24px; }
  .jg-auth-banner__default strong { font-size: 32px; }
  .jg-auth-banner--configured { height: auto !important; width: 100%; aspect-ratio: 2.64; }
  .jg-auth-page:not(#_) .loginPage { align-self: center; padding: 28px; }
  :root .LifeVip .LifeVip_Content .top_content { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-rows: auto auto auto auto; gap: 12px 32px; min-height: 0; padding: 28px 40px; justify-items: center; }
  :root .LifeVip .LifeVip_Content .top_content > :not(.cardArea) { grid-column: 1; margin-top: 0; }
  :root .LifeVip .LifeVip_Content .top_content .cardArea { position: relative; bottom: auto; grid-column: 2; grid-row: 1 / span 4; width: 100%; max-width: 380px; margin-top: 0; padding-right: 16px; }
  :root .LifeVip .LifeVip_Content .top_content .progress .gressBgBox { width: auto; flex: 1; }
  .LifeVip.vip-source--honor-life .LifeVip_Content .dengjiquanyi { padding-top: 32px; }
  :root.jg-bet-room .pc28-standard-sheet--credit .botconentent { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,35%); align-items: center; gap: 20px; }
  :root.jg-bet-room .botconentent :is(.pc28-credit-amounts,.pc28-credit-amounts__bar,.btoclassline) { width: 100% !important; max-width: none !important; margin: 0 !important; }
  :root.jg-bet-room .botconentent .bottom1-select { flex: 1; min-width: 0; }
  :root.jg-bet-room .botconentent .setmoney { width: 90px !important; }
}
@media (min-width: 640px) and (max-height: 600px) {
  .jg-wide-nav { padding-block: 8px; }
  .jg-wide-nav .jg-wide-brand { margin-bottom: 8px; }
  .jg-wide-nav nav { gap: 2px; }
  .jg-wide-nav__section { margin-top: 8px; padding-top: 8px; }
  .jg-wide-nav__foot { padding-top: 12px; }
  :root .jg-hero-hall .jg-brand-hero { height: 210px; }
  .jg-brand-hero__person { height: 260px; }
  :root.jg-bet-room .jg-draw { display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 4px 12px; padding-block: 8px; }
  :root.jg-bet-room .jg-draw__head { grid-column: 1; grid-row: 1; }
  :root.jg-bet-room .jg-draw__head h2 { font-size: 12px; }
  :root.jg-bet-room .jg-draw__balls { grid-column: 1; grid-row: 2; margin: 0; padding: 0; gap: 12px; min-height: 40px; }
  :root.jg-bet-room .jg-ball { width: 34px; height: 34px; font-size: 18px; }
  :root.jg-bet-room .jg-draw__next { grid-column: 2; grid-row: 1 / 3; display: grid; gap: 4px; margin: 0; padding: 6px 10px; }
  :root.jg-bet-room .jg-draw__ring { display: none; }
  :root.jg-bet-room .jg-draw__wallet { align-items: center; flex-direction: row; justify-content: space-between; }
}
