/* =====================================================================
   LEVEL PICKER (graphic drop-down) - pairs with assets/js/level-stars.js
   Five rounded segments + the level name. Colours follow --primary.
   ===================================================================== */
.lvl-dd { position: relative; flex: 0 0 auto; }
.lvl-segs { display: inline-flex; gap: 3px; align-items: center; flex: 0 0 auto; }
.lvl-segs i { display: block; width: 14px; height: 7px; border-radius: 4px; background: #d6d9e3; transition: background .15s; }
.lvl-segs i.on { background: var(--primary, #5b4fe0); }

.lvl-btn {
  display: flex; align-items: center; gap: .55rem; min-width: 168px; height: 38px; padding: 0 .6rem;
  background: #f4f4f6; border: 1px solid transparent; border-radius: 8px; cursor: pointer; text-align: left;
  font-size: .82rem; font-weight: 600; color: #2b2940; transition: border-color .15s, background .15s;
}
.lvl-btn:hover { background: #eceefa; }
.lvl-btn:focus-visible, .lvl-dd.open .lvl-btn { border-color: #4a7bd8; background: #eaf2ff; outline: none; }
.lvl-cur { flex: 1; white-space: nowrap; }
.lvl-cur.empty { color: #8a8a99; font-weight: 500; }
.lvl-caret { font-size: .7rem; color: #6b6a7c; transition: transform .15s; }
.lvl-dd.open .lvl-caret { transform: rotate(180deg); }

.lvl-menu {
  position: fixed; z-index: 2000; padding: .35rem; background: #fff; border: 1px solid #e3e1ee; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 18, 50, .18);
}
.lvl-menu[hidden] { display: none; }
.lvl-opt {
  display: flex; align-items: center; gap: .7rem; width: 100%; padding: .5rem .6rem; border: 0; background: none;
  border-radius: 8px; cursor: pointer; text-align: left; font-size: .85rem; color: #2b2940;
}
.lvl-opt:hover { background: #f1f0fb; }
.lvl-opt.sel { background: var(--primary-light, #efedfc); font-weight: 700; }
.lvl-name { flex: 1; white-space: nowrap; }
.lvl-tick { visibility: hidden; color: var(--primary, #5b4fe0); }
.lvl-opt.sel .lvl-tick { visibility: visible; }
.lvl-opt:first-child .lvl-segs i { background: #e9eaf0; }

@media (max-width: 575px) { .lvl-btn { min-width: 140px; } }
