:root {
  --bg: #f5f6f8;
  --paper: #ffffff;
  --ink: #18202e;
  --sub: #5b6475;
  --mute: #8a93a3;
  --line: #e3e6ec;
  --line2: #d3d8e0;
  --navy: #1d3461;
  --navy-soft: #eef2f9;
  --ok: #1f8a5b;
  --warn: #b5650d;
  --danger: #c23b3b;
  --hp: #2563c9;  --hp-soft: #eaf1fc;
  --meo: #15885e; --meo-soft: #e6f5ee;
  --seo: #c2700f; --seo-soft: #fbf1e3;
  --aio: #7a4fc9; --aio-soft: #f1ebfb;
  --radius: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  font-size: 15px; line-height: 1.75; letter-spacing: .01em;
  overflow-wrap: anywhere;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy); }
.hidden { display: none !important; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line2); background: var(--paper); color: var(--ink);
  border-radius: 8px; padding: 8px 16px; font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: none; white-space: nowrap; line-height: 1.4;
}
.btn:hover { border-color: var(--navy); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: #142849; }
.btn.danger { color: var(--danger); border-color: #ebc4c4; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--sub); padding: 6px 10px; }
.btn.ghost:hover { color: var(--ink); background: #eceff4; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

/* 入力 */
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 13px; color: var(--sub); font-weight: 600; margin-bottom: 4px; }
.input, textarea.input, select.input {
  width: 100%; border: 1px solid var(--line2); border-radius: 8px; background: #fff;
  padding: 9px 12px; line-height: 1.6;
}
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { outline: 2px solid #b9c8e6; outline-offset: 0; border-color: var(--navy); }

/* プランの色 */
.plan { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 10px; line-height: 1.7; white-space: nowrap; }
.plan.hp { color: var(--hp); background: var(--hp-soft); }
.plan.meo { color: var(--meo); background: var(--meo-soft); }
.plan.seo { color: var(--seo); background: var(--seo-soft); }
.plan.aio { color: var(--aio); background: var(--aio-soft); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.new { color: var(--mute); }
.status.draft { color: var(--warn); }
.status.submitted { color: var(--ok); }

.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 100; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
