/* 旅游行程规划 —— 公共样式（2026-09-12 public 分支） */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #2563eb; --blue-d: #1d4ed8; --ink: #111827; --sub: #6b7280;
  --bg: #f3f6fb; --card: #ffffff; --line: #e5e7eb; --good: #059669; --warn: #b45309;
}
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100vh;
  padding: 20px 14px 40px; display: flex; flex-direction: column; align-items: center;
}
.wrap { width: 100%; max-width: 720px; padding-bottom: 62px; }  /* 给右下角反馈悬浮钮留位 */
.hero { text-align: center; margin: 18px 0 22px; }
.hero h1 { font-size: 26px; letter-spacing: .5px; }
.hero p { color: var(--sub); font-size: 14px; margin-top: 8px; }
.card {
  background: var(--card); border-radius: 14px; padding: 20px;
  box-shadow: 0 2px 10px rgba(17, 24, 39, .06); margin-bottom: 16px;
}
.card h2 { font-size: 17px; margin-bottom: 14px; }
label.field { display: block; font-size: 14px; color: #374151; margin: 14px 0 6px; font-weight: 600; }
label.field small { color: var(--sub); font-weight: 400; }
input[type=text], input[type=date], select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid #bfdbfe; border-color: var(--blue); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; gap: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 14px;
  cursor: pointer; user-select: none; background: #fff; color: #374151;
}
.chip input { display: none; }
.chip:has(input:checked) { background: #eff6ff; border-color: var(--blue); color: var(--blue-d); font-weight: 600; }
.btn {
  display: inline-block; width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: var(--blue); color: #fff; font-size: 17px; font-weight: 700;
  cursor: pointer; margin-top: 20px; font-family: inherit; text-align: center; text-decoration: none;
}
.btn:hover { background: var(--blue-d); }
.btn:disabled { background: #93c5fd; cursor: wait; }
.btn.secondary { background: #fff; color: var(--blue-d); border: 1px solid var(--blue); }
.btn.small { width: auto; padding: 10px 18px; font-size: 15px; margin-top: 0; }
.foot { text-align: center; color: #9ca3af; font-size: 12px; margin-top: 18px; line-height: 1.9; }
.err {
  display: none; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;
  border-radius: 10px; padding: 11px 14px; font-size: 14px; margin-top: 14px; white-space: pre-wrap;
}
/* 进度页 */
.stage-big { font-size: 21px; font-weight: 700; margin: 6px 0 18px; }
.bar { height: 14px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, #60a5fa, var(--blue)); border-radius: 999px; transition: width .8s; }
.meta { display: flex; justify-content: space-between; color: var(--sub); font-size: 13px; margin-top: 12px; }
.spin { display: inline-block; animation: sp 1.2s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
/* 结果页 */
.stat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .stat { grid-template-columns: 1fr; } }
.stat .box { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat .box .t { font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.stat .box .v { font-size: 19px; font-weight: 800; color: var(--ink); }
.stat .box .d { font-size: 12px; color: var(--sub); margin-top: 6px; line-height: 1.7; }
.day { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0; }
.day h3 { font-size: 16px; margin-bottom: 4px; }
.day .theme { color: var(--sub); font-size: 13px; margin-bottom: 12px; }
.item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); }
.item:first-of-type { border-top: none; }
.item .no {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: #eff6ff;
  color: var(--blue-d); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.item .bd { flex: 1; }
.item .bd .nm { font-weight: 700; font-size: 15px; }
.item .bd .tm { color: var(--good); font-size: 13px; margin-left: 8px; font-weight: 400; }
.item .bd .ds { color: #4b5563; font-size: 13px; margin-top: 3px; line-height: 1.6; }
.item .bd .tr { color: var(--sub); font-size: 12px; margin-top: 3px; }
.tips { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #92400e; margin-top: 12px; line-height: 1.8; }
.warns { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--warn); margin-top: 12px; line-height: 1.8; }
.actions { display: flex; gap: 12px; margin: 16px 0; }
.actions .btn { margin-top: 0; }

/* ---------- 意见反馈：悬浮球 + 弹层（form / progress / result / map 全站共用，v3 需求 6） ---------- */
.fab {
  position: fixed; right: 16px; bottom: 22px; z-index: 1250;
  width: 52px; height: 52px; border-radius: 50%; padding: 0;
  background: #fff; border: 1.5px solid var(--blue); color: var(--blue-d);
  font-size: 22px; line-height: 1; font-family: inherit; cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .28);
}
.fab:hover { background: #eff6ff; }
.fab:active { transform: scale(.96); }
@media (max-width: 640px) { .fab { width: 46px; height: 46px; font-size: 19px; right: 12px; bottom: 16px; } }
.mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1300; }
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 74px;
  width: min(420px, 92vw); background: #fff; border-radius: 16px; padding: 18px;
  z-index: 1400; box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}
.sheet h3 { font-size: 16px; color: var(--ink); margin: 0 0 4px; }
.sheet .sh { font-size: 12.5px; color: var(--sub); margin-bottom: 10px; }
.sheet textarea {
  width: 100%; height: 104px; border: 1px solid var(--line); border-radius: 11px; padding: 11px;
  font-size: 14px; font-family: inherit; color: #374151; resize: none; background: #f8fafc; box-sizing: border-box;
}
.sheet textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--blue); background: #fff; }
.sheet .sb { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.sheet .sb button {
  border-radius: 10px; padding: 10px 18px; font-size: 14px; font-weight: 700;
  font-family: inherit; cursor: pointer; border: 1px solid #d1d5db; background: #fff; color: #374151;
}
.sheet .sb .primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.sheet .sb button:disabled { opacity: .6; cursor: wait; }
.smsg { font-size: 13px; margin-top: 10px; }
.smsg.ok { color: var(--good); font-weight: 700; }
.smsg.bad { color: #b91c1c; }

/* ---------- 修改行程入口卡（结果页） ---------- */
.revise {
  border: 2px dashed var(--blue); background: #f0f6ff; border-radius: 14px;
  padding: 14px; margin-bottom: 16px;
}
.revise[role=button] { cursor: pointer; }
.revise[role=button]:hover { background: #e6f0ff; }
.revise .t { font-size: 15px; font-weight: 800; color: var(--blue-d); }
.revise .d { font-size: 12.5px; color: var(--sub); margin-top: 5px; line-height: 1.6; }
.revise .n { font-size: 12px; color: var(--warn); margin-top: 6px; font-weight: 700; }
.revise-off { border-color: #9ca3af; background: #f9fafb; }
.revise-off .t, .revise-off .n { color: #6b7280; }

/* ---------- 修改弹窗 ---------- */
.modal {
  position: fixed; left: 50%; transform: translateX(-50%); top: 90px;
  width: min(460px, 92vw); background: #fff; border-radius: 16px; padding: 18px;
  z-index: 1400; box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}
.modal .mt { font-size: 17px; font-weight: 800; color: var(--ink); }
.modal .ml { font-size: 13px; color: #374151; margin: 12px 0 7px; font-weight: 600; }
.modal textarea {
  width: 100%; height: 108px; border: 1px solid var(--line); border-radius: 11px; padding: 11px;
  font-size: 14px; font-family: inherit; color: #374151; resize: none; background: #f8fafc; box-sizing: border-box;
}
.modal textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--blue); background: #fff; }
.modal .mrow { display: flex; justify-content: space-between; margin-top: 7px; gap: 10px; }
.modal .mh { font-size: 12px; color: #9ca3af; }
.modal .mcount { font-size: 12px; color: var(--sub); font-weight: 700; }
.modal .mcount.over { color: #b91c1c; }
.modal .mc { font-size: 13px; color: var(--warn); font-weight: 700; margin-top: 10px; }
.modal .mb {
  display: block; width: 100%; background: var(--blue); color: #fff; text-align: center; font-size: 16px;
  font-weight: 800; padding: 13px; border-radius: 12px; margin-top: 12px; border: none;
  font-family: inherit; cursor: pointer;
}
.modal .mb:disabled { background: #93c5fd; cursor: wait; }
.modal .mcan { text-align: center; color: var(--sub); font-size: 14px; margin-top: 11px; cursor: pointer; }
.modal .merr { color: #b91c1c; font-size: 13px; margin-top: 10px; }

/* ---------- 版本横幅 / v 标记 / AI 整理描述卡 ---------- */
.verbar {
  background: #dbeafe; color: #1e40af; border-radius: 11px; padding: 10px 13px;
  font-size: 13px; font-weight: 700; margin-bottom: 12px;
}
.verbar a { color: var(--blue-d); }
.vtag {
  background: var(--blue); color: #fff; font-size: 12px; border-radius: 999px;
  padding: 2px 9px; vertical-align: middle; margin-left: 6px; font-weight: 700;
}
.kw { background: #fffbeb; border: 1.5px solid #f59e0b; border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.kw .kt { font-size: 14px; font-weight: 800; color: #92400e; }
.kw .kb {
  background: #fff; border: 1px solid #fde68a; border-radius: 10px; padding: 11px;
  font-size: 13px; color: #374151; line-height: 1.7; margin-top: 9px;
}
.kw .kbtn {
  display: inline-block; margin-top: 9px; background: #f59e0b; color: #fff; font-size: 13px;
  font-weight: 800; padding: 8px 15px; border-radius: 10px; border: none; font-family: inherit; cursor: pointer;
}
.kw .kbtn:hover { background: #d97706; }
.kw .kmsg { font-size: 12px; color: var(--good); font-weight: 700; margin-left: 9px; }

/* ---------- 结果页静态地图预览（v3 需求 4：服务端生成的 thumb.png，点击进完整地图） ---------- */
.mapthumb { position: relative; display: block; border-radius: 12px; overflow: hidden;
            border: 1px solid var(--line); background: #e8eef5; text-decoration: none; }
.mapthumb img { display: block; width: 100%; height: auto; background: #e8eef5; }
.mapthumb .mt-tip-static { position: absolute; right: 8px; bottom: 8px; background: rgba(31, 41, 55, .9);
                           color: #fff; font-size: 12px; padding: 5px 10px; border-radius: 8px; }
.mapthumb .mt-fallback { height: 150px; display: flex; align-items: center; justify-content: center; color: var(--sub); font-size: 13px; }
.thumb-actions { text-align: center; margin-top: 12px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.offline-hint { text-align: center; font-size: 11.5px; color: #9ca3af; margin-top: 8px; }

/* ---------- 后台管理（/admin，v3 需求 8） ---------- */
.adm-wrap { width: 100%; max-width: 1080px; }
.adm-head { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 18px; gap: 12px; }
.adm-head h1 { font-size: 21px; }
.adm-head .adm-actions { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.adm-head a { color: var(--blue-d); text-decoration: none; }
.adm-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 720px) { .adm-cards { grid-template-columns: repeat(2, 1fr); } }
.adm-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 2px 10px rgba(17,24,39,.06); }
.adm-card .t { font-size: 12.5px; color: var(--sub); }
.adm-card .v { font-size: 24px; font-weight: 800; margin-top: 6px; }
.adm-card .d { font-size: 11.5px; color: #9ca3af; margin-top: 4px; }
.adm-card.pending .v { color: #b45309; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.adm-table th, .adm-table td { text-align: left; padding: 8px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table th { color: var(--sub); font-weight: 700; background: #f9fafb; white-space: nowrap; }
.adm-table tr:hover td { background: #f8fafc; }
.adm-table a { color: var(--blue-d); text-decoration: none; }
.adm-table .mono { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: #4b5563; }
.adm-table .tag { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 11.5px; font-weight: 700; }
.adm-table .tag.done { background: #ecfdf5; color: #059669; }
.adm-table .tag.failed { background: #fef2f2; color: #b91c1c; }
.adm-table .tag.run { background: #eff6ff; color: #1d4ed8; }
.adm-table .content { max-width: 380px; white-space: pre-wrap; word-break: break-word; }
.adm-table .empty { color: #9ca3af; }
.adm-login { width: 100%; max-width: 380px; margin: 8vh auto 0; }
.adm-login .card { padding: 24px; }
.adm-login h1 { font-size: 19px; margin-bottom: 6px; }
.adm-login p { font-size: 12.5px; color: var(--sub); margin-bottom: 14px; line-height: 1.7; }
.adm-login input[type=password] { width: 100%; padding: 12px 13px; border: 1px solid var(--line);
                                  border-radius: 10px; font-size: 15px; font-family: inherit; }
.adm-login .err { display: block; }

/* ---------- 自定义偏好标签（输入页） ---------- */
.chip.add { border: 1.5px dashed var(--blue); color: var(--blue); font-weight: 700; background: #fff; }
.chip.add:hover { background: #eff6ff; }
.chip.cus { background: #eef6ff; border: 1px solid #93c5fd; color: var(--blue-d); }
.chip.cus .x { color: var(--sub); font-weight: 400; padding: 0 2px; }
.chip.cus .x:hover { color: #b91c1c; }
.pref-input { display: flex; gap: 8px; margin-top: 10px; }
.pref-input input { flex: 1; border: 1px solid #d1d5db; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; color: #374151; background: #fff; }
.pref-input button {
  background: var(--blue); color: #fff; border: none; border-radius: 10px; padding: 0 18px;
  font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.pref-input button:hover { background: var(--blue-d); }
.pref-hint { font-size: 11.5px; color: #9ca3af; margin-top: 7px; }
