:root{
  --bg: #070b14;
  --bg2: #0d1322;
  --bg3: #141b2d;

  --panel: rgba(10, 15, 28, 0.90);
  --panel-strong: rgba(8, 12, 24, 0.96);
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.07);

  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.18);

  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;

  --accent: #d61f5f;
  --accent-2: #ff4d88;
  --accent-3: #ff8fb5;
  --accent-soft: rgba(255,77,136,0.12);

  --shadow: 0 28px 80px rgba(0,0,0,0.45);
  --shadow-soft: 0 20px 42px rgba(0,0,0,0.28);
  --shadow-red: 0 18px 34px rgba(214,31,95,0.28);

  --radius: 22px;
  --radius-card: 28px;
}

*{ box-sizing:border-box; }

html, body{
  min-height:100%;
}

body{
  font-family: Inter, Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255,77,136,0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(99,102,241,0.12), transparent 26%),
    linear-gradient(180deg, var(--bg), var(--bg2) 45%, var(--bg3));
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events:none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 18%),
    linear-gradient(0deg, rgba(255,255,255,0.02), transparent 24%);
}

.shell{
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 22px 48px;
}

h1{
  font-size: clamp(30px, 4vw, 48px);
  margin: 0 0 24px;
  text-align: center;
  font-weight: 800;
  letter-spacing: .02em;
  text-shadow: 0 10px 28px rgba(0,0,0,0.34);
}

/* ===== Generic panels / windows ===== */

.panel,
.deck{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
    var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.panel::before,
.deck::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 26%);
}

#loginView{
  max-width: 760px;
  margin: 0 auto;
  min-height: 64vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px 32px;
  background:
    radial-gradient(circle at top center, rgba(255,77,136,0.12), transparent 34%),
    linear-gradient(180deg, rgba(10,15,28,0.96), rgba(10,15,28,0.88));
  box-shadow: var(--shadow);
}

#loginView .badge{
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#loginView .signinFields{
  gap: 18px;
}

#loginView label{
  width: min(100%, 520px);
  text-align: left;
}

#loginView .note{
  max-width: 520px;
}

#loginView .btn.primary{
  min-width: 190px;
}

#loginView .authActionRow,
#createUserView .authActionRow{
  justify-content:center;
}

#createUserView{
  max-width: 860px;
  margin: 0 auto;
}

.createUserDoc{
  max-width: 760px;
  margin: 0 auto;
}

.createUserGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.createUserGrid label,
.accessField{
  display:block;
  width:100%;
  text-align:left;
}

.createUserGrid input,
.createUserGrid select,
.accessField input{
  width:100%;
}

.pwWrap{
  display:flex;
  align-items:center;
  position:relative;
  margin-top:6px;
}
.pwWrap input{
  margin-top:0;
  flex:1;
  padding-right:60px;
}
.pwToggle{
  position:absolute;
  right:14px;
  background:none;
  border:none;
  color:var(--muted-2);
  font-size:13px;
  cursor:pointer;
  padding:4px 6px;
  border-radius:8px;
  line-height:1;
  flex-shrink:0;
}
.pwToggle:hover{
  color:var(--text);
}

.accessModal{
  width:min(100%, 460px);
}

.accessModal .complimentSubtext{
  max-width: 320px;
}

/* ===== Layout ===== */

.row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  justify-content:center;
}

.row.left{
  justify-content:flex-start;
}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* ===== Product-style cards ===== */

.tile{
  position: relative;
  overflow: hidden;
  min-height: 188px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-card);
  padding: 24px 20px 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)),
    rgba(11, 16, 29, 0.92);
  box-shadow: var(--shadow-soft);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  text-align:left;
  isolation:isolate;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.tile::before{
  content:"";
  position:absolute;
  right:-18px;
  bottom:-24px;
  width: 110px;
  height: 110px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,143,181,0.16), rgba(255,77,136,0.10));
  z-index:0;
}

