/* FRONT licytacji – kolorystyka firmowa (#FF9100, gradient #FFAF45 → #FF9100, Poppins) + animacje.
   Domyślnie tryb jasny; ciemny tylko po kliknięciu (zapamiętany w przeglądarce). */

@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

/* ---------- motyw jasny ---------- */
:root {
  --brand: #FF9100;
  --brand-2: #FFAF45;
  --grad: linear-gradient(90deg, #FFAF45 0%, #FF9100 100%);
  --grad-hot: linear-gradient(120deg, #FFAF45, #FF9100 45%, #FF5E00);
  --brand-shadow: 0 10px 25px rgba(230, 81, 0, .30);

  --bg: #f8f8f8;
  --card: #ffffff;
  --ink: #100707;
  --ink-2: #4C4545;
  --muted: #7d7474;
  --line: #ECE7E3;
  --soft: #f6f2ee;
  --accent-ink: #b35f00;
  --accent-soft: #fff2e0;
  --ok: #1f8a4c; --ok-soft: #e6f6ec;
  --warn: #a35a00; --warn-soft: #fff4e0;
  --bad: #d14848; --bad-soft: #fdecec;
  --shadow: 0 1px 2px rgba(16, 7, 7, .04), 0 10px 30px rgba(16, 7, 7, .06);
  --shadow-hover: 0 22px 50px rgba(120, 50, 0, .16);
  --aurora-a: rgba(255, 175, 69, .45);
  --aurora-b: rgba(255, 145, 0, .30);
  --aurora-c: rgba(154, 196, 214, .35);
  --r: 22px;
  --pill: 64px;
  color-scheme: light;
  font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- motyw ciemny ---------- */
:root[data-theme="dark"] {
  --bg: #0c0a09; --card: #171412; --ink: #f7f1ec; --ink-2: #d4cbc4; --muted: #9c928b; --line: #2b2522; --soft: #201b18;
  --accent-ink: #FFAF45; --accent-soft: #2d1f0e;
  --ok: #5bd18e; --ok-soft: #12301f; --warn: #f0a646; --warn-soft: #2e2414; --bad: #f07a7a; --bad-soft: #3a1c1c;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 12px 30px rgba(0, 0, 0, .4);
  --shadow-hover: 0 24px 60px rgba(255, 120, 0, .18);
  --aurora-a: rgba(255, 145, 0, .22); --aurora-b: rgba(255, 94, 0, .16); --aurora-c: rgba(144, 117, 199, .16);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; overflow-x: hidden; transition: background-color .3s, color .3s; }
body.dlg-open { overflow: hidden; }
.wrap { position: relative; max-width: 1320px; margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
::selection { background: var(--brand); color: #fff; }
button { font: inherit; }

/* ---------- zorza w tle ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .9; }
.aurora span:nth-child(1) { width: 620px; height: 620px; left: -160px; top: -220px; background: var(--aurora-a); animation: drift1 22s ease-in-out infinite; }
.aurora span:nth-child(2) { width: 520px; height: 520px; right: -140px; top: -120px; background: var(--aurora-b); animation: drift2 26s ease-in-out infinite; }
.aurora span:nth-child(3) { width: 460px; height: 460px; left: 40%; top: 260px; background: var(--aurora-c); animation: drift3 30s ease-in-out infinite; }
@keyframes drift1 { 50% { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift2 { 50% { transform: translate(-140px, 120px) scale(.9); } }
@keyframes drift3 { 50% { transform: translate(-80px, -90px) scale(1.1); } }

/* ---------- nagłówek ---------- */
.hero { padding: 18px 0 8px; padding-top: max(18px, env(safe-area-inset-top)); }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand img { border-radius: 12px; box-shadow: var(--brand-shadow); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; transition: .25s; }
.icon-btn:hover { border-color: var(--brand); color: var(--accent-ink); transform: translateY(-2px) rotate(-8deg); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#soundBtn .i-on, #soundBtn[aria-pressed="true"] .i-off { display: none; }
#soundBtn[aria-pressed="true"] .i-on { display: block; }
#soundBtn[aria-pressed="true"] { color: var(--accent-ink); border-color: var(--brand); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }

.who { display: flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-align: left; transition: .25s; min-width: 0; }
.who:hover { border-color: var(--brand); box-shadow: var(--brand-shadow); }
.who-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.who strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.who.missing { animation: nudge 2.4s ease-in-out infinite; border-color: var(--brand); }
.who.missing strong { color: var(--accent-ink); }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 145, 0, .45); } 50% { box-shadow: 0 0 0 10px rgba(255, 145, 0, 0); } }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; }

.hero-main { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 34px; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--pill); background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); }
.live-dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.8); opacity: 0; } }
.closed .live-dot { background: var(--muted); }
.closed .live-dot::after { animation: none; }
.hero-copy h1 { margin: 14px 0 6px; font-size: clamp(30px, 5vw, 58px); line-height: 1.05; font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 40%, var(--brand) 60%, var(--brand-2) 75%, var(--ink) 95%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s linear infinite; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.hero-copy p { margin: 0; color: var(--ink-2); font-size: 16px; }

.countdown { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; box-shadow: var(--shadow); min-width: 280px; }
.countdown small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: 8px; }
.cd-boxes { display: flex; gap: 8px; }
.cd-boxes div { flex: 1; text-align: center; background: var(--soft); border-radius: 14px; padding: 8px 6px 6px; }
.cd-boxes b { display: block; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-boxes b.tick { animation: tick .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes tick { from { transform: translateY(-40%); opacity: 0; } }
.cd-boxes span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.countdown.soon { border-color: var(--brand); animation: urgent 1s ease-in-out infinite; }
.countdown.soon b { color: var(--accent-ink); }
@keyframes urgent { 50% { box-shadow: 0 0 0 6px rgba(255, 145, 0, .25); } }
.cd-state { display: block; font-size: 22px; font-weight: 700; }
.countdown.off .cd-state { color: var(--bad); }
.countdown.on .cd-state { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.countdown .cd-rule { display: block; margin: 8px 0 0; font-size: 11.5px; color: var(--accent-ink); font-weight: 600; text-transform: none; letter-spacing: 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.stat { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow); overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.stat b { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b.bump { animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); color: var(--accent-ink); }
.stat span { font-size: 12px; color: var(--muted); }

/* ---------- pasek przebić ---------- */
.ticker { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; margin-top: 18px; background: #140d0a; color: #f7f1ec; overflow: hidden; height: 42px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.ticker-label { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 18px; background: var(--grad); color: #fff; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.ticker-label .live-dot { background: #fff; }
.ticker-track { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-move { display: inline-flex; gap: 36px; white-space: nowrap; padding-left: 24px; animation: marquee var(--dur, 40s) linear infinite; font-size: 14px; }
.ticker:hover .ticker-move { animation-play-state: paused; }
.ticker-move span { display: inline-flex; gap: 6px; align-items: center; }
.ticker-move b { color: var(--brand-2); }
.ticker-move .new { animation: flashText 2s ease 2; }
@keyframes flashText { 50% { color: var(--brand-2); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- informacja i filtry ---------- */
.info { display: flex; gap: 12px; align-items: flex-start; margin: 26px 0 0; padding: 14px 18px; border-radius: 18px; background: var(--accent-soft); border: 1px solid rgba(255, 145, 0, .35); font-weight: 500; }
.info svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 22px 0 18px; }
.search { position: relative; display: flex; align-items: center; flex: 1; max-width: 360px; }
.search svg { position: absolute; left: 14px; width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--pill); padding: 10px 16px 10px 40px; transition: .25s; }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 145, 0, .18); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); padding: 8px 14px; border-radius: var(--pill); font-size: 13px; font-weight: 600; cursor: pointer; transition: .25s; white-space: nowrap; }
.chip:hover { border-color: var(--brand); color: var(--accent-ink); transform: translateY(-1px); }
.chip.on, .chip[aria-pressed="true"] { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--brand-shadow); text-shadow: 0 1px 2px rgba(120, 50, 0, .35); }

/* =====================================================================
   KAFELEK
   ===================================================================== */
/* max 3 kafelki w rzędzie (czytelniej), na tablecie 2, na telefonie 1 */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; perspective: 1400px; }
@media (max-width: 1080px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .2s ease-out, box-shadow .3s, border-color .3s;
  animation: cardIn .7s calc(var(--i, 0) * 70ms) both cubic-bezier(.2, .8, .2, 1); isolation: isolate; }
.card:hover { box-shadow: var(--shadow-hover); border-color: rgba(255, 145, 0, .5); }
.card.ready { animation: none; }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) scale(.94) rotateX(12deg); } }
.card .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .3s;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(255, 175, 69, .14), transparent 45%); }
.card:hover .glare { opacity: 1; }

