/* /trips — your saved crossings (spec 2026-10-03-shipoclock-trips §2.2). Day/dark from tokens.v2.css;
   night is not used here (you are ashore). Rules: 16 px gutters, type >= 15 px, targets >= 44 px,
   no horizontal page scroll. */

:root { --tv-text: var(--text); --tv-muted: var(--text-muted); --tv-line: var(--line); --tv-track: var(--accent); --tv-surface: var(--surface); }
[hidden] { display: none !important; }
body.trips-page { background: var(--bg); color: var(--text); overflow-x: hidden; }
.tr-main { padding-top: 20px; padding-bottom: 56px; max-width: 760px; }

.tr-head h1, .tr-d-title { margin: 0; font: 600 34px/1.15 var(--font-display); font-variation-settings: var(--font-display-variation); overflow-wrap: anywhere; }
.tr-d-title:focus { outline: none; }
.tr-sub { margin: 4px 0 0; font: 500 17px/1.4 var(--font-text); color: var(--text-muted); }
.tr-status { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-sunken); font: 600 16px/1.4 var(--font-text); }
.tr-off, .tr-empty p { margin: 18px 0 10px; font: 500 17px/1.45 var(--font-text); }

.tr-month { margin: 22px 0 6px; font: 700 15px/1.2 var(--font-text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.tr-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.tr-rows li + li { border-top: 1px solid var(--line); }
.tr-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; color: var(--text); text-decoration: none; }
.tr-row:hover { background: var(--surface-sunken); text-decoration: none; }
.tr-row:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.tr-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-row-t { font: 600 17px/1.3 var(--font-text); overflow-wrap: anywhere; }
.tr-row-l { font: 500 16px/1.35 var(--font-text); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tr-badge { align-self: flex-start; margin-top: 4px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font: 600 15px/1.2 var(--font-text); }
.tr-badge.is-failed { background: var(--surface-sunken); border: 1px solid var(--danger); }
.tr-chev { flex: none; font: 600 24px/1 var(--font-text); color: var(--text-muted); }

.tr-browser { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.tr-browser p { margin: 0 0 10px; font: 500 16px/1.45 var(--font-text); color: var(--text-muted); }

.tr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 16px/1 var(--font-text); text-decoration: none; cursor: pointer; }
.tr-btn:hover { background: var(--surface-sunken); text-decoration: none; }
.tr-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tr-btn-go { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.tr-btn-go:hover { background: var(--accent-pressed); }
.tr-btn-danger { color: var(--danger); border-color: var(--danger); }

.tr-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-bottom: 4px; font: 600 16px/1.2 var(--font-text); color: var(--accent); }
.tr-rename { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tr-rename input { flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 20px/1.2 var(--font-text); }
.tr-rename input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.tr-d-time { margin: 6px 0 0; font: 700 20px/1.3 var(--font-time); font-variant-numeric: tabular-nums; }
.tr-d-local { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); font: 600 16px/1.4 var(--font-text); }
.tr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tr-map { position: relative; height: clamp(260px, 46vh, 440px); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--map-water); }
#tr-map { position: absolute; inset: 0; background: var(--map-water); }
.tr-map .leaflet-container { font: 500 15px/1.3 var(--font-text); }
.tr-map .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; background: var(--surface); color: var(--text); }
.tr-map .leaflet-control-attribution { font-size: 15px; background: var(--surface); color: var(--text-muted); opacity: 0.85; }
.tr-map .leaflet-control-attribution a { color: inherit; }
.leaflet-tooltip.tr-tip { padding: 2px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: none; font: 700 15px/1.3 var(--font-time); font-variant-numeric: tabular-nums; }
.leaflet-tooltip.tr-tip::before { display: none; }
.tr-hull { background: none; border: 0; }
.tr-hull svg path { fill: var(--ship-other); stroke: var(--surface); stroke-width: 1.5; }
.tr-d-foot { margin: 22px 0 0; font: 500 15px/1.45 var(--font-text); color: var(--text-muted); }

.tr-sheet { width: min(480px, calc(100vw - 32px)); max-width: none; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); }
.tr-sheet::backdrop { background: rgba(0,0,0,0.5); }
.tr-sheet h2 { margin: 0 0 8px; font: 600 24px/1.2 var(--font-display); }
.tr-sheet p { margin: 0; font: 400 16px/1.5 var(--font-text); color: var(--text-muted); }
.tr-sheet-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tr-sheet-btns .tr-btn { flex: 1 1 140px; }

.trips-page .tv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
@media (max-width: 479px) {
  .trips-page .tv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-head h1, .tr-d-title { font-size: 28px; }
}