.tile::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.20), transparent);
  z-index:0;
}

.tile > *{
  position:relative;
  z-index:1;
}

.tile:hover{
  transform: translateY(-2px);
  border-color: rgba(255,143,181,0.26);
  box-shadow: 0 26px 48px rgba(0,0,0,0.32), 0 0 0 1px rgba(255,77,136,0.05) inset;
}

.tile h2{
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 800;
  max-width: 88%;
}

.tile p{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  max-width: 85%;
}

.tile .btn{
  margin-top: auto;
}

/* ===== Inputs / controls ===== */

label{
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

select,
input[type="text"],
input[type="password"],
input[type="date"]{
  width: 100%;
  min-width: 240px;
  margin-top: 6px;
  padding: 14px 14px;
  font-size: 16px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

input[type="text"],
input[type="password"],
input[type="date"]{
  min-width: 280px;
}

select{
  appearance: auto;
  -webkit-appearance: menulist;
  background-color: rgba(24, 31, 48, 0.96);
}

select option,
select optgroup{
  color: #f8fafc;
  background: #101827;
}

select option:checked{
  background: #1d4ed8;
  color: #ffffff;
}


input[type="date"]{
  min-width: 200px;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background-color: rgba(24, 31, 48, 0.96);
}

input[type="date"]::-webkit-calendar-picker-indicator{
  filter: invert(1) brightness(1.25) opacity(0.9);
  cursor: pointer;
}

input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field{
  color: var(--text);
}

select:hover,
input[type="text"]:hover,
input[type="password"]:hover,
input[type="date"]:hover{
  border-color: rgba(255,77,136,0.36);
}

.chk input[type="checkbox"]{
  accent-color: var(--accent-2);
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

#wfFamilyList,
#skillList,
#teacherReportOut,
#studentAssigned{
  position: relative;
  z-index: 1;
}

select:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus{
  border-color: rgba(255,77,136,0.72);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 4px rgba(255,77,136,0.14);
}

/* ===== Buttons ===== */

.btn{
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--text);
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  user-select: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn.primary{
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: var(--shadow-red);
}

.btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
}

.btn.primary:hover{
  filter: brightness(1.04);
}

.btn.primary:active{
  transform: translateY(0);
}

/* ===== Assessment ===== */

.deck{
  margin-top: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
    var(--panel-strong);
}

.deckTop{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 9px 14px;
  border-radius:999px;
  border:1px solid rgba(255,143,181,0.22);
  background: var(--accent-soft);
  color:#ffe4ee;
  font-size:13px;
  font-weight:800;
}

.bigWord{
  font-size: clamp(56px, 10vw, 104px);
  font-weight: 900;
  text-align: center;
  margin: 30px 0 18px;
  letter-spacing: 1px;
  word-break: break-word;
  text-shadow: 0 14px 34px rgba(0,0,0,0.30);
}

.status{
  margin-top: 14px;
  min-height: 18px;
  font-size: 14px;
  color: var(--muted);
  text-align:center;
}

.note{
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted-2);
  text-align:center;
  line-height:1.55;
}

/* ===== Helpers ===== */

.hidden{ display:none !important; }

.modeRow{
  margin-top:16px;
}

.chkGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 10px;
  margin-top: 10px;
}

.chk{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-start;
  padding: 10px 12px;
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.topbar{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.topbar.authTopbar{
  justify-content:center;
  position:relative;
}

.topbar.authTopbar #logoutBtn{
  position:absolute;
  right:0;
}

.row.signinFields{
  flex-direction:column;
  align-items:center;
}

/* ===== Report styling ===== */

#wfFamilyList .chk,
#skillList .chk,
#teacherReportOut .card,
#teacherReportOut .item,
#teacherReportOut table{
  color: var(--text);
}

#teacherReportOut .card,
#teacherReportOut .item{
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

