/* 途YOU你 样式 —— 橙色 + 蓝色，来自 logo */
:root {
  --orange: #F7A21B;
  --orange-dark: #E08A00;
  --blue: #2E8FE0;
  --blue-dark: #1C6FB8;
  --navy: #0B2545;
  --bg: #F3F7FC;
  --card: #FFFFFF;
  --text: #1B2A3D;
  --muted: #6B7A8F;
  --line: #E3EAF3;
  --red: #E5484D;
  --green: #2BA36B;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(11, 37, 69, .07);
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.5;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
body.no-scroll { overflow: hidden; }
a { color: var(--blue-dark); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.3; color: var(--navy); }
p { margin: .3em 0; }
img { max-width: 100%; height: auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.pre { white-space: pre-wrap; word-break: break-word; }

.container { max-width: 680px; margin: 0 auto; padding: 12px 14px 24px; }

/* 顶部 */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; padding-top: calc(8px + env(safe-area-inset-top));
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand img { height: 40px; width: auto; display: block; }
.lang-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: .9rem; cursor: pointer; color: var(--navy);
}

/* 底部导航 */
.app-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center; justify-content: space-around;
  background: #fff; border-top: 1px solid var(--line);
}
.nav-item { display: flex; flex-direction: column; align-items: center; font-size: .78rem; color: var(--muted); min-width: 70px; }
.nav-item.active { color: var(--blue); font-weight: 600; }
.nav-icon { font-size: 1.3rem; line-height: 1.2; }
.nav-create {
  width: 56px; height: 56px; margin-top: -26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark)); color: #fff;
  font-size: 2rem; font-weight: 300; box-shadow: 0 6px 16px rgba(247, 162, 27, .45);
  border: 4px solid #fff;
}

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; cursor: pointer; background: #E9EEF5; color: var(--navy);
  transition: transform .05s, opacity .2s; text-align: center; font-family: inherit;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--navy); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger-ghost { background: #fff; border-color: #F5C2C4; color: var(--red); }
.btn.block { display: flex; width: 100%; }
.btn.big { padding: 14px 20px; font-size: 1.06rem; }
.btn.small { padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .6); border-top-color: var(--navy); animation: spin .8s linear infinite;
}
.text-btn { background: none; border: none; color: var(--muted); font-size: .84rem; cursor: pointer; padding: 4px 6px; font-family: inherit; }
.text-btn:hover { color: var(--blue); }
.icon-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); padding: 4px 8px; }
.center-block { display: block; margin: 10px auto 0; }
.link { display: block; margin-top: 12px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* 卡片 */
.card {
  display: block; background: var(--card); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); color: inherit;
}
.post-card { transition: transform .1s; border-left: 4px solid var(--blue); }
.post-card:active { transform: scale(.99); }
.card-title { font-size: 1.08rem; margin: 8px 0 4px; }
.meta { color: var(--muted); font-size: .9rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.owner { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); min-width: 0; }
.owner span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seats { font-weight: 700; color: var(--orange-dark); font-size: .9rem; white-space: nowrap; }
.seats.off { color: var(--muted); }

