:root{
  --bg:#05060b;
  --bg2:#070812;

  --surface: rgba(10,12,20,.78);
  --surface2: rgba(8,10,16,.72);
  --surface3: rgba(6,7,12,.62);

  --text:#eaf0ff;
  --muted:#a3adc2;

  --line: rgba(255,255,255,.10);
  --line2: rgba(255,255,255,.16);

  --accent:#3aa7ff;
  --accent2:#8b5cf6;
  --danger:#ff4d5a;

  --shadow: 0 18px 70px rgba(0,0,0,.45);
  --shadow2: 0 10px 30px rgba(0,0,0,.35);

  --glow-blue: rgba(58,167,255,.18);
  --glow-purple: rgba(139,92,246,.14);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, Segoe UI, Roboto, Arial;

  background:
    radial-gradient(1200px 700px at 50% 30%, rgba(0,0,0,.35), rgba(0,0,0,.78) 70%, rgba(0,0,0,.92) 100%),
    linear-gradient(rgba(5,6,11,.55), rgba(5,6,11,.72)),
    url("background.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* blokada scrolla gdy modal ilości otwarty */
body.modal-lock{ overflow:hidden; }

a{ color:inherit; text-decoration:none; }
.wrap{ width:min(1200px, calc(100% - 28px)); margin:0 auto; }

/* ===== TOPBAR ===== */
.topbar{
  position:sticky; top:0;
  z-index:10;
  backdrop-filter: blur(14px) saturate(135%);
  background: rgba(5,6,11,.62);
  border-bottom: 1px solid var(--line);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 20px 0;
  gap:14px;
}

.brand{ display:flex; align-items:center; gap:12px; }
.logo{
  width:94px; height:42px;
  border-radius:14px;
  display:grid; place-items:center;
  font-weight:900;
  letter-spacing:.4px;

  background:
    radial-gradient(120px 60px at 30% 20%, rgba(255,255,255,.16), transparent 55%),
    linear-gradient(135deg, rgba(58,167,255,.92), rgba(139,92,246,.58));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.22) inset;
}
.brand-title{ font-weight:900; letter-spacing:.2px; }
.brand-sub{ color:var(--muted); font-size:12px; margin-top:2px; }

.nav{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.nav a{
  padding:8px 10px;
  border-radius:12px;
  border:1px solid transparent;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.nav a:hover{
  border-color:var(--line2);
  background:rgba(255,255,255,.05);
  transform: translateY(-1px);
}

/* ===== LAYOUT HELPERS ===== */
.grid{ display:grid; gap:12px; }
.grid-2{ grid-template-columns: 1fr 1fr; }
@media (max-width:900px){ .grid-2{ grid-template-columns:1fr; } }

.row{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.hr{ height:1px; background:rgba(255,255,255,.12); margin:12px 0; }

h2{
  margin:0 0 10px 0;
  letter-spacing:.2px;
  text-shadow: 0 8px 24px rgba(0,0,0,.35);
}
label{
  display:block;
  font-size:12px;
  color:rgba(163,173,194,.92);
  margin-bottom:6px;
}

/* ===== CARD ===== */
.card{
  position:relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  margin-top: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(140%);

  background-image:
    radial-gradient(900px 180px at 50% -60%, rgba(255,255,255,.11), transparent 60%),
    radial-gradient(800px 260px at 10% 0%, var(--glow-blue), transparent 60%),
    radial-gradient(800px 260px at 90% 10%, var(--glow-purple), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
}
.card::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:22px;
  pointer-events:none;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 -18px 60px rgba(0,0,0,.25) inset;
}
.card:hover{ border-color: rgba(255,255,255,.16); }

/* ===== FORMS ===== */
.input, select, textarea{
  width:100%;
  background: var(--surface3);
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  color:var(--text);
  outline:none;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
textarea{ min-height:90px; resize:vertical; }
.input:focus, select:focus, textarea:focus{
  border-color: rgba(58,167,255,.62);
  box-shadow:
    0 0 0 3px rgba(58,167,255,.16),
    0 0 22px rgba(139,92,246,.10);
  background: rgba(10,12,20,.72);
}

/* ===== BUTTONS ===== */
.btn{
  border:none;
  border-radius:14px;
  padding:10px 12px;
  font-weight:900;
  cursor:pointer;
  color:#04101f;
  white-space: nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;

  background:
    radial-gradient(120px 40px at 20% 10%, rgba(255,255,255,.20), transparent 60%),
    linear-gradient(135deg, rgba(58,167,255,.98), rgba(139,92,246,.70));
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(0,0,0,.42), 0 0 22px rgba(58,167,255,.16);
}
.btn:active{ transform: translateY(0px); filter: brightness(.98); }

.btn-ghost{
  background: rgba(255,255,255,.05);
  border:1px solid var(--line);
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  font-weight:900;
  cursor:pointer;
  white-space: nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.btn-ghost:hover{
  background: rgba(255,255,255,.07);
  border-color: var(--line2);
  transform: translateY(-1px);
}

.btn-danger{
  border:none;
  border-radius:14px;
  padding:10px 12px;
  font-weight:900;
  cursor:pointer;
  color:#1a0507;
  white-space: nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;

  background:
    radial-gradient(120px 40px at 20% 10%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(135deg, rgba(255,77,90,.96), rgba(255,138,42,.55));
  box-shadow: 0 10px 22px rgba(0,0,0,.32);
}
.btn-danger:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 26px rgba(0,0,0,.40), 0 0 20px rgba(255,77,90,.12);
}

/* ===== BADGES / TEXT ===== */
.badge{
  display:inline-flex;
  gap:6px;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(6,7,12,.62);
  font-size:12px;
  font-weight:900;
  white-space: nowrap;
  backdrop-filter: blur(10px) saturate(140%);
}
.muted{ color:var(--muted); }
.small{ font-size:12px; color:var(--muted); }

.alert{ border-radius:16px; padding:10px 12px; border:1px solid var(--line); }
.alert-ok{ background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.22); }
.alert-bad{ background: rgba(255,77,90,.10); border-color: rgba(255,77,90,.22); }

.footer{ margin:20px 0 40px; }
.footer-inner{ border-top:1px solid rgba(255,255,255,.12); padding-top:16px; }

/* ===== BLUEPRINT GRID (DEFAULT) ===== */
.bp-grid{
  display:grid;
  grid-template-columns: repeat(10, minmax(90px, 1fr));
  gap:10px;
}
@media (max-width:1100px){ .bp-grid{ grid-template-columns: repeat(6, minmax(90px, 1fr)); } }
@media (max-width:700px){ .bp-grid{ grid-template-columns: repeat(3, minmax(90px, 1fr)); } }

.bp-tile{
  position:relative;
  border:1px solid rgba(255,255,255,.12);
  background: var(--surface2);
  border-radius:18px;
  padding:10px;
  cursor:pointer;
  user-select:none;
  min-height:108px;

  backdrop-filter: blur(12px) saturate(145%);
  box-shadow: var(--shadow2);

  background-image:
    radial-gradient(320px 120px at 50% -40%, rgba(255,255,255,.10), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  transition: transform .10s ease, border-color .10s ease, box-shadow .10s ease, filter .10s ease;
}
.bp-tile:hover{
  transform: translateY(-2px);
  border-color: rgba(58,167,255,.40);
  box-shadow:
    0 16px 40px rgba(0,0,0,.40),
    0 0 0 3px rgba(58,167,255,.08);
  filter: brightness(1.05);
}
.bp-tile.selected{
  outline: 2px solid rgba(58,167,255,.68);
  border-color: rgba(58,167,255,.72);
  box-shadow:
    0 18px 46px rgba(0,0,0,.46),
    0 0 34px rgba(58,167,255,.14);
}

.bp-tile img{
  width:86px; height:86px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:#0a0f1a;
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}

.bp-tile .name{
  margin-top:8px;
  margin-bottom:8px;
  font-size:12px;
  color:rgba(234,240,255,.96);
  line-height:1.15;
  max-height:2.4em;
  overflow:hidden;
  text-shadow: 0 8px 18px rgba(0,0,0,.45);
}

.qty-badge{
  position:absolute;
  top:8px; right:8px;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(6,7,12,.70);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

.bp-toolbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

/* ===== MODALS (BASE) ===== */
.modal-backdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.66);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:999;
  padding:18px;
}
.modal-backdrop.open{ display:flex; }

.modal{
  width:min(760px, 100%);
  background: rgba(10,12,20,.92);
  border:1px solid rgba(255,255,255,.14);
  border-radius:22px;
  box-shadow: 0 26px 80px rgba(0,0,0,.60);
  padding:16px;
  backdrop-filter: blur(16px) saturate(150%);

  background-image:
    radial-gradient(900px 180px at 50% -50%, rgba(255,255,255,.11), transparent 60%),
    radial-gradient(700px 220px at 20% 0%, rgba(58,167,255,.11), transparent 60%),
    radial-gradient(700px 220px at 85% 15%, rgba(139,92,246,.10), transparent 60%);
}
.modal h3{ margin:0 0 10px 0; letter-spacing:.2px; }
.modal .modal-actions{ display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; }
.kbd-hint{ font-size:12px; color:var(--muted); margin-top:6px; }

/* ===== PICKER: FULLSCREEN ===== */
#pickerBackdrop{
  background: rgba(5,6,11,.92);
  z-index: 9999;
  padding: 0;
}
#pickerBackdrop.open{ display:flex; }

#pickerBackdrop .modal{
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
  background: #05060b;
  box-shadow: none;
  border: none;
  padding: 18px 22px;
  display:flex;
  flex-direction:column;
  background-image: none;
}

#pickerBackdrop .modal .bp-toolbar{ flex: 0 0 auto; }
#pickerBackdrop .modal .hr{ flex: 0 0 auto; }

#pickerBackdrop .modal .bp-grid{
  flex: 1 1 auto;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px,1fr));
  gap: 14px;
  padding-right: 6px;
  align-content: start;
  grid-auto-rows: max-content;
}