#teacherReportOut table{
  width:100%;
  border-collapse:collapse;
  background: rgba(255,255,255,0.03);
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
}

#teacherReportOut th,
#teacherReportOut td{
  padding: 11px 12px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  text-align:left;
}

#teacherReportOut th{
  color:#ffe4ee;
  background: rgba(214,31,95,0.16);
  font-weight: 800;
}

#teacherReportOut tr:last-child td{
  border-bottom:none;
}

/* ===== Mobile ===== */

@media (max-width: 760px){
  .shell{
    padding: 18px 14px 30px;
  }

  #loginView{
    min-height:auto;
    padding: 24px 18px;
  }

  .panel,
  .deck{
    padding: 16px;
  }

  .tile{
    min-height: 170px;
    padding: 20px 16px 18px;
  }

  .row.left{
    justify-content:center;
  }

  select,
  input[type="text"],
  input[type="password"],
  input[type="date"]{
    min-width:100%;
  }

  .btn{
    width:100%;
  }

  .topbar,
  .deckTop{
    align-items:stretch;
  }
}

/* ===== Login info buttons ===== */
.infoButtonsRow{
  width: min(100%, 620px);
  justify-content: center;
  gap: 10px;
}

.infoBtn{
  min-width: 160px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

/* ===== Content pages ===== */
.contentOuterPanel{
  max-width: 1040px;
  margin: 0 auto;
  background:
    radial-gradient(circle at top center, rgba(255,77,136,0.10), transparent 30%),
    linear-gradient(180deg, rgba(10,15,28,0.92), rgba(10,15,28,0.84));
  box-shadow: var(--shadow);
}

.contentTopbar{
  justify-content: center;
  position: relative;
}

.contentTopbarBack{
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
}

.contentDoc{
  max-width: 860px;
  margin: 18px auto 6px;
  padding: 30px 34px 34px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    rgba(13, 18, 33, 0.96);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 26px 50px rgba(0,0,0,0.28);
}

.contentActions{
  justify-content: flex-start;
  margin-bottom: 8px;
}

.contentTitle{
  margin: 6px 0 20px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 800;
  color: var(--text);
}

.contentBody{
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contentParagraph{
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

/* ===== Teacher skill hover preview ===== */
#skillList ul{
  list-style: none;
  padding-left: 0;
}

#skillList li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
}

.skillPreviewWrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.skillPreviewLabel{
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--text);
}

.skillPreviewLabel.hasPreview{
  cursor: help;
  text-decoration: underline dotted rgba(255,143,181,0.45);
  text-underline-offset: 4px;
}

.skillPreviewCard{
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  min-width: 260px;
  max-width: 340px;
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  padding: 14px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(24, 31, 48, 0.97);
  color: var(--text);
  box-shadow: 0 18px 36px rgba(0,0,0,0.36);
  z-index: 40;
}

.skillPreviewCard::before{
  content: "";
  position: absolute;
  top: -7px;
  left: 18px;
  width: 12px;
  height: 12px;
  background: rgba(24, 31, 48, 0.97);
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  transform: rotate(45deg);
}

.skillPreviewTitle{
  grid-column: 1 / -1;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: #ffe4ee;
  margin-bottom: 6px;
  font-weight: 800;
}


@media (max-width: 760px){
  .infoBtn{
    min-width: 100%;
  }

  .contentDoc{
    padding: 22px 18px 24px;
  }

  .contentParagraph{
    font-size: 15px;
    line-height: 1.7;
  }

  #skillList li{
    align-items: flex-start;
    flex-direction: column;
  }

  .skillPreviewCard{
    position: static;
    margin-top: 10px;
    display: grid;
    max-width: 100%;
  }

  .skillPreviewCard::before{
    display: none;
  }
}


/* ===== Available item hover preview ===== */
.availablePreviewWrap{
  position: relative;
  align-items: flex-start;
}

