:root {
  --bg: #050713;
  --surface: rgba(12, 18, 34, 0.72);
  --surface-strong: rgba(15, 24, 45, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.08);
  --line: rgba(158, 241, 255, 0.14);
  --line-strong: rgba(158, 241, 255, 0.26);
  --text: #f7fbff;
  --text-muted: rgba(224, 240, 255, 0.74);
  --cyan: #18e9ff;
  --blue: #5b8dff;
  --pink: #ff6ad5;
  --green: #5df2a2;
  --yellow: #ffe36e;
  --danger: #ff5f7e;
  --radius: 8px;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.24);
  --glow-cyan: 0 0 14px rgba(24, 233, 255, 0.1);
  --glow-pink: 0 0 12px rgba(255, 106, 213, 0.09);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --glow-low: 0 0 10px rgba(24, 233, 255, 0.08);
  --glow-mid: 0 0 14px rgba(24, 233, 255, 0.1);
  --glow-high: 0 0 20px rgba(24, 233, 255, 0.14);
}

html[data-theme="light"] {
  --bg: #f5f8ff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-soft: rgba(20, 45, 82, 0.07);
  --line: rgba(58, 92, 140, 0.2);
  --line-strong: rgba(58, 92, 140, 0.34);
  --text: #102033;
  --text-muted: rgba(35, 58, 88, 0.72);
  --cyan: #006fd6;
  --blue: #245bd6;
  --pink: #b22385;
  --green: #087f52;
  --yellow: #8f6400;
  --danger: #b42342;
  --shadow: 0 18px 50px rgba(55, 81, 120, 0.18);
  --shadow-soft: 0 12px 30px rgba(55, 81, 120, 0.14);
  --glow-cyan: 0 0 0 rgba(0, 0, 0, 0);
  --glow-pink: 0 0 0 rgba(0, 0, 0, 0);
  --glow-low: 0 0 0 rgba(0, 0, 0, 0);
  --glow-mid: 0 0 0 rgba(0, 0, 0, 0);
  --glow-high: 0 0 0 rgba(0, 0, 0, 0);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 10px 18px 40px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(5, 7, 19, 0.96), rgba(5, 7, 19, 0.84) 44%, rgba(5, 7, 19, 0.98)),
    linear-gradient(115deg, rgba(24, 233, 255, 0.035), transparent 34%, rgba(255, 106, 213, 0.03) 70%, rgba(93, 242, 162, 0.025)),
    url("../images/quiz.jpg") center top / cover fixed no-repeat;
  font-family: "Segoe UI", Arial, sans-serif;
  text-align: center;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(110deg, transparent 0%, rgba(24, 233, 255, 0.045) 46%, rgba(255, 255, 255, 0.045) 50%, transparent 58%);
  background-size: 56px 56px, 56px 56px, 100% 100%;
  opacity: 0.16;
  animation: ambientSweep 18s ease-in-out infinite alternate;
}

@keyframes ambientSweep {
  from {
    transform: translate3d(-12px, -8px, 0);
  }

  to {
    transform: translate3d(12px, 8px, 0);
  }
}

.hidden,
#home.hidden,
#quizScreen.hidden,
#resultScreen.hidden,
#reviewScreen.hidden,
#mistakeScreen.hidden,
#challengeMenu.hidden,
.heroPanel.hidden {
  display: none !important;
}

#home,
#mistakeScreen,
#reviewScreen,
#quizScreen,
#resultScreen,
.heroPanel {
  width: min(1320px, calc(100vw - 44px));
  margin-left: auto;
  margin-right: auto;
}

.heroPanel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 176px;
  margin-top: 54px;
  margin-bottom: 18px;
  padding: 28px 34px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(24, 233, 255, 0.08), rgba(255, 106, 213, 0.06) 54%, rgba(93, 242, 162, 0.04)),
    rgba(8, 16, 36, 0.8);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: var(--shadow-soft), var(--glow-low);
}

.heroPanel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 38%);
  opacity: 0.42;
}

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

.heroPanel h1 {
  margin: 8px 0 6px;
  color: #ffffff;
  font-size: 3.75rem;
  line-height: 1;
  letter-spacing: 0;
  text-shadow:
    0 0 12px rgba(24, 233, 255, 0.5),
    0 0 28px rgba(255, 106, 213, 0.22),
    0 14px 34px rgba(0, 0, 0, 0.52);
}

.betaPill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 2px 0 10px;
  padding: 5px 11px;
  border: 1px solid rgba(93, 242, 162, 0.3);
  border-radius: 999px;
  background: rgba(93, 242, 162, 0.1);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.heroPanel p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
}

.heroEyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(158, 241, 255, 0.26);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(24, 233, 255, 0.13), rgba(255, 106, 213, 0.09));
  color: #f2feff;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: none;
}

.homeBtn,
.logoutBtn {
  position: fixed;
  top: 16px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 48px;
  width: auto;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 18, 35, 0.76);
  color: white;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft), var(--glow-cyan);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.btnIcon {
  display: inline-grid;
  place-items: center;
  width: 1.45em;
  height: 1.45em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 18px rgba(24, 233, 255, 0.22);
  line-height: 1;
  flex: 0 0 auto;
}

.homeBtn {
  left: 16px;
}

.logoutBtn {
  position: static;
  height: 44px;
  font-size: 0.86rem;
}

.authCluster {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profileTrigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  max-width: 190px;
  padding: 6px 12px 6px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 18, 35, 0.78);
  color: white;
  cursor: pointer;
  font-weight: 900;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft), var(--glow-low);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.profileTrigger:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft), var(--glow-mid);
}

button:active,
.utilityBtn:active,
.miniBtn:active,
.addBtn:active,
.answer:active,
.starterDeckPreviewCard:active {
  transform: translateY(1px) scale(0.99);
}

button,
.utilityBtn,
.miniBtn,
.addBtn,
.answer,
.starterDeckPreviewCard {
  touch-action: manipulation;
}

.profileAvatarSmall {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.9);
}

#profileNameSmall {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profileMenu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045)),
    rgba(8, 14, 29, 0.94);
  color: white;
  text-align: left;
  backdrop-filter: blur(18px) saturate(1.12);
  box-shadow: var(--shadow), var(--glow-mid);
}

.profileMenuHead {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
}

.profileMenuAvatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: white;
}

.profileMenuHead strong,
.profileMenuHead span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profileMenuHead span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.profileMenuItem {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid rgba(158, 241, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: white;
  cursor: pointer;
  text-align: left;
  font-weight: 850;
}

.profileMenuItem:hover {
  background: rgba(24, 233, 255, 0.12);
}

.profileMenuItem--danger {
  color: #ffd9df;
}

.profileEditorOverlay {
  position: fixed;
  inset: 0;
  z-index: 21000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 18, 0.76);
  backdrop-filter: blur(14px);
}

.profileEditorOverlay.hidden {
  display: none !important;
}

.profileEditorPanel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(860px, calc(100vh - 40px));
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045)),
    rgba(8, 14, 29, 0.96);
  color: white;
  text-align: left;
  box-shadow: var(--shadow), var(--glow-mid);
}

.profileEditorClose {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-weight: 900;
}

.profileEditorHeader {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  align-items: center;
  padding-right: 46px;
}

.profileEditorHeader h2 {
  margin: 10px 0 6px;
  color: #ffffff;
  font-size: 2.15rem;
  line-height: 1.05;
  text-shadow: 0 0 18px rgba(24, 233, 255, 0.35);
}

.profileEditorHeader p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.profileEditorAvatarWrap {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.profileEditorAvatar {
  width: 112px;
  height: 112px;
  border-radius: var(--radius);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 28px rgba(24, 233, 255, 0.32), 0 0 26px rgba(255, 106, 213, 0.22);
}

.profileForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.profileFormField {
  display: grid;
  gap: 8px;
}

.profileFormField--wide,
.profileFormActions {
  grid-column: 1 / -1;
}

.profileFormField span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profileFormField input,
.profileFormField select,
.profileFormField textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(158, 241, 255, 0.32);
  border-radius: var(--radius);
  outline: none;
  background: rgba(2, 8, 22, 0.52);
  color: #ffffff;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.profileFormField textarea {
  min-height: 92px;
  resize: vertical;
}

.profileFormField input:focus,
.profileFormField select:focus,
.profileFormField textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(24, 233, 255, 0.14), 0 0 26px rgba(24, 233, 255, 0.28);
}

.profileFormField input[readonly] {
  color: rgba(224, 240, 255, 0.74);
  cursor: not-allowed;
}

.profileFormActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.homeBtn:hover,
.logoutBtn:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft), 0 0 34px rgba(24, 233, 255, 0.32);
}

.utilityBar {
  position: sticky;
  top: 12px;
  z-index: 8500;
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: min(960px, 100%);
  margin: 0 auto 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 18, 35, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  transform: none;
}

.utilityBtn,
.miniBtn {
  min-width: 70px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(24, 233, 255, 0.22), rgba(255, 106, 213, 0.16));
  color: white;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.utilityBtn:hover,
.miniBtn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08) saturate(1.12);
  box-shadow: 0 0 24px rgba(24, 233, 255, 0.24);
}

.themeToggle {
  gap: 8px;
}

.themeToggle strong {
  color: inherit;
  font-size: 0.78rem;
}

.syncStatus {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.syncStatus--syncing {
  color: var(--cyan);
  border-color: rgba(24, 233, 255, 0.38);
}

.syncStatus--ok {
  color: var(--green);
  border-color: rgba(85, 255, 178, 0.34);
}

.syncStatus--warn,
.syncStatus--local {
  color: var(--yellow);
  border-color: rgba(255, 204, 102, 0.34);
}

.syncRetryBtn {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--cyan);
  font-size: 0.73rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.syncRetryBtn:hover {
  background: rgba(24, 233, 255, 0.08);
  border-color: var(--cyan);
}
.syncRetryBtn:active {
  opacity: 0.7;
}
.syncRetryBtn[hidden] {
  display: none;
}

.appSidebar {
  position: fixed;
  top: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 8600;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 224px;
  max-width: none;
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(7, 12, 26, 0.9);
  box-shadow: var(--shadow-soft);
}

.sidebarBrand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 14px;
  color: white;
  text-align: left;
}

.brandMark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(158, 241, 255, 0.26);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(24, 233, 255, 0.22), rgba(255, 106, 213, 0.16));
  color: #d8feff;
  font-size: 0.82rem;
  font-weight: 950;
}

.sidebarBrand strong,
.sidebarBrand small {
  display: block;
}

