/* =========================================================================
   monety.susquad.pl — gabinet numizmatyczny
   Ciemne tło, mosiądz, hairline'y. Bez gradientowych kart i glassmorphizmu.
   ========================================================================= */

:root {
  --bg:          #08080a;
  --bg-soft:     #0c0c0f;
  --panel:       #101014;
  --panel-2:     #15151b;
  --panel-3:     #1b1b22;

  --line:        rgba(255,255,255,.065);
  --line-2:      rgba(255,255,255,.11);
  --line-3:      rgba(255,255,255,.2);

  --ink:         #f2f0ec;
  --ink-2:       #a29eaa;
  --ink-3:       #6c6976;
  --ink-4:       #46434e;

  --brass:       #d7a54a;
  --brass-hi:    #f0c876;
  --brass-dim:   #8a6a2c;
  --brass-wash:  rgba(215,165,74,.10);

  --good:        #74c493;
  --danger:      #e2694f;

  --r-sm: 3px;
  --r:    6px;
  --r-lg: 12px;

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif:'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --top: 58px;
  --pad: clamp(16px, 4vw, 44px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  /* ciepła poświata u góry — imituje światło padające na gablotę */
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(1100px 520px at 50% -14%, rgba(215,165,74,.075), transparent 62%),
    radial-gradient(760px 420px at 88% 8%, rgba(120,140,220,.035), transparent 60%);
  pointer-events: none; z-index: 0;
}

.grain {
  position: fixed; inset: -50%;
  z-index: 1; pointer-events: none; opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(215,165,74,.3); }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 2px; }

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: #2a2a33 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #24242c; border: 3px solid var(--bg); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #34343f; }

/* ---------------------------------------------------------------- typografia */

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }

h1, h2, h3 { margin: 0; font-weight: 400; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--top);
  display: flex; align-items: center; gap: 22px;
  padding: 0 var(--pad);
  background: rgba(8,8,10,.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand__mark { color: var(--brass); display: flex; }
.brand__text {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: .005em;
  line-height: 1;
  padding-bottom: 2px;
}

.nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.nav a {
  padding: 6px 11px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.nav a.is-active { color: var(--ink); background: rgba(255,255,255,.06); }

.topbar__right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.search {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink-3);
  transition: border-color .15s, background .15s;
  width: 250px;
}
.search:focus-within { border-color: var(--line-3); background: var(--panel-3); }
.search input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: 0;
  font-size: 13.5px; color: var(--ink);
}
.search input::placeholder { color: var(--ink-4); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  font-family: var(--mono); font-size: 10px;
  padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 3px;
  color: var(--ink-4);
}
.search:focus-within kbd { opacity: 0; }

.nav-toggle { display: none; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.btn:hover { background: var(--panel-3); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn--primary {
  background: var(--brass); border-color: var(--brass);
  color: #17130a; font-weight: 600;
}
.btn--primary:hover { background: var(--brass-hi); border-color: var(--brass-hi); }

.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { color: var(--ink); background: rgba(255,255,255,.045); }

.btn--icon { width: 34px; padding: 0; }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn--danger { color: var(--danger); border-color: rgba(226,105,79,.3); }
.btn--danger:hover { background: rgba(226,105,79,.1); border-color: rgba(226,105,79,.5); }

/* ---------------------------------------------------------------- layout */

.view { position: relative; z-index: 2; padding: 0 var(--pad) 96px; }

.wrap { max-width: 1560px; margin: 0 auto; }

.masthead {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  padding: clamp(30px, 6vw, 62px) 0 26px;
}
.masthead__title {
  font-family: var(--serif);
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: .96; letter-spacing: -.02em;
}
.masthead__title em { font-style: italic; color: var(--brass); }
.masthead__sub { margin-top: 12px; color: var(--ink-2); font-size: 14.5px; max-width: 46ch; }

.tally { display: flex; gap: 28px; flex-wrap: wrap; }
.tally__item { display: flex; flex-direction: column; gap: 3px; }
.tally__n { font-family: var(--mono); font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.tally__n small { font-size: 13px; color: var(--ink-3); }

/* ---------------------------------------------------------------- filtry */

.filters {
  position: sticky; top: var(--top); z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0;
  margin-bottom: 8px;
  background: linear-gradient(var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}
.chips {
  display: flex; gap: 6px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; padding-bottom: 1px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 29px; padding: 0 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer; white-space: nowrap;
  transition: all .14s;
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip.is-on {
  color: var(--brass-hi);
  border-color: rgba(215,165,74,.45);
  background: var(--brass-wash);
}
.chip__n { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); }
.chip.is-on .chip__n { color: rgba(240,200,118,.7); }

.select {
  height: 29px; padding: 0 26px 0 10px;
  background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1.5 5 5.5 9 1.5' fill='none' stroke='%236c6976' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 9px center;
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: 12.5px; color: var(--ink-2);
  appearance: none; cursor: pointer;
}
.select:hover { border-color: var(--line-2); color: var(--ink); }

/* ---------------------------------------------------------------- siatka monet */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: clamp(14px, 2vw, 26px) clamp(12px, 1.6vw, 20px);
  padding-top: 22px;
}

.coin {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 10px 16px;
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: background .22s;
}
.coin::after {
  content: ''; position: absolute; inset: 0;
  border-radius: var(--r-lg);
  border: 1px solid transparent;
  transition: border-color .22s;
  pointer-events: none;
}
.coin:hover { background: rgba(255,255,255,.022); }
.coin:hover::after { border-color: var(--line); }

.coin__stage {
  position: relative;
  width: 100%; aspect-ratio: 1;
  perspective: 900px;
}
.coin__stage::before {
  /* plama światła pod monetą */
  content: ''; position: absolute; inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 44%, rgba(215,165,74,.11), transparent 66%);
  opacity: 0; transition: opacity .3s;
}
.coin:hover .coin__stage::before { opacity: 1; }

.coin__flip {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .62s cubic-bezier(.22,.68,.32,1);
}
.coin:hover .coin__flip, .coin__flip.is-flipped { transform: rotateY(180deg); }
.coin__face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center;
}
.coin__face--back { transform: rotateY(180deg); }
.coin__face img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.62)) drop-shadow(0 1px 0 rgba(255,255,255,.05));
  transition: filter .3s;
}
.coin:hover .coin__face img {
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.7)) drop-shadow(0 0 22px rgba(215,165,74,.13));
}

