/* 知识图谱页 — 设计稿 114:8284
   布局：顶栏 + 面包屑 + 左侧图谱（flex）+ 右侧详情（368）
*/
@import url("./practice-tokens.css?v=15");
/* standalone: graph page styles */

/* 本页一屏布局：禁止整页滚动，滚动发生在侧栏「图谱结构」树内 */
html:has(.pg-main),
body:has(.pg-main) {
  height: 100%;
  overflow: hidden;
}

.stage:has(.pg-main),
.root:has(.pg-main) {
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
}

/* 主内容区深色径向底 — 同 paint_62:00918（设计稿 容器 53771） */
.main.pg-main {
  background: var(--practice-bg-radial);
  color: var(--practice-text);
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pg-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.pg {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px; /* 设计稿 gap: 16px */
  padding: 24px; /* 设计稿 padding: 24px */
  box-sizing: border-box;
  overflow: hidden;
}

.pg-crumb {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px; /* 设计稿 gap: 8px */
  min-height: var(--practice-crumb-back-size);
}

.pg-crumb__back {
  flex: 0 0 auto;
  width: var(--practice-crumb-back-size);
  height: var(--practice-crumb-back-size);
  border-radius: var(--practice-crumb-back-radius);
  background: rgba(21, 247, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  padding: var(--practice-crumb-back-padding);
}

.pg-crumb__back:hover {
  background: rgba(21, 247, 255, 0.18);
}

.pg-crumb__back-icon {
  width: var(--practice-crumb-back-icon-box);
  height: var(--practice-crumb-back-icon-box);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pg-crumb__back-icon svg {
  width: var(--practice-crumb-back-arrow-w);
  height: var(--practice-crumb-back-arrow-h);
  display: block;
}

.pg-breadcrumb {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  min-width: 0;
  font-size: var(--practice-font-body);
  line-height: var(--practice-lh-14);
}

.pg-breadcrumb__link {
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.pg-breadcrumb__link:hover {
  color: #15f7ff;
}

.pg-breadcrumb__sep {
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.4);
}

.pg-breadcrumb__current {
  color: #15f7ff; /* 设计稿当前页色 */
  white-space: nowrap;
}

.pg-breadcrumb__text {
  color: #ffffff;
  white-space: nowrap;
}

.pg-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 24px; /* 设计稿 gap: 24px */
  overflow: hidden;
}

/* 左侧图谱区 — 设计稿 容器 53871 */
.pg-graph {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pg-graph__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 90% 70% at 50% 42%, rgba(20, 80, 120, 0.22) 0%, transparent 62%),
    radial-gradient(640px 360px at 12% 8%, rgba(0, 229, 255, 0.16), transparent 58%),
    radial-gradient(520px 420px at 88% 86%, rgba(89, 48, 232, 0.18), transparent 55%),
    linear-gradient(165deg, rgba(18, 40, 78, 0.55) 0%, rgba(10, 8, 40, 0.72) 100%);
  border: 1px solid rgba(21, 247, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 80px rgba(0, 229, 255, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.28);
}

.pg-graph__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(21, 247, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 247, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 20%, transparent 75%);
}

.pg-graph__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  box-shadow: inset 0 0 100px rgba(4, 8, 28, 0.55);
}

.pg-graph__canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: grab;
  touch-action: none;
}

.pg-graph__canvas:active {
  cursor: grabbing;
}

