/* 샅샅 웹 화면 — D-24 ② 검색엔진형 (mockups/option-portal).
   차분한 회청·남청, 강조색은 근거 형광펜 노랑 하나. 놀이 요소는 로고에만. */
:root {
  --bg: #f2f4f6;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #5a6573;
  --line: #d8dee5;
  --line-soft: #e8ecf0;
  --action: #1e4c8a;
  --action-soft: #e7eef8;
  --mark: #ffe14d;
  --mark-soft: #fff6c2;
  --warn: #a8361f;
  --warn-soft: #fbeae5;
  --ok: #2c6a43;
  --r-sm: 4px;
  --r-md: 8px;
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* display를 준 요소도 hidden이면 숨김 */
body { margin: 0; font-size: 14px; line-height: 1.55; font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--action); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
/* 맑은 고딕은 역슬래시를 ₩로 그린다 → 경로·코드는 고정폭 */
code, .path { font-family: Consolas, "Cascadia Mono", monospace; }
.error { color: var(--warn); min-height: 1.2em; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ── 로고 ── */
.brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; display: block; filter: drop-shadow(0 1px 0 rgba(23,32,42,.25)); }
.brand .word { font-size: 22px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; padding: 3px 8px 5px; border-radius: 10px; background: var(--ink); color: var(--mark); transform: rotate(-3deg); display: inline-block; }
.brand:hover img { animation: peek 600ms ease-in-out; }
@keyframes peek { 0%,100% { transform: rotate(0) } 30% { transform: rotate(-14deg) } 65% { transform: rotate(10deg) } }

/* ── 로그인 ── */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 32px; width: min(360px, 100%); }
.login-box .brand { margin-bottom: 4px; }
.login-box .brand img { width: 48px; height: 48px; }
.login-box .brand .word { font-size: 30px; }
.login-box .tagline { font-size: 15px; margin: 0 0 3px -2px; }
.login-box /* 느낌표만 살짝 튀게: 기울이고 가끔 통 튄다 */
.tagline .bang { display: inline-block; margin-left: 1px; color: var(--action); transform: rotate(12deg); transform-origin: 50% 90%; animation: hop 2.8s ease-in-out infinite; }
@keyframes hop { 0%, 70%, 100% { transform: rotate(12deg) translateY(0) } 78% { transform: rotate(18deg) translateY(-5px) } 86% { transform: rotate(8deg) translateY(0) } }
.tagline::after { height: 6px; }
.login-box .sub, .login-box .note { color: var(--muted); font-size: 13px; }
.login-box label { display: block; margin: 14px 0 4px; font-size: 14px; }
.login-box input { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-md); }
.login-box button { margin-top: 18px; width: 100%; padding: 10px; border: 0; border-radius: var(--r-md); background: var(--action); color: #fff; }

/* ── 상단 띠 ── */
.top { display: flex; align-items: center; gap: 16px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }
.search { display: flex; gap: 6px; flex: 1; max-width: 680px; min-width: 220px; }
.search input { flex: 1; min-width: 0; padding: 8px 12px; border: 1.5px solid var(--ink); border-radius: var(--r-md); background: var(--surface); }
.search select { padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.btn, .search button { padding: 7px 14px; border-radius: var(--r-md); border: 1px solid var(--action); background: var(--action); color: #fff; white-space: nowrap; }
.status { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9aa5b1; }
.pill.warn { color: var(--warn); border-color: var(--warn); font-weight: 700; }
.pill.warn::before { background: var(--warn); }
.link { background: none; border: 0; color: var(--action); padding: 0; font-size: 12px; }
@media (max-width: 1000px) { .status .opt { display: none; } }

/* ── 첫 화면 ── */
body.home .top .brand, body.home .top .search { visibility: hidden; }
.landing { min-height: calc(100vh - 57px); display: grid; place-items: center; padding: 24px 16px 12vh; }
.landing-in { width: min(680px, 100%); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero-logo { display: flex; align-items: center; gap: 10px; }
.hero-logo img { width: 84px; height: 84px; filter: drop-shadow(0 2px 0 rgba(23,32,42,.25)); animation: bob 2.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0) } 50% { transform: translateY(-4px) rotate(-6deg) } }
.hero-logo { margin: 0; font-weight: 400; }
.hero-logo .word { font-size: 44px; font-weight: 900; letter-spacing: -0.05em; background: var(--ink); color: var(--mark); padding: 4px 16px 8px; border-radius: 16px; transform: rotate(-3deg); }
/* "샅샅" 스티커에 이어 읽히는 작은 꼬리말 → "샅샅이 찾아드려요" */
.tagline { position: relative; z-index: 0; align-self: flex-end; margin: 0 0 6px -4px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
/* 느낌표만 살짝 튀게: 기울이고 가끔 통 튄다 */
.tagline .bang { display: inline-block; margin-left: 1px; color: var(--action); transform: rotate(12deg); transform-origin: 50% 90%; animation: hop 2.8s ease-in-out infinite; }
@keyframes hop { 0%, 70%, 100% { transform: rotate(12deg) translateY(0) } 78% { transform: rotate(18deg) translateY(-5px) } 86% { transform: rotate(8deg) translateY(0) } }
.tagline::after { content: ""; position: absolute; left: 1px; right: 0; bottom: 1px; height: 8px; z-index: -1; background: var(--mark); border-radius: 3px; }
.landing .tag { margin: 0; color: var(--muted); text-align: center; }
.landing .search { width: 100%; max-width: none; }
.landing .search input { padding: 13px 16px; font-size: 16px; border-radius: 12px; }
.landing .search button { border-radius: 12px; padding: 0 20px; }
.examples { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.examples button { border: 1px dashed var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.examples button:hover { border-color: var(--action); color: var(--action); }
.landing .facts { font-size: 12px; color: var(--muted); }

/* ── 결과 화면 ── */
.rp { max-width: 1200px; margin: 0 auto; padding: 16px 16px 48px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.rp-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rp-side { position: sticky; top: 67px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 900px) { .rp { grid-template-columns: 1fr; } .rp-side { position: static; } }

/* 판: 결과·최근 검색을 흰 판 위에 (회색 바탕에 떠 보이지 않게) */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.panel-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); background: #fafbfc; }
.panel-head h2 { margin: 0; font-size: 13px; font-weight: 700; }
.summary { color: var(--muted); font-size: 12px; margin: 0; }

/* 답변 */
.answer { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: var(--r-md); padding: 14px 18px 12px; }
.answer-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.answer-head h2 { font-size: 18px; margin: 0; }
.ai-note { margin: 0; font-size: 12px; color: var(--muted); }
.answer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; margin-top: 6px; }
.answer-text { min-width: 0; }
/* 답변 기다리는 동안: 돋보기 샅샅이가 근거 세 줄을 차례로 읽고, 읽은 줄에 형광펜이 그어진다 */
.answer-loading { display: flex; align-items: center; gap: 18px; padding: 12px 0 8px; }
.reading { position: relative; flex: none; width: 210px; height: 70px; }
.reading .ln { position: absolute; left: 0; height: 10px; border-radius: 5px; background: var(--line-soft); overflow: hidden; }
.reading .ln:nth-child(1) { top: 12px; width: 190px; }
.reading .ln:nth-child(2) { top: 32px; width: 170px; }
.reading .ln:nth-child(3) { top: 52px; width: 120px; }
.reading .ln::after { content: ""; position: absolute; inset: 0; width: 0; background: var(--mark); animation: 3.6s linear infinite; }
.reading .ln:nth-child(1)::after { animation-name: mark1; }
.reading .ln:nth-child(2)::after { animation-name: mark2; }
.reading .ln:nth-child(3)::after { animation-name: mark3; }
@keyframes mark1 { 0% { width: 0 } 30%, 96% { width: 100% } 100% { width: 0 } }
@keyframes mark2 { 0%, 33% { width: 0 } 63%, 96% { width: 100% } 100% { width: 0 } }
@keyframes mark3 { 0%, 66% { width: 0 } 96% { width: 100% } 100% { width: 0 } }
.reading .reader { position: absolute; left: 0; top: 0; width: 40px; height: 40px; filter: drop-shadow(0 1px 0 rgba(23,32,42,.25)); animation: read 3.6s linear infinite; }
/* 돋보기 렌즈 중심(로고의 27/64)이 줄 위를 지나가게 */
@keyframes read {
  0% { transform: translate(-17px, 0) rotate(-8deg) }
  30% { transform: translate(173px, 0) rotate(6deg) }
  33% { transform: translate(-17px, 20px) rotate(-8deg) }
  63% { transform: translate(153px, 20px) rotate(6deg) }
  66% { transform: translate(-17px, 40px) rotate(-8deg) }
  96% { transform: translate(103px, 40px) rotate(6deg) }
  100% { transform: translate(-17px, 0) rotate(-8deg) }
}
.loading-msg { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
@media (max-width: 520px) { .answer-loading { flex-direction: column; align-items: flex-start; gap: 6px; } }
.answer-figure { display: flex; flex-direction: column; gap: 4px; width: 200px; color: var(--muted); font-size: 12px; text-align: center; }
.answer-figure img { width: 200px; max-height: 280px; object-fit: contain; object-position: top; background: #fff; border: 1px solid var(--line); box-shadow: 0 0 0 3px var(--mark-soft); border-radius: 2px; }
.answer-figure:hover { text-decoration: none; color: var(--action); }
.answer-figure:hover img { box-shadow: 0 0 0 3px var(--mark); }
@media (max-width: 700px) { .answer-grid { grid-template-columns: 1fr; } .answer-figure, .answer-figure img { width: 160px; } }
.badge { display: inline-block; padding: 0 6px; border-radius: var(--r-sm); font-size: 11px; }
.badge.ai { background: var(--action-soft); color: var(--action); }
.badge.warn { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.answer-body { margin: 0; padding: 0; list-style: none; }
.answer-body .sent { margin: 10px 0; line-height: 1.65; font-size: 16.5px; color: #101828; }
.answer-body .sent-text { font-weight: 500; }
.answer-body .kind { display: inline-block; font-size: 11px; padding: 0 5px; margin-right: 6px; border-radius: var(--r-sm); vertical-align: 2px; font-weight: 400; }
.answer-body .summary .kind { background: var(--action-soft); color: var(--action); }
.answer-body .quote .kind { background: var(--mark-soft); color: #6b5600; }
.answer-body .quote .sent-text { background: linear-gradient(transparent 60%, var(--mark-soft) 60%); }
.cite { display: inline-block; min-width: 20px; padding: 0 4px; margin-left: 3px; border-radius: 3px; background: var(--mark); color: var(--ink); font-size: 11px; font-weight: 700; text-align: center; text-decoration: none; line-height: 18px; vertical-align: 2px; }
.cite:hover { background: var(--ink); color: var(--mark); text-decoration: none; }
.cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cite-row { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 8px 2px 3px; border: 1px solid var(--line-soft); border-radius: 999px; color: var(--muted); max-width: 100%; }
.cite-row b { min-width: 18px; height: 18px; border-radius: 9px; background: var(--mark); color: var(--ink); font-size: 11px; display: inline-grid; place-items: center; flex: none; }
.cite-row:hover { border-color: var(--action); color: var(--action); text-decoration: none; }
.cite-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.answer .foot { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed var(--line-soft); font-size: 12px; color: var(--muted); }

/* 문서 묶음 결과 */
.docs { list-style: none; margin: 0; padding: 0; }
/* 재정렬 점수가 낮은 결과 묶음 (D-35): 맨 아래, 접힌 채로 */
.low-group { border-top: 1px solid var(--line-soft); padding: 12px 16px; }
.low-group summary { cursor: pointer; color: var(--muted); font-size: 13px; width: fit-content; padding: 2px 10px; border: 1px dashed var(--line); border-radius: 999px; list-style: none; }
.low-group summary::-webkit-details-marker { display: none; }
.low-group summary::before { content: "＋ "; }
.low-group details[open] summary::before { content: "－ "; }
.low-group summary:hover { color: var(--action); border-color: var(--action); }
.low-results { margin-top: 8px; opacity: .85; }
.doc { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.doc:first-child { border-top: 0; }
.doc:hover { background: #fbfcfd; }
.doc-thumb img { width: 84px; max-height: 118px; object-fit: contain; object-position: top; border: 1px solid var(--line); background: #fff; display: block; }
.doc-body { min-width: 0; }
.doc-title { font-weight: 700; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.doc-meta { color: var(--muted); font-size: 12px; margin: 2px 0 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.doc-meta .pg { color: var(--ink); font-weight: 700; }
.snippet { margin: 0; font-size: 13px; line-height: 1.6; color: #34404d; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pages { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.page-chip { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 11px; color: var(--muted); }
.page-chip img { width: 36px; height: 48px; object-fit: cover; object-position: top; display: block; }
.page-chip:hover { border-color: var(--action); color: var(--action); }
.page-chip[aria-pressed="true"] { border-color: var(--action); box-shadow: 0 0 0 1px var(--action); color: var(--action); font-weight: 700; }

/* 같은 내용의 다른 판 (유사 중복 묶음) */
.variants { margin-top: 8px; font-size: 12px; }
.variants summary { cursor: pointer; color: var(--muted); width: fit-content; padding: 1px 8px; border: 1px dashed var(--line); border-radius: 999px; list-style: none; }
.variants summary::-webkit-details-marker { display: none; }
.variants summary::before { content: "＋ "; }
.variants[open] summary::before { content: "－ "; }
.variants summary:hover { color: var(--action); border-color: var(--action); }
.variants ul { margin: 6px 0 0; padding: 6px 10px; list-style: none; background: var(--bg); border-radius: var(--r-sm); display: flex; flex-direction: column; gap: 3px; }
.variants li { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.variants li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.variants .fmt { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; flex: none; }

/* 최근 검색 */
.history { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 6px; }
.history a { display: block; font-size: 13px; color: var(--ink); padding: 5px 8px; border-radius: var(--r-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history a:hover { background: var(--line-soft); text-decoration: none; }
.history a[aria-current="true"] { background: var(--action-soft); color: var(--action); font-weight: 700; }
.history .empty { font-size: 12px; color: var(--muted); padding: 4px 8px; }

/* ── 원본 확인 ── */
.view-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 51px; z-index: 2; }
.view-bar .vb-title { font-weight: 700; flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-bar .pg { font-size: 12px; color: var(--muted); white-space: nowrap; }
.iconbtn { min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }
.iconbtn:disabled { opacity: .4; cursor: default; }
/* 원본 화면: 머리·도구 띠를 뺀 나머지 높이를 뷰어가 채운다 (바깥 스크롤 없음) */
body.view-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
body.view-page .view-bar { position: static; }
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 380px; flex: 1; min-height: 0; }
.page-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.page-scroll { flex: 1; overflow: auto; background: #e4e8ed; padding: 16px; text-align: center; min-height: 0; }
#page-img { background: #fff; box-shadow: 0 1px 3px rgba(23,32,42,.2); }
.strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.strip button { border: 1px solid var(--line); background: #fff; padding: 2px; width: 50px; flex: none; }
.strip button[aria-current="true"] { border-color: var(--action); outline: 2px solid var(--action); }
.strip img { width: 44px; height: 60px; object-fit: cover; object-position: top; display: block; }
.text-pane { overflow: auto; background: var(--surface); border-left: 1px solid var(--line); padding: 14px 16px; }
.text-pane h2 { font-size: 12px; color: var(--muted); margin: 0 0 6px; font-weight: 700; }
.text-pane pre { white-space: pre-wrap; font: inherit; font-size: 14px; line-height: 1.65; margin: 0 0 18px; }
#page-img { max-width: none; display: inline-block; }
.side-box { padding: 0 0 14px; margin: 0 0 14px; border-bottom: 1px solid var(--line-soft); }
.side-box h3 { font-size: 12px; color: var(--muted); margin: 10px 0 4px; font-weight: 700; }
.side-box.cited { background: var(--mark-soft); border: 1px solid var(--mark); border-radius: var(--r-md); padding: 10px 12px; }
.cited-list, .match-list, .variant-links { list-style: none; margin: 0; padding: 0; }
.cited-list li { font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.cited-list .kind { font-size: 11px; font-weight: 700; color: var(--muted); margin-right: 6px; }
.cited-list .quote .kind { color: var(--ok); }
.cited-list .cite { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 4px; font-size: 11px; text-align: center; background: var(--action); color: #fff; border-radius: var(--r-sm); }
.match-list li { font-size: 14px; line-height: 1.6; padding: 6px 0 6px 10px; border-left: 3px solid var(--mark); margin: 0 0 6px; }
.match-list mark { background: var(--mark-soft); box-shadow: inset 0 -2px 0 var(--mark); color: inherit; padding: 0 1px; }
.side-text { font-size: 14px; line-height: 1.65; margin: 0 0 6px; }
.hit-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.hit-pages button { border: 1px solid var(--line); background: #fff; padding: 2px 2px 3px; width: 58px; font-size: 11px; color: var(--muted); }
.hit-pages button[aria-current="true"] { border-color: var(--action); outline: 2px solid var(--action); color: var(--action); font-weight: 700; }
.hit-pages img { width: 52px; height: 68px; object-fit: cover; object-position: top; display: block; margin-bottom: 2px; }
.doc-info { display: grid; grid-template-columns: 52px 1fr; gap: 4px 8px; margin: 0; font-size: 13px; }
.doc-info dt { color: var(--muted); }
.doc-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.doc-info .path { font-family: Consolas, "D2Coding", monospace; font-size: 12px; }
.variant-links li { font-size: 13px; margin: 0 0 4px; }
.variant-links .fmt { margin-left: 6px; font-size: 11px; color: var(--muted); }
.raw summary { cursor: pointer; font-size: 12px; color: var(--muted); font-weight: 700; }
.raw pre { margin-top: 8px; }
.locked { font-size: 11px; color: var(--muted); }
@media (max-width: 900px) {
  body.view-page { height: auto; overflow: visible; }
  .viewer { grid-template-columns: 1fr; height: auto; }
  .page-scroll { min-height: 70vh; }
  .text-pane { border-left: 0; border-top: 1px solid var(--line); }
}

/* ───────── 관리 화면 ───────── */
.admin { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; display: grid; gap: 16px; }
.admin h1 { font-size: 20px; margin: 4px 0 0; }
.admin .panel { padding: 16px 18px; }
.admin h2 { font-size: 15px; margin: 0 0 8px; }
.admin .muted { color: var(--muted); font-size: 13px; margin: 0 0 4px; }
.admin-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.admin-head .btn { padding: 9px 18px; font-weight: 700; }
.admin-head .btn:disabled { opacity: .5; cursor: default; }
.admin-msg { margin: 12px 0 10px; font-size: 14px; }
.stages { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; }
.stage { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; display: grid; gap: 2px; background: #fff; }
.stage .name { font-weight: 700; font-size: 13px; }
.stage .note { font-size: 12px; color: var(--muted); }
.stage.ok { border-color: var(--ok); }
.stage.ok .note { color: var(--ok); }
.stage.fail { border-color: var(--warn); background: var(--warn-soft); }
.stage.fail .note { color: var(--warn); }
.stage.now { border-color: var(--action); background: var(--action-soft); }
.stage.now .note { color: var(--action); font-weight: 700; }
.admin-stats { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.admin-stats dt { color: var(--muted); }
.admin-stats dd { margin: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 6px 8px; }
.admin-table td { border-bottom: 1px solid var(--line-soft); padding: 7px 8px; vertical-align: top; }
.admin-table .result.done { color: var(--ok); font-weight: 700; }
.admin-table .result.failed { color: var(--warn); font-weight: 700; }
.admin-table .result.running { color: var(--action); font-weight: 700; }
@media (max-width: 700px) {
  .admin-head { flex-direction: column; }
  .stages { grid-template-columns: repeat(2, 1fr); }
}.admin-list { border-top: 1px solid var(--line-soft); padding: 8px 0; }
.admin-list > summary { cursor: pointer; font-size: 14px; padding: 4px 0; }
.admin-list .admin-table { margin-top: 6px; }
.admin .path { font-family: Consolas, "D2Coding", monospace; font-size: 12px; overflow-wrap: anywhere; }
.admin h3 { font-size: 13px; margin: 14px 0 4px; color: var(--muted); }
.admin-filter { width: 100%; max-width: 360px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); margin: 6px 0 10px; }
.group-list { display: grid; gap: 4px; }
.group { border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 6px 10px; background: #fff; }
.group > summary { cursor: pointer; font-size: 13px; }
.group .admin-table { margin-top: 6px; }
.admin .link { background: none; border: 0; padding: 0; color: var(--action); text-decoration: underline; cursor: pointer; font-size: 13px; }
.admin .link:disabled { color: var(--muted); cursor: default; }
.admin ul.plain { margin: 0; padding-left: 18px; font-size: 14px; }.admin-table a { color: var(--action); }
