/* Layout: lab-notebook tool — fixed left rail of screens, one working pane; review cards are the hero object. */
:root {
  --bg: #f4f6f5;          /* bench paper, faint green-grey bias */
  --surface: #ffffff;
  --ink: #17211f;
  --muted: #5d6b67;
  --line: #d8dfdc;
  --accent: #1f6f63;      /* agar teal */
  --accent-soft: #e2efec;
  --ok: #2f7d3a; --ok-soft: #e4f2e6;
  --warn: #9a6400; --warn-soft: #fbf0d9;
  --bad: #a63a32; --bad-soft: #f8e4e2;
  --claude: #6a4fa3; --claude-soft: #eee8f8;
  --font-body: "IBM Plex Sans KR", "IBM Plex Sans", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 6px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121816; --surface: #1a2220; --ink: #e3ebe8; --muted: #93a39e; --line: #2c3835;
  --accent: #5cb8a9; --accent-soft: #1d3330;
  --ok: #74c47e; --ok-soft: #1c2e1f; --warn: #e2b057; --warn-soft: #33291a; --bad: #e88a82; --bad-soft: #3a2220;
  --claude: #b9a3ea; --claude-soft: #2a2438; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #121816; --surface: #1a2220; --ink: #e3ebe8; --muted: #93a39e; --line: #2c3835;
  --accent: #5cb8a9; --accent-soft: #1d3330;
  --ok: #74c47e; --ok-soft: #1c2e1f; --warn: #e2b057; --warn-soft: #33291a; --bad: #e88a82; --bad-soft: #3a2220;
  --claude: #b9a3ea; --claude-soft: #2a2438; color-scheme: dark }

* { box-sizing: border-box }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 14px; line-height: 1.55 }
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding-block: 20px; padding-inline: 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto }
.brand { font-weight: 600; font-size: 16px; display: flex; gap: 8px; align-items: center; padding-inline: 6px }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent) }
.mock { font-size: 11px; color: var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 4px 8px; margin-inline: 6px }
nav { display: flex; flex-direction: column; gap: 2px }
nav .group { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 4px }
nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--r); color: var(--ink); text-decoration: none }
nav a:hover { background: var(--accent-soft) }
nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600 }
nav a .n { font-family: var(--font-data); font-size: 12px; color: var(--muted) }
nav a[aria-current="page"] .n { color: var(--accent) }
.who { margin-top: auto; font-size: 12px; color: var(--muted); padding-inline: 8px; border-top: 1px solid var(--line); padding-top: 12px }
.who b { color: var(--ink); font-weight: 600 }
.role { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 4px }

main { padding-block: 24px 48px; padding-inline: 28px; min-width: 0 }
.screen { display: flex; flex-direction: column; gap: 20px; max-width: 1100px }
h1 { font-size: 22px; font-weight: 600; margin: 0; text-wrap: balance }
h2 { font-size: 15px; font-weight: 600; margin: 0 }
.sub { color: var(--muted); margin: 2px 0 0 }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center }
.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.stat { display: flex; flex-direction: column; gap: 4px }
.stat .k { font-size: 12px; color: var(--muted) }
.stat .v { font-family: var(--font-data); font-size: 26px; font-variant-numeric: tabular-nums }
.stat .h { font-size: 12px; color: var(--muted) }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px; border-radius: 999px; white-space: nowrap }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50% ; background: currentColor }
.p-review { color: var(--warn); background: var(--warn-soft) }
.p-ready { color: var(--accent); background: var(--accent-soft) }
.p-pub { color: var(--ok); background: var(--ok-soft) }
.p-rej { color: var(--bad); background: var(--bad-soft) }
.p-run { color: var(--claude); background: var(--claude-soft) }
.mono { font-family: var(--font-data); font-size: 12.5px }
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface) }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top }
th { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--bg) }
tr:last-child td { border-bottom: 0 }
td.num { text-align: right }
.hl td { background: var(--accent-soft) }
.btn { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r); padding: 6px 12px; cursor: pointer }
.btn:hover { border-color: var(--accent) }
.btn:focus-visible, nav a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--surface) }
.btn.ok { color: var(--ok); border-color: var(--ok) }
.btn.bad { color: var(--bad); border-color: var(--bad) }
.btn[disabled] { opacity: .5; cursor: not-allowed }
.admin { font-size: 11px; color: var(--muted); border: 1px dashed var(--line); border-radius: 4px; padding: 1px 6px }
input, select, textarea { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px }
label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px }
.filters { display: flex; gap: 8px; flex-wrap: wrap }
.chip { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: var(--surface); cursor: pointer; color: var(--ink) }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft) }