#pickerBackdrop .modal .bp-grid .bp-tile{
  height: 170px;
  min-height: 0;
  align-self: start;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px;
}

#pickerBackdrop .modal .bp-grid .bp-tile img{
  width: 96px;
  height: 96px;
  object-fit: cover;
  margin-top: 6px;
}

#pickerBackdrop .modal .bp-grid .bp-tile .name{
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 12px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  margin-top: auto;
}

#pickerBackdrop .modal .bp-grid .bp-tile .qty-badge:empty{ display:none; }

#pickerBackdrop .modal .bp-grid::-webkit-scrollbar{ width: 10px; }
#pickerBackdrop .modal .bp-grid::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.18);
  border-radius: 999px;
}

#pickerBackdrop .modal .bp-grid .bp-tile .qty-badge{
  position: absolute;
  top: 10px;
  right: 10px;
}

/* ===== QTY MODAL (ABOVE PICKER) ===== */
#qtyBackdrop{
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(5,6,11,.78);
  display: none;
}
#qtyBackdrop.open{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
#qtyBackdrop .modal{
  width: min(520px, calc(100% - 36px));
  height: auto;
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 18px;
  background: rgba(10,12,20,.96);
  box-shadow: 0 26px 80px rgba(0,0,0,.65);
}
#qtyBackdrop .modal .modal-actions{
  position: sticky;
  bottom: 0;
  background: rgba(10,12,20,.96);
  padding-top: 12px;
}

