:root {
  --ink: #202a33;
  --muted: #66727c;
  --line: #d7dde2;
  --soft: #f3f5f7;
  --card: #ffffff;
  --green: #236576;
  --green-2: #347b8b;
  --green-soft: #e8f2f4;
  --amber: #8b5d14;
  --amber-soft: #fff2d7;
  --red: #a33f35;
  --red-soft: #fbecea;
  --blue: #3e638c;
  --blue-soft: #edf3f8;
  --shadow: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 14px 14px;
  background: #202a33;
  color: #eef3ef;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: #dce7ea; color: #194e5a; font-size: 12px; font-weight: 800; letter-spacing: .05em;
}
.brand strong { display: block; font-size: 15px; }
.brand span { display: block; margin-top: 3px; color: #9fb0a7; font-size: 11px; }

.new-project-btn {
  width: 100%; border: 1px solid #5b7680; border-radius: 6px; padding: 11px 14px;
  background: #285b68; color: white; text-align: left; font-weight: 650;
}
.new-project-btn:hover { background: #317080; }
.new-project-btn span { margin-right: 6px; font-size: 17px; }

.nav-list { display: grid; gap: 4px; margin-top: 18px; }
.nav-divider { padding: 16px 12px 7px; color: #82958b; font-size: 11px; letter-spacing: .08em; }
.nav-item {
  display: grid; grid-template-columns: 26px 1fr 8px; align-items: center; gap: 8px;
  border: 0; border-radius: 5px; padding: 9px 10px; background: transparent; color: #c4cdd3;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.active { background: #edf2f4; color: #1f4f5a; font-weight: 700; }
.nav-item:disabled { cursor: not-allowed; opacity: .38; }
.nav-number { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; font-size: 11px; }
.nav-item i { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.nav-item.done i { background: #7dc49f; }
.sidebar-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; padding: 12px 8px 2px; color: #9aacA2; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #809087; }

.main-area { min-width: 0; }
.topbar {
  min-height: 88px; display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(24px, 4vw, 58px); border-bottom: 1px solid var(--line); background: rgba(245,246,242,.93);
  backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10;
}
.crumb { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.topbar h1 { margin: 0; font-size: 24px; font-weight: 720; letter-spacing: -.02em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.project-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: white; color: #4b524c; }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); }

.content { max-width: 1180px; margin: 0 auto; padding: 34px clamp(24px, 4vw, 58px) 72px; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-intro h2 { margin: 0 0 6px; font-size: 20px; }
.page-intro p { margin: 0; color: var(--muted); line-height: 1.6; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.section-card { padding: 22px; margin-bottom: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.section-head h3 { margin: 0; font-size: 16px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.primary-btn, .secondary-btn, .ghost-btn, .danger-btn {
  border-radius: 6px; padding: 10px 15px; border: 1px solid transparent; font-weight: 650;
}
.primary-btn { background: var(--green); color: white; }
.primary-btn:hover { background: #1f4c3b; }
.primary-btn:disabled { opacity: .42; cursor: not-allowed; }
.secondary-btn { background: white; color: var(--green); border-color: #a9beb2; }
.secondary-btn:hover, .ghost-btn:hover { background: var(--green-soft); }
.ghost-btn { background: transparent; color: var(--ink); border-color: var(--line); }
.danger-btn { background: white; color: var(--red); border-color: #e5bbb5; }
.small-btn { padding: 7px 10px; font-size: 12px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 20px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; color: #444b45; font-weight: 650; font-size: 13px; }
.required::after { content: " *"; color: var(--red); }
.field input, .field select, .field textarea, .inline-input {
  width: 100%; border: 1px solid #cfd5ce; border-radius: 9px; padding: 10px 11px;
  background: white; color: var(--ink); outline: none;
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus, .inline-input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(54,118,95,.12); }
.field-help { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.empty-state { padding: 82px 24px; text-align: center; }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 18px; background: var(--green-soft); color: var(--green); font-size: 25px; }
.empty-state h2 { margin: 0 0 8px; }
.empty-state p { color: var(--muted); margin: 0 auto 22px; max-width: 480px; line-height: 1.7; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.project-card { padding: 20px; transition: transform .18s, border-color .18s; }
.project-card:hover { transform: translateY(-2px); border-color: #b6c6bc; }
.project-card h3 { margin: 13px 0 7px; font-size: 17px; }
.project-meta { color: var(--muted); font-size: 12px; line-height: 1.6; min-height: 38px; }
.project-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 19px; padding-top: 15px; border-top: 1px solid var(--line); }
.stage-badge, .badge { display: inline-flex; align-items: center; border-radius: 4px; padding: 4px 7px; font-size: 11px; font-weight: 700; }
.stage-badge { background: var(--green-soft); color: var(--green); }
.badge.confirmed { background: var(--green-soft); color: var(--green); }
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.blocked { background: var(--red-soft); color: var(--red); }
.badge.info { background: var(--blue-soft); color: var(--blue); }

.step-strip { display: flex; gap: 7px; margin: 0 0 22px; }
.step-strip span { height: 5px; flex: 1; border-radius: 8px; background: #dce1db; }
.step-strip span.done { background: #6fa58c; }
.step-strip span.current { background: var(--green); }

.dropzone { border: 1.5px dashed #aebbb2; border-radius: 12px; padding: 34px 18px; text-align: center; background: #fafbf9; }
.dropzone.drag { border-color: var(--green); background: var(--green-soft); }
.dropzone strong { display: block; margin-bottom: 6px; }
.dropzone p { margin: 0 0 15px; color: var(--muted); font-size: 12px; }
.dropzone input { display: none; }
.file-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.file-card { min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.file-preview { aspect-ratio: 4/3; display: grid; place-items: center; background: #eef1ed; color: #6d776f; overflow: hidden; font-weight: 700; }
.file-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-info { padding: 10px; }
.file-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 650; }
.file-sub { color: var(--muted); font-size: 10px; margin-top: 4px; }

.readiness { display: grid; gap: 10px; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; }
.check-row-left { display: flex; gap: 11px; align-items: center; }
.check-icon { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.check-icon.ok { background: var(--green-soft); color: var(--green); }
.check-icon.warn { background: var(--amber-soft); color: var(--amber); }
.analysis-run { text-align: center; padding: 36px 20px; }
.analysis-run h3 { margin: 0 0 8px; font-size: 20px; }
.analysis-run p { color: var(--muted); margin: 0 auto 20px; line-height: 1.6; max-width: 600px; }
.progress-bar { height: 8px; max-width: 520px; margin: 18px auto 8px; background: #e3e7e2; border-radius: 8px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--green); transition: width .4s; }
.analysis-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fafbf9; }
.metric strong { display: block; font-size: 27px; color: var(--green); font-variant-numeric: tabular-nums; }
.metric span { color: var(--muted); font-size: 12px; }

.list-stack { display: grid; gap: 11px; }
.question-card { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.order-num { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 800; }
.question-card textarea { width: 100%; min-height: 58px; resize: vertical; border: 0; outline: 0; color: var(--ink); line-height: 1.55; }
.icon-btn { border: 0; background: transparent; color: var(--muted); padding: 6px; border-radius: 7px; }
.icon-btn:hover { background: var(--red-soft); color: var(--red); }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.data-table th { padding: 11px 13px; background: #f1f3ef; color: #5d655e; font-size: 11px; text-align: left; letter-spacing: .03em; }
.data-table td { padding: 12px 13px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.data-table textarea, .data-table select { width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 6px; background: transparent; resize: vertical; color: var(--ink); }
.data-table textarea:focus, .data-table select:focus { border-color: #b7c7bd; background: white; outline: 0; }
.level-pill { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-weight: 900; }
.level-S { background: #e7efeb; color: #1f5b43; }
.level-A { background: #edf3f8; color: #365e80; }
.level-B { background: #f4f0e7; color: #7a5e2b; }
.level-P { background: var(--amber-soft); color: var(--amber); }

.selling-intro { margin-bottom: 16px; }
.evidence-track {
  display: flex; align-items: center; gap: 9px; overflow-x: auto; margin-bottom: 12px; padding: 9px 12px;
  border: 1px solid #cfd8dd; border-left: 3px solid var(--green); background: #f9fbfc; color: #43515c; font-size: 11px;
  white-space: nowrap;
}
.evidence-track { scrollbar-width: none; }
.evidence-track::-webkit-scrollbar { display: none; }
.evidence-track span { font-weight: 700; }
.evidence-track b { color: #97a3ac; font-weight: 500; }
.selling-summary { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)) minmax(270px, 2fr); border: 1px solid var(--line); background: white; margin-bottom: 12px; }
.summary-cell { display: flex; justify-content: space-between; align-items: center; min-height: 62px; padding: 12px 14px; border-right: 1px solid var(--line); border-top: 3px solid transparent; }
.summary-cell span { color: var(--muted); font-size: 11px; font-weight: 700; }
.summary-cell strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.summary-cell.level-s { border-top-color: #286777; }
.summary-cell.level-a { border-top-color: #4c7098; }
.summary-cell.level-b { border-top-color: #9a793e; }
.summary-cell.level-p { border-top-color: #b97718; }
.summary-gate { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 15px; border-left: 3px solid; }
.summary-gate strong { font-size: 12px; }
.summary-gate span { color: var(--muted); font-size: 11px; }
.summary-gate.has-risk { border-left-color: #d29639; background: #fffbf2; }
.summary-gate.is-clear { border-left-color: var(--green); background: #f2f8f9; }
.selling-toolbar { display: flex; justify-content: space-between; align-items: center; min-height: 42px; padding: 6px 0; color: var(--muted); font-size: 11px; }
.filter-group { display: flex; gap: 0; }
.filter-btn { min-width: 52px; border: 1px solid var(--line); border-right: 0; background: white; color: #4f5c66; padding: 7px 11px; font-weight: 650; }
.filter-btn:first-child { border-radius: 5px 0 0 5px; }
.filter-btn:last-child { border-right: 1px solid var(--line); border-radius: 0 5px 5px 0; }
.filter-btn.active { color: white; background: #33434e; border-color: #33434e; }
.selling-ledger-wrap { background: white; }
.selling-ledger-wrap .table-wrap { border-radius: 5px; }
.selling-ledger { min-width: 1040px; table-layout: fixed; }
.selling-ledger th { background: #e9edf0; color: #45535e; padding: 9px 12px; }
.selling-ledger th:nth-child(1) { width: 95px; }
.selling-ledger th:nth-child(2) { width: 45%; }
.selling-ledger th:nth-child(3) { width: 23%; }
.selling-ledger th:nth-child(4) { width: 23%; }
.selling-ledger td { padding: 12px; background: white; }
.selling-ledger tr:hover td { background: #fbfcfd; }
.level-cell { border-left: 3px solid #87949e; }
.level-cell .row-index { display: block; color: #919ca5; font-size: 10px; font-variant-numeric: tabular-nums; margin-bottom: 7px; }
.level-cell select { border: 1px solid #cbd3d9; background: white; font-weight: 800; }
.fab-stack { display: grid; gap: 7px; }
.fab-stack label { display: grid; grid-template-columns: 26px 1fr; align-items: stretch; }
.fab-stack label > span { display: grid; place-items: center; background: #344650; color: white; font-size: 11px; font-weight: 850; border-radius: 4px 0 0 4px; }
.fab-stack textarea { min-height: 52px; border: 1px solid #d4dbe0; border-left: 0; border-radius: 0 4px 4px 0; padding: 8px 9px; line-height: 1.45; }
.ledger-field { display: grid; gap: 5px; }
.ledger-field > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.ledger-field textarea, .ledger-field input, .ledger-field select { width: 100%; border: 1px solid #d4dbe0; border-radius: 4px; background: white; padding: 8px 9px; color: var(--ink); }
.ledger-field textarea { min-height: 86px; resize: vertical; line-height: 1.45; }
.evidence-state { display: grid; gap: 10px; }
.status-rule { padding: 7px 8px; border-left: 3px solid #d19a43; background: #fff8e9; color: #6d521f; font-size: 10px; line-height: 1.45; }
.selling-ledger textarea:focus, .selling-ledger input:focus, .selling-ledger select:focus { outline: 0; border-color: var(--green-2); box-shadow: 0 0 0 2px rgba(52,123,139,.12); }

.visual-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tab-btn { border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 9px; padding: 8px 13px; font-weight: 650; }
.tab-btn.active { background: var(--green); color: white; border-color: var(--green); }
.visual-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.visual-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.visual-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 15px; }
.slot-num { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: #17231d; color: white; font-weight: 800; font-size: 12px; }
.visual-card h3 { margin: 0; font-size: 15px; }
.visual-card .slot-role { color: var(--muted); font-size: 11px; margin-top: 3px; }
.visual-fields { display: grid; gap: 10px; }
.mini-field label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.mini-field textarea, .mini-field input { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px; resize: vertical; color: var(--ink); }

.review-group { margin-bottom: 18px; }
.review-row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); }
.review-row:first-child { border-top: 0; }
.review-row input { margin-top: 3px; accent-color: var(--green); }
.review-row strong { display: block; margin-bottom: 3px; }
.review-row span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.notice { border-radius: 10px; padding: 13px 15px; line-height: 1.55; }
.notice.warn { background: var(--amber-soft); color: #6e4a13; border: 1px solid #f0d49d; }
.notice.ok { background: var(--green-soft); color: var(--green); border: 1px solid #c3d9cc; }
.legacy-notice { margin-bottom: 16px; }

.export-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; padding: 18px; border-top: 1px solid var(--line); }
.export-card:first-child { border-top: 0; }
.export-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 11px; background: #eef1ed; font-size: 12px; font-weight: 800; color: var(--green); }
.export-card h3 { margin: 0 0 4px; font-size: 14px; }
.export-card p { margin: 0; color: var(--muted); font-size: 12px; }

.file-purpose { display: grid; gap: 4px; margin-top: 9px; }
.file-purpose span { color: var(--muted); font-size: 10px; font-weight: 700; }
.file-purpose input { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; color: var(--ink); background: #fff; }
.fact-library { display: grid; gap: 8px; }
.fact-library-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfa; }
.fact-library-row strong { display: block; font-size: 13px; line-height: 1.5; }
.fact-library-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.analysis-warning { margin-top: 14px; padding: 11px 13px; border: 1px solid #ecd7a9; border-radius: 8px; background: var(--amber-soft); color: #6e4a13; font-size: 12px; text-align: left; }
.api-error { max-width: 680px; margin: 14px auto 0; padding: 12px 14px; border: 1px solid #e5b9b9; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 12px; text-align: left; }
.progress-fill.failed { background: var(--red); }
.observation-section { margin-top: 18px; text-align: left; }
.observation-list { display: grid; gap: 12px; }
.observation-card { padding: 16px; border: 1px solid var(--line); border-left: 4px solid #d19a43; border-radius: 10px; background: white; }
.observation-card.status-confirmed { border-left-color: var(--green-2); }
.observation-card.status-rejected { border-left-color: var(--red); opacity: .8; }
.observation-card.status-needs_evidence { border-left-color: #8a6d2d; background: #fffcf5; }
.observation-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.observation-head > div { display: flex; gap: 8px; align-items: center; }
.observation-head > strong { color: var(--muted); font-size: 11px; }
.certainty { color: var(--muted); font-size: 11px; }
.observation-text { width: 100%; min-height: 70px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; resize: vertical; color: var(--ink); font: inherit; line-height: 1.55; }
.observation-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.observation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.conflict-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.conflict-compare > div { padding: 11px; border-radius: 8px; background: #faf5f3; border: 1px solid #ead3cb; }
.conflict-compare span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.conflict-compare strong { display: block; font-size: 12px; line-height: 1.55; }

.modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(16,24,19,.48); display: grid; place-items: center; padding: 20px; }
.modal { width: min(620px, 100%); max-height: 90vh; overflow: auto; background: white; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.22); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-body { padding: 22px; }
.close-btn { border: 0; background: #f1f3ef; width: 32px; height: 32px; border-radius: 50%; color: #59615a; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; transform: translateY(30px); opacity: 0; pointer-events: none; padding: 12px 16px; border-radius: 9px; background: #17231d; color: white; box-shadow: var(--shadow); transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 82px 1fr; }
  .sidebar { padding-inline: 11px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand > div:last-child, .new-project-btn:not(:focus) { font-size: 0; }
  .new-project-btn { text-align: center; padding: 10px; }
  .new-project-btn span { margin: 0; font-size: 19px; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 9px 4px; font-size: 10px; }
  .nav-item i, .nav-divider { display: none; }
  .sidebar-foot { display: none; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .file-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1100px) {
  .selling-summary { grid-template-columns: repeat(4, 1fr); }
  .summary-gate { grid-column: 1 / -1; min-height: 54px; }
}

@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; top: auto; height: 70px; padding: 7px 8px; }
  .brand, .new-project-btn, .nav-divider, .sidebar-foot { display: none; }
  .nav-list { margin: 0; display: flex; gap: 2px; overflow-x: auto; }
  .nav-list { scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-item { min-width: 64px; padding: 6px 4px; }
  .nav-item[data-page="projects"] { display: grid; }
  .nav-number { width: 20px; height: 20px; }
  .topbar { min-height: 72px; padding: 13px 18px; }
  .topbar h1 { font-size: 21px; }
  .project-chip { display: none !important; }
  .content { padding: 22px 16px 100px; }
  .grid-2, .grid-3, .form-grid, .project-grid, .visual-grid { grid-template-columns: 1fr; }
  .file-grid { grid-template-columns: repeat(2, 1fr); }
  .analysis-summary { grid-template-columns: repeat(2,1fr); }
  .selling-summary { grid-template-columns: repeat(2, 1fr); }
  .summary-cell:nth-child(2) { border-right: 0; }
  .summary-gate { grid-column: 1 / -1; }
  .selling-toolbar { align-items: flex-start; gap: 8px; flex-direction: column; }
  .filter-group { max-width: 100%; overflow-x: auto; }
  .selling-ledger { min-width: 0; }
  .selling-ledger thead { display: none; }
  .selling-ledger, .selling-ledger tbody, .selling-ledger tr, .selling-ledger td { display: block; width: 100%; }
  .selling-ledger tr { border-top: 6px solid var(--soft); }
  .selling-ledger tr:first-child { border-top: 0; }
  .selling-ledger td { border-top: 1px solid var(--line); }
  .selling-ledger .level-cell { border-left: 3px solid #87949e; border-top: 0; display: flex; align-items: center; gap: 10px; }
  .level-cell .row-index { margin: 0; }
  .level-cell select { max-width: 160px; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .export-card { grid-template-columns: 42px 1fr; }
  .export-card button { grid-column: 1 / -1; }
  .conflict-compare { grid-template-columns: 1fr; }
}

@media print {
  .sidebar, .topbar, .form-actions, button { display: none !important; }
  .app-shell { display: block; }
  .content { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}
