/* KWONMO — agent 화면. 사무실을 현황판으로 쓰고 이력은 한 단으로 읽는다. */
/* 글자는 공용 본문보다 20% 작게(11-01 대표님 C안). 안쪽 em 크기도 이 값을 따른다. */
.agt-stage { font-size:80%; display:grid; grid-template-columns:minmax(15vw, var(--agt-left-size, 62fr)) .75rem minmax(15vw, var(--agt-right-size, 38fr)); gap:0; padding:var(--sp-sm); align-items:start; }
[data-layout="plain"] .stage.agt-stage { max-width:none; padding:var(--sp-sm); }
.agt-stage [hidden] { display:none !important; }
.agt-left { display:grid; grid-template-rows:minmax(20rem, 1fr); min-width:0; min-height:calc(100dvh - var(--header-total) - var(--sp-sm) - var(--sp-sm)); }
.agt-panel { background:var(--surface); border:var(--hairline) solid var(--line); padding:var(--sp-sm); min-width:0; }
.agt-divider { align-self:stretch; position:relative; cursor:col-resize; touch-action:none; }
.agt-divider::before { content:''; position:absolute; inset:0 calc(50% - var(--hairline)); background:var(--line); }
.agt-divider:hover::before, .agt-divider:focus-visible::before, .is-resizing .agt-divider::before { background:var(--accent); }
.agt-divider:focus-visible { outline:var(--focus-ring) solid var(--accent); outline-offset:calc(-1 * var(--focus-ring)); }
.agt-stage.is-resizing, .agt-stage.is-resizing * { cursor:col-resize; user-select:none; }
.agt-panel h1, .agt-panel h2, .agt-panel h3 { margin:0 0 var(--sp-sm); font-size:1.1em; }
.agt-stage button, .agt-stage select, .agt-stage input { font:inherit; color:inherit; background:var(--surface); border:var(--hairline) solid var(--line); border-radius:var(--radius-sm); padding:var(--sp-sm); }
.agt-stage button { cursor:pointer; }
.agt-stage button:hover, .agt-stage button[aria-selected="true"], .agt-stage .is-current { background:var(--surface-2); }
.agt-stage button:disabled { opacity:.55; cursor:default; }
.agt-stage button:focus-visible, .agt-stage a:focus-visible, .agt-stage select:focus-visible, .agt-stage input:focus-visible { outline:var(--focus-ring) solid var(--accent); outline-offset:var(--focus-ring); }
.agt-icon { width:1.1em; height:1.1em; flex:none; vertical-align:-.15em; fill:none; stroke:currentColor; stroke-width:2; }
.agt-stage-icon, .agt-wait-count { display:inline-flex; align-items:center; gap:var(--sp-xs); flex:none; color:var(--accent); }
.agt-office { display:flex; flex-direction:column; min-height:20rem; padding:0; }
.agt-office #agentOfficeFull { position:absolute; top:calc(var(--sp-md) + var(--safe-t)); right:var(--sp-md); z-index:30; display:flex; align-items:center; gap:var(--sp-xs); }
@media (max-width:48em) { .agt-office #agentOfficeFull { padding:var(--sp-sm); } .agt-full-label { display:none; } }
.agt-office .agt-office-error { position:absolute; top:calc(3rem + var(--safe-t)); left:var(--sp-md); right:var(--sp-md); z-index:31; margin:0; padding:var(--sp-sm); background:var(--surface); overflow-wrap:anywhere; }
.agt-office .of-root { flex:1; height:auto; min-height:18rem; }
.agt-stage.is-office-full { position:fixed; inset:0; z-index:20; display:block; width:100%; max-width:none; background:var(--bg); }
[data-layout="plain"] .stage.agt-stage.is-office-full { padding:0; }
.agt-stage.is-office-full .agt-left { height:100%; min-height:0; grid-template-rows:minmax(0, 1fr); }
.agt-stage.is-office-full .agt-left > .agt-panel:not(.agt-office), .agt-stage.is-office-full .agt-right { display:none; }
.agt-stage.is-office-full .agt-office, .agt-stage.is-office-full .of-root { min-height:0; }
.agt-stage.is-office-full .agt-office { border:0; }
.agt-stage.is-office-full .agt-divider { display:none; }
:root.agt-office-full { overflow:hidden; }
:root.agt-office-full .masthead { position:fixed; top:0; left:0; right:0; transform:translateY(-100%); transition:transform .2s; }
:root.agt-office-full .masthead.is-peek, :root.agt-office-full .masthead:focus-within { transform:none; }
/* 가림 막대 — 글자색으로 칠해 어두운 테마에서도 '지운 글' 로 읽힌다(에뮬레이터 변수를 빌리지 않는다) */
.agt-risky, .agt-risky:hover { color:var(--text); background:var(--text); border-radius:.1em; }
.agt-bar, .agt-tabs, .agt-filter, .agt-doc-bar, .agt-sign-actions { display:flex; align-items:center; gap:var(--sp-sm); flex-wrap:wrap; }
.agt-bar { justify-content:space-between; margin-bottom:var(--sp-md); }
.agt-filter { margin-bottom:var(--sp-md); }
.agt-filter label { margin-left:auto; }
.agt-error { color:var(--accent); white-space:pre-wrap; margin:var(--sp-sm) 0; }
.agt-work-list { max-height:20rem; overflow:auto; border-block:var(--hairline) solid var(--line); margin-bottom:var(--sp-md); }
.agt-work-row { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; gap:var(--sp-sm); padding:var(--sp-sm) 0; border-bottom:var(--hairline) solid var(--line); }
.agt-work-select { display:flex; align-items:center; gap:var(--sp-sm); text-align:left; width:100%; min-width:0; }
.agt-work-label { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.agt-history-body, .agt-detail-body { display:grid; grid-template-columns:minmax(0, 1fr); gap:var(--sp-md); }
.agt-resources, .agt-toc { border-bottom:var(--hairline) solid var(--line); padding-bottom:var(--sp-sm); max-height:16rem; overflow:auto; }
.agt-resources button, .agt-toc a { display:block; width:100%; text-align:left; margin-bottom:var(--sp-xs); overflow-wrap:anywhere; }
.agt-resources p, .agt-toc a { padding:var(--sp-xs); }
.agt-toc a { color:inherit; font-size:.9em; text-decoration:none; }
.agt-toc a:hover { color:var(--accent); }
.agt-toc section { margin-bottom:var(--sp-md); }
.agt-viewer, .agt-cards { min-width:0; overflow-wrap:anywhere; }
.agt-card, .agt-sign { border:var(--hairline) solid var(--line); padding:var(--sp-md); margin-bottom:var(--sp-md); scroll-margin-top:calc(var(--header-total) + var(--sp-lg)); }
.agt-card header { font-size:.85em; margin-bottom:var(--sp-sm); }
.agt-plain { white-space:pre-wrap; }
.agt-doc-bar { justify-content:space-between; margin-bottom:var(--sp-md); }
.agt-doc-bar label { margin-left:auto; }
.agt-md { line-height:1.7; }
.agt-md h1, .agt-md h2, .agt-md h3 { margin-top:var(--sp-lg); }
.agt-md pre { overflow:auto; background:var(--surface-2); padding:var(--sp-md); }
.agt-md img { max-width:100%; }
.agt-md table { display:block; max-width:100%; overflow:auto; border-collapse:collapse; }
.agt-md th, .agt-md td { border:var(--hairline) solid var(--line); padding:var(--sp-sm); }
.agt-md blockquote { border-left:var(--stroke-2) solid var(--accent); margin-left:0; padding-left:var(--sp-md); }
.agt-inline { margin-top:var(--sp-md); }
.agt-talk-date { margin:var(--sp-md) 0; text-align:center; font-size:.85em; }
.agt-message { width:fit-content; max-width:75%; min-width:0; margin:var(--sp-md) auto 0 0; }
.agt-message.is-own { margin-left:auto; margin-right:0; }
.agt-message.is-grouped { margin-top:var(--sp-xs); }
.agt-message-name { font-size:.85em; margin-bottom:var(--sp-xs); }
.agt-message-bubble { padding:var(--sp-sm); border:var(--hairline) solid var(--line); border-radius:var(--radius-sm); background:var(--surface-2); overflow-wrap:anywhere; }
.agt-message.is-own .agt-message-bubble { background:var(--surface); border-color:var(--accent); }
.agt-message-time { display:block; margin-top:var(--sp-xs); font-size:.8em; font-variant-numeric:tabular-nums; }
.agt-message.is-own .agt-message-time, .agt-message.is-own .agt-message-name { text-align:right; }
.agt-sign-actions { margin-top:var(--sp-sm); }
.agt-sign-actions input { flex:1; min-width:8rem; }
@media (max-width:70rem) {
  .agt-stage { grid-template-columns:minmax(0, 1fr); grid-template-rows:minmax(30vh, var(--agt-office-height, 40vh)) .75rem minmax(30vh, 1fr); height:calc(100dvh - var(--header-total)); min-height:calc(60vh + .75rem + var(--sp-sm) + var(--sp-sm)); gap:0; }
  .agt-left { height:100%; min-height:30vh; grid-template-rows:minmax(0, 1fr); }
  .agt-right { height:100%; min-height:30vh; overflow:auto; }
  .agt-office, .agt-office .of-root { flex:1; height:auto; min-height:0; }
  .agt-divider { cursor:row-resize; height:.75rem; }
  .agt-divider::before { inset:calc(50% - var(--hairline)) 0; }
  .agt-stage.is-resizing, .agt-stage.is-resizing * { cursor:row-resize; }
  .agt-stage.is-office-full { height:auto; min-height:0; }
}
@media (max-width:42rem) { .agt-history-body, .agt-detail-body { grid-template-columns:1fr; } .agt-resources, .agt-toc { border-right:0; border-bottom:var(--hairline) solid var(--line); padding-right:0; padding-bottom:var(--sp-sm); max-height:16rem; } }
