:root {
  --bg: #0b0d12;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.64);
  --muted-2: rgba(255, 255, 255, 0.48);
  --primary: #0d9488;
  --primary-2: #2dd4bf;
  --danger: #ff5c74;
  --success: #46d18f;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.28);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 270px;
  --gap: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "PingFang SC", "Microsoft YaHei";
  --sidebar-grad-1: rgba(255, 255, 255, 0.06);
  --sidebar-grad-2: rgba(255, 255, 255, 0.02);
  --nav-hover-bg: rgba(255, 255, 255, 0.06);
  --nav-hover-border: rgba(255, 255, 255, 0.12);
  --nav-active-bg-1: rgba(13, 148, 136, 0.18);
  --nav-active-bg-2: rgba(13, 148, 136, 0.1);
  --nav-active-border: rgba(13, 148, 136, 0.28);
  --nav-icon: rgba(255, 255, 255, 0.72);
  --nav-icon-strong: rgba(255, 255, 255, 0.92);
  --nav-login-bg: rgba(255, 255, 255, 0.04);
  --nav-login-border: rgba(255, 255, 255, 0.12);
  --nav-login-hover-bg: rgba(255, 255, 255, 0.06);
  --nav-login-hover-border: rgba(255, 255, 255, 0.16);
  --nav-theme-bg: rgba(255, 255, 255, 0.02);
  --nav-theme-border: rgba(255, 255, 255, 0.1);
  --nav-theme-hover-bg: rgba(255, 255, 255, 0.05);
  --nav-theme-hover-border: rgba(255, 255, 255, 0.14);
  --control-border: rgba(255, 255, 255, 0.12);
  --control-bg: rgba(255, 255, 255, 0.05);
  --control-bg-strong: rgba(0, 0, 0, 0.22);
  --control-fg: rgba(255, 255, 255, 0.8);
  --divider-soft: rgba(255, 255, 255, 0.1);
  --table-border: rgba(255, 255, 255, 0.12);
  --table-bg: rgba(255, 255, 255, 0.03);
  --row-alt-bg: rgba(255, 255, 255, 0.02);
}

:root[data-theme="light"] {
  --bg: #f0fdfa;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-2: rgba(255, 255, 255, 0.96);
  --border: rgba(16, 18, 26, 0.16);
  --text: rgba(16, 18, 26, 0.92);
  --muted: rgba(16, 18, 26, 0.62);
  --muted-2: rgba(16, 18, 26, 0.48);
  --shadow: 0 18px 60px rgba(16, 18, 26, 0.14);
  --shadow-soft: 0 10px 30px rgba(16, 18, 26, 0.1);
  --sidebar-grad-1: rgba(0, 0, 0, 0.03);
  --sidebar-grad-2: rgba(0, 0, 0, 0.01);
  --nav-hover-bg: rgba(0, 0, 0, 0.03);
  --nav-hover-border: rgba(16, 18, 26, 0.16);
  --nav-active-bg-1: rgba(13, 148, 136, 0.12);
  --nav-active-bg-2: rgba(13, 148, 136, 0.06);
  --nav-active-border: rgba(13, 148, 136, 0.2);
  --nav-icon: rgba(16, 18, 26, 0.62);
  --nav-icon-strong: rgba(16, 18, 26, 0.9);
  --nav-login-bg: rgba(255, 255, 255, 0.78);
  --nav-login-border: rgba(16, 18, 26, 0.16);
  --nav-login-hover-bg: rgba(255, 255, 255, 0.9);
  --nav-login-hover-border: rgba(16, 18, 26, 0.2);
  --nav-theme-bg: rgba(255, 255, 255, 0.6);
  --nav-theme-border: rgba(16, 18, 26, 0.16);
  --nav-theme-hover-bg: rgba(255, 255, 255, 0.85);
  --nav-theme-hover-border: rgba(16, 18, 26, 0.2);
  --control-border: rgba(16, 18, 26, 0.18);
  --control-bg: rgba(255, 255, 255, 0.8);
  --control-bg-strong: rgba(255, 255, 255, 0.85);
  --control-fg: rgba(16, 18, 26, 0.76);
  --divider-soft: rgba(16, 18, 26, 0.12);
  --table-border: rgba(16, 18, 26, 0.16);
  --table-bg: rgba(255, 255, 255, 0.7);
  --row-alt-bg: rgba(16, 18, 26, 0.02);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1000px 600px at 10% 10%, rgba(13, 148, 136, 0.16), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(45, 212, 191, 0.12), transparent 60%),
    var(--bg);
  color: var(--text);
}

html[data-theme="light"] body {
  background: radial-gradient(1000px 600px at 10% 10%, rgba(13, 148, 136, 0.1), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(45, 212, 191, 0.08), transparent 60%),
    var(--bg);
}

.app {
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}

.sidebar {
  border-right: 0;
  background: linear-gradient(180deg, var(--sidebar-grad-1), var(--sidebar-grad-2));
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.9), rgba(45, 212, 191, 0.9));
  color: white;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.brand-title {
  font-weight: 700;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.nav-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item--login {
  padding-top: 12px;
  padding-bottom: 12px;
  background: var(--nav-login-bg);
  border-color: var(--nav-login-border);
}

.nav-item--theme {
  padding-top: 10px;
  padding-bottom: 10px;
  background: var(--nav-theme-bg);
  border-color: var(--nav-theme-border);
}

.nav-item--login:hover {
  background: var(--nav-login-hover-bg);
  border-color: var(--nav-login-hover-border);
}

.nav-item--theme:hover {
  background: var(--nav-theme-hover-bg);
  border-color: var(--nav-theme-hover-border);
}

.nav-login-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.nav-login-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}

.nav-login-subtitle {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.15;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  min-height: 46px;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  background: var(--nav-hover-bg);
  border-color: var(--nav-hover-border);
}

.nav-item.is-active {
  background: linear-gradient(180deg, var(--nav-active-bg-1), var(--nav-active-bg-2));
  border-color: var(--nav-active-border);
}

.nav-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-icon);
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.nav-item.is-active .nav-icon {
  color: var(--nav-icon-strong);
}

.nav-item:hover .nav-icon {
  color: var(--nav-icon-strong);
}

.nav-text {
  font-size: 15px;
  font-weight: 600;
}

.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: -2px 0 2px 34px;
  padding-left: 12px;
  border-left: 1px solid var(--divider-soft);
}

.nav-sub.is-collapsed {
  display: none;
}

.nav-caret {
  width: 22px;
  height: 22px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--muted);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-caret:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-caret svg {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-item.is-expanded .nav-caret {
  transform: rotate(180deg);
  color: var(--text);
}

.nav-item--sub {
  padding-top: 9px;
  padding-bottom: 9px;
  min-height: 40px;
  border-radius: 12px;
}

.nav-sub-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--muted-2);
  flex: 0 0 6px;
  margin-left: 2px;
}

.nav-item--sub:hover .nav-sub-dot,
.nav-item--sub.is-active .nav-sub-dot {
  background: var(--primary-2);
}

.nav-text--sub {
  font-size: 14px;
  font-weight: 600;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 6px;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-title {
  font-size: 18px;
  font-weight: 700;
}

.page-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

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

.topbar-hint {
  display: none;
  order: 3;
  flex: 0 0 100%;
  text-align: right;
}

.topbar-hint.is-visible {
  display: block;
}

.topbar-actions {
  order: 1;
}

.user-menu {
  order: 2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.topbar-action:hover {
  background: var(--nav-hover-bg);
  border-color: var(--nav-hover-border);
}

.topbar-action:active {
  transform: translateY(1px);
}

.topbar-action-icon {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-action-text {
  font-size: 13px;
  font-weight: 650;
}

.topbar-follow,
.topbar-support {
  position: relative;
  display: inline-flex;
}

.topbar-follow-popover,
.topbar-support-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 280px;
  max-width: min(280px, calc(100vw - 32px));
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  box-shadow: var(--shadow);
  padding: 12px;
  display: none;
  z-index: 50;
  backdrop-filter: blur(14px);
}

.topbar-follow-title,
.topbar-support-title {
  font-size: 14px;
  font-weight: 850;
}

.topbar-follow-subtitle,
.topbar-support-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.topbar-follow-qr,
.topbar-support-qr {
  margin-top: 12px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 10px;
}

.topbar-follow-qr svg,
.topbar-follow-qr img,
.topbar-support-qr svg,
.topbar-support-qr img {
  width: 200px;
  height: 200px;
  display: block;
}

.topbar-follow.is-open .topbar-follow-popover {
  display: block;
}

.topbar-support.is-open .topbar-support-popover {
  display: block;
}

@media (hover: hover) {
  .topbar-follow:hover .topbar-follow-popover {
    display: block;
  }
  .topbar-follow:focus-within .topbar-follow-popover {
    display: block;
  }
  .topbar-support:hover .topbar-support-popover {
    display: block;
  }
  .topbar-support:focus-within .topbar-support-popover {
    display: block;
  }
}

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
  max-width: 280px;
}

.user-menu-trigger:hover {
  background: var(--panel-2);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 850;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.9), rgba(45, 212, 191, 0.9));
  flex: 0 0 28px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-sub {
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-caret {
  color: var(--muted-2);
  font-size: 12px;
  margin-left: 2px;
}

.user-menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 300px;
  max-width: min(300px, calc(100vw - 32px));
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  background: var(--panel-2);
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
  z-index: 50;
  backdrop-filter: blur(14px);
}

.user-menu.is-open .user-menu-popover {
  display: block;
}

.user-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 10px;
  border-bottom: 1px solid var(--divider-soft);
}

