/* Touch interaction overrides; desktop dimensions remain unchanged. */
.dialog-header{display:contents}
.list-filter-actions{display:none}
.list-mobile-export{display:none}
.deposit-funding{min-width:0;margin-block:14px;padding-block:8px;border-block:1px solid var(--line)}
.deposit-funding .info-line{gap:12px;align-items:start;white-space:normal}
.deposit-funding .info-line>strong{min-width:0;text-align:end;overflow-wrap:anywhere}
.deposit-amount-caption{display:block;font-size:12px;line-height:1.6;color:var(--muted)}
.credit-form-footer{padding-block:12px 2px;background:var(--panel);isolation:isolate}
@media(max-width:900px){
  #dialog:has(#admin-deposit-form,#review-form){scroll-padding-block-end:96px}
  #dialog :is(#admin-deposit-form,#review-form){min-width:0;scroll-margin-block:84px 20px}
  #dialog :is(#admin-deposit-form,#review-form) :is(input,textarea){font-size:16px;min-height:44px;max-width:100%}
  #dialog :is(#admin-deposit-form,#review-form) .form-grid{grid-template-columns:minmax(0,1fr);gap:0}
  #dialog :is(#admin-deposit-form,#review-form) .form-summary{gap:10px;flex-wrap:wrap;align-items:start}
  #dialog :is(#admin-deposit-form,#review-form) .form-summary>strong{min-width:0;overflow-wrap:anywhere}
  #dialog .credit-form-footer{position:sticky;inset-block-end:-20px;z-index:3;margin-inline:-4px;padding:12px 4px max(12px,env(safe-area-inset-bottom,0px))}
  #dialog .credit-form-footer>button{width:100%;min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere}
  :is(#dialog,.shell) .deposit-funding .info-line{font-size:14px;line-height:1.65;flex-wrap:wrap}
}
.scheme-summary{border:1px solid var(--line);border-radius:12px;padding:12px 16px;margin-block:18px;min-width:0;background:var(--surface-soft)}
.scheme-summary:empty{display:none}
.scheme-summary .info-line{gap:12px;align-items:start}
.scheme-summary .info-line>strong{min-width:0;text-align:end;overflow-wrap:anywhere}
.scheme-quota-note{margin-block:12px 18px}
@media(max-width:600px){.scheme-summary .info-line{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}.scheme-summary .info-line>strong{text-align:start}}
@media(max-width:900px){
  .staff-shell :is(.table-foot,.server-list>.panel-head,.selection-count){font-size:13px;line-height:1.65}
  .staff-shell :is(.advanced-filters>summary,.column-picker>summary){min-height:44px;font-size:14px;line-height:1.6}
  .staff-shell .filter-grid .field{min-width:0}
  .staff-shell .filter-grid :is(input,select){min-width:0;max-width:100%;width:100%}
  .staff-shell .list-filter-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-block:10px 16px}
  .staff-shell .list-filter-actions>.btn{min-width:0;width:100%;justify-content:center}
  .staff-shell .column-picker>div{inset-block-start:calc(100% + 6px)}
  .staff-shell .column-picker label{display:flex;align-items:center;min-height:44px;gap:10px;font-size:14px;white-space:normal;line-height:1.6}
  .staff-shell .column-picker label input{margin:0;flex-shrink:0}
  .staff-shell .server-list>.panel-head .actions{flex-wrap:wrap;gap:8px}
  .staff-shell .server-list>.panel-head .selection-count{flex-basis:100%}
  .shell{font-size:14px;line-height:1.6}
  .shell .breadcrumb{font-size:12px;line-height:1.6}
  .shell .mobile-dock a{font-size:11px;line-height:1.5}
  .shell .title-row h1{font-size:clamp(24px,6.6vw,28px);line-height:1.35;overflow-wrap:anywhere}
  .shell .title-row p{font-size:14px;line-height:1.75}
  :is(.shell,#dialog) :is(.security-note,.notice,.management-error,.error){font-size:13px;line-height:1.75;overflow-wrap:anywhere}
  :is(.shell,#dialog) .field>span{font-size:14px;line-height:1.55}
  :is(.shell,#dialog) .btn:not(.close):not(.theme-toggle):not(.mobile-toggle):not(.header-notifications){font-size:14px;line-height:1.55;white-space:normal;overflow-wrap:anywhere}
  :is(.shell,#dialog) .info-line{font-size:14px;line-height:1.65}
  .shell :is(.stat-label,.customer-balance-label){font-size:13px;line-height:1.6}
  .shell :is(.stat-foot,.customer-order-identity>small,.customer-order-identity>span){font-size:12px;line-height:1.65}
  .shell .stat-value{font-size:clamp(24px,6.6vw,30px);line-height:1.3;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
  #dialog :is(.deposit-snapshot,.withdrawal-snapshot,.order-detail-content) h3{font-size:17px;line-height:1.5}
  #dialog .order-detail-amount>span{font-size:14px}
  #dialog .order-detail-amount>strong{font-size:clamp(28px,8vw,34px);font-variant-numeric:tabular-nums}
  #dialog .order-detail-ledger>summary{display:list-item;min-height:44px;padding-block:10px;font-size:14px;line-height:1.6}
  .shell:not(.sell-page-shell) .content{padding-block-end:calc(112px + env(safe-area-inset-bottom,0px))}
  input.form-control:not(#buy-quantity):not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),:is(.shell,dialog,.login-page) :is(textarea.form-control,select.form-select),.language-picker-search input{font-size:16px;min-height:44px}
  .shell :is(.btn,.mobile-toggle,.theme-toggle,.header-notifications,.language-picker-trigger),.login-page .btn,dialog :is(.btn,button),.language-picker-option{min-height:44px}
  .shell :is(.mobile-toggle,.theme-toggle,.header-notifications),dialog .close,.navigation-close{min-width:44px;min-height:44px}
  .topbar .top-actions :is(.header-notifications,.theme-toggle){width:44px;height:44px;flex-basis:44px}
  .topbar .top-actions .language-picker-trigger{min-height:44px}
  .mobile-dock a{min-height:44px}
  .buy-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  .buy-presets>button{min-width:0;width:100%;padding-inline:4px;font-size:12px}
  .buy-presets>[data-action=buy-max]{grid-column:1/-1}
  .field:has(.form-check-input)>span{display:flex;align-items:center;min-height:44px;gap:6px}
  .field .form-check-input{flex-shrink:0}
  dialog#dialog{padding:20px;max-height:calc(var(--mobile-visible-height,100dvh) - 24px);overscroll-behavior:contain;scroll-padding-block:84px 20px}
  #dialog .dialog-header{display:flex;position:sticky;inset-block-start:-20px;z-index:4;align-items:center;gap:12px;min-height:64px;margin:-20px -20px 18px;padding:10px 16px;background:var(--panel);border-block-end:1px solid var(--line)}
  #dialog .dialog-header>.close{position:static;order:2;inset:auto;flex:0 0 44px;width:44px;height:44px;margin:0}
  #dialog .dialog-header>h2{order:1;flex:1;min-width:0;padding:0;margin:0;font-size:18px;line-height:1.5;overflow-wrap:anywhere}
  .mobile-keyboard-open :is(.mobile-dock,.sell-page-shell .sw-summary-actions){display:none!important}
  .mobile-keyboard-open dialog#dialog[open]{position:fixed;inset-block-start:calc(var(--mobile-viewport-top,0px) + 12px);inset-block-end:auto;margin-block:0}
  .sell-page-shell .sell-header-actions :is(.header-notifications,.language-picker-trigger){width:44px;min-width:44px;height:44px}
  .sell-page-shell .sell-header-actions .sell-logout{min-height:44px}
  :is(input,textarea,select){scroll-margin-block:90px}
}
@media(max-width:600px){
  .staff-shell .adaptive-table tbody td{font-size:14px;line-height:1.65}
  .staff-shell .adaptive-table :is(.mobile-cell-label,.mobile-select-label){font-size:12px;line-height:1.6}
  .staff-shell .adaptive-table td :is(small,.tag){font-size:12px;line-height:1.6}
  .staff-shell .adaptive-table .mono{font-size:12px;line-height:1.6}
  .staff-shell .server-list:is([data-list-view=users],[data-list-view=admins],[data-list-view=accounts]) .adaptive-table td:nth-child(3),.staff-shell .server-list[data-list-view=orders] .adaptive-table td:nth-child(2){grid-column:1/-1}
  .staff-shell .list-quick-row>.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}
  .staff-shell .list-quick-row>.actions>button[type=submit]{grid-column:1/-1}
  .staff-shell .list-quick-row>.actions>.btn{width:100%;min-width:0;justify-content:center}
  .staff-shell :is(.filter-grid,.agency-filter-grid) .field:has(input[type=date]){grid-column:1/-1}
  .staff-shell .column-picker{width:100%;min-width:0}
  .staff-shell .column-picker>div{position:static;min-width:0;width:100%;max-height:min(360px,calc(var(--mobile-visible-height,100dvh) - 180px));overflow:auto;overscroll-behavior:contain;margin-block-start:6px;padding:8px 12px;box-shadow:none}
  .staff-shell .table-foot{align-items:stretch}
  .staff-shell .table-foot .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}
  .staff-shell .table-foot :is(select,.form-select){grid-column:1/-1;width:100%;max-width:none}
  .staff-shell .table-foot .btn{width:100%;min-width:0;justify-content:center}
  .staff-shell .agency-page .table-foot .actions{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center}
  .staff-shell .agency-page .table-foot .actions>bdi{white-space:nowrap;text-align:center;font-size:13px}
  #dialog #review-form .info-line{gap:8px;flex-wrap:wrap}
  #dialog #review-form .info-line>strong{max-width:100%;overflow-wrap:anywhere}
}
.localized-date{position:relative;display:block;min-width:0;width:100%}
.localized-date>input[data-date-text]{width:100%;padding-right:48px;min-width:0}
.localized-date>input[data-date-text][lang="ar"]:placeholder-shown{direction:rtl;text-align:right}
.localized-date-icon{position:absolute;right:14px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--muted);font-size:22px;line-height:1}
.localized-date>input.localized-date-picker{position:absolute;right:0;top:0;width:44px;height:100%;min-width:0;min-height:44px;margin:0;padding:0;opacity:0;cursor:pointer}
.localized-date-picker::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;cursor:pointer}
.localized-date:has(.localized-date-picker:focus-visible){outline:2px solid var(--accent,#9ad8bf);outline-offset:2px;border-radius:10px}
@media(max-width:700px){
  .staff-shell .adaptive-table tbody td .btn{min-width:44px;min-height:44px}
  .staff-shell .agency-date-shortcuts>button{min-width:44px}
  .staff-shell .list-filter-actions>button{min-width:0;width:100%;min-height:44px;white-space:normal;overflow-wrap:anywhere;justify-content:center}
  .staff-shell .list-filter-actions:has(.list-mobile-export)>button[type=submit]{grid-column:1/-1}
  .staff-shell .list-mobile-export{display:inline-flex}
  .staff-shell .agency-table td,#dialog .agency-detail .agency-table td{font-size:14px;line-height:1.65}
  .staff-shell .agency-table td:before,#dialog .agency-detail .agency-table td:before{font-size:12px;line-height:1.6}
  .staff-shell .agency-table td small,#dialog .agency-detail .agency-table td small{font-size:12px;line-height:1.6}
}
@media(max-width:380px){
  #dialog .order-detail-content .info-line{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
  #dialog .order-detail-content .info-line>strong{width:100%;max-width:none;text-align:start}
}

/* Khmer requires taller line boxes so vowel marks remain visible. */
html[lang=km] body{font-family:"Noto Sans Khmer","Leelawadee UI",system-ui,sans-serif;line-height:1.7;letter-spacing:normal}
html[lang=km] :is(button,input,select,textarea){font-family:inherit;line-height:1.65;letter-spacing:normal}
html[lang=km] :is(h1,h2,h3,.nav-item,.field>span){line-height:1.7;letter-spacing:normal}

@media(max-width:480px){
  .staff-shell .topbar{height:76px;min-height:76px;padding-block:13px}
  .staff-shell .topbar .breadcrumb{flex:0 0 44px;flex-wrap:nowrap}
  .staff-shell .topbar .breadcrumb>span{display:none}
  .staff-shell .topbar .top-actions{max-width:calc(100% - 54px);margin-inline-start:auto}
  .staff-shell .topbar .language-picker-trigger{min-width:90px;max-width:130px}
}
@media(max-width:700px){
  #sell-workspace .sw-auto-bar>button{min-height:44px}
  #sell-workspace .sw-summary-row>button{min-width:44px;min-height:44px}
}
@media(max-width:480px){
  .user-shell .topbar{height:76px;min-height:76px;padding-block:13px}
  .user-shell .topbar .breadcrumb{flex:0 0 44px;flex-wrap:nowrap}
  .user-shell .topbar .breadcrumb>span{display:none}
  .user-shell .topbar .top-actions{max-width:calc(100% - 54px);margin-inline-start:auto}
  .user-shell .topbar .language-picker-trigger{min-width:90px;max-width:130px}
  .sell-page-shell .sell-header-actions .sell-logout{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;padding:10px}
  .sell-page-shell .sell-header-actions .sell-logout>.sell-logout-label{display:none}
  .sell-page-shell .sell-header-actions .sell-logout>.ui-icon{display:inline-block;flex:none;width:20px;height:20px}
}