/* 标签 */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: #EEF3F9; color: var(--navy); white-space: nowrap;
}
.badge.tiny { font-size: .7rem; padding: 1px 7px; margin-left: 6px; }
.badge.hot { background: #FFE9C7; color: #B86500; }
.badge.warm { background: #FFF4DE; color: #B86500; }
.badge.gender { background: #FDE7F1; color: #B3306B; }
.badge.soft { background: #F1F4F8; color: var(--muted); font-weight: 500; }
.badge.off { background: #ECEFF3; color: var(--muted); }
.badge.kind-buddy { background: #E3F0FC; color: var(--blue-dark); }
.badge.kind-ride_offer { background: #E2F5EC; color: #1E7A50; }
.badge.kind-ride_seek { background: #EAF6E0; color: #4B7A1E; }
.badge.kind-long_trip { background: #EFE8FC; color: #5B3BB0; }
.post-card:has(.kind-ride_offer), .post-card:has(.kind-ride_seek) { border-left-color: var(--green); }
.post-card:has(.kind-long_trip) { border-left-color: #7B5BD6; }
.status-pending { color: var(--orange-dark); }
.status-accepted { color: var(--green); }
.status-declined { color: var(--muted); }
.badge.status-pending { background: #FFF1DA; }
.badge.status-accepted { background: #E2F5EC; }
.badge.status-declined { background: #ECEFF3; }

/* 头像 */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%; font-weight: 700; font-size: .95rem;
}
.avatar.sm { width: 26px; height: 26px; font-size: .78rem; }
.avatar.lg { width: 52px; height: 52px; font-size: 1.3rem; }

/* 首页 */
.filters { position: sticky; top: 57px; z-index: 10; background: var(--bg); padding: 4px 0 8px; }
.search-wrap { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 12px; padding: 0 12px; border: 1px solid var(--line); }
.search { border: none !important; outline: none; flex: 1; padding: 11px 0 !important; background: transparent; font-size: 1rem; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: .9rem; cursor: pointer; color: var(--navy); font-family: inherit;
}
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.hero { text-align: center; padding: 10px 6px 20px; }
.hero-img { width: 78%; max-width: 360px; margin: 0 auto 6px; display: block; }
.hero h1 { font-size: 1.6rem; }
.hero-points { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.hero-points span { background: #fff; border-radius: 999px; padding: 6px 12px; font-size: .9rem; box-shadow: var(--shadow); }

.banner { border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: .9rem; }
.banner.info { background: #E3F0FC; color: var(--blue-dark); }
.banner.warn { background: #FFF4DE; color: #8A5300; }
.banner.danger { background: #FDE4E5; color: #A8181E; font-weight: 600; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-icon { font-size: 2.6rem; margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

.loading-page { display: flex; justify-content: center; padding: 40px 0; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 详情页 */
.detail-title { font-size: 1.35rem; margin: 10px 0 8px; }
.info-row { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.info-icon { font-size: 1.15rem; width: 26px; text-align: center; }
.info-label { font-size: .78rem; color: var(--muted); }
.info-value { font-weight: 500; word-break: break-word; }
.desc { border-top: 1px solid var(--line); padding-top: 10px; }
.owner-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.owner-name { font-weight: 700; color: var(--navy); }
.owner-actions { display: flex; gap: 6px; }
.section-title { font-size: 1.05rem; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.comment:first-child { border-top: none; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-actions { text-align: right; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.comment-form textarea { flex: 1; }
.action-spacer { height: 70px; }
.action-bar {
  position: fixed; left: 0; right: 0; z-index: 25;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
  max-width: 680px; margin: 0 auto; padding: 10px 14px;
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
}

/* 表单 */
.form label, .field > label { display: block; font-size: .88rem; font-weight: 600; color: var(--navy); margin: 12px 0 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 1rem; color: var(--text); font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(46, 143, 224, .35); border-color: var(--blue); }
textarea { resize: vertical; }
.form .btn[type=submit] { margin-top: 16px; }
.hint { font-size: .8rem; color: var(--muted); margin: 5px 0 0; }
.hint.warn { color: #8A5300; background: #FFF4DE; padding: 8px 10px; border-radius: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 420px) { .two { grid-template-columns: 1fr; } }
.page-title { font-size: 1.3rem; margin: 4px 0 12px; }
.kind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kind-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-family: inherit; color: var(--text);
}
.kind-opt small { color: var(--muted); font-size: .75rem; }
.kind-opt.active { border-color: var(--orange); background: #FFF8EC; }
.kind-icon { font-size: 1.3rem; }
.check { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; font-size: .86rem !important; }
.check input { margin-top: 3px; width: auto; }
.captcha { margin-top: 10px; }
.divider { text-align: center; color: var(--muted); font-size: .85rem; margin: 14px 0 10px; }

/* 登录 */
.auth { max-width: 420px; margin: 10px auto; }
.auth-logo { display: block; margin: 0 auto; width: 120px; }

/* 我的 */
.me-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.me-head h1 { font-size: 1.25rem; margin: 0; }
.tabs { display: flex; background: #E7EDF5; border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.tab { flex: 1; border: none; background: none; padding: 8px 6px; border-radius: 9px; font-size: .92rem; cursor: pointer; color: var(--muted); font-family: inherit; }
.tab.active { background: #fff; color: var(--navy); font-weight: 600; box-shadow: var(--shadow); }
.hosted { margin-bottom: 18px; }
.hosted .card { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.signup-list { background: #fff; border-top: 1px dashed var(--line); border-radius: 0 0 var(--radius) var(--radius); padding: 10px 16px 14px; box-shadow: var(--shadow); }
.signup-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.signup { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.signup-btns { display: flex; gap: 6px; align-items: center; }
.contact { display: flex; align-items: center; gap: 6px; font-size: .88rem; background: #F4F8FD; border-radius: 8px; padding: 4px 8px; margin-top: 4px; word-break: break-all; }
.links a { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
.links a:first-child { border-top: none; }

/* 弹窗 */
.modal-back {
  position: fixed; inset: 0; z-index: 50; background: rgba(11, 37, 69, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  animation: up .2s ease-out;
}
@media (min-width: 600px) { .modal-back { align-items: center; } .modal { border-radius: 20px; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

/* 提示 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 90px); transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 60; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); }

/* 法律页面 */
.legal h1 { font-size: 1.4rem; }
.legal h2 { font-size: 1.1rem; margin-top: 1.4em; }
.legal p, .legal li { color: #34465C; }
.legal .draft { background: #FFF4DE; color: #8A5300; padding: 10px 14px; border-radius: 10px; font-size: .9rem; }