.coin__meta { margin-top: 14px; text-align: center; width: 100%; }
.coin__name {
  font-family: var(--serif); font-size: 17px; line-height: 1.22;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.coin__place {
  margin-top: 5px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.coin__flag { margin-right: 5px; }

.coin__badge {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 3px;
  background: rgba(215,165,74,.13); color: var(--brass);
  border: 1px solid rgba(215,165,74,.24);
}
.coin__badge--wish { background: rgba(120,140,220,.12); color: #97a9e8; border-color: rgba(120,140,220,.25); }
.coin__fav { position: absolute; top: 12px; left: 12px; color: var(--brass); opacity: .9; }

.coin--wish .coin__face img { filter: grayscale(.75) brightness(.62) drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.coin--wish:hover .coin__face img { filter: grayscale(.25) brightness(.85) drop-shadow(0 12px 20px rgba(0,0,0,.6)); }
.coin--ghost .coin__stage { display: grid; place-items: center; }
.coin__ghost {
  width: 76%; aspect-ratio: 1; border-radius: 50%;
  border: 1.5px dashed var(--line-2);
  display: grid; place-items: center;
  color: var(--ink-4);
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
}

/* ---------------------------------------------------------------- empty / loading */

.empty {
  padding: 90px 20px; text-align: center; color: var(--ink-3);
}
.empty__title { font-family: var(--serif); font-size: 28px; color: var(--ink-2); margin-bottom: 8px; }

.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 26px 20px; padding-top: 22px; }
.skel { border-radius: var(--r-lg); }
.skel__disc { width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--panel); animation: pulse 1.5s ease-in-out infinite; }
.skel__line { height: 11px; margin: 16px auto 0; width: 70%; border-radius: 3px; background: var(--panel); animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .5 } 50% { opacity: .9 } }

/* ---------------------------------------------------------------- overlay / szuflada */

.overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: stretch; justify-content: flex-end;
  background: rgba(4,4,6,.72);
  backdrop-filter: blur(3px);
  animation: fade .18s ease;
}
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0 } }

.sheet {
  position: relative;
  width: min(1120px, 100%);
  background: var(--bg-soft);
  border-left: 1px solid var(--line-2);
  box-shadow: -30px 0 80px rgba(0,0,0,.6);
  overflow-y: auto;
  animation: slide .3s cubic-bezier(.2,.7,.3,1);
}
@keyframes slide { from { transform: translateX(34px); opacity: 0 } }

.sheet--narrow { width: min(620px, 100%); }
.sheet--wide   { width: min(1400px, 100%); }

.sheet__close {
  position: absolute; top: 16px; right: 18px; z-index: 5;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(10,10,13,.7); color: var(--ink-2);
  cursor: pointer; transition: all .15s;
}
.sheet__close:hover { color: var(--ink); border-color: var(--line-3); background: var(--panel-2); }

