:root {
  --red: #dd2e1e;
  --navy: #0f172a;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #fff;
  --green: #166534;
  --green-bg: #f0fdf4;
  --blue: #1e40af;
  --blue-bg: #eff6ff;
  --orange: #c2410c;
  --orange-bg: #fff7ed;
  --yellow: #854d0e;
  --yellow-bg: #fefce8;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--slate-800);
  background: var(--slate-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--slate-900);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--slate-200);
  background: var(--white);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 3px; border: 0; background: none; cursor: pointer; }
.brand-company { color: #777; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand-divider { width: 1px; height: 20px; background: var(--slate-300); }
.brand-product { color: var(--slate-800); font-weight: 700; font-size: 16px; letter-spacing: .02em; white-space: nowrap; }
.demo-badge { padding: 2px 7px; border: 1px solid #fed7aa; border-radius: 999px; color: var(--orange); background: var(--orange-bg); font-size: 10px; font-weight: 800; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.month-count { border: 0; border-radius: 999px; background: var(--slate-100); padding: 5px 10px; color: var(--slate-700); font-size: 12px; cursor: pointer; white-space: nowrap; }
.month-count b { color: var(--slate-900); font-size: 14px; }
.green { color: var(--green); }.blue { color: var(--blue); }.orange { color: var(--orange); }
.account { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: right; }
.account:hover { background: var(--slate-100); }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--red); font-weight: 800; }
.account-copy { display: flex; flex-direction: column; line-height: 1.2; }
.account-copy b { color: var(--slate-800); font-size: 13px; }.account-copy small { margin-top: 3px; color: var(--slate-500); font-size: 11px; }
.logout { border: 1px solid var(--slate-300); border-radius: 5px; background: var(--white); padding: 5px 9px; cursor: pointer; }
.logout:hover { background: var(--slate-50); }
.mobile-menu { display: none; border: 1px solid var(--slate-300); border-radius: 6px; background: var(--white); padding: 6px 10px; }