.availablePreviewText{
  display: inline-flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.compactAvailableItem{
  min-height: 56px;
  padding: 8px 12px;
  border-radius: 14px;
}

.compactAvailableText{
  justify-content: center;
  min-height: 0;
}

.compactAvailableText b{
  display: block;
  font-size: 17px;
  line-height: 1.08;
}

.availablePreviewText.compactAvailableText{
  gap: 0;
}

.availablePreviewWrap .hasPreview{
  cursor: help;
  text-decoration: underline dotted rgba(255,143,181,0.45);
  text-underline-offset: 4px;
}


.availablePreviewWrap .skillPreviewCard{
  left: 42px;
  top: calc(100% + 8px);
}

.availablePreviewWrap.previewUp .skillPreviewCard{
  top: auto;
  bottom: calc(100% + 8px);
}

.availablePreviewWrap.previewUp .skillPreviewCard::before{
  top: auto;
  bottom: -7px;
  left: 18px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}


/* Keep word previews visible in teacher assignment picker */
#teacherAssignView,
#teacherAssignView .deck,
#wfAssignBlock,
#wfFamilyList,
#wfFamilyList .chkGrid,
#wfFamilyList .chk{
  overflow: visible;
}

.availablePreviewWrap .skillPreviewCard{
  z-index: 80;
}

@media (hover: hover) and (pointer: fine){
  .availablePreviewWrap:hover .skillPreviewCard,
  .availablePreviewWrap:focus-within .skillPreviewCard{
    display: grid;
  }
}

@media (hover: none), (pointer: coarse){
  .availablePreviewWrap .hasPreview{
    cursor: default;
    text-decoration: none;
  }

  .availablePreviewWrap .skillPreviewCard{
    display: none !important;
  }
}

@media (max-width: 760px){
  .availablePreviewWrap .skillPreviewCard{
    position: static;
    margin-top: 10px;
    display: none !important;
    max-width: 100%;
  }

  .availablePreviewWrap .skillPreviewCard::before{
    display:none;
  }
}

.skillPreviewCard > span:not(.skillPreviewTitle){
  font-size: 13px;
  line-height: 1.35;
}

/* ===== Assessment mic states ===== */
.assessActionRow{
  margin-top: 18px;
}

#aSayBtn.arming,
#aSayBtn.listening{
  color: #fff7fb;
  background: linear-gradient(180deg, #ff6d7d, #d61f5f);
  border-color: rgba(255,143,181,0.80);
  box-shadow: 0 0 0 5px rgba(255,77,136,0.18), 0 22px 42px rgba(214,31,95,0.42);
  transform: translateY(-1px) scale(1.04);
}

#aSayBtn.arming{
  animation: micArming 0.9s ease-in-out infinite;
}

#aSayBtn.listening{
  animation: micLive 1.05s ease-in-out infinite;
}

#aSayBtn.arming::after,
#aSayBtn.listening::after{
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 2px solid rgba(255,143,181,0.46);
  animation: micPulse 1.15s ease-out infinite;
}

#aSayBtn,
#aForcedHearBtn,
#aResetMicBtn,
#aNextBtn,
#aForceSubmitBtn{
  position: relative;
}

#aResetMicBtn{
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
}

#aResetMicBtn.warn{
  border-color: rgba(255,143,181,0.5);
  background: rgba(255,77,136,0.10);
  color: #ffe4ee;
}

#assessStatus.listening{
  color: #ffe4ee;
  font-weight: 700;
}

#assessMicHint{
  min-height: 18px;
}

@keyframes micPulse{
  0% { opacity: .82; transform: scale(0.96); }
  65% { opacity: .08; transform: scale(1.18); }
  100% { opacity: 0; transform: scale(1.22); }
}

@keyframes micArming{
  0%, 100% { transform: translateY(0) scale(1.01); filter: brightness(1); }
  50% { transform: translateY(-1px) scale(1.05); filter: brightness(1.08); }
}