.user-menu-title {
  font-size: 13px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.user-menu-badge {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 999px;
  padding: 3px 8px;
  flex: 0 0 auto;
}

.user-menu-list {
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease;
}

.user-menu-item:hover {
  background: var(--nav-hover-bg);
  border-color: var(--nav-hover-border);
}

.menu-icon {
  width: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.menu-right {
  margin-left: auto;
  color: var(--muted-2);
}

.user-menu-section {
  padding: 10px 6px 8px;
  border-top: 1px solid var(--divider-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-menu-label {
  font-size: 12px;
  color: var(--muted);
}

.user-theme {
  display: flex;
  gap: 8px;
}

.user-theme-btn {
  width: 34px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.user-theme-btn:hover {
  background: var(--nav-hover-bg);
  border-color: var(--nav-hover-border);
}

.user-theme-btn:active {
  transform: translateY(1px);
}

.user-theme-btn.is-active {
  background: rgba(13, 148, 136, 0.16);
  border-color: rgba(13, 148, 136, 0.28);
}

.user-menu-footer {
  padding-top: 8px;
  border-top: 1px solid var(--divider-soft);
  margin-top: 8px;
}

.user-menu-danger {
  color: rgba(255, 92, 116, 0.95);
}

.user-menu-danger:hover {
  background: rgba(255, 92, 116, 0.12);
  border-color: rgba(255, 92, 116, 0.22);
}

.user-menu:focus-within .user-menu-trigger {
  border-color: rgba(13, 148, 136, 0.35);
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .topbar-action-text {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .topbar-left {
    flex: 1 1 100%;
  }
  .topbar-right {
    flex: 1 1 100%;
  }
  .topbar-actions {
    display: flex;
  }
  .topbar-action {
    padding: 8px 9px;
  }
  .topbar-follow-popover {
    right: 0;
  }
  .user-sub {
    display: none;
  }
}

.content {
  padding: 18px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.settings-page-card {
  max-width: min(760px, 100%);
  margin: 0 auto;
}

.tqd-settings-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin: -14px -14px 12px;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 12px 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.96), rgba(168, 85, 247, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tqd-settings-head-title {
  font-size: 15px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: 0.04em;
}

.tqd-settings-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tqd-settings-reset-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.96);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tqd-settings-reset-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.tqd-settings-reset-btn:active {
  transform: translateY(1px);
}

.tqd-settings-reset-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.tqd-settings-reminder {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.tqd-settings-reminder.is-visible {
  display: inline-flex;
}

.tqd-settings-reminder.is-success {
  border-color: rgba(70, 209, 143, 0.4);
  background: rgba(70, 209, 143, 0.16);
}

.tqd-settings-reminder.is-error {
  border-color: rgba(255, 92, 116, 0.4);
  background: rgba(255, 92, 116, 0.16);
}

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

.study-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.card-title {
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.pill--pending {
  border-color: rgba(255, 192, 72, 0.35);
  background: rgba(255, 192, 72, 0.12);
  color: rgba(255, 227, 166, 0.96);
}

:root[data-theme="light"] .pill--pending {
  border-color: rgba(255, 170, 0, 0.35);
  background: rgba(255, 170, 0, 0.16);
  color: rgba(116, 74, 0, 0.92);
}

.pill--viewed {
  border-color: rgba(70, 209, 143, 0.35);
  background: rgba(70, 209, 143, 0.12);
  color: rgba(70, 209, 143, 0.95);
}

:root[data-theme="light"] .pill--viewed {
  border-color: rgba(13, 148, 136, 0.26);
  background: rgba(13, 148, 136, 0.12);
  color: rgba(13, 148, 136, 0.96);
}

.ticket {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgb(16, 18, 26);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

:root[data-theme="light"] .ticket {
  border-color: rgba(16, 18, 26, 0.14);
  background: rgb(255, 255, 255);
}

.ticket-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ticket-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  font-weight: 800;
  color: var(--text);
  flex: 0 0 auto;
}

.ticket-body {
  min-width: 0;
  flex: 1 1 auto;
}

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

.ticket-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ticket-delete {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.ticket-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
}

.ticket-list-title {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}

.ticket-user {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}

.ticket-preview {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.92;
  word-break: break-word;
}

.ticket-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.dashboard-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.dashboard-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.dashboard-box {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  padding: 12px;
}

html[data-theme="light"] .dashboard-box {
  background: rgba(255, 255, 255, 0.45);
}

.dashboard-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.dashboard-box-title {
  font-weight: 800;
}

.dashboard-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--control-border);
  cursor: pointer;
  color: var(--text);
  background: var(--control-bg);
}

.primary-btn {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.92), rgba(45, 212, 191, 0.92));
  border-color: rgba(13, 148, 136, 0.4);
}

.primary-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#claimFreeBtn.is-claimed:disabled {
  opacity: 1;
  background: rgba(160, 160, 160, 0.18);
  border-color: rgba(160, 160, 160, 0.28);
  color: rgba(255, 255, 255, 0.78);
}

.inline-hint,
.field-hint {
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
}

.inline-hint.is-error,
.field-hint.is-error {
  color: rgba(255, 92, 116, 0.95);
}

.inline-hint.is-success,
.field-hint.is-success {
  color: rgba(70, 209, 143, 0.95);
}

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

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

.toolbar-right .actions {
  justify-content: flex-end;
}

.segmented {
  display: inline-flex;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  overflow: hidden;
}

.segmented-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
}

.segmented-item.is-active {
  color: var(--text);
  background: rgba(13, 148, 136, 0.16);
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  box-shadow: var(--shadow-soft);
}

.check-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.check-box::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
}

.check-item input:checked + .check-box {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.16);
}

.check-item input:checked + .check-box::after {
  border-color: var(--text);
  opacity: 1;
}

.newwords-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.newwords-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--gap);
}

.search-input {
  width: 240px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  color: var(--text);
  outline: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

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

.item-card {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--table-border);
  background: var(--panel);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
}

.wordbook-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
}

.wordbook-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wordbook-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.wordbook-icon-text {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.4px;
  color: var(--text);
}

.wordbook-icon-emoji {
  font-size: 22px;
  line-height: 1;
}

.wordbook-info {
  min-width: 0;
}

.wordbook-info .item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wordbook-info .item-meta {
  overflow: hidden;
}

.wordbook-info .item-meta span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wordbook-cover {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
  line-height: 1.1;
  flex: 0 0 auto;
}

.item-card:hover {
  border-color: rgba(13, 148, 136, 0.35);
  background: rgba(13, 148, 136, 0.08);
}

.item-title {
  font-weight: 700;
  font-size: 14px;
}

.item-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--control-bg);
  overflow: hidden;
  border: 1px solid var(--divider-soft);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.92), rgba(45, 212, 191, 0.92));
}

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

.chapter-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--table-border);
  background: var(--panel);
  cursor: pointer;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
}

.chapter-card:hover {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.08);
}

.chapter-title {
  font-weight: 700;
}

.chapter-meta {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.study-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--gap);
  align-items: start;
}

.study-panel {
  display: none;
  position: sticky;
  top: 18px;
  height: calc(100vh - 110px);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.study-panel.is-open {
  display: block;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--divider-soft);
}

.panel-title {
  font-weight: 700;
}

.panel-list {
  padding: 10px;
  overflow: auto;
  height: 100%;
}

.panel-item {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  margin-bottom: 10px;
}

.panel-word {
  font-weight: 800;
}

.panel-meaning {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.word-card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--table-border);
  background: var(--control-bg-strong);
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}

.word-view .word-hero {
  margin-bottom: 12px;
}

.word-view .word-hero-inner {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.24), rgba(45, 212, 191, 0.12));
  padding: 16px 16px;
  box-shadow: var(--shadow);
}

.word-view .word-hero-title {
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.word-view .word-hero-subtitle {
  color: var(--muted);
  margin-top: 6px;
  font-size: 13px;
}

.word-panel {
  padding: 14px;
}

.word-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.word-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.word-meta-label {
  width: 48px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  padding-top: 8px;
}

.word-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.word-chip {
  border: 1px solid var(--control-border);
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--muted);
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.word-chip:hover {
  border-color: rgba(74, 163, 255, 0.35);
  background: rgba(74, 163, 255, 0.08);
  color: var(--text);
}

.word-chip.is-active {
  border-color: rgba(74, 163, 255, 0.42);
  background: rgba(74, 163, 255, 0.14);
  color: var(--text);
}

.word-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider-soft);
}

.word-filter {
  display: inline-flex;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  overflow: hidden;
}

.word-filter-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
}

.word-filter-btn.is-active {
  color: var(--text);
  background: rgba(13, 148, 136, 0.2);
}

.word-filter-btn[data-word-filter="known"].is-active {
  background: rgba(70, 209, 143, 0.18);
}

.word-filter-btn[data-word-filter="unknown"].is-active {
  background: rgba(255, 92, 116, 0.18);
}

.word-filter-btn[data-word-filter="fuzzy"].is-active {
  background: rgba(253, 186, 74, 0.18);
}

.word-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.word-segmented {
  transform: translateZ(0);
}

.word-mode-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
}

.word-mode-btn {
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

.word-mode-btn:hover {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.12);
  color: var(--text);
}

.word-mode-btn.is-active {
  border-color: rgba(13, 148, 136, 0.45);
  background: rgba(13, 148, 136, 0.22);
  color: var(--text);
}

.word-tool-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  color: var(--control-fg);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.word-tool-btn:hover {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.12);
  color: var(--text);
}

.word-tool-btn.is-active {
  border-color: rgba(109, 109, 248, 0.45);
  background: rgba(109, 109, 248, 0.22);
  color: var(--text);
}

.word-search {
  width: 280px;
  max-width: 100%;
}

.word-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 14px;
}

.word-table {
  margin-top: 14px;
}

.word-table-grid {
  border-radius: var(--radius);
  border: 1px solid var(--table-border);
  background: var(--table-bg);
  overflow: auto;
}

.word-table-row {
  display: grid;
  grid-template-columns: var(
    --word-table-cols,
    minmax(110px, 160px) minmax(80px, 150px) 64px minmax(160px, 1.2fr) minmax(80px, 150px) minmax(260px, 3fr)
      minmax(80px, 160px) minmax(240px, 280px)
  );
}

.word-table-row.is-alt {
  background: var(--row-alt-bg);
}

.word-table-row.is-known {
  background: rgba(70, 209, 143, 0.06);
}

.word-table-row.is-unknown {
  background: rgba(255, 92, 116, 0.06);
}

.word-table-row.is-fuzzy {
  background: rgba(253, 186, 74, 0.06);
}

.word-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .word-table-head {
  background: rgba(255, 255, 255, 0.88);
}

.word-table-cell {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
  min-width: 0;
  word-break: break-word;
}

.word-table-row > .word-table-cell:nth-child(4),
.word-table-row > .word-table-cell:nth-child(6) {
  white-space: nowrap;
  word-break: normal;
}

.word-table-row > .word-table-cell:nth-child(4) .word-card-text,
.word-table-row > .word-table-cell:nth-child(6) .word-card-text {
  white-space: nowrap;
}

html[data-theme="light"] .word-table-cell {
  border-bottom-color: rgba(16, 18, 26, 0.08);
  border-right-color: rgba(16, 18, 26, 0.06);
  color: rgba(16, 18, 26, 0.82);
}

.word-table-cell:last-child {
  border-right: 0;
}

