.trips-page[hidden], .trip-confirm[hidden] { display: none !important; }
.trips-page {
  position: relative;
  height: calc(100dvh - 78px);
  overflow: hidden;
  background:
    linear-gradient(rgba(250,253,255,.78), rgba(255,253,248,.82)),
    url("editorial-paper.webp") center / cover no-repeat;
  color: #153558;
}
.trips-shell {
  display: grid;
  grid-template-rows: 90px minmax(0, 1fr);
  width: min(1480px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 12px clamp(18px, 2.4vw, 38px) 20px;
  box-sizing: border-box;
}
.trips-heading {
  min-height: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 6px;
  background: none;
}
.trips-kicker { color: #2780e8; font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.trips-kicker i { margin-right: 6px; }
.trips-heading h1 { margin: 2px 0 0; font-family: "Zhi Mang Xing Display", "KaiTi", serif; font-size: clamp(37px, 3.5vw, 52px); line-height: 1; color: #0d315b; font-weight: 400; }
.trips-heading p { display: none; }
.trips-new, .trips-state button, .trips-detail-empty button {
  border: 0; border-radius: 12px; padding: 13px 20px; background: #1878ed; color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 7px 17px rgba(24, 120, 237, .18);
}
.trips-new { margin-top: 0; white-space: nowrap; }
.trips-new i { margin-right: 6px; }
.trips-new:hover, .trips-state button:hover, .trips-detail-empty button:hover { background: #0967dc; }
.trips-board { display: grid; grid-template-columns: minmax(310px, 32%) minmax(0, 1fr); gap: 14px; min-height: 0; height: 100%; }
.trips-list-panel, .trips-detail-panel { min-width: 0; min-height: 0; background: rgba(255,255,255,.88); border: 1px solid rgba(215,229,243,.95); border-radius: 18px; box-shadow: 0 12px 38px rgba(22, 61, 103, .07); backdrop-filter: blur(8px); }
.trips-list-panel { display: flex; flex-direction: column; padding: 14px 12px; overflow: hidden; }
.trips-panel-title { display: flex; align-items: center; justify-content: space-between; padding: 0 7px 7px; }
.trips-panel-title h2 { font-size: 17px; color: #112e51; }
.trips-panel-title span { margin-left: 4px; color: #2d7fe8; }
.trips-filters { display: flex; gap: 5px; margin: 0 5px 8px; }
.trips-filters button { border: 0; border-radius: 999px; background: transparent; color: #70839b; font: inherit; font-size: 12px; padding: 6px 10px; cursor: pointer; }
.trips-filters button.active { color: #126de0; background: #eaf4ff; font-weight: 700; }
.trips-search { display: flex; align-items: center; gap: 8px; height: 38px; margin: 0 5px 10px; padding: 0 12px; border: 1px solid #e0e9f3; border-radius: 10px; color: #8494a7; background: rgba(255,255,255,.7); }
.trips-search:focus-within { border-color: #2580ed; box-shadow: 0 0 0 3px rgba(37,128,237,.1); }
.trips-search input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: #19395d; }
.trips-list { display: grid; flex: 1; align-content: start; gap: 7px; max-height: none; min-height: 0; overflow: auto; padding: 2px 5px 6px; scrollbar-width: none; }
.trips-list::-webkit-scrollbar { display: none; }
.trip-list-item { position: relative; display: flex; gap: 10px; align-items: center; min-width: 0; width: 100%; min-height: 82px; padding: 8px; border: 1px solid #e8eef5; border-radius: 12px; background: rgba(255,255,255,.94); text-align: left; cursor: pointer; font: inherit; }
.trip-list-item:hover { background: #f7fbff; border-color: #cbdff6; }
.trip-list-item.selected { background: #f1f7ff; border-color: #2580ed; box-shadow: 0 4px 14px rgba(37,128,237,.08); }
.trip-list-item img { width: 72px; height: 60px; object-fit: cover; border-radius: 8px; flex: 0 0 72px; }
.trip-list-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-right: 58px; color: #6d8099; }
.trip-list-copy strong { overflow: hidden; color: #143359; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.trip-list-copy small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.trip-origin { font-size: 12px; }
.trip-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: 12px; line-height: 1.2; font-weight: 700; background: #e8f2ff; color: #176fe0; white-space: nowrap; }
.trip-status.ongoing { background: #e6f8ee; color: #168457; }
.trip-status.past { background: #f0f3f7; color: #697b90; }
.trip-status.unscheduled { background: #fff4e6; color: #a9752a; }
.trip-list-item > .trip-status { position: absolute; top: 10px; right: 8px; padding: 4px 8px; font-size: 11px; }
.trips-detail-panel { display: flex; flex-direction: column; overflow: hidden; }
.trip-detail-hero { display: flex; flex: 0 0 145px; justify-content: space-between; min-height: 0; gap: 14px; padding: 16px 22px; background: linear-gradient(90deg, rgba(255,255,255,.96) 48%, rgba(235,247,255,.9) 100%); }
.trip-detail-intro { min-width: 0; padding-top: 0; }
.trip-detail-intro h2 { margin: 9px 0 5px; font-size: clamp(21px, 1.8vw, 28px); line-height: 1.25; color: #0e2f55; }
.trip-detail-intro p { color: #607994; font-size: 13px; line-height: 1.7; }
.trip-detail-intro p i { margin-right: 4px; }
.trip-meta-divider { margin: 0 5px; }
.trip-confirmed-note { display: inline-block; margin-top: 9px; color: #6a83a0; font-size: 12px; }
.trip-confirmed-note i { margin-right: 5px; color: #e8a82d; }
.trip-detail-photo { width: min(30%, 185px); min-width: 125px; height: 115px; object-fit: cover; border: 7px solid #fff; border-radius: 5px; transform: rotate(2deg); box-shadow: 0 10px 21px rgba(13,49,91,.14); }
.trip-detail-placeholder { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; background: #f3f8fc; color: #6d8eaa; }
.trip-detail-placeholder i { font-size: 27px; }
.trip-detail-body { display: flex; flex: 1; min-height: 0; flex-direction: column; padding: 14px 22px 16px; overflow: hidden; }
.trip-detail-body h3 { color: #102e52; font-size: 16px; }
.trip-detail-body h3 span { color: #8595a8; font-size: 12px; font-weight: 400; margin-left: 8px; }
.trip-day-list { margin-top: 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.trip-day-row { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 7px 10px; border-radius: 10px; background: rgba(247,250,255,.94); }
.trip-day-index { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 9px; background: #e4f1ff; color: #1878ed; font-weight: 800; }
.trip-day-row div { min-width: 0; }
.trip-day-row strong, .trip-day-row p { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.trip-day-row strong { color: #193a61; font-size: 13px; }
.trip-day-row p { margin-top: 3px; color: #7488a0; font-size: 11px; line-height: 1.4; }
.trip-days-more { grid-column: 1 / -1; padding: 6px 10px; border-radius: 9px; background: #eef6ff; color: #3f6f9f; font-size: 12px; text-align: center; }
.trip-budget { display: flex; align-items: center; gap: 9px; margin-top: 8px; padding: 8px 11px; border: 1px solid #e4edf7; border-radius: 10px; color: #6c829d; font-size: 12px; background: rgba(255,255,255,.72); }
.trip-budget i { color: #e7a72e; }
.trip-budget strong { margin-left: auto; color: #17395e; }
.trip-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: auto; padding-top: 9px; }
.trip-detail-actions button { min-height: 36px; padding: 0 13px; border: 1px solid #cddbeb; border-radius: 9px; color: #183d66; background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.trip-detail-actions button i { margin-right: 5px; }
.trip-detail-actions button.primary { background: #1878ed; color: #fff; border-color: #1878ed; }
.trip-detail-actions button:hover { filter: brightness(.96); }
.trips-state, .trips-detail-empty { display: flex; min-height: 260px; flex-direction: column; align-items: center; justify-content: center; gap: 11px; padding: 25px; text-align: center; color: #8293a8; }
.trips-state i, .trips-detail-empty i { font-size: 35px; color: #9dc5f4; }
.trips-state h3 { font-size: 17px; color: #29466a; }
.trips-state p, .trips-detail-empty p { font-size: 13px; line-height: 1.6; }
.trips-state button, .trips-detail-empty button { margin-top: 7px; padding: 9px 15px; font-size: 12px; }
.trips-detail-empty { min-height: 460px; }
.trips-home-empty { padding: 14px 10px; color: #8293a8; font-size: 12px; }
.trip-confirm { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border: 1px solid #1878ed; border-radius: 11px; background: #1878ed; color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.trip-confirm:hover { background: #0967dc; }
.trip-confirm:disabled { opacity: .6; cursor: wait; }
.trip-report-overlay[hidden] { display: none !important; }
.trip-report-overlay { position: fixed; z-index: 110; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(12, 34, 60, .55); backdrop-filter: blur(4px); }
.trip-report-dialog { display: flex; flex-direction: column; width: min(780px, 100%); max-height: min(90dvh, 960px); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 24px 80px rgba(7, 31, 63, .25); }
.trip-report-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 27px; border-bottom: 1px solid #e5edf5; }
.trip-report-header span { color: #1878ed; font-size: 12px; font-weight: 700; }
.trip-report-header h2 { margin-top: 4px; color: #102f54; font-size: 22px; }
.trip-report-header button { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 9px; background: #f0f5fa; color: #28486b; cursor: pointer; }
.trip-report-content { overflow: auto; padding: 27px 34px 35px; color: #2d4462; font-size: 14px; line-height: 1.85; }
.trip-report-content h1, .trip-report-content h2, .trip-report-content h3 { margin: 20px 0 8px; color: #14365e; line-height: 1.35; }
.trip-report-content h1:first-child, .trip-report-content h2:first-child { margin-top: 0; }
.trip-report-content p, .trip-report-content ul, .trip-report-content ol { margin: 0 0 13px; }
.trip-report-content ul, .trip-report-content ol { padding-left: 23px; }
.trip-report-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 14px 0; }
.trip-report-content th, .trip-report-content td { padding: 7px 10px; border: 1px solid #e0e8f2; }
.trip-report-content a { color: #1878ed; }
/* 仅“我的行程”四字使用完整字体，避免缺字回退。 */
@font-face {
  font-family: "Zhi Mang Xing Trips";
  src: url("fonts/ZhiMangXing-Regular.ttf") format("truetype");
  font-display: swap;
}
.trips-heading h1 { font-family: "Zhi Mang Xing Trips", "KaiTi", serif; }
@media (max-width: 900px) {
  .trips-page { height: calc(100dvh - 64px); overflow: auto; }
  .trips-shell { display: block; height: auto; padding: 20px 14px 30px; }
  .trips-heading { min-height: 130px; }
  .trips-board { grid-template-columns: minmax(0, 1fr); }
  .trips-list { display: flex; overflow-x: auto; max-height: none; min-height: 120px; }
  .trip-list-item { flex: 0 0 min(320px, 85vw); }
  .trips-detail-panel { min-height: 420px; }
  .trip-detail-body { overflow: visible; }
  .trip-day-list { grid-template-columns: minmax(0, 1fr); }
  .trip-days-more { grid-column: auto; }
  .trip-confirm { padding: 0 8px; }
}
@media (max-width: 560px) {
  .trips-heading { align-items: flex-start; gap: 10px; }
  .trips-heading h1 { font-size: 43px; }
  .trips-heading p { font-size: 12px; }
  .trips-new { font-size: 12px; padding: 10px; }
  .trips-new i { margin-right: 2px; }
  .trip-detail-hero { padding: 19px; min-height: 175px; }
  .trip-detail-photo { min-width: 100px; width: 110px; height: 112px; border-width: 5px; }
  .trip-detail-intro h2 { font-size: 21px; }
  .trip-detail-body { padding: 19px; }
  .trip-detail-actions { justify-content: stretch; }
  .trip-detail-actions button { flex: 1; }
  .trip-report-content { padding: 20px; }
  .trip-confirm span { display: none; }
  .trip-confirm i { font-size: 15px; }
}
