* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

:root {
  --gold: #d4af37;
  --gold-light: #f5d76b;
  --text: #f7f7f7;
  --muted: #9ca3af;
  --glass: rgba(255,255,255,.055);
  --line: rgba(255,255,255,.105);
  --soft: rgba(255,255,255,.08);
}

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(212,175,55,.18), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(120,140,255,.12), transparent 32%),
    linear-gradient(135deg, #030303, #10131b 55%, #000);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
}

body::before {
  width: 500px;
  height: 500px;

  background: rgba(212,175,55,0.18);

  top: -200px;
  left: -150px;
}

body::after {
  width: 450px;
  height: 450px;

  background: rgba(120,140,255,0.15);

  bottom: -200px;
  right: -100px;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

.hidden {
  display: none !important;
}

.glass {
  background: rgba(255,255,255,0.05);

  border: 1px solid rgba(255,255,255,0.10);

  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);

  box-shadow:
    0 30px 90px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.08);

  border-radius: 32px;
}

.brand {
  color: var(--gold);
  letter-spacing: 4px;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
}

h1 {
  font-size: 56px;
  letter-spacing: -2px;
  font-weight: 650;
}

h2 {
  font-size: 25px;
  font-weight: 560;
}

h3 {
  font-size: 22px;
  font-weight: 560;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.muted {
  color: var(--muted);
  margin-top: 8px;
}

input, textarea, select {
  width: 100%;
  background: rgba(255,255,255,.065);
  border: 1px solid var(--line);
  color: white;
  border-radius: 18px;
  padding: 16px;
  outline: none;
  margin-top: 10px;
  margin-bottom: 16px;
}

select option {
  background: #111;
  color: white;
}

textarea {
  min-height: 160px;
  resize: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212,175,55,.12);
}

label {
  color: #dedede;
  font-size: 14px;
}

.primary-btn,
.ghost-btn {
  padding: 14px 22px;
  border-radius: 999px;
  transition: 0.25s ease;
  font-weight: 700;
  white-space: nowrap;
}


.primary-btn {
  background: rgba(255, 255, 255, 0.075);
  color: white;
  border: 1px solid rgba(212, 175, 55, 0.38);
  box-shadow:
    0 10px 30px rgba(212, 175, 55, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}

.primary-btn:hover {
  background: rgba(212, 175, 55, 0.13);
  border-color: rgba(212, 175, 55, 0.65);
  transform: translateY(-2px);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.105);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.145);
  border-color: rgba(212, 175, 55, 0.35);
  transform: translateY(-2px);
}

.compact {
  padding: 10px 16px;
  font-size: 14px;
}

.full {
  width: 100%;
  margin-bottom: 16px;
}

.primary-btn.full {
  height: 56px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.use-btn {
  position: relative;
  overflow: hidden;

  background: rgba(255,255,255,.06);

  border: 1px solid rgba(255,255,255,.08);

  color: white;

  transition: all .3s ease;
}

.use-btn:hover {
  border-color: rgba(212,175,55,.4);

  box-shadow:
    0 10px 25px rgba(212,175,55,.12);

  transform: translateY(-1px);
}

.use-btn::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      120deg,
      transparent,
      rgba(255,255,255,.12),
      transparent
    );

  transform: translateX(-120%);
}

.use-btn:hover::before {
  transition: transform .7s ease;
  transform: translateX(120%);
}

.use-btn:hover {
  border-color: rgba(212,175,55,.55);
  box-shadow: 0 0 25px rgba(212,175,55,.18);
}

.use-btn:active {
  transform: scale(.96);
}

.use-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.25), transparent);
  transform: translateX(-100%);
}

.use-btn:hover::after {
  animation: shimmer .75s ease;
}

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

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  padding: 32px;
}

.auth-hero,
.auth-card {
  padding: 46px;
  animation: rise .75s ease both;
}

.auth-hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.auth-card {
  min-height: calc(100vh - 64px);
  max-width: none;
  width: 100%;
  justify-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-hero h1 {
  font-size: clamp(48px, 6vw, 86px);
  line-height: 0.95;
  letter-spacing: -4px;
  margin: 16px 0 14px;

  background: linear-gradient(135deg, #ffffff, #f5d76b);
  background-clip: text;
  -webkit-background-clip: text;

  color: transparent;
  -webkit-text-fill-color: transparent;
}

.auth-hero h1 {
  font-size: 72px;
  line-height: 1;
  letter-spacing: -3px;

  background: linear-gradient(
    135deg,
    #ffffff,
    #f5d76b
  );

  background-clip: text;
  -webkit-background-clip: text;

  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 38px;
}

.hero-metrics div {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
}

.hero-metrics span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 8px;
}

.social-login {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.social-login button {
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.075);
  color: white;
  border: 1px solid var(--line);
}

.divider {
  text-align: center;
  color: var(--muted);
  margin: 20px 0;
  font-size: 13px;
}

.switch-text {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
}

.switch-text span {
  color: var(--gold);
  cursor: pointer;
}

.app-page {
  min-height: 100vh;
  padding: 34px;
}

.topbar {
  max-width: 1320px;
  margin: 0 auto 24px;
  padding: 20px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding-left: 90px;
}

.topbar p {
  font-size: 13px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-link {
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
}

.nav-link.active, .nav-link:hover {
  color: white;
  background: rgba(255,255,255,.08);
  border-color: var(--line);
}

.layout {
  max-width: 1320px;
  margin: auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

.sidebar {
  padding: 24px;
  height: max-content;
  position: sticky;
  top: 24px;
}

.stat-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.055);
  margin-top: 12px;
}

.stat-card strong {
  font-size: 28px;
  color: var(--gold);
}

.stat-card span {
  color: var(--gold);
  font-size: 14px;
}

.content {
  padding: 32px;
  min-height: 700px;
}

.page {
  display: none;
}

.active-page {
  display: block;
  animation: fadeSlide .35s ease both;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.page-subtitle {
  margin-top: 10px;
  margin-bottom: 28px;
}

.dashboard-grid, .settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.feature-card, .insight-card, .settings-panel, .chart-card {
  padding: 25px;
  border-radius: 28px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: white;
  text-align: left;
  transition: .3s ease;
}

.feature-card {
  min-height: 210px;
}

.feature-card:hover, .insight-card:hover, .settings-panel:hover, .chart-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212,175,55,.42);
  background: rgba(255,255,255,.075);
}

