
.page {
  flex: 1;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* スウォッチ */
.swatch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  position: relative;
}

.swatch {
  width: 100%;
  height: 100px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: box-shadow 140ms ease;
  background: #0891b2;
}

.swatch:hover {
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--accent);
}

.swatch:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--accent);
}

#colorPicker {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  top: 0;
  left: 0;
}

.swatch-hint {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  user-select: none;
}

/* カラー行 */
.color-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.color-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
}

.color-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  user-select: none;
}

.color-input {
  appearance: none;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  width: 100%;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.color-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface);
}

.color-row.error .color-input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

/* コピーボタン */
.copy-btn {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--sub);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.copy-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
}

.copy-btn.copied {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

/* アコーディオン（共通スタイルの補完） */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}

.section-head:hover { background: var(--hover); }

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.section-arrow {
  color: var(--muted);
  transition: transform 200ms ease;
  flex-shrink: 0;
}

.section.open .section-arrow { transform: rotate(180deg); }

.section-body {
  display: none;
  padding: 0 18px 16px;
  border-top: 1px solid var(--border);
}

.section.open .section-body { display: block; }

.howto {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: howto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
}

.howto li {
  counter-increment: howto;
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.6;
}

.howto li::before {
  content: counter(howto);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.about-text {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.7;
  margin: 0;
  padding-top: 14px;
}

.about-text + .about-text { padding-top: 10px; }

.ad-slot { margin-top: 4px; }

/* モバイル */

@media (max-width: 480px) {
  .color-label { font-size: 10px; letter-spacing: 0.08em; }
  .color-input { font-size: 12.5px; padding: 9px 10px; }
  .copy-btn    { padding: 8px 10px; font-size: 11px; }
}
