
.premium-input.correct {
  border-color: var(--green);
  background: var(--green-bg);
}

.premium-input.wrong {
  border-color: var(--red);
  background: var(--red-bg);
}

.input-tip {
  margin-top: 12px;
  font-weight: 700;
  text-align: center;
  font-size: 16px;
  min-height: 20px;
}

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

/* Summary stats */
.summary-stats .stat-card-mini {
  background: var(--surface2);
  padding: 16px;
  border-radius: 16px;
  text-align: center;
}

.scm-label {
  font-size: 12px;
  color: var(--ink3);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scm-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--font-head);
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.btn-next {
  padding: 16px !important;
  font-size: 16px !important;
  border-radius: 18px !important;
}


/* ─── PREMIUM FLASHCARDS & RANDOM ──────────────────────── */

.premium-segment-control {
  display: flex;
  background: var(--surface2);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 24px;
  width: 100%;
}

.psc-item {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink3);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-head);
}

.psc-item.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: var(--shadow);
}

.premium-flashcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 48px 32px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.pfc-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--blue-bg);
  color: var(--blue);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pfc-hz {
  font-size: 64px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--ink);
}

.pfc-py {
  font-size: 20px;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 24px;
}

.pfc-reveal-wrap {
  width: 100%;
  padding: 20px;
  background: var(--surface2);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px dashed var(--border2);
}

.pfc-reveal-wrap:hover {
  background: var(--border);
}

.pfc-reveal-btn {
  color: var(--ink3);
  font-weight: 600;
  font-size: 14px;
}

.pfc-tr {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 10px;
  animation: fadeIn 0.3s ease-out;
}

.practice-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--ink2);
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}


/* ─── UNIFIED PREMIUM CARD (REF SCREENSHOT 2) ─────────── */

.u-premium-card {
  background: var(--surface);
  width: 100%;
  max-width: 440px;
  border-radius: 40px;
  padding: 32px 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--border);
  position: relative;
}

.u-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
}

.u-card-info {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink3);
  font-family: var(--font-head);
  letter-spacing: 0.5px;
  margin-left: auto;
}

.u-mode-switcher {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: -8px;
}

.u-mode-item {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink3);
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}

.u-mode-item.active {
  color: var(--blue);
  background: var(--blue-bg);
}

.u-card-inner {
  background: #F1F4F9;
  border-radius: 32px;
  padding: 64px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 340px;
  justify-content: center;
}

.u-card-inner.practice {
  padding: 24px;
  min-height: 380px;
}

.u-card-py {
  font-size: 18px;
  color: var(--ink3);
  font-weight: 600;
  margin-bottom: 8px;
}

.u-card-py-sm {
  font-size: 14px;
  color: var(--ink3);
  font-weight: 600;
  margin-bottom: 12px;
}

.u-card-hz {
  font-size: 56px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 24px;
  line-height: 1;
}

.u-card-reveal {
  font-size: 14px;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
  padding: 10px 20px;
  border: 1.5px dashed var(--blue);
  border-radius: 16px;
  transition: all 0.2s;
}

.u-card-reveal:hover {
  background: var(--blue-bg);
}