.feature-card span {
  color: var(--gold);
  font-size: 13px;
}

.feature-card h2 {
  margin: 20px 0 10px;
}

.panel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.form-panel {
  max-width: 720px;
}

.inline-notice {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(212,175,55,.28);
  background: rgba(212,175,55,.08);
  margin-bottom: 16px;
}

.inline-notice strong {
  display: block;
  margin-bottom: 6px;
}

.inline-notice span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.card-scene {
  height: 430px;
  perspective: 1500px;
  margin-top: 24px;
}

.flashcard {
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: .78s cubic-bezier(.2,.7,.2,1);
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard.speaking {
  animation: cardPulse .9s ease;
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px;
  font-size: 42px;
  line-height: 1.25;
  background:
    radial-gradient(circle at 30% 20%, rgba(212,175,55,.15), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.035));
  border: 1px solid var(--line);
  box-shadow: inset 0 0 50px rgba(255,255,255,.035), 0 28px 85px rgba(0,0,0,.35);
}

.card-back {
  transform: rotateY(180deg);
  font-size: 28px;
}

.review-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.review-notice {
  margin-top: 20px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(212,175,55,.28);
  background: rgba(212,175,55,.08);
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.notice-actions {
  display: flex;
  gap: 10px;
}

.word-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.word-item {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.word-item small {
  color: var(--muted);
}

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

.badge {
  color: var(--gold);
  font-size: 13px;
  margin-left: 8px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 24px;
}

.chart-card.wide {
  grid-column: 1 / -1;
}

canvas {
  width: 100%;
  height: 270px;
  background: rgba(255,255,255,.025);
  border-radius: 22px;
  margin-top: 16px;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.summary-row div {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
}

.summary-row span {
  color: var(--gold);
  font-size: 32px;
  font-weight: 700;
}

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

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(15,15,18,.92);
  border: 1px solid rgba(212,175,55,.25);
  color: white;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: .35s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.62);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 24px;
}

.modal-card {
  width: min(620px, 100%);
  padding: 28px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardPulse {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  40% { transform: translateY(-6px) scale(1.01); filter: brightness(1.12); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@media (max-width: 1000px) {
  .auth-page, .layout, .analytics-grid, .settings-grid, .panel-row {
    grid-template-columns: 1fr;
  }

  .auth-card {
    justify-self: stretch;
    max-width: none;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .sidebar {
    position: static;
  }

  h1 {
    font-size: 40px;
  }

  .dashboard-grid, .summary-row, .hero-metrics {
    grid-template-columns: 1fr;
  }

  .card-face {
    font-size: 32px;
  }

  .card-back {
    font-size: 22px;
  }

  .card-scene {
    height: 330px;
  }
}

@media (max-width: 620px) {
  .auth-page, .app-page {
    padding: 18px;
  }

  .auth-hero, .auth-card, .content {
    padding: 24px;
  }

  h1 {
    font-size: 34px;
  }

  .section-head {
    flex-direction: column;
  }

  .word-item {
    flex-direction: column;
  }
}

.fade-out {
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: 0.3s ease;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
  max-height: 260px;
  transition: 0.3s ease;
}

.glass {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);

  box-shadow:
    0 25px 80px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.08);

  border-radius: 32px;
}

.queue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 24px;
}

.queue-card {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line);
}

.queue-card h2 {
  margin-bottom: 14px;
}

.queue-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
}

.queue-item strong {
  display: block;
  margin-bottom: 6px;
}

.queue-item small {
  color: var(--muted);
}

@media (max-width: 1000px) {
  .queue-grid {
    grid-template-columns: 1fr;
  }
}

.session-complete {
  margin-top: 24px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(212,175,55,.25);
  animation: fadeSlide .35s ease both;
}

.session-complete h2 {
  margin-bottom: 8px;
}

.session-complete .summary-row {
  margin-top: 22px;
  margin-bottom: 22px;
}

.detail-modal {
  max-width: 760px;
}

.detail-meaning {
  margin: 24px 0;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
}

.detail-meaning p {
  color: white;
  font-size: 18px;
  line-height: 1.7;
}

.landing-view {
  min-height: 100vh;
  padding: 34px;
}

