/* ==========================================================================
   DODAJ GRE — nowe okno (od 15.10.2026, addgame.js; mockup: mockupy/mockup-dodaj-gre.html).
   Klasy agx-*. Chrom i ramki w --sys, stan gier i oceny to dane (zielen aktywna, pomarancz archiwum,
   srebro listy zyczen, --ocena-*), XP zloty jak pasek XP. Bez backdrop-filter (plynnosc.md).
   ========================================================================== */

/* stary formularz zostaje w DOM (niesie pola dla window.addGame), niewidoczny */
#add-game-panel.agx-on #add-game-form { display: none !important; }

/* ---------- pole wyszukiwania (PC panel i okno telefonu) ---------- */
/* PC: odstep od linii naglowka panelu i nizsze pole w waskiej kolumnie (Matt 15.10 na zywo: „dosyc duze
   i wjezdza na gorna linie”); telefon zostaje 46 px / 16 px — iPhone powieksza strone przy polu < 16 px */
.agx-pc { padding: 12px 14px 14px; }
.agx-pc .agx-srch { height: 40px; padding: 0 12px; border-radius: 10px; }
.agx-pc .agx-srch input { font-size: 14px; }
.agx-srch {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid #232a31; background: #070a0c; cursor: text;
}
/* fokus: kreska od srodka pod polem — motion.css E3 (animacje etap 2, 18.10.2026; dawna ramka zdjeta) */
.agx-srch i { color: #7a8590; font-size: 14px; }
.agx-srch input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: #fff; outline: none;
  font-family: var(--font); font-size: 16px; padding: 0; box-shadow: none;
}
/* X czyszczenia szukajki (17.10.2026, Matt) — widoczny, gdy cos wpisane; wyglad jak w Znajdz w aplikacji (.fnd-clr) */
.agx-clr {
  display: none; flex: 0 0 auto; width: 30px; height: 30px; margin-right: -8px; border-radius: 8px;
  background: none; border: 0; color: var(--txt-dim); cursor: pointer;
}
.agx-srch.has-q .agx-clr { display: grid; place-items: center; }
.agx-srch .agx-clr i { color: inherit; }
.agx-clr:hover, .agx-clr:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.06); outline: none; }
.agx-body { margin-top: 6px; }
.agx-hint { margin-top: 12px; font-size: var(--fs-small); color: var(--txt-dim); }
.agx-hint.c { text-align: center; }
.agx-msg { display: flex; gap: 10px; align-items: flex-start; padding: 14px 6px; font-size: var(--fs-small); color: var(--txt-dim); line-height: 1.45; }
.agx-msg b { display: block; color: #fff; margin-bottom: 2px; }
.agx-msg.err i { color: #ff8a8a; margin-top: 3px; }
.agx-msg > i.fa-spin { color: var(--sys); margin: 0 auto; font-size: 18px; }
.agx-alert {
  display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255, 138, 138, .35); background: rgba(255, 77, 77, .06); font-size: var(--fs-tag); color: var(--txt-dim); line-height: 1.4;
}
.agx-alert > i { color: #ff8a8a; }
.agx-alert b { display: block; color: #fff; }
.agx-alert button { margin-left: auto; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 8px; border: 1px solid #2a3138; background: #0d1115; color: #c9d1d8; cursor: pointer; }

/* wyniki */
.agx-res {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; background: none; color: #e6edf3; text-align: left; font-family: var(--font);
  animation: agxIn .25s ease-out both;
}
.agx-res:hover, .agx-res:focus-visible { background: #0f1418; border-color: #232a31; outline: none; }
.agx-res img, .agx-res .ph { width: 40px; height: 54px; flex: 0 0 auto; border-radius: 6px; object-fit: cover; background: #14191e; display: grid; place-items: center; color: #4f5a63; }
.agx-res .tx { min-width: 0; flex: 1; }
.agx-res b { display: block; font-size: var(--fs-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agx-res em { display: block; font-style: normal; font-size: var(--fs-tag); color: var(--txt-dim); margin-top: 2px; }
.agx-res .own { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; color: var(--accent-social); }
.agx-manual-row { margin: 8px 6px 2px; font-size: var(--fs-tag); color: var(--txt-dim); }
.agx-manual { border: 0; background: none; padding: 4px 0; color: var(--sys); font-family: var(--font); font-size: var(--fs-tag); font-weight: 700; letter-spacing: 1px; cursor: pointer; }
.agx-manual.big {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; margin-top: 4px; border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--sys) 45%, transparent); background: color-mix(in srgb, var(--sys) 4%, transparent);
}

/* podpowiedzi przy pustym polu */
.agx-sec { margin-top: 16px; animation: agxIn .3s ease-out both; }
.agx-sh { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; font-size: 11px; letter-spacing: 2px; color: #9aa5af; font-weight: 700; margin-bottom: 9px; }
.agx-sh em { font-style: normal; letter-spacing: .5px; color: #56616b; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.agx-all { margin-left: auto; border: 0; background: none; padding: 4px 0; color: var(--steam); font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: 1px; cursor: pointer; }
.agx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.agx-chip { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #232a31; background: #0b0e11; color: #c9d1d8; font-family: var(--font); font-size: var(--fs-tag); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agx-chip:hover, .agx-chip:focus-visible { border-color: var(--sys); color: var(--sys); outline: none; }
.agx-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 2px 12px 4px; scroll-snap-type: x mandatory; scroll-padding-inline: 12px; }
.agx-row::-webkit-scrollbar { display: none; }
.agx-list { display: grid; gap: 6px; }
/* Steam: pionowa okladka z biblioteki Steama (serwer Steama, bez bazy gier) — ten sam ksztalt co „Polecaja znajomi”
   (.agx-fc): telefon = rzad okladek z godzinami w rogu, PC = wiersz okladka + tytul + godziny (wariant A, Matt 15.10) */
.agx-cap { flex: 0 0 auto; width: 100px; padding: 0; border: 0; background: none; color: #c9d1d8; text-align: left; font-family: var(--font); cursor: pointer; scroll-snap-align: start; }
.agx-cap .im { display: block; position: relative; height: 132px; border-radius: 10px; overflow: hidden; border: 1px solid #1d232a; background: linear-gradient(135deg, #2b3d52, #0d141c 70%); }
.agx-cap .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agx-cap .im i { position: absolute; right: 5px; bottom: 5px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--steam); background: rgba(8, 9, 12, .85); border: 1px solid color-mix(in srgb, var(--steam) 45%, transparent); border-radius: 6px; padding: 2px 5px 1px; }
.agx-cap b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; font-size: 12px; line-height: 1.2; }
.agx-cap em { display: none; }
.agx-cap:focus-visible, .agx-fc:focus-visible { outline: 2px solid var(--sys); outline-offset: 2px; }
.agx-list .agx-cap { width: 100%; display: flex; align-items: center; gap: 10px; }
.agx-list .agx-cap .im { width: 40px; height: 54px; flex: 0 0 auto; }
.agx-list .agx-cap .im i { display: none; }
.agx-list .agx-cap b { margin: 0; flex: 1; min-width: 0; }
.agx-list .agx-cap em { display: block; flex: 0 0 auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--steam); }
/* znajomi: okladka, srednia ich ocen, awatary */
.agx-fc { flex: 0 0 auto; width: 100px; padding: 0; border: 0; background: none; color: #c9d1d8; text-align: left; font-family: var(--font); cursor: pointer; scroll-snap-align: start; }
.agx-fc .im { display: block; position: relative; height: 132px; border-radius: 10px; overflow: hidden; border: 1px solid #1d232a; background: #14191e; }
.agx-fc .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agx-fc .r2 { position: absolute; top: 6px; right: 6px; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 7px; font-size: 12px; font-weight: 700; color: #000; display: grid; place-items: center; }
.agx-fc .agx-avs { position: absolute; left: 6px; bottom: 6px; display: flex; }
.agx-fc b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; font-size: 12px; line-height: 1.2; }
.agx-list .agx-fc { width: 100%; display: flex; align-items: center; gap: 10px; }
.agx-list .agx-fc .im { width: 40px; height: 54px; flex: 0 0 auto; }
.agx-list .agx-fc .r2 { top: auto; bottom: 3px; right: 3px; min-width: 20px; height: 17px; font-size: 10px; }
.agx-list .agx-fc .agx-avs { display: none; }
.agx-list .agx-fc b { margin: 0; }
.agx-avs .av, .agx-fc .av {
  width: 20px; height: 20px; border-radius: 50%; margin-left: -6px; border: 2px solid #0a0d10; overflow: hidden;
  display: grid; place-items: center; background: #2a3138; color: #fff; font-size: 9px; font-weight: 700; flex: 0 0 auto;
}
.agx-avs .av:first-child { margin-left: 0; }
.agx-avs .av img { width: 100%; height: 100%; object-fit: cover; }
/* baza gier: spokojny, kolor dopiero po najechaniu — droga poboczna, nie konkuruje z kartami gier (Matt 15.10, wariant 2;
   dawniej przerywana ramka) */
.agx-browse {
  margin-top: 16px; width: 100%; min-height: 46px; border-radius: 12px; cursor: pointer;
  border: 1px solid #23262b; background: transparent;
  color: #8d97a1; font-family: var(--font); font-weight: 700; font-size: var(--fs-tag); letter-spacing: 1.5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: border-color .2s, color .2s, background .2s;
}
.agx-browse:hover, .agx-browse:focus-visible {
  border-color: color-mix(in srgb, var(--sys) 45%, transparent); color: var(--sys);
  background: color-mix(in srgb, var(--sys) 7%, transparent); outline: none;
}
/* PC: wiersze Steama i znajomych reaguja na mysz jak wyniki wyszukiwania (Matt 15.10) */
.agx-list .agx-cap, .agx-list .agx-fc { padding: 4px; margin: -4px; width: calc(100% + 8px); border: 1px solid transparent; border-radius: 10px; }
.agx-list .agx-cap:hover, .agx-list .agx-fc:hover { background: #0f1418; border-color: #232a31; }
.agx-list .agx-cap:hover b, .agx-list .agx-fc:hover b { color: #fff; }
.agx-list { gap: 8px; }
/* PC: „+N WIECEJ” / „ZWIN” w naglowku polecen znajomych, po prawej jak „WSZYSTKIE” przy Steamie — kolor chromu
   (Steam ma swoj kolor, bo to Steam) (Matt 15.10) */
.agx-all.fr { color: var(--sys); }
.agx-all:hover, .agx-all:focus-visible { text-decoration: underline; text-underline-offset: 3px; outline: none; }
/* PC: przycisk bazy gier przypiety pod przewijana lista (stopka panelu) */
#agx-pc-foot:empty { display: none; }
#agx-pc-foot .agx-browse { margin-top: 12px; }
/* telefon: okno przewija sie tylko w pionie — rzedy okladek wystaja po 12 px za boki i cale okno dawalo sie
   przesuwac palcem w poziomie (Matt 15.10); rzedy maja wlasne przewijanie */
#ag-body { overflow-x: hidden; }
/* w oknie telefonu rzad nie wystaje za boki: #ag-body i tak przycina go na swoich krawedziach, wiec wystawanie
   nie bylo widac — dawalo tylko 12 px przesuwania okna */
#ag-body .agx-row { margin: 0; padding: 2px 0 4px; scroll-padding-inline: 0; }
/* rzad okladek: przyciski rowno u gory — rozciagniety przycisk centruje tresc w pionie i okladka z tytulem
   w dwoch liniach unosila sie nad reszte (Matt 15.10) */
.agx-row { align-items: flex-start; }
/* PC: panel w lewej kolumnie ma tyle wysokosci, ile tresci, ale nie wychodzi za dol ekranu — przewija sie lista
   podpowiedzi w srodku, pole i karta gracza stoja (Matt 15.10: po „+WIECEJ” przewijala sie cala kolumna).
   Na bardzo niskim ekranie panel ma min. 300 px, a kolumna przewija sie jak dawniej */
@media (min-width: 769px) {
  .sidebar-top > #add-game-panel.agx-on { flex: 0 1 auto; min-height: 300px; display: flex; flex-direction: column; }
  #add-game-panel.agx-on > .panel-uni-head { flex: 0 0 auto; }
  #add-game-panel.agx-on > #agx-pc { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  #agx-pc > .agx-srch, #agx-pc > #agx-pc-foot { flex: 0 0 auto; }
  #agx-pc-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    margin: 6px -10px 0 -4px; padding: 0 10px 0 4px; /* suwak przy krawedzi panelu; 4 px z lewej na tlo hover wierszy (margin -4px) */
    scrollbar-width: thin; scrollbar-color: #2e2c38 transparent;
  }
  #agx-pc-body::-webkit-scrollbar { width: 4px; }
  #agx-pc-body::-webkit-scrollbar-thumb { background: #2e2c38; border-radius: 3px; }
}
/* nowy gracz bez podpowiedzi */
.agx-new {
  margin-top: 16px; padding: 22px 16px 18px; border-radius: 16px; text-align: center;
  border: 1px solid color-mix(in srgb, var(--sys) 25%, transparent);
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--sys) 9%, transparent), transparent 70%);
  animation: agxIn .3s ease-out both;
}
.agx-stack { position: relative; height: 112px; margin-bottom: 14px; }
.agx-stack span { position: absolute; left: 50%; top: 8px; width: 72px; height: 96px; margin-left: -36px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .9); }
.agx-stack span:nth-child(1) { transform: translateX(-46px) rotate(-13deg); }
.agx-stack span:nth-child(3) { transform: translateX(46px) rotate(13deg); }
.agx-stack span:nth-child(2) { top: 0; z-index: 1; }
.agx-new b { display: block; font-size: 17px; color: #fff; }
.agx-new .d { display: block; margin-top: 6px; font-size: var(--fs-small); color: #9aa5af; line-height: 1.45; }

/* ---------- karta gry ---------- */
.agx-ovl { position: fixed; inset: 0; z-index: 5000; background: rgba(2, 3, 4, .82); animation: agxFade .25s; }
.agx-card {
  position: fixed; left: 50%; top: 50%; z-index: 5001; width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain;
  transform: translate(-50%, -50%); border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--sys) 28%, transparent);
  background: linear-gradient(180deg, #0f1418, #090b0d);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .9), 0 0 50px -20px color-mix(in srgb, var(--sys) 50%, transparent);
  animation: agxCardIn .35s cubic-bezier(.2, .8, .3, 1);
  scrollbar-width: thin; scrollbar-color: #2e2c38 transparent;
}
.agx-card.busy .agx-chs, .agx-card.busy .agx-oc, .agx-card.busy .agx-plats, .agx-card.busy .agx-go { pointer-events: none; opacity: .55; }
.agx-cov { position: relative; height: 180px; background: linear-gradient(135deg, #1b2733, #0b0f13); overflow: hidden; }
.agx-cov img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.agx-cov .lt { position: absolute; inset: 0; display: grid; place-items: center; font-size: 72px; font-weight: 700; color: rgba(255, 255, 255, .08); }
.agx-cov::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 16, 20, .1) 20%, #0c1014 100%); }
.agx-x {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  border: 1px solid #2a3138; background: rgba(8, 10, 12, .75); color: #c9d1d8; font-size: 15px;
}
.agx-x:hover, .agx-x:focus-visible { color: #fff; border-color: #4a5560; outline: none; }
.agx-tt { position: absolute; left: 24px; right: 70px; bottom: 14px; z-index: 2; }
.agx-tt b { display: block; font-size: 26px; line-height: 1.15; color: #fff; overflow-wrap: anywhere; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.agx-tt span { display: block; margin-top: 4px; font-size: var(--fs-small); color: #9aa5af; }
.agx-tt .agx-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; border: 1px solid #2a3138; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; color: #c9d1d8; }
.agx-in { padding: 14px 24px 22px; }
.agx-chips0 { display: flex; flex-wrap: wrap; gap: 8px; }
.agx-chip0 {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; border: 1px solid #1d232a; background: #0b0e11;
  font-size: var(--fs-tag); color: #c9d1d8; line-height: 1.3; animation: agxIn .3s ease-out both;
}
.agx-chip0 b { color: #fff; }
.agx-chip0.steam { border-color: color-mix(in srgb, var(--steam) 40%, transparent); }
.agx-chip0.steam i, .agx-chip0.steam b { color: var(--steam); }
.agx-chip0.prem { border-color: color-mix(in srgb, var(--sys) 45%, transparent); }
.agx-chip0.prem i, .agx-chip0.prem b { color: var(--sys); }
.agx-chip0.own { border-color: color-mix(in srgb, var(--accent-social) 50%, transparent); }
.agx-chip0 .agx-avs { display: flex; }
.agx-chip0 .av { border-color: #0b0e11; width: 22px; height: 22px; }
.agx-lbl { margin: 18px 0 8px; font-size: 11px; letter-spacing: 2px; color: var(--txt-dim); font-weight: 700; }
.agx-lbl b { color: var(--accent); letter-spacing: 1px; }
.agx-plats { display: flex; flex-wrap: wrap; gap: 6px; }
.agx-plats.err { animation: agxShake .45s; }
.agx-pl {
  height: 38px; padding: 0 13px; border-radius: 9px; cursor: pointer; border: 1px solid #232a31; background: #0d1115;
  color: #c9d1d8; font-family: var(--font); font-size: var(--fs-tag); font-weight: 600;
}
.agx-pl:hover, .agx-pl:focus-visible { border-color: #3a444d; color: #fff; outline: none; }
.agx-pl.off { opacity: .38; border-style: dashed; }
.agx-pl.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); opacity: 1; border-style: solid; }
.agx-pl.on.off { border-color: #ffb020; color: #ffb020; background: rgba(255, 176, 32, .08); }
.agx-perr, .agx-pwarn { margin-top: 7px; font-size: var(--fs-tag); line-height: 1.4; }
.agx-perr { color: #ff8a8a; }
.agx-pwarn { color: #ffb020; }
.agx-perr.an, .agx-pwarn.an { animation: agxIn .25s ease-out; }
.agx-chs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.agx-ch {
  position: relative; min-height: 92px; padding: 8px 4px; border-radius: 14px; cursor: pointer; border: 1px solid #232a31; background: #0d1115;
  color: #c9d1d8; font-family: var(--font); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, border-color .15s, min-height .25s;
}
.agx-ch i { font-size: 20px; }
.agx-ch b { font-size: var(--fs-tag); letter-spacing: 1.5px; }
.agx-ch small { font-size: 10.5px; color: var(--txt-dim); }
.agx-ch .xp { color: #f1c40f; font-weight: 700; }
.agx-ch.play { border-color: rgba(57, 255, 20, .35); }
.agx-ch.play i { color: var(--stan-aktywna); }
.agx-ch.fin { border-color: color-mix(in srgb, var(--accent-social) 40%, transparent); }
.agx-ch.fin i { color: var(--accent-social); }
.agx-ch.wish { border-color: rgba(255, 255, 255, .22); }
.agx-ch.wish i { color: #e6e9ee; }
.agx-ch.play:hover, .agx-ch.play:focus-visible { background: rgba(57, 255, 20, .07); outline: none; }
.agx-ch.fin:hover, .agx-ch.fin:focus-visible { background: color-mix(in srgb, var(--accent-social) 8%, transparent); outline: none; }
.agx-ch.wish:hover, .agx-ch.wish:focus-visible { background: rgba(255, 255, 255, .05); outline: none; }
.agx-ch.fin.on { background: color-mix(in srgb, var(--accent-social) 13%, transparent); border-color: var(--accent-social); }
.agx-ch.wish.on { background: rgba(255, 255, 255, .08); border-color: #e6e9ee; }
.agx-ch .tip { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 6px; background: var(--sys); color: #000; font-size: 10px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.agx-chs.slim .agx-ch { min-height: 46px; flex-direction: row; }
.agx-chs.slim .agx-ch small { display: none; }
.agx-chs.slim .agx-ch i { font-size: 14px; }
.agx-more.an { animation: agxIn .3s ease-out; }
.agx-r3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.agx-r2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.agx-fld { display: block; margin-top: 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid #1d232a; background: #0b0e11; }
.agx-r3 .agx-fld { margin-top: 0; }
/* fokus: kreska od srodka pod polem — motion.css E3 (animacje etap 2, 18.10.2026; dawna ramka zdjeta) */
.agx-fld span { display: block; margin-bottom: 3px; font-size: 11px; letter-spacing: 1.5px; color: var(--txt-dim); }
.agx-fld span i { font-style: normal; color: var(--steam); letter-spacing: .5px; }
.agx-fld span i.op { color: #4f5a63; }
.agx-perr[hidden] { display: none; }
.agx-fld input, .agx-fld textarea {
  width: 100%; min-width: 0; border: 0; background: none; color: #fff; font-family: var(--font); font-size: 16px; font-weight: 700;
  outline: none; color-scheme: dark; padding: 0; box-shadow: none; resize: vertical;
}
.agx-fld textarea { font-weight: 500; font-size: 15px; line-height: 1.45; }
/* ikonka kalendarza: ciemny motyw (color-scheme) juz ja rozjasnia — ogolne invert(1) ze styles.css robilo z niej
   ciemna ikonke na ciemnym tle, prawie niewidoczna (17.10.2026, Matt; jak .dlg-fld w dialog.css) */
.agx-fld input[type="date"]::-webkit-calendar-picker-indicator { filter: none; opacity: 0.75; cursor: pointer; }
.agx-fld input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.agx-addnote { margin-top: 10px; border: 0; background: none; padding: 6px 0; color: var(--txt-dim); font-family: var(--font); font-size: var(--fs-tag); font-weight: 700; letter-spacing: 1.5px; cursor: pointer; }
.agx-addnote:hover, .agx-addnote:focus-visible { color: #fff; outline: none; }
.agx-oc { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.agx-oc button {
  height: 50px; border-radius: 10px; cursor: pointer; border: 1px solid #232a31; background: #0d1115; color: #c9d1d8;
  font-family: var(--font); font-size: 16px; font-weight: 700; transition: transform .12s, background .12s;
}
.agx-oc button:focus-visible { transform: translateY(-2px); color: #000; outline: none; }
.agx-oc .low:focus-visible, .agx-oc .low.hit { background: var(--ocena-low); border-color: var(--ocena-low); color: #000; }
.agx-oc .mid:focus-visible, .agx-oc .mid.hit { background: var(--ocena-mid); border-color: var(--ocena-mid); color: #000; }
.agx-oc .high:focus-visible, .agx-oc .high.hit { background: var(--ocena-high); border-color: var(--ocena-high); color: #000; }
.agx-oc .top:focus-visible, .agx-oc .top.hit { background: var(--ocena-top); border-color: var(--ocena-top); color: #000; }
/* podswietlenie pod kursorem tylko z myszka — na telefonie „hover” zostaje po stuknieciu i udaje wybrana ocene */
@media (hover: hover) {
  .agx-oc button:hover { transform: translateY(-2px); color: #000; }
  .agx-oc .low:hover { background: var(--ocena-low); border-color: var(--ocena-low); }
  .agx-oc .mid:hover { background: var(--ocena-mid); border-color: var(--ocena-mid); }
  .agx-oc .high:hover { background: var(--ocena-high); border-color: var(--ocena-high); }
  .agx-oc .top:hover { background: var(--ocena-top); border-color: var(--ocena-top); }
}
.agx-oc button.hit { transform: scale(1.12); }
.agx-hype { width: 100%; height: 28px; accent-color: var(--accent); }
.agx-go {
  margin-top: 18px; width: 100%; height: 52px; border-radius: 12px; border: 0; cursor: pointer; background: var(--sys); color: #000;
  font-family: var(--font); font-size: var(--fs-small); font-weight: 700; letter-spacing: 2px;
}
.agx-go:hover { filter: brightness(1.15); }
.agx-go:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.agx-small {
  margin-top: 16px; padding: 14px; border-radius: 12px; border: 1px solid rgba(57, 255, 20, .4); background: rgba(57, 255, 20, .07);
  display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 700; letter-spacing: 1px; font-size: var(--fs-small); color: #fff;
  animation: agxPop .5s cubic-bezier(.2, 1.6, .4, 1);
}
.agx-small i { color: var(--stan-aktywna); } /* ikona GRAM przy „DODANA DO AKTYWNYCH” */
.agx-small .xp { color: #f1c40f; }
/* wpis reczny */
.agx-mft {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 4px; padding: 11px 12px; border-radius: 10px; cursor: pointer;
  border: 1px dashed color-mix(in srgb, var(--sys) 40%, transparent); background: none; color: var(--sys);
  font-family: var(--font); font-size: var(--fs-tag); font-weight: 700; letter-spacing: 1.5px;
}
.agx-mft .ar { margin-left: auto; transition: transform .2s; }
.agx-mft.on .ar { transform: rotate(180deg); }
.agx-mfn { margin-top: 10px; font-size: var(--fs-tag); color: var(--txt-dim); line-height: 1.45; }

/* ---------- moment ukonczenia ---------- */
.agx-mo { padding: 24px 28px 28px; text-align: center; animation: agxIn .3s ease-out; }
.agx-mh { font-size: var(--fs-tag); letter-spacing: 4px; color: var(--txt-dim); }
.agx-big { margin-top: 10px; font-size: 56px; font-weight: 700; line-height: 1.1; color: #f1c40f; text-shadow: 0 0 30px rgba(241, 196, 15, .45); font-variant-numeric: tabular-nums; }
.agx-rankup {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 16px; border-radius: 12px;
  border: 1px solid rgba(241, 196, 15, .5); background: rgba(241, 196, 15, .08); color: #fff; font-weight: 700; letter-spacing: 1.5px; font-size: var(--fs-tag);
  animation: agxPop .5s cubic-bezier(.2, 1.6, .4, 1), agxFlash 1.6s ease-out .2s;
}
.agx-rankup i { color: #f1c40f; }
.agx-lv { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: var(--fs-tag); color: var(--txt-dim); letter-spacing: 1px; }
.agx-lv b { color: #fff; }
.agx-bar { flex: 1; height: 8px; border-radius: 4px; background: #14191e; overflow: hidden; }
.agx-bar i { display: block; height: 100%; background: linear-gradient(90deg, #a87b00, #f1c40f); transition: width 1s cubic-bezier(.2, .8, .3, 1); }
.agx-bar.b2 i { background: linear-gradient(90deg, color-mix(in srgb, var(--sys) 45%, #000), var(--sys)); }
.agx-ins {
  display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid #1d232a; background: #0b0e11;
  text-align: left; font-size: var(--fs-small); color: #c9d1d8; line-height: 1.45; animation: agxIn .35s ease-out both;
}
.agx-ins b { color: #fff; }
.agx-ins > i { color: var(--ocena-top); font-size: 18px; }
.agx-ins.bd { display: block; }
.agx-ins.bd > i { margin-right: 8px; }
.agx-ins .bdh { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-tag); }
.agx-ins .agx-bar { margin-top: 8px; height: 6px; }

/* ---------- wlot do biblioteki (krok 2) ---------- */
/* duch: kopia gniazda w tej samej siatce (te same reguly co kafel), wyjeta z ukladu */
.slot.agx-ghslot, .agx-ghwish {
  display: block !important; position: fixed !important; z-index: 6000; margin: 0; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--sys) 55%, transparent);
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .95), 0 0 40px -10px color-mix(in srgb, var(--sys) 55%, transparent);
  will-change: transform, left, top, width, height;
}
.agx-ghcov { position: absolute; inset: 0; z-index: 2; overflow: hidden; background: linear-gradient(135deg, #1b2733, #0b0f13); }
.agx-ghcov img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.agx-ghcov::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 16, 20, .1) 20%, #0c1014 100%); }
.agx-ghcov .tx { position: absolute; left: 24px; right: 24px; bottom: 14px; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx-ghcov b { font-size: 26px; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.slot.agx-ghslot > .agx-ghface {
  position: absolute !important; left: 0 !important; bottom: 0 !important; top: auto !important; right: auto !important; margin: 0 !important;
  transform-origin: 0 100% !important; transition: none !important; animation: none !important; opacity: 0;
}
.agx-ghstar { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; color: #fff; font-size: 34px; opacity: 0; background: rgba(5, 6, 7, .35); }
.agx-ghwish { overflow: visible; }
/* lot do okna LISTY ZYCZEN (15.10): srebro listy zyczen; pozycja w oknie schowana do wyladowania */
.agx-ghwish.agx-ghwl { overflow: hidden; border-color: color-mix(in srgb, var(--zyczenia) 70%, transparent); box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .95), 0 0 40px -10px color-mix(in srgb, var(--zyczenia) 60%, transparent); }
.agx-ghwl .agx-ghcov::after { background: linear-gradient(180deg, rgba(12, 16, 20, 0) 40%, rgba(12, 16, 20, .55) 100%); }
#wishlist-grid .agx-wlhide { visibility: hidden !important; }
.agx-ghsh { position: fixed; z-index: 5990; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0)); opacity: 0; }
/* miejsce zrobione dla nowej gry: swiecaca przerywana ramka zamiast kafla */
.agx-hole { background: color-mix(in srgb, var(--sys) 6%, #0b0e11) !important; outline: 2px dashed color-mix(in srgb, var(--sys) 75%, transparent) !important; outline-offset: -2px;
  box-shadow: 0 0 22px -4px color-mix(in srgb, var(--sys) 55%, transparent) !important; }
.agx-hole > * { visibility: hidden !important; }
.agx-hole::before, .agx-hole::after { opacity: 0 !important; }
/* stempel z data, fala, +XP */
.agx-stamp {
  position: fixed; z-index: 6010; pointer-events: none; transform: translate(-50%, -50%) rotate(-12deg); text-align: center; font-family: var(--font);
  font-weight: 700; line-height: 1; color: var(--sc); white-space: nowrap; font-size: 15px;
  border: .17em solid var(--sc); border-radius: .32em; outline: .06em solid var(--sc); outline-offset: -.36em; padding: .55em .8em .5em;
  background: rgba(5, 6, 7, .62); text-shadow: 0 0 .5em var(--sc); box-shadow: 0 0 1.2em -.2em var(--sc); filter: url(#agx-ink);
}
.agx-stamp small { display: block; font-size: .5em; letter-spacing: .24em; }
.agx-stamp b { display: block; font-size: 1.75em; margin: .12em 0 .1em; letter-spacing: .04em; }
.agx-ring { position: fixed; z-index: 5995; pointer-events: none; border: 2px solid var(--sc); }
/* karta z zewnatrz (zadanie 6, 1A / 2A): okladka przylatuje na pas karty; pas czeka schowany; stempel na karcie wiekszy */
.agx-flyc { position: fixed; z-index: 5003; pointer-events: none; overflow: hidden; border-radius: 12px; background: #08090c;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .9); }
.agx-flyc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
/* okladka rosnie w cala karte (16.10 wieczor): kopia z tlem i ramka karty, karta schowana do wyladowania */
.agx-flyc.agx-morphg { background: linear-gradient(180deg, #0f1418, #090b0d); border: 1px solid color-mix(in srgb, var(--sys) 28%, transparent);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .9), 0 0 50px -20px color-mix(in srgb, var(--sys) 50%, transparent); }
body.agx-morph .agx-card { opacity: 0; animation: none; }
.agx-cov.agx-flywait > img, .agx-cov.agx-flywait > .lt { visibility: hidden; }
.agx-cov.agx-flywait .agx-tt, .agx-cov.agx-flywait .agx-x { opacity: 0; }
.agx-stamp.agx-stcard { font-size: 21px; }
.agx-card:focus { outline: none; } /* fokus na karcie z zewnatrz (Enter nie trafia w przycisk pod spodem) */
@media (max-width: 768px) { .agx-stamp.agx-stcard { font-size: 16px; } }
.agx-xpf { position: fixed; z-index: 6020; pointer-events: none; transform: translateX(-50%); font-family: var(--font); font-weight: 700; font-size: 18px; color: #f1c40f; white-space: nowrap; text-shadow: 0 0 14px rgba(241, 196, 15, .7), 0 2px 6px #000; }
@media (max-width: 768px) { .agx-stamp { font-size: 12px; } .agx-ghcov .tx { left: 16px; } .agx-ghcov b { font-size: 22px; } }

@keyframes agxIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes agxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes agxCardIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes agxSheetIn { from { transform: translateY(40%); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes agxShake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes agxPop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes agxFlash { 30% { box-shadow: 0 0 34px rgba(241, 196, 15, .8); } }

/* karta przerysowywana po kazdym kliknieciu — animacja tylko przy pierwszym pokazaniu i dla nowych czesci (.an) */
.agx-card.still, .agx-ovl.still, .agx-card.still .agx-chip0, .agx-card.still .agx-plats.err { animation: none; }
.agx-card.still .agx-plats.err { animation: agxShake .45s; }

/* ---------- telefon ---------- */
@media (max-width: 768px) {
  .agx-ph { padding-top: 2px; }
  .agx-card {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: calc(100dvh - 40px); transform: none;
    border-radius: 22px 22px 0 0; border-bottom: 0; animation: agxSheetIn .35s cubic-bezier(.2, .8, .3, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .agx-cov { height: 150px; }
  .agx-tt { left: 16px; bottom: 12px; }
  .agx-tt b { font-size: 22px; }
  .agx-in { padding: 12px 16px 26px; }
  .agx-pl { height: 42px; }
  .agx-chs { gap: 8px; }
  .agx-ch { min-height: 86px; }
  .agx-ch b { font-size: 11px; letter-spacing: 1px; }
  .agx-ch small { font-size: 10px; }
  .agx-chs.slim .agx-ch { min-height: 48px; }
  .agx-chs.slim .agx-ch i { display: none; }
  .agx-r3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .agx-r3 .wide { grid-column: 1 / -1; }
  .agx-oc { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .agx-oc button { height: 52px; font-size: 17px; }
  .agx-mo { padding: 22px 18px 30px; }
  .agx-big { font-size: 48px; }
  .agx-rankup { font-size: 11px; padding: 10px 12px; }
  .agx-fld span i { display: block; margin-top: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  .agx-card, .agx-ovl, .agx-res, .agx-sec, .agx-new, .agx-chip0, .agx-more.an, .agx-small, .agx-rankup, .agx-mo, .agx-ins, .agx-plats.err { animation: none !important; }
}

/* ---------- MISJA STARTOWA (16.10.2026): znacznik stanu nad polem tytulu, blysk pola, wyrozniony stan na karcie ---------- */
.agx-mis-slot:empty { display: none; }
.agx-mis {
  --mis: var(--sys);
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 6px 6px 10px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--mis) 45%, transparent); background: color-mix(in srgb, var(--mis) 9%, transparent);
  font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #e6e9ee;
  animation: agxIn .25s ease-out both;
}
.agx-mis.playing { --mis: var(--stan-aktywna); }
.agx-mis.finished { --mis: var(--accent-social); }
.agx-mis.wishlist { --mis: var(--zyczenia); }
.agx-mis > i { color: var(--mis); font-size: 12px; }
.agx-mis span { flex: 1; min-width: 0; }
.agx-mis button {
  flex: none; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: #7a8590; cursor: pointer;
}
.agx-mis button:hover, .agx-mis button:focus-visible { color: #fff; background: rgba(255, 255, 255, .06); outline: none; }
.agx-srch.agx-pulse { animation: agxPulse 1.7s ease-out; }
@keyframes agxPulse {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  20%, 55% { border-color: var(--sys); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sys) 30%, transparent), 0 0 18px color-mix(in srgb, var(--sys) 35%, transparent); }
}
/* GRAM zapisuje sie od razu po kliknieciu — z misji tylko wyroznienie (ARCHIWUM / LISTA ZYCZEN maja juz .on) */
.agx-ch.play.mis { border-color: var(--stan-aktywna); background: rgba(57, 255, 20, .09); box-shadow: 0 0 14px rgba(57, 255, 20, .18); }
@media (prefers-reduced-motion: reduce) {
  .agx-mis, .agx-srch.agx-pulse { animation: none !important; }
}