.pg-graph__toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(21, 247, 255, 0.22);
  background: rgba(6, 18, 40, 0.55);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.pg-tool {
  border: 0;
  background: transparent;
  color: rgba(226, 246, 255, 0.88);
  font: inherit;
  font-size: var(--practice-font-tag);
  line-height: 1;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.pg-tool:hover,
.pg-tool[aria-pressed="true"] {
  background: rgba(21, 247, 255, 0.14);
  color: #15f7ff;
}

.pg-graph__legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: none;
  background: rgba(6, 18, 40, 0.55);
  font-size: var(--practice-font-tag);
  color: rgba(226, 240, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.pg-graph__legend span,
.pg-graph__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pg-graph__legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}

.pg-graph__legend--relation {
  gap: 10px 18px;
  padding: 7px 14px;
}

.pg-graph__legend--relation em {
  font-style: normal;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.pg-graph__legend--relation i {
  width: 28px;
  height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-top: 1.5px dashed currentColor;
  background: transparent;
  opacity: 1;
}

.pg-graph__legend-item--related {
  color: var(--pg-rel-related-legend);
}

.pg-graph__legend-item--pre {
  color: var(--pg-rel-pre-legend);
}

.pg-graph__legend-item--post {
  color: var(--pg-rel-post-legend);
}

/* 右侧详情面板 */
.pg-side {
  flex: 0 0 368px;
  width: 368px;
  min-height: 0;
  max-height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(31, 147, 132, 0.22) 0%, rgba(12, 28, 58, 0.55) 42%, rgba(8, 14, 36, 0.72) 100%);
  border: 1px solid rgba(21, 247, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -24px 48px rgba(0, 0, 0, 0.12),
    0 16px 48px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  backdrop-filter: blur(12px);
  font-size: var(--practice-font-body);
  line-height: var(--practice-lh-14);
}

.pg-side__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(21, 247, 255, 0.35) transparent;
}

.pg-side__body > .pg-course,
.pg-side__body > .pg-detail {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.pg-side__body::-webkit-scrollbar {
  width: 5px;
}

.pg-side__body::-webkit-scrollbar-thumb {
  background: rgba(21, 247, 255, 0.28);
  border-radius: 999px;
}

.pg-detail[hidden],
.pg-course[hidden],
.pg-detail__tag[hidden],
.pg-detail__zone[hidden],
.pg-detail__subblock[hidden],
.pg-detail__block--flow[hidden] {
  display: none !important;
}

/* —— 右侧详情内容 —— */
.pg-detail {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  animation: pg-detail-in 280ms ease-out;
}

.pg-detail__top {
  flex: 0 0 auto;
  padding: 0;
  box-sizing: border-box;
  border-bottom: 1px solid var(--practice-border-muted);
  background: linear-gradient(
    180deg,
    rgba(31, 147, 132, 0.14) 0%,
    rgba(0, 0, 0, 0.1) 48%,
    rgba(0, 0, 0, 0.06) 100%
  );
  position: relative;
}

.pg-detail__top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 4%,
    var(--practice-cyan) 35%,
    var(--practice-mint) 65%,
    transparent 96%
  );
  opacity: 0.75;
  pointer-events: none;
}

.pg-detail[data-tier="knowledge"] .pg-detail__top::after {
  background: linear-gradient(
    90deg,
    transparent 4%,
    var(--practice-green) 40%,
    #6ee7b7 70%,
    transparent 96%
  );
}

.pg-detail[data-tier="skill"] .pg-detail__top::after {
  background: linear-gradient(
    90deg,
    transparent 4%,
    var(--practice-amber) 40%,
    #fde68a 70%,
    transparent 96%
  );
}

.pg-detail[data-tier="kpoint"] .pg-detail__top::after {
  background: linear-gradient(
    90deg,
    transparent 4%,
    #f472b6 40%,
    #fbcfe8 70%,
    transparent 96%
  );
}

.pg-detail__top .pg-detail__head {
  padding: 14px 96px 0 14px;
}

.pg-detail__top .pg-detail__desc {
  padding: 8px 14px 14px;
  border-top: 1px solid transparent;
}

.pg-detail__content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 12px 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--practice-cyan-rgb), 0.25) transparent;
}