.sidebarBrand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.sidebarBrand small,
.sidebarLabel {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.sidebarGroup {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid rgba(158, 241, 255, 0.12);
}

.sidebarGroup--actions {
  margin-top: auto;
}

.appSidebar .utilityBtn,
.appSidebar .miniBtn {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.appSidebar .utilityBtn:hover,
.appSidebar .miniBtn:hover,
.appSidebar .appNavBtn.is-active {
  border-color: rgba(24, 233, 255, 0.28);
  background: linear-gradient(135deg, rgba(24, 233, 255, 0.1), rgba(255, 106, 213, 0.065));
  transform: translateY(-1px);
}

.appSidebar .appNavBtn.is-active {
  box-shadow: inset 3px 0 0 rgba(24, 233, 255, 0.48);
}

.appTopbar {
  position: fixed;
  top: 16px;
  right: 220px;
  left: 256px;
  z-index: 8400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 9px 14px;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: 14px;
  background: rgba(7, 12, 26, 0.76);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.appTopbarTitle {
  display: grid;
  gap: 2px;
  text-align: left;
}

.appTopbarTitle span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.appTopbarTitle strong {
  color: white;
  font-size: 1.12rem;
}

.appTopbarStatus {
  display: flex;
  justify-content: flex-end;
}

.appMain {
  width: min(1180px, calc(100vw - 292px));
  margin-left: max(248px, calc((100vw - 976px) / 2));
  padding-top: 68px;
}

.appMain #home,
.appMain .heroPanel,
.appMain #mistakeScreen,
.appMain #reviewScreen,
.appMain #quizScreen,
.appMain #resultScreen {
  width: min(1180px, 100%);
}

.homeBtn {
  display: none;
}

body:not([data-app-page]) #home [data-app-page-panel]:not([data-app-page-panel="dashboard"]),
body:not([data-app-page]) .heroPanel[data-app-page-panel]:not([data-app-page-panel="dashboard"]),
body[data-app-page] #home [data-app-page-panel]:not(.is-active-page),
body[data-app-page] .heroPanel[data-app-page-panel]:not(.is-active-page) {
  display: none !important;
}

#home {
  display: grid;
  gap: 18px;
}

.dashboardPanel,
.todayFocusPanel,
.startHerePanel,
.playerHub,
.learningStudioStrip,
.aiDeckWorkspace,
.studioWorkspace,
.sectionHeader,
.addWordBox,
.tableTools,
.quizOptions,
.practiceActions,
.wordCountLine {
  width: min(1180px, 100%);
  margin-left: auto;
  margin-right: auto;
}

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

.todayFocusPanel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(158, 241, 255, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(24, 233, 255, 0.095), rgba(93, 242, 162, 0.045) 58%, rgba(255, 106, 213, 0.025)),
    rgba(8, 14, 29, 0.94);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.todayFocusPanel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--green), var(--cyan));
}

.todayFocusPanel h2 {
  margin: 7px 0 6px;
  color: white;
  font-size: clamp(1.58rem, 2.5vw, 2.05rem);
  line-height: 1.05;
}

.todayFocusPanel p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 650;
}

.todayFocusActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 8px;
}

.appQuickAction {
  min-height: 40px;
  white-space: nowrap;
}

.todayFocusPanel .utilityBtn,
.todayFocusPanel .miniBtn {
  justify-content: center;
}

.startHerePanel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(93, 242, 162, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(93, 242, 162, 0.07), rgba(24, 233, 255, 0.035)),
    rgba(9, 14, 30, 0.9);
  box-shadow: var(--shadow-soft);
}

.startHerePanel[hidden] {
  display: none !important;
}

.startHereIntro h2 {
  margin: 5px 0 5px;
  color: #ffffff;
  font-size: 1.28rem;
  line-height: 1.15;
}

.startHereIntro p,
.startHereStep p,
.startHereNext,
.starterDeckPreviewCard span {
  margin: 0;
  color: var(--text-muted);
  font-weight: 650;
}

.startHereSteps,
.starterDeckPreviewGrid {
  display: grid;
  gap: 10px;
}

.startHereSteps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.startHereStep {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.34);
}

.startHereStep span {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: rgba(93, 242, 162, 0.16);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.startHereStep strong,
.starterDeckPreviewCard strong {
  color: #ffffff;
}

.starterDeckPreview {
  display: grid;
  gap: 8px;
}

.starterDeckPreviewGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.starterDeckPreviewCard {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.starterDeckPreviewCard:hover,
.starterDeckPreviewCard:focus-visible {
  border-color: rgba(93, 242, 162, 0.4);
  background: rgba(93, 242, 162, 0.09);
  outline: none;
}

.startHereNext {
  padding: 10px 12px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.28);
}

.startHereActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.startHereActions .utilityBtn,
.startHereActions .miniBtn {
  justify-content: center;
}

.dashCard,
.profilePanel,
.leaderboardPanel,
.addWordBox,
.tableTools,
.table-container,
.quizOptions,
.resultCard,
.reviewTools,
.reviewCard,
.previewPanel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    rgba(9, 14, 30, 0.92);
  color: var(--text);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    var(--shadow-soft);
}

.dashCard {
  --dash-accent: var(--cyan);
  position: relative;
  display: grid;
  min-height: 104px;
  padding: 15px;
  overflow: hidden;
  align-content: space-between;
  gap: 8px;
  text-align: left;
}

.dashCard::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--dash-accent);
  opacity: 0.82;
}

.dashLabel,
.formField span,
.searchBox,
.profileStats span,
.leaderboardTabs span,
.wordMeta {
  color: var(--text-muted);
}

.dashLabel,
.formField span,
.searchBox {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.dashCard strong {
  display: block;
  margin-top: 3px;
  color: #ffffff;
  font-size: clamp(1.65rem, 2.4vw, 2.05rem);
  line-height: 1.1;
  text-shadow: none;
}

.dashCaption {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.25;
}

.dashboardPanel .dashCard:first-child,
.dashboardPanel .dashCard:nth-child(4) {
  --dash-accent: var(--green);
  border-color: rgba(93, 242, 162, 0.22);
  background:
    linear-gradient(145deg, rgba(93, 242, 162, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(9, 14, 30, 0.94);
}

.dashboardPanel .dashCard:nth-child(2),
.dashboardPanel .dashCard:nth-child(3) {
  --dash-accent: var(--cyan);
  border-color: rgba(24, 233, 255, 0.2);
  background:
    linear-gradient(145deg, rgba(24, 233, 255, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(9, 14, 30, 0.94);
}

.dashboardPanel .dashCard:nth-child(5) {
  --dash-accent: var(--pink);
}

.weakWordsCenter {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 227, 110, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 227, 110, 0.06), rgba(24, 233, 255, 0.025)),
    rgba(9, 14, 30, 0.88);
  box-shadow: var(--shadow-soft);
}

.weakWordsCenterHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weakWordsCenterHead h2 {
  margin: 5px 0 3px;
  color: #ffffff;
  font-size: 1.24rem;
}

.weakWordsCenterHead p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 650;
}

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

.weakFixCard {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.42);
}

.weakFixMain {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.weakFixCard strong,
.weakFixCard span,
.weakFixCard small {
  display: block;
}

.weakFixCard strong {
  color: #ffffff;
  font-size: 1.04rem;
  line-height: 1.2;
}

.weakFixMeaning {
  overflow-wrap: anywhere;
  color: var(--text);
  line-height: 1.35;
}

.weakFixStats {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.playerHub {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 12px;
}

.profilePanel,
.leaderboardPanel {
  padding: 18px;
  text-align: left;
}

.profileTop {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 14px;
}

.profileAvatar {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 18px rgba(24, 233, 255, 0.24);
}

.profilePanel h2,
.leaderboardPanel h2,
.sectionHeader h2,
.quizBlock h2,
#mistakeScreen > h2,
#reviewScreen > h2 {
  margin: 8px 0 4px;
  color: #ffffff;
  font-size: 1.6rem;
  letter-spacing: 0;
  text-shadow: none;
}

.profilePanel p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.xpTrack {
  margin-top: 14px;
}

.xpTrackMeta,
.profileStats,
.leaderboardTabs,
.leaderboardList li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.xpTrackMeta {
  color: white;
  font-weight: 850;
}

.xpBar {
  height: 14px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(158, 241, 255, 0.22);
  border-radius: 999px;
  background: rgba(2, 8, 22, 0.64);
}

.xpBar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--pink));
  box-shadow: 0 0 18px rgba(24, 233, 255, 0.45);
  transition: width 260ms ease;
}

.profileStats,
.leaderboardTabs {
  margin-top: 16px;
  flex-wrap: wrap;
}

.profileStats span,
.leaderboardTabs span {
  padding: 8px 10px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  font-weight: 750;
}

.leaderboardPanel {
  opacity: 0.92;
}

.leaderboardHead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.leaderboardList {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.leaderboardList li {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(3, 10, 28, 0.42);
}

.leaderRank {
  color: var(--yellow);
  font-weight: 950;
}

.reviewTodayPanel {
  display: grid;
  width: min(1180px, 100%);
  gap: 12px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)),
    rgba(9, 14, 30, 0.9);
  color: var(--text);
  text-align: left;
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    var(--shadow-soft);
}

.reviewTodayHead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.reviewTodayHead h2 {
  margin: 8px 0 4px;
  color: white;
  font-size: 1.6rem;
}

.reviewTodayHead p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 750;
}

.reviewTodayBody {
  display: grid;
  gap: 10px;
}

