:root {
  --bg: #f4f5f7;
  --fg: #1d2433;
  --line: #d8dce3;
  --accent: #2563eb;
  --accent-d: #1d4ed8;
  --card: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}
header {
  background: #0f172a;
  color: #fff;
  padding: 20px 28px;
}
header h1 { margin: 0 0 4px; font-size: 20px; }
header .lead { margin: 0; font-size: 13px; color: #c7d2fe; }

.block {
  max-width: 1080px;
  margin: 18px auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 22px;
}
.block h2 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px;
}
.hint { font-size: 12px; color: #6b7280; margin: 4px 0; }

button {
  font: inherit; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--fg);
  border-radius: 7px; padding: 7px 14px;
}
button:hover { background: #f0f2f5; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: var(--accent-d); }
button:disabled { opacity: .5; cursor: default; }
.status { margin-left: 12px; font-size: 13px; color: #16a34a; }

/* デザイン一覧 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}
.card {
  border: 2px solid var(--line); border-radius: 9px; padding: 8px;
  background: #fff; cursor: pointer; text-align: center; transition: .12s;
}
.card:hover { border-color: #93c5fd; transform: translateY(-1px); }
.card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px #bfdbfe; }
.thumb {
  width: 100%; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  background: #f8fafc; border-radius: 6px; overflow: hidden;
}
.thumb img { max-width: 100%; max-height: 100%; }
.thumb.noimg::after { content: "no image"; color: #9ca3af; font-size: 11px; }
.card .code { margin-top: 6px; font-size: 12px; font-weight: 600; }

/* メンバーパネル */
.seltitle { font-weight: 700; margin-bottom: 12px; color: var(--accent-d); }
.panel-cols { display: flex; gap: 22px; flex-wrap: wrap; }
.panel-cols .left { flex: 1 1 460px; min-width: 360px; }
.panel-cols .right { flex: 0 0 auto; }

.thumbs { display: flex; gap: 14px; margin-bottom: 14px; }
.thumbs figure { margin: 0; text-align: center; }
.thumbs img {
  width: 120px; height: 120px; object-fit: contain;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 6px;
}
.thumbs figcaption { font-size: 11px; color: #6b7280; }

.members { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.mrow { display: grid; grid-template-columns: 90px 1fr 32px; gap: 8px; margin-bottom: 6px; align-items: center; }
.mrow.head { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.mrow input {
  font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; width: 100%;
}
.m-del { padding: 4px 0; color: #b91c1c; }
.mbtns { display: flex; gap: 8px; margin-top: 8px; }

.options { margin: 14px 0; display: flex; gap: 18px; font-size: 14px; }
.options label { cursor: pointer; }
.actions { display: flex; gap: 10px; margin-top: 6px; }
.progress { margin-top: 10px; font-size: 13px; color: #374151; min-height: 20px; }

#preview {
  width: 420px; height: 420px; max-width: 100%;
  border: 1px solid var(--line); border-radius: 8px;
  background:
    repeating-conic-gradient(#eef0f3 0% 25%, #fff 0% 50%) 50% / 24px 24px;
}
