.char-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(250, 204, 21, 0.15);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.char-chip {
  background: rgba(25, 28, 44, 0.85);
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid #363a52;
  font-size: 13px;
  transition: all 0.25s;
}

.char-chip:hover {
  border-color: #facc15;
  transform: translateY(-1px);
}

.char-chip.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-color: #facc15;
  box-shadow: 0 0 12px rgba(79, 70, 229, 0.6);
  font-weight: bold;
}

.profile-panel {
  background: linear-gradient(180deg, rgba(16, 18, 30, 0.9) 0%, rgba(10, 12, 20, 0.95) 100%);
  border: 1px solid rgba(250, 204, 21, 0.2);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.grid-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 16px;
  align-items: center;
}

.grid-info span {
  color: #8f95b2;
  font-size: 12px;
  display: block;
  margin-bottom: 3px;
}

.grid-info b {
  font-size: 15px;
  color: #eceff8;
}

.exp-widget {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 140px;
}

.exp-text {
  font-size: 14px;
  font-weight: 700;
  color: #06b6d4;
  letter-spacing: 0.5px;
}

.exp-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.exp-bar-val {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4 0%, #38bdf8 100%);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
  transition: width 0.35s ease;
}

.attr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.attr-cell {
  background: rgba(22, 25, 40, 0.7);
  border: 1px solid #2d3148;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.attr-cell:hover {
  transform: translateY(-2px);
  border-color: #facc15;
  background: rgba(28, 32, 52, 0.95);
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.15);
}

.attr-cell span {
  font-size: 11px;
  color: #8f95b2;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.attr-cell strong {
  font-size: 18px;
  color: #facc15;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.4);
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.inv-cat {
  background: rgba(16, 18, 29, 0.75);
  border: 1px solid #2b2f44;
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}

.inv-cat:hover {
  border-color: #3f4566;
}

.inv-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #171927;
  padding: 6px 10px;
  border-radius: 5px;
  margin-top: 6px;
  font-size: 12px;
  border-left: 2px solid #4f46e5;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0 16px;
}

.tab {
  flex: 1;
  padding: 13px;
  text-align: center;
  background: rgba(20, 22, 34, 0.85);
  border: 1px solid #2b2e42;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  color: #8f95b2;
  letter-spacing: 0.5px;
  transition: all 0.25s;
}

.tab:hover {
  color: #fff;
  background: #1e2133;
}

.tab.active {
  background: linear-gradient(180deg, #24283d 0%, #1a1c2b 100%);
  color: #facc15;
  border-color: #facc15;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.2);
}

.forms-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid #2d324d;
}

.forms-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(16, 18, 28, 0.9);
  font-size: 13px;
  text-align: center;
}

.forms-table th, .forms-table td {
  border: 1px solid #262a40;
  padding: 7px 8px;
}

.forms-table th {
  background: #181b2c;
  color: #facc15;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.forms-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.forms-table td.cell-stat {
  color: #8f95b2;
  font-weight: bold;
  width: 75px;
}

.forms-table td.cell-name {
  text-align: left;
  font-weight: 600;
  padding-left: 14px;
}

.forms-table td.cell-rank {
  width: 44px;
  color: #434863;
  font-weight: bold;
  transition: all 0.25s;
}