.reviewTodayBody .emptyStudio {
  margin: 0;
  padding: 16px;
  border: 1px dashed rgba(158, 241, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.reviewSessionOverview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 1.5fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(158, 241, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.38);
}

.reviewSessionCopy,
.reviewSessionProgress {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.reviewSessionCopy strong {
  color: white;
  font-size: 1rem;
  font-weight: 950;
}

.reviewSessionCopy span,
.reviewSessionProgress span {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.reviewProgressTrack {
  overflow: hidden;
  width: 100%;
  height: 10px;
  border: 1px solid rgba(158, 241, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.reviewProgressFill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 0.22s ease;
}

.reviewSessionStats,
.reviewCompletionStats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reviewSessionStat {
  display: grid;
  min-width: 68px;
  padding: 8px 10px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

.reviewSessionStat strong {
  color: white;
  font-size: 1rem;
  font-weight: 950;
}

.reviewSessionStat small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.reviewStateCard {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px dashed rgba(158, 241, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.reviewStateCard--complete {
  border-style: solid;
  border-color: rgba(93, 242, 162, 0.28);
  background: rgba(93, 242, 162, 0.08);
}

.reviewStateCard h3 {
  margin: 0;
  color: white;
  font-size: 1.18rem;
}

.reviewStateCard p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 750;
}

.reviewStateActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reviewQueueItem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
  min-height: 64px;
  padding: 14px;
  border: 1px solid rgba(158, 241, 255, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(2, 8, 22, 0.44);
}

.reviewQueueItem.is-current {
  border-color: rgba(250, 214, 92, 0.28);
}

.reviewQueueItem.is-revealed {
  border-color: rgba(93, 242, 162, 0.26);
  background:
    linear-gradient(145deg, rgba(93, 242, 162, 0.075), rgba(24, 233, 255, 0.025)),
    rgba(2, 8, 22, 0.48);
}

.reviewWordMain {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.reviewProgress {
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 900;
}

.reviewWordMain > strong {
  font-size: 1.32rem;
  line-height: 1.15;
}

.reviewAnswerDetails {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid rgba(158, 241, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.35);
}

.reviewAnswerDetails p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 650;
}

.reviewAnswerDetails strong {
  color: var(--text);
}

.reviewQueueItem strong,
.reviewFeedback strong {
  display: block;
  color: white;
}

.reviewQueueMeta,
.reviewFeedback span {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.reviewPriority {
  color: var(--yellow);
  font-weight: 950;
}

.reviewActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: center;
  max-width: 320px;
}

.reviewActions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.reviewRatingBtn {
  display: grid;
  gap: 2px;
  min-width: 108px;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid rgba(158, 241, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.reviewRatingBtn strong {
  color: white;
  font-size: 0.92rem;
  line-height: 1.1;
}

.reviewRatingBtn span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.reviewRatingBtn--again {
  border-color: rgba(255, 107, 107, 0.26);
}

.reviewRatingBtn--good {
  border-color: rgba(93, 242, 162, 0.26);
}

.reviewRatingBtn--easy {
  border-color: rgba(250, 214, 92, 0.28);
}

.reviewFeedback {
  padding: 10px;
  border: 1px solid rgba(93, 242, 162, 0.28);
  border-radius: var(--radius);
  background: rgba(93, 242, 162, 0.08);
}

.analyticsDashboard {
  display: grid;
  width: min(1180px, 100%);
  gap: 14px;
  margin: 0 auto;
  align-items: start;
}

.sectionHeader--analytics {
  margin-bottom: 0;
  padding-top: 2px;
}

.analyticsHero {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(158, 241, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(93, 242, 162, 0.08), rgba(24, 233, 255, 0.055), rgba(255, 106, 213, 0.035)),
    rgba(8, 14, 29, 0.9);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.analyticsHero h3 {
  margin: 0;
  color: white;
  font-size: clamp(1.22rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.analyticsHero p {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1.45;
}

.analyticsOverviewGrid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.analyticsMetric,
.analyticsPanel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(9, 14, 30, 0.93);
  color: var(--text);
  text-align: left;
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    var(--shadow-soft);
}

.analyticsMetric {
  --metric-accent: var(--cyan);
  position: relative;
  display: grid;
  grid-column: span 2;
  min-height: 88px;
  padding: 14px;
  overflow: hidden;
  align-content: space-between;
  gap: 10px;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.analyticsMetric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--metric-accent);
  box-shadow: none;
}

.analyticsMetric:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--metric-accent), white 8%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 28px rgba(0, 0, 0, 0.26);
}

.analyticsMetric--feature {
  grid-column: span 3;
  min-height: 98px;
  padding: 16px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--metric-accent), transparent 82%), rgba(255, 255, 255, 0.035)),
    rgba(9, 14, 30, 0.9);
}

.analyticsMetric--accuracy {
  --metric-accent: var(--green);
}

.analyticsMetric--due,
.analyticsMetric--weak {
  --metric-accent: var(--yellow);
}

.analyticsMetric--xp,
.analyticsMetric--weekly {
  --metric-accent: var(--pink);
}

.analyticsMetric--streak,
.analyticsMetric--mastery {
  --metric-accent: var(--cyan);
}

.analyticsMetric--learning {
  --metric-accent: var(--blue);
}

.analyticsMetric span,
.analyticsPanelHead span,
.pressureLabel,
.weakWordMeta,
.performanceMeta,
.insightCard span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: none;
}

.analyticsMetric strong {
  display: block;
  color: white;
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  line-height: 1;
  text-shadow: none;
}

.analyticsMetric--feature strong {
  font-size: clamp(1.8rem, 3.2vw, 2.55rem);
  text-shadow: none;
}

.analyticsMainGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
}

.analyticsMainGrid--lower {
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
}

.analyticsPanel {
  min-width: 0;
  padding: 16px;
  overflow: hidden;
}

.analyticsPanel--wide {
  width: 100%;
}

.analyticsPanel--trend {
  min-height: 324px;
  border-color: rgba(93, 242, 162, 0.18);
}

.analyticsPanel--pressure,
.analyticsPanel--weak,
.analyticsPanel--insights,
.analyticsPanel--performance {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(93, 242, 162, 0.022)),
    rgba(9, 14, 30, 0.92);
}

.analyticsPanelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.analyticsPanelHead h3 {
  margin: 0;
  color: white;
  font-size: 1.14rem;
  line-height: 1.15;
}

#accuracyTrendChart {
  width: 100%;
  height: 240px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(3, 10, 28, 0.42);
}

.pressureBars,
.weakWordsList,
.insightGrid,
.performanceGrid {
  display: grid;
  gap: 10px;
}

.pressureItem {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(158, 241, 255, 0.12);
}

.pressureItem:last-child {
  border-bottom: 0;
}

.pressureTop,
.weakWordRow,
.performanceRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pressureTrack {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: 999px;
  background: rgba(2, 8, 22, 0.64);
}

.pressureTrack span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--pink));
  transition: width 240ms ease;
}

.weakWordRow,
.performanceRow,
.insightCard {
  min-height: 58px;
  padding: 13px 14px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(3, 10, 28, 0.38);
}

.weakWordRow strong,
.performanceRow strong,
.insightCard strong {
  display: block;
  color: white;
  line-height: 1.25;
}

.weakWordStats,
.performanceScore {
  padding: 7px 10px;
  border: 1px solid rgba(255, 227, 110, 0.22);
  border-radius: 999px;
  background: rgba(255, 227, 110, 0.08);
  color: var(--yellow);
  font-weight: 950;
  white-space: nowrap;
}

.insightGrid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.insightCard {
  display: grid;
  gap: 8px;
  align-content: start;
}

.performanceGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.performanceGroup {
  display: grid;
  gap: 9px;
}

.performanceGroup h4 {
  margin: 0;
  color: white;
}

