/* ══ 40-agents.css — 「에이전트」 앱(#5827 · web/v2/agents.ts) ══
   3판 «잉크와 민트»(39-ds3.css)의 토큰만 쓴다 — 회색 종이 위 흰 판, 실선 대신 얕은 그림자, 주 행동만 잉크, 민트는 살아 있는 것, 색은 상태 점과 아이콘 타일에만.
   판은 정해진 칸에만 놓는다: 너비 1/3 · 2/3 · 전체, 높이 228 · 352 · 476(104 줄 + 20 간격). 넘치는 내용은 판 안에서 스크롤한다.
   글자는 무게 셋(500 · 600 · 700), 크기는 넷(12.5 · 14 · 15 · 숫자 28)만 쓴다 — 작은 글자를 여러 단으로 쌓지 않는다. */
.ag-page { flex: none; min-height: 100%; background: var(--d3-canvas); color: var(--d3-ink); font-size: 14px; line-height: 1.5; }
.ag-wrap { max-width: 1180px; margin: 0 auto; padding: 32px 40px 72px; }
.ag-page h1, .ag-page h2, .ag-page h3, .ag-page h4, .ag-page p { margin: 0; }
.ag-page small { font-size: 12.5px; font-weight: 500; color: var(--d3-ink-3); }

/* 머리 */
.ag-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.ag-top > div:first-of-type { flex: 1; min-width: 0; }
.ag-top h1 { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.ag-top p { margin-top: 2px; font-size: 14px; color: var(--d3-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-back { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--d3-r2); color: var(--d3-ink-3); }
.ag-back:hover { background: var(--d3-fill); color: var(--d3-ink); }
.ag-back > svg, .ag-x > svg { width: 18px; height: 18px; }
.ag-sponsor { display: flex; align-items: center; gap: 8px; flex: none; }
.ag-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--d3-r2); background: var(--d3-surface); box-shadow: var(--d3-shadow-1);
  font: inherit; font-size: 14px; font-weight: 600; color: var(--d3-ink); text-decoration: none; cursor: pointer; }
.ag-btn:hover { box-shadow: var(--d3-shadow-2); }
.ag-btn:disabled { opacity: .5; cursor: default; }
.ag-btn:focus-visible, .ag-tabs > button:focus-visible, .ag-li:focus-visible, .ag-row:focus-visible, .ag-card:focus-visible, .ag-back:focus-visible, .ag-x:focus-visible, .ag-seg > button:focus-visible { outline: 2px solid var(--d3-blue); outline-offset: 2px; }
.ag-btn > svg { width: 16px; height: 16px; }
.ag-btn.primary { background: var(--d3-primary); color: var(--d3-on-primary); box-shadow: none; }
.ag-btn.primary:hover { background: var(--d3-primary-hover); }
.ag-btn > b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--d3-amber); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 20px; text-align: center; }

/* 작은 부품 */
.ag-ava { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--d3-primary); color: var(--d3-on-primary); font-size: 16px; font-weight: 700; }
.ag-ava.big { width: 56px; height: 56px; border-radius: 16px; background: var(--d3-fill); color: var(--d3-ink-3); }
#v2-root .ag-ava.big > svg { width: 26px; height: 26px; }   /* 셸의 선 아이콘 기본 크기(#v2-root .v2-ic 16px)보다 앞서야 한다 */
.ag-face { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; font-size: 11px; font-weight: 700; }
.ag-face img { width: 100%; height: 100%; object-fit: cover; }
.ag-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--d3-line-2); }
.ag-dot.live { background: var(--d3-mint); }
.ag-dot.watch { background: var(--d3-amber); }
.ag-dot.bad { background: var(--d3-red); }
.ag-stage { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: 0; color: var(--d3-ink-3); }
.ag-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--d3-fill); font-size: 12.5px; font-weight: 600; color: var(--d3-ink-2); white-space: nowrap; }
.ag-chip.amber { background: var(--d3-amber-tint); color: var(--d3-amber-ink); }
.ag-empty { padding: 18px 2px; font-size: 14px; color: var(--d3-ink-4); }
.ag-mute { font-size: 14px; color: var(--d3-ink-3); }
.ag-blank { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 96px 24px; text-align: center; }
.ag-blank h2 { font-size: 18px; font-weight: 700; }
.ag-blank p { max-width: 420px; color: var(--d3-ink-3); }