.u-card-tr {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  animation: scaleIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.u-card-draw-wrap {
  position: relative;
  background: #fff;
  border-radius: 24px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  border: 1px solid #E2E8F0;
  margin-bottom: 12px;
}

.u-card-fb {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  margin-top: 8px;
}

.u-card-footer {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.u-btn {
  flex: 1;
  padding: 18px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: var(--font-head);
}

.u-btn-gray {
  background: #F1F4F9;
  color: #1C1917;
}

.u-btn-blue {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(30, 80, 255, 0.25);
}

.u-btn:active {
  transform: scale(0.96);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}


/* ─── ELONGATED CARD POLISH ──────────────────────────── */

.u-premium-card.elongated {
  min-height: 700px;
  max-width: 400px;
  justify-content: flex-start;
  padding-bottom: 40px;
}

.u-card-hz-sm {
  font-size: 40px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 16px;
  opacity: 0.8;
}

.u-card-reveal-wrap {
  width: 100%;
  padding: 20px;
  background: var(--surface2);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px dashed var(--border2);
  margin-top: 12px;
}

.u-card-reveal-wrap:hover {
  background: #E2E8F0;
}

.u-card-reveal-btn {
  color: var(--ink3);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}

.u-card-inner.practice .u-card-draw-wrap {
  transform: scale(1.05);
  margin-top: 10px;
}

/* Re-adjusting inner box for elongated feel */
.u-premium-card.elongated .u-card-inner {
  flex: 1;
  margin-bottom: 20px;
  min-height: auto;
}


/* ─── INTERACTIVE SWIPE CARD & SLIDER ─────────────────── */

.u-premium-card {
  position: relative;
  user-select: none;
  touch-action: none;
}

.swipe-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 12px 20px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.1s;
  white-space: nowrap;
}

.swipe-hint.left { left: -80px; background: var(--red); }
.swipe-hint.right { right: -80px; background: var(--blue); }

.u-confirm-slider-wrap {
  width: 100%;
  padding: 4px;
  background: var(--surface2);
  border-radius: 24px;
  margin: 12px 0;
}

.u-slider-track {
  height: 54px;
  background: transparent;
  border-radius: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.u-slider-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.u-slider-handle {
  position: absolute;
  left: 4px;
  top: 4px;
  bottom: 4px;
  width: 46px;
  background: var(--blue);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  cursor: grab;
  box-shadow: 0 4px 10px rgba(30, 80, 255, 0.3);
  z-index: 10;
}

.u-slider-handle:active {
  cursor: grabbing;
}

/* Adjusting footer for slider presence */
.u-card-footer {
  width: 100%;
  gap: 12px;
}

.u-card-footer .u-btn {
  flex: 1;
  padding: 16px !important;
  font-size: 15px !important;
}


/* ─── TACTILE FEEDBACK & SLIDER FILL ─────────────────── */

.u-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--blue-alpha);
  border-radius: 20px;
  z-index: 1;
  pointer-events: none;
}

/* Drag cues (pulsing indicators) */
.drag-cue {
  position: absolute;
  top: 50%;
  width: 4px;
  height: 60px;
  background: var(--border2);
  border-radius: 2px;
  opacity: 0.4;
  animation: pulseCue 2s infinite ease-in-out;
  pointer-events: none;
}

.drag-cue.left { left: 8px; }
.drag-cue.right { right: 8px; }

@keyframes pulseCue {
  0%, 100% { opacity: 0.2; transform: translateY(-50%) scaleY(1); }
  50% { opacity: 0.6; transform: translateY(-50%) scaleY(1.2); background: var(--blue); }
}

/* Smooth card transitions */
.u-premium-card {
  transition: transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.u-slider-handle {
  z-index: 2; /* Above the fill */
}


/* ─── SIDEBAR RESIZER HINT ──────────────────────────── */

.resizer.pulse {
  border-right: 2px solid var(--blue);
  animation: pulseResizer 2s infinite ease-in-out;
  background: var(--blue-alpha);
}

@keyframes pulseResizer {
  0%, 100% { opacity: 0.2; border-right-color: var(--border); }
  50% { opacity: 1; border-right-color: var(--blue); }
}


/* ─── WIGGLE HINT ANIMATION ─────────────────────────── */

.wiggle-hint {
  animation: cardWiggle 1.2s ease-in-out;
}

@keyframes cardWiggle {
  0% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-20px) rotate(-2deg); }
  50% { transform: translateX(20px) rotate(2deg); }
  75% { transform: translateX(-10px) rotate(-1deg); }
  100% { transform: translateX(0) rotate(0); }
}


/* ─── GREEN CONFIRM SLIDER ─────────────────────────── */

