/* d4-embed.css — Planner 嵌入视图样式（独立于 Planner 构建器） */

.d4-embed { margin: 0 auto; width: 100%; max-width: none; }
.d4t-wrapper { background: #0d0d0d; border: 1px solid #1c1c1c; border-radius: 6px; overflow: hidden; }

/* ── Paperdoll ────────────────────────────────────────────── */
.d4t-Paperdoll {
  position: relative;
  padding: 12px;
  min-height: 360px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  grid-template-rows: auto 1fr auto auto auto;
  gap: 4px;
}
.d4t-hero {
  grid-column: 2; grid-row: 1 / 3;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  min-height: 240px; opacity: 0.6;
}
.d4t-class-0 { background-image: url("/d4-assets/media/barbarian-hero.webp"); }
.d4t-class-1 { background-image: url("/d4-assets/media/druid-hero.webp"); }
.d4t-class-2 { background-image: url("/d4-assets/media/necromancer-hero.webp"); }
.d4t-class-3 { background-image: url("/d4-assets/media/rogue-hero.webp"); }
.d4t-class-4 { background-image: url("/d4-assets/media/sorcerer-hero.webp"); }
.d4t-class-5 { background-image: url("/d4-assets/media/spiritborn-hero.webp"); }
.d4t-class-6 { background-image: url("/d4-assets/media/paladin-hero.webp"); }

.d4t-armor-slots { grid-column: 1; grid-row: 1 / 3; display: flex; flex-direction: column; gap: 4px; z-index: 1; }
.d4t-jewelry-slots { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; gap: 4px; z-index: 1; }
.d4t-weapon.d4t-left { grid-column: 1; grid-row: 3; z-index: 1; display: flex; justify-content: center; }
.d4t-weapon.d4t-center { grid-column: 2; grid-row: 3; z-index: 1; display: flex; justify-content: center; align-items: center; }
.d4t-weapon.d4t-right { grid-column: 3; grid-row: 3; z-index: 1; display: flex; justify-content: center; }
.d4t-dual-weapons.d4t-right { grid-column: 3; grid-row: 3; z-index: 1; display: flex; justify-content: center; position: relative; }
.d4t-dual-slots {
  width: 92px;
  height: 58px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.d4t-dual-slots .d4t-slot {
  position: absolute;
  width: 40px;
  height: 52px;
}
.d4t-dual-slots .d4t-slot:first-child { left: 0; }
.d4t-dual-slots .d4t-slot:last-child { right: 0; }
.d4t-group {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid #383838;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d0c19a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.d4t-group-bow::before { content: "Bow"; }
.d4t-group-dual::before { content: "DW"; }
.d4t-group-blunt::before { content: "2H"; }
.d4t-group-slash::before { content: "2H"; }

.d4t-slot {
  width: 48px; height: 48px;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(0,0,0,0.6);
  border: 2px solid #333;
}
.d4t-frame { position: absolute; inset: 0; border-radius: 2px; pointer-events: none; }
.d4t-frame-legendary { border: 2px solid #f5a623; }
.d4t-frame-unique { border: 2px solid #8b5cf6; }
.d4t-frame-mythic { border: 2px solid #ef4444; }
.d4t-frame-rare { border: 2px solid #eab308; }
.d4t-image {
  width: 100%; height: 100%;
  background-size: contain; background-position: center; background-repeat: no-repeat;
}
.d4t-socket {
  position: absolute; bottom: 1px; right: 1px;
  width: 12px; height: 12px;
}

.d4t-Paperdoll > .d4t-title {
  grid-column: 1 / -1; grid-row: 4;
  text-align: right;
  font-size: 20px; font-weight: 700;
  color: rgba(255,255,255,0.12);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 4px;
}
.d4t-planner-link {
  grid-column: 1 / -1; grid-row: 5;
  text-align: center;
  font-size: 11px; color: #555;
  text-decoration: none;
  padding: 6px 0;
  cursor: pointer;
}
.d4t-planner-link:hover { color: #057af0; }

.d4t-paperdoll-footer {
  display: flex;
  justify-content: center;
  padding: 6px 0 2px;
  background: #0d0d0d;
}

.d4t-paperdoll-skillbar {
  position: relative;
  width: 320px;
  height: 64px;
  background-image: url(/d4-assets/media/skillbar.9c45ba7b.webp);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.d4t-paperdoll-skill-slot {
  position: absolute;
  top: 7px;
  width: 48px;
  height: 48px;
}

.d4t-paperdoll-skill-slot:nth-child(1) { left: 9px; }
.d4t-paperdoll-skill-slot:nth-child(2) { left: 60px; }
.d4t-paperdoll-skill-slot:nth-child(3) { left: 111px; }
.d4t-paperdoll-skill-slot:nth-child(4) { left: 162px; }
.d4t-paperdoll-skill-slot:nth-child(5) { left: 213px; }
.d4t-paperdoll-skill-slot:nth-child(6) { left: 264px; }

.d4t-paperdoll-skill-icon {
  position: absolute;
  inset: 0;
  background-size: 48px auto;
  background-position: 50%;
  background-repeat: no-repeat;
}

/* ── Composite Paperdoll (multi-variant tabs) ─────────────── */
.d4t-CompositePaperdoll .d4t-tabs {
  display: flex; gap: 2px; list-style: none; margin: 0; padding: 8px 12px 0;
  flex-wrap: wrap;
}
.d4t-CompositePaperdoll .d4t-tabs li {
  padding: 5px 14px;
  font-size: 12px; color: #777; cursor: pointer;
  border-radius: 4px 4px 0 0;
  transition: color 0.15s, background 0.15s;
}
.d4t-CompositePaperdoll .d4t-tabs li:hover { color: #ccc; background: #1a1a1a; }
.d4t-CompositePaperdoll .d4t-tabs li.d4t-active { color: #fff; background: #057af0; font-weight: 600; }

/* ── SkillsView ──────────────────────────────────────────── */
.d4t-SkillsView {
  padding: 25px 18px 17px;
  width: 340px;
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 0;
  border-style: solid;
  border-width: 0;
  border-image: url(/media/maxroll/7b/7b5b984b9567f619a1c07c7a70b880018204185e0ae036b5feb86a9d57296452.webp) 180 0 fill / 90px 0 round;
}
.d4t-SkillsView::before,
.d4t-SkillsView::after {
  content: "";
  position: absolute;
  inset: 16px;
}
.d4t-SkillsView::before {
  background: url(/media/maxroll/97/971156bd4e388e096e58df6bfd6893ad1c238168a65fa89f5efceac1b60f0862.webp);
  background-size: 100% auto;
  background-position: 50%;
  z-index: -2;
}
.d4t-SkillsView::after {
  background: url(/media/maxroll/01/019cb7402e6688dd24488779c03b6a9d3399d2a8c2c3ec1cc05fcd29a32e6250.webp);
  background-size: 100% 100%;
  z-index: -1;
}
.d4t-SkillsView > .d4t-title {
  height: 38px;
  padding: 0 10px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}
.d4t-SkillsView .d4t-name {
  font-size: 18px;
  font-weight: 700;
  color: #efe9dc;
  margin-bottom: 5px;
  flex-shrink: 1;
  flex-grow: 1;
  line-height: 1;
}
.d4t-SkillsView .d4t-points {
  flex-shrink: 0;
  font-size: 28px;
  font-weight: 700;
  color: #ffff74;
}
.d4t-SkillsView .d4t-points .d4t-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url(/media/maxroll/05/050311b5a3a3b62d5a53df63f9120d7e909480356b22f30535ca11453f972156.webp);
  background-size: contain;
  margin: 0 -10px -4px 8px;
}
.d4t-SkillsView .d4t-points .d4t-icon::before { content: none; }
.d4t-SkillsView .d4t-expand {
  flex-grow: 0;
  flex-basis: 0;
  margin-left: 8px;
  font-size: 20px;
  color: #aaa;
  cursor: pointer;
}
.d4t-SkillsView .d4t-expand:hover { color: #fff; }
.d4t-SkillsView .d4t-expand svg { width: 20px; height: 20px; display: block; }
.d4t-SkillsView .d4t-SkillPreview {
  overflow-y: auto;
  flex: 1 1;
  min-height: 0;
}
.d4t-SkillPreview {
  display: flex;
  flex-direction: column;
}

/* ── Skill group ─────────────────────────────────────────── */
.d4t-SkillPreview .d4t-skill-group {
  width: 290px;
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
  z-index: 0;
}

/* ── Header / Milestone ──────────────────────────────────── */
.d4t-SkillPreview .d4t-header {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: stretch;
  position: relative;
}
.d4t-SkillPreview .d4t-header .d4t-milestone {
  background-image: url(/media/maxroll/45/45ad4441d18f2cafbd87aec8ece301d830f1acc8c7179c82902e9aa1b7006831.webp);
  background-size: 144px auto;
  background-position: 0 0;
  width: 50px;
  height: 50px;
  position: relative;
}
.d4t-SkillPreview .d4t-header .d4t-milestone .d4t-icon {
  position: absolute;
  inset: 12px;
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
  transform: none;
}
.d4t-SkillPreview .d4t-header.d4t-wide::before {
  content: "";
  position: absolute;
  inset: 12px 15px;
  z-index: -2;
  border-image: url(/media/maxroll/59/591ab874a9f450450caabf28b70fbe3a4f00988146fe6228067892218aa5d03c.webp) 40 0 fill / 20px 0 round;
}
.d4t-SkillPreview .d4t-header.d4t-paladin::before { inset: 20px 15px; }
.d4t-SkillPreview .d4t-header.d4t-wide.d4t-enabled::before {
  border-image-source: url(/media/maxroll/cf/cfe6b1ff74611b314bcc5a48715a8da3eee4a934801254b42295cb94686e8743.webp);
}
.d4t-SkillPreview .d4t-header.d4t-wide.d4t-active::before {
  border-image-source: url(/media/maxroll/6d/6d9739f3cc2c34a147287243c416cfb03eba84e7f351d3a96cab378dea5b8a7d.webp);
}
.d4t-SkillPreview .d4t-header.d4t-top-passives::before { top: 6px; }
.d4t-SkillPreview .d4t-header.d4t-bottom-passives::before { bottom: 6px; }
.d4t-SkillPreview .d4t-header.d4t-active .d4t-milestone,
.d4t-SkillPreview .d4t-header.d4t-enabled .d4t-milestone {
  background-position-x: -50px;
}

/* ── Entries ──────────────────────────────────────────────── */
.d4t-SkillPreview .d4t-entries { min-width: 0; }

/* ── Skill row & passives row ────────────────────────────── */
.d4t-SkillPreview .d4t-passives,
.d4t-SkillPreview .d4t-skill-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
}
.d4t-SkillPreview .d4t-passives::before,
.d4t-SkillPreview .d4t-skill-row::before {
  content: "";
  position: absolute;
  top: 50%; margin-top: -10px;
  left: -35px; z-index: -1;
  width: 50px; height: 20px;
  background-image: url(/media/maxroll/43/4358179868721e24006a976e8e2005a9905c564b7070a52011d496b70ccaeda0.webp);
  background-size: 150px 40px;
  background-position: 0 -20px;
}
.d4t-SkillPreview .d4t-passives:first-child::before,
.d4t-SkillPreview .d4t-passives:last-child::before,
.d4t-SkillPreview .d4t-skill-row:first-child::before,
.d4t-SkillPreview .d4t-skill-row:last-child::before {
  background-position-y: 0;
}
.d4t-SkillPreview .d4t-passives.d4t-enabled::before,
.d4t-SkillPreview .d4t-skill-row.d4t-enabled::before { background-position-x: -50px; }
.d4t-SkillPreview .d4t-passives.d4t-active::before,
.d4t-SkillPreview .d4t-skill-row.d4t-active::before { background-position-x: -100px; }

/* ── Frame base (sprite) ─────────────────────────────────── */
.d4t-SkillPreview .d4t-frame {
  position: absolute;
  inset: 0;
  background-image: url(/media/maxroll/45/45ad4441d18f2cafbd87aec8ece301d830f1acc8c7179c82902e9aa1b7006831.webp);
  background-size: 144px auto;
  background-position: 0 -50px;
}

/* ── Skill frame (48×48) ─────────────────────────────────── */
.d4t-SkillPreview .d4t-skill-frame {
  flex-shrink: 0;
  width: 48px; height: 48px;
  margin: -2px;
  position: relative;
}
.d4t-SkillPreview .d4t-skill-frame .d4t-icon {
  position: absolute; inset: 11px;
  background-size: contain; background-position: 50%; background-repeat: no-repeat;
}
.d4t-SkillPreview .d4t-skill-frame.d4t-enabled .d4t-frame { background-position-x: -48px; }
.d4t-SkillPreview .d4t-skill-frame.d4t-active .d4t-frame { background-position-x: -96px; }

/* ── Mod column ──────────────────────────────────────────── */
.d4t-SkillPreview .d4t-mod-column {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  width: 24px;
}

/* ── Mod frame (28×28) ───────────────────────────────────── */
.d4t-SkillPreview .d4t-mod-frame {
  width: 28px; height: 28px;
  margin: -4px -2px;
  position: relative;
}
.d4t-SkillPreview .d4t-mod-frame .d4t-frame { background-position: 0 -98px; }
.d4t-SkillPreview .d4t-mod-frame .d4t-icon {
  position: absolute; inset: 6px;
  background-size: contain; background-position: 50%; background-repeat: no-repeat;
  -webkit-mask-image: url(/media/maxroll/45/45ad4441d18f2cafbd87aec8ece301d830f1acc8c7179c82902e9aa1b7006831.webp);
  mask-image: url(/media/maxroll/45/45ad4441d18f2cafbd87aec8ece301d830f1acc8c7179c82902e9aa1b7006831.webp);
  -webkit-mask-size: 144px auto; mask-size: 144px auto;
  -webkit-mask-position: -90px -104px; mask-position: -90px -104px;
}
.d4t-SkillPreview .d4t-mod-frame.d4t-disabled::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background-image: url(/media/maxroll/45/45ad4441d18f2cafbd87aec8ece301d830f1acc8c7179c82902e9aa1b7006831.webp);
  background-size: 144px auto;
  background-position: -112px -98px;
}
.d4t-SkillPreview .d4t-mod-frame::before,
.d4t-SkillPreview .d4t-passive-frame::before {
  content: "";
  position: absolute; z-index: -1;
  top: 50%; margin-top: -10px;
  left: -30px; width: 44px; height: 20px;
  background-image: url(/media/maxroll/43/4358179868721e24006a976e8e2005a9905c564b7070a52011d496b70ccaeda0.webp);
  background-size: 150px 40px;
  transform-origin: right center;
}
.d4t-SkillPreview .d4t-mod-frame.d4t-enabled .d4t-frame { background-position-x: -28px; }
.d4t-SkillPreview .d4t-mod-frame.d4t-enabled::before { background-position-x: -50px; }
.d4t-SkillPreview .d4t-mod-frame.d4t-active .d4t-frame { background-position-x: -56px; }
.d4t-SkillPreview .d4t-mod-frame.d4t-active::before { background-position-x: -100px; }
.d4t-SkillPreview .d4t-mod-frame:first-child:nth-last-child(2)::before { transform: rotate(-23deg); }
.d4t-SkillPreview .d4t-mod-frame:last-child:nth-child(2)::before { transform: rotate(23deg); }
.d4t-SkillPreview .d4t-mod-frame:first-child:nth-last-child(3)::before { transform: rotate(-35deg); }
.d4t-SkillPreview .d4t-mod-frame:last-child:nth-child(3)::before { transform: rotate(35deg); }

/* ── Passive frame (36×36) ───────────────────────────────── */
.d4t-SkillPreview .d4t-passive-frame {
  width: 36px; height: 36px;
  margin: -2px;
  position: relative;
}
.d4t-SkillPreview .d4t-passive-frame .d4t-frame { background-position: 0 -126px; }
.d4t-SkillPreview .d4t-passive-frame.d4t-keystone { margin: -2px 0; }
.d4t-SkillPreview .d4t-passive-frame.d4t-keystone .d4t-frame { background-position-y: -162px; }
.d4t-SkillPreview .d4t-passive-frame .d4t-icon {
  position: absolute; inset: 7px;
  background-size: contain; background-position: 50%; background-repeat: no-repeat;
}
.d4t-SkillPreview .d4t-passive-frame.d4t-enabled .d4t-frame { background-position-x: -36px; }
.d4t-SkillPreview .d4t-passive-frame.d4t-active .d4t-frame { background-position-x: -72px; }
.d4t-SkillPreview .d4t-passive-frame:first-child::before { display: none; }
.d4t-SkillPreview .d4t-passives.d4t-enabled .d4t-passive-frame::before { background-position-x: -50px; }
.d4t-SkillPreview .d4t-passives.d4t-active .d4t-passive-frame::before { background-position-x: -100px; }

/* ── Rank badge ──────────────────────────────────────────── */
.d4t-SkillPreview .d4t-rank {
  position: absolute; z-index: 1;
  font-size: 12px;
  bottom: 2px; right: 2px;
  background: rgba(0,0,0,0.3);
  padding: 0 2px;
}
.d4t-SkillPreview .d4t-skill-frame .d4t-rank { right: 4px; }
.d4t-rank .d4-color-blue { margin-left: 1px; color: #7c7cfb; }

/* ── Skill name ──────────────────────────────────────────── */
.d4t-SkillPreview .d4t-skill-name {
  margin-left: 6px;
  font-size: 16px;
  line-height: 20px;
  color: #666;
}
.d4t-SkillPreview .d4t-skill-name.d4t-active { color: #ccc; }


/* ── Priority ────────────────────────────────────────────── */
.d4t-PriorityEmbed > .d4t-header,
.d4t-Checklist > .d4t-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid #1c1c1c;
}
.d4t-PriorityEmbed .d4t-title,
.d4t-Checklist .d4t-title { font-size: 14px; font-weight: 600; color: #e2e8f0; }
.d4t-badge {
  font-size: 10px; color: #555; text-transform: uppercase;
  padding: 2px 8px; background: rgba(255,255,255,0.04);
  border-radius: 4px; letter-spacing: 0.05em;
}

.d4t-columns { display: flex; gap: 1px; background: #1c1c1c; }
.d4t-column { flex: 1; background: #0d0d0d; padding: 8px; }
.d4t-col-title {
  font-size: 10px; color: #555; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 4px 0 8px; text-align: center;
}

.d4t-priority-slot { margin-bottom: 12px; }
.d4t-slot-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.d4t-slot-icon {
  width: 24px; height: 24px;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  flex-shrink: 0;
}
.d4t-slot-name { font-size: 12px; color: #e2e8f0; font-weight: 500; }
.d4t-slot-label { font-size: 10px; color: #555; }

.d4t-affixes { padding-left: 32px; }
.d4t-affix { font-size: 11px; color: #9ca3af; padding: 1px 0; }
.d4t-affix.d4t-greater { color: #f5a623; }
.d4t-affix.d4t-tempered { color: #22d3ee; }
.d4t-star { color: #e8c97d; margin-right: 4px; }

/* ── Checklist ───────────────────────────────────────────── */
.d4t-list { padding: 8px 0; }
.d4t-checklist-row {
  display: flex; align-items: center; gap: 8px; padding: 4px 14px;
}
.d4t-check { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.d4t-checklist-row .d4t-slot-label { font-size: 10px; color: #555; width: 75px; flex-shrink: 0; }
.d4t-checklist-row .d4t-slot-icon { width: 22px; height: 22px; }
.d4t-item-name { font-size: 12px; font-weight: 500; flex: 1; }

/* ── Paragon / Mercenary placeholder ─────────────────────── */
.d4t-ParagonView > .d4t-header,
.d4t-MercenaryView > .d4t-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid #1c1c1c;
}
.d4t-ParagonView .d4t-title,
.d4t-MercenaryView .d4t-title { font-size: 14px; font-weight: 600; color: #e2e8f0; }

.d4t-MercenaryMini {
  border: 1px solid #1b1b1b;
  background: #0f0f10;
  padding: 10px;
}
.d4t-merc-top {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.d4t-merc-badge {
  flex: 1;
  min-width: 0;
  border: 1px solid #202020;
  background: #131314;
  padding: 6px 8px;
}
.d4t-merc-badge-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #707070;
}
.d4t-merc-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.d4t-merc-avatar,
.d4t-merc-support-skill,
.d4t-merc-node-icon {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.d4t-merc-avatar {
  width: 28px;
  height: 28px;
  border: 1px solid #2a2a2a;
  background-color: #171717;
}
.d4t-merc-badge-name {
  font-size: 12px;
  font-weight: 600;
  color: #d8d8d8;
}
.d4t-merc-support-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.d4t-merc-support-skill {
  width: 22px;
  height: 22px;
  border: 1px solid #312243;
  background-color: #161419;
}
.d4t-merc-graph {
  position: relative;
  height: 210px;
  overflow: hidden;
  border: 1px solid #1f1f1f;
  background:
    radial-gradient(circle at 50% 22%, rgba(111, 34, 34, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(22, 22, 23, 0.98), rgba(12, 12, 13, 0.98));
}
.d4t-merc-line {
  position: absolute;
  background: linear-gradient(180deg, rgba(76, 25, 25, 0.92), rgba(126, 34, 34, 0.92));
  box-shadow: 0 0 10px rgba(127, 29, 29, 0.28);
}
.d4t-merc-line.line-a { left: 104px; top: 36px; width: 2px; height: 32px; }
.d4t-merc-line.line-b { left: 106px; top: 67px; width: 46px; height: 2px; transform: rotate(28deg); transform-origin: left center; }
.d4t-merc-line.line-c { left: 62px; top: 67px; width: 46px; height: 2px; transform: rotate(-28deg); transform-origin: right center; }
.d4t-merc-line.line-d { left: 62px; top: 108px; width: 2px; height: 42px; }
.d4t-merc-line.line-e { left: 104px; top: 108px; width: 2px; height: 42px; }
.d4t-merc-line.line-f { left: 146px; top: 108px; width: 2px; height: 42px; }
.d4t-merc-node {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1px solid #2f2f2f;
  background: #111112;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.d4t-merc-node.active {
  border-color: #5c2020;
  box-shadow: 0 0 12px rgba(127, 29, 29, 0.18), inset 0 0 0 1px rgba(255,255,255,0.03);
}
.d4t-merc-node-icon {
  width: 100%;
  height: 100%;
}
.d4t-merc-node-support { left: 88px; top: 18px; }
.d4t-merc-node.node-a { left: 44px; top: 78px; }
.d4t-merc-node.node-b { left: 88px; top: 78px; }
.d4t-merc-node.node-c { left: 132px; top: 78px; }
.d4t-merc-node.node-d { left: 44px; top: 146px; }
.d4t-merc-node.node-e { left: 88px; top: 146px; }
.d4t-merc-node.node-f { left: 132px; top: 146px; }

/* ── ClassBar (Oath / Class Mechanic) ────────────────────── */
.d4t-ClassBarView {
  padding: 16px;
  background: #0d0d0d;
  border: 1px solid #1c1c1c;
  border-radius: 6px;
}
.d4t-classbar-title {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 12px;
}
.d4t-classbar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.d4t-classbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #1c1c1c;
  border-radius: 4px;
  background: #111;
  opacity: 0.45;
  transition: opacity 0.15s;
}
.d4t-classbar-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 4px;
  background-color: #0c0c0c;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid #2a2a2a;
}
.d4t-classbar-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.d4t-classbar-item.d4t-active {
  opacity: 1;
  border-color: #c8a84a;
  background: linear-gradient(135deg, rgba(200,168,74,0.08), transparent);
}
.d4t-classbar-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}
.d4t-classbar-item.d4t-active .d4t-classbar-name { color: #c8a84a; }
.d4t-classbar-subtitle {
  font-size: 11px;
  color: #666;
  font-style: italic;
  margin-top: 2px;
}
.d4t-classbar-desc {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid #1c1c1c;
  border-radius: 4px;
  background: #0a0a0a;
}
.d4t-cb-important { color: #e2e8f0; font-weight: 500; }
.d4t-cb-number { color: #c8a84a; }

.d4e-error { padding: 20px; text-align: center; color: #f87171; font-size: 12px; }
.equipment-paper-doll {
  width: 320px;
  height: 420px;
  position: relative;
  z-index: 0;
  margin-top: 8px;
}
.paper-doll-main-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-size: 100% auto;
  background-repeat: no-repeat;
}
.paper-doll-main-bg-1 {
  background-image: url('/d4-assets/media/sorcerer.88516c03.webp');
}
.paper-doll-main-bg-2 {
  background-image: url('/d4-assets/media/druid.6f349308.webp');
}
.paper-doll-main-bg-3 {
  background-image: url('/d4-assets/media/barbarian.8ea39d74.webp');
}
.paper-doll-main-bg-4 {
  background-image: url('/d4-assets/media/rogue.b9096024.webp');
}
.paper-doll-main-bg-5 {
  background-image: url('/d4-assets/media/necromancer.f7f54bd1.webp');
}
.paper-doll-main-bg-6 {
  background-image: url('/d4-assets/media/spiritborn.ecc8ec1a.webp');
}
.paper-doll-main-bg-7 {
  background-image: url('/d4-assets/media/paladin.067036f6.webp');
}
.paper-doll-armor-slots {
  position: absolute;
  left: 7px;
  top: 7px;
  bottom: 86px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.paper-doll-icon {
  position: relative;
  width: 43px;
  height: 63px;
  background-image: url('/d4-assets/media/slots.20b6acce.webp');
  background-size: 170px 73px;
  background-position-x: -49px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.paper-doll-icon .empty-image {
  content: '';
  font-size: 34px;
  width: 34px;
  height: 48px;
  background-image: url('/d4-assets/media/empty.42d63759.webp');
  background-repeat: no-repeat;
  background-size: 306px auto;
  /* background-position-x: -238px; */
}
.paper-doll-icon .armor-type {
  position: absolute;
  top: 3px;
  right: 3px;
  bottom: 3px;
  left: 3px;
  background-image: url(/d4-assets/media/frames.979f76d2.webp);
  background-size: 700% 100%;
}
.paper-doll-icon .armor-type.Mythic {
  background-position-x: -600%;
}
.paper-doll-icon .armor-type.Legendary {
  background-position-x: 0;
}
.paper-doll-icon .armor-type.Unique {
  background-position-x: -400%;
}
.paper-doll-icon .armor-type.Rare {
  background-position-x: -200%;
}
.paper-doll-icon .armor-image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: 50%;
}
.paper-doll-icon .armor-socket {
  width: 28px;
  height: 28px;
  background-image: url(/d4-assets/media/socket.130ea97d.webp);
  position: relative;
  z-index: 1;
  font-size: 20px;
}
.paper-doll-icon .armor-socket .armor-socket-icon {
  font-size: 28px;
  filter: opacity(50%);
  display: block;
  background-image: url(/d4-assets/media/gems.4214c111.webp);
  background-size: 16em auto;
  width: 1em;
  height: 1em;
}
.paper-doll-weapon.active .paper-doll-icon:after,
.paper-doll-icon.active:after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  border-image: url(/d4-assets/media/highlight.de4a1895.webp) 19 / 19px / 2px round;
  z-index: 2;
}
.paper-doll-icon-Helm .empty-image {
  background-position-x: -238px;
}
.paper-doll-icon-ChestArmor .empty-image {
  background-position-x: -170px;
}
.paper-doll-icon-Gloves .empty-image {
  background-position-x: -204px;
}
.paper-doll-icon-Legs .empty-image {
  background-position-x: -272px;
}
.paper-doll-icon-Boots .empty-image {
  background-position-x: -136px;
}
.paper-doll-jewelry-slots {
  position: absolute;
  right: 7px;
  top: 73px;
  bottom: 152px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.paper-doll-jewelry-slots .paper-doll-jewelry {
  position: relative;
  width: 43px;
  height: 63px;
  background-image: url(/d4-assets/media/slots.20b6acce.webp);
  background-size: 170px 73px;
  background-position-x: -49px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.paper-doll-jewelry-slots .paper-doll-jewelry1 .empty-image {
  background-position-x: 0;
}
.paper-doll-jewelry-slots .paper-doll-jewelry2 .empty-image {
  background-position-x: -34px;
}
.paper-doll-jewelry-slots .paper-doll-jewelry3 .empty-image {
  background-position-x: -34px;
}
.paper-doll-weapon {
  position: absolute;
  bottom: 7px;
}
.paper-doll-weapon .paper-doll-icon {
  background-position-x: 0;
}
.paper-doll-weapon-icon1 {
  width: 49px;
  height: 73px;
}
.paper-doll-weapon-icon1 .empty-image {
  background-position-x: -68px;
}
.paper-doll-weapon-icon2 {
  width: 49px;
  height: 73px;
}
.paper-doll-weapon-icon2 .empty-image {
  background-position-x: -102px;
}
.paper-doll-weapon-left {
  left: 7px;
}
.paper-doll-weapon-right {
  right: 7px;
}
.paper-doll-weapon-center {
  left: 50%;
  margin-left: -39px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.paper-doll-weapon-dual-weapons {
  width: 78px;
  height: 63px;
  background-size: 170px 73px;
  background-position-x: -92px !important;
  background-image: url(/d4-assets/media/slots.20b6acce.webp);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.paper-doll-weapon-dual-weapons:after,
.paper-doll-weapon-dual-weapons:before {
  position: absolute;
  content: '';
  font-size: 34px;
  width: 34px;
  height: 48px;
  background-image: url('/d4-assets/media/empty.42d63759.webp');
  background-repeat: no-repeat;
  background-size: 306px auto;
  background-position-x: -68px;
}
.paper-doll-weapon-dual-weapons:before {
  left: 5px;
}
.paper-doll-weapon-dual-weapons:after {
  right: 5px;
}
.paper-doll-weapon-group {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  left: 50%;
  top: -13px;
  margin-left: -13px;
  width: 26px;
  height: 26px;
  background-image: url(/d4-assets/media/labels.9bb51292.webp);
  background-size: 104px 26px;
}
.paper-doll-weapon-group-blunt {
  background-position-x: 0;
}
.paper-doll-weapon-group-dual {
  background-position-x: -52px;
}
.paper-doll-weapon-group-slash {
  background-position-x: -26px;
}
.armor-update {
  z-index: 1;
  position: absolute;
  left: 3px;
  bottom: 6px;
  right: 3px;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}
.armor-update.update-level-1 .update-node,
.armor-update.update-level-2 .update-node,
.armor-update.update-level-3 .update-node,
.armor-update.update-level-4 .update-node {
  background-position-x: -400%;
}
.armor-update.update-level-5 .update-node,
.armor-update.update-level-6 .update-node,
.armor-update.update-level-7 .update-node,
.armor-update.update-level-8 .update-node {
  background-position-x: -500%;
}
.armor-update.update-level-9 .update-node,
.armor-update.update-level-10 .update-node,
.armor-update.update-level-11 .update-node,
.armor-update.update-level-12 .update-node {
  background-position-x: -600%;
}
.armor-update .update-node {
  width: 10px;
  height: 10px;
  margin: 0 -3px;
  background-image: url(/d4-assets/media/list-icons.b43c4a76.webp);
  background-size: 900% 200%;
  background-position-x: -300%;
  background-position-y: -100%;
}
.armor-update .update-node.active {
  background-position-y: 0;
}

/* paper-doll embed center */
.d4t-paperdoll-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}
.d4-embed .equipment-paper-doll { 
  margin: 0; 
  transform-origin: top center;
  position: relative;
  background-image: url("/d4-assets/media/planner-bg.0879882b.webp");
  background-size: cover;
  background-position: center;
}
.paper-doll-hero-name {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-title, inherit);
  font-size: 28px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
  pointer-events: none;
}
.paper-doll-skillbar {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  z-index: 10;
}
.paper-doll-skill {
  width: 38px;
  height: 38px;
  border: 1px solid #7d7158;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  background-color: rgba(0,0,0,0.6);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.1);
}
.compact-paperdoll .equipment-paper-doll {
  transform: scale(0.85);
  transform-origin: top center;
  margin-bottom: -63px;
}