.word-table-head .word-table-cell {
  font-weight: 800;
  color: var(--text);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] .word-table-head .word-table-cell {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.word-table-wordline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.word-table-wordtext {
  font-weight: 900;
  white-space: nowrap;
}

.word-table-phonetic {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.word-table-actions .word-card-translate {
  align-self: center;
}

.word-icon-btn.word-icon-btn-sm {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.word-table-mask {
  color: rgba(255, 255, 255, 0.28);
}

html[data-theme="light"] .word-table-mask {
  color: rgba(16, 18, 26, 0.28);
}

.word-item-card {
  border-radius: var(--radius);
  border: 1px solid var(--table-border);
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.word-item-card.is-known {
  border-color: rgba(70, 209, 143, 0.45);
  background: rgba(70, 209, 143, 0.08);
}

.word-item-card.is-unknown {
  border-color: rgba(255, 92, 116, 0.45);
  background: rgba(255, 92, 116, 0.08);
}

.word-item-card.is-fuzzy {
  border-color: rgba(253, 186, 74, 0.45);
  background: rgba(253, 186, 74, 0.08);
}

.word-item-card:hover {
  border-color: rgba(74, 163, 255, 0.35);
  background: rgba(74, 163, 255, 0.08);
}

.word-item-card.is-known:hover {
  border-color: rgba(70, 209, 143, 0.6);
  background: rgba(70, 209, 143, 0.12);
}

.word-item-card.is-unknown:hover {
  border-color: rgba(255, 92, 116, 0.6);
  background: rgba(255, 92, 116, 0.12);
}

.word-item-card.is-fuzzy:hover {
  border-color: rgba(253, 186, 74, 0.6);
  background: rgba(253, 186, 74, 0.12);
}

.word-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.word-card-main {
  min-width: 0;
}

.word-card-wordline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.word-card-text {
  min-width: 0;
}

.word-card-word {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.01em;
}

.word-card-phonetic {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.word-pos-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}

.word-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.word-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  color: var(--control-fg);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.word-icon-btn:hover {
  border-color: rgba(74, 163, 255, 0.35);
  background: rgba(74, 163, 255, 0.12);
  color: var(--text);
}

.word-icon-btn.is-active {
  border-color: rgba(109, 109, 248, 0.45);
  background: rgba(109, 109, 248, 0.22);
  color: var(--text);
}

.word-card-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.word-card-body.is-hidden {
  display: none;
}

.word-card-phrases {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.word-card-phrases-title {
  display: flex;
  align-items: center;
}

.word-card-phrases-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-phrase-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1.4;
}

html[data-theme="light"] .word-phrase-chip {
  color: rgba(16, 18, 26, 0.82);
}

.word-match-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  padding: 18px;
  overflow: auto;
  background: radial-gradient(900px 520px at 12% 12%, rgba(109, 109, 248, 0.18), transparent 60%),
    radial-gradient(880px 520px at 82% 12%, rgba(74, 163, 255, 0.14), transparent 60%),
    var(--bg);
}

.word-match-overlay.is-open {
  display: flex;
  flex-direction: column;
}

.word-match-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.word-match-title {
  font-weight: 900;
  letter-spacing: 0.02em;
}

.word-match-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.word-match-top-center {
  font-weight: 900;
  text-align: center;
  color: var(--text);
}

.word-match-top-right {
  display: flex;
  justify-content: flex-end;
}

.word-match-grid {
  margin-top: 14px;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.word-match-tile {
  border-radius: var(--radius-sm);
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  padding: 12px 12px;
  min-height: 56px;
  cursor: pointer;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  box-shadow: var(--shadow-soft);
}

.word-match-tile:hover {
  border-color: rgba(74, 163, 255, 0.35);
  background: rgba(74, 163, 255, 0.08);
}

.word-match-tile.is-selected {
  border-color: rgba(109, 109, 248, 0.5);
  background: rgba(109, 109, 248, 0.18);
  color: var(--text);
}

.word-match-tile.is-matched {
  border-color: rgba(70, 209, 143, 0.35);
  background: rgba(70, 209, 143, 0.08);
  color: var(--muted);
  cursor: default;
  opacity: 0.65;
}

.word-match-tile.is-wrong {
  border-color: rgba(255, 92, 116, 0.4);
  background: rgba(255, 92, 116, 0.12);
  color: var(--text);
}

.word-match-footer {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.word-match-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 920px) {
  .word-match-top {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .word-match-top-right {
    justify-content: flex-start;
  }
  .word-match-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.word-flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  padding: 18px;
  overflow: hidden;
  background: radial-gradient(900px 520px at 12% 12%, rgba(109, 109, 248, 0.16), transparent 60%),
    radial-gradient(880px 520px at 82% 12%, rgba(74, 163, 255, 0.12), transparent 60%),
    var(--bg);
}

.word-flash-overlay.is-open {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.word-flash-scope {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: radial-gradient(900px 520px at 18% 18%, rgba(109, 109, 248, 0.22), transparent 60%),
    radial-gradient(880px 520px at 82% 18%, rgba(74, 163, 255, 0.18), transparent 60%),
    rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  z-index: 2;
}

.word-flash-scope.is-open {
  display: grid;
}

.word-flash-scope-card {
  width: min(520px, 92vw);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 255, 0.94));
  color: rgba(0, 0, 0, 0.86);
  padding: 18px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.word-flash-scope-title {
  font-weight: 900;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.9);
}

.word-flash-scope-btn {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(0, 0, 0, 0.86);
  cursor: pointer;
  font-weight: 700;
  transition: transform 120ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.word-flash-scope-btn.is-primary {
  border-color: rgba(109, 109, 248, 0.55);
  background: linear-gradient(135deg, rgba(109, 109, 248, 0.95), rgba(74, 163, 255, 0.92));
  color: rgba(255, 255, 255, 0.92);
}

.word-flash-scope-btn:hover {
  border-color: rgba(74, 163, 255, 0.45);
  background: rgba(74, 163, 255, 0.12);
  transform: translateY(-1px);
}

.word-flash-scope-btn:active {
  transform: translateY(0);
}

.word-flash-scope-btn.is-primary:hover {
  box-shadow: 0 14px 34px rgba(74, 163, 255, 0.26);
  background: linear-gradient(135deg, rgba(109, 109, 248, 0.98), rgba(74, 163, 255, 0.96));
}

.word-flash-scope-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.22);
}

.word-flash-scope-cancel {
  align-self: flex-end;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.6);
  padding: 8px 10px;
  font-weight: 800;
}

.word-flash-top {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 12px;
}

.word-flash-nav {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.word-flash-nav:hover {
  border-color: rgba(74, 163, 255, 0.35);
  background: rgba(74, 163, 255, 0.12);
}

.word-flash-top-center {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.word-flash-top-metrics {
  display: flex;
  justify-content: space-between;
  width: min(360px, 92vw);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  font-size: 12px;
}

.word-flash-progress {
  width: min(360px, 92vw);
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.word-flash-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(109, 109, 248, 0.92), rgba(74, 163, 255, 0.92));
}

.word-flash-stage {
  display: grid;
  place-items: center;
  min-height: 0;
}

.word-flash-card {
  width: min(360px, 92vw);
  height: min(520px, calc(100vh - 240px));
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: rgba(0, 0, 0, 0.86);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 240ms ease;
  outline: none;
}

.word-flash-card.is-flipped {
  transform: rotateY(180deg);
}

.word-flash-front,
.word-flash-back {
  position: absolute;
  inset: 0;
  padding: 22px 22px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.word-flash-back {
  transform: rotateY(180deg);
}

.word-flash-wordline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.word-flash-word {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.9);
}

.word-flash-phonetic {
  text-align: center;
  color: rgba(0, 0, 0, 0.5);
  font-weight: 700;
  font-size: 12px;
}

.word-flash-pos {
  align-self: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.65);
  font-size: 12px;
  font-weight: 800;
}

.word-flash-front-hint {
  text-align: center;
  color: rgba(0, 0, 0, 0.42);
  font-size: 12px;
  font-weight: 700;
  margin-top: 18px;
}

.word-flash-block {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  padding: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.word-flash-block-text {
  min-width: 0;
  color: rgba(0, 0, 0, 0.78);
  font-size: 13px;
  line-height: 1.6;
}

.word-flash-block-label {
  display: block;
  color: rgba(0, 0, 0, 0.45);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 6px;
}

.word-flash-say {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.word-flash-say:hover {
  border-color: rgba(0, 0, 0, 0.22);
  background: rgba(255, 255, 255, 1);
}

.word-flash-tap {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.66);
  font-weight: 700;
  text-align: center;
  line-height: 1.55;
}

.word-flash-tap-line {
  color: rgba(255, 255, 255, 0.62);
}

.word-flash-hotkeys {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  color: rgba(255, 255, 255, 0.44);
  font-weight: 700;
}

.word-flash-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 900;
  font-size: 11px;
  line-height: 1.4;
}

.word-flash-center-hint {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.38);
  font-weight: 800;
  font-size: 12px;
  text-align: center;
}

.word-flash-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-bottom: 6px;
}

.word-flash-btn {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.word-flash-btn.is-known {
  border-color: rgba(70, 209, 143, 0.4);
  background: rgba(70, 209, 143, 0.12);
}

.word-flash-btn.is-unknown {
  border-color: rgba(255, 92, 116, 0.4);
  background: rgba(255, 92, 116, 0.12);
}

.word-flash-btn.is-fuzzy {
  border-color: rgba(253, 186, 74, 0.4);
  background: rgba(253, 186, 74, 0.12);
}

.word-flash-btn:hover {
  border-color: rgba(74, 163, 255, 0.35);
  background: rgba(74, 163, 255, 0.12);
}

.word-dict-overlay {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: none;
  padding: 18px;
  overflow: hidden;
  background: radial-gradient(900px 520px at 12% 12%, rgba(109, 109, 248, 0.14), transparent 60%),
    radial-gradient(880px 520px at 82% 12%, rgba(74, 163, 255, 0.1), transparent 60%),
    #0b0d12;
  color: rgba(255, 255, 255, 0.92);
}

.word-dict-overlay.is-open {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
}

.word-dict-scope {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: radial-gradient(900px 520px at 18% 18%, rgba(109, 109, 248, 0.22), transparent 60%),
    radial-gradient(880px 520px at 82% 18%, rgba(74, 163, 255, 0.16), transparent 60%),
    rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  z-index: 2;
}

.word-dict-scope.is-open {
  display: grid;
}

.word-dict-scope-card {
  width: min(680px, 92vw);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.96));
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.35);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.word-dict-scope-title {
  font-size: 22px;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.88);
}

.word-dict-scope-btn {
  border-radius: 10px;
  padding: 14px 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.98);
  color: rgba(0, 0, 0, 0.86);
  cursor: pointer;
  font-weight: 800;
  transition: transform 120ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.word-dict-scope-btn.is-primary {
  border-color: rgba(109, 109, 248, 0.55);
  background: linear-gradient(135deg, rgba(109, 109, 248, 0.95), rgba(74, 163, 255, 0.92));
  color: rgba(255, 255, 255, 0.94);
}