.u-slider-handle {
  background: #10B981 !important; /* Green */
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3) !important;
}

.u-slider-fill {
  background: rgba(16, 185, 129, 0.15) !important;
}

.practice-confirm-slider {
  max-width: 320px;
  margin: 12px auto 8px;
}

.practice-confirm-slider .u-slider-track {
  height: 46px;
}

.practice-confirm-slider .u-slider-handle {
  width: 40px;
  border-radius: 14px;
  font-size: 18px;
}

.practice-confirm-slider .u-slider-text {
  font-size: 11px;
  letter-spacing: 0.08em;
}

.practice-confident-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--deep-green);
  font-size: 12px;
  font-weight: 900;
}


.u-card-tr-sm {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink2);
  margin-top: 12px;
  text-align: center;
}


/* --- Tone Test Styles --- */
.tone-box {
  background: var(--surface2);
  border-radius: 12px;
  width: 60px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: all 0.2s;
  position: relative;
}
.tone-box.filled { border-color: var(--blue); }
.tone-box.correct { border-color: var(--green); background: rgba(34, 197, 94, 0.1); }
.tone-box.wrong { border-color: var(--red); background: rgba(239, 68, 68, 0.1); }
.tb-hz { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.tb-val { font-size: 18px; font-weight: 900; color: var(--blue); }
.tb-correct {
  position: absolute;
  bottom: -20px;
  font-size: 12px;
  font-weight: 900;
  color: var(--green);
}

.tone-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.tone-btn {
  background: var(--surface2);
  border: none;
  border-radius: 12px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s;
}
.tone-btn:active { transform: scale(0.95); }
.t-num { font-size: 18px; font-weight: 900; color: var(--ink1); }
.t-mark { font-size: 12px; color: var(--ink3); }

/* Match Layout Stability */
.match-item {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  word-break: break-word;
  padding: 10px;
  box-sizing: border-box;
}

/* Dual Pane Practice Layout */
.practice-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  align-items: start;
}

.practice-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: 100%;
}

.practice-right {
  position: sticky;
  top: 2px;
  width: 100%;
}

/* On mobile, stack them vertically */
@media (max-width: 820px) {
  .practice-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .practice-right {
    position: static;
  }
}

/* Premium Related Block as a Card Widget */
.related-container {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.rel-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.rel-tabs::-webkit-scrollbar {
  display: none;
}

.rel-tab {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-full);
  background: var(--surface2);
  color: var(--ink2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: var(--font-head);
}

.rel-tab:hover {
  background: var(--border);
  color: var(--ink);
  border-color: var(--border2);
}

.rel-tab.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.rel-tab-count {
  font-size: 10px;
  opacity: 0.8;
  font-weight: 500;
}

.rel-tab-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  animation: fadeIn 0.2s ease-out;
}

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

.rel-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
}

.rel-chip:hover {
  border-color: var(--blue);
  background: var(--blue-bg);
  box-shadow: 0 2px 8px var(--blue-alpha);
  transform: translateY(-1px);
}

.rel-chip:active {
  transform: translateY(0);
}

.rel-chip-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}

.rel-chip-hz {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.rel-chip-py {
  font-size: 10.5px;
  color: var(--ink2);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65px;
}

.rel-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 7px;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.rel-badge.lvl-1, .rel-badge.lvl-2 {
  background: var(--green-bg);
  color: var(--deep-green);
}

.rel-badge.lvl-3, .rel-badge.lvl-4 {
  background: var(--amber-bg);
  color: var(--amber);
}

.rel-badge.lvl-5, .rel-badge.lvl-6 {
  background: var(--red-bg);
  color: var(--red);
}

.rel-badge.lvl-7 {
  background: var(--blue-bg);
  color: var(--blue);
}

.rel-chip-more {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--blue);
  background: var(--blue-bg);
  border: 1px dashed var(--blue);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  padding: 6px 4px;
  box-sizing: border-box;
}

