/* ============================================================
   Haremoto — shared stylesheet (light, airy daytime theme)
   Served at /app.css by the app; linked by the landing page and
   every content page (guide / faq / privacy / terms, EN + RO).
   Brand accent (amber) and logo are unchanged; everything else
   is a daylight palette with a weather-reactive sky+road scene.
   ============================================================ */

:root {
  /* sky + surfaces */
  --sky-top: #4a93d4;
  --sky-mid: #9fd2f2;
  --sky-low: #e8f6ff;
  --paper: rgba(255,255,255,0.86);   /* frosted, not stark white */
  --paper-2: #eef4fa;
  --ink: #15212e;       /* primary text */
  --ink-dim: #4d6175;
  --ink-mute: #8499ac;
  --line: #e3ebf3;
  --line-strong: #cdd9e6;
  /* brand */
  --amber: #ff7a1a;
  --amber-2: #ff9540;
  --amber-soft: #fff1e3;
  /* semantic */
  --green: #2f9e54;
  --green-soft: #e7f6ec;
  --red: #e23d4b;
  --red-soft: #fdeaec;
  --amber-warn: #c98700;
  --cyan: #1f8fce;
  --shadow-sm: 0 1px 2px rgba(20, 40, 70, 0.05), 0 2px 6px rgba(20, 40, 70, 0.04);
  --shadow: 0 4px 16px rgba(20, 45, 80, 0.07);
  --shadow-lg: 0 16px 48px rgba(20, 45, 80, 0.16);
  --radius: 16px;
  --header-h: 66px;
  /* Drop a 16:9 photo at  Route Weather/scene-bg.jpg  and it becomes the
     background automatically (weather overlays sit on top). Until the file
     exists this 404s harmlessly and the gradient above shows instead. */
  --scene-photo: url("/scene-bg.webp");
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--sky-low); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: transparent;   /* let the fixed .scene (z-index:-1) show through */
  min-height: 100vh;
  line-height: 1.55;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}