/* ===== UNREAD PULSE ===== */
@keyframes pulseRed {
  0%   { box-shadow: 0 0 0 rgba(255,77,90,0.00); border-color: rgba(255,77,90,0.35); }
  50%  { box-shadow: 0 0 18px rgba(255,77,90,0.18); border-color: rgba(255,77,90,0.90); }
  100% { box-shadow: 0 0 0 rgba(255,77,90,0.00); border-color: rgba(255,77,90,0.35); }
}
.badge-unread{
  border-color: rgba(255,77,90,.85) !important;
  animation: pulseRed 1.2s ease-in-out infinite;
}
.card-unread{
  border-color: rgba(255,77,90,.55) !important;
  animation: pulseRed 1.4s ease-in-out infinite;
}

/* ===== SCROLLBARS ===== */
::-webkit-scrollbar{ height:10px; width:10px; }
::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.14);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.25);
}
::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,.20); }

/* ===== STAR PICKER ===== */
.star-picker{
  display:inline-block;
  direction:ltr;
  font-size:0;
  user-select:none;
}
.star-picker input{
  position:absolute;
  left:-9999px;
}
.star-picker label{
  display:inline-block;
  width:1.25em;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  color:rgba(255,255,255,.28);
  transition: transform .08s ease, color .12s ease;
  float:right;
}
.star-picker label:hover,
.star-picker label:hover ~ label{
  color: rgba(58,167,255,.95);
  transform: translateY(-1px);
}
.star-picker input:checked ~ label{
  color: rgba(58,167,255,.95);
}
.star-picker::after{
  content:"";
  display:block;
  clear:both;
}