/* review card: the hero object */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); overflow: hidden }
.card .left { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0 }
.card .right { padding: 16px; border-left: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 10px; min-width: 0 }
.kind { font-family: var(--font-data); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted) }
.orig { font-family: var(--font-data); font-size: 15px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; align-self: flex-start }
.claude { border: 1px solid var(--claude); background: var(--claude-soft); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px }
.claude .t { font-size: 11px; color: var(--claude); font-weight: 600; letter-spacing: .04em }
.claude .val { font-family: var(--font-data); font-size: 14px }
.claude .why { font-size: 13px; color: var(--ink) }
.decided { font-size: 13px; color: var(--ok) }
.ctx { font-size: 12px; color: var(--muted) }
.mini { width: 100%; font-family: var(--font-data); font-size: 12px }
.mini td, .mini th { padding: 4px 8px }
.mark { background: var(--warn-soft); color: var(--warn) }
.figocr { margin: 4px 0 14px; padding: 6px 10px; border-left: 3px solid var(--line, #ccc); font-size: 0.9em; color: var(--muted, #555) }
.note { font-size: 12px; color: var(--muted) }
.drop { border: 2px dashed var(--line); border-radius: var(--r); padding: 28px; text-align: center; color: var(--muted) }
.steps { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px }
.steps span { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: var(--surface) }
.steps span.on { border-color: var(--accent); color: var(--accent) }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden }
.bar i { display: block; height: 100%; background: var(--accent) }

@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr) }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 16px; position: static; height: auto; overflow-y: visible }
  nav { flex-direction: row; flex-wrap: wrap }
  nav .group, .who { display: none }
  nav details.more summary.group { display: block }
  main { padding-inline: 16px }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .cols-2, .card { grid-template-columns: minmax(0, 1fr) }
  .card .right { border-left: 0; border-top: 1px solid var(--line) }
}
@media (prefers-reduced-motion: no-preference) { .btn, nav a, .chip { transition: background .12s, border-color .12s } }
.flash { border-radius: var(--r); padding: 10px 12px; font-size: 13px }
.flash.err { color: var(--bad); background: var(--bad-soft) }
.flash.ok { color: var(--ok); background: var(--ok-soft) }
.flash.info { color: var(--accent); background: var(--accent-soft) }
.auth { max-width: 380px; margin: 10vh auto; display: flex; flex-direction: column; gap: 14px }
form.stack { display: flex; flex-direction: column; gap: 12px }
.inline { display: inline }
nav a.disabled { color: var(--muted); pointer-events: none }

/* 메뉴: 일하는 순서로 묶고, 논문 데이터는 접어 둔다. 작업은 메뉴가 아니라 맨 위의 작은 상태 줄이다. */
.rail .status { font-size: 12px; padding: 0 8px; min-height: 18px }
.rail .status a { text-decoration: none }
.rail .status .busy { color: var(--accent); font-weight: 600 }
nav details.bio summary { cursor: pointer; list-style: none; display: block }
nav details.bio summary::-webkit-details-marker { display: none }
nav details.bio summary::before { content: "▸ " }
nav details.bio[open] summary::before { content: "▾ " }
nav details.bio a { padding-left: 18px }
nav .sub-group { font-size: 11px; color: var(--muted); padding: 10px 8px 2px 18px }
nav details.more summary.group { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); padding: 7px 8px }
nav a[href="/"] { font-weight: 600 }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px }
.tabs a { padding: 8px 14px; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px }
.tabs a:hover { background: var(--accent-soft) }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600 }
.tabs a .n { font-family: var(--font-data); font-size: 12px; color: var(--muted); margin-left: 4px }
.tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }

