:root {
  --bg: #070b16;
  --bg2: #0e1528;
  --panel: rgba(16, 22, 40, 0.92);
  --card: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef2fb;
  --muted: #8b96b3;
  --accent: #ffc94a;
  --ok: #3ecf8e;
  --danger: #ff6b6b;
  --tabbar: 62px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bottom: calc(var(--tabbar) + var(--safe-bottom));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #12203f 0%, var(--bg) 70%);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}

#globe { position: fixed; inset: 0; touch-action: none; }
#globe canvas { display: block; cursor: grab; }

button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; min-width: 0; }

.primary, .ghost, .danger {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 15px;
}
.primary { background: var(--accent); color: #1b1400; }
.ghost { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.danger { background: rgba(255, 107, 107, 0.12); color: var(--danger); }

/* ---------- górny pasek mapy ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to bottom, rgba(7, 11, 22, 0.85), rgba(7, 11, 22, 0));
  pointer-events: none;
  z-index: 2;
}
.topbar > * { pointer-events: auto; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: 0.3px; }
.stats { margin-left: auto; text-align: right; line-height: 1.1; }
.stats-num { font-size: 22px; font-weight: 800; color: var(--accent); }
.stats-label { display: block; font-size: 12px; color: var(--muted); }

.icon-btn {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid; place-items: center;
  font-size: 24px; line-height: 1;
  flex: none;
}
#labelsBtn { font-size: 15px; font-weight: 700; color: var(--muted); }
#labelsBtn.active { color: var(--accent); border-color: rgba(255, 201, 74, 0.4); }

.loading, .hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
  transition: opacity 0.6s;
  text-align: center;
  white-space: nowrap;
}
.loading { top: 50%; }
.hint { bottom: calc(var(--bottom) + 20px); opacity: 0; }
.hint.show { opacity: 1; }

/* ---------- nazwy krajów na globusie ---------- */
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.label {
  position: absolute;
  left: 0; top: 0;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 0 3px #000, 0 0 6px #000, 0 1px 2px #000;
  white-space: nowrap;
  will-change: transform;
}
.label.visited { color: #fff; font-weight: 800; }
.label.selected { color: #4dd8ff; font-size: 13px; }

/* ---------- podpowiedź po najechaniu ---------- */
.tooltip {
  position: fixed;
  left: 0; top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  white-space: nowrap;
  z-index: 3;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.tooltip.show { opacity: 1; }
.tooltip img { width: 22px; height: 16px; border-radius: 2px; object-fit: cover; }
.tip-ok { color: var(--ok); font-size: 13px; }

/* ---------- karta kraju ---------- */
.card {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(var(--bottom) + 12px);
  max-width: 480px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 14px;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: up 0.22s ease-out;
  z-index: 4;
}
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
.card-flag {
  width: 64px; height: 48px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line);
}
.card-name { font-size: 19px; font-weight: 700; padding-right: 28px; }
.card-region { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: 0;
  font-size: 26px; line-height: 1; color: var(--muted);
  padding: 4px 6px;
}
.card-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.toggle {
  flex: 1;
  border: 0;
  border-radius: 12px;
  padding: 13px;
  font-weight: 700;
  font-size: 16px;
  background: var(--accent);
  color: #1b1400;
}
.toggle.on { background: rgba(62, 207, 142, 0.15); color: var(--ok); box-shadow: inset 0 0 0 1.5px var(--ok); }

/* ---------- panel listy krajów ---------- */
.panel {
  position: fixed;
  top: 0; right: 0;
  bottom: var(--bottom);
  width: min(420px, 100%);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--safe-top) + 12px);
  animation: slide 0.22s ease-out;
  z-index: 5;
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.panel-head { display: flex; gap: 10px; padding: 0 16px 10px; }
input, textarea {
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  outline: none;
  width: 100%;
  color-scheme: dark;
}
input:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 90px; }
#search { flex: 1; min-width: 0; height: 42px; }
.filters { display: flex; gap: 8px; padding: 0 16px 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.list {
  list-style: none;
  margin: 0;
  padding: 0 8px 16px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.list li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; }
.list li:hover { background: rgba(255, 255, 255, 0.04); }
.list img { width: 32px; height: 24px; border-radius: 3px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--line); }
.list .name { flex: 1; min-width: 0; font-size: 15px; }
.list .name small { display: block; color: var(--muted); font-size: 12px; }
.check {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  background: transparent;
  display: grid; place-items: center;
  flex: none;
  color: transparent;
  font-size: 16px;
  font-weight: 800;
}
.check.on { background: var(--ok); border-color: var(--ok); color: #04130c; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* ---------- strony: statystyki i podróże ---------- */
.page {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--bottom);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--bg2), var(--bg));
  padding: calc(var(--safe-top) + 16px) 16px 32px;
  z-index: 6;
  -webkit-overflow-scrolling: touch;
}
.page-inner { max-width: 720px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-title { font-size: 26px; margin: 4px 0 16px; }
.section-title { font-size: 16px; margin: 26px 0 10px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }

.hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  position: relative;
}
.ring { width: 128px; height: 128px; flex: none; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray 0.6s; }
.hero-center { position: absolute; left: 18px; width: 128px; text-align: center; }
.hero-num { font-size: 36px; font-weight: 800; line-height: 1; }
.hero-of { color: var(--muted); font-size: 13px; }
.hero-pct { font-size: 30px; font-weight: 800; color: var(--accent); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.tile-big { font-size: 24px; font-weight: 800; }

.bar-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.bar-name { width: 140px; flex: none; font-size: 14px; }
.bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff9f43); border-radius: 99px; }
.bar-val { width: 70px; text-align: right; font-size: 13px; color: var(--muted); flex: none; margin-left: auto; }
.bar-sub { font-size: 12px; color: var(--muted); margin: -4px 0 6px 150px; }
@media (max-width: 420px) { .bar-name { width: 110px; } .bar-sub { margin-left: 120px; } }