@keyframes micLive{
  0%, 100% { transform: translateY(0) scale(1.03); filter: brightness(1); }
  50% { transform: translateY(-1px) scale(1.07); filter: brightness(1.12); }
}


/* ===== Assessment layout refresh ===== */
.assessLayout{
  margin-top: 10px;
}

.assessMainRow{
  display:grid;
  grid-template-columns: minmax(110px, 150px) minmax(250px, 420px) minmax(110px, 150px);
  gap: 22px;
  align-items:center;
  justify-content:center;
}

.assessCenterStack{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 18px;
}

.assessBottomRow{
  display:flex;
  gap: 18px;
  flex-wrap:wrap;
  justify-content:center;
}

#aSayBtn{
  width: min(100%, 220px);
  min-height: 78px;
  border-radius: 30px;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800;
  padding: 16px 18px;
}

#aForcedHearBtn{
  width: min(100%, 260px);
}

.assessArrowBtn{
  min-width: 110px;
  min-height: 78px;
  border-radius: 0;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 800;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-strong);
  clip-path: polygon(28% 0%, 100% 0%, 100% 100%, 28% 100%, 0% 50%);
}

#aBackNavBtn{
  justify-self:end;
  clip-path: polygon(0% 0%, 72% 0%, 72% 28%, 100% 28%, 100% 72%, 72% 72%, 72% 100%, 0% 100%, 28% 50%);
}

#aNextBtn{
  justify-self:start;
  clip-path: polygon(0% 28%, 28% 28%, 28% 0%, 100% 50%, 28% 100%, 28% 72%, 0% 72%);
}

#aResetMicBtn,
#aForceSubmitBtn{
  min-width: 140px;
}

@media (max-width: 900px){
  .assessMainRow{
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #aBackNavBtn,
  #aNextBtn{
    justify-self:center;
  }

  #aBackNavBtn{ order: 1; }
  .assessCenterStack{ order: 2; }
  #aNextBtn{ order: 3; }
}

@media (max-width: 520px){
  #aSayBtn{
    width: 100%;
    min-height: 82px;
  }

  .assessBottomRow{
    width: 100%;
    gap: 12px;
  }

  #aResetMicBtn,
  #aForceSubmitBtn,
  #aForcedHearBtn{
    width: 100%;
  }
}

/* ===== Compact teacher skill list ===== */
#skillList .compactSkillGrid{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:10px;
}

#skillList .compactSkillChip{
  display:flex;
  min-height:52px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;
  background: rgba(255,255,255,0.03);
}

#skillList .compactSkillTextWrap{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:4px;
}

#skillList .compactSkillText{
  display:block;
  font-size:12px;
  line-height:1.2;
  white-space:normal;
  word-break:break-word;
}

#skillList .compactSkillDetailRow{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  min-width:0;
}

#skillList .compactSkillAttemptsRow{
  justify-content:space-between;
}

#skillList .compactSkillMeta{
  display:block;
  min-width:0;
  font-size:10px;
  line-height:1.15;
  color: rgba(255,255,255,0.72);
  white-space:normal;
  word-break:break-word;
}

#skillList .compactSkillRemoveBtn{
  flex:0 0 auto;
  align-self:center;
  margin-left:8px;
  padding:5px 9px;
  font-size:13px;
}

/* ===== In-app compliment popup ===== */
.appOverlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background: rgba(5, 8, 16, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
}

.appModal{
  position:relative;
  width:min(100%, 520px);
  border:1px solid var(--line-strong);
  border-radius:28px;
  padding:24px 24px 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    rgba(13, 18, 33, 0.98);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.04) inset;
  text-align:center;
}

.complimentModal{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}

.complimentBadge{
  margin-bottom:2px;
}
.popupBackBtn{
  position:absolute;
  top:16px;
  left:16px;
  min-width:76px;
  padding:10px 14px;
  z-index:2;
}

