
:root {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Noto Sans JP', 'Yu Gothic', sans-serif;
  color: #142b45;
  background: #f3f6fa;
  font-synthesis: none;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select {
  font: inherit;
}
button,
.file-button {
  border: 1px solid #cbd6e3;
  background: white;
  color: #142b45;
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
}
button:hover,
.file-button:hover {
  border-color: #245aa5;
  background: #edf4ff;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button.primary {
  background: #245aa5;
  border-color: #245aa5;
  color: white;
  font-weight: 700;
}
button.primary:hover {
  background: #1b4785;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
.file-button:focus-within {
  outline: 3px solid #74a9ed;
  outline-offset: 2px;
}
input[type='text'],
select {
  border: 1px solid #cbd6e3;
  border-radius: 6px;
  padding: 9px 10px;
  background: white;
  color: #142b45;
}
input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: #245aa5;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
.masthead {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #142b45;
  color: white;
  padding: 18px max(24px, calc((100vw - 1440px) / 2));
}
.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid #8ba0b5;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  border-radius: 8px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  margin: 0 0 4px;
}
.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.public-badge {
  margin-left: auto;
  background: #fff4c8;
  color: #594200;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 700;
}
main {
  max-width: 1488px;
  margin: 0 auto;
  padding: 32px 24px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  margin-bottom: 24px;
}
.intro h1 {
  margin: 0 0 10px;
  font-size: clamp(23px, 2.3vw, 32px);
  line-height: 1.4;
  font-weight: 750;
}
.intro p:not(.eyebrow) {
  margin: 0;
  color: #56677b;
  font-size: 14px;
}
.intro .eyebrow {
  color: #245aa5;
  font-weight: 700;
}
.deadline {
  border-left: 3px solid #c9a95b;
  padding: 6px 16px;
  min-width: 200px;
}
.deadline span,
.deadline small {
  display: block;
  font-size: 12px;
  color: #56677b;
}
.deadline strong {
  font-size: 26px;
  display: block;
  line-height: 1.3;
}
.fixed-rule {
  display: flex;
  gap: 18px;
  background: #fff4c8;
  border: 1px solid #ebd590;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
}
.fixed-rule strong {
  white-space: nowrap;
}
.controls {
  display: flex;
  gap: 18px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 20px;
  background: white;
  border: 1px solid #dce3ec;
  padding: 20px;
  border-radius: 10px;
}
.controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.controls select {
  min-width: 190px;
  font-size: 14px;
}
.controls .overlap {
  flex: 1;
  flex-direction: row;
  gap: 9px;
  align-items: start;
  min-width: 210px;
  font-weight: 400;
}
.overlap small {
  display: block;
  font-size: 11px;
  color: #61748a;
}
.assumption {
  font-size: 12px;
  color: #61748a;
  margin: 10px 0 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.stat {
  padding: 14px 20px;
  border: 1px solid #dce3ec;
  background: white;
  border-radius: 10px;
}
.stat span {
  display: block;
  font-size: 12px;
  color: #61748a;
}
.stat strong {
  font-size: 27px;
  font-variant-numeric: tabular-nums;
}
.stat small {
  margin-left: 7px;
  font-size: 12px;
  color: #61748a;
}
.error-banner {
  background: #fff0ef;
  border: 1px solid #e9aaa4;
  color: #a32a21;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 14px;
}
.view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tabs {
  display: flex;
  gap: 8px;
}
.tabs button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #61748a;
  font-weight: 700;
}
.tabs button[aria-selected='true'] {
  background: #142b45;
  color: white;
}
.export-tools {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 12px;
}
.file-button {
  position: relative;
  display: inline-block;
}
.file-button input {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 18px;
  align-items: start;
}
.table-panel {
  min-width: 0;
  border: 1px solid #dce3ec;
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 20px;
}
h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.panel-heading p {
  margin: 3px 0 0;
  font-size: 12px;
  color: #61748a;
}
.panel-heading label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.draft-badge {
  font-size: 11px;
  background: #f3f6fa;
  padding: 5px 9px;
  border-radius: 5px;
  white-space: nowrap;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
#plan-table {
  min-width: 1040px;
}
#history-table {
  min-width: 880px;
}
th,
td {
  border: 1px solid #dce3ec;
  text-align: center;
  padding: 9px 7px;
  vertical-align: middle;
}
th {
  background: #edf2f7;
  white-space: nowrap;
  font-weight: 600;
}
thead th {
  border-top: 0;
  font-size: 11px;
  padding: 12px 7px;
}
td:first-child,
th:first-child {
  border-left: 0;
}
tr td:last-child,
tr th:last-child {
  border-right: 0;
}
tr.period-start td,
tr.period-start th {
  border-top: 2px solid #aab9c9;
}
tr.selected td {
  background: #f0f6ff;
}
td.proposal,
thead th.proposal {
  background: #fff4c8 !important;
  min-width: 155px;
}
td.proposal input {
  background: #fffaf0;
  width: 142px;
  min-width: 142px;
  font-size: 14px;
  padding: 7px;
}
td.proposal input.invalid {
  border: 2px solid #c13c30;
}
.cell-status {
  font-size: 10px;
  color: #9c5f11;
  display: block;
  text-align: left;
  margin-top: 3px;
  max-width: 142px;
}
tr.has-error .cell-status {
  color: #a32a21;
}
.checkbox-cell {
  min-width: 48px;
}
#history-table input {
  min-width: 126px;
  width: 100%;
  padding: 7px;
  font-size: 13px;
}
.table-note {
  font-size: 11px;
  color: #61748a;
  padding: 12px 18px;
  margin: 0;
  background: #f9fbfd;
}
.detail {
  background: white;
  border: 1px solid #dce3ec;
  border-radius: 10px;
  padding: 20px;
}
.detail .eyebrow {
  color: #245aa5;
}
.detail h2 {
  font-size: 20px;
}
.detail h3 {
  margin: 18px 0 7px;
  font-size: 13px;
}
.detail p,
.detail li {
  font-size: 12px;
  color: #56677b;
}
.detail ul {
  margin: 0;
  padding-left: 17px;
}
.detail-value {
  padding: 9px 12px;
  background: #fff4c8;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.candidates {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.candidates button {
  font-size: 12px;
  padding: 6px 10px;
}
.candidate-note {
  color: #61748a;
  font-size: 11px;
}
.warning-item {
  color: #9c5f11 !important;
}
.error-item {
  color: #a32a21 !important;
}
.notes {
  margin-top: 24px;
  padding: 18px 20px;
  background: #eaf0f7;
  border-radius: 10px;
}
.notes p {
  margin: 8px 0 0;
  font-size: 12px;
  color: #56677b;
}
footer {
  font-size: 11px;
  color: #61748a;
  border-top: 1px solid #dce3ec;
  margin-top: 20px;
  padding-top: 18px;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 28px);
  background: #142b45;
  color: white;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 13px;
  z-index: 10;
}
dialog {
  border: 1px solid #dce3ec;
  border-radius: 12px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 26px;
  color: #142b45;
}
dialog::backdrop {
  background: #142b4580;
}
dialog p {
  font-size: 14px;
  margin: 12px 0 20px;
}
.dialog-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
}
.print-reasons {
  display: none;
}
@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
  }
  .detail > div:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .masthead {
    padding: 14px 16px;
    gap: 10px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .brand-title {
    font-size: 13px;
  }
  .masthead .eyebrow {
    font-size: 10px;
    letter-spacing: 0;
  }
  .public-badge {
    font-size: 10px;
    padding: 5px 7px;
  }
  main {
    padding: 22px 14px;
  }
  .intro {
    display: block;
  }
  .intro h1 {
    font-size: 23px;
  }
  .deadline {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .deadline strong {
    font-size: 21px;
  }
  .deadline small {
    width: 100%;
  }
  .fixed-rule {
    display: block;
    padding: 12px 14px;
    font-size: 12px;
  }
  .fixed-rule strong {
    display: block;
    margin-bottom: 4px;
  }
  .controls {
    padding: 16px;
    gap: 13px;
  }
  .controls label {
    width: 100%;
  }
  .controls select {
    width: 100%;
    font-size: 16px;
  }
  .controls button {
    width: 100%;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .stat {
    padding: 12px 14px;
  }
  .stat strong {
    font-size: 24px;
  }
  .tabs {
    width: 100%;
  }
  .tabs button {
    flex: 1;
    font-size: 13px;
    padding: 9px;
  }
  .export-tools {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }
  .export-tools button,
  .file-button {
    text-align: center;
    padding: 10px;
  }
  .panel-heading {
    padding: 14px;
    align-items: start;
    flex-wrap: wrap;
  }
  .draft-badge {
    display: none;
  }
  .detail {
    display: block;
    padding: 18px;
  }
  .notes {
    padding: 16px;
  }
}
@media print {
  @page {
    size: A3 landscape;
    margin: 12mm;
  }
  body,
  :root {
    background: white;
    color: black;
    font-size: 11px;
  }
  main {
    padding: 0;
    max-width: none;
  }
  .masthead,
  .deadline,
  .controls,
  .assumption,
  .stats,
  .view-toolbar,
  .detail,
  .notes,
  footer,
  .error-banner,
  dialog,
  .toast {
    display: none !important;
  }
  .intro {
    margin-bottom: 10px;
  }
  .intro h1 {
    font-size: 20px;
  }
  .fixed-rule {
    margin: 10px 0;
    padding: 8px;
    font-size: 11px;
  }
  .workspace {
    display: block;
  }
  .table-panel {
    border-radius: 0;
  }
  .table-scroll {
    overflow: visible;
  }
  #plan-table {
    min-width: 0;
    font-size: 10px;
  }
  th,
  td {
    padding: 5px;
  }
  td.proposal {
    min-width: 0;
  }
  td.proposal input {
    min-width: 0;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 11px;
  }
  .cell-status {
    max-width: none;
  }
  input[type='checkbox'] {
    width: 12px;
    height: 12px;
  }
  .panel-heading {
    padding: 10px;
  }
  .print-reasons {
    display: block;
    margin-top: 14px;
  }
  .print-reasons h2 {
    font-size: 14px;
  }
  .print-reasons p {
    font-size: 10px;
    margin: 5px 0;
  }
  tr {
    break-inside: avoid;
  }
}

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
