/* Chengdu & Jiuzhaigou Family Travel Planner: mobile-first styles */
:root {
  --forest: #174A3A; --jade: #4D9A78; --gold: #D9B36C; --bg: #F7F6F1; --ink: #252A28; --red: #D64545;
  --card: #ffffff; --line: rgba(23, 74, 58, .12); --muted: #65706b; --brand: #174A3A; --btn: #174A3A; --btn-ink: #fff;
  --soft: rgba(77, 154, 120, .1); --shadow: 0 1px 2px rgba(23, 74, 58, .06), 0 8px 24px rgba(23, 74, 58, .07);
  --r: 20px; --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif; --zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
[data-theme="dark"] {
  --bg: #0f1613; --ink: #ecefe9; --card: #18221d; --line: rgba(255, 255, 255, .1); --muted: #9aa8a1; --brand: #7fd0ac;
  --btn: #2f7a5c; --soft: rgba(127, 208, 172, .1); --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; } h4 { font-size: 1rem; font-family: var(--font); }
p { margin: .4em 0; } a { color: var(--brand); } img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .zh { font-family: var(--zh); } .py { color: var(--muted); font-style: italic; }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--jade); }
.ic { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.2em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* layout */
.app { min-height: 100vh; }
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .brand-s { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 700; color: var(--brand); text-decoration: none; margin-right: auto; }
.logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--forest); color: var(--gold); }
.sos { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(214, 69, 69, .35); }
.view { padding: 18px 16px 110px; max-width: 1120px; margin: 0 auto; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
.bottom { position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0, 0, 0, .06); }
.bottom a, .bottom button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; font-size: .72rem; color: var(--muted); text-decoration: none; border-radius: 14px; cursor: pointer; }
.bottom .ic { width: 22px; height: 22px; }
.bottom a.active { color: var(--brand); font-weight: 700; background: var(--soft); }
.bottom a.em { color: #fff; background: var(--red); margin: -14px 6px 0; border-radius: 18px; box-shadow: 0 6px 16px rgba(214, 69, 69, .4); font-weight: 700; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 40; }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 24px 24px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); animation: up .25s ease; max-height: 80vh; overflow: auto; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.sheet-grid a { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--soft); text-decoration: none; font-size: .92rem; color: var(--ink); }
.sheet-grid a.em { background: var(--red); color: #fff; }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 276px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 16px; background: var(--forest); color: #e8efe9; }
  .side .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
  .side .brand small { display: block; opacity: .7; font-size: .75rem; }
  .side .logo { background: rgba(255, 255, 255, .1); }
  .sos.big { justify-content: center; padding: 13px; border-radius: 16px; font-size: 1.05rem; }
  .nav-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
  .nav-group > span { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; opacity: .55; padding: 6px 10px; }
  .side nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: #dce7df; text-decoration: none; font-size: .95rem; transition: background .15s; }
  .side nav a:hover { background: rgba(255, 255, 255, .08); }
  .side nav a.active { background: var(--gold); color: #2a2208; font-weight: 700; }
  .side-foot { margin-top: auto; font-size: .75rem; opacity: .6; }
  .bottom, .topbar .brand-s { display: none; }
  .topbar { justify-content: flex-end; padding: 12px 32px; }
  .view { padding: 28px 32px 60px; }
}

/* components */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; min-height: 44px; border-radius: 14px; border: 1px solid transparent; background: var(--soft); color: var(--brand); font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .12s, background .15s; }
.btn:hover { transform: translateY(-1px); } .btn:active { transform: scale(.98); }
.btn.primary { background: var(--btn); color: var(--btn-ink); } .btn.gold { background: var(--gold); color: #2a2208; }
.btn.ghost { background: transparent; border-color: var(--line); } .btn.danger { background: var(--red); color: #fff; }
.btn.sm { padding: 7px 13px; min-height: 38px; font-size: .9rem; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--brand); } .icon-btn.tiny { width: 32px; height: 32px; border: 0; }
.row-actions, .chips, .head-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.page-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.page-head .head-actions { margin: 0; } .lead { color: var(--muted); max-width: 60ch; }
@media (min-width: 700px) { .page-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.section-title { margin: 28px 0 12px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--soft); color: var(--brand); }
.pill.s-confirmed { background: rgba(77, 154, 120, .18); color: #1f7a52; } .pill.s-pending { background: rgba(217, 179, 108, .25); color: #8a6516; }
.pill.s-cancelled { background: rgba(214, 69, 69, .15); color: var(--red); } .pill.type { background: var(--forest); color: #fff; }
[data-theme="dark"] .pill.s-confirmed { color: #7fd0ac; } [data-theme="dark"] .pill.s-pending { color: #e8c98a; }
.chip-s { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: .85rem; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(217, 179, 108, .2); border: 1px solid rgba(217, 179, 108, .5); margin: 12px 0; font-size: .92rem; }
.notice.soft { background: var(--soft); border-color: var(--line); } .notice.red { background: rgba(214, 69, 69, .1); border-color: rgba(214, 69, 69, .4); }
.notice .ic { margin-top: 3px; }
.empty { color: var(--muted); text-align: center; padding: 30px; grid-column: 1/-1; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0; } .dl dt { color: var(--muted); font-size: .85rem; } .dl dd { margin: 0; }
.note-line { display: flex; gap: 8px; color: var(--muted); font-size: .9rem; } .note-line.strong { color: var(--ink); background: var(--soft); padding: 10px; border-radius: 12px; }
.bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; margin-top: 8px; } .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--jade), var(--forest)); transition: width .5s; }
.bar.over i { background: var(--red); }
.ring { position: relative; width: var(--s); height: var(--s); flex: none; } .ring svg { width: 100%; height: 100%; }
.rg-bg { fill: none; stroke: var(--soft); stroke-width: 8; } .rg-fg { fill: none; stroke: var(--jade); stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray .6s; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--s) * .22); }
.grid2 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); } @media (min-width: 560px) { .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .field.full { grid-column: 1/-1; }
.field label { font-size: .82rem; font-weight: 600; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=search], input:not([type]), select, textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--jade); border-color: transparent; }
textarea { resize: vertical; } .chk { display: flex; gap: 8px; align-items: center; font-size: .85rem; }
.thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
.thumb-btn { border: 0; padding: 0; background: none; cursor: zoom-in; margin-top: 8px; } .full-img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; } .toolbar select { width: auto; flex: 1 1 150px; }
.search { position: relative; flex: 2 1 240px; } .search .ic { position: absolute; left: 12px; top: 13px; color: var(--muted); } .search input { padding-left: 38px; }
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; } .chips-row.inline { padding: 0; }
.chip { flex: none; padding: 8px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: .9rem; }
.chip.on { background: var(--btn); color: #fff; border-color: transparent; }
.card-list, .dest-grid, .phrase-grid, .stay-grid, .doc-grid, .guide-grid, .check-grid, .med-grid, .em-grid, .settings-grid, .quick, .stat-grid, .two-col, .station-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .dest-grid, .phrase-grid, .stay-grid, .doc-grid, .check-grid, .med-grid, .em-grid, .card-list, .station-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .two-col, .guide-grid, .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dest-grid, .stay-grid, .phrase-grid, .station-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); } .settings-grid .wide { grid-column: 1/-1; } .em-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card-actions { display: flex; gap: 4px; margin-top: 8px; justify-content: flex-end; }
.row-card { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }

/* dashboard */
.hero { position: relative; overflow: hidden; border-radius: 28px; color: #fff; background: var(--forest); min-height: 340px; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.hero-art { position: absolute; inset: 0; } .hero-art svg { width: 100%; height: 100%; display: block; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23, 74, 58, .3) 0%, rgba(23, 74, 58, .78) 40%, rgba(14, 44, 35, .96) 100%); }
.hero-body { position: relative; z-index: 1; padding: 28px 22px; width: 100%; } .hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; margin: 6px 0; } .hero-route { opacity: .88; margin: 0 0 12px; }
.countdown { margin-top: 18px; } .cd-label { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.cd-boxes { display: flex; gap: 10px; margin-top: 6px; } .cd-boxes div { min-width: 64px; padding: 8px 10px; text-align: center; border-radius: 16px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.cd-boxes b { display: block; font: 700 1.6rem var(--serif); } .cd-boxes small { font-size: .7rem; opacity: .8; }
.stat { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .stat .k { display: block; color: var(--muted); font-size: .82rem; } .stat .big { display: block; font: 600 1.7rem var(--serif); }
.stat.over .big { color: var(--red); } .stat { margin-block: 0; } .stat-grid { margin: 14px 0; }
.two-col { margin-bottom: 14px; }
.next-time { color: var(--jade); font-weight: 700; margin: 8px 0; } .summary h2, .next h2, .weather h2 { margin-bottom: 8px; }
.tile { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); transition: transform .15s; } .tile:hover { transform: translateY(-3px); }
.tile > .ic:first-child { width: 28px; height: 28px; color: var(--jade); } .tile .go { margin-left: auto; color: var(--muted); } .tile b { font-family: var(--serif); }
.tile.red { background: var(--red); color: #fff; border: 0; } .tile.red .ic { color: #fff !important; }
.weather { margin-top: 14px; }

/* itinerary */
.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; position: sticky; top: 58px; z-index: 5; background: var(--bg); scrollbar-width: none; }
.day-tab { flex: none; display: flex; flex-direction: column; align-items: flex-start; min-width: 92px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.day-tab small { color: var(--muted); font-size: .75rem; } .day-tab.on { background: var(--forest); color: #fff; border-color: transparent; } .day-tab.on small { color: var(--gold); }
.day { display: none; } .day.show { display: block; animation: fade .3s; }
.day-head { display: flex; gap: 16px; align-items: center; } .day-num { width: 56px; height: 56px; border-radius: 18px; background: var(--forest); color: var(--gold); display: grid; place-items: center; font: 700 1.8rem var(--serif); flex: none; }
.day-title { flex: 1; min-width: 0; }
.timeline { margin: 18px 0; display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 74px 28px 1fr; gap: 8px; } .tl-time { text-align: right; font-size: .78rem; font-weight: 700; color: var(--jade); padding-top: 16px; line-height: 1.3; }
.tl-rail { position: relative; display: flex; justify-content: center; } .tl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child .tl-rail::before { bottom: auto; height: 28px; }
.tl-check { position: relative; z-index: 1; margin-top: 12px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--jade); background: var(--card); display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff; }
.tl-check .ic { width: 14px; height: 14px; } .tl-item.done .tl-check { background: var(--jade); }
.tl-card { margin: 0 0 12px; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); } .tl-item.done .tl-card { opacity: .6; } .tl-item.done h4 { text-decoration: line-through; }
.tl-card p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: .82rem; color: var(--muted); align-items: center; } .meta span { display: inline-flex; gap: 5px; align-items: center; }
.tl-card .card-actions { margin-top: 2px; }
@media (max-width: 480px) { .tl-item { grid-template-columns: 56px 24px 1fr; } .tl-time { font-size: .7rem; } }

/* destinations */
.dest { padding: 0; overflow: hidden; display: flex; flex-direction: column; } .dest-art { position: relative; height: 150px; } .dest-art svg { width: 100%; height: 100%; display: block; }
.badge { position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, .9); color: var(--forest); padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.dest-body { padding: 16px; display: flex; flex-direction: column; flex: 1; } .dest-body h3 .zh { display: block; color: var(--jade); font-size: .95rem; font-weight: 500; margin-top: 2px; }
.dots { color: var(--gold); letter-spacing: 2px; } details { margin-top: 8px; } summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: 6px 0; } .dest-body .row-actions { margin-top: auto; padding-top: 12px; }
.dl.compact { margin: 8px 0; font-size: .92rem; }
.big-zh { font-size: 1.5rem; font-weight: 600; margin: 4px 0; }