/* 보고서 미리보기 */
.md img { max-width: 100%; height: auto; display: block; margin: 8px 0 }
.md table { border-collapse: collapse; margin: 8px 0 }
.md th, .md td { border: 1px solid var(--line, #ccc); padding: 4px 8px; vertical-align: top }

/* 작업공간: 자료 | 질문 | 만들기 */
.ws { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start }
.ws-col h2 .n { font-family: var(--font-data); font-size: 12px; color: var(--muted); font-weight: 400 }
.ws-col h3 { margin: 16px 0 6px; font-size: 13px; color: var(--muted) }
.dropzone { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 16px 10px; border: 2px dashed var(--line); border-radius: var(--r); cursor: pointer; margin-bottom: 10px }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft) }
.dropzone.busy { opacity: .6; pointer-events: none }
.srcs, .qs, .docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column }
.srcs li, .qs li, .docs li { padding: 8px 0; border-top: 1px solid var(--line); min-width: 0 }
.srcs li:first-child, .qs li:first-child, .docs li:first-child { border-top: 0 }
.srcs a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.srcs .meta, .docs .meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 2px; font-size: 12px }
.qs p.note { margin: 4px 0 0 }
.makebtn { display: flex; flex-direction: column; gap: 2px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink) }
.makebtn:hover { border-color: var(--accent); background: var(--accent-soft) }
.makebtn.off { opacity: .6 }
.sr { display: block }
@media (max-width: 1100px) { .ws { grid-template-columns: minmax(0, 1fr) } }
.srcrow { display: flex; gap: 6px; align-items: flex-start; min-width: 0 }
.srcrow input { margin-top: 4px; flex: none }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline }
.qline { display: flex; gap: 8px; justify-content: space-between; align-items: flex-start }
.qs .ans { margin-top: 6px; padding: 10px 12px; background: var(--accent-soft); border-radius: var(--r); overflow-wrap: anywhere }

/* 섹션 화면: 왼쪽 본문 · 오른쪽 고정 자료 패널(체크하면 바로 저장, 그림은 끌어서 문장 위에) */
.secgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start }
.secmain { min-width: 0 }
.secside { position: sticky; top: 12px; max-height: 92vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface) }
.secside h2 { margin: 0 0 6px; font-size: 15px }
.secside h3 { margin: 14px 0 4px; font-size: 13px; color: var(--muted) }
.secside .figs { display: grid; gap: 8px }
.secside .fig { margin: 0; border: 1px solid var(--line); border-radius: var(--r); padding: 6px; background: var(--bg) }
.secside .fig[draggable="true"] { cursor: grab }
.secside .fig[draggable="true"]:active { cursor: grabbing }
.secside .fig img { display: block; width: 100%; max-height: 140px; object-fit: contain; background: var(--surface) }
.secside .fig figcaption { font-size: 12px; margin: 4px 0; overflow-wrap: anywhere }
.chk { display: flex; gap: 6px; align-items: flex-start; min-width: 0 }
.chk input { margin-top: 3px; flex: none }
.docs-list { list-style: none; margin: 0; padding: 0; font-size: 13px }
.docs-list li { padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere }
.docs-list li:first-child { border-top: 0 }
.docs-list .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 0 22px; font-size: 12px }
textarea.dropping { outline: 2px dashed var(--accent); outline-offset: 2px }
@media (max-width: 980px) { .secgrid { grid-template-columns: minmax(0, 1fr) } .secside { position: static; max-height: none } }

