/* ===== gra online: logowanie, czat, targ ===== */
.net-login { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #1d2a22 0%, #07090c 75%); font: 14px Inter, sans-serif; color: #e8dcc0; }
.nl-box { width: min(340px, 92vw); padding: 22px 22px 18px; display: grid; gap: 9px; text-align: center;
  background: url(../assets/ui/mu/newui_msgbox_back.png) top / 100% auto, #0b0d12f0; border: 1px solid #4a4231; box-shadow: 0 10px 40px #000c; }
.nl-logo { font: 700 28px Cinzel, serif; color: #f3e2b0; text-shadow: 0 2px 6px #000; } .nl-logo span { color: #ffd36b; }
.nl-sub { color: #a89d85; margin-top: -6px; margin-bottom: 4px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.nl-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.nl-tabs button { border: 1px solid #3a3326; background: #0006; color: #a89d85; padding: 6px; font: 600 13px Inter; cursor: pointer; }
.nl-tabs button.on { color: #ffd36b; border-color: #8a6a2c; background: #1a1508; }
.nl-box input { padding: 9px 11px; background: #000c; border: 1px solid #6b5a36; color: #fff; font: 600 14px Inter; }
.nl-msg { min-height: 16px; color: #ff7a6a; font-size: 12.5px; }
.nl-box .btn { padding: 9px; font-size: 15px; }

.net-chat { position: absolute; left: 8px; bottom: calc(51px * var(--hud, 1.3) + 14px); width: min(380px, 44%); z-index: 7;
  background: #0b0d12cc; border: 1px solid #3a3326; font: 600 12px Inter; color: #e8dcc0; display: flex; flex-direction: column; }
.net-chat .nc-head { display: flex; gap: 2px; align-items: center; padding: 3px; border-bottom: 1px solid #3a3326; }
.net-chat .nc-head button { border: none; background: none; color: #a89d85; font: 600 11.5px Inter; padding: 2px 8px; cursor: pointer; }
.net-chat .nc-head button.on { color: #ffd36b; }
.net-chat .nc-online { margin-left: auto; color: #7fd18c; font-size: 11px; }
.net-chat .nc-min { font-size: 14px !important; }
.net-chat .nc-close { font-size: 15px !important; line-height: 1; padding: 2px 7px !important; }
.net-chat .nc-close:hover { color: #ff8a7a !important; }
.net-chat.closed { display: none !important; }
.nc-reopen { position: absolute; left: 8px; bottom: calc(51px * var(--hud, 1.3) + 34px); z-index: 8; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border: 1px solid #6b5330; border-radius: 6px; background: rgba(11, 13, 18, .9); color: #e8dcc0;
  font: 600 12.5px Inter, system-ui, sans-serif; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.6); }
.nc-reopen:hover { border-color: #d4a657; color: #ffd36b; }
.nc-reopen[hidden], html.portrait .nc-reopen, body.creating .nc-reopen { display: none !important; }
.net-chat .nc-log { height: 120px; overflow-y: auto; padding: 4px 6px; text-shadow: 0 1px 2px #000; scrollbar-width: thin; }
.net-chat .nc-log b { color: #ffd36b; }
.net-chat .nc-input input { width: 100%; box-sizing: border-box; border: none; border-top: 1px solid #3a3326; background: #000a; color: #fff; padding: 6px 8px; font: 600 12px Inter; }
.net-chat.min .nc-log, .net-chat.min .nc-input { display: none; }
body.creating .net-chat { display: none; }
/* czat zajmuje miejsce komunikatów — komunikaty wyżej */
.battle:has(.net-chat:not(.min)) .msgbox { bottom: calc(51px * var(--hud, 1.3) + 186px); }

#tab-market .mk-views { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-bottom: 8px; }
#tab-market .mk-views button { border: 1px solid #3a3326; background: #0006; color: #a89d85; padding: 5px; font: 600 12px Inter; cursor: pointer; }
#tab-market .mk-views button.on { color: #ffd36b; border-color: #8a6a2c; background: #1a1508; }
#tab-market .mk-filter { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
#tab-market .mk-filter select, #tab-market .mk-filter input { background: #000b; color: #e8dcc0; border: 1px solid #3a3326; padding: 4px 6px; font: 12px Inter; }
#tab-market .mk-filter input { flex: 1; min-width: 80px; }
#tab-market .mk-row { display: flex; align-items: center; gap: 8px; padding: 4px; border-bottom: 1px solid #2a2418; }
#tab-market .mk-ic { width: 40px; height: 40px; flex: none; background-size: contain; background-repeat: no-repeat; background-position: center; }
#tab-market .mk-info { flex: 1; min-width: 0; } #tab-market .mk-info b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-market .mk-info small { color: #a89d85; font-size: 11px; }
#tab-market .mk-sell { display: flex; gap: 4px; } #tab-market .mk-sell input { width: 90px; background: #000b; color: #fff; border: 1px solid #3a3326; padding: 3px 5px; font: 12px Inter; }
/* 8 zakładek (z Targiem) w jednym rzędzie */
.win .tabs { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; }
.win .tabs button { font-size: 10px !important; }

/* telefon: mniejszy czat */
@media (max-height: 480px) { .net-chat { width: min(300px, 40%); } .net-chat .nc-log { height: 70px; } .battle:has(.net-chat:not(.min)) .msgbox { bottom: calc(51px * var(--hud, 1.3) + 130px); } .battle:has(.net-chat.min) .msgbox { bottom: calc(51px * var(--hud, 1.3) + 44px); } }

/* ===== drużyna (party) — ramka w lewym górnym rogu, jak w MU ===== */
.party-frame { position: absolute; left: 8px; top: 8px; width: 196px; z-index: 7; display: grid; gap: 3px; font: 600 11.5px Inter, sans-serif; color: #e8dcc0; pointer-events: auto; }
.party-frame:empty { display: none; }
.party-frame .pf-head { display: flex; align-items: center; gap: 6px; padding: 3px 6px; background: #0b0d12cc; border: 1px solid #3a3326; color: #ffd36b; font-family: Cinzel, serif; }
.party-frame .pf-head small { color: #a89d85; font: 600 10.5px Inter; }
.party-frame .pf-x { margin-left: auto; border: none; background: none; color: #a89d85; cursor: pointer; font-size: 13px; padding: 0 3px; }
.party-frame .pf-x:hover { color: #ff7a6a; }
.party-frame .pf-m { padding: 3px 6px 4px; background: #0b0d12b8; border: 1px solid #2a2418; }
.party-frame .pf-m.near { border-color: #5a4a26; }
.party-frame .pf-m.off { opacity: .5; }
.party-frame .pf-n { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.party-frame .pf-n small { color: #a89d85; }
.party-frame .pf-hp { display: block; height: 4px; margin: 2px 0 1px; background: #300; } .party-frame .pf-hp u { display: block; height: 100%; background: linear-gradient(#e04030, #8a1a10); }
.party-frame .pf-map { color: #8f866f; font-size: 10px; }
.party-frame .pf-add { display: flex; gap: 3px; opacity: .55; } .party-frame .pf-add:hover, .party-frame .pf-add:focus-within { opacity: 1; }
.party-frame .pf-add input { flex: 1; min-width: 0; background: #000b; color: #fff; border: 1px solid #3a3326; padding: 3px 6px; font: 600 11px Inter; }
.party-frame .pf-invite { padding: 6px; background: #1a1508f0; border: 1px solid #8a6a2c; display: grid; gap: 5px; }
.party-frame .pf-invite div { display: flex; gap: 4px; }
.net-chat .nc-admin { color: #ff9a5c; } .net-chat .nc-admin b { color: #ff6a3c; }
@media (max-height: 480px) { .party-frame { width: 160px; font-size: 10.5px; } .party-frame .pf-add { display: none; } .party-frame .pf-m { padding: 2px 5px; } }

/* członek drużyny na mapie: imię nad postacią */
.ally-label { position: absolute; left: 0; top: 0; width: 120px; margin: -34px 0 0 -60px; text-align: center; pointer-events: auto; cursor: pointer; transition: opacity .3s; will-change: transform;
  font: 700 12px Inter, sans-serif; color: #9fd0ff; text-shadow: 0 1px 2px #000, 0 0 6px #000; }
.ally-label b { font-family: Cinzel, serif; } .ally-label small { display: block; font: 600 10px Inter; color: #c9d8ee; }
.dmg.ally { color: #9fd0ff; font-size: 15px; }

/* ===== podgląd innego gracza ===== */
.pview-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: #000a; animation: pvIn .18s ease-out; }
@keyframes pvIn { from { opacity: 0; } }
.pview { position: relative; width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; padding: 18px 18px 14px; box-sizing: border-box;
  background: linear-gradient(#1c212b, #12151b 140px); border: 1px solid #4a4231; border-top-color: #e3b65c; border-radius: 14px; box-shadow: 0 20px 60px #000e; color: #efe2c2; font: 14px Inter, sans-serif; }
.pv-load { padding: 40px 0; text-align: center; color: #9d927a; }
.pv-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #3b3323; background: #1c212b; color: #efe2c2; font: 400 22px/1 Inter, sans-serif; cursor: pointer; z-index: 2; }
.pv-head { display: flex; align-items: center; gap: 12px; padding-right: 48px; margin-bottom: 12px; }
.pv-head img { width: 48px; height: 48px; border-radius: 50%; border: 1px solid #e3b65c; background: #000; padding: 2px; }
.pv-head h3 { margin: 0; font: 700 21px/1.1 Cinzel, serif; color: #f6d68a; } .pv-head p { margin: 3px 0 0; color: #9d927a; font-size: 13px; }
.pv-on { margin-left: auto; font-size: 12px; color: #8f866f; white-space: nowrap; } .pv-on.on { color: #7fd18c; } .pv-on::before { content: '●'; margin-right: 5px; }
.pv-body { display: grid; grid-template-columns: 230px 1fr; gap: 16px; }
.pv-model { position: relative; height: 320px; border-radius: 12px; background: radial-gradient(ellipse at 50% 80%, #2a2417 0%, #0c0e12 70%); border: 1px solid #2c2618; overflow: hidden; }
.pv-model canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.pv-model small { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 11px; color: #6f6754; pointer-events: none; }
.pv-model.pv-nomodel canvas { display: none; }
.pv-doll { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 58px 92px 58px 46px; gap: 6px; margin-bottom: 12px;
  grid-template-areas: "helmet wings wings" "weapon armor shield" "gloves pants boots" "ring necklace ring2"; }
.pv-slot { position: relative; border: 1px solid #2c2618; border-radius: 8px; background: #0a0c10; display: grid; place-items: center; overflow: hidden; }
.pv-slot > span { font-size: 10.5px; color: #4d4637; }
.pv-slot .slot { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: none; border-radius: 8px; background-size: contain; }
.pv-helmet { grid-area: helmet; } .pv-wings { grid-area: wings; } .pv-weapon { grid-area: weapon; } .pv-armor { grid-area: armor; } .pv-shield { grid-area: shield; }
.pv-gloves { grid-area: gloves; } .pv-pants { grid-area: pants; } .pv-boots { grid-area: boots; } .pv-ring { grid-area: ring; } .pv-necklace { grid-area: necklace; } .pv-ring2 { grid-area: ring2; }
.pv-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; }
.pv-stats div { padding: 6px 4px; border: 1px solid #2c2618; border-radius: 8px; text-align: center; background: #0a0c10; }
.pv-stats dt { font-size: 11px; color: #9d927a; } .pv-stats dd { margin: 2px 0 0; font: 700 16px Inter, sans-serif; color: #efe2c2; }
.pv-party { margin: 10px 0 0; font-size: 13px; color: #9fd0ff; }
.pv-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.pv-actions .btn { min-height: 40px; padding: 6px 16px; }
.party-frame .pf-m[data-name] { cursor: pointer; }
#tab-market .mk-seller { color: #e3b65c; text-decoration: underline dotted; cursor: pointer; }
/* telefon pionowo: podgląd jako arkusz od dołu */
html.portrait .pview-wrap { place-items: end stretch; }
html.portrait .pview { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; border-left: none; border-right: none; border-bottom: none; padding: 20px 14px calc(14px + env(safe-area-inset-bottom)); animation: pvUp .22s ease-out; }
@keyframes pvUp { from { transform: translateY(40px); opacity: .4; } }
html.portrait .pview::before { content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #ffffff24; }
html.portrait .pv-body { grid-template-columns: 1fr; gap: 12px; }
html.portrait .pv-model { height: 36vh; }
html.portrait .pv-actions .btn { flex: 1; }
@media (prefers-reduced-motion: reduce) { .pview-wrap, .pview { animation: none; } }

/* stan połączenia */
.net-banner { position: fixed; left: 50%; top: 10px; transform: translate(-50%, -140%); z-index: 90; max-width: calc(100vw - 24px); padding: 10px 14px; border-radius: 10px;
  background: #2a1210f2; border: 1px solid #a8402c; color: #ffd9cf; font: 600 13px Inter, sans-serif; box-shadow: 0 8px 30px #000c; transition: transform .25s ease; display: flex; gap: 10px; align-items: center; }
.net-banner.show { transform: translate(-50%, 0); }
html.portrait .net-banner { top: calc(var(--m-top, 56px) + 8px); }

.pv-find { width: min(420px, calc(100vw - 24px)); display: grid; gap: 10px; }
.pv-find-t { margin: 0; font: 700 20px Cinzel, serif; color: #f6d68a; padding-right: 48px; } .pv-find-s { margin: 0; color: #9d927a; font-size: 13px; }
.pv-find input { padding: 12px 14px; font: 600 16px Inter, sans-serif; background: #07090c; color: #fff; border: 1px solid #3b3323; border-radius: 10px; }
.pv-find input:focus { outline: 2px solid #e3b65c55; border-color: #e3b65c; }
@media (max-height: 480px) and (orientation: landscape) {
  .pview { padding: 12px 14px 10px; width: min(760px, calc(100vw - 16px)); max-height: calc(100vh - 16px); }
  .pv-head { margin-bottom: 8px; } .pv-head img { width: 38px; height: 38px; } .pv-head h3 { font-size: 18px; }
  .pv-body { grid-template-columns: 200px 1fr; gap: 12px; }
  .pv-model { height: calc(100vh - 110px); min-height: 200px; }
  .pv-doll { grid-template-rows: 44px 64px 44px 36px; gap: 4px; margin-bottom: 8px; }
  .pv-stats div { padding: 3px; } .pv-stats dd { font-size: 14px; }
  .pv-actions { margin-top: 8px; } .pv-actions .btn { min-height: 34px; }
}
.pv-slot .slot, .pv-slot .slot.icon3d { background-size: contain !important; background-position: center !important; background-repeat: no-repeat !important; }

.ally-labels { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
/* postać otwarta na innym urządzeniu — gra tutaj wstrzymana */
.net-takeover { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .78); }
.net-takeover > div { max-width: 360px; padding: 20px; border: 1px solid #6b5330; border-radius: 12px; background: #17120c; color: #eadcc0; text-align: center; }
.net-takeover h3 { margin: 0 0 8px; color: #f3c873; font-size: 18px; }
.net-takeover p { margin: 0 0 14px; font-size: 15px; line-height: 1.45; }
/* czat: pole + przycisk Wyślij, godzina, własne wiadomości, pusty stan */
.net-chat .nc-input { display: flex; border-top: 1px solid #3a3326; }
.net-chat .nc-input input { flex: 1; min-width: 0; border-top: none; }
.net-chat .nc-send { flex: none; border: none; border-left: 1px solid #3a3326; background: #2a2114; color: #ffd36b; font: 700 12px Inter; padding: 0 12px; cursor: pointer; }
.net-chat .nc-msg time { margin-right: 6px; color: #8d8470; font-size: .85em; font-variant-numeric: tabular-nums; }
.net-chat .nc-me b { color: #9fd0ff; }
.net-chat .nc-empty { margin: 8px 0; color: #8d8470; font-style: italic; }

/* ---- społeczność: przyjaciele, wiadomości, ranking ---- */
.so-wrap { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; background: #000a; padding: 12px; box-sizing: border-box; }
.so-wrap[hidden] { display: none; }
.so { width: min(100%, 520px); max-height: min(86vh, 760px); display: flex; flex-direction: column; box-sizing: border-box; padding: 14px 16px 16px; background: #17150f; border: 1px solid #6b5330;
  color: #eadcbb; font: 14px "Trebuchet MS", system-ui, sans-serif; box-shadow: 0 20px 60px #000c; }
.so header { display: flex; align-items: center; justify-content: space-between; }
.so h3 { margin: 0; font: 700 20px "Palatino Linotype", Georgia, serif; color: #ecc78a; }
.so-x { width: 44px; height: 44px; border: 1px solid #463b2e; background: #1b1915; color: #eadcbb; font-size: 20px; border-radius: 2px; cursor: pointer; }
.so-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0 8px; border-bottom: 1px solid #463b2e; }
.so-tabs button { position: relative; min-height: 44px; border: none; background: none; color: #b5a68c; font: 600 14px "Trebuchet MS", system-ui, sans-serif; cursor: pointer; }
.so-tabs button.on { color: #ecc78a; box-shadow: inset 0 -2px 0 #d1a35f; }
.so-badge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #c0392b; color: #fff; font: 700 11px/18px system-ui, sans-serif; font-style: normal; text-align: center; vertical-align: 1px; }
.so-badge[hidden] { display: none; }
.so-body { overflow-y: auto; min-height: 0; flex: 1; padding-top: 4px; display: flex; flex-direction: column; }
.so-add, .so-send { display: flex; gap: 8px; margin: 4px 0 8px; }
.so-add input, .so-send input { flex: 1; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 0 14px; border: 1px solid #584733; border-radius: 22px; background: #0e0e0c; color: #eadcbb; font-size: 16px; }
.so-add .btn, .so-send .btn { min-height: 44px; border-radius: 22px; padding: 0 18px; }
.so-sub, .so-empty, .so-load { margin: 6px 2px 10px; color: #a09581; font-size: 13px; }
.so-err { margin: 6px 0; padding: 8px 10px; border: 1px solid #6e3326; background: #3a1a14; color: #f0b0a0; font-size: 13px; }
.so-req { display: grid; gap: 6px; margin: 6px 0 10px; padding: 10px; border: 1px solid #956835; background: #2a2114; font-size: 13px; }
.so-req span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.so-list { list-style: none; margin: 0; padding: 0; }
.so-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px; border-bottom: 1px solid #ffffff0d; }
.so-who { min-width: 0; flex: 1 1 180px; } .so-who b { font-size: 15px; }
.so-who small { display: block; margin-top: 2px; color: #a09581; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-act { display: flex; flex-wrap: wrap; gap: 6px; } .so-act .btn { min-height: 40px; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: #5a5246; vertical-align: 1px; }
.online .dot, .dot.on { background: #6fd48a; box-shadow: 0 0 6px #6fd48a88; }
.so-conv li { cursor: pointer; min-height: 44px; } .so-conv li.unread b { color: #ecc78a; }
.so-meta { display: flex; align-items: center; gap: 8px; color: #a09581; }
.so-thead { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #463b2e; }
.so-thead > div { flex: 1; min-width: 0; } .so-thead small { display: block; color: #a09581; font-size: 12px; } .so-thead .btn { min-height: 40px; }
.so-msgs { display: flex; flex-direction: column; gap: 6px; min-height: 160px; max-height: 46vh; overflow-y: auto; padding: 10px 2px; }
.so-msgs > :first-child { margin-top: auto; }
.so-m { align-self: flex-start; max-width: 82%; padding: 8px 12px; border-radius: 12px 12px 12px 3px; background: #26221a; }
.so-m.me { align-self: flex-end; border-radius: 12px 12px 3px 12px; background: #3a2d1a; }
.so-m p { margin: 0; overflow-wrap: anywhere; } .so-m time { display: block; margin-top: 3px; color: #8d8470; font-size: 11px; text-align: right; }
.so-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.so-chips button { min-height: 40px; padding: 0 14px; border: 1px solid #463b2e; border-radius: 20px; background: #1b1915; color: #b5a68c; font: 600 13px "Trebuchet MS", system-ui, sans-serif; cursor: pointer; }
.so-chips button.on { border-color: #d1a35f; color: #ecc78a; background: #2a2114; }
.so-rank { list-style: none; margin: 0; padding: 0; }
.so-rank li { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid #ffffff0d; }
.so-rank li.me { background: #2a2114; }
.so-rank .pos { text-align: center; font: 700 14px Georgia, serif; color: #a09581; }
.so-rank .pos.top1 { color: #ffd36b; } .so-rank .pos.top2 { color: #d8d8e8; } .so-rank .pos.top3 { color: #e0a070; }
.so-rank .so-name { justify-self: start; min-height: 40px; border: none; background: none; color: #eadcbb; font: 600 14px "Trebuchet MS", system-ui, sans-serif; cursor: pointer; text-align: left; }
.so-rank small { color: #a09581; font-size: 12px; } .so-rank b { font-variant-numeric: tabular-nums; padding-right: 6px; }
.it-link { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; font-weight: 700; }
.so-card-wrap { z-index: 130; } .so-card { overflow-y: auto; } .so-card .btn { min-height: 44px; margin-top: 12px; }
html.portrait .so-wrap:not(.so-card-wrap) { padding: 0; align-items: stretch; }
html.portrait .so-wrap:not(.so-card-wrap) .so { width: 100%; max-height: none; height: 100%; border: none; padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
html.portrait .so-msgs { max-height: none; flex: 1; }
@media (prefers-reduced-motion: no-preference) { .so { animation: soIn .18s ease-out; } @keyframes soIn { from { transform: translateY(12px); opacity: .6; } } }
.so-wrap { justify-items: stretch; } .so { width: 100%; max-width: 520px; margin: 0 auto; }

/* ---- handel między graczami ---- */
.tr-wrap { z-index: 115; }
.tr { max-width: 640px !important; }
.tr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; overflow-y: auto; min-height: 0; }
.tr-side { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid #463b2e; background: #0e0e0c; }
.tr-side.ok { border-color: #4f8c6a; box-shadow: inset 0 0 0 1px #4f8c6a55; }
.tr-side h4 { margin: 0; font: 700 14px Georgia, serif; color: #ecc78a; display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.tr-st { font: 600 12px "Trebuchet MS", system-ui, sans-serif; color: #6fd48a; }
.tr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tr-it { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px; background: #1b1915; border: 1px solid #ffffff0d; }
.tr-name { flex: 1; min-width: 0; min-height: 36px; border: none; background: none; text-align: left; font: 700 13px "Trebuchet MS", system-ui, sans-serif; cursor: pointer; overflow-wrap: anywhere; }
.tr-empty { color: #a09581; font-size: 12.5px; padding: 6px 2px; }
.tr-pick { max-height: 220px; overflow-y: auto; }
.tr-gold { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #b5a68c; font-size: 13px; }
.tr-gold b { color: #f0d39b; font-size: 15px; } .tr-gold small { color: #a09581; font-size: 12px; }
.tr-gold input { width: 120px; min-height: 40px; padding: 0 10px; border: 1px solid #584733; background: #17150f; color: #f0d39b; font-size: 16px; border-radius: 2px; }
.tr-note { color: #f0b0a0; }
.tr-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 10px; } .tr-foot .btn { min-height: 46px; }
.tr-invite { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 116; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  padding: 12px 14px; background: #1b1915; border: 1px solid #956835; box-shadow: 0 8px 30px #000c; color: #eadcbb; font: 14px "Trebuchet MS", system-ui, sans-serif; }
.tr-invite div { display: flex; gap: 8px; } .tr-invite .btn { min-height: 42px; }
html.portrait .tr-invite { top: calc(var(--m-top, 88px) + 8px); }
@media (max-width: 560px) { .tr-cols { grid-template-columns: 1fr; } }
html.portrait.trade-open #mchat, html.portrait.trade-open .ms-btn { display: none; }
.tr { overflow: hidden; } .tr .tr-cols { flex: 1 1 auto; } .tr .tr-foot { flex: none; }

/* komputer: dziennik nad czatem (czat i dziennik są w różnych kontenerach) */
.battle-col:has(.net-chat:not(.min)) .msgbox { bottom: calc(51px * var(--hud, 1.3) + 14px + 196px) !important; }
.battle-col:has(.net-chat.min) .msgbox { bottom: calc(51px * var(--hud, 1.3) + 52px) !important; }
@media (max-height: 480px) { .battle-col:has(.net-chat:not(.min)) .msgbox { bottom: calc(51px * var(--hud, 1.3) + 14px + 146px) !important; } }
.net-chat { background: rgba(11, 13, 18, .9); }
/* komputer: szybkie przyciski w prawym górnym rogu */
.desk-quick { position: absolute; right: 8px; top: 8px; z-index: 7; display: flex; gap: 6px; }
.desk-quick button { position: relative; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid #4a3e26; border-radius: 3px; background: #0b0d12d9;
  color: #e8dcc0; font: 600 13px Inter, system-ui, sans-serif; cursor: pointer; }
.desk-quick button:hover { border-color: #8a6a2c; color: #ffd36b; }
.desk-quick .so-badge { position: absolute; top: -6px; right: -6px; }
.party-frame .pf-head small { white-space: nowrap; }
body.creating .desk-quick { display: none; }

/* Zamek Krwi */
#bcPill { position: fixed; top: 52px; right: 10px; z-index: 62; min-height: 40px; padding: 6px 12px; background: #3b1410f2; border: 1px solid #b0482f; color: #ffd9cc; font: 700 13px "Trebuchet MS", system-ui, sans-serif; cursor: pointer; box-shadow: 0 6px 20px #000a; }
#bcPill[hidden] { display: none; }
#bcHud { position: fixed; left: 50%; top: 52px; transform: translateX(-50%); z-index: 62; width: min(420px, calc(100vw - 20px)); padding: 8px 12px; background: #2a0d0af2; border: 1px solid #b0482f; color: #ffe1d6; font: 13px "Trebuchet MS", system-ui, sans-serif; display: grid; gap: 6px; box-shadow: 0 6px 24px #000a; }
#bcHud[hidden] { display: none; } #bcHud .btn { min-height: 40px; }
#bcHud .bc-bar { height: 6px; background: #000a; } #bcHud .bc-bar u { display: block; height: 100%; width: 0; background: #d4472c; transition: width .3s; }
body.bc-on #battle::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, #6a0a0a66 100%); }
html.portrait #bcPill, html.portrait #bcHud { top: calc(var(--m-top, 88px) + 6px); }
html.portrait #bcPill { right: 8px; } html.portrait #bcHud { width: calc(100vw - 16px); }
.bc-body { gap: 10px; }
.bc-state { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; background: #211d15; border: 1px solid #463b2e; color: #eadcbb; }
.bc-state b { font: 700 16px "Palatino Linotype", Georgia, serif; } .bc-state span { font-variant-numeric: tabular-nums; font-size: 18px; }
.bc-state.on { border-color: #4f8f4a; } .bc-state.hot { border-color: #b0482f; background: #2a1511; }
.bc-sub { margin: 0; font-size: 13px; color: #b5a98c; } .bc-ok { margin: 0; color: #9fe39a; font-size: 14px; }
.bc-act .btn { width: 100%; min-height: 46px; }
.bc-top { background: #1b1915; border: 1px solid #463b2e; padding: 8px 10px; font-size: 13px; color: #eadcbb; } .bc-top div { display: flex; justify-content: space-between; padding: 2px 0; }
.bc-rules { font-size: 12.5px; color: #b5a98c; line-height: 1.45; } .bc-rules ul { margin: 4px 0 0; padding-left: 18px; }
#bcWin { grid-template-columns: minmax(0, 1fr); } .so.bc, .so.bc * { min-width: 0; box-sizing: border-box; } .bc-state { flex-wrap: wrap; gap: 4px 12px; } .bc-rules li { overflow-wrap: anywhere; }
#bcHud { grid-template-columns: 1fr auto; align-items: center; } #bcHud .bc-bar { grid-column: 1 / -1; grid-row: 2; } #bcHud .btn { min-height: 36px; padding: 0 10px; font-size: 12px; }

/* obrażenia zadane przez członków drużyny na spocie */
.dmg.ally-dmg { color: #9fd8ff; font-size: 15px; opacity: .92; }

/* przedrostek Game Mastera (admina) jak w MU Online */
.gm-tag { color: #ffb830; font-weight: 800; text-shadow: 0 0 6px #ff8c0099, 0 1px 2px #000; letter-spacing: .4px; }
.net-chat .nc-log .nc-gm b { color: #ffe08a; }

/* globalne ogłoszenie GM na ekranie (/message), jak złoty napis w MU Online */
.gm-notice { position: fixed; left: 50%; top: 72px; transform: translate(-50%, -12px); z-index: 950; pointer-events: none; opacity: 0; transition: opacity .25s, transform .25s;
  max-width: min(640px, calc(100vw - 24px)); padding: 10px 20px; text-align: center; background: linear-gradient(90deg, #0b0d1200, #120e08ee 14%, #120e08ee 86%, #0b0d1200);
  border-top: 1px solid #d1a35f88; border-bottom: 1px solid #d1a35f88; color: #ffe9a8; font: 700 16px/1.35 Cinzel, Georgia, serif; text-shadow: 0 2px 6px #000, 0 0 12px #ff9d0088; }
.gm-notice.show { opacity: 1; transform: translate(-50%, 0); }
html.portrait .gm-notice { top: calc(var(--m-top, 88px) + 12px); font-size: 14px; padding: 8px 14px; }
.inv-pill { position: fixed; top: 98px; right: 10px; z-index: 62; min-height: 40px; padding: 6px 12px;
  background: linear-gradient(180deg, #3a2a0df2, #221706f2); border: 1px solid #d9a441; color: #ffe799;
  font: 700 13px "Trebuchet MS", system-ui, sans-serif; cursor: pointer; box-shadow: 0 6px 20px #000a, 0 0 12px #d9a44144; }
.inv-pill[hidden] { display: none; }
html.portrait .inv-pill { top: calc(var(--m-top, 88px) + 52px); right: 8px; }
.dmg.poison { color: #8fe36a; font-size: 14px; }
