/* Windline dashboard */
:root{
  --bg:#F6F8FB; --surface:#FFFFFF; --sunk:#F3F5F9; --ink:#0A2540; --body:#3C4F69; --muted:#6B7C93; --faint:#97A3B6;
  --line:#E6EBF1; --line-2:#D5DCE5; --accent:#635BFF; --accent-hi:#7A73FF; --accent-ink:#4B44D6; --accent-wash:rgba(99,91,255,.09);
  --good:#00A88F; --good-wash:rgba(0,168,143,.11); --fair:#E8920C; --fair-wash:rgba(245,165,36,.15); --tough:#E8334A; --tough-wash:rgba(240,56,79,.11);
  --navy:#0A2540; --wa:#25D366;
  --r:14px; --r-sm:10px;
  --sh-1:0 1px 1px rgba(10,37,64,.04),0 2px 6px rgba(10,37,64,.05);
  --sh-2:0 2px 5px rgba(10,37,64,.06),0 12px 28px -6px rgba(50,50,93,.18);
  --sh-3:0 30px 60px -12px rgba(50,50,93,.28),0 18px 36px -18px rgba(0,0,0,.3);
  --side:244px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0A1220; --surface:#111B2C; --sunk:#0D1625; --ink:#EEF2F7; --body:#B8C4D3; --muted:#8597AD; --faint:#64768C;
  --line:#1E2A3D; --line-2:#2A3850; --accent:#7C75FF; --accent-hi:#938DFF; --accent-ink:#A9A4FF; --accent-wash:rgba(124,117,255,.14);
  --good:#2BCBA8; --good-wash:rgba(43,203,168,.14); --fair:#FFB547; --fair-wash:rgba(255,181,71,.14); --tough:#FF6B7E; --tough-wash:rgba(255,107,126,.14);
  --sh-1:0 1px 2px rgba(0,0,0,.3); --sh-2:0 12px 28px -8px rgba(0,0,0,.55); --sh-3:0 30px 60px -12px rgba(0,0,0,.7);
}}
:root[data-theme="dark"]{
  --bg:#0A1220; --surface:#111B2C; --sunk:#0D1625; --ink:#EEF2F7; --body:#B8C4D3; --muted:#8597AD; --faint:#64768C;
  --line:#1E2A3D; --line-2:#2A3850; --accent:#7C75FF; --accent-hi:#938DFF; --accent-ink:#A9A4FF; --accent-wash:rgba(124,117,255,.14);
  --good:#2BCBA8; --good-wash:rgba(43,203,168,.14); --fair:#FFB547; --fair-wash:rgba(255,181,71,.14); --tough:#FF6B7E; --tough-wash:rgba(255,107,126,.14);
  --sh-1:0 1px 2px rgba(0,0,0,.3); --sh-2:0 12px 28px -8px rgba(0,0,0,.55); --sh-3:0 30px 60px -12px rgba(0,0,0,.7);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--body);font:15px/1.55 Inter,system-ui,-apple-system,sans-serif;-webkit-font-smoothing:antialiased;font-feature-settings:"cv11","ss01"}
body.locked{overflow:hidden}
h1,h2,h3,h4{color:var(--ink);margin:0;letter-spacing:-.02em;font-family:"Inter Tight",Inter,system-ui,sans-serif}
h1{font-size:28px;line-height:1.15;font-weight:700}
h2{font-size:17px;font-weight:600;letter-spacing:-.01em;font-family:Inter,system-ui,sans-serif}
h3{font-size:19px;font-weight:700}
h4{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-family:Inter,sans-serif}
p{margin:0}
a{color:inherit}
.muted{color:var(--muted)} .small{font-size:13px} .ink{color:var(--ink)}
img{max-width:100%;display:block}
svg{flex:none}
[hidden]{display:none!important}

