/* 个人开发笔记 · 全站共享样式（2026-09-11 重构：多项目作品集站）
   微信兼容约束：只用 flex/圆角/阴影等老特性；不用 :has()/OKLCH/dvh/aspect-ratio/gap
   响应式：单断点 600px——PC 三卡片横排等宽、列表舒展；手机竖排堆叠、左右安全边距、
   点击区 ≥56px、无横向滚动 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #F5F3EE;            /* 与 App page_bg 一致 */
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text-2: #6B6B6B;
  --text-3: #ABABAB;
  --green: #6B8F71;         /* App primary_green */
  --link: #059669;          /* App link_green */
  --line: #E8E4DC;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.9 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

a { color: var(--link); }

.page { max-width: 680px; margin: 0 auto; padding: 36px 20px 56px; }
.page-wide { max-width: 960px; }

/* ---------- 面包屑（全站统一：首页 > 板块 > 项目 > 条目；末级不可点） ---------- */
.breadcrumb { margin: 0 0 20px; font-size: 14px; line-height: 1.8; color: var(--text-2); }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--link); }
.breadcrumb .sep { margin: 0 6px; color: var(--text-3); }
.breadcrumb .current { color: var(--text-3); }

/* ---------- 入口页：三功能卡片（PC 横排等宽 / 手机竖排） ---------- */
.site-header h1 { margin: 0; font-size: 30px; letter-spacing: 2px; }
.site-header .subtitle { margin: 10px 0 0; color: var(--text-2); font-size: 15px; }

.cards { margin-top: 32px; display: flex; flex-direction: row; align-items: stretch; }
.card {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  background: var(--card);
  border-radius: 16px;
  padding: 22px 20px;
  margin-right: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  transition: transform .15s ease;
}
.card:last-child { margin-right: 0; }
.card:hover { transform: translateY(-2px); }
.card-icon { font-size: 36px; margin-right: 16px; line-height: 1; }
.card-body { flex: 1; min-width: 0; }
.card-title { display: block; font-size: 19px; font-weight: 600; }
.card-desc { display: block; color: var(--text-2); font-size: 14.5px; }
.card-arrow { color: #CACACA; font-size: 28px; font-weight: 300; }

/* ---------- 列表条目（story/problem/works 通用）：点击区 ≥56px，右箭头 ---------- */
.list { margin-top: 24px; }
.list-item {
  display: flex;
  align-items: center;
  min-height: 56px;
  background: var(--card);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  transition: transform .15s ease;
}
.list-item:hover { transform: translateY(-2px); }
.item-body { flex: 1; min-width: 0; }
.item-title { display: block; font-size: 17px; font-weight: 600; line-height: 1.5; }
.item-sub { display: block; font-size: 13.5px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }
.item-arrow { color: #CACACA; font-size: 22px; font-weight: 300; margin-left: 10px; flex: none; }
/* 当前项目高亮（/problem 项目选择区） */
.list-item.active { border: 1px solid var(--link); }
.item-badge {
  flex: none;
  margin-left: 10px;
  font-size: 12px;
  color: #FFFFFF;
  background: var(--green);
  border-radius: 999px;
  padding: 1px 10px;
}
/* 占位条目：灰色淡化、虚线边、不可点击（仅视觉） */
.list-item.placeholder {
  pointer-events: none;
  border: 1px dashed var(--text-3);
  background: transparent;
  box-shadow: none;
  color: var(--text-3);
}
.list-item.placeholder .item-title { font-weight: 400; color: var(--text-3); }
.list-item.placeholder .item-sub { color: var(--text-3); }
.list-item.placeholder .item-arrow { color: var(--text-3); }

/* ---------- 作品卡片缩略图（方形 96px，方形 logo 零裁切，避开 aspect-ratio） ---------- */
.work-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; margin-right: 16px; flex: none; }

/* ---------- 内容页（文章 / 问题详情） ---------- */
article h1 { font-size: 28px; margin: 12px 0 4px; }
article .lead { color: var(--text-2); margin: 4px 0 0; }
article h2 {
  font-size: 21px;
  margin: 40px 0 6px;
  padding-left: 12px;
  border-left: 4px solid var(--green);
  line-height: 1.5;
}
article h3 { font-size: 18px; margin: 24px 0 4px; }
article p { margin: 8px 0; }
article ul { margin: 8px 0; padding-left: 22px; }

.problem { background: var(--card); border-radius: 16px; padding: 24px 22px; margin-top: 24px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.problem h2 { margin: 0 0 6px; border: none; padding: 0; }
.problem .tag { display: inline-block; font-size: 12.5px; color: var(--link); border: 1px solid var(--link); border-radius: 999px; padding: 1px 10px; margin-right: 8px; vertical-align: 2px; }
.problem h3 { color: var(--green); }

/* ---------- 下载说明（works/hear 落地页） ---------- */
.download-note { color: var(--text-3); font-size: 14px; }

/* ---------- 页脚（备案号：工信部要求挂备案号并链接管局系统，勿删） ---------- */
.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13.5px;
  text-align: center;
}
.site-footer p { margin: 4px 0; }
.beian a { color: var(--text-2); text-decoration: none; }

/* ---------- 移动端（≤600px）：竖排堆叠、安全边距、点击区适配 ---------- */
@media (max-width: 600px) {
  .page { padding: 24px 16px 48px; }
  .site-header h1 { font-size: 26px; }
  .cards { flex-direction: column; }
  .card { margin-right: 0; margin-bottom: 16px; }
  .card:last-child { margin-bottom: 0; }
  .breadcrumb { font-size: 13px; }
  .list-item { padding: 12px 14px; }
  .work-thumb { width: 72px; height: 72px; }
  article h1 { font-size: 26px; }
  article p { margin: 12px 0; }   /* 手机段落间距加大，适配手机阅读 */
}
