body.staff-sheet-open{position:static;overflow:visible;width:auto;left:auto;right:auto;top:auto}
html,body,#app,main{touch-action:pan-y}
.sheet{position:fixed;inset:0;z-index:160;background:rgba(15,23,42,.48);display:flex;align-items:flex-end}
.sheet-card{background:#fff;width:100%;max-height:88vh;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;border-radius:22px 22px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom))}
.sheet .sheet-head{position:sticky;top:0;z-index:240;display:flex;align-items:center;gap:8px;margin-bottom:8px;background:#fff;padding:8px 0 10px}
.sheet .sheet-head h3{margin:0;font-size:18px}
.sheet .sheet-head .spacer{display:block;flex:1 1 auto;min-width:0}
.sheet .sheet-head #closeSheet{position:static;transform:none;margin-left:auto;flex:0 0 48px;width:48px;height:48px;min-width:48px;min-height:48px;border:0;background:#f3f4f6;border-radius:10px;padding:0;display:flex;align-items:center;justify-content:center;visibility:visible;opacity:1;z-index:241}
.sheet-title-actions{display:flex;align-items:center;gap:10px;min-width:0}
.history-btn{border:1px solid #cbd5e1;background:#fff;border-radius:10px;padding:8px 12px;font-weight:800;cursor:pointer}
#historyModalBackdrop.history-modal-backdrop{z-index:320}

@media(max-width:640px){
  .sheet{height:100dvh;max-height:100dvh;align-items:flex-start;justify-content:flex-start;overflow:hidden;padding-top:max(8px,env(safe-area-inset-top))}
  .sheet-card{position:relative;top:auto;bottom:auto;left:auto;right:auto;width:100%;max-width:100vw;height:calc(100dvh - max(8px,env(safe-area-inset-top)));max-height:calc(100dvh - max(8px,env(safe-area-inset-top)));margin:0;padding-left:10px;padding-right:10px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;border-radius:22px 22px 0 0;transform:none}
  .sheet .sheet-head{min-height:66px;margin:0 -10px 10px;padding:10px 14px}
  .sheet .sheet-head h3{font-size:17px;white-space:nowrap}
  .sheet-title-actions{gap:8px}
  .history-btn{padding:7px 10px;white-space:nowrap}
}
