:root{
    --bg:#f4f1ea;
    --surface:#fffdf9;
    --surface-2:#f8f5ee;
    --ink:#20221f;
    --muted:#72746d;
    --line:#ddd8ce;
    --accent:#2f5d50;
    --accent-soft:#dfe9e3;
    --danger:#8b3c35;
    --shadow:0 10px 30px rgba(50,45,35,.07);
    --radius:20px;
}
*{box-sizing:border-box}
html{background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{margin:0;background:var(--bg);min-height:100vh}
a{color:inherit}
.site-header{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px clamp(18px,4vw,52px);background:rgba(244,241,234,.93);backdrop-filter:blur(16px);border-bottom:1px solid rgba(221,216,206,.8)}
.brand-wrap{display:flex;align-items:center;gap:8px}.brand{font-size:1.18rem;font-weight:800;text-decoration:none;letter-spacing:-.03em}.version{font-size:.68rem;font-weight:800;letter-spacing:.08em;color:var(--accent);padding:4px 7px;border-radius:999px;background:var(--accent-soft)}
.header-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.header-link{text-decoration:none;font-size:.84rem;font-weight:700;padding:8px 11px;border-radius:10px;background:var(--surface);border:1px solid var(--line)}.header-link.muted{background:transparent;color:var(--muted)}
.page-shell{width:min(1120px,calc(100% - 32px));margin:0 auto;padding:52px 0 72px}.hero{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:28px}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.68rem;font-weight:800;color:var(--accent);margin-bottom:8px}.hero h1,.section-head h2{margin:0;letter-spacing:-.045em}.hero h1{font-size:clamp(2rem,5vw,4rem);line-height:.98;max-width:720px}.source-pill{font-size:.74rem;color:var(--muted);border:1px solid var(--line);padding:8px 10px;border-radius:999px;background:var(--surface)}
.top-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:30px 0 48px}.status-card,.locked-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px}.card-kicker{font-size:.72rem;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);font-weight:800;margin-bottom:14px}.status-head{display:flex;align-items:center;gap:9px;font-size:1.22rem;margin-bottom:18px}.crossing-route,.ferry-route{display:flex;align-items:center;gap:12px;font-weight:800;font-size:1.03rem;margin:4px 0 17px;flex-wrap:wrap}.arrow{color:var(--muted)}.data-row{display:flex;justify-content:space-between;gap:20px;padding:9px 0;border-top:1px solid var(--line);font-size:.86rem}.data-row span:first-child{color:var(--muted)}.data-row span:last-child{text-align:right;font-weight:650}.empty-state{color:var(--muted);font-size:.9rem;padding:12px 0}.locked-card{max-width:600px;margin:70px auto;text-align:center;padding:44px}.locked-icon{font-size:2.5rem}.locked-card h1{margin-bottom:6px}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:14px}.section-head h2{font-size:2rem}.module-off{font-size:.75rem;font-weight:750;padding:7px 10px;background:#efe2df;color:var(--danger);border-radius:999px}
.trip-list{display:grid;gap:18px}.trip-card{background:var(--surface);border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:var(--shadow)}.trip-card>summary{list-style:none}.trip-card>summary::-webkit-details-marker{display:none}.trip-summary{cursor:pointer;padding:22px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px}.trip-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.trip-title-row h3{font-size:1.35rem;letter-spacing:-.025em;margin:0}.trip-period{margin-top:6px;color:var(--muted);font-size:.82rem;display:flex;gap:6px;flex-wrap:wrap}.live-badge{font-size:.62rem;letter-spacing:.1em;font-weight:900;color:var(--accent);background:var(--accent-soft);padding:5px 7px;border-radius:999px}.trip-summary-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}.trip-edit-link{font-size:.78rem;font-weight:800;text-decoration:none;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink)}.trip-edit-link:hover{background:var(--surface-2)}.summary-chevron{font-size:1.25rem;color:var(--muted);transition:transform .2s}.trip-card[open]>.trip-summary .summary-chevron,.budget-panel[open]>summary .summary-chevron{transform:rotate(180deg)}.trip-body{padding:0 24px 26px;border-top:1px solid var(--line)}
.trip-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:18px 0}.trip-stats>div{background:var(--surface-2);border-radius:14px;padding:14px}.trip-stats strong,.trip-stats span{display:block}.trip-stats strong{font-size:1.02rem}.trip-stats span{font-size:.72rem;color:var(--muted);margin-top:4px}.country-strip{font-size:1.6rem;display:flex;gap:6px;margin:4px 0 14px}.overnight-strip{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.overnight-strip span{font-size:.76rem;padding:7px 9px;border:1px solid var(--line);border-radius:999px;color:#53564f;background:#fff}.trip-detail-panel{border:1px solid var(--line);border-radius:16px;background:#fff;margin:18px 0;padding:16px 18px}.trip-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.trip-detail-heading>div{display:flex;flex-direction:column;gap:3px}.trip-detail-heading strong{font-size:.96rem}.trip-detail-heading a{font-size:.74rem;font-weight:800;color:var(--accent);text-decoration:none}.panel-kicker{font-size:.64rem;text-transform:uppercase;letter-spacing:.12em;font-weight:850;color:var(--muted)}.trip-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px 18px}.trip-detail-grid>div{padding:9px 0;border-top:1px solid var(--line)}.trip-detail-grid span,.trip-detail-grid strong{display:block}.trip-detail-grid span{font-size:.7rem;color:var(--muted);margin-bottom:3px}.trip-detail-grid strong{font-size:.88rem}.diesel-panel{background:#fbfaf6}.diesel-rows{display:flex;flex-direction:column}.diesel-rows>div{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:10px 0;border-top:1px solid var(--line);font-size:.82rem}.diesel-rows span{color:#555b56}.diesel-rows strong{text-align:right}.trip-detail-note,.trip-detail-warning{font-size:.72rem;line-height:1.45;margin:11px 0 0;color:var(--muted)}.trip-detail-warning{color:#9d2d22;font-weight:750}
.budget-panel{border:1px solid #cbd8d0;background:#f7fbf8;border-radius:17px;margin:18px 0 28px;overflow:hidden}.budget-panel>summary{list-style:none;cursor:pointer;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:14px}.budget-panel>summary::-webkit-details-marker{display:none}.budget-panel>summary>div:first-child{display:flex;flex-direction:column;gap:3px}.budget-label{font-size:.68rem;text-transform:uppercase;letter-spacing:.12em;font-weight:850;color:var(--accent)}.budget-summary-right{display:flex;align-items:center;gap:10px;font-size:.8rem;color:var(--muted)}.budget-body{border-top:1px solid #d9e3dd;padding:16px 18px 18px}.budget-progress{height:8px;background:#dfe7e2;border-radius:999px;overflow:hidden;margin-bottom:13px}.budget-progress span{display:block;height:100%;background:var(--accent);border-radius:inherit}.budget-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}.budget-metrics>div{padding:10px 12px;background:rgba(255,255,255,.75);border-radius:12px}.budget-metrics span,.budget-metrics strong{display:block}.budget-metrics span{font-size:.7rem;color:var(--muted);margin-bottom:3px}.budget-categories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px 18px;margin-top:6px}.budget-categories>div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #dce5df;padding:9px 0;font-size:.82rem}.budget-categories span{color:#555b56}.expense-list-details{margin-top:15px}.expense-list-details>summary{cursor:pointer;font-weight:750;font-size:.8rem;color:var(--accent)}.expense-list{margin-top:8px;border-top:1px solid #dce5df}.expense-list-row{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #dce5df;font-size:.8rem}.expense-list-row>div{display:flex;flex-direction:column;gap:2px}.expense-list-row>div:last-child{text-align:right}.expense-list-row span,.expense-list-row small{color:var(--muted)}.admin-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.admin-tools a{font-size:.78rem;text-decoration:none;padding:8px 10px;border:1px solid #cbd8d0;border-radius:9px;background:#fff}
.timeline{position:relative;display:grid;gap:12px;margin-top:24px;padding-left:24px}.timeline:before{content:"";position:absolute;left:7px;top:8px;bottom:8px;width:2px;background:var(--line)}.event-card{position:relative;border:1px solid var(--line);border-radius:17px;padding:17px 18px;background:#fff;scroll-margin-top:88px}.event-card:before{content:"";position:absolute;left:-22px;top:24px;width:10px;height:10px;border-radius:50%;background:var(--surface);border:2px solid var(--accent)}.event-title h4{font-size:1rem;margin:0 0 13px}.event-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px}.event-grid>div{display:flex;justify-content:space-between;gap:15px;padding:8px 0;border-top:1px solid #ece8df;font-size:.8rem}.event-grid>div.wide{grid-column:1/-1}.event-grid span{color:var(--muted)}.event-grid strong{text-align:right;font-weight:650}.event-grid.compact{margin-top:5px}.drive-card{background:#faf9f6}.ferry-card{background:#f7fafb}.crossing-card{background:#fbfaf4}.drive-crossings{margin-top:12px;padding:10px 12px;border-radius:11px;background:#f2f0e8}.drive-crossings>div{display:grid;grid-template-columns:auto auto auto 1fr;gap:8px;align-items:center;font-size:.78rem}.drive-crossings small{text-align:right;color:var(--muted)}
.event-expenses{margin-top:14px;padding:12px 13px;background:#f5f8f6;border:1px solid #dbe5df;border-radius:12px}.event-card-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:10px;border-top:1px solid var(--line)}.event-action-button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;box-sizing:border-box;padding:8px 11px;border:1px solid #cbd8d0;border-radius:9px;background:#f7fbf8;color:var(--accent);font:inherit;font-size:.76rem;font-weight:800;line-height:1;text-decoration:none;cursor:pointer}.event-action-button:hover{background:#eef6f1;border-color:#afc6b8}.event-edit-toggle[aria-expanded="true"]{background:#eef6f1;border-color:#afc6b8}.event-edit-panel{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}.event-edit-panel[hidden]{display:none}.event-edit-panel .edit-form{margin-top:0}.event-expenses-title{font-size:.68rem;text-transform:uppercase;letter-spacing:.11em;font-weight:850;color:var(--accent);margin-bottom:7px}.expense-line{display:flex;justify-content:space-between;gap:16px;padding:6px 0;font-size:.82rem}.expense-line>div:first-child{display:flex;flex-direction:column}.expense-line small,.expense-subline{color:var(--muted);font-size:.72rem}.expense-amount{font-weight:800;white-space:nowrap}.expense-subline{padding:0 0 4px}.event-edit{margin-top:14px;border-top:1px solid var(--line);padding-top:10px}.event-edit>summary{font-size:.76rem;font-weight:800;cursor:pointer;color:var(--accent)}.edit-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}.edit-form label,.edit-form fieldset{font-size:.74rem;color:var(--muted)}.edit-form input[type=text],.edit-form input[type=number],.edit-form select{width:100%;margin-top:5px;padding:9px;border:1px solid var(--line);border-radius:9px;background:#fff}.edit-form fieldset{border:1px solid var(--line);border-radius:10px}.edit-form .check{display:block;color:var(--ink);margin:4px}.edit-form button{align-self:end;padding:10px 12px;border:0;border-radius:10px;background:var(--accent);color:#fff;font-weight:800}.timeline-empty{padding:28px 0}.site-footer{text-align:center;color:var(--muted);font-size:.72rem;padding:0 20px 38px}
@media(max-width:780px){.page-shell{width:min(100% - 22px,1120px);padding-top:30px}.site-header{padding:12px}.hero{align-items:flex-start;flex-direction:column}.source-pill{align-self:flex-start}.top-grid{grid-template-columns:1fr;margin-bottom:36px}.trip-summary,.trip-body{padding-left:16px;padding-right:16px}.trip-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.trip-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.trip-stats>div:first-child{grid-column:1/-1}.budget-metrics,.budget-categories{grid-template-columns:1fr}.event-grid{grid-template-columns:1fr}.event-grid>div.wide{grid-column:auto}.timeline{padding-left:18px}.timeline:before{left:4px}.event-card:before{left:-19px}.drive-crossings>div{grid-template-columns:auto auto auto}.drive-crossings small{grid-column:1/-1;text-align:left;padding-left:2px}.edit-form{grid-template-columns:1fr}.header-actions .header-link:first-child{display:none}}
@media(max-width:480px){.hero h1{font-size:2.25rem}.status-card{padding:17px}.data-row{flex-direction:column;gap:3px}.data-row span:last-child{text-align:left}.trip-period{font-size:.75rem}.trip-stats{gap:7px}.trip-detail-grid{grid-template-columns:1fr}.diesel-rows>div{flex-direction:column;gap:3px}.diesel-rows strong{text-align:left}.overnight-strip{gap:6px}.budget-panel>summary{align-items:flex-start}.budget-summary-right{flex-direction:column;align-items:flex-end}.expense-list-row{font-size:.76rem}}
.notice-panel{background:#fff9e8;border:1px solid #e9dcac;border-radius:18px;padding:18px 20px;margin:-22px 0 34px}.notice-panel h2{margin:0 0 12px}.ferry-review{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:12px 0;border-top:1px solid #eadfb9}.ferry-review>div:first-child{display:flex;flex-direction:column;gap:4px}.ferry-review span{font-size:.76rem;color:var(--muted)}.ferry-review-actions{display:flex;gap:7px}.ferry-review-actions form{margin:0}.ferry-review-actions button{border:0;border-radius:9px;padding:8px 10px;background:var(--accent);color:#fff;font-weight:800;cursor:pointer}.ferry-review-actions button.secondary{background:#fff;color:var(--ink);border:1px solid var(--line)}
@media(max-width:650px){.ferry-review{align-items:flex-start;flex-direction:column}}
.expense-edit-link{display:inline-block;margin-top:3px;font-size:.7rem;font-weight:750;color:var(--accent);text-decoration:none}.expense-edit-link:hover{text-decoration:underline}

/* v2 admin actions inside trip cards */
.trip-admin-inline{display:flex;justify-content:flex-end;margin:0 0 10px}.trip-admin-inline a{display:inline-block;padding:7px 9px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--text);font-size:.72rem;font-weight:800;text-decoration:none}.trip-admin-inline a:hover{border-color:var(--accent);color:var(--accent)}

/* Expense actions belong to the individual timeline expense. */
.expense-item-actions{display:flex;align-items:center;gap:10px;margin:3px 0 7px;font-size:.7rem;font-weight:750;line-height:1}.expense-item-actions form{display:flex;align-items:center;margin:0}.expense-item-actions .expense-edit-link,.expense-item-actions .expense-delete-link{display:inline-flex;align-items:center;min-height:1em;margin:0;padding:0;line-height:1;font-size:inherit;font-weight:inherit}.expense-item-actions .expense-edit-link{color:var(--accent);text-decoration:none}.expense-item-actions .expense-delete-link{appearance:none;border:0;background:transparent;color:var(--danger);font-family:inherit;cursor:pointer}.expense-item-actions .expense-edit-link:hover,.expense-item-actions .expense-delete-link:hover{text-decoration:underline}

/* Inline expense editor --------------------------------------------------- */
.expense-item{position:relative}
.expense-item+.expense-item{margin-top:4px;padding-top:4px;border-top:1px solid rgba(38,93,78,.08)}
.expense-item-actions .expense-edit-link{appearance:none;border:0;background:transparent;font-family:inherit;cursor:pointer}
.inline-expense-panel{margin-top:10px;padding:14px;border:1px solid #d7e2db;border-radius:13px;background:#fbfdfb}
.inline-expense-panel[hidden],
.inline-expense-form [hidden],
.inline-expense-field[hidden]{display:none!important}
.inline-expense-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
.inline-expense-field{display:flex;flex-direction:column;gap:6px;min-width:0;color:var(--muted);font-size:.72rem;font-weight:800}
.inline-expense-field.wide{grid-column:1/-1}
.inline-expense-row-break{grid-column:1/-1;height:0;min-height:0;margin:0;padding:0}
.inline-expense-field input,
.inline-expense-field select,
.inline-expense-field textarea{width:100%;box-sizing:border-box;margin:0;padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font:inherit;font-size:.82rem;outline:0}
.inline-expense-field textarea{resize:vertical;min-height:64px}
.inline-expense-field small{display:block;color:var(--muted);font-size:.68rem;font-weight:650;line-height:1.35}
.inline-expense-field input[readonly]{background:#f4f3ef;color:#59605a}
.inline-expense-field input:focus,
.inline-expense-field select:focus,
.inline-expense-field textarea:focus{border-color:#9ab5a5;box-shadow:0 0 0 3px rgba(38,93,78,.08)}
.inline-expense-category-field>label{display:block;color:var(--muted);font-size:.72rem;font-weight:800}
.inline-expense-category-picker{display:none;min-width:0}
.inline-expense-category-trigger{width:100%;min-height:42px;box-sizing:border-box;display:flex;align-items:center;gap:10px;padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font:inherit;font-size:.82rem;font-weight:750;text-align:left;cursor:pointer}
.inline-expense-category-trigger:focus-visible{outline:0;border-color:#9ab5a5;box-shadow:0 0 0 3px rgba(38,93,78,.08)}
.inline-expense-category-current-icon,.inline-expense-category-option-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;color:var(--accent)}
.inline-expense-category-current-icon svg,.inline-expense-category-option-icon svg{width:20px;height:20px;display:block}
.inline-expense-category-current-label{min-width:0;flex:1}
.inline-expense-category-chevron{margin-left:auto;color:var(--muted);font-size:1.05rem;line-height:1;transition:transform .16s ease}
.inline-expense-category-trigger[aria-expanded="true"] .inline-expense-category-chevron{transform:rotate(180deg)}
.inline-expense-category-menu{margin-top:7px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 12px 28px rgba(35,45,39,.12);overflow:auto;max-height:350px;-webkit-overflow-scrolling:touch}
.inline-expense-category-menu[hidden]{display:none!important}
.inline-expense-category-option{width:100%;min-height:46px;display:grid;grid-template-columns:24px minmax(0,1fr) 20px;align-items:center;gap:10px;padding:10px 12px;border:0;border-bottom:1px solid rgba(216,212,201,.72);background:#fff;color:var(--ink);font:inherit;font-size:.84rem;font-weight:700;text-align:left;cursor:pointer}
.inline-expense-category-option:last-child{border-bottom:0}
.inline-expense-category-option[aria-selected="true"]{background:var(--accent-soft);color:var(--accent)}
.inline-expense-category-check{justify-self:end;opacity:0;font-size:.95rem}
.inline-expense-category-option[aria-selected="true"] .inline-expense-category-check{opacity:1}
.inline-expense-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.inline-expense-primary,
.inline-expense-secondary{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:8px 11px;border-radius:9px;font:inherit;font-size:.74rem;font-weight:800;cursor:pointer}
.inline-expense-primary{border:1px solid var(--accent);background:var(--accent);color:#fff}
.inline-expense-secondary{border:1px solid #cbd8d0;background:#fff;color:var(--accent)}
.inline-expense-primary:hover{filter:brightness(.96)}
.inline-expense-secondary:hover{background:#eef6f1}
[data-expense-toggle][aria-expanded="true"]{background:#eef6f1;border-color:#afc6b8}
@media (max-width:720px){
    .inline-expense-form-grid{grid-template-columns:1fr}
    .inline-expense-field.wide{grid-column:auto}
    .inline-expense-row-break{display:none}
    .inline-expense-actions{justify-content:stretch}
    .inline-expense-primary,.inline-expense-secondary{flex:1}
    .inline-expense-category-native.has-mobile-picker{display:none!important}
    .inline-expense-category-picker.is-ready{display:block}
    .inline-expense-category-menu{max-height:min(350px,52vh)}
}

/* Inline expense location ------------------------------------------------ */
.inline-expense-location{grid-column:1/-1;margin:0;padding:12px;border:1px solid var(--line);border-radius:11px;background:#fff}
.inline-expense-location legend{padding:0 5px;color:var(--muted);font-size:.72rem;font-weight:800}
.inline-expense-location-options{display:flex;flex-wrap:wrap;gap:7px}
.inline-location-option{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:8px 10px;border:1px solid #cbd8d0;border-radius:9px;background:#fff;color:var(--accent);font:inherit;font-size:.72rem;font-weight:800;line-height:1.15;cursor:pointer}
.inline-location-option:hover{background:#eef6f1;border-color:#afc6b8}
.inline-location-option[aria-pressed="true"]{background:#eaf3ed;border-color:#9fbdab;box-shadow:inset 0 0 0 1px rgba(38,93,78,.06)}
.inline-expense-location-status{margin:9px 0 0;color:var(--muted);font-size:.72rem;line-height:1.45}
.inline-expense-primary:disabled{opacity:.55;cursor:wait;filter:none}
@media (max-width:720px){
    .inline-expense-location-options{display:grid;grid-template-columns:1fr}
    .inline-location-option{justify-content:flex-start;text-align:left}
}

/* Admin re-authentication overlay */
.np-session-overlay{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgba(25,28,25,.46);backdrop-filter:blur(5px)}
.np-session-overlay[hidden]{display:none}
.np-session-dialog{width:min(430px,100%);background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.28);padding:22px;color:var(--ink)}
.np-session-dialog h2{margin:0 0 8px;font-size:1.15rem}.np-session-dialog p{margin:0 0 16px;color:var(--muted);font-size:.86rem;line-height:1.45}.np-session-dialog label{display:block;margin-top:11px;font-size:.78rem;font-weight:800;color:#555b56}.np-session-dialog input{box-sizing:border-box;width:100%;margin-top:6px;padding:11px 12px;border:1px solid var(--line);border-radius:10px;font:inherit}.np-session-actions{display:flex;gap:9px;justify-content:flex-end;margin-top:16px}.np-session-actions button{padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;font:inherit;font-size:.8rem;font-weight:800;cursor:pointer}.np-session-actions .primary{background:var(--accent);border-color:var(--accent);color:#fff}.np-session-error{min-height:1.2em;margin-top:8px;color:var(--danger);font-size:.78rem;font-weight:700}

/* NordicPass v2.5 maps --------------------------------------------------- */
.section-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.view-toggle,.trip-map-toggle{appearance:none;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit;font-size:.76rem;font-weight:800;line-height:1;padding:8px 10px;cursor:pointer}
.view-toggle:hover,.trip-map-toggle:hover,.view-toggle[aria-pressed="true"],.trip-map-toggle[aria-expanded="true"]{background:var(--accent-soft);border-color:#b9cbc1;color:var(--accent)}
.trip-map-panel{margin:18px 0 22px;border:1px solid var(--line);border-radius:17px;overflow:hidden;background:#fff}
.trip-map-panel[hidden]{display:none}
.trip-map-panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border-bottom:1px solid var(--line)}
.trip-map-panel-head>div{display:flex;flex-direction:column;gap:3px}.trip-map-panel-head strong{font-size:.94rem}
.route-source-badge{font-size:.66rem;font-weight:850;letter-spacing:.04em;color:var(--accent);background:var(--accent-soft);padding:6px 8px;border-radius:999px}
.trip-map-canvas{height:390px;background:#ece9e1}
.trip-map-note{margin:0;padding:11px 15px;border-top:1px solid var(--line);color:var(--muted);font-size:.7rem;line-height:1.45}
.event-lower-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(270px,.75fr);gap:12px;align-items:stretch;margin-top:14px}
.event-lower-grid.map-only,.event-lower-grid.minimap-disabled{grid-template-columns:minmax(0,1fr)}
.event-lower-grid .event-expenses{height:100%;margin-top:0}
.mini-map-shell{min-width:0;border:1px solid #dbe2dd;border-radius:12px;overflow:hidden;background:#f7faf8}
.mini-map-shell[hidden]{display:none}
.mini-map-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid #dbe2dd;background:#f7faf8}
.mini-map-head span{font-size:.64rem;text-transform:uppercase;letter-spacing:.11em;font-weight:850;color:var(--accent)}
.mini-map-head strong{min-width:0;max-width:68%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.72rem;color:#50554f}
.mini-map-canvas{height:190px;background:#ece9e1}
.np-map-marker-wrap{background:transparent!important;border:0!important}
.np-map-marker{display:grid;place-items:center;width:30px;height:30px;border:1px solid rgba(38,48,42,.16);border-radius:999px;background:#fffdf9;box-shadow:0 4px 12px rgba(30,36,32,.2);font-size:16px;line-height:1}
.np-map-marker-current{background:#e8f2ec;border-color:#9fbdab}
.leaflet-container{font:inherit;color:var(--ink)}
.leaflet-popup-content{margin:10px 12px;font-size:.76rem;line-height:1.35}.leaflet-popup-content small{color:var(--muted)}
.leaflet-control-attribution{font-size:9px!important}
@media(max-width:860px){.event-lower-grid{grid-template-columns:1fr}.mini-map-canvas{height:220px}.trip-map-canvas{height:340px}}
@media(max-width:560px){.section-head{align-items:flex-end}.view-toggle{font-size:.7rem;padding:7px 9px}.trip-summary-actions{gap:7px}.trip-map-toggle,.trip-edit-link{font-size:.7rem;padding:7px 8px}.trip-map-canvas{height:300px}.mini-map-canvas{height:205px}.trip-map-panel-head{align-items:flex-start}.route-source-badge{flex:none}}

/* NordicPass v2.6 UI ----------------------------------------------------- */
.hero-copy{min-width:0}
.hero-meta-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:18px}
.hero-cover-link{font-size:.74rem;font-weight:800;color:var(--accent);text-decoration:none;border:1px solid var(--line);background:rgba(255,255,255,.78);padding:8px 10px;border-radius:999px}
.hero-cover-link:hover{background:#fff}
.hero.hero-has-cover{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);align-items:stretch;gap:0;padding:0;overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow)}
.hero.hero-has-cover .hero-copy{display:flex;flex-direction:column;justify-content:center;padding:34px 34px 32px}
.hero.hero-has-cover h1{font-size:clamp(2rem,4.4vw,3.65rem)}
.hero-cover{min-height:270px;position:relative;background:var(--surface-2);overflow:hidden}
.hero-cover:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,253,249,.18),transparent 32%);pointer-events:none}
.hero-cover img{display:block;width:100%;height:100%;min-height:270px;object-fit:cover}

.trip-today-nav{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:2px 0 20px;padding:2px 0}
.today-jump{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:11px 18px;border-radius:999px;background:var(--accent);color:#fff;text-decoration:none;font-size:.86rem;font-weight:850;box-shadow:0 8px 22px rgba(47,93,80,.16);transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}
.today-jump:hover{transform:translateY(-1px);box-shadow:0 10px 26px rgba(47,93,80,.2);filter:brightness(.98)}
.today-jump span:first-child{font-size:1.1rem;line-height:1}
.today-jump-hint{font-size:.72rem;line-height:1.4;color:var(--muted);max-width:270px}
.today-divider{position:relative;z-index:2;display:flex;align-items:center;gap:12px;margin:9px 0 7px;scroll-margin-top:92px}
.today-divider:before,.today-divider:after{content:"";height:1px;flex:1;background:repeating-linear-gradient(90deg,var(--accent) 0 4px,transparent 4px 9px);opacity:.55}
.today-divider span{flex:none;display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid #ccd8cf;border-radius:999px;background:#eef4ef;color:#314b40;font-size:.74rem;font-weight:850;box-shadow:0 4px 12px rgba(40,60,50,.05)}

@media(max-width:760px){
    .hero.hero-has-cover{grid-template-columns:1fr}
    .hero.hero-has-cover .hero-copy{padding:26px 22px 22px}
    .hero-cover,.hero-cover img{min-height:190px;height:190px}
    .hero-cover:after{background:linear-gradient(180deg,rgba(255,253,249,.12),transparent 35%)}
    .trip-today-nav{align-items:flex-start;flex-direction:column;gap:8px}
    .today-jump{width:100%}
    .today-jump-hint{max-width:none;text-align:center;width:100%}
}
@media(max-width:560px){
    .page-shell{width:min(100% - 22px,1120px);padding-top:28px}
    .hero.hero-has-cover{border-radius:22px}
    .hero.hero-has-cover h1{font-size:2.25rem}
    .hero.hero-has-cover .source-pill{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .today-divider{gap:7px;margin-left:-9px}
    .today-divider span{font-size:.69rem;padding:7px 10px}
}


/* NordicPass v2.6 — mockup-aligned journal redesign ---------------------- */
body.has-current-trip .section-head{display:none}

.site-header{
    min-height:72px;
    padding:14px max(22px,calc((100vw - 1320px)/2));
    background:rgba(248,245,238,.92);
    border-bottom:0;
}
.brand{
    font-family:Georgia,"Times New Roman",serif;
    font-size:1.72rem;
    font-weight:700;
    letter-spacing:-.045em;
}
.version{
    font-size:.68rem;
    padding:5px 9px;
    border:1px solid #cad6cd;
    background:#f2f6f2;
}
.site-menu{position:relative}
.site-menu>summary{
    list-style:none;
    width:44px;
    height:44px;
    display:grid;
    align-content:center;
    justify-items:center;
    gap:5px;
    cursor:pointer;
    border-radius:12px;
}
.site-menu>summary::-webkit-details-marker{display:none}
.site-menu>summary:hover{background:rgba(255,255,255,.7)}
.site-menu>summary span{
    display:block;
    width:25px;
    height:2px;
    border-radius:4px;
    background:var(--ink);
}
.site-menu-panel{
    position:absolute;
    right:0;
    top:52px;
    z-index:50;
    min-width:180px;
    display:grid;
    gap:4px;
    padding:8px;
    border:1px solid var(--line);
    border-radius:15px;
    background:var(--surface);
    box-shadow:0 18px 50px rgba(40,36,28,.16);
}
.site-menu:not([open]) .site-menu-panel{display:none}
.site-menu-panel a{
    display:block;
    padding:11px 12px;
    border-radius:10px;
    text-decoration:none;
    font-size:.82rem;
    font-weight:800;
}
.site-menu-panel a:hover{background:var(--surface-2)}
.site-menu-panel a.muted{color:var(--muted)}

.page-shell{
    width:min(1280px,calc(100% - 38px));
    padding:36px 0 80px;
}

/* Current trip hero */
.journey-hero{
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr);
    min-height:390px;
    overflow:hidden;
    margin:0 0 22px;
    border:1px solid var(--line);
    border-radius:28px;
    background:var(--surface);
    box-shadow:0 16px 46px rgba(52,47,38,.10);
}
.journey-hero-media{
    grid-column:2;
    grid-row:1;
    min-width:0;
    overflow:hidden;
    background:#e9e7df;
}
.journey-hero-media img{
    display:block;
    width:100%;
    height:100%;
    min-height:390px;
    object-fit:cover;
}
.journey-hero-placeholder{
    display:grid;
    place-items:center;
    font-size:4rem;
    background:linear-gradient(135deg,#e9eee9,#e8e2d7);
}
.journey-hero-content{
    position:relative;
    z-index:2;
    grid-column:1;
    grid-row:1;
    display:flex;
    flex-direction:column;
    justify-content:center;
    min-width:0;
    padding:34px 40px 30px;
    background:linear-gradient(90deg,#fffdf9 0%,#fffdf9 82%,rgba(255,253,249,.88) 92%,rgba(255,253,249,0) 100%);
}
.journey-icon{
    width:54px;
    height:54px;
    display:grid;
    place-items:center;
    margin-bottom:18px;
    border:1px solid var(--line);
    border-radius:16px;
    background:#f7f4ec;
    font-size:1.45rem;
}
.journey-title-row{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}
.journey-title-row h1{
    margin:0;
    font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(2.45rem,4.5vw,4.6rem);
    line-height:.98;
    letter-spacing:-.055em;
}
.journey-tagline{
    margin:12px 0 28px;
    font-size:1.05rem;
    color:#565852;
}
.journey-stats{
    display:flex;
    align-items:stretch;
    gap:10px;
    flex-wrap:wrap;
}
.journey-stats>div{
    min-width:118px;
    display:flex;
    align-items:center;
    gap:10px;
    padding:13px 14px;
    border:1px solid #ddd6ca;
    border-radius:14px;
    background:rgba(255,253,249,.88);
}
.journey-stat-icon{
    font-size:1.2rem;
    line-height:1;
}
.journey-stats small,
.journey-stats strong{display:block}
.journey-stats small{
    margin-bottom:2px;
    color:var(--muted);
    font-size:.68rem;
}
.journey-stats strong{
    font-size:.94rem;
    white-space:nowrap;
}
.journey-meta{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin-top:16px;
    color:var(--muted);
    font-size:.73rem;
}
.journey-meta>a{
    color:var(--accent);
    font-weight:800;
    text-decoration:none;
}
.journey-countries{display:flex;gap:3px;font-size:1.15rem}

.journey-today-nav{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    margin:26px 0 30px;
}
.journey-today-button{
    min-width:320px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:14px 28px;
    border-radius:999px;
    background:var(--accent);
    color:#fff;
    text-decoration:none;
    font-size:1rem;
    font-weight:850;
    box-shadow:0 10px 24px rgba(47,93,80,.18);
}
.journey-today-button>span:first-child{font-size:1.45rem;line-height:1}
.journey-today-button:hover{filter:brightness(.97);transform:translateY(-1px)}
.journey-today-hint{
    max-width:245px;
    color:var(--muted);
    font-size:.76rem;
    line-height:1.45;
}

/* The active trip is the journal, not another accordion card. */
.current-trip-card{
    overflow:visible;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}
.current-trip-card>.trip-summary{display:none}
.current-trip-card>.trip-body{
    display:flex;
    flex-direction:column;
    padding:0;
    border:0;
}
.current-trip-card .trip-stats,
.current-trip-card .country-strip,
.current-trip-card .overnight-strip,
.current-trip-card .trip-today-nav{display:none}
.current-trip-card .timeline{order:1}
.current-trip-card .trip-details-drawer{order:0}
.current-trip-card .trip-map-panel,
.current-trip-card .trip-detail-panel,
.current-trip-card .budget-panel{order:2}
.current-trip-card .trip-map-panel{margin-top:30px}

.trip-list{gap:22px}

/* Mockup-style active timeline */
.current-trip-card .timeline{
    position:relative;
    display:grid;
    gap:22px;
    margin:10px auto 0;
    padding:0 0 0 205px;
    width:min(100%,1040px);
}
.current-trip-card .timeline:before{
    left:145px;
    top:10px;
    bottom:10px;
    width:1px;
    background:#ddd8ce;
}
.current-trip-card .event-card{
    margin-left:36px;
    padding:20px 22px;
    border:1px solid #e2ddd4;
    border-radius:18px;
    background:#fffdf9;
    box-shadow:0 8px 22px rgba(54,49,39,.065);
}
.current-trip-card .event-card:before{
    content:attr(data-np-date) "\A" attr(data-np-time);
    white-space:pre;
    position:absolute;
    left:-236px;
    top:20px;
    width:118px;
    height:auto;
    border:0;
    border-radius:0;
    background:transparent;
    color:#51534e;
    font-size:.76rem;
    line-height:1.45;
    text-align:right;
}
.current-trip-card .event-card:after{
    content:attr(data-np-icon);
    position:absolute;
    left:-83px;
    top:17px;
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    border:1px solid #d8d6c8;
    border-radius:999px;
    background:#f2f3e8;
    color:#2f5145;
    font-size:1.05rem;
    box-shadow:0 2px 8px rgba(45,52,44,.04);
}
.current-trip-card .event-title h4{
    margin:0 0 8px;
    font-size:1.12rem;
    letter-spacing:-.02em;
}
.current-trip-card .event-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 20px;
}
.current-trip-card .event-grid>div{
    padding:7px 0;
    border-top:0;
    font-size:.78rem;
}
.current-trip-card .event-grid span{font-size:.72rem}
.current-trip-card .event-grid strong{font-weight:700}
.current-trip-card .drive-card,
.current-trip-card .ferry-card,
.current-trip-card .crossing-card{background:#fffdf9}

.current-trip-card .today-divider{
    width:calc(100% + 205px);
    margin:2px 0 2px -205px;
    gap:12px;
    scroll-margin-top:92px;
}
.current-trip-card .today-divider:before,
.current-trip-card .today-divider:after{
    height:2px;
    background:repeating-linear-gradient(90deg,var(--accent) 0 4px,transparent 4px 10px);
    opacity:.75;
}
.current-trip-card .today-divider span{
    padding:10px 16px;
    border:1px solid #d6d8c6;
    border-radius:13px;
    background:#f2f2e3;
    color:#263c34;
    font-size:.78rem;
    box-shadow:none;
}

/* Small map thumbnail on the active journey */
.current-trip-card .event-lower-grid{
    grid-template-columns:minmax(0,1fr) 190px;
    gap:14px;
    align-items:start;
}
.current-trip-card .event-lower-grid.map-only{
    display:flex;
    justify-content:flex-end;
}
.current-trip-card .event-lower-grid.map-only .mini-map-shell{width:190px}
.current-trip-card .mini-map-shell{border-radius:13px}
.current-trip-card .mini-map-head{display:none}
.current-trip-card .mini-map-canvas{height:124px}

/* Existing secondary information remains, but no longer blocks the story. */
.current-trip-card .trip-detail-panel,
.current-trip-card .budget-panel,
.current-trip-card .trip-map-panel{
    width:min(100%,1040px);
    margin-left:auto;
    margin-right:auto;
}
.current-trip-card .trip-detail-panel:first-of-type{margin-top:42px}

.after-journey-status{
    width:min(100%,1040px);
    margin:64px auto 0;
}
.after-journey-status:before{
    content:"Live journey information";
    display:block;
    margin:0 0 12px;
    color:var(--muted);
    font-size:.68rem;
    font-weight:850;
    letter-spacing:.13em;
    text-transform:uppercase;
}
.after-journey-status .top-grid{
    margin:0;
    gap:14px;
}
.after-journey-status .status-card{
    box-shadow:none;
    background:rgba(255,253,249,.75);
}

/* Previous trip accordions */
.has-current-trip .trip-card:not(.current-trip-card){
    width:min(100%,1040px);
    margin-left:auto;
    margin-right:auto;
}
.has-current-trip .trip-card:not(.current-trip-card):first-of-type{margin-top:44px}

.site-footer{
    margin-top:28px;
    padding:22px 20px 34px;
    border-top:1px solid rgba(221,216,206,.7);
    font-size:.78rem;
}

@media(max-width:900px){
    .journey-hero{
        grid-template-columns:minmax(0,1fr) minmax(280px,.75fr);
        min-height:350px;
    }
    .journey-hero-content{padding:30px}
    .journey-hero-media img{min-height:350px}
    .journey-stats>div{min-width:108px}
    .current-trip-card .timeline{padding-left:175px}
    .current-trip-card .timeline:before{left:122px}
    .current-trip-card .event-card{margin-left:34px}
    .current-trip-card .event-card:before{left:-204px;width:102px}
    .current-trip-card .event-card:after{left:-75px}
    .current-trip-card .today-divider{width:calc(100% + 175px);margin-left:-175px}
}

@media(max-width:700px){
    .site-header{min-height:62px;padding:9px 14px}
    .brand{font-size:1.48rem}
    .site-menu>summary{width:40px;height:40px}
    .page-shell{width:min(100% - 18px,1280px);padding-top:18px}

    .journey-hero{
        display:block;
        min-height:440px;
        border-radius:22px;
    }
    .journey-hero-media{
        position:absolute;
        inset:0;
        height:100%;
    }
    .journey-hero-media img{min-height:440px;height:100%}
    .journey-hero-media:after{
        content:"";
        position:absolute;
        inset:0;
        background:linear-gradient(180deg,rgba(255,253,249,.96) 0%,rgba(255,253,249,.91) 48%,rgba(255,253,249,.45) 76%,rgba(255,253,249,.12) 100%);
    }
    .journey-hero-content{
        min-height:440px;
        justify-content:flex-start;
        padding:24px 20px 20px;
        background:transparent;
    }
    .journey-icon{width:48px;height:48px;margin-bottom:14px}
    .journey-title-row h1{font-size:2.45rem}
    .journey-tagline{margin:9px 0 20px;font-size:.96rem}
    .journey-stats{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:8px;
    }
    .journey-stats>div{min-width:0;padding:10px 11px;background:rgba(255,253,249,.84)}
    .journey-stats>div:first-child{grid-column:1/-1}
    .journey-meta{margin-top:12px}

    .journey-today-nav{
        flex-direction:column;
        gap:8px;
        margin:18px 0 24px;
    }
    .journey-today-button{width:min(100%,420px);min-width:0}
    .journey-today-hint{text-align:center;max-width:320px;font-size:.7rem}

    .current-trip-card .timeline{
        width:100%;
        gap:18px;
        padding:0 0 0 40px;
        margin-top:4px;
    }
    .current-trip-card .timeline:before{left:16px}
    .current-trip-card .event-card{
        margin:28px 0 0 10px;
        padding:17px 16px;
        border-radius:16px;
    }
    .current-trip-card .event-card:before{
        left:0;
        top:-26px;
        width:auto;
        max-width:calc(100% - 6px);
        text-align:left;
        white-space:normal;
        content:attr(data-np-date) "  ·  " attr(data-np-time);
        font-size:.7rem;
        font-weight:700;
        color:var(--muted);
    }
    .current-trip-card .event-card:after{
        left:-51px;
        top:14px;
        width:38px;
        height:38px;
        font-size:.88rem;
    }
    .current-trip-card .today-divider{
        width:calc(100% + 40px);
        margin:8px 0 0 -40px;
    }
    .current-trip-card .today-divider span{
        padding:8px 10px;
        font-size:.69rem;
    }
    .current-trip-card .event-grid{grid-template-columns:1fr}
    .current-trip-card .event-lower-grid{grid-template-columns:1fr}
    .current-trip-card .event-lower-grid.map-only{display:block}
    .current-trip-card .event-lower-grid.map-only .mini-map-shell,
    .current-trip-card .mini-map-shell{width:100%}
    .current-trip-card .mini-map-canvas{height:180px}

    .after-journey-status{margin-top:42px}
    .after-journey-status .top-grid{grid-template-columns:1fr}
}

@media(max-width:430px){
    .journey-hero{min-height:420px}
    .journey-hero-media img,.journey-hero-content{min-height:420px}
    .journey-title-row h1{font-size:2.12rem}
    .journey-title-row .live-badge{font-size:.55rem}
    .journey-stats small{font-size:.62rem}
    .journey-stats strong{font-size:.84rem}
    .journey-stat-icon{font-size:1rem}
    .current-trip-card .event-title h4{font-size:1rem}
}

.previous-trips-heading{
    width:min(100%,1040px);
    margin:58px auto 6px;
}
.previous-trips-heading h2{
    margin:0;
    font-family:Georgia,"Times New Roman",serif;
    font-size:2rem;
    letter-spacing:-.035em;
}

/* NordicPass v2.6 mockup exact — final timeline layer -------------------- */
.site-header{z-index:5000}

.journey-icon svg{width:28px;height:28px;display:block}
.journey-stat-icon{display:grid;place-items:center;color:var(--accent)}
.journey-stat-icon svg{width:19px;height:19px;display:block}
.journey-night-meta{display:inline-flex;align-items:center;gap:6px}
.journey-night-meta svg{width:14px;height:14px;display:block;color:var(--accent)}

/* The line icon is supplied as SVG. Older trip accordions keep their
   existing compact timeline marker; the mockup marker belongs to the
   active journey only. */
.event-line-icon{display:none}
.current-trip-card .event-card:after{display:none}
.current-trip-card .event-line-icon{
    position:absolute;
    left:-83px;
    top:17px;
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    border:1px solid #d8d6c8;
    border-radius:999px;
    background:#f2f3e8;
    color:#2f5d50;
    box-shadow:0 2px 8px rgba(45,52,44,.04);
    z-index:2;
}
.current-trip-card .event-line-icon svg{width:23px;height:23px;display:block}

/* Stop photos are remote URLs. A broken image is hidden by JS and this
   same media slot switches to the standard mini map. */
.current-trip-card .stop-media,
.current-trip-card .drive-route-thumb-shell{
    width:190px;
    margin:13px 0 0 auto;
}
.current-trip-card .stop-image-wrap,
.current-trip-card .drive-route-thumb-shell,
.current-trip-card .event-card > .mini-map-shell{
    overflow:hidden;
    border:1px solid #e1ddd4;
    border-radius:13px;
    background:#f0eee8;
}
.current-trip-card .stop-image-wrap{height:124px}
.current-trip-card .stop-image-wrap img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}
.current-trip-card .stop-media .mini-map-shell,
.current-trip-card .event-card > .mini-map-shell{
    width:190px;
    margin:0;
}
.current-trip-card .event-card > .mini-map-shell{margin:13px 0 0 auto}
.current-trip-card .stop-media .mini-map-canvas,
.current-trip-card .event-card > .mini-map-shell .mini-map-canvas,
.current-trip-card .drive-route-thumb{height:124px}
.current-trip-card .stop-image-fallback{margin-top:0}

/* Separate expense entries are first-class timeline cards. */
.current-trip-card .expense-card{
    padding-top:17px;
    padding-bottom:17px;
    background:#fbfaf5;
}
.current-trip-card .expense-card .event-title h4{margin-bottom:4px}
.expense-card-merchant{font-size:.8rem;font-weight:750;color:var(--ink)}
.expense-card-meta{margin-top:4px;color:var(--muted);font-size:.73rem;line-height:1.45}

/* Admin actions stay out of the public visual hierarchy. */
.event-card{overflow:visible}
.event-card .event-title{padding-right:42px}
.event-admin-menu{
    position:absolute;
    right:13px;
    top:11px;
    z-index:1600;
}
.event-admin-menu>summary,
.trip-admin-menu>summary{
    list-style:none;
    display:grid;
    place-items:center;
    width:34px;
    height:30px;
    border:0;
    border-radius:9px;
    background:transparent;
    color:var(--muted);
    cursor:pointer;
    font-weight:900;
    letter-spacing:.08em;
    line-height:1;
}
.event-admin-menu>summary::-webkit-details-marker,
.trip-admin-menu>summary::-webkit-details-marker{display:none}
.event-admin-menu>summary:hover,
.trip-admin-menu>summary:hover{background:var(--surface-2);color:var(--ink)}
.event-admin-popover,
.trip-admin-popover{
    position:absolute;
    right:0;
    top:34px;
    z-index:1700;
    min-width:150px;
    display:grid;
    gap:3px;
    padding:7px;
    border:1px solid var(--line);
    border-radius:12px;
    background:var(--surface);
    box-shadow:0 15px 38px rgba(40,36,28,.16);
}
.event-admin-menu:not([open]) .event-admin-popover,
.trip-admin-menu:not([open]) .trip-admin-popover{display:none}
.event-admin-popover .event-action-button,
.event-admin-popover .expense-delete-link,
.trip-admin-popover a{
    width:100%;
    display:block;
    padding:9px 10px;
    border:0;
    border-radius:8px;
    background:transparent;
    color:var(--ink);
    text-align:left;
    text-decoration:none;
    font:inherit;
    font-size:.76rem;
    font-weight:800;
    cursor:pointer;
}
.event-admin-popover .event-action-button:hover,
.event-admin-popover .expense-delete-link:hover,
.trip-admin-popover a:hover{background:var(--surface-2)}
.event-admin-popover .expense-delete-link{color:#9b3d35}
.event-admin-popover form{margin:0}

.trip-summary-actions{display:flex;align-items:center;gap:7px}
.trip-admin-menu{position:relative;z-index:20}
.trip-admin-popover{top:36px}

/* Heavy information is deliberately one level down from the story. */
.current-trip-card .trip-details-drawer{
    order:0;
    width:min(100%,1040px);
    margin:34px auto 0;
    border-top:1px solid var(--line);
    border-bottom:1px solid var(--line);
}
.trip-details-drawer>summary{
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:17px 2px;
    color:var(--ink);
    cursor:pointer;
    font-size:.84rem;
    font-weight:850;
}
.trip-details-drawer>summary::-webkit-details-marker{display:none}
.trip-details-drawer .summary-chevron{transition:transform .18s ease}
.trip-details-drawer[open] .summary-chevron{transform:rotate(180deg)}
.trip-details-body{padding:2px 0 24px}
.trip-details-body .country-strip{display:flex}
.current-trip-card .trip-details-body .trip-map-panel,
.current-trip-card .trip-details-body .trip-detail-panel,
.current-trip-card .trip-details-body .budget-panel{width:100%;margin-left:0;margin-right:0}
.current-trip-card .trip-details-body .trip-map-panel{margin-top:18px}
.current-trip-card .trip-details-body .trip-detail-panel:first-of-type{margin-top:18px}

/* Inline stop editing gets one wide URL field without changing the old
   data-entry layout. */
.edit-form label.wide{grid-column:1/-1}
.edit-form label small{display:block;margin-top:5px;color:var(--muted);font-size:.68rem;line-height:1.35}

@media(max-width:900px){
    .current-trip-card .event-line-icon{left:-75px}
}

@media(max-width:700px){
    .current-trip-card .event-line-icon{
        left:-51px;
        top:14px;
        width:38px;
        height:38px;
    }
    .current-trip-card .event-line-icon svg{width:19px;height:19px}
    .current-trip-card .stop-media,
    .current-trip-card .drive-route-thumb-shell,
    .current-trip-card .stop-media .mini-map-shell,
    .current-trip-card .event-card > .mini-map-shell{width:100%}
    .current-trip-card .stop-image-wrap,
    .current-trip-card .stop-media .mini-map-canvas,
    .current-trip-card .event-card > .mini-map-shell .mini-map-canvas,
    .current-trip-card .drive-route-thumb{height:170px}
    .current-trip-card .trip-details-drawer{margin-top:26px}
    .event-admin-popover{right:-4px}
}

/* NordicPass v2.6 — reference-layout correction, 2026-08-30 ------------- */
body.has-journey-hero{background:#fbf8f1}
body.has-journey-hero .site-header{
    min-height:98px;
    padding:18px max(38px,calc((100vw - 1320px)/2));
    background:rgba(251,248,241,.96);
    backdrop-filter:blur(10px);
}
body.has-journey-hero .brand{font-size:2.08rem;line-height:1;font-weight:700}
body.has-journey-hero .brand-wrap{gap:16px}
body.has-journey-hero .version{
    padding:7px 13px;
    font-size:.82rem;
    letter-spacing:.02em;
    background:rgba(255,255,255,.36);
    border:1px solid #cbd1b4;
    color:#315a4d;
}
.header-tools{display:flex;align-items:center;gap:30px}
.site-search{
    width:42px;height:42px;padding:5px;border:0;background:transparent;color:#161c1a;cursor:pointer
}
.site-search svg{display:block;width:100%;height:100%}
body.has-journey-hero .site-menu>summary{width:43px;height:43px;gap:6px}
body.has-journey-hero .site-menu>summary span{width:29px;height:2.5px}

body.has-journey-hero .page-shell{
    width:min(1280px,calc(100% - 58px));
    padding:2px 0 72px;
}

/* One full cover image, with the content fading into it just like the reference. */
body.has-journey-hero .journey-hero{
    display:block;
    position:relative;
    min-height:368px;
    height:368px;
    margin:0 0 30px;
    border-radius:24px;
    overflow:hidden;
    background:#eeeae2;
    box-shadow:0 7px 17px rgba(69,57,43,.08);
}
body.has-journey-hero .journey-hero-media{
    position:absolute;inset:0;display:block;overflow:hidden;background:#e8e6df
}
body.has-journey-hero .journey-hero-media img{
    width:100%;height:100%;min-height:0;object-fit:cover;object-position:center center
}
body.has-journey-hero .journey-hero-media:after{
    content:"";position:absolute;inset:0;pointer-events:none;
    background:
      linear-gradient(90deg,rgba(255,253,249,.98) 0%,rgba(255,253,249,.96) 25%,rgba(255,253,249,.80) 43%,rgba(255,253,249,.32) 62%,rgba(255,253,249,.03) 82%),
      linear-gradient(180deg,rgba(255,253,249,.04) 0%,rgba(255,253,249,0) 70%,rgba(255,253,249,.10) 100%);
}
body.has-journey-hero .journey-hero-placeholder{font-size:0}
body.has-journey-hero .journey-hero-placeholder:before{
    content:"";position:absolute;inset:0;background:linear-gradient(135deg,#f4f1ea,#e5e8df)
}
body.has-journey-hero .journey-hero-content{
    position:relative;z-index:2;display:flex;flex-direction:column;justify-content:flex-start;
    width:100%;height:100%;min-height:0;padding:31px 31px 25px;background:transparent
}
body.has-journey-hero .journey-icon{
    width:66px;height:66px;margin:0 0 16px;border-radius:18px;background:rgba(250,247,239,.88)
}
body.has-journey-hero .journey-icon svg{width:31px;height:31px}
body.has-journey-hero .journey-title-row{display:block}
body.has-journey-hero .journey-title-row h1{
    max-width:650px;font-size:3.08rem;line-height:.98;letter-spacing:-.047em
}
body.has-journey-hero .journey-tagline{
    margin:13px 0 0;font-size:1.16rem;line-height:1.25;color:#484b47
}
body.has-current-trip .journey-stats{
    width:min(690px,calc(100% - 20px));
    display:grid;grid-template-columns:1.34fr 1fr 1fr 1.32fr 1.08fr;
    gap:12px;margin-top:auto;align-items:stretch;flex-wrap:nowrap
}
body.has-current-trip .journey-stats>div{
    min-width:0;height:80px;padding:13px 15px;gap:11px;border-radius:15px;
    border:1px solid #ddd4c4;background:rgba(255,253,249,.88);backdrop-filter:blur(4px)
}
body.has-current-trip .journey-stat-icon svg{width:24px;height:24px;color:#333b38}
body.has-current-trip .journey-stats small{font-size:.77rem;line-height:1.05;color:#5b5c57}
body.has-current-trip .journey-stats strong{font-size:1.04rem;line-height:1.18;color:#161b19}
body.has-current-trip .journey-meta{display:none!important}

body.has-current-trip .journey-today-nav{
    height:76px;display:flex;align-items:center;justify-content:center;gap:24px;margin:0 0 42px
}
body.has-current-trip .journey-today-button{
    width:390px;min-width:390px;height:76px;padding:0 30px;gap:14px;
    border-radius:999px;font-size:1.42rem;font-weight:800;box-shadow:0 8px 18px rgba(47,93,80,.13)
}
body.has-current-trip .journey-today-button>span:first-child{font-size:1.9rem;font-weight:400}
body.has-current-trip .journey-today-hint{
    width:205px;max-width:205px;display:grid;grid-template-columns:60px 1fr;align-items:start;gap:10px;
    color:#4c4f4a;font-size:.77rem;line-height:1.45
}
body.has-current-trip .journey-today-arrow{width:60px;height:31px;margin-top:-3px;color:var(--accent)}

/* Reference geometry: date column / line-icon column / compact story card. */
body.has-current-trip .current-trip-card .timeline{
    width:100%;display:grid;gap:28px;margin:0;padding:0 42px 0 226px
}
body.has-current-trip .current-trip-card .timeline:before{
    left:170px;top:0;bottom:0;width:1px;background:#ded9cd
}
body.has-current-trip .current-trip-card .event-card{
    min-height:154px;margin:0;padding:20px 190px 18px 24px;border-radius:17px;
    border:1px solid #e3ddd2;background:rgba(255,253,249,.96);
    box-shadow:0 5px 14px rgba(55,46,36,.065)
}
body.has-current-trip .current-trip-card .event-card:before{
    left:-208px;top:16px;width:88px;color:#444743;font-size:.82rem;line-height:1.55;text-align:right
}
body.has-current-trip .current-trip-card .event-line-icon{
    left:-86px;top:17px;width:61px;height:61px;border-color:#d6d4c5;background:#f2f2e7
}
body.has-current-trip .current-trip-card .event-line-icon svg{width:26px;height:26px}
body.has-current-trip .current-trip-card .event-title{padding-right:0}
body.has-current-trip .current-trip-card .event-title h4{
    margin:0 0 7px;font-size:1.14rem;line-height:1.15;letter-spacing:-.025em
}
body.has-current-trip .current-trip-card .event-detail-grid,
body.has-current-trip .current-trip-card .drive-crossings{display:none}
body.has-current-trip .event-story{display:flex;flex-direction:column;gap:8px;min-width:0}
body.has-current-trip .event-story-place,
body.has-current-trip .event-story-route,
body.has-current-trip .event-story-note{
    min-width:0;color:#535651;font-size:.86rem;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
body.has-current-trip .event-story-place{display:flex;align-items:center;gap:8px}
body.has-current-trip .story-pin{width:18px;height:18px;flex:none;color:#4e5551}
body.has-current-trip .story-pin svg{width:18px;height:18px;display:block}
body.has-current-trip .event-story-route span{color:#6a6d67;padding:0 4px}
body.has-current-trip .event-story-note{margin-top:1px;color:#535550}

/* Media is a compact square on the right, leaving room for the ••• control. */
body.has-current-trip .current-trip-card .stop-media,
body.has-current-trip .current-trip-card .drive-route-thumb-shell,
body.has-current-trip .current-trip-card .event-card>.mini-map-shell{
    position:absolute;right:68px;top:18px;width:136px;height:120px;margin:0;z-index:1
}
body.has-current-trip .current-trip-card .stop-image-wrap,
body.has-current-trip .current-trip-card .drive-route-thumb-shell,
body.has-current-trip .current-trip-card .event-card>.mini-map-shell{
    border-radius:13px
}
body.has-current-trip .current-trip-card .stop-image-wrap,
body.has-current-trip .current-trip-card .stop-media .mini-map-shell,
body.has-current-trip .current-trip-card .event-card>.mini-map-shell,
body.has-current-trip .current-trip-card .drive-route-thumb{width:136px;height:120px}
body.has-current-trip .current-trip-card .stop-media .mini-map-shell{position:static;margin:0}
body.has-current-trip .current-trip-card .stop-media .mini-map-canvas,
body.has-current-trip .current-trip-card .event-card>.mini-map-shell .mini-map-canvas,
body.has-current-trip .current-trip-card .drive-route-thumb{height:120px}
body.has-current-trip .event-admin-menu{right:14px;top:11px}
body.has-current-trip .event-admin-menu>summary{width:35px;height:34px;font-size:1rem;color:#151a18}

/* Expense cards have the same compact rhythm and a visual amount tile. */
body.has-current-trip .current-trip-card .expense-card{min-height:142px;padding:20px 190px 18px 24px;background:#fffdfa}
body.has-current-trip .expense-card-merchant{font-size:.86rem;line-height:1.35}
body.has-current-trip .expense-card-meta{margin-top:8px;font-size:.8rem;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.has-current-trip .expense-amount-tile{
    position:absolute;right:68px;top:18px;width:136px;height:104px;display:flex;align-items:center;justify-content:center;gap:9px;
    border-radius:13px;background:#faf6ed;color:#244f43
}
body.has-current-trip .expense-amount-tile span{display:grid;place-items:center;width:28px;height:28px}
body.has-current-trip .expense-amount-tile svg{width:25px;height:25px}
body.has-current-trip .expense-amount-tile strong{font-size:.82rem;white-space:nowrap}

/* Today cuts cleanly across the full journal, not inside the card column. */
body.has-current-trip .current-trip-card .today-divider{
    position:relative;left:-226px;width:calc(100% + 268px);height:58px;margin:-2px 0 -2px;
    display:flex;align-items:center;justify-content:center;gap:14px
}
body.has-current-trip .current-trip-card .today-divider:before,
body.has-current-trip .current-trip-card .today-divider:after{
    content:"";height:2px;flex:1;background:repeating-linear-gradient(90deg,var(--accent) 0 4px,transparent 4px 10px);opacity:.9
}
body.has-current-trip .current-trip-card .today-divider span{
    display:flex;align-items:center;gap:8px;padding:10px 16px;border-radius:13px;background:#f2f1df;
    border:1px solid #d9d8c7;color:#263d35;font-size:.89rem;white-space:nowrap
}
body.has-current-trip .current-trip-card .today-divider strong{font-size:1rem}
body.has-current-trip .current-trip-card .today-divider b{font-weight:500}
body.has-current-trip .today-icon{display:grid;place-items:center;width:25px;height:25px}
body.has-current-trip .today-icon svg{width:24px;height:24px}

body.has-current-trip .current-trip-card .trip-details-drawer{width:calc(100% - 84px);margin-top:38px}
body.has-current-trip .previous-trips-heading,
body.has-current-trip .has-current-trip .trip-card:not(.current-trip-card){width:calc(100% - 84px)}
body.has-current-trip .site-footer{
    margin-top:22px;padding:20px;border:1px solid #e2dccf;border-radius:20px 20px 0 0;background:#f8f4eb;font-size:.84rem
}

@media(max-width:900px) and (min-width:701px){
    body.has-journey-hero .site-header{padding-left:38px;padding-right:38px}
    body.has-journey-hero .journey-title-row h1{font-size:2.8rem}
    body.has-current-trip .journey-stats{width:690px;max-width:100%;gap:10px}
    body.has-current-trip .journey-stats>div{padding:12px 11px}
    body.has-current-trip .current-trip-card .timeline{padding-left:226px;padding-right:42px}
    body.has-current-trip .current-trip-card .timeline:before{left:170px}
    body.has-current-trip .current-trip-card .event-line-icon{left:-86px}
}

@media(max-width:700px){
    body.has-journey-hero .site-header{min-height:70px;padding:10px 15px}
    body.has-journey-hero .brand{font-size:1.62rem}
    body.has-journey-hero .brand-wrap{gap:9px}
    body.has-journey-hero .version{font-size:.65rem;padding:5px 8px}
    .header-tools{gap:9px}.site-search{width:36px;height:36px}
    body.has-journey-hero .page-shell{width:calc(100% - 18px);padding-top:0}
    body.has-journey-hero .journey-hero{height:auto;min-height:470px;border-radius:20px}
    body.has-journey-hero .journey-hero-content{min-height:470px;padding:22px 18px}
    body.has-journey-hero .journey-hero-media:after{background:linear-gradient(180deg,rgba(255,253,249,.97),rgba(255,253,249,.88) 58%,rgba(255,253,249,.28))}
    body.has-journey-hero .journey-title-row h1{font-size:2.3rem}
    body.has-current-trip .journey-stats{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    body.has-current-trip .journey-stats>div{height:66px;padding:9px 10px}
    body.has-current-trip .journey-stats>div:first-child{grid-column:1/-1}
    body.has-current-trip .journey-today-nav{height:auto;flex-direction:column;margin-bottom:30px}
    body.has-current-trip .journey-today-button{width:min(100%,390px);min-width:0;height:62px;font-size:1.12rem}
    body.has-current-trip .journey-today-hint{display:none}
    body.has-current-trip .current-trip-card .timeline{padding:0 0 0 48px;gap:22px}
    body.has-current-trip .current-trip-card .timeline:before{left:20px}
    body.has-current-trip .current-trip-card .event-card,
    body.has-current-trip .current-trip-card .expense-card{min-height:0;margin:30px 0 0;padding:17px 16px 16px}
    body.has-current-trip .current-trip-card .event-card:before{left:0;top:-26px;width:auto;text-align:left;content:attr(data-np-date) "  ·  " attr(data-np-time)}
    body.has-current-trip .current-trip-card .event-line-icon{left:-48px;top:14px;width:40px;height:40px}
    body.has-current-trip .current-trip-card .stop-media,
    body.has-current-trip .current-trip-card .drive-route-thumb-shell,
    body.has-current-trip .current-trip-card .event-card>.mini-map-shell,
    body.has-current-trip .expense-amount-tile{position:static;width:100%;height:150px;margin-top:13px}
    body.has-current-trip .expense-amount-tile{height:74px}
    body.has-current-trip .current-trip-card .stop-image-wrap,
    body.has-current-trip .current-trip-card .stop-media .mini-map-shell,
    body.has-current-trip .current-trip-card .event-card>.mini-map-shell,
    body.has-current-trip .current-trip-card .drive-route-thumb{width:100%;height:150px}
    body.has-current-trip .current-trip-card .today-divider{left:-48px;width:calc(100% + 48px);height:52px}
    body.has-current-trip .current-trip-card .today-divider span{font-size:.72rem;padding:8px 10px}
    body.has-current-trip .current-trip-card .trip-details-drawer{width:100%}
}

/* Final reference geometry corrections */
body.has-current-trip .current-trip-card{width:100%;min-width:0}
body.has-current-trip .current-trip-card .trip-body{width:100%;min-width:0}
body.has-current-trip .current-trip-card .timeline{width:100%;min-width:0;padding-right:55px}
body.has-current-trip .current-trip-card .today-divider{width:calc(100% + 281px)}
body.has-current-trip .journey-today-nav{position:relative}
body.has-current-trip .journey-today-button{transform:translateX(-12px)}
body.has-current-trip .journey-today-hint{position:absolute;left:calc(50% + 200px);top:10px}
.journey-search{position:fixed;inset:0 0 auto;z-index:6000;padding:18px max(38px,calc((100vw - 1320px)/2));background:rgba(251,248,241,.98);border-bottom:1px solid var(--line);box-shadow:0 10px 30px rgba(40,35,28,.08)}
.journey-search[hidden]{display:none}
.journey-search-inner{width:min(760px,100%);margin:0 auto;display:grid;grid-template-columns:28px 1fr 36px;gap:12px;align-items:center}
.journey-search-inner>svg{width:26px;height:26px}
.journey-search-inner input{width:100%;padding:12px 4px;border:0;border-bottom:1px solid #cfc9bd;background:transparent;font:inherit;font-size:1.05rem;outline:0}
.journey-search-inner button{border:0;background:transparent;font:inherit;font-size:1.8rem;line-height:1;cursor:pointer}
.current-trip-card .event-card[data-np-search-hidden="1"]{display:none!important}
@media(max-width:700px){body.has-current-trip .journey-today-button{transform:none}.journey-search{padding:12px 15px}body.has-current-trip .current-trip-card .timeline{padding-right:0}body.has-current-trip .current-trip-card .today-divider{width:calc(100% + 48px)}}
body.has-current-trip .current-trip-card .timeline{grid-template-columns:minmax(0,1fr)}
body.has-current-trip .current-trip-card .event-card{min-width:0}

body.has-current-trip .current-trip-card .timeline:before{top:-22px}


/* v2.6 follow-up: linked expenses stay inside their event, as in v2.5. */
body.has-current-trip .current-trip-card .event-expenses{
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid #ece7dd;
}
body.has-current-trip .current-trip-card .event-expenses-title{
    margin-bottom:7px;
    color:var(--muted);
    font-size:.68rem;
    font-weight:850;
    letter-spacing:.04em;
    text-transform:uppercase;
}
body.has-current-trip .current-trip-card .expense-item{padding:6px 0}
body.has-current-trip .current-trip-card .expense-line{font-size:.8rem}
body.has-current-trip .current-trip-card .expense-subline{font-size:.72rem}

/* Trip details belongs before the timeline on the active trip. */
body.has-current-trip .current-trip-card .trip-details-drawer{
    order:0;
    margin-top:0;
    margin-bottom:28px;
}
body.has-current-trip .current-trip-card .timeline{order:1}

/* Leaflet uses z-index values around 400; admin popovers must sit above maps. */
body.has-current-trip .event-admin-menu{z-index:1600}
body.has-current-trip .event-admin-popover{z-index:1700}
body.has-current-trip .mini-map-shell,
body.has-current-trip .drive-route-thumb-shell{z-index:1}

/* Cover positioning controls. */
.cover-position-form{margin:14px 0 20px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#faf8f2}
.cover-position-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.cover-position-grid label{display:grid;gap:7px;color:var(--muted);font-size:.76rem;font-weight:800}
.cover-position-grid input[type=range]{width:100%;accent-color:var(--accent)}
.cover-preview img{object-fit:cover}
@media(max-width:650px){.cover-position-grid{grid-template-columns:1fr}}

/* v2.6 follow-up — the redesigned journal is shared by current and archived trips. */
.v26-trip-card .trip-body{
    display:flex;
    flex-direction:column;
    min-width:0;
}
.v26-trip-card .previous-journey-stats{
    order:-2;
    width:calc(100% - 48px);
    margin:22px 24px 4px;
    display:grid;
    grid-template-columns:1.34fr 1fr 1fr 1.32fr 1.08fr;
    gap:10px;
}
.v26-trip-card .previous-journey-stats>div{
    min-width:0;
    height:72px;
    padding:11px 13px;
    border:1px solid #ddd4c4;
    border-radius:14px;
    background:#fffdf9;
}
.v26-trip-card .previous-journey-stats .journey-stat-icon svg{width:22px;height:22px;color:#333b38}
.v26-trip-card .previous-journey-stats small{font-size:.72rem}
.v26-trip-card .previous-journey-stats strong{font-size:.96rem}
.v26-trip-card .trip-details-drawer{
    order:-1;
}
.v26-trip-card .timeline,
.v26-trip-card .timeline-empty{
    order:1;
}

/* Archived trips keep their compact trip selector, but the opened journey itself uses v2.6. */
.v26-trip-card:not(.current-trip-card)[open]{
    overflow:visible;
}
.v26-trip-card:not(.current-trip-card)[open]>.trip-body{
    padding:0 0 26px;
    overflow:visible;
}
.v26-trip-card:not(.current-trip-card)[open] .trip-details-drawer{
    width:calc(100% - 48px);
    margin:18px 24px 26px;
}
.v26-trip-card:not(.current-trip-card)[open] .timeline{
    position:relative;
    width:100%;
    min-width:0;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:28px;
    margin:0;
    padding:0 34px 0 226px;
}
.v26-trip-card:not(.current-trip-card)[open] .timeline:before{
    left:170px;
    top:-20px;
    bottom:0;
    width:1px;
    background:#ded9cd;
}
.v26-trip-card:not(.current-trip-card)[open] .event-card{
    min-width:0;
    min-height:154px;
    margin:0;
    padding:20px 190px 18px 24px;
    overflow:visible;
    border:1px solid #e3ddd2;
    border-radius:17px;
    background:rgba(255,253,249,.96);
    box-shadow:0 5px 14px rgba(55,46,36,.065);
}
.v26-trip-card:not(.current-trip-card)[open] .event-card:before{
    content:attr(data-np-date) "\A" attr(data-np-time);
    white-space:pre;
    position:absolute;
    left:-208px;
    top:16px;
    width:88px;
    height:auto;
    border:0;
    border-radius:0;
    background:transparent;
    color:#444743;
    font-size:.82rem;
    line-height:1.55;
    text-align:right;
}
.v26-trip-card:not(.current-trip-card)[open] .event-card:after{display:none}
.v26-trip-card:not(.current-trip-card)[open] .event-line-icon{
    position:absolute;
    left:-86px;
    top:17px;
    width:61px;
    height:61px;
    display:grid;
    place-items:center;
    border:1px solid #d6d4c5;
    border-radius:999px;
    background:#f2f2e7;
    color:#2f5d50;
    box-shadow:0 2px 8px rgba(45,52,44,.04);
    z-index:2;
}
.v26-trip-card:not(.current-trip-card)[open] .event-line-icon svg{width:26px;height:26px;display:block}
.v26-trip-card:not(.current-trip-card)[open] .event-title{padding-right:0}
.v26-trip-card:not(.current-trip-card)[open] .event-title h4{
    margin:0 0 7px;
    font-size:1.14rem;
    line-height:1.15;
    letter-spacing:-.025em;
}
.v26-trip-card:not(.current-trip-card)[open] .event-detail-grid,
.v26-trip-card:not(.current-trip-card)[open] .drive-crossings{display:none}
.v26-trip-card:not(.current-trip-card)[open] .event-story{display:flex;flex-direction:column;gap:8px;min-width:0}
.v26-trip-card:not(.current-trip-card)[open] .event-story-place,
.v26-trip-card:not(.current-trip-card)[open] .event-story-route,
.v26-trip-card:not(.current-trip-card)[open] .event-story-note{
    min-width:0;
    color:#535651;
    font-size:.86rem;
    line-height:1.35;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.v26-trip-card:not(.current-trip-card)[open] .event-story-place{display:flex;align-items:center;gap:8px}
.v26-trip-card:not(.current-trip-card)[open] .story-pin{width:18px;height:18px;flex:none;color:#4e5551}
.v26-trip-card:not(.current-trip-card)[open] .story-pin svg{width:18px;height:18px;display:block}
.v26-trip-card:not(.current-trip-card)[open] .stop-media,
.v26-trip-card:not(.current-trip-card)[open] .drive-route-thumb-shell,
.v26-trip-card:not(.current-trip-card)[open] .event-card>.mini-map-shell{
    position:absolute;
    right:68px;
    top:18px;
    width:136px;
    height:120px;
    margin:0;
    z-index:1;
}
.v26-trip-card:not(.current-trip-card)[open] .stop-image-wrap,
.v26-trip-card:not(.current-trip-card)[open] .stop-media .mini-map-shell,
.v26-trip-card:not(.current-trip-card)[open] .event-card>.mini-map-shell,
.v26-trip-card:not(.current-trip-card)[open] .drive-route-thumb{
    width:136px;
    height:120px;
    border-radius:13px;
}
.v26-trip-card:not(.current-trip-card)[open] .stop-media .mini-map-shell{position:static;margin:0}
.v26-trip-card:not(.current-trip-card)[open] .stop-media .mini-map-canvas,
.v26-trip-card:not(.current-trip-card)[open] .event-card>.mini-map-shell .mini-map-canvas,
.v26-trip-card:not(.current-trip-card)[open] .drive-route-thumb{height:120px}

/* Linked expenses always remain inside the stop/drive/ferry that owns them. */
.v26-trip-card .event-expenses{
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid #ece7dd;
}
.v26-trip-card .event-expenses-title{
    margin-bottom:7px;
    color:var(--muted);
    font-size:.68rem;
    font-weight:850;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.v26-trip-card .expense-item{padding:6px 0}
.v26-trip-card .expense-line{font-size:.8rem}
.v26-trip-card .expense-subline{font-size:.72rem}

/* Leaflet must never cover the ••• menu, on current or archived trips. */
.v26-trip-card .event-admin-menu{z-index:5000}
.v26-trip-card .event-admin-popover{z-index:5100}
.v26-trip-card .stop-media,
.v26-trip-card .mini-map-shell,
.v26-trip-card .drive-route-thumb-shell{z-index:1}
.v26-trip-card .leaflet-container{z-index:1}

@media(max-width:900px) and (min-width:701px){
    .v26-trip-card:not(.current-trip-card)[open] .timeline{padding-left:205px;padding-right:28px}
    .v26-trip-card:not(.current-trip-card)[open] .timeline:before{left:150px}
    .v26-trip-card:not(.current-trip-card)[open] .event-card:before{left:-188px}
    .v26-trip-card:not(.current-trip-card)[open] .event-line-icon{left:-82px}
}
@media(max-width:700px){
    .v26-trip-card .previous-journey-stats{
        width:calc(100% - 28px);
        margin:16px 14px 2px;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:8px;
    }
    .v26-trip-card .previous-journey-stats>div{height:64px;padding:9px 10px}
    .v26-trip-card .previous-journey-stats>div:first-child{grid-column:1/-1}
    .v26-trip-card:not(.current-trip-card)[open] .trip-details-drawer{width:calc(100% - 28px);margin:14px 14px 22px}
    .v26-trip-card:not(.current-trip-card)[open] .timeline{padding:0 14px 0 48px;gap:22px}
    .v26-trip-card:not(.current-trip-card)[open] .timeline:before{left:20px}
    .v26-trip-card:not(.current-trip-card)[open] .event-card{min-height:0;margin:30px 0 0;padding:17px 16px 16px}
    .v26-trip-card:not(.current-trip-card)[open] .event-card:before{
        left:0;top:-26px;width:auto;text-align:left;white-space:normal;
        content:attr(data-np-date) "  ·  " attr(data-np-time);
        font-size:.7rem;font-weight:700;color:var(--muted)
    }
    .v26-trip-card:not(.current-trip-card)[open] .event-line-icon{left:-48px;top:14px;width:40px;height:40px}
    .v26-trip-card:not(.current-trip-card)[open] .event-line-icon svg{width:19px;height:19px}
    .v26-trip-card:not(.current-trip-card)[open] .stop-media,
    .v26-trip-card:not(.current-trip-card)[open] .drive-route-thumb-shell,
    .v26-trip-card:not(.current-trip-card)[open] .event-card>.mini-map-shell{
        position:static;width:100%;height:150px;margin-top:13px
    }
    .v26-trip-card:not(.current-trip-card)[open] .stop-image-wrap,
    .v26-trip-card:not(.current-trip-card)[open] .stop-media .mini-map-shell,
    .v26-trip-card:not(.current-trip-card)[open] .event-card>.mini-map-shell,
    .v26-trip-card:not(.current-trip-card)[open] .drive-route-thumb{width:100%;height:150px}
}

/* Editing belongs to the full card width. Hide the thumbnail while an inline form is open. */
.edit-form input[type=url]{width:100%;margin-top:5px;padding:9px;border:1px solid var(--line);border-radius:9px;background:#fff;font:inherit;color:var(--ink)}
.edit-form input[type=url]:focus{outline:0;border-color:#9ab5a5;box-shadow:0 0 0 3px rgba(47,93,80,.08)}
@supports selector(.event-card:has(.inline-expense-panel:not([hidden]))){
    .v26-trip-card .event-card:has(.inline-expense-panel:not([hidden])),
    .v26-trip-card .event-card:has(.event-edit-panel:not([hidden])){
        padding-right:24px;
    }
    .v26-trip-card .event-card:has(.inline-expense-panel:not([hidden]))>.stop-media,
    .v26-trip-card .event-card:has(.inline-expense-panel:not([hidden]))>.mini-map-shell,
    .v26-trip-card .event-card:has(.inline-expense-panel:not([hidden]))>.drive-route-thumb-shell,
    .v26-trip-card .event-card:has(.event-edit-panel:not([hidden]))>.stop-media,
    .v26-trip-card .event-card:has(.event-edit-panel:not([hidden]))>.mini-map-shell,
    .v26-trip-card .event-card:has(.event-edit-panel:not([hidden]))>.drive-route-thumb-shell{
        display:none!important;
    }
}


/* v2.6 correction 2026-08-31 — map/media, public countries, archived journeys, edit state */

/* Match the reference campervan glyph more closely. */
.journey-icon svg{stroke-width:1.8}

/* Country visibility is public and remains visible even while Trip details is collapsed. */
.trip-details-summary-main{display:flex;align-items:center;gap:16px;min-width:0;flex:1;flex-wrap:wrap}
.trip-summary-countries{display:flex;align-items:center;gap:7px;min-width:0;flex-wrap:wrap}
.trip-summary-country{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border:1px solid #e1ddd2;border-radius:999px;background:#fffdf9;color:#565a55;font-size:.68rem;font-weight:700;line-height:1.25}
.trip-summary-country>span{font-size:.93rem;line-height:1}
.trip-summary-country small{font:inherit;white-space:nowrap}

/* Mini maps are a fixed thumbnail. Leaflet is clipped inside the media slot. */
.v26-trip-card .stop-media,
.v26-trip-card .mini-map-shell,
.v26-trip-card .drive-route-thumb-shell,
.v26-trip-card .stop-image-wrap,
.v26-trip-card .mini-map-canvas,
.v26-trip-card .drive-route-thumb{box-sizing:border-box;overflow:hidden}
.v26-trip-card .mini-map-shell{isolation:isolate;background:#eef0e8}
.v26-trip-card .mini-map-canvas{width:100%;border-radius:13px}
.v26-trip-card .leaflet-container{position:relative!important;z-index:0!important;overflow:hidden!important;border-radius:13px}
.v26-trip-card .leaflet-control-attribution{max-width:100%;padding:1px 3px!important;background:rgba(255,255,255,.72)!important;font-size:6px!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden;text-overflow:clip}

/* Keep the media comfortably left of ••• and never let it escape the card. */
body.has-current-trip .current-trip-card .stop-media,
body.has-current-trip .current-trip-card .drive-route-thumb-shell,
body.has-current-trip .current-trip-card .event-card>.mini-map-shell,
.v26-trip-card:not(.current-trip-card)[open] .stop-media,
.v26-trip-card:not(.current-trip-card)[open] .drive-route-thumb-shell,
.v26-trip-card:not(.current-trip-card)[open] .event-card>.mini-map-shell{
    right:74px;
    top:18px;
    width:136px;
    height:120px;
    max-width:136px;
    max-height:120px;
}
.v26-trip-card .event-admin-menu{right:15px;top:12px;z-index:7000}
.v26-trip-card .event-admin-popover{z-index:7100;min-width:165px}

/* When a form opens the map/photo disappears and the menu closes in JS. */
.v26-trip-card .event-card.is-editing{padding-right:24px!important;min-height:0}
.v26-trip-card .event-card.is-editing>.stop-media,
.v26-trip-card .event-card.is-editing>.mini-map-shell,
.v26-trip-card .event-card.is-editing>.drive-route-thumb-shell{display:none!important}
.v26-trip-card .event-card.is-editing .event-edit-panel,
.v26-trip-card .event-card.is-editing .inline-expense-panel{position:relative;z-index:2}

/* Archived trips are not a giant card-within-a-card. Only the selector is card-like;
   the opened trip uses the same v2.6 timeline geometry as the active journey. */
.v26-trip-card:not(.current-trip-card){
    width:100%!important;
    max-width:none!important;
    margin:36px 0 54px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
}
.v26-trip-card:not(.current-trip-card)>.trip-summary{
    width:calc(100% - 84px);
    margin:0 42px;
    padding:18px 22px;
    border:1px solid #e2ddd2;
    border-radius:18px;
    background:#fffdf9;
    box-shadow:0 5px 14px rgba(55,46,36,.055);
}
.v26-trip-card:not(.current-trip-card)>.trip-body{
    width:100%;
    padding:0!important;
    border:0!important;
    background:transparent;
}
.v26-trip-card:not(.current-trip-card) .previous-journey-stats{
    width:calc(100% - 84px);
    margin:18px 42px 8px;
}
.v26-trip-card:not(.current-trip-card)[open] .trip-details-drawer{
    width:calc(100% - 84px);
    margin:18px 42px 28px;
}
.v26-trip-card:not(.current-trip-card)[open] .timeline{
    width:100%;
    padding:0 55px 0 226px;
    gap:28px;
}
.v26-trip-card:not(.current-trip-card)[open] .timeline:before{left:170px}
.v26-trip-card:not(.current-trip-card)[open] .event-card{
    min-height:154px;
    padding:20px 190px 18px 24px;
}

@media(max-width:700px){
    .trip-details-summary-main{gap:8px}
    .trip-summary-country small{display:none}
    .trip-summary-country{padding:3px 5px}
    .v26-trip-card:not(.current-trip-card)>.trip-summary{width:calc(100% - 20px);margin:0 10px;padding:15px 14px}
    .v26-trip-card:not(.current-trip-card) .previous-journey-stats{width:calc(100% - 20px);margin:14px 10px 4px}
    .v26-trip-card:not(.current-trip-card)[open] .trip-details-drawer{width:calc(100% - 20px);margin:14px 10px 22px}
    .v26-trip-card:not(.current-trip-card)[open] .timeline{padding:0 10px 0 48px}
    body.has-current-trip .current-trip-card .stop-media,
    body.has-current-trip .current-trip-card .drive-route-thumb-shell,
    body.has-current-trip .current-trip-card .event-card>.mini-map-shell,
    .v26-trip-card:not(.current-trip-card)[open] .stop-media,
    .v26-trip-card:not(.current-trip-card)[open] .drive-route-thumb-shell,
    .v26-trip-card:not(.current-trip-card)[open] .event-card>.mini-map-shell{
        position:static;width:100%;max-width:none;height:150px;max-height:150px;margin-top:13px
    }
}


/* Final v2.6 visual cleanup: expense box and archived mini maps. */
.v26-trip-card .event-expenses{box-sizing:border-box;width:100%}
.v26-trip-card .mini-map-head{display:none!important}
body.has-journey-hero .journey-icon svg{width:34px;height:34px}

/* v2.6 correction 2026-08-31 — public media edge, expense-map clearance, stop telemetry */

/* Public cards have no ••• control, so the thumbnail belongs at the normal card edge. */
body.is-public.has-current-trip .current-trip-card .stop-media,
body.is-public.has-current-trip .current-trip-card .drive-route-thumb-shell,
body.is-public.has-current-trip .current-trip-card .event-card>.mini-map-shell,
body.is-public .v26-trip-card:not(.current-trip-card)[open] .stop-media,
body.is-public .v26-trip-card:not(.current-trip-card)[open] .drive-route-thumb-shell,
body.is-public .v26-trip-card:not(.current-trip-card)[open] .event-card>.mini-map-shell{
    right:20px;
}

/* Keep the compact v2.6 story readable while restoring the useful stop telemetry. */
.v26-trip-card .event-stop-meta{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px 14px;
    margin-top:10px;
    color:#646762;
    font-size:.72rem;
    line-height:1.25;
}
.v26-trip-card .event-stop-meta>span{
    display:inline-flex;
    align-items:baseline;
    gap:5px;
    white-space:nowrap;
}
.v26-trip-card .event-stop-meta small{
    color:#777a74;
    font:inherit;
}
.v26-trip-card .event-stop-meta strong{
    color:#343936;
    font-size:.74rem;
    font-weight:800;
}

/* A stop can contain linked expenses and a minimap. The expense block begins below
   the media thumbnail and then reclaims the card's reserved media column, so it can
   never run underneath the Leaflet map. */
@supports selector(.event-card:has(.event-expenses)){
    .v26-trip-card .event-card:has(>.mini-map-shell):has(.event-expenses) .event-story,
    .v26-trip-card .event-card:has(>.stop-media):has(.event-expenses) .event-story{
        min-height:72px;
    }
    .v26-trip-card .event-card:has(>.mini-map-shell):has(.event-expenses) .event-expenses,
    .v26-trip-card .event-card:has(>.stop-media):has(.event-expenses) .event-expenses{
        margin-top:18px;
        margin-right:-166px;
    }
}

/* Public cards reserve only the actual thumbnail width; there is no admin menu gap. */
body.is-public.has-current-trip .current-trip-card .event-card,
body.is-public .v26-trip-card:not(.current-trip-card)[open] .event-card{
    padding-right:176px;
}
body.is-public .v26-trip-card .event-card:has(>.mini-map-shell):has(.event-expenses) .event-expenses,
body.is-public .v26-trip-card .event-card:has(>.stop-media):has(.event-expenses) .event-expenses{
    margin-right:-152px;
}

@media(max-width:700px){
    body.is-public.has-current-trip .current-trip-card .event-card,
    body.is-public .v26-trip-card:not(.current-trip-card)[open] .event-card{padding-right:16px}
    .v26-trip-card .event-stop-meta{gap:5px 10px;margin-top:9px}
    .v26-trip-card .event-card:has(>.mini-map-shell):has(.event-expenses) .event-expenses,
    .v26-trip-card .event-card:has(>.stop-media):has(.event-expenses) .event-expenses,
    body.is-public .v26-trip-card .event-card:has(>.mini-map-shell):has(.event-expenses) .event-expenses,
    body.is-public .v26-trip-card .event-card:has(>.stop-media):has(.event-expenses) .event-expenses{margin-right:0}
}

/* The admin thumbnail also needs a real content gap before the ••• column. */
body.is-admin.has-current-trip .current-trip-card .event-card,
body.is-admin .v26-trip-card:not(.current-trip-card)[open] .event-card{
    padding-right:226px;
}
body.is-admin .v26-trip-card .event-card:has(>.mini-map-shell):has(.event-expenses) .event-expenses,
body.is-admin .v26-trip-card .event-card:has(>.stop-media):has(.event-expenses) .event-expenses{
    margin-right:-202px;
}
@media(max-width:700px){
    body.is-admin.has-current-trip .current-trip-card .event-card,
    body.is-admin .v26-trip-card:not(.current-trip-card)[open] .event-card{padding-right:16px}
    body.is-admin .v26-trip-card .event-card:has(>.mini-map-shell):has(.event-expenses) .event-expenses,
    body.is-admin .v26-trip-card .event-card:has(>.stop-media):has(.event-expenses) .event-expenses{margin-right:0}
}

/* V2.6 category icon family. Legacy emoji are intentionally kept only in map pins. */
.expense-category-label{display:inline-flex;align-items:center;gap:7px}
.expense-category-line-icon,.expense-location-line-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;color:var(--accent)}
.expense-category-line-icon svg{width:18px;height:18px;display:block}
.expense-location-subline{display:flex;align-items:center;gap:6px}
.expense-location-line-icon svg{width:14px;height:14px;display:block}
.overnight-strip span{display:inline-flex;align-items:center;gap:6px}
.overnight-strip span>i{display:inline-flex;color:var(--accent)}
.overnight-strip span>i svg{width:16px;height:16px;display:block}
.budget-category-label{display:inline-flex!important;align-items:center;gap:7px}
.budget-category-label>i{display:inline-flex;color:var(--accent)}
.budget-category-label>i svg{width:17px;height:17px;display:block}

/* V2.6 — archived trip spacing only.
   V2.5 uses an 18px gap between trip cards. Keep every other V2.6 layout rule unchanged. */
.v26-trip-card:not(.current-trip-card){
    margin:0!important;
}
.v26-trip-card:not(.current-trip-card) + .v26-trip-card:not(.current-trip-card){
    margin-top:-4px!important; /* 22px V2.6 grid gap - 4px = V2.5's 18px */
}

/* V2.6 — persistent cover between journeys.
   The profile cover remains the NordicPass front page when no trip is active. */
body.has-journey-hero .journey-hero.between-trips .journey-hero-content{
    justify-content:center;
}
body.has-journey-hero .journey-hero.between-trips .journey-tagline{
    margin-bottom:0;
}

/* v2.6 correction 2026-08-31 — show complete stop/location names ---------
   V2.6 story rows must not ellipsize location text. The map already has a
   reserved media column on desktop and moves below the story on mobile, so
   the location can safely wrap to additional lines. */
body.has-current-trip .event-story-place,
.v26-trip-card:not(.current-trip-card)[open] .event-story-place{
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    align-items:flex-start;
}
body.has-current-trip .event-story-place>span:last-child,
.v26-trip-card:not(.current-trip-card)[open] .event-story-place>span:last-child{
    min-width:0;
    white-space:normal;
    overflow-wrap:anywhere;
}

/* NordicPass v2.6 — long-trip week accordion + persistent top button ---- */
.current-trip-card .trip-week-list{
    order:1;
    width:calc(100% - 84px);
    margin:18px auto 0;
}
.trip-week-list{
    display:grid;
    gap:12px;
}
.v26-trip-card:not(.current-trip-card)[open] .trip-week-list{
    width:calc(100% - 48px);
    margin:18px 24px 0;
}
.trip-week{
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    overflow:visible;
}
.trip-week-summary{
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    min-height:72px;
    padding:16px 20px;
    border:1px solid #e2ddd4;
    border-radius:18px;
    background:#fffdf9;
    box-shadow:0 8px 22px rgba(54,49,39,.055);
    cursor:pointer;
    user-select:none;
}
.trip-week-summary::-webkit-details-marker{display:none}
.trip-week-title{
    min-width:0;
    display:flex;
    align-items:baseline;
    gap:10px;
    flex-wrap:wrap;
}
.trip-week-title strong{
    color:var(--ink);
    font-size:1rem;
    font-weight:850;
    letter-spacing:-.015em;
}
.trip-week-title small{
    color:var(--muted);
    font-size:.76rem;
    font-weight:650;
}
.trip-week-summary-end{
    display:flex;
    align-items:center;
    gap:10px;
    flex:none;
}
.trip-week-current-badge{
    padding:5px 8px;
    border:1px solid #cad7c8;
    border-radius:999px;
    background:#f0f3e7;
    color:var(--accent);
    font-size:.58rem;
    font-weight:900;
    letter-spacing:.1em;
}
.trip-week-chevron{
    color:var(--muted);
    font-size:1.2rem;
    line-height:1;
    transition:transform .18s ease;
}
.trip-week[open]>.trip-week-summary .trip-week-chevron{transform:rotate(180deg)}
.trip-week.current-trip-week>.trip-week-summary{
    border-color:#d3d9c8;
    background:#fafbf3;
}
.trip-week-body{padding:0}
.trip-week[open]>.trip-week-summary{margin-bottom:10px}
.trip-week .timeline{margin-top:0}

.floating-top-button{
    position:fixed;
    right:max(18px,env(safe-area-inset-right));
    bottom:max(18px,calc(env(safe-area-inset-bottom) + 18px));
    z-index:4600;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:44px;
    padding:10px 14px;
    border:1px solid #cfd7cb;
    border-radius:999px;
    background:rgba(255,253,249,.94);
    color:var(--accent);
    box-shadow:0 8px 24px rgba(44,52,45,.14);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    font:inherit;
    font-size:.76rem;
    font-weight:850;
    cursor:pointer;
}
.floating-top-button svg{width:17px;height:17px;display:block;flex:none}
.floating-top-button:hover{background:#fff}
.floating-top-button:focus-visible{outline:3px solid rgba(47,94,76,.2);outline-offset:2px}

@media(max-width:700px){
    .current-trip-card .trip-week-list,
    .v26-trip-card:not(.current-trip-card)[open] .trip-week-list{width:100%;margin:12px 0 0}
    .trip-week-list{gap:10px}
    .trip-week-summary{min-height:62px;padding:13px 15px;border-radius:16px;gap:10px}
    .trip-week-title{gap:6px 9px}
    .trip-week-title strong{font-size:.94rem}
    .trip-week-title small{font-size:.69rem}
    .trip-week-current-badge{padding:4px 7px;font-size:.52rem}
    .trip-week[open]>.trip-week-summary{margin-bottom:8px}
    .floating-top-button{
        right:max(12px,env(safe-area-inset-right));
        bottom:max(12px,calc(env(safe-area-inset-bottom) + 12px));
        min-height:42px;
        padding:9px 12px;
        font-size:.72rem;
    }
}

/* V2.6 mobile hero correction — portrait cover crop + distance fit.
   The mobile hero used to let the absolutely-positioned cover image grow to
   the full natural height of the content (including three rows of stats).
   With object-fit:cover that effectively zoomed a landscape cover into a
   very tall portrait box and could crop the vehicle out of frame.
   Keep the photo as a shallow panoramic zone instead; the lower part of the
   hero continues on the normal NordicPass surface behind the statistics.
   Desktop / phone landscape (>700px) is intentionally unchanged. */
@media(max-width:700px){
    body.has-journey-hero .journey-hero{
        height:auto!important;
        min-height:0!important;
        background:#f4f1ea;
    }
    body.has-journey-hero .journey-hero-media{
        inset:0 0 auto 0!important;
        width:100%;
        height:clamp(220px,62vw,270px)!important;
        min-height:0!important;
    }
    body.has-journey-hero .journey-hero-media img{
        width:100%;
        height:100%!important;
        min-height:0!important;
        object-fit:cover;
        /* object-position remains the saved per-profile inline X/Y value. */
    }
    body.has-journey-hero .journey-hero-media:after{
        background:
            linear-gradient(180deg,
                rgba(255,253,249,.94) 0%,
                rgba(255,253,249,.82) 42%,
                rgba(255,253,249,.38) 72%,
                #f4f1ea 100%),
            linear-gradient(90deg,rgba(255,253,249,.28),rgba(255,253,249,0) 72%);
    }
    body.has-journey-hero .journey-hero-content{
        height:auto!important;
        min-height:0!important;
        padding:22px 18px 18px;
    }
    body.has-journey-hero .journey-tagline{
        margin-bottom:0;
    }
    body.has-current-trip .journey-stats{
        margin-top:28px;
    }
    body.has-journey-hero .journey-hero.between-trips,
    body.has-journey-hero .journey-hero.between-trips .journey-hero-content{
        min-height:clamp(220px,62vw,270px)!important;
    }

    /* Flex children must be allowed to shrink; otherwise a formatted value
       such as 2.060,8 km can push past the right edge on narrow iPhones. */
    body.has-current-trip .journey-stats>div{
        box-sizing:border-box;
        min-width:0;
        max-width:100%;
    }
    body.has-current-trip .journey-stats>div>span:last-child{
        min-width:0;
        max-width:100%;
    }
    body.has-current-trip .journey-stats strong{
        max-width:100%;
        font-size:clamp(.80rem,3.8vw,.98rem);
        letter-spacing:-.012em;
        white-space:nowrap;
    }
    body.has-current-trip .journey-stats>div:first-child strong{
        font-size:clamp(.88rem,4.2vw,1.02rem);
    }
}

/* V2.6 portrait hero hard-fix mirror.
   The same effective rule is emitted inline by index.php to defeat stale
   Safari/external-stylesheet caching after deployment. */
@media (max-width:700px) and (orientation:portrait) {
    body.has-journey-hero .journey-hero.has-cover{height:auto!important;min-height:0!important;background:#f7f3ea!important}
    body.has-journey-hero .journey-hero.has-cover .journey-hero-media{position:absolute!important;inset:0 0 auto 0!important;width:100%!important;height:clamp(205px,58vw,240px)!important;min-height:0!important;overflow:hidden!important}
    body.has-journey-hero .journey-hero.has-cover .journey-hero-media img{width:100%!important;height:100%!important;min-height:0!important;object-fit:cover!important}
    body.has-journey-hero .journey-hero.has-cover .journey-hero-media:after{background:linear-gradient(180deg,rgba(255,253,249,.94) 0%,rgba(255,253,249,.78) 44%,rgba(247,243,234,.48) 76%,#f7f3ea 100%)!important}
    body.has-journey-hero .journey-hero.has-cover .journey-hero-content{position:relative!important;z-index:2!important;height:auto!important;min-height:0!important;padding:22px 18px 18px!important;background:transparent!important}
    body.has-current-trip .journey-hero.has-cover .journey-stats{margin-top:34px!important}
    body.has-current-trip .journey-stats>div,body.has-current-trip .journey-stats>div>span:last-child{box-sizing:border-box!important;min-width:0!important;max-width:100%!important}
    body.has-current-trip .journey-stats strong{max-width:100%!important;font-size:clamp(.78rem,3.7vw,.96rem)!important;line-height:1.12!important;letter-spacing:-.012em!important;white-space:nowrap!important}
    body.has-current-trip .journey-stats>div:first-child strong{font-size:clamp(.84rem,4vw,1rem)!important}
}

/* V2.6 canonical trip geometry — 2026-08-31
   A trip must not change width merely because it is split into 7-day sections.
   The canonical desktop inset is the same 42px already used by Trip details,
   archived trip summaries and archived trip statistics. Only top-level timeline
   or week-list containers are constrained here; timelines nested inside a week
   continue to fill that canonical week container. */
@media (min-width:701px) {
    body.has-journey-hero .current-trip-card > .trip-body > .timeline,
    body.has-journey-hero .current-trip-card > .trip-body > .trip-week-list,
    body.has-journey-hero .v26-trip-card:not(.current-trip-card)[open] > .trip-body > .timeline,
    body.has-journey-hero .v26-trip-card:not(.current-trip-card)[open] > .trip-body > .trip-week-list {
        width:calc(100% - 84px)!important;
        margin-left:42px!important;
        margin-right:42px!important;
    }
}

/* Archived mobile trips already use a 10px inset for summary/stats/details.
   Keep both short timelines and long-trip week containers on that same inset. */
@media (max-width:700px) {
    body.has-journey-hero .v26-trip-card:not(.current-trip-card)[open] > .trip-body > .timeline,
    body.has-journey-hero .v26-trip-card:not(.current-trip-card)[open] > .trip-body > .trip-week-list {
        width:calc(100% - 20px)!important;
        margin-left:10px!important;
        margin-right:10px!important;
    }
}

/* V2.6 desktop mini-map size — 2026-08-31
   Slightly enlarge map/route thumbnails on desktop only. Photos keep their
   existing size. Mobile/tablet layout is intentionally unchanged. */
@media (min-width:901px) {
    /* Stop maps, direct mini maps and drive route previews. */
    .v26-trip-card .stop-media:has(.mini-map-shell),
    .v26-trip-card .drive-route-thumb-shell,
    .v26-trip-card .event-card>.mini-map-shell {
        width:154px!important;
        height:132px!important;
        max-width:154px!important;
        max-height:132px!important;
    }

    .v26-trip-card .stop-media:has(.mini-map-shell) .mini-map-shell,
    .v26-trip-card .stop-media:has(.mini-map-shell) .mini-map-canvas,
    .v26-trip-card .event-card>.mini-map-shell .mini-map-canvas,
    .v26-trip-card .drive-route-thumb {
        width:154px!important;
        height:132px!important;
        max-width:154px!important;
        max-height:132px!important;
    }

    /* Give map-bearing cards the extra room the larger thumbnail needs. */
    body.is-public .v26-trip-card .event-card:has(>.mini-map-shell),
    body.is-public .v26-trip-card .event-card:has(>.stop-media .mini-map-shell),
    body.is-public .v26-trip-card .event-card:has(>.drive-route-thumb-shell) {
        min-height:166px;
        padding-right:194px;
    }
    body.is-admin .v26-trip-card .event-card:has(>.mini-map-shell),
    body.is-admin .v26-trip-card .event-card:has(>.stop-media .mini-map-shell),
    body.is-admin .v26-trip-card .event-card:has(>.drive-route-thumb-shell) {
        min-height:166px;
        padding-right:244px;
    }

    /* Linked expenses reclaim the new reserved map column below the map. */
    body.is-public .v26-trip-card .event-card:has(>.mini-map-shell):has(.event-expenses) .event-expenses,
    body.is-public .v26-trip-card .event-card:has(>.stop-media .mini-map-shell):has(.event-expenses) .event-expenses {
        margin-right:-170px;
    }
    body.is-admin .v26-trip-card .event-card:has(>.mini-map-shell):has(.event-expenses) .event-expenses,
    body.is-admin .v26-trip-card .event-card:has(>.stop-media .mini-map-shell):has(.event-expenses) .event-expenses {
        margin-right:-220px;
    }
}