.rel-chip-more:hover {
  background: var(--blue);
  color: #fff;
}

/* Custom Lists Selector Dropdown */
.rel-list-select {
  width: 100%;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink2);
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.rel-list-select:hover {
  border-color: var(--blue);
  color: var(--ink);
}

.rel-list-select option {
  background: var(--surface);
  color: var(--ink);
}

/* Widget Header Row and History */
.rel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.rel-history-back {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.rel-history-back:hover {
  background: var(--border);
  border-color: var(--border2);
}

/* Word usage examples */
.word-examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
}

.word-examples-title {
  color: var(--ink3);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.word-example-card {
  background: var(--blue-bg);
  border: 1px solid var(--blue-alpha);
  border-radius: var(--r);
  padding: 10px 12px;
  display: grid;
  gap: 3px;
}

.word-example-zh {
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.word-example-py {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.word-example-tr {
  color: var(--ink2);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.whdr .word-examples {
  width: min(520px, 100%);
  margin: 14px auto 16px;
  text-align: left;
}

.whdr .word-examples-title {
  text-align: center;
}

.whdr .word-example-card {
  background: color-mix(in srgb, var(--blue-bg) 74%, var(--surface));
}

.whdr .word-example-zh {
  font-size: 20px;
}

.whdr .word-example-py {
  font-size: 13px;
}

.whdr .word-example-tr {
  font-size: 13px;
}

/* Related Preview Card */
.rel-preview-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.2s ease-out;
}

.rel-preview-back {
  align-self: flex-start;
  background: transparent;
  border: none;
  color: var(--ink3);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rel-preview-back:hover {
  color: var(--ink);
}

.rel-preview-main-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  background: var(--surface2);
  padding: 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

.rel-preview-hz {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--font-head);
}

.rel-preview-py {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  font-family: var(--font-head);
}

.rel-preview-trans {
  font-size: 13px;
  color: var(--ink2);
  font-weight: 500;
  line-height: 1.4;
  margin-top: 4px;
}

.rel-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Toggle vocabulary list button styles */
.rel-preview-btn-success {
  background: var(--green-bg) !important;
  color: var(--deep-green) !important;
  border: 1px solid var(--green) !important;
}

.rel-preview-btn-success:hover {
  background: rgba(16, 185, 129, 0.2) !important;
}

.rel-preview-btn-outline {
  background: var(--surface);
  color: var(--ink2);
  border: 1px solid var(--border2);
}

.rel-preview-btn-outline:hover {
  background: var(--surface2);
  border-color: var(--ink3);
}

/* Graduated label */
.rel-preview-graduated {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-bg);
  color: var(--deep-green);
  font-size: 12px;
  font-weight: 800;
  padding: 12px;
  border-radius: var(--r);
  border: 1px solid var(--green);
}

/* Success status for slider */
.rel-slider-success-msg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  pointer-events: none;
}

/* --- PREMIUM BENTO DESKTOP WRITING & DETAILS CARDS --- */
@media (min-width: 701px) {
  /* Style .whdr as a gorgeous Hero Bento Card on Desktop */
  .whdr {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-lg) !important;
    padding: 24px 20px !important;
    box-shadow: var(--shadow-sm) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    text-align: center !important;
    min-height: auto !important;
    transition: all 0.25s ease !important;
    margin-bottom: 0px !important;
  }

  .whdr:hover {
    border-color: var(--border2) !important;
    box-shadow: var(--shadow-md) !important;
  }

  /* Style Word title as the bold hero of the card */
  .wfull {
    font-size: 36px !important;
    font-weight: 800 !important;
    color: var(--ink) !important;
    font-family: var(--font-head) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
    letter-spacing: normal !important;
  }

  /* Audio Speak Button inside card */
  .wfull .speaker-btn {
    opacity: 0.8 !important;
    transition: all 0.2s ease !important;
  }
  .wfull .speaker-btn:hover {
    opacity: 1 !important;
    transform: scale(1.1) !important;
  }

  /* Elegant blue pinyin as in Related words preview */
  .wpy {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--blue) !important;
    font-family: var(--font-head) !important;
    margin-top: 2px !important;
  }

  /* Premium translation label */
  .wru {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--ink2) !important;
    line-height: 1.4 !important;
    margin-top: 6px !important;
    max-width: 90% !important;
  }

  /* SRS Counter positioned elegantly in the card corner */
  .whdr .u-srs-box {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 10 !important;
  }

  /* Express test button desktop premium style */
  .practice-express-test-btn {
    background: var(--blue-bg) !important;
    border: 1px solid var(--blue) !important;
    color: var(--blue) !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    padding: 8px 16px !important;
    border-radius: var(--r) !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin-top: 14px !important;
    box-shadow: 0 2px 6px rgba(30, 80, 255, 0.08) !important;
    width: -webkit-fit-content !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
  }

  .practice-express-test-btn:hover {
    background: var(--blue) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(30, 80, 255, 0.2) !important;
    transform: translateY(-1px) !important;
  }

  .practice-express-test-btn:active {
    transform: translateY(0) !important;
  }

  /* Active Workspace Bento Card for Character Practice on Desktop */
  .practice-canvas-card {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-lg) !important;
    padding: 24px !important;
    box-shadow: var(--shadow-sm) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    transition: all 0.25s ease !important;
  }

  .practice-canvas-card:hover {
    border-color: var(--border2) !important;
    box-shadow: var(--shadow-md) !important;
  }

  /* Desktop feedback pill */
  .fb {
    background: var(--surface2) !important;
    border: 1px solid var(--border2) !important;
    color: var(--ink2) !important;
    border-radius: 20px !important;
    padding: 6px 14px !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    text-align: center !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important;
    margin: 4px auto !important;
    width: -webkit-fit-content !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
    min-height: auto !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .fb.fbok {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: var(--green) !important;
    animation: pulseFb 0.3s ease !important;
  }

  .fb.fberr {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: var(--red) !important;
    animation: shakeFb 0.4s ease !important;
  }

  /* Compact sketch workspace on desktop */
  .cwrap {
    background: var(--surface) !important;
    border: 2px dashed var(--border2) !important;
    border-radius: 20px !important;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.03) !important;
    transition: all 0.25s ease !important;
  }

  .cwrap:hover {
    border-color: var(--blue) !important;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.02), 0 0 0 4px rgba(30, 80, 255, 0.12) !important;
  }

  /* Sleek modern controls row on desktop */
  .ctrls {
    display: flex !important;
    gap: 12px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  .ctrls .btn {
    flex: 1 !important;
    max-width: 160px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  /* Errors count style */
  .errs {
    font-size: 12px !important;
    color: var(--ink3) !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-top: 4px !important;
  }

  .errs span {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--red) !important;
    margin-left: 2px !important;
    display: inline !important;
  }
}

