/* ============ TrailEU design tokens ============ */
:root {
  --green: #1f7a3e;
  --brand-eu: #319767; /* "EU" in the logo */
  --green-600: #186a35;
  --green-700: #12552a;
  --green-50: #eef7f1;
  --green-100: #dcefe3;
  --ink: #141c17;
  --ink-2: #2b352f;
  --muted: #6b766f;
  --line: #e5eae6;
  --line-2: #eef1ee;
  --bg: #f6f8f6;
  --card: #ffffff;
  --sun: #f5b301;
  --rain: #2d7ff9;
  --warn: #c7741a;
  --danger: #c63d3d;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(20, 28, 23, .04), 0 2px 10px rgba(20, 28, 23, .04);
  --shadow-lg: 0 10px 40px rgba(20, 28, 23, .12);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side-w: 248px;
  /* surfaces and tints (dark twins below in :root[data-theme="dark"]) */
  --page: #fff;
  --surface: #fff;
  --surface-2: #f3f7f4;
  --line-hover: #c5d3c9;
  --skel-a: #eef1ee;
  --skel-b: #f7f9f7;
  --glass: rgba(255, 255, 255, .88);
  --glass-app: rgba(246, 248, 246, .9);
  --veil: rgba(255, 255, 255, .7);
  --veil-strong: rgba(255, 255, 255, .92);
  --warn-bg: var(--warn-bg);
  --warn-ink: var(--warn-ink);
  --danger-bg: var(--danger-bg);
  --sun-bg: var(--sun-bg);
  --sun-ink: var(--sun-ink);
  --map-bg: #eef3ef;
  --topo: #e3eae5;
  --inverse-bg: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--page); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.in-app { background: var(--bg); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .8em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ic { width: 18px; height: 18px; flex: none; }
svg.lucide { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }

/* ============ buttons, chips, fields ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px; font-weight: 600; font-size: 14px; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-600); }
.btn-primary:active { background: var(--green-700); }
.btn-primary:disabled { background: var(--line-hover); cursor: not-allowed; }
.btn-outline { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-white { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }
.btn-link { color: var(--muted); font-weight: 500; padding: 0 6px; }
.btn-link:hover { color: var(--green); }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn .ic, .btn svg { width: 17px; height: 17px; }
.link { color: var(--green); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--ink-2); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn.lg { width: 44px; height: 44px; }
.icon-btn.lg svg { width: 24px; height: 24px; }
.icon-btn.on svg { fill: var(--green); color: var(--green); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: all .15s; }
.chip:hover { border-color: var(--line-hover); }
.chip.on { border-color: var(--green); background: var(--green-50); color: var(--green); font-weight: 600; }
.chip svg { width: 17px; height: 17px; }
.chip-add { border-style: dashed; color: var(--green); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .share-input, .toolbar select { height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; width: 100%; }
.field input:focus, .share-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-100); }
.suffix { position: relative; display: flex; align-items: center; }
.suffix input { padding-right: 52px; }
.suffix em { position: absolute; right: 12px; font-style: normal; color: var(--muted); font-size: 13px; pointer-events: none; }
.suffix.sm input { height: 36px; width: 96px; padding: 0 44px 0 10px; border: 1px solid var(--line); border-radius: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.check input { accent-color: var(--green); width: 16px; height: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.skeleton { background: linear-gradient(90deg, var(--skel-a) 0%, var(--skel-b) 50%, var(--skel-a) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.empty > svg { width: 34px; height: 34px; color: var(--green); }
.empty p { margin: 0; }
.empty-small { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); padding: 18px 4px; font-size: 14px; }
.empty-small .link, .empty-small a { color: var(--green); font-weight: 600; }

/* ============ logo ============ */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 25px; letter-spacing: -.03em; color: var(--ink); }
.logo .logo-mark { width: 52px; height: auto; }
.logo b { color: var(--brand-eu); font-weight: 800; }
.logo.small { font-size: 18px; }
.logo.small .logo-mark { width: 38px; }
.logo.invert .logo-full { width: 190px; height: auto; }

/* ============ landing ============ */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--glass); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.site-header .wrap { display: flex; align-items: center; height: 84px; gap: 24px; }
.site-nav { display: flex; gap: 4px; margin: 0 auto; }
.site-nav a { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.site-nav a:hover { color: var(--green); }
.site-nav a.active { background: var(--line-2); color: var(--ink); }
.site-actions { display: flex; gap: 10px; }
.nav-burger { display: none; }

.hero { position: relative; overflow: hidden; padding: 30px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 480px; }
.hero-copy { position: relative; z-index: 2; padding: 30px 0 40px; }
.hero h1 { font-size: clamp(40px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -.035em; margin-bottom: 26px; }
.hero h1 span { color: var(--green); }
.hero p { font-size: 17px; color: var(--ink-2); max-width: 470px; line-height: 1.65; margin-bottom: 34px; }
.hero-cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-cta .btn-primary { border-radius: 999px; padding: 0 28px; }
.hero-art { position: relative; height: 520px; }
.hero-art .topo { position: absolute; inset: -40px -200px -40px -120px; width: calc(100% + 320px); height: calc(100% + 80px); }
.topo path { fill: none; stroke: var(--topo); stroke-width: 1; }
.hero-art .topo { -webkit-mask-image: radial-gradient(ellipse 70% 75% at 60% 50%, #000 35%, transparent 80%); mask-image: radial-gradient(ellipse 70% 75% at 60% 50%, #000 35%, transparent 80%); }
.topo-light path { stroke: rgba(255, 255, 255, .12); }
.hero-route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hr-line { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.4s .3s ease-out forwards; }
.hr-dash { fill: none; stroke: #b8cfc0; stroke-width: 2; stroke-dasharray: 4 7; }
.hr-start { fill: #fff; stroke: var(--green); stroke-width: 4; }
.hr-mid { fill: #fff; stroke: #9fc1aa; stroke-width: 2; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-pin { position: absolute; right: 13%; top: 14%; width: 34px; animation: drop .6s 2.4s both cubic-bezier(.3, 1.6, .5, 1); }
.hero-pin path { fill: var(--green); }
@keyframes drop { from { transform: translateY(-30px); opacity: 0; } }
.hero-mtn { position: absolute; left: 50%; top: 40%; width: 58px; }
.feature-strip { display: flex; gap: 56px; padding-top: 10px; padding-bottom: 20px; position: relative; z-index: 2; }
.feature-strip div { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.feature-strip svg { width: 32px; height: 32px; stroke-width: 1.5; }

.section { padding: 96px 0; }
.section-tint { background: var(--bg); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head.left { text-align: left; margin: 0 0 36px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.03em; margin: 8px 0 12px; }
.section-head p { color: var(--muted); font-size: 16px; }
.eyebrow { color: var(--green); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); transition: border-color .2s, transform .2s, box-shadow .2s; }
.feature-card:hover { border-color: var(--green-100); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature-card h3 { margin: 18px 0 8px; font-size: 17px; }
.feature-card p { color: var(--muted); margin: 0; font-size: 14.5px; }
.fc-ic { width: 48px; height: 48px; border-radius: 12px; background: var(--green-50); color: var(--green); display: grid; place-items: center; }
.fc-ic svg { width: 24px; height: 24px; }
.how .steps { list-style: none; padding: 0; margin: 0 0 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { display: flex; gap: 16px; }
.steps b { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 16px; }
.steps h3 { margin: 6px 0 6px; }
.steps p { color: var(--muted); margin: 0; font-size: 14.5px; }
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; }
.about h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; margin: 8px 0 18px; }
.about p { color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.about-stats { display: grid; gap: 14px; }
.about-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 24px; display: flex; align-items: baseline; gap: 14px; }
.about-stats b { font-size: 34px; color: var(--green); font-weight: 800; }
.about-stats span { color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }

/* ============ auth ============ */
.auth { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 100vh; }
.auth-side { position: relative; background: var(--green-700); color: #fff; overflow: hidden; display: flex; }
.auth-side .topo { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-side-inner { position: relative; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; width: 100%; }
.auth-side h2 { font-size: 44px; font-weight: 800; letter-spacing: -.03em; margin-top: auto; margin-bottom: 14px; }
.auth-side p { opacity: .8; max-width: 380px; font-size: 16px; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { margin: 26px 0 6px; }
.auth-card > .muted { margin-bottom: 26px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; }
.back-link:hover { color: var(--green); }
.pw { position: relative; }
.pw input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; }
.form-error { background: var(--danger-bg); color: var(--danger); padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.auth-switch { text-align: center; margin-top: 20px; color: var(--muted); font-size: 14px; }
.auth-switch a { color: var(--green); font-weight: 600; }
.auth-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin-top: 26px; }
.auth-note svg { width: 15px; height: 15px; }

/* ============ app shell ============ */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--side-w); flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 26px 16px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40; }
.sidebar .logo { padding: 0 10px; margin-bottom: 34px; font-size: 23px; }
.sidebar .logo .logo-mark { width: 46px; }
.side-nav, .side-bottom { display: flex; flex-direction: column; gap: 4px; }
.side-bottom { margin-top: auto; position: relative; }
.side-nav a, .side-bottom > a, .user-btn { display: flex; align-items: center; gap: 13px; height: 44px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s; }
.side-nav a:hover, .side-bottom > a:hover { background: var(--line-2); }
.side-nav a.on, .side-bottom > a.on { background: var(--green-50); color: var(--green); font-weight: 600; }
.side-nav a svg, .side-bottom > a svg { width: 20px; height: 20px; }
.user-btn { width: 100%; margin-top: 8px; border-top: 1px solid var(--line-2); border-radius: 0 0 10px 10px; padding-top: 14px; height: 58px; }
.user-btn svg { margin-left: auto; width: 16px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.user-menu { position: absolute; bottom: 62px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 5; }
.user-menu a, .user-menu button { display: flex; width: 100%; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 8px; font-size: 14px; }
.user-menu a:hover, .user-menu button:hover { background: var(--line-2); }
.guest-box { margin-top: 12px; padding: 16px; background: var(--green-50); border-radius: 12px; display: grid; gap: 8px; }
.guest-box p { margin: 0 0 4px; font-size: 13.5px; color: var(--ink-2); }
.guest-box .btn-ghost { height: 38px; }
.app-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; height: 72px; padding: 0 32px; position: sticky; top: 0; z-index: 30; background: var(--glass-app); backdrop-filter: blur(8px); }
.burger { display: none; }
.global-search { position: relative; flex: 1; max-width: 460px; }
.global-search label { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; color: var(--muted); }
.global-search label:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-100); }
.global-search input { border: 0; outline: 0; flex: 1; background: none; font-size: 14px; color: var(--ink); min-width: 0; }
.gs-drop, .pi-drop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 1000; max-height: 380px; overflow: auto; }
.gs-item, .pi-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; }
.gs-item:hover, .gs-item.on, .pi-item:hover, .pi-item.on { background: var(--green-50); }
.gs-item svg, .pi-item svg { color: var(--green); }
.gs-item span, .pi-item span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gs-item b, .pi-item b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-item small, .pi-item small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-item em { font-style: normal; font-size: 11px; color: var(--muted); background: var(--line-2); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.pi-empty { padding: 12px; color: var(--muted); font-size: 14px; }
.top-actions { margin-left: auto; position: relative; }
.bell { position: relative; }
.bell svg { width: 22px; height: 22px; }
.badge-dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; border: 2px solid var(--bg); }
.notif { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px; z-index: 50; }
.notif h4 { padding: 6px 8px 10px; font-size: 14px; }
.notif-item { display: flex; gap: 12px; padding: 10px; border-radius: 10px; }
.notif-item[href]:hover { background: var(--line-2); }
.notif-item > svg { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--green-50); color: var(--green); }
.notif-item.tone-warn > svg { background: var(--warn-bg); color: var(--warn); }
.notif-item.tone-ok > svg { background: var(--sun-bg); color: var(--sun-ink); }
.notif-item span { display: flex; flex-direction: column; }
.notif-item b { font-size: 13.5px; font-weight: 600; }
.notif-item small { color: var(--muted); font-size: 12.5px; }
main#main { padding: 8px 32px 48px; outline: none; flex: 1; }
.page { max-width: 1240px; }
.page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 14px; }
.side-backdrop { display: none; }

/* ============ place input ============ */
.place-input { position: relative; flex: 1; min-width: 0; }
.place-input .pi-label { position: absolute; top: 7px; left: 42px; font-size: 11px; color: var(--muted); pointer-events: none; }
.pi-row { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 12px 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.pi-row:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-100); }
.pi-row > svg { color: var(--ink-2); width: 19px; height: 19px; }
.pi-row input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; padding-top: 12px; }
.place-input:not(:has(.pi-label)) .pi-row input { padding-top: 0; }
.place-input.compact .pi-row { height: 42px; }
.pi-clear { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--muted); }
.pi-clear:hover { background: var(--line-2); }
.pi-clear svg { width: 15px; height: 15px; }

