/* 袁老师 · 黑客松咨询: 米白底 + 朱红/暖橙 + 墨蓝正文. */
:root {
  --bg: #fbf7f0; --surface: #fff; --ink: #1f2a44; --muted: #7a6f63; --line: #ecdfcc;
  --red: #d9412b; --red-soft: #fbe7e1; --orange: #ef8a24; --orange-soft: #fdf0de;
  --ok: #2f8f5b; --ok-soft: #e3f3e9; --warn: #b7791f;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.ico { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(251,247,240,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand .cn { font-weight: 800; font-size: 20px; }
.brand .en { font-family: var(--mono); font-weight: 800; font-size: 19px; letter-spacing: -0.04em; }
.brand .tag { font-size: 12px; color: var(--red); background: var(--red-soft); padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.nav { display: flex; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 6px; color: var(--ink); padding: 6px 10px; border-radius: 10px; font-size: 14px; }
.nav a:hover { background: var(--orange-soft); text-decoration: none; }
.nav a.on { background: var(--red-soft); color: var(--red); font-weight: 600; }
.tabbar { display: none; }
@media (max-width: 720px) {
  .nav { display: none; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
  .tabbar a .ico { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--red); font-weight: 600; }
  body { padding-bottom: 72px; }
}

/* type */
h1 { font-size: 26px; line-height: 1.3; margin: 28px 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 19px; margin: 32px 0 12px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 16px; margin: 20px 0 8px; }
.lead { color: var(--muted); margin: 0 0 20px; }

/* cards & chips */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 12px 0; }
.card.hl { border-color: #f3c7b9; background: linear-gradient(180deg, #fff, #fff8f3); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tile { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; color: var(--ink); }
.tile:hover { border-color: var(--orange); text-decoration: none; }
.tile .badge-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); flex: none; }
.tile .badge-ico.o { background: var(--orange-soft); color: var(--orange); }
.tile .badge-ico.g { background: var(--ok-soft); color: var(--ok); }
.tile b { display: block; font-size: 15px; }
.tile span { font-size: 13px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 999px; background: var(--orange-soft); color: #8a4b0f; white-space: nowrap; }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.gray { background: #f1ece4; color: var(--muted); }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 12px; padding: 10px 16px; font: 600 15px var(--sans); cursor: pointer; background: var(--red); color: #fff; }
.btn:hover { background: #c23621; text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--orange); }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, textarea, select { width: 100%; font: 15px var(--sans); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
textarea { min-height: 140px; font-family: var(--mono); font-size: 14px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--orange-soft); color: #7a4510; font-size: 14px; margin: 12px 0; }
.notice.ok { background: var(--ok-soft); color: #1f6640; }
.notice.err { background: var(--red-soft); color: #9b2a19; }

/* code */
pre, code { font-family: var(--mono); font-size: 13.5px; }
code { background: #f4ece0; padding: 1px 5px; border-radius: 6px; }
pre { position: relative; background: #1f2a44; color: #f6efe4; padding: 14px 16px; border-radius: 12px; overflow-x: auto; line-height: 1.55; }
pre code { background: none; padding: 0; color: inherit; }
.copy { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 8px; padding: 4px 8px; font-size: 12px; cursor: pointer; }

/* prose (guides) */
.prose { font-size: 15.5px; }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; display: block; margin: 12px 0; }
.prose figure { margin: 16px 0; }
.prose figcaption { font-size: 13px; color: var(--muted); text-align: center; }
.prose blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--orange); background: var(--orange-soft); border-radius: 0 12px 12px 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.prose ol, .prose ul { padding-left: 1.4em; }

/* checklist */
.steps { list-style: none; padding: 0; margin: 0; }
.step { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin: 8px 0; color: var(--ink); }
.step:hover { border-color: var(--orange); text-decoration: none; }
.step .num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); flex: none; }
.step.done .num { background: var(--ok-soft); color: var(--ok); }
.step b { display: block; font-size: 15px; }
.step small { color: var(--muted); }
.progress { height: 8px; background: #f1e6d6; border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--red)); }

/* booking */
[hidden] { display: none !important; }
.step-label { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-weight: 600; }
.step-label > b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { text-align: center; font-size: 12px; color: var(--muted); }
.cal-day { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); font: inherit; }
.cal-day b { font-size: 17px; line-height: 1.2; }
.cal-day small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cal-day:hover:not(:disabled) { border-color: var(--orange); }
.cal-day.on { background: var(--red); border-color: var(--red); color: #fff; }
.cal-day.on small { color: #ffe3dc; }
.cal-day:disabled { background: transparent; border-style: dashed; opacity: .45; cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.slot { margin: 0; padding: 10px; text-align: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font: 600 15px var(--mono); cursor: pointer; white-space: nowrap; }
.slot input { display: none; }
.slot small { font-weight: 400; color: var(--muted); }
.slot:hover, .slot.on { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.confirm-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 8px; padding: 12px 14px; border-radius: 14px; background: var(--orange-soft); }
@media (max-width: 520px) { .cal-day small { display: none; } .cal-day { padding: 10px 0; } }

/* file picker / attachments */
.picker { display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; min-width: 0; }
.picker input { display: none; }
.picker .picked { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.attach { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.attach img { display: block; max-width: 220px; max-height: 160px; border-radius: 10px; border: 1px solid var(--line); }

/* lists */
.list { list-style: none; padding: 0; margin: 0; }
.list.card { padding: 4px 18px; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 20px 0 32px; font-size: 13px; color: var(--muted); }

/* alternative steps (任选其一) */
.steps li.choice { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; margin: 8px 0; }
.choice-head { margin: 0 0 10px; flex-wrap: wrap; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); }
.choice-card:hover { border-color: var(--orange); text-decoration: none; }
.choice-card .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); flex: none; }
.choice-card.done { border-color: #bfe3cc; }
.choice-card.done .num { background: var(--ok-soft); color: var(--ok); }
.choice-card small { color: var(--muted); }
.choice-card .chip { align-self: flex-start; }

/* home review map */
.review summary { cursor: pointer; list-style: none; }
.review summary::-webkit-details-marker { display: none; }
.review summary::after { content: "▾"; color: var(--muted); }
.review[open] summary::after { content: "▴"; }
.review-list { list-style: none; padding: 0; margin: 10px 0 0; columns: 2 260px; }
.review-list li { break-inside: avoid; padding: 4px 0; }
.review-list a { color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.review-list a.done { color: var(--muted); }
.review-list a.done .ico { color: var(--ok); }

/* long commands / prompts wrap instead of running under the copy button */
pre { white-space: pre-wrap; word-break: break-all; padding-right: 72px !important; }
.prose .logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 12px 0; }
.prose .logo-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
.prose a.logo-card:hover { border-color: var(--orange); text-decoration: none; }
.prose .logo-card img { width: 36px; height: 36px; object-fit: contain; border: 0; border-radius: 8px; margin: 0; flex: none; }
.prose .logo-card b { display: block; font-size: 15px; }
.prose .logo-card small { color: var(--muted); font-size: 13px; }
