/* =====================================================================================
   [controls] FELSZERELÉS – a Játék lap kártyája (.gear-card) és a teljes képernyős szerkesztő (#gearEd, js/gear.js)
   B · Műszak: fekete-fehér, a szín csak jelentéssel (ritkaság, licenc-figyelmeztetés); display-cím, DM Mono adatok.
   ===================================================================================== */

/* ---------- Játék lap: nagy, kattintható Felszerelés-kártya ---------- */
.play-side .gear-card { padding: 0; overflow: hidden; }
.gc-open { all: unset; box-sizing: border-box; cursor: var(--cur-ptr, pointer); display: grid; gap: 12px; width: 100%; padding: 16px 18px 14px; border-radius: var(--r-lg) var(--r-lg) 0 0;
  transition: background var(--t) var(--ease); }
.gc-open:hover { background: var(--fill); }
.gc-open:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.gc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-width: 0; }
.gc-ttl { display: grid; gap: 4px; min-width: 0; }
.gc-ttl small { font-weight: 600; font-size: 11px; line-height: 16px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.gc-ttl b { font-family: var(--f-disp); font-weight: 900; font-size: 30px; line-height: .86; text-transform: uppercase; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: .1em; }
.gc-cta { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); font-weight: 600; font-size: 13px;
  background: var(--paper); color: var(--on-paper); transition: transform var(--t-fast) var(--ease); }
.gc-cta .ic { width: 14px; height: 14px; }
.gc-open:hover .gc-cta { transform: translateX(2px); }
.gear-card .lo-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gear-card .lo-w { display: grid; grid-template-rows: 54px auto; gap: 6px; padding: 10px 10px 9px; border-radius: var(--r); background: var(--card-2, #131315); border: 1px solid var(--line); min-width: 0;
  transition: border-color var(--t), background var(--t); }
.gear-card .lo-w:hover { border-color: var(--line-3); background: var(--card-3, #1B1B1E); }
.gear-card .lo-w img { width: 100%; height: 54px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.gear-card .lo-w small { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gear-card .lo-w b { font-weight: 600; font-size: 13px; }
.gear-card .lo-w em { font-family: var(--f-mono); font-size: 10.5px; }
#loPresets .gc-sets { display: flex; gap: 4px; margin: 0; padding: 0 18px 16px; }
#loPresets .gc-sets .lo-set { flex: 1 1 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; }
#loPresets .gc-sets .lo-set small { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }
#loPresets .gc-sets .lo-set b { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
#loPresets .gc-sets .lo-set[aria-selected="true"] small { color: var(--light); }
#loPresets .gc-sets .lo-set[aria-selected="true"] b { color: var(--ink); font-weight: 600; }

/* [charme] Karakterem-kártya a Játék lapon (a szerkesztő stílusa: charme.css, lusta) */
.play-side .me-edit-card { padding: 0; overflow: hidden; }
.me-edit-card .gc-open { border-radius: var(--r-lg); }
.me-edit-sub { font-size: 12.5px; line-height: 18px; color: var(--muted); }

/* Fejlődés: al-menü + Felszerelés gomb egy sorban */
.pg-navrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; min-width: 0; }
.pg-navrow > #progNav { margin-bottom: 0; min-width: 0; }
.gear-btn { flex: none; }
#shop .shop-title #shopGear { margin-left: auto; }
.death-hint .btn.small { height: 26px; margin-left: 6px; vertical-align: middle; pointer-events: auto; }

/* ---------- a szerkesztő ---------- */
.ge-overlay { position: fixed; inset: 0; z-index: 70; display: grid; background: rgba(6, 6, 7, .92); animation: nrFade var(--t) var(--ease) both; pointer-events: auto; text-shadow: none; }
.ge-dlg { position: relative; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--f-body); }
.ge-dlg::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: var(--grain); background-size: 160px 160px; opacity: .05; }
.ge-dlg.in { animation: nrIn var(--t-in) var(--ease-film) both; }
.ge-head { position: relative; display: flex; align-items: flex-end; gap: 24px; padding: clamp(20px, 3.4vh, 44px) var(--m-gutter, 48px) 18px; min-width: 0; }
.ge-ttl { flex: 1; min-width: 0; display: grid; gap: 12px; }
.ge-kick { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ge-head h2 { margin: 0; font-family: var(--f-disp); font-weight: 900; font-size: clamp(48px, 7.4vh, 100px); line-height: .82; text-transform: uppercase; padding-top: .14em; white-space: nowrap; }
.ge-sets { flex: none; display: flex; gap: 6px; align-items: center; margin: 0 56px 6px 0; }
.ge-set { all: unset; box-sizing: border-box; cursor: var(--cur-ptr, pointer); display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r-pill); background: var(--fill-2);
  color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; transition: background var(--t), color var(--t); max-width: 200px; }
.ge-set small { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }
.ge-set b { font-weight: inherit; overflow: hidden; text-overflow: ellipsis; }
.ge-set:hover { color: var(--ink); background: var(--fill-3); }
.ge-set[aria-selected="true"] { background: var(--paper); color: var(--on-paper); font-weight: 600; }
.ge-set[aria-selected="true"] small { color: var(--on-paper-2); }
.ge-set:focus-visible, .ge-slot:focus-visible, .ge-card:focus-visible, .ge-skin:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ge-ren { height: 38px; border-radius: var(--r-pill); }
.ge-ren .ic { width: 15px; height: 15px; }
.ge-x { top: 18px; }

/* fegyverhelyek (fülek) */
.ge-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 var(--m-gutter, 48px) 16px; }
.ge-slot { all: unset; box-sizing: border-box; cursor: var(--cur-ptr, pointer); position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; height: 76px; padding: 8px 14px 8px 8px;
  border-radius: var(--r-lg); background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--t), box-shadow var(--t); }
