/* Map-first page composition. Existing dialogs and private record operations remain unchanged. */
:is(#view-plan,#view-records) { max-width:1100px; margin-inline:auto; }
:is(#journey-plan-root,#journey-record-root) .j-page-head h1 { margin:0; font-size:28px; }
.jm-head-action { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:44px; padding:10px 13px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--text); font-size:13px; white-space:nowrap; }
.jm-head-action svg { width:16px!important; height:16px!important; }
.jm-page-subtitle { margin:9px 0 22px; color:var(--muted); font-size:13px; line-height:1.6; }
.jm-map-layout { display:grid; grid-template-columns:minmax(0,1fr); border:1px solid var(--line); border-radius:22px; overflow:hidden; background:var(--surface); }
.jm-map-column { min-width:0; padding:15px; background:var(--surface); }
.jm-map-top { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.jm-map-top strong { font-size:14px; }
.jm-map-top > span,.jm-map-credit { font-size:11px; color:var(--muted); }
.jm-map-stage { display:flex; justify-content:center; overflow:hidden; border-radius:15px; background:#1b2a33; }
.jm-map-art { position:relative; width:100%; max-width:285px; aspect-ratio:2/3; }
.jm-map-art > img { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; }
.jm-map-dot { position:absolute; width:7px; height:7px; border-radius:50%; background:#ffffffbf; border:1px solid #102638; transform:translate(-50%,-50%); }
.jm-map-label { position:absolute; z-index:2; display:flex; align-items:center; justify-content:center; min-height:44px; padding:8px 10px; gap:6px; transform:translate(-50%,-100%); background:#007f8a; color:#fff; border:1px solid #b0f8f5; border-radius:10px; box-shadow:0 3px 12px #0006; font-size:12px; font-weight:650; white-space:nowrap; }
.jm-map-label::after { content:''; position:absolute; top:100%; left:50%; width:8px; height:8px; transform:translate(-50%,-50%) rotate(45deg); background:#007f8a; border-right:1px solid #b0f8f5; border-bottom:1px solid #b0f8f5; }
.jm-map-label i { width:6px; height:6px; border-radius:50%; background:#fff; }
.jm-map-credit { margin:8px 0 0; line-height:1.6; }
.jm-outside { margin:10px 0 0; font-size:12px; color:var(--accent); }
.jm-plan-summary { padding:22px; border-top:1px solid var(--line); align-self:stretch; }
.jm-state { display:inline-block; margin-bottom:18px; color:var(--accent); font-size:12px; font-weight:600; }
.j-next-image.jm-place-heading { display:block; min-height:0; padding:0; margin:0 0 24px; color:var(--text); background:none; isolation:auto; }
.j-next-image.jm-place-heading::after { content:none; }
.j-next-image.jm-place-heading h2 { margin:7px 0 12px; color:var(--text); font-size:26px; word-break:keep-all; overflow-wrap:anywhere; }
.j-next-image.jm-place-heading p { margin:0; color:var(--muted); font-size:13px; }
.j-next-image.jm-place-heading .jm-date { color:var(--text); font-size:16px; }
.jm-goals-label { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; color:var(--muted); font-size:12px; }
.jm-secondary-actions { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 16px; margin-top:12px; }
.jm-secondary-actions .j-text-button { min-height:44px; }
.jm-continuation { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 14px; padding:18px 0; border-bottom:1px solid var(--line); }
.jm-continuation > span { display:flex; flex-wrap:wrap; align-items:center; gap:7px; color:var(--muted); font-size:12px; }
.jm-continuation svg { width:15px!important; height:15px!important; }
.jm-continuation i { font-style:normal; opacity:.6; }
.jm-continuation button { min-height:44px; }
.jm-more { margin:15px 0; color:var(--muted); font-size:12px; }
.jm-more > summary,.jm-season-details > summary { padding:12px 0; min-height:44px; cursor:pointer; }
.jm-more-actions { display:flex; gap:10px; flex-wrap:wrap; margin:8px 0 16px; }
.jm-more .j-scenarios { margin:10px 0; }
.jm-more .j-scenarios summary { min-height:44px; padding-block:12px; }
.jm-more .j-scenarios button { min-height:44px; }
.jm-description { color:var(--muted); font-size:13px; line-height:1.7; margin:10px 0 24px; }
.jm-empty-map .jm-plan-summary h2 { font-size:25px; line-height:1.45; }
.j-personal-records.jm-record-map { margin:0; padding:0; background:none; border:0; border-radius:0; }
.jm-private-heading { display:flex; justify-content:space-between; gap:12px; font-size:12px; color:var(--muted); }
.jm-private-heading b { color:var(--text); }
.jm-record-map .lb { margin:8px 0 0; }
.jm-record-map .lb-seasons { margin-top:0; }
.jm-record-map .lb-seasons .lb-chip { min-height:36px; font-size:12px; }
.jm-record-map .lb-map-card { margin-top:12px; padding:15px; border-radius:22px; }
.jm-record-map .lb-map-top { flex-wrap:wrap; }
.jm-record-map .lb-map-top > div { flex-wrap:wrap; }
.jm-record-map .lb-map-top strong { font-size:14px; }
.jm-record-map .lb-map-body { gap:20px; }
.jm-record-geography { min-width:0; }
.jm-record-map .lb-map { max-width:285px; margin-inline:auto; }
.jm-record-map .lb-map-credit { font-size:11px; }
.jm-place-picker { display:grid; gap:7px; margin:12px 0 0; color:var(--muted); font-size:12px; }
.jm-place-picker select { min-width:0; width:100%; min-height:44px; padding:10px; border:1px solid var(--line); border-radius:10px; background:var(--bg); color:var(--text); font:inherit; font-size:16px; }
.jm-record-map .lb-visits { contain:none; max-width:none; }
.jm-record-map .lb-places { overflow:visible; }
.jm-record-map .lb-visit { grid-template-columns:30px 52px minmax(0,1fr); gap:9px; }
.jm-record-map .lb-places img { width:52px; height:52px; }
.jm-record-map .lb-place-copy strong { display:block; overflow:visible; white-space:normal; overflow-wrap:anywhere; font-size:14px; }
.jm-record-map .lb-place-copy small { font-size:12px; white-space:normal; }
.jm-record-map .lb-first { display:inline-block; margin-left:5px; }
.jm-record-map .lb-places-empty .empty-state { margin:0; background:none; border:0; padding:24px 8px; }
.jm-season-details { margin-top:12px; color:var(--muted); font-size:12px; }
.jm-season-details .lb-stats { margin-top:0; }
.jm-card-section { margin-top:26px; border-top:1px solid var(--line); padding-top:24px; }
.jm-card-section .j-section-heading h2 { font-size:20px; }
.jm-card-empty { display:grid; gap:16px; padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.jm-card-empty strong { font-size:16px; }
.jm-card-empty p { margin:7px 0 0; color:var(--muted); font-size:13px; }
.jm-finished-layout { display:grid; gap:18px; }
.jm-finished-layout .j-completed-card { max-width:220px; margin:0 auto; }
.jm-finished-layout h3 { font-size:18px; }
@media(max-width:759px) {
  .jm-map-art { width:210px; max-width:100%; }
  .jm-record-map .lb-map { width:210px; max-width:100%; }
  .jm-record-geography { padding-inline:0; }
  .jm-plan-summary { padding:18px; }
  .jm-state { margin-bottom:12px; }
  .j-next-image.jm-place-heading { margin-bottom:16px; }
}
@media(min-width:760px) {
  .jm-map-layout.j-next-plan,.jm-map-layout.jm-empty-map { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); }
  .jm-plan-summary { display:flex; flex-direction:column; justify-content:center; border-top:0; border-left:1px solid var(--line); padding:30px; }
  .jm-map-art,.jm-record-map .lb-map { max-width:320px; }
  .jm-record-map .lb-map-body { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:28px; }
  .jm-record-map .lb-visits { align-self:start; }
  .jm-card-empty { grid-template-columns:minmax(0,1fr) auto; align-items:center; }
  .jm-card-empty .j-primary { width:auto; }
  .jm-finished-layout { grid-template-columns:240px minmax(0,1fr); align-items:center; }
}
@media(min-width:600px) and (max-width:759px) { .jm-record-map .lb-map-body { grid-template-columns:1fr; } }
@media(max-width:359px) {
  :is(#journey-plan-root,#journey-record-root) .j-page-head { gap:8px; }
  :is(#journey-plan-root,#journey-record-root) .j-page-head h1 { font-size:24px; }
  .jm-head-action { padding:9px; font-size:12px; }
  .jm-plan-summary { padding:18px; }
}
