html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ff4d1f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 320px;
  height: 180px;
  padding: 16px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  background: linear-gradient(160deg, #ffe2cf, #ff4d1f 90%);
  box-sizing: border-box;
}

.frame {
  position: relative;
  width: 108px;
  height: 108px;
  flex: none;
}

.subjectShape {
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  background: linear-gradient(135deg, #c93000, #fff7e6);
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  will-change: transform;
}

.exportPanel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.exportCanvas {
  display: none;
}

.previewBox {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: rgba(23, 20, 26, 0.06);
  border: 1px dashed rgba(23, 20, 26, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.previewImg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.exportBtn {
  padding: 4px 12px;
  border: none;
  border-radius: 12px;
  background: #17141a;
  color: #fff7e6;
  font-size: 11px;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}
.exportBtn:focus-visible {
  outline: 2px solid #c93000;
  outline-offset: 2px;
}
.exportBtn:active {
  transform: translateY(1px);
}

.status {
  font-size: 10px;
  color: #17141a;
}

@media (max-width: 340px) {
  .scene {
    width: 220px;
    height: 124px;
    padding: 8px;
  }
  .frame {
    width: 74px;
    height: 74px;
  }
  .previewBox {
    width: 46px;
    height: 46px;
  }
  .exportBtn, .status {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .exportBtn {
    transition: none;
  }
}