.landing-nav {
  max-width: 1320px;
  margin: 0 auto 40px;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-actions {
  display: flex;
  gap: 12px;
}

.landing-hero {
  max-width: 1320px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 34px;
  align-items: center;
  min-height: 560px;
}

.landing-copy h1 {
  font-size: 78px;
  line-height: .95;
  letter-spacing: -4px;
  margin: 18px 0;
  background: linear-gradient(135deg, #fff, #f5d76b);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.landing-copy p {
  max-width: 650px;
  font-size: 18px;
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.landing-preview {
  padding: 28px;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.preview-card {
  padding: 34px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 30% 20%, rgba(212,175,55,.18), transparent 35%),
    rgba(255,255,255,.055);
  border: 1px solid var(--line);
}

.preview-card span {
  color: var(--gold);
  font-size: 13px;
}

.preview-card h2 {
  font-size: 46px;
  margin: 18px 0 8px;
}

.preview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.preview-row div {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
}

.preview-row strong {
  color: var(--gold);
  font-size: 34px;
}

.landing-features {
  max-width: 1320px;
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.auth-form-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 30px;
  align-items: center;
  padding: 40px;
}

@media (max-width: 1000px) {
  .landing-hero,
  .landing-features,
  .auth-form-view {
    grid-template-columns: 1fr;
  }

  .landing-copy h1 {
    font-size: 48px;
  }

  .landing-view {
    padding: 18px;
  }
}

@media (max-width: 760px) {

  body {
    overflow-x: hidden;
  }

  .auth-page {
    display: block;
    padding: 16px;
  }

  .auth-hero,
  .auth-card {
    min-height: auto;
    padding: 26px;
    border-radius: 28px;
  }

  .auth-hero {
    margin-bottom: 16px;
  }

  .auth-hero h1 {
    font-size: 44px;
    line-height: 0.95;
    letter-spacing: -2px;
  }

  .auth-hero p {
    font-size: 14px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    margin-top: 22px;
  }

  .hero-metrics div {
    padding: 14px;
  }

  .app-page {
    padding: 14px;
    padding-bottom: 88px;
  }

  .topbar {
    border-radius: 26px;
    padding: 18px;
  }

  .topbar nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 40;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;

    padding: 10px;
    border-radius: 28px;

    background: rgba(10,10,14,.82);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    box-shadow: 0 20px 60px rgba(0,0,0,.55);
  }

  .nav-link,
  .topbar .ghost-btn {
    padding: 10px 8px;
    font-size: 11px;
    border-radius: 18px;
    text-align: center;
  }

  .topbar .ghost-btn {
    display: none;
  }

  .nav-link:nth-of-type(4),
  .nav-link:nth-of-type(6),
  .nav-link:nth-of-type(7) {
  display: none;
  } 

  .nav-link.active {
    background: rgba(212,175,55,.16);
    border-color: rgba(212,175,55,.45);
    color: white;
    box-shadow: 0 0 18px rgba(212,175,55,.12);
  }

  .content-layout {
    max-width: 1320px;
    margin: auto;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 16px;
    margin-bottom: 14px;
    border-radius: 26px;
  }

  .sidebar h3 {
    grid-column: 1 / -1;
  }

  .stat-card {
    margin-top: 0;
    padding: 14px;
    border-radius: 18px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .content {
  padding: 32px;
  min-height: 700px;
 }

  h1 {
    font-size: 34px;
    letter-spacing: -1.5px;
  }

  h2 {
    font-size: 21px;
  }

  .section-head {
    flex-direction: column;
    gap: 14px;
  }

  .dashboard-grid,
  .panel-row,
  .settings-grid,
  .analytics-grid,
  .summary-row,
  .queue-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .insight-card,
  .settings-panel,
  .chart-card,
  .queue-card {
    padding: 20px;
    border-radius: 24px;
  }

  .card-scene {
    height: 300px;
  }

  .card-face {
    font-size: 28px;
    padding: 28px;
    border-radius: 28px;
  }

  .card-back {
    font-size: 20px;
  }

  .review-actions,
  .notice-actions,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
    padding: 14px 18px;
  }

  .word-item {
    flex-direction: column;
    gap: 14px;
  }

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

  .modal {
    padding: 14px;
  }

  .modal-card {
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 28px;
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: 90px;
    text-align: center;
  }

  .nav-link.active {
    background: rgba(212,175,55,.16);
    border-color: rgba(212,175,55,.45);
    color: white;
    box-shadow: 0 0 18px rgba(212,175,55,.12);
  }

  .form-panel {
    max-width: 100%;
  }
  
  .form-panel label {
    display: block;
    margin-top: 8px;
    margin-bottom: 2px;
    font-size: 13px;
    color: rgba(255,255,255,.78);
  }
  
  #wordInput {
    font-size: 20px;
    font-weight: 600;
  }
  
  #meaningInput {
    min-height: 130px;
  }
  
  #definitionResults .word-item {
    padding: 16px;
    border-radius: 20px;
  }
  
  #definitionResults .word-item .use-btn {
    width: 100%;
  }
  
  .inline-notice {
    padding: 14px;
    border-radius: 20px;
  }
  
  .inline-notice div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .inline-notice .ghost-btn {
    width: 100%;
  }

  #review .section-head {
    gap: 10px;
  }
  
  #review .section-head .ghost-btn {
    width: 100%;
  }
  
  .card-scene {
    height: 360px;
    margin-top: 18px;
  }
  
  .card-face {
    font-size: 30px;
    padding: 26px;
  }
  
  .card-back {
    font-size: 21px;
    line-height: 1.55;
  }
  
  .review-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .review-actions .primary-btn,
  .review-actions .ghost-btn {
    width: 100%;
    height: 54px;
  }
  
  .review-notice {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }
  
  .notice-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  
  .session-complete {
    padding: 22px;
    border-radius: 24px;
  }
  
  .session-complete .summary-row {
    grid-template-columns: 1fr;
  }

  #library input {
    height: 52px;
    font-size: 15px;
  }
  
  .word-list {
    gap: 10px;
  }
  
  .word-item {
    padding: 16px;
    border-radius: 22px;
  }
  
  .word-item strong {
    font-size: 20px;
    letter-spacing: -0.3px;
  }
  
  .word-item small {
    display: block;
    margin-top: 6px;
    line-height: 1.45;
  }
  
  .badge {
    display: inline-block;
    margin-left: 0;
    margin-top: 6px;
  }
  
  .word-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .word-actions .ghost-btn {
    height: 46px;
    font-size: 13px;
  }

  .auth-page {
    display: block;
    padding: 14px;
  }
  
  .auth-hero {
    min-height: auto;
    padding: 28px;
    margin-bottom: 16px;
  }
  
  .auth-hero h1 {
    font-size: 44px;
    line-height: 0.95;
    letter-spacing: -2px;
    margin: 14px 0;
  }
  
  .auth-hero p {
    font-size: 15px;
    line-height: 1.5;
  }
  
  .landing-cta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 26px;
  }
  
  .landing-cta .primary-btn,
  .landing-cta .ghost-btn {
    width: 100%;
    height: 58px;
  }
  
  
  
  .auth-card {
    min-height: auto;
    padding: 28px;
    margin-top: 16px;
  }
  
  .auth-card input {
    height: 56px;
  }
  
  .auth-card .primary-btn,
  .auth-card .ghost-btn,
  .auth-card .social-login button {
    height: 56px;
  }

  .auth-card {
    display: flex !important;
    min-height: auto !important;
    margin-top: 18px !important;
  }
  
  .auth-page {
    overflow-y: auto !important;
  }
  
  body {
    overflow-y: auto !important;
  }
}

.menu-btn {
  position: absolute;
  top: 24px;
  left: 24px;

  width: 46px;
  height: 46px;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);

  background: rgba(255,255,255,.05);
  color: white;

  font-size: 22px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 10001;
}

.side-menu {
  position: fixed;

  top: 0;
  left: -320px;

  width: 300px;
  height: 100vh;

  z-index: 9999;

  padding: 100px 20px 20px;

  background:
    linear-gradient(
      180deg,
      rgba(20,22,35,.98),
      rgba(12,14,22,.98)
    );

  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);

  border-right: 1px solid rgba(255,255,255,.08);

  transition: left .3s ease;

  display: flex;
  flex-direction: column;
  gap: 10px;

  box-shadow:
    30px 0 80px rgba(0,0,0,.45);
}

