/* Mobile-only compatibility layer; loaded after the desktop admin styles. */
@media (max-width: 860px) {
  body:not(.admin-locked) { height:100dvh; font-size:14px; }
  body:not(.admin-locked) .app { height:100dvh; min-height:0; }
  body:not(.admin-locked) .main { width:100%; min-width:0; min-height:0; }
  body:not(.admin-locked) .topbar { height:auto; min-height:60px; padding:8px 12px; gap:8px; }
  body:not(.admin-locked) .admin-topbar-title { flex:1 1 auto; gap:10px; }
  body:not(.admin-locked) .ptitle { font-size:18px; line-height:1.4; overflow-wrap:anywhere; }
  body:not(.admin-locked) .tbr { gap:8px; font-size:12px; line-height:1.5; }
  body:not(.admin-locked) #admin-user { overflow-wrap:anywhere; }
  body:not(.admin-locked) .top-action { min-height:44px; padding:8px; font-size:13px; }
  body:not(.admin-locked) .top-divider { display:none; }
  body:not(.admin-locked) .admin-sidebar-toggle { min-width:64px; height:44px; min-height:44px; gap:8px; border-radius:8px; font-size:14px; }
  body:not(.admin-locked) .admin-sidebar-toggle::after { content:none; }
  body:not(.admin-locked) #sb { height:100dvh; padding-bottom:env(safe-area-inset-bottom,0px); overscroll-behavior:contain; }
  body:not(.admin-locked) #sb .collapse-btn { display:block; height:44px; min-height:44px; margin:4px 12px 12px; width:calc(100% - 24px); font-size:14px; }
  body:not(.admin-locked) #sb #admin-nav .ni { min-height:48px; height:auto; padding:10px 20px; font-size:15px; line-height:1.5; }
  body:not(.admin-locked) #sb #admin-scope-tabs button { min-height:44px; height:auto; font-size:14px; }
  body:not(.admin-locked) #sb .ns { padding:14px 20px 6px; font-size:12px; }
  body:not(.admin-locked) #sb .service-switch { min-height:44px; font-size:14px; }
  body:not(.admin-locked) #content { min-width:0; padding:12px 12px calc(20px + env(safe-area-inset-bottom,0px)); overscroll-behavior-y:contain; scroll-padding-block:12px; }
  body:not(.admin-locked) #content :is(.card,.admin-list-toolbar,.admin-filter-grid,.admin-form-grid,.admin-filter-field) { min-width:0; max-width:100%; }
  body:not(.admin-locked) #content .ch { height:auto; min-height:52px; padding:12px; gap:10px; flex-wrap:wrap; }
  body:not(.admin-locked) #content :is(.admin-card-heading,.ctit) { font-size:15px; line-height:1.5; }
  body:not(.admin-locked) #content :is(dt,.fl),body:not(.admin-locked) dialog .fl { font-size:13px; line-height:1.5; }
  body:not(.admin-locked) #content dd { font-size:14px; line-height:1.55; overflow-wrap:anywhere; }
  body:not(.admin-locked) dialog .admin-edit-field-note { font-size:12px; line-height:1.55; }
  body:not(.admin-locked) #content :is(.admin-info-band,.admin-note,.admin-filter-note) { font-size:13px; line-height:1.65; overflow-wrap:anywhere; }
  body:not(.admin-locked) #content :is(small,.admin-table-subline,.admin-member-meta,.admin-member-summary-scope,.admin-filtered-summary-scope) { font-size:12px; line-height:1.55; }
  body:not(.admin-locked) #content :is(.btn,.admin-sort-button,.payment-status-tab,.admin-dealer-link,.admin-row-link,.admin-list-toolbar button),
  body:not(.admin-locked) dialog :is(.btn,button) { min-height:44px!important; height:auto; min-width:44px; font-size:14px; line-height:1.45; padding:8px 12px; }
  body:not(.admin-locked) #content .payment-ledger td button[data-payment-action="detail"],
  body:not(.admin-locked) #content .tw td button[data-settlement-action="detail"] { height:44px; min-height:44px; font-size:14px; }
  body:not(.admin-locked) #content .payment-ledger td button[data-payment-action="detail"]::after { content:none; }
  body:not(.admin-locked) #content :is(.fi,.fs,input:not([type="checkbox"],[type="radio"],[type="hidden"]),select,textarea),
  body:not(.admin-locked) dialog :is(input:not([type="checkbox"],[type="radio"],[type="hidden"]),select,textarea) { min-height:44px; max-width:100%; min-width:0; font-size:16px!important; line-height:1.4; }
  body:not(.admin-locked) #content textarea,
  body:not(.admin-locked) dialog textarea { padding:10px 12px; }
  body:not(.admin-locked) #content :is(.admin-filter-grid,.admin-form-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 12px; }
  body:not(.admin-locked) #content .admin-filter-field { font-size:13px; gap:7px; }
  body:not(.admin-locked) #content .admin-date-range { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
  body:not(.admin-locked) #content .admin-filter-shell>summary { min-height:48px; padding:12px; font-size:14px; }
  body:not(.admin-locked) #content :is(.admin-filter-actions,.admin-form-actions,.admin-page-actions,.admin-action-group,.actions) { flex-wrap:wrap; gap:8px; white-space:normal; }
  body:not(.admin-locked) #content .admin-list-toolbar { gap:10px; padding:12px; }
  body:not(.admin-locked) #content .admin-page-size { margin-left:auto; gap:8px; font-size:13px; }
  body:not(.admin-locked) #content .admin-pagination { gap:8px; font-size:13px; flex-wrap:wrap; }
  body:not(.admin-locked) #content .tw { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
  body:not(.admin-locked) #content .tw :is(th,td) { font-size:14px; line-height:1.5; padding:10px 12px; }
  body:not(.admin-locked) #content .tw .bdg { height:auto; min-height:24px; font-size:12px; line-height:1.4; }
  body:not(.admin-locked) #content .admin-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  body:not(.admin-locked) #content .payment-primary .admin-summary-grid { grid-template-columns:minmax(0,1fr); }
  body:not(.admin-locked) #content :is(.admin-summary-card,.kpi) { padding:12px; }
  body:not(.admin-locked) #content :is(.admin-summary-card,.kpi)>span { font-size:12px; line-height:1.5; }
  body:not(.admin-locked) #content :is(.admin-summary-card,.kpi)>strong { font-size:22px; overflow-wrap:anywhere; }
  body:not(.admin-locked) #content :is(.motorcycle-detail-tabs,.admin-dealer-workspace-tabs) { max-width:100%; overflow-x:auto; }
  body:not(.admin-locked) #content :is(.motorcycle-detail-tabs,.admin-dealer-workspace-tabs) button { flex-shrink:0; min-height:44px; font-size:14px; }
  body:not(.admin-locked) dialog { max-width:calc(100vw - 20px); max-height:calc(100dvh - 20px); }
  body:not(.admin-locked) dialog :is(.admin-edit-dialog-body,.admin-edit-dialog-content,.franchise-edit-form,.motorcycle-workflow-form,.admin-lease-day-dialog-body) { min-width:0; overflow:auto; overscroll-behavior:contain; }
  body:not(.admin-locked) :is(.admin-edit-dialog-close,.admin-lease-day-dialog-head>[data-member-action="lease-day-close"]) { width:44px; height:44px; min-height:44px; }
  body:not(.admin-locked) .admin-password-wrap button { min-width:44px; min-height:44px; top:0; right:0; }
  body:not(.admin-locked) #content [hidden],body:not(.admin-locked) dialog [hidden] { display:none!important; }

  /* A rider remains one semantic row. Sort controls stay available above the cards. */
  body:not(.admin-locked) #content .card:has(.admin-lease-operations-table) { container-type:normal; }
  body:not(.admin-locked) #content table.admin-lease-operations-table { display:block; width:100%; min-width:0; }
  body:not(.admin-locked) #content .admin-lease-operations-table colgroup { display:none; }
  body:not(.admin-locked) #content .admin-lease-operations-table thead { display:block; }
  body:not(.admin-locked) #content .admin-lease-operations-table thead tr { display:flex; max-width:100%; overflow-x:auto; padding:8px; gap:6px; background:#edf8ef; }
  body:not(.admin-locked) #content .admin-lease-operations-table th { display:block; flex:0 0 auto; height:auto; padding:0; border:0; position:static; box-shadow:none; }
  body:not(.admin-locked) #content .admin-lease-operations-table th:not(:has(.admin-sort-button)) { display:none; }
  body:not(.admin-locked) #content .admin-lease-operations-table .admin-sort-button { border:1px solid #cce6ce; border-radius:6px; background:#fff; }
  body:not(.admin-locked) #content .admin-lease-operations-table tbody { display:grid; gap:12px; padding:12px; }
  body:not(.admin-locked) #content .admin-lease-operations-table tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; border:1px solid #d1e8d1; border-radius:8px; overflow:hidden; background:#fff; }
  body:not(.admin-locked) #content .admin-lease-operations-table tbody td { display:block; min-width:0; padding:12px; height:auto; white-space:normal; overflow-wrap:anywhere; border:0; border-bottom:1px solid #e1ebe0; position:static; box-shadow:none; background:transparent; }
  body:not(.admin-locked) #content .admin-lease-operations-table tbody td::before { content:attr(data-label); display:block; color:#526558; font-family:var(--ep-font); font-size:12px; font-weight:600; margin-bottom:5px; }
  body:not(.admin-locked) #content .admin-lease-operations-table tbody td:first-child,
  body:not(.admin-locked) #content .admin-lease-operations-table tbody td:is([data-label="현금 납부"],[data-label="관리"],[colspan]) { grid-column:1/-1; }
  body:not(.admin-locked) #content .admin-lease-operations-table tbody td:first-child { background:#f8fcf8; }
  body:not(.admin-locked) #content .admin-lease-operations-table tbody td:first-child::before { content:"라이더"; }
  body:not(.admin-locked) #content .admin-lease-operations-table tbody td[colspan]::before { content:none; }
  body:not(.admin-locked) #content .admin-lease-operations-table tbody td:last-child { border-bottom:0; }
  body:not(.admin-locked) #content .admin-lease-operations-table td:first-child small { max-width:none; }
  body:not(.admin-locked) #content .admin-lease-operations-table td:first-child .admin-dealer-link { padding:0; font-size:17px; }
  body:not(.admin-locked) #content .admin-lease-operations-table .admin-action-group { display:grid; grid-template-columns:1fr 1fr; width:100%; gap:10px; }
  body:not(.admin-locked) #content .admin-lease-operations-table .member-lease-quick-payment { min-width:0; width:100%; grid-template-columns:minmax(0,1fr) 44px; gap:10px; }
  body:not(.admin-locked) #content .admin-lease-operations-table .member-lease-quick-check,
  body:not(.admin-locked) #content .admin-lease-operations-table .member-lease-quick-check span { width:44px; height:44px; }

  /* Compact landing copy while keeping the scene and existing destinations. */
  body:not(.admin-locked) #content .dealer-landing-copy { padding:22px 20px 0; }
  body:not(.admin-locked) #content .dealer-landing-eyebrow { margin-bottom:14px; }
  body:not(.admin-locked) #content .dealer-landing h1 { font-size:30px; line-height:1.35; }
  body:not(.admin-locked) #content .dealer-landing-description { font-size:14px; line-height:1.65; margin:14px 0 18px; }
  body:not(.admin-locked) #content .dealer-landing-welcome { font-size:14px; }
  body:not(.admin-locked) #content .dealer-landing-visual-footer { flex-wrap:nowrap; justify-content:space-between; gap:12px; font-size:12px; padding:8px 6px 0; }
  body:not(.admin-locked) #content .dealer-motion-toggle { flex:0 0 44px; width:44px; height:44px; padding:0; }
  body:not(.admin-locked) #content .dealer-landing-shortcuts button { padding:18px 16px; }

  /* Login remains reachable with the on-screen keyboard and avoids iOS input zoom. */
  body.admin-locked :is(.app,.main,.ct) { height:auto; min-height:100dvh; }
  body.admin-locked .admin-login-shell { min-height:100dvh; padding:20px 12px; }
  body.admin-locked .admin-login-box { max-width:100%; height:auto; min-height:449px; }
  body.admin-locked .admin-login-field input { font-size:16px; }
  body.admin-locked .admin-password-wrap button { top:0; right:0; width:48px; height:44px; }
  body.admin-locked .admin-save-row { min-height:44px; height:auto; margin-bottom:4px!important; }
}
@media (max-width: 560px) {
  body:not(.admin-locked) .topbar { align-items:stretch; }
  body:not(.admin-locked) .admin-topbar-title { width:100%; }
  body:not(.admin-locked) .tbr { display:grid; width:100%; grid-template-columns:minmax(0,1fr) auto auto; gap:2px 8px; align-items:center; }
  body:not(.admin-locked) .tbr .rpill { grid-column:1; grid-row:1; justify-self:start; }
  body:not(.admin-locked) #admin-user { grid-column:1; grid-row:2; min-width:0; }
  body:not(.admin-locked) .tbr .top-action { grid-column:2; grid-row:1 / 3; }
  body:not(.admin-locked) .tbr #admin-logout { grid-column:3; }
  body:not(.admin-locked) #content :is(.admin-filter-grid,.admin-form-grid) { grid-template-columns:minmax(0,1fr); }
  body:not(.admin-locked) #content :is(.admin-filter-field.is-wide,.admin-form-grid .wide) { grid-column:auto; }
  body:not(.admin-locked) #content .admin-filter-actions { display:grid; grid-template-columns:1fr 1fr; }
  body:not(.admin-locked) #content .admin-pagination { margin-left:0; flex:1 1 auto; justify-content:space-between; }
  body:not(.admin-locked) #content .admin-list-toolbar:has(.admin-list-export) .admin-pagination { flex-basis:100%; }
  body:not(.admin-locked) #content .admin-list-export { flex:1 1 auto; }
}
