/* ==========================================================================
   韩漫漫画 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1f2430;
  --text-muted: #5b6472;
  --accent: #3a6df0;
  --accent-soft: #eef2ff;
  --line: #e6e9ef;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(31, 36, 48, 0.05);
  --shadow-hover: 0 6px 18px rgba(31, 36, 48, 0.09);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #2b56cc;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd,
dt,
figure,
figcaption {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   layout · 全站骨架
   -------------------------------------------------------------------------- */

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 24px;
}

.brand {
  flex: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent);
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-list > li {
  flex: none;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  min-height: 40px;
  line-height: 24px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 15px;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-link.is-current {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  box-shadow: 0 -6px 0 var(--text), 0 6px 0 var(--text);
}

.site-main {
  flex: 1 1 auto;
  min-width: 0;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 40px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.page-layout.layout-shell {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.home-main,
.inner-main {
  min-width: 0;
}

.site-aside,
.sidebar,
.side-column,
.inner-aside {
  min-width: 0;
}

.sidebar-left .page-layout,
.sidebar-left .layout-shell {
  grid-template-columns: 320px minmax(0, 1fr);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

.breadcrumb-sep {
  color: #a8b0bd;
}

.breadcrumb-current {
  color: var(--text);
}

.page-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.page-description {
  margin-top: 12px;
  max-width: 760px;
  font-size: 16px;
  color: var(--text-muted);
}

.section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.section-intro,
.section-lead {
  margin-top: 8px;
  max-width: 760px;
  font-size: 15px;
  color: var(--text-muted);
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}

.footer-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.footer-note {
  margin-top: 8px;
  max-width: 320px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col-title {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.footer-col li + li {
  margin-top: 6px;
}

.footer-col a {
  display: inline-block;
  padding: 3px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--accent);
}

.footer-copy {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 24px 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   components · 通用组件
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #2b56cc;
  border-color: #2b56cc;
  color: #ffffff;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

.tag:hover,
.tag:focus-visible {
  background: #dde5ff;
  color: #2b56cc;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cover-card {
  min-width: 0;
}

.cover-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.cover-link:hover,
.cover-link:focus-visible {
  border-color: #c9d4f7;
  box-shadow: var(--shadow-hover);
}

.cover-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.cover-name {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.cover-tag {
  margin-top: 4px;
  font-size: 13px;
  color: var(--accent);
}

.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.step-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.step-name {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 600;
}

.step-result,
.step-desc {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-muted);
}

.aside-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.aside-block + .aside-block {
  margin-top: 20px;
}

.aside-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.aside-text {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.aside-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
}

.field-list {
  margin-top: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.field-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.field-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.field-mean,
.field-value {
  font-size: 14px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.field-table {
  margin-top: 16px;
  font-size: 14px;
  text-align: left;
}

.field-table th,
.field-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.field-table thead th {
  background: #f2f4f8;
  font-weight: 600;
  color: var(--text);
}

.field-table tbody td {
  color: var(--text-muted);
}

.field-table td.field-name {
  color: var(--text);
  font-weight: 600;
}

.field-caption {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: left;
}

.aside-note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.aside-links {
  margin-top: 12px;
}

.aside-links li + li {
  margin-top: 6px;
}

.aside-links a {
  display: inline-block;
  padding: 3px 0;
  font-size: 14px;
}

.quick-list,
.rank-list,
.ranking-list,
.basis-list,
.advice-list,
.feedback-list,
.dist-list,
.error-list,
.next-links {
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  align-items: start;
  gap: 32px;
  margin-bottom: 48px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-width: 0;
}

.hero .page-title {
  font-size: 32px;
}

.hero-lead {
  margin-top: 14px;
  max-width: 560px;
  font-size: 16px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-visual {
  min-width: 0;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.hero-visual figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.topic-rows {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.topic-name {
  font-size: 18px;
  font-weight: 600;
}

.topic-feature {
  font-size: 15px;
  color: var(--text);
}

.topic-scope {
  font-size: 15px;
  color: var(--text-muted);
}

.topic-rep {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}

.section-gallery .cover-grid {
  margin-top: 20px;
}

.section-steps .step-list {
  margin-top: 20px;
}

.column-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.index-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.index-link {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
}

.index-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.home-aside .updates-block .batch-group + .batch-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.home-aside .batch-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.home-aside .batch-list {
  margin-top: 8px;
}

.home-aside .batch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
  font-size: 14px;
}

.home-aside .batch-name {
  color: var(--text);
  overflow-wrap: anywhere;
}

.home-aside .batch-progress {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.home-aside .rank-list {
  margin-top: 12px;
}

.home-aside .rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.home-aside .rank-row:first-child {
  border-top: 0;
}

.home-aside .rank-no {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.home-aside .rank-name {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.home-aside .rank-topic {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   pages · 题材分类
   -------------------------------------------------------------------------- */

.section-topic-list .topic-rows {
  margin-top: 20px;
}

.section-topic-list .topic-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 240px);
  gap: 24px;
  align-items: start;
}

.topic-row-main {
  min-width: 0;
}

.section-topic-list .topic-rep {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 0;
}

.section-topic-list .topic-rep a {
  font-size: 14px;
  font-weight: 600;
}

.topic-cover-groups {
  margin-top: 20px;
}

.topic-cover-group + .topic-cover-group {
  margin-top: 28px;
}

.topic-group-name {
  font-size: 18px;
  font-weight: 600;
}

.topic-cover-group .cover-grid {
  margin-top: 12px;
}

.advice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.advice-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.advice-name {
  font-size: 17px;
  font-weight: 600;
}

.advice-text {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-muted);
}

.next-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.next-link-item a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 15px;
  font-weight: 600;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.next-link-item a:hover,
.next-link-item a:focus-visible {
  border-color: #c9d4f7;
  box-shadow: var(--shadow-hover);
}

.aside-quick .quick-list {
  margin-top: 12px;
}

.quick-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.quick-item:first-child {
  border-top: 0;
}

.quick-name {
  color: var(--text);
  font-weight: 600;
}

.quick-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.aside-scope .aside-text + .aside-text {
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   pages · 更新记录
   -------------------------------------------------------------------------- */

.batch-section .batch-group {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.batch-section .batch-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.batch-rows {
  margin-top: 12px;
}

.batch-rows .batch-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.batch-rows .batch-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.batch-rows .batch-name {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.batch-rows .batch-tag {
  font-size: 13px;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.batch-rows .batch-progress {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.batch-rows .batch-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.recent-cover-section .cover-figure {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.recent-cover-section .cover-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.cover-caption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.side-column .aside-section + .aside-section {
  margin-top: 20px;
}

.dist-list {
  margin-top: 12px;
}

.dist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.dist-row:first-child {
  border-top: 0;
}

.dist-name {
  color: var(--text);
  font-weight: 600;
}

.dist-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   pages · 人气位次
   -------------------------------------------------------------------------- */

.ranking-list-section .ranking-list {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.ranking-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.rank-index {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.rank-body {
  min-width: 0;
}

.rank-meta {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-muted);
}

.rank-tag {
  display: inline-block;
  margin-right: 10px;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
}

.rank-change {
  font-size: 13px;
}

.rank-change.is-new {
  color: #1f8a52;
}

.rank-change.is-up {
  color: #1f8a52;
}

.rank-change.is-down {
  color: #c2543a;
}

.rank-change.is-flat {
  color: var(--text-muted);
}

.basis-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.basis-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.basis-name {
  font-size: 17px;
  font-weight: 600;
}

.basis-text {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-muted);
}

.ranking-figure {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ranking-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.ranking-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.change-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.change-note {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.change-note-title {
  font-size: 17px;
  font-weight: 600;
}

.change-note-text {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-muted);
}

.inner-aside .aside-fields .field-list {
  margin-top: 12px;
}

.inner-aside .aside-tip .aside-links {
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   pages · 查阅指引
   -------------------------------------------------------------------------- */

.guide-fields .field-table {
  margin-top: 20px;
}

.guide-path .path-figure {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guide-path .path-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.guide-path .path-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.guide-path .step-list {
  margin-top: 20px;
}

.guide-path .step-item {
  min-width: 0;
}

.guide-tags .tag-list {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.guide-tags .tag-row {
  display: grid;
  grid-template-columns: minmax(120px, 30%) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.tag-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.tag-desc {
  font-size: 15px;
  color: var(--text-muted);
}

.tag-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.feedback-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.feedback-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feedback-name {
  font-size: 17px;
  font-weight: 600;
}

.feedback-desc {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-muted);
}

.guide-faq .faq-item {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.faq-q {
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  float: right;
  font-family: var(--font-mono);
  color: var(--accent);
}

.faq-item[open] .faq-q::after {
  content: "–";
}

.faq-a {
  padding: 0 18px 16px;
  font-size: 15px;
  color: var(--text-muted);
}

.sidebar .side-block + .side-block {
  margin-top: 20px;
}

.side-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.side-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.side-tag-item a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
}

.side-link-list {
  margin-top: 12px;
}

.side-link-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.side-link-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.side-link-list a {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
}

.side-link-note {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-muted);
}

.side-text {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */

.error-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px 56px;
}

.error-hero {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.error-code {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
}

.error-hero h1 {
  margin-top: 8px;
  font-size: 32px;
}

.error-lead {
  margin-top: 12px;
  max-width: 620px;
  font-size: 16px;
  color: var(--text-muted);
}

.error-home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 20px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

.error-home:hover,
.error-home:focus-visible {
  background: #2b56cc;
  color: #ffffff;
}

.error-paths {
  margin-top: 32px;
}

.error-paths h2 {
  font-size: 22px;
}

.error-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.error-list a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 15px;
  font-weight: 600;
}

.error-list a:hover,
.error-list a:focus-visible {
  border-color: #c9d4f7;
  box-shadow: var(--shadow-hover);
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .page-layout,
  .page-layout.layout-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .sidebar-left .page-layout,
  .sidebar-left .layout-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual img {
    aspect-ratio: 16 / 9;
  }

  .section-topic-list .topic-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 12px;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav {
    flex: 1 1 100%;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
  }

  .page-layout,
  .page-layout.layout-shell {
    padding: 24px 16px 40px;
    gap: 28px;
  }

  .page-title,
  .hero .page-title,
  .error-hero h1 {
    font-size: 24px;
  }

  .section-title,
  .aside-title,
  .side-title,
  .error-paths h2 {
    font-size: 20px;
  }

  .hero {
    padding: 20px;
    margin-bottom: 36px;
  }

  .section {
    margin-bottom: 32px;
  }

  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .step-list,
  .advice-list,
  .basis-list,
  .feedback-list,
  .change-notes,
  .next-links,
  .column-index,
  .error-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .batch-rows .batch-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 4px;
  }

  .batch-rows .batch-tag {
    grid-column: 1 / -1;
  }

  .guide-tags .tag-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .field-table th,
  .field-table td {
    padding: 8px 10px;
  }

  .footer-inner {
    padding: 32px 16px 20px;
    gap: 24px;
  }

  .footer-nav {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .footer-copy {
    padding: 14px 16px 28px;
  }

  .error-main {
    padding: 32px 16px 40px;
  }

  .error-hero {
    padding: 20px;
  }

  .error-code {
    font-size: 32px;
  }
}

@media (max-width: 420px) {
  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
