#scheduleGrid {
  --sg-name-width:170px;
  --sg-panel:var(--surface); --sg-text:var(--text); --sg-muted:var(--muted);
  --sg-line:var(--line); --sg-accent:var(--accent); --sg-soft:var(--surface-muted);
  min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:8px;
  background:var(--surface); color:var(--text); font-size:14px;
}
#scheduleGrid button, #scheduleGrid input { font:inherit; }
#scheduleGrid button { cursor:pointer; }
#scheduleGrid button:disabled { cursor:default; opacity:.6; }
#scheduleGrid .sg-controls { padding:14px 14px 10px; display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
#scheduleGrid .sg-mode { display:flex; background:var(--sg-panel); border:1px solid var(--sg-line); border-radius:8px; padding:3px; }
#scheduleGrid .sg-mode button { padding:8px 12px; min-height:40px; color:var(--sg-muted); background:transparent; border:0; border-radius:5px; }
#scheduleGrid .sg-mode button[aria-pressed="true"] { background:var(--sg-soft); color:var(--sg-accent); font-weight:650; }
#scheduleGrid .sg-year { color:var(--sg-muted); font-size:12px; padding:8px 0; }
#scheduleGrid .sg-search { box-sizing:border-box; min-height:44px; width:100%; min-width:0; padding:10px 12px; color:var(--sg-text); border:1px solid var(--sg-line); background:var(--sg-panel); border-radius:8px; font-size:16px; }
#scheduleGrid [hidden] { display:none !important; }
#scheduleGrid .sg-toolbar { padding:0 14px 10px; display:flex; justify-content:space-between; align-items:center; gap:12px; color:var(--sg-muted); font-size:12px; }
#scheduleGrid .sg-today-button { min-height:40px; padding:5px 10px; background:var(--sg-panel); color:var(--sg-accent); border:1px solid var(--sg-line); border-radius:7px; }
#scheduleGrid .sg-scroll { overflow:auto; max-height:490px; border:1px solid #565d67; background:#ffffff; overscroll-behavior:contain; scrollbar-width:auto; scrollbar-color:#747c88 #e3e7ed; }
#scheduleGrid .sg-scroll::-webkit-scrollbar { width:12px; height:12px; }
#scheduleGrid .sg-scroll::-webkit-scrollbar-track, #scheduleGrid .sg-scroll::-webkit-scrollbar-corner { background:#e3e7ed; }
#scheduleGrid .sg-scroll::-webkit-scrollbar-thumb { background:#747c88; border:2px solid #e3e7ed; border-radius:6px; }
#scheduleGrid table { border-spacing:0; border-collapse:separate; table-layout:fixed; margin:0; }
#scheduleGrid .sg-day-column { width:46px; }
#scheduleGrid .sg-name-column { width:var(--sg-name-width); }
#scheduleGrid th, #scheduleGrid td { box-sizing:border-box; padding:0; border:0; border-right:1px solid #626974; border-bottom:1px solid #626974; min-width:46px; width:46px; max-width:46px; text-align:center; }
#scheduleGrid tbody td { height:46px; }
#scheduleGrid thead th { position:sticky; z-index:3; background:#ffffff; color:#101018; font-size:12px; font-weight:500; }
#scheduleGrid thead th span { display:block; font-weight:750; font-size:14px; }
#scheduleGrid .sg-days-row th { top:30px; height:46px; }
#scheduleGrid .sg-month-row th { top:0; height:30px; }
#scheduleGrid th.sg-today { box-shadow:inset 0 3px 0 var(--sg-accent); }
#scheduleGrid .sg-name { position:sticky; left:0; z-index:2; min-width:var(--sg-name-width); max-width:var(--sg-name-width); width:var(--sg-name-width); background:#ffffff; color:#101018; text-align:left; padding:0 10px; height:46px; border-right:2px solid #303640; font-size:12px; font-weight:600; }
#scheduleGrid .sg-name div { width:calc(var(--sg-name-width) - 22px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#scheduleGrid thead .sg-corner { top:0; z-index:6; height:76px; }
#scheduleGrid .sg-month-band { min-width:0; max-width:none; width:auto; background:#ffffff; color:#101018; border-right:2px solid #303640; text-align:left; }
#scheduleGrid .sg-month-band .sg-month-label { display:block; position:sticky; left:calc(var(--sg-name-width) + 10px); width:max-content; max-width:100%; margin-left:10px; font-size:13px; font-weight:700; }
#scheduleGrid .sg-cell { box-sizing:border-box; position:relative; display:block; width:45px; height:45px; min-height:45px; border:0; border-radius:0; padding:0; font-size:13px; font-weight:650; }
#scheduleGrid .sg-cell[aria-pressed="true"], #scheduleGrid .sg-cell:focus-visible { outline:3px solid var(--sg-accent); outline-offset:-3px; z-index:1; }
#scheduleGrid .sg-cell.sg-comment::after { content:""; position:absolute; top:2px; right:2px; width:0; height:0; border-top:6px solid currentColor; border-left:6px solid transparent; opacity:.7; }
#scheduleGrid .sg-month-start { border-left:2px solid #303640; }
#scheduleGrid .sg-month-start .sg-cell { width:43px; }
#scheduleGrid .sg-empty { padding:20px; margin:0; font-size:13px; color:#5a6572; }
#scheduleGrid .sg-detail { padding:14px 16px; background:var(--sg-panel); border-bottom:1px solid var(--sg-line); }
#scheduleGrid .sg-detail-name { font-weight:700; font-size:14px; }
#scheduleGrid .sg-detail-date { color:var(--sg-muted); font-size:12px; margin-top:2px; }
#scheduleGrid .sg-detail-status { margin-top:9px; font-size:13px; font-weight:650; }
#scheduleGrid .sg-detail-comment { margin-top:8px; font-size:12px; color:var(--sg-muted); white-space:pre-wrap; overflow-wrap:anywhere; }
#scheduleGrid .sg-legend { padding:12px 16px 16px; }
#scheduleGrid .sg-legend summary { min-height:32px; color:var(--sg-muted); font-size:12px; cursor:pointer; }
#scheduleGrid .sg-object-legend { display:flex; gap:10px 16px; flex-wrap:wrap; font-size:12px; padding:8px 0; }
#scheduleGrid .sg-swatch { display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:5px; vertical-align:-1px; }
#scheduleGrid .sg-marker-legend { color:var(--sg-muted); font-size:12px; line-height:1.7; }
@media(max-width:420px) {
  #scheduleGrid { --sg-name-width:136px; }
  #scheduleGrid .sg-controls { gap:8px; }
  #scheduleGrid .sg-mode button { padding:8px; font-size:12px; }
}

#scheduleGrid .sg-jump { padding:12px 14px; background:var(--sg-soft); border-bottom:1px solid var(--sg-line); font-size:13px; overflow-wrap:anywhere; }
#scheduleGrid .sg-jump strong,#scheduleGrid .sg-jump-change span { display:block; }
#scheduleGrid .sg-back { display:block; min-height:42px; padding:4px 0; background:none; border:0; color:var(--sg-accent); text-align:left; }
#scheduleGrid .sg-jump-change { margin-top:8px; font-size:12px; white-space:pre-wrap; }
#scheduleGrid .sg-jump-status { margin:6px 0 0; color:var(--sg-muted); }
#scheduleGrid .sg-jump-range { box-shadow:inset 0 2px var(--sg-accent),inset 0 -2px var(--sg-accent); }
#scheduleGrid .sg-jump-person { box-shadow:inset 3px 0 var(--sg-accent); }
#scheduleGrid .sg-jump-day { outline:2px solid var(--sg-accent); outline-offset:-2px; }