/* ---------------------------------------------------------------- detal monety */

.detail { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,420px); min-height: 100%; }

.detail__stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px;
  padding: clamp(30px, 5vw, 70px) clamp(20px, 4vw, 60px);
  background:
    radial-gradient(circle at 50% 42%, rgba(215,165,74,.09), transparent 58%),
    var(--bg);
  border-right: 1px solid var(--line);
}
.detail__coin {
  width: min(440px, 62vh, 100%); aspect-ratio: 1;
  perspective: 1400px; cursor: pointer;
}
.detail__flip {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.22,.68,.32,1);
}
.detail__flip.is-flipped { transform: rotateY(180deg); }
.detail__face { position: absolute; inset: 0; backface-visibility: hidden; }
.detail__face--back { transform: rotateY(180deg); }
.detail__face img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 26px 44px rgba(0,0,0,.72));
}
.detail__sides { display: flex; align-items: center; gap: 10px; }
.side-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 100px;
  background: transparent; color: var(--ink-3);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; transition: all .15s;
}
.side-btn.is-on { color: var(--brass); border-color: rgba(215,165,74,.4); background: var(--brass-wash); }

.detail__info { padding: clamp(26px, 3.4vw, 46px) clamp(22px, 3vw, 40px) 60px; }
.detail__eyebrow { margin-bottom: 10px; }
.detail__title {
  font-family: var(--serif); font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.05; letter-spacing: -.015em; margin-bottom: 6px;
}
.detail__place { color: var(--ink-2); font-size: 14px; margin-bottom: 26px; }

.facts { border-top: 1px solid var(--line); }
.fact {
  display: grid; grid-template-columns: 122px 1fr; gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.fact__k {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); padding-top: 3px;
}
.fact__v { color: var(--ink); overflow-wrap: anywhere; }
.fact__v a { color: var(--brass); border-bottom: 1px solid rgba(215,165,74,.3); }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-family: var(--mono); font-size: 10.5px;
  padding: 2px 8px; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--ink-2);
  cursor: pointer;
}
.tag:hover { border-color: var(--brass); color: var(--brass); }

.detail__map { height: 210px; margin-top: 26px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.detail__notes { margin-top: 24px; color: var(--ink-2); font-size: 14px; line-height: 1.62; white-space: pre-wrap; }
.detail__actions { display: flex; gap: 8px; margin-top: 30px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- mapa */

.mapview { height: calc(100vh - var(--top)); margin: 0 calc(var(--pad) * -1); position: relative; }
#map, #picker-map { width: 100%; height: 100%; background: #0b0b0e; }

.leaflet-container { font-family: var(--sans); background: #0b0b0e; }
.leaflet-tile { filter: grayscale(.72) invert(1) brightness(.92) contrast(1.05) hue-rotate(185deg); }
.leaflet-control-zoom a {
  background: var(--panel-2) !important; color: var(--ink-2) !important;
  border-color: var(--line) !important;
}
.leaflet-control-zoom a:hover { background: var(--panel-3) !important; color: var(--ink) !important; }
.leaflet-control-attribution {
  background: rgba(8,8,10,.75) !important; color: var(--ink-4) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--ink-3) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0,0,0,.6);
  border-radius: var(--r);
}
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; }
.leaflet-popup-close-button { color: var(--ink-3) !important; }

.pin { cursor: pointer; }
.pin__disc {
  width: 100%; height: 100%; border-radius: 50%;
  border: 1.5px solid rgba(215,165,74,.5);
  background: rgba(12,12,15,.9);
  padding: 2px;
  box-shadow: 0 4px 14px rgba(0,0,0,.6);
  transition: transform .18s, border-color .18s;
}
.pin:hover .pin__disc { transform: scale(1.16); border-color: var(--brass-hi); }
.pin__disc img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.pin--wish .pin__disc { border-color: rgba(120,140,220,.5); }
.pin--wish .pin__disc img { filter: grayscale(1) brightness(.7); }
.pin__count {
  position: absolute; top: -4px; right: -4px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 100px; background: var(--brass); color: #17130a;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
}