.learningStudioStrip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.aiDeckWorkspace,
.studioWorkspace {
  display: grid;
  gap: 14px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgba(158, 241, 255, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(9, 14, 30, 0.93);
  color: var(--text);
  text-align: left;
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: var(--shadow-soft);
}

.aiDeckWorkspaceGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.aiDeckWorkspace > .utilityBtn,
.studioWorkspace > .utilityBtn {
  width: fit-content;
}

.studioShortcut {
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(158, 241, 255, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(8, 14, 29, 0.76);
  color: white;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.studioShortcut:hover {
  transform: translateY(-2px);
  border-color: rgba(158, 241, 255, 0.28);
  box-shadow: var(--shadow-soft);
}

.studioShortcut span {
  display: block;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 900;
}

.studioShortcut strong {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.trustNote {
  max-width: 760px;
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(93, 242, 162, 0.18);
  border-radius: var(--radius);
  background: rgba(93, 242, 162, 0.07);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.45;
}

.trustNote--studio {
  max-width: none;
  margin: 0 0 12px;
}

.studioOverlay {
  position: fixed;
  inset: 0;
  z-index: 20500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 18, 0.82);
  backdrop-filter: blur(16px);
}

.studioOverlay.hidden {
  display: none !important;
}

.studioPanel {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(880px, calc(100vh - 40px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(158, 241, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    rgba(8, 14, 29, 0.98);
  color: white;
  text-align: left;
  box-shadow: var(--shadow);
}

.studioClose {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-weight: 900;
}

.studioHeader {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-right: 48px;
}

.studioHeader h2 {
  margin: 10px 0 6px;
  color: white;
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.studioHeader p,
.studioCard p,
.topicDeckCard p,
.badgeCard p,
.focusPanel p {
  color: var(--text-muted);
  font-weight: 700;
}

.studioTabs {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.studioTab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(158, 241, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 900;
}

.studioTab.is-active {
  border-color: rgba(24, 233, 255, 0.34);
  background: linear-gradient(135deg, rgba(24, 233, 255, 0.13), rgba(255, 106, 213, 0.08));
  color: white;
}

.studioView {
  display: none;
}

.studioView.is-active {
  display: grid;
  gap: 14px;
}

.studioGrid {
  display: grid;
  gap: 14px;
}

.studioGrid--profile {
  grid-template-columns: 1.35fr repeat(3, minmax(150px, 0.55fr));
}

.studioCard,
.focusPanel,
.topicDeckCard,
.badgeCard,
.historyItem {
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow-soft);
}

.studioCard {
  padding: 18px;
}

.profileSnapshotCard {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 16px;
}

.studioAvatar {
  width: 82px;
  height: 82px;
  border-radius: var(--radius);
  object-fit: cover;
  background: white;
}

.studioCard h3,
.focusPanel h3,
.topicDeckCard h3,
.badgeCard h3 {
  margin: 0 0 8px;
  color: white;
}

.studioMetricLabel {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: none;
}

.studioCard > strong {
  display: block;
  margin-top: 8px;
  color: white;
  font-size: 2rem;
  text-shadow: none;
}

.studioCardHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.streakCalendar {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 8px;
}

.calendarDay {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(3, 10, 28, 0.42);
  color: var(--text-muted);
  font-weight: 900;
}

.calendarDay.is-active {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #031526;
}

.historyList,
.focusQueue,
.topicDeckGrid,
.badgeGallery {
  display: grid;
  gap: 12px;
}

.historyItem {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
}

.historyItem strong {
  color: var(--yellow);
  font-size: 1.3rem;
}

.historyItem em {
  color: var(--text-muted);
  font-style: normal;
  font-weight: 750;
}

.badgeGallery,
.topicDeckGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.badgeCard,
.topicDeckCard {
  padding: 18px;
}

.badgeCard {
  opacity: 0.64;
}

.badgeCard.is-unlocked {
  opacity: 1;
  background: linear-gradient(145deg, rgba(93, 242, 162, 0.16), rgba(24, 233, 255, 0.1));
}

.badgeCard span,
.topicDeckCard span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(24, 233, 255, 0.14);
  color: #d8feff;
  font-size: 0.72rem;
  font-weight: 900;
}

.topicDeckCardMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.topicDeckCardMeta span {
  margin-bottom: 0;
}

.topicDeckCard p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-weight: 750;
}

.topicDeckCard small {
  display: block;
  min-height: 34px;
  color: var(--text-muted);
  font-weight: 800;
}

.focusPanel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.focusStats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.focusStats span,
.focusQueue span {
  padding: 9px 11px;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 850;
}

.focusQueue {
  display: flex;
  flex-wrap: wrap;
}

.csvCard {
  max-width: 820px;
}

.curatedDeckCard,
.curatedDeckReviewCard,
.starterDecksCard {
  max-width: 980px;
}

.curatedDeckControls {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.curatedDeckControls label {
  display: grid;
  gap: 7px;
}

.curatedDeckControls span {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.curatedDeckControls input,
.curatedDeckControls select {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(158, 241, 255, 0.13);
  border-radius: 12px;
  background: rgba(2, 8, 22, 0.46);
  color: var(--text);
  font: inherit;
}

.curatedDeckControls input:focus,
.curatedDeckControls select:focus {
  outline: 3px solid rgba(24, 233, 255, 0.12);
  border-color: var(--cyan);
}

.aiDeckCard,
.aiDeckReviewCard {
  max-width: 920px;
}

.aiDeckInput {
  display: grid;
  gap: 8px;
}

.aiDeckInput span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: none;
}

.aiDeckInput textarea {
  min-height: 170px;
  resize: vertical;
  padding: 14px;
  border: 1px solid rgba(158, 241, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.48);
  color: var(--text);
  font: inherit;
  line-height: 1.55;
}

.aiDeckInput textarea:focus {
  outline: 3px solid rgba(24, 233, 255, 0.12);
  border-color: var(--cyan);
}

.aiDeckOptions {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.aiDeckOptions label {
  display: grid;
  gap: 7px;
}

.aiDeckOptions span {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.aiDeckOptions select {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(158, 241, 255, 0.13);
  border-radius: 12px;
  background: rgba(2, 8, 22, 0.46);
  color: var(--text);
  font: inherit;
}

.aiDeckOptions select:focus {
  outline: 3px solid rgba(24, 233, 255, 0.12);
  border-color: var(--cyan);
}

.aiDeckActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.aiDeckBulkActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.aiDeckCountPill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(158, 241, 255, 0.16);
  border-radius: 999px;
  background: rgba(24, 233, 255, 0.08);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
}

.aiDeckList {
  display: grid;
  gap: 10px;
}

.aiDeckItem {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(3, 10, 28, 0.42);
}

.aiDeckItem--selected {
  border-color: rgba(93, 242, 162, 0.26);
  box-shadow: inset 3px 0 0 rgba(93, 242, 162, 0.62);
}

.aiDeckItem--unselected {
  opacity: 0.58;
  border-style: dashed;
}

.aiDeckItem--invalid {
  border-color: rgba(255, 95, 126, 0.58);
  box-shadow: inset 3px 0 0 rgba(255, 95, 126, 0.7);
}

.aiDeckItem > input {
  width: 20px;
  height: 20px;
  margin-top: 6px;
  accent-color: var(--cyan);
}

.aiDeckEditGrid {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1.2fr) minmax(86px, 0.55fr) minmax(110px, 0.8fr) minmax(96px, 0.65fr);
  gap: 8px;
  align-items: end;
}

.aiDeckField {
  display: grid;
  gap: 5px;
}

.aiDeckField span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: none;
}

.aiDeckField input,
.aiDeckField select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(158, 241, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.48);
  color: var(--text);
  font: inherit;
}

.aiDeckField select option {
  background: var(--bg-secondary, #111827);
  color: var(--text-primary, #f8fafc);
}

.aiDeckField input:focus,
.aiDeckField select:focus {
  outline: 3px solid rgba(24, 233, 255, 0.1);
  border-color: var(--cyan);
}

.aiDeckRowActions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.aiDeckItem p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.csvExample {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.5);
  color: #d8feff;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.55;
  overflow-x: auto;
}

.csvActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.csvResult,
.emptyStudio {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: 8px;
  background: rgba(3, 10, 28, 0.24);
  color: var(--text-muted);
  font-weight: 750;
}

.appFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(1180px, 100%);
  margin: 18px auto 0;
  padding: 14px 16px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(9, 14, 30, 0.72);
  color: var(--text-muted);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.appFooter div,
.appFooter nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.appFooter strong {
  color: #ffffff;
}

.appFooter span,
.appFooter p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.appFooter a {
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.appFooter a:hover,
.appFooter a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.emptyStudio--action {
  display: grid;
  gap: 10px;
}

.emptyStudio--action p {
  margin: 0;
}

.emptyStudioActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.apiStateMessage {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: 8px;
  background: rgba(3, 10, 28, 0.32);
  color: var(--text-muted);
  font-weight: 800;
}

.apiStateMessage--loading {
  position: relative;
  overflow: hidden;
  border-color: rgba(24, 233, 255, 0.24);
  color: #d8feff;
}

.apiStateMessage--loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  animation: loadingShimmer 1.35s ease-in-out infinite;
  pointer-events: none;
}

.apiStateMessage--ok {
  border-color: rgba(93, 242, 162, 0.28);
  color: var(--green);
}

.apiStateMessage--warn {
  border-color: rgba(255, 227, 110, 0.28);
  color: var(--yellow);
}

.loadingSkeletonList {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.loadingSkeletonCard {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: 8px;
  background: rgba(3, 10, 28, 0.28);
}

.loadingSkeletonLine {
  display: block;
  height: 11px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(158, 241, 255, 0.09), rgba(255, 255, 255, 0.18), rgba(158, 241, 255, 0.09));
  background-size: 220% 100%;
  animation: skeletonPulse 1.25s ease-in-out infinite;
}

.loadingSkeletonLine--wide {
  width: 86%;
}

.loadingSkeletonLine--medium {
  width: 62%;
}

.loadingSkeletonLine--short {
  width: 38%;
}

button,
.utilityBtn,
.miniBtn,
.addBtn,
.answer {
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, opacity 0.16s ease;
}

button:disabled,
.utilityBtn:disabled,
.miniBtn:disabled,
.addBtn:disabled,
.answer:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

@keyframes loadingShimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes skeletonPulse {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.sectionHeader {
  text-align: left;
}

.sectionHeader p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.addWordBox {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(9, 14, 30, 0.94);
}

.formField {
  display: grid;
  gap: 6px;
  text-align: left;
}

.formField--primary {
  grid-column: span 3;
}

.formField--tag,
.formField--compact {
  grid-column: span 2;
}

.formField--wide {
  grid-column: span 5;
}

.addActions {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.addWordBox input,
.addWordBox select,
.searchBox input,
#modeSelect,
#quizDifficulty,
#challengeDifficulty {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: var(--radius);
  outline: none;
  background: rgba(2, 8, 22, 0.44);
  color: #ffffff;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.learningDetails {
  grid-column: 1 / -1;
  border: 1px solid rgba(158, 241, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.2);
  text-align: left;
}

.learningDetails summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
  color: #eefcff;
  cursor: pointer;
  font-weight: 950;
  list-style: none;
}

.learningDetails summary::-webkit-details-marker {
  display: none;
}

.learningDetails summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(24, 233, 255, 0.16);
  color: var(--cyan);
  font-size: 1.1rem;
}

.learningDetails[open] summary::after {
  content: "-";
}

.learningDetails summary strong {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.learningDetailsGrid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.learningDetails .formField--primary {
  grid-column: span 4;
}

.learningDetails .formField--wide {
  grid-column: span 6;
}

#modeSelect option,
#quizDifficulty option,
#challengeDifficulty option {
  background: var(--bg-secondary, #111827);
  color: var(--text-primary, #f8fafc);
}

#posInput option,
#levelInput option,
#filterPos option,
#filterTag option,
#filterMastery option {
  color: #111827;
  background-color: #ffffff;
}

.addWordBox input::placeholder,
.searchBox input::placeholder {
  color: rgba(224, 240, 255, 0.52);
}

.addWordBox input:focus,
.addWordBox select:focus,
.searchBox input:focus,
#modeSelect:focus,
#quizDifficulty:focus,
#challengeDifficulty:focus {
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(24, 233, 255, 0.1);
}

.addBtn {
  width: 58px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green), var(--cyan) 52%, var(--pink));
  color: #03111f;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(24, 233, 255, 0.18);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.addBtn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08) saturate(1.12);
}

.wordCountLine {
  margin-top: -4px;
  color: #ffffff;
  text-align: left;
  text-shadow: none;
}

.tableTools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(9, 14, 30, 0.94);
}

.searchBox {
  display: block;
  min-width: 0;
}

.searchBox > span,
.filterCluster label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.filterCluster .favoriteFilter > span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

.filterCluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filterCluster label {
  position: relative;
  display: block;
  min-width: 104px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.filterCluster select {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.56);
  color: white;
  font: inherit;
}

.filterCluster select option {
  background: var(--bg-secondary, #111827);
  color: var(--text-primary, #f8fafc);
}

.favoriteFilter {
  display: inline-flex !important;
  gap: 7px;
  align-items: center;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(158, 241, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.favoriteFilter input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--yellow);
}

.table-container {
  width: min(1320px, 100%);
  max-height: min(520px, 50vh);
  min-height: 0;
  overflow: auto;
  scrollbar-color: rgba(24, 233, 255, 0.5) rgba(3, 10, 28, 0.72);
  scrollbar-width: thin;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(8, 13, 27, 0.94);
}

.table-container::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-container::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(var(--cyan), var(--pink));
}

table {
  min-width: 920px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

thead th:nth-child(1),
tbody td:nth-child(1) {
  width: 15%;
}

thead th:nth-child(2),
tbody td:nth-child(2) {
  width: 25%;
}

thead th:nth-child(3),
tbody td:nth-child(3) {
  width: 22%;
}

thead th:nth-child(4),
tbody td:nth-child(4) {
  width: 22%;
}

thead th:nth-child(5),
tbody td:nth-child(5) {
  width: 16%;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 14px;
  background:
    linear-gradient(135deg, rgba(18, 54, 74, 0.96), rgba(35, 34, 58, 0.96)),
    rgba(7, 14, 32, 0.98);
  color: white;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(158, 241, 255, 0.08);
  color: rgba(250, 253, 255, 0.94);
  font-size: 0.95rem;
  text-align: left;
  vertical-align: middle;
  height: 54px;
}

tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

tbody tr {
  background: rgba(5, 11, 26, 0.26);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

tbody tr:hover {
  background: rgba(24, 233, 255, 0.055);
  box-shadow: inset 3px 0 0 rgba(24, 233, 255, 0.42);
}

thead th:first-child {
  border-top-left-radius: var(--radius);
}

thead th:last-child {
  border-top-right-radius: var(--radius);
}

.engWord {
  color: #c9fbff;
  cursor: pointer;
  font-weight: 950;
}

.engWord strong,
.meaningCell strong {
  display: block;
  overflow-wrap: anywhere;
}

.meaningHint {
  display: block;
  max-width: 100%;
  margin-top: 6px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favoriteRow td:first-child::before {
  content: "Star";
  display: inline-flex;
  margin-right: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 227, 110, 0.16);
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
}

.wordMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 650;
}

.wordMeta span,
.ipaBadge,
.metaBadge,
.wordLevelBadge,
.topicBadge,
.dueBadge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(235, 248, 255, 0.86);
  overflow-wrap: anywhere;
}

.ipaBadge {
  margin-top: 7px;
  color: #dffcff;
  font-family: "Segoe UI", Arial, sans-serif;
}

.levelCell {
  min-width: 0;
}

.studyInfoMain,
.studyInfoSub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.studyInfoSub {
  margin-top: 7px;
}

.wordLevelBadge {
  border-color: rgba(24, 233, 255, 0.34);
  background: rgba(24, 233, 255, 0.1);
  color: #dffcff;
  font-weight: 950;
  gap: 6px;
}

.wordLevelBadge small {
  color: rgba(224, 240, 255, 0.68);
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.wordLevelBadge strong {
  color: #ffffff;
  font-size: 0.86rem;
}

.wordLevelBadge--ielts {
  border-color: rgba(255, 227, 110, 0.34);
  background: rgba(255, 227, 110, 0.1);
}

.wordLevelBadge--ielts strong {
  color: #fff4b8;
}

.topicBadge {
  border-color: rgba(255, 227, 110, 0.25);
  color: #fff4b8;
}

.progressCell strong {
  display: block;
  color: #ffffff;
  font-size: 0.95rem;
}

.progressCell span {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.levelBadge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  font-size: 0.76rem;
  font-weight: 900;
}

.levelBadge--new {
  background: linear-gradient(135deg, #6f7f9e, #91a9ff);
}

.levelBadge--learning {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.levelBadge--review {
  background: linear-gradient(135deg, var(--yellow), #ff9345);
  color: #321800;
}

.levelBadge--mastered {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #052219;
}

.dueBadge {
  border: 0;
  font-weight: 900;
}

.dueBadge--due {
  background: linear-gradient(135deg, var(--yellow), #ff9345);
  color: #321800;
}

.dueBadge--weak {
  background: linear-gradient(135deg, #ff8a55, var(--danger));
  color: white;
}

.dueBadge--strong {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #052219;
}

.dueBadge--new,
.dueBadge--scheduled {
  background: linear-gradient(135deg, rgba(24, 233, 255, 0.28), rgba(91, 141, 255, 0.26));
  color: #e8fbff;
}

.reviewHint {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.reviewTopLine {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.reviewCellDisplay,
.reviewSummaryCell {
  min-width: 0;
}

.reviewSummaryCell strong,
.reviewSummaryCell span {
  display: block;
}

.reviewSummaryCell span {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.actionCell {
  display: table-cell;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
}

.actionBtn,
.speakBtn,
.deleteBtn,
.clearBtn {
  min-height: 30px;
  min-width: 38px;
  margin: 3px 2px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(24, 233, 255, 0.78), rgba(91, 141, 255, 0.78));
  color: white;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.speakBtn,
.moreBtn {
  min-width: 32px;
  width: 32px;
  padding: 0;
}

.clearBtn {
  background: linear-gradient(135deg, var(--danger), #ff8a55);
}

.editBtn,
.saveBtn,
.cancelBtn {
  width: auto;
  padding: 0 11px;
  font-size: 0.78rem;
}

.editBtn,
.saveBtn {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #031526;
}

.cancelBtn {
  background: linear-gradient(135deg, #42506d, #27334c);
}

.actionMenu {
  position: relative;
  display: inline-flex;
}

.actionMenuPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: none;
  min-width: 150px;
  padding: 6px;
  border: 1px solid rgba(158, 241, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(8, 14, 29, 0.98);
  box-shadow: var(--shadow-soft);
}

.actionMenu.is-open .actionMenuPanel {
  display: grid;
  gap: 4px;
}

.menuAction {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(245, 250, 255, 0.92);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
  text-align: left;
}

.menuAction:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menuAction.deleteBtn {
  color: #ffd2da;
}

.editingRow {
  background: rgba(24, 233, 255, 0.09) !important;
  box-shadow: inset 4px 0 0 var(--cyan);
}

.editingRow input,
.editingRow select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(158, 241, 255, 0.32);
  border-radius: var(--radius);
  background: rgba(2, 8, 22, 0.62);
  color: white;
  font: inherit;
}

.editingRow select option {
  background: var(--bg-secondary, #111827);
  color: var(--text-primary, #f8fafc);
}

.editMetaCell,
.editStack {
  display: grid;
  gap: 8px;
  min-width: 230px;
}

.emptyTableCell {
  padding: 30px 18px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 850;
}

.nextReviewCell {
  color: #d8faff;
  font-weight: 850;
}

.actionBtn:hover,
.speakBtn:hover,
.deleteBtn:hover,
.clearBtn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 0 20px rgba(24, 233, 255, 0.22);
}

.mastered {
  background: rgba(93, 242, 162, 0.1) !important;
}

.mastered td {
  color: rgba(240, 255, 248, 0.82);
  font-style: italic;
}

.quizOptions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  padding: 16px;
}

.quizBlock {
  display: grid;
  gap: 10px;
  align-items: end;
}

.quizBlock h2 {
  margin: 0;
  font-size: 1.3rem;
}

.playSettings {
  width: 100%;
  margin: 0;
}

.toggleLine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(158, 241, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 850;
}

.toggleLine input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.practiceActions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.bigBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin: 0;
  padding: 11px 14px;
  border: 0;
  border-radius: var(--radius);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), 0 0 22px rgba(24, 233, 255, 0.16);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.bigBtn:hover {
  transform: translateY(-3px);
  filter: brightness(1.08) saturate(1.1);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.38), 0 0 30px rgba(24, 233, 255, 0.28);
}

.startBtn {
  background: linear-gradient(135deg, #24d27e, var(--cyan));
}

.wrongBtn {
  background: linear-gradient(135deg, #ff9a4a, var(--danger));
}

.favoriteBtn,
.nextBtn {
  background: linear-gradient(135deg, #8a6bff, var(--pink));
}

.dailyBtn {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #041525;
}

.challengeBtn {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 227, 110, 0.96), rgba(255, 106, 213, 0.92) 52%, rgba(138, 107, 255, 0.95));
  color: #16051f;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38), 0 0 30px rgba(255, 106, 213, 0.28);
}

.challengeBtn::after {
  content: "";
  position: absolute;
  inset: -50% -20%;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.44), transparent 58%);
  transform: translateX(-80%);
  transition: transform 320ms ease;
}

.challengeBtn:hover::after {
  transform: translateX(80%);
}

.submitBtn {
  background: linear-gradient(135deg, #20a5ff, var(--cyan));
  color: #031526;
}

.backBtn,
.backQuestionBtn,
.reviewBtn {
  background: linear-gradient(135deg, #283a5f, #1f8aa8);
}

#quizScreen {
  min-height: calc(100vh - 80px);
  padding: 84px 0 30px;
  display: grid;
  align-content: start;
  gap: 14px;
}

#quizScreen.hidden {
  display: none !important;
}

#comboDisplay,
#timer {
  width: fit-content;
  margin: 0 auto;
  border-radius: 999px;
  font-weight: 900;
}

#comboDisplay {
  padding: 8px 18px;
  border: 1px solid rgba(255, 227, 110, 0.42);
  background: rgba(37, 23, 48, 0.68);
  color: var(--yellow);
  text-shadow: 0 0 14px rgba(255, 227, 110, 0.44);
}

#timer {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 106, 213, 0.28);
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255, 106, 213, 0.55);
}

#progressBar {
  width: min(920px, 90%);
  height: 20px;
  margin: 0 auto 6px;
  overflow: hidden;
  border: 1px solid rgba(158, 241, 255, 0.24);
  border-radius: 999px;
  background: rgba(3, 10, 28, 0.66);
}

#progress {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--pink));
  box-shadow: 0 0 18px rgba(24, 233, 255, 0.44);
  transition: width 350ms ease;
}

#question {
  width: min(980px, 92%);
  margin: 0 auto 4px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(12, 36, 63, 0.92), rgba(57, 31, 74, 0.9)),
    rgba(5, 10, 24, 0.86);
  color: white;
  font-size: 2.45rem;
  line-height: 1.18;
  text-shadow: 0 0 22px rgba(24, 233, 255, 0.32);
  box-shadow: var(--shadow-soft), var(--glow-cyan);
}

.questionModeBadge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 10px;
  padding: 4px 10px;
  border: 1px solid rgba(158, 241, 255, 0.34);
  border-radius: 999px;
  background: rgba(24, 233, 255, 0.12);
  color: #c9fbff;
  font-size: 0.78rem;
  font-weight: 900;
}

