:root {
  color-scheme: light;
  --paper: #f3efe5;
  --sheet: #fbf8ef;
  --side: #eae5d9;
  --ink: #252b23;
  --muted: #5e6255;
  --green: #243b32;
  --sage: #dce4d5;
  --rust: #9b4a34;
  --rust-light: #f0ded2;
  --line: #d5cfc0;
  --sans: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --serif: 'Songti SC', 'Noto Serif SC', 'STSong', Georgia, serif;
  --mono: 'IBM Plex Mono', 'Menlo', monospace;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100vh; background: var(--paper); color: var(--ink); font: 14px/1.55 var(--sans); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; }
button, a[role=button] { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
button { padding: .64rem 1rem; min-height: 39px; border: 1px solid var(--line); border-radius: 2px; background: var(--sheet); color: var(--ink); }
button:hover:enabled { border-color: var(--green); }
button.primary { background: var(--green); border-color: var(--green); color: var(--sheet); }
button.quiet { background: transparent; }
button.danger { color: var(--rust); }
button[aria-pressed=true] { background: var(--sage); border-color: #90a18e; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; }
h1 { font-size: clamp(31px, 4vw, 47px); line-height: 1.2; }
h2 { font-size: 23px; }
h3 { font-size: 17px; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--side); padding: 36px 18px 24px; }
.wordmark { text-decoration: none; color: var(--ink); font: 28px/1.2 var(--serif); display: grid; gap: 10px; padding-left: 12px; }
.wordmark small, .eyebrow { font: 11px/1.5 var(--mono); letter-spacing: .16em; }
.rail nav { display: grid; gap: 5px; margin-top: 58px; }
.rail nav a { padding: 12px 10px; text-decoration: none; color: var(--ink); }
.rail nav a[aria-current=page] { background: var(--green); color: var(--sheet); }
.logout { margin-top: auto; align-self: start; }
main { max-width: 1640px; width: 100%; padding: 42px clamp(16px, 3.8vw, 62px) 64px; min-width: 0; }
.page-head { border-bottom: 1px solid var(--line); margin-bottom: 25px; padding-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head p, .muted { color: var(--muted); }
.page-head p { margin-top: 8px; }
.breadcrumb { display: inline-block; margin: 0 0 12px; text-decoration: none; }
.panel { background: var(--sheet); border: 1px solid var(--line); padding: 20px; min-width: 0; }
.panel h2 { margin-bottom: 12px; }
.login { width: min(100%, 480px); margin: 10vh auto 0; }
.login h1 { margin: 7px 0 27px; }
.toolbar, .actions, .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar { margin: 14px 0; }
.toolbar .push, .actions .push { margin-left: auto; }
.tag { display: inline-block; padding: 2px 7px; font-size: 12px; white-space: nowrap; background: var(--sage); color: var(--green); }
.tag.warn { background: var(--rust-light); color: #75351f; }
.tag.neutral { background: #eee9df; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--sheet); margin-bottom: 24px; }
.stat { padding: 15px 18px; border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat b { display: block; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 36px; line-height: 1; font-weight: 500; color: var(--green); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--sheet); text-align: left; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; white-space: nowrap; }
td a { font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field span, legend { font-size: 13px; }
input:not([type=checkbox]), select, textarea { width: 100%; min-height: 39px; padding: 7px 9px; background: #fffdf7; border: 1px solid #a7a18f; border-radius: 2px; color: var(--ink); }
input[type=checkbox] { accent-color: var(--green); width: 16px; height: 16px; }
textarea { resize: vertical; min-height: 80px; }
.toolbar input, .toolbar select { width: auto; min-width: 100px; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, 295px); gap: 17px; align-items: start; }
.schedule-main { min-width: 0; }
.schedule-main .panel + .panel { margin-top: 15px; }
.chart { overflow: auto; border: 1px solid var(--line); background: var(--sheet); }
.chart-grid { min-width: max-content; display: grid; grid-template-columns: 158px 1fr; }
.chart-name { z-index: 1; position: sticky; left: 0; grid-column: 1; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sheet); text-align: left; overflow: hidden; }
button.chart-name { border-radius: 0; border-top: 0; border-left: 0; }
.chart-name span { display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.chart-name small { display: block; color: var(--muted); }
.track, .axis { position: relative; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(90deg, transparent 0 calc(var(--day) - 1px), #e6e0d3 calc(var(--day) - 1px) var(--day)); }
.axis { display: flex; font: 10px/1 var(--mono); }
.axis span { width: var(--day); display: grid; place-items: center; }
.axis .today { background: var(--sage); font-weight: bold; }
.chart-bar { position: absolute; z-index: 0; display: block; padding: 0; border-radius: 1px; height: 14px; min-height: 0; top: 13px; border: 0; background: #7b8e7b; touch-action: pan-y; }
.chart-bar.in_progress { background: var(--green); }
.chart-bar.done { background: #858375; }
.chart-bar.tentative { border: 1px dashed #667060; background: #e1e6da; }
.chart-bar.milestone { transform: rotate(45deg); border-radius: 0; top: 15px; height: 12px; background: var(--rust); }
.chart-bar.moved { background-color: var(--rust); }
.baseline { position: absolute; top: 32px; height: 8px; border: 1px dashed var(--rust); pointer-events: none; }
.legend { display: flex; gap: 14px; padding-top: 9px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend mark { background: transparent; color: var(--rust); }
.stage-row { width: 100%; grid-column: 1 / -1; padding: 4px 10px; text-align: left; background: #ede8dd; border: 0; border-bottom: 1px solid var(--line); min-height: 27px; }
.stage-row span { position: sticky; left: 10px; }
.log-item { padding: 11px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.log-item small { color: var(--muted); }
.list-error { margin-bottom: 12px; color: var(--rust); }
dialog { width: min(95vw, 600px); max-height: 90vh; overflow: auto; background: var(--sheet); padding: 23px; border: 1px solid var(--line); color: var(--ink); }
dialog::backdrop { background: #1a2822a0; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
#notice { position: fixed; bottom: 20px; right: 20px; z-index: 3; max-width: min(460px, calc(100% - 40px)); padding: 13px 17px; color: #fff; background: var(--green); }
#notice.error { background: #883d29; }
.preview-change { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 7px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.preview-change .from { color: var(--muted); }
.preview-change .to { color: var(--rust); font-weight: 600; }
.works { display: grid; gap: 13px; }
.media-line { display: grid; grid-template-columns: 1fr .7fr auto; gap: 7px; align-items: start; margin-bottom: 10px; }
.media-line .actions { gap: 3px; }
.media-line button { padding-inline: 8px; }
.portal-cover { width: 100%; max-height: 180px; object-fit: cover; margin: 5px 0; }
@media (max-width: 1060px) { body { grid-template-columns: 174px minmax(0, 1fr); } .split { grid-template-columns: 1fr; } }
@media (max-width: 680px) { body { display: block; } .rail { height: auto; position: static; flex-direction: row; align-items: center; padding: 12px 14px; gap: 10px; flex-wrap: wrap; } .wordmark { font-size: 20px; padding-left: 0; } .wordmark small { font-size: 8px; } .rail nav { display: flex; margin: 0; } .rail nav a { padding: 8px 5px; } .logout { margin: 0 0 0 auto; } main { padding-top: 24px; } .grid-two { grid-template-columns: 1fr; } .stat { padding: 12px 7px; } .stat b { font-size: 27px; } .media-line { grid-template-columns: 1fr; } }
