#laiGame .lai-custom-sets { margin: 24px 0 34px; }
#laiGame .lai-custom-promo,
#laiGame .lai-custom-library {
  padding: 22px;
  border: 1px solid rgba(167, 139, 250, .32);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(139, 92, 246, .13), rgba(56, 189, 248, .06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}
#laiGame .lai-custom-promo h3,
#laiGame .lai-custom-library h3 { margin: 0 0 8px; color: #fff; font-size: 1.35rem; }
#laiGame .lai-custom-kicker { display: block; margin-bottom: 5px; color: #7dd3fc; font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
#laiGame .lai-custom-promo p,
#laiGame .lai-custom-library p { margin: 0; color: var(--lai-subtle); line-height: 1.55; }
#laiGame .lai-custom-library-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#laiGame .lai-custom-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
#laiGame .lai-custom-card { padding: 18px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; background: rgba(7, 13, 34, .72); }
#laiGame .lai-custom-card h4 { margin: 0 0 6px; color: #fff; font-size: 1.08rem; overflow-wrap: anywhere; }
#laiGame .lai-custom-card-meta { color: var(--lai-subtle); font-size: .84rem; }
#laiGame .lai-custom-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
#laiGame .lai-custom-card-actions button { min-height: 38px; padding: 0 13px; border: 1px solid rgba(125, 211, 252, .3); border-radius: 11px; color: #e0f2fe; background: rgba(56, 189, 248, .1); font: inherit; font-weight: 800; cursor: pointer; }
#laiGame .lai-custom-card-actions .is-danger { border-color: rgba(251, 113, 133, .3); color: #fecdd3; background: rgba(251, 113, 133, .08); }
#laiGame .lai-custom-empty { margin-top: 18px !important; padding: 16px; border: 1px dashed rgba(255, 255, 255, .18); border-radius: 16px; }

.lai-custom-modal[hidden] { display: none !important; }
.lai-custom-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 18px; background: rgba(2, 6, 23, .82); backdrop-filter: blur(10px); }
.lai-custom-dialog { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(880px, 100%); max-height: min(92vh, 980px); overflow: hidden; border: 1px solid rgba(125, 211, 252, .32); border-radius: 25px; color: #e5eefc; background: #0a1028; box-shadow: 0 30px 100px rgba(0, 0, 0, .55); }
.lai-custom-dialog-head,
.lai-custom-dialog-foot { padding: 18px 22px; background: rgba(10, 16, 40, .97); }
.lai-custom-dialog-head { display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.lai-custom-dialog-head h2 { margin: 4px 0 0; color: #fff; font-size: clamp(1.45rem, 3vw, 2rem); }
.lai-custom-dialog-head p { margin: 0; color: #7dd3fc; font-size: .76rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.lai-custom-dialog-close { align-self: start; width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .06); font-size: 1.5rem; cursor: pointer; }
.lai-custom-dialog-body { overflow: auto; padding: 22px; scroll-behavior: smooth; }
.lai-custom-dialog-foot { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.lai-custom-form label { display: grid; gap: 7px; margin-bottom: 16px; color: #dbeafe; font-weight: 800; }
.lai-custom-form input[type="text"],
.lai-custom-form textarea { width: 100%; box-sizing: border-box; padding: 12px 13px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; color: #fff; background: rgba(255, 255, 255, .055); font: inherit; }
.lai-custom-form textarea { min-height: 76px; resize: vertical; }
.lai-custom-question { margin: 18px 0; padding: 18px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 18px; background: rgba(255, 255, 255, .035); }
.lai-custom-question-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.lai-custom-question-head strong { color: #fff; }
.lai-custom-remove { border: 0; color: #fecdd3; background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.lai-custom-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; margin-bottom: 9px; }
.lai-custom-choice input[type="radio"] { width: 20px; height: 20px; accent-color: #38bdf8; }
.lai-custom-choice input[type="text"] { margin: 0; }
.lai-custom-error { min-height: 1.4em; margin: 0; color: #fda4af; font-weight: 800; }
.lai-custom-scroll-tools { position: absolute; right: 12px; top: 50%; z-index: 2; display: grid; gap: 8px; translate: 0 -50%; }
.lai-custom-scroll-tools button { width: 40px; height: 40px; border: 1px solid rgba(125, 211, 252, .35); border-radius: 50%; color: #e0f2fe; background: rgba(8, 14, 36, .9); cursor: pointer; }
body.lai-custom-modal-open { overflow: hidden; }
body.abz-student-logged-in #laiCustomSetsSection { display: none !important; }

@media (max-width: 700px) {
  #laiGame .lai-custom-grid { grid-template-columns: 1fr; }
  #laiGame .lai-custom-library-head { align-items: flex-start; flex-direction: column; }
  .lai-custom-dialog { max-height: 96vh; }
  .lai-custom-dialog-head, .lai-custom-dialog-body, .lai-custom-dialog-foot { padding: 16px; }
  .lai-custom-dialog-foot { flex-wrap: wrap; }
}
