/* =====================================================================
   style.css — CSSジェネレーター・プレイグラウンド ツール固有の微調整。
   共通は /_shared/shirugear.css に任せる（スライダー/結果は共有クラス）。
   ===================================================================== */

/* プリセット行 */
.cst-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--sg-space-1, 4px);
}
.cst-preset {
  border: 1px solid var(--sg-border, #e2e6ee);
  background: var(--sg-surface, #fff);
  color: var(--sg-fg, #1a2230);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
  cursor: pointer;
}
.cst-preset:hover {
  border-color: var(--sg-accent, #3b5bdb);
}
.cst-preset--reset {
  color: var(--sg-muted, #777);
}

/* プレビュー舞台（市松模様で透明・影が見える） */
.cst-stage-card {
  padding: 0;
  overflow: hidden;
}
.cst-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 40px 20px;
  background-color: #f4f6fb;
  background-image:
    linear-gradient(45deg, #e6e9f0 25%, transparent 25%),
    linear-gradient(-45deg, #e6e9f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e9f0 75%),
    linear-gradient(-45deg, transparent 75%, #e6e9f0 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.cst-box {
  width: 160px;
  height: 160px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* グラデーション未使用時の既定の塗り */
  background: #3b5bdb;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* パネル配置（広い画面では2列） */
.cst-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sg-space-3, 12px);
  margin-top: var(--sg-space-3, 12px);
}
@media (min-width: 720px) {
  .cst-panels {
    grid-template-columns: 1fr 1fr;
  }
}

.cst-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--sg-space-2, 8px);
}

/* トグルボタン群（px/% ・ linear/radial） */
.cst-toggle-group {
  display: inline-flex;
  gap: 4px;
}
.cst-unit,
.cst-gtype {
  border: 1px solid var(--sg-border, #e2e6ee);
  background: var(--sg-surface, #fff);
  color: var(--sg-fg, #1a2230);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}
.cst-unit[aria-pressed="true"],
.cst-gtype[aria-pressed="true"] {
  background: var(--sg-accent, #3b5bdb);
  border-color: var(--sg-accent, #3b5bdb);
  color: #fff;
}

/* スイッチ（チェックボックス風ラベル） */
.cst-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

/* 色・行 */
.cst-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: var(--sg-space-2, 8px);
}
.cst-mt {
  margin-top: var(--sg-space-2, 8px);
}
.cst-color-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.cst-color-field input[type="color"] {
  width: 40px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--sg-border, #e2e6ee);
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

/* 生成CSS表示（複数行のコードブロック） */
.cst-code {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: left;
}
