main :is(.hero, .app-hero, .app-card, .section-box, .article-wrap, .content-card),
main > [data-site-drawer-block] {
  position: relative;
  border: 1px solid #000;
}
[data-site-drawer-block] { cursor: pointer; }
.site-drawer-trigger {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 9px;
  transform: translateY(-50%);
  min-width: 28px;
  min-height: 28px;
  padding: 0 5px;
  border: 1px solid #000;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font: 600 16px/1 system-ui, sans-serif;
  cursor: pointer;
}
.site-drawer-trigger:hover { background: #f3e8ff; }
.site-drawer-trigger:focus-visible, .site-drawer :is(a,button,summary,[tabindex]):focus-visible {
  outline: 3px solid #7c3aed;
  outline-offset: 2px;
}
html:has(.site-drawer[open]) { overflow: hidden; }
.site-drawer {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1e293b;
  overflow: hidden;
}
.site-drawer[open] { display: grid; justify-items: end; }
.site-drawer::backdrop {
  background: rgb(15 23 42 / .56);
  animation: site-drawer-fade .22s ease-out;
}
.site-drawer-panel {
  position: relative;
  width: min(100%, 540px);
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  border-left: 1px solid #000;
  padding: 24px;
  box-shadow: -12px 0 40px rgb(15 23 42 / .16);
  animation: site-drawer-side .25s ease-out;
}
.site-drawer-panel > h2 { color: #0f172a; padding-right: 58px; margin: 0 0 16px; line-height: 1.35; }
.site-drawer-close {
  position: absolute;
  inset: 14px 14px auto auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #000;
  border-radius: 9px;
  background: #fff;
  color: #111;
  font: 1.35rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.site-drawer-content { display: grid; gap: 16px; }
.site-drawer .site-drawer-copy {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  max-width: none;
  min-width: 0;
  overflow-wrap: anywhere;
}
.site-drawer .site-drawer-copy > :first-child { margin-top: 0; }
.site-drawer .site-drawer-copy :is(ol,ul) { padding-inline-start: 1.3em; }
.site-drawer .app-meta { font-size: .95rem; }
.site-drawer :is(.app-actions,.site-drawer-categories) { display: flex; flex-wrap: wrap; gap: 8px; }
.site-drawer .site-drawer-table { overflow: auto; max-width: 100%; }
.site-drawer .site-drawer-table table { min-width: 360px; }
.site-drawer .guide-grid, .site-drawer .related-grid { grid-template-columns: minmax(0, 1fr); }
@keyframes site-drawer-side { from { transform: translateX(100%); } }
@keyframes site-drawer-bottom { from { transform: translateY(100%); } }
@keyframes site-drawer-fade { from { opacity: 0; } }
@media (max-width: 600px) {
  .site-drawer[open] { justify-items: stretch; align-items: end; }
  .site-drawer-panel {
    width: 100%;
    height: auto;
    max-height: 85vh;
    max-height: 85dvh;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    border: 1px solid #000;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    animation-name: site-drawer-bottom;
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-drawer::backdrop, .site-drawer-panel { animation: none; }
}