.qNumber {
  margin-bottom: 8px;
  color: #d8faff;
  font-size: 0.95rem;
}

.questionPrompt {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.keyword {
  color: #ffffff;
  font-weight: 950;
  text-shadow: 0 0 16px rgba(24, 233, 255, 0.72), 0 0 28px rgba(255, 106, 213, 0.36);
}

#answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(980px, 92%);
  gap: 14px;
  margin: 0 auto;
}

.answer {
  min-height: 88px;
  padding: 20px;
  border: 1px solid rgba(158, 241, 255, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.055)),
    var(--surface);
  color: white;
  cursor: pointer;
  font-size: 1.18rem;
  font-weight: 800;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.answer:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: rgba(24, 233, 255, 0.14);
  box-shadow: var(--shadow-soft), 0 0 26px rgba(24, 233, 255, 0.28);
}

.answer:focus-visible,
.bigBtn:focus-visible,
.utilityBtn:focus-visible,
.miniBtn:focus-visible,
.addBtn:focus-visible,
.actionBtn:focus-visible,
.speakBtn:focus-visible,
.deleteBtn:focus-visible,
.clearBtn:focus-visible {
  outline: 3px solid rgba(24, 233, 255, 0.74);
  outline-offset: 3px;
}

.selected {
  border-color: var(--cyan) !important;
  background:
    linear-gradient(135deg, rgba(187, 255, 251, 0.96), rgba(77, 200, 255, 0.92)) !important;
  color: #031526 !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), 0 0 34px rgba(24, 233, 255, 0.52) !important;
  animation: selectGlow 1.4s ease-in-out infinite alternate;
}