.app-shell { display: flex; min-height: calc(100vh - 64px); }
.sidebar { position: sticky; top: 64px; flex: 0 0 240px; width: 240px; height: calc(100vh - 64px); overflow-y: auto; border-right: 1px solid var(--slate-200); background: var(--white); padding: 12px; }
.nav-section { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--slate-100); }
.nav-section:last-child { border-bottom: 0; }
.nav-section h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 2px 12px; color: var(--slate-700); font-size: 12px; letter-spacing: .02em; }
.nav-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 5px; color: var(--red); background: #f4f1f1; font-size: 13px; }
.nav-item { width: 100%; display: block; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.nav-item:hover { background: var(--slate-100); }
.nav-item.is-active { color: var(--white); background: var(--slate-900); }
.nav-item b { display: block; font-size: 14px; }.nav-item small { display: block; margin-top: 1px; color: var(--slate-500); font-size: 11px; line-height: 1.45; }
.nav-item.is-active small { color: var(--slate-300); }
.nav-children { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 0 12px; padding: 0 0 0 8px; border-left: 1px solid var(--slate-200); list-style: none; }
.nav-children button { width: 100%; overflow: hidden; padding: 5px 8px; border: 0; border-radius: 4px; color: var(--slate-600); background: transparent; cursor: pointer; font-size: 12px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.nav-children button:hover { background: var(--slate-100); }
.count-badge { padding: 0 5px; border-radius: 999px; color: var(--white); background: #dc2626; font-size: 10px; }
.new-badge { padding: 1px 4px; border-radius: 3px; color: var(--white); background: #2563eb; font-size: 9px; letter-spacing: .05em; }

.main { min-width: 0; flex: 1; padding: 24px 16px 64px; }
.page { max-width: 1024px; margin: 0 auto; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 20px; line-height: 1.45; }
h2 { font-size: 18px; line-height: 1.45; } h3 { font-size: 15px; line-height: 1.5; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-head p { margin-bottom: 0; color: var(--slate-500); font-size: 12px; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 10px 12px; border: 1px solid #fdba74; border-radius: 7px; background: var(--orange-bg); color: #9a3412; font-size: 12px; }
.demo-notice strong { white-space: nowrap; }

.panel, .article-card, .step-card, .project-card, .help-card { border: 1px solid var(--slate-200); border-radius: var(--radius); background: var(--white); }
.panel { margin-bottom: 24px; padding: 24px; }
.panel.compact { padding: 16px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-title h2, .panel-title h3 { margin: 0; }
.muted { color: var(--slate-500); }.tiny { font-size: 11px; }.small { font-size: 12px; }
.stack { display: grid; gap: 12px; }.stack-lg { display: grid; gap: 20px; }
.divider { height: 1px; margin: 18px 0; background: var(--slate-100); }

.form-step { padding: 0 0 20px; }.form-step + .form-step { padding-top: 20px; border-top: 1px solid var(--slate-100); }
.field-title { display: flex; align-items: center; margin: 0 0 6px; font-weight: 700; }
.step-dot { width: 20px; height: 20px; display: inline-grid; place-items: center; margin-right: 8px; border-radius: 50%; color: var(--white); background: var(--slate-900); font-size: 11px; }
.optional { margin-left: 8px; color: var(--slate-500); font-size: 11px; font-weight: 400; }
.help-text { margin: 0 0 8px; color: var(--slate-500); font-size: 12px; }
.field, select, textarea { width: 100%; border: 1px solid var(--slate-300); border-radius: 5px; background: var(--white); padding: 9px 11px; color: var(--slate-800); }
select { width: auto; min-width: 240px; }.field::placeholder, textarea::placeholder { color: var(--slate-400); }
textarea { min-height: 116px; resize: vertical; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-block label { display: block; margin-bottom: 6px; font-weight: 700; }
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.type-choice { position: relative; display: block; padding: 12px; border: 1px solid var(--slate-300); border-radius: 5px; background: var(--white); cursor: pointer; }
.type-choice.selected { color: var(--white); border-color: var(--slate-900); background: var(--slate-900); }
.type-choice b, .type-choice small { display: block; }.type-choice small { margin-top: 4px; color: var(--slate-500); font-size: 11px; }.type-choice.selected small { color: var(--slate-300); }
.knowledge-empty { padding: 12px; border: 1px dashed var(--slate-300); border-radius: 5px; color: var(--slate-500); font-size: 13px; }
.check-row, .radio-row { display: flex; flex-wrap: wrap; gap: 12px; }.check-row label, .radio-row label { display: flex; align-items: center; gap: 6px; }
.action-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--slate-100); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 13px; border: 1px solid var(--slate-300); border-radius: 5px; background: var(--white); cursor: pointer; font-weight: 700; }
.btn:hover { background: var(--slate-50); }.btn-dark { color: var(--white); border-color: var(--slate-900); background: var(--slate-900); }.btn-dark:hover { background: var(--slate-700); }.btn-blue { color: var(--blue); border-color: #93c5fd; background: var(--blue-bg); }.btn-red { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }.btn-sm { padding: 5px 9px; font-size: 12px; }.btn[disabled] { opacity: .45; cursor: not-allowed; }

.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }.filters { display: flex; flex-wrap: wrap; gap: 7px; }.filters select { min-width: 0; padding: 6px 8px; font-size: 12px; }
.summary { margin-bottom: 14px; padding: 16px; border: 1px solid var(--slate-200); border-radius: var(--radius); background: var(--white); }
.summary p { margin: 0; color: var(--slate-500); font-size: 11px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 440px; margin-top: 8px; }
.summary-grid div { padding: 8px 12px; border: 1px solid var(--slate-200); border-radius: 4px; }.summary-grid dt { color: var(--slate-500); font-size: 11px; }.summary-grid dd { margin: 1px 0 0; font-size: 20px; font-weight: 800; }.summary-grid small { color: var(--slate-500); font-size: 12px; font-weight: 400; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }.tab { padding: 5px 9px; border: 0; border-radius: 4px; color: var(--slate-600); background: transparent; cursor: pointer; }.tab.active { color: var(--white); background: var(--slate-900); }
.article-list { display: grid; gap: 8px; }.article-card { overflow: hidden; }.article-main { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 16px; border: 0; background: transparent; cursor: pointer; text-align: left; }.article-main:hover { background: var(--slate-50); }
.kw-line { overflow: hidden; margin: 0; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.kw-badge { display: inline-block; margin-right: 8px; padding: 2px 7px; border-radius: 3px; color: var(--white); background: var(--slate-900); font-size: 11px; }.article-title { overflow: hidden; margin: 5px 0 0; color: var(--slate-600); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.meta { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 6px; color: var(--slate-500); font-size: 11px; }.meta-tag { padding: 1px 5px; border: 1px solid var(--slate-300); border-radius: 3px; color: var(--slate-700); font-weight: 700; }.meta-soft { padding: 1px 5px; border-radius: 3px; background: var(--slate-100); }
.article-progress { flex: 0 0 160px; text-align: right; }.status { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 12px; }.status.complete { color: var(--green); background: var(--green-bg); }.status.running { color: var(--orange); background: var(--orange-bg); }.status.review { color: var(--blue); background: var(--blue-bg); }
.progress-track { height: 6px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: var(--slate-100); }.progress-track span { display: block; height: 100%; background: var(--slate-900); }.article-progress p { margin: 4px 0 0; color: var(--slate-500); font-size: 11px; }
.article-links { display: flex; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--slate-100); }.article-links button { padding: 4px 8px; border: 1px solid #93c5fd; border-radius: 4px; color: var(--blue); background: var(--blue-bg); cursor: pointer; font-size: 11px; }

.detail-head { margin-bottom: 18px; }.detail-back { margin-bottom: 8px; border: 0; color: var(--blue); background: none; cursor: pointer; text-decoration: underline; }.detail-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }.detail-title-row h1 { margin: 0; }.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--slate-500); font-size: 12px; }
.mode-box { display: flex; gap: 10px; margin-bottom: 20px; padding: 14px; border: 1px solid var(--slate-200); border-radius: var(--radius); background: var(--white); }.mode-option { flex: 1; padding: 10px; border: 1px solid var(--slate-200); border-radius: 5px; }.mode-option.selected { border-color: var(--slate-900); background: var(--slate-50); }
.step-list { display: grid; gap: 12px; }.step-card { padding: 16px; }.step-top { display: grid; grid-template-columns: 66px minmax(0,1fr) auto; gap: 12px; align-items: start; }.step-no { font-weight: 800; }.step-copy h3 { margin: 0 0 3px; }.step-copy p { margin: 0; color: var(--slate-500); font-size: 12px; }.step-result { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 12px; }.step-result.done { color: var(--green); background: var(--green-bg); }.step-result.now { color: var(--orange); background: var(--orange-bg); }
.step-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--slate-100); }

.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }.metric { padding: 14px; border: 1px solid var(--slate-200); border-radius: 6px; background: var(--white); }.metric small { color: var(--slate-500); }.metric b { display: block; margin-top: 5px; font-size: 22px; }.metric em { color: var(--slate-500); font-size: 11px; font-style: normal; }
.table-wrap { overflow-x: auto; }.data-table { width: 100%; min-width: 720px; border-collapse: collapse; }.data-table th, .data-table td { padding: 11px 10px; border-bottom: 1px solid var(--slate-200); text-align: left; vertical-align: middle; }.data-table th { color: var(--slate-500); background: var(--slate-50); font-size: 11px; }.data-table td { font-size: 12px; }.rank { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--slate-700); font-weight: 800; }.rank.first { background: #b45309; }.person { display: flex; align-items: center; gap: 8px; }.person .avatar { width: 28px; height: 28px; font-size: 11px; }
.chart { height: 190px; display: flex; align-items: end; gap: 12px; padding: 16px 18px 26px; border-left: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); }.chart-col { flex: 1; position: relative; min-width: 30px; background: #cbd5e1; border-radius: 4px 4px 0 0; }.chart-col.hot { background: var(--slate-800); }.chart-col span { position: absolute; left: 50%; bottom: -22px; color: var(--slate-500); font-size: 10px; transform: translateX(-50%); }

.project-grid, .help-grid, .image-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.project-card, .help-card { padding: 18px; }.project-card h3, .help-card h3 { margin-bottom: 5px; }.project-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 12px 0; }.project-stats div { padding: 7px; border-radius: 4px; background: var(--slate-50); }.project-stats small { display: block; color: var(--slate-500); }.project-stats b { font-size: 18px; }
.subnav { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--slate-200); }.subnav button { padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; color: var(--slate-500); background: transparent; cursor: pointer; }.subnav button.active { color: var(--slate-900); border-color: var(--slate-900); font-weight: 700; }
.upload-box { display: grid; place-items: center; min-height: 150px; padding: 18px; border: 2px dashed var(--slate-300); border-radius: 7px; background: var(--slate-50); cursor: pointer; text-align: center; }.upload-box:hover { border-color: var(--slate-500); }.file-icon { width: 46px; height: 58px; position: relative; margin-bottom: 10px; border: 2px solid var(--slate-500); border-radius: 4px; background: var(--white); }.file-icon::before { content: ""; position: absolute; top: -2px; right: -2px; width: 15px; height: 15px; border-left: 2px solid var(--slate-500); border-bottom: 2px solid var(--slate-500); background: var(--slate-100); }.file-icon::after { content: "+"; position: absolute; inset: 18px 0 auto; color: var(--red); font-size: 24px; font-weight: 800; }.image-card { overflow: hidden; border: 1px solid var(--slate-200); border-radius: 7px; background: var(--white); }.image-preview { aspect-ratio: 16/9; display: grid; place-items: center; padding: 18px; color: var(--slate-600); background: linear-gradient(135deg,#f1f5f9,#e2e8f0); text-align: center; }.image-card-copy { padding: 12px; }.image-card-copy h3 { margin: 0 0 4px; }.character-row { display: flex; gap: 8px; margin: 10px 0; }.character { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--white); border-radius: 50%; color: var(--white); background: var(--red); font-weight: 800; outline: 1px solid var(--slate-300); }.character.alt { background: var(--slate-700); }
.comment-block { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--slate-200); border-radius: 6px; background: var(--slate-50); }.comment-block p { margin: 0; font-size: 12px; }

.callout { padding: 12px; border: 1px solid #fde68a; border-radius: 6px; color: var(--yellow); background: var(--yellow-bg); font-size: 12px; }.callout.blue { color: var(--blue); border-color: #bfdbfe; background: var(--blue-bg); }.callout.red { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.flow { display: flex; align-items: stretch; gap: 7px; }.flow-step { flex: 1; padding: 12px; border: 1px solid var(--slate-200); border-radius: 6px; background: var(--white); text-align: center; }.flow-arrow { display: grid; place-items: center; color: var(--slate-400); }.manual-icon { width: 32px; height: 32px; display: grid; place-items: center; margin: 0 auto 7px; border-radius: 7px; color: var(--red); background: #f4f1f1; font-weight: 800; }

.modal[hidden] { display: none; }.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(15,23,42,.48); }.modal-panel { width: min(430px,100%); position: relative; padding: 28px; border-radius: 10px; background: var(--white); text-align: center; }.modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; cursor: pointer; font-size: 22px; }.modal-icon { width: 42px; height: 42px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; color: var(--white); background: var(--slate-900); font-size: 20px; font-weight: 800; }.modal-panel h2 { margin-bottom: 8px; }.modal-panel p { margin-bottom: 4px; font-weight: 700; }.modal-panel small { display: block; margin-bottom: 20px; color: var(--slate-500); }