/* logo */
.logo{display:inline-block;width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,#8C85FF,#2A1F86);position:relative;box-shadow:0 2px 8px rgba(99,91,255,.35),inset 0 0 0 1px rgba(255,255,255,.16);flex:none}
.logo i:before,.logo i:after{content:"";position:absolute;left:6.5px;right:6.5px;height:2.4px;border-radius:2px;background:#fff}
.logo i:before{top:10px}.logo i:after{top:15.5px;right:9.5px}
.logo.big{width:48px;height:48px;border-radius:14px}.logo.big i:before,.logo.big i:after{left:11px;right:11px;height:4px}.logo.big i:before{top:17px}.logo.big i:after{top:27px;right:16px}
.brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font:700 17px/1 "Inter Tight",Inter,sans-serif;letter-spacing:-.02em}
.boot{min-height:100vh;display:grid;place-items:center}.boot .logo{animation:breathe 1.4s ease-in-out infinite}
@keyframes breathe{50%{transform:scale(.92);opacity:.7}}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:36px;padding:0 14px;border-radius:9px;border:0;font:600 14px/1 Inter,sans-serif;cursor:pointer;text-decoration:none;white-space:nowrap;transition:background .15s,box-shadow .15s,transform .1s,color .15s;-webkit-tap-highlight-color:transparent}
.btn svg{width:16px;height:16px}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.primary{background:var(--accent);color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.08),inset 0 1px 0 rgba(255,255,255,.12),0 2px 6px -1px rgba(99,91,255,.45)}
.btn.primary:hover:not(:disabled){background:var(--accent-hi)}
.btn.ghost{background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line-2),var(--sh-1)}
.btn.ghost:hover:not(:disabled){background:var(--sunk)}
.btn.danger{background:var(--tough);color:#fff}
.btn.danger-text{color:var(--tough)}
.btn.lg{height:44px;padding:0 20px;font-size:15px;border-radius:11px}
.btn.block{width:100%;height:42px}
.btn.icon-only{width:36px;padding:0}
.btn.google{width:100%;height:42px;background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line-2),var(--sh-1);font-weight:600}
.btn.google svg{width:18px;height:18px}
.btn.wa{background:var(--wa);color:#fff}.btn.wa:hover{filter:brightness(1.05)}
.link{background:none;border:0;padding:0;color:var(--accent-ink);font:inherit;font-weight:600;cursor:pointer;text-decoration:none}
.link:hover{text-decoration:underline}.link:disabled{color:var(--faint);cursor:default;text-decoration:none}
.spin{width:15px;height:15px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:rot .7s linear infinite;opacity:.8}
@keyframes rot{to{transform:rotate(360deg)}}

/* forms */
label{display:grid;gap:6px;font-size:13px;font-weight:600;color:var(--ink);margin-top:14px}
label small{font-weight:400;font-size:12.5px}
.lab-row{display:flex;justify-content:space-between;align-items:baseline}
input,select,textarea{width:100%;font:400 15px/1.3 Inter,sans-serif;color:var(--ink);background:var(--surface);border:0;box-shadow:inset 0 0 0 1px var(--line-2),var(--sh-1);border-radius:9px;padding:10px 12px;outline:none;transition:box-shadow .15s;min-height:40px}
textarea{resize:vertical;min-height:64px;line-height:1.45}
input:focus,select:focus,textarea:focus{box-shadow:inset 0 0 0 1px var(--accent),0 0 0 4px var(--accent-wash)}
input:disabled{color:var(--muted);background:var(--sunk)}
select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236B7C93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px;padding-right:34px}
input[type=date],input[type=time]{font-variant-numeric:tabular-nums}
.form-error{margin-top:14px;color:var(--tough);font-size:13.5px;font-weight:500;background:var(--tough-wash);padding:9px 12px;border-radius:9px}
.unit{position:relative}.unit input{padding-right:52px;font-variant-numeric:tabular-nums}.unit span{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:13px;color:var(--muted);font-weight:500;pointer-events:none}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
@media (max-width:520px){.grid3{grid-template-columns:1fr 1fr}.grid3 label:first-child{grid-column:1/-1}}