/* 자료 목록: 칩 · 도구 · 선택 막대 · 카드형 목록(좁은 화면에서도 같은 모양) */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; min-height: 36px }
.chip[aria-current="page"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600 }
.chip .n, .badge { font-family: var(--font-data); font-size: 12px; color: var(--muted) }
.badge { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 7px; margin-left: 4px }
.chipform { display: flex; gap: 10px; align-items: center; flex-wrap: wrap }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.actionbar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px 12px; margin-block: 8px; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r); box-shadow: 0 -2px 8px rgba(0, 0, 0, .08) }
.actionbar[hidden] { display: none }
.alist-wrap { padding: 8px 12px }
.alist { list-style: none; margin: 0; padding: 0 }
.alist .grp { padding: 10px 0 4px; font-weight: 600; border-top: 1px solid var(--line) }
.alist .grp:first-child { border-top: 0 }
.arow { display: grid; grid-template-columns: auto 96px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line) }
.arow:first-child { border-top: 0 }
.arow .sel { margin-top: 6px; width: 18px; height: 18px }
.arow .name { font-weight: 600; overflow-wrap: anywhere }
.arow .pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px }
.arow .acts { display: flex; gap: 14px; margin-top: 4px; font-size: 13px }
.arow .th img { max-width: 96px; height: auto }
.alist .empty { padding: 16px 0 }
.selall { padding: 6px 0 }
.pill.year-none { color: var(--muted); background: transparent; border: 1px dashed var(--line) }
.caps .arow.cap { grid-template-columns: 120px minmax(0, 1fr) }
.capimg img { display: block; width: 120px; max-height: 120px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) }
.stickysave { justify-content: flex-start }

/* 모바일: 위 막대 한 줄 메뉴, 큰 터치 영역, 한 칸 레이아웃 */
@media (max-width: 860px) {
  body { font-size: 15px }
  .rail { padding-block: 10px; gap: 8px; flex-direction: row; flex-wrap: wrap; align-items: center; position: sticky; top: 0; z-index: 20 }
  .rail .status { margin-left: auto }
  .rail > .note { display: none }
  nav { order: 3; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; gap: 4px; -webkit-overflow-scrolling: touch }
  nav a, nav details.more summary.group { white-space: nowrap; min-height: 40px; padding: 8px 12px }
  nav details.more { position: relative }
  nav details.more[open] > a, nav details.more[open] > .sub-group { display: flex; position: relative }
  .who { display: flex !important; align-items: center; gap: 8px; margin: 0; border-top: 0; padding: 0; order: 2 }
  .who .btn { min-height: 32px; padding: 4px 10px }
  h1 { font-size: 20px }
  .head { align-items: flex-start }
  .head > .btn, .head > a.btn { width: 100% }
  .panel { padding: 12px }
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; max-width: 100% }
  .btn { min-height: 40px }
  .row { gap: 8px }
  .grid.cols-3 { grid-template-columns: minmax(0, 1fr) }
  .arow { grid-template-columns: auto minmax(0, 1fr); }
  .arow .th { display: none }
  .caps .arow.cap { grid-template-columns: minmax(0, 1fr) }
  .capimg img { width: 100%; max-height: 220px }
  .actionbar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; border-width: 1px 0 0; z-index: 30 }
  .actionbar select { flex: 1 1 100% }
  .screen { padding-bottom: 90px }
  .tw table { font-size: 13px }
  .chipform select { flex: 1 1 100% }
}
.am { min-width: 0 }
.am .note, .am .mono, .am .name { overflow-wrap: anywhere }
select, input:not([type=checkbox]):not([type=radio]), textarea { max-width: 100% }
.chipform { min-width: 0; max-width: 100% }
.chipform select { min-width: 0; max-width: 100%; text-overflow: ellipsis }
.arow .pills .pill { white-space: normal; overflow-wrap: anywhere; max-width: 100% }
@media (max-width: 860px) { .chips { gap: 6px } .chipform { flex: 1 1 100% } }
label { min-width: 0 }
.row > label, .row > form { min-width: 0; max-width: 100% }
@media (max-width: 860px) {
  label select, label input:not([type=checkbox]):not([type=radio]), label textarea { width: 100% }
  .row > label { flex: 1 1 100% }
}
main h1, main .sub, main .note, main td, main li { overflow-wrap: anywhere }
.srcrow a { min-width: 0; flex: 1 1 0; width: 0 }