/* =========================
   INDEX: TRADE LAYOUT (Oferuje ← → Oczekuje)
   ========================= */

.trade-layout{
  display:grid;
  grid-template-columns: 1fr 70px 1fr;
  gap: 14px;
  align-items: stretch;
}

.trade-col{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(6,7,12,.40);
  padding: 12px;
  min-width: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.20) inset;
}

.trade-col-title{
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: .2px;
  margin-bottom: 10px;
}

.trade-col-body{
  min-height: 154px;
  display:flex;
  align-items:flex-start;
}

.trade-mid{
  display:flex;
  align-items:center;
  justify-content:center;
}

.trade-arrow{
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(6,7,12,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

/* Pasek itemów (scroll) */
.mini-strip{
  display:flex;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  min-width: 0;
}
.mini-strip::-webkit-scrollbar{ height: 10px; }
.mini-strip::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.14);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.25);
}

/* Kafelek w indexie – minimalnie mniejszy, żeby wchodziły 4 + “+N” */
.mini-tile{
  position: relative;
  width: 86px;       /* było większe → teraz wejdą 4 częściej */
  min-width: 86px;
  min-height: 166px;
  border: 1px solid rgba(255,255,255,.12);
  background: var(--surface2);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow2);
  backdrop-filter: blur(12px) saturate(145%);
  cursor: default;
  user-select: none;

  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap: 10px;
}

.mini-tile img{
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background:#0a0f1a;
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}

.mini-name{
  font-size: 12px;
  line-height: 1.15;
  max-height: 6.0em;
  overflow: auto;
  color: rgba(234,240,255,.96);
  text-shadow: 0 8px 18px rgba(0,0,0,.45);
}