.correct {
  border-color: var(--green) !important;
  background: linear-gradient(135deg, #b9ffd8, var(--green)) !important;
  color: #052219 !important;
}

.wrong {
  border-color: var(--danger) !important;
  background: linear-gradient(135deg, #ffd0da, var(--danger)) !important;
  color: #330411 !important;
}

.answer.locked {
  cursor: default;
}

.answer:disabled {
  opacity: 1;
  transform: none;
}

.questionFeedback {
  min-height: 24px;
  margin: 12px auto 0;
  color: var(--text-muted);
  font-weight: 850;
  text-align: center;
}

.questionFeedback--correct {
  color: var(--green);
}

.questionFeedback--wrong {
  color: #ff8aa2;
}

#quizScreen > br {
  display: none;
}

#quizScreen .bigBtn {
  width: min(220px, 92%);
  margin: 2px auto;
  min-height: 52px;
}

.timerDanger {
  color: #ffffff !important;
  background: rgba(255, 45, 85, 0.42) !important;
  animation: screenShake 420ms infinite;
}

.resultCard {
  width: min(560px, 94%);
  margin: 88px auto 0;
  padding: 34px;
}

.resultCard h2 {
  margin: 0 0 18px;
  color: white;
  font-size: 2.4rem;
  letter-spacing: 0;
}

.resultStats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}

.resultStats p {
  margin: 0;
  padding: 14px 10px;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 850;
}

.resultStats span {
  display: block;
  margin-top: 6px;
  color: white;
}

#score {
  margin: 18px 0 8px;
  font-size: 3.6rem;
  line-height: 1;
  text-shadow: 0 0 26px rgba(255, 227, 110, 0.34);
}

#grade,
#comment {
  font-weight: 850;
}

#reviewScreen,
#mistakeScreen {
  padding: 84px 0 42px;
}

.reviewTools {
  width: min(920px, 100%);
  margin: 0 auto 14px;
  padding: 16px;
}

.reviewTools p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.reviewList {
  display: grid;
  width: min(920px, 100%);
  gap: 12px;
  margin: 0 auto 18px;
}

.reviewCard {
  position: relative;
  padding: 18px;
  border-left: 6px solid var(--blue);
  text-align: left;
}

.reviewCard--correct {
  border-left-color: var(--green);
}

.reviewCard--wrong {
  border-left-color: var(--danger);
}

.reviewCard h3 {
  margin: 0 90px 8px 0;
  color: white;
}

.reviewCard p {
  margin: 7px 0;
}

.reviewStatus {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(24, 233, 255, 0.16);
  font-size: 0.76rem;
  font-weight: 900;
}

.reviewMeta,
.reviewExample,
.reviewNote {
  color: var(--text-muted);
  font-weight: 700;
}

.aiExplainButton {
  margin-top: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(24, 233, 255, 0.32);
  border-radius: 8px;
  background: rgba(24, 233, 255, 0.12);
  color: white;
  cursor: pointer;
  font-weight: 900;
}

.aiExplainButton:disabled {
  cursor: wait;
  opacity: 0.75;
}

.aiExplainPanel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.aiExplainPanel h4 {
  margin: 0 0 10px;
  color: white;
}

.aiExplainPanel p {
  margin: 8px 0;
  color: var(--text-muted);
}

.aiExplainPanel strong {
  color: white;
}

.aiExplainChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.aiExplainChips span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(24, 233, 255, 0.14);
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
}

#mistakeScreen .table-container {
  margin-top: 14px;
}

#think-helper {
  position: fixed;
  right: 22px;
  bottom: 90px;
  z-index: 3000;
  display: none;
  animation: thinkAppear 260ms ease;
}

#think-bubble {
  width: min(340px, calc(100vw - 44px));
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(11, 18, 35, 0.82);
  color: white;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft), var(--glow-cyan);
}

#challengeMenu {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 35%, rgba(24, 233, 255, 0.18), transparent 34%),
    radial-gradient(circle at 50% 72%, rgba(255, 106, 213, 0.18), transparent 30%),
    rgba(2, 6, 18, 0.82);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(14px);
  transition: opacity 180ms ease;
}

#challengeMenu.show {
  opacity: 1;
  pointer-events: auto;
}

.challengePanel {
  position: relative;
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid rgba(158, 241, 255, 0.35);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045)),
    rgba(8, 14, 31, 0.9);
  box-shadow: var(--shadow), 0 0 46px rgba(24, 233, 255, 0.22), 0 0 68px rgba(255, 106, 213, 0.18);
  text-align: left;
}

.challengeCloseBtn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 900;
}

.challengeHeader {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-right: 36px;
}

.challengeBadge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow), var(--pink));
  color: #1b0821;
  font-size: 1.7rem;
  box-shadow: 0 0 32px rgba(255, 106, 213, 0.44);
}

.challengeHeader h2,
.challengeHeader p {
  margin: 0;
}

.challengeHeader h2 {
  color: white;
  font-size: 1.6rem;
}

.challengeHeader p {
  margin-top: 3px;
  color: var(--text-muted);
  font-weight: 700;
}

.challengeLevels {
  display: grid;
  width: 100%;
  gap: 12px;
}

.challengeLevels button {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: white;
  cursor: pointer;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.challengeLevels button:hover {
  transform: translateY(-3px) scale(1.01);
  filter: brightness(1.08);
  border-color: rgba(255, 255, 255, 0.36);
}

.challengeLevels strong {
  font-size: 0.94rem;
}

.levelIcon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.easyLevel {
  background: linear-gradient(135deg, #24d27e, var(--green));
  color: #052219 !important;
  box-shadow: 0 0 30px rgba(93, 242, 162, 0.28);
}

.mediumLevel {
  background: linear-gradient(135deg, var(--yellow), #ff9a4a);
  color: #2c1600 !important;
  box-shadow: 0 0 30px rgba(255, 227, 110, 0.28);
}

.hardLevel {
  background: linear-gradient(135deg, #ff8a55, var(--danger));
  box-shadow: 0 0 30px rgba(255, 95, 126, 0.28);
}

.masterLevel {
  background: linear-gradient(135deg, #8a6bff, var(--pink));
  box-shadow: 0 0 34px rgba(255, 106, 213, 0.34);
}

.previewOverlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 18, 0.74);
  backdrop-filter: blur(14px);
}

.previewOverlay.hidden {
  display: none !important;
}

.previewPanel {
  position: relative;
  width: min(1040px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  overflow: auto;
  padding: 22px;
  text-align: left;
}

.previewClose {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-weight: 900;
}

.previewHeader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.previewHeader h2 {
  margin: 8px 0 0;
  color: white;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
}

.previewHeader p,
.previewCard p,
.previewNotes p {
  color: var(--text-muted);
}

.previewGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.previewCard,
.previewNotes p {
  padding: 14px;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.previewCard {
  position: relative;
  grid-column: span 2;
  min-height: 178px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(24, 233, 255, 0.1), rgba(255, 106, 213, 0.055)),
    rgba(3, 10, 28, 0.5);
}

.previewCard--wide {
  grid-column: span 4;
}

.previewCard::after {
  content: "";
  position: absolute;
  inset: auto -20px -30px auto;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 233, 255, 0.2), transparent 68%);
  pointer-events: none;
}

.previewStep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  margin-bottom: 10px;
  border: 1px solid rgba(158, 241, 255, 0.28);
  border-radius: 999px;
  background: rgba(24, 233, 255, 0.12);
  color: #d8feff;
  font-size: 0.72rem;
  font-weight: 950;
}

.previewCard h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 1.02rem;
  line-height: 1.2;
}

.previewCard p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.previewFeatureList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.previewFeatureList li {
  padding: 5px 8px;
  border: 1px solid rgba(158, 241, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(235, 248, 255, 0.86);
  font-size: 0.74rem;
  font-weight: 800;
}

.previewFlow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.previewFlow span {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(24, 233, 255, 0.16);
  color: #d8feff;
  font-size: 0.84rem;
  font-weight: 900;
}

.previewFlow b {
  flex: 0 0 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.24);
}

.previewNotes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.previewNotes p {
  margin: 0;
  line-height: 1.45;
}

.toastHost {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 22000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(520px, calc(100vw - 24px));
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(12, 18, 34, 0.9);
  color: white;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.toast--ok {
  border-color: rgba(93, 242, 162, 0.5);
}

.toast--warn {
  border-color: rgba(255, 227, 110, 0.5);
}

.toast--err {
  border-color: rgba(255, 95, 126, 0.5);
}

.comboPopup,
.particle,
.spark {
  z-index: 12000;
  contain: layout paint;
  pointer-events: none;
}

html[data-theme="light"] body {
  background:
    linear-gradient(180deg, rgba(246, 250, 255, 0.92), rgba(240, 246, 255, 0.8) 44%, rgba(246, 250, 255, 0.96)),
    linear-gradient(115deg, rgba(0, 111, 214, 0.12), transparent 32%, rgba(178, 35, 133, 0.08) 68%, rgba(8, 127, 82, 0.06)),
    url("../images/quiz.jpg") center top / cover fixed no-repeat;
}

html[data-theme="light"] body::before {
  opacity: 0.28;
}

html[data-theme="light"] .heroPanel,
html[data-theme="light"] .todayFocusPanel,
html[data-theme="light"] .startHerePanel,
html[data-theme="light"] .dashCard,
html[data-theme="light"] .profilePanel,
html[data-theme="light"] .leaderboardPanel,
html[data-theme="light"] .addWordBox,
html[data-theme="light"] .tableTools,
html[data-theme="light"] .table-container,
html[data-theme="light"] .quizOptions,
html[data-theme="light"] .quizBlock,
html[data-theme="light"] .resultCard,
html[data-theme="light"] .reviewTools,
html[data-theme="light"] .reviewCard,
html[data-theme="light"] .reviewTodayPanel,
html[data-theme="light"] .weakWordsCenter,
html[data-theme="light"] .analyticsMetric,
html[data-theme="light"] .analyticsPanel,
html[data-theme="light"] .analyticsHero,
html[data-theme="light"] .aiDeckWorkspace,
html[data-theme="light"] .studioWorkspace,
html[data-theme="light"] .studioPanel,
html[data-theme="light"] .profileEditorPanel,
html[data-theme="light"] .previewPanel,
html[data-theme="light"] .modalContent,
html[data-theme="light"] .profileMenu,
html[data-theme="light"] .appFooter {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 255, 0.8)),
    var(--surface);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    var(--shadow-soft);
}