#menuOverlay {
  position: fixed;
  inset: 0;

  background: rgba(0,0,0,.45);

  opacity: 0;
  pointer-events: none;

  transition: .3s;

  z-index: 9998;
}

#menuOverlay.open {
  opacity: 1;
  pointer-events: auto;
}

.side-menu.open {
  left: 0;
}

.side-menu button {
  width: 100%;

  padding: 16px 18px;

  border-radius: 18px;

  border: 1px solid rgba(255,255,255,.06);

  background: rgba(255,255,255,.04);

  color: white;

  text-align: left;

  font-size: 16px;

  cursor: pointer;

  transition: .2s;
}

.side-menu button:hover {
  background: rgba(212,175,55,.12);
  border-color: rgba(212,175,55,.3);
}


.side-menu.open {
  left: 0;
}

.side-menu button {
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: rgba(255,255,255,.05);
  color: white;
  text-align: left;
  cursor: pointer;
}

#sideMenu {
  position: fixed !important;
  top: 0 !important;
  left: -280px !important;
  width: 260px !important;
  height: 100vh !important;

  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;

  padding: 80px 20px 20px !important;

  background: #0f1117 !important;
  border-right: 1px solid rgba(255,255,255,.08) !important;

  transition: left .3s ease !important;
  z-index: 1000 !important;
}

#sideMenu.open {
  left: 0 !important;
}

#sideMenu button {
  display: block !important;
  width: 100% !important;
  padding: 14px !important;
  border-radius: 14px !important;

  background: rgba(255,255,255,.05) !important;
  color: white !important;
  border: 1px solid rgba(255,255,255,.08) !important;

  text-align: left !important;
}

/* FINAL MENU FIX */

.topbar {
  position: relative !important;
  padding-left: 92px !important;
}

.menu-btn {
  position: absolute !important;
  top: 24px !important;
  left: 24px !important;

  width: 46px !important;
  height: 46px !important;

  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,.12) !important;

  background: rgba(255,255,255,.06) !important;
  color: white !important;

  font-size: 22px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  z-index: 10001 !important;
}

#sideMenu {
  position: fixed !important;
  top: 0 !important;
  left: -320px !important;

  width: 300px !important;
  height: 100vh !important;

  z-index: 9999 !important;

  padding: 100px 20px 20px !important;

  background:
    linear-gradient(
      180deg,
      rgba(25,27,40,.98),
      rgba(10,12,20,.98)
    ) !important;

  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px) !important;

  border-right: 1px solid rgba(255,255,255,.1) !important;

  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;

  transition: left .3s ease !important;
}

#sideMenu.open {
  left: 0 !important;
}

#sideMenu button {
  width: 100% !important;
  padding: 16px 18px !important;

  border-radius: 18px !important;
  border: 1px solid rgba(255,255,255,.08) !important;

  background: rgba(255,255,255,.055) !important;
  color: white !important;

  text-align: left !important;
  font-size: 16px !important;
}

.mobile-settings-btn {
  display: none !important;
}

/* RIGHT DRAWER MENU FINAL FIX */

.topbar {
  position: relative !important;
  padding-right: 92px !important;
  padding-left: 26px !important;
}

.menu-btn {
  position: absolute !important;
  top: 24px !important;
  right: 24px !important;
  left: auto !important;

  width: 46px !important;
  height: 46px !important;

  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,.12) !important;

  background: rgba(255,255,255,.06) !important;
  color: white !important;

  font-size: 22px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  z-index: 10001 !important;
}

#sideMenu {
  position: fixed !important;

  top: 0 !important;
  right: -320px !important;
  left: auto !important;

  width: 300px !important;
  height: 100vh !important;

  z-index: 9999 !important;

  padding: 100px 20px 20px !important;

  background:
    linear-gradient(
      180deg,
      rgba(25,27,40,.98),
      rgba(10,12,20,.98)
    ) !important;

  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px) !important;

  border-left: 1px solid rgba(255,255,255,.1) !important;
  border-right: none !important;

  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;

  box-shadow: -30px 0 80px rgba(0,0,0,.45) !important;

  transition: right .3s ease !important;
}

#sideMenu.open {
  right: 0 !important;
  left: auto !important;
}

#sideMenu button {
  width: 100% !important;
  padding: 16px 18px !important;

  border-radius: 18px !important;
  border: 1px solid rgba(255,255,255,.08) !important;

  background: rgba(255,255,255,.055) !important;
  color: white !important;

  text-align: left !important;
  font-size: 16px !important;
}

/* FINAL RIGHT MENU ALIGNMENT + LAYER FIX */

.topbar {
  position: relative !important;
  overflow: visible !important;
  padding-right: 88px !important;
}

.menu-btn {
  position: absolute !important;
  top: 50% !important;
  right: 24px !important;
  left: auto !important;
  transform: translateY(-50%) !important;

  width: 48px !important;
  height: 48px !important;

  border-radius: 16px !important;
  z-index: 2147483647 !important;
}

#sideMenu {
  z-index: 2147483646 !important;
}

#menuOverlay {
  z-index: 2147483645 !important;
}

.content,
.content-layout,
.app-page,
.page,
.active-page,
.glass {
  position: relative;
  z-index: auto !important;
}

body > #sideMenu {
  z-index: 2147483647 !important;
}

body > #menuOverlay {
  z-index: 2147483646 !important;
}

.hello-card {
  margin-bottom: 28px;
  padding: 26px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(212,175,55,.12), transparent 34%),
    rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
}

.hello-card p {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hello-card h1 {
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -2.5px;
}

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

.desktop-nav button {
  padding: 11px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.045);
  color: white;
  transition: .25s ease;
}

.desktop-nav button:hover {
  background: rgba(212,175,55,.12);
  border-color: rgba(212,175,55,.35);
  transform: translateY(-1px);
}

@media (min-width: 761px) {
  .menu-btn {
    display: none !important;
  }

  #sideMenu,
  #menuOverlay {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .desktop-nav {
    display: none !important;
  }
}

.menu-close-btn {
  color: var(--gold) !important;
  border-color: rgba(212,175,55,.25) !important;
}

.mobile-back-btn {
  display: none;
}

