/* === 奕境 DMS · 助手端 PRD 展示区 === */

.h5-prd-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.h5-prd-layer.show {
  opacity: 1;
  pointer-events: auto;
}

.h5-prd-panel {
  position: absolute;
  top: var(--statusbar-height, 44px);
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: var(--bg-card);
  box-shadow: var(--shadow-sheet);
  transform: translateY(18px);
  transition: transform .22s ease;
}

.h5-prd-layer.show .h5-prd-panel {
  transform: translateY(0);
}

.h5-prd-head {
  min-height: 64px;
  padding: 12px 52px 11px 20px;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  position: relative;
  border-bottom: 1px solid var(--border-light);
}

.h5-prd-eyebrow {
  margin-bottom: 4px;
  color: var(--brand-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
}

.h5-prd-title {
  max-width: 260px;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h5-prd-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 28px;
  background: var(--bg-page);
}

.h5-prd-meta {
  margin-bottom: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.45;
}

.h5-prd-meta-row {
  display: flex;
  gap: 6px;
  min-width: 0;
}

.h5-prd-meta-row strong {
  flex: 0 0 auto;
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

.h5-prd-meta-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-prd-doc {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  line-height: 1.72;
}

.h5-prd-doc h1,
.h5-prd-doc h2,
.h5-prd-doc h3,
.h5-prd-doc h4 {
  margin: 18px 0 8px;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: 0;
}

.h5-prd-doc h1:first-child,
.h5-prd-doc h2:first-child,
.h5-prd-doc h3:first-child {
  margin-top: 0;
}

.h5-prd-doc h1 { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); }
.h5-prd-doc h2 { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }
.h5-prd-doc h3 { font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); }
.h5-prd-doc h4 { font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); }

.h5-prd-doc p,
.h5-prd-doc ul,
.h5-prd-doc ol,
.h5-prd-doc blockquote,
.h5-prd-doc .prd-md-table-wrap,
.h5-prd-doc .prd-md-diagram,
.h5-prd-doc .prd-md-code {
  margin: 8px 0;
}

.h5-prd-doc ul,
.h5-prd-doc ol {
  padding-left: 18px;
}

.h5-prd-doc li + li {
  margin-top: 4px;
}

.h5-prd-doc blockquote {
  padding: 9px 10px;
  border-left: 3px solid var(--brand-primary);
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--text-secondary);
}

.h5-prd-doc code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--bg-page);
  color: var(--func-id-color);
  font-family: var(--font-mono);
  font-size: 12px;
}

.h5-prd-doc .prd-md-code {
  overflow-x: auto;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.5;
}

.h5-prd-doc .prd-md-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.h5-prd-doc table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.45;
}