.pg-detail__zone {
  flex: 0 0 auto;
  padding: 12px;
  border-radius: var(--practice-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(0, 0, 0, 0.16) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 14px rgba(0, 0, 0, 0.1);
}

.pg-detail__zone-title {
  margin: 0 0 8px;
  font-size: var(--practice-font-body);
  line-height: var(--practice-lh-14);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
}

.pg-detail__zone-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pg-detail__zone--links .pg-detail__zone-body {
  gap: 20px;
  padding-top: 4px;
}

.pg-detail__subblock {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.pg-detail__zone--intro .pg-detail__intro-text {
  margin-top: 0;
}

.pg-detail__zone--intro .pg-detail__intro-media {
  margin-top: 10px;
}

.pg-detail__zone--intro .pg-detail__intro-text[hidden] + .pg-detail__intro-media {
  margin-top: 0;
}

.pg-detail__zone--resources .pg-detail__resources {
  margin-top: 2px;
}

.pg-detail__head {
  display: block;
  margin: 0 0 12px;
}

.pg-detail[data-tier="skill"] .pg-detail__head {
  margin: 0;
}

.pg-detail__title {
  margin: 0;
  min-width: 0;
  font-size: var(--practice-font-title);
  line-height: var(--practice-lh-16);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.pg-detail__tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  padding: 3px 11px;
  border-radius: 999px;
  font-size: var(--practice-font-tag);
  line-height: var(--practice-lh-tag);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.14), rgba(56, 189, 248, 0.06));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.12);
}

.pg-detail[data-tier="knowledge"] .pg-detail__tag {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.45);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.16), rgba(52, 211, 153, 0.06));
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.12);
}

.pg-detail[data-tier="skill"] .pg-detail__top .pg-detail__head {
  padding: 14px 14px 12px;
  margin: 0;
}

.pg-detail__skill-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pg-detail__skill-meta::-webkit-scrollbar {
  display: none;
}

.pg-detail__skill-meta .pg-detail__pill {
  flex: 0 0 auto;
  max-width: none;
}

.pg-detail__pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: var(--practice-font-tag);
  line-height: var(--practice-lh-tag);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pg-detail__pill--diff {
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.08));
}

.pg-detail__pill--dim {
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0.06));
}

.pg-detail__pill--attr {
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.16), rgba(52, 211, 153, 0.06));
}

.pg-detail__pill--code {
  color: #ddd6fe;
  border: 1px solid rgba(167, 139, 250, 0.5);
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.22), rgba(167, 139, 250, 0.08));
}

.pg-detail[data-tier="skill"] .pg-detail__tag {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0.06));
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.12);
}

.pg-detail[data-tier="kpoint"] .pg-detail__tag {
  color: #fbcfe8;
  border-color: rgba(244, 114, 182, 0.55);
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.22), rgba(244, 114, 182, 0.08));
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.18);
}

.pg-detail[data-tier="skill"] .pg-detail__skill-intro {
  gap: 10px;
}

.pg-detail__intro-text {
  margin: 0;
  font-size: var(--practice-font-body);
  line-height: var(--practice-lh-14);
  color: var(--practice-text-secondary);
}

.pg-detail__intro-text[hidden] {
  display: none !important;
}

.pg-detail__intro-media {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.pg-detail__intro-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  object-position: center;
  background: rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.pg-detail__intro-img[hidden] {
  display: none !important;
}

.pg-detail[data-tier="skill"] .pg-detail__desc[hidden] {
  display: none !important;
}

.pg-detail__desc {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: var(--practice-text-secondary);
}

@keyframes pg-detail-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pg-detail__block--flow {
  gap: 10px;
}

.pg-detail__chips--relation {
  gap: 8px;
}

.pg-detail__chip--relation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 11px;
  max-width: 100%;
}

