/* step-charsheet.css – Krok 7: Přehled postavy */

/* ====== SHEET LAYOUT: content + right sidebar ====== */
.bs-sheet-layout {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 1.5rem;
  /* align-items: start odstraněno — sidebar se roztáhne pro sticky */
  margin-bottom: 1.5rem;
}
.bs-sheet-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  align-self: start;
}

/* ====== SIDEBAR NAV — styl jako charsheet / lore ====== */
.bs-nav-sidebar {
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,162,39,.3) transparent;
}
.bs-nav__title {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  text-align: center;
  position: relative;
}
.bs-nav__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--nav-border-ornament);
  opacity: 0.5;
}
.bs-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
/* Vertikální vodící linka vlevo */
.bs-nav__list::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 1px;
  background: linear-gradient(180deg, var(--border-dim), rgba(107,84,0,0.2));
  bottom: calc(0.4rem + 0.6em);
}
.bs-nav__list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-left: 2px solid transparent;
  color: var(--text-dim);
  font-size: 0.88rem;
  font-family: 'Crimson Text', serif;
  transition: border-color 0.2s, color 0.2s, background 0.2s, text-shadow 0.2s;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.bs-nav__list a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,162,39,0.04);
  text-shadow: 0 0 8px rgba(201,162,39,0.15);
}
.bs-nav__list a.active {
  border-color: var(--gold-light);
  color: var(--gold-light);
  background: rgba(201,162,39,0.08);
}
@media (max-width: 900px) {
  .bs-sheet-layout { grid-template-columns: 1fr; }
  .bs-nav-sidebar { display: none; }
}

/* ====== SECTION ====== */
.bs-section {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 1.2rem;
  scroll-margin-top: 3rem;
}
/* Vitals is now wrapped in .bs-section, scroll-margin inherited */
.bs-section--incomplete {
  border-style: dashed;
  border-color: rgba(224,160,50,.5);
}
.bs-section__header {
  margin-bottom: .8rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border-dim);
}
.bs-section__title {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: .95rem;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .45rem;
}
.bs-budget {
  font-size: .72rem;
  font-family: 'Crimson Text', serif;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0;
}
.bs-incomplete-badge {
  display: inline-block;
  font-size: .65rem;
  color: #e0a030;
  background: rgba(224,160,48,.1);
  border: 1px solid rgba(224,160,48,.3);
  border-radius: 4px;
  padding: .05rem .4rem;
  margin-left: .4rem;
  vertical-align: middle;
  font-style: italic;
}

/* ====== IDENTITY ====== */
.bs-identity {
  /* .bs-section gives bg/border/radius/padding — identity inherits */
}
.bs-identity__main {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}
.bs-identity__right {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  flex: 1;
  min-width: 0;
  justify-content: space-between;
}
.bs-identity__name label {
  display: block;
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .3rem;
}
.bs-identity__name input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  color: var(--gold-light);
  padding: .55rem .75rem;
  font-size: 1.25rem;
  font-family: 'Cinzel', serif;
  transition: border-color .2s;
  box-sizing: border-box;
}
.bs-identity__name input:focus { outline: none; border-color: var(--gold); }
.bs-identity__badges { display: flex; flex-wrap: wrap; gap: .5rem; align-items: stretch; }

/* ====== PORTRAIT ====== */
.bs-portrait {
  width: 120px;
  min-height: 90px;
  border-radius: 10px;
  border: 2px solid rgba(201,162,39,.3);
  background: var(--bg-deep);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
  align-self: stretch;
}
.bs-portrait:hover { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,162,39,.25); }
.bs-portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.bs-portrait__placeholder { font-size: 2.4rem; opacity: .35; transition: opacity .15s; }
.bs-portrait:hover .bs-portrait__placeholder { opacity: .6; }
.bs-portrait::after {
  content: '✎';
  position: absolute;
  bottom: 6px; right: 9px;
  font-size: .85rem;
  color: rgba(201,162,39,.55);
  transition: color .15s;
  pointer-events: none;
}
.bs-portrait:hover::after { color: var(--gold); }