.popupBackBtn.hidden{
  display:none;
}


.complimentHeadline{
  font-size: clamp(32px, 6vw, 48px);
  font-weight:900;
  line-height:1.05;
  color: var(--text);
  text-shadow: 0 12px 28px rgba(0,0,0,0.34);
}

.complimentSubtext{
  font-size:16px;
  color: var(--muted);
}

.complimentImageWrap{
  width:100%;
  margin-top:6px;
  padding:12px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:22px;
  background: rgba(255,255,255,0.03);
}

.complimentImage{
  display:block;
  width:100%;
  max-height:280px;
  object-fit:contain;
  border-radius:18px;
}

@media (max-width: 760px){
  #skillList .compactSkillGrid{
    grid-template-columns: 1fr 1fr;
  }

  #skillList .compactSkillChip{
    align-items:stretch;
  }

  #skillList .compactSkillRemoveBtn{
    width:auto;
  }

  .appModal{
    padding:20px 18px;
  }
}


.practiceModeRow{
  justify-content:center;
  gap:14px;
}

.practiceResetRow{
  justify-content:center;
  margin-top:10px;
}

#practiceStatus{
  text-align:center;
  min-height: 28px;
}

#practiceMicHint{
  margin-top:8px;
  text-align:center;
  color: var(--muted);
}

.practiceResultModal{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}

.practiceResultWord{
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 900;
  line-height: 1.04;
  color: var(--text);
  word-break: break-word;
  text-wrap: balance;
}

.practiceResultOutcome{
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 800;
  color: var(--muted);
}


.practiceDoneModal{
  gap:16px;
}

.practiceDoneActions{
  justify-content:center;
  gap:12px;
  margin-top:6px;
  flex-wrap:wrap;
}

.practiceDoneActions .btn{
  min-width:180px;
}


.contentSection{ margin:0 0 18px 0; }
.contentHeader{ margin-bottom:8px; }
.contentList{ margin:0 0 10px 20px; padding:0; }
.contentListItem{ margin:0 0 6px 0; }
.contentBottomLine{ margin-top:8px; }


.createUserResultHeadline{
  font-size: clamp(34px, 6vw, 52px);
}

.createUserResultText{
  font-size: 18px;
  max-width: 340px;
}


.howToSlideWrap{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.howToSlideMeta{
  color:var(--accent-3);
  font-size:13px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.howToSlideFrame{
  border:1px solid rgba(255,255,255,0.10);
  border-radius:24px;
  padding:14px;
  background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)), rgba(9, 14, 26, 0.92);
  box-shadow: var(--shadow-soft);
}

.howToSlideImage{
  display:block;
  width:100%;
  height:auto;
  max-height:520px;
  object-fit:contain;
  border-radius:18px;
  background:rgba(0,0,0,0.16);
}

.howToSlideTextCard{
  border:1px solid rgba(255,255,255,0.08);
  border-radius:22px;
  padding:18px 20px;
  background:rgba(255,255,255,0.03);
}

.howToSlideHeader{
  margin:0 0 8px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height:1.2;
  color:var(--text);
}

.howToSlideText{
  font-size:19px;
  line-height:1.7;
}

.howToSlideActions{
  margin-top:2px;
}

@media (max-width: 720px){
  .contentTopbar{
    justify-content:flex-start;
    padding-right:96px;
  }

  .contentTopbarBack{
    right:0;
  }

  .howToSlideText{
    font-size:17px;
  }
}


/* ===== How To Use viewport fit ===== */
.howToMode .contentDoc{
  max-width: 1120px;
  margin: 12px auto 4px;
  padding: 18px 22px 18px;
}

.howToMode .contentTitle{
  margin: 2px 0 10px;
  font-size: clamp(24px, 2.8vw, 34px);
}

.howToMode .contentBody{
  gap: 12px;
}

.howToMode .howToSlideWrap{
  gap: 12px;
}