html[data-theme="light"] .heroPanel h1,
html[data-theme="light"] .heroPanel p,
html[data-theme="light"] .todayFocusPanel h2,
html[data-theme="light"] .startHereIntro h2,
html[data-theme="light"] .startHereStep strong,
html[data-theme="light"] .starterDeckPreviewCard strong,
html[data-theme="light"] .analyticsHero h3,
html[data-theme="light"] .dashCard strong,
html[data-theme="light"] .profilePanel h2,
html[data-theme="light"] .leaderboardPanel h2,
html[data-theme="light"] .sectionHeader h2,
html[data-theme="light"] .reviewTodayHead h2,
html[data-theme="light"] .reviewSessionCopy strong,
html[data-theme="light"] .reviewSessionStat strong,
html[data-theme="light"] .reviewStateCard h3,
html[data-theme="light"] .reviewRatingBtn strong,
html[data-theme="light"] .analyticsPanelHead h3,
html[data-theme="light"] .analyticsMetric strong,
html[data-theme="light"] .weakWordRow strong,
html[data-theme="light"] .weakWordsCenterHead h2,
html[data-theme="light"] .weakFixCard strong,
html[data-theme="light"] .reviewWordMain > strong,
html[data-theme="light"] .performanceRow strong,
html[data-theme="light"] .insightCard strong,
html[data-theme="light"] .quizBlock h2,
html[data-theme="light"] #question,
html[data-theme="light"] .reviewCard h3,
html[data-theme="light"] .resultCard h2,
html[data-theme="light"] .profileMenu strong,
html[data-theme="light"] .profileMenuItem,
html[data-theme="light"] .sidebarBrand strong,
html[data-theme="light"] .appTopbarTitle strong,
html[data-theme="light"] .studioPanel h2,
html[data-theme="light"] .studioPanel h3,
html[data-theme="light"] .studioPanel h4,
html[data-theme="light"] .previewHeader h2,
html[data-theme="light"] .previewCard h3,
html[data-theme="light"] .appFooter strong {
  color: var(--text);
  text-shadow: none;
}

html[data-theme="light"] .heroEyebrow,
html[data-theme="light"] .dashLabel,
html[data-theme="light"] .profilePanel p,
html[data-theme="light"] .profileStats span,
html[data-theme="light"] .leaderboardTabs span,
html[data-theme="light"] .analyticsMetric span,
html[data-theme="light"] .analyticsPanelHead span,
html[data-theme="light"] .pressureLabel,
html[data-theme="light"] .weakWordMeta,
html[data-theme="light"] .performanceMeta,
html[data-theme="light"] .insightCard span,
html[data-theme="light"] .reviewQueueMeta,
html[data-theme="light"] .reviewAnswerDetails p,
html[data-theme="light"] .reviewSessionCopy span,
html[data-theme="light"] .reviewSessionProgress span,
html[data-theme="light"] .reviewSessionStat small,
html[data-theme="light"] .reviewStateCard p,
html[data-theme="light"] .reviewRatingBtn span,
html[data-theme="light"] .weakFixCard span,
html[data-theme="light"] .weakFixCard small,
html[data-theme="light"] .reviewFeedback span,
html[data-theme="light"] .emptyStudio,
html[data-theme="light"] .todayFocusPanel p,
html[data-theme="light"] .startHereIntro p,
html[data-theme="light"] .startHereStep p,
html[data-theme="light"] .startHereNext,
html[data-theme="light"] .starterDeckPreviewCard span,
html[data-theme="light"] .analyticsHero p,
html[data-theme="light"] .profileMenu span,
html[data-theme="light"] .trustNote,
html[data-theme="light"] .appFooter span,
html[data-theme="light"] .appFooter p {
  color: var(--text-muted);
}

