#dwgPreview {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  background: #05131f;
  color: #e9faff;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
}
#dwgPreview[open] { display: grid; }
#dwgPreview header, #dwgPreview footer { display: flex; align-items: center; gap: 8px; }
#dwgPreview button { width: auto; min-width: 44px; min-height: 44px; margin: 0; }
#dwgTitle { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: 1rem; }
#dwgViewport { position: relative; overflow: hidden; touch-action: none; background: #263744; }
#dwgImage { position: absolute; left: 50%; top: 50%; max-width: none; pointer-events: none; }
#dwgStatus { position: absolute; inset: auto 8px 8px; margin: 0; padding: 8px; background: #05131f; }
#dwgStatus:empty { display: none; }
#dwgPreview footer { flex-wrap: wrap; }
#dwgPreview footer a { color: #a9e6f5; margin-left: auto; }
#dwgScope[hidden] { display: none; }
#dwgDetail { position: absolute; left: 50%; top: 50%; max-width: none; pointer-events: none; }
#dwgDetail:not([hidden]) { background: #263744; }

#webPdfLink[hidden] { display: none; }
