:root{color-scheme:light;--ink:#242424;--muted:#626262;--line:#e5e5e5;--paper:#fff;--ground:#f5f5f5;--accent:#242424;--rail:#f7f7f7;--pale:#ebebeb;font-family:"Source Sans 3","Microsoft YaHei UI","PingFang SC",sans-serif;color:var(--ink);background:var(--ground);font-size:14px;font-variant-numeric:tabular-nums;accent-color:var(--accent)}
*{box-sizing:border-box}
body{margin:0;display:grid;grid-template-columns:224px minmax(0,1fr);min-height:100vh}
button,input,select,textarea{font:inherit;color:inherit}
button,select{cursor:pointer}
button,input,select,textarea{border:1px solid var(--line);border-radius:6px;background:#fff}
button{padding:8px 12px;white-space:nowrap}
button:hover{background:var(--pale)}
button:disabled{opacity:.55;cursor:wait}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #454545;outline-offset:3px}
::selection{background:#dcdcdc;color:#171717}
input,select,textarea{padding:8px 10px;min-width:0}
textarea{resize:vertical}
[hidden]{display:none!important}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(23px,2.4vw,30px);letter-spacing:-.035em;line-height:1.2}
h2{font-size:19px}
a{color:var(--accent);text-underline-offset:3px}
.rail{background:var(--rail);color:#edf8f2;padding:28px 18px 20px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:22px}
.identity{display:flex;gap:12px;align-items:center;padding:0 5px}
.identity strong{display:block;font-size:16px;white-space:nowrap}
.identity small{display:block;color:#b3d0c4;font-size:10px;letter-spacing:.15em;margin-top:5px}
.mark{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 28px;overflow:hidden}.mark svg{width:100%;height:100%;display:block}
.rail-title{display:flex;justify-content:space-between;align-items:center;color:#c4dcd3;padding:13px 6px 0;border-top:1px solid #38524e}
.rail button{color:#eaf8f1;background:transparent;border-color:#4a6961}
.rail button:hover,.rail button[aria-current=true]{background:#2d554b}
.rail-title button{padding:4px 9px;font-size:12px}
#projects{display:grid;gap:3px;align-content:start;flex:1;overflow:auto}
#projects button{text-align:left;border:0;overflow:hidden;text-overflow:ellipsis}
.brand{color:#b6d2c6;font-size:12px;padding:14px 10px 5px}
.import-button{text-align:left}
main{padding:30px clamp(16px,3.2vw,52px) 48px;min-width:0}
.workspace-head,.toolbar,.drawer-head,.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.workspace-head{min-height:68px;margin-bottom:20px}
.scope{color:var(--muted);font-size:13px;margin-bottom:6px}
.scope:empty{display:none}
.actions,.period,.filters,.segmented{display:flex;gap:6px;align-items:center}
.primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.primary:hover{background:#3b3b3b}
.tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);margin-bottom:18px}
.tabs button{padding:12px 4px;border:0;border-radius:0;background:transparent;color:var(--muted);border-bottom:2px solid transparent}
.tabs button[aria-current=page]{border-bottom-color:var(--accent);color:var(--accent);font-weight:700}
.toolbar{margin:0 0 16px;flex-wrap:wrap}
.period button:first-child,.period button:nth-child(3){font-size:20px;line-height:1;padding:6px 11px}
.segmented{gap:0;border:1px solid var(--line);border-radius:6px;background:#fff;padding:2px}
.segmented button{border:0;padding:6px 10px}
.segmented button[aria-pressed=true]{background:var(--pale);color:var(--accent);font-weight:700}
.notice{margin:0 0 14px;padding:10px 12px;background:#e4f2ec;border-radius:5px}
.notice.error,.form-error{color:#a52c22;background:#fff1ed}
.panel{background:var(--paper);border:1px solid var(--line);border-radius:8px;overflow:hidden}
.section-head{padding:16px 18px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.muted{color:var(--muted)}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.legend b{color:var(--accent);font-size:14px;margin-right:4px}
.chart{overflow:auto;max-height:65vh;container-type:inline-size;--label:248px}
.chart-inner{width:calc(var(--label) + var(--weighted-days) * var(--unit))}
.chart-inner{min-height:100%;display:flex;flex-direction:column}
.chart-row{flex:none}
.chart-row.chart-fill{flex:1;min-height:0;border-bottom:0}
.chart-fill .chart-label{background:#fff}
.chart-fill .tick{border-bottom:0}
.chart-row{display:grid;grid-template-columns:var(--label) 1fr;min-height:38px;border-bottom:1px solid #edf1f0}
.chart-row:last-child{border-bottom:0}
.chart-header{position:sticky;top:0;z-index:4;background:#edf4f1;font-weight:700;min-height:42px}
.chart-label{position:sticky;left:0;z-index:3;background:#fff;border-right:1px solid var(--line);min-width:0;display:flex;align-items:center;padding:6px 10px;gap:6px}
.chart-header .chart-label,.chart-header .lane{background:#edf4f1}
.chart-label button{border:0;background:transparent;text-align:left;padding:3px 4px;min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}
.chart-label button:hover{background:var(--pale)}
.row-date{flex:none;font-size:11px;color:var(--muted)}
.group-row .chart-label,.group-row .lane{background:#f1f6f3}
.group-row .chart-label button{font-weight:700}
.overview-row{min-height:44px}
.overview-row .chart-label button:hover{color:var(--accent)}
.chart-label button.fold{flex:0 0 23px;text-align:center}
.lane{display:grid;grid-template-columns:var(--columns);position:relative;align-items:center;min-height:100%}
.tick{grid-row:1;align-self:stretch;border-right:1px solid #edf1f0;display:grid;place-items:center;min-width:0;font-size:12px;color:#425c55}
.tick.weekend{background:#f6f8f7}
.tick.today{box-shadow:inset 2px 0 #a15930}
.phase-bar{grid-row:1;z-index:1;justify-self:stretch;align-self:center;height:16px;min-width:0;padding:0;border:0;border-radius:3px;background:var(--phase-color);color:white;font-size:10px;font-weight:700;line-height:16px;overflow:hidden;margin-inline:var(--trim-start) var(--trim-end)}
.phase-bar:hover{background:var(--phase-color);filter:brightness(.87)}
.phase-bar.done{border-bottom:2px solid #0003;line-height:14px}
.timeline-marker{grid-row:1;z-index:2;justify-self:center;width:11px;height:11px;padding:0;border:0;margin:0}
.production-point{transform:rotate(45deg);border-radius:2px;background:var(--phase-color,#137a69)}
.production-point:hover{background:var(--phase-color,#137a69);filter:brightness(.84)}
.timeline-marker.client-point{align-self:end;margin-bottom:4px;border-radius:50%;background:#61518e}
.timeline-marker.client-point:hover{background:#bc2265}
.timeline-marker.client-point.psd-point{background:var(--phase-color);outline:1px solid #61518e;outline-offset:1px}
.timeline-marker.psd-point:hover{background:var(--phase-color);filter:brightness(.84)}
.lane:not(:has(.phase-bar,.production-point,.work-point)) .client-point{align-self:center;margin-bottom:0}
.timeline-marker.multiple{width:13px;height:13px;line-height:13px;font-size:9px;color:#fff;border-radius:50%;transform:none}
.phase-swatch{display:inline-block;width:13px;height:8px;margin-right:5px;border-radius:2px;vertical-align:1px}
.phase-swatch.psd-swatch{width:8px;height:8px;transform:rotate(45deg)}
.client-key b{color:#61518e}
.source-swatch{flex:0 0 10px;height:10px;border:1px solid #293b3d40;border-radius:3px}
.phase-row .chart-label button{padding-left:28px;font-weight:700}
.phase-issue{font-size:11px;color:#70491b;text-align:right}
.empty{padding:35px 18px;color:var(--muted)}
.unscheduled{margin-top:16px;padding:14px 18px}
.unscheduled summary{cursor:pointer}
.stack{display:grid;gap:7px;margin-top:10px}
.stack button{text-align:left;white-space:normal}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;text-align:left}
th,td{padding:12px 15px;border-bottom:1px solid var(--line);vertical-align:top}
th{color:#3f5953;background:#edf4f1;font-size:12px;white-space:nowrap}
td button{padding:4px 8px;text-align:left;white-space:normal}
td p{margin-top:5px;white-space:pre-wrap;overflow-wrap:anywhere}
.stats-line{display:flex;gap:16px 30px;flex-wrap:wrap;padding:15px 18px;border-bottom:1px solid var(--line)}
.stats-line button{border:0;background:#edf5f1;text-align:left;white-space:normal}
.stats-line strong{margin-left:8px;color:var(--accent);font-size:18px}
.hint{font-size:13px;line-height:1.6;color:var(--muted)}
.stats-note{padding:13px 18px}
dialog{margin:0 0 0 auto;inset:0 0 0 auto;width:min(470px,100%);max-width:100%;height:100%;max-height:100%;border:0;border-left:1px solid var(--line);color:var(--ink);padding:0;box-shadow:-8px 0 35px #0002}
#drawer{overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable}
dialog::backdrop{background:#102c2860}
.drawer-head{position:sticky;top:0;z-index:10;padding:17px 20px;border-bottom:1px solid var(--line);background:#fff}
.drawer-head-actions{display:flex;align-items:center;gap:8px}
#drawer-body{padding:18px 20px 32px}
.editor{display:grid;gap:13px}
.editor label{display:grid;gap:5px;font-size:13px;font-weight:600;min-width:0}
.editor label input,.editor label select,.editor label textarea{font-weight:400;width:100%}
.pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.form-error{padding:9px;border-radius:5px}
.history{margin-top:18px}
.history summary{cursor:pointer}
.history p{margin-top:10px;overflow-wrap:anywhere}
.batch-list{margin-top:20px;display:grid;gap:8px}
.batch{display:flex;justify-content:space-between;align-items:center;gap:8px;overflow-wrap:anywhere}

/* Reference-led light workspace: restrained shell, color carried by the schedule. */
body{padding:18px;gap:0;background:#e9e9e9}
.rail{height:calc(100vh - 36px);top:18px;padding:20px 16px 18px;border:1px solid #fff;border-right:1px solid var(--line);border-radius:18px 0 0 18px;color:var(--ink);gap:14px}
.mark{width:30px;height:30px;flex:0 0 30px;border:0;border-radius:0;background:none}
.rail-title{border-top:1px solid var(--line);color:var(--muted);font-size:12px;padding:14px 8px 0}.rail-title button{border:0;color:var(--accent)}
.rail button{color:#555;border-color:var(--line);border-radius:9px}.rail button:hover{background:#ededed;color:var(--accent)}.rail button[aria-current=true]{background:#dedede;color:#161616;font-weight:700}
.category-dropdown{position:relative}
.rail .identity.category-trigger{display:flex;align-items:center;gap:10px;width:calc(100% + 8px);margin:-4px -4px -2px;padding:6px 8px;border:1px solid transparent;border-radius:12px;background:transparent;color:#1b1b1b;text-align:left}
.rail .identity.category-trigger:hover{background:#ebebeb;border-color:#e0e0e0;color:#111}
.rail .identity.category-trigger[aria-expanded=true]{background:#fff;border-color:#d0d0d0;color:#111;box-shadow:0 3px 10px #18181b12}
.identity.category-trigger strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:700;line-height:1.2;letter-spacing:-.01em}
.category-chevron{flex:none;color:#6e6e6e;transition:color .15s}
.rail .identity.category-trigger:hover .category-chevron,.rail .identity.category-trigger[aria-expanded=true] .category-chevron{color:#1b1b1b}
.category-menu{position:absolute;top:calc(100% + 6px);left:-2px;right:-2px;z-index:30;display:grid;gap:2px;padding:5px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 14px 32px #18181b22}
.category-menu:not(.open){display:none}
.rail .category-menu button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:8.5px 10px;border:0;border-radius:8px;background:transparent;color:#383838;font-size:13px;font-weight:500;text-align:left}
.rail .category-menu button:hover{background:#f2f2f2;color:#111}
.rail .category-menu button[aria-selected=true]{background:#eaeaea;color:#111;font-weight:700}
.category-menu small{color:#777;font-size:11px;font-weight:500}
#projects{gap:6px}#projects button{padding:12px 11px;font-size:12px;min-height:40px}#projects button:first-child{font-size:14px;margin-bottom:8px}.brand{color:#666;letter-spacing:.08em;font-size:11px;padding:12px 12px 8px}
.import-button{padding:12px;background:#fff!important;text-align:center;border-style:dashed}
main{background:#fff;border-radius:0 18px 18px 0;padding:28px 30px 32px;min-height:calc(100vh - 36px)}
.workspace-head{min-height:48px;margin-bottom:24px;align-items:center}.workspace-head>div:first-child{display:flex;flex-direction:row-reverse;align-items:center;gap:12px;min-width:0}h1{overflow-wrap:anywhere}.scope{margin:0;background:#ededed;border-radius:6px;padding:4px 8px;color:#404040;font-size:11px}
.actions button{border-radius:9px;padding:10px 14px;font-size:12px}.primary{box-shadow:0 4px 10px #24242418}
.tabs{gap:7px;border:0;background:#eeeeee;width:fit-content;border-radius:10px;padding:4px;margin-bottom:26px}.tabs button{border:0;border-radius:7px;padding:9px 24px;font-size:13px}.tabs button[aria-current=page]{background:#fff;color:var(--accent);box-shadow:0 2px 5px #25283d0c}
.toolbar{margin-bottom:18px;gap:14px}.period{gap:4px}.period input{border:0;font-size:16px;font-weight:700;padding:7px 4px;width:152px}.period button{border:0;color:var(--muted);background:#f4f4f4}.period #today{margin-left:8px;padding:7px 12px;font-size:12px}.filters{gap:12px}.filters select{font-size:12px;border-radius:8px}.segmented{border:0;background:#eeeeee;border-radius:8px;padding:3px}.segmented button{background:transparent;padding:6px 13px;font-size:12px}.segmented button[aria-pressed=true]{background:#fff;box-shadow:0 2px 4px #25283d0c;color:#333}
.panel{border-radius:12px;border-color:var(--line)}.section-head{padding:18px 20px;min-height:64px}.section-head h2{font-size:15px;font-weight:650}.legend{gap:16px;font-size:11px}.legend b{color:#527aea}.phase-swatch{border-radius:4px;width:16px;height:9px}.phase-swatch.psd-swatch{transform:none;width:16px;height:9px}
.chart{--label:220px;max-height:68vh;min-height:390px;scrollbar-width:thin;scrollbar-color:#c7c7c7 #f5f5f5}
.chart-row{min-height:max(58px,calc(var(--bar-height,20px) + 20px));border-bottom-color:#eeeeee}.chart-header{min-height:46px;font-weight:500;background:#f7f7f7}.chart-header .chart-label,.chart-header .lane{background:#f7f7f7}.chart-header .chart-label{color:var(--muted);font-size:11px;padding-left:20px}
.chart-label{padding:9px 15px;border-right-color:#e8e8e8;gap:8px}.chart-label button{font-size:12px;line-height:1.5}.overview-row{min-height:max(66px,calc(var(--bar-height,20px) + 24px))}.group-row .chart-label,.group-row .lane{background:#fff}.overview-row .chart-label button{font-weight:500;white-space:normal;text-wrap:pretty}.overview-row:hover .chart-label{background:#f3f3f3}.phase-row .chart-label button{padding-left:14px}.row-date{font-size:10px}.phase-issue{font-size:10px}
.tick{border-right-color:#ededed;color:#666;font-size:11px}.tick.weekend{background:#f5f5f5}.tick.today{box-shadow:inset 2px 0 #3c7bff;background:#3c7bff0a}.chart-header .tick{justify-items:start;padding-left:8px}
.phase-bar{color:var(--phase-ink,#fff);height:var(--bar-height,20px);border-radius:clamp(4.5px,calc(var(--bar-height,20px) * .26),9px);font-size:clamp(10px,calc(var(--bar-height,20px) * .34),12px);line-height:var(--bar-height,20px);box-shadow:0 3px 6px #25283d0b;letter-spacing:.02em}.phase-bar.done{border-bottom:0;line-height:var(--bar-height,20px)}.phase-bar:hover{filter:brightness(.96);box-shadow:0 4px 10px #25283d22}.timeline-marker{width:9px;height:9px}.timeline-marker.client-point{margin-bottom:6px;background:#e13b83;box-shadow:0 0 0 2px white}.timeline-marker.client-point.psd-point{outline:0}.client-key b{color:#ba2465}
.unscheduled{border:0;border-top:1px solid var(--line);border-radius:0;margin-top:22px;padding:18px 4px;color:var(--muted);font-size:12px}.notice{background:var(--pale)}
th{background:#f7f7f7;color:var(--muted)}th,td{padding:16px 18px}td{font-size:13px}.stats-line{gap:12px;padding:20px}.stats-line button{background:#f0f0f0;border-radius:10px;padding:15px 18px;flex:1}.stats-line strong{color:var(--accent);font-size:23px}.stats-note{padding:16px 20px}
dialog::backdrop{background:#23203945}.drawer-head{padding:22px}.drawer-head h2{font-size:18px}#drawer-body{padding:22px}input,textarea{caret-color:var(--accent)}.editor input,.editor select,.editor textarea{border-radius:8px}button{transition:background-color .15s,box-shadow .15s}button:disabled{cursor:not-allowed}
@media(min-width:1500px){main{padding:34px 44px}.chart{--label:250px}.overview-row{min-height:74px}}
@media(max-width:1000px){body{padding:0;grid-template-columns:190px minmax(0,1fr)}.rail{top:0;height:100vh;border-radius:0;padding:20px 12px}.rail .identity.category-trigger{gap:8px}.identity.category-trigger strong{font-size:13.5px}.mark{width:26px;height:26px;flex-basis:26px;border-radius:0;background:none}main{border-radius:0;padding:24px 18px}.chart{--label:180px}.legend{gap:10px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}

.stats-line button:nth-child(odd){background:#f1f1f1}.stats-line button:nth-child(odd) strong{color:#242424}.stats-line button:nth-child(even){background:#e8e8e8}.stats-line button:nth-child(even) strong{color:#242424}
@media(min-width:761px){
  html,body{height:100%;overflow:hidden}
  body{min-height:0}
  .rail{position:static;height:calc(100vh - 36px);min-height:0}
  main{height:calc(100vh - 36px);min-height:0;display:flex;flex-direction:column;overflow:hidden}
  .workspace-head,.tabs,.notice,.toolbar{flex:none}
  #content{min-height:0;flex:1;overflow:auto;scrollbar-width:thin;scrollbar-color:#bcbcbc #f5f5f5}
  #content:has(.chart){display:flex;flex-direction:column}
  #content:has(.chart)>.panel{min-height:0;flex:1;display:flex;flex-direction:column}
  #content:has(.brand-profile-banner.is-expanded)>.panel{min-height:360px;flex:1 0 auto}
  .chart{min-height:0;max-height:none;flex:1;overscroll-behavior:contain}
  .unscheduled{flex:none}
}
@media(min-width:761px) and (max-width:1000px){.rail,main{height:100vh}}
@media(min-width:761px){
  main{padding-top:20px;padding-bottom:20px}
  .workspace-head{min-height:42px;margin-bottom:12px}
  h1{font-size:25px}
  .tabs{margin-bottom:12px}
  .tabs button{padding:7px 20px}
  .toolbar{margin-bottom:10px}
  .period input{font-size:14px}
  .section-head{min-height:52px;padding:11px 18px}
  .chart-row{min-height:max(46px,calc(var(--bar-height,20px) + 18px))}
  .chart-header{min-height:38px}
  .chart-row.chart-fill{min-height:0}
  .overview-row{min-height:max(50px,calc(var(--bar-height,20px) + 20px))}
  .chart-label{padding-top:5px;padding-bottom:5px}
  .phase-bar{height:var(--bar-height,20px);line-height:var(--bar-height,20px)}
  .phase-bar.done{line-height:var(--bar-height,20px)}
  .timeline-marker.client-point{margin-bottom:3px}
}
@media(min-width:1500px){.overview-row{min-height:max(54px,calc(var(--bar-height,20px) + 20px))}}
#projects{display:block}
#projects{overflow-x:hidden;overflow-y:auto;padding-right:4px;scrollbar-width:thin;scrollbar-color:#c9c9c9 transparent}
#projects::-webkit-scrollbar{width:6px;height:6px}
#projects::-webkit-scrollbar-track{background:transparent}
#projects::-webkit-scrollbar-thumb{background:#c9c9c9;border-radius:99px}
#projects::-webkit-scrollbar-thumb:hover{background:#a9a9a9}
#projects::-webkit-scrollbar-button{display:none;width:0;height:0}
#projects>.all-projects{display:block;width:100%;margin-bottom:14px;text-align:left}
.brand-group{border-top:1px solid var(--line);padding-top:8px;margin-top:8px}
.brand-header{display:flex;align-items:center;gap:2px}
.brand-header .brand-button{width:auto;flex:1;min-width:0}
.brand-button>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.brand-color-edit{flex:0 0 26px;display:grid;place-items:center;min-height:26px!important;padding:4px!important;border:0!important;background:transparent!important}
.brand-color-edit span{position:relative;display:grid;place-items:center;width:18px;height:18px;background:var(--brand-color);border:1px solid #00000018;border-radius:5px;color:var(--brand-ink,#fff);font-size:10px;line-height:1}
.brand-color-edit span::after{content:"✎";opacity:0;transition:opacity .14s}
.brand-color-edit:hover{background:#e9e9e9!important}
.brand-color-edit:hover span::after,.brand-color-edit:focus-visible span::after{opacity:1}
.brand-color-preview{display:flex;gap:5px;margin:2px 0 6px}
.brand-color-preview span{flex:1;min-width:0;padding:9px 2px;text-align:center;border-radius:6px;color:#fff;font-size:11px;font-weight:700}
.brand-toggle{flex:0 0 27px;display:grid;place-items:center;padding:5px!important;min-height:27px!important;border:0!important;background:transparent!important;color:#777!important}
.brand-toggle:hover{background:#e9e9e9!important;color:#222!important}
.brand-toggle span{display:block;line-height:1;transition:transform .16s ease}
.brand-toggle[aria-expanded=false] span{transform:rotate(-90deg)}
.brand-button{display:flex;width:100%;align-items:center;justify-content:space-between;text-align:left;border:0!important;background:transparent!important;padding:9px 11px!important;color:#242424!important;font-size:12px!important;font-weight:700;letter-spacing:.07em}
.brand-group .brand-button,.project-children button:first-child{margin-bottom:0!important}
.brand-button:hover,.brand-button[aria-current=true]{background:#e5e5e5!important}
.brand-button small{font-size:10px;color:#626262;font-weight:500;letter-spacing:0}
.project-children{display:grid;gap:2px;margin-left:12px;padding-left:9px;border-left:1px solid #d7d7d7}
.project-children[hidden]{display:none!important}
#projects .project-children button{font-size:12px;min-height:34px;padding:8px 9px;color:#606060}
#projects .project-children button[aria-current=true]{color:#161616}
.stat-products{border-top:1px solid var(--line)}
.stat-products h3{font-size:15px;font-weight:700;padding:18px 20px 12px}
.stat-products h3 span{font-size:12px;color:#666;font-weight:500;margin-left:5px}
.stat-products table th,.stat-products table td{padding:11px 18px}
.project-form{gap:18px}
.form-section{display:grid;gap:12px;padding-bottom:17px;border-bottom:1px solid var(--line)}
.form-section h3{font-size:14px;font-weight:700}
.form-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.form-section-head button,.project-form .text-button{border:0;background:transparent;padding:5px 2px;color:var(--accent);font-size:12px}
.form-section-head button:hover,.project-form .text-button:hover{text-decoration:underline;background:transparent}
.round-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.round-field{display:grid;gap:8px;padding:10px;border:1px solid var(--line);border-radius:9px}
.round-field span{font-size:12px}
.project-form .hint{margin:0}
.project-form .psd-field{display:grid;grid-template-columns:1fr;gap:10px;padding:12px;border-radius:9px;background:#f5f5f5}
.project-form .psd-field input{background:#fff}
.plan-defaults{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.editor label.round-gap{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:500;color:var(--muted);white-space:normal}
.editor label.round-gap input{width:54px;flex:0 0 54px;padding:6px 7px;text-align:center;color:var(--ink);font-weight:600}
@media(max-width:540px){.plan-defaults{grid-template-columns:1fr}}
.project-plan-section{margin-top:10px}
.plan-actions{display:flex;gap:12px;flex-wrap:wrap}
.plan-actions button,.plan-node-head button{border:0;background:transparent;padding:4px 0;color:var(--accent);font-size:12px}
.plan-actions button:hover,.plan-node-head button:hover{text-decoration:underline;background:transparent}
.plan-actions button:disabled{opacity:.42;text-decoration:none;cursor:default}
.project-plan-list{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.plan-node{display:grid;align-content:start;gap:9px;min-width:0;padding:12px;border:1px solid var(--line);border-radius:9px;background:#fff}
.plan-node-delivery{background:#f5f5f5}
.plan-node-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.plan-node-head strong{font-size:13px}
.plan-node-tools{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.plan-node-head .plan-action:disabled{opacity:.38;cursor:not-allowed;text-decoration:none}
.plan-node-name{display:block;color:var(--muted);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.plan-node-tools button,.plan-side-node button{border:0;background:transparent;padding:2px 0;color:var(--accent);font-size:11px}
.plan-node-tools button:hover,.plan-side-node button:hover{text-decoration:underline;background:transparent}
.plan-side-list{display:grid;gap:7px;min-width:0}
.plan-side-list:empty{display:none}
.plan-side-node{display:grid;grid-template-columns:110px minmax(0,1fr) auto;align-items:center;gap:8px;padding:7px 9px;border:1px solid var(--line);border-radius:7px;background:#fafafa}
.plan-side-heading{display:grid;gap:2px;min-width:0}
.plan-side-title{display:flex;align-items:center;gap:4px;min-width:0}
.plan-side-marker{flex:none;font-size:11px;line-height:1}
.plan-side-label{font-size:11px;font-weight:600}
.plan-side-original{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:10px;font-weight:400}
.plan-side-node input{width:100%;padding:6px 8px;font-size:11px}
.plan-unassigned{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:9px}
.plan-unassigned>strong{font-size:12px}
.plan-node .pair{gap:10px}
.delete-project-trigger{justify-self:start;border:0;background:transparent;padding:4px 0;color:#a12a22;font-size:12px}
.delete-project-trigger:hover{background:transparent;text-decoration:underline}
.delete-project-confirm{display:grid;gap:10px;padding:14px;border:1px solid #e8c6c2;border-radius:9px;background:#fff8f7}
.delete-project-confirm strong{font-size:13px}
.delete-project-confirm p{font-size:12px;line-height:1.5;color:#6b423e}
.delete-project-confirm input{width:100%;background:#fff}
.delete-project-actions{display:flex;justify-content:flex-end;gap:8px}
.delete-project-actions #confirm-project-delete{background:#a12a22;border-color:#a12a22;color:#fff}
.delete-project-actions #confirm-project-delete:hover{background:#842019}
@media(max-width:480px){.round-list,.project-form .psd-field{grid-template-columns:1fr}.plan-node-head{align-items:flex-start}.plan-node-tools{gap:6px}.plan-side-node{grid-template-columns:100px minmax(0,1fr) auto;gap:5px}}
.timezone-switch button{min-width:43px}
.zone-note{padding:7px 18px;border-bottom:1px solid var(--line);font-size:11px;color:var(--muted)}
.project-link{display:flex;align-items:center;gap:8px;text-align:left}
.project-link>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-info{display:grid;gap:2px;min-width:0;text-align:left}
.project-title{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-counts{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#777;font-size:10px;font-weight:400;line-height:1.2}
#projects .project-children button{min-height:45px}
.chart-label button .project-info{width:100%}
.chart-label button .project-counts{color:#777}
.project-thumb{flex:none;width:25px;height:25px;object-fit:cover;border-radius:6px;background:#eee;border:1px solid #ddd}
.chart-label>.project-thumb{width:27px;height:27px}
.project-identity{display:grid;grid-template-columns:minmax(0,1fr) 108px;align-items:start;gap:12px}
.project-identity-fields{display:grid;align-content:start;gap:12px;min-width:0}
.project-image-field{display:grid;grid-template-rows:auto auto;gap:5px;min-width:0}
.project-image-heading{font-size:13px;font-weight:600}
.project-image-panel{position:relative;width:100%;aspect-ratio:1;overflow:hidden;border:1px solid var(--line);border-radius:9px;background:#fafafa;text-align:center}
.editor label.image-upload{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;font-size:12px;cursor:pointer}
.image-upload input{position:absolute;width:1px;height:1px;padding:0;opacity:0;overflow:hidden}
.image-upload:focus-within{outline:2px solid var(--ink);outline-offset:-3px}
.image-upload-action{position:relative;z-index:1;display:inline-block;padding:6px 8px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);font-size:12px;font-weight:500}
.image-upload:hover .image-upload-action{background:#f1f1f1}
.image-preview{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.image-preview[hidden],.remove-image[hidden]{display:none}
.project-image-panel.has-image .image-upload-action{position:absolute;right:0;bottom:0;left:0;border:0;border-radius:0;background:#0009;color:#fff;opacity:0;transition:opacity .15s}
.project-image-panel.has-image:hover .image-upload-action,.project-image-panel.has-image:focus-within .image-upload-action{opacity:1}
.remove-image{position:absolute;z-index:2;top:6px;right:6px;padding:4px 7px;border:0;border-radius:5px;background:#fff;color:var(--ink);font-size:11px;opacity:0;transition:opacity .15s}
.project-image-panel:hover .remove-image,.project-image-panel:focus-within .remove-image{opacity:1}
@media(hover:none){.project-image-panel.has-image .image-upload-action,.project-image-panel .remove-image:not([hidden]){opacity:1}}
@media(max-width:390px){.project-identity{gap:8px}.image-upload-action{font-size:11px}}
.timeline-marker.work-point{transform:rotate(45deg);border-radius:2px;background:#3b8478}
.timeline-marker.work-point:hover{background:#2b675d}
.legend{align-items:center;row-gap:6px;line-height:18px}
.legend>span{display:inline-flex;align-items:center;gap:6px;min-height:18px;line-height:18px;white-space:nowrap}
.legend .phase-swatch{display:block;flex:none;width:16px;height:9px;margin:0;vertical-align:unset;transform:none}
.legend b{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:18px;margin:0;line-height:1;font-size:14px}
.work-key b{color:#3b8478}
.legend>button{display:inline-flex;align-items:center;gap:6px;min-height:22px;padding:2px 4px;margin:-2px -4px;border:0;background:transparent;color:inherit;font-size:inherit;line-height:18px}
.legend>button:hover{background:#f1f1f1}
.sheet-head{align-items:center}
.sheet-head>div:first-child{display:grid;gap:4px}
.sheet-actions{display:flex;gap:8px;flex-wrap:wrap}
.schedule-sheet{min-width:1280px;table-layout:fixed;font-family:Arial,sans-serif}
.schedule-sheet th,.schedule-sheet td{padding:8px 10px;border:1px solid #686868;line-height:1.4;overflow-wrap:anywhere}
.schedule-sheet thead th{position:sticky;top:0;z-index:1;background:#ffff00;color:#000;font-weight:700}
.schedule-sheet:not(.modern-sheet) thead th[data-note-head="1"]{background:#d9d9d9;font-weight:400}
.schedule-sheet thead th[data-col=date]{width:112px}.schedule-sheet thead th[data-col=team]{width:92px}.schedule-sheet thead th[data-col=brand]{width:58px}.schedule-sheet thead th[data-col=category]{width:82px}
.schedule-sheet thead th[data-col=round]{width:92px}.schedule-sheet thead th[data-col=status]{width:78px}.schedule-sheet thead th[data-col=project]{width:205px}.schedule-sheet thead th[data-col=code]{width:138px}
.schedule-sheet thead th[data-col=task]{width:225px}.schedule-sheet thead th[data-col=sku]{width:66px}.schedule-sheet thead th[data-col=asset]{width:78px}.schedule-sheet thead th[data-col=pmNotes]{width:220px}.schedule-sheet thead th[data-col=teamNotes]{width:125px}
.schedule-sheet td[data-col=date],.schedule-sheet th[data-col=date]{padding-left:7px;padding-right:7px}
.schedule-sheet td[data-col=brand],.schedule-sheet th[data-col=brand],.schedule-sheet td[data-col=category],.schedule-sheet th[data-col=category],.schedule-sheet td[data-col=round],.schedule-sheet th[data-col=round],.schedule-sheet td[data-col=sku],.schedule-sheet th[data-col=sku],.schedule-sheet td[data-col=asset],.schedule-sheet th[data-col=asset]{padding-left:6px;padding-right:6px}
.sheet-proj-cell{display:inline-flex;align-items:center;gap:7px;min-width:0}
.sheet-proj-cell button{text-align:left}
.sheet-inline-thumb{flex:0 0 24px;width:24px;height:24px;object-fit:cover;border-radius:4px;border:1px solid #00000014}
.schedule-sheet td[data-col=date],.schedule-sheet td[data-col=team],.schedule-sheet td[data-col=brand],.schedule-sheet td[data-col=category],.schedule-sheet td[data-col=round],.schedule-sheet td[data-col=status]{white-space:nowrap}
.schedule-sheet .sheet-project-row{background:var(--sheet-project)}
.schedule-sheet .sheet-weekend td{height:22px;padding:0;background:#fff}
.schedule-sheet td button{padding:0;border:0;background:transparent;color:inherit;text-decoration:underline;text-decoration-color:currentColor;text-underline-offset:3px}
.schedule-sheet td button:hover{color:var(--accent);text-decoration-color:currentColor}
.sheet-note summary{cursor:pointer;color:inherit;line-height:1.4}
.sheet-note p{margin-top:8px;white-space:pre-wrap;color:inherit}
.tick.today{box-shadow:inset 2px 0 var(--today-color,#3c7bff);background:color-mix(in srgb,var(--today-color,#3c7bff) 8%,transparent)}
.timeline-marker.work-point{background:var(--work-color,#3b8478)}
.timeline-marker.work-point:hover{background:var(--work-color,#3b8478);filter:brightness(.84)}
.timeline-marker.client-point{background:var(--client-color,#e13b83)}
.timeline-marker.client-point:hover{background:var(--client-color,#e13b83);filter:brightness(.84)}
.palette-color-preview{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:#fafafa;margin:2px 0 4px;font-size:13px;font-weight:600}
.palette-color-preview span:first-child{display:inline-flex;align-items:center;justify-content:center;width:30px;height:20px;border-radius:5px;flex:none}
.palette-color-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.editor input[type=color],input[type=color]{-webkit-appearance:none;appearance:none;width:52px!important;min-width:52px;height:40px;padding:3px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer;flex:0 0 52px}
input[type=color]::-webkit-color-swatch-wrapper{padding:0}
input[type=color]::-webkit-color-swatch{border:1px solid #0000001c;border-radius:6px}
input[type=color]::-moz-color-swatch{border:1px solid #0000001c;border-radius:6px}
.color-field{display:grid;gap:8px}
.color-field-label{font-size:13px;font-weight:600}
.color-picker-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.editor .color-hex-input{width:116px!important;flex:0 0 116px;height:40px;padding:0 11px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.color-reset-btn{margin-left:auto;height:40px;padding:0 12px;font-size:12px}
.color-swatches{display:flex;flex-wrap:wrap;gap:7px;padding-top:2px}
.color-preset{width:26px;height:26px;padding:0;border:1px solid #0000001f;border-radius:7px;background:var(--preset)}
.color-preset:hover{background:var(--preset);filter:brightness(.93)}
.color-preset[aria-pressed=true]{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--ink)}
#auth-status{color:#555;background:#f4f4f4;border-color:#e2e2e2}
#auth-status[hidden]{display:none}
#login-dialog{position:fixed;inset:auto;top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);margin:0;width:min(400px,calc(100vw - 32px));height:fit-content;max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--line);border-radius:16px;padding:26px;box-shadow:0 22px 70px #0003}
#login-dialog h2{font-size:21px;margin:0}
#login-dialog .hint{margin:0}
#login-dialog label{display:grid;gap:6px;font-size:13px;font-weight:600}
#login-dialog input{width:100%;padding:10px 11px;font-weight:400}
.login-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:4px}

/* Quiet navigation and stable date controls. */
.actions button,.actions #auth-status{min-height:36px;padding:7px 14px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);box-shadow:none;font-size:12px;font-weight:500}
.actions button:hover,.actions #auth-status:hover{background:#f3f3f3}
.period{gap:8px;min-width:0}
.period input[type=month]{width:178px;min-width:178px;flex:0 0 178px;height:36px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;line-height:22px}
.period input[type=month]::-webkit-calendar-picker-indicator{margin:0 0 0 auto;padding:0;width:16px;height:16px;flex:none}
.period #prev,.period #next{display:grid;place-items:center;flex:none;width:34px;height:36px;min-width:34px;padding:0;font-size:18px}
.period #today{margin-left:2px;height:36px;padding:7px 12px}
.filters{gap:10px 14px;flex-wrap:wrap;justify-content:flex-end}
.range-control{display:flex;align-items:center;gap:7px;white-space:nowrap}
.range-control>span{font-size:11px;color:var(--muted)}
.range-control .segmented button{padding-inline:10px}
#status-filter{appearance:none;min-width:142px;height:36px;padding:0 38px 0 13px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m3.5 6 4.5 4 4.5-4' stroke='%23242424' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;background-size:16px 16px}
#projects{padding-right:0;scrollbar-width:none}
#projects::-webkit-scrollbar{display:none;width:0;height:0}
@media(min-width:761px){#projects.has-more{mask-image:linear-gradient(to bottom,#000 0,#000 calc(100% - 18px),transparent 100%)}}
.category-tag{display:inline-block;padding:1px 5px;border-radius:4px;background:#e4e4e4;color:#2f2f2f;font-size:9.5px;font-weight:600;line-height:1.35}
.pair.single-field{grid-template-columns:1fr}
.actions .lang-switch{min-width:44px;padding-inline:11px;font-weight:700;letter-spacing:.03em;text-align:center}
@media(min-width:761px){
  .mobile-only{display:none!important}
  .rail-top,.rail-drawer{display:contents}
}
@media(max-width:760px){
  .desktop-only{display:none!important}
  body{display:block;padding:0;background:#f4f4f5;min-height:100dvh}
  body.rail-drawer-open{overflow:hidden}
  .rail{position:sticky;top:0;z-index:25;height:auto;padding:10px 14px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:#f7f7f7f2;backdrop-filter:blur(10px);display:block}
  .rail-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
  .category-dropdown{flex:1 1 auto;min-width:0}
  .rail .identity.category-trigger{width:100%;margin:0;padding:5px 8px;gap:8px;border-radius:10px}
  .identity.category-trigger strong{font-size:14px}
  .mark{width:26px;height:26px;flex-basis:26px;border-radius:0;background:none}
  .category-menu{left:0;right:auto;min-width:min(240px,calc(100vw - 28px))}
  .mobile-bar-actions{display:flex;align-items:center;gap:6px;flex:none}
  .rail .lang-switch{min-height:34px;min-width:40px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font-size:12px;font-weight:700;letter-spacing:.03em}
  .rail .mobile-projects-btn{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font-size:12px;font-weight:600}
  .rail .lang-switch:hover,.rail .mobile-projects-btn:hover{background:#efefef}
  .mobile-projects-btn small{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#eaeaea;color:#2b2b2b;font-size:10.5px;font-weight:700}
  .mobile-projects-btn small:empty{display:none}
  .rail-backdrop{position:fixed;inset:0;z-index:38;background:#18181b52}
  .rail-drawer{position:fixed;top:0;left:0;bottom:0;z-index:40;width:min(314px,86vw);height:100dvh;padding:16px 14px calc(16px + env(safe-area-inset-bottom));background:var(--rail);border-right:1px solid var(--line);box-shadow:14px 0 38px #0000002e;display:flex;flex-direction:column;gap:12px;transform:translateX(-104%);visibility:hidden;transition:transform .2s ease,visibility .2s}
  .rail.rail-open .rail-drawer{transform:translateX(0);visibility:visible}
  .rail-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--line)}
  .rail-drawer-head strong{font-size:15px;font-weight:700;color:var(--ink)}
  .rail-drawer-actions{display:flex;align-items:center;gap:6px}
  .rail .rail-drawer-actions #add-project-mobile{min-height:32px;padding:5px 10px;border:1px solid var(--accent);border-radius:8px;background:var(--accent);color:#fff;font-size:12px;font-weight:600}
  .rail .rail-drawer-actions #close-rail-drawer{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-size:13px}
  .rail-drawer .rail-title{display:none}
  .rail-drawer #projects{display:block;flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#c9c9c9 transparent}
  .rail-drawer #projects button{width:100%;max-width:none}
  .rail-drawer .brand-color-edit,.rail-drawer .brand-toggle{flex:0 0 32px;min-height:32px!important}
  .rail-drawer .import-button{flex:none;width:100%;padding:10px 12px;font-size:12px}
  main{background:#fff;border-radius:0;padding:16px 14px calc(28px + env(safe-area-inset-bottom));min-height:calc(100dvh - 55px)}
  .workspace-head{flex-direction:column;align-items:stretch;gap:10px;min-height:0;margin-bottom:14px}
  .workspace-head>div:first-child{flex-direction:column;align-items:flex-start;gap:5px}
  .scope{font-size:11px}
  h1{font-size:20px;line-height:1.25}
  .actions{justify-content:flex-start;flex-wrap:wrap;gap:6px}
  .actions button,.actions #auth-status{min-height:34px;padding:6px 11px;font-size:12px}
  .tabs{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:3px;margin-bottom:14px}
  .tabs button{padding:8px 6px;font-size:13px;text-align:center}
  .toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:12px}
  .period{display:grid;grid-template-columns:36px minmax(0,1fr) 36px auto;gap:6px;width:100%}
  .period #prev,.period #next{width:36px;min-width:36px;height:36px}
  .period input[type=month]{width:100%;min-width:0;flex:1 1 auto;height:36px;font-size:14px}
  .period #today{margin-left:0;height:36px;padding:0 12px}
  .filters{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px;width:100%}
  #status-filter{flex:1 1 140px;min-width:0;height:36px;font-size:12px}
  .range-control{flex:1 1 auto}
  .range-control>span{display:none}
  .timezone-switch{flex:0 0 auto}
  .filters .segmented{display:flex;min-height:36px;align-items:stretch}
  #range-switch,#scale-switch{flex:1 1 auto}
  .filters .segmented button{flex:1 1 auto;padding:6px 9px;font-size:12px;text-align:center}
  .section-head{flex-direction:column;align-items:stretch;gap:8px;padding:12px 14px;min-height:0}
  .legend{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:12px;padding-bottom:2px;-webkit-overflow-scrolling:touch}
  .legend::-webkit-scrollbar{display:none}
  .sheet-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .sheet-actions button{width:100%;text-align:center;padding:8px 10px;font-size:12px}
  .zone-note{padding:7px 14px}
  .chart{--label:134px;--day-unit:46px;--week-unit:20px;min-height:280px;max-height:min(68dvh,560px);-webkit-overflow-scrolling:touch}
  .chart-header{min-height:40px}
  .chart-header .chart-label{padding-left:10px;font-size:11px}
  .chart-label{padding:6px 8px;gap:5px}
  .chart-label>.project-thumb{width:20px;height:20px;border-radius:5px}
  .chart-label button.fold{flex:0 0 18px;padding:2px 0;font-size:11px}
  .chart-label button{font-size:11px;line-height:1.3;padding:2px}
  .overview-row{min-height:max(54px,calc(var(--bar-height,20px) + 18px))}
  .overview-row .project-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .overview-row .row-date{display:none}
  .phase-row .chart-label{flex-wrap:nowrap;gap:4px}
  .phase-row .chart-label button{padding-left:8px}
  .row-date{font-size:9.5px}
  .stats-line{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px 14px}
  .stats-line button{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:6px;min-width:0;padding:12px}
  .stats-line strong{margin-left:0;font-size:21px;line-height:1.1}
  .stats-note{padding:12px 14px;font-size:12px}
  .stat-products h3{padding:14px 14px 10px;font-size:14px}
  .stat-products table{min-width:600px}
  th,td,.stat-products table th,.stat-products table td{padding:10px 12px;font-size:12px}
  dialog#drawer{width:100%;height:100dvh;max-height:100dvh;border-left:0}
  .drawer-head{padding:14px 16px}
  .drawer-head h2{font-size:16px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #drawer-body{padding:16px 16px calc(28px + env(safe-area-inset-bottom))}
  .editor input,.editor select,.editor textarea,#login-dialog input{font-size:16px}
}
@media(max-width:520px){
  .pair{grid-template-columns:1fr}
  .project-identity{grid-template-columns:minmax(0,1fr) 88px;gap:10px}
  .plan-side-node{grid-template-columns:minmax(0,1fr) auto;gap:6px}
  .plan-side-node input{grid-column:1/-1;font-size:16px}
}

/* UI/UX Workbench Overhaul (#1–#10) */
.rail{gap:11px}
.rail-search-wrap{position:relative;display:flex;align-items:center;background:#fff;border:1px solid #dfdfdf;border-radius:10px;padding:0 8px 0 9px;min-height:34px;transition:border-color .15s,box-shadow .15s}
.rail-search-wrap:focus-within{border-color:#242424;box-shadow:0 0 0 3px #24242410}
.rail-search-icon{flex:none;color:#888;margin-right:6px}
.rail-search-wrap input{border:0!important;background:transparent!important;padding:5px 2px!important;width:100%;font-size:12.5px;outline:none!important}
.rail-search-wrap input::-webkit-search-cancel-button{display:none}
.rail-search-kbd{flex:none;padding:1px 5px;border:1px solid #e2e2e2;border-radius:4px;background:#f7f7f7;color:#888;font-family:ui-monospace,monospace;font-size:10px;line-height:1.3}
.rail-search-wrap:focus-within .rail-search-kbd{display:none}
.rail-search-clear{flex:none;padding:2px 5px!important;min-height:0!important;border:0!important;background:transparent!important;color:#777!important;font-size:11px}
.rail-title{padding-top:10px}
.rail-title-btns{display:flex;align-items:center;gap:4px}
#toggle-all-brands{padding:3px 7px;font-size:11px;color:#666;border:0;background:transparent;border-radius:6px}
#toggle-all-brands:hover{background:#eaeaea;color:#18181b}
.rail-footer-tools{display:grid;grid-template-columns:1fr;gap:6px;flex:none}
.rail-footer-tools:has(>:nth-child(2)){grid-template-columns:1fr 1fr}
.rail-footer-tools button{padding:9px 8px!important;font-size:11.5px;text-align:center;justify-content:center}
.status-dot{display:inline-block;width:6.5px;height:6.5px;border-radius:50%;margin-right:4px;vertical-align:1px;background:#94a3b8;flex:none}
.status-dot[data-st="制作中"],.status-dot[data-st="修改中"]{background:#10b981}
.status-dot[data-st="待确认"],.status-dot[data-st="待反馈"]{background:#f59e0b}
.status-dot[data-st="已完成"],.status-dot[data-st="已交付"]{background:#2563eb}
.status-dot[data-st="暂停"],.status-dot[data-st="已归档"]{background:#94a3b8}
.rail-empty-search{padding:18px 10px;text-align:center;color:#777;font-size:12px;line-height:1.5}

.workspace-head{min-height:38px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid #efefef;gap:12px}
.workspace-head>div:first-child{display:flex;flex-direction:row;align-items:center;gap:0;min-width:0;flex:1}
#scope{display:none!important}
#heading{display:flex;align-items:center;flex-wrap:wrap;gap:7px;font-size:21px;font-weight:700;line-height:1.25;letter-spacing:-.02em;min-width:0}
.title-back,.title-parent{display:inline-flex;align-items:center;gap:4px;border:0!important;background:transparent!important;padding:3px 7px!important;margin:-3px;border-radius:7px!important;color:#71717a!important;font-size:17px!important;font-weight:550;line-height:1.2;transition:background-color .14s,color .14s}
.title-back:hover,.title-parent:hover{background:#f1f1f3!important;color:#18181b!important}
.title-back svg{flex:none;color:#71717a;transition:transform .14s,color .14s}
.title-back:hover svg{color:#18181b;transform:translateX(-1.5px)}
.title-slash{color:#d0d0d6;font-weight:400;font-size:18px;user-select:none;padding:0 1px}
.title-current{color:#18181b;min-width:0;overflow-wrap:anywhere}
.head-subpill{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px;margin-left:3px;border-radius:999px;background:#f3f4f6;border:1px solid #e7e7eb;color:#52525b;font-size:11.5px;font-weight:500;line-height:1;letter-spacing:0}
.actions{gap:6px}
.actions button,.actions #auth-status{min-height:33px;padding:5px 12px;border-radius:8px;font-size:12px}
.actions button.cta-primary{background:#18181b;color:#fff;border-color:#18181b;font-weight:600;box-shadow:0 1px 4px #18181b1a}
.actions button.cta-primary:hover{background:#2d2d32}

.top-controls{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap;margin-bottom:12px}
.tabs{margin:0;padding:3px;gap:2px;border-radius:9px;background:#f0f0f2;flex:none}
.tabs button{padding:5px 14px;height:28px;font-size:12.5px;border-radius:6.5px;display:inline-flex;align-items:center;justify-content:center}
.toolbar{margin:0;flex:1 1 auto;display:flex;align-items:center;justify-content:space-between;gap:8px 10px;flex-wrap:wrap;min-width:0}
.period{gap:4px;padding-left:10px;border-left:1px solid #e5e5e8}
.period #prev,.period #next{width:30px;min-width:30px;height:32px;border-radius:7px;background:#f4f4f6}
.period input[type=month]{width:146px;min-width:146px;flex:0 0 146px;height:32px;padding:4px 8px;font-size:13px;border-radius:7px;border-color:#e4e4e7}
.period #today{height:32px;padding:0 10px;margin-left:2px;border-radius:7px;font-size:12px;background:#f4f4f6}
.filters{gap:6px;align-items:center;justify-content:flex-end;margin-left:auto}
#range-label{display:none}
#status-filter{height:32px;min-width:106px;padding:0 30px 0 10px;border-radius:8px;border-color:#e4e4e7;font-size:12px;background-position:right 9px center;background-size:14px 14px}
.segmented{padding:2px;border-radius:8px;background:#f0f0f2}
.segmented button{height:28px;padding:0 10px;font-size:12px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center}
.section-title-group{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap}
.inline-zone-switch{display:inline-flex;padding:2px;border-radius:7px;background:#f0f0f2}
.inline-zone-switch button{height:24px;padding:0 9px;border:0;border-radius:5px;background:transparent;color:#666;font-size:11.5px;font-weight:500}
.inline-zone-switch button[aria-pressed=true]{background:#fff;color:#18181b;font-weight:650;box-shadow:0 1px 3px #00000012}
.inline-qf{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}
.inline-qf[hidden]{display:none!important}
.qf-pill{display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 10px;border-radius:8px;border:1px solid #e4e4e7;background:#fff;color:#52525b;font-size:12px;font-weight:500}
.qf-pill:hover{background:#f5f5f6;color:#18181b}
.qf-pill[aria-pressed=true]{background:#18181b;border-color:#18181b;color:#fff;font-weight:600}
.qf-pill small{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:99px;background:#f1f1f4;color:#666;font-size:10.5px;font-weight:700;line-height:1}
.qf-pill[aria-pressed=true] small{background:#ffffff26;color:#fff}
.qf-clear{height:32px;padding:0 8px;border:0;border-radius:7px;background:#fef2f2;color:#dc2626;font-size:11.5px;font-weight:600}
.qf-clear:hover{background:#fee2e2}

.chart .lane{cursor:grab}
.chart.grabbing,.chart.grabbing .lane{cursor:grabbing!important;user-select:none}
.chart-header{min-height:44px}
.tick-stack{display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15;gap:1px;padding:2px 0}
.chart-header .tick:has(.tick-stack){justify-items:center;padding-left:0}
.tick-day{font-size:11.5px;font-weight:650;color:#27272a}
.tick-wk{font-size:9.5px;font-weight:500;color:#8a8a93}
.tick.weekend .tick-day,.tick.weekend .tick-wk{color:#a1a1aa}
.chart-header .tick.today-head .tick-stack{background:#2563eb;color:#fff;padding:2px 7px;border-radius:7px;box-shadow:0 2px 6px #2563eb38}
.chart-header .tick.today-head .tick-day,.chart-header .tick.today-head .tick-wk{color:#fff}
.overview-row .project-title{display:flex;align-items:center;gap:5px;min-width:0}
.project-title-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.brand-micro{display:inline-flex;align-items:center;justify-content:center;height:17px;padding:0 5.5px;border-radius:4px;flex:none;box-sizing:border-box;background:color-mix(in srgb,var(--b-col,#52525b) 14%,#fff);border:1px solid color-mix(in srgb,var(--b-col,#52525b) 30%,transparent);color:#1f2937;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:10px;font-weight:700;line-height:1;letter-spacing:.03em}
.row-quick-edit{flex:0 0 26px!important;width:26px;height:26px;padding:0!important;display:grid;place-items:center;border-radius:6px;color:#71717a;font-size:12px;opacity:0;transition:opacity .14s,background-color .14s}
.overview-row:hover .row-quick-edit,.overview-row:focus-within .row-quick-edit{opacity:1}
.row-quick-edit:hover{background:#e4e4e7!important;color:#18181b}
@media(hover:none){.row-quick-edit{opacity:.85}}

.gantt-popover{position:fixed;z-index:95;pointer-events:none;width:max-content;max-width:min(320px,calc(100vw - 24px));padding:11px 13px;background:#18181bf5;backdrop-filter:blur(10px);color:#f4f4f5;border:1px solid #ffffff1f;border-radius:11px;box-shadow:0 16px 38px #0000003b;font-size:12px;line-height:1.45}
.gp-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}
.gp-brand{display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:11.5px;color:#e4e4e7;min-width:0}
.gp-brand i{width:8px;height:8px;border-radius:50%;flex:none}
.gp-brand span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gp-pill{padding:1px 7px;border-radius:99px;background:#ffffff1c;color:#fff;font-size:10.5px;font-weight:600;white-space:nowrap}
.gp-phase{font-size:13px;font-weight:700;color:#fff;margin-bottom:4px}
.gp-dates{color:#d4d4d8;font-size:11.5px}
.gp-meta{margin-top:6px;padding-top:6px;border-top:1px solid #ffffff1a;color:#a1a1aa;font-size:11px;display:flex;justify-content:space-between;gap:10px}
.gp-cta{color:#93c5fd;font-weight:600}

.sheet-ux-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sheet-search{height:32px;width:186px;padding:0 10px;border:1px solid var(--line);border-radius:8px;font-size:12px;background:#fafafa}
.sheet-search:focus{background:#fff;border-color:#242424;outline:none}
.schedule-sheet.modern-sheet{font-family:inherit;border-collapse:separate;border-spacing:0}
.schedule-sheet.modern-sheet th,.schedule-sheet.modern-sheet td{border:0;border-bottom:1px solid #ececef;padding:11px 12px}
.schedule-sheet.modern-sheet thead th{background:#f8f8f9;color:#52525b;font-weight:600;font-size:11.5px;border-bottom:1px solid #dedee3}
.schedule-sheet.modern-sheet .sheet-project-row{background:#fff;transition:background-color .12s}
.schedule-sheet.modern-sheet .sheet-project-row:hover td{background:#f7f8fa!important}
.schedule-sheet.modern-sheet .sheet-project-row td:first-child{box-shadow:inset 4px 0 0 var(--sheet-project,#cbd5e1);padding-left:13px}
.schedule-sheet.modern-sheet .sheet-weekend td{height:10px;background:#f4f4f6;border-bottom:1px solid #ececef}
.sheet-status-pill{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:99px;background:#f3f4f6;color:#374151;font-size:11px;font-weight:600}

.stats-line{gap:12px}
.stats-line button{background:#fafafa!important;border:1px solid #e6e6e9!important;border-radius:12px;padding:14px 16px;display:flex;flex-direction:row;align-items:stretch;justify-content:space-between;gap:10px;transition:border-color .15s,transform .15s,box-shadow .15s}
.stats-line button:hover{border-color:#242424!important;box-shadow:0 6px 18px #18181b0f;transform:translateY(-1px)}
.kpi-main{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:8px;color:#52525b;font-size:12px;font-weight:600;min-width:0}
.stats-line .kpi-main strong{margin-left:0;font-size:26px;line-height:1;letter-spacing:-.02em;color:#18181b}
.kpi-sub{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;gap:8px;flex:none}
.kpi-arrow{color:#a1a1aa;font-size:11px;transition:color .15s,transform .15s}
.stats-line button:hover .kpi-arrow{color:#18181b;transform:translate(1px,-1px)}
.kpi-delta{font-size:11px;font-weight:600;padding:2px 7px;border-radius:99px;background:#f1f1f4;color:#666;white-space:nowrap}
.kpi-delta.up{background:#ecfdf5;color:#047857}
.kpi-delta.down{background:#eff6ff;color:#1d4ed8}
.brand-stat-cell{display:flex;flex-direction:column;gap:5px;min-width:120px}
.brand-stat-head{display:inline-flex;align-items:center;gap:7px;font-weight:600}
.brand-stat-dot{width:9px;height:9px;border-radius:3px;flex:none}
.brand-stat-bar{height:4px;width:100%;max-width:130px;background:#eee;border-radius:99px;overflow:hidden}
.brand-stat-bar i{display:block;height:100%;border-radius:99px}

#notice{position:fixed;top:20px;right:22px;z-index:92;margin:0;max-width:min(380px,calc(100vw - 32px));padding:11px 16px;background:#18181b;color:#fff;border-radius:10px;box-shadow:0 14px 34px #00000033;font-size:12.5px;font-weight:500}
#notice.error{background:#991b1b;color:#fff}
@keyframes planPulse{0%{box-shadow:0 0 0 0 #2563eb66;border-color:#2563eb;background:#eff6ff}70%{box-shadow:0 0 0 6px #2563eb00;border-color:#2563eb;background:#f8fafc}100%{box-shadow:none}}
.plan-node.pulse-target{animation:planPulse 1.5s ease}
.editor label:has(>input[type=date]){grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px}
.editor label:has(>input[type=date])>input[type=date]{grid-column:1;min-width:0}
.editor label:has(>input[type=date])>.date-weekday-tag{grid-column:2}
.plan-side-node:has(>.date-weekday-tag){grid-template-columns:110px minmax(0,1fr) auto auto;align-items:center}
.date-weekday-tag{display:inline-flex;align-items:center;justify-content:center;height:30px;min-width:44px;padding:0 9px;box-sizing:border-box;border-radius:7px;background:#f4f4f5;border:1px solid #e4e4e7;font-size:12px;font-weight:600;line-height:1;color:#52525b;white-space:nowrap;flex:none}
.plan-side-node>.date-weekday-tag{height:28px;min-width:40px;padding:0 7px;font-size:11.5px}
.date-weekday-tag.is-weekend{color:#854d0e;background:#fef9c3;border-color:#fde047;font-weight:650}

@media(max-width:760px){
  .top-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
  .tabs{width:100%}
  .period{padding-left:0;border-left:0;width:100%}
  .period input[type=month]{width:100%;min-width:0;flex:1 1 auto}
  .filters{width:100%;justify-content:flex-start;margin-left:0}
  .overview-row .project-title{flex-wrap:wrap}
  .project-title-text{white-space:normal}
  .sheet-search{width:100%}
  .stats-line button{flex-direction:column;align-items:stretch}
  .kpi-sub{flex-direction:row-reverse;align-items:center;justify-content:space-between}
}
@media(max-width:520px){
  .plan-side-node:has(>.date-weekday-tag){grid-template-columns:minmax(0,1fr) auto auto;gap:6px}
  .plan-side-node:has(>.date-weekday-tag) .plan-side-heading{grid-column:1/3;grid-row:1}
  .plan-side-node:has(>.date-weekday-tag) button[data-remove-side]{grid-column:3;grid-row:1;justify-self:end}
  .plan-side-node:has(>.date-weekday-tag)>input[type=date]{grid-column:1/3;grid-row:2}
  .plan-side-node:has(>.date-weekday-tag)>.date-weekday-tag{grid-column:3;grid-row:2}
}

.import-mode-tabs{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:14px}
.import-mode-tabs button{width:100%;justify-content:center;padding:6px 10px;font-size:12.5px}
.gsheet-url-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:-6px}
.gsheet-url-head label{font-size:12px;font-weight:600;color:var(--ink)}
.link-btn{border:0;background:transparent;padding:2px 4px;color:#2563eb;font-size:12px;font-weight:600;cursor:pointer}
.link-btn:hover{text-decoration:underline;background:transparent}
.inline-check{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px!important;font-size:12.5px;color:#3f3f46;cursor:pointer}
.inline-check input[type=checkbox]{width:15px;height:15px;margin:0;flex:none}
.import-action-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:2px}
.import-preview-card{border:1px solid #e4e4e7;border-radius:10px;padding:12px;background:#fafafa;display:grid;gap:10px}
.import-preview-head{font-size:12.5px;font-weight:700;color:#18181b}
.import-stat-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.import-stat-chip{display:flex;align-items:center;justify-content:space-between;padding:5px 9px;border-radius:7px;background:#fff;border:1px solid #e4e4e7;font-size:12px;color:#52525b}
.import-stat-chip.has-delta{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}
.import-up-to-date{font-size:12.5px;font-weight:600;color:#15803d;padding:4px 2px}
.import-diff-list{margin-top:8px;padding-left:0;list-style:none;display:grid;gap:6px;max-height:240px;overflow-y:auto;font-size:12px}
.import-diff-list li{padding:6px 8px;border-radius:6px;background:#fff;border:1px solid #ececef;line-height:1.45}
.diff-tag{display:inline-block;padding:1px 6px;margin-right:6px;border-radius:4px;font-size:11px;font-weight:700;background:#f1f5f9;color:#334155}
.diff-tag[data-act^="create"]{background:#dcfce7;color:#166534}
.diff-tag[data-act^="update"]{background:#dbeafe;color:#1e40af}

/* --- Brand System: Strict 8px/14px/20px Grid, 1:1 Square Logo & Unified Typography --- */
#drawer.drawer-wide{width:min(580px,100%);max-width:580px}
.rail-title-btns #add-brand-rail{font-weight:600;color:var(--ink)}
.rail-title-btns #add-brand-rail:hover{text-decoration:underline;background:transparent}
.brand-btn-main{display:inline-flex;align-items:center;gap:7px;min-width:0;overflow:hidden}
.brand-btn-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rail-brand-logo{width:18px;height:18px;aspect-ratio:1/1;object-fit:cover;border-radius:4px;background:#fff;border:1px solid var(--line);flex:none}
.brand-spec-dot{width:5px;height:5px;border-radius:999px;background:#3b8478;flex:none}
.btn-sm{min-height:32px;padding:6px 12px!important;font-size:12px!important;font-weight:500;line-height:1.35!important;border-radius:7px!important}
.text-action-btn{border:0!important;background:transparent!important;padding:2px 0!important;font-size:12px!important;font-weight:500;color:var(--muted)!important}
.text-action-btn:hover{color:var(--ink)!important;text-decoration:underline;background:transparent!important}

/* Brand Workspace Strip & Expanded Grid */
.brand-profile-banner{flex:none;margin-bottom:14px;border:1px solid var(--line);border-left:3px solid var(--brand-accent,#315fcd);border-radius:9px;background:#fff;overflow:hidden}
.brand-banner-top{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 16px;flex-wrap:wrap;background:#fafafa;min-height:52px}
.brand-banner-identity{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap}
.brand-logo-sq{width:32px;height:32px;aspect-ratio:1/1;border-radius:7px;border:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:none}
.brand-logo-sq img{width:100%;height:100%;object-fit:cover}
.brand-logo-sq.brand-monogram{font-size:11px;font-weight:700;letter-spacing:.03em;border:0}
.brand-strip-titles{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.brand-strip-name{font-size:14px;font-weight:700;line-height:1.35;color:var(--ink)}
.brand-code-tag{font-size:11px;font-weight:600;line-height:1.4;padding:2px 7px;border-radius:5px;background:#ededed;color:var(--ink)}
.brand-strip-meta{font-size:12px;line-height:1.4;color:var(--muted)}
.brand-banner-actions{display:flex;align-items:center;gap:8px;flex:none}
.brand-banner-body{padding:16px;border-top:1px solid var(--line);background:#fff}

/* PDF Chips (Unified Neutral Palette) */
.brand-pdf-chips{display:inline-flex;flex-wrap:wrap;gap:6px}
.brand-pdf-chip{display:inline-flex;align-items:stretch;border:1px solid var(--line);border-radius:7px;background:#fff;overflow:hidden;height:30px}
.brand-pdf-preview-btn{display:inline-flex;align-items:center;gap:6px;border:0!important;background:transparent!important;padding:0 10px!important;font-size:12px!important;color:var(--ink)!important;cursor:pointer}
.brand-pdf-preview-btn:hover{background:#f5f5f5!important}
.pdf-badge{font-size:10px;font-weight:700;padding:1px 5px;border-radius:4px;background:var(--ink);color:#fff;letter-spacing:.02em;line-height:1.4}
.pdf-chip-name{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.brand-pdf-dl{display:inline-flex;align-items:center;justify-content:center;padding:0 8px;border-left:1px solid var(--line);font-size:12px;font-weight:600;color:var(--muted);text-decoration:none;background:#fafafa}
.brand-pdf-dl:hover{color:var(--ink);background:#efefef}

/* Expanded 2-Column Spec Sheet */
.brand-specs-empty{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;line-height:1.5;color:var(--muted)}
.brand-specs-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:20px;align-items:start}
.brand-specs-grid.single-col{grid-template-columns:1fr}
.brand-specs-col{display:grid;gap:10px;min-width:0}
.spec-col-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
.spec-col-head strong{font-size:13px;font-weight:700;line-height:1.4;color:var(--ink)}
.spec-col-head span{font-size:12px;line-height:1.5;color:var(--muted)}
.spec-table-wrap{border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
.compact-spec-table{width:100%;border-collapse:collapse;font-size:12.5px}
.compact-spec-table th,.compact-spec-table td{padding:8px 11px;border-bottom:1px solid #efefef;text-align:left;line-height:1.5}
.compact-spec-table th{background:#fafafa;color:var(--muted);font-weight:600;font-size:12px;border-bottom:1px solid var(--line)}
.compact-spec-table tr:last-child td{border-bottom:0}
.fmt-col-title{font-weight:600;color:var(--ink)}

.naming-pattern-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:#fafafa;min-width:0}
.naming-code-text{font:inherit;font-size:12.5px;font-weight:600;line-height:1.5;letter-spacing:.01em;color:var(--ink);min-width:0;overflow-wrap:anywhere;white-space:normal}
.copy-pill-btn{flex:none;padding:4px 9px!important;font-size:11.5px!important;border-radius:6px!important;background:#fff!important;color:var(--ink)!important;border:1px solid var(--line)!important}
.copy-pill-btn:hover{background:#efefef!important}
.naming-examples-list{display:grid;gap:6px;min-width:0}
.naming-example-row{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-width:0;white-space:normal!important;text-align:left;padding:7px 12px!important;border-radius:8px!important;border:1px solid var(--line)!important;background:#fff!important;cursor:pointer}
.naming-example-row:hover{background:#fafafa!important;border-color:#ccc!important}
.naming-example-row .naming-code-text{font-weight:400;color:#333}
.naming-example-row em{font-style:normal;flex:none;font-size:12px;color:var(--muted);font-weight:500}

.brand-specs-drawer{display:grid;gap:16px}
.brand-specs-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:14px;border-bottom:1px solid var(--line);flex-wrap:wrap}

/* --- Brand Editor Drawer: Strict Asymmetric Grid (Left 138px == Right 114px 1:1 Logo + 24px Label = 138px) --- */
.brand-grid-form{display:grid;gap:20px}
.brand-grid-form label{display:grid;gap:6px;font-size:13px;font-weight:600;line-height:18px;color:var(--ink)}
.brand-grid-form label em{font-style:normal;color:#a52c22;font-weight:600}
.brand-grid-form input[type="text"],.brand-grid-form textarea{font:inherit;font-size:13px;line-height:1.55;padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink)}
.brand-grid-form input[type="text"]{height:38px}
.brand-grid-form textarea{padding:9px 11px}
.field-label{display:block;font-size:13px;font-weight:600;line-height:18px;color:var(--ink)}

.brand-sec{display:grid;gap:14px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.brand-sec-last{padding-bottom:4px;border-bottom:0}
.brand-sec-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand-sec-head h3{margin:0;font-size:14px;font-weight:700;line-height:1.35;color:var(--ink)}
.brand-sec-actions{display:inline-flex;align-items:center;gap:14px}

/* Top Identity Grid: 2 Columns, Pixel-Aligned Top & Bottom */
.brand-identity-grid{display:grid;grid-template-columns:minmax(0,1fr) 114px;gap:16px;align-items:start}
.brand-identity-fields{display:grid;gap:14px;min-width:0}
.brand-name-pair{display:grid;grid-template-columns:minmax(0,0.85fr) minmax(0,1.15fr);gap:12px}

/* Color Row: Exact 38px Height, Single Row */
.brand-color-field{display:grid;gap:6px;min-width:0}
.brand-color-control-row{display:flex;align-items:center;justify-content:space-between;gap:10px;height:38px}
.brand-color-pill{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 10px 0 5px;border:1px solid var(--line);border-radius:8px;background:#fff;flex:none}
.brand-color-pill:focus-within{outline:2px solid #454545;outline-offset:1px}
.brand-color-pill input[type="color"]{width:26px!important;min-width:26px!important;height:26px!important;flex:0 0 26px!important;padding:0!important;border:0!important;border-radius:5px!important;background:transparent!important}
.brand-color-pill .brand-hex-text{width:68px!important;height:30px!important;padding:0!important;border:0!important;outline:none!important;font:inherit;font-size:13px!important;font-weight:600;letter-spacing:.02em;text-transform:uppercase;background:transparent!important}
.brand-swatch-strip{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.color-preset.sq{width:20px;height:20px;border-radius:5px;flex:none}

/* Strict 1:1 Square Logo Box (114px x 114px) */
.brand-logo-col{display:grid;gap:6px;width:114px}
.brand-logo-sq-panel{position:relative;width:114px;height:114px;aspect-ratio:1/1;overflow:hidden;border:1px solid var(--line);border-radius:9px;background:#fafafa;text-align:center}
.brand-logo-preview{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#fff}
.brand-logo-sq-panel.has-image .brand-logo-action{position:absolute;right:0;bottom:0;left:0;border:0;border-radius:0;background:#0009;color:#fff;opacity:0;transition:opacity .15s}
.brand-logo-sq-panel .remove-brand-logo{opacity:0;transition:opacity .15s}
.brand-logo-sq-panel.has-image:hover .brand-logo-action{opacity:1}
.brand-logo-sq-panel:hover .remove-brand-logo{opacity:1}

/* Unified Hairline Format Table in Editor */
.fmt-table-box{border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff}
.fmt-table-head,.fmt-table-row{display:grid;grid-template-columns:1.25fr .75fr 1fr 1.15fr 34px;align-items:center}
.fmt-table-head{background:#fafafa;border-bottom:1px solid var(--line);font-size:12px;font-weight:600;color:var(--muted)}
.fmt-table-head span{padding:8px 10px;line-height:1.4}
.fmt-table-row{border-bottom:1px solid #efefef}
.fmt-table-row:last-child{border-bottom:0}
.fmt-table-row input[type="text"]{height:38px;padding:8px 10px;border:0;border-right:1px solid #f0f0f0;border-radius:0;font-size:12.5px;background:transparent}
.fmt-table-row input[type="text"]:focus{background:#fafafa;outline:none;box-shadow:inset 0 -2px 0 var(--ink)}
.fmt-row-del{display:inline-flex;align-items:center;justify-content:center;width:34px;height:38px;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--muted)!important;font-size:12px!important}
.fmt-row-del:hover{color:#a52c22!important;background:#fff5f5!important}

/* PDF List & Empty State */
.empty-subbox{padding:11px 12px;border:1px dashed var(--line);border-radius:8px;background:#fafafa;font-size:12.5px;line-height:1.5;color:var(--muted)}
.pdf-upload-btn{display:inline-flex;align-items:center;padding:5px 11px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);font-size:12px;font-weight:500;cursor:pointer}
.pdf-upload-btn:hover{background:#f3f3f3}
.brand-pdfs-grid{display:grid;gap:8px}
.pdf-file-row{display:grid;grid-template-columns:minmax(0,1fr) 34px;align-items:center;border:1px solid var(--line);border-radius:8px;background:#fafafa;overflow:hidden}
.pdf-file-main{display:flex;align-items:center;gap:8px;height:38px;padding:0 12px!important;border:0!important;border-right:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;text-align:left;min-width:0}
.pdf-file-main:hover{background:#f0f0f0!important}
.pdf-file-name{font-size:12.5px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pdf-file-main small{font-size:11.5px;color:var(--muted);flex:none}

.brand-form-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:2px}

.pdf-dialog{width:min(1040px,95vw);height:min(88vh,920px);max-width:1040px;max-height:92vh;padding:0;border:1px solid var(--line);border-radius:12px;box-shadow:0 20px 50px rgba(0,0,0,.22);overflow:hidden}
.pdf-dialog[open]{display:flex;flex-direction:column}
.pdf-dialog::backdrop{background:#102c2860}
.pdf-dialog-head{padding:12px 18px;border-bottom:1px solid var(--line);background:#fff;flex:none}
.pdf-dialog-body{flex:1;min-height:0;background:#333}
.pdf-dialog-body iframe{width:100%;height:100%;border:0;display:block;background:#fff}
.btn-link{display:inline-flex;align-items:center;padding:6px 12px;border-radius:7px;border:1px solid var(--line);background:#fff;color:var(--ink);font-size:12px;font-weight:500;text-decoration:none}
.btn-link.primary-link{background:var(--ink);border-color:var(--ink);color:#fff}

@media(max-width:820px){
  .brand-specs-grid{grid-template-columns:1fr}
}
@media(max-width:520px){
  .brand-identity-grid{grid-template-columns:1fr}
  .brand-logo-col{width:104px}
  .brand-logo-sq-panel{width:104px;height:104px}
  .brand-swatch-strip{display:none}
  .fmt-table-head{display:none}
  .fmt-table-row{grid-template-columns:1fr 1fr;border-bottom:1px solid var(--line)}
}