a { color: #0f6fb8; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ===========================================================
   Weather-reactive scene (fixed, behind everything)
   Body gets a sky-* class; default is sunny/clear.
   =========================================================== */
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* Sunny: soft multi-bloom "mesh" gradient — premium, no drawn objects. */
  background:
    radial-gradient(60% 50% at 84% -8%, rgba(255,221,150,0.95), rgba(255,221,150,0) 55%),
    radial-gradient(70% 55% at 8% 4%, rgba(150,205,255,0.55), rgba(150,205,255,0) 60%),
    radial-gradient(120% 78% at 50% 122%, rgba(255,188,128,0.55), rgba(255,188,128,0) 55%),
    radial-gradient(85% 65% at 92% 96%, rgba(110,198,232,0.5), rgba(110,198,232,0) 60%),
    linear-gradient(180deg, #4f9fe0 0%, #93cdf0 42%, #dff1fb 100%);
  transition: background 0.9s ease;
}
.scene-photo, .scene-tint, .scene-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Optional photo background: set  :root{ --scene-photo: url(/scene-bg.jpg) }  to enable. */
.scene-photo { background-image: var(--scene-photo, none); background-size: cover; background-position: center; transition: filter 0.9s ease; }
/* Subtle scrim — barely there on the gradient, aids legibility over a photo. */
.scene-tint { background: linear-gradient(180deg, rgba(255,255,255,0) 55%, rgba(20,40,60,0.12) 100%); transition: background 0.9s ease; }
.sc-rain, .sc-snow, .sc-fog { display: none; }
.sc-flash { opacity: 0; }
.sc-rain line { stroke: #d3e6f4; stroke-linecap: round; animation: rainfall 0.8s linear infinite; }
@keyframes rainfall { from { transform: translateY(-14%); opacity: 0; } 15% { opacity: 0.75; } to { transform: translateY(125%); opacity: 0; } }
.sc-snow circle { fill: #ffffff; animation: snowfall 6s linear infinite; }
@keyframes snowfall { from { transform: translateY(-8%); opacity: 0; } 15% { opacity: 0.9; } to { transform: translateY(135%); opacity: 0.2; } }

/* ---- weather-adaptive sky states ---- */
body.sky-cloudy .scene { background:
    radial-gradient(70% 55% at 82% -8%, rgba(245,240,230,0.5), transparent 55%),
    radial-gradient(110% 80% at 50% 118%, rgba(200,210,222,0.5), transparent 55%),
    linear-gradient(180deg,#86a6c0 0%,#bccedd 48%,#e8eff5 100%); }

body.sky-rain .scene { background:
    radial-gradient(100% 80% at 50% -20%, rgba(70,90,110,0.55), transparent 55%),
    linear-gradient(180deg,#54697a 0%,#8397a8 50%,#c2ccd5 100%); }
body.sky-rain .sc-rain { display: block; }

body.sky-storm .scene { background:
    radial-gradient(100% 80% at 50% -20%, rgba(36,46,58,0.7), transparent 55%),
    linear-gradient(180deg,#343f4d 0%,#566473 50%,#909eaa 100%); }
body.sky-storm .sc-rain { display: block; }
body.sky-storm .sc-rain line { stroke: #bcc8d4; }
body.sky-storm .sc-flash { display: block; animation: flash 8s linear infinite; }
@keyframes flash { 0%,92%,100% { opacity: 0; } 93% { opacity: 0.5; } 94% { opacity: 0.06; } 95.5% { opacity: 0.42; } 97% { opacity: 0; } }

body.sky-fog .scene { background:
    radial-gradient(120% 90% at 50% 55%, rgba(255,255,255,0.7), transparent 70%),
    linear-gradient(180deg,#b6c1c9 0%,#cfd7dd 50%,#e9edf0 100%); }
body.sky-fog .sc-fog { display: block; }

body.sky-snow .scene { background:
    radial-gradient(80% 60% at 80% 0%, rgba(255,255,255,0.5), transparent 55%),
    linear-gradient(180deg,#8ea7bc 0%,#c8d4df 50%,#eef3f7 100%); }
body.sky-snow .sc-snow { display: block; }

/* ---- Weather treatment applied to a PHOTO background (--scene-photo) ----
   The photo is shot sunny; these re-mood it to match the route's forecast.
   (No-op when there's no photo — there's nothing to filter.) */
body.sky-clear  .scene-photo { filter: saturate(1.06) brightness(1.02); }
body.sky-cloudy .scene-photo { filter: saturate(0.78) brightness(0.95) contrast(0.97); }
body.sky-cloudy .scene-tint  { background: linear-gradient(180deg, rgba(150,165,180,0.20), rgba(150,165,180,0.30)); }
body.sky-rain   .scene-photo { filter: saturate(0.58) brightness(0.70) contrast(0.98); }
body.sky-rain   .scene-tint  { background: linear-gradient(180deg, rgba(40,60,84,0.40), rgba(40,60,84,0.50)); }
body.sky-storm  .scene-photo { filter: saturate(0.5) brightness(0.48) contrast(1.02); }
body.sky-storm  .scene-tint  { background: linear-gradient(180deg, rgba(18,24,34,0.55), rgba(18,24,34,0.62)); }
body.sky-fog    .scene-photo { filter: saturate(0.6) brightness(1.05) contrast(0.84); }
body.sky-fog    .scene-tint  { background: rgba(244,247,250,0.62); }
body.sky-snow   .scene-photo { filter: saturate(0.72) brightness(1.08) contrast(0.95); }
body.sky-snow   .scene-tint  { background: linear-gradient(180deg, rgba(210,226,240,0.38), rgba(210,226,240,0.50)); }

@media (prefers-reduced-motion: reduce) {
  .sc-rain line, .sc-snow circle, .sc-flash { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ===========================================================
   Skip link + top bar
   =========================================================== */
.skip-link {
  position: absolute; left: 12px; top: -52px; z-index: 10002;
  background: var(--amber); color: #fff; font-weight: 800;
  padding: 8px 14px; border-radius: 10px; transition: top 0.15s;
}
.skip-link:focus { top: 10px; text-decoration: none; }

.topbar {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 max(18px, calc((100vw - 1000px) / 2 + 18px));
  background: rgba(13, 27, 45, 0.92);          /* deep-sky band so the logo reads */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 4px 18px rgba(10,25,45,0.25);
}
.topbar .brand-logo { height: 42px; width: auto; display: block; }
@media (max-width: 520px) { .topbar .brand-logo { height: 34px; } }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar .nav-link { color: #cfe0f0; font-size: 13px; font-weight: 600; padding: 7px 11px; border-radius: 9px; }
.topbar .nav-link:hover { color: #fff; background: rgba(255,255,255,0.10); text-decoration: none; }
.topbar .nav-link.cta { background: var(--amber); color: #fff; }
.topbar .nav-link.cta:hover { background: var(--amber-2); }
.lang-toggle { display: inline-flex; border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; overflow: hidden; margin-left: 4px; }
.lang-toggle a { padding: 6px 11px; font-size: 12px; font-weight: 800; letter-spacing: 0.03em; color: #aebfd0; }
.lang-toggle a:hover { color: #fff; text-decoration: none; }
body.lang-en .lang-toggle .lt-en, body.lang-ro .lang-toggle .lt-ro { background: var(--amber); color: #fff; }

/* ===========================================================
   Layout
   =========================================================== */
.container { max-width: 1000px; margin: 0 auto; padding: 0 18px 64px; position: relative; z-index: 1; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
/* Frosted glass so the colourful background tints through — softens the
   "wall of white" and ties the cards to the scene. */
.card, .cp, .tile, .glance-card, .how .step, .day-chip, .result-summary {
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
}

/* ===========================================================
   Hero
   =========================================================== */
.hero { text-align: center; padding: 54px 10px 22px; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: clamp(28px, 5.2vw, 42px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 14px; color: #0f2236; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
.hero h1 .accent { color: var(--amber); }
.hero p.sub { font-size: 17px; color: #234, ; color: #2c4358; margin: 0 auto; max-width: 580px; line-height: 1.5; }

/* ===========================================================
   Form
   =========================================================== */
.form-card { max-width: 680px; margin: 0 auto; padding: 18px 18px 20px; }
label { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; margin-bottom: 5px; }
textarea, input[type="text"], input[type="date"], input[type="time"], select {
  width: 100%; background: var(--paper-2); border: 1px solid var(--line-strong);
  border-radius: 11px; padding: 10px 12px; color: var(--ink); font-size: 14px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s; font-family: inherit;
}
textarea { min-height: 64px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; }
input:focus, textarea:focus, select:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,122,26,0.18); background: #fff; }
/* the two key inputs in brand color */
#url, #dep_date { color: #b85c00; font-weight: 600; }
#url::placeholder { color: var(--ink-mute); font-weight: 400; }

#modeTabs { display: flex; gap: 4px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.mode-btn { flex: 1; border: none; background: transparent; color: var(--ink-dim); font: inherit; font-weight: 700; font-size: 13px; padding: 9px 8px; border-radius: 9px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.mode-btn:hover { color: var(--ink); }
.mode-btn.on { background: #fff; color: var(--amber); box-shadow: var(--shadow-sm); }

.timing-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width: 520px) { .timing-row { grid-template-columns: 1fr; } }

details.ride-options { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
details.ride-options > summary { cursor: pointer; list-style: none; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-mute); display: flex; align-items: center; gap: 8px; padding: 5px 0; }
details.ride-options > summary::-webkit-details-marker { display: none; }
details.ride-options > summary::after { content: "▾"; margin-left: auto; transition: transform 0.2s; }
details.ride-options[open] > summary::after { transform: rotate(180deg); }
.options-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
@media (max-width: 520px) { .options-row { grid-template-columns: 1fr; } }

.wp-row { margin-top: 10px; }
.wp-row:first-child { margin-top: 0; }
.row-flex { display: flex; gap: 8px; align-items: flex-end; }
.ac-wrap { position: relative; flex: 1; }
.ac-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; display: none; background: #fff; border: 1px solid var(--line-strong); border-radius: 11px; overflow: hidden; box-shadow: var(--shadow); }
.ac-item { padding: 9px 12px; font-size: 13px; color: var(--ink-dim); cursor: pointer; border-top: 1px solid var(--line); }
.ac-item:first-child { border-top: none; }
.ac-item:hover, .ac-item.sel { background: var(--amber-soft); color: var(--ink); }
.wp-del, .wp-geo { border-radius: 10px; padding: 9px 11px; font-size: 14px; line-height: 1; cursor: pointer; }
.wp-del { background: var(--paper-2); border: 1px solid var(--line-strong); color: var(--ink-mute); }
.wp-del:hover { background: var(--red-soft); color: var(--red); border-color: #f1b9bf; }
.wp-geo { background: var(--amber-soft); border: 1px solid #ffd2a8; color: #b85c00; }
.wp-geo:hover { background: #ffe6cf; }
.wp-geo:disabled { opacity: 0.55; cursor: wait; }

.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
button { font-family: inherit; cursor: pointer; }
button.primary { width: 100%; border: none; background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: #fff; font-weight: 800; font-size: 15px; padding: 14px; border-radius: 12px; box-shadow: 0 6px 18px rgba(255,122,26,0.32); transition: filter 0.12s, transform 0.12s; }
button.primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
button.primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
button.ghost { background: var(--paper-2); color: var(--ink-dim); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 13px; }
button.ghost:hover { background: #fff; }
.actions .row2 { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
#resetBtn { background: transparent; border: none; color: var(--ink-mute); font-size: 12px; padding: 4px; }
#resetBtn:hover { color: var(--ink-dim); }
.hint { font-size: 11px; color: var(--ink-mute); }

.status { margin-top: 12px; font-size: 13px; color: var(--ink-dim); min-height: 18px; }
.status.error { color: var(--red); }
.status .spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--amber); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -1px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================================================
   How it works
   =========================================================== */
.how { max-width: 680px; margin: 24px auto 0; }
.section-eyebrow { text-align: center; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; margin: 0 0 12px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .how-grid { grid-template-columns: 1fr; } }
.how .step { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 11px 10px; text-align: center; box-shadow: var(--shadow-sm); }
.how .step .ico { font-size: 20px; }
.how .step h3 { margin: 5px 0 3px; font-size: 12.5px; color: var(--ink); }
.how .step p { margin: 0; font-size: 11.5px; color: var(--ink-dim); line-height: 1.45; }
.guide-cta { display: inline-block; color: var(--amber); font-weight: 800; font-size: 13.5px; }
.guide-cta:hover { color: var(--amber-2); }
body.has-plan .how { display: none; }

/* ===========================================================
   Sticky result summary (appears on report)
   =========================================================== */
.result-summary { display: none; }
body.has-plan .result-summary {
  display: flex;
  gap: 18px; flex-wrap: wrap; justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px;
  margin: 20px 0 16px; box-shadow: var(--shadow-sm);
}
.result-summary .rs { text-align: center; }
.result-summary .rs .k { font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute); font-weight: 700; }
.result-summary .rs .v { font-size: 16px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.result-summary .rs.warn .v { color: var(--red); }
.result-summary .rs.ok .v { color: var(--green); }
.result-summary .rs.rs-road { display: flex; align-items: center; }
.result-summary .rs.rs-road .v { font-size: 14px; }

/* Road-state legend (report header) + best-day chip word */
.road-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--ink-mute); }
.road-legend .lg { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 600; }
.road-legend .lg-dry { background: var(--green-soft); border-color: #b6e3c4; color: #1d6b39; }
.road-legend .lg-damp { background: #fff3df; border-color: #ffd99a; color: #9a6a00; }
.road-legend .lg-wet { background: var(--red-soft); border-color: #f1b9bf; color: #a31420; }
.day-chip .d-roadtxt { font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-mute); font-weight: 700; margin-top: -2px; }

/* ===========================================================
   Report header / alerts / waypoint pills
   =========================================================== */
.report-header h2 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.report-header .head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.waypoint-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 10px; }
.wp { display: inline-block; background: var(--paper-2); border: 1px solid var(--line-strong); padding: 3px 10px; border-radius: 999px; font-size: 13px; color: var(--ink); }
.wp-arrow { color: var(--ink-mute); font-size: 13px; }
.alert { padding: 9px 12px; border-radius: 11px; font-size: 12.5px; border: 1px solid; }
.alert.warn { background: var(--red-soft); border-color: #f1b9bf; color: #a31420; }
.alert.ok { background: var(--green-soft); border-color: #b6e3c4; color: #1d6b39; }
.alert b { color: inherit; }
.share { background: var(--amber-soft); color: #b85c00; border: 1px solid #ffd2a8; padding: 5px 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; border-radius: 999px; cursor: pointer; }
.share:hover { background: #ffe6cf; }
.share:disabled { opacity: 0.5; cursor: wait; }

/* ===========================================================
   Stats tiles
   =========================================================== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.tile { position: relative; padding: 11px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--amber); opacity: 0.85; }
.tile.cool::before { background: var(--cyan); }
.tile.hot::before { background: var(--amber-2); }
.tile.warn::before { background: var(--red); }
.tile.ok::before { background: var(--green); }
.tile .k { font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-mute); font-weight: 700; margin-bottom: 3px; }
.tile .v { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.05; }
.tile .v .unit { font-size: 11px; font-weight: 500; color: var(--ink-mute); margin-left: 3px; }
.tile .sub { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.tile.warn .v { color: var(--red); }
.tile.ok .v { color: var(--green); }
.tile.hot .v { color: #b85c00; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; font-size: 10px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--ink-mute); font-weight: 700; margin: 16px 4px 8px; }
.section-title .count { font-size: 10px; color: var(--ink-dim); }

.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.glance-card { padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.glance-card h3 { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.glance-card p { margin: 0; font-size: 12.5px; color: var(--ink-dim); }
.glance-card b { color: var(--ink); }

/* ===========================================================
   Checkpoints / legs
   =========================================================== */
.checkpoints { display: flex; flex-direction: column; gap: 18px; }
.leg-section { display: flex; flex-direction: column; gap: 10px; }
.leg-stops { display: flex; flex-direction: column; gap: 10px; }
.leg-header { display: flex; align-items: center; gap: 10px; padding: 6px 4px 8px; border-bottom: 1px dashed var(--line-strong); flex-wrap: wrap; }
.leg-badge { display: inline-block; background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: #fff; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.leg-route { font-size: 13px; font-weight: 700; color: var(--ink); }
.leg-route .arrow { color: var(--ink-mute); margin: 0 4px; font-weight: 400; }
.leg-stats { margin-left: auto; font-size: 11px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

.cp { position: relative; display: grid; grid-template-columns: 96px minmax(150px, 1.1fr) minmax(190px, 1.3fr) auto; gap: 14px; padding: 10px 14px 10px 18px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm); align-items: center; cursor: pointer; transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s; }
.cp:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.cp::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 12px 0 0 12px; background: var(--amber); }
.cp.rain-low::before { background: var(--green); }
.cp.rain-mid::before { background: var(--amber); }
.cp.rain-high::before { background: var(--red); }
.cp.rain-high { background: linear-gradient(90deg, var(--red-soft) 0%, var(--paper) 42%); }
.cp-when .hour { font-size: 10px; letter-spacing: 0.06em; color: var(--ink-mute); font-weight: 700; text-transform: uppercase; }
.cp-when .time { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.05; margin-top: 1px; }
.cp-when .pace { font-size: 10px; color: var(--ink-mute); margin-top: 2px; }
.cp-when .pace b { color: var(--ink-dim); font-weight: 700; }
.cp-place .here { font-size: 14px; font-weight: 700; color: var(--ink); }
.cp.kind-start .cp-place .here, .cp.kind-end .cp-place .here, .cp.kind-waypoint .cp-place .here { color: #b85c00; }
.cp-place .progress { font-size: 11px; color: var(--ink-mute); margin-top: 2px; font-variant-numeric: tabular-nums; }
.cp-weather { display: flex; align-items: center; gap: 10px; }
.cp-weather .icon { font-size: 24px; line-height: 1; }
.cp-weather .desc { font-size: 13px; font-weight: 600; color: var(--ink); }
.cp-weather .meta { font-size: 11px; color: var(--ink-dim); margin-top: 2px; }
.cp-pills { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.pill-row { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; border: 1px solid var(--line-strong); background: var(--paper-2); color: var(--ink-dim); }
.pill.rain-low { background: var(--green-soft); border-color: #b6e3c4; color: #1d6b39; }
.pill.rain-mid { background: #fff3df; border-color: #ffd99a; color: #9a6a00; }
.pill.rain-high { background: var(--red-soft); border-color: #f1b9bf; color: #a31420; }
.pill.event-none { background: var(--green-soft); border-color: #b6e3c4; color: #1d6b39; }
.pill.event-yes { background: var(--red-soft); border-color: #f1b9bf; color: #a31420; }
.pill.food-none { background: var(--paper-2); border-color: var(--line); color: var(--ink-mute); }
.pill.food-yes { background: var(--amber-soft); border-color: #ffd2a8; color: #b85c00; }
.pill.food-loading { background: var(--paper-2); border-color: var(--line); color: var(--ink-mute); }
.pill.food-loading::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--amber); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.pill.road-dry { background: var(--green-soft); border-color: #b6e3c4; color: #1d6b39; cursor: help; }
.pill.road-damp { background: #fff3df; border-color: #ffd99a; color: #9a6a00; cursor: help; }
.pill.road-wet { background: var(--red-soft); border-color: #f1b9bf; color: #a31420; cursor: help; }
.pill.mountain { background: #e8f3fb; border-color: #bfe0f3; color: #1f6c97; cursor: help; }
.cp-food-strip { grid-column: 1 / -1; margin-top: 2px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--ink-dim); display: none; }
.cp-food-strip.show { display: block; }
.cp-food-strip .food-label { color: var(--ink-mute); margin-right: 4px; font-weight: 600; }
.cp-food-strip a { color: #b85c00; margin-right: 10px; }
.cp-events-detail { grid-column: 1 / -1; margin-top: 4px; padding-top: 6px; border-top: 1px dashed #f1b9bf; font-size: 11px; color: #a31420; }
@media (max-width: 880px) {
  .cp { grid-template-columns: 92px 1fr; row-gap: 12px; }
  .cp-weather, .cp-pills { grid-column: 1 / -1; }
  .cp-pills { align-items: flex-start; }
  .pill-row { justify-content: flex-start; }
}

/* ===========================================================
   Map
   =========================================================== */
#map { width: 100%; height: 320px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.leaflet-popup-content-wrapper { background: #fff; color: var(--ink); border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.leaflet-popup-tip { background: #fff; }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; }
.leaflet-container { background: #dcdcd7; font: inherit; }
.cp-divicon { background: none; border: 0; }
.cp-divicon .map-pin { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; background: #fff; border: 2px solid var(--amber); font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; box-shadow: var(--shadow-sm); transition: transform 0.15s; }
.cp-divicon .map-pin .mp-ico { font-size: 13px; line-height: 1; }
.cp-divicon .map-pin .mp-t { font-variant-numeric: tabular-nums; }
.map-pin.tier-low { border-color: var(--green); }
.map-pin.tier-mid { border-color: var(--amber); }
.map-pin.tier-high { border-color: var(--red); }
.map-pin.tier-none { border-color: var(--line-strong); }
.map-pin.pin-start { box-shadow: 0 0 0 2px rgba(47,158,84,0.4), var(--shadow-sm); }
.map-pin.pin-end { box-shadow: 0 0 0 2px rgba(226,61,75,0.4), var(--shadow-sm); }
.map-pin.pin-waypoint { box-shadow: 0 0 0 2px rgba(31,143,206,0.4), var(--shadow-sm); }
.map-pin.active { transform: translate(-50%, -50%) scale(1.2); border-width: 3px; z-index: 1000; }
.leaflet-control-layers { background: #fff !important; color: var(--ink); border: 1px solid var(--line-strong) !important; border-radius: 10px !important; box-shadow: var(--shadow); font-size: 12px; }
.leaflet-control-layers label { color: var(--ink); font-weight: 600; margin: 0; }
/* Rain-radar time control */
.radar-ctl { background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); padding: 6px 10px; font-size: 12px; color: var(--ink); }
.radar-head { display: flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; }
.radar-head input { accent-color: var(--amber); }
.radar-scrub { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.radar-play { border: 1px solid var(--line-strong); background: var(--paper-2); border-radius: 7px; width: 26px; height: 24px; cursor: pointer; font-size: 11px; line-height: 1; }
.radar-play:hover { background: #fff; }
.radar-range { width: 108px; accent-color: var(--amber); }
.radar-time { font-variant-numeric: tabular-nums; color: var(--ink-dim); min-width: 44px; }
.radar-time.future { color: #b85c00; font-weight: 700; }

/* ===========================================================
   Best-day chips
   =========================================================== */
.days-panel { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.day-chip { flex: 1 1 110px; min-width: 104px; text-align: center; padding: 10px 8px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform 0.15s, border-color 0.15s; }
.day-chip:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.day-chip.best { border-color: #b6e3c4; box-shadow: 0 0 0 2px rgba(47,158,84,0.18); }
.day-chip .d-date { font-size: 12px; font-weight: 700; color: var(--ink); }
.day-chip .d-road { font-size: 20px; margin: 4px 0 2px; }
.day-chip .d-rain { font-size: 11px; color: var(--ink-dim); }
.day-chip .d-temp { font-size: 10px; color: var(--ink-mute); margin-top: 2px; }
.day-chip .d-tag { display: inline-block; margin-top: 5px; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }

/* ===========================================================
   Big actions + sticky bar + modal + toast
   =========================================================== */
.big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.big-action { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 13px; border-radius: 12px; background: var(--amber-soft); border: 1px solid #ffd2a8; color: #b85c00; font-size: 22px; cursor: pointer; transition: transform 0.15s, background 0.15s; }
.big-action b { font-size: 14px; color: var(--ink); }
.big-action span { font-size: 11px; color: var(--ink-mute); font-weight: 500; }
.big-action:hover { transform: translateY(-2px); background: #ffe6cf; }
.big-action:disabled { opacity: 0.5; cursor: wait; transform: none; }

.sticky-actions { position: fixed; bottom: 0; left: 0; right: 0; z-index: 900; display: none; justify-content: center; gap: 8px; padding: 10px max(12px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
body.has-plan .sticky-actions { display: flex; }
body.has-plan .container { padding-bottom: 92px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(15,30,50,0.45); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 10001; padding: 20px; }
.modal-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; max-width: 420px; width: 100%; box-shadow: var(--shadow-lg); }
.modal-card h3 { margin: 0 0 8px; font-size: 17px; color: #b85c00; }
.modal-card p { margin: 0 0 16px; color: var(--ink-dim); font-size: 14px; line-height: 1.6; }
.modal-go { display: block; text-align: center; background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: #fff; font-weight: 800; padding: 12px; border-radius: 12px; text-decoration: none; margin-bottom: 10px; }
.modal-go:hover { filter: brightness(1.06); text-decoration: none; color: #fff; }
.modal-close { width: 100%; background: var(--paper-2); color: var(--ink-dim); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px; }
.modal-close:hover { background: #fff; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #14202e; border: 1px solid #2a3a4c; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 9999; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--red); color: #ffd7db; }
body.has-plan .toast { bottom: 84px; }

.placeholder { text-align: center; padding: 26px 20px; color: var(--ink-dim); }
.placeholder .big { font-size: 40px; margin-bottom: 8px; }

/* ===========================================================
   Compact share view (PNG export) — intentionally DARK card.
   =========================================================== */
.sv-host { position: fixed; left: -10000px; top: 0; pointer-events: none; }
.sv { width: 720px; background: linear-gradient(180deg, #0c1320 0%, #111c2c 100%); color: #eef3fa; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 22px 24px 18px; box-sizing: border-box; line-height: 1.4; }
.sv-hero { background: linear-gradient(135deg, #ff7a1a 0%, #ff9540 60%, #ffb86b 100%); padding: 14px 18px; border-radius: 12px; color: #2a1500; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.sv-hero-title { font-size: 18px; font-weight: 800; }
.sv-hero-sub { font-size: 12px; font-weight: 600; opacity: 0.85; margin-top: 2px; }
.sv-hero-right { text-align: right; }
.sv-hero-km { font-size: 22px; font-weight: 800; line-height: 1; }
.sv-hero-eta { font-size: 12px; font-weight: 600; opacity: 0.85; margin-top: 3px; }
.sv-route { font-size: 11px; color: #9fb1c4; margin-bottom: 14px; line-height: 1.6; }
.sv-route b { color: #eef3fa; font-weight: 600; }
.sv-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.sv-stat { background: #16243a; border: 1px solid rgba(255,255,255,0.08); border-radius: 9px; padding: 9px 12px; }
.sv-stat-k { font-size: 9px; color: #7d93aa; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; margin-bottom: 2px; }
.sv-stat-v { font-size: 17px; font-weight: 800; color: #eef3fa; font-variant-numeric: tabular-nums; }
.sv-stat.warn .sv-stat-v { color: #ff6b6b; }
.sv-stat.ok .sv-stat-v { color: #46d98a; }
.sv-leg-header { display: flex; align-items: center; gap: 8px; padding: 10px 0 6px; border-top: 1px dashed rgba(255,255,255,0.12); flex-wrap: wrap; }
.sv-leg-header.first { border-top: none; padding-top: 4px; }
.sv-leg-badge { background: linear-gradient(135deg, #ff7a1a, #ff9540); color: #2a1500; padding: 2px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.sv-leg-route { font-size: 12px; font-weight: 700; color: #f1f5fa; }
.sv-leg-route .sv-arrow { color: #7d93aa; margin: 0 4px; }
.sv-leg-stats { margin-left: auto; font-size: 10px; color: #7d93aa; font-variant-numeric: tabular-nums; }
.sv-stop { display: grid; grid-template-columns: 56px 1fr 110px 48px; gap: 10px; padding: 5px 0; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sv-stop:last-child { border-bottom: none; }
.sv-stop-time { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; color: #eef3fa; line-height: 1.1; }
.sv-stop-elapsed { font-size: 9px; color: #7d93aa; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; margin-top: 1px; }
.sv-stop-place { font-size: 12px; color: #eef3fa; font-weight: 600; }
.sv-stop-place.wp { color: #ffb86b; }
.sv-stop-weather { display: flex; align-items: center; gap: 6px; }
.sv-stop-weather-icon { font-size: 18px; line-height: 1; }
.sv-stop-weather-meta { font-size: 11px; color: #9fb1c4; line-height: 1.2; }
.sv-stop-weather-meta .temp { color: #ff9540; font-weight: 700; }
.sv-rain-pill { font-size: 10px; font-weight: 700; padding: 3px 0; border-radius: 999px; text-align: center; }
.sv-rain-low { background: rgba(70,217,138,0.18); border: 1px solid rgba(70,217,138,0.4); color: #b8f0d3; }
.sv-rain-mid { background: rgba(255,179,40,0.2); border: 1px solid rgba(255,179,40,0.45); color: #ffd58a; }
.sv-rain-high { background: rgba(255,107,107,0.2); border: 1px solid rgba(255,107,107,0.45); color: #ffc4cf; }
.sv-rain-none { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: #7d93aa; }
.sv-footer { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); text-align: center; font-size: 9px; color: #7d93aa; letter-spacing: 0.06em; }

/* ===========================================================
   Coffee button + footer
   =========================================================== */
.coffee-btn { display: none; align-items: center; gap: 7px; margin: 14px auto 0; width: max-content; padding: 9px 18px; border-radius: 999px; background: var(--amber-soft); border: 1px solid #ffd2a8; color: #b85c00; font-size: 13px; font-weight: 700; text-decoration: none; }
.coffee-btn.show { display: inline-flex; }
.coffee-btn:hover { background: #ffe6cf; text-decoration: none; color: #b85c00; }
footer.foot { text-align: center; color: var(--ink-mute); font-size: 12.5px; margin-top: 34px; }
footer.foot a { color: var(--ink-dim); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin-bottom: 10px; }
.foot-nav a { color: var(--ink-dim); font-size: 13px; font-weight: 600; }

/* ===========================================================
   Animated logo hero (guide page) — dark band so the wordmark reads
   =========================================================== */
.logo-hero { background: linear-gradient(180deg,#0d1b2d,#13243a); border-radius: 18px; text-align: center; padding: 26px 16px 30px; margin: 14px 0 6px; box-shadow: var(--shadow); }
.logo-hero svg { width: 100%; max-width: 360px; height: auto; overflow: visible; }
.logo-road { animation: roadDash 1.6s linear infinite; }
@keyframes roadDash { to { stroke-dashoffset: -32; } }
.logo-sun-halo { animation: sunPulse 4s ease-in-out infinite; transform-origin: 90px 70px; }
@keyframes sunPulse { 0%,100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.18); } }
.logo-ring { filter: drop-shadow(0 0 10px rgba(255,149,64,0.35)); animation: ringGlow 4s ease-in-out infinite; }
@keyframes ringGlow { 0%,100% { filter: drop-shadow(0 0 6px rgba(255,149,64,0.25)); } 50% { filter: drop-shadow(0 0 16px rgba(255,149,64,0.55)); } }
@media (prefers-reduced-motion: reduce) { .logo-road, .logo-sun-halo, .logo-ring { animation: none !important; } }

/* ===========================================================
   Content pages (guide / faq / privacy / terms)
   =========================================================== */
.page { max-width: 760px; margin: 0 auto; }
.page-head { text-align: center; padding: 40px 10px 8px; }
.page-head h1 { font-size: clamp(26px, 5vw, 36px); font-weight: 800; color: #0f2236; margin: 0 0 8px; letter-spacing: -0.02em; }
.page-head p { color: var(--ink-dim); font-size: 16px; margin: 0; }
.page .card { padding: 22px 24px; }
.page h2 { font-size: 19px; color: var(--ink); margin: 26px 0 8px; letter-spacing: -0.01em; }
.page h2:first-child { margin-top: 4px; }
.page h3 { font-size: 15px; color: var(--ink); margin: 18px 0 4px; }
.page p, .page li { color: var(--ink-dim); font-size: 14.5px; line-height: 1.7; }
.page ul { padding-left: 20px; margin: 6px 0 12px; }
.page li { margin: 4px 0; }
.page b, .page strong { color: var(--ink); }
.page .feature { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.page .feature:first-of-type { border-top: none; }
.page .feature .fico { font-size: 24px; line-height: 1; flex-shrink: 0; }
.page .feature h3 { margin: 0 0 2px; }
.page .feature p { margin: 0; }
.page .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.page .toc a { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; }
.page .back { display: inline-block; margin-top: 20px; font-weight: 600; }

/* ===========================================================
   Localisation: body class hides the other language
   =========================================================== */
body.lang-en .i18n-ro { display: none !important; }
body.lang-ro .i18n-en { display: none !important; }

/* a11y focus */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(255,122,26,0.55); outline-offset: 2px; border-radius: 8px;
}
