* { box-sizing: border-box; }
:root {
  --line: #d8dce3;
  --ink: #1c2330;
  --sub: #6b7480;
  --accent: #1f3b6e;
  --bg: #f4f6f9;
}
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 14px; line-height: 1.6;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.logo {
  font-family: Georgia, serif; font-size: 22px; letter-spacing: .12em;
  color: var(--accent); font-weight: 700;
}
.title { font-size: 15px; color: var(--sub); }
main { max-width: 1180px; margin: 0 auto; padding: 20px 20px 120px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px; margin-bottom: 16px;
}
h2 { font-size: 16px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 13px; margin: 18px 0 8px; color: var(--sub); display: flex; align-items: baseline; gap: 10px; }
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px;
}
.dropzone {
  border: 2px dashed #c2cad6; border-radius: 10px; padding: 26px;
  text-align: center; color: var(--sub); cursor: pointer; background: #fbfcfe;
}
.dropzone.on { border-color: var(--accent); background: #eef3fb; }
.dropzone p { margin: 0; }
.dropzone .sub { display: block; font-size: 12px; margin-top: 6px; }
.filelist { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #eef1f6; border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 10px; font-size: 12px;
}
.sheetsum, .extract, .planinfo { margin-top: 10px; }
.sheetsum .box, .planinfo .box {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fbfcfe;
}
.planinfo .box { font-size: 12.5px; }
.planinfo .box.warn { border-color: #d8a49b; background: #fdf4f2; }
.tag {
  display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 10px;
  margin: 2px 4px 2px 0; border: 1px solid var(--line);
}
.tag.on { background: #e6f0e2; border-color: #b7d3a8; color: #2c5a20; }
.tag.off { background: #f2f3f5; color: #8a919b; }
.suggest {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; font-size: 12.5px;
}
.suggest:not(:empty) {
  background: #eef3fb; border: 1px solid #c8d8ef; border-radius: 8px; padding: 8px 12px;
}
button.mini { font-size: 12px; padding: 3px 10px; }
.extract .box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fbfcfe; margin-bottom: 8px; }
.extract .cand { display: inline-block; margin: 3px 6px 3px 0; }
.extract button.mini { font-size: 12px; padding: 2px 8px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.grid .wide { grid-column: span 2; }
label { display: flex; flex-direction: column; font-size: 12px; color: var(--sub); gap: 4px; }
label.req::after { content: none; }
label.req > span, .req-h::after { }
label.req { position: relative; }
label.req::before {
  content: "必須"; position: absolute; right: 0; top: 0;
  background: #c0392b; color: #fff; font-size: 10px; padding: 0 5px; border-radius: 3px;
}
.req-h::after { content: "必須"; background: #c0392b; color: #fff; font-size: 10px; padding: 0 5px; border-radius: 3px; }
input, select, textarea {
  font: inherit; font-size: 13px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; background: #fff;
  width: 100%;
}
textarea { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b9cbe8; border-color: var(--accent); }
button {
  font: inherit; font-size: 13px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; padding: 7px 14px;
}
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: #16294d; }
button.big { padding: 12px 28px; font-size: 15px; }
button.ghost { color: var(--accent); border-style: dashed; margin-top: 8px; }
button.del { padding: 2px 8px; color: #c0392b; border-color: #e6c3bd; }
.hint { font-size: 11.5px; color: var(--sub); font-weight: normal; }
.readout { display: block; padding: 7px 0; font-size: 13px; color: var(--ink); }
.opts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0; align-items: center; }
.chk, .num { flex-direction: row; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); }
.chk input { width: auto; }
.num input { width: 62px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; font-weight: normal; color: var(--sub); font-size: 11.5px;
  border-bottom: 1px solid var(--line); padding: 4px 6px;
}
.tbl td { border-bottom: 1px solid #eef0f4; padding: 3px 4px; }
.tbl input, .tbl select { padding: 5px 7px; font-size: 12.5px; }
.tbl .swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid #bbb; display: inline-block; vertical-align: -2px; margin-right: 5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.preview-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
table.gantt { border-collapse: collapse; font-size: 10px; table-layout: fixed; }
table.gantt th, table.gantt td { border: 1px solid #e4e7ec; padding: 0; text-align: center; }
table.gantt .tradecell {
  text-align: center; font-size: 14px;
  border-right: 1px solid #aeb4bd; padding: 0 4px; white-space: nowrap;
}
table.gantt td.day { height: 12px; }
table.gantt tr.txt td { height: 18px; }
table.gantt .sun { background: #e6e6e6; }
table.gantt .sat-txt { color: #0070c0; }
table.gantt .sun-txt { color: #e00000; }
table.gantt .lbl { position: relative; }
table.gantt .lbl span {
  position: absolute; left: 1px; bottom: 0; white-space: nowrap;
  font-size: 12px; z-index: 3; line-height: 1.1;
}
table.gantt .ms span {
  writing-mode: vertical-rl; font-size: 12px; letter-spacing: -.5px;
}
table.gantt tr.msrow td { height: 88px; vertical-align: top; }
table.gantt .sep td { height: 8px; border-left: none; border-right: none; }
.footer-bar {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--line); padding: 12px 20px;
  display: flex; align-items: center; gap: 16px; justify-content: center; z-index: 20;
}
.status { font-size: 12.5px; color: var(--sub); }
.status.err { color: #c0392b; }
.status.ok { color: #1f7a3f; }
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .wide { grid-column: span 2; }
  .two { grid-template-columns: 1fr; }
}