/* 목록 */
.ag-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.ag-card { display: flex; flex-direction: column; gap: 14px; min-height: 252px; padding: 20px 22px 16px; border-radius: var(--d3-r5); background: var(--d3-surface); box-shadow: var(--d3-shadow-1);
  color: inherit; text-decoration: none; transition: box-shadow .18s; }
.ag-card:hover { box-shadow: var(--d3-shadow-2); }
.ag-card-h { display: flex; align-items: center; gap: 12px; }
.ag-card-n { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ag-card-n > strong { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-card-g { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 42px; overflow: hidden; font-size: 14px; font-weight: 500; color: var(--d3-ink-2); }
.ag-card-m { display: grid; grid-template-columns: 1fr 120px; grid-template-rows: auto auto; column-gap: 14px; align-items: end; margin-top: auto; }
.ag-card-m.none { display: block; color: var(--d3-ink-4); }
.ag-card-v > b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ag-card-v > span { font-size: 12.5px; font-weight: 600; color: var(--d3-ink-3); }
.ag-card-m > .ag-spark { grid-row: 1 / span 2; grid-column: 2; }
.ag-card-t { font-size: 12.5px; font-weight: 500; color: var(--d3-ink-3); font-variant-numeric: tabular-nums; }
.ag-card-f { display: flex; align-items: center; gap: 14px; min-width: 0; padding-top: 12px; border-top: 1px solid var(--d3-line); font-size: 12.5px; font-weight: 600; color: var(--d3-ink-3); }
.ag-card-f > span { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.ag-card-f > .wait { color: var(--d3-amber-ink); }
.ag-card-f > .bad { color: var(--d3-red-ink); }
.ag-card-f > .last { flex: 1; min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; text-align: right; }

/* 추이선 */
.ag-spark { display: block; width: 120px; height: 36px; overflow: visible; }
.ag-spark.big { width: 100%; height: 150px; }
.ag-spark path.line { fill: none; stroke: var(--d3-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ag-spark line { stroke-width: 1; vector-effect: non-scaling-stroke; }
.ag-spark line.goal { stroke: var(--d3-mint); stroke-dasharray: 3 3; }
.ag-spark line.limit { stroke: var(--d3-red); stroke-dasharray: 3 3; }
.ag-spark line.base { stroke: var(--d3-line-2); }
.ag-spark line.cut { stroke: var(--d3-ink-4); stroke-dasharray: 2 3; }
.ag-spark circle.pt { fill: var(--d3-surface); stroke: var(--d3-ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ag-spark circle.last { fill: var(--d3-mint); stroke: var(--d3-surface); stroke-width: 2; vector-effect: non-scaling-stroke; }

/* «지금» 띠 — 39-ds3.css 의 판을 그대로 쓰고 칸 수만 넷으로 */
.ag-now { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.ag-ring { flex: none; width: 40px; height: 40px; }

/* 탭 */
.ag-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.ag-tabs > button { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--d3-ink-3); cursor: pointer; }
.ag-tabs > button:hover { background: var(--d3-fill); color: var(--d3-ink); }
.ag-tabs > button.on { background: var(--d3-surface); box-shadow: var(--d3-shadow-1); color: var(--d3-ink); }

/* 판 — 정해진 칸 */
.ag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ag-tile { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px 20px 16px; border-radius: var(--d3-r5); background: var(--d3-surface); box-shadow: var(--d3-shadow-1); overflow: hidden; }
.ag-tile.w1 { grid-column: span 1; } .ag-tile.w2 { grid-column: span 2; } .ag-tile.w3 { grid-column: 1 / -1; }
.ag-tile.h1 { height: 228px; } .ag-tile.h2 { height: 352px; } .ag-tile.h3 { height: 476px; }
.ag-tile > .ag-list, .ag-tile > .ag-rows, .ag-tile > .ag-tl { flex: 1; min-height: 0; margin: 0 -8px; padding: 0 8px; overflow-y: auto; }
.ag-th { display: flex; align-items: center; gap: 10px; flex: none; height: 30px; }
.ag-th > h3 { flex: 1; font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.ag-th-r { font-size: 12.5px; font-weight: 600; color: var(--d3-ink-3); }
.ag-tic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--d3-fill); color: var(--d3-ink-2); }
.ag-tic > svg { width: 16px; height: 16px; }
.ag-tic.blue { background: var(--d3-blue-tint); color: var(--d3-blue-ink); }
.ag-tic.violet { background: var(--d3-violet-tint); color: var(--d3-violet-ink); }
.ag-tic.mint { background: var(--d3-mint-tint); color: var(--d3-mint-ink); }
.ag-tic.amber { background: var(--d3-amber-tint); color: var(--d3-amber-ink); }
.ag-tic.red { background: var(--d3-red-tint); color: var(--d3-red-ink); }

/* 줄 */
.ag-list { display: flex; flex-direction: column; }
.ag-list.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.ag-li { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-radius: var(--d3-r2); background: none; font: inherit; color: inherit; text-align: left; }
button.ag-li { cursor: pointer; }
button.ag-li:hover { background: var(--d3-sunken); }
.ag-li > .ag-dot { margin-top: 7px; }
.ag-li > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-li strong { font-size: 14px; font-weight: 600; color: var(--d3-ink); }
.ag-tile .ag-li strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ag-now .h3-turn-l { min-width: 0; margin: auto -8px 0; }
.ag-now .h3-nc { overflow: hidden; }
.ag-li small.good { color: var(--d3-mint-ink); } .ag-li small.bad { color: var(--d3-red-ink); }
.ag-rows { display: flex; flex-direction: column; }
.ag-row { display: grid; grid-template-columns: 8px minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 44px; align-items: center; gap: 14px; width: 100%; padding: 11px 8px; border: 0; border-radius: var(--d3-r2);
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ag-row:hover { background: var(--d3-sunken); }
.ag-row + .ag-row { box-shadow: 0 -1px 0 var(--d3-line); }
.ag-row:hover + .ag-row, .ag-row + .ag-row:hover { box-shadow: none; }
.ag-row > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 14px; font-weight: 500; color: var(--d3-ink-2); }
.ag-row > span > strong, .ag-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-row-t > strong { font-size: 14px; font-weight: 600; color: var(--d3-ink); }
.ag-row-o.good { color: var(--d3-mint-ink); } .ag-row-o.bad { color: var(--d3-red-ink); } .ag-row-o.wait { color: var(--d3-ink-3); }
.ag-row-d { align-items: flex-end; font-size: 12.5px !important; color: var(--d3-ink-4) !important; font-variant-numeric: tabular-nums; }

/* 목적 · 지표 */
.ag-goal { display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; }
.ag-goal > h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.35; }
.ag-goal > p { color: var(--d3-ink-2); }
.ag-goal b { font-weight: 600; color: var(--d3-ink-3); }
.ag-meas { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.ag-meas-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ag-meas-h > strong { font-size: 15px; font-weight: 700; }
.ag-meas-v > b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ag-meas-v > span { font-size: 12.5px; font-weight: 600; color: var(--d3-ink-3); font-variant-numeric: tabular-nums; }
.ag-meas-v > span.bad { color: var(--d3-red-ink); }
.ag-meas-v > span.warn { color: var(--d3-amber-ink); }
.ag-meas > .ag-spark { width: 100%; height: 56px; margin-top: auto; }
.ag-meas.big > .ag-spark { height: 150px; margin: 8px 0 auto; }
.ag-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; font-weight: 500; color: var(--d3-ink-3); }
.ag-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ag-legend i { width: 14px; height: 0; border-top: 2px dashed var(--d3-mint); }
.ag-legend i.base { border-top: 1px solid var(--d3-line-2); }
.ag-legend i.limit { border-top-color: var(--d3-red); }
.ag-legend i.cut { width: 0; height: 12px; border-top: 0; border-left: 2px dotted var(--d3-ink-4); }
.ag-meas-n { font-size: 12.5px; color: var(--d3-ink-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 성장 */
.ag-tile.stats { flex-direction: row; gap: 0; padding: 20px 8px; }
.ag-stat { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; padding: 0 18px; }
.ag-stat + .ag-stat { border-left: 1px solid var(--d3-line); }
.ag-stat > b { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ag-stat > span { font-size: 14px; font-weight: 600; color: var(--d3-ink-2); }
.ag-tl { display: flex; flex-direction: column; }
.ag-tl-i { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 9px 8px; }
.ag-tl-i > time { font-size: 12.5px; font-weight: 600; color: var(--d3-ink-4); font-variant-numeric: tabular-nums; padding-top: 2px; }
.ag-tl-i > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-tl-i strong { font-size: 14px; font-weight: 600; }

/* 서랍 */
.ag-drawer-back { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; background: rgba(11, 15, 24, .32); }
.ag-drawer:focus { outline: 0; }
.ag-drawer { display: flex; flex-direction: column; width: min(560px, 100vw); height: 100%; background: var(--d3-surface); box-shadow: var(--d3-shadow-pop); }
.ag-drawer > header { display: flex; align-items: flex-start; gap: 12px; padding: 24px 24px 16px; }
.ag-drawer > header > div { flex: 1; min-width: 0; }
.ag-drawer > header h2 { margin-top: 4px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.35; }
.ag-x { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 0; border-radius: var(--d3-r2); background: none; color: var(--d3-ink-3); cursor: pointer; }
.ag-x:hover { background: var(--d3-fill); color: var(--d3-ink); }
.ag-drawer-b { flex: 1; min-height: 0; padding: 0 24px 32px; overflow-y: auto; }
.ag-sec { margin-top: 22px; }
.ag-sec > h4 { margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--d3-ink-3); }
.ag-sec > p { color: var(--d3-ink-2); white-space: pre-wrap; }
.ag-sec > p + p { margin-top: 6px; }
.ag-sec > .ag-in + .ag-mute { margin-top: 8px; font-size: 13px; color: var(--d3-ink-3); }
.ag-drawer-b > .ag-judge-f { margin-top: 24px; }
.ag-drawer-b > p.ag-mute { margin-top: 16px; }
.ag-sec > .ag-list { margin: 0 -8px; }
.ag-note { padding: 14px 16px; border-radius: var(--d3-r3); background: var(--d3-sunken); }
.ag-note > strong { display: block; font-size: 15px; font-weight: 700; }
.ag-note > p { margin-top: 4px; font-size: 14px; color: var(--d3-ink-3); }
.ag-note.bad { background: var(--d3-red-tint); }
.ag-note.bad > strong { color: var(--d3-red-ink); }

/* 판정함 */
.ag-judges { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 20px; }
.ag-judge { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 18px; border-radius: var(--d3-r5); background: var(--d3-surface); box-shadow: var(--d3-shadow-1); }
.ag-judge-h { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--d3-ink-3); }
.ag-judge > h3 { font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.45; }
.ag-judge > p { color: var(--d3-ink-2); white-space: pre-wrap; }
.ag-judge > p.ag-mute { color: var(--d3-ink-3); }
.ag-judge > small + h3 { margin-top: -6px; }
.ag-judge-f { display: flex; gap: 8px; margin-top: 6px; }
.ag-why { width: 100%; padding: 10px 12px; border: 1px solid var(--d3-line-2); border-radius: var(--d3-r2); background: var(--d3-surface); font: inherit; color: var(--d3-ink); resize: vertical; }
.ag-why:focus { outline: 2px solid var(--d3-blue); outline-offset: -1px; }
.ag-why[hidden], .ag-seg[hidden] { display: none; }
.ag-seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; border-radius: 10px; background: var(--d3-fill); }
.ag-seg > button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--d3-ink-3); cursor: pointer; }
.ag-seg > button:hover { color: var(--d3-ink); }
.ag-seg > button.on { background: var(--d3-surface); box-shadow: var(--d3-shadow-1); color: var(--d3-ink); }
.ag-pre { white-space: pre-wrap; }
.ag-code { margin: 0; padding: 12px 14px; border-radius: var(--d3-r2); background: var(--d3-sunken); font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 12.5px; line-height: 1.55; color: var(--d3-ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.ag-judge > .ag-list { margin: 0 -8px; }

/* ── 첫 판: 회사 목표 · 에이전트(#5827 동적 설정) ── */
.ag-sect { margin-bottom: 28px; }
.ag-sh { display: flex; align-items: baseline; gap: 8px; margin: 0 0 12px; font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.ag-sh > small { font-size: 13px; font-weight: 600; color: var(--d3-ink-4); }
.ag-goals { gap: 0; padding: 6px 8px; }
.ag-gl { display: grid; grid-template-columns: 28px minmax(0, 1fr) 290px; align-items: center; gap: 12px; padding: 10px 10px; border-radius: var(--d3-r2); color: inherit; text-decoration: none; }
a.ag-gl:hover { background: var(--d3-fill); }
.ag-gl + .ag-gl { border-top: 1px solid var(--d3-line); }
.ag-gl.d1 { padding-left: 34px; } .ag-gl.d2 { padding-left: 58px; }
.ag-gl.d1, .ag-gl.d2 { grid-template-columns: 24px minmax(0, 1fr) 290px; }
.ag-gl-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-gl-t > strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-gl-m { display: grid; grid-template-columns: minmax(0, 1fr) 72px; align-items: center; gap: 10px; }
.ag-gl-m > span { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; }
.ag-gl-m b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ag-gl-m.none { display: block; font-size: 12.5px; color: var(--d3-ink-4); text-align: right; }
.ag-bar { display: block; height: 6px; border-radius: 999px; background: var(--d3-fill); overflow: hidden; }
.ag-bar-v { display: block; height: 100%; border-radius: 999px; background: var(--d3-mint); }
.ag-ava.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 13px; }
.ag-gl.d1 .ag-ava.sm, .ag-gl.d2 .ag-ava.sm { width: 24px; height: 24px; border-radius: 8px; font-size: 12px; }
.ag-ava.team { background: var(--d3-fill); color: var(--d3-ink-3); }
.ag-ava.team > svg { width: 15px; height: 15px; }

/* ── 피드백 · 실행 ── */
.ag-fb { display: flex; align-items: flex-end; gap: 8px; flex: none; }
.ag-fb > .ag-why { flex: 1; min-height: 44px; }

/* ── 설정 ── */
.ag-set { display: flex; flex-direction: column; gap: 16px; max-width: 820px; padding-bottom: 80px; }
.ag-set > .ag-tile { gap: 12px; }
.ag-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ag-f > span { font-size: 12.5px; font-weight: 600; color: var(--d3-ink-3); }
.ag-f > span:empty { display: none; }
.ag-f > small { font-size: 12.5px; color: var(--d3-ink-4); }
.ag-f-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.ag-in { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--d3-line-2); border-radius: var(--d3-r2); background: var(--d3-surface); font: inherit; font-size: 14px; color: var(--d3-ink); }
select.ag-in { padding-right: 28px; }
.ag-in.mono { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 13px; }
.ag-in:focus { outline: 2px solid var(--d3-blue); outline-offset: -1px; }
.ag-in[hidden], .ag-rt-c[hidden] { display: none; }
.ag-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 12px; }
.ag-tool { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--d3-r2); cursor: pointer; }
.ag-tool:hover { background: var(--d3-fill); }
.ag-tool > input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--d3-primary); }
.ag-tool > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-tool strong { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-tool small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ag-tool.off strong { color: var(--d3-ink-4); text-decoration: line-through; }
.ag-rts { display: flex; flex-direction: column; gap: 10px; }
/* #5827 1단계 — 요청할 수 있는 사람 · 노출 경고 · 손발 묶음 */
.ag-req { display: flex; flex-direction: column; gap: 8px; }
.ag-req > select { max-width: 240px; }
.ag-exp { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ag-exp:empty { display: none; }
.ag-exp.ag-mute strong { font-weight: 500; color: var(--d3-ink-3); }
.ag-exp small { font-size: 12.5px; }
.ag-tool-groups { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.ag-tool-g { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 640px) { .ag-tools { grid-template-columns: minmax(0, 1fr); } }
.ag-rt { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--d3-line); border-radius: var(--d3-r3); }
.ag-rt.off { background: var(--d3-sunken); }
.ag-rt.off .ag-in, .ag-rt.off .ag-why { color: var(--d3-ink-3); }
.ag-rt-h { display: grid; grid-template-columns: auto minmax(0, 1fr) 200px 32px; align-items: center; gap: 10px; }
.ag-rt-c { font-size: 12.5px; color: var(--d3-ink-3); }
.ag-rt-s { font-size: 12.5px; color: var(--d3-ink-3); }
.ag-rt-s.bad { color: var(--d3-red-ink); }
.ag-sw { appearance: none; position: relative; flex: none; width: 34px; height: 20px; margin: 0; border-radius: 999px; background: var(--d3-line-2); cursor: pointer; transition: background .15s; }
.ag-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--d3-surface); box-shadow: var(--d3-shadow-1); transition: transform .15s; }
.ag-sw:checked { background: var(--d3-mint); }
.ag-sw:checked::after { transform: translateX(14px); }
.ag-sw:focus-visible { outline: 2px solid var(--d3-blue); outline-offset: 2px; }
.ag-warn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--d3-r2); background: var(--d3-amber-tint); color: var(--d3-amber-ink); font-size: 13.5px; }
.ag-warn > span { flex: 1; min-width: 0; }
.ag-save { position: sticky; bottom: 16px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--d3-r3); background: var(--d3-surface); box-shadow: var(--d3-shadow-2); }
.ag-save > .ag-in { flex: 1; min-width: 0; }
.ag-save-n { flex: none; color: var(--d3-amber-ink); }
.ag-save-n:empty { display: none; }