.pg-detail__chip-name {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.pg-detail__chip--rel-pre {
  border-color: rgba(167, 139, 250, 0.38);
  background: rgba(167, 139, 250, 0.1);
  box-shadow: 0 2px 8px rgba(167, 139, 250, 0.06);
}

.pg-detail__chip--rel-post {
  border-color: rgba(52, 211, 153, 0.38);
  background: rgba(52, 211, 153, 0.1);
  box-shadow: 0 2px 8px rgba(52, 211, 153, 0.06);
}

.pg-detail__rel-tag {
  flex: 0 0 auto;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pg-detail__rel-tag--pre {
  color: var(--pg-rel-pre-color);
  background: var(--pg-rel-pre-bg);
  border: 1px solid var(--pg-rel-pre-border);
}

.pg-detail__rel-tag--post {
  color: var(--pg-rel-post-color);
  background: var(--pg-rel-post-bg);
  border: 1px solid var(--pg-rel-post-border);
}

.pg-detail__block--flow,
.pg-detail__block--section {
  padding: 12px;
  border-radius: var(--practice-radius-md);
  border: 1px solid var(--practice-border-muted);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.045) 0%,
    rgba(0, 0, 0, 0.16) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 4px 16px rgba(0, 0, 0, 0.12);
}

.pg-detail[data-tier="skill"] .pg-detail__block--flow,
.pg-detail[data-tier="skill"] .pg-detail__block--section {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.14);
  box-shadow: none;
}

.pg-detail[data-tier="skill"] .pg-detail__block {
  gap: 6px;
}

.pg-detail[data-tier="skill"] .pg-detail__block-title {
  font-size: var(--practice-font-tag);
  line-height: var(--practice-lh-tag);
  font-weight: 500;
  color: var(--practice-text-muted);
  letter-spacing: 0.04em;
}

.pg-detail[data-tier="skill"] .pg-detail__block-title::before {
  display: none;
}

.pg-detail__knowledge-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pg-detail__knowledge-row[hidden] {
  display: none !important;
}

.pg-detail__knowledge-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
}

.pg-detail__knowledge-row--in {
  background: rgba(52, 211, 153, 0.06);
}

.pg-detail__knowledge-row--ext {
  background: rgba(21, 247, 255, 0.06);
  border: 1px dashed rgba(21, 247, 255, 0.14);
}

.pg-detail__knowledge-row-label {
  font-size: var(--practice-font-tag);
  line-height: var(--practice-lh-tag);
  font-weight: 500;
  color: var(--practice-text-faint);
}

.pg-detail__block--last {
  margin-bottom: 2px;
}

.pg-detail__block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pg-detail__block-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: inherit;
  line-height: inherit;
  font-weight: 600;
  color: var(--practice-text-body);
  letter-spacing: 0.02em;
}

.pg-detail__block-title::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--practice-cyan), rgba(var(--practice-cyan-rgb), 0.15));
  box-shadow: 0 0 10px rgba(var(--practice-cyan-rgb), 0.4);
}

