/* Shall We? 揪這麼玩
   Layout: 手機一欄（460px），平板／電腦 760px 以上加寬分欄；編輯在底部面板（電腦為置中對話框）。 */
:root {
  --green: #2E7D5B;        /* 山林綠蔭：主色 */
  --green-ink: #FFFFFF;
  --green-soft: #E2F0E7;
  --sun: #F6C445;          /* 墾丁陽光黃：輔色，只當底色與圖示 */
  --sun-soft: #FDF2D0;
  --current: #F08A3C;      /* 洋流橘：行動按鈕 */
  --current-ink: #2B1505;
  --current-soft: #FDE7D6;
  --bg: #FFFDF7;
  --surface: #FFFFFF;
  --ink: #1E2A23;
  --muted: #64746A;
  --line: #ECE6D6;
  --shade: rgba(30, 42, 35, .09);
  --scrim: rgba(20, 28, 23, .42);
  --danger: #B93A26;
  --logo-plate: transparent;  /* logo 文字是深色，深色模式下墊一塊淺底 */
  --logo-pad: 0px;
  --f-display: "Huninn", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --f-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --r-card: 18px;
  --r-ctl: 12px;
  --app-w: 460px;
  --bar-h: 76px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --green: #62BD8F; --green-ink: #0D1A12; --green-soft: #1C3127;
    --sun: #F6C445; --sun-soft: #3A3119;
    --current: #F49A55; --current-ink: #2B1505; --current-soft: #3E2716;
    --bg: #111814; --surface: #19231D; --ink: #E9F1EB; --muted: #98A99E; --line: #2A372F;
    --shade: rgba(0, 0, 0, .35); --scrim: rgba(0, 0, 0, .6); --danger: #F07A66;
    --logo-plate: #FFFDF7; --logo-pad: 8px 12px;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
img { max-width: 100%; }
body {
  margin: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 400; text-wrap: balance; line-height: 1.3; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--current); outline-offset: 2px; }
svg { flex: none; }

.app {
  max-width: var(--app-w); margin: 0 auto; min-height: 100%;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 120px;
}
.boot { padding-block: 40vh 0; text-align: center; color: var(--muted); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0;
  font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn.orange { background: var(--current); color: var(--current-ink); }
.btn.green { background: var(--green); color: var(--green-ink); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn.soft { background: var(--green-soft); color: var(--ink); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 2px 8px var(--shade); cursor: pointer;
}
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; background: var(--green-soft); color: var(--ink); text-decoration: none; white-space: nowrap;
}
.chip.sun { background: var(--sun-soft); }
.chip.current, .chip.ig { background: var(--current-soft); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-ctl);
  border: 1.5px solid var(--line); background: var(--surface);
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--green); outline: none; }
.input:disabled { opacity: .7; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tnum { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 14px; }
.hscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; margin-inline: -4px; padding-inline: 4px; }
.hscroll::-webkit-scrollbar { display: none; }
.banner {
  display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: var(--r-ctl);
  background: var(--sun-soft); font-size: 13.5px; margin-block: 8px 2px;
}
.banner .btn { margin-left: auto; }

/* ---------- login ---------- */
.login { min-height: 80vh; display: grid; align-content: center; justify-items: center; gap: 18px; text-align: center; padding-block: 40px; }
.login .logo { grid-column: auto; width: 220px; }
.login h1 { font-size: 24px; }
.login p { color: var(--muted); max-width: 30em; }
.login .btn { min-width: 260px; }
.login .fine { font-size: 12.5px; }

