/* Both sizes share one shell. Read mode stays modeless for list-to-list navigation. */
body:has(.desktop-shell) #drawer[open]{
  --drawer-small:480px;--drawer-large:66.6667vw;
  inset:0 0 0 auto;left:auto;width:min(var(--drawer-small),calc(100vw - 24px));
  max-width:calc(100vw - 24px);height:100dvh;max-height:100dvh;margin:0;padding:0;
  display:flex;flex-direction:column;overflow:hidden;container:drawer / inline-size;
  border:0;border-left:1px solid #ded9e3;border-radius:0;background:#fcfbfd;
  box-shadow:-8px 0 28px #20162614;animation:none;font-family:"Microsoft YaHei UI","Microsoft YaHei",sans-serif;
}
body:has(.desktop-shell) #drawer[open][data-drawer-size="large"]{width:max(680px,var(--drawer-large))}
body:has(.desktop-shell) #drawer[open][data-read-surface]{inset:52px 0 0 auto;height:calc(100dvh - 52px);max-height:calc(100dvh - 52px);z-index:40}
.desktop-shell.has-read-surface .page-heading,.desktop-shell.has-read-surface #page-context,.desktop-shell.has-read-surface #organization-layout{margin-right:0}
body:has(.desktop-shell) #drawer::backdrop{background:#16131f24}
body:has(.desktop-shell) #drawer .drawer-header{padding:18px 24px 16px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;flex:none;border-bottom:1px solid #e2dde6;background:#fcfbfd}
body:has(.desktop-shell) #drawer .drawer-header h2{font-size:20px;line-height:1.45;font-weight:600;letter-spacing:0;margin:0;overflow-wrap:anywhere;color:#292630}
.drawer-subtitle{margin:5px 0 0;font-size:12px;line-height:1.6;color:#6b6271;overflow-wrap:anywhere}
body:has(.desktop-shell) #drawer .drawer-heading-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;max-width:178px}
body:has(.desktop-shell) #drawer .drawer-heading-actions .text-button{font-size:12px;min-height:32px;padding:4px;color:#6b2940}
body:has(.desktop-shell) #drawer .drawer-heading-actions .icon-btn{width:32px;height:32px;flex:none;color:#514957;border-radius:4px}
body:has(.desktop-shell) #drawer .drawer-heading-actions .icon-btn:hover{background:#eee8f0}
body:has(.desktop-shell) #drawer .drawer-body{padding:20px 24px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;flex:1;font-size:14px;line-height:1.65;color:#292630}
body:has(.desktop-shell) #drawer .drawer-footer{padding:12px 24px max(12px,env(safe-area-inset-bottom));display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;flex:none;border-top:1px solid #ded9e3;background:#f5f2f7;position:relative;z-index:2;overflow:visible}
body:has(.desktop-shell) #drawer .drawer-footer .btn{min-height:36px;padding:7px 13px;font-size:13px;line-height:20px;white-space:normal}
body:has(.desktop-shell) #drawer .save-caption{font-size:12px;line-height:1.55;flex:1 1 180px;color:#6b6271;min-width:0}
body:has(.desktop-shell) #drawer .record-switch{width:auto;margin-right:auto;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
body:has(.desktop-shell) #drawer .record-switch small{font-size:12px;color:#6b6271;white-space:nowrap}
body:has(.desktop-shell) #drawer .form-grid,body:has(.desktop-shell) #drawer .detail-grid{gap:16px 24px;grid-template-columns:repeat(2,minmax(0,1fr))}
body:has(.desktop-shell) #drawer .field{gap:6px;min-width:0}
body:has(.desktop-shell) #drawer .field-label{font-size:13px;font-weight:500;line-height:1.5;color:#514957}
body:has(.desktop-shell) #drawer .field-hint{font-size:12px;color:#6b6271;line-height:1.6}
body:has(.desktop-shell) #drawer input:not([type=checkbox]):not([type=radio]),body:has(.desktop-shell) #drawer select,body:has(.desktop-shell) #drawer textarea{font-size:14px;min-height:38px;line-height:1.5;max-width:100%;border-radius:4px}
body:has(.desktop-shell) #drawer input::placeholder,body:has(.desktop-shell) #drawer textarea::placeholder{color:#77707e;opacity:1}
body:has(.desktop-shell) #drawer .detail-item{padding:10px 0;display:block;min-width:0;border-bottom:1px solid #ebe7ee}
body:has(.desktop-shell) #drawer .detail-label,body:has(.desktop-shell) #drawer .detail-item>span:first-child{font-size:12px;line-height:1.6;color:#6b6271;margin-bottom:4px}
body:has(.desktop-shell) #drawer .detail-value{font-size:14px;line-height:1.65;color:#292630}
body:has(.desktop-shell) #drawer[data-drawer-size="small"][data-drawer-mode="read"] .detail-grid{gap:0}
body:has(.desktop-shell) #drawer[data-drawer-size="small"][data-drawer-mode="read"] .detail-item{display:grid;grid-template-columns:104px minmax(0,1fr);gap:12px;align-items:start;padding:10px 0}
body:has(.desktop-shell) #drawer[data-drawer-size="small"][data-drawer-mode="read"] .detail-label{margin:0;line-height:23px}
body:has(.desktop-shell) #drawer .editor-section{margin:0 0 24px;padding:0 0 20px;border-bottom:1px solid #e2dde6}
body:has(.desktop-shell) #drawer .editor-section:last-child{margin-bottom:0;border-bottom:0}
body:has(.desktop-shell) #drawer h3,body:has(.desktop-shell) #drawer .detail-section-title{font-size:15px;line-height:1.5;font-weight:600;letter-spacing:0;color:#332b37;margin-top:24px;margin-bottom:12px;scroll-margin-top:12px}
body:has(.desktop-shell) #drawer .editor-section>h3:first-child{margin-top:0}
body:has(.desktop-shell) #drawer .notice{font-size:13px;line-height:1.7;color:#625968;padding:10px 12px;border-left-width:1px;background:#f2eef5}
body:has(.desktop-shell) #drawer .form-error{font-size:13px;line-height:1.7;border-left-width:1px}
body:has(.desktop-shell) #drawer :is(button,input,select,textarea,a,summary):focus-visible{outline:2px solid #81021f;outline-offset:2px}
body:has(.desktop-shell) #drawer button:disabled{cursor:default;opacity:.55}
body:has(.desktop-shell) #drawer .drawer-section-nav{display:flex;gap:4px;padding:8px 24px;flex:none;overflow:auto;border-bottom:1px solid #e2dde6;background:#f5f2f7;scrollbar-width:thin}
.drawer-section-link{border:0;border-radius:4px;background:transparent;white-space:nowrap;font-size:12px;line-height:20px;padding:5px 9px;color:#64586d;cursor:pointer}
.drawer-section-link[aria-current=location],.drawer-section-link:hover,.drawer-section-link:focus-visible{background:#e9dfe8;color:#81021f}
body:has(.desktop-shell) #drawer .revision-strip{font-size:11px;color:#776d7e;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid #ebe7ee}
body:has(.desktop-shell) #drawer .role-permission-meta{font-size:12px;margin:0 0 8px;color:#625968}
body:has(.desktop-shell) #drawer .role-permission-meta>summary{cursor:pointer;line-height:28px}
body:has(.desktop-shell) #drawer .permission-workspace-heading{margin:4px 0;height:22px;justify-content:flex-end}
body:has(.desktop-shell) #drawer .permission-workspace-heading>div{display:none}
body:has(.desktop-shell) #drawer .editor-section-nav{padding-block:4px;gap:4px}
body:has(.desktop-shell) #drawer .editor-section-nav button{min-height:34px;padding-block:6px}
@container drawer (max-width:760px){
  #drawer .permission-workspace-grid,#drawer .permission-workspace-grid.inspector-hidden{grid-template-columns:108px minmax(0,1fr)}
  #drawer .permission-workspace-grid>.permission-inspector{grid-column:1/-1;grid-row:1;position:static;height:112px;max-height:112px;min-height:112px}
  #drawer .permission-inspector-heading{flex-direction:row;align-items:baseline;gap:10px}
  #drawer .permission-inspector dl{display:flex;flex-wrap:wrap;gap:6px 18px;margin:6px 0}
  #drawer .permission-inspector dl>div{border:0;padding:0}
  #drawer .permission-inspector dt{margin-bottom:2px}
  #drawer .permission-node-name small{max-width:40%}
}
@container drawer (max-width:600px){
  #drawer .form-grid,#drawer .detail-grid,#drawer .rc-fields,#drawer .rc-fields.rc-three,#drawer .m-fields,#drawer .m-fields.m-three{grid-template-columns:minmax(0,1fr)!important}
  #drawer .field-wide{grid-column:auto}
  #drawer .drawer-header{padding:16px 20px!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  #drawer .drawer-heading-actions{max-width:none!important;justify-content:flex-start!important}
  #drawer .drawer-heading-actions [data-close-drawer]{margin-left:auto}
  #drawer .drawer-body{padding:16px 20px!important}
  #drawer .drawer-footer{padding-inline:20px!important}
  #drawer .record-switch{flex-basis:100%;justify-content:space-between}
  #drawer .permission-layout,#drawer .permission-focus-layout{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:800px){body:has(.desktop-shell) #drawer[open],body:has(.desktop-shell) #drawer[open][data-drawer-size="large"]{width:100vw;max-width:100vw}body:has(.desktop-shell) #drawer [data-drawer-resize]{display:none}}
