/* R25：保持原有色彩与卡片样式，仅修正手机尺寸、短屏、键盘与长文字溢出。 */
/* 投放页只保留右上角返回入口，触控区域不小于44px。 */
.compact-gift>.wrap>.secondary-backbar{left:0;right:auto;top:4px;z-index:4}
.compact-gift>.wrap>.secondary-backbar .secondary-back{min-width:64px;min-height:44px;display:inline-flex;justify-content:center;align-items:center;font-size:11px;padding:8px 12px;box-sizing:border-box}
.compact-gift .gift-page-title{padding-top:48px}
.compact-gift .multi-gift-selection>b{min-width:0;max-width:none;overflow-wrap:anywhere;white-space:normal}
.compact-gift .multi-gift-selection>span{flex-shrink:0}
@media(max-width:700px){
  /* 动态地址栏与底部安全区域；短屏允许自然滚动，不能裁切表单或入口。 */
  .headerless-member.compact-rewards{height:auto;min-height:100svh;min-height:100dvh;overflow:visible;padding-bottom:calc(108px + env(safe-area-inset-bottom,0px))}
  .compact-rewards>.wrap{height:auto;min-width:0}
  .headerless-member.secondary-member.compact-gift{height:auto;min-height:100svh;min-height:100dvh;overflow:visible;padding-bottom:max(18px,env(safe-area-inset-bottom,0px))}
  .compact-gift>.wrap{height:auto;min-width:0}
  .compact-gift>.wrap>.secondary-backbar{left:15px;right:auto;top:4px}
  .compact-gift .gift-page-title{padding:48px 0 10px}
  .compact-gift .gift-page-title h1{overflow-wrap:anywhere}
  .compact-gift .gift-studio{flex:0 0 auto;min-width:0;gap:12px}
  .compact-gift .gift-compass{flex:none;height:clamp(228px,37svh,300px);min-height:228px;max-height:300px;max-width:340px;width:100%;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
  .compact-gift .compass-gift{width:min(97px,100%);max-width:100%;height:100%;max-height:98px;min-height:44px}
  .compact-gift .compass-gift b{max-width:100%;overflow-wrap:anywhere;font-size:10px}
  .compact-gift .compass-center{min-width:0;max-width:100%}
  .compact-gift .compass-center span{max-width:100%;font-size:5px;letter-spacing:.4px;overflow-wrap:anywhere}
  .compact-gift .gift-order{min-width:0}
  .compact-gift .field>span{flex-wrap:wrap;gap:3px 8px}
  .compact-gift .field>span>small{margin-left:auto}
  .compact-gift .gift-order .btn{min-height:44px}
  .compact-gift .multi-gift-selection>b{font-size:10px}
  .compact-gift.keyboard-open>.wrap{height:auto!important}
  .compact-gift.keyboard-open .gift-page-title{padding-top:48px}
  /* 单入口维持小卡片；窄屏及英文标题换行后不裁切。 */
  .compact-gates.single-gate-r20 .gate{height:auto;min-height:170px;max-height:none;grid-template-columns:65px minmax(0,1fr) 82px;gap:9px;padding:14px 12px}
  .single-gate-r20 .gate-art,.single-gate-r20 .gate-art>.icon{width:65px;height:76px;max-width:100%;object-fit:contain}
  .single-gate-r20 .compact-gate-info{min-width:0;overflow-wrap:anywhere}
  .compact-gates.single-gate-r20 .gate .btn{width:82px;max-width:82px;min-height:44px;font-size:10px;line-height:1.5}
  html[lang="en-US"] .single-gate-r20 .compact-gate-info h2{font-size:18px;line-height:1.35;letter-spacing:0}
  /* 长账号、银行卡资料、记录与弹窗内容不能撑宽手机页面。 */
  .member>.wrap,.member .form-row>*,.account-facts>div>*,.bank-card-bottom>div,.service-grid>*{min-width:0}
  .member .form-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .account-facts b,.bank-account-number,.bank-card-bottom b,.bank-card-top b,.member-info h1,.member-info h2{overflow-wrap:anywhere;word-break:normal}
  .gift-confirm-list>div{min-width:0;flex-wrap:wrap}
  .gift-confirm-list>div>span{min-width:0;overflow-wrap:anywhere;flex:1}
  .gift-confirm-list>div>b{margin-left:auto;overflow-wrap:anywhere;max-width:100%}
  .gift-confirm-total{flex-wrap:wrap;max-width:100%}
  .bottom-nav{max-width:100%;min-width:0;padding-left:max(10px,env(safe-area-inset-left,0px));padding-right:max(10px,env(safe-area-inset-right,0px))}
  .bottom-nav a{min-width:0}
  dialog{max-width:calc(100% - 28px);max-height:calc(100svh - 28px);max-height:calc(100dvh - 28px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior:contain}
  dialog .modal-title h2{overflow-wrap:anywhere}
  .modal-actions{flex-wrap:wrap}
}
@media(max-width:360px){
  .compact-gates.single-gate-r20 .gate{grid-template-columns:52px minmax(0,1fr) 75px;gap:7px;padding:12px 10px}
  .single-gate-r20 .gate-art,.single-gate-r20 .gate-art>.icon{width:52px;height:65px}
  .compact-gates.single-gate-r20 .gate .btn{width:75px;max-width:75px}
  .single-gate-r20 .compact-gate-info h2{font-size:18px}
  html[lang="en-US"] .single-gate-r20 .compact-gate-info h2{font-size:16px}
}
@media(max-width:700px) and (orientation:landscape){
  .compact-gift .gift-compass{height:228px}
}
