/* css/components.css — רכיבים משותפים לכל הדפים
   נטען אחרי style.css ומסתמך על המשתנים שמוגדרים שם. */

/* ── כותרת וניווט ──────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 17, 34, 0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgba(255,255,255,.03), 0 8px 24px rgba(3,7,18,.35);
}
/* פס אדום דק למעלה — כמו מכסה של פוקידקס */
.app-header::before {
  content: ''; display: block; height: 3px;
  background: linear-gradient(90deg, var(--accent-primary) 0 70%, var(--accent-secondary) 70% 85%, var(--accent-blue) 85%);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  gap: 12px;
  max-width: 1240px;
  margin: 0 auto;
}

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--text-primary);
  font-family: var(--font-num); font-size: 1.15rem; letter-spacing: -.2px; white-space: nowrap;
  direction: ltr;
}
.brand b { color: var(--accent-secondary); font-weight: 800; }
.logo-ball { transition: transform .5s cubic-bezier(.34,1.56,.64,1); }
.brand:hover .logo-ball { transform: rotate(-200deg); }

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 12px 3px 4px; border-radius: 999px;
  background: var(--bg-tertiary); border: 1px solid var(--glass-border);
  text-decoration: none; color: var(--text-primary);
}
.user-chip:hover { border-color: #34436d; }
.user-name { font-size: .95rem; font-weight: 700; }

/* השותף — הפוקימון הראשון בצוות, "יושב" ליד שם המאמן (במקום עיגול דרגה שנראה כמו התראה) */
.user-partner {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: #2d3d66;
  overflow: visible;
  image-rendering: pixelated; object-fit: contain;
  color: var(--text-secondary);
}
.user-partner svg { width: 18px; height: 18px; }
img.user-partner { width: 44px; height: 44px; margin: -8px -6px -8px -8px; background: none;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.user-chip:hover .user-partner { animation: partner-hop .5s ease; }
@keyframes partner-hop { 40% { transform: translateY(-5px); } }

.silver-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 203, 5, 0.1);
  color: var(--highlight);
  padding: 4px 12px 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 203, 5, 0.28);
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 0.92rem;
}
/* מטבע מצויר במקום אימוג'י */
.coin {
  width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 35%, #fff3b0, #ffcb05 45%, #d99a00);
  box-shadow: inset 0 0 0 1.5px rgba(120, 80, 0, .45);
}

/* ── סרגל הצד (בקשת המשתמש): כל הדפים בקבוצות, קבוע בימין. במסך צר — מגירה מכפתור ☰ ── */
:root { --side-w: 228px; }
.side-nav {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 120; width: var(--side-w);
  display: flex; flex-direction: column;
  background: rgba(11, 17, 34, 0.96); backdrop-filter: saturate(1.2) blur(8px);
  border-inline-end: 1px solid var(--glass-border);
  box-shadow: 8px 0 24px rgba(3, 7, 18, .25);
}
.side-nav::before {       /* אותו פס צבעוני כמו בכותרת */
  content: ''; display: block; height: 3px; flex-shrink: 0;
  background: linear-gradient(90deg, var(--accent-primary) 0 70%, var(--accent-secondary) 70% 85%, var(--accent-blue) 85%);
}
.side-brand { padding: 14px 18px 10px; }
.app-nav {
  flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a3760 transparent;
  padding: 4px 10px 24px;
}
.nav-section { display: grid; gap: 2px; padding: 8px 0; }
.nav-section + .nav-section { border-top: 1px solid var(--glass-border); }
.nav-heading {
  padding: 4px 12px 6px; font-size: .74rem; font-weight: 800; letter-spacing: .3px;
  color: #6f7c9c;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-link:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.nav-link.active {
  color: #fff;
  background: rgba(255, 77, 61, 0.14);
}
.nav-link.active .nav-icon { color: var(--accent-primary); }
.nav-link.active::after {          /* פס אדום בקצה הימני של השורה (RTL) */
  content: ''; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent-primary);
}

.nav-icon { display: inline-flex; }
.ico { display: block; }
/* "חדשות" — נקודה צהובה כשיש פוסט שעוד לא נקרא (markNewsDot ב-ui.js) */
.nav-link.has-news .nav-icon { position: relative; }
.nav-link.has-news .nav-icon::after {
  content: ''; position: absolute; top: -3px; inset-inline-end: -4px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--highlight); box-shadow: 0 0 0 2px var(--bg-secondary);
}

