/* 리눅스 명령어 사전 (/command, /command/{cmd}) — 목록·게시글 스타일 토큰 재사용 (2026-09-16) */
.command-frame { text-align: left; }
.command-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: #94a3b8; margin: 0 0 14px; }
.command-crumbs a { color: #64748b; text-decoration: none; } .command-crumbs a:hover { color: #1a56db; text-decoration: underline; }
.command-h1-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em; background: #eef2ff; color: #1e3a8a; padding: 2px 12px; border-radius: 10px; }
.command-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; font-size: 12.5px; color: #64748b; }
.command-meta .challenge-tag { font-size: 12px; }
.command-body { max-width: 860px; margin-top: 8px; }
.command-section { margin-top: 36px; }
.command-section h2 { position: relative; margin: 0 0 14px; padding-left: 14px; font-size: 20px; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; }
.command-section h2::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 2px; background: #1a56db; }
.command-section p { margin: 0 0 14px; font-size: 15.5px; line-height: 1.8; color: #1f2937; }
.command-code { margin: 0 0 16px; padding: 14px 18px; background: #0f172a; color: #e2e8f0; border-radius: 12px; border: 1px solid #1e293b; overflow-x: auto; }
.command-code code { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.6; white-space: pre; }
.command-code.is-shell code { color: #f8fafc; }
.command-output { margin: -8px 0 12px; padding: 12px 18px; background: #f8fafc; border: 1px solid #e5e7eb; border-left: 3px solid #cbd5e1; border-radius: 0 10px 10px 0; overflow-x: auto; }
.command-output code { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.55; color: #334155; white-space: pre; }
.command-table-wrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 12px; }
.command-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.command-table th { text-align: left; background: #f8fafc; padding: 10px 14px; font-size: 12.5px; font-weight: 800; color: #475569; border-bottom: 1px solid #e5e7eb; }
.command-table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: top; color: #1f2937; line-height: 1.55; }
.command-table tr:last-child td { border-bottom: 0; }
.command-table code, .command-example-setup code, .command-pitfalls code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: #eef2ff; color: #1e3a8a; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.command-table td:first-child { white-space: nowrap; }
.command-example { margin-top: 22px; }
.command-example h3 { margin: 0 0 8px; font-size: 16px; font-weight: 800; color: #111827; }
.command-example-setup { font-size: 13px !important; color: #64748b !important; margin: 0 0 8px !important; } .command-example-setup code { white-space: normal; }
.command-example-explain { font-size: 14.5px !important; color: #374151 !important; }
.command-example-note { display: block; margin-top: 4px; font-size: 12.5px; color: #9a3412; font-style: normal; }
.command-pitfalls { margin: 0; padding-left: 20px; } .command-pitfalls li { margin: 6px 0; font-size: 15px; line-height: 1.7; color: #1f2937; }
.command-problems { padding: 20px 24px; border: 1px solid #dbe4f3; border-radius: 14px; background: #f8fafc; }
.command-problems h2 { margin-bottom: 8px; }
.command-problems-lead { font-size: 14px !important; color: #64748b !important; }
.command-problem-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }
.command-problem-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid #e5e7eb; }
.command-problem-list a { color: #1D1E22; font-weight: 700; text-decoration: none; font-size: 14.5px; min-width: 0; } .command-problem-list a:hover { color: #1a56db; }
.command-problem-meta { flex: 0 0 auto; font-size: 12px; color: #6B7280; }
.command-related, .command-index-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.command-related a, .command-index-list a { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; text-decoration: none; color: #1D1E22; }
.command-related a:hover, .command-index-list a:hover { border-color: #1a56db; }
.command-related code, .command-index-list code { flex: 0 0 auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; font-weight: 700; color: #1e3a8a; }
.command-related span, .command-index-list span { font-size: 13px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-empty { color: #64748b !important; }
.command-updated { margin-top: 32px !important; font-size: 12.5px !important; color: #94a3b8 !important; }
.command-cat { margin-top: 20px; }
@media (max-width: 768px) { .command-problem-list, .command-related, .command-index-list { grid-template-columns: 1fr; } .command-section h2 { font-size: 18px; } .command-problems { padding: 16px; } }
/* 세로 flex 컨테이너(.learnix-page-frame) 안에서 pre 의 긴 줄이 항목 최소 폭을 밀어 올리지 않게 */
.command-body { width: 100%; min-width: 0; box-sizing: border-box; align-self: flex-start; }
.command-section, .command-example { min-width: 0; max-width: 100%; }
.command-code, .command-output, .command-table-wrap { max-width: 100%; }
.command-related li, .command-index-list li, .command-problem-list li { min-width: 0; }
.command-related a, .command-index-list a { min-width: 0; }
.command-related span, .command-index-list span { flex: 1 1 auto; min-width: 0; }
/* 상세 페이지: 읽기 열(860px)을 프레임 가운데에 놓는다 */
.command-frame.is-detail > .command-crumbs, .command-frame.is-detail > .learnix-page-head, .command-frame.is-detail > .command-body { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; align-self: center; box-sizing: border-box; }
.command-frame.is-detail > .command-crumbs { width: 100%; }
/* 실습 화면 사전 드로어 + fragment */
.command-dict-content { max-width: 960px; width: min(960px, calc(100vw - 40px)); }
.command-dict-body { max-height: calc(100vh - 160px); overflow-y: auto; padding-right: 8px; }
.command-dict-body .command-body { max-width: none; margin: 0; }
.command-dict-body .command-section:first-of-type { margin-top: 12px; }
.command-fragment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding-bottom: 12px; border-bottom: 1px solid #eef2f7; }
.command-fragment-head h2 { margin: 0; font-size: 20px; font-weight: 800; color: #0f172a; }
.command-fragment-head p { margin: 0; font-size: 14px; color: #64748b; flex-basis: 100%; }
.command-fragment-open { margin-left: auto; font-size: 12.5px; color: #1a56db; text-decoration: none; font-weight: 700; } .command-fragment-open:hover { text-decoration: underline; }
.command-dict-body .command-problems { background: #f8fafc; }
body.dark .command-dict-content { background: #1c1f26; } body.dark .command-dict-body .command-section p, body.dark .command-dict-body .command-pitfalls li, body.dark .command-dict-body .command-table td { color: #e2e8f0; } body.dark .command-dict-body .command-section h2, body.dark .command-fragment-head h2, body.dark .command-example h3 { color: #f1f5f9; } body.dark .command-dict-body .command-table th, body.dark .command-dict-body .command-output, body.dark .command-dict-body .command-problems, body.dark .command-dict-body .command-related a { background: #23272f; border-color: #2b303b; } body.dark .command-dict-body .command-output code { color: #cbd5e1; } body.dark .command-dict-body .command-problem-list a, body.dark .command-dict-body .command-related a { color: #e2e8f0; }
@media (max-width: 768px) { .command-dict-content { width: 100vw; max-width: none; height: 100dvh; max-height: 100dvh; border-radius: 0; } .command-dict-body { max-height: calc(100dvh - 120px); } }
/* 드로어: 페이지용 머리(빵 부스러기·큰 제목·메타)는 숨기고 fragment 머리만 쓴다. 닫기 X 는 오른쪽 위 */
.command-dict-body .command-crumbs, .command-dict-body .learnix-page-head, .command-dict-body .command-fragment-head h2 { display: none; }
.command-dict-body .command-fragment-head { padding-bottom: 10px; }
.command-dict-content { position: relative; }
.command-dict-content .terms-modal-close-btn { position: absolute; right: 18px; top: 18px; margin: 0; }
.command-dict-content .terms-modal-header { text-align: left; padding-right: 40px; }
.command-dict-content .modal-title { text-align: left; }
.command-dict-body .command-fragment-head { text-align: left; padding-right: 8px; }
.command-dict-body .command-fragment-head p { text-align: left; }
.command-dict-content .terms-modal-header { margin-bottom: 4px; }
.command-dict-modal { z-index: 10050; }