.bs-badge {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: .45rem .7rem;
  min-width: 120px;
  flex: 1;
  max-width: 240px;
  transition: border-color .2s, background .2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.bs-badge:hover { border-color: rgba(201,162,39,.45); background: rgba(201,162,39,.04); }
.bs-badge--info { cursor: default; }
.bs-badge--info:hover { border-color: var(--border-dim); background: var(--bg-deep); }
.bs-badge__img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-dim);
  background: var(--bg-card);
  flex-shrink: 0;
}
.bs-badge__text { flex: 1; min-width: 0; }
.bs-badge__text label {
  display: block;
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: .1rem;
  cursor: inherit;
}
.bs-badge__text span {
  font-size: .88rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.bs-badge__edit-hint {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 28px;
  background: linear-gradient(to right, transparent, rgba(201,162,39,.1));
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: .3rem;
  font-size: .62rem;
  color: var(--gold);
  opacity: 0;
  transition: opacity .2s;
}
.bs-badge:hover .bs-badge__edit-hint { opacity: 1; }

/* ====== VITALS ====== */
.bs-vitals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}
.bs-vitals--ingroup { padding: .5rem .6rem; }
.bs-vital-tile {
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, box-shadow .2s;
}
.bs-vital-tile:hover { border-color: rgba(201,162,39,.35); box-shadow: 0 0 10px rgba(201,162,39,.08); }

/* Info zone (icon + label) — opens rules explanation */
.bs-vital-tile__info {
  cursor: pointer;
  padding: .45rem .6rem .3rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.02);
  transition: background .2s;
  flex-shrink: 0;
}
.bs-vital-tile__info:hover { background: rgba(255,255,255,.07); }
.bs-vital-tile__icon { font-size: 1.1rem; display: block; line-height: 1; margin-bottom: .18rem; }
.bs-vital-tile__label {
  font-size: .57rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  display: block;
}

/* Num zone (value) — opens calculation detail */
.bs-vital-tile__num {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  color: var(--gold-light);
  padding: .4rem .4rem;
  transition: background .2s, text-shadow .2s;
}
.bs-vital-tile__num:hover { background: rgba(201,162,39,.07); text-shadow: 0 0 8px rgba(201,162,39,.25); }