.pg-detail[data-tier="knowledge"] .pg-detail__block-title::before {
  background: linear-gradient(180deg, var(--practice-green), rgba(52, 211, 153, 0.15));
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

.pg-detail[data-tier="skill"] .pg-detail__block-title::before {
  background: linear-gradient(180deg, var(--practice-amber), rgba(251, 191, 36, 0.15));
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

.pg-detail__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pg-detail__chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: inherit;
  line-height: var(--practice-lh-14);
  font-weight: 500;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  box-sizing: border-box;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.pg-detail__chip:hover {
  transform: translateY(-1px);
}

.pg-detail__chips--pre .pg-detail__chip {
  border-color: rgba(167, 139, 250, 0.4);
  color: #ddd6fe;
  background: rgba(167, 139, 250, 0.12);
  box-shadow: 0 2px 8px rgba(167, 139, 250, 0.08);
}

.pg-detail__chips--post .pg-detail__chip {
  border-color: rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.12);
  box-shadow: 0 2px 8px rgba(52, 211, 153, 0.08);
}

.pg-detail__chips--ability .pg-detail__chip,
.pg-detail__chips--knowledge-in .pg-detail__chip,
.pg-detail__chips--knowledge .pg-detail__chip {
  border-color: rgba(255, 255, 255, 0.18);
  border-style: solid;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.pg-detail__chips--knowledge-ext .pg-detail__chip {
  border-color: rgba(255, 255, 255, 0.22);
  border-style: dashed;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.pg-detail__chips--ability .pg-detail__chip:hover,
.pg-detail__chips--knowledge-in .pg-detail__chip:hover,
.pg-detail__chips--knowledge-ext .pg-detail__chip:hover,
.pg-detail__chips--knowledge .pg-detail__chip:hover,
.pg-detail__chips--ability .pg-detail__chip--link:hover,
.pg-detail__chips--knowledge-in .pg-detail__chip--link:hover,
.pg-detail__chips--knowledge-ext .pg-detail__chip--link:hover,
.pg-detail__chips--knowledge .pg-detail__chip--link:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.pg-detail[data-tier="skill"] .pg-detail__res {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  box-shadow: none;
}

.pg-detail[data-tier="skill"] .pg-detail__res:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.pg-detail__resources {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg-detail__res {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px 10px 14px;
  border-radius: var(--practice-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.22));
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
}

.pg-detail__res::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  opacity: 0.85;
}

.pg-detail__res--courseware::before {
  background: var(--practice-orange);
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.45);
}

.pg-detail__res--micro::before {
  background: var(--practice-cyan);
  box-shadow: 0 0 10px rgba(var(--practice-cyan-rgb), 0.4);
}

.pg-detail__res--exercise::before {
  background: var(--practice-green);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
}

.pg-detail__res-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pg-detail__res-type {
  font-size: var(--practice-font-tag);
  font-weight: 600;
  line-height: var(--practice-lh-tag);
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.pg-detail__res-name {
  font-size: inherit;
  font-weight: 600;
  line-height: var(--practice-lh-14);
  color: rgba(255, 255, 255, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pg-detail__res:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 20px rgba(0, 0, 0, 0.22);
}

.pg-detail__res-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
}

.pg-detail__res-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.pg-detail__res--courseware {
  border-color: rgba(251, 146, 60, 0.38);
  color: #fdba74;
}

.pg-detail__res--courseware .pg-detail__res-type {
  color: var(--practice-orange);
  opacity: 1;
}

.pg-detail__res--courseware:hover {
  border-color: rgba(251, 146, 60, 0.55);
  background: linear-gradient(180deg, rgba(251, 146, 60, 0.1), rgba(0, 0, 0, 0.25));
}

.pg-detail__res--courseware .pg-detail__res-icon {
  background: rgba(251, 146, 60, 0.18);
  color: #fdba74;
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.15);
}

.pg-detail__res--micro {
  cursor: pointer;
  border-color: rgba(21, 247, 255, 0.35);
  color: #67e8f9;
}

.pg-detail__res--micro .pg-detail__res-type {
  color: var(--practice-cyan);
  opacity: 1;
}

.pg-detail__res--exercise .pg-detail__res-type {
  color: var(--practice-green);
  opacity: 1;
}

.pg-detail__res--micro:hover {
  border-color: rgba(21, 247, 255, 0.52);
  background: linear-gradient(180deg, rgba(21, 247, 255, 0.1), rgba(0, 0, 0, 0.25));
}

.pg-detail__res--micro .pg-detail__res-icon {
  background: rgba(21, 247, 255, 0.14);
  color: #15f7ff;
  box-shadow: 0 0 12px rgba(21, 247, 255, 0.12);
}

.pg-detail__res--exercise {
  border-color: rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

.pg-detail__res--exercise:hover {
  border-color: rgba(52, 211, 153, 0.52);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.1), rgba(0, 0, 0, 0.25));
}

.pg-detail__res--exercise .pg-detail__res-icon {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.12);
}

/* —— 课程大节点 · 知识结构 —— */
.pg-course {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  animation: pg-detail-in 280ms ease-out;
}

.pg-course__top {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--practice-border-muted);
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.12) 0%,
    rgba(0, 0, 0, 0.1) 55%,
    rgba(0, 0, 0, 0.06) 100%
  );
  position: relative;
}

.pg-course__top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 4%,
    #22d3ee 35%,
    var(--practice-cyan) 65%,
    transparent 96%
  );
  opacity: 0.8;
  pointer-events: none;
}

