/* ===============================
   あそぶページ専用
=============================== */

main {
  display: grid;
  grid-template-columns: 320px 1fr;
}

/* 操作UI */

.controls {
  padding: 24px;
  background: #fafafa;
  border-right: 1px solid #ddd;
}

.controls label {
  font-size: 12px;
  margin-top: 16px;
  display: block;
}

.controls input,
.controls textarea,
.controls select {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
}

/* 図形ボタン */

.shape-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}


.shape {
  width: 46px;
  height: 46px;
  background: transparent;
  cursor: pointer;
  position: relative;
  border: none;
}

.shape.active {
  outline: 2px solid #111;
}

.circle,
.square,
.rect-h,
.rect-v,
.diamond {
  background: #bcbcbc;
}

.circle { border-radius: 50%; }
.rect-h { height: 24px; }
.rect-v { width: 24px; margin: auto; }
.diamond { transform: rotate(45deg); }


.triangle::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-bottom: 30px solid #bcbcbc;
}

.inv-triangle::before {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-top: 30px solid #bcbcbc;
} 

/* プレビュー */

.preview {
  padding: 32px;
  background: #fff;
}

.preview-text {
  white-space: pre-wrap;
}

@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
  }

  .controls {
    border-right: none;
    border-bottom: 1px solid #ddd;
  }
}

/* ===============================
   プレビュー
=============================== */

.preview {
  padding: 32px;
  background: #fff;
  /* color: #4e4e4e; */
}

.preview-text {
  white-space: pre-wrap;
}