@media (max-width: 760px) {
  .mobile-back-btn {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: white;
    border: 1px solid rgba(255,255,255,.1);
  }
}

#sideMenu {
  background:
    radial-gradient(circle at 85% 8%, rgba(212,175,55,.18), transparent 32%),
    radial-gradient(circle at 20% 92%, rgba(90,120,255,.10), transparent 34%),
    linear-gradient(180deg, rgba(26,28,39,.96), rgba(8,10,18,.98)) !important;

  border-left: 1px solid rgba(255,255,255,.12) !important;

  box-shadow:
    -36px 0 100px rgba(0,0,0,.62),
    inset 1px 0 0 rgba(255,255,255,.06) !important;

  backdrop-filter: blur(34px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(34px) saturate(140%) !important;
}

#sideMenu button {
  background:
    linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.035)) !important;

  border: 1px solid rgba(255,255,255,.095) !important;

  color: rgba(255,255,255,.92) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 10px 28px rgba(0,0,0,.18) !important;

  transition: .25s ease !important;
}

#sideMenu button:hover {
  background:
    linear-gradient(135deg, rgba(212,175,55,.18), rgba(255,255,255,.045)) !important;

  border-color: rgba(212,175,55,.38) !important;

  transform: translateX(-2px) !important;
}

#menuOverlay {
  background: rgba(0,0,0,.52) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(8px);
}

.tutorial-card {
  width: min(560px, 100%);
  padding: 34px;
}

.tutorial-card h2 {
  margin: 14px 0 10px;
}

.tutorial-card p {
  font-size: 17px;
}

.tutorial-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .tutorial-card {
    padding: 26px;
    border-radius: 28px;
  }

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

.tutorial-shade {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.36);
  z-index: 2147483600;
  pointer-events: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.tutorial-highlight {
  position: relative !important;
  z-index: 2147483647 !important;

  outline: 3px solid rgba(255, 223, 105, .95) !important;
  outline-offset: 4px !important;

  border-color: rgba(255, 223, 105, .95) !important;

  box-shadow:
    0 0 0 6px rgba(212,175,55,.32),
    0 0 32px rgba(255,223,105,.75),
    0 0 90px rgba(245,215,107,.45) !important;

  animation: tutorialJump 1s ease-in-out infinite !important;
}

@keyframes tutorialJump {
  0% {
    transform: translateY(0) scale(1);
  }

  40% {
    transform: translateY(-7px) scale(1.035);
  }

  70% {
    transform: translateY(2px) scale(.995);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes tutorialDance {
  0% {
    transform: translateY(0) scale(1);
  }

  35% {
    transform: translateY(-4px) scale(1.025);
  }

  70% {
    transform: translateY(2px) scale(.995);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

.tutorial-bubble {
  position: fixed;
  z-index: 2147483647;
  width: min(360px, calc(100vw - 32px));
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(212,175,55,.18), transparent 35%),
    rgba(18,20,30,.96);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}

.tutorial-bubble h2 {
  margin: 10px 0 8px;
}

.tutorial-bubble p {
  font-size: 15px;
}

.tutorial-bubble-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .tutorial-bubble {
    left: 14px !important;
    right: 14px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 24px;
  }

  .tutorial-bubble.top {
    top: 16px !important;
    bottom: auto !important;
  }

  .tutorial-bubble.bottom {
    bottom: 16px !important;
    top: auto !important;
  }
}

.review-today-btn {
  width: auto;
  min-width: 160px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,.38);
  background: rgba(255,255,255,.075);
  color: white;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(212,175,55,.12);
}

.review-today-btn:hover {
  background: rgba(212,175,55,.13);
  border-color: rgba(212,175,55,.65);
}

@media (max-width: 760px) {
  .review-today-btn {
    width: 100%;
    height: 52px;
  }
}

.review-today-btn {
  width: auto;
  min-width: 160px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,.38);
  background: rgba(255,255,255,.075);
  color: white;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(212,175,55,.12);
}

.review-today-btn:hover {
  background: rgba(212,175,55,.13);
  border-color: rgba(212,175,55,.65);
}

@media (max-width: 760px) {
  .review-today-btn {
    width: 100%;
    height: 52px;
  }
}

/* FINAL TUTORIAL + ADD WORD POLISH */

.tutorial-highlight {
  position: relative !important;
  z-index: 2147483647 !important;
  border-color: rgba(245,215,107,.95) !important;
  box-shadow:
    0 0 0 4px rgba(212,175,55,.42),
    0 0 35px rgba(212,175,55,.55),
    0 0 80px rgba(245,215,107,.35) !important;
  animation: tutorialDance 1.2s ease-in-out infinite !important;
}

@keyframes tutorialDance {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-4px) scale(1.025); }
  70% { transform: translateY(2px) scale(.995); }
  100% { transform: translateY(0) scale(1); }
}

.tutorial-bubble {
  max-width: 340px !important;
  padding: 18px !important;
}

.tutorial-bubble-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

#add {
  max-width: 760px;
  margin: 0 auto;
}

#add .form-panel {
  width: 100%;
  margin: 0 auto;
}

.review-today-btn {
  width: auto;
  min-width: 150px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,.38);
  background: rgba(255,255,255,.075);
  color: white;
  font-weight: 700;
}

@media (max-width: 760px) {
  .tutorial-bubble {
    left: 14px !important;
    right: 14px !important;
    width: auto !important;
    max-width: none !important;
  }

  .tutorial-bubble.top {
    top: 14px !important;
    bottom: auto !important;
  }

  .tutorial-bubble.bottom {
    bottom: 14px !important;
    top: auto !important;
  }

  #add {
    max-width: none;
  }

  #meaningInput {
    min-height: 110px;
  }

  .review-today-btn {
    width: 100%;
    height: 50px;
  }
}

/* CADENCE IVORY MODE */