.pg-course__top .pg-course__title {
  margin: 0;
  padding: 14px 96px 12px 14px;
  font-size: var(--practice-font-title);
  line-height: var(--practice-lh-16);
  font-weight: 600;
  color: var(--practice-text);
  letter-spacing: 0.01em;
}

.pg-course__tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: var(--practice-font-tag);
  line-height: var(--practice-lh-tag);
  font-weight: 600;
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, 0.55);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.18), rgba(34, 211, 238, 0.06));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.14);
}

.pg-course__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 10px 12px 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pg-course__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: transparent;
}

.pg-course__stat {
  position: relative;
  text-align: center;
  padding: 12px 6px 11px;
  border-radius: var(--practice-radius-md);
  border: 1px solid var(--practice-border-muted);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(0, 0, 0, 0.22) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 18px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.pg-course__stat--kpoint {
  border-color: rgba(244, 114, 182, 0.28);
}

.pg-course__stat--kpoint::before {
  background: linear-gradient(90deg, #f472b6, transparent);
}

.pg-course__stat--kpoint .pg-course__stat-num {
  color: #fbcfe8;
}

.pg-course__stat--skill {
  border-color: rgba(251, 191, 36, 0.22);
}

.pg-course__stat--skill::before {
  background: linear-gradient(90deg, var(--practice-amber), transparent);
}

.pg-course__stat--skill .pg-course__stat-num {
  color: #fef3c7;
}

.pg-course__stat--resource {
  border-color: rgba(var(--practice-cyan-rgb), 0.2);
}

.pg-course__stat--resource::before {
  background: linear-gradient(90deg, var(--practice-cyan), transparent);
}

.pg-course__stat--resource .pg-course__stat-num {
  color: #ecfeff;
}

.pg-course__stat::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  opacity: 0.95;
}

.pg-course__stat-num {
  margin: 0 0 3px;
  font-size: var(--practice-font-title);
  line-height: var(--practice-lh-16);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pg-course__stat-num small {
  margin-left: 2px;
  font-size: var(--practice-font-body);
  font-weight: 500;
  color: var(--practice-text-muted);
}

.pg-course__stat-label {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: var(--practice-text-muted);
}

.pg-course__struct {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 10px;
  border-radius: var(--practice-radius-md);
  border: 1px solid var(--practice-border-muted);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(0, 0, 0, 0.18) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.1);
}

.pg-course__struct-title {
  margin: 0 0 2px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: inherit;
  font-weight: 600;
  color: var(--practice-text-body);
  letter-spacing: 0.02em;
}

.pg-course__struct-title::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--practice-purple), rgba(167, 139, 250, 0.2));
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
}

.pg-tree {
  list-style: none;
  margin: 0;
  padding: 4px 2px 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--practice-cyan-rgb), 0.25) transparent;
}

.pg-tree::-webkit-scrollbar {
  width: 5px;
}

.pg-tree::-webkit-scrollbar-thumb {
  background: rgba(var(--practice-cyan-rgb), 0.28);
  border-radius: 999px;
}

.pg-tree__group {
  list-style: none;
  margin: 2px 0 4px 11px;
  padding: 0 0 0 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.pg-tree__item {
  margin: 0;
  padding: 0;
}

.pg-tree__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0;
  padding: 6px 8px;
  border-radius: var(--practice-radius-sm);
  border: 1px solid transparent;
  line-height: var(--practice-lh-14);
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.pg-tree__row--project {
  font-weight: 600;
  color: #ecfeff;
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.14) 0%,
    rgba(34, 211, 238, 0.04) 100%
  );
  border-color: rgba(34, 211, 238, 0.22);
}