html[data-theme="light"] .utilityBar,
html[data-theme="light"] .appSidebar,
html[data-theme="light"] .appTopbar,
html[data-theme="light"] .authCluster,
html[data-theme="light"] .profileTrigger,
html[data-theme="light"] .utilityBtn,
html[data-theme="light"] .miniBtn,
html[data-theme="light"] .homeBtn,
html[data-theme="light"] .logoutBtn {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .addWordBox input,
html[data-theme="light"] .addWordBox select,
html[data-theme="light"] .searchBox input,
html[data-theme="light"] .filterCluster select,
html[data-theme="light"] .editingRow input,
html[data-theme="light"] .editingRow select,
html[data-theme="light"] .profileFormField input,
html[data-theme="light"] .profileFormField select,
html[data-theme="light"] .profileFormField textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

html[data-theme="light"] .addWordBox input::placeholder,
html[data-theme="light"] .searchBox input::placeholder,
html[data-theme="light"] .profileFormField input::placeholder,
html[data-theme="light"] .profileFormField textarea::placeholder {
  color: rgba(35, 58, 88, 0.5);
}

html[data-theme="light"] .leaderboardList li,
html[data-theme="light"] .reviewQueueItem,
html[data-theme="light"] .reviewAnswerDetails,
html[data-theme="light"] .reviewSessionOverview,
html[data-theme="light"] .reviewSessionStat,
html[data-theme="light"] .reviewStateCard,
html[data-theme="light"] .reviewRatingBtn,
html[data-theme="light"] .weakFixCard,
html[data-theme="light"] .reviewTodayBody .emptyStudio,
html[data-theme="light"] .weakWordRow,
html[data-theme="light"] .performanceRow,
html[data-theme="light"] .insightCard,
html[data-theme="light"] .aiDeckItem,
html[data-theme="light"] .studioShortcut,
html[data-theme="light"] .apiStateMessage,
html[data-theme="light"] #accuracyTrendChart {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .aiDeckInput textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

html[data-theme="light"] .aiDeckOptions select {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

html[data-theme="light"] .curatedDeckControls input,
html[data-theme="light"] .curatedDeckControls select {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

html[data-theme="light"] .aiDeckField input,
html[data-theme="light"] .aiDeckField select {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

html[data-theme="light"] .aiDeckItem strong {
  color: var(--text);
}

html[data-theme="light"] .xpBar,
html[data-theme="light"] .pressureTrack {
  border-color: var(--line);
  background: rgba(16, 32, 51, 0.09);
}

html[data-theme="light"] .analyticsMetric--feature,
html[data-theme="light"] .analyticsPanel--pressure,
html[data-theme="light"] .analyticsPanel--weak,
html[data-theme="light"] .analyticsPanel--insights,
html[data-theme="light"] .analyticsPanel--performance {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--metric-accent, var(--cyan)), transparent 92%)),
    var(--surface);
}

html[data-theme="light"] .reviewFeedback {
  background: rgba(8, 127, 82, 0.08);
}

html[data-theme="light"] .reviewStateCard--complete {
  background: rgba(8, 127, 82, 0.08);
}

html[data-theme="light"] .trustNote {
  border-color: rgba(8, 127, 82, 0.2);
  background: rgba(8, 127, 82, 0.06);
}

html[data-theme="light"] .selected {
  color: white;
}

@media (max-width: 1320px) {
  .addWordBox,
  .learningDetailsGrid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .formField--primary {
    grid-column: span 3;
  }

  .formField--tag,
  .formField--compact {
    grid-column: span 2;
  }

  .formField--wide,
  .learningDetails .formField--wide {
    grid-column: span 6;
  }

  .learningDetails .formField--primary {
    grid-column: span 3;
  }

  .tableTools {
    grid-template-columns: 1fr;
  }

  .filterCluster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    width: 100%;
  }

  .filterCluster label,
  .filterCluster select,
  .filterCluster .favoriteFilter {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 1180px) {
  .todayFocusPanel,
  .playerHub,
  .studioGrid--profile,
  .quizOptions,
  .analyticsMainGrid,
  .analyticsMainGrid--lower,
  .performanceGrid {
    grid-template-columns: 1fr;
  }

  .todayFocusActions {
    width: 100%;
  }

  .weakWordsCenterHead,
  .reviewSessionOverview,
  .reviewQueueItem {
    grid-template-columns: 1fr;
  }

  .weakWordsCenterHead {
    align-items: flex-start;
    flex-direction: column;
  }

  .reviewActions {
    justify-content: flex-start;
    max-width: none;
  }

  .reviewSessionStats,
  .reviewCompletionStats {
    justify-content: flex-start;
  }

  .analyticsOverviewGrid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .analyticsMetric {
    grid-column: span 2;
  }

  .analyticsMetric--feature {
    grid-column: span 3;
  }

  .practiceActions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learningStudioStrip,
  .badgeGallery,
  .topicDeckGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .focusPanel {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 820px) and (min-width: 981px) {
  body {
    padding-top: 8px;
  }

  .heroPanel {
    min-height: 144px;
    margin-top: 14px;
    margin-bottom: 14px;
    padding: 22px 30px;
  }

  .heroPanel h1 {
    font-size: 3.15rem;
  }

  .dashboardPanel,
  .playerHub,
  .learningStudioStrip,
  .reviewTodayPanel,
  .analyticsDashboard,
  .sectionHeader,
  .addWordBox,
  .tableTools,
  .table-container,
  .quizOptions,
  .practiceActions,
  .wordCountLine {
    width: min(1060px, 100%);
  }

  .dashCard {
    min-height: 78px;
    padding: 14px;
  }

  .dashCard strong {
    font-size: 1.6rem;
  }

  .profilePanel,
  .leaderboardPanel {
    padding: 16px;
  }

  .profileAvatar {
    width: 66px;
    height: 66px;
  }

  .profileTop {
    grid-template-columns: 66px 1fr;
  }

  .addWordBox,
  .quizOptions,
  .tableTools {
    padding: 14px;
  }

  .table-container {
    height: min(430px, 48vh);
  }
}

@media (max-width: 980px) {
  body {
    padding: 10px 10px 44px;
    background-attachment: scroll;
  }

  .emptyStudioActions {
    display: grid;
  }

  .emptyStudioActions .miniBtn,
  .emptyStudioActions .utilityBtn {
    width: 100%;
    min-height: 42px;
  }

  #home,
  #mistakeScreen,
  #reviewScreen,
  #quizScreen,
  #resultScreen,
  .heroPanel {
    width: min(100%, calc(100vw - 20px));
  }

  .utilityBar {
    top: 8px;
    right: auto;
    left: auto;
    justify-content: center;
    flex-wrap: wrap;
    border-radius: var(--radius);
    gap: 6px;
    width: 100%;
    padding: 6px;
    transform: none;
  }

  .appSidebar {
    position: sticky;
    bottom: auto;
    z-index: 8600;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .sidebarBrand {
    display: none;
  }

  .sidebarGroup {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    border-top: 0;
    padding: 0;
  }

  .sidebarGroup--actions {
    margin-top: 0;
    margin-left: auto;
  }

  .sidebarLabel {
    display: none;
  }

  .appSidebar .utilityBtn,
  .appSidebar .miniBtn {
    width: auto;
    white-space: nowrap;
  }

  .appTopbar {
    position: sticky;
    top: 8px;
    right: auto;
    left: auto;
    z-index: 8300;
    margin: 8px 0 10px;
  }

  .appMain {
    width: 100%;
    margin-left: 0;
    padding-top: 0;
  }

  .heroPanel {
    min-height: 154px;
    margin-top: 14px;
    margin-bottom: 14px;
    padding: 24px 18px;
  }

  .heroPanel h1 {
    font-size: 2.65rem;
  }

  .dashboardPanel,
  .todayFocusPanel,
  .startHerePanel,
  .playerHub,
  .learningStudioStrip,
  .aiDeckWorkspaceGrid,
  .reviewTodayPanel,
  .analyticsDashboard,
  .analyticsHero,
  .analyticsOverviewGrid,
  .addWordBox,
  .learningDetailsGrid,
  .profileEditorHeader,
  .previewHeader,
  .previewGrid,
  .previewNotes {
    grid-template-columns: 1fr;
  }

  .startHereSteps,
  .starterDeckPreviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analyticsMetric,
  .analyticsMetric--feature {
    grid-column: auto;
  }

  .previewCard,
  .previewCard--wide {
    grid-column: auto;
  }

  .formField--primary,
  .formField--tag,
  .formField--compact,
  .formField--wide,
  .learningDetails .formField--primary,
  .learningDetails .formField--wide,
  .addActions,
  .addBtn {
    grid-column: auto;
  }

  .profileTop {
    grid-template-columns: 64px 1fr;
  }

  .profileAvatar {
    width: 64px;
    height: 64px;
  }

  .tableTools,
  .searchBox {
    align-items: stretch;
    flex-direction: column;
  }

  #question {
    font-size: 2rem;
    padding: 22px 18px;
  }
}

@media (max-width: 620px) {
  body {
    padding-inline: 8px;
  }

  #home,
  #mistakeScreen,
  #reviewScreen,
  #quizScreen,
  #resultScreen,
  .heroPanel {
    width: min(100%, calc(100vw - 16px));
  }

  .appSidebar {
    align-items: stretch;
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 5px;
  }

  .sidebarGroup {
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 5px;
  }

  .sidebarGroup--actions {
    margin-left: 0;
  }

  .appTopbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .appTopbarStatus {
    justify-content: flex-start;
  }

  .utilityBtn,
  .miniBtn,
  .syncStatus {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .appSidebar .utilityBtn,
  .appSidebar .miniBtn {
    flex: 1 1 auto;
    min-height: 38px;
    padding: 6px 8px;
  }

  .heroPanel {
    min-height: 132px;
    padding: 20px 14px;
  }

  .heroPanel h1 {
    font-size: 2.05rem;
  }

  .todayFocusPanel {
    padding: 14px;
  }

  .todayFocusPanel h2 {
    font-size: 1.55rem;
  }

  .todayFocusActions {
    grid-template-columns: 1fr;
  }

  .startHerePanel {
    padding: 14px;
  }

  .startHereSteps,
  .starterDeckPreviewGrid {
    grid-template-columns: 1fr;
  }

  .startHereActions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .startHereActions .utilityBtn,
  .startHereActions .miniBtn,
  .starterDeckPreviewCard {
    min-height: 46px;
  }

  .heroPanel p {
    font-size: 0.9rem;
  }

  .appFooter {
    display: grid;
    gap: 10px;
    width: min(100%, calc(100vw - 16px));
    margin-top: 12px;
    padding: 12px;
  }

  .appFooter div,
  .appFooter nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .previewPanel {
    max-height: calc(100vh - 24px);
  }

  .previewCard {
    min-height: auto;
  }

  .previewFlow {
    margin: 10px 0;
  }

  .dashboardPanel,
  .analyticsOverviewGrid,
  .practiceActions,
  .learningStudioStrip,
  .badgeGallery,
  .topicDeckGrid,
  #answers,
  .resultStats {
    grid-template-columns: 1fr;
  }

  .addActions,
  .aiDeckActions,
  .aiDeckBulkActions,
  .csvActions,
  .profileFormActions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .addActions .utilityBtn,
  .addActions .miniBtn,
  .addActions .addBtn,
  .aiDeckActions .utilityBtn,
  .aiDeckActions .miniBtn,
  .aiDeckBulkActions .utilityBtn,
  .aiDeckBulkActions .miniBtn,
  .csvActions .utilityBtn,
  .csvActions .miniBtn,
  .profileFormActions > * {
    width: 100%;
    min-height: 44px;
  }

  .addWordBox input,
  .addWordBox select,
  .searchBox input,
  .editingRow input,
  .editingRow select,
  .aiDeckField input,
  .aiDeckField select,
  .aiDeckOptions select,
  #aiDeckText,
  #modeSelect,
  #quizDifficulty,
  #challengeDifficulty {
    min-height: 44px;
    font-size: 16px;
  }

  #aiDeckText {
    min-height: 168px;
  }

  .profileStats,
  .leaderboardHead,
  .xpTrackMeta {
    align-items: flex-start;
    flex-direction: column;
  }

  .sectionHeader h2,
  .profilePanel h2,
  .leaderboardPanel h2 {
    font-size: 1.35rem;
  }

  .addWordBox,
  .quizOptions,
  .profilePanel,
  .leaderboardPanel,
  .studioPanel,
  .profileEditorPanel,
  .previewPanel {
    padding: 14px;
  }

  .tableTools {
    grid-template-columns: 1fr;
    max-width: calc(100vw - 16px);
    padding: 10px;
  }

  .filterCluster {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .filterCluster label,
  .filterCluster select,
  .filterCluster .favoriteFilter {
    width: 100%;
    min-width: 0;
  }

  .clearBtn {
    width: 100%;
    min-height: 44px;
  }

  .table-container {
    width: 100%;
    max-width: calc(100vw - 16px);
    max-height: none;
    overscroll-behavior-x: contain;
  }

  table {
    min-width: 680px;
  }

  .studioPanel {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    padding: 14px;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }

  .studioOverlay,
  .previewOverlay,
  .profileEditorOverlay {
    padding: 12px;
  }

  .studioTabs {
    margin: 14px 0;
    padding: 2px 2px 10px;
    scroll-padding-inline: 4px;
  }

  .studioTab {
    min-height: 44px;
  }

  .studioCard {
    padding: 14px;
  }

  .studioClose,
  .previewClose,
  .profileEditorClose {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
  }

  .studioHeader,
  .studioCardHead,
  .reviewTodayHead,
  .reviewQueueItem,
  .weakWordRow,
  .performanceRow,
  .historyItem {
    align-items: flex-start;
    flex-direction: column;
  }

  .reviewQueueItem,
  .weakWordRow,
  .performanceRow {
    display: flex;
  }

  .aiDeckBulkActions {
    justify-content: flex-start;
  }

  .aiDeckOptions {
    grid-template-columns: 1fr;
  }

  .curatedDeckControls {
    grid-template-columns: 1fr;
  }

  .aiDeckEditGrid {
    grid-template-columns: 1fr;
  }

  .aiDeckItem {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .aiDeckItem > input {
    width: 24px;
    height: 24px;
    margin: 8px 0 0 2px;
  }

  .aiDeckRowActions {
    justify-content: stretch;
  }

  .aiDeckRowActions .miniBtn {
    width: 100%;
    min-height: 44px;
  }

  .weakWordStats,
  .performanceScore {
    white-space: normal;
  }

  .reviewActions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
    width: 100%;
  }

  .reviewActions button {
    min-height: 52px;
    padding-inline: 8px;
  }

  .reviewRatingBtn {
    text-align: center;
  }

  .historyItem {
    display: flex;
  }

  .streakCalendar {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .profileForm {
    grid-template-columns: 1fr;
  }

  .profileFormActions {
    justify-content: stretch;
  }

  .profileFormActions > * {
    flex: 1;
  }

  .homeBtn,
  .logoutBtn {
    min-width: 44px;
    height: 44px;
  }

  .authCluster {
    position: static;
    justify-content: flex-end;
    width: 100%;
    margin: 0 0 8px;
    gap: 8px;
  }

  .logoutBtn {
    display: none;
  }

  .profileTrigger {
    max-width: 150px;
  }

  .previewHeader h2,
  .resultCard h2 {
    font-size: 2rem;
  }

  #quizScreen {
    min-height: auto;
    padding: 28px 0 24px;
  }

  #question {
    width: 100%;
    padding: 18px 16px;
    font-size: 1.8rem;
  }

  #answers {
    width: 100%;
    gap: 10px;
  }

  .answer {
    min-height: 78px;
    padding: 16px;
    font-size: 1rem;
  }

  #progressBar {
    width: 100%;
  }

  .resultCard {
    width: 100%;
    margin-top: 28px;
    padding: 20px;
  }

  #reviewScreen,
  #mistakeScreen {
    padding: 28px 0 30px;
  }

  .reviewTools,
  .reviewList {
    width: 100%;
  }

  .reviewCard {
    padding: 14px;
  }

  .reviewCard h3 {
    margin-right: 0;
  }

  .reviewStatus {
    position: static;
    display: inline-flex;
    margin-bottom: 8px;
  }

  #score {
    font-size: 2.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