.howToSlideMain{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.howToMode .howToSlideFrame{
  padding: 10px;
}

.howToMode .howToSlideImage{
  max-height: min(50vh, 420px);
}

.howToMode .howToSlideTextCard{
  padding: 14px 16px;
}

.howToMode .howToSlideHeader{
  margin: 0 0 6px;
  font-size: clamp(20px, 2.2vw, 28px);
}

.howToMode .howToSlideText{
  font-size: 16px;
  line-height: 1.55;
}

.howToMode .howToSlideActions{
  justify-content: space-between;
}

@media (min-width: 900px){
  .howToSlideMain{
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .howToMode .howToSlideImage{
    max-height: min(54vh, 460px);
  }
}

@media (max-height: 820px){
  .howToMode .contentDoc{
    padding: 14px 18px 14px;
  }

  .howToMode .contentTitle{
    margin-bottom: 8px;
    font-size: clamp(22px, 2.5vw, 30px);
  }

  .howToMode .howToSlideMeta{
    font-size: 12px;
  }

  .howToMode .howToSlideImage{
    max-height: min(44vh, 360px);
  }

  .howToMode .howToSlideText{
    font-size: 15px;
    line-height: 1.45;
  }

  .howToMode .btn{
    padding: 11px 16px;
  }
}

@media (max-width: 899px){
  .howToMode .howToSlideActions{
    justify-content: flex-start;
  }
}


.studentManageHeaderRow{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  flex-wrap:wrap;
}

.btn.danger{
  border-color: rgba(255,115,143,.34);
  background: linear-gradient(180deg, rgba(76,16,31,.72), rgba(46,12,22,.92));
  color: #ffd8e2;
}
.btn.danger:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(111,20,43,.28);
}

#wfLevelWrap.hidden,
#wfSearchWrap.hidden{
  display:none;
}


.assessmentFeedbackModal{
  gap:14px;
}

.assessmentFeedbackHeadline{
  font-size: clamp(34px, 6vw, 50px);
}

.assessmentFeedbackHeadline.hidden,
.complimentBadge.hidden,
.assessmentFeedbackText.hidden{
  display:none;
}

.assessmentFeedbackWord{
  font-size: clamp(42px, 8vw, 74px);
  line-height: 1.02;
}

.assessmentFeedbackText{
  max-width: 34ch;
}

.assessmentConfirmModal{
  gap:12px;
}

.assessmentConfirmHeadline{
  font-size: clamp(28px, 5vw, 42px);
}


.heardWrongWord{
  color: #ff6b86;
}
.heardWrongWordInline{
  color: #ff6b86;
}


/* ===== Spell It ===== */
.spellWordArea{
  margin-top: 24px;
}

.spellSlots{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  justify-content:center;
  align-items:flex-end;
  min-height: 96px;
}

.spellSlot{
  width: min(72px, 16vw);
  height: 84px;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.16);
  border-bottom-width: 5px;
  background: rgba(255,255,255,0.05);
  color: #fff7fb;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  display:flex;
  align-items:center;
  justify-content:center;
  text-transform: uppercase;
  box-shadow: inset 0 -8px 0 rgba(255,255,255,0.02);
}

.spellSlot.filled{
  background: rgba(255,255,255,0.09);
}

.spellSlot.locked{
  border-color: rgba(255,143,181,0.46);
  background: rgba(255,143,181,0.12);
}

.spellSlot.fixed{
  background: transparent;
  border: none;
  box-shadow: none;
  width: auto;
  min-width: 18px;
  color: rgba(255,228,238,0.86);
  padding: 0 2px 6px;
}

.spellSlot.revealed{
  animation: spellReveal .45s ease-out;
}

.spellLetterBank{
  margin-top: 22px;
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  justify-content:center;
}

.spellLetterBtn{
  min-width: 74px;
  min-height: 72px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 900;
  text-transform: uppercase;
}