/* 홈 '최근 작업': 아이콘 · 무엇을 · 어떻게 되고 있나 · 언제 */
.rj-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px }
.rj-all { margin-left: auto; font-size: 13px }
.jobs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px }
.jcard { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r); background: var(--bg) }
.jcard.s-run { border-left-color: var(--claude) }
.jcard.s-wait { border-left-color: var(--muted) }
.jcard.s-ok { border-left-color: var(--ok) }
.jcard.s-bad { border-left-color: var(--bad) }
.jicon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 700; color: var(--muted); background: var(--surface) }
.s-run .jicon { color: var(--claude) } .s-ok .jicon { color: var(--ok) } .s-bad .jicon { color: var(--bad) }
.s-run .jicon { background: var(--claude-soft) }
.s-ok .jicon { background: var(--ok-soft) }
.s-bad .jicon { background: var(--bad-soft) }
.jtitle { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap }
.jtitle a { font-weight: 600; color: var(--ink); text-decoration: none }
.jtitle a:hover { text-decoration: underline }
.jstate { font-size: 12px; color: var(--muted) }
.s-run .jstate { color: var(--claude); font-weight: 600 }
.s-ok .jstate { color: var(--ok) }
.s-bad .jstate { color: var(--bad); font-weight: 600 }
.jdetail, .jstep, .jout, .jerr { margin-top: 2px; font-size: 13px; overflow-wrap: anywhere }
.jdetail, .jstep { color: var(--muted) }
.jout { color: var(--ink) }
.jerr { color: var(--bad) }
.jmeta { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap }
.jbar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 6px }
.jbar i { display: block; height: 100%; background: var(--claude); border-radius: 3px; transition: width .4s }
.jbar.ind i { width: 40%; animation: jslide 1.4s ease-in-out infinite }
@keyframes jslide { 0% { margin-left: -40% } 100% { margin-left: 100% } }
@media (prefers-reduced-motion: reduce) { .jbar.ind i { animation: none; width: 100% } }
@media (max-width: 860px) { .jcard { grid-template-columns: 36px minmax(0, 1fr) } .jmeta { grid-column: 2; text-align: left } .jicon { width: 36px; height: 36px } }

/* 과제 진도: 네 칸이 차오르는 막대 */
.prog { display: flex; flex-direction: column; gap: 6px; margin-block: 6px }
.prog-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px }
.prog-pct { font-family: var(--font-data); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1 }
.prog-pct small { font-size: 13px; color: var(--muted); margin-left: 1px }
.prog-detail { font-size: 12px; color: var(--muted) }
.prog-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px }
.pstep { position: relative; height: 22px; border-radius: 4px; background: var(--line); overflow: hidden; display: grid; align-items: center }
.pstep i { position: absolute; inset: 0 auto 0 0; background: var(--accent); opacity: .85; transition: width .4s }
.pstep.done i { background: var(--ok); opacity: 1 }
.pstep span { position: relative; z-index: 1; font-size: 11px; text-align: center; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 2px }
.pstep.done span { color: #fff; font-weight: 600 }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }
@media (max-width: 1180px) { .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 760px) { .cols-3 { grid-template-columns: minmax(0, 1fr) } }
.projcard { transition: border-color .12s, box-shadow .12s }
.projcard:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0, 0, 0, .06) }
.projcard .k { font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere }
.projcard .v { color: var(--muted) }
.projcard.complete, .pcard.complete { background: color-mix(in srgb, var(--muted) 16%, var(--surface)); border-color: color-mix(in srgb, var(--muted) 45%, var(--surface)) }
.projcard.complete:hover, .pcard.complete:hover { border-color: var(--muted) }