/* ============ dashboard ============ */
.dash-top { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.dash-hello h1 { font-size: 34px; }
.dash-hello > .muted { font-size: 16px; margin: 4px 0 18px; }
.quick-plan { padding: 18px; display: grid; gap: 14px; }
.qp-inputs, .pf-row { display: flex; align-items: center; gap: 8px; }
.swap { flex: none; border: 1px solid var(--line); background: var(--surface); }
.weather-card { padding: 18px 20px; position: relative; margin-top: 4px; }
.wc-head { display: flex; justify-content: space-between; align-items: center; }
.wc-head h3 { font-size: 14px; }
.wc-loc { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 4px 0 14px; }
.wc-loc svg { width: 14px; height: 14px; }
.wc-loc:hover { color: var(--green); }
.wc-picker { position: absolute; left: 14px; right: 14px; top: 70px; z-index: 20; }
.wc-main { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.wc-temp { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1; margin-bottom: 4px; }
.wc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.wc-stats div { display: flex; flex-direction: column; gap: 2px; }
.wc-stats b { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.wc-stats b svg { width: 14px; height: 14px; color: var(--muted); }
.wc-stats small { color: var(--muted); font-size: 11.5px; padding-left: 19px; }
.wi { display: inline-grid; place-items: center; }
.wi svg { width: 22px; height: 22px; }
.wi-sun svg { color: var(--sun); fill: var(--sun); }
.wi-rain svg { color: var(--rain); }
.wi-storm svg { color: #7a5af8; }
.wi-cloud svg { color: #8a958e; }
.wi.xl svg { width: 54px; height: 54px; stroke-width: 1.4; }
.wi.xxl svg { width: 84px; height: 84px; stroke-width: 1.3; }

/* route cards */
.route-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.route-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.route-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: visible; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; }
.route-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.rc-media { display: block; aspect-ratio: 2 / 1; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--green-50); }
.rc-media img { width: 100%; height: 100%; object-fit: cover; }
.rc-track { position: relative; width: 100%; height: 100%; background: var(--surface-2); }
.rc-track .topo, .rc-track .track-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rc-body { padding: 12px 52px 14px 14px; }
.rc-title { display: block; font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-title:hover { color: var(--green); }
.rc-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin-top: 4px; flex-wrap: wrap; }
.rc-meta svg { width: 13px; height: 13px; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; display: inline-block; }
.rc-actions { position: absolute; right: 6px; bottom: 10px; display: flex; }
.rc-actions .icon-btn { width: 32px; height: 32px; }
.rc-fav.on svg { fill: var(--green); color: var(--green); }
.rc-menu { position: absolute; right: 8px; bottom: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 10; min-width: 170px; }
.rc-menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; }
.rc-menu button:hover { background: var(--line-2); }
.rc-menu .danger { color: var(--danger); }
.totals { margin-top: 18px; font-size: 13px; }

/* place cards */
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; align-content: start; }
.place-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.place-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.place-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.pc-media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--green-50), var(--surface-2)); }
.pc-media img, .nearby-item img, .poi-row img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.pc-media img[src^="assets"], img.loaded { opacity: 1 !important; }
img.noimg { opacity: 0; }
.pc-cat { position: absolute; left: 10px; top: 10px; background: var(--veil-strong); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
.pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.pc-body b { font-size: 14.5px; }
.pc-body small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }
.pc-body small svg { width: 13px; height: 13px; }

/* toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar-right { display: flex; gap: 10px; }
.toolbar select { height: 38px; width: auto; padding: 0 10px; }
.search-sm { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); }
.search-sm:focus-within { border-color: var(--green); }
.search-sm input { border: 0; outline: 0; background: none; width: 180px; color: var(--ink); font-size: 14px; }

/* places page */
.places-layout { display: grid; grid-template-columns: 1fr 420px; gap: 20px; align-items: start; }
.places-map { position: sticky; top: 84px; height: calc(100vh - 110px); min-height: 420px; overflow: hidden; }
.places-map #pmap { width: 100%; height: 100%; }