/* obracająca się ramka: gorący / prowadzisz */
.card::before { content: ""; position: absolute; inset: -2px; border-radius: calc(var(--r) + 2px); z-index: -1; opacity: 0; transition: opacity .4s;
  background: conic-gradient(from var(--angle), #FFAF45, #FF9100, #FF5E00, transparent 40%, transparent 60%, #FFAF45); }
.card.is-hot::before, .card.is-leading::before { opacity: 1; animation: spin 3.5s linear infinite; }
.card.is-leading::before { background: conic-gradient(from var(--angle), #5bd18e, #1f8a4c, #FFAF45, transparent 45%, transparent 60%, #5bd18e); }
.card.is-hot, .card.is-leading { border-color: transparent; }
@keyframes spin { to { --angle: 360deg; } }

/* przebicie: pop + fala; przebito Cię: trzęsienie */
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 4; opacity: 0; }
.card.fx-bid { animation: bidPop .7s cubic-bezier(.2, 1.6, .4, 1); }
.card.fx-bid::after { animation: shock 1s ease-out; }
@keyframes bidPop { 30% { transform: scale(1.04) rotate(-.6deg); } 60% { transform: scale(.99) rotate(.3deg); } }
@keyframes shock { 0% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 145, 0, .8); } 100% { opacity: 0; box-shadow: 0 0 0 36px rgba(255, 145, 0, 0); } }
.card.fx-outbid { animation: shake .6s cubic-bezier(.36, .07, .19, .97); }
.card.fx-outbid::after { animation: shockRed 1s ease-out; }
@keyframes shake { 15%, 85% { transform: translateX(-3px); } 30%, 70% { transform: translateX(6px); } 45%, 55% { transform: translateX(-8px); } }
@keyframes shockRed { 0% { opacity: 1; box-shadow: 0 0 0 0 rgba(209, 72, 72, .8); } 100% { opacity: 0; box-shadow: 0 0 0 30px rgba(209, 72, 72, 0); } }
.card.is-closed .media, .card.is-closed .specs, .card.is-closed .notes { filter: grayscale(.6); opacity: .75; }

.card-in { position: relative; border-radius: inherit; overflow: hidden; height: 100%; display: flex; flex-direction: column; background: var(--card); }

/* obrazek */
.media { position: relative; aspect-ratio: 2 / 1; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 115%, rgba(255, 145, 0, .28), transparent 62%), linear-gradient(160deg, var(--soft), var(--card)); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .media img { transform: scale(1.06); }
.laptop { width: 40%; max-width: 170px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.card:hover .laptop { transform: translateY(-5px) scale(1.05); }
.laptop .screen { fill: var(--card); stroke: var(--ink-2); stroke-width: 2; }
.laptop .glow { opacity: .95; }
.laptop .base { fill: var(--ink-2); }
.laptop .shine { fill: rgba(255, 255, 255, .35); animation: sweep 4s ease-in-out infinite; }
@keyframes sweep { 0%, 60% { transform: translateX(-120px); } 100% { transform: translateX(160px); } }

.code { position: absolute; left: 12px; top: 12px; background: rgba(16, 7, 7, .82); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .05em; padding: 4px 10px; border-radius: var(--pill); backdrop-filter: blur(6px); }
.flag { position: absolute; right: 12px; top: 12px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--pill); color: #fff; background: var(--muted); }
.is-leading .flag { background: var(--ok); animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.is-outbid .flag { background: var(--bad); animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.timer { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; padding: 4px 12px; border-radius: var(--pill); background: #140d0a; color: #fff; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.timer.urgent { background: var(--bad); animation: urgentPulse 1s ease-in-out infinite; }
.timer.bump { animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes urgentPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(209, 72, 72, .6); } 50% { box-shadow: 0 0 0 8px rgba(209, 72, 72, 0); } }
.hot { position: absolute; right: 12px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: var(--pill); background: var(--grad-hot); color: #fff; font-size: 11.5px; font-weight: 700; box-shadow: 0 6px 18px rgba(255, 94, 0, .45); }
.hot svg { width: 13px; height: 13px; fill: #fff; animation: flicker 1.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-3deg); } 25% { transform: scale(1.15, .92) rotate(2deg); } 50% { transform: scale(.95, 1.12) rotate(-1deg); } 75% { transform: scale(1.08) rotate(3deg); } }
.bidders { position: absolute; left: 12px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--pill); background: rgba(255, 255, 255, .88); color: #100707; font-size: 11.5px; font-weight: 600; backdrop-filter: blur(6px); }
:root[data-theme="dark"] .bidders { background: rgba(23, 20, 18, .85); color: var(--ink); }

/* treść */
.body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.model { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
/* specyfikacja – zawsze w jednej linii; za długie wartości skracają się „…” (pełna w dymku) */
.specs { display: flex; flex-wrap: nowrap; gap: 4px; margin: -4px 0 0; padding: 0; list-style: none; min-width: 0; }
.specs li { display: inline-flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; padding: 3px 8px; border-radius: var(--pill); background: var(--soft); font-size: 11.5px; font-weight: 600; line-height: 1.4; }
.specs li span { flex: none; color: var(--muted); font-weight: 500; font-size: 10.5px; }
.specs li b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.specs li.perf { flex: none; background: var(--accent-soft); color: var(--accent-ink); }
.specs li.sp-ram { flex: none; }        /* RAM nigdy się nie skraca */
.specs li.sp-dysk { flex-shrink: 3; }   /* przy braku miejsca najpierw skraca się dysk, potem CPU */
.notes { margin: 0; display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; font-weight: 500; color: var(--warn); }
.notes svg { flex: none; width: 15px; height: 15px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

/* cena + prowadzący */
.price-box { position: relative; margin-top: auto; padding: 14px 16px 16px; border-radius: 18px; background: var(--soft); }
.price-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.price-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
/* cena startowa – kapsułka */
.price-start { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px 4px 9px; border-radius: var(--pill); background: var(--card); border: 1.5px solid var(--brand); color: var(--accent-ink); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; box-shadow: 0 4px 12px rgba(255, 145, 0, .15); }
.price-start b { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.price-start svg { width: 13px; height: 13px; flex: none; fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.price-top { align-items: center !important; }
.price { display: flex; align-items: baseline; margin-top: 2px; font-size: max(20px, min(42px, calc(300px / var(--len, 6)))); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; transition: color .4s; white-space: nowrap; }
.fx-bid .price { color: var(--accent-ink); }
.price .cur { font-size: .45em; margin-left: 6px; font-weight: 700; color: var(--accent-ink); }
.digit { display: inline-block; height: 1.1em; overflow: hidden; }
.digit .col { display: flex; flex-direction: column; transition: transform 1s cubic-bezier(.2, .9, .2, 1.05); }
.digit .col span { height: 1.1em; }
.digit.sep { width: .22em; }

.leader { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 12px; border-radius: 14px; background: var(--card); border: 2px solid var(--brand); box-shadow: 0 6px 18px rgba(255, 145, 0, .14); }
.leader .avatar { width: 38px; height: 38px; font-size: 13px; box-shadow: 0 4px 12px rgba(255, 145, 0, .4); }
.leader-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.leader-txt small { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-ink); }
.leader-txt b { font-size: 17px; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader .crown { width: 22px; height: 22px; flex: none; fill: var(--brand); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-6deg); } }
.leader.none { border-style: dashed; border-color: var(--line); box-shadow: none; }
.leader.none .leader-txt b { font-size: 14px; font-weight: 600; color: var(--muted); }
.leader.none .leader-txt small { color: var(--muted); }
.leader.me { border-color: var(--ok); background: var(--ok-soft); box-shadow: 0 6px 18px rgba(31, 138, 76, .2); }
.leader.me .avatar { background: linear-gradient(135deg, #5bd18e, #1f8a4c); }
.leader.me .leader-txt small, .leader.me .leader-txt b { color: var(--ok); }
.leader.me .crown { fill: var(--ok); }
.leader.swap { animation: slideIn .6s cubic-bezier(.2, .8, .2, 1); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } }

.float-up { position: absolute; right: 16px; top: 6px; z-index: 6; font-weight: 800; font-size: 22px; color: var(--accent-ink); pointer-events: none; text-shadow: 0 2px 12px rgba(255, 145, 0, .5); white-space: nowrap; animation: floatUp 1.6s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(10px) scale(.6); } 20% { opacity: 1; transform: translateY(-8px) scale(1.15); } 100% { opacity: 0; transform: translateY(-70px) scale(1); } }
.spark { position: absolute; left: var(--x); top: var(--y); z-index: 6; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; background: var(--c); animation: burst .9s cubic-bezier(.1, .8, .3, 1) forwards; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

.last { margin: -2px 0 0; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jump { font-weight: 700; }
.jump s { color: var(--muted); font-weight: 500; text-decoration-color: var(--brand); }
.jump b { color: var(--accent-ink); }

/* oferta */
.bid { display: flex; gap: 8px; }
.amount { flex: 1; min-width: 0; display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); transition: .25s; cursor: text; }
.amount:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 145, 0, .18); }
.bid.bad .amount { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(209, 72, 72, .15); }
.amount.tick { animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.amount input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 18px; font-weight: 700; padding: 11px 4px 11px 14px; text-align: right; outline: none; font-variant-numeric: tabular-nums; }
.amount input::placeholder { color: var(--muted); font-weight: 500; font-size: 15px; }
.amount .zl { color: var(--muted); padding-right: 14px; font-weight: 600; }
.quick { display: flex; gap: 6px; margin-top: -4px; }
.quick button { flex: 1; border: 1px solid var(--line); background: transparent; color: var(--ink-2); border-radius: var(--pill); padding: 6px 4px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .2s; white-space: nowrap; }
.quick button:hover { border-color: var(--brand); color: var(--accent-ink); background: var(--accent-soft); }
.quick button:active { transform: scale(.95); }

.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; border-radius: 14px; padding: 11px 18px; border: 1px solid transparent; cursor: pointer; overflow: hidden; transition: .25s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--grad); color: #fff; text-shadow: 0 1px 2px rgba(120, 50, 0, .35); }
.btn-primary::before { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: btnShine 3.2s ease-in-out infinite; }
@keyframes btnShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--brand-shadow); }
.btn-primary:active { transform: scale(.96); }
.btn:disabled { opacity: .75; cursor: wait; transform: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--accent-ink); }
.btn .ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .55); transform: scale(0); animation: ripple .6s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.btn.loading > * { visibility: hidden; }
.btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border: 2.5px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spinBtn .7s linear infinite; }
.btn-ghost.loading::after { border-color: var(--brand); border-right-color: transparent; }
@keyframes spinBtn { to { transform: rotate(360deg); } }

.hint { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.hint.bad { color: var(--bad); animation: shake .4s; }

.hist { border-top: 1px dashed var(--line); padding-top: 10px; font-size: 13px; }
.hist summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.hist summary::-webkit-details-marker { display: none; }
.hist summary::before { content: "▸"; transition: transform .25s; }
.hist[open] summary::before { transform: rotate(90deg); }
.hist ol { list-style: none; margin: 8px 0 0; padding: 0; max-height: 230px; overflow: auto; }
.hist li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); animation: rowIn .4s both; animation-delay: calc(var(--k, 0) * 40ms); }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } }
.hist li b { font-variant-numeric: tabular-nums; }
.hist li.top b { color: var(--accent-ink); }
.hist li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist li.me span { font-weight: 700; }
.hist time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.empty { text-align: center; color: var(--muted); padding: 50px; }
.foot { color: var(--muted); font-size: 13px; padding-top: 36px; padding-bottom: max(44px, env(safe-area-inset-bottom)); display: flex; gap: 12px; flex-wrap: wrap; }
.live { color: var(--ok); font-weight: 600; }
.live.off { color: var(--bad); }

