:root{--bg:#f6f3ed;--paper:#fffdf8;--ink:#1c2b32;--muted:#66757d;--teal:#0f6b68;--teal2:#154f55;--gold:#d69e45;--line:#ded8cf;--sage:#dfe9e4;--warn:#fff4db;--shadow:0 12px 32px rgba(28,43,50,.08)}
*{box-sizing:border-box} body{margin:0;background:var(--bg);color:var(--ink);font-family:'Assistant',system-ui,sans-serif;line-height:1.55}.hero{background:linear-gradient(135deg,#123d43,#0f6b68);color:white;padding:22px 0 46px}.topbar,.hero-inner,.container{width:min(1180px,92vw);margin:auto}.topbar{display:flex;justify-content:space-between;align-items:center}.brand{font-weight:800;letter-spacing:.04em}.brand span{font-weight:500;opacity:.8;margin-inline-start:8px}.ghost{border:1px solid rgba(255,255,255,.35);background:transparent;color:inherit;padding:9px 14px;border-radius:12px;cursor:pointer}.hero-inner{display:flex;justify-content:space-between;gap:30px;align-items:end;margin-top:54px}.eyebrow,.section-kicker{font-size:.8rem;font-weight:700;letter-spacing:.08em;color:var(--gold);text-transform:uppercase}.hero h1{font-size:clamp(2.4rem,6vw,4.7rem);line-height:1;margin:10px 0 12px}.hero p{margin:0;opacity:.86;font-size:1.15rem}.hero-stats{display:flex;gap:10px}.hero-stats div{min-width:120px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);padding:14px;border-radius:16px}.hero-stats strong,.hero-stats span{display:block}.hero-stats strong{font-size:1.25rem}.hero-stats span{font-size:.8rem;opacity:.75}.container{margin-top:-22px;padding-bottom:50px}.card{background:var(--paper);border:1px solid rgba(28,43,50,.08);border-radius:20px;box-shadow:var(--shadow);padding:24px}.toolbar{display:flex;justify-content:space-between;gap:30px;align-items:center;position:sticky;top:8px;z-index:10}.tabs{display:flex;gap:7px;flex-wrap:wrap}.tab{border:0;background:#edf0ef;color:var(--ink);padding:9px 13px;border-radius:999px;cursor:pointer;font-family:inherit;font-weight:700}.tab.active{background:var(--teal);color:white}.progress-wrap{display:grid;grid-template-columns:auto 130px auto;gap:8px;align-items:center;font-size:.8rem;color:var(--muted)}.progress{height:8px;background:#e7e4de;border-radius:999px;overflow:hidden}.progress div{height:100%;width:0;background:var(--gold);transition:.3s}.panel{display:none;padding-top:28px}.active-panel{display:block}.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:18px}.highlight{background:linear-gradient(180deg,#fffdf8,#f3f8f5)}.warning{background:var(--warn)}h2{margin:4px 0 10px;font-size:1.6rem}h3{margin:7px 0}.timeline-mini{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:18px}.timeline-mini span{background:white;border:1px solid var(--line);border-radius:12px;padding:7px 10px;font-size:.86rem}.link-btn,.small-btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;padding:9px 12px;font-weight:700}.link-btn{background:var(--teal);color:white;margin-top:10px}.small-btn{background:#edf3f1;color:var(--teal2);border:0;font-family:inherit;cursor:pointer}.checklist-card{margin-top:18px}.check-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.check-item{display:flex;gap:10px;align-items:flex-start;background:#f8f6f1;padding:12px;border-radius:14px}.check-item input{accent-color:var(--teal);width:18px;height:18px}.section-title{display:flex;gap:13px;align-items:center;margin:8px 0 16px}.section-title>span{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--teal);color:white;font-weight:800}.route-line{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.stop-card{position:relative}.stop-card:before{content:'';position:absolute;left:-14px;top:48px;width:14px;border-top:2px dashed #aebdb9}.stop-card:first-child:before{display:none}.stop-dot{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--sage);color:var(--teal);font-weight:800}.stop-meta{font-size:.78rem;color:var(--muted);margin-top:10px}.accent{border:2px solid rgba(15,107,104,.28)}.chips{display:flex;gap:6px;flex-wrap:wrap}.chips span,.tag{font-size:.75rem;background:#edf3f1;color:var(--teal2);padding:5px 8px;border-radius:999px}.actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:14px}.cards-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.place-card{display:flex;flex-direction:column}.place-card .top{display:flex;justify-content:space-between;gap:10px;align-items:start}.rating{font-weight:800;color:#8a621f;background:#fff1cf;padding:5px 8px;border-radius:10px;white-space:nowrap}.place-card p{color:#53636a}.place-card .spacer{flex:1}.place-card .meta{font-size:.8rem;color:var(--muted);border-top:1px solid #ece7df;padding-top:10px;margin-top:12px}.fav.active{background:var(--gold);color:#382b16}.next-segment{background:linear-gradient(150deg,#153f45,#0f6b68);color:white}.next-placeholder{font-size:1.35rem;padding:20px;background:rgba(255,255,255,.1);border-radius:14px;margin-top:20px}.muted{opacity:.7}textarea{width:100%;min-height:220px;border:1px solid var(--line);border-radius:14px;padding:14px;font-family:inherit;font-size:1rem;resize:vertical;background:#fff}.save-row{display:flex;justify-content:space-between;align-items:center;margin-top:8px;font-size:.82rem;color:var(--muted)}.ghost.dark{color:var(--teal2);border-color:#c7d1ce}.sources{margin-top:26px}.sources summary{cursor:pointer;font-weight:800}.sources a{color:var(--teal)}footer{text-align:center;color:var(--muted);padding:25px}.hidden{display:none!important}
@media(max-width:900px){.hero-inner{display:block}.hero-stats{margin-top:26px;overflow:auto}.toolbar{position:static;display:block}.progress-wrap{margin-top:16px}.route-line{grid-template-columns:1fr 1fr}.cards-grid{grid-template-columns:1fr 1fr}.check-grid{grid-template-columns:1fr 1fr}.grid.two{grid-template-columns:1fr}}
@media(max-width:600px){.topbar{align-items:flex-start}.brand span{display:block;margin:0}.hero{padding-bottom:34px}.hero-inner{margin-top:36px}.hero-stats div{min-width:105px}.route-line,.cards-grid,.check-grid{grid-template-columns:1fr}.stop-card:before{display:none}.tabs{display:grid;grid-template-columns:repeat(3,1fr)}.tab{font-size:.82rem}.progress-wrap{grid-template-columns:auto 1fr auto}.card{padding:18px}}
@media print{.topbar button,.toolbar,.actions,.sources,footer{display:none!important}.panel{display:block!important}.hero{padding:20px}.container{margin-top:0}.card{box-shadow:none;break-inside:avoid}.next-segment{color:black;background:white}}

/* Notebook notes */
.note-scope{display:inline-flex;align-items:center;background:#e7f0ed;color:var(--teal2);font-size:.76rem;font-weight:800;padding:5px 9px;border-radius:999px;margin-bottom:5px}.note-scope.global{background:#fff0cc;color:#7b591c}.note-help{color:var(--muted);margin-top:0}.note-input{min-height:118px}.note-compose-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0 18px;color:var(--muted);font-size:.82rem}.primary-btn{border:0;background:var(--teal);color:white;border-radius:11px;padding:10px 14px;font-family:inherit;font-weight:800;cursor:pointer;white-space:nowrap}.primary-btn:hover{filter:brightness(.95)}.notes-list{display:grid;gap:10px}.note-entry{border:1px solid #e6e1d9;background:#faf8f3;border-radius:15px;padding:13px}.note-entry.editing{border-color:rgba(15,107,104,.45);background:#f4faf8}.note-entry-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:7px}.note-date{font-size:.75rem;color:var(--muted)}.note-entry-text{white-space:pre-wrap;overflow-wrap:anywhere}.note-entry-actions{display:flex;gap:6px;margin-top:10px}.note-action{border:0;background:#e9efed;color:var(--teal2);border-radius:9px;padding:6px 9px;font-family:inherit;font-weight:700;cursor:pointer;font-size:.78rem}.note-action.delete{background:#f6e8e5;color:#934839}.note-edit-area{min-height:90px;margin-top:6px}.empty-notes{border:1px dashed var(--line);border-radius:14px;padding:18px;text-align:center;color:var(--muted);background:#fbfaf7}.global-notes-card{background:linear-gradient(180deg,#fffdf8,#fffaf0)}.notes-next{margin-top:18px}.notes-layout>article{min-width:0}
@media(max-width:600px){.note-compose-actions{align-items:stretch;flex-direction:column}.primary-btn{width:100%}.note-entry-head{align-items:flex-start}.note-entry-actions{flex-wrap:wrap}}

/* Segment driving summary */
.drive-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0 20px}
.drive-summary>div{background:var(--card,#fff);border:1px solid rgba(15,118,110,.14);border-radius:18px;padding:15px 16px;box-shadow:0 8px 24px rgba(15,23,42,.05)}
.drive-summary strong{display:block;font-size:1.05rem;margin:4px 0}
.drive-summary small{display:block;color:var(--muted,#64748b);line-height:1.45}
.drive-icon{font-size:1.2rem}
@media(max-width:760px){.drive-summary{grid-template-columns:1fr}.drive-summary>div{padding:13px 14px}}

.segment-subsection{margin-top:22px;padding-top:6px}


/* V8 server sync + authentication */
.top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.sync-status{font-size:.78rem;padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.11);border:1px solid rgba(255,255,255,.18);white-space:nowrap}
.sync-status.ok{background:rgba(159,226,194,.16)}.sync-status.saving{background:rgba(255,218,137,.16)}.sync-status.error{background:rgba(255,156,142,.16)}
.auth-gate{position:fixed;inset:0;z-index:1000;background:rgba(13,34,38,.88);backdrop-filter:blur(10px);display:grid;place-items:center;padding:20px}
.auth-card{width:min(420px,94vw);background:var(--paper);color:var(--ink);border-radius:24px;padding:28px;box-shadow:0 28px 70px rgba(0,0,0,.28)}
.auth-logo{display:inline-flex;background:var(--teal);color:white;padding:7px 11px;border-radius:10px;font-weight:800;letter-spacing:.04em}.auth-card h2{margin-top:16px}.auth-card p{color:var(--muted)}
.auth-card form{display:grid;gap:10px;margin-top:18px}.auth-card label{font-weight:700}.auth-card input{width:100%;font:inherit;padding:12px 13px;border-radius:12px;border:1px solid var(--line);background:white;direction:ltr}.auth-card .primary-btn{margin-top:3px}.login-error{min-height:20px;color:#a63d31;font-size:.88rem}.auth-locked{overflow:hidden}
@media(max-width:900px){.topbar{gap:12px;align-items:flex-start}.top-actions{max-width:62%;}.hero-inner{margin-top:34px}}
@media(max-width:600px){body{font-size:15px}.topbar{width:min(94vw,1180px);flex-direction:column}.top-actions{max-width:100%;width:100%;justify-content:flex-start}.sync-status{order:-1}.hero h1{font-size:2.25rem}.hero p{font-size:1rem}.hero-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;overflow:visible}.hero-stats div{min-width:0;padding:10px}.hero-stats strong{font-size:1rem}.toolbar.card{padding:12px}.tabs{display:flex;overflow-x:auto;flex-wrap:nowrap;padding-bottom:5px;scrollbar-width:thin}.tab{flex:0 0 auto;min-width:88px}.progress-wrap{grid-template-columns:auto 1fr auto}.cards-grid{gap:12px}.card{border-radius:17px}.link-btn{width:100%}.actions .small-btn{flex:1 1 auto}.auth-card{padding:22px;border-radius:20px}}
@media(min-width:601px) and (max-width:1024px){.container,.topbar,.hero-inner{width:min(94vw,1180px)}.cards-grid{grid-template-columns:repeat(2,1fr)}.tabs{max-height:96px;overflow:auto}}

/* V8.4 backup / restore */
.backup-card{margin-top:18px}.backup-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.backup-actions button{min-height:42px}@media(max-width:640px){.backup-actions{display:grid;grid-template-columns:1fr}.backup-actions button{width:100%}}