.map-pop__name { font-family: var(--serif); font-size: 16px; margin-bottom: 2px; }
.map-pop__place { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.map-pop__list { margin: 6px 0 0; padding: 0; list-style: none; max-height: 190px; overflow-y: auto; }
.map-pop__list li { padding: 4px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.map-pop__list li:hover { color: var(--brass); }

.map-legend {
  position: absolute; left: var(--pad); bottom: 26px; z-index: 400;
  display: flex; gap: 14px; align-items: center;
  padding: 9px 14px;
  background: rgba(10,10,13,.86); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 100px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.map-legend b { color: var(--ink); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.dot--have { background: var(--brass); }
.dot--wish { background: #7c8fdc; }

/* ---------------------------------------------------------------- blisko / listy */

.section { padding-top: 30px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.section__title { font-family: var(--serif); font-size: 27px; }

.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 56px minmax(0,1fr) auto;
  align-items: center; gap: 16px;
  padding: 13px 6px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s;
}
.row:hover { background: rgba(255,255,255,.025); }
.row__img { width: 56px; height: 56px; }
.row__img img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.row--wish .row__img img { filter: grayscale(.8) brightness(.65); }
.row__name { font-family: var(--serif); font-size: 17.5px; line-height: 1.2; }
.row__sub { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }
.row__dist { text-align: right; }
.row__km { font-family: var(--mono); font-size: 17px; }
.row__km small { font-size: 11px; color: var(--ink-3); margin-left: 2px; }
.row__tagline { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); margin-top: 2px; }

.geo-cta {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 90px 20px; text-align: center;
}
.geo-cta__ring {
  width: 78px; height: 78px; border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--brass);
  position: relative;
}
.geo-cta__ring::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(215,165,74,.16);
  animation: ping 2.6s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.9); opacity: .9 } 100% { transform: scale(1.3); opacity: 0 } }

/* ---------------------------------------------------------------- statystyki */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--bg-soft); padding: 20px 22px; }
.stat__n { font-family: var(--mono); font-size: 32px; line-height: 1; margin-bottom: 8px; }
.stat__n em { font-style: normal; color: var(--brass); }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar { display: grid; grid-template-columns: 132px 1fr 42px; gap: 12px; align-items: center; font-size: 13px; }
.bar__label { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__track { height: 7px; background: var(--panel-2); border-radius: 100px; overflow: hidden; cursor: pointer; }
.bar__fill { height: 100%; background: linear-gradient(90deg, var(--brass-dim), var(--brass)); border-radius: 100px; transition: width .5s cubic-bezier(.2,.7,.3,1); }
.bar__n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); text-align: right; }

.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: clamp(26px, 4vw, 56px); }

.spark { display: flex; align-items: flex-end; gap: 5px; height: 96px; }
.spark__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.spark__bar { width: 100%; background: var(--panel-3); border-radius: 2px 2px 0 0; transition: background .2s; }
.spark__col:hover .spark__bar { background: var(--brass); }
.spark__lab { font-family: var(--mono); font-size: 9.5px; color: var(--ink-4); }

/* ---------------------------------------------------------------- formularz */

.form { padding: clamp(26px, 4vw, 48px) clamp(20px, 3.4vw, 46px) 80px; }
.form__title { font-family: var(--serif); font-size: 34px; margin-bottom: 4px; }
.form__lead { color: var(--ink-2); font-size: 14px; margin-bottom: 30px; }

.steps { display: flex; gap: 0; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.step {
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px 12px 0; margin-right: 18px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-4); background: none; border: 0; cursor: pointer;
  border-bottom: 1px solid transparent; margin-bottom: -1px;
}
.step.is-on { color: var(--brass); border-bottom-color: var(--brass); }
.step.is-done { color: var(--ink-2); }
.step__n { width: 19px; height: 19px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; font-size: 9.5px; }

.field { margin-bottom: 17px; }
.field__label {
  display: block; margin-bottom: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
.field__hint { margin-top: 5px; font-size: 12px; color: var(--ink-4); }
.input, .textarea {
  width: 100%; height: 38px; padding: 0 12px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r);
  font-size: 14px; outline: 0;
  transition: border-color .15s, background .15s;
}
.textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.input:focus, .textarea:focus { border-color: var(--brass); background: var(--panel-2); }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1.5 5 5.5 9 1.5' fill='none' stroke='%236c6976' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  width: 38px; height: 21px; border-radius: 100px;
  background: var(--panel-3); border: 1px solid var(--line-2);
  position: relative; transition: all .18s; flex-shrink: 0;
}
.switch__track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--ink-3); transition: all .18s;
}
.switch input:checked + .switch__track { background: var(--brass-wash); border-color: var(--brass); }
.switch input:checked + .switch__track::after { left: 19px; background: var(--brass); }

.seg { display: inline-flex; padding: 3px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); }
.seg button {
  padding: 5px 14px; border: 0; background: none; border-radius: var(--r-sm);
  font-size: 13px; color: var(--ink-3); cursor: pointer; transition: all .15s;
}
.seg button.is-on { background: var(--panel-3); color: var(--ink); }