.bs-vital-tile--hp { border-color: rgba(192,57,43,.2); }
.bs-vital-tile--hp:hover { border-color: rgba(192,57,43,.45); box-shadow: 0 0 10px rgba(192,57,43,.08); }
.bs-vital-tile--hp .bs-vital-tile__num { color: #e57c7c; }
.bs-vital-tile--ac { border-color: rgba(41,128,185,.2); }
.bs-vital-tile--ac .bs-vital-tile__num { color: #6fa8d0; }
.bs-vital-tile--dr { border-color: rgba(52,152,219,.15); }
.bs-vital-tile--perc .bs-vital-tile__num { color: #f0c060; }

/* Vitals combat group header */
.combat-group--vitals .combat-group__header { background: rgba(93,187,122,.08); color: #5dbb7a; border-bottom: 1px solid rgba(93,187,122,.12); }

/* ====== +/− BUTTONS ====== */
.bs-pm { display: flex; align-items: center; gap: .2rem; justify-content: center; }
.bs-pm-btn {
  width: 20px; height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border-dim);
  background: var(--bg-card);
  color: var(--gold);
  font-size: .8rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
  padding: 0; line-height: 1; flex-shrink: 0;
  user-select: none;
}
.bs-pm-btn:hover { border-color: var(--gold); background: rgba(201,162,39,.1); }
.bs-pm-btn:active { background: rgba(201,162,39,.2); }
.bs-pm-val { min-width: 1.1rem; text-align: center; font-size: .78rem; color: var(--text); }

/* ====== STAT CARDS ====== */
.bs-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  /* Subgrid row alignment: header / body / edit all share same row heights */
  grid-template-rows: auto 1fr auto;
}
.bs-stat-card {
  /* Each card spans 3 parent rows (header / body / edit) */
  grid-row: span 3;
  display: grid;
  grid-template-rows: subgrid;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.bs-stat-card:hover { border-color: var(--gold); box-shadow: 0 0 10px rgba(201,162,39,.12); }
.bs-stat-card--hybrid { border-color: rgba(201,162,39,.45); box-shadow: 0 0 6px rgba(201,162,39,.08); }
.bs-stat-card--hybrid:hover { box-shadow: 0 0 14px rgba(201,162,39,.2); }

.bs-stat-card__header {
  padding: .3rem .35rem .3rem;
  border-bottom: 2px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.02);
  text-align: center;
  cursor: pointer;
  transition: background .2s;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.bs-stat-card__header:hover { background: rgba(255,255,255,.06); }
.bs-stat-card__abbr {
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.bs-stat-card__hybrid-tag {
  display: block;
  font-size: .52rem; color: var(--gold);
  cursor: pointer; padding: .02rem .22rem;
  border-radius: 2px; margin-top: .05rem;
  transition: background .15s;
}
.bs-stat-card__hybrid-tag:hover { background: rgba(201,162,39,.15); text-decoration: underline; }

.bs-stat-card__body {
  padding: .5rem .35rem;
  text-align: center;
  cursor: pointer;
  transition: background .2s;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.bs-stat-card__body:hover { background: rgba(201,162,39,.05); }
.bs-stat-card__value { font-family: 'Cinzel', serif; font-size: 1.45rem; color: var(--gold); line-height: 1.2; }
.bs-stat-card__roll { font-size: .6rem; color: var(--text-muted); margin-top: .15rem; }
.bs-stat-card__deity-badge { font-size: .5rem; color: #6fa8d0; margin-top: .1rem; }

.bs-stat-card__edit {
  padding: .35rem .35rem;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
}
.bs-stat-card__edit-label { font-size: .55rem; color: var(--text-muted); }

/* ====== SKILLS ====== */
.bs-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  column-gap: 1.2rem;
  row-gap: 0;
}
.bs-skill-group-header {
  grid-column: 1 / -1;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted);
  padding: .5rem .4rem .15rem;
  margin-top: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.bs-skill-group-header:first-child { margin-top: 0; }
.bs-skill-group-header--hybrid { color: rgba(212,184,106,.85); border-bottom-color: rgba(201,162,39,.2); }
.bs-skill-hybrid-tag {
  font-size: .58rem; font-weight: 700; color: var(--gold);
  background: rgba(201,162,39,.1); border: 1px solid rgba(201,162,39,.35);
  border-radius: 3px; padding: .03rem .26rem; margin-left: .4rem;
  vertical-align: middle; cursor: pointer;
  transition: background .15s;
}
.bs-skill-hybrid-tag:hover { background: rgba(201,162,39,.2); }

.bs-skill-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto auto;
  gap: .4rem;
  font-size: .78rem;
  padding: .2rem .4rem;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.bs-skill-row:last-child { border-bottom: none; }
.bs-skill-row--hybrid {
  background: rgba(201,162,39,.03);
  border-left: 2px solid rgba(201,162,39,.3);
  padding-left: calc(.4rem - 2px);
}
.bs-skill__name { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.bs-skill__name:hover { color: var(--gold-light); }
.bs-skill__tier { color: var(--gold-light); font-weight: 600; font-size: .7rem; min-width: 68px; text-align: right; }
.bs-skill__dice { font-family: 'Courier New', monospace; font-size: .7rem; color: var(--text-muted); min-width: 42px; text-align: right; cursor: pointer; }
.bs-skill__dice:hover { color: var(--gold); }
.bs-skill__edit { display: flex; align-items: center; gap: .12rem; }

/* ====== COMBAT (reused from original) ====== */
.combat-section { display: flex; flex-direction: column; gap: .6rem; }
.combat-group { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.combat-group__header { font-family: 'Cinzel', serif; font-size: .72rem; font-weight: 700; padding: .35rem .9rem; text-transform: uppercase; letter-spacing: .07em; }
.combat-group--offense .combat-group__header { background: rgba(192,57,43,.12); color: #d97070; border-bottom: 1px solid rgba(192,57,43,.18); }
.combat-group--defense .combat-group__header { background: rgba(41,128,185,.12); color: #6fa8d0; border-bottom: 1px solid rgba(41,128,185,.18); }
.combat-group--survival .combat-group__header { background: rgba(93,187,122,.1); color: #5dbb7a; border-bottom: 1px solid rgba(93,187,122,.14); }
.combat-group--class .combat-group__header { background: rgba(201,162,39,.08); color: var(--gold); border-bottom: 1px solid rgba(201,162,39,.15); }
.combat-group__stat { font-weight: 400; font-size: .75rem; opacity: .7; }
.combat-group__body { display: flex; flex-wrap: wrap; min-width: 0; }
.combat-group__list { display: flex; flex-direction: column; }

.combat-item { flex: 1 1 0; min-width: 70px; text-align: center; padding: 0; border-right: 1px solid var(--border); overflow: hidden; border-radius: 0; position: relative; display: flex; flex-direction: column; }
.combat-item:last-child { border-right: none; }
.combat-item__desc { cursor: pointer; padding: .4rem .4rem .35rem; transition: background .2s; border-bottom: 2px solid rgba(255,255,255,.12); flex-shrink: 0; height: 4.4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,.02); }
.combat-item__desc:hover { background: rgba(255,255,255,.06); }
.combat-item__icon { font-size: 1.1rem; line-height: 1; margin-bottom: .15rem; }
.combat-item__label { font-size: .68rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; }
.combat-item__num { flex: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: .45rem .4rem; transition: background .2s, text-shadow .2s; font-family: 'Cinzel', serif; font-size: 1.2rem; color: var(--gold); }
.combat-item__num:hover { background: rgba(201,162,39,.06); text-shadow: 0 0 8px rgba(201,162,39,.3); }
.combat-item__sub { font-size: .6rem; color: var(--text-muted); margin-top: .1rem; }

.combat-row { display: grid; grid-template-columns: 1fr auto auto 1fr; gap: .6rem; padding: .4rem .9rem; font-size: .82rem; border-bottom: 1px solid rgba(255,255,255,.04); align-items: center; min-width: 0; }
.combat-row--6col { grid-template-columns: minmax(0,1fr) auto auto auto minmax(0,1fr); }
.combat-row:last-child { border-bottom: none; }
.combat-row--header { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; opacity: .7; border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: .3rem; }
.combat-row__name { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combat-row__dice { font-family: 'Courier New', monospace; font-weight: 700; color: var(--gold); min-width: 48px; text-align: center; white-space: nowrap; }
.combat-row__dmg { font-weight: 700; color: var(--text); text-align: center; min-width: 40px; }
.combat-row--header .combat-row__dice, .combat-row--header .combat-row__dmg { font-family: inherit; font-weight: 400; color: inherit; }
.combat-row__detail { font-size: .75rem; color: var(--text-muted); text-align: right; }

/* ====== ABILITIES ====== */
.bs-abilities-list { display: flex; flex-direction: column; gap: .3rem; }
.bs-ability-card {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .5rem;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  font-size: .82rem;
  transition: border-color .15s;
}
.bs-ability-card:hover { border-color: rgba(201,162,39,.25); }
.bs-ability-card--innate { border-color: rgba(93,187,122,.2); }
.bs-ability-card--locked { border-color: rgba(201,162,39,.18); }
.bs-ability-card__info { flex: 1; min-width: 0; cursor: pointer; }
.bs-ability-card__name { color: var(--text); font-weight: 500; }
.bs-ability-card__name:hover { color: var(--gold-light); }
.bs-ability-card--innate .bs-ability-card__name { color: #5dbb7a; }
.bs-ability-card--locked .bs-ability-card__name { color: var(--gold-light); }
.bs-ability-card__source { font-size: .68rem; color: var(--text-muted); margin-top: .05rem; }
.bs-ability-card__remove {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1);
  background: transparent; color: var(--text-muted);
  font-size: .78rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .15s;
}
.bs-ability-card__remove:hover { border-color: #e07070; color: #e07070; background: rgba(224,112,112,.08); }
.bs-add-btn { margin-top: .6rem; font-size: .8rem; padding: .3rem .8rem; }

/* ====== SPELLS ====== */
.bs-spells-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.bs-spell-card {
  display: flex; align-items: center; gap: .32rem;
  padding: .25rem .55rem .25rem .45rem;
  background: rgba(140,90,200,.1);
  border: 1px solid rgba(140,90,200,.35);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s;
}
.bs-spell-card:hover { border-color: rgba(140,90,200,.6); }
.bs-spell-card__name { color: #b080e0; font-size: .78rem; }
.bs-spell-card__remove {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid rgba(176,128,224,.25);
  background: transparent; color: rgba(176,128,224,.5);
  font-size: .62rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; padding: 0; flex-shrink: 0;
}
.bs-spell-card__remove:hover { border-color: #e07070; color: #e07070; }

/* ====== CLASS INFO ====== */
.bs-class-row { display: flex; justify-content: space-between; gap: .5rem; padding: .22rem 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: .82rem; }
.bs-class-row:last-child { border-bottom: none; }
.bs-class-row__label { color: var(--text-muted); flex-shrink: 0; }
.bs-class-row__value { color: var(--text); text-align: right; line-height: 1.45; }

/* ====== DEITY ====== */
.bs-deity-name { font-family: 'Cinzel', serif; color: var(--gold-light); font-size: .9rem; cursor: pointer; }
.bs-deity-name:hover { text-decoration: underline; }

/* ====== PICKER MODAL ====== */
.bs-picker-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.68);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.bs-picker-overlay.hidden { display: none; }
.bs-picker-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%; max-width: 680px;
  max-height: 82vh; overflow-y: auto;
  position: relative;
  scrollbar-width: thin; scrollbar-color: rgba(201,162,39,.3) transparent;
}
.bs-picker-header {
  position: sticky; top: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-dim);
  padding: .9rem 1.2rem .75rem;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 1;
}
.bs-picker-title { font-family: 'Cinzel', serif; color: var(--gold); font-size: .95rem; margin: 0; }
.bs-picker-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border-dim);
  background: transparent; color: var(--text-muted);
  font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.bs-picker-close:hover { border-color: var(--gold); color: var(--gold); }
.bs-picker-body { padding: .9rem 1.2rem 1.2rem; }

.bs-picker-slot-info {
  font-size: .8rem; color: var(--text-muted);
  margin-bottom: .9rem;
  padding: .4rem .7rem;
  background: rgba(255,255,255,.03);
  border-radius: 4px;
  border-left: 2px solid rgba(201,162,39,.4);
  line-height: 1.5;
}
.bs-picker-group-header {
  font-family: 'Cinzel', serif; font-size: .68rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .07em;
  padding: .5rem 0 .28rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: .4rem; margin-top: .8rem;
}
.bs-picker-group-header:first-of-type { margin-top: 0; }

.bs-picker-item {
  display: flex; align-items: flex-start; gap: .55rem;
  padding: .42rem .45rem; border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s;
  margin-bottom: .28rem;
}
.bs-picker-item:hover:not(.bs-picker-item--locked) { background: rgba(255,255,255,.04); border-color: rgba(201,162,39,.18); }
.bs-picker-item--selected { background: rgba(201,162,39,.06); border-color: rgba(201,162,39,.32); }
.bs-picker-item--locked { opacity: .6; cursor: default; }
.bs-picker-item__check {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border-dim);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; color: transparent;
  transition: all .15s;
}
.bs-picker-item--selected .bs-picker-item__check { border-color: var(--gold); background: var(--gold); color: #000; }
.bs-picker-item__text { flex: 1; min-width: 0; }
.bs-picker-item__name { font-size: .84rem; font-weight: 500; color: var(--text); }
.bs-picker-item__desc { font-size: .74rem; color: var(--text-muted); margin-top: .12rem; line-height: 1.4; }
.bs-picker-item__prereq { font-size: .68rem; color: #e07070; margin-top: .1rem; }

.bs-picker-spell-item {
  display: flex; align-items: center; gap: .55rem;
  padding: .42rem .45rem; border-radius: 6px;
  border: 1px solid var(--border-dim);
  cursor: pointer; transition: all .15s; margin-bottom: .28rem;
}
.bs-picker-spell-item:hover { border-color: rgba(140,90,200,.4); background: rgba(140,90,200,.05); }
.bs-picker-spell-item--selected { background: rgba(140,90,200,.1); border-color: rgba(140,90,200,.45); }
.bs-picker-spell-item--disabled { opacity: .35; cursor: default; pointer-events: none; }
.bs-picker-spell-item__check {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(140,90,200,.3);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; color: transparent;
  transition: all .15s;
}
.bs-picker-spell-item--selected .bs-picker-spell-item__check { border-color: #b080e0; background: #b080e0; color: #fff; }
.bs-picker-spell-item__name { font-size: .84rem; color: #b080e0; flex: 1; min-width: 0; }
.bs-picker-spell-item__meta { font-size: .7rem; color: var(--text-muted); text-align: right; }
.bs-picker-spell-item__desc { font-size: .73rem; color: var(--text-muted); grid-column: 1/-1; line-height: 1.4; }

/* ====== EXPORT PANEL (kept) ====== */
.export-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; text-align: center; }
.export-panel__title { font-family: 'Cinzel', serif; color: var(--gold); font-size: 1.1rem; margin-bottom: 1rem; }
.export-panel__buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: .8rem; }
.export-panel__note { font-size: .78rem; color: var(--text-muted); font-style: italic; }

/* ====== RESPONSIVE ====== */
@media (max-width: 720px) {
  .bs-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto 1fr auto auto 1fr auto; /* 2 rows of cards */
  }
  .bs-vitals { grid-template-columns: repeat(2, 1fr); }
  .bs-vitals--ingroup { padding: .4rem; }
}
@media (max-width: 500px) {
  .bs-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto 1fr auto auto 1fr auto;
  }
  .bs-skills-grid { grid-template-columns: 1fr; }
  .bs-picker-modal { max-height: 90vh; }
}

/* Fallback: browsers bez subgrid support */
@supports not (grid-template-rows: subgrid) {
  .bs-stat-card {
    display: flex;
    flex-direction: column;
    grid-row: auto;
  }
  .bs-stat-card__body { flex: 1; }
}