/* ---------- home ---------- */
.brand { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; padding-block: 16px 0; }
.logo { grid-column: 2; width: 160px; height: auto; max-width: 100%; border-radius: 20px; background: var(--logo-plate); padding: var(--logo-pad); box-sizing: content-box; }
.brand .me { grid-column: 3; justify-self: end; margin-top: 8px; border: 0; background: none; padding: 0; cursor: pointer; }
.brand .me .av { width: 34px; height: 34px; font-size: 14px; margin: 0; }
.brand-bar {
  height: 6px; border-radius: 3px; margin-top: 14px;
  background: linear-gradient(90deg, var(--green) 0 60%, var(--sun) 60% 82%, var(--current) 82% 100%);
}
.filter { padding-block: 16px 18px; }
.fchip {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 14px; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.fchip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--green-ink); font-weight: 700; }
.trips { display: grid; gap: 14px; }
.trip-card {
  display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; text-align: left;
  width: 100%; padding: 12px; border: 0; border-radius: var(--r-card); background: var(--surface);
  box-shadow: 0 1px 0 var(--line), 0 4px 16px var(--shade); cursor: pointer;
}
.trip-card .art { width: 84px; height: 84px; border-radius: 14px; overflow: hidden; }
.trip-card h2 { font-size: 19px; }
.trip-card .info { min-width: 0; display: grid; gap: 4px; }
.trip-card .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.avatars { display: flex; }
.av {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 12px; font-weight: 700; color: #1E2A23; border: 2px solid var(--surface); margin-left: -6px;
}
.avatars .av:first-child { margin-left: 0; }
.new-trip { margin-top: 20px; }
.empty {
  border: 2px dashed var(--line); border-radius: var(--r-card); padding: 26px 18px; text-align: center; color: var(--muted);
  display: grid; gap: 10px; justify-items: center;
}
.empty b { color: var(--ink); font-family: var(--f-display); font-weight: 400; font-size: 18px; }