.pg-tree__row--post {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.pg-tree__row--knowledge,
.pg-tree__row--skill {
  cursor: pointer;
}

.pg-tree__row--knowledge:hover,
.pg-tree__row--skill:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.pg-tree__row--knowledge.is-active {
  background: linear-gradient(
    90deg,
    rgba(52, 211, 153, 0.2) 0%,
    rgba(52, 211, 153, 0.06) 100%
  );
  border-color: rgba(52, 211, 153, 0.35);
}

.pg-tree__row--skill.is-active {
  background: linear-gradient(
    90deg,
    rgba(251, 191, 36, 0.18) 0%,
    rgba(251, 191, 36, 0.06) 100%
  );
  border-color: rgba(251, 191, 36, 0.38);
}

.pg-tree__tag {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: var(--practice-font-tag);
  line-height: var(--practice-lh-tag);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.pg-tree__tag--project {
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.pg-tree__tag--post {
  color: #ddd6fe;
  background: rgba(167, 139, 250, 0.22);
  border: 1px solid rgba(167, 139, 250, 0.38);
}

.pg-tree__tag--knowledge {
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.pg-tree__tag--skill {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.pg-tree__tag--kpoint {
  color: #fbcfe8;
  background: rgba(244, 114, 182, 0.2);
  border: 1px solid rgba(244, 114, 182, 0.45);
}

.pg-tree__row--kpoint {
  padding-left: 4px;
}

.pg-tree__row--kpoint.is-active {
  background: linear-gradient(
    90deg,
    rgba(244, 114, 182, 0.24) 0%,
    rgba(244, 114, 182, 0.08) 100%
  );
  border-color: rgba(244, 114, 182, 0.42);
}

.pg-tree__row--kpoint.is-active .pg-tree__label {
  color: #fce7f3;
}

.pg-tree__label {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(255, 255, 255, 0.86);
  word-break: break-word;
}

.pg-tree__row--knowledge.is-active .pg-tree__label {
  color: #6ee7b7;
  font-weight: 600;
}

.pg-tree__row--skill.is-active .pg-tree__label {
  color: #fde68a;
  font-weight: 600;
}

.pg-detail[data-tier="post"] .pg-detail__top::after {
  background: linear-gradient(
    90deg,
    transparent 4%,
    var(--practice-purple) 40%,
    #c4b5fd 70%,
    transparent 96%
  );
}

.pg-detail[data-tier="post"] .pg-detail__tag {
  color: #ddd6fe;
  border-color: rgba(167, 139, 250, 0.5);
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.18), rgba(167, 139, 250, 0.06));
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.12);
}

.pg-detail__dims {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg-detail__dim {
  display: grid;
  grid-template-columns: 4.5em 1fr 2.2em;
  align-items: center;
  gap: 8px;
  font-size: inherit;
  line-height: 18px;
}

.pg-detail__dim-name {
  color: var(--practice-text-secondary);
  font-weight: 500;
}

.pg-detail__dim-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pg-detail__dim-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--practice-purple), #c4b5fd);
}

.pg-detail__dim-weight {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--practice-text-muted);
  font-size: var(--practice-font-body);
}

.pg-detail__scenes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg-detail__scene {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--practice-radius-md);
  border: 1px solid rgba(34, 211, 238, 0.32);
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.12) 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
  color: #ecfeff;
  text-decoration: none;
  font: inherit;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.pg-detail__scene:hover {
  border-color: rgba(34, 211, 238, 0.5);
  transform: translateY(-1px);
}

.pg-detail__scene-tag {
  flex: 0 0 auto;
  padding: 0 6px;
  border-radius: 4px;
  font-size: var(--practice-font-tag);
  line-height: var(--practice-lh-tag);
  font-weight: 600;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.pg-detail__scene-title {
  flex: 1 1 auto;
  font-weight: 600;
  line-height: var(--practice-lh-14);
}

.pg-detail__notes {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--practice-text-secondary);
  font-size: inherit;
  line-height: var(--practice-lh-14);
  max-height: 200px;
  overflow: auto;
}

.pg-detail__chip--link {
  cursor: pointer;
}

.pg-detail__chip--link:hover {
  border-color: rgba(21, 247, 255, 0.45);
}

