:root { --bg:#f4f1ea; --ink:#23211c; --accent:#c4622d; --ok:#2e7d4f; --ng:#b3402f; --line:#e2ddd0; --muted:#8a8473; }
* { box-sizing:border-box; }
body { margin:0; font-family:-apple-system,"Hiragino Kaku Gothic ProN",sans-serif; background:var(--bg); color:var(--ink); }
a { color:var(--accent); }
nav.top { display:flex; gap:4px; align-items:center; padding:10px 16px; border-bottom:1px solid var(--line); background:#fff; flex-wrap:wrap; }
nav.top .brand { font-weight:800; font-size:15px; margin-right:8px; }
nav.top a { text-decoration:none; color:var(--ink); padding:6px 11px; border-radius:8px; font-size:14px; }
nav.top a.active { background:var(--accent); color:#fff; }
nav.top .sp { flex:1; }
nav.top input { padding:6px 8px; border:1px solid var(--line); border-radius:8px; font-size:12px; width:230px; }
main { max-width:600px; margin:0 auto; padding:20px 18px 70px; }
input, select, textarea, button { font:inherit; }
input, select, textarea { padding:8px 10px; border:1px solid var(--line); border-radius:9px; background:#fff; }
input[type=file] { max-width:100%; }   /* スマホでファイル選択がはみ出すのを防ぐ */
button { padding:8px 14px; border:0; border-radius:9px; background:var(--accent); color:#fff; cursor:pointer; transition:transform .06s ease, filter .12s ease; }
button:hover { filter:brightness(1.05); } button:active { transform:scale(.96); }
button.ghost { background:#fff; color:var(--ink); border:1px solid var(--line); }
button:disabled { opacity:.5; cursor:default; transform:none; }
.card { background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px 18px; margin-bottom:16px; }
.muted { color:var(--muted); font-size:13px; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
h2 { font-size:15px; margin:0 0 10px; }
.spin { display:inline-block; width:15px; height:15px; border:2px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:spin .7s linear infinite; vertical-align:-3px; margin-right:7px; }
@keyframes spin { to { transform:rotate(360deg); } }
/* 変化が分かるフラッシュ */
.flash { animation:flash .5s ease; }
@keyframes flash { 0% { background:#fff7ee; } 100% { background:#fff; } }
.swap { animation:swap .22s ease; }
@keyframes swap { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
/* 進捗バー */
.dist { display:flex; height:12px; border-radius:99px; overflow:hidden; margin:10px 0 6px; background:var(--line); }
.dist span { display:block; height:100%; transition:width .35s ease; }
.dist .m { background:var(--ok); } .dist .l { background:var(--accent); } .dist .u { background:#ddd6c6; }
/* セクション見出し（設定ページ等で区切りを強調） */
.sec { font-size:16px; font-weight:700; margin:26px 0 10px; padding-left:10px; border-left:4px solid var(--accent); }
.sec:first-of-type { margin-top:8px; }
.field { display:grid; grid-template-columns:140px 1fr; gap:8px; align-items:center; margin:7px 0; }
.field label { font-size:13px; color:var(--muted); }
/* input が既定幅で縮まらず横にはみ出すのを防ぐ（number/email/date で顕著） */
.field input, .field select, .field textarea { width:100%; min-width:0; max-width:100%; }
/* 狭い画面ではラベルを上に積んで input を全幅に */
@media (max-width:480px) { .field { grid-template-columns:1fr; gap:3px; } }
.chips { display:flex; flex-wrap:wrap; gap:6px; font-size:13px; color:#444; margin-top:10px; }
.wchip { display:inline-block; padding:3px 10px; background:#faf8f2; border:1px solid var(--line); border-radius:99px; font-size:13px; }
.batchbar { display:flex; align-items:center; gap:10px; margin-top:14px; }
.batchbar .step { background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:10px; padding:8px 14px; font-size:15px; }
.batchmid { flex:1; text-align:center; }
.batchsel { width:100%; max-width:320px; margin-top:2px; text-align:center; }
.seg { background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:8px; padding:5px 12px; font-size:13px; }
.seg.active { background:var(--accent); color:#fff; border-color:var(--accent); }
.streak { font-weight:800; font-size:15px; }
.streak.on { color:var(--accent); }
.streak.off { color:var(--muted); font-weight:600; font-size:13px; }
.item { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:8px 0; background:#fff; }
.tagrow { font-size:12px; color:var(--muted); }
.en { color:#444; }
.badge { display:inline-block; font-size:11px; padding:2px 7px; border-radius:99px; }
.badge.draft { background:#f3efe2; color:#7a6f4f; } .badge.approved { background:#e7f1ea; color:var(--ok); } .badge.rejected { background:#f7e9e6; color:var(--ng); }