/* ---------- create ---------- */
.create-head { display: flex; align-items: center; gap: 12px; padding-block: 18px 6px; }
.steps { display: flex; gap: 6px; margin-left: auto; }
.steps i { width: 28px; height: 6px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--green); }
.create h1 { font-size: 26px; padding-block: 14px 4px; }
.create .lead { color: var(--muted); padding-bottom: 18px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  border: 2px solid var(--line); background: var(--surface); border-radius: var(--r-card);
  padding: 14px; display: grid; gap: 10px; text-align: left; cursor: pointer;
}
.tile .art { height: 92px; border-radius: 12px; overflow: hidden; }
.tile b { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.tile[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.continents { display: flex; flex-wrap: wrap; gap: 10px; }
.continents .fchip { padding: 10px 18px; font-size: 15px; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.stepper button { width: 46px; height: 44px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.stepper output { flex: 1; text-align: center; font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tagbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tagbox .chip button { border: 0; background: none; padding: 0 0 0 2px; cursor: pointer; font-size: 14px; line-height: 1; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest button { border: 1px dashed var(--muted); background: none; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.err { color: var(--danger); font-size: 13px; }
.create-foot { display: flex; gap: 10px; padding-top: 26px; }
.create-foot .btn { flex: 1; }

/* ---------- trip ---------- */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg);
  display: flex; align-items: center; gap: 12px; height: var(--bar-h); padding-block: 0;
}
.bar-title { min-width: 0; flex: 1; }
.bar-title h1 { font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eyebrow { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.viewer-note {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r-ctl);
  background: var(--sun-soft); font-size: 13.5px; margin-bottom: 10px;
}
.viewer-note .btn { margin-left: auto; }
.tabs {
  display: flex; gap: 4px; align-items: center; padding: 4px; border-radius: 999px; background: var(--green-soft);
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--bar-h)); z-index: 4;
}
.tab {
  flex: 1; min-height: 38px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font-weight: 500; font-size: 14.5px; white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--surface); color: var(--green); font-weight: 700; box-shadow: 0 1px 4px var(--shade); }
.tab.read { flex: none; padding: 0 12px; display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 700; }
.panel { padding-top: 16px; display: grid; gap: 14px; }
.day-side, .day-main { display: grid; gap: 14px; min-width: 0; }

.daychip {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 6px 12px;
  display: grid; text-align: left; cursor: pointer; line-height: 1.3; white-space: nowrap;
}
.daychip b { font-family: var(--f-display); font-weight: 400; font-size: 16px; }
.daychip span { font-size: 12px; color: var(--muted); }
.daychip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.daychip[aria-pressed="true"] span { color: inherit; opacity: .85; }
.day-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.day-head h2 { font-size: 24px; }
.start { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.start input { min-height: 38px; padding: 4px 10px; }
.route-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  border-radius: var(--r-ctl); background: var(--sun); color: #2A2208; font-weight: 700; text-decoration: none;
}
.route-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.stop { display: grid; grid-template-columns: 50px 1fr; gap: 10px; position: relative; }
.stop::before, .transit::before {
  content: ""; position: absolute; left: 24px; top: 0; bottom: 0; width: 2px; background: var(--line);
}
.stop:first-child::before { top: 18px; }
.stop:last-child::before { bottom: auto; height: 18px; }
.stop:only-child::before { display: none; }
.stop-time { position: relative; z-index: 1; padding-top: 8px; text-align: center; }
.stop-time b { display: inline-block; background: var(--bg); padding: 2px 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.stop-time i { display: block; width: 12px; height: 12px; margin: 2px auto 0; border-radius: 50%; background: var(--green); border: 3px solid var(--bg); box-sizing: content-box; }
.stop-card {
  background: var(--surface); border-radius: var(--r-card); padding: 14px; display: grid; gap: 10px; min-width: 0;
  box-shadow: 0 1px 0 var(--line), 0 3px 12px var(--shade);
}
.stop-top { display: flex; gap: 8px; align-items: flex-start; }
.stop-main { flex: 1; min-width: 0; }
.stop-main h3 { font-size: 18px; }
.stop-main p { font-size: 13px; color: var(--muted); }
.reorder { display: flex; gap: 4px; }
.reorder button {
  width: 32px; height: 32px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer;
}
.reorder button:disabled { opacity: .3; cursor: default; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta:empty { display: none; }
.stop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.transit { position: relative; display: grid; grid-template-columns: 50px 1fr; gap: 10px; padding-block: 8px; }
.transit span {
  grid-column: 2; justify-self: start; font-size: 12.5px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 999px; padding: 2px 10px; background: var(--bg);
}

.fab {
  position: fixed; z-index: 6;
  right: max(16px, calc((100vw - var(--app-w)) / 2 + 16px), env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 6px 20px var(--shade);
}

/* budget */
.sum { background: var(--green); color: var(--green-ink); border-radius: var(--r-card); padding: 18px; display: grid; gap: 12px; }
.sum .big { font-family: var(--f-display); font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sum .split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sum .split div { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 8px 12px; }
.sum .lbl { font-size: 12.5px; opacity: .85; }
.group { background: var(--surface); border-radius: var(--r-card); padding: 6px 14px; box-shadow: 0 1px 0 var(--line), 0 3px 12px var(--shade); }
.group-head { display: flex; justify-content: space-between; align-items: center; padding-block: 10px 6px; }
.group-head h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding-block: 10px; border-top: 1px solid var(--line); align-items: center; }
.item .nm { font-weight: 500; min-width: 0; }
.item .amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.item .sub { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.item .orig { text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.item-empty { padding: 10px 0 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.xbtn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 13px; text-decoration: underline; }
.settle { display: grid; gap: 8px; padding-bottom: 12px; }
.transfer { display: grid; grid-template-columns: auto auto auto 1fr; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--current-soft); }
.transfer .amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bal { display: flex; justify-content: space-between; font-size: 13.5px; padding-block: 3px; }
.bal .tnum { font-weight: 500; }

/* checklist */
.check { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding-block: 12px; border-top: 1px solid var(--line); }
.check:first-of-type { border-top: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--green); }
.check.done .ct { text-decoration: line-through; color: var(--muted); }
.addrow { display: flex; gap: 8px; }
.addrow .input { flex: 1; min-width: 0; }
.addrow select.input { flex: none; width: auto; }

/* read mode */
.cover { padding-block: 10px 6px; display: grid; gap: 10px; }
.cover .art { height: 150px; border-radius: 22px; overflow: hidden; }
.cover h1 { font-size: 30px; }
.sec {
  position: relative; background: var(--surface); border-radius: var(--r-card); padding: 16px;
  box-shadow: 0 1px 0 var(--line), 0 3px 12px var(--shade); display: grid; gap: 10px;
}
.sec h2 { font-size: 20px; padding-right: 92px; }
.sec .edit {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px;
  font-size: 13px; font-weight: 700; color: var(--green); cursor: pointer;
}
.sec .edit:disabled { color: var(--muted); cursor: not-allowed; }
.mini { list-style: none; margin: 0; padding: 0; display: grid; }
.mini li { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding-block: 6px; }
.mini li.tr { padding-block: 0; color: var(--muted); font-size: 12.5px; }
.mini .t { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13.5px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding-block: 4px; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }

/* sheet */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; animation: fade .18s ease; }
.sheet {
  position: fixed; z-index: 21; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(460px, 100%); max-height: 90dvh; overflow-y: auto; background: var(--bg);
  border-radius: 24px 24px 0 0; box-shadow: 0 -8px 30px var(--shade);
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  animation: rise .22s ease;
}
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 14px; }
.sheet-head h2 { font-size: 21px; min-width: 0; overflow-wrap: anywhere; }
.sheet .stack { gap: 16px; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--green-soft); border-radius: 14px; }
.seg button { flex: 1; min-height: 38px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-size: 13.5px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--green); font-weight: 700; box-shadow: 0 1px 4px var(--shade); }
.result { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding-block: 12px; border-top: 1px solid var(--line); }
.result:first-child { border-top: 0; }
.result b { display: block; }
.result p { font-size: 12.5px; color: var(--muted); }
.thinking { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; padding-block: 8px; }
.thinking i { width: 8px; height: 8px; border-radius: 50%; background: var(--current); animation: blink 1s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.doc { aspect-ratio: 1; max-width: 100%; border-radius: 12px; overflow: hidden; background: var(--green-soft); display: grid; place-items: center; font-size: 12px; text-align: center; padding: 6px; word-break: break-all; text-decoration: none; }
.doc img { width: 100%; height: 100%; object-fit: cover; }
.doc:has(img) { padding: 0; }
.upload { position: relative; aspect-ratio: 1; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 12.5px; text-align: center; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.member { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding-block: 10px; border-top: 1px solid var(--line); }
.member:first-child { border-top: 0; }
.member .av { width: 36px; height: 36px; margin: 0; font-size: 14px; }
.member select.input { min-height: 38px; padding: 4px 10px; width: auto; }
.linkrow { display: flex; gap: 8px; }
.linkrow .input { flex: 1; min-width: 0; font-size: 13.5px; }
.danger-link { border: 0; background: none; color: var(--danger); cursor: pointer; font-weight: 500; padding: 8px 0; justify-self: start; }
.note { font-size: 12.5px; color: var(--muted); }

.toast {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(86px + env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 32px);
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  animation: fade .2s ease;
}

/* ---------- 平板／電腦：版面加寬、分欄 ---------- */
@media (min-width: 760px) {
  :root { --app-w: 1080px; }
  .app { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
  .brand { padding-block: 24px 0; }
  .logo { width: 190px; }
  .trips { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
  .btn.new-trip { width: auto; min-width: 260px; }
  .create { max-width: 640px; margin-inline: auto; }
  .tabs { max-width: 620px; }
  .viewer-note { max-width: 620px; }
  /* 旅站：左邊選天數＋今日路線，右邊時間軸 */
  .panel-stops { grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
  .day-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--bar-h) + 62px); }
  .day-list { flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .daychip { display: flex; justify-content: space-between; align-items: baseline; }
  .day-main { max-width: 700px; }
  /* 旅費：總覽橫跨，類別排兩欄 */
  .panel-budget { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .panel-budget .sum { grid-column: 1 / -1; grid-template-columns: 1fr 1.4fr; align-items: center; }
  .panel-list { max-width: 720px; }
  /* 一頁瀏覽：封面橫跨，每天排兩欄 */
  .read-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
  .read-grid .cover { grid-column: 1 / -1; grid-template-columns: 320px 1fr; column-gap: 28px; align-items: center; }
  .read-grid .cover .art { grid-row: span 4; height: 200px; }
  /* 編輯視窗改成置中的對話框 */
  .sheet { top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(560px, calc(100% - 64px)); max-height: 86vh; border-radius: 24px; padding: 8px 24px 24px; animation: pop .2s ease; }
  .grab { display: none; }
  .toast { bottom: 32px; }
}
@media (min-width: 1100px) {
  .trips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@keyframes pop { from { transform: translate(-50%, -46%); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
@keyframes rise { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; } }