.header-start { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav-toggle {
  display: none; place-items: center; width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  background: var(--bg-tertiary); border: 1px solid var(--glass-border); color: var(--text-primary);
}
.side-backdrop { display: none; }

/* מסך רחב: הסרגל תמיד פתוח, והדף זז שמאלה. הלוגו כבר בסרגל — לא בכותרת */
@media (min-width: 1100px) {
  body.has-side-nav { padding-inline-start: var(--side-w); }
  body.has-side-nav .top-brand { display: none; }
}
/* מסך צר: מגירה */
@media (max-width: 1099.98px) {
  .nav-toggle { display: grid; }
  .side-nav {
    width: min(280px, 84vw); transform: translateX(100%); visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
  }
  body.side-open .side-nav { transform: none; visibility: visible; transition: transform .22s ease; }
  body.side-open .side-backdrop {
    display: block; position: fixed; inset: 0; z-index: 110; background: rgba(3, 7, 18, .55);
    animation: fadeIn .18s ease;
  }
  body.side-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .side-nav { transition: none !important; } }

@media (max-width: 720px) {
  .top-brand .brand-name { display: none; }
  .header-top { padding: 8px 12px; }
  .user-chip { padding-inline-end: 4px; }
  .user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ── פריסת עמוד ────────────────────────────────────────── */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  width: 100%;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-title { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.3px; line-height: 1.15; }
.page-sub { color: var(--text-secondary); font-size: 0.95rem; margin-top: 4px; }

/* באנר בראש דף: צבע של הדף + ציור רשמי של פוקימון שמציץ מהצד.
   --c1/--c2 נקבעים בכל דף. בלי תמונות AI — ציורים רשמיים מ-/sprites (מוגשים מהשרת שלנו). */
.page-head.page-banner {
  position: relative; overflow: hidden; align-items: center;
  min-height: 158px; padding: 26px 30px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(rgba(255,255,255,.12) 1.2px, transparent 1.3px) 0 0 / 18px 18px,
    linear-gradient(115deg, var(--c2, #1e3a8a) 0%, var(--c1, #2563eb) 100%);
  box-shadow: 0 14px 34px rgba(3,7,18,.4), inset 0 -4px 0 rgba(0,0,0,.18);
  isolation: isolate;
}
/* פוכדור גדול ושקוף ברקע, מאחורי הפוקימון */
.page-head.page-banner::before {
  content: ''; position: absolute; z-index: -1;
  width: 300px; height: 300px; inset-inline-end: -40px; top: 50%; transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 34px, rgba(255,255,255,.14) 35px 52px, transparent 53px),
    linear-gradient(transparent calc(50% - 9px), rgba(255,255,255,.14) calc(50% - 9px) calc(50% + 9px), transparent calc(50% + 9px));
  box-shadow: inset 0 0 0 18px rgba(255,255,255,.14);
}
.banner-text { position: relative; z-index: 1; max-width: 62%; display: flex; flex-direction: column; gap: 4px; }
.banner-text .head-actions, .banner-text .toolbar { margin-top: 10px !important; }
.banner-text > .btn { margin-top: 10px; align-self: flex-start; }
.page-banner .page-title { font-size: 2.1rem; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.page-banner .page-sub { color: rgba(255,255,255,.86); font-weight: 500; }
.page-banner .field { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.25); }
.banner-mon {
  position: absolute; z-index: 0; inset-inline-end: 34px; bottom: -26px;
  height: 190px; width: auto;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.35));
  animation: bannerIn .6s cubic-bezier(.34,1.56,.64,1) both;
  pointer-events: none;
}
.banner-mon.second { inset-inline-end: 190px; height: 150px; bottom: -18px; animation-delay: .12s; opacity: .95; }
@keyframes bannerIn { from { transform: translateY(40px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .page-head.page-banner { min-height: 128px; padding: 18px 18px; }
  .banner-text { max-width: 70%; }
  .page-banner .page-title { font-size: 1.45rem; }
  .page-banner .page-sub { font-size: .85rem; }
  .banner-mon { height: 120px; inset-inline-end: 6px; bottom: -12px; }
  .banner-mon.second { display: none; }
  .page-head.page-banner::before { width: 200px; height: 200px; inset-inline-end: -50px; }
}

/* כותרת אזור — "תווית" כחולה מעל השמיים (טקסט לבן ישירות על התכלת לא נקרא) */
.section-title {
  display: flex; align-items: center; gap: 10px;
  width: fit-content;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 28px 0 12px;
  padding: 7px 16px 7px 18px;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-bottom: 3px solid #0a1228;
  border-radius: 12px;
}
/* קו צבעוני קטן לפני כותרת קטע */
.section-title::before {
  content: ''; width: 4px; height: 1.05em; border-radius: 4px; background: var(--accent-primary);
}

/* ── טאבים ─────────────────────────────────────────────── */
.tabs {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 1;
  min-width: max-content;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  text-align: center;
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
}

.tab:hover { color: var(--text-primary); }

.tab.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--accent-dark);
}

/* ── כפתורים נוספים ────────────────────────────────────── */
.btn-sm { padding: 7px 14px; font-size: 0.86rem; border-radius: 10px; }
.btn-xs { padding: 5px 10px; font-size: 0.78rem; border-radius: 8px; border-bottom-width: 2px; }

.btn-danger {
  background: var(--danger);
  border-bottom-color: #a61b1b;
  color: #fff;
}
.btn-danger:hover { filter: brightness(1.12); }

.btn-success {
  background: var(--success);
  border-bottom-color: #15803d;
  color: #fff;
}
.btn-success:hover { filter: brightness(1.12); }

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── רשתות כרטיסים ─────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card-grid.tight {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 0 rgba(3,7,18,.25);
  transition: var(--transition);
}

.card.clickable { cursor: pointer; }
.card.clickable:hover {
  transform: translateY(-3px);
  border-color: #3a4a78;
  box-shadow: 0 10px 24px rgba(3, 7, 18, 0.5);
}

.card.selected {
  border-color: var(--accent-secondary);
  background: rgba(255, 203, 5, 0.07);
  box-shadow: 0 0 0 2px rgba(255, 203, 5, .25);
}

/* ── כרטיס פוקימון ─────────────────────────────────────── */
.poke-card { display: flex; flex-direction: column; gap: 10px; }

.poke-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.poke-sprite {
  width: 68px;
  height: 68px;
  image-rendering: pixelated;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

.poke-sprite.lg { width: 190px; height: 190px; object-fit: contain; image-rendering: auto; }
.poke-sprite.sm { width: 46px; height: 46px; }

.poke-meta { flex: 1; min-width: 0; }

.poke-name {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.poke-nick { color: var(--text-secondary); font-size: 0.82rem; font-weight: 500; }

.poke-lvl {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 2px;
}

.poke-dexnum {
  font-family: ui-monospace, monospace;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.shiny-star { color: #ffd700; }

.slot-tag {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* ── תגי טיפוס ונדירות ─────────────────────────────────── */
.type-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  margin-inline-end: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.rarity-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid currentColor;
}

/* ── פסי HP והתקדמות ───────────────────────────────────── */
.hp-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.hp-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-label {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 4px;
  text-align: left;
  direction: ltr;
}

/* ── טבלת סטטים ────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: 110px 1fr 46px;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 0.85rem;
}

.stat-row .stat-name { color: var(--text-secondary); }
.stat-row .stat-val { text-align: left; font-weight: 700; direction: ltr; }

/* ── רשימות מהלכים ─────────────────────────────────────── */
.move-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

.move-chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.move-chip .del {
  color: var(--danger);
  cursor: pointer;
  font-weight: 700;
  opacity: 0.7;
}
.move-chip .del:hover { opacity: 1; }

/* ── מודאל ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 20, 0.78);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-box {
  background: #111a30;
  border: 1px solid #2a3860;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: popIn 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
  overflow: hidden;
}
.modal-box::before { content: ''; height: 3px; flex-shrink: 0; background: var(--accent-primary); }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }

.modal-box.wide { max-width: 760px; }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--glass-border);
}

.modal-head h3 { font-size: 1.2rem; font-weight: 700; }

.modal-x {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-x:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.modal-body { padding: 22px; overflow-y: auto; }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.confirm-text { color: var(--text-secondary); line-height: 1.6; }

/* ── מצבי טעינה / ריק ──────────────────────────────────── */
.state-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 20px;
  background: rgba(14, 26, 56, .78);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── שדות קלט משניים ───────────────────────────────────── */
.field {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.field:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.18);
}

select.field { cursor: pointer; }

/* ── לוח סטטיסטיקות ────────────────────────────────────── */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stat-tile {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  text-align: center;
  position: relative; overflow: hidden;
}
.stat-tile::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--tile-color, var(--accent-blue)); opacity: .8; }
.stat-tile:nth-child(6n+1) { --tile-color: var(--accent-blue); }
.stat-tile:nth-child(6n+2) { --tile-color: var(--accent-secondary); }
.stat-tile:nth-child(6n+3) { --tile-color: var(--accent-primary); }
.stat-tile:nth-child(6n+4) { --tile-color: var(--success); }
.stat-tile:nth-child(6n+5) { --tile-color: #a78bfa; }
.stat-tile:nth-child(6n+6) { --tile-color: #f472b6; }

.stat-tile .val { font-size: 1.6rem; font-weight: 800; font-family: var(--font-num); }
.stat-tile .lbl { font-size: 0.82rem; color: var(--text-secondary); margin-top: 3px; }

/* ── טבלה ──────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: right;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.9rem;
}

.data-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.82rem;
}

.data-table tr.me { background: rgba(255, 203, 5, 0.08); box-shadow: inset -3px 0 0 var(--accent-secondary); }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.03); }

.rank-1 { color: #ffd700; font-weight: 800; }
.rank-2 { color: #c0c0c0; font-weight: 800; }
.rank-3 { color: #cd7f32; font-weight: 800; }

/* ── שורות פעילות ──────────────────────────────────────── */
.activity-item {
  padding: 10px 14px;
  border-inline-start: 3px solid var(--accent-blue);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.activity-time { color: var(--text-secondary); font-size: 0.76rem; margin-top: 3px; }

/* ── תגי מכון ──────────────────────────────────────────── */
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.86rem;
  margin: 0 0 8px 8px;
}

/* ── שורת פעולות ───────────────────────────────────────── */
.actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar .grow { flex: 1; min-width: 180px; }

/* ── אחרי עליית רמה (קרב) ─────────────────────────────────── */
.xp-breakdown { color: var(--text-secondary); font-size: .82rem; }
.choice-list { display: grid; gap: 8px; margin: 12px 0; }
.choice-list .btn { width: 100%; }

/* ── "רוצה ללמוד מהלך חדש" (battle.js → askReplaceMove): כרטיס לכל מהלך, באותו סגנון כמו חלון הריחוף בקרב ── */
.lm { display: grid; gap: 12px; }
.lm-q { margin: 4px 0 0; }
.lm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 0;
  border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  background: var(--bg-secondary); color: var(--text-primary); font: inherit; text-align: start;
}
.mcard-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px;
  padding: 10px 14px; color: #fff;
  background: linear-gradient(120deg, color-mix(in srgb, var(--tc, #64748b) 85%, #000), color-mix(in srgb, var(--tc, #64748b) 45%, #0d1426));
}
.mcard-name { font-weight: 900; font-size: 1.08rem; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.mcard-tags { display: flex; align-items: center; gap: 6px; }
.mcard-tags .type-badge { box-shadow: 0 0 0 1.5px rgba(255,255,255,.55); }
.mcard-cat { padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.28); font-size: .74rem; font-weight: 800; }
.mcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px 12px 0; }
.mcard-stats div { padding: 5px 4px; border-radius: 10px; background: var(--surface); text-align: center; }
.mcard-stats span { display: block; font-size: .68rem; color: var(--text-secondary); }
.mcard-stats b { font-family: var(--font-num); font-size: 1rem; }
.mcard-desc { flex: 1; list-style: none; margin: 8px 12px 10px; padding: 0; font-size: .85rem; line-height: 1.5; }
.mcard-desc li { position: relative; margin-bottom: 2px; padding-inline-start: 16px; }
.mcard-desc li::before {
  content: ''; position: absolute; inset-inline-start: 2px; top: .55em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--tc, #64748b); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tc, #64748b) 30%, transparent);
}
/* המהלך החדש — מסגרת צהובה ופס "מהלך חדש" */
.mcard-new { border: 2px solid var(--highlight); box-shadow: 0 8px 22px rgba(3,7,18,.35); }
.mcard-new .mcard-name { font-size: 1.25rem; }
.mcard-ribbon { padding: 4px 14px; background: var(--highlight); color: #3a2a00; font-size: .78rem; font-weight: 800; }
/* מהלך שאפשר לשכוח — כל הכרטיס הוא כפתור */
.mcard-forget { cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.mcard-forget:hover, .mcard-forget:focus-visible {
  transform: translateY(-2px); border-color: #f87171; box-shadow: 0 0 0 2px rgba(239,68,68,.35); outline: none;
}
.mcard-forget-label {
  padding: 8px 12px; border-top: 1px solid var(--glass-border); text-align: center;
  background: var(--bg-tertiary); color: #fca5a5; font-size: .85rem; font-weight: 800; transition: background .15s, color .15s;
}
.mcard-forget:hover .mcard-forget-label, .mcard-forget:focus-visible .mcard-forget-label { background: var(--danger); color: #fff; }
/* מסך המהלכים ב-PC (pc.js → showMoves): אותם כרטיסים, עם כפתור ומחיר בתחתית */
.lm-intro { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg-secondary); color: var(--text-secondary); font-size: .9rem; line-height: 1.6; }
.lm-intro b { color: var(--highlight); }
.mcard-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto;
  padding: 8px 12px; border-top: 1px solid var(--glass-border); background: var(--bg-tertiary); font-size: .8rem;
}
.mcard-foot .btn { margin-inline-start: auto; }
.mcard-empty {
  display: grid; place-content: center; gap: 4px; min-height: 130px; padding: 12px; text-align: center;
  border: 2px dashed var(--glass-border); border-radius: var(--radius-md); color: var(--text-secondary); font-size: .85rem;
}
.mcard-empty b { color: var(--text-primary); font-size: .95rem; }
@media (max-width: 560px) { .lm-grid { grid-template-columns: 1fr; } }
.xp-track .hp-fill { background: linear-gradient(90deg, #3b8cff, #60c1ff) !important; }
.xp-label { font-size: .75rem; color: var(--text-secondary); margin-top: 2px; direction: ltr; unicode-bidi: isolate; font-family: var(--font-num); }

/* ── פוקי-סנטר ─────────────────────────────────────────────── */
.pc-notice { margin-bottom: 16px; line-height: 1.6; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* ── סטטוס בקרב ──────────────────────────────────────────────── */
/* מאסטר המהלכים ב-PC: מה כל מהלך עושה לפני שמשלמים */
.move-chip.learn-move { flex-wrap: wrap; align-items: baseline; row-gap: 2px; }
.learn-meta { color: var(--text-secondary); font-size: .78rem; font-family: var(--font-num); }
.learn-desc { flex-basis: 100%; font-size: .78rem; color: var(--text-secondary); line-height: 1.5; }
.release-warn { color: var(--warning, #f6ad55); font-weight: 700; }

.status-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  color: #fff; vertical-align: middle; white-space: nowrap; }

/* ── תיק: מכירה וזריקה ──────────────────────────────────────── */
.bag-actions { display: flex; gap: 6px; margin-top: 6px; }
.bag-actions .btn:first-child { flex: 1; }

/* ── כפתור דיווח באג צף ─────────────────────────────────────── */
.bug-fab {
  position: fixed; bottom: 18px; left: 18px; z-index: 50;
  width: 42px; height: 42px; border-radius: 50%; opacity: .85;
  border: 1px solid var(--glass-border, rgba(255,255,255,.12));
  background: #18223d; color: #fff; font-size: 1.15rem; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.45); transition: transform .15s ease;
}
.bug-fab:hover { transform: scale(1.08); opacity: 1; }

/* טקסט משני */
.muted { color: var(--text-secondary); font-size: .88em; }

/* ── פריטים ─────────────────────────────────────────────── */
.item-icon { image-rendering: pixelated; vertical-align: middle; display: inline-block; }
.item-emoji { display: inline-block; line-height: 1; vertical-align: middle; }
.item-art {
  width: 80px; height: 80px; margin: 0 auto 6px; display: grid; place-items: center;
  border-radius: 50%; background: radial-gradient(circle at 50% 40%, #243259, #172241 70%);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.25);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.card:hover .item-art { transform: translateY(-3px) rotate(-6deg) scale(1.06); }
.battle-btn .item-icon { margin-inline-end: 4px; }

/* ── ספרייט על צלחת בצבע הטיפוס ─────────────────────────── */
.mon-plate {
  width: 88px; height: 88px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 65%, color-mix(in srgb, var(--tc) 55%, transparent), transparent 68%),
    color-mix(in srgb, var(--tc) 14%, var(--bg-secondary));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 35%, transparent), inset 0 -3px 0 rgba(0,0,0,.2);
}
.mon-plate img { width: 96px; height: 96px; image-rendering: pixelated; filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)); }
.mon-plate.sm { width: 64px; height: 64px; border-radius: 16px; }
.mon-plate.sm img { width: 72px; height: 72px; }
.card:hover .mon-plate img { animation: hop .45s ease; }
@keyframes hop { 40% { transform: translateY(-6px); } 70% { transform: translateY(1px); } }

/* סלוט פנוי בשישייה */
.empty-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 180px; text-align: center; text-decoration: none; color: var(--text-secondary);
  background: rgba(14, 26, 56, .72); border: 2px dashed rgba(255,255,255,.3); box-shadow: none;
}
.empty-slot strong { color: var(--text-primary); }
.empty-slot:hover { border-color: var(--accent-primary); background: rgba(14, 26, 56, .85); transform: translateY(-3px); }
.empty-ball {
  width: 44px; height: 44px; border-radius: 50%; opacity: .5;
  background: linear-gradient(#ff4d3d 0 46%, #0d1426 46% 54%, #e8ecf5 54%);
  box-shadow: inset 0 0 0 3px #0d1426;
  position: relative;
}
.empty-ball::after { content: ''; position: absolute; inset: 15px; border-radius: 50%; background: #e8ecf5; box-shadow: 0 0 0 3px #0d1426; }
.empty-slot:hover .empty-ball { opacity: 1; animation: wobble .6s ease; }
@keyframes wobble { 25% { transform: rotate(-14deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-5deg); } }

/* צ'יפ מידע קטן (דף הבית, מכונים) */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14);
  font-size: .85rem; font-weight: 700;
}

/* תפקיד בצוות האתר — תג קטן ליד השם */
.role-tag {
  font-size: .68rem; font-weight: 800; padding: 1px 7px; border-radius: 999px;
  background: #2d3d66; color: #cfe0ff; letter-spacing: .02em;
}
.role-tag.admin { background: var(--accent-secondary); color: #3a2a00; }
.role-tag.tester { background: #2dd4bf; color: #053b35; }

/* מצב תחזוקה */
.maint-bar {
  background: var(--accent-secondary); color: #2b2100; text-align: center;
  font-weight: 700; font-size: .9rem; padding: 6px 12px;
}
.maint-bar a { color: inherit; }
.maint-card { max-width: 520px; margin: 40px auto; text-align: center; padding: 34px 24px; }
.maint-card .maint-emoji { font-size: 3rem; }
.maint-card h2 { margin: 8px 0; }
.maint-card p { color: var(--text-secondary); margin-bottom: 18px; }

/* ── צ'אט המאמנים (js/chat.js) — אזור רחב בסוף כל דף: ההודעות, ולצדן מי שמחובר עכשיו ── */
.chat-dock { margin-top: 44px; margin-bottom: 28px; }
.chat-panel {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); box-shadow: 0 14px 34px rgba(3,7,18,.4); overflow: hidden;
}
/* ראש הצ'אט — כמו הבאנרים בראש הדפים: אדום פוכדור, פוכדור שקוף ברקע, ו-Chatot (הפוקימון ה"פטפטן") מציץ מהצד */
.chat-head {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 12px;
  min-height: 80px; padding: 14px 20px; padding-inline-end: 150px; color: #fff;
  background:
    radial-gradient(rgba(255,255,255,.12) 1.2px, transparent 1.3px) 0 0 / 18px 18px,
    linear-gradient(115deg, var(--accent-dark) 0%, var(--accent-primary) 100%);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18);
}
.chat-head::before {
  content: ''; position: absolute; z-index: -1;
  width: 210px; height: 210px; inset-inline-end: -30px; top: 50%; transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 24px, rgba(255,255,255,.14) 25px 37px, transparent 38px),
    linear-gradient(transparent calc(50% - 7px), rgba(255,255,255,.14) calc(50% - 7px) calc(50% + 7px), transparent calc(50% + 7px));
  box-shadow: inset 0 0 0 13px rgba(255,255,255,.14);
}
.chat-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-title { font-size: 1.35rem; font-weight: 800; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.chat-online { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.9); }
.chat-online b { font-family: var(--font-num); }
.chat-online i, .chat-people-title i, .chat-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 2px rgba(0,0,0,.18); display: inline-block;
}
.chat-head-tools { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; }
.chat-tool {
  width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 11px;
  background: rgba(0,0,0,.22); color: #fff; cursor: pointer; transition: background .15s;
}
.chat-tool:hover { background: rgba(0,0,0,.34); }
.chat-staff {
  border: 0; border-radius: 999px; padding: 7px 13px; cursor: pointer;
  font: inherit; font-size: .8rem; font-weight: 800; background: rgba(0,0,0,.26); color: #fff;
}
.chat-staff.on { background: var(--accent-secondary); color: #3a2a00; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.chat-mascot {
  position: absolute; z-index: 0; inset-inline-end: 16px; bottom: -24px; height: 122px; width: auto;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); pointer-events: none;
}

.chat-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; height: clamp(440px, 62vh, 660px); }
.chat-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-list {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 16px 12px; display: flex; flex-direction: column; gap: 3px;
}
.chat-day { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; color: var(--text-secondary); font-size: .76rem; font-weight: 700; }
.chat-day::before, .chat-day::after { content: ''; flex: 1; height: 1px; background: var(--glass-border); }
.chat-day span { padding: 2px 10px; border-radius: 999px; background: var(--bg-tertiary); }

.chat-msg { display: flex; gap: 10px; align-items: flex-start; margin-top: 9px; }
.chat-msg.cont { margin-top: 0; }
.chat-msg.mine { flex-direction: row-reverse; }

/* השותף של המאמן על צלחת עגולה בצבע הטיפוס — הספרייט מוגדל כדי שהפוקימון ימלא את העיגול */
.chat-av {
  position: relative; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 72%, color-mix(in srgb, var(--tc) 75%, transparent), transparent 72%),
    color-mix(in srgb, var(--tc) 32%, var(--bg-secondary));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tc) 55%, transparent), inset 0 -3px 0 rgba(0,0,0,.22);
}
/* ממורכז בלי transform (אנימציית הקפיצה משתמשת ב-transform), ומוזז קצת למטה — בספרייט הפוקימון יושב בתחתית */
.chat-av img {
  position: absolute; inset: -100px; margin: auto; translate: 0 5px;
  width: 78px; height: 78px; max-width: none;
  image-rendering: pixelated; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}