.word-dict-scope-btn:hover {
  border-color: rgba(74, 163, 255, 0.45);
  background: rgba(74, 163, 255, 0.12);
  transform: translateY(-1px);
}

.word-dict-scope-btn:active {
  transform: translateY(0);
}

.word-dict-scope-btn.is-primary:hover {
  box-shadow: 0 14px 34px rgba(74, 163, 255, 0.26);
  background: linear-gradient(135deg, rgba(109, 109, 248, 0.98), rgba(74, 163, 255, 0.96));
}

.word-dict-scope-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.22);
}

.word-dict-scope-cancel {
  align-self: flex-end;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.55);
  padding: 10px 12px;
  font-weight: 800;
}

.word-dict-scope-cancel:hover {
  color: rgba(0, 0, 0, 0.74);
}

.word-dict-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
}

.word-dict-top-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.word-dict-nav {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.word-dict-nav:hover {
  border-color: rgba(74, 163, 255, 0.35);
  background: rgba(74, 163, 255, 0.12);
}

.word-dict-title {
  font-size: 18px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
}

.word-dict-title-sub {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.62);
}

.word-dict-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.word-dict-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.word-dict-toggle-label {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
}

.word-dict-topbtn {
  padding: 8px 12px;
  font-weight: 800;
}

.word-dict-stage {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px 12px;
}

.word-dict-meaningline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.78);
}

.word-dict-pos {
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.word-dict-center {
  margin-top: 22px;
  width: min(880px, 94vw);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.word-dict-mask {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  cursor: text;
  user-select: none;
  white-space: pre;
}

.word-dict-mask-ch {
  min-width: 18px;
  padding: 8px 2px 6px;
  border-bottom: 3px solid rgba(255, 255, 255, 0.35);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.word-dict-mask-ch.is-empty {
  color: transparent;
}

.word-dict-mask-ch.is-space {
  min-width: 26px;
  border-bottom-color: transparent;
}

.word-dict-mask-ch.is-filled {
  color: rgba(74, 163, 255, 0.98);
  border-bottom-color: rgba(74, 163, 255, 0.65);
}

.word-dict-check {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.word-dict-input {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.word-dict-answer {
  margin-top: 10px;
  display: none;
}

.word-dict-answer.is-open {
  display: grid;
  gap: 6px;
}

.word-dict-answer-word {
  font-size: 28px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.94);
}

.word-dict-answer-phonetic {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
}

.word-dict-subhint {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
}

.word-dict-hotbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.word-dict-hotbar-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
}

.word-dict-hotbar-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  font-size: 26px;
  display: grid;
  place-items: center;
  line-height: 1;
  flex: 0 0 auto;
}

.word-dict-hotbar-center {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}

.word-dict-timer {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.68);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
}

.word-dict-hotkeys {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.word-dict-hotkey {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
  white-space: nowrap;
}

.word-dict-keycap {
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  font-size: 12px;
}

.word-dict-list {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  z-index: 3;
}

.word-dict-list.is-open {
  display: grid;
}

.word-dict-list-card {
  width: min(860px, 94vw);
  max-height: min(680px, 88vh);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.word-dict-list-head {
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.word-dict-list-title {
  font-weight: 900;
  color: rgba(0, 0, 0, 0.86);
}

.word-dict-list-body {
  padding: 10px 10px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.word-dict-list-item {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  padding: 10px 10px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px 120px 1fr 74px;
  gap: 10px;
  align-items: center;
  text-align: left;
  color: rgba(0, 0, 0, 0.82);
}

.word-dict-list-item.is-active {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.04);
}

.word-dict-list-idx {
  font-weight: 900;
  color: rgba(0, 0, 0, 0.45);
}

.word-dict-list-word {
  font-weight: 900;
}

.word-dict-list-meaning {
  color: rgba(0, 0, 0, 0.6);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-dict-list-mark {
  justify-self: end;
  color: rgba(0, 0, 0, 0.45);
  font-weight: 800;
  font-size: 12px;
}

.word-dict-list-head .ghost-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.78);
}

.word-card-label {
  color: var(--muted);
  font-size: 12px;
  margin-right: 6px;
}

.word-card-translation {
  flex: 1 1 100%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.6;
  min-height: 19px;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.word-card-wordline > .word-card-translation {
  font-size: 20px;
  min-height: 32px;
}

.word-card-wordline > .word-card-translation.is-placeholder::after {
  bottom: 10px;
}

html[data-theme="light"] .word-card-translation {
  color: rgba(16, 18, 26, 0.56);
}

.word-card-translation.is-placeholder {
  color: transparent;
}

.word-card-translation.is-placeholder::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 6px;
  width: clamp(120px, 55%, 240px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

html[data-theme="light"] .word-card-translation.is-placeholder::after {
  border-bottom-color: rgba(16, 18, 26, 0.16);
}

@media (max-width: 520px) {
  .word-card-translation.is-placeholder::after {
    bottom: 5px;
    width: 90px;
  }
}

.word-card-meaning,
.word-card-phrase,
.word-card-example {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.6;
}

.word-card-phrase,
.word-card-example {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

html[data-theme="light"] .word-card-meaning,
html[data-theme="light"] .word-card-phrase,
html[data-theme="light"] .word-card-example {
  color: rgba(16, 18, 26, 0.82);
}

.word-card-bottom {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
}

.word-card-bottom-center {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.word-card-translate {
  grid-column: 3;
  justify-self: end;
  align-self: end;
}

.word-chip-mini {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  color: var(--muted);
  font-size: 12px;
}

.word-card-spacer {
  flex: 1 1 auto;
}

.word-mini-btn {
  border: 1px solid var(--control-border);
  border-radius: 12px;
  background: var(--control-bg-strong);
  color: var(--muted);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
}

.word-mini-btn:hover {
  border-color: rgba(74, 163, 255, 0.35);
  background: rgba(74, 163, 255, 0.12);
  color: var(--text);
}

.word-mini-btn.is-active {
  border-color: rgba(74, 163, 255, 0.45);
  background: rgba(74, 163, 255, 0.18);
  color: var(--text);
}

.word-mini-btn[data-word-mark="known"].is-active {
  border-color: rgba(70, 209, 143, 0.55);
  background: rgba(70, 209, 143, 0.18);
}

.word-mini-btn[data-word-mark="unknown"].is-active {
  border-color: rgba(255, 92, 116, 0.55);
  background: rgba(255, 92, 116, 0.18);
}

.word-mini-btn[data-word-mark="fuzzy"].is-active {
  border-color: rgba(253, 186, 74, 0.6);
  background: rgba(253, 186, 74, 0.18);
}

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

.word-text {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.view[data-view="study"] #answerInput {
  font-size: var(--tqd-answer-font-m, 16px);
}

html[data-answer-font="s"] .view[data-view="study"] #answerInput {
  font-size: var(--tqd-answer-font-s, 14px);
}

html[data-answer-font="l"] .view[data-view="study"] #answerInput {
  font-size: var(--tqd-answer-font-l, 18px);
}

.word-phonetic {
  color: var(--muted);
  font-weight: 700;
}

.word-meaning {
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
}

.answer {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.field-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  color: var(--text);
  outline: none;
}

.study-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.mode-card {
  border-radius: var(--radius);
  border: 1px solid var(--table-border);
  background: var(--panel);
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  box-shadow: var(--shadow-soft);
}

.mode-card:hover {
  border-color: rgba(109, 109, 248, 0.35);
  background: rgba(109, 109, 248, 0.08);
}

.mode-card.is-selected {
  border-color: rgba(74, 163, 255, 0.38);
  background: rgba(74, 163, 255, 0.1);
}

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

.mode-title {
  font-weight: 800;
}

.mode-badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  color: var(--muted);
  font-size: 12px;
}

.mode-badge.is-disabled {
  border-color: rgba(255, 92, 116, 0.35);
  background: rgba(255, 92, 116, 0.12);
  color: rgba(255, 255, 255, 0.72);
}

.mode-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.mode-actions {
  margin-top: 14px;
}

.study-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--divider-soft);
  padding-top: 12px;
}

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

.metric {
  min-width: 100px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  margin-top: 6px;
  font-weight: 800;
}

.plan-list,
.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-item,
.review-item {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--table-border);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-left,
.review-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.plan-name,
.review-name {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-meta,
.review-meta {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.review-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid var(--control-border);
  border-radius: 12px;
  background: var(--control-bg);
  color: var(--muted);
  padding: 10px 12px;
  cursor: pointer;
}

.tab.is-active {
  color: var(--text);
  background: rgba(74, 163, 255, 0.14);
  border-color: rgba(74, 163, 255, 0.35);
}

.settings-panel {
  display: none;
}

.settings-panel.is-active {
  display: block;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row-inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.toggle {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  position: relative;
  cursor: pointer;
}

.toggle::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--panel-2);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 120ms ease;
}

.toggle.is-on {
  background: rgba(109, 109, 248, 0.28);
  border-color: rgba(109, 109, 248, 0.4);
}

.toggle.is-on::after {
  transform: translateX(20px);
  background: rgba(255, 255, 255, 0.92);
}

.range {
  width: 100%;
}

.hotkeys {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hotkey-row {
  display: grid;
  grid-template-columns: 1fr 220px 80px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  box-shadow: var(--shadow-soft);
}

.hotkey-keys {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.keycap {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  font-size: 12px;
  color: var(--text);
}

.login {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 140px);
}

.login-card {
  width: min(460px, 92vw);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 10, 18, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}

.auth-overlay.is-open {
  display: flex;
}

.auth-modal {
  width: min(520px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 24, 38, 0.86);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

[data-theme="light"] .auth-modal {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(17, 24, 39, 0.12);
}

.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.55), rgba(59, 130, 246, 0.45));
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
}

.auth-brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.auth-close {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.auth-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .auth-brand {
  color: rgba(17, 24, 39, 0.92);
}

[data-theme="light"] .auth-brand-mark {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(17, 24, 39, 0.12);
}

[data-theme="light"] .auth-close {
  border-color: rgba(17, 24, 39, 0.14);
  background: rgba(255, 255, 255, 0.68);
  color: rgba(17, 24, 39, 0.9);
}

.auth-modal-body {
  padding: 16px;
}

.auth-modal-body {
  min-height: 460px;
}

.auth-modal .tab {
  border-radius: 12px;
}

[data-theme="light"] .auth-modal .tab {
  background: rgba(255, 255, 255, 0.72);
}

.auth-modal .field-label {
  color: rgba(255, 255, 255, 0.85);
}

.auth-modal .muted {
  color: rgba(255, 255, 255, 0.65);
}

[data-theme="light"] .auth-modal .field-label {
  color: rgba(17, 24, 39, 0.78);
}

[data-theme="light"] .auth-modal .muted {
  color: rgba(17, 24, 39, 0.55);
}

.login-panel {
  display: none;
}

.login-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 380px;
}

.login-panel.is-active .actions {
  margin-top: auto;
}

html[data-accent="blue"] {
  --nav-active-bg-1: rgba(59, 130, 246, 0.18);
  --nav-active-bg-2: rgba(59, 130, 246, 0.1);
  --nav-active-border: rgba(59, 130, 246, 0.28);
}

html[data-theme="light"][data-accent="blue"] {
  --nav-active-bg-1: rgba(59, 130, 246, 0.12);
  --nav-active-bg-2: rgba(59, 130, 246, 0.06);
  --nav-active-border: rgba(59, 130, 246, 0.2);
}

html[data-accent="purple"] {
  --nav-active-bg-1: rgba(139, 92, 246, 0.18);
  --nav-active-bg-2: rgba(139, 92, 246, 0.1);
  --nav-active-border: rgba(139, 92, 246, 0.28);
}

html[data-theme="light"][data-accent="purple"] {
  --nav-active-bg-1: rgba(139, 92, 246, 0.12);
  --nav-active-bg-2: rgba(139, 92, 246, 0.06);
  --nav-active-border: rgba(139, 92, 246, 0.2);
}

html[data-accent="rose"] {
  --nav-active-bg-1: rgba(244, 63, 94, 0.18);
  --nav-active-bg-2: rgba(244, 63, 94, 0.1);
  --nav-active-border: rgba(244, 63, 94, 0.28);
}

html[data-theme="light"][data-accent="rose"] {
  --nav-active-bg-1: rgba(244, 63, 94, 0.12);
  --nav-active-bg-2: rgba(244, 63, 94, 0.06);
  --nav-active-border: rgba(244, 63, 94, 0.2);
}

html[data-accent="amber"] {
  --nav-active-bg-1: rgba(245, 158, 11, 0.18);
  --nav-active-bg-2: rgba(245, 158, 11, 0.1);
  --nav-active-border: rgba(245, 158, 11, 0.28);
}

html[data-theme="light"][data-accent="amber"] {
  --nav-active-bg-1: rgba(245, 158, 11, 0.12);
  --nav-active-bg-2: rgba(245, 158, 11, 0.06);
  --nav-active-border: rgba(245, 158, 11, 0.2);
}

html[data-accent="blue"] body {
  background: radial-gradient(1000px 600px at 10% 10%, rgba(59, 130, 246, 0.16), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(96, 165, 250, 0.12), transparent 60%),
    var(--bg);
}

html[data-theme="light"][data-accent="blue"] body {
  background: radial-gradient(1000px 600px at 10% 10%, rgba(59, 130, 246, 0.1), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(96, 165, 250, 0.08), transparent 60%),
    var(--bg);
}

html[data-accent="purple"] body {
  background: radial-gradient(1000px 600px at 10% 10%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(167, 139, 250, 0.12), transparent 60%),
    var(--bg);
}

html[data-theme="light"][data-accent="purple"] body {
  background: radial-gradient(1000px 600px at 10% 10%, rgba(139, 92, 246, 0.1), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(167, 139, 250, 0.08), transparent 60%),
    var(--bg);
}

html[data-accent="rose"] body {
  background: radial-gradient(1000px 600px at 10% 10%, rgba(244, 63, 94, 0.16), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(251, 113, 133, 0.12), transparent 60%),
    var(--bg);
}

html[data-theme="light"][data-accent="rose"] body {
  background: radial-gradient(1000px 600px at 10% 10%, rgba(244, 63, 94, 0.1), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(251, 113, 133, 0.08), transparent 60%),
    var(--bg);
}

html[data-accent="amber"] body {
  background: radial-gradient(1000px 600px at 10% 10%, rgba(245, 158, 11, 0.16), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(251, 191, 36, 0.12), transparent 60%),
    var(--bg);
}

html[data-theme="light"][data-accent="amber"] body {
  background: radial-gradient(1000px 600px at 10% 10%, rgba(245, 158, 11, 0.1), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(251, 191, 36, 0.08), transparent 60%),
    var(--bg);
}

html[data-accent="blue"] .primary-btn {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.92), rgba(96, 165, 250, 0.92));
  border-color: rgba(59, 130, 246, 0.4);
}

