/* 管理画面・トップページ共通（明るく柔らかい配色） */
:root {
  --bg: #fbf7f5;
  --card: #ffffff;
  --text: #3a2f33;
  --muted: #8a7b80;
  --line: #eadfe2;
  --accent: #d9677f;
  --accent-soft: #fbe9ee;
  --accent-text: #ffffff;
  --ok: #2f9e6b;
  --warn: #c98a12;
  --danger: #d1435b;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d191b;
    --card: #282225;
    --text: #f1e8eb;
    --muted: #b1a2a7;
    --line: #3b3236;
    --accent: #e8849a;
    --accent-soft: #3a2a30;
    --accent-text: #1d191b;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  -webkit-text-size-adjust: 100%; line-height: 1.6; }
[hidden] { display: none !important; }
a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
.btn { border: 0; border-radius: 10px; padding: 10px 16px; background: var(--accent); color: var(--accent-text); font-weight: 600; min-height: 44px; }
.btn.secondary { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.ok { color: var(--ok); }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge.live { background: var(--danger); color: #fff; }
.badge.ok { background: #e3f4ec; color: var(--ok); }
.badge.warn { background: #fdf1d8; color: var(--warn); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 100; max-width: calc(100% - 32px); }
.switch { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.switch small { display: block; color: var(--muted); }
dialog { border: 0; border-radius: 16px; padding: 0; max-width: min(720px, calc(100% - 24px)); width: 100%; background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.dialog-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; max-height: 80vh; overflow: auto; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
pre.text { white-space: pre-wrap; word-break: break-word; background: var(--bg); padding: 12px; border-radius: 10px; margin: 0; font-family: inherit; font-size: 14px; }
