.pencase {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: #fff;
}

/* ---------------- LEFT PANEL ---------------- */
.left-panel {
  width: 250px;
  background: #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
  box-sizing: border-box;
  flex-shrink: 0;
}


.left-panel .step-1 { margin-top: 230px; }
.left-panel .step-2 { margin-top: 250px; }
.left-panel .step-3 { margin-top: 90px; }

.left-panel img {
  width: 50%;
  height: auto;
}



/* ---------------- RIGHT PANEL ---------------- */
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 30px 100px;
  box-sizing: border-box;
  min-width: 0;
}

/* ---------------- PEN BAR ---------------- */
.pen-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 20px 0;
  flex-shrink: 0;
  height: 630px;
  overflow: visible;
}

/* PEN WRAP */
.pen-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
}

/* 기본 세로선 */
.pen-wrap.selected::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -120px;
  width: 4px;
  height: 160px;
  background-color: #ff66aa;
  border-radius: 2px;
  pointer-events: none;
}

/* ------------ PEN-LINE CUSTOM ----------- */
.pen-wrap[data-pen="1"].selected::before {
  background-color: #aa5f8c;
  transform: translateX(-150%);
}

.pen-wrap[data-pen="2"].selected::before {
  width: 20px;
  height: 155px;
  background-color: #ff577b;
}

.pen-wrap[data-pen="3"].selected::before {
  width: 6px;
  background-color: #ff5543;
  transform: translateX(-40%);
}

.pen-wrap[data-pen="4"].selected::before {
  background-color: #dd1000;
  height: 155px;
  width: 10px;
  border-radius: 10px;
  transform: translateX(1%);
}

.pen-wrap[data-pen="5"].selected::before {
  height: 150px;
  width: 6px;
  background-color: #c0bcc0;
}

.pen-wrap[data-pen="6"].selected::before {
  height: 170px;
  width: 3px;
  background-color: #d87068;
  transform: translateX(400%);
}

.pen-wrap[data-pen="7"].selected::before {
  width: 3px;
  background-color: #8bfcf1;
  transform: translateX(200%);
}

.pen-wrap[data-pen="8"].selected::before {
  height: 170px;
  background-color: #ff6989;
  transform: translateX(200%);
}

.pen-wrap[data-pen="9"].selected::before {
  width: 22px;
  border-radius: 10px;
  background-color: #ff94de;
}

/* ---------------- PEN IMAGE ---------------- */
.pen {
  height: 92%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.pen:hover {
  transform: translateY(-8px);
}

/* 🚫 기존 border-top 완전 제거 */
.pen.selected {
  border-top: none !important;
}

/* ---------------- BUTTON BAR ---------------- */
.button-bar {
  background: #B0B0B0;
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin-left: -100px;
  margin-right: -100px;
  width: calc(100% + 200px);
  flex-shrink: 0;
}

.action-btn {

  padding: 10px;
  width: 260px;
  height: 50px;
  background: #e9e9e9;
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.action-btn:hover { background: #fff; }

.action-btn.undo {
  background: #555;
  color: #fff;
}

.action-btn.undo:hover {
  background: #fff;
  color: #777;
}

/* ---------------- VIDEO STACK ---------------- */
.video-stack {
  height: 180px;          /* ← 이 줄 추가 */
  flex: none;             /* ← flex:1 제거 */
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  background: #ffffff;
}

.video-stack video {
  width: 160px;
  height: 160px;
  object-fit: cover;
  flex-shrink: 0;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