.spellLetterBtn.used{
  visibility: hidden;
  pointer-events: none;
}

@keyframes spellReveal{
  0% { transform: translateY(18px) scale(.92); opacity: .2; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 520px){
  .spellSlot{
    width: min(58px, 15vw);
    height: 72px;
    border-radius: 16px;
  }

  .spellLetterBtn{
    min-width: 62px;
    min-height: 62px;
  }
}


.spellSlot.revealFixed{
  border-color: rgba(255, 214, 120, 0.68);
  background: rgba(255, 214, 120, 0.18);
}

.spellSlot.revealAnimated{
  animation: spellOrbitIn 2s ease-in-out both;
  will-change: transform, opacity;
}

.spellLetterBtn{
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.16);
  border-bottom-width: 5px;
  background: rgba(255,255,255,0.09);
  box-shadow: inset 0 -8px 0 rgba(255,255,255,0.02);
}

@keyframes spellOrbitIn{
  0% { transform: translate(var(--sx, 0px), var(--sy, 0px)) rotate(var(--rot, 0deg)) scale(.86); opacity: .3; }
  55% { transform: translate(var(--cx, 0px), var(--cy, 0px)) rotate(calc(var(--rot, 0deg) * .45)) scale(1.04); opacity: 1; }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
}

#spellNextBtn.hidden{
  display:none;
}

/* ===== Custom sets ===== */
.customSetWordGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:10px;
}

#customSetList.compactSkillGrid{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap:10px;
}

#customSetList .compactSkillChip{
  display:flex;
  min-height:52px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;
  background: rgba(255,255,255,0.03);
}

#customSetList .compactSkillTextWrap{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:4px;
}

#customSetList .compactSkillText{
  display:block;
  font-size:12px;
  line-height:1.2;
  white-space:normal;
  word-break:break-word;
}

#customSetList .compactSkillDetailRow{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  min-width:0;
}

#customSetList .compactSkillAttemptsRow{
  justify-content:space-between;
}

#customSetList .compactSkillMeta{
  display:block;
  min-width:0;
  font-size:10px;
  line-height:1.15;
  color: rgba(255,255,255,0.72);
  white-space:normal;
  word-break:break-word;
}

#customSetList .compactSkillRemoveBtn{
  flex:0 0 auto;
  align-self:center;
  margin-left:8px;
  padding:5px 9px;
  font-size:13px;
}


.customSetTileGrid{
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.customSetAssignTile{
  min-height: 116px;
  padding: 18px 18px 16px 18px;
  cursor: pointer;
}

.customSetAssignTile h2{
  max-width: 100%;
  margin: 24px 0 0;
  font-size: 17px;
}

.customSetAssignTile.selected{
  border-color: rgba(255,143,181,0.42);
  box-shadow: 0 0 0 1px rgba(255,77,136,0.10) inset, 0 24px 44px rgba(0,0,0,0.28);
}

.customSetAssignCheckbox{
  position: absolute;
  top: 16px;
  left: 16px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-2);
  z-index: 2;
}


/* Custom set hover preview in assignment picker */
#customSetAssignList,
#customSetAssignList.customSetTileGrid,
#customSetAssignList .customSetAssignTile{
  overflow: visible;
}

.customSetAssignTile.availablePreviewWrap{
  position: relative;
}

.customSetAssignTile h2.hasPreview{
  cursor: help;
  text-decoration: underline dotted rgba(255,143,181,0.45);
  text-underline-offset: 4px;
}

.customSetAssignTile .skillPreviewCard{
  left: 16px;
  top: calc(100% + 10px);
  z-index: 90;
}

.customSetAssignTile.previewUp .skillPreviewCard{
  top: auto;
  bottom: calc(100% + 10px);
}

.customSetAssignTile.previewUp .skillPreviewCard::before{
  top: auto;
  bottom: -7px;
  left: 18px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