html[data-accent="purple"] .primary-btn {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.92), rgba(167, 139, 250, 0.92));
  border-color: rgba(139, 92, 246, 0.4);
}

html[data-accent="rose"] .primary-btn {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.92), rgba(251, 113, 133, 0.92));
  border-color: rgba(244, 63, 94, 0.4);
}

html[data-accent="amber"] .primary-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.92), rgba(251, 191, 36, 0.92));
  border-color: rgba(245, 158, 11, 0.4);
}

html[data-accent="blue"] .user-avatar {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(96, 165, 250, 0.9));
}

html[data-accent="purple"] .user-avatar {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(167, 139, 250, 0.9));
}

html[data-accent="rose"] .user-avatar {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.9), rgba(251, 113, 133, 0.9));
}

html[data-accent="amber"] .user-avatar {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(251, 191, 36, 0.9));
}

html[data-accent="blue"] .user-theme-btn.is-active {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.28);
}

html[data-accent="purple"] .user-theme-btn.is-active {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.28);
}

html[data-accent="rose"] .user-theme-btn.is-active {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.28);
}

html[data-accent="amber"] .user-theme-btn.is-active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.28);
}

html[data-accent="blue"] .user-menu:focus-within .user-menu-trigger {
  border-color: rgba(59, 130, 246, 0.35);
}

html[data-accent="purple"] .user-menu:focus-within .user-menu-trigger {
  border-color: rgba(139, 92, 246, 0.35);
}

html[data-accent="rose"] .user-menu:focus-within .user-menu-trigger {
  border-color: rgba(244, 63, 94, 0.35);
}

html[data-accent="amber"] .user-menu:focus-within .user-menu-trigger {
  border-color: rgba(245, 158, 11, 0.35);
}

.login-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 0 2px;
}

.login-qr {
  width: min(240px, 66vw);
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.login-qr-tip {
  text-align: center;
}

.login-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.login-code-btn {
  white-space: nowrap;
}

.pricing {
  position: relative;
  overflow: hidden;
}

.pricing.is-featured {
  border-color: rgba(74, 163, 255, 0.38);
  background: rgba(74, 163, 255, 0.1);
}

.pricing-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(74, 163, 255, 0.25);
  border: 1px solid rgba(74, 163, 255, 0.35);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.pricing-title {
  font-weight: 800;
}

.pricing-price {
  font-size: 30px;
  font-weight: 900;
  margin-top: 10px;
}

.pricing-unit {
  font-size: 12px;
  color: var(--muted);
  margin-left: 6px;
}

.pricing-list {
  margin: 12px 0 0 18px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.membership-view {
  position: relative;
}

.membership-shell {
  max-width: 1040px;
  margin: 0 auto;
}

.membership-hero {
  position: relative;
  border-radius: var(--radius);
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 10px 6px 6px;
  margin-bottom: var(--gap);
  overflow: hidden;
}

.membership-hero-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.2px;
  color: var(--text);
  text-align: center;
}

.membership-hero-highlight {
  background: linear-gradient(135deg, rgba(74, 163, 255, 0.95), rgba(170, 98, 255, 0.92));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.membership-hero-gem {
  color: rgba(74, 163, 255, 0.95);
  text-shadow: 0 0 18px rgba(74, 163, 255, 0.25);
}

.membership-hero-sub {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.membership-hero-controls {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.membership-cycle {
  background: transparent;
  border: 0;
  gap: 14px;
}

.membership-cycle .segmented-item {
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
}

.membership-cycle .segmented-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.membership-cycle .segmented-item.is-active {
  color: var(--text);
  background: transparent;
  position: relative;
}

.membership-cycle .segmented-item.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(74, 163, 255, 0.95), rgba(170, 98, 255, 0.95));
}

.membership-note {
  margin-top: 10px;
  text-align: center;
}

.membership-grid .card {
  box-shadow: none;
}

.membership-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.membership-grid .card {
  flex: 0 1 320px;
  max-width: 320px;
}

.membership-card {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.membership-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.membership-card:focus-visible {
  outline: 2px solid rgba(74, 163, 255, 0.55);
  outline-offset: 2px;
}

.membership-card.is-selected {
  border-color: rgba(74, 163, 255, 0.55);
  background: radial-gradient(640px 260px at 50% -10%, rgba(74, 163, 255, 0.22), transparent 64%),
    radial-gradient(520px 240px at 100% 0%, rgba(170, 98, 255, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.membership-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.membership-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--text);
  flex: 0 0 auto;
}

.membership-card-icon--vip {
  background: rgba(74, 163, 255, 0.14);
  border-color: rgba(74, 163, 255, 0.35);
  color: rgba(74, 163, 255, 0.95);
}

.membership-card-icon--pro {
  background: rgba(170, 98, 255, 0.14);
  border-color: rgba(170, 98, 255, 0.35);
  color: rgba(170, 98, 255, 0.95);
}

.membership-card-title {
  font-weight: 900;
  font-size: 14px;
  color: var(--text);
}

.membership-tagline {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.membership-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.membership-list li {
  position: relative;
  padding-left: 18px;
}

.membership-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(70, 209, 143, 0.95);
  font-weight: 900;
}

.membership-kpi {
  color: rgba(74, 163, 255, 0.95);
  font-weight: 900;
}

.membership-actions {
  margin-top: 14px;
}

.membership-actions--top {
  margin-top: 12px;
}

.membership-actions--top .primary-btn {
  width: 100%;
  justify-content: center;
}

.membership-actions--top .inline-hint {
  width: 100%;
}

.membership-buy-btn {
  min-width: 120px;
}

.membership-buy-btn--pro {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.82), rgba(170, 98, 255, 0.82));
  border-color: rgba(170, 98, 255, 0.42);
}

.membership-card--lifetime {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.membership-warn {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 92, 116, 0.95);
}

.profile-card {
  padding: 14px 0 0;
}

.profile-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 12px;
}

.profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, rgba(109, 109, 248, 0.9), rgba(74, 163, 255, 0.9));
  flex: 0 0 54px;
}

.profile-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-name {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
}

