body {
  font-family: system-ui, "Hiragino Sans", "Noto Sans JP", sans-serif;
  margin: 20px;
  background: #f7f7fb;
  color: #222;
}

/* 初期は非表示 */
#playground { display: none; }

.open-btn {
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(59,130,246,.25);
}

#playground {
  position: relative;
  height: clamp(360px, 60vh, 520px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  padding: 16px;
  overflow: hidden;
  margin-top: 16px;
}

/* ★ プログレスバー */
#progress-container {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 14px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}
#progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.25s linear, background 0.25s linear;
}

/* フォーム */
#form.draggable {
  position: absolute;
  left: 64px;
  top: 50%;
  transform: translateY(-50%);
  width: min(520px, 60vw);
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  cursor: grab;
  user-select: none;
  touch-action: none;
  z-index: 2;
}
#form.draggable:active { cursor: grabbing; }

.hint { margin: 0 0 8px 0; font-size: 12px; color: #666; }

#textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  outline: none;
  resize: vertical;
  min-height: 160px;
  font-size: 14px;
}
#textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}

/* ドロップゾーン */
#dropzone {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  width: min(560px, 60vw);
  height: clamp(220px, 40vh, 360px);
  background: #ef4444;
  border-radius: 8px;
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.15);
  z-index: 1;
}
#dropzone.accepting { outline: 4px dashed rgba(59,130,246,.75); outline-offset: 6px; }
#dropzone.success   { outline: 4px solid rgba(34,197,94,.9);    outline-offset: 6px; }

.visually-hidden {
  position: absolute !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  width: 1px !important; height: 1px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important; margin: -1px !important;
}
