.case-shell .case-workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 12px;
  position: relative;
}
.case-shell-menu {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(12, 23, 40, .96);
  border: 1px solid #293f59;
  border-radius: 16px;
  padding: 14px;
  z-index: 3;
}
.case-shell-menu .case-shell-btn {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  min-height: 44px;
  border-radius: 10px;
  background: #102033;
  border: 1px solid #35506c;
  color: #e8f4ff;
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
}
.case-shell-menu .case-shell-btn.is-active,
.case-shell-menu .case-shell-btn[aria-expanded="true"] {
  border-color: #67d6ff;
  box-shadow: inset 0 0 0 1px rgba(103, 214, 255, .35);
  background: #14324c;
}
.case-shell-stage {
  min-width: 0;
}
.case-shell .case-view-card {
  margin-bottom: 0;
}
.case-shell-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
}
.case-shell-summary > div {
  border: 1px solid #30455e;
  background: #101f34;
  border-radius: 12px;
  padding: 12px 10px;
}
.case-shell-summary span {
  display: block;
  color: #b5c7dc;
  font-size: .72rem;
}
.case-shell-summary strong {
  display: block;
  color: #70ddff;
  margin-top: 6px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.case-shell-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 18, .55);
  z-index: 40;
}
.case-shell-drawers {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100vh;
  z-index: 50;
  background: rgba(10, 18, 30, .98);
  border-left: 1px solid #2d4560;
  box-shadow: -18px 0 40px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  padding: 16px 16px 24px;
}
.case-shell-drawers[hidden],
.case-shell-backdrop[hidden] {
  display: none !important;
}
.case-shell-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.case-shell-drawer-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.case-shell-drawer-body {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}
.case-shell-panel {
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}
.case-shell-panel[hidden] { display: none !important; }
.case-shell .case-layout,
.case-shell #case-form {
  display: contents;
}
.case-shell #case-fields {
  display: contents;
}
.case-shell .case-output {
  display: contents;
}
.case-shell .cooling-panel.case-card {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}
.case-shell-open .case-shell-stage {
  filter: saturate(.92);
}
@media (max-width: 1000px) {
  .case-shell .case-workspace {
    grid-template-columns: 1fr;
  }
  .case-shell-menu {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-shell-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-shell-drawers {
    width: 100vw;
    height: min(82vh, 100%);
    top: auto;
    bottom: 0;
    border-left: 0;
    border-top: 1px solid #2d4560;
    border-radius: 18px 18px 0 0;
  }
}
@media (max-width: 480px) {
  .case-shell-menu {
    grid-template-columns: 1fr;
  }
  .case-shell-summary {
    grid-template-columns: 1fr;
  }
}
