/* ASGG shared typography/tokens remain authoritative. Screen-only layout. */
@media screen {
  body.schedule-editorial { --asgg-accent:#31594f; background:var(--asgg-paper,#f7f6f3)!important; }
  .schedule-editorial .excel-app { display:block; padding:28px 28px 24px 236px; min-height:100vh; height:auto; }
  .schedule-site-rail { position:fixed; inset:0 auto 0 0; width:208px; padding:28px 18px; border-right:1px solid var(--asgg-line); background:var(--asgg-paper); overflow:auto; }
  .schedule-site-rail .schedule-brand-mark { display:none; }
  .schedule-site-rail .schedule-brand-text strong { font-size:26px; color:#31594f!important; }
  .schedule-site-rail .schedule-brand-text small { display:none; }
  .rail-caption { color:#817f76; font-size:13px; margin:8px 0 40px; }
  .schedule-site-rail label { display:grid; gap:12px; font-size:12px; color:#77786f; }
  .schedule-site-rail select { width:100%; min-width:0!important; max-width:100%; height:36px; font-size:13px; padding:6px; }
  .schedule-site-rail nav { display:grid; gap:4px; margin-top:16px; }
  .schedule-site-rail nav button { text-align:left; white-space:normal; overflow-wrap:anywhere; padding:13px 12px; line-height:1.5; height:auto; background:transparent!important; border:1px solid transparent!important; border-radius:2px!important; color:#595d56; }
  .schedule-site-rail nav button[aria-current=page] { background:#e9eeea!important; border-left:3px solid #31594f!important; color:#254a40; font-weight:650; }
  .schedule-editorial .schedule-project-heading { display:flex; align-items:center; gap:24px; padding:0 0 24px!important; margin:0!important; border:0!important; border-bottom:1px solid var(--asgg-line)!important; border-radius:0!important; background:transparent!important; box-shadow:none!important; }
  .schedule-editorial .schedule-project-heading>div:first-child { flex:1; min-width:0; }
  .schedule-editorial .schedule-project-kicker { font-size:10px; letter-spacing:.12em!important; color:#7f8279!important; }
  .schedule-editorial .schedule-project-heading h1 { font-size:28px!important; line-height:1.35; font-weight:700!important; margin:8px 0 0; overflow-wrap:anywhere; }
  .schedule-editorial #sourceInfo { display:none; }
  .schedule-primary-actions { display:flex; gap:8px; flex-shrink:0; }
  .schedule-editorial button, .schedule-editorial summary { cursor:pointer; }
  .schedule-editorial button:not(.marker-color), .schedule-editorial input { border-radius:3px!important; min-height:36px; font-size:13px; }
  .schedule-primary-actions button { padding:8px 18px; }
  .schedule-editorial #saveEdits { background:#31594f!important; color:white!important; border:1px solid #31594f!important; }
  .schedule-editorial .sheet-toolbar { display:block; padding:18px 0!important; min-height:0; background:transparent!important; border:0!important; position:relative; z-index:5; }
  .schedule-editorial .toolbar-actions { flex-wrap:wrap; justify-content:flex-start; align-items:end; gap:10px; overflow:visible; }
  .schedule-editorial .toolbar-actions label { font-size:11px; color:#777a71; gap:5px; }
  .schedule-editorial .toolbar-actions input { padding:6px 9px; }
  .schedule-editorial .toolbar-actions button { padding:7px 12px; }
  .schedule-editorial .edit-status { background:transparent!important; padding:0 0 12px; font-size:11px; color:#7c8077!important; }
  .schedule-color-key { margin-left:auto; align-self:center; font-size:11px; color:#777e73; }
  .schedule-extra-tools { position:relative; }
  .schedule-extra-tools summary { padding:9px 12px; font-size:13px; border:1px solid var(--asgg-line); border-radius:3px; background:white; }
  .schedule-extra-panel { position:absolute; right:0; top:44px; width:330px; padding:16px; background:white; border:1px solid var(--asgg-line); display:flex; flex-wrap:wrap; gap:12px; box-shadow:0 8px 24px #18282012; }
  .schedule-editorial .sheet-frame { margin:0!important; border:1px solid var(--asgg-line)!important; border-radius:0!important; box-shadow:none!important; max-height:calc(100vh - 240px); }
  .schedule-editorial .sheet-grid { box-shadow:none!important; grid-template-columns:var(--editorial-columns)!important; width:100%!important; min-width:var(--editorial-min-width,100%); }
  .schedule-editorial .sheet-cell.header-label-cell,.schedule-editorial .sheet-cell[data-row="5"],.schedule-editorial .sheet-cell[data-row="6"] { background:#f5f6f2!important; }
  .schedule-editorial .sheet-cell.has-diagonal { background-image:none!important; }
  .schedule-editorial .sheet-cell.has-diagonal::before,.schedule-editorial .sheet-cell.has-diagonal::after { display:none!important; }
  .schedule-editorial .sheet-cell.project-info-band-cell { background:white!important; }
  .schedule-editorial .sheet-cell.trade-label-cell[data-col="1"] { border-left:0!important; color:#999f97!important; font-size:10px!important; }
  .schedule-editorial .sheet-cell { border-color:#e1e4de!important; font-size:12px!important; font-family:inherit!important; }
  .schedule-editorial .sheet-cell.trade-label-cell { font-weight:650; color:#343f37!important; border-left:3px solid var(--trade-color,#647c76)!important; background:#fff!important; }
  .schedule-editorial .sheet-cell[data-date-body-cell=true] { background:#fff!important; }
  .schedule-editorial .sheet-cell.editorial-weekend,.schedule-editorial .sheet-cell.editorial-holiday { background:#fbf1e8!important; }
  .schedule-editorial .sheet-cell.month-header-cell { background:#f5f6f2!important; color:#48574d!important; }
  .schedule-editorial .sheet-cell.work-marker-cell.marker-cell { background:var(--trade-color,#647c76)!important; color:transparent!important; border-top:5px solid white!important; border-bottom:5px solid white!important; border-left:0!important; border-right:0!important; }
  .schedule-editorial .sheet-cell.work-marker-cell.marker-cell.editorial-weekend { border-top-color:#fbf1e8!important; border-bottom-color:#fbf1e8!important; }
  .schedule-editorial .sheet-cell.schedule-note-cell { color:#57635c!important; font-size:11px!important; }
  .schedule-editorial :focus-visible { outline:2px solid #31594f!important; outline-offset:3px!important; }
  @media(max-width:1050px) {
    .schedule-editorial .excel-app { padding:20px 18px 20px 194px; }
    .schedule-site-rail { width:176px; padding:24px 14px; }
    .schedule-editorial .schedule-project-heading h1 { font-size:23px!important; }
    .schedule-color-key { display:none; }
  }
  @media(max-width:700px) {
    .schedule-editorial .excel-app { padding:16px; }
    .schedule-site-rail { position:static; width:auto; padding:0 0 18px; border:0; }
    .schedule-site-rail nav, .rail-caption { display:none; }
    .schedule-site-rail label { margin-top:16px; }
    .schedule-editorial .schedule-project-heading { flex-wrap:wrap; }
    .schedule-editorial .sheet-frame { max-height:65vh; }
    .schedule-extra-panel { left:0; right:auto; width:290px; }
  }
}
@media print {
  .schedule-site-rail,.schedule-primary-actions,.schedule-extra-tools,.schedule-color-key { display:none!important; }
}
.schedule-task-editor { inset:0 0 0 auto; margin:0; width:400px; max-width:100vw; height:100dvh; max-height:100dvh; border:0; border-left:1px solid #d6dbd4; padding:28px; color:#283d33; font-family:Pretendard,sans-serif; box-sizing:border-box; }
.schedule-task-editor::backdrop { background:#17281f26; }
.schedule-task-editor form { display:flex;flex-direction:column;gap:18px;height:100%;min-height:0; }
.task-editor-body { display:grid;gap:20px;overflow:auto;min-height:0;flex:1;align-content:start;padding:2px; }
.schedule-task-editor header,.schedule-task-editor footer { flex-shrink:0; }
.schedule-task-editor header { display:flex; align-items:center; justify-content:space-between; }
.schedule-task-editor h2 { margin:5px 0 0; font-size:23px; }
.schedule-task-editor small,.task-project,.task-help { color:#788478; font-size:12px; line-height:1.6; margin:0; }
.schedule-task-editor label { display:grid; gap:8px; font-size:13px; font-weight:600; }
.schedule-task-editor input,.schedule-task-editor textarea { width:100%; min-width:0; padding:10px; box-sizing:border-box; border:1px solid #d8ded6; font:inherit; border-radius:3px; }
.schedule-task-editor button { padding:8px 10px; border:1px solid #d8ded6; background:white; color:#35483d; border-radius:3px; font:inherit; font-size:12px; cursor:pointer; }
.schedule-task-editor button:focus-visible { outline:2px solid #31594f; outline-offset:2px; }
.period-heading,.task-shift { display:flex; align-items:center; gap:8px; justify-content:space-between; font-size:13px; }
.task-periods { display:grid; gap:12px; }
.task-period { display:grid; grid-template-columns:minmax(0,1fr) 10px minmax(0,1fr) 46px; gap:6px; align-items:end; padding-bottom:14px; border-bottom:1px solid #e4e8e1; }
.task-period button { padding:8px 3px; white-space:nowrap; }
.task-period input { font-size:12px; padding:7px 3px; }
.task-period>span { padding-bottom:8px; }
.task-feedback { font-size:13px; line-height:1.6; color:#884945; margin:0; }
.schedule-task-editor footer { display:flex; gap:8px; padding-top:18px; border-top:1px solid #e4e8e1; }
.schedule-task-editor footer button[type=submit] { background:#31594f;color:white;border-color:#31594f; margin-left:auto; }
.schedule-task-editor .task-delete { color:#99514f; }
.schedule-task-editor button[hidden] { display:none; }
.schedule-usage-hint { margin:0 0 12px; font-size:12px; color:#6a796d; }
.schedule-site-search { width:100%;min-width:0;margin-top:12px;box-sizing:border-box;padding:8px;border:1px solid #dce1d8; }
.schedule-site-rail nav button[hidden] { display:none!important; }
.schedule-task-finder { display:flex;align-items:end;gap:8px;margin:0 0 12px; }
.schedule-task-finder label { display:grid;gap:5px;font-size:11px;color:#738071; }
.schedule-task-finder input { width:220px;max-width:60vw;padding:8px;border:1px solid #dce1d8; }
.schedule-task-finder button { padding:8px 12px;border:1px solid #dce1d8;background:white; }
.schedule-editorial .trade-label-cell[role=button] { cursor:pointer; }
.schedule-editorial .trade-label-cell[role=button]:hover { background:#edf2ec!important; }
@media print { .schedule-task-editor,.schedule-usage-hint,.schedule-task-finder { display:none!important; } }

/* Working view: one compact tool row, readable timeline, fixed trade labels. */
@media screen {
  .schedule-editorial .excel-app {padding-top:20px;padding-bottom:16px;}
  .schedule-editorial .schedule-project-heading {padding-bottom:14px!important;min-width:0!important;}
  .schedule-editorial .schedule-project-kicker {display:none;}
  .schedule-editorial .schedule-project-heading h1 {margin:0;font-size:25px!important;}
  .schedule-editorial .sheet-toolbar {padding:12px 0 8px!important;}
  .schedule-editorial .toolbar-actions {align-items:center;gap:8px;}
  .schedule-editorial .schedule-task-finder {margin:0;margin-right:auto;gap:6px;}
  .schedule-task-finder label {font-size:0!important;gap:0;}
  .schedule-task-finder input {font-size:13px!important;width:190px;}
  .schedule-editorial .edit-status {padding:0!important;font-size:11px;flex-basis:100%;}
  .schedule-editorial .schedule-color-key {display:none;}
  .schedule-editorial .schedule-usage-hint {font-size:11px;margin:0 0 8px;}
  .schedule-editorial .sheet-frame {height:var(--available-height,calc(100dvh - 185px));max-height:none!important;min-width:0;}
  .schedule-editorial .sheet-grid {grid-template-rows:var(--editorial-rows)!important;}
  .schedule-editorial .compact-memo-hidden {display:none!important;}
  .schedule-editorial .sheet-cell {font-size:14px!important;}
  .schedule-editorial .sheet-cell.schedule-note-cell {font-size:12px!important;}
  .schedule-editorial .sheet-cell.trade-label-cell[data-col="2"] {position:sticky;left:34px;z-index:3;justify-content:flex-start!important;padding-left:12px;line-height:1.4!important;font-size:14px!important;white-space:normal;}
  .schedule-editorial .sheet-cell.trade-label-cell[data-col="1"] {position:sticky;left:0;z-index:3;background:white!important;}
  .schedule-editorial .sheet-cell.header-label-cell[data-col="1"] {position:sticky;left:0;z-index:4;}
  .schedule-editorial .sheet-cell.header-label-cell[data-col="2"] {position:sticky;left:34px;z-index:4;}
  .schedule-editorial .sheet-cell.work-marker-cell.marker-cell {border-top-width:7px!important;border-bottom-width:5px!important;}
  .schedule-editorial .sheet-cell.project-info-band-cell {font-size:12px!important;}
  .schedule-editorial .schedule-extra-panel {width:360px;max-width:calc(100vw - 40px);z-index:10;}
  .schedule-extra-panel label {min-width:140px;}
  .schedule-editorial .rail-caption {margin-bottom:24px;}
  .schedule-editorial .schedule-site-rail nav button {font-size:13px;}
  @media(min-width:701px){.schedule-site-rail .project-picker-control select {display:none!important;}}
  @media(max-width:700px){
    .schedule-editorial .schedule-site-rail {display:grid;grid-template-columns:70px minmax(0,1fr);gap:12px;align-items:center;}
    .schedule-editorial .schedule-site-rail label {margin:0;gap:5px;}
    .schedule-editorial .schedule-project-heading {gap:10px;}
    .schedule-editorial .schedule-site-search {display:none;}
    .schedule-editorial .schedule-project-heading>div:first-child {flex-basis:100%;}
    .schedule-editorial .schedule-primary-actions {margin-left:auto;}
    .schedule-editorial .sheet-frame {height:65dvh;}
    .schedule-editorial .schedule-project-heading h1 {font-size:21px!important;}
    .schedule-editorial .schedule-task-finder {flex-basis:100%;}
  }
}