/* transport */
.route-line { list-style: none; display: flex; gap: 0; padding: 0; margin: 14px 0; overflow-x: auto; }
.route-line li { flex: 1 0 120px; position: relative; text-align: center; padding-top: 26px; } .route-line li::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 3px; background: var(--jade); opacity: .35; }
.route-line li::after { content: ""; position: absolute; top: 2px; left: calc(50% - 8px); width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 3px solid var(--card); box-shadow: 0 0 0 2px var(--jade); }
.route-line li:first-child::before { left: 50%; } .route-line li:last-child::before { right: 50%; } .route-line b { display: block; font-size: .9rem; } .route-line small { color: var(--muted); }
.station { padding: 14px; border-radius: 16px; background: var(--soft); } .station .zh { display: block; color: var(--jade); font-weight: 600; font-size: 1.1rem; }
.vtimeline { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); position: relative; } @media (min-width: 800px) { .vtimeline { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.vt-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }

/* budget */
.donut-wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; } .donut { width: 170px; height: 170px; flex: none; } .donut-empty { width: 170px; height: 170px; border-radius: 50%; border: 6px solid var(--soft); display: grid; place-items: center; color: var(--muted); }
.legend { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 180px; display: grid; gap: 4px; font-size: .88rem; } .legend li { display: flex; align-items: center; gap: 8px; } .legend span { flex: 1; } .legend i, .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; } .dot { margin-right: 8px; } .dot.big { width: 14px; height: 14px; margin: 0; }
.table-wrap { overflow-x: auto; } .tbl { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; } .tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px; } .tbl td { padding: 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl input.mini { width: 110px; min-height: 36px; padding: 6px 8px; } .neg { color: var(--red); font-weight: 700; } .bar-cell { min-width: 110px; } .bar-cell small { color: var(--muted); }
.expense { display: flex; align-items: center; gap: 12px; padding: 12px 14px; } .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; } .amt { text-align: right; display: flex; flex-direction: column; }
.card-list .expense { grid-column: 1/-1; } @media (min-width: 640px) { .card-list:has(.expense) { grid-template-columns: minmax(0, 1fr); } }