.form__nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.form__nav .spacer { flex: 1; }

/* --- upload / cropper --- */

.uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .uploads { grid-template-columns: 1fr; } }

.drop {
  position: relative;
  aspect-ratio: 1;
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg);
  display: grid; place-items: center; gap: 8px;
  text-align: center; padding: 18px;
  cursor: pointer; transition: all .18s;
  background: var(--panel);
}
.drop:hover, .drop.is-over { border-color: var(--brass); background: rgba(215,165,74,.045); }
.drop input { display: none; }
.drop__icon { color: var(--ink-4); }
.drop__title { font-family: var(--serif); font-size: 19px; }
.drop__hint { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); }
.drop__preview { position: absolute; inset: 10px; display: grid; place-items: center; }
.drop__preview img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
.drop__redo {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  opacity: 0; transition: opacity .18s;
}
.drop:hover .drop__redo { opacity: 1; }

.cropper { display: flex; flex-direction: column; height: 100%; }
.cropper__head { padding: 22px 26px 14px; border-bottom: 1px solid var(--line); }
.cropper__title { font-family: var(--serif); font-size: 26px; }
.cropper__lead { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.cropper__stage {
  position: relative; flex: 1; min-height: 340px;
  background:
    repeating-conic-gradient(#0e0e11 0% 25%, #121216 0% 50%) 50% / 22px 22px;
  overflow: hidden; touch-action: none; cursor: grab;
}
.cropper__stage.is-dragging { cursor: grabbing; }
.cropper__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cropper__mask { position: absolute; inset: 0; pointer-events: none; }
.cropper__ring {
  position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(215,165,74,.85);
  box-shadow: 0 0 0 9999px rgba(6,6,8,.72);
  pointer-events: none;
}
.cropper__ring::before, .cropper__ring::after {
  content: ''; position: absolute; background: rgba(215,165,74,.22);
}
.cropper__ring::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.cropper__ring::after { top: 50%; left: 0; right: 0; height: 1px; }
.cropper__tools {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 16px 26px; border-top: 1px solid var(--line);
}
.slider { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 190px; }
.slider label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.slider input[type=range] { flex: 1; appearance: none; height: 3px; background: var(--panel-3); border-radius: 3px; outline: 0; }
.slider input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--brass); cursor: pointer; border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--brass);
}
.slider input[type=range]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: var(--brass); cursor: pointer; border: 0;
}
.cropper__actions { display: flex; gap: 8px; padding: 0 26px 22px; justify-content: flex-end; }

/* --- picker lokalizacji --- */

.geo-row { display: flex; gap: 8px; }
.geo-results { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.geo-results:empty { display: none; }
.geo-item { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13px; }
.geo-item:last-child { border-bottom: 0; }
.geo-item:hover { background: var(--panel-2); }
.geo-item b { font-weight: 500; }
.geo-item span { display: block; color: var(--ink-4); font-size: 11.5px; margin-top: 2px; }

.map-pick { height: 260px; margin-top: 12px; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; position: relative; }
.map-pick__hint {
  position: absolute; left: 10px; bottom: 10px; z-index: 500;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 100px;
  background: rgba(10,10,13,.85); border: 1px solid var(--line); color: var(--ink-3);
}

/* ---------------------------------------------------------------- toasts */

.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 100px;
  box-shadow: 0 14px 40px rgba(0,0,0,.6);
  font-size: 13.5px;
  animation: toastIn .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes toastIn { from { transform: translateY(12px); opacity: 0 } }
.toast--err { border-color: rgba(226,105,79,.4); color: #f0a795; }
.toast--ok  { border-color: rgba(116,196,147,.35); }

/* ---------------------------------------------------------------- responsywność */

@media (max-width: 1080px) {
  .detail { grid-template-columns: 1fr; }
  .detail__stage { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 900px) {
  :root { --top: 54px; }
  .nav {
    position: fixed; top: var(--top); left: 0; right: 0; z-index: 55;
    flex-direction: column; gap: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--line-2);
    padding: 8px var(--pad) 14px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 8px; font-size: 15px; border-radius: var(--r); }
  .nav-toggle { display: inline-flex; }
  .search { width: 40px; padding: 0 9px; }
  .search:focus-within { width: min(60vw, 250px); }
  .search input { width: 0; }
  .search:focus-within input { width: auto; }
  .search kbd { display: none; }
  .brand__text { display: none; }
  #btn-add { padding: 0 11px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); }
  .coin__name { font-size: 15px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .fact { grid-template-columns: 100px 1fr; gap: 10px; }
  .sheet { border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
