/* hanmoto 共通スタイル（親所有・変更禁止。ページ固有は各HTML内<style>で） */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #22262e;
  --sub: #6b7280;
  --line: #e3e6ea;
  --accent: #3b6ef5;
  --accent-ink: #ffffff;
  --danger: #d64545;
  --ok: #2e9e63;
  --warn: #d98d17;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 24, 34, 0.08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif; font-size: 14px; line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; }

/* ヘッダー */
#app-header { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.hdr-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; height: 52px; }
.brand { font-weight: 700; font-size: 16px; color: var(--ink); letter-spacing: 0.04em; }
.hdr-inner nav { display: flex; gap: 4px; }
.hdr-inner nav a { padding: 6px 12px; border-radius: 8px; color: var(--sub); font-weight: 600; }
.hdr-inner nav a.on { background: #eef2ff; color: var(--accent); }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.unit-name { font-weight: 700; }
.hdr-right select { padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* レイアウト・部品 */
.container { max-width: 1280px; margin: 0 auto; padding: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
h1 { font-size: 20px; margin: 0 0 14px; }
h2 { font-size: 16px; margin: 20px 0 10px; }
button, .btn { font: inherit; cursor: pointer; border: none; border-radius: 8px; padding: 8px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
button:disabled { opacity: 0.5; cursor: default; }
.btn-ghost { background: transparent; color: var(--sub); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--ink); }
.btn-danger { background: var(--danger); }
input[type="text"], input[type="password"], input[type="date"], input[type="number"], textarea, select {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
textarea { width: 100%; resize: vertical; }
label { font-weight: 600; }

/* ピル（状態） */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef0f3; color: var(--sub); }
.pill-open { background: #eef2ff; color: #3b5bd9; }
.pill-making { background: #fff4e0; color: #b06d00; }
.pill-review { background: #e8f6ee; color: #1f7a48; }
.pill-adjust { background: #fdeaea; color: #b03030; }
.pill-done { background: #e7e9ee; color: #444a55; }
.pill-todo { background: #f1f2f5; color: #778; }

/* 参照カード */
.refcard { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 6px 6px; background: #fff; color: var(--ink); max-width: 280px; }
.refcard img, .refcard-noimg { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: #eef0f3; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--sub); flex: none; }
.refcard-body { display: flex; flex-direction: column; min-width: 0; }
.refcard-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refcard-sub { font-size: 12px; color: var(--sub); }

/* モーダル */
.modal-wrap { position: fixed; inset: 0; background: rgba(20, 24, 34, 0.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-box { background: var(--panel); border-radius: 12px; padding: 20px; max-width: 860px; width: min(92vw, 860px); max-height: 86vh; overflow: auto; }

/* トースト */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: #2a2f3a; color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: 0.2s; z-index: 200; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--danger); }

/* テーブル */
table.list { width: 100%; border-collapse: collapse; background: var(--panel); }
table.list th, table.list td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
table.list th { font-size: 12px; color: var(--sub); }