@media (max-width: 920px) {
  .month-count span, .account-copy { display: none; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  .topbar { height: 60px; }.brand-company, .brand-divider, .demo-badge { display: none; }.brand-product { font-size: 14px; }.topbar-right { gap: 6px; }.logout { display: none; }.mobile-menu { display: block; }
  .sidebar { position: fixed; top: 60px; left: 0; z-index: 45; height: calc(100vh - 60px); transform: translateX(-101%); transition: transform .18s ease; }.sidebar.open { transform: translateX(0); }
  .main { padding: 16px 12px 48px; }.page-head { flex-direction: column; }.panel { padding: 16px; }
  .type-grid, .field-grid, .project-grid, .help-grid, .image-grid { grid-template-columns: 1fr; }
  .article-main { grid-template-columns: 1fr; }.article-progress { text-align: left; }.article-progress .progress-track { max-width: 240px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }.mode-box, .flow { flex-direction: column; }.flow-arrow { transform: rotate(90deg); }
  .step-top { grid-template-columns: 52px 1fr; }.step-result { grid-column: 2; justify-self: start; }
}
@media (max-width: 440px) {
  .month-count { display: none; }.summary-grid { grid-template-columns: 1fr; }.metric-grid { grid-template-columns: 1fr; }.brand { gap: 8px; }
}
