/*晋蒙宁旅行手册增强层 · keeps the original Golden visual language */
:root[data-theme="dark"] {
  --paper: #10181b;
  --surface: #172226;
  --ink: #eef5f3;
  --muted: #9cb0b1;
  --line: #304044;
  --lake: #75b8c8;
  --lake-soft: #203b42;
  --forest: #8aa48e;
  --terracotta: #e08a67;
  --warning: #ee7f6d;
  --shadow: 0 16px 48px rgba(0,0,0,.26);
}
:root[data-theme="dark"] body { background: linear-gradient(rgba(117,184,200,.025) 1px,transparent 1px),var(--paper); background-size:100% 32px; }
:root[data-theme="dark"] .topbar { background: rgba(16,24,27,.9); border-bottom-color: rgba(255,255,255,.08); }
:root[data-theme="dark"] .flight-card { background:#0b1417; }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { color:var(--ink); background:#111d21; border-color:var(--line); }

.enh-status-bar { margin-top:22px; display:grid; grid-template-columns:1fr 1fr auto; gap:8px; align-items:stretch; }
.enh-status-bar > div,
.enh-status-bar > button { min-height:58px; padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:0 8px 24px rgba(25,47,55,.04); }
.enh-status-bar > div { display:flex; flex-direction:column; justify-content:center; gap:4px; }
.enh-status-bar span { color:var(--muted); font-size:10px; font-weight:720; letter-spacing:.06em; }
.enh-status-bar strong { font:760 12px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; font-variant-numeric:tabular-nums; }
.enh-status-bar button { border:1px solid var(--line); color:var(--muted); font-size:11px; font-weight:750; cursor:pointer; }

.cn-map-sheet-actions { min-height:260px; padding:26px 18px; display:flex; flex-direction:column; justify-content:center; gap:12px; background:linear-gradient(135deg,var(--lake-soft),var(--surface)); }
.cn-map-actions { display:grid; grid-template-columns:1fr 1fr auto; gap:8px; }
.cn-map-actions a,.cn-map-actions button { min-height:42px; padding:0 12px; border:1px solid var(--line); border-radius:12px; display:inline-flex; align-items:center; justify-content:center; text-decoration:none; background:var(--surface); color:var(--ink); font-size:12px; font-weight:750; }
.cn-map-actions .map-primary { border-color:var(--lake); background:var(--lake); color:white; }
.cn-map-note { margin:10px 0 0; color:var(--muted); font-size:11px; line-height:1.6; }
.route-map-service-panel { min-width:260px; padding:18px 10px; }
.route-map-service-panel .cn-map-actions { grid-template-columns:1fr 1fr; }
.route-map-service-panel .cn-map-actions button { grid-column:1/-1; }

.enh-stop-actions { margin-top:9px; display:flex; gap:7px; flex-wrap:wrap; }
.enh-stop-actions button,.checkin-btn,.attach-btn { min-height:34px; padding:0 11px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--muted); font-size:11px; font-weight:720; }
.checkin-btn.is-done { border-color:rgba(81,107,85,.45); color:var(--forest); background:rgba(81,107,85,.08); }

.day-extra-grid { margin:14px 0 0; display:grid; gap:8px; }
.day-extra-grid details { border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.36); }
:root[data-theme="dark"] .day-extra-grid details { background:rgba(255,255,255,.025); }
.day-extra-grid summary { padding:10px 12px; cursor:pointer; font-size:12px; font-weight:760; }
.day-extra-grid p { margin:0; padding:0 12px 12px; color:var(--muted); font-size:12px; line-height:1.75; }

.enh-guide-section { padding-top:34px; }
.tool-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.tool-card-grid article { min-height:150px; padding:16px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface); }
.tool-card-grid article > span { color:var(--lake); font:760 10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.12em; }
.tool-card-grid h3 { margin:8px 0 8px; font-size:18px; line-height:1.2; letter-spacing:-.02em; }
.tool-card-grid p { margin:0; color:var(--muted); font-size:12px; line-height:1.7; }
.route-story { margin-top:10px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface); }
.route-story summary { padding:14px 16px; cursor:pointer; font-weight:760; font-size:13px; }
.route-story p { margin:0; padding:0 16px 16px; color:var(--muted); font-size:12px; line-height:1.8; }

