/* Presentation only. Applied after role-specific styles; never affects PC mode. */
@media(max-width:767px), (max-width:1024px) and (pointer:coarse){
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]){-webkit-text-size-adjust:100%}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) :is(button,summary,.kpi[onclick]){min-height:44px;min-width:44px;touch-action:manipulation}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) :is(button,summary){line-height:1.5;word-break:keep-all;overflow-wrap:anywhere;max-width:100%;box-sizing:border-box}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) :is(.chip,.done-btn,.x){height:auto!important;white-space:normal!important;flex-shrink:0}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) :is(.kpi .n,.kpi .s,.kpi .l){white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;line-height:1.5}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) :is(.kpi .l,.kpi .s){word-break:keep-all}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) :is(.ph,.mh,.om-section-title,.hm-section-heading){gap:12px;flex-wrap:wrap}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) :is(.pt,.mt,.hm-context,.om-card-label){word-break:keep-all;overflow-wrap:anywhere;min-width:0}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) #modal{max-height:90vh;max-height:90dvh;overscroll-behavior-y:contain;scroll-padding-block:76px 24px}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) #modal .mh{align-items:center}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) #modal .mt{flex:1;margin:0}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) #modal .x{flex:0 0 auto;padding:10px 12px}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) input[type="date"]{min-width:0;box-sizing:border-box}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) input[type="date"]::-webkit-date-and-time-value{text-align:left;min-height:1.5em}
  html[data-hq-mobile="true"] :is(.hm-brand,.hm-context>span,.hm-section-heading h2){min-width:0;overflow-wrap:anywhere}
  html[data-hq-mobile="true"] .hm-device-open{flex-wrap:wrap}
  html[data-hq-mobile="true"] .hm-device-open>span:first-child{flex:1 1 150px}
  html[data-hq-mobile="true"] .hm-device-fields{gap:18px 12px}
  html[data-hq-mobile="true"] :is(.hm-payment-device,.hm-payment-theme){white-space:normal;overflow:visible;text-overflow:clip;word-break:keep-all;overflow-wrap:anywhere;line-height:1.6}
  html[data-hq-mobile="true"] .hm-payment-summary{row-gap:8px}
  html[data-hq-mobile="true"] .hm-payment-amount b{white-space:nowrap}
  html[data-hq-mobile="true"] .hm-revenue>span{flex-wrap:wrap}
  html[data-owner-mobile="true"] .om-scope{word-break:keep-all}
  html[data-owner-mobile="true"] .om-scope>span{flex-shrink:0}
  html[data-owner-mobile="true"] :is(.om-device-head p,.om-message,.om-link){overflow-wrap:anywhere;word-break:keep-all}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) :is(.hm-bottom button,.om-bottom button){min-width:0;min-height:56px}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) .wrap{padding-left:max(16px,env(safe-area-inset-left))!important;padding-right:max(16px,env(safe-area-inset-right))!important}
  html[data-hq-mobile="true"] #hqMobileTop{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
}
@media(max-width:380px){
  html[data-hq-mobile="true"][data-console-view="기기"] .view>.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html[data-hq-mobile="true"] .hm-period-dates{grid-template-columns:minmax(0,1fr)}
  html[data-hq-mobile="true"] .hm-payment-columns{display:none}
  html[data-hq-mobile="true"] .hm-payment-summary{grid-template-columns:minmax(0,1fr) 80px;grid-template-areas:'device amount' 'theme amount' 'time amount';column-gap:12px;padding:12px 0}
  html[data-hq-mobile="true"] .hm-payment-device{grid-area:device;font-weight:650}
  html[data-hq-mobile="true"] .hm-payment-theme{grid-area:theme;color:var(--muted)}
  html[data-hq-mobile="true"] .hm-payment-time{grid-area:time;text-align:left;font-size:10px}
  html[data-hq-mobile="true"] .hm-payment-amount{grid-area:amount}
  html[data-hq-mobile="true"] .hm-revenue{padding:16px 12px}
  html[data-hq-mobile="true"] .hm-revenue strong{font-size:18px}
  html[data-hq-mobile="true"] .hm-brand>span{display:none}
  html[data-owner-mobile="true"] .om-coupon-form{grid-template-columns:minmax(0,1fr)}
  html[data-owner-mobile="true"] .om-custom-dates label{grid-template-columns:minmax(0,1fr);gap:8px}
  html[data-owner-mobile="true"] :is(.om-payment-row,.om-sales-store)>div{flex-wrap:wrap;gap:8px}
  html[data-owner-mobile="true"] .om-period-option{padding:12px;gap:6px}
}
@media(max-width:1024px) and (pointer:coarse) and (max-height:500px), (max-width:767px) and (max-height:500px){
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) :is(#hqMobileTop,#ownerMobileTop){position:static}
  html:is([data-hq-mobile="true"],[data-owner-mobile="true"]) #modal{max-height:96vh;max-height:96dvh}
}