/* checklist */
.check-group header { display: flex; justify-content: space-between; align-items: center; } .check-group h3 { display: flex; gap: 8px; align-items: center; }
.check-group ul { list-style: none; padding: 0; margin: 10px 0; } .check-group li { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-bottom: 1px dashed var(--line); } .check-group li label { display: flex; gap: 12px; align-items: center; padding: 10px 0; flex: 1; cursor: pointer; }
.check-group input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--jade); flex: none; } .check-group li.done span { text-decoration: line-through; color: var(--muted); }
.add-row { display: flex; gap: 8px; } .add-row input { flex: 1; }

/* emergency */
.em-page h1 { color: var(--red); } .em-card { border-color: rgba(214, 69, 69, .35); background: linear-gradient(180deg, rgba(214, 69, 69, .08), transparent), var(--card); text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.em-num { font: 700 3.2rem/1 var(--serif); color: var(--red); } .em-label { font-weight: 700; } .em-card .btn { min-height: 52px; font-size: 1.05rem; }
.em-phrases { display: grid; gap: 10px; } .em-phrase { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-left: 6px solid var(--red); } .em-phrase .zh { display: block; font-size: 1.3rem; } .em-phrase .py, .em-phrase .small { display: block; }
.em-phrase .row-actions { margin: 0; } .consul.primary { border-color: var(--jade); }
.idcard { display: flex; flex-wrap: wrap; gap: 16px; padding: 18px; border-radius: var(--r); border: 3px dashed var(--red); background: var(--card); } .idphoto { width: 120px; height: 150px; border-radius: 16px; background: var(--soft); display: grid; place-items: center; overflow: hidden; color: var(--muted); } .idphoto img { width: 100%; height: 100%; object-fit: cover; } .idphoto .ic { width: 48px; height: 48px; } .idinfo { flex: 1; min-width: 220px; } .idinfo .zh { font-size: 1.2rem; font-weight: 600; margin: 6px 0 0; }
.guide h2 { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; } .guide { border-top: 6px solid var(--jade); } .tone-red { border-top-color: var(--red); } .tone-amber { border-top-color: var(--gold); } .tone-blue { border-top-color: #5B7DB1; } .tone-slate { border-top-color: #8E9B97; }
.gblock { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: var(--soft); } .gblock.danger { background: rgba(214, 69, 69, .1); border: 1px solid rgba(214, 69, 69, .35); } .gblock h4 { margin-bottom: 4px; } .gblock ul, .gblock ol { margin: 4px 0; padding-left: 22px; } .gblock.danger h4 { color: var(--red); }
.phrase .ms { color: var(--muted); } .phrase .big-zh { color: var(--brand); } .phrase.emergency { border-left: 5px solid var(--red); }
.doc-item { display: flex; gap: 6px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); } .doc-item .grow span { display: block; word-break: break-word; } .doc-cat h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.settings-grid h4 { margin: 14px 0 8px; } .file-btn { cursor: pointer; }

/* dialogs & toasts */
dialog { border: 0; padding: 0; border-radius: 24px; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog.small { width: min(440px, calc(100vw - 24px)); } dialog::backdrop { background: rgba(10, 20, 16, .55); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .2s ease; } @keyframes pop { from { transform: scale(.96); opacity: 0; } }
.dlg-form { padding: 20px; display: flex; flex-direction: column; gap: 14px; } .dlg-form header { display: flex; justify-content: space-between; align-items: center; }
.dlg-form footer { display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: var(--card); padding-top: 8px; }
dialog.large { width: min(900px, 100vw - 12px); background: #fff; color: #111; } dialog.large .large-phrase { align-items: center; text-align: center; padding: 40px 20px; position: relative; }
.large-phrase .icon-btn { position: absolute; top: 10px; right: 10px; } .large-phrase .zh { font-size: clamp(2.2rem, 9vw, 4.5rem); font-weight: 700; line-height: 1.3; } .large-phrase .py { font-size: 1.3rem; } .large-phrase .en { color: #555; }
#toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: 90px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--forest); color: #fff; padding: 11px 20px; border-radius: 99px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); animation: up .25s; transition: opacity .3s; font-size: .92rem; } .toast.err { background: var(--red); } .toast.out { opacity: 0; }
@media (min-width: 960px) { #toasts { bottom: 30px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* print */
@media print {
  .side, .topbar, .bottom, .noprint, #sheet, #toasts, .day-tabs, .card-actions, button.icon-btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; } .app { display: block; } .view { padding: 0; max-width: none; animation: none; }
  .day { display: block !important; page-break-inside: avoid; margin-bottom: 18px; } .card, .tl-card { box-shadow: none; border: 1px solid #bbb; } .tl-item.done .tl-card { opacity: 1; }
  body[data-print] .view .sec:not(.printing), body[data-print] .page-head, body[data-print] .notice { display: none !important; }
  body[data-print] .view > .em-page > :not(.sec) { display: none !important; }
  .guide, .card { break-inside: avoid; }
}

/* overflow safety */
.main-wrap, .view, .view > *, .card, .dest-body, .tl-card { min-width: 0; }
.view { overflow-x: clip; } .tl-card h4, .tl-card p, .dl dd { overflow-wrap: anywhere; }
.hero-body { overflow-wrap: anywhere; }

/* destination photos */
.dest-art { background: var(--soft); overflow: hidden; }
.dest-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.dest-art .badge { z-index: 2; }
.credit { position: absolute; z-index: 2; right: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .68rem; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.credit:hover { background: rgba(0, 0, 0, .8); }