@media (max-width: 1180px) {
  .ag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-tile.w2, .ag-tile.w3 { grid-column: 1 / -1; }
  .ag-now { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ag-wrap { padding: 20px 16px 56px; }
  .ag-grid { grid-template-columns: minmax(0, 1fr); }
  .ag-tile.h1, .ag-tile.h2, .ag-tile.h3 { height: auto; max-height: 520px; }
  .ag-now { grid-template-columns: minmax(0, 1fr); }
  .ag-row { grid-template-columns: 8px minmax(0, 1fr) 44px; }
  .ag-row-p, .ag-row-o { display: none !important; }
  .ag-tile.stats { flex-direction: column; gap: 14px; }
  .ag-stat + .ag-stat { border-left: 0; }
  .ag-list.cols { grid-template-columns: minmax(0, 1fr); }
  .ag-sponsor > small { display: none; }
  .ag-gl, .ag-gl.d1, .ag-gl.d2 { grid-template-columns: 24px minmax(0, 1fr); }
  .ag-gl-m { grid-column: 2; }
  .ag-gl.d1, .ag-gl.d2 { padding-left: 18px; }
  .ag-f-row, .ag-tools { grid-template-columns: minmax(0, 1fr); }
  .ag-rt-h { grid-template-columns: auto minmax(0, 1fr) 32px; }
  .ag-rt-h > select { grid-column: 1 / -1; grid-row: 2; }
  .ag-save { flex-wrap: wrap; }
}