/* 쪽 크게 보기·영역 잘라 저장 */
.pgtools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center }
.btn.on { background: var(--accent); color: #fff; border-color: var(--accent) }
.pgwrap { overflow: auto; max-height: 82vh; border: 1px solid var(--line); border-radius: var(--r); background: #e9ecef; padding: 8px }
.stage { position: relative; width: 100%; margin: 0 auto; cursor: crosshair; user-select: none; -webkit-user-select: none }
.stage img { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .2) }
.selbox { position: absolute; border: 2px solid var(--accent); background: rgba(59, 130, 246, .06); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .3); pointer-events: none }
.crops { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px }
.crops li { width: 150px; font-size: 12px }
.crops img { display: block; width: 150px; max-height: 110px; object-fit: contain; background: #f3f3f3; border: 1px solid var(--line); border-radius: var(--r) }
@media (max-width: 860px) { .pgwrap { max-height: 70vh } .crops li { width: calc(50% - 5px) } .crops img { width: 100% } }
.rj-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--ink); font: inherit }
.rj-toggle h2 { margin: 0 }
.rj-caret { display: inline-block; transition: transform .15s; color: var(--muted) }
#recent-wrap.collapsed .rj-caret { transform: rotate(-90deg) }
#recent-wrap.collapsed .jobs { display: none }
#recent-wrap.collapsed .rj-head { margin-bottom: 0 }
.brand .logo { border-radius: 7px; flex: none }
.auth .logo.big { border-radius: 14px; align-self: flex-start }

/* 빵부스러기: 홈 › 과제 › 과제 이름 › 문서 › 섹션 */
.crumbs { margin: -8px 0 -4px; font-size: 13px }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0 }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; max-width: 100% }
.crumbs li + li::before { content: "›"; color: var(--muted); margin: 0 8px; flex: none }
.crumbs a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere }
.crumbs a:hover { color: var(--accent); text-decoration: underline }
.crumbs li[aria-current="page"] span { color: var(--ink); font-weight: 600; overflow-wrap: anywhere }
@media (max-width: 860px) {
  .crumbs ol { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px }
  .crumbs li { flex: none; max-width: none }
}

/* 논문 라이브러리 */
.vh-label { display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.papers { list-style: none; margin: 0; padding: 0 }
.paper { padding: 12px 0; border-top: 1px solid var(--line) }
.paper:first-child { border-top: 0 }
.paper .pt { font-weight: 600; overflow-wrap: anywhere }
.paper .pm { color: var(--muted); font-size: 13px; overflow-wrap: anywhere }
.paper .pills, .panel > .pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px }
.paper .abs { margin-top: 6px; font-size: 13px } .paper .abs p { margin: 6px 0 0; overflow-wrap: anywhere }
.paper .pact { margin-top: 8px }
.fulltext { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 70vh; overflow-y: auto; margin-top: 8px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); font-size: 13.5px; line-height: 1.65 }
article.doc { overflow-wrap: anywhere }
.pill.p-rev { color: var(--warn); background: var(--warn-soft) }
.pills { max-width: 100% }
.pills form.inline { display: inline-flex; max-width: 100% }
.pills .pill { white-space: normal; overflow-wrap: anywhere; max-width: 100% }

/* 홈: 인사·빠른 실행 → 할 일 → 과제 카드 → 최근 작업 */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 24px; border-radius: var(--r); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid var(--line) }
.hero-act { display: flex; gap: 8px; flex-wrap: wrap }
.hero-act .btn { padding: 9px 16px; font-size: 14px; text-decoration: none }
.todo.has { border-left: 4px solid var(--warn) }
.todo h2 { margin-bottom: 8px }
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px }
.todo-list a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--warn-soft) }
.todo-list a:hover { outline: 1px solid var(--warn) }
.todo-n { font-family: var(--font-data); font-size: 18px; font-weight: 600; color: var(--warn); text-align: center }
.todo-t { display: flex; flex-direction: column }
.todo-go { color: var(--warn) }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px }
.pcards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) }
.pcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink) }
.pcard:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.06) }
.pc-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start }
.pc-title { font-weight: 600; font-size: 15px; text-wrap: balance }
.pc-stage { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 13px }
.pc-num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--surface); font-size: 11px; font-weight: 600 }
.pc-meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center }
.pc-meter .bar { height: 8px }
@media (prefers-reduced-motion: no-preference) { .pcard { transition: border-color .12s, box-shadow .12s } }