body.light-mode {
  --text: #17130d;
  --muted: #6f675b;
  --gold: #9f7416;
  --gold-light: #c99a2e;
  --glass: rgba(255, 252, 244, 0.86);
  --line: rgba(65, 50, 25, 0.12);
  --soft: rgba(65, 50, 25, 0.055);

  color: var(--text);

  background:
    radial-gradient(circle at 14% 4%, rgba(201,154,46,.18), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(120,135,180,.10), transparent 32%),
    linear-gradient(135deg, #efe3cf 0%, #fffaf0 42%, #f4efe4 100%) !important;
}

body.light-mode .glass,
body.light-mode .content,
body.light-mode .topbar,
body.light-mode .auth-card,
body.light-mode .auth-hero,
body.light-mode .hello-card,
body.light-mode .feature-card,
body.light-mode .insight-card,
body.light-mode .settings-panel,
body.light-mode .chart-card,
body.light-mode .queue-card,
body.light-mode .word-item,
body.light-mode .modal-card,
body.light-mode .session-complete,
body.light-mode .tutorial-bubble {
  background:
    linear-gradient(
      145deg,
      rgba(255, 252, 244, .92),
      rgba(246, 237, 220, .76)
    ) !important;

  color: #17130d !important;
  border: 1px solid rgba(65, 50, 25, .12) !important;

  box-shadow:
    0 22px 60px rgba(72, 55, 28, .10),
    inset 0 1px 0 rgba(255,255,255,.85) !important;

  backdrop-filter: blur(20px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(120%) !important;
}

body.light-mode .content {
  box-shadow:
    0 28px 85px rgba(72, 55, 28, .12),
    inset 0 1px 0 rgba(255,255,255,.9) !important;
}

body.light-mode p,
body.light-mode small,
body.light-mode .muted,
body.light-mode .page-subtitle {
  color: #6f675b !important;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode strong,
body.light-mode label {
  color: #17130d !important;
}

body.light-mode .auth-hero h1,
body.light-mode .hello-card h1 {
  background: linear-gradient(135deg, #17130d, #9f7416);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

body.light-mode .brand,
body.light-mode .badge,
body.light-mode .summary-row span,
body.light-mode .stat-card strong,
body.light-mode .hello-card p {
  color: #9f7416 !important;
}

body.light-mode input,
body.light-mode textarea,
body.light-mode select {
  background: #fffaf0 !important;
  color: #17130d !important;
  border: 1px solid rgba(65, 50, 25, .14) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 8px 24px rgba(72,55,28,.055) !important;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
  color: #9b9285 !important;
}

body.light-mode .primary-btn,
body.light-mode .ghost-btn,
body.light-mode .desktop-nav button,
body.light-mode .social-login button,
body.light-mode .review-today-btn,
body.light-mode .mobile-back-btn {
  background:
    linear-gradient(
      145deg,
      rgba(255,250,240,.96),
      rgba(241,231,211,.82)
    ) !important;

  color: #17130d !important;
  border: 1px solid rgba(65, 50, 25, .13) !important;

  box-shadow:
    0 10px 26px rgba(72,55,28,.08),
    inset 0 1px 0 rgba(255,255,255,.85) !important;
}

body.light-mode .primary-btn:hover,
body.light-mode .ghost-btn:hover,
body.light-mode .desktop-nav button:hover,
body.light-mode .review-today-btn:hover {
  background:
    linear-gradient(
      145deg,
      rgba(201,154,46,.17),
      rgba(255,250,240,.9)
    ) !important;

  border-color: rgba(159,116,22,.34) !important;
}

body.light-mode .card-face {
  background:
    radial-gradient(circle at 25% 18%, rgba(201,154,46,.16), transparent 36%),
    linear-gradient(145deg, #fffaf0, #f1e7d3) !important;

  color: #17130d !important;
  border: 1px solid rgba(65,50,25,.12) !important;

  box-shadow:
    0 26px 68px rgba(72,55,28,.12),
    inset 0 1px 0 rgba(255,255,255,.9) !important;
}

body.light-mode .detail-meaning,
body.light-mode .inline-notice,
body.light-mode .review-notice,
body.light-mode .queue-item {
  background: rgba(255,250,240,.82) !important;
  border-color: rgba(159,116,22,.18) !important;
  color: #17130d !important;
}

body.light-mode #sideMenu {
  background:
    radial-gradient(circle at 85% 8%, rgba(201,154,46,.22), transparent 32%),
    linear-gradient(180deg, rgba(255,250,240,.98), rgba(239,228,207,.98)) !important;

  border-left: 1px solid rgba(65,50,25,.13) !important;
}

body.light-mode #sideMenu button {
  background: rgba(255,250,240,.84) !important;
  color: #17130d !important;
  border-color: rgba(65,50,25,.12) !important;
}

body.light-mode #menuOverlay,
body.light-mode .tutorial-shade {
  background: rgba(239,228,207,.55) !important;
  backdrop-filter: blur(5px) !important;
}

body.light-mode .toast {
  background: rgba(255,250,240,.96) !important;
  color: #17130d !important;
  border-color: rgba(159,116,22,.25) !important;
}

/* MOBILE TUTORIAL PROFESSIONAL FIX */

@media (max-width: 760px) {
  .tutorial-bubble {
    width: min(310px, calc(100vw - 32px)) !important;
    left: 16px !important;
    right: auto !important;
    padding: 16px !important;
    border-radius: 22px !important;
  }

  .tutorial-bubble.top {
    top: 16px !important;
    bottom: auto !important;
  }

  .tutorial-bubble.bottom {
    bottom: 16px !important;
    top: auto !important;
  }

  .tutorial-bubble h2 {
    font-size: 19px !important;
  }

  .tutorial-bubble p {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  .tutorial-bubble-actions {
    margin-top: 12px !important;
  }
}

/* PROFESSIONAL MOBILE TUTORIAL BUBBLE */

@media (max-width: 760px) {
  .tutorial-bubble {
    width: min(300px, calc(100vw - 38px)) !important;
    max-width: 300px !important;

    padding: 14px 15px !important;
    border-radius: 20px !important;

    left: auto !important;
    right: 16px !important;

    box-shadow:
      0 18px 55px rgba(0,0,0,.55),
      inset 0 1px 0 rgba(255,255,255,.08) !important;
  }

  .tutorial-bubble.top {
    top: 14px !important;
    bottom: auto !important;
  }

  .tutorial-bubble.bottom {
    bottom: 14px !important;
    top: auto !important;
  }

  .tutorial-bubble h2 {
    font-size: 17px !important;
    margin: 8px 0 6px !important;
  }

  .tutorial-bubble p {
    font-size: 13px !important;
    line-height: 1.42 !important;
  }

  .tutorial-bubble .brand {
    font-size: 10px !important;
    letter-spacing: 2px !important;
  }

  .tutorial-bubble-actions {
    margin-top: 10px !important;
  }

  .tutorial-bubble-actions button {
    height: 40px !important;
    padding: 8px 14px !important;
  }
}

.speaker-btn {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  margin: 0 0 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.04));

  border: 1px solid rgba(255,255,255,.12);
  color: white;

  font-size: 22px;

  box-shadow:
    0 12px 30px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.08);

  transition: .25s ease;
}

.speaker-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(212,175,55,.45);
  box-shadow:
    0 16px 38px rgba(212,175,55,.14),
    inset 0 1px 0 rgba(255,255,255,.1);
}

body.light-mode .speaker-btn {
  background: rgba(255,250,240,.9) !important;
  color: #17130d !important;
  border-color: rgba(65,50,25,.13) !important;
}

/* THREE MODE THEME SWITCHER */

.theme-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 18px;
}