.pg-tree__row--clickable {
  cursor: pointer;
}

.pg-tree__row--post.pg-tree__row--clickable:hover {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.25);
}

.pg-tree__row--post.is-active {
  background: linear-gradient(
    90deg,
    rgba(167, 139, 250, 0.22) 0%,
    rgba(167, 139, 250, 0.08) 100%
  );
  border-color: rgba(167, 139, 250, 0.35);
}

@media (max-width: 1199px) {
  .pg-side {
    flex-basis: 320px;
    width: 320px;
  }
}

@media (max-width: 900px) {
  .pg-body {
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .pg-graph {
    flex: 1 1 55%;
    min-height: 240px;
  }

  .pg-side {
    flex: 1 1 45%;
    width: 100%;
    max-width: none;
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }

  .pg-graph__stage {
    min-height: 0;
  }

  .pg-graph__legend {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pg-tool,
  .pg-detail__res,
  .pg-detail__chip {
    transition: none;
  }

  .pg-detail__chip:hover,
  .pg-detail__res:hover {
    transform: none;
  }

  .pg-detail {
    animation: none;
  }
}

/* —— 微课二级弹窗 · 视频课 —— */
.pg-video-dialog {
  --pg-micro-pad: clamp(12px, 3vw, 24px);
  --pg-micro-head: 3.25rem;
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(var(--pg-micro-pad), env(safe-area-inset-top, 0px))
    max(var(--pg-micro-pad), env(safe-area-inset-right, 0px))
    max(var(--pg-micro-pad), env(safe-area-inset-bottom, 0px))
    max(var(--pg-micro-pad), env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.pg-video-dialog[hidden] {
  display: none !important;
}

.pg-video-dialog__mask {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 24, 0.72);
  backdrop-filter: blur(4px);
}

.pg-video-dialog__panel {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(920px, 100%);
  height: auto;
  max-height: calc(100dvh - 2 * var(--pg-micro-pad));
  max-height: calc(100vh - 2 * var(--pg-micro-pad));
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(21, 247, 255, 0.28);
  background: linear-gradient(
    165deg,
    rgba(31, 147, 132, 0.35) 0%,
    rgba(8, 14, 36, 0.96) 48%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.pg-video-dialog__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--pg-micro-head);
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid rgba(21, 247, 255, 0.12);
  box-sizing: border-box;
}

.pg-video-dialog__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--practice-font-title);
  line-height: var(--practice-lh-16);
  font-weight: 600;
  color: #fff;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.pg-video-dialog__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(21, 247, 255, 0.25);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.85);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
}

.pg-video-dialog__close:hover {
  border-color: rgba(21, 247, 255, 0.45);
  color: var(--practice-cyan, #15f7ff);
}

.pg-video-dialog__body {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 12px 12px;
  box-sizing: border-box;
}

/* 16:9 区域：在视口高度与宽度之间取可放下的最大矩形 */
.pg-video-dialog__media {
  position: relative;
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  max-height: calc(100dvh - var(--pg-micro-head) - 2 * var(--pg-micro-pad) - 12px);
  max-height: calc(
    100vh - var(--pg-micro-head) - 2 * var(--pg-micro-pad) - 12px
  );
  max-width: min(
    100%,
    calc(
      (100dvh - var(--pg-micro-head) - 2 * var(--pg-micro-pad) - 12px) * 16 / 9
    )
  );
  max-width: min(
    100%,
    calc(
      (100vh - var(--pg-micro-head) - 2 * var(--pg-micro-pad) - 12px) * 16 / 9
    )
  );
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.pg-video-dialog__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

body.is-pg-micro-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .pg-video-dialog {
    --pg-micro-head: 3rem;
    --pg-micro-pad: 10px;
  }

  .pg-video-dialog__panel {
    border-radius: 12px;
  }

  .pg-video-dialog__body {
    padding: 0 10px 10px;
  }

  .pg-video-dialog__media {
    border-radius: 8px;
  }
}