/* ilość – czytelnie, bez “kółeczka” */
.mini-qty{
  position:absolute;
  top: 3px;
  right: 3px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(6,7,12,.50);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

/* “+N” */
.mini-tile.mini-more{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 150px;
}
.mini-moreText{
  font-size: 22px;
  font-weight: 900;
  color: rgba(234,240,255,.92);
}

.mini-empty{ padding: 10px 0; }

/* responsive */
@media (max-width: 900px){
  .trade-layout{ grid-template-columns: 1fr; }
  .trade-mid{ display:none; }
  .trade-col-body{ min-height: 0; }
}

/* ===== GLOBAL CHAT DRAWER ===== */
/* ===== GLOBAL CHAT DRAWER (LEFT) ===== */

.chat-fab{
  position:fixed;
  left:14px;
  bottom:14px;
  z-index:999;
  width:58px;
  height:58px;
  border-radius:20px;
  border:1px solid var(--line2);
  background: rgba(10,12,20,.82);
  color:var(--text);
  box-shadow: var(--shadow2);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  backdrop-filter: blur(8px);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.chat-fab:hover{
  border-color: rgba(58,167,255,.35);
  box-shadow: 0 0 0 3px rgba(58,167,255,.10), var(--shadow2);
  transform: translateY(-1px);
}

.chat-badge{
  position:absolute;
  top:-8px;
  right:-8px;
  min-width:24px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,77,90,.92);
  color:#fff;
  font-size:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

/* delikatny pulse tylko gdy są nieprzeczytane (i drawer zamknięty) */
.chat-fab.has-unseen{
  border-color: rgba(255,77,90,.35);
  box-shadow: 0 0 0 3px rgba(255,77,90,.10), var(--shadow2);
  animation: chatSoftPulse 1.6s ease-in-out infinite;
}

@keyframes chatSoftPulse{
  0%   { transform: translateY(0);    box-shadow: 0 0 0 3px rgba(255,77,90,.07), var(--shadow2); }
  50%  { transform: translateY(-1px); box-shadow: 0 0 0 5px rgba(255,77,90,.13), var(--shadow2); }
  100% { transform: translateY(0);    box-shadow: 0 0 0 3px rgba(255,77,90,.07), var(--shadow2); }
}

/* “ping” tylko gdy unseen wzrosło */
.chat-fab.new-ping::after{
  content:"";
  position:absolute;
  inset:-7px;
  border-radius:24px;
  border:1px solid rgba(255,77,90,.42);
  animation: chatPing 2.2s ease-out 1;
  pointer-events:none;
}

@keyframes chatPing{
  0%   { opacity:0; transform: scale(.96); }
  15%  { opacity:1; transform: scale(1.00); }
  100% { opacity:0; transform: scale(1.10); }
}

.chat-backdrop{
  position:fixed;
  inset:0;
  z-index:998;
  background: rgba(0,0,0,.55);
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease;
}
.chat-backdrop.open{
  opacity:1;
  pointer-events:auto;
}

.chat-drawer{
  position:fixed;
  top:0;
  left:0;
  height:100vh;
  width:min(360px, calc(100vw - 40px));
  z-index:999;
  transform: translateX(calc(-100% - 10px));
  transition: transform .18s ease;
  display:flex;
  flex-direction:column;
  border-right:1px solid var(--line);
  background: rgba(8,10,16,.86);
  backdrop-filter: blur(10px);
  box-shadow: 20px 0 70px rgba(0,0,0,.55);
}
.chat-drawer.open{
  transform: translateX(0);
}

.chat-head{
  padding:14px 14px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  background: linear-gradient(180deg, rgba(12,14,22,.85), rgba(8,10,16,.55));
}
.chat-title{ font-weight:900; letter-spacing:.2px; }

.chat-close{
  border:1px solid var(--line2);
  background: rgba(0,0,0,.18);
  color:var(--text);
  border-radius:12px;
  width:36px;
  height:36px;
  cursor:pointer;
}
.chat-close:hover{
  border-color: rgba(255,255,255,.26);
}

.chat-body{
  flex:1;
  overflow:auto;
  padding:12px 12px 6px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.chat-msg{
  border:1px solid var(--line);
  background: rgba(12,14,22,.55);
  border-radius:16px;
  padding:10px 10px 9px;
}
.chat-msg.me{
  border-color: rgba(58,167,255,.25);
  background: rgba(58,167,255,.10);
}
.chat-nick{
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}
.chat-text{
  font-size:14px;
  line-height:1.35;
  white-space:pre-wrap;
  word-break:break-word;
}

.chat-form{
  display:flex;
  gap:8px;
  padding:12px;
  border-top:1px solid var(--line);
  background: rgba(8,10,16,.60);
}
.chat-input{
  flex:1;
  height:42px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color:var(--text);
  padding:0 12px;
  outline:none;
}
.chat-input:focus{
  border-color: rgba(58,167,255,.35);
  box-shadow: 0 0 0 3px rgba(58,167,255,.10);
}
.chat-send{
  height:42px;
  border-radius:14px;
  padding:0 14px;
  border:1px solid rgba(58,167,255,.35);
  background: rgba(58,167,255,.14);
  color:var(--text);
  cursor:pointer;
  font-weight:900;
}
.chat-send:hover{
  background: rgba(58,167,255,.20);
  border-color: rgba(58,167,255,.55);
}