.ge-slot:hover { background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.ge-slot[aria-selected="true"] { background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--ink-2); }
.ge-slot[aria-selected="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -9px; height: 2px; background: var(--light); border-radius: 2px; }
.ge-slot-img { display: grid; place-items: center; height: 60px; border-radius: var(--r); background: rgba(0, 0, 0, .25); }
.ge-slot-img img { width: 100%; height: 54px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.ge-slot-t { display: grid; gap: 2px; min-width: 0; }
.ge-slot-t small { font-weight: 600; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.ge-slot-t b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ge-slot-t em { font-style: normal; font-family: var(--f-mono); font-size: 11px; color: var(--rc, var(--muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* törzs: rács + részletek */
.ge-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 26vw, 420px); gap: 24px; min-height: 0; padding: 4px var(--m-gutter, 48px) 0; }
.ge-main { min-height: 0; overflow-y: auto; padding: 4px 4px 24px; margin: 0 -4px; }
.ge-tools:empty { display: none; }
.ge-tools { margin-bottom: 12px; }
.ge-tools .cx-seg { display: inline-flex; }
.ge-tools .cx-seg button { flex: none; padding: 0 14px; }
.ge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.ge-card { all: unset; box-sizing: border-box; cursor: var(--cur-ptr, pointer); position: relative; display: grid; grid-template-rows: 92px auto auto auto; gap: 8px; min-width: 0; padding: 10px 12px 12px;
  border-radius: var(--r-lg); background: var(--card-2, #131315); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--t), box-shadow var(--t), transform var(--t-fast) var(--ease); contain: layout paint; }
.ge-card:hover { background: var(--card-3, #1B1B1E); box-shadow: inset 0 0 0 1px var(--line-3); }
.ge-card:active { transform: scale(.985); }
.ge-card.sel { background: var(--fill-3); box-shadow: inset 0 0 0 2px var(--paper); }
.ge-card.locked { cursor: var(--cur-no, default); }
.ge-card.locked .ge-img img { opacity: .42; filter: grayscale(.6) drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.ge-card.locked .ge-n b { color: var(--ink-2); }
.ge-img { display: grid; place-items: center; min-width: 0; }
.ge-img img { width: 100%; height: 100%; max-height: 92px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.ge-img img.ge-ph { background: linear-gradient(90deg, var(--fill) 0, var(--fill-2) 50%, var(--fill) 100%); border-radius: var(--r); }
.ge-n { display: grid; gap: 1px; min-width: 0; }
.ge-n b { font-weight: 600; font-size: 14.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ge-n small { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ge-bars { display: grid; gap: 4px; }
.ge-bar { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 8px; }
.ge-bar small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.ge-bar i, .ge-dbar i { position: relative; display: block; height: 3px; border-radius: 3px; background: var(--fill-3); overflow: hidden; }
.ge-bar b, .ge-dbar b { position: absolute; inset: 0; background: var(--ink-2); transform-origin: left center; border-radius: 3px; }
.ge-card.sel .ge-bar b { background: var(--paper); }
.ge-st { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-size: 11.5px; font-weight: 500; color: var(--acc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ge-st .ic { width: 12px; height: 12px; flex: none; }
.ge-st.on { color: var(--ink); }
.ge-st.warn { color: var(--warn); }
.ge-st.lock { color: var(--muted); font-weight: 400; }

/* festések */
.ge-skins:empty { display: none; }
.ge-skins { margin-top: 24px; }
.ge-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ge-sec-h h3 { margin: 0; font-weight: 600; font-size: 11px; line-height: 16px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.ge-skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ge-skin { all: unset; box-sizing: border-box; cursor: var(--cur-ptr, pointer); position: relative; display: grid; grid-template-rows: 64px auto; gap: 6px; padding: 8px 10px 10px; border-radius: var(--r-lg); background: var(--card-2, #131315);
  box-shadow: inset 0 0 0 1px var(--line); transition: background var(--t), box-shadow var(--t); min-width: 0; }
.ge-skin::before { content: ""; position: absolute; left: 10px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }
.ge-skin:hover { background: var(--card-3, #1B1B1E); box-shadow: inset 0 0 0 1px var(--line-3); }
.ge-skin.sel { background: var(--fill-3); box-shadow: inset 0 0 0 2px var(--paper); }
.ge-skin .ge-img img { max-height: 64px; }
.ge-skin .ge-n b { font-size: 13px; }
.ge-skin .ge-n small { color: var(--rc); text-transform: none; letter-spacing: 0; }
.ge-skins > .hint { margin-top: 10px; }

/* részletek (jobb oldal) */
.ge-detail { min-height: 0; overflow-y: auto; align-self: start; display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--card, #0E0E10); box-shadow: inset 0 0 0 1px var(--line); max-height: 100%; }
.ge-d-img { display: grid; place-items: center; height: 150px; border-radius: var(--r); background: radial-gradient(ellipse at 50% 60%, rgba(245, 242, 236, .07), transparent 70%); }
.ge-d-img img { width: 100%; height: 140px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
.ge-d-h { display: grid; gap: 4px; }
.ge-d-h small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ge-d-h h3 { margin: 0; font-family: var(--f-disp); font-weight: 900; font-size: 34px; line-height: .9; text-transform: uppercase; }
.ge-rar { font-size: 12px; font-weight: 500; color: var(--rc); }
.ge-d-desc { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.ge-d-bars { display: grid; gap: 8px; }
.ge-dbar { display: grid; grid-template-columns: 90px minmax(0, 1fr) 64px; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.ge-dbar i { height: 4px; }
.ge-dbar b { background: var(--paper); }
.ge-dbar em { font-style: normal; font-family: var(--f-mono); font-size: 11.5px; color: var(--ink); text-align: right; }
.ge-d-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.ge-d-facts div { padding: 8px 10px; border-radius: var(--r); background: var(--fill); }
.ge-d-facts dt { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ge-d-facts dd { margin: 2px 0 0; font-family: var(--f-mono); font-size: 13px; color: var(--ink); }
.ge-d-lic { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--acc); }
.ge-d-lic.warn { color: var(--warn); } .ge-d-lic.lock { color: var(--muted); }
.ge-d-lic .ic { width: 14px; height: 14px; flex: none; }

.ge-foot { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px var(--m-gutter, 48px) clamp(14px, 2.6vh, 32px); border-top: 1px solid var(--line); }
.ge-note { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--muted); }
.ge-note .ic { width: 14px; height: 14px; flex: none; }

/* közepes: a részletek a rács alá kerülnek helyett elrejtve (a kártya mutatja a fő adatokat) */
@media (max-width: 1180px) {
  .ge-body { grid-template-columns: minmax(0, 1fr); }
  .ge-detail { display: none; }
  .ge-slot { grid-template-columns: 84px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ge-head { flex-wrap: wrap; gap: 14px; padding-top: 18px; }
  .ge-head h2 { font-size: 52px; }
  .ge-kick { font-size: 10.5px; }
  .ge-sets { margin: 0; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .ge-set { height: 34px; padding: 0 12px; font-size: 13px; }
  .ge-ren span { display: none; }
  .ge-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .ge-slot { grid-template-columns: minmax(0, 1fr); grid-template-rows: 40px auto; height: auto; padding: 6px; gap: 4px; text-align: center; }
  .ge-slot-img { height: 40px; } .ge-slot-img img { height: 36px; }
  .ge-slot-t b { font-size: 12px; } .ge-slot-t em { display: none; } .ge-slot-t small { font-size: 9.5px; letter-spacing: .04em; }
  .ge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ge-card { grid-template-rows: 64px auto auto auto; padding: 8px 10px 10px; }
  .ge-img img { max-height: 64px; }
  .ge-bar { grid-template-columns: minmax(0, 1fr); gap: 2px; } .ge-bar small { display: none; }
  .ge-skin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nr-kbd { display: none; }
  .ge-note { display: none; }
  .ge-foot { justify-content: flex-end; }
  .gear-card .lo-sum { gap: 4px; }
  .gear-card .lo-w { padding: 8px 6px; grid-template-rows: 40px auto; }
  .gear-card .lo-w img { height: 40px; }
  .gc-ttl b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .ge-dlg.in, .ge-overlay { animation: none; } .ge-card:active { transform: none; } }
:root[data-anim="reduced"] .ge-dlg.in { animation: none; }

/* --- saját vezérlők illesztése a meglévő elrendezésekbe --- */
label.inline:has(.cx-val) { grid-template-columns: 110px minmax(0, 1fr) 44px; }
.nr-box label .cx-dd, .form label .cx-dd, .mode-opts label .cx-dd, .mk-of label .cx-dd { margin-top: 0; }
.st-row > .cx-seg, .st-row > .cx-dd { justify-self: stretch; }
.st-row > .cx-val { justify-self: end; }
.st-cross .st-row > .cx-color { justify-self: start; }
.nr-search .cx-dd { width: auto; min-width: 200px; flex: none; }
.st-cross .opts .st-row:has(.cx-val) { grid-template-columns: minmax(0, 180px) minmax(0, 1fr) 44px; }
.st-row.sel:has(> .cx-seg) { grid-template-columns: minmax(0, 1fr) auto; }
.st-row > .cx-seg button { flex: none; padding: 0 12px; }
@media (max-width: 760px) { .st-row.sel:has(> .cx-seg) { grid-template-columns: minmax(0, 1fr); } .st-row > .cx-seg button { flex: 1 1 0; padding: 0 6px; } }