.forms-table td.cell-rank.active {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.forms-table td.cell-lvl {
  width: 45px;
  font-weight: bold;
  color: #facc15;
  font-size: 15px;
}

.forms-table td.cell-act {
  width: 155px;
  text-align: center;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.slot-card {
  background: rgba(16, 18, 28, 0.88);
  border: 2px dashed #2f344e;
  border-radius: 10px;
  padding: 16px;
  min-height: 175px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.slot-card:hover {
  transform: translateY(-2px);
}

.slot-card.approved {
  border-style: solid;
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(180deg, rgba(14, 34, 22, 0.82) 0%, rgba(10, 24, 16, 0.92) 100%);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.12);
}

.slot-card.pending {
  border-style: solid;
  border-color: rgba(234, 179, 8, 0.5);
  background: linear-gradient(180deg, rgba(36, 33, 17, 0.82) 0%, rgba(22, 20, 10, 0.92) 100%);
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.12);
  animation: pendingGlow 2.5s infinite alternate ease-in-out;
}

@keyframes pendingGlow {
  0% { border-color: rgba(234, 179, 8, 0.35); }
  100% { border-color: rgba(234, 179, 8, 0.75); }
}
/* v6.8 — character visuals and read-only gallery */
.character-visuals{margin:18px 0 4px;padding:16px 0;border-bottom:1px solid rgba(255,255,255,.06)}
.character-visual-heading{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:10px;text-transform:uppercase;letter-spacing:.12em;color:#cbd1e7;font-size:12px}.character-visual-heading small{color:#6f7695;font-size:10px}
.character-visual-grid{display:grid;grid-template-columns:minmax(180px,280px) minmax(260px,1fr);gap:14px}.character-visual-card{background:rgba(13,15,25,.72);border:1px solid #2c3149;border-radius:10px;padding:10px}.character-visual-label{font-size:10px;letter-spacing:.18em;color:#8f95b2;margin-bottom:8px}.character-visual-frame{height:210px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#090b13;border:1px dashed #303650;border-radius:7px}.character-visual-card.signature .character-visual-frame{height:140px}.character-visual-frame img{width:100%;height:100%;object-fit:contain}.character-visual-empty{font-size:30px;color:#4b526f;letter-spacing:.12em}.character-image-upload{margin-top:9px;width:100%;background:#1b2032;color:#d9deee;border:1px solid #343b57}
.gallery-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:22px}.gallery-head h2{margin:5px 0;font-size:26px}.gallery-head p{margin:0;color:#858ca9}.gallery-count{font-size:28px;color:#e0b84b;border:1px solid rgba(224,184,75,.35);padding:8px 14px;border-radius:8px}
.character-gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}.gallery-character-card{padding:0;text-align:left;overflow:hidden;background:linear-gradient(180deg,#111522,#0c0f19);border:1px solid #2a3045;border-radius:11px;color:#eef1fb;transition:.2s}.gallery-character-card:hover{transform:translateY(-2px);border-color:#b99435;box-shadow:0 8px 25px rgba(0,0,0,.25)}.gallery-avatar{height:230px;background:#080a11;display:flex;align-items:center;justify-content:center;border-bottom:1px solid #252b3e}.gallery-avatar img{width:100%;height:100%;object-fit:cover}.gallery-avatar span{font-size:44px;color:#3c435f}.gallery-card-body{padding:15px}.gallery-card-body small{color:#747c9a;text-transform:uppercase;letter-spacing:.12em}.gallery-card-body h3{margin:5px 0 12px;font-size:19px}.gallery-meta{display:flex;gap:7px;flex-wrap:wrap}.gallery-meta span{font-size:11px;color:#aab0c7;background:#171c2c;padding:4px 7px;border-radius:4px}.gallery-open{margin-top:15px;font-size:10px;letter-spacing:.13em;color:#d4ad45}
.gallery-profile-top{display:flex;justify-content:space-between;margin-bottom:14px}.readonly-badge{font-size:10px;letter-spacing:.15em;color:#8f95b2;border:1px solid #353b54;border-radius:5px;padding:7px 10px}.gallery-profile-title{display:flex;gap:18px;align-items:center;margin-bottom:20px}.gallery-profile-avatar{width:100px;height:125px;background:#090b13;border:1px solid #303650;border-radius:8px;overflow:hidden;display:flex;align-items:center;justify-content:center}.gallery-profile-avatar img{width:100%;height:100%;object-fit:cover}.gallery-profile-avatar span{font-size:30px;color:#4b526f}.gallery-profile-title h2{margin:4px 0;font-size:27px}.gallery-profile-title p{margin:0;color:#8f95b2}.gallery-section-title{margin:20px 0 10px;color:#d8b44f;text-transform:uppercase;letter-spacing:.09em;font-size:12px}.gallery-two-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px}.gallery-list,.gallery-skills{background:#0d101a;border:1px solid #292f44;border-radius:8px;padding:8px}.gallery-list>div,.gallery-skills>div{display:flex;justify-content:space-between;gap:10px;padding:8px;border-bottom:1px solid #202538}.gallery-list>div:last-child,.gallery-skills>div:last-child{border-bottom:0}.gallery-list p,.gallery-skills p{color:#747c98;padding:6px;margin:0}.gallery-skills{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:0 12px}
@media(max-width:800px){.character-visual-grid,.gallery-two-cols{grid-template-columns:1fr}.character-visual-card.signature .character-visual-frame{height:120px}}

/* v6.9 — compact adaptive character visuals */
.character-visual-grid{
  display:flex;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
}
.character-visual-card{
  flex:0 0 auto;
  width:auto;
  max-width:100%;
  padding:10px;
}
.character-visual-card:not(.signature){
  max-width:320px;
}
.character-visual-card.signature{
  max-width:min(520px,100%);
}
.character-visual-frame{
  width:max-content;
  height:auto;
  min-width:0;
  min-height:0;
  max-width:100%;
  overflow:hidden;
}
.character-visual-frame img{
  display:block;
  width:auto;
  height:auto;
  max-width:290px;
  max-height:300px;
  object-fit:contain;
}
.character-visual-card.signature .character-visual-frame{
  width:max-content;
  height:auto;
  min-width:0;
  min-height:0;
  max-width:100%;
}
.character-visual-card.signature .character-visual-frame img{
  width:auto;
  height:auto;
  max-width:min(480px,calc(100vw - 90px));
  max-height:105px;
  object-fit:contain;
}
.character-visual-frame:has(.character-visual-empty){
  width:220px;
  height:180px;
  align-items:center;
  justify-content:center;
}
.character-visual-card.signature .character-visual-frame:has(.character-visual-empty){
  width:min(420px,calc(100vw - 90px));
  height:90px;
}
.character-image-upload{width:100%;min-width:140px}
@media(max-width:800px){
  .character-visual-grid{display:flex;flex-direction:column;align-items:flex-start}
  .character-visual-card,.character-visual-card.signature{max-width:100%}
  .character-visual-frame img{max-width:min(290px,calc(100vw - 80px));max-height:280px}
  .character-visual-card.signature .character-visual-frame img{max-width:calc(100vw - 80px);max-height:90px}
}

/* 0.7.9.3 — character gallery search */
.gallery-head-compact{align-items:flex-end;gap:22px}.gallery-head-copy{flex:1;min-width:0}.gallery-search{display:block;max-width:520px;margin-top:16px}.gallery-search>span{display:block;margin-bottom:7px;color:#747c9a;font-size:9px;font-weight:700;letter-spacing:.16em}.gallery-search-box{height:42px;display:flex;align-items:center;gap:9px;padding:0 12px;background:#0d111d;border:1px solid #2b3248;border-radius:8px;transition:border-color .16s,box-shadow .16s}.gallery-search-box:focus-within{border-color:#5f63ff;box-shadow:0 0 0 2px rgba(95,99,255,.12)}.gallery-search-icon{color:#8b93b2;font-size:18px;line-height:1}.gallery-search-box input{width:100%;height:100%;padding:0;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;color:#eef1fb;font:inherit}.gallery-search-box input::placeholder{color:#666e8b}.gallery-search-empty{padding:38px 18px;text-align:center;color:#858ca9;border:1px dashed #2a3045;border-radius:10px;background:rgba(12,15,25,.45)}

/* 0.8.3 — GM administration workspace */
.admin-section{display:block}
.admin-page-heading{margin:0 0 20px;padding:0 0 16px;border-bottom:1px solid #282d42}
.admin-page-heading .eyebrow{color:#747c9a;font-size:10px;font-weight:800;letter-spacing:.16em}
.admin-page-heading h2{margin:6px 0 5px;color:#eef1fb;font-size:24px;font-weight:700}
.admin-page-heading p{margin:0;color:#858ca9;font-size:13px}
#admin-players-root .roles-editor{margin-top:22px}
#admin-characters-root #gm-chars{display:grid;gap:12px}
#admin-skills-root .gm-skills-editor{margin-top:8px}
#admin-requests-root .section-heading+div{margin-bottom:24px}
.sidebar-item .admin-request-badge{margin-left:auto}