.rank-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.rank-row img { width: 28px; height: 21px; border-radius: 3px; object-fit: cover; }
.rank { width: 20px; color: var(--muted); font-weight: 700; }
.facts { display: grid; gap: 12px; }
.fact { display: flex; flex-direction: column; gap: 2px; }

/* lista podróży */
.trip {
  display: flex;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
}
.trip:hover { border-color: rgba(255, 255, 255, 0.2); }
.trip-flags { display: grid; grid-template-columns: repeat(2, 30px); gap: 4px; align-content: start; flex: none; }
.trip-flags img { width: 30px; height: 22px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.trip-flags .more { font-size: 11px; color: var(--muted); grid-column: 1 / -1; }
.trip-main { flex: 1; min-width: 0; }
.trip-main h3 { margin: 0 0 3px; font-size: 16px; }
.trip-line { font-size: 14px; margin-top: 5px; }
.empty-state { text-align: center; padding: 50px 20px; }
.empty-icon { font-size: 48px; }

/* ---------- formularz podróży ---------- */
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 30;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.sheet-inner {
  background: var(--bg2);
  width: 100%;
  max-width: 560px;
  min-height: 100%;
  padding-bottom: calc(var(--safe-bottom) + 24px);
  animation: up 0.22s ease-out;
}
@media (min-width: 600px) {
  .sheet { padding: 40px 16px; }
  .sheet-inner { min-height: 0; border-radius: 20px; border: 1px solid var(--line); }
}
.sheet-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.sheet-head h2 { font-size: 17px; margin: 0; }
.form { padding: 16px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips-wrap .chip.active { background: rgba(255, 201, 74, 0.15); color: var(--accent); border-color: var(--accent); }
.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 4px 4px 6px;
  font-size: 14px;
}
.country-chip img { width: 22px; height: 16px; border-radius: 2px; object-fit: cover; }
.country-chip button {
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 22px; height: 22px;
  line-height: 1;
  padding: 0;
}
.picker { position: relative; }
.picker-results {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  position: absolute;
  left: 0; right: 0;
  background: #18213a;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.picker-results:empty { display: none; }
.picker-results li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.picker-results li:hover, .picker-results li:first-child { background: rgba(255, 255, 255, 0.06); }
.picker-results img { width: 26px; height: 19px; border-radius: 2px; object-fit: cover; }

/* ---------- dolny pasek zakładek ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--bottom);
  padding-bottom: var(--safe-bottom);
  display: flex;
  background: rgba(9, 13, 26, 0.96);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.tabbar button {
  flex: 1;
  background: none;
  border: 0;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
}
.tabbar button.active { color: var(--accent); }

.toast {
  position: fixed;
  top: calc(var(--safe-top) + 76px);
  left: 50%;
  transform: translate(-50%, -10px);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 40;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =================== v0.4: nowe elementy =================== */
.tiny { font-size: 11px; }
.icon-btn.active { color: var(--accent); border-color: rgba(255, 201, 74, 0.4); }
@media (max-width: 440px) {
  .brand { display: none; }
  .stats { margin-left: 0; margin-right: auto; text-align: left; }
}

.label.wish { color: #ffd66e; }
.tip-wish { color: var(--accent); }
.wish-mark { color: var(--accent); font-size: 12px; }

/* karta kraju */
.card { max-height: calc(100vh - var(--bottom) - 90px); overflow-y: auto; }
.heart { font-size: 20px; padding: 10px 14px; }
.heart.on { color: var(--accent); background: rgba(255, 201, 74, 0.14); }
.facts-toggle {
  grid-column: 1 / -1;
  background: none; border: 0;
  color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 2px 0; text-align: left;
}
.facts-box { grid-column: 1 / -1; font-size: 14px; }
.facts-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.neighbors { margin-top: 6px; }
.neighbors .country-chip { border: 0; color: var(--text); padding: 4px 10px 4px 6px; font-size: 13px; cursor: pointer; }
.neighbors .country-chip.visited { box-shadow: inset 0 0 0 1.5px var(--ok); }

/* oś czasu */
.timeline {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(var(--bottom) + 12px);
  max-width: 560px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 12px;
  z-index: 4;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tl-main { flex: 1; min-width: 0; }
.tl-label { font-size: 14px; margin-bottom: 4px; }
.tl-label b { color: var(--accent); font-size: 18px; }
#tlRange { width: 100%; padding: 0; accent-color: var(--accent); background: none; border: 0; }
body.timeline-on .card { display: none; }

/* odznaki */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 10px; text-align: center; opacity: 0.55;
}
.badge.done { opacity: 1; border-color: rgba(255, 201, 74, 0.45); background: rgba(255, 201, 74, 0.07); }
.badge-icon { font-size: 30px; filter: grayscale(1); }
.badge.done .badge-icon { filter: none; }
.badge-name { font-weight: 700; font-size: 14px; margin: 4px 0 2px; }
.badge-prog { height: 5px; background: rgba(255,255,255,.08); border-radius: 9px; margin: 8px 6px 3px; overflow: hidden; }
.badge-prog span { display: block; height: 100%; background: var(--accent); }

/* lista marzeń w statystykach */
.wish-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.wish-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 201, 74, 0.08); border: 1px solid rgba(255, 201, 74, 0.4);
  border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 14px;
}
.wish-chip img { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; }

/* ustawienia */
.settings { display: grid; gap: 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.set-note { margin: 0; }
.segment { display: inline-flex; background: rgba(255,255,255,.06); border-radius: 12px; padding: 3px; flex-wrap: wrap; }
.segment button { border: 0; background: none; color: var(--muted); padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; }
.segment button.active { background: var(--text); color: var(--bg); }
.swatches { display: flex; gap: 8px; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
.swatch.custom { display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: 15px; position: relative; overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.switch-row { cursor: pointer; }
.switch {
  appearance: none; -webkit-appearance: none;
  width: 46px; height: 28px; border-radius: 99px; padding: 0;
  background: rgba(255,255,255,.15); border: 0; position: relative; cursor: pointer; flex: none;
  transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; transition: transform .2s;
}
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(18px); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check-row input { width: auto; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.file-btn { cursor: pointer; display: inline-flex; align-items: center; }

/* zdjęcia i miasta w podróżach */
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.05); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.photo-thumb button {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.6); color: #fff; padding: 0; line-height: 1;
}
.photo-add {
  aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); font-size: 24px; cursor: pointer;
}
.photo-add span { font-size: 12px; }
.trip-photos { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.trip-photos img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.trip-photos .more { font-size: 12px; color: var(--muted); }
.picker-results li span { min-width: 0; }

/* udostępnianie */
.share-preview { width: 100%; border-radius: 14px; background: rgba(255,255,255,.04); min-height: 200px; }

/* miasta na karcie kraju */
.card-cities { grid-column: 1 / -1; display: grid; gap: 6px; }
.cities-head { display: flex; align-items: center; justify-content: space-between; }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 13px; padding: 2px 0; }
.city-chip { cursor: pointer; padding: 4px 6px 4px 10px; font-size: 13px; }
.city-chip:hover { background: rgba(255, 255, 255, 0.14); }
.picker-results.inline { position: static; margin-top: 6px; box-shadow: none; }

/* =================== v0.6: klikalne statystyki, odznaka w powiększeniu =================== */
button.go {
  font: inherit; color: inherit; text-align: left; width: 100%;
  cursor: pointer; position: relative;
  transition: transform .15s, border-color .15s, background .15s;
}
button.hero.go, button.tile.go { border: 1px solid var(--line); }
button.bar-row.go, button.rank-row.go, button.fact.go, button.year-row.go {
  background: none; border: 0; border-radius: 10px; padding-left: 6px; padding-right: 6px; margin: 0 -6px; width: calc(100% + 12px);
}
button.year-row.go { display: block; padding-top: 0; padding-bottom: 0; }
button.fact.go { padding-top: 4px; padding-bottom: 4px; }
button.go:hover { border-color: rgba(255, 255, 255, 0.22); }
button.bar-row.go:hover, button.rank-row.go:hover, button.fact.go:hover, button.year-row.go:hover { background: rgba(255, 255, 255, 0.05); }
button.go:active { transform: scale(0.98); }
.go-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 20px; opacity: .5; }
.tile .go-arrow { top: 14px; transform: none; }
.hero .hero-side { padding-right: 18px; }

button.badge { font: inherit; color: inherit; cursor: pointer; transition: transform .15s, opacity .15s; }
button.badge:hover { transform: translateY(-2px); opacity: .85; }
button.badge.done:hover { opacity: 1; }

.cont-chip { background: rgba(77, 216, 255, 0.14) !important; border-color: rgba(77, 216, 255, 0.5) !important; color: #bdefff !important; }

.badge-modal {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(3, 6, 14, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px);
}
.badge-card {
  position: relative;
  width: min(420px, 100%);
  max-height: 100%;
  overflow-y: auto;
  background: linear-gradient(180deg, #172446, #0d1428);
  border: 1px solid rgba(255, 201, 74, 0.35);
  border-radius: 24px;
  padding: 28px 20px 16px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform-origin: center;
}
.bm-close {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.08); font-size: 22px; line-height: 1;
}
.bm-icon { font-size: 84px; line-height: 1.1; filter: grayscale(1); opacity: .6; }
.bm-icon.done { filter: drop-shadow(0 0 22px rgba(255, 201, 74, 0.55)); opacity: 1; animation: bm-pop .6s ease-out; }
@keyframes bm-pop { 0% { transform: scale(.6) rotate(-12deg); } 60% { transform: scale(1.12) rotate(4deg); } 100% { transform: none; } }
.bm-name { font-size: 24px; font-weight: 800; margin-top: 8px; }
.bm-status { display: inline-block; margin-top: 8px; padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.bm-status.done { background: rgba(255, 201, 74, 0.14); color: var(--accent); }
.bm-section { text-align: left; margin-top: 18px; display: grid; gap: 6px; }
.bm-prog { height: 8px; background: rgba(255, 255, 255, .08); border-radius: 9px; overflow: hidden; margin-top: 4px; }
.bm-prog span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff9f43); }
.bm-chips .country-chip { border: 0; color: var(--text); padding: 4px 10px 4px 6px; font-size: 13px; cursor: pointer; }
.bm-chips .country-chip.visited { box-shadow: inset 0 0 0 1.5px var(--ok); }
.bm-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.bm-nav .icon-btn { width: 38px; height: 38px; font-size: 22px; }

#viewBtn { font-size: 20px; }

/* kraje na dwóch kontynentach */
.cont-row { gap: 8px; }
.cont-name { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.cont-name img { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; }
.cont-row .segment button { padding: 6px 10px; font-size: 12px; }

/* planowane podróże */
.trip-kind { margin-bottom: 4px; }
.trip-kind button { flex: 1; }
.trip.planned { border: 1px dashed rgba(255, 201, 74, .45); }
.trip-countdown {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; vertical-align: middle;
  background: rgba(255, 201, 74, .16); color: var(--accent, #ffc94a);
}

/* przypomnienie o kopii zapasowej */
.backup-banner {
  position: fixed; left: 12px; right: 12px; z-index: 40;
  top: calc(var(--safe-top) + 70px);
  max-width: 480px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0; transform: translateY(-10px); transition: opacity .25s, transform .25s;
}
.backup-banner.show { opacity: 1; transform: none; }
.bb-text { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.bb-text span { color: var(--muted, #9aa4bf); font-size: 13px; }
.bb-btns { display: flex; gap: 8px; }
.bb-btns button { flex: 1; }

/* premium */
.premium-box { gap: 10px; }
.premium-pitch { display: flex; flex-direction: column; gap: 4px; }
.premium-have { font-size: 15px; }
.pw-card { border-color: rgba(255, 201, 74, 0.55); }
.pw-crown { font-size: 64px; line-height: 1.1; filter: drop-shadow(0 0 22px rgba(255, 201, 74, 0.55)); }
.pw-list { list-style: none; margin: 18px 0 10px; padding: 0; display: grid; gap: 8px; text-align: left; }
.pw-list li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 14px; }
.pw-list li span { font-size: 20px; width: 26px; text-align: center; }
.pw-list li.hl { background: rgba(255, 201, 74, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 201, 74, 0.5); }
.pw-buy { width: 100%; margin-top: 10px; padding: 14px; font-size: 16px; }
.pw-restore { width: 100%; margin-top: 8px; }

/* stany USA */
.trip-states { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.trip-states span { display: inline-flex; align-items: center; gap: 4px; }
.trip-states img { width: 18px; height: 12px; object-fit: cover; border-radius: 2px; }

.trip-countdown.now { background: rgba(62, 207, 142, .16); color: var(--ok, #3ecf8e); }
