:root {
  --ink: #22362f;
  --muted: #6e7e76;
  --cream: #f7f2ea;
  --paper: #fffdf9;
  --line: #e8ded0;
  --green: #23493b;
  --green-2: #3b755d;
  --coral: #d66d52;
  --yellow: #f2c969;
  --shadow: 0 16px 42px rgba(53, 48, 37, .09);
  --radius: 22px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 90% -5%, #f9e8ca 0, transparent 33rem), var(--cream); }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.shell { width: min(1120px, 100%); margin: 0 auto; padding: 0 22px 110px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 0 max(22px, calc((100vw - 1120px) / 2)); background: rgba(247,242,234,.9); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(232,222,208,.7); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .05em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: var(--cream); font-size: 17px; }
.brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .14em; font-weight: 600; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .ghost-btn { background: transparent; color: var(--ink); padding: 9px 12px; border-radius: 999px; }
.icon-btn:hover, .ghost-btn:hover { background: rgba(35,73,59,.08); }
.primary-btn, .secondary-btn, .danger-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 999px; min-height: 44px; padding: 0 20px; font-weight: 700; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.primary-btn { color: #fffdf9; background: var(--green); box-shadow: 0 8px 18px rgba(35,73,59,.16); }
.secondary-btn { color: var(--green); background: #e5eee7; }
.danger-btn { color: #fff; background: var(--coral); }
.primary-btn:hover, .secondary-btn:hover, .danger-btn:hover { transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: wait; transform: none; }
.hero { padding: 58px 0 32px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 26px; align-items: end; }
.eyebrow { margin: 0 0 12px; color: var(--coral); font-size: 12px; letter-spacing: .18em; font-weight: 800; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: clamp(34px, 5vw, 58px); line-height: 1.05; letter-spacing: -.05em; }
h2 { font-size: clamp(23px, 3vw, 34px); letter-spacing: -.04em; margin-bottom: 8px; }
h3 { font-size: 17px; margin-bottom: 8px; }
.lede { color: var(--muted); line-height: 1.8; max-width: 650px; }
.hero-card { position: relative; overflow: hidden; padding: 24px; min-height: 205px; color: #fffdf9; border-radius: var(--radius); background: linear-gradient(140deg, #2d5d49, #172d27); box-shadow: var(--shadow); }
.hero-card::after { content: ""; position: absolute; width: 190px; height: 190px; right: -30px; top: -58px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; box-shadow: 0 0 0 20px rgba(255,255,255,.05), 0 0 0 42px rgba(255,255,255,.04); }
.hero-card p { color: rgba(255,253,249,.72); line-height: 1.6; max-width: 260px; }
.hero-card strong { display: block; font-size: 48px; line-height: 1; margin: 16px 0 8px; }
.section { margin-top: 38px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 3px 0 16px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,249,.58); color: var(--muted); }
.chip.active { border-color: var(--green); background: var(--green); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { overflow: hidden; border: 1px solid rgba(232,222,208,.85); border-radius: var(--radius); background: var(--paper); box-shadow: 0 5px 20px rgba(53, 48, 37, .04); }
.card-link { display: block; height: 100%; }
.card-body { padding: 17px; }
.card h3 { font-size: 18px; line-height: 1.35; }
.meta { color: var(--muted); font-size: 12px; line-height: 1.7; }
.cover { position: relative; aspect-ratio: 1.35; overflow: hidden; background: linear-gradient(135deg, #dfe8dc, #f4dac3); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.placeholder::before { content: "✣"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(35,73,59,.35); font-size: 64px; }
.cover .tag { position: absolute; left: 12px; top: 12px; padding: 5px 9px; border-radius: 999px; background: rgba(255,253,249,.86); font-size: 11px; font-weight: 700; }
.badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; color: var(--green); background: #e8f0e9; font-size: 11px; font-weight: 700; }
.work-grid { columns: 3 250px; column-gap: 16px; }
.work-card { display: inline-block; width: 100%; margin: 0 0 16px; break-inside: avoid; }
.work-card .cover { aspect-ratio: .9; }
.detail { padding-top: 32px; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: 28px; align-items: start; }
.detail-copy { padding: 10px 0; }
.detail-copy h1 { font-size: clamp(32px, 5vw, 54px); }
.detail-cover { overflow: hidden; border-radius: 28px; background: #e4e9df; box-shadow: var(--shadow); }
.detail-cover .cover { aspect-ratio: 1.1; }
.info-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 22px 0; border-top: 1px solid var(--line); }
.info-item { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line); }
.info-item span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.info-item b { font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.prose { white-space: pre-wrap; color: #45564e; line-height: 1.9; }
.step-list { display: grid; gap: 12px; counter-reset: step; }
.step { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.step.is-key { border-color: #c8d9c8; box-shadow: 0 8px 24px rgba(59,117,93,.08); }
.step-no { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--coral); font-weight: 800; }
.step-content { min-width: 0; }
.step-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.step-kicker { color: var(--coral); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.step-heading h3 { margin-top: 4px; }
.step-key-badge { flex: 0 0 auto; color: #35664d; background: #e8f0e9; }
.step-summary { margin: 0 0 10px; color: var(--green); font-weight: 700; line-height: 1.7; }
.step-tools { margin: 0 0 12px; padding: 8px 11px; border-radius: 10px; color: var(--muted); background: #f5f1e9; font-size: 13px; line-height: 1.6; }
.step-tools b, .step-points > b, .step-check > b, .step-warning > b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 12px; }
.step-points { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: #f7f5ed; }
.step-points ul { margin: 0; padding-left: 20px; color: #45564e; line-height: 1.8; }
.step-figure { margin: 16px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #f4efe6; }
.step-figure a { display: block; }
.step-figure img { width: 100%; max-height: 420px; object-fit: contain; }
.step-figure figcaption { padding: 8px 11px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.step-figure figcaption span { float: right; color: var(--green-2); }
.step-check, .step-warning { margin-top: 12px; padding: 11px 13px; border-radius: 11px; line-height: 1.7; }
.step-check { background: #edf5ed; }
.step-warning { color: #775a23; background: #fff3ce; }
.step-check p, .step-warning p { margin: 0; font-size: 13px; white-space: pre-wrap; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 20px 0; }
.search { flex: 1 1 220px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--paper); outline: none; }
.search:focus, textarea:focus, select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(59,117,93,.13); }
.form-card { max-width: 680px; margin: 36px auto 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.field { display: grid; gap: 7px; margin: 16px 0; }
.field label { font-size: 13px; font-weight: 700; }
.field small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fffefa; outline: none; }
.field textarea { min-height: 140px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.notice { margin: 14px 0; padding: 13px 15px; border-radius: 13px; color: #775a23; background: #fff3ce; font-size: 13px; line-height: 1.6; }
.notice.error { color: #8d392a; background: #ffebe5; }
.empty { padding: 46px 22px; text-align: center; color: var(--muted); border: 1px dashed #d9ccbb; border-radius: var(--radius); }
.empty b { display: block; margin-bottom: 7px; color: var(--ink); font-size: 18px; }
.skeleton { background: linear-gradient(90deg, #ece4d9, #faf3e8, #ece4d9); background-size: 200% 100%; animation: shine 1.3s infinite; }
.skeleton-card { height: 290px; border-radius: var(--radius); }
@keyframes shine { to { background-position: -200% 0; } }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 88px; transform: translateX(-50%); max-width: min(88vw, 460px); padding: 12px 17px; color: #fff; border-radius: 999px; background: rgba(31,43,37,.94); box-shadow: var(--shadow); font-size: 13px; }
.bottom-nav { position: fixed; z-index: 25; bottom: 0; left: 0; right: 0; display: none; justify-content: space-around; padding: 9px max(8px, env(safe-area-inset-left)) calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,253,249,.94); backdrop-filter: blur(18px); }
.bottom-nav a { display: grid; gap: 3px; justify-items: center; color: var(--muted); font-size: 11px; }
.bottom-nav a.active { color: var(--green); font-weight: 800; }
.loading { display: grid; place-items: center; min-height: 45vh; color: var(--muted); }
.file-list { display: grid; gap: 8px; margin-top: 16px; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; }
.project-list { display: grid; gap: 13px; }
.project-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.project-card-head { display: flex; justify-content: space-between; gap: 15px; }
.status { padding: 5px 9px; border-radius: 999px; color: var(--green); background: #e8f0e9; font-size: 11px; white-space: nowrap; }
.status[data-status="completed"] { color: #765523; background: #fff0c9; }
.status[data-status="archived"] { color: var(--muted); background: #eceae5; }
.status[data-status="pending"] { color: #765523; background: #fff0c9; }
.status[data-status="published"] { color: #35664d; background: #e8f0e9; }
.status[data-status="removed"] { color: #8d392a; background: #ffebe5; }
.note-box { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.note-box textarea { min-height: 70px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; }
.note-history { display: grid; gap: 8px; margin-top: 14px; }
.note-entry { padding: 10px 12px; border-left: 3px solid #c9d9c8; background: #f7f5ed; }
.note-entry time { color: var(--muted); font-size: 11px; }
.note-entry p { margin: 4px 0 0; color: var(--ink); white-space: pre-wrap; }
.review-line { margin: 10px 0 0; color: #765523; font-size: 13px; }
.work-owner-cover { width: 100%; max-height: 240px; object-fit: cover; margin-bottom: 14px; border-radius: 14px; }
.favorite-card .card-body { display: grid; gap: 8px; }
.favorite-card h3 { margin: 0; }
.favorite-card h3 a { color: var(--ink); }
.upload-preview { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.footer { margin-top: 48px; color: var(--muted); font-size: 12px; text-align: center; }
@media (max-width: 780px) {
  .shell { padding: 0 16px 98px; }
  .topbar { min-height: 66px; padding: 0 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 35px; }
  .hero-card { min-height: 175px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .card-body { padding: 13px; }
  .card h3 { font-size: 15px; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-cover { order: -1; }
  .bottom-nav { display: flex; }
  .top-actions .desktop-only { display: none; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 430px) {
  h1 { font-size: 34px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .cover { aspect-ratio: 1.05; }
  .hero-card strong { font-size: 40px; }
  .info-list { grid-template-columns: 1fr 1fr; }
}
/* 步骤视频由点击创建播放器，页面初次加载不请求视频文件。 */
.step-video { margin: 18px 0; padding: 16px; border: 1px solid #dfd9cc; border-radius: 16px; background: #faf8f3; }
.step-video video { display: block; width: 100%; max-height: 540px; background: #192b25; border-radius: 12px; }
.step-video figcaption { margin-top: 10px; color: #566c63; font-size: 14px; }

/* 内容尚在积累时，先呈现可制作纸样与明确的试做指引。 */
.home-hero { align-items: center; padding-top: 42px; }
.home-small-note { margin: 24px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .05em; }
.home-feature { position: relative; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.home-feature .cover { aspect-ratio: 1.45; background: #eee8dc; }
.home-feature .cover img, .pattern-card .cover img { object-fit: contain; }
.home-feature-copy { position: relative; padding: 18px 50px 18px 20px; }
.home-feature-copy .eyebrow { font-size: 10px; margin-bottom: 6px; }
.home-feature-copy h2 { font-size: 20px; line-height: 1.35; }
.home-feature-copy p:not(.eyebrow) { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.home-feature-arrow { position: absolute; right: 20px; top: 24px; font-size: 23px; }
.home-start-note { padding: 30px; background: #e5eee7; border-radius: 24px; }
.home-patterns .filters { margin: 14px 0 22px; }
.pattern-card-labels { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pattern-card-labels .meta { margin: 0; font-size: 12px; }
.pattern-provenance { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.home-guide { border-top: 1px solid var(--line); padding-top: 32px; }
.home-guide-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.home-guide-grid article { padding: 24px; background: #edf0e7; border-radius: 18px; }
.home-guide-grid span { color: var(--green-2); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.home-guide-grid h3 { margin: 14px 0 10px; }
.home-guide-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.home-share { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px; margin: 40px 0 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }
.home-share h2 { font-size: 26px; }
.home-share p:last-child { margin: 0; color: var(--muted); line-height: 1.8; }
.home-share a { flex-shrink: 0; }
@media(max-width:700px) { .home-hero { padding-top: 30px; } .home-feature { margin-top: 2px; } .home-feature .cover { aspect-ratio: 1.8; } .home-guide-grid { grid-template-columns: 1fr; } .home-guide-grid article { padding: 20px; } .home-share { align-items: flex-start; flex-direction: column; padding: 22px; gap: 18px; } .home-share h2 { font-size: 24px; } }