/* preview banner */
.preview-bar{position:sticky;top:0;z-index:60;display:flex;align-items:center;justify-content:center;gap:8px;padding:7px 12px;background:#0A2540;color:#DDE5EE;font-size:12.5px;font-weight:500}
.preview-bar .dot{width:7px;height:7px;border-radius:50%;background:#FFC56E}
.hint{margin-top:16px;font-size:12.5px;color:var(--muted);background:var(--sunk);padding:9px 12px;border-radius:9px}

/* ---------- auth */
.auth{min-height:100vh;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr)}
.is-demo .auth{min-height:calc(100vh - 32px)}
.auth-main{display:flex;flex-direction:column;padding:32px clamp(20px,5vw,64px)}
.auth-card{width:100%;max-width:400px;margin:auto;padding:40px 0}
.auth-card h1{font-size:30px;letter-spacing:-.03em}
.auth-card>.muted{margin-top:8px;font-size:15px}
.auth-card .btn.google{margin-top:28px}
.or{display:flex;align-items:center;gap:12px;margin:20px 0 4px;color:var(--faint);font-size:12.5px}
.or:before,.or:after{content:"";flex:1;height:1px;background:var(--line)}
.auth-card form .btn.block{margin-top:22px}
.switch{margin-top:22px;font-size:14px;color:var(--muted);text-align:center}
.auth-foot{font-size:12.5px;color:var(--faint)}.auth-foot a{color:inherit}
.mail-ic{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;background:var(--accent-wash);color:var(--accent-ink);margin-bottom:22px}.mail-ic svg{width:24px;height:24px}
.code{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:26px}
.code input{height:58px;text-align:center;font:600 24px/1 "JetBrains Mono",ui-monospace,monospace;padding:0;color:var(--ink)}
.code input:nth-child(3){margin-right:8px}
.auth-art{position:relative;overflow:hidden;background:radial-gradient(80% 60% at 70% 30%,#1B2F7A 0%,#0A2540 60%);color:#fff;display:flex;flex-direction:column;justify-content:flex-end;padding:56px}
.auth-art canvas{position:absolute;inset:0;width:100%;height:100%}
.auth-art-copy{position:relative;z-index:2;max-width:440px}
.kicker{font-size:12.5px;font-weight:600;color:#2BE0B4;letter-spacing:.02em}
.auth-art h2{color:#fff;font:700 clamp(28px,2.8vw,38px)/1.08 "Inter Tight",sans-serif;letter-spacing:-.035em;margin:12px 0 14px}
.auth-art p{color:#ADBDCC;font-size:15.5px;line-height:1.6}
.auth-phones{position:absolute;right:-30px;top:48px;width:330px;height:520px;z-index:1}
.phone{position:absolute;width:220px;aspect-ratio:375/812;border-radius:36px;padding:7px;background:#0B0F19;box-shadow:0 40px 80px -20px rgba(0,0,0,.7),inset 0 0 0 1.5px #343B4C}
.phone img{width:100%;height:100%;object-fit:cover;object-position:top;border-radius:30px}
.auth-phones .phone{right:40px;top:0;transform:rotate(4deg);z-index:2}
.auth-phones .phone.back{right:200px;top:60px;transform:rotate(-6deg);z-index:1;opacity:.85}
@media (max-height:760px){.auth-phones{transform:scale(.8);transform-origin:top right}}
@media (max-width:920px){.auth{grid-template-columns:1fr}.auth-art{display:none}}

/* ---------- app shell */
.shell{display:grid;grid-template-columns:var(--side) minmax(0,1fr);min-height:100vh}
.side{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:22px;padding:20px 14px;background:var(--surface);border-right:1px solid var(--line)}
.is-demo .side{top:32px;height:calc(100vh - 32px)}
.side .brand{padding:4px 8px}
.side nav{display:grid;gap:2px}
.side nav a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;text-decoration:none;color:var(--body);font-weight:500;font-size:14.5px}
.side nav a svg{width:18px;height:18px;color:var(--muted)}
.side nav a:hover{background:var(--sunk);color:var(--ink)}
.side nav a.on{background:var(--accent-wash);color:var(--accent-ink);font-weight:600}.side nav a.on svg{color:var(--accent)}
.side-foot{margin-top:auto}
.me{display:flex;align-items:center;gap:10px;padding:8px;border-radius:10px;text-decoration:none}
.me:hover{background:var(--sunk)}
.me-txt{min-width:0;display:grid;line-height:1.3}.me-txt b{color:var(--ink);font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.me-txt small{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.avatar{flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#2BE0B4,#635BFF);color:#fff;font:700 12.5px/1 Inter,sans-serif;text-decoration:none;letter-spacing:.02em}
.avatar.lg{width:56px;height:56px;font-size:19px}
.main{min-width:0;display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;height:56px;padding:0 32px;background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:saturate(1.4) blur(12px);-webkit-backdrop-filter:saturate(1.4) blur(12px);border-bottom:1px solid transparent}
.is-demo .topbar{top:32px}
.crumbs{display:flex;align-items:center;gap:6px;font-size:13.5px;color:var(--muted);min-width:0}
.crumbs a{text-decoration:none;color:var(--muted)}.crumbs a:hover{color:var(--ink)}
.crumbs span{color:var(--ink);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crumbs svg{width:14px;height:14px;color:var(--faint)}
.mobile-only{display:none!important}
.page{padding:12px 32px 64px;max-width:1240px;width:100%}
@media (max-width:860px){
  .shell{grid-template-columns:1fr}.side{display:none}
  .mobile-only{display:inline-flex!important}
  .topbar{padding:0 16px;justify-content:space-between;border-bottom-color:var(--line);background:color-mix(in srgb,var(--surface) 88%,transparent)}
  .topbar .crumbs{display:none}
  .page{padding:20px 16px 48px}
}

/* cards & page heads */
.card{background:var(--surface);border-radius:var(--r);box-shadow:inset 0 0 0 1px var(--line),var(--sh-1)}
.card.pad{padding:24px}
.narrow{max-width:620px}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:12px 0 24px}
.page-head .muted{margin-top:6px}
.page-head.hide-btn>.btn{display:none}
.skel{background:linear-gradient(90deg,var(--sunk),var(--line),var(--sunk));background-size:200% 100%;animation:sh 1.2s linear infinite;border-radius:var(--r)}
.skel.card{height:220px;box-shadow:none}.skel.head{height:70px;margin:12px 0 24px;max-width:420px}.skel.card.tall{height:420px}
@keyframes sh{to{background-position:-200% 0}}
.error-card{color:var(--tough)}

/* tours list */
.tour-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:18px}
.tour-card{display:flex;flex-direction:column;text-decoration:none;color:inherit;overflow:hidden;transition:box-shadow .2s,transform .2s}
.tour-card:hover{box-shadow:inset 0 0 0 1px var(--line-2),var(--sh-2);transform:translateY(-2px)}
.tc-map{height:150px;background:radial-gradient(120% 90% at 30% 20%,#18306E,#0A2540);display:grid;place-items:center;position:relative;overflow:hidden}
.tc-map:after{content:"";position:absolute;inset:0;background-image:radial-gradient(rgba(173,189,204,.18) 1px,transparent 1px);background-size:14px 14px}
.thumb{width:100%;height:100%;position:relative;z-index:1}
.rt{fill:none;stroke:#8B85FF;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.rt-glow{fill:none;stroke:#8B85FF;stroke-width:5;stroke-opacity:.18;stroke-linecap:round;stroke-linejoin:round}
.rt-start{fill:#2BE0B4}.rt-end{fill:#fff}
.tc-body{padding:18px 20px 20px}
.tc-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.tc-top h3{font-size:17px;letter-spacing:-.015em;line-height:1.3}
.tc-body>.muted{font-size:13.5px;margin-top:4px}
.tc-stats{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:14px;font-size:13px;color:var(--muted)}
.tc-stats b{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.tour-card.add{align-items:center;justify-content:center;gap:10px;min-height:240px;border:0;background:transparent;box-shadow:inset 0 0 0 1.5px var(--line-2);border-radius:var(--r);cursor:pointer;font:600 14.5px Inter,sans-serif;color:var(--muted);flex-direction:column}
.tour-card.add svg{width:22px;height:22px;padding:8px;box-sizing:content-box;border-radius:50%;background:var(--accent-wash);color:var(--accent)}
.tour-card.add:hover{color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--accent);background:var(--surface)}
.pill{display:inline-flex;align-items:center;gap:6px;flex:none;font:600 12px/1 Inter,sans-serif;padding:5px 9px;border-radius:999px}
.pill.live{color:var(--good);background:var(--good-wash)}.pill.live i{width:6px;height:6px;border-radius:50%;background:currentColor;box-shadow:0 0 0 0 currentColor;animation:pulse 2s infinite}
.pill.draft{color:var(--muted);background:var(--sunk);box-shadow:inset 0 0 0 1px var(--line)}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(0,168,143,.5)}70%{box-shadow:0 0 0 6px rgba(0,168,143,0)}100%{box-shadow:0 0 0 0 rgba(0,168,143,0)}}

/* empty state */
.empty{max-width:720px;margin:24px auto 0;padding:48px 40px 40px;text-align:center;overflow:hidden}
.empty-art{height:170px;margin:-48px -40px 32px;background:radial-gradient(120% 100% at 50% 0%,#1B2F7A,#0A2540);position:relative;display:grid;place-items:center}
.empty-art:after{content:"";position:absolute;inset:0;background-image:radial-gradient(rgba(173,189,204,.18) 1px,transparent 1px);background-size:14px 14px}
.thumb.big{width:280px;height:170px}
.thumb.big .rt{stroke-width:1.2;stroke-dasharray:3 2.2;animation:dash 30s linear infinite}
@keyframes dash{to{stroke-dashoffset:-200}}
.empty h2{font:700 26px/1.2 "Inter Tight",sans-serif;letter-spacing:-.025em}
.empty>.muted{max-width:480px;margin:12px auto 26px;font-size:15.5px}
.empty-steps{list-style:none;display:flex;justify-content:center;flex-wrap:wrap;gap:10px 26px;padding:0;margin:32px 0 0;font-size:13.5px;color:var(--muted)}
.empty-steps li{display:flex;align-items:center;gap:8px}
.empty-steps b{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--sunk);color:var(--ink);font-size:12px;box-shadow:inset 0 0 0 1px var(--line)}

/* ---------- tour page */
.tour-head{align-items:center}
.th-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.url{display:inline-flex;align-items:center;gap:6px;margin-top:6px;color:var(--accent-ink);font-weight:500;font-size:14px;text-decoration:none}
.url svg{width:14px;height:14px}.url:hover{text-decoration:underline}
.th-title .muted{margin-top:6px;font-size:14px}
.th-actions{display:flex;gap:8px;flex:none}
.stats{display:grid;grid-template-columns:repeat(4,1fr);margin-bottom:20px}
.stats>div{padding:16px 20px;border-left:1px solid var(--line)}
.stats>div:first-child{border-left:0}
.stats small{display:block;font-size:12.5px;color:var(--muted);font-weight:500}
.stats b{display:block;margin-top:4px;font:600 22px/1.2 "Inter Tight",sans-serif;color:var(--ink);letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.stats b.sm{font-size:17px;margin-top:7px}
.tour-cols{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:20px;align-items:start}
.card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid var(--line)}
.card-head .muted{margin-top:3px}
.days-card{position:relative;overflow:hidden}
.day-row{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:14px;align-items:center;width:100%;padding:14px 20px;border:0;border-top:1px solid var(--line);background:none;text-align:left;font:inherit;color:inherit;cursor:pointer;transition:background .15s}
.day-row:first-child{border-top:0}
.day-row:hover{background:var(--sunk)}
.day-row.past{opacity:.55}
.day-num{width:46px;height:46px;border-radius:13px;display:grid;place-content:center;text-align:center;background:var(--accent-wash);color:var(--accent-ink);font:700 16px/1 "Inter Tight",sans-serif;transition:background .3s,color .3s}
.day-num small{display:block;font:700 8.5px/1 Inter,sans-serif;letter-spacing:.08em;opacity:.75;margin-bottom:3px}
.day-num.good{background:var(--good-wash);color:var(--good)}.day-num.fair{background:var(--fair-wash);color:var(--fair)}.day-num.tough{background:var(--tough-wash);color:var(--tough)}
.day-mid{display:grid;gap:2px;min-width:0}
.day-title{color:var(--ink);font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.005em}
.day-meta{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.day-wx{display:flex;align-items:flex-start;gap:8px;margin-top:5px;font-size:12.5px;color:var(--muted);line-height:1.45;font-variant-numeric:tabular-nums}
.day-side{display:flex;align-items:center;gap:10px;color:var(--faint)}
.day-side svg{width:16px;height:16px}
.day-pace{text-align:right;font-size:12.5px;color:var(--muted);line-height:1.35;font-variant-numeric:tabular-nums}
.day-pace small{color:var(--faint);font-size:11.5px}
.chip{flex:none;font:700 10px/1 Inter,sans-serif;letter-spacing:.08em;text-transform:uppercase;padding:4px 7px;border-radius:6px}
.chip.good{color:var(--good);background:var(--good-wash)}.chip.fair{color:var(--fair);background:var(--fair-wash)}.chip.tough{color:var(--tough);background:var(--tough-wash)}.chip.wait{color:var(--muted);background:var(--sunk);box-shadow:inset 0 0 0 1px var(--line)}
.shim{display:inline-block;width:170px;height:10px;border-radius:5px;margin-top:3px;background:linear-gradient(90deg,var(--sunk),var(--line),var(--sunk));background-size:200% 100%;animation:sh 1.2s linear infinite}
.drop-hint{display:flex;align-items:center;justify-content:center;gap:10px;margin:0;padding:14px 20px;border-top:1px dashed var(--line-2);font-size:13px;font-weight:500;color:var(--muted);cursor:pointer;background:var(--sunk)}
.drop-hint svg{width:18px;height:18px}.drop-hint:hover{color:var(--ink)}
.drop-veil{position:absolute;inset:0;display:none;place-items:center;background:color-mix(in srgb,var(--accent) 10%,var(--surface) 90%);border:2px dashed var(--accent);border-radius:var(--r);z-index:5;text-align:center}
.drop-veil div{display:grid;gap:6px;justify-items:center;color:var(--accent-ink)}.drop-veil svg{width:32px;height:32px}.drop-veil b{font-size:16px}.drop-veil span{font-size:13px;color:var(--muted)}
.days-card.dragging .drop-veil{display:grid}
.days-empty{padding:44px 24px;text-align:center}
.de-ic{width:52px;height:52px;margin:0 auto 16px;border-radius:15px;display:grid;place-items:center;background:var(--accent-wash);color:var(--accent)}.de-ic svg{width:24px;height:24px}
.days-empty h3{font-size:18px}.days-empty .muted{max-width:380px;margin:8px auto 22px;font-size:14px}
.de-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.de-actions label{margin:0;font-size:14px}
.map-card{position:sticky;top:76px;overflow:hidden}
.is-demo .map-card{top:108px}
.map{height:min(560px,calc(100vh - 170px));min-height:340px;background:var(--sunk)}
.map-empty{height:100%;display:grid;place-items:center;align-content:center;gap:10px;text-align:center;color:var(--muted);font-size:13.5px;background:radial-gradient(120% 90% at 30% 20%,#18306E,#0A2540)}
.map-empty .thumb{width:80%;height:auto;max-height:70%}.map-empty span{color:#ADBDCC}
.map-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:12px 16px;border-top:1px solid var(--line);font-size:12.5px;color:var(--body)}
.map-legend span{display:inline-flex;align-items:center;gap:6px}
.leg{width:14px;height:4px;border-radius:2px}.leg.good{background:var(--good)}.leg.fair{background:var(--fair)}.leg.tough{background:var(--tough)}
.map-legend .muted{margin-left:auto}
.map-dot{width:22px;height:22px;border-radius:50%;background:#fff;color:#0A2540;display:grid;place-items:center;font:700 10.5px/1 Inter,sans-serif;box-shadow:0 0 0 2px #0A2540,0 3px 8px rgba(0,0,0,.25)}
.map-dot.fin{background:#0A2540;color:#fff;box-shadow:0 0 0 2px #fff,0 3px 8px rgba(0,0,0,.3)}
.maplibregl-ctrl-group{border-radius:9px!important;box-shadow:var(--sh-2)!important}
@media (max-width:1080px){.tour-cols{grid-template-columns:1fr}.map-card{position:relative;top:0!important;order:-1}.map{height:320px;min-height:0}}
@media (max-width:860px){
  .tour-head{flex-direction:column;align-items:stretch}
  .th-actions{width:100%}.th-actions .btn:not(.icon-only){flex:1}
  .stats{grid-template-columns:1fr 1fr}.stats>div:nth-child(3){border-left:0}.stats>div:nth-child(n+3){border-top:1px solid var(--line)}
  h1{font-size:24px}
  .page-head{flex-wrap:wrap}
}
@media (max-width:560px){
  .day-row{grid-template-columns:42px minmax(0,1fr) 16px;gap:12px;padding:13px 16px}
  .day-num{width:42px;height:42px}
  .day-pace{display:none}
  .card-head{padding:16px}
  .map-legend .muted{margin-left:0;flex-basis:100%}
}

/* ---------- overlays */
.overlay{position:fixed;inset:0;z-index:100;display:flex}
.scrim{position:absolute;inset:0;background:rgba(10,37,64,.42);opacity:0;transition:opacity .22s;backdrop-filter:blur(2px)}
.overlay.in .scrim{opacity:1}
.overlay.modal{align-items:center;justify-content:center;padding:16px}
.modal-panel{position:relative;width:100%;max-width:460px;max-height:calc(100vh - 32px);overflow:auto;background:var(--surface);border-radius:16px;box-shadow:var(--sh-3),inset 0 0 0 1px var(--line);opacity:0;transform:translateY(10px) scale(.98);transition:opacity .22s,transform .22s}
.overlay.in .modal-panel{opacity:1;transform:none}
.m-body{padding:24px 24px 6px}
.m-body h3+.muted{margin-top:6px;font-size:14.5px}
.m-foot{display:flex;justify-content:flex-end;gap:8px;padding:18px 24px 20px}
.overlay.drawer{justify-content:flex-end}
.drawer-panel{position:relative;width:min(520px,100%);height:100%;background:var(--surface);box-shadow:var(--sh-3);transform:translateX(24px);opacity:0;transition:transform .25s cubic-bezier(.2,.8,.2,1),opacity .25s;display:flex;flex-direction:column}
.overlay.in .drawer-panel{transform:none;opacity:1}
.drawer-panel form{display:flex;flex-direction:column;height:100%}
.d-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 24px;border-bottom:1px solid var(--line)}
.d-head h3{margin-top:2px}
.d-head small{font-size:12.5px}
.d-body{flex:1;overflow:auto;padding:4px 24px 24px;overscroll-behavior:contain}
.d-sec{padding:20px 0;border-bottom:1px solid var(--line)}
.d-sec:last-of-type{border-bottom:0}
.d-sec h4{margin-bottom:2px}
.d-sec label:first-of-type{margin-top:12px}
.d-sec>small{display:block;margin-top:8px;font-size:12.5px}
.d-foot{display:flex;align-items:center;gap:8px;padding:14px 24px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--surface)}
.grow{flex:1}
@media (max-width:560px){.drawer-panel{width:100%}.d-head,.d-body,.d-foot{padding-left:16px;padding-right:16px}.d-foot .btn.ghost.danger-text span{display:none}}
.upload{display:grid;justify-items:center;gap:6px;margin-top:12px;padding:28px 16px;border-radius:12px;border:1.5px dashed var(--line-2);background:var(--sunk);text-align:center;cursor:pointer;font-weight:500;color:var(--ink);transition:border-color .15s,background .15s}
.upload svg{width:26px;height:26px;color:var(--accent)}
.upload b{font-size:15px}.upload .muted{font-size:13px;font-weight:400}
.upload:hover,.upload.dragging{border-color:var(--accent);background:var(--accent-wash)}
.upload.loading{grid-auto-flow:column;justify-content:center;align-items:center;gap:10px;color:var(--muted);cursor:default}
.route-card{display:grid;grid-template-columns:132px minmax(0,1fr);gap:14px;align-items:center;margin-top:12px;padding:10px;border-radius:12px;background:var(--sunk);box-shadow:inset 0 0 0 1px var(--line)}
.rc-map{height:84px;border-radius:9px;overflow:hidden;background:radial-gradient(120% 90% at 30% 20%,#18306E,#0A2540)}
.rc-info{display:grid;gap:3px;min-width:0}
.rc-info b{color:var(--ink);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rc-info .muted{font-size:13px}.rc-info .link{justify-self:start;margin-top:4px}
.stop-presets{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:12px}
.stop-presets button{font:500 12.5px Inter,sans-serif;color:var(--body);background:var(--surface);border:0;box-shadow:inset 0 0 0 1px var(--line-2);padding:5px 10px;border-radius:999px;cursor:pointer}
.stop-presets button:hover{color:var(--accent-ink);box-shadow:inset 0 0 0 1px var(--accent)}
.finish{display:flex;align-items:flex-start;gap:10px;margin-top:16px;padding:12px 14px;border-radius:10px;background:var(--accent-wash);color:var(--ink);font-size:13.5px;line-height:1.45}
.finish svg{width:18px;height:18px;color:var(--accent);margin-top:1px}
.finish b{font-weight:700;font-variant-numeric:tabular-nums}
.danger-zone h4{color:var(--tough)}
.danger-zone .btn{margin-top:12px}
.d-sec .btn{margin-top:10px}
.addr{display:flex;align-items:center;border-radius:9px;box-shadow:inset 0 0 0 1px var(--line-2),var(--sh-1);background:var(--sunk);overflow:hidden}
.addr:focus-within{box-shadow:inset 0 0 0 1px var(--accent),0 0 0 4px var(--accent-wash)}
.addr span{padding:0 0 0 12px;color:var(--muted);font-weight:500;font-size:14px;white-space:nowrap}
.addr input{box-shadow:none!important;background:var(--surface);border-radius:0;padding-left:4px;font-weight:600}
.avail{font-weight:500}.avail.good{color:var(--good)}.avail.bad{color:var(--tough)}
.pub-check{display:grid;gap:8px;margin-top:18px;padding:14px;border-radius:10px;background:var(--sunk);font-size:13.5px;color:var(--ink)}
.pub-check span{display:flex;align-items:center;gap:8px}.pub-check svg{width:16px;height:16px;color:var(--good)}
.share{text-align:center}
.share .muted{margin:8px auto 0;max-width:340px}
.burst{width:56px;height:56px;margin:4px auto 16px;border-radius:50%;display:grid;place-items:center;background:var(--good-wash);color:var(--good);animation:pop .5s cubic-bezier(.2,1.6,.4,1)}
.burst svg{width:26px;height:26px}
@keyframes pop{from{transform:scale(.4);opacity:0}}
.copyrow{display:flex;gap:8px;margin-top:20px}
.copyrow input{font:500 13.5px "JetBrains Mono",ui-monospace,monospace;background:var(--sunk)}
.share-btns{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}.share-btns .btn{flex:1;height:40px}
.share+.m-foot .btn{width:100%}

/* account */
.acc-id{display:flex;align-items:center;gap:16px;padding-bottom:10px}
.acc-id div{display:grid;gap:2px}.acc-id b{color:var(--ink);font-size:17px}.acc-id .muted{font-size:13.5px}
.row-end{display:flex;justify-content:flex-end;margin-top:20px}
.sign-out{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px}
.sign-out b{color:var(--ink)}

/* toasts */
#toasts{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:200;display:grid;gap:8px;justify-items:center;width:max-content;max-width:calc(100vw - 32px)}
.toast{display:flex;align-items:center;gap:10px;padding:11px 16px;border-radius:11px;background:#0A2540;color:#fff;font-size:14px;font-weight:500;box-shadow:var(--sh-3);opacity:0;transform:translateY(10px);transition:opacity .25s,transform .25s}
.toast.in{opacity:1;transform:none}
.toast svg{width:16px;height:16px;color:#2BE0B4}
.toast.err{background:#B42335}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
@media (max-width:860px){.tour-card.add{display:none}}

/* drawn route map (preview, or when the map library can't load) */
.svmap{width:100%;height:100%;display:block;background:radial-gradient(120% 90% at 30% 20%,#18306E,#0A2540)}
.sv-line{fill:none;stroke:#8B85FF;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round;transition:stroke .4s,opacity .2s,stroke-width .2s}
.sv-glow{fill:none;stroke:#8B85FF;stroke-width:11;stroke-opacity:.16;stroke-linecap:round;stroke-linejoin:round;transition:stroke .4s}
.sv-line[data-rate=good],.sv-glow[data-rate=good]{stroke:#2BE0B4}.sv-line[data-rate=fair],.sv-glow[data-rate=fair]{stroke:#FFC56E}.sv-line[data-rate=tough],.sv-glow[data-rate=tough]{stroke:#FF7A8A}
.svmap.focus .sv-line{opacity:.3}.svmap.focus .sv-line.on{opacity:1;stroke-width:5}
.sv-dot circle{fill:#fff;stroke:#0A2540;stroke-width:2}.sv-dot text{font:700 9.5px Inter,sans-serif;fill:#0A2540;text-anchor:middle}
.sv-fin{fill:#0A2540;stroke:#fff;stroke-width:2.5}

/* ---------- beta, event types, regular rides ---------- */
.beta{display:inline-flex;align-items:center;margin-left:2px;padding:3px 7px 3px;border-radius:999px;font:700 10px/1 Inter,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-ink);background:var(--accent-wash);box-shadow:inset 0 0 0 1px rgba(99,91,255,.18)}
.beta-note{display:grid;gap:3px;margin:0 0 12px;padding:12px 12px 13px;border-radius:11px;background:var(--sunk);box-shadow:inset 0 0 0 1px var(--line);font-size:12.5px;line-height:1.45;color:var(--muted)}
.beta-note b{color:var(--ink);font-size:13px;font-weight:600}.beta-note a{color:var(--accent-ink);text-decoration:none;font-weight:500}.beta-note a:hover{text-decoration:underline}
.modal-panel.wide{max-width:580px}
.step-k{display:block;margin-bottom:8px;font:600 11.5px/1 Inter,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-ink)}
.type-pick{display:grid;gap:10px;margin:18px 0 8px}
.type-opt{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;width:100%;padding:16px 16px 16px 14px;text-align:left;font:inherit;color:inherit;background:var(--surface);border:0;border-radius:13px;box-shadow:inset 0 0 0 1px var(--line-2),var(--sh-1);cursor:pointer;transition:box-shadow .15s,transform .15s}
.type-opt:hover,.type-opt:focus-visible{outline:0;box-shadow:inset 0 0 0 1.5px var(--accent),0 0 0 4px var(--accent-wash),var(--sh-2);transform:translateY(-1px)}
.to-txt{display:grid;gap:4px;min-width:0}
.to-txt b{font:600 15.5px/1.25 "Inter Tight",Inter,sans-serif;color:var(--ink);letter-spacing:-.01em}
.to-txt>span{font-size:13.5px;line-height:1.45;color:var(--muted)}
.to-txt code{justify-self:start;margin-top:4px;padding:3px 7px;border-radius:6px;background:var(--sunk);box-shadow:inset 0 0 0 1px var(--line);font:500 12px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--body);overflow-wrap:anywhere}
.to-txt code i{font-style:normal;color:var(--faint)}
.to-go svg{width:18px;height:18px;color:var(--faint);transition:transform .15s,color .15s}
.type-opt:hover .to-go svg{color:var(--accent);transform:translateX(2px)}
.to-ic{width:44px;height:44px;flex:none;border-radius:12px;display:grid;place-items:center}
.to-ic svg{width:22px;height:22px}
.to-ic.sm{width:34px;height:34px;border-radius:10px}.to-ic.sm svg{width:18px;height:18px}
.to-ic.ride{color:#0E9F6E;background:rgba(14,159,110,.11)}
.to-ic.race{color:#E5484D;background:rgba(229,72,77,.1)}
.to-ic.tour{color:var(--accent-ink);background:var(--accent-wash)}
.nt-head{display:flex;align-items:center;gap:12px}
.tbadge{display:inline-flex;align-items:center;gap:5px;margin-right:8px;padding:3px 8px 3px 6px;border-radius:999px;font:600 11.5px/1.2 Inter,sans-serif;vertical-align:1px}
.tbadge svg{width:13px;height:13px}
.tbadge.ride{color:#0E9F6E;background:rgba(14,159,110,.1)}
.tbadge.race{color:#D9363E;background:rgba(229,72,77,.09)}
.tbadge.tour{color:var(--accent-ink);background:var(--accent-wash)}
.th-sub{display:flex;align-items:center;flex-wrap:wrap;gap:4px 2px;margin-top:8px}
.th-sub .url,.th-title .th-sub .muted{margin-top:0;font-size:14px}
.note{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;margin:-4px 0 16px;font-size:14px;line-height:1.5;color:var(--body)}
.note svg{width:18px;height:18px;flex:none;margin-top:2px;color:#D9363E}.note b{color:var(--ink);font-weight:600}
.lab{display:grid;gap:6px;font-size:13px;font-weight:600;color:var(--ink);margin-top:14px}
.wk{display:flex;flex-wrap:wrap;gap:6px}
.wk-d{min-width:46px;padding:9px 0;border:0;border-radius:9px;font:600 13px/1 Inter,sans-serif;color:var(--body);background:var(--surface);box-shadow:inset 0 0 0 1px var(--line-2),var(--sh-1);cursor:pointer;transition:background .15s,color .15s,box-shadow .15s}
.wk-d:hover{box-shadow:inset 0 0 0 1px var(--accent)}
.wk-d.on{color:#fff;background:var(--accent);box-shadow:0 1px 2px rgba(50,50,93,.25),inset 0 0 0 1px rgba(0,0,0,.06)}
.ride-when{align-items:end}
.day-row.later .day-num{opacity:.85}
.avail{display:inline-flex;align-items:center;gap:6px}.avail svg{width:14px;height:14px}.avail b{font-weight:700}
.tc-body p.muted{display:flex;align-items:center;flex-wrap:wrap;gap:2px}
@media (max-width:560px){
  .type-opt{grid-template-columns:auto 1fr;gap:12px;padding:14px 12px}.to-go{display:none}
  .type-opt .to-ic{width:38px;height:38px;align-self:start}.type-opt .to-ic svg{width:19px;height:19px}
  .to-txt code{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;overflow-wrap:normal}
  .wk-d{min-width:0;flex:1 1 calc(25% - 6px)}
}

/* ---------- reorder days ---------- */
.ch-actions{display:flex;gap:8px;flex:none}
.ch-actions .btn svg{width:16px;height:16px}
.reordering .drop-hint,.reordering .drop-veil{display:none!important}
.ro-row{display:grid;grid-template-columns:auto 46px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 16px 12px 8px;border-top:1px solid var(--line);background:var(--surface);position:relative;transition:background .2s,box-shadow .2s}
.ro-row:first-child{border-top:0}
.ro-row .day-num{background:var(--accent-wash);color:var(--accent-ink)}
.ro-row .day-num b{display:block;font:inherit}
.ro-grip{width:30px;height:40px;display:grid;place-items:center;border:0;border-radius:8px;background:none;color:var(--faint);cursor:grab;touch-action:none}
.ro-grip svg{width:18px;height:18px}
.ro-grip:hover{background:var(--sunk);color:var(--ink)}
.dragging,.dragging *{cursor:grabbing!important;user-select:none}
.ro-row.lift{z-index:2;background:var(--surface);box-shadow:0 0 0 1.5px var(--accent),0 14px 30px -10px rgba(50,50,93,.35);border-radius:12px}
.ro-row.flash{background:var(--accent-wash)}
.ro-btns{display:flex;gap:4px}
.ro-btns button{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:8px;background:var(--surface);color:var(--body);box-shadow:inset 0 0 0 1px var(--line-2);cursor:pointer}
.ro-btns button svg{width:16px;height:16px}
.ro-btns button:hover:not(:disabled){color:var(--accent-ink);box-shadow:inset 0 0 0 1px var(--accent)}
.ro-btns button:disabled{opacity:.35;cursor:default}
.ro-row .day-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:560px){
  .card-head{flex-wrap:wrap}.ch-actions{width:100%}.ch-actions .btn{flex:1;justify-content:center}
  .ro-row{grid-template-columns:auto 40px minmax(0,1fr);padding-right:12px}
  .ro-btns{grid-column:3;justify-content:flex-end;margin-top:-4px}
}