@media (max-width: 700px) {
  /* Simple stacked column container for mobile so spacing is clean */
  .practice-canvas-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 12px !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    padding: 18px 16px !important;
    box-shadow: var(--shadow-sm) !important;
    box-sizing: border-box !important;
  }
}

/* Elegant Pill-Badge for Character Selection Label on Both Mobile & Desktop */
.clbl {
  font-size: 13px !important;
  color: var(--ink2) !important;
  background: var(--surface2) !important;
  padding: 6px 14px !important;
  border-radius: var(--r-full) !important;
  border: 1px solid var(--border) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-weight: 500 !important;
  width: -webkit-fit-content !important;
  width: -moz-fit-content !important;
  width: fit-content !important;
  margin: 0 auto !important;
}

.clbl strong {
  font-size: 15px !important;
  color: var(--blue) !important;
  font-weight: 800 !important;
}

.practice-mobile-back,
.practice-mobile-tabs,
.mobile-dict-toggle {
  display: none;
}

@keyframes shakeFb {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes pulseFb {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Hide mobile bottom navigation bar on desktop by default */
.bottom-nav-mobile {
  display: none !important;
}

/* ─── PREMIUM MOBILE BOTTOM NAVIGATION & HEADER DESIGN ─── */
@media(max-width:700px) {
  /* Hide desktop top nav and header-actions entirely */
  .top-nav,
  .header-actions {
    display: none !important;
  }

  /* Default hide sidebar on mobile for non-practice modes */
  .sidebar {
    display: none !important;
  }

  /* When mode is practice: show list sidebar full screen */
  body.mode-practice .sidebar {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    height: calc(100vh - 96px) !important;
  }

  body.mode-practice .panel {
    display: none !important;
  }

  /* When active word detail is open in practice mode */
  body.mode-practice.mobile-detail-active .sidebar {
    display: none !important;
  }

  body.mode-practice.mobile-detail-active .panel {
    display: block !important;
    width: 100% !important;
    height: calc(100vh - 96px) !important;
    overflow-y: auto !important;
    padding: 16px 16px calc(80px + env(safe-area-inset-bottom)) !important;
  }

  /* Premium back to list button styling */
  .practice-mobile-back {
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: var(--surface2) !important;
    border: 1px solid var(--border2) !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: var(--blue) !important;
    cursor: pointer !important;
    margin-bottom: 0 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    align-self: center !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.01) !important;
    width: -webkit-fit-content !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
  }

  .practice-mobile-back:hover, .practice-mobile-back:active {
    background: var(--surface3) !important;
    border-color: var(--border) !important;
    transform: scale(0.97) !important;
  }

  .whdr {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    min-height: auto !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    padding: 16px !important;
    box-shadow: var(--shadow-sm) !important;
  }

  .whdr .practice-mobile-back {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin-bottom: 0 !important;
  }

  .whdr .u-srs-box {
    grid-column: 2 !important;
    grid-row: 1 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
  }

  .whdr .wfull {
    grid-column: 1 / span 2 !important;
    grid-row: 2 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin-top: 4px !important;
  }

  .whdr .wpy {
    grid-column: 1 / span 2 !important;
    grid-row: 3 !important;
    font-size: 13px !important;
    margin-top: 1px !important;
    color: var(--ink2) !important;
    text-align: left !important;
  }

  .whdr .wru {
    grid-column: 1 / span 2 !important;
    grid-row: 4 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin-top: 1px !important;
    text-align: left !important;
    color: var(--ink) !important;
  }

  .whdr .practice-express-test-btn {
    grid-column: 1 / span 2 !important;
    grid-row: 5 !important;
    width: 100% !important;
    padding: 6px 12px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    background: var(--surface2) !important;
    border: 1px solid var(--border2) !important;
    color: var(--blue) !important;
  }

  .whdr #cdots {
    grid-column: 1 / span 2 !important;
    grid-row: 6 !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    display: flex !important;
    justify-content: flex-start !important;
  }

  /* Premium mobile sub-tabs selector rules */
  .practice-mobile-tabs {
    display: flex !important;
    background: var(--surface2) !important;
    border: 1px solid var(--border2) !important;
    border-radius: 12px !important;
    padding: 2px !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pm-tab {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 9px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: var(--ink3) !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .pm-tab.active {
    background: var(--surface) !important;
    color: var(--blue) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
  }

  /* Compact canvas and writing tools to prevent overflow and overlap with floating dock */
  .clbl {
    font-size: 11.5px !important;
    margin-top: 2px !important;
    margin-bottom: 4px !important;
    text-align: center !important;
  }

  .cwrap {
    width: 200px !important;
    height: 200px !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
  }

  .cwrap svg,
  #hz-target,
  #hz-target svg {
    width: 200px !important;
    height: 200px !important;
  }

  .fb {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    font-size: 12.5px !important;
    padding: 4px 8px !important;
    text-align: center !important;
  }

  .ctrls {
    margin-top: 4px !important;
    gap: 8px !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .ctrls .btn {
    padding: 8px 12px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
    flex: 1 !important;
  }

  .errs {
    margin-top: 4px !important;
    font-size: 11px !important;
    text-align: center !important;
  }

  .errs span {
    font-size: 14px !important;
    display: inline !important;
    margin-left: 4px !important;
  }

  /* Control component visibility based on sub-tab selection on mobile */
  .practice-layout:not(.show-related) .practice-right {
    display: none !important;
  }

  .practice-layout.show-related .practice-left > :not(.whdr):not(.practice-mobile-tabs) {
    display: none !important;
  }

  /* Let Mobile panel scroll naturally to show dictionary and content below */
  body.mode-practice.mobile-detail-active .panel {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Compact and Centered Writing Workspace on Mobile */
  .practice-left {
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Elegant Sketchbook Style Writing Canvas Card */
  .cwrap {
    width: 200px !important;
    height: 200px !important;
    background: var(--surface) !important;
    border: 2px dashed var(--border2) !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.03) !important;
    margin: 8px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    touch-action: none !important;
    transition: all 0.25s ease !important;
  }

  .cwrap:focus-within, .cwrap:hover {
    border-color: var(--blue) !important;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.02), 0 0 0 4px rgba(30, 80, 255, 0.12) !important;
  }

  #hz-target {
    width: 200px !important;
    height: 200px !important;
    touch-action: none !important;
  }

  #hz-target svg {
    touch-action: none !important;
  }

  /* Dynamic, interactive feedback pill floating under canvas */
  .fb {
    background: var(--surface2) !important;
    border: 1px solid var(--border2) !important;
    color: var(--ink2) !important;
    border-radius: 20px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-align: center !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important;
    margin: 4px auto !important;
    width: -webkit-fit-content !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
    min-height: auto !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .fb.fbok {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: var(--green) !important;
    animation: pulseFb 0.3s ease !important;
  }

  .fb.fberr {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: var(--red) !important;
    animation: shakeFb 0.4s ease !important;
  }

  /* Sleek modern controls row on mobile */
  .ctrls {
    display: flex !important;
    gap: 12px !important;
    width: 100% !important;
    justify-content: center !important;
    margin: 4px 0 !important;
  }

  .ctrls .btn {
    flex: 1 !important;
    max-width: 160px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
  }



  /* Force layout to be clean full screen */
  .layout {
    flex-direction: column !important;
    height: calc(100vh - 96px) !important;
    overflow: hidden !important;
  }

  /* Make panel occupy full width and prevent overflow onto bottom nav */
  .panel {
    width: 100% !important;
    flex: 1 !important;
    padding: 12px 12px calc(100px + env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Premium Header */
  header {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border) !important;
  }

  .header-top {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto !important;
    grid-template-rows: 48px 48px !important;
    align-items: center !important;
    padding: 0 16px !important;
    height: 96px !important;
    min-height: 96px !important;
    gap: 0 !important;
    box-sizing: border-box !important;
  }

  /* Make logo a bit smaller on mobile */
  .logo-wrap {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    display: flex !important;
    align-items: center !important;
  }

  .logo-wrap svg {
    width: 32px !important;
    height: 32px !important;
  }

  /* Scrollable levels swiper row spanning full screen width on Row 2 */
  .lsw-wrap {
    display: block !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    overflow-x: auto !important;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    border-top: 1px solid var(--border2) !important;
    padding: 6px 0 !important;
    box-sizing: border-box !important;
  }

  /* Only hide the level switcher on the Map section on mobile */
  body.mode-map .lsw-wrap {
    display: none !important;
  }

  .lsw-wrap::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
  }

  .lsw {
    display: flex !important;
    gap: 8px !important;
    padding: 0 !important;
    max-width: none !important;
    justify-content: flex-start !important;
  }

  .lbtn {
    padding: 8px 16px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    background: var(--surface2) !important;
    color: var(--ink2) !important;
    border: none !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
  }

  .lbtn.active {
    background: var(--blue) !important;
    color: white !important;
    box-shadow: 0 4px 10px var(--blue-alpha) !important;
  }

  /* Language Selector on Mobile */
  #langSelector,
  .lang-selector {
    display: block !important;
    grid-column: 4 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin-left: 8px !important;
  }

  .lang-curr {
    padding: 6px 10px !important;
    border-radius: 8px !important;
    background: var(--surface2) !important;
    border: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
  }

  /* Theme button */
  .theme-btn {
    grid-column: 5 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin-left: 8px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    background: var(--surface2) !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Truly Magnificent Floating Bottom Bar in iOS Style */
  .bottom-nav-mobile {
    position: fixed !important;
    bottom: calc(6px + env(safe-area-inset-bottom)) !important;
    left: 16px !important;
    right: 16px !important;
    height: 68px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 24px !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding-bottom: 0 !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08) !important;
    z-index: 2000 !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
  }

  /* Dark mode support for premium floating bar */
  :root:not([data-theme="light"]) .bottom-nav-mobile {
    background: rgba(15, 18, 30, 0.85) !important; /* matches our brandbook dark color #0F121E */
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3) !important;
  }

  body.tch-mode-active #mobile-nav-student,
  body[data-app-mode="teacher"] #mobile-nav-student {
    display: none !important;
  }
  body.tch-mode-active #mobile-nav-teacher,
  body[data-app-mode="teacher"] #mobile-nav-teacher {
    display: flex !important;
  }
  body:not(.tch-mode-active):not([data-app-mode="teacher"]) #mobile-nav-teacher {
    display: none !important;
  }

  .bnav {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    border: none !important;
    color: var(--ink2) !important; /* grayed out text for inactive */
    flex: 1 !important;
    height: 100% !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    padding-top: 0 !important;
    border-radius: 16px !important;
  }

  .bnav-icon {
    font-size: 20px !important;
    margin-bottom: 3px !important;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.18s ease !important;
    color: currentColor !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 24px !important;
    transform-origin: center !important;
  }

  .bnav-icon .hsk-ui-icon {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
  }

  .bnav-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    font-family: var(--font-main) !important;
    letter-spacing: 0.02em !important;
  }

  /* Active state transitions */
  .bnav.active {
    color: var(--blue) !important; /* Highlight color */
  }

  #mnav-profile,
  #mnav-profile.active {
    color: var(--ink2) !important;
  }

  :root:not([data-theme="light"]) .bnav.active {
    color: #3b82f6 !important; /* brighter blue in dark mode */
  }

  .bnav.active .bnav-icon {
    transform: translateY(-2px) scale(1.15) !important;
  }

  #mnav-profile.active .bnav-icon {
    transform: none !important;
  }

  .bnav.bnav-pressed:not(#mnav-profile) .bnav-icon {
    animation: bnavIconTap 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    color: var(--blue) !important;
  }

  @keyframes bnavIconTap {
    0% { transform: scale(1); }
    45% { transform: translateY(-2px) scale(1.24); }
    100% { transform: scale(1); }
  }

  /* Active line indicator */
  .bnav::after {
    content: '' !important;
    position: absolute !important;
    bottom: 2px !important;
    left: 50% !important;
    transform: translateX(-50%) scaleX(0) !important;
    width: 16px !important;
    height: 3px !important;
    background: var(--blue) !important;
    border-radius: 2px !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  :root:not([data-theme="light"]) .bnav::after {
    background: #3b82f6 !important;
  }

  .bnav.active::after {
    transform: translateX(-50%) scaleX(1) !important;
  }
}