.profile-sub {
  font-size: 12px;
  color: var(--muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 14px;
}

.profile-row {
  border-radius: 14px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.profile-label {
  font-size: 12px;
  color: var(--muted);
}

.profile-value {
  font-size: 13px;
  font-weight: 750;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .chapter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-direction: row;
    align-items: center;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .nav {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .nav-item {
    width: auto;
    padding: 10px 12px;
    white-space: nowrap;
  }
  .nav-bottom {
    margin-top: 0;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .nav-item--login {
    background: transparent;
    border-color: transparent;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .nav-item--theme {
    background: transparent;
    border-color: transparent;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .nav-login-text {
    display: none;
  }
  .nav-divider {
    width: 1px;
    height: 26px;
    margin: 0 6px;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .dashboard-split {
    grid-template-columns: 1fr;
  }

  .word-meta-row {
    flex-direction: column;
    gap: 8px;
  }

  .word-meta-label {
    width: auto;
    padding-top: 0;
  }

  .word-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .word-filter {
    width: 100%;
    flex-wrap: wrap;
  }

  .word-search {
    width: 100%;
  }

  .word-card-grid {
    grid-template-columns: 1fr;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .study-layout {
    grid-template-columns: 1fr;
  }
  .study-panel {
    position: relative;
    top: 0;
    height: auto;
  }
  .study-actions {
    grid-template-columns: 1fr 1fr;
  }
  .mode-grid {
    grid-template-columns: 1fr;
  }

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

html[data-view="post-create"] .post-form-head {
  display: grid;
  gap: 12px;
}

html[data-view="post-create"] .post-form-meta-row {
  display: grid;
  grid-template-columns: 150px 120px 150px 220px 1fr auto;
  gap: 12px;
  align-items: end;
}

html[data-view="post-create"] .post-form-meta-right {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 12px;
  height: 44px;
}

html[data-view="post-create"] .post-form-pinned {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  font-size: 12px;
}

html[data-view="post-create"] .post-form-pinned input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

html[data-view="post-create"] .post-form-meta-row .field-input {
  padding: 10px 12px;
}

html[data-view="post-create"] .post-form-actions-inline {
  justify-content: flex-end;
  align-items: center;
  height: 44px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

html[data-view="post-create"] .post-form-actions-inline .primary-btn,
html[data-view="post-create"] .post-form-actions-inline .ghost-btn {
  padding: 10px 12px;
}

html[data-view="post-create"] .simple-editor {
  display: grid;
  gap: 10px;
}

html[data-view="post-create"] .simple-editor-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

html[data-view="post-create"] .simple-editor-toolbar {
  gap: 8px;
}

html[data-view="post-create"] .simple-editor-toolbar .ghost-btn {
  padding: 8px 10px;
  font-size: 12px;
}

html[data-view="post-create"] .simple-editor-textarea {
  resize: vertical;
  min-height: 380px;
  line-height: 1.7;
  font-family: var(--font);
}

html[data-view="post-create"] .simple-editor-preview {
  min-height: 380px;
  height: 380px;
  overflow: auto;
  background: var(--control-bg-strong);
  line-height: 1.7;
}

html[data-view="post-create"] .simple-editor-preview h1,
html[data-view="post-create"] .simple-editor-preview h2,
html[data-view="post-create"] .simple-editor-preview h3,
html[data-view="post-create"] .simple-editor-preview h4,
html[data-view="post-create"] .simple-editor-preview h5,
html[data-view="post-create"] .simple-editor-preview h6 {
  margin: 0.2em 0 0.6em;
  line-height: 1.25;
}

html[data-view="post-create"] .simple-editor-preview p {
  margin: 0.55em 0;
}

html[data-view="post-create"] .simple-editor-preview ul {
  margin: 0.55em 0 0.55em 1.2em;
  padding: 0;
}

html[data-view="post-create"] .simple-editor-preview blockquote {
  margin: 0.7em 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(13, 148, 136, 0.6);
  background: rgba(13, 148, 136, 0.08);
  border-radius: 12px;
}

html[data-view="post-create"] .simple-editor-preview code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

html[data-view="post-create"] .simple-editor-preview pre {
  margin: 0.8em 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  overflow: auto;
}

html[data-view="post-create"] .simple-editor-preview pre code {
  padding: 0;
  border: 0;
  background: transparent;
  display: block;
}

html[data-view="post-create"] .simple-editor-preview hr {
  border: 0;
  height: 1px;
  background: var(--divider-soft);
  margin: 0.9em 0;
}

html[data-view="post-create"] .simple-editor-preview a {
  color: rgba(45, 212, 191, 0.95);
  text-decoration: underline;
}

html[data-view="post-create"] #postEditorCounter {
  margin-top: -4px;
}

@media (max-width: 920px) {
  html[data-view="post-create"] .post-form-meta-row {
    grid-template-columns: 1fr;
  }
  html[data-view="post-create"] .simple-editor-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  html[data-view="post-create"] .post-form-meta-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html[data-view="post-create"] .post-form-meta-right {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.course-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  gap: 18px;
}

.course-hero-card {
  padding: 18px;
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.045));
}

.course-hero-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: start;
}

.course-cover {
  min-width: 0;
}

.course-intro {
  min-width: 0;
}

.course-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.course-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.course-badges .pill {
  padding: 7px 12px;
  font-size: 12px;
}

.course-intro .muted {
  font-size: 14px;
  line-height: 1.8;
}

.course-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.course-actions--inline {
  align-items: flex-start;
}

.course-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.course-actions--inline .course-actions-row {
  justify-content: flex-start;
}

.course-actions-row .primary-btn,
.course-actions-row .ghost-btn {
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 750;
}

.course-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 2px;
}

.course-tabs .segmented {
  border-radius: 14px;
}

.course-tabs .segmented-item {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 750;
}

.course-content-header {
  align-items: center;
}

.course-content-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.course-lesson-grid {
  margin-top: 2px;
}

.course-lesson-card {
  position: relative;
  min-height: 132px;
  padding: 14px;
  padding-bottom: 64px;
  border-radius: calc(var(--radius) + 2px);
  outline: none;
  cursor: pointer;
}

.course-lesson-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.26);
}

.course-lesson-card.is-selected {
  border-color: rgba(74, 163, 255, 0.35);
  background: transparent;
}

.course-lesson-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.course-lesson-no {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--muted);
  font-size: 12px;
}

.course-lesson-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.course-lesson-left {
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.course-lesson-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--control-border);
  background: var(--control-bg-strong);
  flex: 0 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-lesson-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-lesson-info {
  min-width: 0;
}

.course-lesson-title {
  font-weight: 900;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-lesson-desc {
  margin-top: 6px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-lesson-meta {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.course-lesson-state {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.1);
  color: rgba(244, 63, 94, 0.95);
}

.course-lesson-state.is-completed {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.08);
  color: rgba(16, 185, 129, 0.95);
}

@media (max-width: 1200px) {
  .course-hero-body {
    grid-template-columns: 220px 1fr;
  }
  .course-actions {
    grid-column: 1 / -1;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .course-hero-body {
    grid-template-columns: 1fr;
  }
  .course-actions {
    align-items: flex-start;
  }
}

html[data-view="course"] .content {
  padding: 18px;
}

html[data-view="course"] .course-lesson-grid {
  gap: 16px;
}

.course-mode-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 10, 18, 0.46);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 60;
}

.course-mode-overlay.is-open {
  display: flex;
}

.course-mode-modal {
  width: min(820px, 94vw);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 24, 38, 0.9);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

[data-theme="light"] .course-mode-modal {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(17, 24, 39, 0.12);
}

.course-mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(109, 109, 248, 0.45), rgba(16, 185, 129, 0.42));
}

.course-mode-title {
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .course-mode-title {
  color: rgba(17, 24, 39, 0.92);
}

.course-mode-body {
  padding: 16px;
}

@media (max-width: 720px) {
  .course-mode-modal {
    width: min(560px, 94vw);
  }
  .course-mode-body .mode-grid {
    grid-template-columns: 1fr;
  }
}

.course-c2e-overlay {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  background: #ffffff;
  z-index: 80;
}

.course-c2e-overlay.is-open {
  display: flex;
}

.course-c2e-correct-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.course-c2e-fx-confetti {
  position: absolute;
  width: 8px;
  height: 10px;
  border-radius: 2px;
  opacity: 0.95;
  animation: tqdC2eConfetti 900ms ease-out forwards;
}

@keyframes tqdC2eConfetti {
  from {
    transform: translate(var(--x0, 50vw), var(--y0, 50vh)) rotate(var(--r0, 0deg));
    opacity: 1;
  }
  to {
    transform: translate(var(--x1, 50vw), var(--y1, 95vh)) rotate(var(--r1, 260deg));
    opacity: 0;
  }
}

.course-c2e-fx-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid rgba(16, 185, 129, 0.75);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.10);
  transform: translate(-50%, -50%) scale(0.25);
  opacity: 0.95;
  animation: tqdC2eRing 520ms ease-out forwards;
}

@keyframes tqdC2eRing {
  from {
    transform: translate(-50%, -50%) scale(0.25);
    opacity: 0.95;
  }
  to {
    transform: translate(-50%, -50%) scale(3.4);
    opacity: 0;
  }
}

.course-c2e-fx-check {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%) scale(0.6) rotate(-12deg);
  color: rgba(16, 185, 129, 0.95);
  font-weight: 900;
  font-size: 64px;
  line-height: 1;
  text-shadow: 0 12px 30px rgba(16, 185, 129, 0.22);
  opacity: 0;
  animation: tqdC2eCheck 620ms cubic-bezier(0.18, 0.9, 0.2, 1) forwards;
}

@keyframes tqdC2eCheck {
  0% {
    transform: translate(-50%, -50%) scale(0.6) rotate(-12deg);
    opacity: 0;
  }
  40% {
    transform: translate(-50%, -50%) scale(1.08) rotate(-6deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.02) rotate(0deg);
    opacity: 0;
  }
}

.course-c2e-fx-burst-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.95), rgba(59, 130, 246, 0.85));
  transform-origin: 50% 140%;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) translateY(-18px) scaleY(0.2);
  opacity: 0;
  animation: tqdC2eBurst 560ms ease-out forwards;
}

@keyframes tqdC2eBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) translateY(-18px) scaleY(0.2);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) translateY(-54px) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) translateY(-74px) scaleY(0.85);
  }
}

.course-c2e-overlay.is-c2e-correct-glow .course-c2e-stage {
  animation: tqdC2eGlow 520ms ease-out;
}

@keyframes tqdC2eGlow {
  0% {
    filter: none;
  }
  35% {
    filter: drop-shadow(0 18px 36px rgba(16, 185, 129, 0.32)) brightness(1.02);
  }
  100% {
    filter: none;
  }
}

.course-c2e-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