/* place detail */
.place-page { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; }
.place-title { display: flex; justify-content: space-between; align-items: flex-start; margin: 18px 0 16px; }
.place-title h1 { font-size: 36px; }
.loc { display: flex; align-items: center; gap: 6px; color: var(--ink-2); margin: 6px 0 0; font-size: 15px; }
.place-hero { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 2.3 / 1; background: var(--green-50); }
.place-hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.place-hero img[src^="assets"] { opacity: 1; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin: 18px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1; min-width: max-content; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 12px 16px; font-size: 14px; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--green); }
.tabs button.on { color: var(--green); border-color: var(--green); font-weight: 600; }
.tabs button svg { width: 16px; height: 16px; }
.tab-panel p { color: var(--ink-2); line-height: 1.7; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.nearby { display: grid; gap: 10px; }
.nearby-item { display: flex; align-items: center; gap: 14px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.nearby-item:hover { border-color: var(--green-100); background: var(--green-50); }
.nearby-item img, .poi-row img { width: 72px; height: 52px; border-radius: 8px; flex: none; background: var(--green-50); }
.nearby-item div { flex: 1; display: flex; flex-direction: column; }
.nearby-item small { color: var(--muted); font-size: 12.5px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-grid .skeleton { aspect-ratio: 4 / 3; }
.photo { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo:hover img { transform: scale(1.04); }
.photo-src { grid-column: 1 / -1; }
.place-side { display: grid; gap: 16px; position: sticky; top: 84px; }
.side-card { padding: 18px; }
.side-card h3 { font-size: 14px; margin-bottom: 12px; }
.facts { list-style: none; padding: 0; margin: 14px 0; }
.facts li { display: flex; gap: 14px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line-2); }
.facts li:last-child { border: 0; }
.facts li > svg { width: 24px; height: 24px; color: var(--green); }
.facts div { display: flex; flex-direction: column; }
.facts small { color: var(--muted); font-size: 12.5px; }
.facts b { font-size: 15px; }
.mini-map { position: relative; height: 150px; border-radius: 12px; overflow: hidden; background: var(--green-50); }
.mini-map #mm { width: 100%; height: 100%; }
.mini-map .btn { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 500; height: 40px; }
.mini-days { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.mini-days div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mini-days small { color: var(--muted); font-size: 12px; }
.lightbox { position: relative; background: #000; border-radius: 12px; overflow: hidden; }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; }
.lightbox .icon-btn { position: absolute; background: rgba(255, 255, 255, .9); top: 50%; transform: translateY(-50%); }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
.lightbox .lb-close { top: 26px; right: 10px; }

/* ============ planner ============ */
.head-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.plan-form { padding: 16px; display: grid; gap: 12px; margin-bottom: 16px; }
.pf-row2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pf-row2 .btn-primary { height: 44px; min-width: 170px; }
.pf-vias { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wp-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 6px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; font-weight: 600; max-width: 240px; background: var(--surface); }
.wp-chip b { width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 11px; flex: none; }
.wp-chip button { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--muted); }
.wp-chip button:hover { background: var(--line-2); color: var(--danger); }
.wp-chip button svg { width: 14px; height: 14px; }
.via-input { width: 300px; max-width: 100%; }
.map-card { overflow: hidden; margin-bottom: 16px; }
.map-wrap { position: relative; height: 520px; }
.map-wrap #pmap { width: 100%; height: 100%; }
.map-overlay { position: absolute; inset: 0; z-index: 600; background: var(--veil); backdrop-filter: blur(2px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-weight: 600; text-align: center; padding: 20px; }
.map-overlay.err { color: var(--danger); }
.map-overlay.err svg { width: 30px; height: 30px; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--green-100); border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 500; background: rgba(20, 28, 23, .82); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; display: flex; align-items: center; gap: 8px; white-space: nowrap; pointer-events: none; }
.map-hint svg { width: 15px; height: 15px; }
.stats-bar { display: flex; }
.stats-bar:empty { display: none; }
.stats-bar > div { flex: 1; display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-right: 1px solid var(--line-2); }
.stats-bar > div:last-child { border: 0; }
.stats-bar > div > svg { width: 26px; height: 26px; color: var(--ink-2); stroke-width: 1.5; }
.stats-bar span { display: flex; flex-direction: column; }
.stats-bar b { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.stats-bar small { color: var(--muted); font-size: 13px; }
.stats-bar .warn-sm { flex: 0 0 auto; color: var(--warn); }
.stats-bar .warn-sm svg { color: var(--warn); width: 18px; }
.results { padding: 4px 20px 20px; }
.results .tabs { margin-top: 0; }
.tab-tools { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.inline-field { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.inline-field input[type=date] { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; }
.profile-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pstats { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.pstats span { display: flex; align-items: center; gap: 6px; }
.pstats b { color: var(--ink); }
.pstats svg { width: 16px; height: 16px; color: var(--green); }
.ptip { font-size: 13px; font-weight: 600; background: var(--green-50); color: var(--green-700); padding: 4px 10px; border-radius: 8px; }
.profile-box { height: 190px; }
.profile-svg { width: 100%; height: 100%; cursor: crosshair; overflow: visible; }
.profile-svg text { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.profile-svg .grid { stroke: var(--line-2); stroke-width: 1; }
.profile-svg .pmark { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.stage-list { display: grid; gap: 8px; }
.stage { display: grid; grid-template-columns: 110px 1fr auto 110px; gap: 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.stage-day { display: flex; flex-direction: column; }
.stage-day small { color: var(--muted); font-size: 12.5px; }
.stage-route { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.stage-route span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-route svg { width: 15px; color: var(--muted); }
.stage-meta { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.stage-wx { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.stage-wx small { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 12px; }
.stage-wx small svg { width: 12px; height: 12px; }
.wx-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.wx-summary > div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.wx-summary > div > svg { width: 22px; height: 22px; color: var(--ink-2); }
.wx-summary .good > svg { color: var(--green); }
.wx-summary .bad > svg { color: var(--warn); }
.wx-summary span { display: flex; flex-direction: column; }
.wx-summary small { color: var(--muted); font-size: 12.5px; }
.wx-list { display: grid; }
.wx-row { display: grid; grid-template-columns: 60px 110px 1.4fr 70px 110px 1.6fr; gap: 10px; align-items: center; padding: 9px 8px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.wx-row:hover:not(.wx-headrow) { background: var(--green-50); }
.wx-headrow { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.wx-cond { display: flex; align-items: center; gap: 8px; }
.wx-cond .wi svg { width: 20px; height: 20px; }
.rain { color: var(--rain); font-weight: 600; }
.wind-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.warrow { display: inline-grid; place-items: center; font-style: normal; }
.warrow svg { width: 15px; height: 15px; color: var(--ink-2); }
.wind-cell em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.wind-head { background: var(--warn-bg); color: var(--warn); }
.wind-tail { background: var(--green-50); color: var(--green); }
.wind-side { background: var(--line-2); color: var(--muted); }
.wx-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 999px; padding: 3px 9px 3px 5px; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); font-size: 12.5px; white-space: nowrap; }
.wx-badge .wi svg { width: 18px; height: 18px; }
.roads { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.roads h4 { font-size: 14px; margin-bottom: 12px; }
.stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line-2); margin-bottom: 14px; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto 70px; gap: 10px; align-items: center; font-size: 13.5px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.legend small { color: var(--muted); text-align: right; }
.poi-list { display: grid; gap: 8px; }
.poi-row { display: flex; align-items: center; gap: 14px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.poi-row > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.poi-row a:hover { color: var(--green); }
.poi-row small { color: var(--muted); font-size: 12.5px; }
.alt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 18px; }
.alt-card { text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.alt-card:hover { border-color: var(--line-hover); }
.alt-card.on { border-color: var(--green); background: var(--green-50); }
.mode-explain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode-explain > div { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg); }
.mode-explain > div.on { background: var(--green-50); }
.mode-explain svg { width: 20px; height: 20px; color: var(--green); }
.mode-explain span { display: flex; flex-direction: column; }
.mode-explain small { color: var(--muted); font-size: 12.5px; }
.empty-small .link { padding: 0; }

/* ============ map pieces ============ */
.leaflet-container { font-family: var(--font); background: var(--map-bg); }
.tiles-light { filter: grayscale(.55) sepia(.18) hue-rotate(55deg) saturate(1.1) brightness(1.04) contrast(.9); }
.leaflet-control-attribution { font-size: 10px; background: var(--veil) !important; }
.map-ctl { display: flex; flex-direction: column; gap: 6px; position: relative; }
.map-ctl > button { width: 36px; height: 36px; display: grid; place-items: center; background: var(--surface); border-radius: 9px; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); color: var(--ink-2); }
.map-ctl > button:hover { color: var(--green); }
.map-ctl-sep { height: 4px; }
.layer-menu { position: absolute; right: 44px; top: 84px; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; display: grid; min-width: 130px; }
.layer-menu button { text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.layer-menu button:hover { background: var(--line-2); }
.layer-menu button.on { color: var(--green); font-weight: 600; background: var(--green-50); }
.pin-wrap { background: none; border: 0; }
.pin { position: relative; width: 32px; height: 42px; }
.pin svg { width: 32px; height: 42px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.pin path { fill: var(--green); }
.pin-label { position: absolute; left: 36px; top: 14px; white-space: nowrap; font-weight: 700; font-size: 14px; color: var(--ink); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff, 0 0 6px #fff; pointer-events: none; }
.pin-label.start { left: 26px; top: 6px; }
.start-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 5px solid var(--green); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.via-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 3px solid var(--green); color: var(--green); font-weight: 800; font-size: 11px; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.poi-dot { width: 26px; height: 26px; border-radius: 8px; background: var(--surface); color: var(--green); display: grid; place-items: center; box-shadow: 0 1px 5px rgba(0, 0, 0, .25); transition: transform .15s; }
.poi-dot svg { width: 15px; height: 15px; }
.hl .poi-dot, .poi-dot:hover { transform: scale(1.25); background: var(--green); color: #fff; }
.stage-flag { display: inline-flex; align-items: center; gap: 3px; background: var(--inverse-bg); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px 3px 5px; border-radius: 6px 6px 6px 0; }
.stage-flag svg { width: 13px; height: 13px; }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--font); }
.map-pop { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.map-pop small { color: var(--muted); }
.map-pop a, .map-pop button { display: inline-flex; align-items: center; gap: 5px; color: var(--green) !important; font-weight: 600; font-size: 13px; margin-top: 2px; }
.map-pop svg { width: 14px; height: 14px; }
.cp { display: grid; gap: 2px; min-width: 170px; }
.cp small { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.cp button { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 13.5px; font-weight: 500; text-align: left; }
.cp button:hover { background: var(--green-50); color: var(--green); }
.cp svg { width: 15px; height: 15px; color: var(--green); }

/* ============ weather page ============ */
.wp-picker { width: 440px; max-width: 100%; display: flex; gap: 8px; align-items: center; }
.wp-picker > div { flex: 1; min-width: 0; }
.wp-picker > .btn { flex: 0 0 auto; white-space: nowrap; }
.wp-top { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; margin-bottom: 16px; }
.wp-now { padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.wp-now-main { display: flex; align-items: center; gap: 22px; }
.wp-now-main .muted { display: flex; align-items: center; gap: 5px; font-size: 13.5px; margin-top: 4px; }
.wp-now-main .muted svg { width: 14px; height: 14px; }
.wp-temp { font-size: 64px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.score { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 8px; width: fit-content; white-space: nowrap; }
.score svg { width: 15px; height: 15px; }
.score-good { background: var(--green-50); color: var(--green); }
.score-ok { background: var(--sun-bg); color: var(--sun-ink); }
.score-bad { background: var(--danger-bg); color: var(--danger); }
.wp-details { padding: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wp-details div { display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; align-items: center; }
.wp-details svg { grid-row: span 2; width: 22px; height: 22px; color: var(--green); }
.wp-details small { color: var(--muted); font-size: 12.5px; }
.weather-page .card:not(.wp-now):not(.wp-details) { padding: 20px; margin-bottom: 16px; }
.weather-page h3 { margin-bottom: 14px; }
.hours { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 6px; }
.hour { flex: 0 0 62px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; border-radius: 10px; }
.hour:hover { background: var(--bg); }
.hour small { font-size: 12px; display: flex; align-items: center; gap: 2px; }
.hour small svg { width: 11px; height: 11px; }
.hbar { position: relative; height: 70px; width: 100%; }
.hbar span { position: absolute; left: 0; right: 0; text-align: center; font-weight: 700; font-size: 14px; }
.hbar span::after { content: ''; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin: 4px auto 0; }
.days { display: grid; }
.day { display: grid; grid-template-columns: 130px 34px 1fr 90px 80px 100px 150px; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.day:last-child { border: 0; }
.day .muted { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.day .muted svg { width: 14px; height: 14px; }
.dtemp small { color: var(--muted); }

/* ============ settings, help ============ */
.form-card { padding: 22px; margin-bottom: 16px; }
.form-card h3 { margin-bottom: 16px; }
.avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.avatar-row > div:not(.avatar) { display: flex; flex-direction: column; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.danger-zone div { display: flex; flex-direction: column; }
.faq { display: grid; gap: 10px; margin-bottom: 18px; }
.faq details { padding: 0 20px; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { transition: transform .2s; color: var(--muted); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { color: var(--ink-2); padding-bottom: 6px; }
.tips { padding: 20px; margin-bottom: 18px; }
.tips ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.tips li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.tips li svg { color: var(--green); }

/* ============ modal, toast ============ */
.modal-back { position: fixed; inset: 0; background: rgba(20, 28, 23, .45); z-index: 2000; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 16px; padding: 24px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal.wide { max-width: 1000px; padding: 0; background: transparent; box-shadow: none; }
.modal h3 { font-size: 18px; margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3000; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--inverse-bg); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: up .25s; transition: opacity .4s, transform .4s; max-width: calc(100vw - 32px); }
.toast svg { color: #7fd69c; }
.toast-err svg { color: #ff8a8a; }
.toast-info svg { color: #9cc7ff; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes up { from { transform: translateY(12px); opacity: 0; } }

/* ============ responsive ============ */
@media (max-width: 1180px) {
  .places-layout { grid-template-columns: 1fr 340px; }
  .place-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day { grid-template-columns: 110px 30px 1fr 80px 70px 90px; }
  .day .score { display: none; }
}
@media (max-width: 1000px) {
  .dash-top { grid-template-columns: 1fr; }
  .weather-card { margin-top: 0; }
  .place-page { grid-template-columns: 1fr; }
  .place-side { position: static; }
  .places-layout { grid-template-columns: 1fr; }
  .places-map { position: relative; top: 0; height: 360px; order: -1; }
  .wp-top { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .stage { grid-template-columns: 90px 1fr 100px; }
  .stage-meta { grid-column: 2; }
  .stage-wx { grid-row: 1; grid-column: 3; }
  .wx-row { grid-template-columns: 44px 90px 1fr 50px 70px; }
  .wx-row > :nth-child(6) { grid-column: 2 / -1; }
  .wx-headrow > :nth-child(6) { display: none; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(20, 28, 23, .35); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .side-backdrop.on { opacity: 1; pointer-events: auto; }
  .burger { display: inline-grid; }
  .topbar { padding: 0 16px; gap: 8px; }
  main#main { padding: 4px 16px 40px; }
  .route-grid.three { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { position: absolute; inset: 0; height: auto; opacity: .45; pointer-events: none; }
  .hero-mtn, .hero-pin, .hr-pin { display: none; }
  .feature-strip { flex-wrap: wrap; gap: 20px 32px; }
  .site-nav, .site-actions { display: none; }
  .nav-burger { display: inline-grid; margin-left: auto; }
  .site-header.open .site-nav, .site-header.open .site-actions { display: flex; }
  .site-header.open .wrap { flex-wrap: wrap; height: auto; padding-top: 18px; padding-bottom: 18px; }
  .site-header.open .site-nav { order: 3; width: 100%; flex-direction: column; }
  .site-header.open .site-actions { order: 4; width: 100%; }
  .how .steps, .about { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .map-wrap { height: 400px; }
  .stats-bar { flex-wrap: wrap; }
  .stats-bar > div { flex: 1 1 33%; padding: 14px 16px; gap: 10px; }
  .stats-bar .hide-sm { display: none; }
  .stats-bar b { font-size: 16px; }
  .roads, .mode-explain, .wx-summary { grid-template-columns: 1fr; }
  .head-actions .btn span { display: none; }
  .head-actions .btn { padding: 0 12px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  h1, .dash-hello h1 { font-size: 26px; }
  .place-title h1 { font-size: 28px; }
  .feature-grid { grid-template-columns: 1fr; }
  .qp-inputs, .pf-row { flex-direction: column; align-items: stretch; }
  .swap { align-self: center; transform: rotate(90deg); }
  .place-grid.four { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .toolbar-right { width: 100%; }
  .search-sm { flex: 1; }
  .search-sm input { width: 100%; }
  .wp-details { grid-template-columns: 1fr 1fr; }
  .day { grid-template-columns: 1fr 30px 70px 60px; }
  .day .dlabel, .day .dwind { display: none; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .danger-zone { flex-direction: column; align-items: flex-start; }
  .notif { width: calc(100vw - 32px); right: -8px; }
  .global-search input::placeholder { font-size: 13px; }
  .pf-row2 .btn-primary { width: 100%; }
  .stage { grid-template-columns: 1fr auto; }
  .stage-route { grid-column: 1 / -1; }
  .stage-meta { grid-column: 1; }
}
.pc-media img, .place-hero img, .nearby-item img, .poi-row img { color: transparent; }

/* ============ v2: pitch features ============ */
/* language switch */
.lang-switch { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; flex: none; }
.lang-switch button { height: 28px; min-width: 34px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lang-switch button.on { background: var(--surface); color: var(--green); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.lang-switch.lg button { height: 34px; min-width: 48px; font-size: 13px; }
.site-actions { align-items: center; }
.side-lang { display: flex; align-items: center; gap: 10px; padding: 6px 14px; color: var(--muted); }
.side-lang > svg { width: 18px; height: 18px; }
.lang-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.site-footer .lang-switch { margin-left: auto; }

/* install + offline */
.install-btn { display: flex; align-items: center; gap: 13px; height: 44px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--green); background: var(--green-50); margin-bottom: 6px; }
.install-btn svg { width: 20px; height: 20px; }
.offline-bar { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 8px 16px; background: #2b352f; color: #fff; font-size: 13px; }
.offline-bar svg { width: 16px; height: 16px; }

/* trip fields (km/day, departure) */
.pf-trip, .qp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qp-row { justify-content: space-between; }
.qp-row .btn-primary { flex: 1; min-width: 200px; height: 54px; }
.qp-hint { display: flex; align-items: center; gap: 6px; margin: -4px 0 0; }
.qp-hint svg { width: 14px; height: 14px; color: var(--green); }
.trip-field { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.trip-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-100); }
.trip-field > svg { width: 19px; height: 19px; color: var(--ink-2); }
.trip-field > span { display: flex; flex-direction: column; }
.trip-field small { font-size: 11px; color: var(--muted); line-height: 1.1; }
.trip-field input { border: 0 !important; outline: 0; background: none; font-weight: 700; font-size: 15px; padding: 0 !important; height: 24px !important; box-shadow: none !important; }
.trip-field .suffix.sm input { width: 52px; }
.trip-field .suffix.sm em { position: static; margin-left: 2px; }
.trip-field input[type=date] { width: 140px; }

/* collapsed planner form (mobile) */
.pf-summary { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.pf-summary > svg { width: 22px; height: 22px; color: var(--green); }
.pf-summary span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pf-summary b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-summary small { color: var(--muted); font-size: 12.5px; }
.pf-summary em { font-style: normal; color: var(--green); font-weight: 600; font-size: 13.5px; }
.plan-form.collapsed .pf-body { display: none; }
.plan-form.collapsed { padding: 12px 16px; }

/* route option cards */
.opt-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.opt-card { text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s, transform .15s; min-height: 108px; box-shadow: var(--shadow); }
.opt-card:hover:not(:disabled) { border-color: var(--line-hover); transform: translateY(-1px); }
.opt-card.on { border-color: var(--green); background: linear-gradient(0deg, var(--green-50), var(--surface) 70%); box-shadow: 0 0 0 3px var(--green-100); }
.opt-card.na { opacity: .55; cursor: not-allowed; box-shadow: none; }
.oc-head { display: flex; align-items: center; gap: 8px; }
.oc-head > svg:first-child { width: 18px; height: 18px; color: var(--green); }
.oc-head b { font-size: 14.5px; }
.oc-check { margin-left: auto; color: var(--green); width: 18px !important; height: 18px !important; }
.oc-main { display: flex; align-items: baseline; gap: 10px; }
.oc-main b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.oc-main span { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.oc-sub { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.oc-sub span { display: inline-flex; align-items: center; gap: 4px; }
.oc-sub svg { width: 13px; height: 13px; }
.oc-sub .warn { color: var(--warn); font-weight: 600; }
.oc-load, .oc-na { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: auto; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
.spinner.xs { width: 11px; height: 11px; border-width: 2px; display: inline-block; vertical-align: middle; }

/* progress in map overlay */
.prog { width: min(320px, 70%); height: 6px; border-radius: 999px; background: var(--green-100); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .3s; }
.ov-msg { font-size: 14px; }

/* stats: risk */
.stat-risk { flex: 1; display: flex; align-items: center; gap: 14px; padding: 18px 24px; text-align: left; }
.stat-risk:hover { background: var(--bg); }
.stat-risk > svg { width: 26px; height: 26px; color: var(--green); stroke-width: 1.5; }
.stat-risk span { display: flex; flex-direction: column; }
.stat-risk.warn > svg, .stat-risk.warn b { color: var(--warn); }
.risk-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--green-50); color: var(--green-700); font-size: 14px; margin: 18px 0 8px; }
.risk-note.warn { background: var(--warn-bg); color: var(--warn-ink); }
.risk-note svg { width: 18px; height: 18px; margin-top: 1px; }

/* typical weather */
.typ { opacity: .85; }
.stage-wx .typ b { font-style: italic; }
.typ-badge { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--line-2); color: var(--muted); }
.wx-row.typ { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(0, 0, 0, .015) 8px 16px); }
.wx-badge.typ { background: var(--surface-2); }
.typ-note { margin-top: 10px; }
.stage-wx > span { display: flex; align-items: center; gap: 6px; }

/* dashboard ride stats + completed */
.ride-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.ride-stats > div { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.ride-stats svg { width: 22px; height: 22px; color: var(--green); }
.ride-stats span { display: flex; flex-direction: column; }
.ride-stats b { font-size: 19px; font-weight: 800; }
.ride-stats small { color: var(--muted); font-size: 12.5px; }
.rc-media { position: relative; }
.rc-badge { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; background: var(--green); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 7px; }
.rc-badge svg { width: 13px; height: 13px; }
.chip small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.chip.on small { color: var(--green); }
.head-actions .is-done { color: var(--green); }

/* landing v2 */
.hero-day { position: absolute; display: inline-flex; align-items: center; gap: 5px; background: var(--inverse-bg); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 7px 7px 7px 0; opacity: 0; animation: fadein .4s forwards; white-space: nowrap; }
.hero-day svg { width: 13px; height: 13px; }
/* the day labels sit inside the route drawing (foreignObject), so they stay on the line at any size */
.hero-route .hero-day { position: static; }
.hero-day.d1 { animation-delay: 1.2s; }
.hero-day.d2 { animation-delay: 1.7s; }
.hero-day.d3 { animation-delay: 2.1s; }
.hr-pin { animation: drop .6s 2.4s both cubic-bezier(.3, 1.6, .5, 1); }
.hr-pin path { fill: var(--green); }
@keyframes fadein { to { opacity: 1; } }
.ps-list { display: grid; gap: 12px; max-width: 980px; margin: 0 auto; }
.ps-row { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: stretch; gap: 12px; }
.ps-problem, .ps-solution { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-radius: 14px; }
.ps-problem { background: var(--surface); border: 1px solid var(--line); }
.ps-problem > svg { width: 22px; height: 22px; color: #b65c3a; flex: none; }
.ps-problem div { display: flex; flex-direction: column; }
.ps-problem small { color: var(--muted); font-size: 13.5px; }
.ps-solution { background: var(--green); color: #fff; }
.ps-solution > svg { width: 22px; height: 22px; flex: none; }
.ps-arrow { display: grid; place-items: center; color: var(--green); }
.feature-grid.four { grid-template-columns: repeat(4, 1fr); }
.feature-grid.four .feature-card { padding: 24px; }
.user-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.user-chips span { display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.user-chips svg { color: var(--green); width: 20px; height: 20px; }
.users-sec { padding: 72px 0; }
.tagline { font-size: 20px !important; font-weight: 800; color: var(--green) !important; margin-top: 18px; }

@media (max-width: 1180px) { .feature-grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1000px) {
  .opt-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
  .opt-card { flex: 0 0 78%; scroll-snap-align: start; }
  .ride-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .ps-row { grid-template-columns: 1fr; gap: 6px; }
  .ps-arrow { transform: rotate(90deg); height: 20px; }
  .site-header.open .site-actions { flex-wrap: wrap; }
  .stat-risk { flex: 1 1 33%; padding: 14px 16px; gap: 10px; }
  .stat-risk b { font-size: 16px; }
  .hero-day { display: none; }
}
@media (max-width: 600px) {
  .feature-grid.four { grid-template-columns: 1fr; }
  .pf-trip { width: 100%; }
  .trip-field { flex: 1; min-width: 0; }
  .trip-field input[type=date] { width: 100%; }
  .qp-row .btn-primary { width: 100%; }
}
.stage-wx b { white-space: nowrap; }

/* why TrailEU */
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto; }
.why-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; }
.why-card .fc-ic { margin-bottom: 8px; }
.why-card h3 { font-size: 17px; }
.why-card p { color: var(--muted); font-size: 14.5px; margin: 0; line-height: 1.6; }
.why-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 28px; }
@media (max-width: 1000px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .why-grid { grid-template-columns: 1fr; } }

/* bike / on foot switch */
.act-toggle { display: inline-flex; height: 54px; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.act-toggle button { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--muted); }
.act-toggle button svg { width: 18px; height: 18px; }
.act-toggle button:hover { color: var(--ink); }
.act-toggle button.on { background: var(--green); color: #fff; }
.sub-h { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 12px; color: var(--ink-2); }
.sub-h svg { width: 17px; height: 17px; color: var(--green); }
@media (max-width: 600px) { .act-toggle { width: 100%; } .act-toggle button { flex: 1; justify-content: center; } }
@media (max-width: 600px) {
  .pf-trip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .pf-trip .act-toggle { grid-column: 1 / -1; }
  .pf-trip .trip-field { min-width: 0; }
  .trip-field > span { min-width: 0; flex: 1; }
  .trip-field input[type=date] { min-width: 0; max-width: 100%; font-size: 14px; }
}

/* junction judging */
.jx { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .3); border: 2px solid #fff; }
.jx svg { width: 14px; height: 14px; }
.jx-danger { background: #D64545; }
.jx-caution { background: #E3A008; }
.jx-pop { min-width: 230px; gap: 6px; }
.jx-pop b { font-size: 13.5px; }
.jx-level { display: inline-flex; align-items: center; gap: 4px; width: fit-content; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; color: #fff; }
.jx-level svg { width: 12px; height: 12px; }
span.jx-level.jx-danger { background: #D64545; }
span.jx-level.jx-caution { background: #E3A008; }
.jx-links { display: flex; gap: 12px; }
.jx-h { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 22px 0 10px; }
.jx-h svg { width: 16px; height: 16px; color: var(--warn); }
.jx-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.jx-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.jx-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.jx-t small { color: var(--muted); font-size: 12px; }
.stats-bar .warn-sm.engine { color: var(--green); }
.stats-bar .warn-sm.engine svg { color: var(--green); }

/* engine comparison ("Porovnanie") */
.cmp-intro { display: flex; gap: 8px; align-items: flex-start; }
.cmp-intro svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; }
.cmp-list { display: grid; gap: 8px; margin: 6px 0 14px; }
.cmp-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) 92px minmax(0, 2.6fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.cmp-row.on { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; background: var(--green-50); }
.cmp-row.muted .cmp-msg { grid-column: 2 / -1; color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.cmp-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cmp-name i { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.cmp-name span { display: flex; flex-direction: column; min-width: 0; }
.cmp-name small { color: var(--muted); font-size: 12px; }
.cmp-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 2px; }
.cmp-score b { font-size: 22px; font-weight: 800; }
.cmp-score small { color: var(--muted); font-size: 12px; }
.cmp-score em { flex-basis: 100%; font-style: normal; font-size: 11px; font-weight: 700; color: var(--green); }
.sc-good b, .stat-risk.sc-good > svg, .stat-risk.sc-good b { color: var(--green); }
.sc-mid b, .stat-risk.sc-mid > svg, .stat-risk.sc-mid b { color: #B7791F; }
.sc-bad b, .stat-risk.sc-bad > svg, .stat-risk.sc-bad b { color: var(--danger); }
.cmp-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.cmp-stats span { display: inline-flex; align-items: center; gap: 5px; }
.cmp-stats svg { width: 14px; height: 14px; color: var(--muted); }
.cmp-stats .warn, .cmp-stats .warn svg { color: var(--warn); }
.cmp-act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.cmp-cur { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 13px; font-weight: 600; }
.cmp-cur svg { width: 15px; height: 15px; }
@media (max-width: 860px) {
  .cmp-row { grid-template-columns: 1fr auto; }
  .cmp-stats, .cmp-act { grid-column: 1 / -1; }
  .cmp-act { justify-content: flex-start; }
  .cmp-row.muted .cmp-msg { grid-column: 1 / -1; }
}
/* the stats bar now holds up to 9 items (safety score, engine): wrap instead of overflowing */
.stats-bar { flex-wrap: wrap; }
.stats-bar > div, .stats-bar > .stat-risk { flex: 1 1 150px; padding: 16px 18px; gap: 12px; }
.stats-bar > .warn-sm { flex: 0 1 auto; }
@media (max-width: 860px) { .stats-bar > div, .stats-bar > .stat-risk { flex: 1 1 33%; padding: 14px 16px; gap: 10px; } }

/* demo routes (planner + help) */
.demo-row { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.demo-h { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.demo-h svg { width: 16px; height: 16px; color: var(--green); }
.demo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.demo-chip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); transition: border-color .15s, background .15s; }
.demo-chip:hover { border-color: var(--green); background: var(--green-50); }
.demo-chip > svg { width: 20px; height: 20px; color: var(--green); flex: 0 0 auto; }
.demo-chip span { display: flex; flex-direction: column; min-width: 0; }
.demo-chip b { font-size: 14px; }
.demo-chip small { color: var(--muted); font-size: 12.5px; }
.demo-list.in-help { margin-top: 12px; }
.tips h3 { display: flex; align-items: center; gap: 8px; }
.tips h3 svg { width: 18px; height: 18px; color: var(--green); }
.stats-bar .warn-sm.checking { color: var(--muted); }
.stats-bar .warn-sm.checking .spinner { flex: 0 0 auto; }
.safety-help li { align-items: flex-start; } .safety-help li svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; } .safety-help p { margin: 14px 0 0; }

/* ---------- dark mode (html[data-theme="dark"], set from Settings or the moon button) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --green: #2f9553;
  --green-600: #37a65e;
  --green-700: #1d5c35;
  --green-50: #14251a;
  --green-100: #1d3a27;
  --brand-eu: #4cb07c;
  --ink: #e6ece8;
  --ink-2: #c3ccc6;
  --muted: #8f9c94;
  --line: #2a352e;
  --line-2: #222b25;
  --line-hover: #3e4c43;
  --bg: #0e1310;
  --card: #161d18;
  --page: #0e1310;
  --surface: #161d18;
  --surface-2: #1c241f;
  --warn: #e39a4a;
  --danger: #ec6b62;
  --warn-bg: #2e2115;
  --warn-ink: #f0b46d;
  --danger-bg: #351b1a;
  --sun-bg: #2d2610;
  --sun-ink: #f0c440;
  --skel-a: #1a221d;
  --skel-b: #222c26;
  --glass: rgba(14, 19, 16, .86);
  --glass-app: rgba(14, 19, 16, .88);
  --veil: rgba(14, 19, 16, .72);
  --veil-strong: rgba(22, 29, 24, .92);
  --map-bg: #1a211c;
  --topo: #1e2922;
  --inverse-bg: #2b362f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 10px rgba(0, 0, 0, .25);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .55);
}
/* the default "Svetlá" map turns dark too; cycling and hiking maps stay as they are (too detailed to invert nicely) */
:root[data-theme="dark"] .tiles-light { filter: invert(1) hue-rotate(180deg) grayscale(.35) brightness(.82) contrast(.92); }
:root[data-theme="dark"] .leaflet-control-attribution a { color: var(--green-600); }
:root[data-theme="dark"] .pin-label { text-shadow: 0 0 3px var(--bg), 0 0 3px var(--bg), 0 0 6px var(--bg); }
:root[data-theme="dark"] .alt-route, :root[data-theme="dark"] .leaflet-popup-content-wrapper, :root[data-theme="dark"] .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); }
:root[data-theme="dark"] .wx-row.typ { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(255, 255, 255, .025) 8px 16px); }
/* theme switch button (next to the language switch) */
.theme-toggle { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--line-2); color: var(--muted); flex: none; }
.theme-toggle:hover { color: var(--green); }
.theme-toggle svg { width: 17px; height: 17px; }
.auth-tools { display: flex; align-items: center; gap: 8px; }
#theme-pick button { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; }
#theme-pick button svg { width: 15px; height: 15px; }
@media (max-width: 600px) {
  .lang-row:has(#theme-pick) { flex-wrap: wrap; gap: 10px; }
  #theme-pick { width: 100%; }
  #theme-pick button { flex: 1; justify-content: center; padding: 0 6px; }
}
.leaflet-interactive.cmp-hit { cursor: pointer; }

/* "you are looking at another planner's route" bar above the map */
.route-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--warn-bg); color: var(--warn-ink); border-bottom: 1px solid var(--line); border-left: 5px solid var(--eng, var(--warn)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.route-banner > svg { width: 22px; height: 22px; flex: none; color: var(--warn); }
.route-banner span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.route-banner b { font-size: 14.5px; color: var(--ink); }
.route-banner small { font-size: 12.5px; }
.route-banner.sc-bad { background: var(--danger-bg); }
.route-banner.sc-bad > svg { color: var(--danger); }
.route-banner .btn { flex: none; }
@media (max-width: 600px) { .route-banner { flex-wrap: wrap; } .route-banner .btn { width: 100%; justify-content: center; } }

/* what the lines on the map are */
.map-legend { position: absolute; left: 12px; top: 12px; z-index: 500; background: var(--veil-strong); backdrop-filter: blur(4px); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; box-shadow: var(--shadow); font-size: 12.5px; max-width: calc(100% - 80px); pointer-events: none; }
.map-legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.map-legend li { display: flex; align-items: center; gap: 8px; color: var(--ink); white-space: nowrap; }
.map-legend em { font-style: normal; color: var(--muted); }
.map-legend small { display: block; margin-top: 5px; color: var(--muted); font-size: 11.5px; }
.lg-line { width: 22px; height: 0; border-top: 4px solid var(--c); border-radius: 2px; flex: none; }
.lg-line.dashed { border-top-style: dashed; border-top-width: 3px; }
@media (max-width: 600px) { .map-legend { font-size: 11.5px; padding: 6px 9px; } .map-legend small { display: none; } }
.map-card, #results { scroll-margin-top: 84px; }

/* ---------- clarity pass: "?" explanations, words for numbers ---------- */
.help-q { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--line-2); color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1; cursor: pointer; vertical-align: 1px; margin-left: 3px; border: 1px solid var(--line); flex: none; }
.help-q:hover, .help-q:focus-visible { background: var(--green); color: #fff; border-color: var(--green); outline: none; }
.help-scale { display: grid; gap: 6px; margin: 4px 0 14px; }
.help-scale span { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; border-radius: 10px; font-size: 14px; background: var(--surface-2); }
.help-scale b { min-width: 58px; font-size: 14px; }
.help-scale .sc-good { background: var(--green-50); } .help-scale .sc-good b { color: var(--green); }
.help-scale .sc-mid { background: var(--sun-bg); } .help-scale .sc-mid b { color: var(--sun-ink); }
.help-scale .sc-bad { background: var(--danger-bg); } .help-scale .sc-bad b { color: var(--danger); }
.help-scale.inline { grid-template-columns: repeat(3, auto); justify-content: start; margin: 0; }
.help-scale.inline span { padding: 5px 10px; font-size: 12.5px; }
@media (max-width: 600px) { .help-scale.inline { grid-template-columns: 1fr; } }

.opts-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin-bottom: -4px; }
.oc-hint { color: var(--muted); font-size: 12px; line-height: 1.3; margin-top: -4px; }
.oc-facts { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.oc-facts li { display: flex; align-items: center; gap: 5px; min-width: 0; }
.oc-facts li b { color: var(--ink); font-weight: 700; white-space: nowrap; }
.oc-facts svg { width: 13px; height: 13px; flex: none; }
.oc-facts .warn, .oc-facts .warn b { color: var(--warn); }
.oc-facts .oc-safety { grid-column: 1 / -1; font-weight: 600; }
.oc-facts .oc-safety.sc-good, .oc-facts .oc-safety.sc-good b { color: var(--green); }
.oc-facts .oc-safety.sc-mid, .oc-facts .oc-safety.sc-mid b { color: var(--sun-ink); }
.oc-facts .oc-safety.sc-bad, .oc-facts .oc-safety.sc-bad b { color: var(--danger); }

.cmp-word { flex-basis: 100%; display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.cmp-score em { display: inline-flex; align-items: center; gap: 4px; }
.cmp-score em svg { width: 12px; height: 12px; }
.cmp-intro { font-size: 14px; color: var(--ink-2); }
.stat-risk small, .stats-bar small { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; }

/* ---------- AI assistant panel (planner) ---------- */
.ai-open { background: linear-gradient(135deg, var(--green), #2d8a7a); border: 0; }
.ai-open.on { box-shadow: 0 0 0 3px var(--green-100); }
.ai-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; z-index: 1500; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: ai-in .18s ease-out; }
@keyframes ai-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.ai-head { display: flex; align-items: center; gap: 6px; padding: 14px 12px 14px 18px; border-bottom: 1px solid var(--line); }
.ai-title { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.ai-title > svg { width: 22px; height: 22px; color: var(--green); flex: none; }
.ai-title span { display: flex; flex-direction: column; min-width: 0; }
.ai-title small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; }
.ai-msg p { margin: 0 0 .5em; } .ai-msg p:last-child { margin: 0; }
.ai-msg h4 { margin: .7em 0 .3em; font-size: 14.5px; } .ai-msg h4:first-child { margin-top: 0; }
.ai-msg ul { margin: .2em 0 .6em; padding-left: 1.2em; } .ai-msg li { margin: .15em 0; }
.ai-bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.ai-user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 6px; white-space: pre-wrap; }
.ai-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ai-actions .btn { justify-content: flex-start; text-align: left; height: auto; min-height: 34px; padding: 6px 10px; white-space: normal; }
.ai-actions svg { width: 15px; height: 15px; flex: none; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); }
.ai-chips button:hover { border-color: var(--green); color: var(--green); }
.ai-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.ai-login { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; text-align: center; color: var(--muted); }
.ai-login svg { width: 22px; height: 22px; }
.ai-input { display: flex; gap: 8px; padding: 12px 12px 6px; border-top: 1px solid var(--line); }
.ai-input textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; max-height: 140px; }
.ai-input textarea:focus { outline: none; border-color: var(--green); }
.ai-input .btn { width: 46px; padding: 0; justify-content: center; align-self: flex-end; height: 44px; }
.ai-note { margin: 0; padding: 0 14px 10px; color: var(--muted); font-size: 11.5px; }
/* wide screens: the planner moves aside, so the map stays visible next to the chat */
@media (min-width: 1100px) { body.ai-open-body main#main { margin-right: 420px; } }
@media (max-width: 600px) { .ai-panel { width: 100vw; border-left: 0; } .ai-open span { display: none; } }
/* chat open beside the planner: less room, so the route cards list their facts in one column */
@media (min-width: 1100px) { body.ai-open-body .oc-facts { grid-template-columns: 1fr; } body.ai-open-body .oc-facts .oc-safety { grid-column: auto; } }
@media (min-width: 1100px) and (max-width: 1500px) { body.ai-open-body .opt-cards { gap: 8px; } body.ai-open-body .opt-card { padding: 12px; } }

/* ---------- "Opýtaj sa AI na oblasť" (rectangle on the planner map) ---------- */
.area-btns { position: absolute; left: 12px; bottom: 14px; z-index: 520; display: flex; gap: 8px; align-items: center; }
.area-hist { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.area-hist:hover { color: var(--green); }
.area-hist svg { width: 18px; height: 18px; }
.area-hist[hidden] { display: none; }
.area-hist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.area-hist-list li { position: relative; }
.area-hist-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 44px 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: border-color .15s; }
.area-hist-item:hover { border-color: var(--line-hover); }
.area-hist-item > svg { width: 18px; height: 18px; color: var(--green); flex: none; }
.area-hist-item span { display: flex; flex-direction: column; min-width: 0; }
.area-hist-item b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-hist-item small { color: var(--muted); font-size: 12px; }
.area-hist-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); opacity: .55; }
.area-hist-del:hover { opacity: 1; color: var(--danger); }
.area-hist-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 12px; text-align: center; color: var(--muted); }
.area-hist-empty svg { width: 26px; height: 26px; }
.area-pill { position: relative; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 12px; border-radius: 999px; background: linear-gradient(135deg, var(--green), #2d8a7a); color: #fff; font-weight: 600; font-size: 13.5px; box-shadow: 0 2px 10px rgba(0, 0, 0, .22); transition: transform .15s; }
.area-pill:hover { transform: translateY(-1px); }
.area-pill svg { width: 17px; height: 17px; }
.area-pill.on { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.area-tip { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 520; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 120px); padding: 9px 14px; border-radius: 12px; background: rgba(20, 28, 23, .86); color: #fff; font-size: 13px; line-height: 1.35; box-shadow: var(--shadow-lg); pointer-events: none; animation: area-fade .15s ease-out; }
@keyframes area-fade { from { opacity: 0; } to { opacity: 1; } }
.map-wrap:has(.area-tip:not([hidden])) .map-hint { display: none; }
.area-tip svg { width: 18px; height: 18px; flex: none; color: #8fe0ad; }
.leaflet-container.area-mode, .leaflet-container.area-mode .leaflet-interactive { cursor: crosshair !important; touch-action: none; }
.leaflet-tooltip.area-size { background: rgba(20, 28, 23, .85); color: #fff; border: 0; border-radius: 8px; font-weight: 600; font-size: 12.5px; padding: 4px 9px; box-shadow: none; }
.leaflet-tooltip.area-size::before { display: none; }
.cp button.cp-ai { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; padding-top: 9px; }
.area-poi { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.area-poi svg { width: 14px; height: 14px; }
.area-poi.sleep { background: #2d7ff9; }
.area-poi.water { background: #1aa3c7; }
.area-poi.stay { background: #7b61c9; }
.area-poi.other { background: #d9822b; }
.area-facts { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 13px; background: var(--surface); }
.area-facts.warn { display: flex; gap: 8px; align-items: flex-start; color: var(--warn-ink); background: var(--warn-bg); border-color: transparent; }
.area-facts.warn svg { width: 17px; height: 17px; flex: none; color: var(--warn); }
.area-facts summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); list-style: none; }
.area-facts summary::-webkit-details-marker { display: none; }
.area-facts summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.area-facts[open] summary::after { content: '▴'; }
.area-facts summary svg { width: 16px; height: 16px; color: var(--green); }
.area-facts ul { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 5px; }
.area-facts li { position: relative; display: flex; align-items: center; gap: 8px; padding: 3px 8px; border-radius: 6px; overflow: hidden; }
.area-facts li > * { position: relative; }
.area-facts li svg { width: 14px; height: 14px; color: var(--green); flex: none; }
.area-facts li b { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-facts li em { margin-left: auto; font-style: normal; color: var(--muted); white-space: nowrap; font-size: 12px; }
.area-facts .af-bar { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--green-50); border-radius: 6px; }
.area-facts .af-h { margin: 8px 0 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.area-facts small { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.area-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }
.area-legend span { display: flex; align-items: center; gap: 6px; }
.area-legend i { width: 14px; height: 14px; border-radius: 4px; opacity: .8; }
.area-legend label { margin-left: auto; display: flex; align-items: center; gap: 6px; cursor: pointer; }
/* spots for the night (numbered pins from the AI's search, ⛺ saved ones) */
.spot-pin { position: relative; width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: #e8590c; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); display: grid; place-items: center; }
.spot-pin > span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 14px; line-height: 1; }
.spot-pin.saved { background: #7b3fc4; }
.spot-pin.saved > span { font-size: 13px; }
.spot-pin.sm { width: 26px; height: 26px; flex: none; }
.spot-pop { display: grid; gap: 4px; min-width: 210px; }
.spot-pop small { color: var(--muted); font-size: 12px; display: flex; gap: 4px; align-items: center; }
.spot-pop small svg { width: 12px; height: 12px; }
.spot-pop .mono, .camp-card .mono { font-variant-numeric: tabular-nums; }
.spot-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.spot-btns .btn svg { width: 14px; height: 14px; }
.spot-cards { display: grid; gap: 6px; margin-top: 10px; }
.spot-card { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.spot-num { width: 28px; height: 28px; flex: none; border-radius: 50%; background: #e8590c; color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.spot-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.spot-info b { font-size: 13.5px; }
.spot-info small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.spot-acts { display: flex; gap: 2px; }
.spot-acts .icon-btn { width: 32px; height: 32px; }
.spot-acts .icon-btn.on { color: #7b3fc4; }
.camp-saved { margin: 0 0 18px; }
.camp-h { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0 0 10px; }
.camp-h svg { width: 19px; height: 19px; color: #7b3fc4; }
.camp-h em { font-style: normal; font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; }
.camp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.camp-card { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.camp-card:hover { border-color: var(--line-hover); }
.camp-card > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.camp-card b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camp-card small { color: var(--muted); font-size: 12px; }
.camp-card .spot-pin { transform: rotate(-45deg) scale(.85); }
@media (max-width: 600px) { .area-pill span { display: none; } .area-pill { width: 42px; height: 42px; padding: 0; justify-content: center; } .area-hist { width: 42px; height: 42px; } .area-tip { max-width: calc(100% - 80px); top: 8px; left: 12px; transform: none; } .map-hint { left: 116px; right: 12px; transform: none; white-space: normal; } }
/* the panel covers the map on narrow screens: it can shrink to a bar so the coloured map is visible */
.area-min { display: none; }
@media (max-width: 1099px) { .area-min { display: grid; } }
.area-panel.min { top: auto; height: auto; box-shadow: 0 -4px 20px rgba(0, 0, 0, .18); border-top: 1px solid var(--line); }
.area-panel.min .ai-body, .area-panel.min .ai-input, .area-panel.min .ai-note { display: none; }
.area-panel.min .ai-head { border-bottom: 0; }
@media (max-width: 1099px) { body:has(.area-panel.min:not([hidden])) .area-btns { display: none; } }

/* ---------- "AI asistent" page ---------- */
.aip-h1 { display: flex; align-items: center; gap: 12px; }
.aip-badge { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--green), #2d8a7a); color: #fff; box-shadow: var(--shadow); }
.aip-badge svg { width: 22px; height: 22px; }
.aip-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.aip-side { position: sticky; top: 88px; }
.aip-new { margin-bottom: 16px; }
.aip-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px 4px; }
.aip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 60vh; overflow-y: auto; }
.aip-list li { position: relative; }
.aip-conv { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 40px 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: border-color .15s, transform .15s; }
.aip-conv:hover { border-color: var(--line-hover); transform: translateY(-1px); }
.aip-conv > svg { width: 17px; height: 17px; color: var(--green); flex: none; }
.aip-conv span { display: flex; flex-direction: column; min-width: 0; }
.aip-conv b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aip-conv small { color: var(--muted); font-size: 12px; }
.aip-list li.on .aip-conv { background: var(--green); border-color: var(--green); color: #fff; }
.aip-list li.on .aip-conv > svg, .aip-list li.on .aip-conv small { color: rgba(255, 255, 255, .8); }
.aip-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; opacity: .55; }
.aip-del:hover { opacity: 1; color: var(--danger); }
.aip-list li.on .aip-del { color: #fff; }
.aip-card { padding: 24px; }
.aip-card h2 { margin: 0 0 16px; font-size: 20px; }
.aip-src { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.aip-src button { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-weight: 600; text-align: left; }
.aip-src button svg { width: 20px; height: 20px; color: var(--green); }
.aip-src button.on { border-color: var(--green); background: var(--green-50); }
.aip-pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 330px; overflow-y: auto; }
.aip-route { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); text-align: left; }
.aip-route:hover:not(:disabled) { border-color: var(--line-hover); }
.aip-route:disabled { opacity: .55; cursor: not-allowed; }
.aip-route > svg { width: 18px; height: 18px; color: var(--green); flex: none; }
.aip-route span { display: flex; flex-direction: column; min-width: 0; }
.aip-route small { color: var(--muted); font-size: 12.5px; }
.aip-route.on { border-color: var(--green); background: var(--green-50); }
.aip-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-hover); flex: none; }
.aip-route.on .aip-radio { border-color: var(--green); background: radial-gradient(circle, var(--green) 45%, transparent 50%); }
.aip-none { padding: 18px; border-radius: 12px; background: var(--surface-2); color: var(--muted); text-align: center; font-size: 14px; }
.aip-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 120px; padding: 20px; border: 2px dashed var(--line-hover); border-radius: 14px; color: var(--muted); cursor: pointer; text-align: center; }
.aip-drop svg { width: 24px; height: 24px; }
.aip-drop.ok { border-color: var(--green); color: var(--ink); background: var(--green-50); }
.aip-drop.ok svg { color: var(--green); }
.aip-q { font-size: 15px; margin: 20px 0 10px; }
.aip-start { margin-top: 20px; min-width: 200px; }
.act-toggle.sm { height: 42px; }
.aip-chat { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 460px; padding: 0; overflow: hidden; }
.aip-chat-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.aip-chat-title { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.aip-chat-title > svg { width: 20px; height: 20px; color: var(--green); flex: none; }
.aip-chat-title span { display: flex; flex-direction: column; min-width: 0; }
.aip-chat-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aip-chat-title a { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--green); }
.aip-chat-title a svg { width: 13px; height: 13px; }
.aip-msgs { flex: 1; }
.aip-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 20px; text-align: center; color: var(--muted); }
.aip-empty svg { width: 26px; height: 26px; }
@media (max-width: 900px) {
  .aip-grid { grid-template-columns: 1fr; }
  .aip-side { position: static; }
  .aip-list { max-height: 210px; }
  .aip-chat { height: 72vh; }
  .aip-card { padding: 18px; }
}
.aip-list { overflow-x: hidden; padding: 2px; }
.aip-conv span { flex: 1; overflow: hidden; }
.aip-conv b { display: block; max-width: 100%; }
.aip-list { grid-template-columns: minmax(0, 1fr); } .aip-list li { min-width: 0; }

/* ---------- services along the route ("Služby v okolí") ---------- */
.svc-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 16px; text-align: center; }
.svc-empty p { max-width: 560px; margin: 0; }
.svc-cats-preview { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.svc-cats-preview span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); font-weight: 600; font-size: 13px; }
.svc-cats-preview svg { width: 15px; height: 15px; }
.svc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.svc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.svc-chip svg { width: 16px; height: 16px; color: var(--c); }
.svc-chip em { font-style: normal; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--line-2); color: var(--muted); }
.svc-chip.on { background: var(--c); border-color: var(--c); color: #fff; }
.svc-chip.on svg { color: #fff; }
.svc-chip.on em { background: rgba(255, 255, 255, .25); color: #fff; }
.svc-meta { display: flex; align-items: center; gap: 8px; }
.svc-list { max-height: 640px; overflow-y: auto; padding-right: 4px; margin: 10px 0; }
.svc-day { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 8px; font-size: 14px; position: sticky; top: 0; background: var(--card); padding: 4px 0; z-index: 1; }
.svc-day:first-child { margin-top: 0; }
.svc-day small { color: var(--muted); font-weight: 500; }
.svc-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; background: var(--surface); }
.svc-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.svc-ic svg { width: 18px; height: 18px; }
.svc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.svc-txt b { font-size: 14.5px; }
.svc-txt small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 4px; }
.svc-txt small svg { width: 13px; height: 13px; flex: none; }
.svc-where { color: var(--ink-2) !important; }
.svc-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; }
.svc-links a { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--green); }
.svc-links svg { width: 13px; height: 13px; }
.svc-act { display: flex; flex-direction: column; gap: 4px; flex: none; }
.svc-pin { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); }
.svc-pin svg { width: 14px; height: 14px; }
.svc-pop small { display: flex; align-items: center; gap: 4px; }
.svc-pop .svc-links { margin: 4px 0 6px; }
@media (max-width: 600px) { .svc-item { flex-wrap: wrap; } .svc-act { flex-direction: row; width: 100%; } .svc-act .btn { flex: 1; justify-content: center; } }

/* ---------- planner: nights, rest days (plan extras) ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.seg button { padding: 6px 11px; font-size: 12.5px; background: var(--surface); color: var(--ink-2); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--green); color: #fff; }
.nights-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--surface-2); }
.nights-pick { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; font-size: 14px; }
.nights-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-night { display: flex; gap: 10px; align-items: center; margin: -6px 0 0 14px; padding: 8px 10px; border-radius: 0 0 12px 12px; border: 1px solid var(--line); border-top: 0; background: var(--surface-2); font-size: 13.5px; }
.stage-night > svg { width: 16px; height: 16px; color: #5e35a8; flex: none; }
.stage-night.none { color: var(--muted); }
.stage-night-txt { flex: 1; min-width: 0; }
.stage-night-txt small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.stage-night-act { display: flex; gap: 2px; flex: none; }
.stage-night-act .icon-btn { width: 30px; height: 30px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; vertical-align: 1px; }
.tag svg { width: 12px; height: 12px; }
.t-camp { background: #e3efff; color: #1d5fc4; } .t-wild { background: #fde7da; color: #b4470b; } .t-house { background: #ece5fa; color: #5e35a8; } .t-hut { background: #e2f3e8; color: #1f7a3e; }
:root[data-theme="dark"] .t-camp { background: #16294a; color: #8fb8ff; } :root[data-theme="dark"] .t-wild { background: #3a2116; color: #f5a77a; } :root[data-theme="dark"] .t-house { background: #2a2140; color: #c3a8f3; } :root[data-theme="dark"] .t-hut { background: #173023; color: #7fd39b; }
.night-pin { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #5e35a8; color: #fff; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); }
.night-pin.wild { background: #e8590c; }
.night-pin svg { width: 15px; height: 15px; }
.stage-rest { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--line-hover); color: var(--ink-2); font-size: 13.5px; }
.stage-rest svg { width: 16px; height: 16px; color: var(--warn); }
.stage-rest .btn { margin-left: auto; }
.wx-alert { display: flex; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; background: #fff4e0; border: 1px solid #f5d39b; color: #5e3b00; font-size: 14px; }
:root[data-theme="dark"] .wx-alert { background: #2d2412; border-color: #5a4419; color: #f1d9a8; }
.wx-alert > svg { width: 26px; height: 26px; color: #e08a00; flex: none; }
.wx-alert > div { flex: 1; min-width: 0; }
.wx-alert p, .wx-advice-text p { margin: 4px 0 8px; font-size: 13.5px; }
.wx-alert .row { display: flex; flex-wrap: wrap; gap: 6px; }
.pack-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pack-prog { flex: 1; font-size: 14px; }
.bar { height: 7px; border-radius: 9px; background: var(--line); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--green); transition: width .25s; }
.pack { columns: 2 300px; column-gap: 24px; }
.pack-g { break-inside: avoid; margin-bottom: 14px; }
.pack h5 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pack label { display: flex; gap: 9px; align-items: flex-start; padding: 4px 0; font-size: 14px; cursor: pointer; }
.pack label input { margin-top: 3px; accent-color: var(--green); }
.pack label span { flex: 1; }
.pack label small { color: var(--muted); font-size: 12px; }
.pack label:has(input:checked) span { text-decoration: line-through; color: var(--muted); }
.pack .icon-btn.sm { width: 24px; height: 24px; }
.pack-add { display: flex; gap: 6px; margin-top: 6px; }
.pack-add input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
.pack-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 20px; align-items: start; }
.pack-split .pack { columns: 2 260px; }
.pack-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 260px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; padding: 20px; }
.pack-wait > svg { width: 28px; height: 28px; }
.pack-wait p { display: flex; align-items: center; gap: 8px; margin: 0; }
.pack label.new span { color: var(--green); }
.pack-chat { position: sticky; top: 76px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.pack-chat-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--line); }
.pack-chat-head > svg { width: 18px; height: 18px; color: var(--green); flex: none; }
.pack-chat-head span { flex: 1; display: flex; flex-direction: column; font-size: 14px; min-width: 0; }
.pack-chat-head small { color: var(--muted); font-size: 12.5px; }
.pack-chat-log { display: flex; flex-direction: column; gap: 10px; padding: 14px; min-height: 260px; max-height: 60vh; overflow-y: auto; }
.pack-chat-hint { margin: auto 0; text-align: center; }
.pack-edits { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.pack-edits span { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.pack-edits .add { color: var(--green); border-color: var(--green); }
.pack-edits .remove { color: var(--muted); text-decoration: line-through; }
.aip-tag { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
@media (max-width: 960px) {
  .pack-split { grid-template-columns: 1fr; }
  .pack-split.no-list .pack-chat { order: -1; }
  .pack-chat { position: static; }
  .pack-chat-log { max-height: 50vh; }
}
.pack-chat .ai-input { padding-bottom: 12px; }
.tr-text { font-size: 14.5px; line-height: 1.55; }
.tr-text h4 { margin: 14px 0 6px; font-size: 15px; } .tr-text h4:first-child { margin-top: 0; }
.tr-text ul { padding-left: 1.2em; margin: 4px 0 10px; } .tr-text li { margin: 4px 0; }
.tr-text a { color: var(--green); word-break: break-all; }
.fit-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; font-size: 14px; }
.fit-effort { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.fit-effort input { accent-color: var(--green); }
.stage-hard { grid-column: 1 / span 2; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--warn); }
.stage-hard svg { width: 14px; height: 14px; }
.exp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.exp button { padding: 14px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 13.5px; }
.exp button:hover { border-color: var(--green); }
.exp button svg { width: 24px; height: 24px; color: var(--green); margin-bottom: 4px; }
.exp button small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 520px) { .exp { grid-template-columns: 1fr; } }
.dl-list { list-style: none; margin: 10px 0; padding: 0; }
.dl-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.dl-list li:last-child { border-bottom: 0; }
.dl-list svg { width: 18px; height: 18px; color: var(--green); flex: none; }
.dl-list em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 12.5px; text-align: right; }
.dl-prog { margin: 8px 0; font-size: 13px; color: var(--muted); }
.ok-note { display: flex; gap: 8px; align-items: center; color: var(--green); font-weight: 600; font-size: 14px; }
.ok-note svg { width: 18px; height: 18px; }
#btn-offline.is-done { color: var(--green); }

/* ---------- "Na ceste" (full-screen while travelling) + SOS ---------- */
.go-btn { background: linear-gradient(135deg, var(--green), #2d8a7a); border: 0; }
body.onroute-open { overflow: hidden; }
.onroute { position: fixed; inset: 0; z-index: 3000; background: var(--bg); display: flex; flex-direction: column; }
.or-map { flex: 1; min-height: 0; }
.or-top { position: absolute; left: 12px; right: 64px; top: 12px; z-index: 1000; display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 16px; background: rgba(20, 28, 23, .9); color: #fff; box-shadow: var(--shadow-lg); }
.or-top svg { width: 30px; height: 30px; color: #ff8a65; flex: none; }
.or-top .big { font-size: 24px; font-weight: 800; display: block; line-height: 1.1; }
.or-top small { opacity: .8; font-size: 12.5px; }
.or-off { position: absolute; left: 50%; transform: translateX(-50%); top: 84px; z-index: 1000; display: flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: #d64545; color: #fff; font-size: 13px; font-weight: 600; }
.or-off svg { width: 15px; height: 15px; }
.or-close, .or-center, .or-camps, .or-mark { position: absolute; right: 12px; z-index: 1000; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.or-close { top: 12px; } .or-center { top: 64px; } .or-camps { top: 116px; }
.or-camps.on { background: var(--green); color: #fff; }
.or-panel { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px 14px; box-shadow: 0 -6px 24px rgba(0, 0, 0, .12); max-height: 52vh; overflow-y: auto; }
.or-prog { font-size: 13.5px; }
.or-prog small { color: var(--muted); font-size: 12px; }
.or-day { margin-bottom: 2px; }
.or-nexts { display: grid; gap: 6px; margin: 10px 0; }
.or-nx { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; }
.or-nx > svg { width: 20px; height: 20px; flex: none; }
.or-nx > div { flex: 1; min-width: 0; }
.or-nx b { display: block; } .or-nx small { color: var(--muted); font-size: 12px; }
.or-btns { display: grid; grid-template-columns: 1fr 1fr 1fr 74px; gap: 8px; }
.or-btn { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink); }
.or-btn svg { width: 17px; height: 17px; }
.or-btn.off { color: var(--muted); }
.or-sos { height: 48px; border-radius: 12px; background: #d64545; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; position: relative; overflow: hidden; touch-action: none; user-select: none; }
.or-sos b { font-size: 16px; letter-spacing: .05em; } .or-sos small { font-size: 10px; opacity: .85; }
.or-sos::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, .35); transform: scaleX(0); transform-origin: left; }
.or-sos.holding::after { transform: scaleX(1); transition: transform 1s linear; }
.or-pin { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.or-pin svg { width: 13px; height: 13px; }
.or-pin.danger { background: #d64545; } .or-pin.water { background: #1aa3c7; } .or-pin.night { background: #5e35a8; }
.sos-sheet { position: absolute; inset: 0; z-index: 2000; background: #2a0d0d; color: #fff; overflow-y: auto; padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.sos-head { display: flex; align-items: center; justify-content: space-between; }
.sos-head b { font-size: 26px; letter-spacing: .08em; color: #ff8080; }
.sos-x { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; }
.sos-call { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; background: #d64545; color: #fff; text-decoration: none; }
.sos-call svg { width: 34px; height: 34px; }
.sos-call b { font-size: 24px; display: block; } .sos-call small { opacity: .85; font-size: 12.5px; }
.sos-line { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; margin-bottom: 6px; }
.sos-line svg { width: 22px; height: 22px; color: #ffb3b3; }
.sos-line b { display: block; } .sos-line small { opacity: .8; font-size: 13px; }
.sos-where, .sos-hosp, .sos-med { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); font-size: 14px; }
.sos-where small, .sos-hosp small, .sos-med small { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; opacity: .7; }
.sos-coords { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sos-hosp a, .sos-where a { color: #ffd0d0; }
.sos-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sos-row .btn { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.sos-sheet .muted { color: rgba(255, 255, 255, .65); }
@media (max-width: 600px) { .go-btn span { display: none; } .or-btns { grid-template-columns: 1fr 1fr 1fr 64px; } .or-btn { font-size: 12px; } }
.or-pin.report { background: #c7741a; }
.rep-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--c); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); display: grid; place-items: center; }
.rep-pin span { transform: rotate(45deg); font-size: 14px; line-height: 1; }
.rep-pop { min-width: 200px; display: grid; gap: 4px; }
.rep-pop p { margin: 0; font-size: 13.5px; }
.rep-pop small { color: var(--muted); font-size: 12px; }
.rep-btns { display: flex; gap: 6px; margin-top: 4px; }
.rep-btns .btn.on { border-color: var(--green); color: var(--green); }
.rep-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.rep-kinds label { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.rep-kinds label:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.rep-kinds input { accent-color: var(--green); }
@media (max-width: 520px) { .rep-kinds { grid-template-columns: 1fr; } }
.ai-mic { width: 44px; height: 44px; padding: 0; justify-content: center; align-self: flex-end; flex: none; }
.ai-mic.listening { color: #fff; background: #d64545; border-color: #d64545; animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(214, 69, 69, .5); } 50% { box-shadow: 0 0 0 8px rgba(214, 69, 69, 0); } }
.ai-cam { width: 44px; height: 44px; padding: 0; justify-content: center; align-self: flex-end; flex: none; cursor: pointer; }
.ai-cam.disabled { opacity: .5; pointer-events: none; }
.ai-photo { display: block; max-width: 180px; border-radius: 10px; margin-bottom: 6px; }

/* ----- videos in AI answers (YouTube thumbnail, played in place) ----- */
.yt-thumb { position: relative; display: block; width: 100%; max-width: 320px; margin: 6px 0 4px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; aspect-ratio: 16 / 9; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; transition: opacity .15s; }
.yt-thumb:hover img { opacity: 1; }
.yt-thumb i { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; }
.yt-thumb i svg { width: 22px; height: 22px; margin-left: 3px; }
.yt-frame { width: 100%; max-width: 420px; aspect-ratio: 16 / 9; margin: 6px 0 4px; border-radius: 10px; overflow: hidden; background: #000; }
.yt-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.ai-bot a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
/* iPhone: "Add to Home Screen" steps */
.ios-steps { margin: 12px 0 8px; padding-left: 1.3em; display: grid; gap: 10px; font-size: 15px; line-height: 1.45; }
.ios-ic { display: inline-flex; vertical-align: middle; margin-left: 4px; padding: 3px; border-radius: 7px; background: var(--surface-2); color: #0a84ff; }
.ios-ic svg { width: 18px; height: 18px; }

/* ===== phones only (≤ 600 px): nothing here changes the desktop layout ===== */
@media (max-width: 600px) {
  /* iPhone zooms in on any text field under 16 px and the page then sticks out: 16 px on phones */
  input, select, textarea, .ai-input textarea, .pack-add input { font-size: 16px !important; }
  /* nothing may widen the page sideways */
  html, body { overflow-x: clip; }
  /* weather along the route: narrower columns that can shrink */
  .wx-row { grid-template-columns: 34px 62px minmax(0, 1fr) 42px 54px; gap: 6px; padding: 8px 4px; font-size: 12.5px; }
  .wx-row > * { min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  /* full-screen AI panels: the screen's width (100vw also counts a scrollbar), clear of the iPhone home bar */
  .ai-panel { left: 0; width: auto; max-width: none; }
  .ai-panel .ai-note, .area-panel .ai-note { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  /* more room inside the route results on phones */
  .card.results { padding: 4px 12px 14px; }
  .pack-chat-log { padding: 12px 10px; min-height: 200px; }
  .pack-chat-head { padding: 10px 8px 10px 12px; }
  .pack-chat .ai-input { padding: 10px 8px calc(10px + env(safe-area-inset-bottom)); }
  .ai-msg { max-width: 92%; }
}
@media (max-width: 600px) {
  /* AI asistent page: the chat first and as tall as the screen allows, the list of conversations under it */
  .aip-main { order: -1; }
  .aip-chat { height: calc(100dvh - 120px); min-height: 380px; }
  .aip-chat .ai-input { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .aip-chat-head { flex-wrap: wrap; gap: 8px; }
  .page-head p.muted { font-size: 14px; }
}
@media (max-width: 600px) {
  /* "Na ceste": clear of the iPhone notch and home bar */
  .or-close { top: calc(12px + env(safe-area-inset-top)); }
  .or-center { top: calc(64px + env(safe-area-inset-top)); }
  .or-camps { top: calc(116px + env(safe-area-inset-top)); }
  .onroute { padding-bottom: env(safe-area-inset-bottom); }
}
@media (max-width: 860px) {
  /* phone menu (drawer): above everything, scrolls on its own, and the page under it stays still */
  .sidebar { height: 100dvh; overflow-y: auto; overscroll-behavior: contain; z-index: 2000; padding-top: calc(26px + env(safe-area-inset-top)); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .side-backdrop { z-index: 1999; touch-action: none; }
  html.side-open, html.side-open body { overflow: hidden; }
  /* maps keep their layers and buttons to themselves (they were drawn over the menu and the top bar) */
  .map-wrap, .leaflet-container { isolation: isolate; z-index: 0; }
}
@media (max-width: 860px) {
  /* route tabs (Profil, Etapy, Počasie, …): swipe only sideways, never up/down or off the screen */
  .tabs { overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
}

/* ----- "Miesta na stan" layer (⛺ map button) ----- */
.map-ctl > button.on { background: var(--green); color: #fff; }
.camp-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.camp-dot svg { width: 14px; height: 14px; }
.camp-dot.free { background: #1f9d55; }
.camp-dot.camp { background: #2d7ff9; }
.camp-pop { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.camp-pop small { color: var(--muted); }
.camp-pop small.free { color: #1f9d55; font-weight: 600; }
.camp-links { display: flex; gap: 12px; margin-top: 4px; }
.camp-links a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.camp-links svg { width: 14px; height: 14px; }

/* ----- 3D view of the route (Terrain3D, from the elevation profile) ----- */
.profile-head .pstats { flex-wrap: wrap; }
.p3d-btn { margin-left: auto; }
body.t3d-open { overflow: hidden; }
.t3d { position: fixed; inset: 0; z-index: 3500; background: #0e1310; }
.t3d-map { position: absolute !important; inset: 0; width: 100%; height: 100%; }
.t3d-head { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.t3d-head b { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: rgba(20, 28, 23, .82); color: #fff; font-size: 14px; max-width: calc(100% - 120px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: auto; }
.t3d-head b svg { width: 16px; height: 16px; flex: none; }
.t3d-x { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); margin-right: 50px; }
.t3d-load { position: absolute; inset: 0; display: grid; place-content: center; grid-auto-flow: column; gap: 10px; align-items: center; color: #fff; font-size: 15px; }
.t3d-bar { position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.t3d-info { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
.t3d-prog { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.t3d-prog i { display: block; height: 100%; width: 0; background: var(--green); }
.t3d-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.t3d-bar small { font-size: 12px; }
.t3d-pin { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); position: relative; }
.t3d-pin svg { width: 16px; height: 16px; }
.t3d-pin.start { background: #1F7A3E; } .t3d-pin.end { background: #c0392b; } .t3d-pin.night { background: #2d7ff9; } .t3d-pin.me { background: #f39c12; width: 34px; height: 34px; }
.t3d-pin span { position: absolute; top: -8px; right: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #fff; color: #2d7ff9; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
@media (max-width: 600px) { .t3d-btns .btn { flex: 1; justify-content: center; } .t3d-bar small { display: none; } }
.t3d-tiles { position: absolute; top: calc(66px + env(safe-area-inset-top)); left: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: rgba(20, 28, 23, .78); color: #fff; font-size: 13px; }
.t3d-tiles[hidden] { display: none; }
.t3d-lock.on { background: var(--green); border-color: var(--green); color: #fff; }
.t3d-speed { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.t3d-speed button { padding: 0 10px; min-height: 32px; font-size: 13px; font-weight: 700; color: var(--ink-2); background: var(--surface); border-left: 1px solid var(--line); }
.t3d-speed button:first-child { border-left: 0; }
.t3d-speed button.on { background: var(--green); color: #fff; }
@media (max-width: 600px) { .t3d-speed { flex: 1 1 100%; } .t3d-speed button { flex: 1; } }

/* ----- profile photo ----- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-edit { position: relative; flex: none; }
.avatar-up { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; border: 2px solid var(--surface); cursor: pointer; }
.avatar-up svg { width: 13px; height: 13px; }
.avatar-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; }
.avatar-btns label { cursor: pointer; }

/* language picker: one small button that opens the list (sidebar, site header) */
.lang-drop { position: relative; flex: none; }
.lang-drop summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 9px; background: var(--line-2); font-size: 12.5px; font-weight: 700; color: var(--green); cursor: pointer; user-select: none; }
.lang-drop summary::-webkit-details-marker { display: none; }
.lang-drop summary i { font-style: normal; font-size: 10px; color: var(--muted); }
.lang-menu { position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 60; min-width: 170px; display: grid; padding: 5px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.lang-menu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--ink); text-align: left; }
.lang-menu button b { width: 24px; font-size: 12px; color: var(--muted); }
.lang-menu button:hover { background: var(--line-2); }
.lang-menu button.on { color: var(--green); font-weight: 600; } .lang-menu button.on b { color: var(--green); }
/* in the site header and on the login page the list opens downwards */
.site-actions .lang-menu, .auth-tools .lang-menu { bottom: auto; top: calc(100% + 6px); left: auto; right: 0; }
/* planner title with the rename pencil (saved routes) */
.ptitle-row { display: flex; align-items: center; gap: 6px; }
.ptitle-edit { width: 34px; height: 34px; flex: none; color: var(--muted); }
.ptitle-edit:hover { color: var(--green); }
.ptitle-edit svg { width: 17px; height: 17px; }
/* renaming in place (route title in the planner, route cards) */
input.inline-edit { font: inherit; color: inherit; width: 100%; min-width: 8ch; max-width: 100%; padding: 2px 8px; margin: -3px -9px; border: 1px solid var(--green); border-radius: 10px; background: var(--surface); outline: none; box-shadow: 0 0 0 3px rgba(31, 122, 62, .15); }
.ptitle-row > span:has(input.inline-edit) { flex: 1; min-width: 0; } .rc-title:has(input.inline-edit) { display: block; }
/* planner: the open route is saved (no changes since) */
.head-actions .btn.is-saved { border-color: var(--green); color: var(--green); background: rgba(31, 122, 62, .08); }
/* "Na ceste": your position – an arrow turned where you face, or a dot */
.or-mark { top: 168px; }
@media (max-width: 600px) { .or-mark { top: calc(168px + env(safe-area-inset-top)); } }
.or-me { position: relative; width: 44px; height: 44px; }
.or-me-arrow { position: absolute; inset: 0; width: 44px; height: 44px; transition: transform .25s linear; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
.or-me-arrow path { fill: #2D7FF9; stroke: #fff; stroke-width: 3; stroke-linejoin: round; }
.or-me-dot { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: #2D7FF9; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); display: none; }
.or-me.dot .or-me-arrow { display: none; }
.or-me.dot .or-me-dot { display: block; }
.seg-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.seg-opt { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.seg-opt svg { width: 16px; height: 16px; }
.seg-opt input { accent-color: var(--green); margin: 0; }
.seg-opt:has(input:checked) { border-color: var(--green); color: var(--green); background: rgba(31, 122, 62, .08); }