.chat-av.shiny { outline: 2px solid var(--highlight); outline-offset: 1px; }
.chat-shiny { position: absolute; top: 1px; inset-inline-start: 4px; font-size: .6rem; line-height: 1; }
button.chat-av { cursor: pointer; }
button.chat-av:hover img, .chat-person:hover .chat-av img { animation: hop .45s ease; }
.chat-av-gap { flex: none; width: 44px; }

.chat-bubble {
  display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: 10px;
  max-width: min(78%, 580px); padding: 7px 12px 6px;
  background: var(--bg-tertiary); border-radius: 16px; border-start-start-radius: 5px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.16);
}
.chat-msg.mine .chat-bubble { background: #1d4f91; border-start-start-radius: 16px; border-start-end-radius: 5px; }
.chat-msg.mention .chat-bubble { background: #3a3216; box-shadow: inset 0 -2px 0 rgba(0,0,0,.16), inset -3px 0 0 var(--accent-secondary); }
.chat-meta { flex-basis: 100%; display: flex; align-items: center; gap: 6px; margin-bottom: 1px; }
.chat-name {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 800; color: #9cc4ff;
}
.chat-name.admin { color: var(--highlight); }
.chat-name.tester { color: #5eead4; }
.chat-name:hover { text-decoration: underline; }
.chat-text { font-size: .97rem; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.chat-time { margin-inline-start: auto; font-family: var(--font-num); font-size: .68rem; color: var(--text-secondary); white-space: nowrap; }
.chat-msg.mine .chat-time { color: rgba(255,255,255,.62); }
.chat-at { color: #9cc4ff; font-weight: 700; unicode-bidi: isolate; }
.chat-at.me { color: var(--highlight); background: rgba(255,203,5,.16); border-radius: 5px; padding: 0 3px; }
.chat-del {
  align-self: center; flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 9px; background: none; color: #fca5a5; cursor: pointer; opacity: 0; transition: opacity .15s;
}
.chat-msg:hover .chat-del, .chat-del:focus-visible { opacity: .7; }
.chat-del:hover { opacity: 1; background: rgba(239,68,68,.15); }
@media (hover: none) { .chat-del { opacity: .45; } }

.chat-empty { margin: auto; display: grid; justify-items: center; gap: 4px; text-align: center; color: var(--text-secondary); }
.chat-empty img { width: 130px; height: auto; margin-bottom: 4px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }
.chat-empty strong { color: var(--text-primary); font-size: 1.05rem; }

.chat-jump {
  position: absolute; bottom: 82px; left: 50%; transform: translateX(-50%); z-index: 2;
  border: 0; border-bottom: 3px solid #1f5fc0; border-radius: 999px; padding: 6px 16px; cursor: pointer;
  background: var(--accent-blue); color: #fff; font: inherit; font-size: .82rem; font-weight: 800;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.chat-note { padding: 7px 14px; font-size: .84rem; font-weight: 700; background: rgba(255,203,5,.15); color: var(--highlight); }

/* שורת הכתיבה — כמו תיבת הטקסט במשחקי פוקימון: לבנה עם מסגרת כפולה */
.chat-form { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--glass-border); background: var(--bg-secondary); }
.chat-box { position: relative; flex: 1; min-width: 0; display: flex; }
.chat-input {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: 13px; font: inherit; font-size: .97rem;
  background: #f7f8fc; color: #16203a; border: 3px solid #2c3d6b;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #c9d4ec;
}
.chat-input::placeholder { color: #75819e; }
.chat-input:focus { outline: none; border-color: var(--accent-blue); }
.chat-box:has(.chat-count:not([hidden])) .chat-input { padding-inline-end: 66px; }
.chat-count {
  position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-num); font-size: .74rem; font-weight: 700; color: #75819e; pointer-events: none;
}
.chat-count.full { color: var(--danger); }
.chat-send {
  flex: none; width: 52px; display: grid; place-items: center; cursor: pointer;
  border: 0; border-bottom: 4px solid var(--accent-dark); border-radius: 13px;
  background: var(--accent-primary); color: #fff;
}
.chat-send svg { transform: scaleX(-1); }
.chat-send:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.chat-send:disabled { filter: grayscale(.8); opacity: .55; cursor: not-allowed; }
.chat-form.is-muted .chat-input { background: #dde2ee; color: #55607a; cursor: not-allowed; }

/* מחוברים עכשיו — כל מאמן בשורה כמו סלוט במסך הצוות; לחיצה = התפריט המהיר */
.chat-people { display: flex; flex-direction: column; min-height: 0; background: var(--bg-secondary); border-inline-start: 1px solid var(--glass-border); }
.chat-people-title { display: flex; align-items: center; gap: 8px; padding: 13px 14px 8px; font-weight: 800; font-size: .92rem; }
.chat-people-title b {
  margin-inline-start: auto; padding: 0 9px; border-radius: 999px;
  background: var(--bg-tertiary); font-family: var(--font-num); font-size: .8rem;
}
.chat-people-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.chat-person {
  display: flex; align-items: center; gap: 10px; width: 100%; flex: none; padding: 6px 8px; cursor: pointer;
  border: 0; border-radius: 14px; background: var(--bg-tertiary); color: var(--text-primary); font: inherit; text-align: start;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); transition: background .15s, transform .15s;
}
.chat-person:hover { background: var(--surface-hi); transform: translateX(-2px); }
.chat-person.me { background: #1d4f91; }
.chat-person .chat-av { width: 40px; height: 40px; }
.chat-person .chat-av img { width: 72px; height: 72px; }
.chat-person-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.chat-person-name { font-weight: 800; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-person-lvl { color: var(--text-secondary); font-size: .74rem; font-family: var(--font-num); }
.chat-person.me .chat-person-lvl { color: rgba(255,255,255,.7); }

/* התפריט המהיר שנפתח מלחיצה על שם / תמונה */
.chat-pop {
  position: fixed; z-index: 130; width: 300px; max-height: calc(100vh - 16px); overflow-y: auto; padding: 12px;
  background: var(--bg-secondary); border: 1px solid var(--glass-border); border-top: 4px solid var(--accent-primary);
  border-radius: var(--radius-md); box-shadow: 0 18px 44px rgba(3,7,18,.6);
  animation: chatPopIn .16s ease-out;
}
.chat-pop.sheet { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 80vh; }
@keyframes chatPopIn { from { opacity: 0; transform: translateY(-4px); } }
.chat-pop-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.chat-av.lg { width: 60px; height: 60px; }
.chat-av.lg img { width: 100px; height: 100px; translate: 0 7px; }
.chat-pop-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 800; font-size: 1.06rem; }
.chat-pop-sub { color: var(--text-secondary); font-size: .8rem; }
.chat-pop-actions { display: grid; gap: 6px; }
.chat-pop-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; cursor: pointer;
  border: 0; border-radius: 10px; background: var(--bg-tertiary); color: var(--text-primary);
  font: inherit; font-size: .88rem; font-weight: 700; text-decoration: none; text-align: start;
}
.chat-pop-btn:hover { background: var(--surface-hi); }
.chat-pop-btn b { width: 17px; text-align: center; font-family: var(--font-num); }
.chat-pop-btn.danger { color: #fca5a5; }
.chat-pop-btn.danger:hover { background: rgba(239,68,68,.16); }
.chat-pop-btn:disabled { opacity: .45; cursor: default; }
.chat-pop-staff { display: grid; gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--glass-border); }
.chat-pop-label { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .9rem; }
.chat-pop-state { margin-inline-start: auto; padding: 2px 9px; border-radius: 999px; font-size: .75rem; background: rgba(34,197,94,.14); color: #86efac; }
.chat-pop-state.bad { background: rgba(239,68,68,.16); color: #fca5a5; }
.chat-pop-hint { margin-top: 2px; color: var(--text-secondary); font-size: .76rem; font-weight: 700; }
.chat-pop-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-chip {
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--glass-border); background: var(--bg-tertiary); color: var(--text-primary);
  font: inherit; font-size: .8rem; font-weight: 700;
}
.chat-chip:hover { border-color: var(--highlight); }
.chat-chip.ok { border-color: rgba(34,197,94,.5); color: #86efac; }
.chat-chip.warn:hover { border-color: var(--warning); color: #fcd34d; }
.chat-pop-warn { display: flex; gap: 6px; }
.chat-pop-warn .field { flex: 1; min-width: 0; padding: 6px 10px; font-size: .85rem; }

/* קוד PIN מתוך הצ'אט (אדמין) */
.chat-pin { display: flex; gap: 8px; }
.chat-pin .field { flex: 1; min-width: 0; direction: ltr; text-align: center; font-family: var(--font-num); font-size: 1.35rem; letter-spacing: .35em; }
.chat-pin-err { min-height: 1.4em; margin-top: 8px; color: #fca5a5; font-weight: 700; }

/* הגדלה: הצ'אט על כל המסך */
.chat-dock.expanded {
  position: fixed; inset: 0; z-index: 125; margin: 0; max-width: none; padding: 16px;   /* מעל סרגל הצד (120) */
  display: grid; place-items: center; background: rgba(5,9,20,.72);
}
.chat-dock.expanded .chat-panel { width: min(1180px, 100%); height: 100%; }
.chat-dock.expanded .chat-body { flex: 1; min-height: 0; height: auto; }
body.chat-expanded { overflow: hidden; }

@media (max-width: 860px) {
  /* minmax(0, …) — אחרת שורת המחוברים (גוללת לרוחב) מרחיבה את העמודה וההודעות נחתכות */
  .chat-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: clamp(480px, 74vh, 660px); }
  .chat-people { order: -1; min-width: 0; border-inline-start: 0; border-bottom: 1px solid var(--glass-border); }
  .chat-people-title { display: none; }
  .chat-people-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 8px 10px; }
  .chat-person { width: auto; padding: 4px 12px 4px 5px; border-radius: 999px; }
  .chat-person:hover { transform: none; }
  .chat-person .chat-av { width: 32px; height: 32px; }
  .chat-person .chat-av img { width: 58px; height: 58px; translate: 0 4px; }
  .chat-person-lvl, .chat-person .role-tag { display: none; }
}
@media (max-width: 560px) {
  .chat-dock { padding: 0 10px; margin-bottom: 76px; }   /* שכפתור 🐞 הצף לא יסתיר את כפתור השליחה בסוף הדף */
  .chat-head { min-height: 66px; padding: 10px 14px; padding-inline-end: 104px; }
  .chat-title { font-size: 1.12rem; }
  .chat-mascot { height: 90px; bottom: -18px; inset-inline-end: 6px; }
  .chat-list { padding: 8px 10px; }
  .chat-av, .chat-av-gap { width: 36px; }
  .chat-av { height: 36px; }
  .chat-av img { width: 64px; height: 64px; translate: 0 4px; }
  .chat-bubble { max-width: 86%; }
  .chat-form { padding: 10px; }
  .chat-dock.expanded { padding: 0; }
  .chat-dock.expanded .chat-panel { border-radius: 0; }
}

/* תג נדירות (rarityTag ב-ui.js) */
.rarity-tag {
  display: inline-block; font-size: .68rem; font-weight: 800; padding: 1px 8px; border-radius: 999px;
  vertical-align: middle; letter-spacing: .02em; color: #fff; background: #3b82f6;
}
.rarity-tag.very_rare { background: #a855f7; }
.rarity-tag.pseudo_legendary { background: linear-gradient(90deg, #dc2626, #f97316); }
.rarity-tag.legendary { background: linear-gradient(90deg, #f59e0b, #fbbf24); color: #3a2400; }
.rarity-tag.mythical { background: linear-gradient(90deg, #ec4899, #f9a8d4); color: #3b0420; }
.rarity-tag.ultra_beast { background: linear-gradient(90deg, #6366f1, #22d3ee); color: #06142b; }
.rarity-tag.paradox { background: linear-gradient(90deg, #64748b, #e2e8f0); color: #0f172a; }

/* ── התראות חיות (הזמנה ל-PvP) — בראש הדף, מעל הכול ── */
.live-cards {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 150;   /* מתחת לכותרת, מעליה בשכבות */
  display: grid; gap: 10px; width: min(480px, calc(100vw - 24px));
}
@media (min-width: 1100px) {      /* באמצע הדף עצמו — לא באמצע המסך (הסרגל תופס את הימין) */
  body.has-side-nav .live-cards { left: calc(50% - var(--side-w) / 2); }
}
.live-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center;
  padding: 12px 14px; border-radius: var(--radius-md); background: var(--bg-secondary);
  border: 1px solid var(--glass-border); border-top: 4px solid var(--accent-primary);
  box-shadow: 0 16px 40px rgba(3, 7, 18, .55); animation: liveIn .35s cubic-bezier(.34, 1.56, .64, 1);
}
.live-mon { width: 56px; height: 56px; image-rendering: pixelated; grid-row: span 2; }
.live-title { font-weight: 800; font-size: 1.02rem; }
.live-timer {
  font-family: var(--font-num); font-weight: 800; min-width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg-tertiary); color: var(--highlight);
}
.live-actions { grid-column: 2 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.live-announce { grid-template-columns: 1fr auto; border-top-color: var(--accent-secondary); }
.live-warn { border-top-color: var(--warning); }
.live-personal { border-top-color: var(--accent-blue); }
.live-from { font-size: .8rem; margin-top: 2px; }
@keyframes liveIn { from { transform: translateY(-16px) scale(.96); opacity: 0; } }

/* פס "אתה באמצע קרב" בכל דף אחר */
.battle-bar {
  display: block; text-align: center; padding: 8px 12px; font-weight: 700; color: #fff; text-decoration: none;
  background: var(--accent-primary); border-bottom: 3px solid var(--accent-dark);
  animation: battleBarPulse 2s ease-in-out infinite;
}
.battle-bar b { text-decoration: underline; }
@keyframes battleBarPulse { 50% { filter: brightness(1.12); } }

/* דרגת מאמן ו-XP בכותרת, מתחת לשם */
.user-info { display: grid; gap: 2px; line-height: 1.1; min-width: 0; }
.user-line { display: inline-flex; align-items: center; gap: 6px; }
.user-rank { display: grid; gap: 3px; min-width: 104px; }
.rank-txt { display: flex; justify-content: space-between; gap: 8px; font-size: .68rem; color: var(--text-secondary); white-space: nowrap; }
.rank-txt b { color: var(--highlight); font-weight: 800; }
.rank-left { font-family: var(--font-num); }
.rank-bar { height: 4px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffcb05, #ffe36e); }
.user-chip { padding-top: 4px; padding-bottom: 4px; }
@media (max-width: 720px) {
  .rank-left { display: none; }
  .user-rank { min-width: 64px; }
}

/* תיאור מוצר בחנות */
.item-desc { font-size: .78rem; line-height: 1.45; color: var(--text-secondary); margin-top: 6px; min-height: 3.4em; }

/* פוקידקס: מציאה ותפיסה, מהלכים */
.dex-odds { display: grid; gap: 8px; }
.odds-find b { color: var(--highlight); font-family: var(--font-num); }
.odds-table { width: 100%; border-collapse: collapse; font-size: .88rem; text-align: center; }
.odds-table th { color: var(--text-secondary); font-weight: 600; padding: 4px; font-size: .8rem; }
.odds-table td { padding: 4px; border-top: 1px solid var(--glass-border); font-family: var(--font-num); font-weight: 700; }
.odds-table td img { width: 22px; height: 22px; vertical-align: middle; }
.dex-learn { margin-top: 12px; }
.dex-learn summary { cursor: pointer; font-weight: 700; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin-top: 8px; }
.learn-row { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; font-size: .85rem;
  background: color-mix(in srgb, var(--tc) 18%, var(--bg-tertiary)); border-inline-start: 3px solid var(--tc); }
.learn-row .lv { font-family: var(--font-num); color: var(--text-secondary); font-size: .75rem; min-width: 34px; }
.learn-row b { flex: 1; font-weight: 700; }

/* אריח שהוא קישור (למשל "פריטים בתיק" בפרופיל → החנות, לשונית התיק) */
a.stat-tile.tile-link { color: inherit; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
a.stat-tile.tile-link:hover { transform: translateY(-2px); border-color: var(--accent-secondary); }

/* ── מתנה מהצוות (ui.js → showGifts) ── */
.gift { text-align: center; position: relative; }
.gift-art { position: relative; width: 132px; height: 132px; margin: 0 auto 4px; }
.gift-art img { position: relative; width: 100%; height: 100%; object-fit: contain;
                filter: drop-shadow(0 8px 12px rgba(0,0,0,.45)); animation: giftPop .7s cubic-bezier(.34,1.56,.64,1) both; }
.gift-rays {
    position: absolute; inset: -28px; border-radius: 50%;
    background: repeating-conic-gradient(rgba(255,216,77,.35) 0 9deg, transparent 9deg 22deg);
    -webkit-mask: radial-gradient(circle, #000 25%, transparent 68%); mask: radial-gradient(circle, #000 25%, transparent 68%);
    animation: giftSpin 8s linear infinite;
}
.gift-name { font-size: 1.3rem; font-weight: 900; }
.gift-types { margin: 6px 0 10px; }
.gift-msg { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--bg-secondary);
            border-inline-start: 4px solid var(--accent-secondary); font-style: italic; text-align: start; }
.gift-msg cite { display: block; margin-top: 4px; font-size: .82rem; font-style: normal; color: var(--text-secondary); }
.gift-ivs { display: grid; gap: 5px; padding: 10px 12px; border-radius: 12px; background: var(--bg-secondary); text-align: start; }
.iv-row { display: grid; grid-template-columns: 96px 1fr 28px; align-items: center; gap: 8px; font-size: .85rem; }
.iv-row b { font-family: var(--font-num); text-align: end; }
.iv-track { height: 7px; border-radius: 99px; background: var(--bg-tertiary); overflow: hidden; }
.iv-fill { height: 100%; border-radius: 99px; background: var(--accent-blue); }
.iv-fill.max { background: var(--accent-secondary); }
.iv-total { margin-top: 4px; font-size: .86rem; color: var(--text-secondary); }
.iv-total b { color: var(--text-primary); font-family: var(--font-num); }
.gift-note { font-size: .82rem; margin: 10px 0 0; }
.gift-confetti { position: absolute; left: 50%; top: 70px; width: 0; height: 0; z-index: 2; pointer-events: none; }
.gift-confetti i { position: absolute; width: 8px; height: 11px; border-radius: 2px; background: var(--c); opacity: 0;
                   animation: giftBit 1.3s cubic-bezier(.15,.7,.3,1) var(--d) forwards; }
@keyframes giftBit { 0% { transform: rotate(var(--a)) translateY(0) scale(.5); opacity: 1; }
                     100% { transform: rotate(var(--a)) translateY(-150px) rotate(300deg); opacity: 0; } }
@keyframes giftPop { 0% { transform: scale(0) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.15) rotate(4deg); opacity: 1; }
                     100% { transform: none; } }
@keyframes giftSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gift-rays, .gift-confetti { display: none; } }

/* טופס מתנת פוקימון בדף הניהול (admin.js → initGiftForm) */
.gift-admin { padding: 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent-secondary) 40%, var(--glass-border));
              background: color-mix(in srgb, var(--accent-secondary) 6%, var(--surface)); }
.gift-admin-head { display: flex; gap: 12px; align-items: center; }
.gift-admin-fields { flex: 1; min-width: 0; display: grid; gap: 8px; }
.gift-admin-art { width: 84px; height: 84px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); }
.gift-admin .adm-form { margin: 0; }
.gift-admin > .adm-form, .gift-admin > p { margin-top: 8px; }
.gift-admin .adm-form .g-small { width: 76px; flex: 0 0 76px; min-width: 0; }
.gift-admin .g-check { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.gift-admin .g-iv { display: grid; gap: 2px; font-size: .75rem; color: var(--text-secondary); flex: 1 1 80px; }