.course-c2e-top-left,
.course-c2e-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.course-c2e-top-title {
  font-weight: 850;
  color: rgba(17, 24, 39, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}

.course-c2e-back {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: rgba(17, 24, 39, 0.03);
  color: rgba(17, 24, 39, 0.85);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.course-c2e-back:hover {
  background: rgba(17, 24, 39, 0.06);
}

.course-c2e-timer {
  font-variant-numeric: tabular-nums;
  color: rgba(17, 24, 39, 0.7);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(17, 24, 39, 0.03);
}

.course-c2e-top-right {
  position: relative;
}

.course-c2e-top-textbtn {
  height: 40px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: rgba(17, 24, 39, 0.03);
  color: rgba(17, 24, 39, 0.86);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.course-c2e-top-textbtn:hover {
  background: rgba(17, 24, 39, 0.06);
}

.course-c2e-top-textbtn:active {
  transform: translateY(1px);
}

.course-c2e-top-textbtn-icon {
  width: 16px;
  display: inline-flex;
  justify-content: center;
  color: rgba(17, 24, 39, 0.7);
}

.course-c2e-top-textbtn-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.course-c2e-top-textbtn.is-on {
  background: rgba(74, 163, 255, 0.14);
  border-color: rgba(74, 163, 255, 0.28);
}

.course-c2e-fs-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: rgba(17, 24, 39, 0.78);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.course-c2e-fs-btn:hover {
  background: rgba(17, 24, 39, 0.06);
}

.course-c2e-fs-btn:active {
  transform: translateY(1px);
}

.course-c2e-fs-btn.is-on {
  color: rgba(74, 163, 255, 0.95);
  background: rgba(74, 163, 255, 0.12);
}

.course-c2e-fs-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.course-c2e-settings {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 220px;
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
  display: none;
  z-index: 2;
}

.course-c2e-settings.is-open {
  display: block;
}

.course-c2e-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px;
}

.course-c2e-setting-label {
  font-size: 13px;
  color: rgba(17, 24, 39, 0.8);
  font-weight: 650;
}

.course-c2e-switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  background: rgba(17, 24, 39, 0.06);
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}

.course-c2e-switch::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 24, 39, 0.12);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 120ms ease;
}

.course-c2e-switch.is-on {
  background: rgba(74, 163, 255, 0.22);
  border-color: rgba(74, 163, 255, 0.35);
}

.course-c2e-switch.is-on::after {
  transform: translateX(18px);
}

.course-c2e-settings-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 10, 18, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 90;
}

.course-c2e-settings-modal-overlay.is-open {
  display: flex;
}

.course-c2e-settings-modal {
  width: min(760px, 92vw);
  max-height: min(640px, 86vh);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 24, 38, 0.92);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

[data-theme="light"] .course-c2e-settings-modal {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(17, 24, 39, 0.14);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
}

.course-c2e-settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(90deg, rgba(74, 163, 255, 0.25), rgba(109, 109, 248, 0.22));
}

[data-theme="light"] .course-c2e-settings-modal-header {
  border-bottom-color: rgba(17, 24, 39, 0.10);
  background: linear-gradient(90deg, rgba(74, 163, 255, 0.18), rgba(109, 109, 248, 0.16));
}

.course-c2e-settings-modal-title {
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .course-c2e-settings-modal-title {
  color: rgba(17, 24, 39, 0.92);
}

.course-c2e-settings-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 24, 39, 0.18);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

[data-theme="light"] .course-c2e-settings-modal-close {
  border-color: rgba(17, 24, 39, 0.14);
  background: rgba(17, 24, 39, 0.06);
  color: rgba(17, 24, 39, 0.82);
}

.course-c2e-settings-modal-body {
  padding: 14px 14px 16px;
  overflow: auto;
  max-height: calc(min(640px, 86vh) - 58px);
}

.course-c2e-settings-layout {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.course-c2e-settings-nav {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

[data-theme="light"] .course-c2e-settings-nav {
  border-color: rgba(17, 24, 39, 0.10);
  background: rgba(17, 24, 39, 0.02);
}

.course-c2e-settings-nav-item {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.84);
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.1;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.course-c2e-settings-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.course-c2e-settings-nav-item:active {
  transform: translateY(1px);
}

.course-c2e-settings-nav-item.is-active {
  background: rgba(74, 163, 255, 0.18);
  border-color: rgba(74, 163, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .course-c2e-settings-nav-item {
  border-color: rgba(17, 24, 39, 0.10);
  background: rgba(255, 255, 255, 0.6);
  color: rgba(17, 24, 39, 0.78);
}

[data-theme="light"] .course-c2e-settings-nav-item:hover {
  background: rgba(17, 24, 39, 0.04);
}

[data-theme="light"] .course-c2e-settings-nav-item.is-active {
  background: rgba(74, 163, 255, 0.14);
  border-color: rgba(74, 163, 255, 0.22);
  color: rgba(17, 24, 39, 0.92);
}

.course-c2e-settings-content {
  min-width: 0;
}

.course-c2e-settings-panel {
  display: none;
  padding: 6px 2px 2px;
}

.course-c2e-settings-panel.is-active {
  display: block;
}

.course-c2e-settings-panel .muted {
  padding: 10px 2px;
}

@media (max-width: 720px) {
  .course-c2e-settings-layout {
    grid-template-columns: 1fr;
  }
  .course-c2e-settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .course-c2e-settings-nav-item {
    text-align: center;
    flex: 0 0 auto;
  }
}

.course-c2e-settings-group-title {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 10px;
}

[data-theme="light"] .course-c2e-settings-group-title {
  color: rgba(17, 24, 39, 0.82);
}

.course-c2e-settings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .course-c2e-settings-list {
  border-color: rgba(17, 24, 39, 0.10);
  background: rgba(17, 24, 39, 0.02);
}

.tqd-theme-pick-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tqd-theme-pick-card {
  width: 120px;
  border-radius: 16px;
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.tqd-theme-pick-card:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
}

.tqd-theme-pick-card:active {
  transform: translateY(1px);
}

.tqd-theme-pick-card.is-active {
  background: rgba(13, 148, 136, 0.16);
  border-color: rgba(13, 148, 136, 0.28);
}

[data-theme="light"] .tqd-theme-pick-card {
  border-color: rgba(17, 24, 39, 0.14);
  background: rgba(17, 24, 39, 0.03);
  color: rgba(17, 24, 39, 0.84);
}

[data-theme="light"] .tqd-theme-pick-card:hover {
  background: rgba(17, 24, 39, 0.05);
  border-color: rgba(17, 24, 39, 0.18);
}

[data-theme="light"] .tqd-theme-pick-card.is-active {
  background: rgba(74, 163, 255, 0.14);
  border-color: rgba(74, 163, 255, 0.24);
}

.tqd-theme-pick-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

[data-theme="light"] .tqd-theme-pick-icon {
  border-color: rgba(17, 24, 39, 0.14);
  background: rgba(255, 255, 255, 0.58);
}

.tqd-theme-pick-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.tqd-font-pick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tqd-font-pick-row {
  width: 100%;
  border-radius: 14px;
  padding: 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.tqd-font-pick-row:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
}

.tqd-font-pick-row:active {
  transform: translateY(1px);
}

.tqd-font-pick-row.is-active {
  background: rgba(13, 148, 136, 0.16);
  border-color: rgba(13, 148, 136, 0.28);
}

[data-theme="light"] .tqd-font-pick-row {
  border-color: rgba(17, 24, 39, 0.14);
  background: rgba(17, 24, 39, 0.03);
  color: rgba(17, 24, 39, 0.84);
}

[data-theme="light"] .tqd-font-pick-row:hover {
  background: rgba(17, 24, 39, 0.05);
  border-color: rgba(17, 24, 39, 0.18);
}

[data-theme="light"] .tqd-font-pick-row.is-active {
  background: rgba(74, 163, 255, 0.14);
  border-color: rgba(74, 163, 255, 0.24);
}

.tqd-font-pick-radio {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
}

.tqd-font-pick-row.is-active .tqd-font-pick-radio {
  border-color: rgba(13, 148, 136, 0.55);
}

.tqd-font-pick-row.is-active .tqd-font-pick-radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.95);
}

[data-theme="light"] .tqd-font-pick-radio {
  border-color: rgba(17, 24, 39, 0.30);
}

[data-theme="light"] .tqd-font-pick-row.is-active .tqd-font-pick-radio {
  border-color: rgba(74, 163, 255, 0.70);
}

[data-theme="light"] .tqd-font-pick-row.is-active .tqd-font-pick-radio::after {
  background: rgba(74, 163, 255, 0.95);
}

.tqd-font-pick-tag {
  width: 16px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  flex: 0 0 16px;
  text-align: center;
}

.tqd-font-pick-preview {
  min-width: 0;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.90);
}

[data-theme="light"] .tqd-font-pick-preview {
  color: rgba(17, 24, 39, 0.88);
}

.tqd-font-pick-preview.is-s {
  font-size: var(--tqd-answer-font-s, 14px);
}

.tqd-font-pick-preview.is-m {
  font-size: var(--tqd-answer-font-m, 16px);
}

.tqd-font-pick-preview.is-l {
  font-size: var(--tqd-answer-font-l, 18px);
}

.tqd-c2e-fx-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tqd-c2e-fx-pill {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.2px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.tqd-c2e-fx-pill:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.24);
}

.tqd-c2e-fx-pill:active {
  transform: translateY(1px);
}

.tqd-c2e-fx-pill.is-active {
  background: rgba(13, 148, 136, 0.16);
  border-color: rgba(13, 148, 136, 0.28);
}

[data-theme="light"] .tqd-c2e-fx-pill.is-active {
  background: rgba(74, 163, 255, 0.14);
  border-color: rgba(74, 163, 255, 0.24);
}

.tqd-c2e-correct-fx-preview {
  margin-top: 10px;
  position: relative;
  height: 92px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

[data-theme="light"] .tqd-c2e-correct-fx-preview {
  border-color: rgba(17, 24, 39, 0.12);
  background: rgba(17, 24, 39, 0.02);
}

.tqd-c2e-correct-fx-preview.is-c2e-correct-glow {
  animation: tqdC2eGlow 520ms ease-out;
}

[data-theme="light"] .tqd-c2e-fx-pill {
  border-color: rgba(17, 24, 39, 0.14);
  background: rgba(17, 24, 39, 0.03);
  color: rgba(17, 24, 39, 0.84);
}

[data-theme="light"] .tqd-c2e-fx-pill:hover {
  background: rgba(17, 24, 39, 0.05);
  border-color: rgba(17, 24, 39, 0.18);
}

.course-c2e-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 6px;
  border-radius: 12px;
}

.course-c2e-settings-item-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