.h5-prd-doc th,
.h5-prd-doc td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.h5-prd-doc th {
  background: var(--bg-page);
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

.h5-prd-doc tr:last-child td {
  border-bottom: none;
}

.h5-prd-doc .prd-md-diagram {
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
}

.h5-prd-doc .prd-md-diagram-title {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.h5-prd-empty {
  padding: 22px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  text-align: center;
  font-size: var(--font-size-sm);
}

.h5-prd-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
}

.h5-prd-tabs button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.h5-prd-tabs button.active {
  background: var(--bg-card);
  color: var(--brand-primary);
  font-weight: var(--font-weight-semibold);
  box-shadow: 0 1px 3px rgba(20, 27, 39, .08);
}

.h5-prd-current {
  color: var(--text-tertiary);
  font-size: var(--font-size-xs);
  line-height: 1.45;
}

.prd-feature-doc {
  display: grid;
  gap: 12px;
}

.prd-feature-intro {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 3px solid var(--brand-primary);
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.prd-feature-intro strong {
  color: var(--text-primary);
}

.prd-feature-card {
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.prd-feature-card.is-located {
  border-color: var(--brand-primary);
  background: var(--brand-50);
  box-shadow: 0 0 0 2px rgba(134, 27, 47, .08);
}

.prd-feature-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.prd-feature-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.prd-feature-seq {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: #ff6700ba;
  color: #FFFFFF;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  flex-shrink: 0;
}

.prd-feature-level {
  color: var(--brand-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  flex-shrink: 0;
}

.prd-feature-card h3,
.prd-feature-meta h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prd-feature-back {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
}

.prd-feature-back:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.prd-feature-summary {
  margin: 8px 0 12px;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.65;
}

.prd-feature-groups {
  display: grid;
  gap: 12px;
}

.prd-feature-group {
  padding-top: 0;
  border-top: 0;
}

.prd-feature-group h4 {
  margin: 0 0 6px;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
}

.prd-feature-group summary {
  min-height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  list-style: none;
}

.prd-feature-group summary::-webkit-details-marker {
  display: none;
}

.prd-feature-group ul {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.65;
}

.prd-feature-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.prd-feature-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  table-layout: fixed;
}

.prd-feature-table th,
.prd-feature-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  text-align: left;
  word-break: break-word;
}

.prd-feature-table th {
  background: var(--bg-page);
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

.prd-feature-table th + th,
.prd-feature-table td + td {
  border-left: 1px solid var(--border-light);
}

.prd-feature-table tbody tr:last-child td {
  border-bottom: 0;
}

.prd-feature-field-table th:first-child,
.prd-feature-field-table td:first-child {
  width: 96px;
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

.prd-feature-field-table th:last-child,
.prd-feature-field-table td:last-child {
  width: 96px;
  color: var(--text-tertiary);
}

.prd-locator-layer {
  display: none;
  position: fixed;
  z-index: 125;
  overflow: visible;
  pointer-events: none;
}

.prd-locator-layer.show {
  display: block;
}

.h5-prd-locator-layer {
  top: var(--h5-shell-topbar-height, 44px);
  bottom: 0;
  left: var(--h5-shell-nav-width, 272px);
  right: calc(100vw - var(--h5-prd-left-width, 860px));
}

.prd-locator-dot {
  position: absolute;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  border-radius: 4px;
  background: #ff6700ba;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(20, 27, 39, .22);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.prd-locator-dot.is-action {
  background: #ff6700ba;
}

.prd-locator-dot span {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.prd-locator-dot i {
  font-style: normal;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.9;
}

.prd-locator-dot em {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  min-width: max-content;
  max-width: 180px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: var(--text-primary);
  color: var(--bg-card);
  font-size: var(--font-size-xs);
  font-style: normal;
  font-weight: var(--font-weight-medium);
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
}

.prd-locator-dot:hover em,
.prd-locator-dot:focus-visible em {
  opacity: 1;
  transform: translateY(-50%);
}

.prd-target-flash {
  outline: 2px solid var(--brand-primary) !important;
  outline-offset: 3px;
  transition: outline-color .2s ease;
}

.h5-shell-nav {
  display: none;
}

/* === H5 common component: iOS-like status bar === */
:where(.phone, .phone-page, .app-page) > .status-bar {
  height: 54px !important;
  min-height: 54px !important;
  flex: 0 0 54px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 28px 0 !important;
  border: 0 !important;
  background: var(--bg-card, #FFFFFF) !important;
  color: var(--text-primary, #25272A) !important;
  font-size: 16px !important;
  font-weight: var(--font-weight-semibold, 600) !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  z-index: 100;
}

:where(.phone, .phone-page, .app-page) > .status-bar > :first-child,
:where(.phone, .phone-page, .app-page) > .status-bar .time {
  display: inline-flex;
  align-items: center;
  color: var(--text-primary, #25272A) !important;
  font-size: 16px !important;
  font-weight: var(--font-weight-semibold, 600) !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

:where(.phone, .phone-page, .app-page) > .status-bar .icons,
:where(.phone, .phone-page, .app-page) > .status-bar .status-icons {
  height: 18px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  color: var(--text-primary, #25272A) !important;
  line-height: 1 !important;
}

:where(.phone, .phone-page, .app-page) > .status-bar .icons svg,
:where(.phone, .phone-page, .app-page) > .status-bar .status-icons svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  color: currentColor !important;
  fill: currentColor;
}

:where(.phone, .phone-page, .app-page) > .status-bar .signal {
  width: 18px !important;
  height: 13px !important;
  display: inline-flex !important;
  align-items: flex-end !important;
  gap: 2px !important;
  color: currentColor !important;
}

:where(.phone, .phone-page, .app-page) > .status-bar .signal i {
  width: 3px !important;
  border-radius: 2px !important;
  background: currentColor !important;
}

:where(.phone, .phone-page, .app-page) > .status-bar .signal i:nth-child(1) { height: 5px !important; opacity: .45; }
:where(.phone, .phone-page, .app-page) > .status-bar .signal i:nth-child(2) { height: 7px !important; opacity: .6; }
:where(.phone, .phone-page, .app-page) > .status-bar .signal i:nth-child(3) { height: 10px !important; opacity: .82; }
:where(.phone, .phone-page, .app-page) > .status-bar .signal i:nth-child(4) { height: 13px !important; opacity: 1; }

:where(.phone, .phone-page, .app-page) > .status-bar .wifi {
  width: 18px !important;
  height: 13px !important;
  position: relative !important;
  display: inline-block !important;
  color: currentColor !important;
}

:where(.phone, .phone-page, .app-page) > .status-bar .wifi::before {
  content: "" !important;
  position: absolute !important;
  left: 2px !important;
  top: 0 !important;
  width: 14px !important;
  height: 14px !important;
  border: 3px solid currentColor !important;
  border-left-color: transparent !important;
  border-bottom-color: transparent !important;
  border-radius: 50% !important;
  transform: rotate(-45deg) !important;
}

:where(.phone, .phone-page, .app-page) > .status-bar .wifi::after {
  content: "" !important;
  position: absolute !important;
  left: 7px !important;
  bottom: 1px !important;
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: currentColor !important;
}

:where(.phone, .phone-page, .app-page) > .status-bar .battery {
  width: 25px !important;
  height: 13px !important;
  position: relative !important;
  display: inline-block !important;
  box-sizing: border-box !important;
  border: 1.6px solid currentColor !important;
  border-radius: 3px !important;
  color: currentColor !important;
}

:where(.phone, .phone-page, .app-page) > .status-bar .battery::before {
  content: "" !important;
  position: absolute !important;
  right: -4px !important;
  top: 3px !important;
  width: 2px !important;
  height: 6px !important;
  border-radius: 2px !important;
  background: currentColor !important;
}

:where(.phone, .phone-page, .app-page) > .status-bar .battery::after {
  content: "" !important;
  position: absolute !important;
  inset: 2px !important;
  border-radius: 2px !important;
  background: currentColor !important;
}

html.h5-embedded-prototype,
html.h5-embedded-prototype body {
  min-height: 100vh;
  background: transparent !important;
}

html.h5-embedded-prototype body {
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* 设备容器模式（窄 iframe ≤ 450px）：手机 fixed 填满 viewport，由 shell frame 圆角裁剪 */
@media (max-width: 450px) {
  html.h5-embedded-prototype body > .app-page,
  html.h5-embedded-prototype body > .phone,
  html.h5-embedded-prototype body > .phone-page {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  /* flex 子项必须 min-height:0 才能在固定高度容器内正确滚动 */
  html.h5-embedded-prototype body > .app-page > .page-wrap,
  html.h5-embedded-prototype body > .phone > .page-wrap,
  html.h5-embedded-prototype body > .phone-page > .page-wrap {
    min-height: 0 !important;
  }
}

html.h5-embedded-prototype body > .app-page,
html.h5-embedded-prototype body > .phone,
html.h5-embedded-prototype body > .phone-page {
  margin: 0 auto !important;
}

/* 嵌入模式：将 position:fixed 覆盖为 absolute，使底部栏宽度对齐页面容器而非 viewport */
html.h5-embedded-prototype body > .app-page .bottom-bar,
html.h5-embedded-prototype body > .app-page .form-footer,
html.h5-embedded-prototype body > .app-page .home-indicator,
html.h5-embedded-prototype body > .app-page .sheet-mask,
html.h5-embedded-prototype body > .app-page .filter-sheet,
html.h5-embedded-prototype body > .app-page .bottom-sheet,
html.h5-embedded-prototype body > .app-page .slide-panel,
html.h5-embedded-prototype body > .app-page .dialog-center,
html.h5-embedded-prototype body > .app-page .toast,
html.h5-embedded-prototype body > .phone .bottom-bar,
html.h5-embedded-prototype body > .phone .form-footer,
html.h5-embedded-prototype body > .phone .home-indicator,
html.h5-embedded-prototype body > .phone .sheet-mask,
html.h5-embedded-prototype body > .phone .filter-sheet,
html.h5-embedded-prototype body > .phone .bottom-sheet,
html.h5-embedded-prototype body > .phone .slide-panel,
html.h5-embedded-prototype body > .phone .dialog-center,
html.h5-embedded-prototype body > .phone .toast,
html.h5-embedded-prototype body > .phone-page .bottom-bar,
html.h5-embedded-prototype body > .phone-page .form-footer,
html.h5-embedded-prototype body > .phone-page .home-indicator {
  position: absolute !important;
}

html.h5-embedded-prototype body > .app-page[hidden],
html.h5-embedded-prototype body > .phone[hidden],
html.h5-embedded-prototype body > .phone-page[hidden],
html.h5-embedded-prototype body > .phone-label[hidden] {
  display: none !important;
}

/* 平铺模式（设备容器关闭）：宽度固定，高度解锁，内容以长页面形式展示 */
html.h5-embedded-prototype.h5-embed-unwrap body {
  overflow: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 0 40px !important;
  background: #E9EEF5 !important;
}
html.h5-embedded-prototype.h5-embed-unwrap body > .app-page,
html.h5-embedded-prototype.h5-embed-unwrap body > .phone,
html.h5-embedded-prototype.h5-embed-unwrap body > .phone-page {
  position: relative !important;
  width: 390px !important;
  min-width: 390px !important;
  max-width: 390px !important;
  height: auto !important;
  min-height: 844px !important;
  max-height: none !important;
  overflow: visible !important;
  border-radius: 0 !important;
  box-shadow: 0 0 0 1px rgba(20, 27, 39, .08) !important;
  margin: 0 auto !important;
  flex: 0 0 auto !important;
}
html.h5-embedded-prototype.h5-embed-unwrap body > .app-page .bottom-bar,
html.h5-embedded-prototype.h5-embed-unwrap body > .app-page .form-footer,
html.h5-embedded-prototype.h5-embed-unwrap body > .phone .bottom-bar,
html.h5-embedded-prototype.h5-embed-unwrap body > .phone .form-footer,
html.h5-embedded-prototype.h5-embed-unwrap body > .phone-page .bottom-bar,
html.h5-embedded-prototype.h5-embed-unwrap body > .phone-page .form-footer {
  position: relative !important;
}

html.h5-embedded-prototype body > .role-switcher,
html.h5-embedded-prototype body > .switcher-wrap,
html.h5-embedded-prototype body > .state-switcher,
html.h5-embedded-prototype body > .h5-shell-nav,
html.h5-embedded-prototype body > .h5-prd-layer,
html.h5-embedded-prototype body [data-h5-state-source="1"] {
  display: none !important;
}

.h5-embed-locator-layer {
  position: fixed;
  inset: 0;
  z-index: 220;
}

@media (min-width: 768px) {
  body.h5-shell-host {
    min-height: 100vh;
    margin: 0;
    padding: 0 !important;
    display: block !important;
    overflow: hidden;
    background: #E9EEF5 !important;
  }

  .h5-shell-preview {
    position: fixed;
    top: var(--h5-shell-topbar-height, 44px);
    left: var(--h5-shell-nav-width, 272px);
    right: calc(100vw - var(--h5-prd-left-width, 860px));
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    background: #E9EEF5;
    transition: left .22s ease, right .18s ease;
    padding-top: 28px;
  }

  .h5-shell-preview.h5-device-frame-on {
    display: grid;
    justify-content: center;
    align-content: start;
    padding: 28px 0 42px;
    overflow: auto;
  }

  .h5-shell-frame {
    width: 100%;
    height: calc(100% - 28px);
    display: block;
    border: 0;
    background: transparent;
    opacity: 1;
    transition: opacity .14s ease;
  }

  .h5-shell-preview.h5-device-frame-on .h5-shell-frame {
    width: 430px;
    height: 896px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
    justify-self: center;
    border-radius: 44px;
    background: #FFFFFF;
    box-shadow: 0 24px 68px rgba(20, 27, 39, .18), 0 0 0 1px rgba(20, 27, 39, .08);
  }

  .h5-shell-frame.is-loading {
    opacity: 0;
  }

  .h5-shell-frame-fallback {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
    pointer-events: none;
  }

  .h5-shell-preview.is-empty .h5-shell-frame-fallback {
    display: grid;
  }

  body {
    --h5-prd-left-width: clamp(700px, 54vw, calc(100vw - 420px));
    --h5-shell-topbar-height: 44px;
    --h5-shell-preview-top: 60px;
    --h5-shell-nav-width: 272px;
  }

  body:has(> .app-page),
  body:has(> .phone),
  body:has(> .phone-page) {
    background: #E9EEF5 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  body > .app-page,
  body > .phone {
    margin: var(--h5-shell-preview-top) 0 40px calc(var(--h5-shell-nav-width) + max(16px, calc((var(--h5-prd-left-width) - var(--h5-shell-nav-width) - 390px) / 2))) !important;
  }

  body > .phone-page {
    margin: var(--h5-shell-preview-top) 0 0 calc(var(--h5-shell-nav-width) + max(16px, calc((var(--h5-prd-left-width) - var(--h5-shell-nav-width) - 430px) / 2))) !important;
  }

  body > .switcher-wrap,
  body > .state-switcher,
  body [data-h5-state-source="1"] {
    display: none !important;
  }

  body.h5-prd-ready {
    background: #E9EEF5 !important;
  }

  body.h5-prd-open {
    --h5-prd-left-width: clamp(700px, 54vw, calc(100vw - 420px));
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  body.h5-shell-nav-collapsed {
    --h5-shell-nav-width: 56px;
  }

  body.h5-shell-ready > .role-switcher {
    width: calc(var(--h5-prd-left-width) - 72px);
    max-width: calc(var(--h5-prd-left-width) - 72px);
    margin: var(--h5-shell-preview-top) 0 0 56px !important;
  }

  body.h5-shell-ready > .switcher-wrap,
  body.h5-shell-ready > .state-switcher,
  body.h5-shell-ready [data-h5-state-source="1"] {
    display: none !important;
  }

  body.h5-prd-open > .app-page,
  body.h5-prd-open > .phone {
    margin: var(--h5-shell-preview-top) 0 40px calc(var(--h5-shell-nav-width) + max(16px, calc((var(--h5-prd-left-width) - var(--h5-shell-nav-width) - 390px) / 2))) !important;
  }

  body.h5-prd-open > .phone-page {
    margin: var(--h5-shell-preview-top) 0 0 calc(var(--h5-shell-nav-width) + max(16px, calc((var(--h5-prd-left-width) - var(--h5-shell-nav-width) - 430px) / 2))) !important;
  }

  .h5-shell-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 130;
    width: var(--h5-shell-nav-width);
    display: block;
    pointer-events: none;
    transition: width .22s ease;
  }

  .h5-shell-nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: var(--h5-shell-topbar-height);
    background: #FFFFFF;
    border-bottom: 1px solid #E8ECF2;
    box-shadow: 0 1px 0 rgba(20, 27, 39, .02);
    pointer-events: none;
  }

  .h5-shell-toolbar {
    position: absolute;
    top: 6px;
    left: 10px;
    z-index: 2;
    height: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
  }

  .h5-shell-locate-toggle {
    width: auto;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    font-size: var(--font-size-sm);
    line-height: 1;
  }

  .h5-shell-locate-toggle span {
    display: inline-flex;
    align-items: center;
    line-height: 1;
  }

  .h5-shell-device-toggle.active,
  .h5-shell-locate-toggle.active {
    border-color: var(--brand-primary);
    background: var(--brand-50);
    color: var(--brand-primary);
  }

  .h5-shell-action {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: none;
    cursor: pointer;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
  }

  .h5-shell-action:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
  }

  .h5-shell-action .h5-icon {
    width: 17px;
    height: 17px;
    display: block;
    flex: 0 0 auto;
  }

  .h5-shell-action.h5-shell-locate-toggle {
    width: auto;
    min-width: 32px;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
  }

  .h5-shell-tree {
    position: absolute;
    top: var(--h5-shell-topbar-height);
    left: 0;
    bottom: 0;
    width: 100%;
    overflow-y: auto;
    padding: 10px 8px 24px;
    background: var(--bg-card);
    border-top: 1px solid #E8ECF2;
    border-right: 1px solid var(--border-light);
    pointer-events: auto;
    transition: opacity .18s ease, transform .22s ease;
  }

  .h5-shell-search {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 34px;
    display: grid;
    grid-template-columns: 17px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    padding: 0 8px;
    border: 1px solid #E8ECF2;
    border-radius: 8px;
    background: #F6F8FA;
    color: var(--text-tertiary);
  }

  .h5-shell-search:focus-within {
    border-color: rgba(134, 27, 47, .32);
    background: #FFFFFF;
  }

  .h5-shell-search .h5-icon {
    width: 15px;
    height: 15px;
    color: var(--text-tertiary);
  }

  .h5-shell-search-input {
    min-width: 0;
    width: 100%;
    height: 30px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: var(--font-size-sm);
    line-height: 1;
  }

  .h5-shell-search-input::placeholder {
    color: var(--text-placeholder);
  }

  .h5-shell-search-clear {
    width: 22px;
    height: 22px;
    display: none;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
  }

  .h5-shell-search-clear.show {
    display: grid;
  }

  .h5-shell-search-clear:hover {
    background: #EEF2F6;
    color: var(--text-primary);
  }

  .h5-shell-search-clear .h5-icon {
    width: 14px;
    height: 14px;
  }

  .h5-shell-empty {
    display: none;
    margin: 12px 4px 0;
    padding: 16px 10px;
    border: 1px dashed #D8DEE8;
    border-radius: 8px;
    background: #F8FAFC;
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
    line-height: 1.45;
    text-align: center;
  }

  .h5-shell-empty.show {
    display: block;
  }

  body.h5-shell-nav-collapsed .h5-shell-tree {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-16px);
  }

  .h5-shell-group {
    margin-bottom: 6px;
  }

  .h5-shell-group summary {
    min-height: 42px;
    display: grid;
    grid-template-columns: 18px 20px 1fr;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    line-height: 1.25;
    cursor: pointer;
    user-select: none;
    list-style: none;
  }

  .h5-shell-group summary::-webkit-details-marker {
    display: none;
  }

  .h5-shell-group summary:hover,
  .h5-shell-group.is-active > summary {
    background: var(--func-blue-light);
  }

  .h5-shell-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    transition: transform .16s ease;
  }

  .h5-shell-group[open] > summary .h5-shell-chevron {
    transform: rotate(90deg);
  }

  .h5-shell-folder {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
  }

  .h5-shell-pages {
    padding: 5px 0 8px 46px;
    display: grid;
    gap: 2px;
  }

  .h5-shell-page {
    min-height: 34px;
    display: grid;
    grid-template-columns: 15px 1fr;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    line-height: 1.25;
    text-decoration: none;
  }

  .h5-shell-page:hover,
  .h5-shell-page.is-active {
    background: var(--bg-page);
    color: var(--brand-primary);
    font-weight: var(--font-weight-semibold);
  }

  .h5-shell-page .h5-icon {
    width: 14px;
    height: 14px;
    color: var(--text-placeholder);
  }

  .h5-shell-page.is-active .h5-icon {
    color: var(--brand-primary);
  }

  /* 三级子项（children） */
  .h5-shell-children {
    display: none;
    padding: 2px 0 6px 22px;
  }
  .h5-shell-children.is-open,
  .h5-shell-tree.is-searching .h5-shell-children {
    display: grid;
    gap: 1px;
  }
  .h5-shell-child {
    min-height: 30px;
    grid-template-columns: 1fr;
    padding-left: 16px;
    font-size: 12.5px;
    color: var(--text-secondary);
  }
  .h5-shell-child:hover,
  .h5-shell-child.is-active {
    background: var(--bg-page);
    color: var(--brand-primary);
    font-weight: var(--font-weight-semibold);
  }

  .h5-shell-state-archive {
    margin: 2px 0 8px 20px;
    padding: 4px 0 4px 12px;
    display: grid;
    gap: 7px;
    border-left: 1px solid var(--border-light);
  }

  .h5-shell-state-group {
    display: grid;
    gap: 3px;
  }

  .h5-shell-state-title {
    padding: 0 8px;
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    line-height: 20px;
  }

  .h5-shell-state-list {
    display: grid;
    gap: 2px;
  }

  .h5-shell-state {
    width: 100%;
    min-height: 30px;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    padding: 0 8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: var(--font-size-sm);
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
  }

  .h5-shell-state:hover,
  .h5-shell-state.is-active {
    background: var(--brand-50);
    color: var(--brand-primary);
  }

  .h5-shell-state.is-active {
    font-weight: var(--font-weight-semibold);
  }

  .h5-shell-state .h5-icon {
    width: 9px;
    height: 9px;
    fill: currentColor;
    stroke-width: 0;
  }

  .h5-shell-state span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .h5-prd-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
  }

  .h5-prd-layer.show {
    pointer-events: none;
  }

  .h5-prd-panel {
    top: var(--h5-shell-topbar-height);
    right: 0;
    bottom: 0;
    left: var(--h5-prd-left-width);
    width: auto;
    border: none;
    border-radius: 0;
    background: #FFFFFF;
    box-shadow: none;
    pointer-events: auto;
    transform: translateX(16px);
  }

  .h5-prd-layer::before {
    content: "";
    position: absolute;
    top: 0;
    left: var(--h5-prd-left-width);
    right: 0;
    height: var(--h5-shell-topbar-height);
    background: #FFFFFF;
    border-bottom: 1px solid #E8ECF2;
    pointer-events: none;
  }

  .h5-prd-resizer {
    position: absolute;
    top: var(--h5-shell-topbar-height);
    bottom: 0;
    left: calc(var(--h5-prd-left-width) - 4px);
    z-index: 135;
    width: 8px;
    cursor: col-resize;
    touch-action: none;
    pointer-events: auto;
  }

  .h5-prd-resizer::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #D8DEE8;
    transition: background .15s ease, width .15s ease;
  }

  .h5-prd-resizer:hover::after,
  body.h5-prd-resizing .h5-prd-resizer::after {
    width: 3px;
    background: var(--brand-primary);
  }

  body.h5-prd-resizing {
    cursor: col-resize;
    user-select: none;
  }

  .h5-prd-layer.show .h5-prd-panel {
    transform: translateX(0);
  }

  .h5-prd-body {
    padding: 0 32px 36px;
    background: #FFFFFF;
  }

  .h5-prd-head {
    min-height: 58px;
    padding: 10px 32px 8px;
    align-items: flex-start;
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 8px;
    border-bottom: none;
    background: #FFFFFF;
  }

  .h5-prd-head > div:first-child {
    min-width: 0;
    flex: 1 1 220px;
  }

  .h5-prd-tabs {
    margin-left: auto;
  }

  .h5-prd-current {
    flex: 0 0 100%;
  }

  .h5-prd-title {
    max-width: none;
  }

  .h5-prd-meta {
    margin-bottom: 20px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .h5-prd-doc {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }
}

@media (max-width: 767px) {
  .h5-prd-layer {
    display: none;
  }
}