@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* =====================================================================
   OKNA (imię, potwierdzenie oferty)
   ===================================================================== */
.dlg { border: 0; border-radius: 26px; padding: 0; width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: auto; }
.dlg[open] { animation: dlgIn .45s cubic-bezier(.2, 1.3, .4, 1); }
.dlg.closing { animation: dlgOut .18s ease-in forwards; }
.dlg[open]::backdrop { animation: fadeIn .3s ease; }
.dlg.closing::backdrop { animation: fadeOut .18s ease forwards; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes dlgOut { to { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.dlg::backdrop { background: rgba(16, 7, 7, .55); backdrop-filter: blur(4px); }
.dlg form { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.grab { display: none; }
.dlg-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); box-shadow: var(--brand-shadow); }
.dlg-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.dlg h2 { margin: 4px 0 0; font-size: 21px; line-height: 1.25; }
.dlg p { margin: 0; color: var(--ink-2); font-size: 14px; }
.dlg .field input { width: 100%; font: inherit; font-size: 18px; font-weight: 600; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); transition: .2s; }
.dlg .field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 145, 0, .18); }
.dlg .field input.bad { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(209, 72, 72, .15); }
.dlg .err { padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 600; font-size: 13px; }
.dlg .err.shake { animation: shake .4s; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.link { border: 0; background: none; padding: 0; color: var(--accent-ink); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* potwierdzenie oferty */
.bd-head { display: flex; flex-direction: column; gap: 6px; }
.bd-code { align-self: flex-start; background: #140d0a; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .05em; padding: 4px 10px; border-radius: var(--pill); }
.bd-compare { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 4px; }
.bd-compare > div:not(.bd-arrow) { padding: 14px; border-radius: 18px; background: var(--soft); min-width: 0; }
.bd-compare small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.bd-compare b { display: block; font-size: clamp(18px, 6vw, 26px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bd-compare span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-now b { color: var(--muted); }
.bd-you { background: var(--accent-soft) !important; border: 2px solid var(--brand); }
.bd-you b { color: var(--accent-ink); }
.bd-you span { color: var(--ok) !important; }
.bd-arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); box-shadow: var(--brand-shadow); animation: nudgeX 1.6s ease-in-out infinite; }
.bd-arrow svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes nudgeX { 50% { transform: translateX(3px); } }
.bd-warn { padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad) !important; font-weight: 600; font-size: 13px !important; }
.bd-ot { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink) !important; font-weight: 600; font-size: 13px !important; }
.bd-as { font-size: 13px !important; color: var(--muted) !important; }
.bd-as b { color: var(--ink); }
.bid-dlg.big .bd-you { border-color: var(--bad); background: var(--bad-soft) !important; }
.bid-dlg.big .bd-you b { color: var(--bad); }
.bid-dlg.big #bdOk { background: linear-gradient(90deg, #f07a7a, #d14848); }
.btn-big { flex: 1; padding: 14px 18px; font-size: 15px; }

/* ---------- confetti i powiadomienia ---------- */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 70; width: min(400px, calc(100% - 36px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 10px 12px 14px; border-radius: 16px; background: var(--ink); color: var(--bg); font-weight: 500; font-size: 14px; line-height: 1.4; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); transform: translateX(120%); transition: transform .45s cubic-bezier(.2, 1.3, .4, 1), opacity .3s; }
.toast.in { transform: none; }
.toast.out { opacity: 0; transform: translateX(30%); }
.toast i { font-style: normal; font-size: 18px; line-height: 1.2; }
.toast span { flex: 1; }
.toast button { border: 0; background: transparent; color: inherit; opacity: .6; font-size: 20px; line-height: 1; padding: 0 4px; cursor: pointer; }
.toast button:hover { opacity: 1; }
.toast-ok { background: var(--grad); color: #fff; }
.toast-warn, .toast-error { background: var(--bad); color: #fff; }
.toast-bid { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--brand); }
.toast-time { background: #140d0a; color: #fff; border-left: 4px solid var(--brand); }

/* =====================================================================
   TELEFON / TABLET
   ===================================================================== */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .countdown { width: 100%; min-width: 0; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 14px; }
  .aurora span { filter: blur(60px); }
  .aurora span:nth-child(3) { display: none; }

  /* nagłówek: kompaktowo */
  .hero { padding-bottom: 0; }
  .brand span { display: none; }
  .brand img { width: 36px; height: 36px; }
  .icon-btn { width: 38px; height: 38px; }
  .who { padding: 4px 12px 4px 4px; }
  .who small { display: none; }
  .who strong { max-width: 120px; font-size: 13px; }
  .avatar { width: 30px; height: 30px; font-size: 11px; }
  .hero-main { margin-top: 18px; gap: 14px; }
  .eyebrow { font-size: 10.5px; padding: 5px 11px; }
  .hero-copy h1 { margin: 10px 0 4px; font-size: 30px; }
  .hero-copy p { font-size: 14px; }
  .countdown { padding: 12px; border-radius: 18px; }
  .cd-boxes { gap: 6px; }
  .cd-boxes div { padding: 6px 4px 4px; border-radius: 12px; }
  .cd-boxes b { font-size: 22px; }
  .stats { gap: 8px; margin-top: 12px; }
  .stat { padding: 10px 12px; border-radius: 14px; }
  .stat b { font-size: 19px; }
  .stat span { font-size: 11px; }

  .ticker { height: 36px; margin-top: 14px; }
  .ticker-label { padding: 0 12px; font-size: 11px; }
  .ticker-move { font-size: 13px; gap: 26px; }

  .info { margin-top: 16px; padding: 12px 14px; font-size: 13.5px; border-radius: 14px; }

  /* filtry: pełna szerokość + przewijane chipsy */
  .toolbar { margin: 16px 0 14px; gap: 10px; }
  .search { max-width: none; flex-basis: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 2px 14px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { scroll-snap-align: start; padding: 8px 13px; }

  /* kafelki */
  .grid { grid-template-columns: 1fr; gap: 14px; perspective: none; }
  .card { transform: none !important; border-radius: 20px; }
  .card .glare { display: none; }
  .media { aspect-ratio: 5 / 2; }
  .laptop { width: 34%; }
  .body { padding: 14px 14px 16px; gap: 11px; }
  .model { font-size: 16px; }
  .price-box { padding: 12px 14px 14px; }
  .leader { padding: 8px 10px; }
  .leader-txt b { font-size: 16px; }
  .amount input { font-size: 20px; padding: 13px 4px 13px 14px; }
  .bid .btn { padding: 0 16px; min-height: 50px; }
  .quick button { padding: 8px 4px; font-size: 12.5px; }

  /* okna jako panel od dołu (bottom sheet) */
  .dlg { width: 100%; max-width: none; margin: auto 0 0; border-radius: 26px 26px 0 0; max-height: 92dvh; }
  .dlg[open] { animation: sheetIn .4s cubic-bezier(.2, 1, .3, 1); }
  .dlg.closing { animation: sheetOut .18s ease-in forwards; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
  @keyframes sheetOut { to { transform: translateY(100%); } }
  .dlg form { padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); }
  .grab { display: block; width: 44px; height: 5px; margin: 0 auto 6px; border-radius: 5px; background: var(--line); }
  .dlg-actions { flex-direction: column-reverse; }
  .dlg-actions .btn { width: 100%; padding: 15px; font-size: 15.5px; }
  .bd-compare { grid-template-columns: 1fr; gap: 6px; }
  .bd-arrow { justify-self: center; transform: rotate(90deg); width: 30px; height: 30px; animation: none; }

  /* powiadomienia u góry, na całą szerokość */
  .toasts { top: calc(10px + env(safe-area-inset-top)); bottom: auto; left: 10px; right: 10px; width: auto; }
  .toast { transform: translateY(-140%); }
  .toast.out { transform: translateY(-40%); }
}

@media (hover: none) {
  .card:hover { box-shadow: var(--shadow); }
  .btn-primary:hover, .chip:hover, .icon-btn:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .aurora { display: none; }
}

/* podpowiedzi z listy uczestników */
.name-hint { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink) !important; font-size: 13px !important; font-weight: 600; }
.suggest { display: flex; flex-direction: column; gap: 4px; margin-top: -4px; padding: 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); max-height: 260px; overflow: auto; animation: dlgIn .25s ease; }
.suggest button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-weight: 600; font-size: 15px; text-align: left; cursor: pointer; }
.suggest button .avatar { width: 30px; height: 30px; font-size: 11px; }
.suggest button:hover, .suggest button.on { background: var(--accent-soft); color: var(--accent-ink); }

/* dopisek odróżniający osoby o tym samym imieniu */
.name-extra { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; border: 2px dashed var(--brand); background: var(--accent-soft); animation: dlgIn .3s ease; }
.name-extra span { font-size: 12.5px; font-weight: 700; color: var(--accent-ink); }
.name-extra input { font-size: 16px !important; }
