/* 接送表 · 零构建静态站样式
   设计取向：暖纸色底、白卡片、一个赭石强调色。手机上优先，打印另有一套。 */

:root {
  --paper: #f4ebdd;
  --paper-deep: #efe3d0;
  --card: #fffdf8;
  --ink: #2a2320;
  --ink-soft: #4a3f37;
  --muted: #7e6f60;
  --faint: #b9a895;
  --line: #e4d5bf;
  --accent: #b4552d;
  --accent-soft: #fbe3da;
  --warn-bg: #fcefe2;
  --warn-line: #d98b45;
  --ok: #2e6f5e;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(80, 55, 30, 0.06), 0 12px 32px rgba(80, 55, 30, 0.1);
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- 头部 ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(244, 235, 221, 0.86);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.head-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: 0.06em; }
.brand-tag {
  font-size: 12px;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 99px;
  padding: 1px 8px;
  line-height: 1.6;
}

/* ---------- 首屏 ---------- */

.hero, .preview, .editor, .result, .story, .faq {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
  scroll-margin-top: 76px;
}

.hero { padding-top: 48px; padding-bottom: 40px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(32px, 8.2vw, 56px);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.lede { margin: 0 0 28px; font-size: 17px; color: var(--ink-soft); max-width: 34em; }
.lede strong {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(180, 85, 45, 0.45);
  text-decoration-thickness: 6px;
  text-underline-offset: -2px;
  text-decoration-skip-ink: none;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.micro { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- 按钮 ---------- */

button, .button {
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}

.primary, .ghost {
  border-radius: 999px;
  padding: 13px 24px;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  min-height: 48px;
}

.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(180, 85, 45, 0.24);
}
.primary:hover { background: #a04a26; }
.primary:active { transform: translateY(1px); }

.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.ghost:hover { background: var(--card); border-color: var(--faint); }

.sm { padding: 8px 16px; font-size: 14px; min-height: 38px; }
.big { padding: 16px 32px; font-size: 18px; }

.icon {
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 20px;
  line-height: 1;
  padding: 8px;
  border-radius: 8px;
}
.icon:hover { color: var(--accent); background: var(--accent-soft); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 预览 ---------- */

.preview { padding-bottom: 48px; }
.preview-head h2 { margin: 0 0 6px; font-size: 22px; }
.preview-head p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

.preview-frame {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card);
}
.preview-frame img { display: block; width: 100%; height: auto; }

/* ---------- 编辑器 ---------- */

.editor { padding-bottom: 40px; }

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 20px;
}
.step h2 {
  margin: 0 0 16px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-no {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.sub { margin: 26px 0 12px; font-size: 16px; color: var(--ink-soft); }

.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

input[type="text"], input[type="time"], input[type="number"], select {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  width: 100%;
  min-height: 46px;
}
input[type="time"] { font-family: var(--mono); letter-spacing: 0.02em; }
input::placeholder { color: var(--faint); }

.list { display: grid; gap: 10px; margin-bottom: 10px; }

.kid-row, .adult-row, .class-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.kid-row { display: grid; gap: 10px; grid-template-columns: 1fr auto; }
.kid-row .name { grid-column: 1 / 2; }
.kid-row .del { grid-column: 2 / 3; grid-row: 1; align-self: start; }
.kid-times {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.kid-times label { font-size: 12px; color: var(--muted); display: block; }
.kid-times input { margin-top: 4px; padding: 8px 6px; min-height: 42px; }
.kid-times input, .class-times input { min-width: 0; }

.adult-row { display: flex; align-items: center; gap: 8px; padding: 4px 12px; }
.adult-row input { border: 0; padding-left: 2px; min-height: 40px; }
.adult-row input:focus { background: #fffaf2; }

.class-row { display: grid; gap: 10px; }
.class-top { display: flex; align-items: center; gap: 8px; }
.class-top select { width: auto; min-width: 96px; }
.class-top .del { margin-left: auto; }
.class-row .title { font-weight: 600; }
.class-times {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.class-times .dash { color: var(--faint); text-align: center; }
.class-travel {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.class-travel input { width: 72px; text-align: center; }
.class-who { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.field-note { margin: 8px 0 18px; font-size: 13px; color: var(--muted); }

.presets { margin-top: 14px; font-size: 14px; color: var(--muted); }.presets-label { margin-right: 4px; }
.preset {
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 99px;
  padding: 5px 12px;
  margin: 0 6px 6px 0;
  font-size: 14px;
}
.preset:hover { border-color: var(--accent); color: var(--accent); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0 24px;
}

/* ---------- 粘贴课表 ---------- */

.class-tools { display: flex; flex-wrap: wrap; gap: 10px; }

.paste-dialog {
  border: 0;
  border-radius: 20px;
  padding: 24px;
  width: calc(100vw - 32px);
  max-width: 560px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.paste-dialog::backdrop { background: rgba(42, 35, 32, 0.42); }
.paste-dialog h2 { margin: 0 0 8px; font-size: 20px; }
.paste-dialog .field-note { margin: 0 0 12px; }
.paste-dialog textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.9;
  resize: vertical;
}
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- 结果 ---------- */

.result { padding-bottom: 40px; }
.result-head h2 { margin: 8px 0 4px; font-size: 24px; }
.result-head p { margin: 0 0 18px; color: var(--muted); }

.issue {
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-line);
}
.issue.error {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}
.issue-title { margin: 0 0 6px; font-weight: 700; font-size: 17px; }
.issue-detail { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }

.fixes { display: flex; flex-wrap: wrap; gap: 8px; }
.fix {
  border: 1px solid rgba(180, 85, 45, 0.35);
  background: #fff;
  color: var(--accent);
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 14px;
  min-height: 36px;
}
.fix:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.week {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 18px;
  margin: 18px 0;
}

.day-block { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.day-block:last-child { border-bottom: 0; }

.day-head { display: flex; align-items: baseline; gap: 10px; }
.day-name { font-weight: 700; font-size: 17px; }
.day-date { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.day-empty { color: var(--faint); font-size: 14px; margin: 6px 0 0; }

.items { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 15px;
}
.item .t {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  min-width: 108px;
}
.item .kid {
  font-size: 13px;
  color: var(--k, var(--muted));
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.item .kid::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--k, var(--faint));
  display: inline-block;
}
.item .title { font-weight: 600; }
.item .place { color: var(--muted); font-size: 14px; }
.item .chip {
  margin-left: auto;
  font-size: 13px;
  border-radius: 99px;
  padding: 2px 10px;
  background: #f2e7d6;
  color: #6b5a45;
}
.item .chip.unset { background: var(--accent-soft); color: var(--accent); }
.item.school { color: var(--muted); }
.item.school .title { font-weight: 400; }

.export-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  margin-top: 4px;
}
.export-panel img { width: 100%; height: auto; border-radius: 12px; display: block; }
.export-panel .field-note { margin-bottom: 8px; }

/* ---------- 故事 / FAQ ---------- */

.story, .faq { padding-bottom: 44px; }
.story h2, .faq h2 { font-size: 22px; margin: 26px 0 12px; }
.story p { margin: 0 0 14px; color: var(--ink-soft); max-width: 36em; }

.faq dl { margin: 0; }
.faq dt { font-weight: 700; margin-top: 16px; }
.faq dd { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- 页脚 ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  margin-top: 20px;
}
.foot-inner { max-width: 860px; margin: 0 auto; padding: 28px 20px 40px; }
.foot-inner p { margin: 0 0 6px; font-size: 14px; }
.muted { color: var(--muted); }
.site-foot a { color: var(--accent); }

/* 客服 QQ：链接 + 复制按钮（和 www.wuxve.top 的交互一致） */
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.copy-qq {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 12px;
  min-height: 28px;
  line-height: 1.4;
}
.copy-qq:hover { border-color: var(--accent); color: var(--accent); }
.copy-qq.is-done { color: var(--ok); border-color: var(--ok); }
.site-foot .beian { font-size: 12.5px; color: var(--muted); }
/* 备案号不允许在数字中间折行 */
.beian a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.beian a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 99px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.noscript {
  margin: 20px;
  padding: 16px;
  border-radius: 12px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
}

/* ---------- 打印 ---------- */

.print-area { display: none; }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  .site-head, .hero, .preview, .editor, .result, .export-panel,
  .story, .faq, .site-foot, .toast, .noscript, .skip { display: none !important; }
  .print-area { display: block; }
  .print-area .print-title { font-size: 20pt; font-weight: 700; margin: 0 0 4pt; }
  .print-area .meta { font-size: 9pt; color: #555; margin: 0 0 10pt; }
  .print-area table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .print-area th, .print-area td {
    border: 1px solid #bbb;
    padding: 5pt 6pt;
    text-align: left;
    vertical-align: top;
  }
  .print-area th { background: #f2efe9; font-weight: 700; }
  .print-area .day { font-weight: 700; white-space: nowrap; }
  .print-area .warnings { margin: 8pt 0 10pt; font-size: 9pt; border-left: 3pt solid #b4552d; padding-left: 6pt; }
  .print-area .warnings ul { margin: 3pt 0 0; padding-left: 12pt; }
  .print-area .warnings li { margin-bottom: 2pt; }
  .print-area .ok { font-size: 9pt; color: #2e6f5e; margin: 6pt 0 8pt; }
  .print-area .foot { margin-top: 10pt; font-size: 8.5pt; color: #666; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 520px) {
  .hero { padding-top: 32px; }
  .step { padding: 16px; border-radius: 16px; }
  .actions .primary, .actions .ghost { width: 100%; }
  .item .chip { margin-left: 0; }
  .item .t { min-width: 96px; font-size: 13px; }
  /* 手机上原生时间控件的图标会挤掉数字，收起它（点输入框仍会弹系统选择器） */
  .kid-times input::-webkit-calendar-picker-indicator,
  .class-times input::-webkit-calendar-picker-indicator { display: none; }
}

@media (max-width: 420px) {
  .cta-row { display: grid; grid-template-columns: 1fr; }
  .cta-row .primary, .cta-row .ghost { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
