/* Start, Regionen, Erfolge */
.accent { color: var(--highlight); }
.big-h { font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; letter-spacing: -.03em; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: 12px; font-weight: 500; border: 0; background: none; padding: 5px 12px; border-radius: 999px; cursor: pointer; color: var(--text-secondary); }
.seg button.on { background: var(--surface-1); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* --- Hero --- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 28px 32px; margin-bottom: 16px;
  background: radial-gradient(120% 140% at 0% 0%, #21443a 0%, #12261f 55%, #0c1c16 100%); color: #f5f5f7;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.hero::after { /* Bergsilhouette */
  content: ""; position: absolute; inset: auto 0 0 0; height: 70%; pointer-events: none; opacity: .14;
  background: linear-gradient(180deg, transparent, rgba(30,134,200,.0)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200 L0 140 L120 80 L190 120 L300 30 L380 100 L450 70 L560 150 L660 60 L720 90 L820 20 L930 110 L1010 75 L1100 130 L1200 90 L1200 200Z' fill='%23f2a65a'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}
.hero > * { position: relative; z-index: 1; }
.hero.slim { padding: 22px 28px; }
.hero-main { display: flex; align-items: center; gap: 24px; min-width: 0; }
.hero-txt { min-width: 0; }
.hero .eyebrow { color: var(--glacier, #8fd3f4); font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.hero h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; margin: 2px 0 12px; }
.xpbar { width: min(380px, 60vw); height: 8px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; }
.xpbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #5cc0f5, #8fd3f4 25%, #9fd3c0 60%, #4f9a83) 0 0 / 100cqw 100% no-repeat; }
.xp-txt { font-size: 13px; color: #b3c4bc; margin-top: 8px; }
.xp-txt b { color: #f5f5f7; }
.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .ring-bg { stroke: rgba(255,255,255,.12); }
.ring .ring-fg { stroke: #8fd3f4; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.ring .lv { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring .lv b { font-size: 38px; font-weight: 600; letter-spacing: -.04em; }
.hero.slim .ring .lv b { font-size: 30px; }
.ring .lv span { font-size: 11px; color: #b3c4bc; margin-top: 4px; text-transform: uppercase; letter-spacing: .08em; }
.hero-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-stats > div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 12px 16px; min-width: 116px; cursor: pointer; transition: background-color .2s, transform .2s var(--ease); }
.hero-stats > div:hover { background: rgba(255,255,255,.13); transform: translateY(-2px); }
.hero-stats b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.hero-stats b small { font-size: 14px; color: #b3c4bc; font-weight: 500; letter-spacing: 0; }
.hero-stats span { font-size: 12px; color: #b3c4bc; }

/* --- Welt --- */
.world-card { margin-bottom: 16px; }
.bigbar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; margin: 2px 0 14px; }
.bigbar div { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--highlight), var(--series-1)) 0 0 / 100cqw 100% no-repeat; transition: width 1s var(--ease); }
.continents { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.cont { border: 1px solid var(--border); border-radius: 14px; padding: 8px 10px; opacity: .55; }
.cont.on { opacity: 1; border-color: var(--series-1); }
.cont .cn { display: block; font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cont .cv { font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.cont .cv small { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.cbar { display: block; height: 4px; background: var(--surface-2); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.cbar i { display: block; height: 100%; background: var(--series-1); border-radius: 2px; }
.world-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.world-map { height: 360px; border-radius: 16px; background: var(--surface-1); border: 1px solid var(--border); z-index: 0; }
.world-map.leaflet-container { background: var(--surface-1); }
.flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: 360px; overflow: auto; padding-right: 4px; align-content: start; }
.flag-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; text-align: left; font: inherit; color: inherit;
  border: 1px solid var(--border); background: var(--surface-1); border-radius: 14px; padding: 8px 10px; cursor: pointer;
  transition: border-color .2s, transform .2s var(--ease); }
.flag-item:hover { border-color: var(--highlight); transform: translateY(-1px); }
.flag-item .fi, .fi { width: 32px; height: 24px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); background-size: cover; }
.tbl .fi, .crumbs .fi, .hr-t .fi, .leaflet-tooltip .fi { width: 20px; height: 15px; border-radius: 2px; vertical-align: -2px; margin-right: 4px; }
.rs-head .fi { width: 36px; height: 27px; }
.fl-txt { min-width: 0; }
.fl-txt b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-txt small { color: var(--text-muted); font-size: 11px; }
.fl-pct { font-size: 12px; font-weight: 600; color: var(--text-secondary); }

/* --- Badges / Fortschritt --- */
.badges { display: flex; flex-direction: column; gap: 8px; }
.badge-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.badge-item b { display: block; font-weight: 600; }
.badge-item small { color: var(--text-muted); font-size: 12px; }
.badge-item .xp { font-size: 12px; font-weight: 600; color: var(--highlight); }
.medal { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 21px; position: relative;
  background: var(--surface-2); box-shadow: inset 0 0 0 3px var(--border); }
.medal.bronze { background: radial-gradient(circle at 30% 25%, #f1c9a0, #b0793f 70%); box-shadow: inset 0 0 0 3px #8a5a2b; }
.medal.silver { background: radial-gradient(circle at 30% 25%, #f4f6f8, #9aa3ab 70%); box-shadow: inset 0 0 0 3px #78818a; }
.medal.gold { background: radial-gradient(circle at 30% 25%, #fff0b3, #d9a520 70%); box-shadow: inset 0 0 0 3px #a87d0f; }
.medal.platinum { background: radial-gradient(circle at 30% 25%, #e8fbff, #6fb7c9 70%); box-shadow: inset 0 0 0 3px #4a8fa1; }
.medal.diamond { background: radial-gradient(circle at 30% 25%, #eef4ff, #7aa7f2 70%); box-shadow: inset 0 0 0 3px #3b6fd0, 0 0 14px rgba(122,167,242,.5); }
.medal.titan { background: radial-gradient(circle at 30% 25%, #d5d5da, #4b4b52 70%); box-shadow: inset 0 0 0 3px #2c2c31, 0 0 14px rgba(143,211,244,.35); }
.medal.legend { background: radial-gradient(circle at 30% 25%, #e3dbff, #7a5cc2 70%); box-shadow: inset 0 0 0 3px #4f3a8f, 0 0 18px rgba(122,92,194,.6); }
.medal.none { filter: grayscale(1); opacity: .5; }
.upcoming { display: flex; flex-direction: column; gap: 12px; }
.up-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; }
.up-item .ic { font-size: 22px; text-align: center; }
.up-t { display: flex; justify-content: space-between; gap: 8px; }
.up-t small { color: var(--text-muted); }
.pbar { display: block; position: relative; height: 6px; background: var(--surface-2); border-radius: 3px; margin: 4px 0 2px; overflow: visible; }
.pbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--highlight), var(--series-1)) 0 0 / 100cqw 100% no-repeat; }
.pbar.big { height: 10px; border-radius: 5px; margin: 6px 0 4px; }
.pbar.big i { border-radius: 5px; }
.pbar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-primary); opacity: .5; border-radius: 1px; }
.home { display: flex; flex-direction: column; gap: 14px; }
.home-row { cursor: pointer; padding: 4px 6px; margin: -4px -6px; border-radius: 10px; }
.home-row:hover { background: var(--surface-2); }
.hr-t { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hr-t b { flex: 1; font-weight: 600; }
.hr-t span { font-weight: 600; color: var(--highlight); }

/* --- Regionen --- */
.region-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 500; }
.crumbs button { font: inherit; border: 0; background: var(--surface-1); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--text-primary); }
.crumbs button:last-child { background: var(--accent); color: #fff; border-color: var(--accent); }
.crumbs span { color: var(--text-muted); }
.regions-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.region-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pctcol { width: 38%; }
.tbl .cnt { display: flex; align-items: center; gap: 8px; }
.tbl .cnt .pbar { flex: 1; margin: 0; }
.tbl .cnt b { min-width: 58px; text-align: right; font-weight: 600; font-size: 13px; }
.region-stats .rs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.region-stats h1 { font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.rs-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 10px; }
.rs-grid > div { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; }
.rs-grid b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.rs-grid .rs-big b { font-size: 30px; color: var(--highlight); }
.rs-grid span { font-size: 12px; color: var(--text-secondary); }
.rs-goal { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.map-card { padding: 10px; }
.tile-map { height: 460px; border-radius: 14px; }
.tile-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); padding: 8px 6px 0; }
.sq { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.sq.v { background: var(--series-1); opacity: .55; } .sq.c { background: var(--seq-4); opacity: .8; }
.sq.n { background: var(--series-2); opacity: .75; } .sq.s { border: 3px solid var(--highlight); }

/* --- Erfolge --- */
.group-h { font-size: 20px; font-weight: 600; letter-spacing: -.03em; margin: 22px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ach { display: grid; grid-template-columns: 56px 1fr; gap: 14px; background: var(--surface-1); border: 1px solid var(--border); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); transition: transform .25s var(--ease); }
/* alle Stufen erreicht: leicht türkis hinterlegt */
.ach.complete { background: var(--complete-bg); border-color: var(--complete-border); }
.ach:hover { transform: translateY(-2px); }
.ach .medal { width: 56px; height: 56px; font-size: 26px; }
.ach.locked { opacity: .72; }
.ach-t { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ach-t b { font-size: 15px; font-weight: 600; }
.ach p { margin: 2px 0 6px; font-size: 12px; color: var(--text-secondary); }
.ach-val { font-size: 13px; }
.ach-val b { font-size: 17px; font-weight: 600; }
.ach-val .done { color: var(--series-1); font-weight: 500; }
.tier { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; color: #fff; }
.tier.bronze { background: #b0793f; } .tier.silver { background: #8a939b; } .tier.gold { background: #c99410; }
.tier.platinum { background: #4a8fa1; } .tier.diamond { background: #3b6fd0; } .tier.titan { background: #3a3a40; } .tier.legend { background: #7a5cc2; }
.tiers { display: flex; gap: 6px; margin-top: 8px; }
.tier-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--border); cursor: help; }
.tier-dot.bronze { background: #b0793f; box-shadow: none; } .tier-dot.silver { background: #9aa3ab; box-shadow: none; }
.tier-dot.gold { background: #d9a520; box-shadow: none; } .tier-dot.platinum { background: #6fb7c9; box-shadow: none; }
.tier-dot.diamond { background: #7aa7f2; box-shadow: none; } .tier-dot.titan { background: #4b4b52; box-shadow: none; }
.tier-dot.legend { background: #7a5cc2; box-shadow: none; }
/* Stufen 8–10: Mythos (violett), Heros (rot-gold), Olymp (weiß-gold, schimmernd) */
.medal.mythos { background: radial-gradient(circle at 30% 25%, #eadcff, #7b4fd6 70%); box-shadow: inset 0 0 0 3px #5431a8, 0 0 18px rgba(123,79,214,.55); }
.medal.heros { background: radial-gradient(circle at 30% 25%, #ffd9c9, #c8372d 70%); box-shadow: inset 0 0 0 3px #8f2018, 0 0 20px rgba(200,55,45,.55); }
.medal.olymp { background: radial-gradient(circle at 30% 25%, #ffffff, #f3d27a 55%, #d9a520 80%);
  box-shadow: inset 0 0 0 3px #b8860b, 0 0 22px rgba(255,215,120,.9), 0 0 6px rgba(255,255,255,.9); }
.tier.mythos { background: #7b4fd6; } .tier.heros { background: #c8372d; }
.tier.olymp { background: linear-gradient(90deg, #d9a520, #f3d27a); color: #3a2a00; }
.tier-dot.mythos { background: #7b4fd6; box-shadow: none; } .tier-dot.heros { background: #c8372d; box-shadow: none; }
.tier-dot.olymp { background: linear-gradient(135deg, #fff, #d9a520); box-shadow: 0 0 0 1px #b8860b; }

/* --- Gipfel auf der Karte: Leuchtschein + Seitenpanel --- */
.glow-pane svg { filter: drop-shadow(0 0 2px rgba(200, 236, 255, 1)) drop-shadow(0 0 5px rgba(92, 192, 245, 1)) drop-shadow(0 0 10px rgba(30, 134, 200, .9)); }
/* Zoomabhängige Entsättigung der Kartenkacheln (wie jenhikes.de/touren) */
.leaflet-tile-pane { transition: filter .45s var(--ease); }
.tint-strong .leaflet-tile-pane { filter: grayscale(.9) sepia(.12) contrast(.92) brightness(1.06); }
.tint-mid .leaflet-tile-pane { filter: grayscale(.5) sepia(.08) contrast(.96) brightness(1.03); }
.tint-light .leaflet-tile-pane { filter: grayscale(.3) sepia(.05) contrast(.97) brightness(1.02); }
:root[data-theme="dark"] .tint-light .leaflet-tile-pane { filter: grayscale(.3) contrast(.98) brightness(.92); }
:root[data-theme="dark"] .tint-strong .leaflet-tile-pane { filter: grayscale(.9) sepia(.1) contrast(.95) brightness(.78); }
:root[data-theme="dark"] .tint-mid .leaflet-tile-pane { filter: grayscale(.5) contrast(.97) brightness(.88); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tint-strong .leaflet-tile-pane { filter: grayscale(.9) sepia(.1) contrast(.95) brightness(.78); }
  :root:not([data-theme="light"]) .tint-mid .leaflet-tile-pane { filter: grayscale(.5) contrast(.97) brightness(.88); }
  :root:not([data-theme="light"]) .tint-light .leaflet-tile-pane { filter: grayscale(.3) contrast(.98) brightness(.92); }
}
.glow-pane path { cursor: pointer; }
.map-drawer { position: absolute; top: 12px; left: 56px; bottom: 12px; width: min(460px, calc(100% - 80px)); z-index: 600;
  display: flex; flex-direction: column; gap: 8px; overflow: hidden; padding: 16px 18px; border-radius: 18px;
  animation: drawerIn .35s var(--ease); }
@keyframes drawerIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.md-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.md-head h2 { font-size: 20px; letter-spacing: -.03em; }
.md-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.md-stats div { background: var(--surface-2); border-radius: 10px; padding: 6px 9px; }
.md-stats b { display: block; font-size: 15px; font-weight: 600; }
.md-stats span { font-size: 11px; color: var(--text-secondary); }
.map-drawer h3 { font-size: 13px; color: var(--text-secondary); margin: 6px 0 0; font-weight: 600; }
.map-drawer .routes { max-height: 130px; overflow: auto; flex: none; }
.md-table { flex: 1; min-height: 120px; max-height: none !important; margin: 0 -18px !important; }
.md-table .tbl th:first-child, .md-table .tbl td:first-child { padding-left: 18px; }
.md-table .tbl td, .md-table .tbl th { padding: 5px 7px; font-size: 12.5px; }
.md-tour { white-space: normal !important; max-width: 160px; line-height: 1.3; }
.strava-link { color: var(--strava); font-weight: 600; text-decoration: none; white-space: nowrap; }
.md-actions { display: flex; gap: 8px; justify-content: space-between; flex: none; }
@media (max-width: 640px) { .map-drawer { left: 8px; right: 8px; width: auto; top: auto; height: 70%; } }

/* --- Anmeldung & Konto --- */
.connect-forms { display: flex; flex-direction: column; gap: 12px; align-items: stretch; max-width: 380px; margin: 0 auto; text-align: left; }
.auth-tabs { align-self: center; background: rgba(255,255,255,.1); }
.auth-tabs button { color: #b3c4bc; } .auth-tabs button.on { background: #f5f5f7; color: #12261f; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input:not([type=checkbox]) { font: inherit; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #f5f5f7; }
.auth-form input::placeholder { color: #8aa197; }
.auth-form .btn { justify-content: center; padding: 11px; }
.auth-check { display: flex; gap: 8px; font-size: 12px; color: #b3c4bc; line-height: 1.4; align-items: flex-start; }
.auth-check a { color: var(--glacier, #8fd3f4); }
.auth-msg { color: var(--danger); font-size: 13px; min-height: 1em; margin: 0; }
.auth-or { display: flex; align-items: center; gap: 10px; color: #8aa197; font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.15); }
.connect-forms .btn.strava { justify-content: center; }
.athlete[role=button] { cursor: pointer; border-radius: 999px; padding: 4px 10px; }
.athlete[role=button]:hover { background: var(--bar-hover); }
.account-dialog { width: min(560px, calc(100vw - 32px)); }
.acc-sec { padding: 12px 22px; border-top: 1px solid var(--grid); }
.acc-sec h3 { font-size: 14px; margin: 0 0 4px; }
.acc-sec p { margin: 0 0 8px; }
.acc-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acc-row input { font: inherit; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary); }
.acc-row .btn { cursor: pointer; }
.acc-progress { margin-top: 10px; }
.acc-sec.danger h3 { color: var(--danger); }
.danger-btn { background: var(--danger); color: #fff; }
.acc-sec:last-child { padding-bottom: 20px; }

/* --- Zielgipfel --- */
.goal-icon { display: grid; place-items: center; font-size: 22px; line-height: 1; color: var(--highlight);
  text-shadow: 0 0 3px #fff, 0 0 6px #fff, 0 0 10px rgba(30,134,200,.8); }
.goal-icon.reached { color: #d9a520; }
.goal-leg { font-style: normal; color: var(--highlight); margin-right: 6px; font-size: 13px; }
.peak-pop { display: flex; flex-direction: column; gap: 4px; min-width: 190px; }
.pp-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.pp-actions .btn { font-size: 12px; padding: 5px 12px; }
.goal-peaks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 16px; }
.gp-row { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 10px; cursor: pointer; }
.gp-row:hover { background: var(--surface-2); }
.gp-star { color: var(--highlight); font-size: 17px; }
.gp-row.done .gp-star { color: #d9a520; }
.gp-row.done .gp-name b { text-decoration: line-through; text-decoration-color: var(--text-muted); }
.gp-st { color: var(--text-muted); white-space: nowrap; }
.gp-row .btn.icon { padding: 2px 8px; }

/* --- Privatzonen --- */
.zone-btn { align-self: flex-start; margin-top: 4px; font-size: 13px; padding: 6px 12px; }
.zone-btn.on { background: var(--highlight); color: #fff; }
.zone-panel { border-top: 1px solid var(--grid); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.zone-panel p { margin: 0; color: var(--text-secondary); }
.zone-panel select { font-size: 12px; padding: 3px 8px; margin-left: 4px; }
.zone-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.zone-list .link { padding: 0; text-align: left; font-size: 12px; }
.zone-edit { cursor: crosshair; }
.zone-edit .leaflet-interactive { cursor: pointer; }
.zone-pop { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.zone-pop .btn { font-size: 12px; padding: 4px 10px; align-self: flex-start; }

/* --- Level-Leiter (Dialog) --- */
.ring { cursor: pointer; border-radius: 50%; transition: transform .2s var(--ease); }
.ring:hover, .ring:focus-visible { transform: scale(1.04); outline: none; }
.ring:focus-visible { box-shadow: 0 0 0 3px rgba(242, 166, 90, .6); }
.level-dialog { width: min(520px, calc(100vw - 32px)); max-height: min(80vh, 760px); padding: 0; border: 1px solid var(--border);
  border-radius: 22px; background: var(--surface-1); color: var(--text-primary); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.level-dialog[open] { display: flex; flex-direction: column; animation: drawerIn .3s var(--ease); }
.level-dialog::backdrop { background: rgba(12, 28, 22, .55); backdrop-filter: blur(3px); }
.ld-head { display: flex; justify-content: space-between; gap: 12px; padding: 20px 22px 6px; }
.ld-head .eyebrow { color: var(--highlight); font-weight: 600; }
.ld-head h2 { font-size: 22px; letter-spacing: -.03em; margin: 2px 0 4px; }
.ld-head p { margin: 0; }
.ld-head .btn { align-self: flex-start; flex: none; }
.ld-list { position: relative; }
.ld-how { padding: 0 22px 10px; margin: 0; border-bottom: 1px solid var(--grid); }
.ld-list { overflow: auto; padding: 6px 22px 18px; }
.ld-title { margin: 12px 0 4px; font-weight: 600; font-size: 13px; color: var(--text-muted); }
.ld-title.on { color: var(--accent); }
.ld-row { display: grid; grid-template-columns: 34px 1fr 96px 46px; gap: 10px; align-items: center; padding: 3px 8px; border-radius: 8px; font-size: 13px; }
.ld-row.done { color: var(--text-secondary); }
.ld-row.cur { background: var(--surface-2); font-weight: 600; box-shadow: inset 3px 0 0 var(--highlight); }
.ld-lv { font-weight: 600; text-align: right; }
.ld-bar { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.ld-row.cur .ld-bar { background: var(--surface-1); }
.ld-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--highlight), var(--series-1)) 0 0 / 100cqw 100% no-repeat; }
.ld-xp { text-align: right; font-variant-numeric: tabular-nums; }
.ld-st { font-size: 12px; color: var(--highlight); }
.ld-row.done .ld-st { color: var(--series-1); }

/* --- Jahres-Erfolge --- */
.year-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 12px; }
.year-head .group-h { margin: 0; }
.year-seg { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
.year-seg button small { color: var(--text-muted); font-size: 10px; }
.lifetime-h { margin-top: 34px; font-size: 24px; }

/* --- Erfolgs-Tooltip --- */
.badge-item, .up-item { cursor: help; border-radius: 10px; }
.badge-item:hover, .up-item:hover { background: var(--surface-2); }
.ach-tip { max-width: 280px; }
.ach-tip p { margin: 2px 0 6px; color: var(--text-secondary); }
.ach-tip .tt-now { margin-bottom: 6px; }
.tt-tiers { display: flex; flex-direction: column; gap: 3px; }
.tt-tier { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.tt-tier.on { color: var(--text-primary); }
.tt-tier .tier-dot { width: 10px; height: 10px; flex: none; }

/* --- Footer & Rechtsseiten --- */
.site-footer { max-width: 1440px; margin: 0 auto; padding: 8px 24px 32px; font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: var(--text-secondary); }
.sf-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.sf-links a { font-weight: 500; text-decoration: none; }
.sf-links a:hover { color: var(--highlight); }
.sf-strava { margin-left: auto; }
.legal { max-width: 860px; }
.legal-nav { display: flex; gap: 8px; margin: 8px 0 16px; font-weight: 500; }
.legal-nav a { color: var(--accent); }
.legal-doc { padding: 28px 32px; line-height: 1.6; }
.legal-doc h1 { font-size: 30px; font-weight: 600; letter-spacing: -.03em; margin-bottom: 12px; }
.legal-doc h2 { font-size: 19px; margin: 26px 0 8px; }
.legal-doc h3 { font-size: 15px; margin: 18px 0 6px; }
.legal-doc blockquote { margin: 12px 0; padding: 12px 16px; background: var(--surface-2); border-left: 3px solid var(--highlight); border-radius: 8px; }
.legal-doc table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 10px 0; }
.legal-doc th, .legal-doc td { border-bottom: 1px solid var(--grid); padding: 6px 8px; text-align: left; vertical-align: top; }
.legal-doc a { color: var(--accent); }
@media (max-width: 640px) { .legal-doc { padding: 20px 18px; } .sf-strava { margin-left: 0; } }

/* --- Jahresziele --- */
.goals-card { margin-bottom: 16px; }
.goal-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.goal { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; }
.g-ring { position: relative; width: 72px; height: 72px; }
.g-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.g-ring circle { fill: none; stroke-width: 7; }
.gr-bg { stroke: var(--surface-2); }
.gr-fg { stroke: var(--highlight); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); } /* unterwegs: blau */
.gr-fg.done { stroke: var(--series-1); } /* Ziel erreicht (≥ 100 %): grün */
.gr-pace { stroke: var(--text-primary); stroke-width: 2.5; stroke-linecap: round; opacity: .7; }
.g-ring span { position: absolute; inset: 0; display: grid; place-content: center; font-weight: 600; font-size: 14px; }
.goal b { font-weight: 600; }
.g-val { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.g-val small { font-size: 13px; color: var(--text-muted); font-weight: 400; letter-spacing: 0; }
.goal .ok { color: var(--series-1); font-weight: 600; }
.goal .warn { color: var(--danger); font-weight: 600; }
.goal-edit { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.goal-edit label { display: flex; flex-direction: column; gap: 4px; }
.goal-edit label span { font-weight: 500; }
.goal-edit input { font: inherit; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary); }
.ge-actions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
.toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.toggle input { accent-color: var(--accent); }
.import-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.import-box .btn { cursor: pointer; }
.import-log { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
#homeBtn { font-size: 12px; padding: 2px 10px; }

@media (max-width: 1100px) {
  .world-grid, .regions-split { grid-template-columns: minmax(0, 1fr); }
  .continents { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero { padding: 20px; border-radius: 22px; }
  .hero-main { gap: 16px; }
  .hero-stats > div { min-width: 0; flex: 1 1 40%; }
  .continents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-grid { grid-template-columns: 1fr 1fr; }
  .world-map { height: 240px; }
  .tile-map { height: 360px; }
}

/* --- Demo-Modus (statischer Export) --- */
.demo .demo-hide { display: none !important; }
.demo-banner { background: var(--highlight); color: #fff; text-align: center; font-size: 13px; font-weight: 500; padding: 6px 16px; }

/* ---------- Vergleich ---------- */
.cm-note { background: color-mix(in srgb, var(--highlight) 12%, var(--surface-1)); border: 1px solid color-mix(in srgb, var(--highlight) 40%, transparent);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; font-size: 13px; line-height: 1.5; }
.cm-me td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cm-detail { margin-top: 16px; display: grid; gap: 16px; }
.cm-detail .kpis { margin-bottom: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cm-head { display: flex; justify-content: space-between; align-items: center; }
.cm-head h2 { margin: 0; }
.cm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cm-grid .span2 { grid-column: 1 / -1; }
.cm-map { height: 460px; }
.cm-goal { margin: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.cm-goal .pbar { grid-column: 1 / -1; }
.cm-ach { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2, var(--surface-1)); border: 1px solid var(--border); }
.cm-badge b { font-weight: 600; margin-left: 4px; }
.cm-opt { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 14px; }
.cm-opt input { margin-top: 4px; }
.cm-opt.main { font-size: 15px; }
.cm-off { opacity: .45; pointer-events: none; }
.cm-tracks { margin: 4px 0 6px; flex-wrap: wrap; }
.cm-filter { margin-bottom: 12px; align-items: center; }
.cm-filter .link { margin-left: 8px; }
.cm-home select { max-width: 100%; }
@media (max-width: 900px) {
  .cm-grid { grid-template-columns: minmax(0, 1fr); }
  .cm-detail .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Verlaufs-Dialog (Jahresziele, Erfolge) ---------- */
.trend-dialog { width: min(760px, calc(100vw - 32px)); }
.trend-chart { height: 320px; margin: 10px 22px 20px; }
.trend-legend { margin: 8px 22px 0; gap: 16px; flex-wrap: wrap; }
.trend-legend .sw { margin-right: 4px; }
.goal[data-m], .ach[data-a] { cursor: pointer; }
.goal[data-m]:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); border-radius: 12px; }

/* ---------- Hintergrund-Import ---------- */
.upload-pill { position: fixed; right: 16px; bottom: 16px; z-index: 2000; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  max-width: calc(100vw - 32px); background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,.25); padding: 10px 14px; font-size: 13px; }
.upload-pill .pbar { width: 160px; }
.upload-pill .up-open { font-weight: 600; }
.upload-pill.done { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

/* ---------- Profil ---------- */
.pf-form { display: grid; gap: 10px; }
.pf-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 500; }
.pf-form input, .pf-form textarea { font: inherit; font-weight: 400; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-primary); }
.cm-bio { margin: 6px 0 0; font-size: 14px; max-width: 70ch; }
.cm-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cm-links .chip { text-decoration: none; }

/* ---------- Profilbild ---------- */
.ring-avatar { position: absolute; border-radius: 50%; object-fit: cover; width: auto; height: auto; }
.ring .lv-badge { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); min-width: 34px; padding: 3px 10px;
  border-radius: 999px; background: var(--glacier, #8fd3f4); color: #12261f; font-family: var(--font-display); font-weight: 600;
  font-size: 17px; line-height: 1.1; text-align: center; box-shadow: 0 0 0 3px #1a372d; }
.hero.slim .ring .lv-badge { font-size: 15px; }
.av-row { display: flex; gap: 16px; align-items: center; }
.av-preview { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; flex: none; background: var(--surface-2);
  display: grid; place-items: center; box-shadow: 0 0 0 3px var(--glacier, #8fd3f4); }
.av-preview img { width: 100%; height: 100%; object-fit: cover; }
.av-empty { font-size: 32px; }
.av-actions { display: grid; gap: 6px; justify-items: start; }
.av-crop { margin-top: 14px; display: grid; justify-items: center; gap: 8px; }
.av-stage { position: relative; touch-action: none; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.av-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.av-stage canvas:active { cursor: grabbing; }
.av-mask { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(10,20,16,.58);
  outline: 2px solid rgba(255,255,255,.85); outline-offset: -2px; }
.av-ctrl { display: flex; gap: 8px; align-items: center; width: 260px; }
.av-ctrl input { flex: 1; }
.cm-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.cm-head-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-right: 14px; box-shadow: 0 0 0 3px var(--glacier, #8fd3f4); }

/* Erfolgs-Dialog: Liste der zugehörigen Einträge */
.trend-dialog { width: min(860px, calc(100vw - 32px)); max-height: min(88vh, 900px); }
.ach-items { padding: 0 22px 20px; overflow: auto; }
.ach-items h3 { margin: 6px 0 6px; font-family: var(--font-display); font-size: 18px; }
.ach-table { max-height: 46vh; border: 1px solid var(--border); border-radius: 12px; }
.ach-table .mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .1em; }
.ach-table a { color: inherit; text-decoration: none; } .ach-table a:hover { color: var(--highlight); }
.ach[data-a] { cursor: pointer; }

/* Fortschrittsbalken: Verlauf über die ganze Balkenlänge (blau = wenig, grün = voll); die Füllung zeigt nur ihren Teil */
.xpbar, .bigbar, .pbar, .ld-bar { container-type: inline-size; }

/* Import-Anleitung im Konto-Dialog */
.imp-help { margin: 12px 0 4px; }
.imp-help p { margin: 0 0 6px; }
.imp-seg { flex-wrap: wrap; }
.imp-steps { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
  font-size: 13px; line-height: 1.55; max-height: 42vh; overflow: auto; }
.imp-steps p { margin: 6px 0; } .imp-steps ol, .imp-steps ul { margin: 6px 0 10px; padding-left: 20px; } .imp-steps li { margin: 3px 0; }