.theme-switcher button {
  position: relative;
  min-height: 92px;
  padding: 16px 12px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.055);
  color: white;
  font-weight: 700;
  overflow: hidden;
  transition: .28s ease;
}

.theme-switcher button span {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  margin: 0 auto 10px;
  border: 1px solid rgba(255,255,255,.16);
}

#themeDarkBtn span {
  background: linear-gradient(135deg, #050505, #272b38);
}

#themeIvoryBtn span {
  background: linear-gradient(135deg, #fff8e9, #e8d8ba);
}

#themeGlassBtn span {
  background:
    radial-gradient(circle at 30% 20%, rgba(245,215,107,.95), transparent 35%),
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(212,175,55,.28));
}

.theme-switcher button:hover,
.theme-switcher button.active-theme {
  transform: translateY(-3px);
  border-color: rgba(212,175,55,.55);
  box-shadow:
    0 18px 44px rgba(212,175,55,.18),
    inset 0 1px 0 rgba(255,255,255,.1);
}

.theme-switcher button.active-theme::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent, rgba(245,215,107,.16), transparent);
  pointer-events: none;
}

/* GLASS GOLD MODE */

body.glass-mode {
  --text: #fff9df;
  --muted: rgba(255,249,223,.68);
  --gold: #f5d76b;
  --gold-light: #fff2a8;
  --glass: rgba(255,255,255,.075);
  --line: rgba(245,215,107,.20);
  --soft: rgba(245,215,107,.08);

  color: var(--text);

  background:
    radial-gradient(circle at 10% 4%, rgba(245,215,107,.26), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(255,255,255,.10), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(212,175,55,.16), transparent 42%),
    linear-gradient(135deg, #030303 0%, #12100b 42%, #050505 100%) !important;
}

body.glass-mode::before {
  background: rgba(245,215,107,.22) !important;
}

body.glass-mode::after {
  background: rgba(255,255,255,.08) !important;
}

body.glass-mode .glass,
body.glass-mode .content,
body.glass-mode .topbar,
body.glass-mode .auth-card,
body.glass-mode .auth-hero,
body.glass-mode .hello-card,
body.glass-mode .feature-card,
body.glass-mode .insight-card,
body.glass-mode .settings-panel,
body.glass-mode .chart-card,
body.glass-mode .queue-card,
body.glass-mode .word-item,
body.glass-mode .modal-card,
body.glass-mode .session-complete,
body.glass-mode .tutorial-bubble {
  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.115),
      rgba(245,215,107,.045)
    ) !important;

  border: 1px solid rgba(245,215,107,.24) !important;

  color: #fff9df !important;

  box-shadow:
    0 28px 90px rgba(0,0,0,.55),
    0 0 55px rgba(245,215,107,.08),
    inset 0 1px 0 rgba(255,255,255,.12) !important;

  backdrop-filter: blur(34px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(34px) saturate(160%) !important;
}

body.glass-mode .content {
  background:
    radial-gradient(circle at top left, rgba(245,215,107,.12), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.035)) !important;
}

body.glass-mode p,
body.glass-mode small,
body.glass-mode .muted,
body.glass-mode .page-subtitle {
  color: rgba(255,249,223,.68) !important;
}

body.glass-mode h1,
body.glass-mode h2,
body.glass-mode h3,
body.glass-mode strong,
body.glass-mode label {
  color: #fff9df !important;
}

body.glass-mode .brand,
body.glass-mode .badge,
body.glass-mode .summary-row span,
body.glass-mode .stat-card strong,
body.glass-mode .hello-card p {
  color: #f5d76b !important;
}

body.glass-mode .auth-hero h1,
body.glass-mode .hello-card h1 {
  background: linear-gradient(135deg, #ffffff, #f5d76b, #fff2a8);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

body.glass-mode input,
body.glass-mode textarea,
body.glass-mode select {
  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.105),
      rgba(245,215,107,.04)
    ) !important;

  color: #fff9df !important;
  border: 1px solid rgba(245,215,107,.22) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 12px 34px rgba(0,0,0,.25) !important;
}

body.glass-mode input::placeholder,
body.glass-mode textarea::placeholder {
  color: rgba(255,249,223,.45) !important;
}

body.glass-mode .primary-btn,
body.glass-mode .ghost-btn,
body.glass-mode .desktop-nav button,
body.glass-mode .social-login button,
body.glass-mode .review-today-btn,
body.glass-mode .mobile-back-btn,
body.glass-mode .speaker-btn {
  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.12),
      rgba(245,215,107,.075)
    ) !important;

  color: #fff9df !important;

  border: 1px solid rgba(245,215,107,.26) !important;

  box-shadow:
    0 14px 42px rgba(0,0,0,.28),
    0 0 25px rgba(245,215,107,.08),
    inset 0 1px 0 rgba(255,255,255,.14) !important;
}

body.glass-mode .primary-btn:hover,
body.glass-mode .ghost-btn:hover,
body.glass-mode .desktop-nav button:hover,
body.glass-mode .review-today-btn:hover,
body.glass-mode .speaker-btn:hover {
  background:
    linear-gradient(
      145deg,
      rgba(245,215,107,.22),
      rgba(255,255,255,.10)
    ) !important;

  border-color: rgba(245,215,107,.56) !important;

  transform: translateY(-2px);
}

