.jl-dieline-3d {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(440px, 1fr) auto auto auto;
  border: 1px solid var(--jl-color-border-default, #dce3eb);
  border-radius: var(--jl-radius-xl, 18px);
  color: var(--jl-color-text-primary, #182230);
  background: var(--jl-color-bg-surface, #fff);
  box-shadow: var(--jl-shadow-card, 0 8px 24px rgba(24, 34, 48, .06));
}

.jl-dieline-3d__head {
  min-height: 68px;
  padding: 14px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e3e9ef;
}

.jl-dieline-3d__head > div { min-width: 0; display: grid; gap: 3px; }
.jl-dieline-3d__head strong { font-size: 17px; }
.jl-dieline-3d__head span[data-role="model-name"] {
  overflow: hidden;
  color: #6f7f91;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jl-dieline-3d__badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #efd39f;
  border-radius: 999px;
  color: #82520b;
  background: #fff8e8;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.jl-dieline-3d__stage {
  position: relative;
  isolation: isolate;
  min-height: 440px;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 31%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #d9d9d9 0%, #eeeeee 72%, #e4e4e4 100%);
}

.jl-dieline-3d__stage::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .045), transparent 20%, transparent 80%, rgba(0, 0, 0, .045)),
    linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 38%);
}

.jl-dieline-3d__ground-shadow {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 64%;
  width: min(48%, 430px);
  height: 17%;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(55, 45, 34, .28);
  filter: blur(24px);
  transform: translate(-50%, -50%) perspective(520px) rotateX(68deg);
}

.jl-dieline-3d canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 440px;
  display: block;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.jl-dieline-3d canvas:active { cursor: grabbing; }
.jl-dieline-3d canvas:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 4px var(--jl-color-focus-ring, rgba(0, 113, 227, .16));
}

.jl-dieline-3d__hint {
  position: absolute;
  z-index: 4;
  left: 16px;
  top: 15px;
  pointer-events: none;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  color: #3d4248;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 750;
}

.jl-dieline-3d__scene-mark {
  position: absolute;
  z-index: 4;
  right: 20px;
  top: 18px;
  pointer-events: none;
  display: grid;
  justify-items: center;
  color: #161616;
  line-height: .75;
  text-shadow: 0 1px rgba(255, 255, 255, .5);
}
.jl-dieline-3d__scene-mark strong { font-size: 20px; letter-spacing: -.8px; }
.jl-dieline-3d__scene-mark span { font-size: 25px; transform: rotate(14deg); }

.jl-dieline-3d__fold-dock {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 20px;
  width: min(calc(100% - 36px), 470px);
  min-height: 54px;
  padding: 8px 14px 8px 18px;
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto auto;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 999px;
  color: #202020;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 16px 40px rgba(27, 31, 36, .18);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}
.jl-dieline-3d__fold-dock > span {
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}
.jl-dieline-3d__fold-dock output {
  min-width: 42px;
  padding: 5px 7px;
  border-radius: 999px;
  color: #0d6fe8;
  background: #eaf4ff;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}
.jl-dieline-3d__fold-dock input[type="range"] {
  width: 100%;
  height: 24px;
  margin: 0;
  accent-color: #111;
  cursor: ew-resize;
}

.jl-dieline-3d__controls {
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(130px, .65fr) minmax(180px, 1.25fr) auto;
  align-items: end;
  gap: 12px;
  border-top: 1px solid #e3e9ef;
  border-bottom: 1px solid #e9eef3;
}

.jl-dieline-3d__controls label { min-width: 0; display: grid; gap: 7px; }
.jl-dieline-3d__controls label span { color: #607085; font-size: 12px; font-weight: 750; }
.jl-dieline-3d__controls input[type="range"] { width: 100%; accent-color: #0a7cff; }
.jl-dieline-3d__controls input[type="color"] {
  width: 100%;
  min-height: 34px;
  padding: 3px;
  border: 1px solid #ccd8e4;
  border-radius: 9px;
  background: #fff;
}

.jl-dieline-3d__controls button {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #cbd8e5;
  border-radius: 10px;
  color: #111827;
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.jl-dieline-3d__controls button:hover { border-color: #71869a; background: #f4f7fa; }
.jl-dieline-3d__status {
  min-height: 37px;
  padding: 9px 16px;
  color: #5e6e80;
  font-size: 12px;
  line-height: 1.55;
}
.jl-dieline-3d__status[data-kind="ok"] { color: #147a48; }
.jl-dieline-3d__status[data-kind="warning"] { color: #8a5b11; background: #fffaf0; }
.jl-dieline-3d__status[data-kind="error"] { color: #b52e2e; background: #fff6f5; }
.jl-dieline-3d__disclaimer {
  margin: 0;
  padding: 0 16px 13px;
  color: #7b8796;
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .jl-dieline-3d { grid-template-rows: auto minmax(340px, 1fr) auto auto auto; }
  .jl-dieline-3d__head { align-items: flex-start; flex-direction: column; }
  .jl-dieline-3d__stage, .jl-dieline-3d canvas { min-height: 340px; }
  .jl-dieline-3d__controls { grid-template-columns: 1fr 1fr; }
  .jl-dieline-3d__controls button { grid-column: 1 / -1; }
  .jl-dieline-3d__fold-dock {
    bottom: 13px;
    grid-template-columns: auto minmax(80px, 1fr) auto;
    gap: 9px;
  }
  .jl-dieline-3d__fold-dock output { display: none; }
  .jl-dieline-3d__controls button { align-self: stretch; }
}