.trip-mode-launch { position:fixed; z-index:35; right:14px; bottom:calc(14px + var(--safe-bottom)); min-height:44px; padding:0 17px; border:0; border-radius:999px; color:white; background:var(--ink); box-shadow:0 12px 36px rgba(19,38,47,.24); font-size:12px; font-weight:800; letter-spacing:.03em; }
.trip-mode-dialog { width:min(100%,520px); max-width:520px; height:min(92dvh,850px); max-height:92dvh; margin:auto; padding:0; border:0; border-radius:24px; color:var(--ink); background:var(--paper); box-shadow:0 24px 90px rgba(0,0,0,.32); }
.trip-mode-dialog::backdrop,.enh-dialog::backdrop { background:rgba(8,18,22,.52); backdrop-filter:blur(5px); }
.trip-mode-shell { min-height:100%; display:flex; flex-direction:column; }
.trip-mode-shell > header { position:sticky; top:0; z-index:2; padding:14px 16px 10px; display:flex; justify-content:space-between; align-items:flex-start; gap:12px; border-bottom:1px solid var(--line); background:rgba(243,246,242,.94); backdrop-filter:blur(14px); }
:root[data-theme="dark"] .trip-mode-shell > header { background:rgba(16,24,27,.94); }
.trip-mode-shell header small { color:var(--lake); font:800 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.14em; }
.trip-mode-shell header h2 { margin:5px 0 0; max-width:390px; font-size:19px; line-height:1.2; letter-spacing:-.025em; }
.trip-mode-shell header button { width:36px; height:36px; flex:0 0 auto; border:1px solid var(--line); border-radius:50%; background:var(--surface); font-size:20px; }
.trip-mode-day-tabs { padding:10px 12px; display:flex; gap:6px; overflow-x:auto; border-bottom:1px solid var(--line); scrollbar-width:none; }
.trip-mode-day-tabs::-webkit-scrollbar { display:none; }
.trip-mode-day-tabs button { flex:0 0 auto; min-height:34px; padding:0 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--muted); font:720 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.trip-mode-day-tabs button[aria-pressed="true"] { color:white; border-color:var(--lake); background:var(--lake); }
.trip-mode-body { flex:1; overflow:auto; padding:12px 14px 28px; }
.trip-mode-tabs { position:sticky; top:0; z-index:1; margin:-12px -14px 12px; padding:9px 14px; display:grid; grid-template-columns:repeat(4,1fr); gap:5px; background:var(--paper); }
.trip-mode-tabs button { min-height:36px; padding:0 4px; border:0; border-radius:10px; color:var(--muted); background:transparent; font-size:11px; font-weight:760; }
.trip-mode-tabs button[aria-pressed="true"] { color:var(--ink); background:var(--surface); box-shadow:0 3px 12px rgba(25,47,55,.07); }
.tm-stops { display:grid; gap:8px; }
.tm-stops article { padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.tm-stops time { color:var(--lake); font:760 10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; }
.tm-stops p { margin:6px 0 10px; font-size:12px; line-height:1.65; }
.tm-stops article > div { display:flex; gap:6px; }
.tm-stops button { min-height:34px; padding:0 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface); font-size:10px; font-weight:720; }
.tm-route > p { margin:0 0 12px; color:var(--muted); font-size:12px; line-height:1.6; }
.tm-route > div { display:grid; grid-template-columns:30px 1fr auto auto; gap:7px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); }
.tm-route b { width:26px; height:26px; display:grid; place-items:center; border-radius:50%; color:white; background:var(--lake); font-size:10px; }
.tm-route span { font-size:12px; font-weight:700; }
.tm-route a { min-height:30px; padding:0 8px; display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:9px; text-decoration:none; font-size:10px; }
.tm-advice { display:grid; gap:9px; }
.tm-advice article { padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.tm-advice h3 { margin:0 0 6px; font-size:15px; }
.tm-advice p,.tm-ledger p { margin:0; color:var(--muted); font-size:12px; line-height:1.75; }
.tm-ledger { padding:18px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.tm-ledger button { margin-top:12px; min-height:40px; padding:0 14px; border:0; border-radius:10px; color:white; background:var(--ink); font-weight:760; }

.enh-dialog { width:min(calc(100% - 24px),500px); max-height:86dvh; padding:0; border:0; border-radius:20px; color:var(--ink); background:var(--paper); overflow:auto; }
.enh-dialog > header { padding:15px 16px; display:flex; justify-content:space-between; align-items:flex-start; gap:12px; border-bottom:1px solid var(--line); }
.enh-dialog header small { color:var(--lake); font-size:10px; font-weight:800; }
.enh-dialog header h2 { margin:4px 0 0; font-size:20px; }
.enh-dialog header button { min-height:34px; padding:0 10px; border:1px solid var(--line); border-radius:9px; background:var(--surface); }
.attachment-list { padding:12px 16px 0; }
.attachment-row { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; padding:8px 0; border-bottom:1px solid var(--line); }
.attachment-row a { overflow:hidden; color:var(--lake); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.attachment-row button { min-height:30px; border:0; color:var(--warning); background:transparent; font-size:11px; }
#enh-link-form { padding:14px 16px; display:grid; gap:9px; }
#enh-link-form label { display:grid; gap:5px; color:var(--muted); font-size:10px; font-weight:720; }
#enh-link-form input { min-height:40px; padding:0 10px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
#enh-link-form button { min-height:40px; border:0; border-radius:10px; color:white; background:var(--ink); font-weight:760; }
.file-upload { margin:0 16px; padding:12px; display:block; border:1px dashed var(--line); border-radius:12px; color:var(--muted); font-size:11px; }
.file-upload input { display:block; margin-top:8px; width:100%; }
.enh-privacy-note,.muted-copy { margin:10px 16px 18px; color:var(--muted); font-size:10px; line-height:1.6; }

@media (max-width:560px) {
  .enh-status-bar { grid-template-columns:1fr 1fr; }
  .enh-status-bar > button { grid-column:1/-1; min-height:40px; }
  .tool-card-grid { grid-template-columns:1fr; }
  .trip-mode-dialog { width:100%; max-width:none; height:100dvh; max-height:none; border-radius:0; }
  .cn-map-actions { grid-template-columns:1fr 1fr; }
  .cn-map-actions button { grid-column:1/-1; }
}