[data-theme="light"] .course-c2e-settings-item-label {
  color: rgba(17, 24, 39, 0.82);
}

.course-c2e-sfx-preview {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.course-c2e-sfx-preview:hover {
  background: rgba(255, 255, 255, 0.12);
}

.course-c2e-sfx-preview:active {
  transform: translateY(1px);
}

[data-theme="light"] .course-c2e-sfx-preview {
  border-color: rgba(17, 24, 39, 0.18);
  background: rgba(17, 24, 39, 0.04);
  color: rgba(17, 24, 39, 0.80);
}

.course-c2e-settings-modal-body .inline-hint {
  margin-top: 12px;
}

.course-c2e-settings-layout[data-course-c2e-settings-scope="page"] .inline-hint {
  margin-top: 12px;
}

.course-c2e-settings-modal .course-c2e-switch {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
}

.course-c2e-settings-modal .course-c2e-switch::after {
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.95);
}

.course-c2e-settings-modal .course-c2e-switch.is-on {
  background: rgba(74, 163, 255, 0.30);
  border-color: rgba(74, 163, 255, 0.50);
}

[data-theme="light"] .course-c2e-settings-modal .course-c2e-switch {
  border-color: rgba(17, 24, 39, 0.18);
  background: rgba(17, 24, 39, 0.06);
}

[data-theme="light"] .course-c2e-settings-modal .course-c2e-switch::after {
  border-color: rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .course-c2e-settings-modal .course-c2e-switch.is-on {
  background: rgba(74, 163, 255, 0.22);
  border-color: rgba(74, 163, 255, 0.35);
}

.course-c2e-settings-layout[data-course-c2e-settings-scope="page"] .course-c2e-switch {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
}

.course-c2e-settings-layout[data-course-c2e-settings-scope="page"] .course-c2e-switch::after {
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.95);
}

.course-c2e-settings-layout[data-course-c2e-settings-scope="page"] .course-c2e-switch.is-on {
  background: rgba(74, 163, 255, 0.30);
  border-color: rgba(74, 163, 255, 0.50);
}

[data-theme="light"] .course-c2e-settings-layout[data-course-c2e-settings-scope="page"] .course-c2e-switch {
  border-color: rgba(17, 24, 39, 0.18);
  background: rgba(17, 24, 39, 0.06);
}

[data-theme="light"] .course-c2e-settings-layout[data-course-c2e-settings-scope="page"] .course-c2e-switch::after {
  border-color: rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .course-c2e-settings-layout[data-course-c2e-settings-scope="page"] .course-c2e-switch.is-on {
  background: rgba(74, 163, 255, 0.22);
  border-color: rgba(74, 163, 255, 0.35);
}

.course-c2e-stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 42px;
  padding: 48px 18px 18px;
}

.course-c2e-hint-card {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, 94vw);
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.98);
  padding: 12px 14px 14px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
}

.course-c2e-token-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.course-c2e-token {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(17, 24, 39, 0.02);
  min-width: 78px;
  cursor: pointer;
  appearance: none;
  font: inherit;
  text-align: center;
}

.course-c2e-token-ipa {
  font-size: 12px;
  color: rgba(17, 24, 39, 0.55);
  font-variant-numeric: tabular-nums;
}

.course-c2e-token-word {
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(17, 24, 39, 0.92);
  letter-spacing: 0.02em;
  min-width: 54px;
}

.course-c2e-token-poszh {
  font-size: 12px;
  color: rgba(17, 24, 39, 0.7);
}

.course-c2e-token-bottom {
  font-size: 12px;
  color: rgba(17, 24, 39, 0.82);
}

.course-c2e-token--pron .course-c2e-token-word {
  background: rgba(250, 204, 21, 0.26);
  border-color: rgba(250, 204, 21, 0.5);
}

.course-c2e-token--verb .course-c2e-token-word {
  background: rgba(251, 113, 133, 0.2);
  border-color: rgba(251, 113, 133, 0.45);
}

.course-c2e-token--inf .course-c2e-token-word {
  background: rgba(147, 197, 253, 0.26);
  border-color: rgba(147, 197, 253, 0.55);
}

.course-c2e-token--subconj .course-c2e-token-word {
  background: rgba(148, 163, 184, 0.22);
  border-color: rgba(148, 163, 184, 0.5);
}

.course-c2e-token--aux .course-c2e-token-word {
  background: rgba(253, 186, 116, 0.22);
  border-color: rgba(253, 186, 116, 0.55);
}

.course-c2e-token--adj .course-c2e-token-word {
  background: rgba(196, 181, 253, 0.26);
  border-color: rgba(196, 181, 253, 0.55);
}

.course-c2e-hint-phonetic {
  color: rgba(17, 24, 39, 0.55);
  font-size: 12px;
}

.course-c2e-hint-answer {
  margin-top: 6px;
  display: inline-block;
  font-weight: 850;
  font-size: 18px;
  color: rgba(17, 24, 39, 0.9);
  letter-spacing: 0.02em;
  padding-bottom: 4px;
  border-bottom: 2px solid rgba(17, 24, 39, 0.18);
}

.course-c2e-hint-cn {
  margin-top: 6px;
}

.course-c2e-cn {
  font-weight: 850;
  font-size: clamp(18px, 3.6vw, 30px);
  color: rgba(17, 24, 39, 0.88);
  text-align: center;
  margin-top: 0;
  transform: translateY(60px);
}

.course-c2e-answer {
  margin-top: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
  transform: translateY(60px);
}

.course-c2e-words {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  width: min(920px, 92vw);
  min-height: 40px;
  padding: 0 12px 6px;
  gap: clamp(10px, 2vw, 18px) 0;
  font-weight: 900;
  font-size: clamp(18px, 3.6vw, 36px);
  color: rgba(74, 163, 255, 0.95);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

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

.course-c2e-word {
  min-width: calc(max(2, var(--c2e-word-ch, 4)) * 0.55ch + 1.1ch);
  min-height: clamp(40px, 8vw, 56px);
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: clamp(8px, 0.34em, 14px);
  border-bottom: 2px solid rgba(17, 24, 39, 0.18);
  font-weight: 900;
  font-size: clamp(calc(var(--tqd-answer-font-m, 16px) * 1.4), 4.2vw, calc(var(--tqd-answer-font-m, 16px) * 2.8));
  color: rgba(74, 163, 255, 0.95);
  line-height: 1;
  letter-spacing: 0.02em;
  user-select: none;
  vertical-align: bottom;
}

html[data-answer-font="s"] .course-c2e-word {
  font-size: clamp(calc(var(--tqd-answer-font-s, 14px) * 1.4), 4.2vw, calc(var(--tqd-answer-font-s, 14px) * 2.8));
}

html[data-answer-font="l"] .course-c2e-word {
  font-size: clamp(calc(var(--tqd-answer-font-l, 18px) * 1.4), 4.2vw, calc(var(--tqd-answer-font-l, 18px) * 2.8));
}

.course-c2e-word.is-active {
  border-bottom-color: rgba(74, 163, 255, 0.92);
}

.course-c2e-word.is-empty {
  color: transparent;
}

.course-c2e-word.is-filled {
  color: rgba(17, 24, 39, 0.55);
  border-bottom-color: rgba(17, 24, 39, 0.24);
}

.course-c2e-word.is-wrong {
  border-bottom-color: rgba(244, 63, 94, 0.75);
  color: rgba(244, 63, 94, 0.95);
  animation: c2e-shake 140ms ease-in-out 0s 2;
}

@media (prefers-reduced-motion: reduce) {
  .course-c2e-word.is-wrong {
    animation: none;
  }
}

.course-c2e-space {
  display: inline-block;
  width: clamp(10px, 2vw, 18px);
}

.course-c2e-punct {
  min-height: clamp(40px, 8vw, 56px);
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: clamp(8px, 0.34em, 14px);
  font-weight: 900;
  font-size: clamp(calc(var(--tqd-answer-font-m, 16px) * 1.4), 4.2vw, calc(var(--tqd-answer-font-m, 16px) * 2.8));
  color: rgba(17, 24, 39, 0.88);
  line-height: 1;
  user-select: none;
  vertical-align: bottom;
}

html[data-answer-font="s"] .course-c2e-punct {
  font-size: clamp(calc(var(--tqd-answer-font-s, 14px) * 1.4), 4.2vw, calc(var(--tqd-answer-font-s, 14px) * 2.8));
}

html[data-answer-font="l"] .course-c2e-punct {
  font-size: clamp(calc(var(--tqd-answer-font-l, 18px) * 1.4), 4.2vw, calc(var(--tqd-answer-font-l, 18px) * 2.8));
}

.course-c2e-words.is-finish {
  border-bottom: 0;
  display: grid;
  justify-items: center;
  width: min(520px, 92vw);
  padding: 0;
  gap: 10px;
  min-height: auto;
  color: rgba(17, 24, 39, 0.92);
}

.course-c2e-finish-title {
  font-weight: 950;
  font-size: clamp(22px, 4vw, 34px);
}

.course-c2e-finish-meta {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(17, 24, 39, 0.65);
  font-weight: 650;
}

.course-c2e-subhint {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(17, 24, 39, 0.65);
  text-align: center;
}

.course-c2e-subhint.is-error {
  color: rgba(255, 92, 116, 0.95);
}

.course-c2e-subhint.is-success {
  color: rgba(70, 209, 143, 0.95);
}

.course-c2e-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 1px;
  width: 1px;
}

.course-c2e-bottom {
  padding: 0;
  border-top: 0;
  background: rgba(255, 255, 255, 0.96);
  margin-bottom: 32px;
}

.course-c2e-bottom-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 92px;
  padding: 10px 12px;
  column-gap: 22px;
}

.course-c2e-bottom-nav {
  width: clamp(56px, 6vw, 72px);
  height: clamp(56px, 6vw, 72px);
  margin: 0 auto;
  border: 0;
  background: transparent;
  color: rgba(17, 24, 39, 0.72);
  font-size: clamp(46px, 6vw, 68px);
  line-height: 1;
  cursor: pointer;
  border-radius: 16px;
}

.course-c2e-bottom-nav[aria-label="上一题"] {
  justify-self: end;
}

.course-c2e-bottom-nav[aria-label="下一题"] {
  justify-self: start;
}

.course-c2e-bottom-nav:hover {
  background: rgba(17, 24, 39, 0.06);
}

.course-c2e-hotkeys {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  color: rgba(17, 24, 39, 0.72);
  font-size: 13px;
}

.course-c2e-hotkey {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.course-c2e-hotkey .keycap {
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: rgba(17, 24, 39, 0.9);
  font-weight: 700;
}

.course-c2e-hotkey-label {
  color: rgba(17, 24, 39, 0.7);
}