body.glass-mode .card-face {
  background:
    radial-gradient(circle at 30% 18%, rgba(245,215,107,.20), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(245,215,107,.045)) !important;

  color: #fff9df !important;

  border: 1px solid rgba(245,215,107,.24) !important;

  box-shadow:
    0 30px 90px rgba(0,0,0,.5),
    0 0 65px rgba(245,215,107,.10),
    inset 0 1px 0 rgba(255,255,255,.14) !important;
}

body.glass-mode .detail-meaning,
body.glass-mode .inline-notice,
body.glass-mode .review-notice,
body.glass-mode .queue-item {
  background: rgba(255,255,255,.075) !important;
  border-color: rgba(245,215,107,.22) !important;
  color: #fff9df !important;
}

body.glass-mode #sideMenu {
  background:
    radial-gradient(circle at 85% 8%, rgba(245,215,107,.22), transparent 34%),
    linear-gradient(180deg, rgba(22,18,10,.98), rgba(5,5,5,.98)) !important;

  border-left: 1px solid rgba(245,215,107,.22) !important;
}

body.glass-mode #sideMenu button {
  background: rgba(255,255,255,.075) !important;
  color: #fff9df !important;
  border-color: rgba(245,215,107,.18) !important;
}

body.glass-mode #menuOverlay,
body.glass-mode .tutorial-shade {
  background: rgba(0,0,0,.58) !important;
  backdrop-filter: blur(6px) !important;
}

body.glass-mode .toast {
  background: rgba(20,16,8,.96) !important;
  color: #fff9df !important;
  border-color: rgba(245,215,107,.28) !important;
}

/* MOBILE BOTTOM NAV */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 760px) {
  .app-page {
    padding-bottom: 118px !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 18px;

    height: 78px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;

    padding: 8px;

    border-radius: 34px;

    background:
      linear-gradient(
        145deg,
        rgba(255,255,255,.105),
        rgba(255,255,255,.045)
      );

    border: 1px solid rgba(255,255,255,.12);

    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);

    box-shadow:
      0 24px 70px rgba(0,0,0,.55),
      inset 0 1px 0 rgba(255,255,255,.1);

    z-index: 999997;
  }

  .mobile-tab {
    border: none;
    border-radius: 28px;

    background: transparent;
    color: rgba(255,255,255,.74);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 3px;

    transition: .25s ease;
  }

  .mobile-tab span {
    font-size: 24px;
    line-height: 1;
  }

  .mobile-tab small {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1px;
  }

  .mobile-tab.active {
    background:
      linear-gradient(
        145deg,
        rgba(255,255,255,.16),
        rgba(255,255,255,.07)
      );

    color: white;

    box-shadow:
      0 12px 32px rgba(0,0,0,.28),
      inset 0 1px 0 rgba(255,255,255,.12);
  }

  body.light-mode .mobile-bottom-nav {
    background:
      linear-gradient(
        145deg,
        rgba(255,250,240,.94),
        rgba(241,231,211,.78)
      ) !important;

    border-color: rgba(65,50,25,.14) !important;

    box-shadow:
      0 22px 60px rgba(72,55,28,.16),
      inset 0 1px 0 rgba(255,255,255,.9) !important;
  }

  body.light-mode .mobile-tab {
    color: rgba(23,19,13,.66) !important;
  }

  body.light-mode .mobile-tab.active {
    color: #17130d !important;
    background: rgba(255,255,255,.7) !important;
  }

  body.glass-mode .mobile-bottom-nav {
    background:
      linear-gradient(
        145deg,
        rgba(255,255,255,.13),
        rgba(245,215,107,.055)
      ) !important;

    border-color: rgba(245,215,107,.22) !important;
  }

  body.glass-mode .mobile-tab.active {
    background:
      linear-gradient(
        145deg,
        rgba(245,215,107,.20),
        rgba(255,255,255,.08)
      ) !important;
  }
}

@media (max-width: 760px) {
  #add .mobile-back-btn,
  #review .mobile-back-btn,
  #progress .mobile-back-btn {
    display: none !important;
  }
}

/* FINAL MOBILE BOTTOM NAV FIX */

.mobile-bottom-nav {
  display: none !important;
}

@media (max-width: 760px) {
  body {
    padding-bottom: 110px !important;
  }

  .app-page {
    padding-bottom: 130px !important;
  }

  .mobile-bottom-nav {
    position: fixed !important;

    top: auto !important;
    left: 16px !important;
    right: 16px !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;

    height: 78px !important;

    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;

    padding: 8px !important;

    border-radius: 36px !important;

    background:
      linear-gradient(
        145deg,
        rgba(255,255,255,.13),
        rgba(255,255,255,.045)
      ) !important;

    border: 1px solid rgba(255,255,255,.14) !important;

    backdrop-filter: blur(30px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(160%) !important;

    box-shadow:
      0 24px 70px rgba(0,0,0,.58),
      inset 0 1px 0 rgba(255,255,255,.12) !important;

    z-index: 999996 !important;
  }

  .mobile-tab {
    border: none !important;
    border-radius: 30px !important;

    background: transparent !important;
    color: rgba(255,255,255,.72) !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 4px !important;
  }

  .mobile-tab span {
    font-size: 25px !important;
    line-height: 1 !important;
  }

  .mobile-tab small {
    font-size: 11px !important;
    font-weight: 800 !important;
  }

  .mobile-tab.active {
    background:
      linear-gradient(
        145deg,
        rgba(255,255,255,.20),
        rgba(255,255,255,.075)
      ) !important;

    color: white !important;

    box-shadow:
      0 12px 32px rgba(0,0,0,.32),
      inset 0 1px 0 rgba(255,255,255,.14) !important;
  }

  #authPage:not(.hidden) ~ .mobile-bottom-nav {
    display: none !important;
  }
}

/* MOBILE TUTORIAL TAP FIX */

.tutorial-shade {
  pointer-events: none !important;
}

.tutorial-highlight {
  pointer-events: auto !important;
}

@media (max-width: 760px) {
  .tutorial-bubble {
    pointer-events: auto !important;
    max-width: 320px !important;
    width: calc(100vw - 32px) !important;
  }

  .tutorial-highlight {
    z-index: 2147483647 !important;
    position: relative !important;
  }
}

body.logged-in #authPage {
  display: none !important;
  visibility: hidden !important;
}

body.logged-in #appPage {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}