/* Compact shape details. Shared navigation and bottom controls come directly from css/modal.css. */
:root {
  --segment-track-bg: rgba(0, 0, 0, 0.04);
  --shape-card: #d9e2f3;
  --molecule-card: #d1e7dd;
}
:root[data-theme="dark"] {
  --segment-track-bg: rgba(255, 255, 255, 0.08);
  --shape-card: #25334b;
  --molecule-card: #243a32;
}
.shape-detail-open,
.shape-detail-open body,
.shape-detail-open .screen {
  overflow: hidden;
  overscroll-behavior: none;
}
.shape-modal .sd-example-select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--zp-row-edge); border-radius: 14px; background: var(--zp-row); color: inherit; font: inherit; font-size: 14px; }
.shape-modal .sd-example-select option { background: var(--zp-info); color: var(--zp-text); }
.shape-modal .sd-stage { inset: 64px 0 66px; }
.shape-modal .sd-tools { gap: 6px; }
.shape-modal .sd-tool { width: 36px; height: 36px; }
.shape-modal .sd-flat { inset: 70px 28px 80px; gap: 8px; min-height: 0; }
.shape-modal .sd-draw { flex: 1; min-height: 0; width: 100%; }
.shape-modal .sd-draw svg,
.shape-modal .sd-draw .persp {
  width: 100%; height: 100%; max-width: min(var(--w, 420px), 100%); max-height: 100%;
  object-fit: contain; animation: shape-view-enter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.shape-modal .sd-flat-note { flex: none; font-size: 12px; line-height: 1.4; }
.shape-modal .sd-views {
  position: relative; left: auto; bottom: auto; transform: none;
  gap: 0; padding: 0; border-radius: 999px; background: transparent; box-shadow: none;
}
.shape-modal .sd-views button { height: 32px; padding: 0 12px; font-size: 12px; background: transparent; }
.shape-modal .sd-views button.on { background: transparent; }
:root[data-theme="dark"] .shape-modal .sd-views button.on { background: transparent; }
.shape-modal .sd-help { width: 40px; height: 40px; z-index: 200; }
.shape-modal .atom-bottom-pause svg { flex: none; }
.shape-modal .sd-play-icon { display: none; }
:root[data-theme="dark"] .zp .elem-nav-icon { color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.08); }
.sd-tour { position: fixed; inset: 0; z-index: 500; pointer-events: auto; }
.sd-tour-spot { position: fixed; border-radius: 22px; border: 2px solid rgba(255, 255, 255, 0.9); box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.48); pointer-events: none; }
.sd-tour-pop { position: fixed; width: min(320px, calc(100vw - 32px)); padding: 22px; box-sizing: border-box; border-radius: 22px; background: var(--zp-info); color: var(--zp-text); box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2); }
.sd-tour-count { font-size: 11px; opacity: 0.5; letter-spacing: 1px; }
.sd-tour-pop h3 { font-size: 20px; margin: 10px 0; }
.sd-tour-pop p { font-size: 14px; line-height: 1.6; margin: 0 0 18px; }
.sd-tour-close { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; padding: 6px; border: 0; border-radius: 50%; background: var(--zp-btn); color: inherit; }
.sd-tour-close .ic { width: 16px; height: 16px; }
.sd-tour-actions { display: flex; justify-content: space-between; gap: 12px; }
.sd-tour-actions .btn { padding: 8px 16px; min-height: 36px; font-size: 13px; }
@keyframes shape-card-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes shape-view-enter { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 860px) {
  .shape-modal .sd { flex-direction: column; }
  .shape-modal .sd-vis { order: -1; flex: 0 0 42%; min-height: 0; }
  .shape-modal .sd-tools { top: 12px; left: 12px; right: 60px; gap: 4px; }
  .shape-modal .sd-tool { width: 30px; height: 30px; }
  .shape-modal .sd-tool .ic { width: 16px; height: 16px; }
  .shape-modal .sd-stage { inset: 48px 0 56px; }
  .shape-modal .sd-flat { inset: 48px 18px 58px; }
  .shape-modal .atom-bottom-controls { bottom: 10px; height: 36px; }
  .shape-modal .sd-views button { padding: 0 9px; font-size: 11px; }
  .shape-modal .sd-help { right: 10px; bottom: 10px; width: 32px; height: 32px; }
}
@media (max-width: 380px) {
  .shape-modal .sd-views button { padding: 0 6px; font-size: 10px; }
  .shape-modal .atom-bottom-pause { width: 28px; }
}
@media (max-height: 500px) and (min-width: 600px) {
  .shape-modal .sd { flex-direction: row; }
  .shape-modal .sd-vis { order: 0; flex: 1; height: 100%; border-bottom: 0; border-left: 1px solid var(--zp-edge); }
}
@media (prefers-reduced-motion: reduce) {
  .shape-modal *,
.sd-tour * { animation: none !important; transition: none !important; }
}

/* Molecular content adapters; the left Sheet uses the original Zperiod components. */
.shape-modal .sd { width: 100%; }
.shape-modal .sd-axe { white-space: nowrap; }
.shape-modal .headline-name { white-space: normal; overflow-wrap: normal; flex: 1; min-width: 0; text-align: center; }
.shape-modal .sd-page { min-height: 0; }
.shape-modal .shape-example { width: 100%; text-align: left; }
.shape-modal .shape-example .ion-info { flex: 1; text-align: right; }
.shape-modal .shape-example.on { outline: 1px solid var(--modal-text-main); outline-offset: -1px; }
.shape-modal .elem-nav-btn { overflow: hidden; }
.shape-modal .elem-nav-btn:focus-visible .elem-nav-icon { opacity: 1; transform: none; }
@media (max-width: 860px) {
  .zp-shared .modal-info-pane { flex: 1; width: 100%; min-width: 0; min-height: 0; }
  .zp-shared .level-header { height: 85px; }
  .zp-shared .headline-content { margin: 0; padding: 0; width: 100%; }
  .zp-shared .headline-symbol { font-size: 44px; }
  .zp-shared .headline-mass, .zp-shared .headline-atomic { font-size: 24px; }
  .zp-shared .simplified-element-box { height: calc(100% - 85px); padding: 16px 28px 44px; }
  .zp-shared .simplified-element-box .slider-controls { bottom: 22px; opacity: 1; pointer-events: auto; }
  .zp-shared .sd-vis { order: -1; flex: 0 0 42%; min-height: 0; }
}
@media (max-height: 500px) and (min-width: 600px) {
  .zp-shared .modal-info-pane { flex: 0 0 480px; max-width: 55%; height: 100%; }
}
