.tvv-fullscreen-body {
  margin: 0;
  background: #f6fafc;
  overflow-x: hidden;
}

.tvv-fullscreen-body .tvv-fullscreen-app {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
}

.tvv-fullscreen-body .tvv-shell {
  min-height: 100vh;
}

.tvv-shell {
  --tvv-ink: #102033;
  --tvv-muted: #617083;
  --tvv-line: #d8e5ee;
  --tvv-brand: #143d59;
  --tvv-brand-strong: #0b2f47;
  --tvv-brand-soft: #e6f4fb;
  --tvv-green: #0f7a52;
  --tvv-green-soft: #ddf8ea;
  --tvv-mint: #24b47e;
  --tvv-amber: #f6a434;
  --tvv-amber-soft: #fff1d8;
  --tvv-purple: #6b21a8;
  --tvv-purple-soft: #f3e8ff;
  --tvv-surface: #ffffff;
  --tvv-surface-soft: #f7fbfd;
  --tvv-shadow-soft: 0 14px 34px rgba(20, 61, 89, 0.1);
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  min-height: 680px;
  background:
    linear-gradient(135deg, rgba(230, 244, 251, 0.92), rgba(246, 251, 248, 0.95) 46%, rgba(255, 247, 232, 0.68)),
    #f6fafc;
  color: var(--tvv-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.tvv-shell,
.tvv-shell * {
  box-sizing: border-box;
}

.tvv-sidebar {
  border-right: 1px solid rgba(20, 61, 89, 0.12);
  background:
    linear-gradient(180deg, #ffffff, #f7fbfd 62%, #eef8f3),
    var(--tvv-surface);
  padding: 24px 18px;
  box-shadow: 8px 0 28px rgba(20, 61, 89, 0.06);
}

.tvv-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  border-radius: 12px;
  padding: 10px;
}

.tvv-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--tvv-brand-strong), var(--tvv-green));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(20, 61, 89, 0.22);
}

.tvv-brand strong,
.tvv-brand span {
  display: block;
}

.tvv-brand span {
  margin-top: 3px;
  color: var(--tvv-muted);
  font-size: 13px;
}

.tvv-nav {
  display: grid;
  gap: 10px;
  margin-top: 32px;
}

.tvv-nav a {
  position: relative;
  border-radius: 10px;
  color: var(--tvv-ink);
  font-weight: 700;
  padding: 13px 14px;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.tvv-shell a,
.tvv-shell a:link,
.tvv-shell a:visited,
.tvv-shell a:hover,
.tvv-shell a:focus,
.tvv-shell a:active {
  text-decoration: none !important;
  text-decoration-line: none !important;
  box-shadow: none;
}

.tvv-shell [hidden] {
  display: none !important;
}

.tvv-nav a.is-active,
.tvv-nav a:hover {
  background: linear-gradient(135deg, var(--tvv-green-soft), #f2fbff);
  color: var(--tvv-brand-strong);
  transform: translateX(2px);
}

.tvv-nav a.is-active {
  padding-left: 18px;
}

.tvv-nav a.is-active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 6px;
  width: 4px;
  border-radius: 999px;
  background: var(--tvv-green);
  content: "";
}

.tvv-main {
  min-width: 0;
  padding: 28px;
}

.tvv-topbar {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border: 1px solid rgba(216, 229, 238, 0.75);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px 20px;
  box-shadow: var(--tvv-shadow-soft);
  backdrop-filter: blur(8px);
}

.tvv-topbar h1,
.tvv-panel h2 {
  margin: 0;
  font-weight: 900;
}

.tvv-eyebrow {
  color: var(--tvv-green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.tvv-account {
  position: relative;
}

.tvv-account summary {
  align-items: center;
  background: linear-gradient(135deg, #fff, var(--tvv-surface-soft));
  border: 1px solid var(--tvv-line);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  gap: 10px;
  list-style: none;
  width: 44px;
  min-height: 44px;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 8px 22px rgba(20, 61, 89, 0.08);
}

.tvv-account summary strong {
  display: none;
}

.tvv-account summary span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tvv-brand), var(--tvv-green));
  color: #fff;
  font-weight: 900;
}

.tvv-account div {
  position: absolute;
  right: 0;
  z-index: 5;
  min-width: 220px;
  margin-top: 8px;
  border: 1px solid var(--tvv-line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 18px 44px rgba(16, 32, 51, 0.14);
}

.tvv-account div form:not(.tvv-password-form) {
  display: none;
  margin-top: 10px;
}

.tvv-account div form:not(.tvv-password-form) .tvv-logout-button + .tvv-switch-button {
  display: none;
}

.tvv-account div .tvv-switch-button {
  width: 100%;
}

.tvv-password-form {
  display: none;
  gap: 8px;
  margin: 12px 0;
  border-top: 1px solid var(--tvv-line);
  padding-top: 12px;
}

.tvv-account.is-changing-password .tvv-password-form {
  display: grid;
}

.tvv-password-form label {
  display: grid;
  gap: 5px;
  color: var(--tvv-muted);
  font-size: 12px;
  font-weight: 800;
}

.tvv-password-form input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  padding: 0 10px;
}

.tvv-panel {
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  padding: 22px;
}

.tvv-panel + .tvv-panel {
  margin-top: 18px;
}

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

.tvv-panel-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.tvv-panel-head > *,
.tvv-library-main,
.tvv-unit-title > div,
.tvv-review,
.tvv-dashboard {
  min-width: 0;
}

.tvv-note,
.tvv-badge {
  display: inline-block;
  border-radius: 8px;
  background: #eef6ff;
  color: var(--tvv-brand);
  font-weight: 800;
  padding: 8px 12px;
}

.tvv-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.tvv-facts div {
  border-radius: 8px;
  background: #f4f6f7;
  padding: 12px;
}

.tvv-facts dt {
  color: var(--tvv-muted);
  font-size: 13px;
  font-weight: 700;
}

.tvv-facts dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.tvv-table-wrap {
  overflow-x: auto;
}

.tvv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tvv-table th,
.tvv-table td {
  border-top: 1px solid var(--tvv-line);
  padding: 10px;
  text-align: left;
}

.tvv-ok {
  color: #0b6b45;
  font-weight: 900;
}

.tvv-missing {
  color: #b42318;
  font-weight: 900;
}

.tvv-admin-wrap .tvv-panel {
  max-width: 1100px;
}

.tvv-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: stretch;
}

.tvv-login-copy,
.tvv-login-form {
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  padding: 28px;
}

.tvv-login-copy {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at 78% 24%, #d7f4ff, transparent 34%),
    radial-gradient(circle at 82% 78%, #dff9ea, transparent 32%),
    #fff;
}

.tvv-login-copy h2 {
  max-width: 620px;
  margin: 8px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.tvv-login-form {
  display: grid;
  gap: 14px;
}

.tvv-login-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.tvv-login-form input,
.tvv-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--tvv-line);
  border-radius: 999px;
  padding: 0 16px;
}

.tvv-login-form button,
.tvv-search button,
.tvv-actions button,
.tvv-link-button,
.tvv-switch-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--tvv-brand), var(--tvv-green));
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 16px;
  box-shadow: 0 10px 22px rgba(20, 61, 89, 0.14);
}

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

.tvv-link-button {
  width: 100%;
  margin-top: 8px;
}

.tvv-switch-button {
  background: #fff;
  border: 1px solid var(--tvv-line);
  color: var(--tvv-brand);
  box-shadow: none;
}

.tvv-switch-button:hover,
.tvv-account summary:hover {
  border-color: rgba(20, 61, 89, 0.28);
}

.tvv-alert {
  border-radius: 8px;
  background: #fff0f0;
  color: #b42318;
  font-weight: 800;
  padding: 10px 12px;
}

.tvv-intro-grid {
  display: grid;
  gap: 20px;
}

.tvv-intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: center;
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  padding: 28px;
}

.tvv-intro-section h2 {
  margin: 8px 0 12px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.04;
}

.tvv-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tvv-benefits span {
  border: 1px solid var(--tvv-line);
  border-radius: 999px;
  background: #f8fafb;
  font-weight: 800;
  padding: 8px 12px;
}

.tvv-steps {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 20px;
}

.tvv-steps li {
  line-height: 1.55;
}

.tvv-visual {
  display: grid;
  min-height: 220px;
  place-items: center;
  border-radius: 8px;
  color: var(--tvv-brand);
  font-weight: 900;
}

.tvv-visual-learn {
  background: linear-gradient(135deg, #dff9ea, #eef6ff);
}

.tvv-visual-learn strong {
  font-size: 36px;
}

.tvv-visual-guide {
  grid-template-columns: repeat(2, 70px);
  gap: 12px;
  background: linear-gradient(135deg, #fff3dd, #e8f6ff);
}

.tvv-visual-guide span {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.1);
}

.tvv-library {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tvv-library-side {
  align-self: start;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(246, 164, 52, 0.25);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(180deg, #ffd18f, #ffb463);
  color: #1d2939;
  padding: 24px;
  box-shadow: 0 18px 38px rgba(177, 96, 16, 0.13);
}

.tvv-library-side h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.tvv-library-side p {
  margin: 8px 0 22px;
  color: rgba(29, 41, 57, 0.78);
  line-height: 1.5;
}

.tvv-filter-toggle,
.tvv-library-filter-summary {
  display: none;
}

.tvv-library-filter-body {
  display: block;
}

.tvv-selector-group {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(111, 65, 16, 0.16);
  border-left-width: 5px;
  border-radius: 12px;
  padding: 14px 12px;
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: 0 10px 22px rgba(111, 65, 16, 0.08);
}

.tvv-selector-collection {
  border-left-color: #175cd3;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(239, 246, 255, 0.72));
}

.tvv-selector-section {
  border-left-color: #087443;
  background: linear-gradient(135deg, rgba(209, 250, 229, 0.88), rgba(236, 253, 245, 0.72));
}

.tvv-selector-units {
  border-left-color: #b54708;
  background: linear-gradient(135deg, rgba(254, 240, 199, 0.9), rgba(255, 247, 237, 0.76));
}

.tvv-selector-group strong {
  color: #331b04;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tvv-selector-collection strong {
  color: #0b3b8f;
  font-size: 20px;
}

.tvv-selector-section strong {
  color: #075f3b;
}

.tvv-selector-units strong {
  color: #7a2e0e;
}

.tvv-selector-group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 10px;
  color: #1d2939;
  font-weight: 800;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.62);
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease, transform 120ms ease;
}

.tvv-selector-group a:hover {
  border-color: rgba(29, 41, 57, 0.16);
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(2px);
}

.tvv-selector-collection a.is-active {
  border-color: #0b3b8f;
  background: #175cd3;
  color: #fff;
  box-shadow: 0 10px 18px rgba(23, 92, 211, 0.28);
  transform: translateX(2px);
}

.tvv-selector-section a.is-active {
  border-color: #075f3b;
  background: #087443;
  color: #fff;
  box-shadow: 0 10px 18px rgba(8, 116, 67, 0.26);
  transform: translateX(2px);
}

.tvv-selector-units a.is-active {
  border-color: #b54708;
  background: #fdb022;
  color: #5f2505;
  box-shadow: 0 9px 16px rgba(181, 71, 8, 0.24);
  transform: translateX(2px);
}

.tvv-selector-group span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: rgba(29, 41, 57, 0.74);
  font-size: 12px;
  font-weight: 900;
  padding: 3px 7px;
}

.tvv-selector-units a.is-active span {
  background: #fff7ed;
  color: #7a2e0e;
}

.tvv-selector-unit-list {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.tvv-selector-units a {
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.25;
  padding: 9px 10px;
}

.tvv-library-main {
  display: grid;
  gap: 18px;
}

.tvv-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid rgba(216, 229, 238, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  padding: 6px;
  box-shadow: 0 12px 28px rgba(20, 61, 89, 0.08);
}

.tvv-search input {
  border-color: transparent;
  background: transparent;
}

.tvv-unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tvv-unit-list {
  display: grid;
  gap: 14px;
}

.tvv-unit-row {
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(216, 229, 238, 0.86);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 254, 0.96)),
    #fff;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(20, 61, 89, 0.07);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.tvv-unit-row:hover {
  border-color: rgba(36, 180, 126, 0.36);
  box-shadow: 0 18px 38px rgba(20, 61, 89, 0.11);
  transform: translateY(-1px);
}

.tvv-unit-row-head {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.tvv-unit-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tvv-unit-title h2 {
  margin: 0;
  color: var(--tvv-brand-strong);
  font-size: 22px;
  line-height: 1.2;
}

.tvv-unit-title p {
  margin: 3px 0 0;
  color: var(--tvv-muted);
  font-size: 13px;
  font-weight: 700;
}

.tvv-ring {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 3px solid var(--tvv-mint);
  border-radius: 50%;
  background: #fff;
  color: var(--tvv-green);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(36, 180, 126, 0.18);
}

.tvv-unit-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  margin-top: 10px;
}

.tvv-unit-stats span {
  border-radius: 999px;
  background: var(--tvv-brand-soft);
  color: var(--tvv-brand);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.tvv-unit-stats span:nth-child(2) {
  background: var(--tvv-green-soft);
  color: var(--tvv-green);
}

.tvv-unit-stats span:nth-child(3) {
  background: var(--tvv-purple-soft);
  color: var(--tvv-purple);
}

.tvv-unit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.tvv-unit-actions button,
.tvv-unit-action-link {
  align-items: center;
  display: inline-flex;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--tvv-brand), var(--tvv-green));
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 0 13px;
  box-shadow: 0 10px 20px rgba(20, 61, 89, 0.16);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.tvv-unit-actions button:hover,
.tvv-unit-action-link:hover {
  box-shadow: 0 14px 24px rgba(20, 61, 89, 0.2);
  transform: translateY(-1px);
}

.tvv-unit-action-link-secondary {
  background: linear-gradient(135deg, var(--tvv-brand), var(--tvv-green));
  color: #fff;
  box-shadow: 0 10px 20px rgba(20, 61, 89, 0.16);
}

.tvv-unit-empty {
  margin: 14px 0 0;
  color: var(--tvv-muted);
}

.tvv-word-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  margin-top: 16px;
}

.tvv-word-sections {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.tvv-word-section {
  border-top: 1px solid rgba(27, 45, 72, 0.1);
  padding-top: 14px;
}

.tvv-word-section:first-child {
  border-top: 0;
  padding-top: 0;
}

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

.tvv-word-section-head strong {
  color: #143d59;
  display: block;
  font-size: 15px;
  font-weight: 900;
}

.tvv-word-section-head span {
  color: #607086;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.tvv-section-study-link {
  align-items: center;
  background: rgba(9, 106, 98, 0.1);
  border: 1px solid rgba(9, 106, 98, 0.22);
  border-radius: 999px;
  color: #075f59;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  min-height: 30px;
  padding: 0 11px;
  text-decoration: none;
}

.tvv-section-study-link:hover {
  background: #096a62;
  color: #ffffff;
}

.tvv-word-section-tags {
  margin-top: 0;
}

.tvv-phrase-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tvv-phrase-group {
  position: relative;
  max-width: 100%;
}

.tvv-phrase-group summary {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(183, 205, 221, 0.95);
  border-radius: 7px;
  background: #f6f9fb;
  color: var(--tvv-brand-strong);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  padding: 5px 9px;
  text-transform: none;
  transition: background-color 90ms ease, border-color 90ms ease, transform 90ms ease;
}

.tvv-phrase-group summary strong {
  font-weight: 600;
}

.tvv-phrase-group summary::-webkit-details-marker {
  display: none;
}

.tvv-phrase-group summary::after {
  color: var(--tvv-muted);
  content: "+";
  font-weight: 900;
}

.tvv-phrase-group[open] summary {
  border-color: rgba(8, 126, 116, 0.45);
  background: var(--tvv-green-soft);
}

.tvv-phrase-group[open] summary::after {
  content: "-";
}

.tvv-phrase-group summary:hover {
  transform: translateY(-1px);
}

.tvv-phrase-group summary span,
.tvv-phrase-group summary em {
  border-radius: 999px;
  background: #ffffff;
  color: var(--tvv-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  padding: 4px 6px;
}

.tvv-phrase-group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: min(760px, calc(100vw - 64px));
  margin-top: 8px;
  border: 1px solid rgba(216, 229, 238, 0.95);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 14px 38px rgba(16, 32, 51, 0.1);
}

.tvv-popover-family {
  display: grid;
  gap: 4px;
}

.tvv-popover-family small {
  color: #26415f;
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.tvv-popover-definition,
.tvv-popover-extra {
  border-radius: 8px;
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  padding: 7px 9px;
}

.tvv-popover-definition {
  background: #eef6ff;
  color: #143d59;
}

.tvv-popover-synonyms,
.tvv-popover-collocations {
  background: #ddf8ea;
  color: #0f7a52;
}

.tvv-popover-antonyms {
  background: #fff1d8;
  color: #9a4f05;
}

.tvv-popover-phrases,
.tvv-popover-forms {
  background: #f3e8ff;
  color: #6b21a8;
}

.tvv-word-tag {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.tvv-word-trigger {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(183, 205, 221, 0.95);
  border-radius: 7px;
  background: #f6fbff;
  color: var(--tvv-brand-strong);
  cursor: default;
  font-size: 13px;
  font-weight: 600;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 5px 9px;
  white-space: normal;
  transition: background-color 90ms ease, border-color 90ms ease, color 90ms ease, transform 90ms ease;
}

.tvv-word-tag:hover .tvv-word-trigger,
.tvv-word-tag:focus-within .tvv-word-trigger {
  transform: translateY(-1px);
}

.tvv-word-tag.status-chua_hoc .tvv-word-trigger {
  color: var(--tvv-brand-strong);
}

.tvv-word-tag.status-chua_nho .tvv-word-trigger {
  border-color: rgba(245, 158, 11, 0.42);
  color: #9a4f05;
  background: var(--tvv-amber-soft);
}

.tvv-word-tag.status-da_nho .tvv-word-trigger {
  border-color: rgba(8, 126, 116, 0.36);
  color: var(--tvv-green);
  background: var(--tvv-green-soft);
}

.tvv-word-tag.status-thanh_thao .tvv-word-trigger {
  border-color: rgba(126, 87, 194, 0.34);
  color: var(--tvv-purple);
  background: var(--tvv-purple-soft);
}

.tvv-word-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  display: grid;
  gap: 9px;
  width: min(340px, calc(100vw - 40px));
  margin-top: 8px;
  border: 1px solid rgba(216, 229, 238, 0.95);
  border-radius: 12px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff),
    #fff;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 70ms ease, transform 70ms ease;
  box-shadow: 0 20px 52px rgba(16, 32, 51, 0.16);
}

.tvv-word-tag:hover > .tvv-word-popover,
.tvv-word-tag:focus-within > .tvv-word-popover,
.tvv-word-tag.is-open > .tvv-word-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.tvv-word-popover > strong {
  color: var(--tvv-brand-strong);
  font-size: 22px;
  line-height: 1.15;
}

.tvv-word-popover > .tvv-popover-expression {
  overflow-wrap: anywhere;
}

.tvv-word-meta,
.tvv-word-popover span,
.tvv-word-popover em {
  color: var(--tvv-muted);
  line-height: 1.45;
}

.tvv-word-meta {
  color: var(--tvv-brand);
  font-weight: 800;
}

.tvv-word-pos {
  display: inline-flex !important;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490 !important;
  font-size: 12px !important;
  font-weight: 900;
  line-height: 1;
  padding: 5px 8px;
  text-transform: lowercase;
}

.tvv-word-popover .tvv-popover-meaning-vi {
  display: block;
  border: 1px solid rgba(8, 126, 116, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, #e7fff5, #d7f8ea);
  color: #075f59;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  padding: 10px 12px;
}

.tvv-popover-mastered {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(126, 87, 194, 0.24);
  border-radius: 999px;
  background: #faf5ff;
  color: var(--tvv-purple);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 10px;
}

.tvv-popover-mastered input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--tvv-purple);
}

.tvv-word-popover em {
  border-radius: 8px;
  background: var(--tvv-surface-soft);
  padding: 9px 10px;
}

.tvv-popover-images {
  display: flex;
  gap: 8px;
}

.tvv-popover-images img {
  width: 96px;
  height: 72px;
  object-fit: contain;
  border: 1px solid rgba(183, 205, 221, 0.78);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.tvv-unit a {
  display: block;
  min-height: 150px;
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  color: var(--tvv-ink);
  padding: 18px;
}

.tvv-unit.is-active a {
  border-color: var(--tvv-brand);
  box-shadow: 0 0 0 2px rgba(20, 61, 89, 0.12);
}

.tvv-unit span {
  color: var(--tvv-muted);
  font-size: 13px;
  font-weight: 800;
}

.tvv-unit h3 {
  margin: 8px 0;
  font-size: 20px;
}

.tvv-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f4;
}

.tvv-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f7a52;
}

.tvv-word-panel {
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  padding: 22px;
}

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

.tvv-word-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.tvv-word {
  position: relative;
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.tvv-word strong {
  display: block;
  font-size: 22px;
}

.tvv-word span {
  display: inline-block;
  margin: 5px 8px 0 0;
  color: var(--tvv-muted);
  font-size: 13px;
  font-weight: 700;
}

.tvv-word p {
  margin: 10px 0;
  color: var(--tvv-ink);
  font-weight: 750;
}

.tvv-word em {
  display: block;
  color: var(--tvv-muted);
  font-size: 13px;
}

.tvv-word small {
  display: inline-block;
  margin-top: 12px;
  border-radius: 999px;
  background: #eef2f4;
  font-weight: 900;
  padding: 5px 9px;
}

.tvv-word.status-chua_nho small {
  background: #fef3c7;
  color: #92400e;
}

.tvv-word.status-da_nho small {
  background: #dcfce7;
  color: #14532d;
}

.tvv-word.status-thanh_thao small {
  background: #f3e8ff;
  color: #6b21a8;
}

.tvv-empty {
  color: var(--tvv-muted);
}

.tvv-study,
.tvv-practice {
  display: grid;
  gap: 20px;
}

.tvv-study-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(216, 229, 238, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(20, 61, 89, 0.07);
}

.tvv-study-progress {
  border-radius: 999px;
  background: var(--tvv-brand-soft);
  color: var(--tvv-brand);
  font-weight: 900;
  padding: 8px 12px;
}

.tvv-study-return-short {
  display: none;
}

.tvv-primary-link,
.tvv-secondary-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  padding: 0 16px;
}

.tvv-primary-link {
  background: linear-gradient(135deg, var(--tvv-brand), var(--tvv-green));
  color: #fff;
  box-shadow: 0 12px 24px rgba(20, 61, 89, 0.16);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.tvv-secondary-link {
  border: 1px solid var(--tvv-line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--tvv-brand);
}

.tvv-primary-link:hover,
.tvv-secondary-link:hover {
  transform: translateY(-1px);
}

.tvv-study-setup {
  display: grid;
  gap: 18px;
}

.tvv-study-setup .tvv-panel {
  max-width: 860px;
  padding: 18px;
}

.tvv-study-setup .tvv-panel-head {
  align-items: center;
}

.tvv-study-counts dd {
  font-size: 24px;
}

.tvv-study-counts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
}

.tvv-setup-options {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid var(--tvv-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  padding: 12px;
}

.tvv-limit-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tvv-limit-option {
  display: grid;
  min-width: 0;
}

.tvv-limit-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tvv-limit-option > span {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 58px;
  border: 1px solid rgba(20, 61, 89, 0.12);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--tvv-brand), var(--tvv-green));
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  padding: 10px 12px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(20, 61, 89, 0.13);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.tvv-limit-option input[type="radio"]:checked + span {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(36, 180, 126, 0.2), 0 14px 26px rgba(20, 61, 89, 0.18);
}

.tvv-limit-option > span:hover {
  transform: translateY(-1px);
}

.tvv-limit-custom > span {
  align-items: stretch;
  display: grid;
  gap: 6px;
  background: #ffffff;
  color: var(--tvv-brand);
  padding: 8px;
}

.tvv-limit-custom strong {
  align-self: center;
  font-size: 12px;
  line-height: 1.15;
}

.tvv-limit-custom input[type="number"] {
  width: 100%;
  min-height: 30px;
  border-radius: 8px;
  text-align: center;
}

.tvv-setup-start {
  display: flex;
  justify-content: center;
}

.tvv-setup-start button {
  min-width: min(240px, 100%);
}

.tvv-setup-options button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--tvv-brand), var(--tvv-green));
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(20, 61, 89, 0.13);
}

.tvv-custom-limit-form {
  display: grid;
  gap: 6px;
}

.tvv-custom-limit-form label {
  display: grid;
  gap: 4px;
  color: var(--tvv-muted);
  font-size: 12px;
  font-weight: 800;
}

.tvv-custom-limit-form input {
  min-height: 38px;
  border-radius: 10px;
  text-align: center;
}

.tvv-flashcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.tvv-flashcard-single {
  grid-template-columns: minmax(0, 780px);
  justify-content: center;
}

.tvv-flashcard-single.has-card-image {
  grid-template-columns: minmax(0, 660px);
}

.tvv-card-front,
.tvv-card-back {
  display: grid;
  min-height: 330px;
  align-content: center;
  justify-items: center;
  gap: 12px;
  border: 1px solid rgba(216, 229, 238, 0.9);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 254, 0.98)),
    #fff;
  padding: 36px;
  box-shadow: 0 24px 58px rgba(20, 61, 89, 0.13);
}

.tvv-card-front {
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 243, 216, 0.82), rgba(255, 255, 255, 0.98) 44%, rgba(220, 241, 247, 0.82)),
    #fff;
}

.tvv-card-front h2 {
  margin: 12px 0;
  color: #123d4f;
  font-size: clamp(50px, 7vw, 96px);
  line-height: 1;
}

.has-card-image .tvv-card-front {
  min-height: 430px;
  align-content: start;
  gap: 10px;
}

.has-card-image .tvv-card-front h2 {
  margin: 4px 0 2px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
}

.tvv-card-word {
  color: #123d4f;
}

.tvv-card-image {
  display: grid;
  width: min(100%, 380px);
  margin: 0;
  place-items: center;
}

.tvv-card-image img {
  display: block;
  width: 100%;
  max-height: 210px;
  border: 1px solid rgba(216, 229, 238, 0.9);
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 12px 28px rgba(20, 61, 89, 0.12);
}

.has-card-image .tvv-card-phonetic {
  margin: 0;
  font-size: 20px;
}

.has-card-image .tvv-speech-button {
  margin-top: 2px;
}

.tvv-speech-button {
  display: inline-grid;
  width: 50px;
  min-height: 50px;
  place-items: center;
  border: 1px solid rgba(15, 122, 82, 0.2);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tvv-green), var(--tvv-mint));
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  box-shadow: 0 14px 28px rgba(15, 122, 82, 0.22);
  transition: box-shadow 120ms ease, opacity 120ms ease, transform 120ms ease;
}

.tvv-speech-button svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tvv-speech-button:hover,
.tvv-speech-button:focus-visible,
.tvv-speech-button.is-speaking {
  box-shadow: 0 18px 34px rgba(15, 122, 82, 0.3);
  transform: translateY(-1px);
}

.tvv-speech-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.tvv-card-phonetic {
  color: var(--tvv-purple) !important;
}

.tvv-card-front span,
.tvv-card-front p {
  color: var(--tvv-muted);
  font-size: 24px;
  font-weight: 800;
}

.tvv-card-front span,
.tvv-card-pos {
  justify-self: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--tvv-green);
  padding: 7px 12px;
}

.tvv-card-back strong {
  color: var(--tvv-brand-strong);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

.tvv-card-meaning {
  color: var(--tvv-green) !important;
}

.tvv-card-back-word {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.tvv-card-back-word strong {
  color: #123d4f;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
}

.tvv-card-back-word span {
  color: var(--tvv-purple);
  font-size: 20px;
  font-weight: 800;
}

.tvv-card-back p,
.tvv-card-back em {
  color: var(--tvv-muted);
  font-size: 18px;
  line-height: 1.5;
}

.tvv-card-back em {
  border-radius: 12px;
  background: var(--tvv-brand-soft);
  color: var(--tvv-brand);
  padding: 12px 14px;
}

.tvv-card-back p {
  border-left: 4px solid var(--tvv-green);
  padding-left: 14px;
}

.tvv-card-definition {
  width: min(100%, 620px);
  margin: 0;
  border-left-color: #a0652d !important;
  color: #2d4058 !important;
  text-align: left;
}

.tvv-card-definition span {
  color: #6c3e12;
  font-weight: 900;
}

.tvv-card-synonyms {
  width: min(100%, 620px);
  text-align: left;
}

.tvv-card-examples {
  display: grid;
  width: min(100%, 620px);
  gap: 10px;
}

.tvv-card-example {
  display: grid;
  gap: 4px;
  width: 100%;
  border-left: 4px solid var(--tvv-green);
  border-radius: 0 12px 12px 0;
  background: rgba(248, 252, 254, 0.8);
  padding: 10px 12px;
  text-align: left;
}

.tvv-card-example p,
.tvv-card-example small {
  margin: 0;
}

.tvv-card-example p {
  border-left: 0;
  padding-left: 0;
}

.tvv-card-example small {
  color: var(--tvv-brand);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.tvv-memory-actions {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 12px;
  justify-content: center;
}

.tvv-flip-actions {
  display: flex;
  justify-content: center;
}

.tvv-mode-actions {
  flex-wrap: wrap;
}

.tvv-practice-mode-picker {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.tvv-practice-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tvv-practice-mode-grid label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(216, 229, 238, 0.92);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, var(--tvv-surface-soft));
  cursor: pointer;
  padding: 14px;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.tvv-practice-mode-grid label:hover,
.tvv-practice-mode-grid label:focus-within {
  border-color: rgba(36, 180, 126, 0.38);
  box-shadow: 0 14px 28px rgba(20, 61, 89, 0.11);
  transform: translateY(-1px);
}

.tvv-practice-mode-grid input {
  margin-top: 4px;
  accent-color: var(--tvv-green);
}

.tvv-practice-mode-grid span,
.tvv-practice-mode-grid strong,
.tvv-practice-mode-grid em,
.tvv-practice-mode-grid small {
  display: block;
}

.tvv-practice-mode-grid strong {
  color: var(--tvv-brand-strong);
}

.tvv-practice-mode-grid em {
  margin-top: 10px;
  border-radius: 10px;
  background: var(--tvv-brand-soft);
  color: var(--tvv-brand);
  font-style: normal;
  font-weight: 900;
  padding: 10px;
}

.tvv-practice-mode-grid small {
  margin-top: 6px;
  color: var(--tvv-muted);
  font-weight: 800;
}

.tvv-memory-actions button,
.tvv-complete-form button,
.tvv-submit-practice {
  width: auto;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 16px;
  box-shadow: 0 14px 26px rgba(20, 61, 89, 0.14);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.tvv-memory-actions button {
  min-width: 118px;
  min-height: 44px;
  padding: 0 14px;
}

.tvv-complete-form {
  display: flex;
  justify-content: center;
}

.tvv-complete-form button,
.tvv-submit-practice {
  width: 100%;
}

.tvv-memory-actions button:hover,
.tvv-complete-form button:hover,
.tvv-submit-practice:hover {
  box-shadow: 0 18px 32px rgba(20, 61, 89, 0.18);
  transform: translateY(-1px);
}

.memory-chua_nho {
  background: linear-gradient(135deg, #c66a09, var(--tvv-amber));
}

.memory-da_nho {
  background: linear-gradient(135deg, var(--tvv-brand), var(--tvv-green));
}

.memory-thanh_thao {
  background: linear-gradient(135deg, var(--tvv-purple), #8b5cf6);
}

.tvv-complete-form button,
.tvv-submit-practice {
  background: linear-gradient(135deg, var(--tvv-green), var(--tvv-mint));
}

.tvv-complete {
  background:
    linear-gradient(135deg, #ffffff, #eefbf4 62%, #fff7e8),
    #fff;
  box-shadow: var(--tvv-shadow-soft);
}

.tvv-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid rgba(216, 229, 238, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
  box-shadow: 0 10px 24px rgba(20, 61, 89, 0.07);
}

.tvv-mode-tabs a,
.tvv-mode-tabs span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--tvv-line);
  border-radius: 999px;
  background: #fff;
  color: var(--tvv-brand);
  font-weight: 900;
  padding: 10px 14px;
  transition: background-color 120ms ease, transform 120ms ease;
}

.tvv-mode-tabs a.is-active,
.tvv-mode-tabs span.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--tvv-brand), var(--tvv-green));
  color: #fff;
  box-shadow: 0 10px 20px rgba(20, 61, 89, 0.14);
}

.tvv-mode-tabs a:hover {
  transform: translateY(-1px);
}

.tvv-practice-form {
  display: grid;
  gap: 14px;
}

.tvv-practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.tvv-practice-sidebar {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 9px;
  border: 1px solid rgba(216, 229, 238, 0.88);
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff, var(--tvv-surface-soft)),
    #fff;
  padding: 16px;
  box-shadow: 0 16px 34px rgba(20, 61, 89, 0.1);
}

.tvv-practice-sidebar > strong {
  margin-bottom: 6px;
  color: var(--tvv-brand-strong);
  font-size: 18px;
}

.tvv-practice-sidebar a {
  display: grid;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f6f8fa;
  color: var(--tvv-ink);
  padding: 10px 11px;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.tvv-practice-sidebar a em {
  font-size: 15px;
}

.tvv-practice-sidebar a.is-active,
.tvv-practice-sidebar a:hover {
  border-color: rgba(36, 180, 126, 0.2);
  background: var(--tvv-green-soft);
  transform: translateX(2px);
}

.tvv-practice-sidebar span {
  color: var(--tvv-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tvv-practice-sidebar em {
  color: var(--tvv-brand);
  font-style: normal;
  font-weight: 900;
}

.tvv-question {
  border: 1px solid rgba(216, 229, 238, 0.88);
  border-radius: 16px;
  background:
    linear-gradient(135deg, #ffffff, #fbfdff),
    #fff;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(20, 61, 89, 0.07);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.tvv-question:focus-within {
  border-color: rgba(36, 180, 126, 0.42);
  box-shadow: 0 18px 36px rgba(20, 61, 89, 0.11);
}

.tvv-question span {
  display: inline-flex;
  border-radius: 999px;
  background: var(--tvv-brand-soft);
  color: var(--tvv-brand);
  font-size: 13px;
  font-weight: 900;
  padding: 6px 10px;
  text-transform: uppercase;
}

.tvv-question h2 {
  margin: 12px 0 16px;
  color: var(--tvv-brand-strong);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.tvv-question > input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--tvv-line);
  border-radius: 12px;
  background: #fff;
  color: var(--tvv-ink);
  font-size: 18px;
  font-weight: 800;
  padding: 0 14px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.tvv-written-answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.tvv-written-answer input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--tvv-line);
  border-radius: 12px;
  background: #fff;
  color: var(--tvv-ink);
  font-size: 18px;
  font-weight: 800;
  padding: 0 14px;
}

.tvv-written-answer button {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--tvv-brand);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 16px;
}

.tvv-written-answer .tvv-hint-trigger {
  position: relative;
  display: inline-grid;
  min-width: 104px;
  align-content: center;
  gap: 2px;
  background: #eef7ff;
  color: #0f4c75;
  border: 1px solid rgba(15, 76, 117, 0.18);
}

.tvv-written-answer .tvv-hint-trigger span {
  color: #38627e;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.tvv-written-answer button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.tvv-hint-level-panel {
  position: relative;
  display: grid;
  gap: 10px;
  max-width: min(560px, 100%);
  margin-top: 10px;
  border: 1px solid rgba(36, 180, 126, 0.26);
  border-radius: 14px;
  background: #f6fffb;
  box-shadow: 0 18px 34px rgba(20, 61, 89, 0.12);
  color: var(--tvv-ink);
  padding: 12px;
  z-index: 5;
}

.tvv-hint-level-panel[hidden] {
  display: none;
}

.tvv-hint-level-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--tvv-brand-strong);
  font-size: 13px;
  font-weight: 900;
}

.tvv-hint-level-close {
  border: 0;
  border-radius: 999px;
  background: rgba(15, 76, 117, 0.08);
  color: #0f4c75;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.tvv-hint-level-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tvv-hint-level-choice {
  display: grid;
  min-height: 46px;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border: 1px solid rgba(15, 76, 117, 0.16);
  border-radius: 10px;
  background: #fff;
  color: #123047;
  cursor: pointer;
  font-weight: 900;
  padding: 7px 6px;
}

.tvv-hint-level-choice strong {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #e5f3ff;
  color: #0f4c75;
  font-size: 12px;
}

.tvv-hint-level-choice span {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.15;
}

.tvv-hint-level-choice.is-active {
  border-color: rgba(36, 180, 126, 0.55);
  background: #ddf8ec;
  color: var(--tvv-brand-strong);
}

.tvv-hint-level-preview {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(15, 76, 117, 0.12);
  color: #39566a;
  padding-top: 8px;
}

.tvv-hint-level-preview span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

@media (hover: hover) and (pointer: fine) {
  .tvv-question {
    position: relative;
  }

  .tvv-hint-level-panel {
    position: absolute;
    right: 112px;
    width: min(520px, calc(100% - 140px));
    margin-top: 8px;
  }
}

@media (hover: none), (pointer: coarse) {
  .tvv-written-answer {
    grid-template-columns: 1fr 1fr;
  }

  .tvv-written-answer input {
    grid-column: 1 / -1;
  }

  .tvv-written-answer button {
    width: 100%;
  }

  .tvv-hint-level-panel {
    max-width: 100%;
  }

  .tvv-hint-level-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tvv-question-hints {
  display: none;
  gap: 6px;
  margin-top: 12px;
  border: 1px solid rgba(36, 180, 126, 0.18);
  border-radius: 12px;
  background: rgba(36, 180, 126, 0.08);
  color: var(--tvv-brand-strong);
  padding: 10px 12px;
}

.tvv-question-hints.is-visible {
  display: grid;
}

.tvv-question-hints span {
  display: block;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 0;
  text-transform: none;
}

.tvv-question.is-answered .tvv-options,
.tvv-question.is-answered .tvv-written-answer,
.tvv-question.is-answered .tvv-hint-level-panel {
  pointer-events: none;
}

.tvv-question-feedback {
  display: none;
  gap: 6px;
  margin-top: 14px;
  border-radius: 12px;
  padding: 12px 14px;
}

.tvv-question.is-answered .tvv-question-feedback {
  display: grid;
}

.tvv-question-feedback strong,
.tvv-question-feedback span {
  display: block;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 15px;
  font-weight: 900;
  padding: 0;
  text-transform: none;
}

.tvv-question-feedback span {
  font-weight: 800;
}

.tvv-question.is-correct .tvv-question-feedback {
  background: var(--tvv-green-soft);
  color: var(--tvv-green);
}

.tvv-question.is-wrong .tvv-question-feedback {
  background: var(--tvv-amber-soft);
  color: #9a4f05;
}

.tvv-submit-practice:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.tvv-question > input:focus {
  border-color: var(--tvv-green);
  box-shadow: 0 0 0 4px rgba(36, 180, 126, 0.13);
  outline: none;
}

.tvv-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.tvv-options label {
  display: flex;
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(216, 229, 238, 0.92);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 13px;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.tvv-options label:hover,
.tvv-options label:focus-within {
  border-color: rgba(36, 180, 126, 0.38);
  background: var(--tvv-green-soft);
  box-shadow: 0 10px 20px rgba(20, 61, 89, 0.08);
  transform: translateY(-1px);
}

.tvv-options input {
  accent-color: var(--tvv-green);
}

.tvv-dashboard,
.tvv-review {
  display: grid;
  gap: 18px;
}

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

.tvv-stat-card {
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.tvv-stat-card span {
  display: block;
  color: var(--tvv-muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.tvv-stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--tvv-brand);
  font-size: 38px;
  line-height: 1;
}

.tvv-dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
}

.tvv-status-bars {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.tvv-status-bars div {
  display: grid;
  gap: 6px;
}

.tvv-status-bars span,
.tvv-status-bars strong {
  font-size: 14px;
  font-weight: 900;
}

.tvv-status-bars strong {
  color: var(--tvv-muted);
}

.tvv-status-bars i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f4;
}

.tvv-status-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.tvv-status-bars .status-chua_hoc {
  background: #111827;
}

.tvv-status-bars .status-chua_nho {
  background: #b45309;
}

.tvv-status-bars .status-da_nho {
  background: #0f7a52;
}

.tvv-status-bars .status-thanh_thao {
  background: #6b21a8;
}

.tvv-review-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.tvv-review-item {
  display: grid;
  gap: 3px;
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 12px 14px;
}

.tvv-review-item strong {
  font-size: 18px;
}

.tvv-review-item span,
.tvv-review-item small {
  color: var(--tvv-muted);
}

.tvv-review-limit {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-weight: 900;
}

.tvv-review-limit select {
  min-height: 42px;
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  color: var(--tvv-ink);
  font-weight: 900;
  padding: 0 12px;
}

.tvv-teacher {
  display: grid;
  gap: 18px;
}

.tvv-notice {
  border: 1px solid #b9ebcd;
  border-radius: 8px;
  background: #ecfdf3;
  color: #0b4f36;
  font-weight: 900;
  padding: 12px 14px;
}

.tvv-teacher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tvv-form-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.tvv-form-grid label {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

.tvv-form-grid input,
.tvv-form-grid select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  color: var(--tvv-ink);
  padding: 0 12px;
}

.tvv-secondary-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  color: var(--tvv-brand);
  cursor: pointer;
  font-weight: 900;
  padding: 0 16px;
}

.tvv-teacher-students {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.tvv-teacher-student {
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 14px;
}

.tvv-teacher-student summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  list-style: none;
}

.tvv-teacher-student summary::-webkit-details-marker {
  display: none;
}

.tvv-teacher-student summary strong {
  font-size: 19px;
}

.tvv-teacher-student summary span {
  color: var(--tvv-muted);
  font-weight: 800;
}

.tvv-teacher-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.tvv-teacher-metrics span {
  border-radius: 8px;
  background: #fff;
  color: var(--tvv-muted);
  font-weight: 800;
  padding: 10px;
}

.tvv-teacher-metrics strong {
  color: var(--tvv-brand);
}

.tvv-edit-student {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--tvv-line);
  padding-top: 14px;
}

.tvv-edit-student button {
  grid-column: 1 / -1;
}

.tvv-admin-area {
  display: grid;
  gap: 18px;
}

.tvv-admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 18px;
}

.tvv-admin-users {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.tvv-assignments,
.tvv-assignment-list {
  display: grid;
  gap: 18px;
}

.tvv-assignment-card {
  border: 1px solid var(--tvv-line);
  border-radius: 8px;
  background: #fff;
  padding: 22px;
}

.tvv-assignment-status {
  border-radius: 999px;
  background: #eef2f4;
  color: var(--tvv-brand);
  font-weight: 900;
  padding: 8px 12px;
}

.tvv-assignment-status.status-assigned {
  background: #eef6ff;
}

.tvv-assignment-status.status-in_progress {
  background: #fff7d6;
  color: #92400e;
}

.tvv-assignment-status.status-completed {
  background: #dcfce7;
  color: #14532d;
}

.tvv-assignment-progress {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  font-weight: 900;
}

.tvv-assignment-progress i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f4;
}

.tvv-assignment-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f7a52;
}

.tvv-assignment-card .tvv-actions form {
  min-width: 150px;
}

.tvv-assignment-card .tvv-actions button {
  width: 100%;
}

.tvv-checkline {
  align-items: center;
  display: flex !important;
  flex-direction: row;
  gap: 8px !important;
}

.tvv-checkline input {
  width: 18px;
  min-height: 18px;
}

@media (max-width: 800px) {
  .tvv-shell {
    align-content: start;
    grid-auto-rows: max-content;
    grid-template-columns: 1fr;
    min-height: 100svh;
    width: 100%;
    max-width: 100vw;
  }

  .tvv-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    align-self: start;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(15, 122, 82, 0.2);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(235, 249, 244, 0.98)),
      #f0fbf6;
    padding: 10px 0 10px;
    box-shadow: 0 10px 26px rgba(20, 61, 89, 0.12);
  }

  .tvv-brand {
    padding: 4px 14px;
  }

  .tvv-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .tvv-brand strong {
    font-size: 15px;
    line-height: 1.15;
  }

  .tvv-brand span {
    display: none;
  }

  .tvv-nav {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    overflow-x: auto;
    max-width: 100%;
    border-top: 1px solid rgba(15, 122, 82, 0.12);
    border-bottom: 1px solid rgba(20, 61, 89, 0.08);
    background: linear-gradient(135deg, rgba(20, 61, 89, 0.1), rgba(36, 180, 126, 0.14));
    padding: 8px 10px;
    scrollbar-width: none;
  }

  .tvv-nav::-webkit-scrollbar {
    display: none;
  }

  .tvv-nav a {
    flex: 0 0 auto;
    min-height: 40px;
    border: 1px solid rgba(20, 61, 89, 0.16);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff, #f5fbff);
    color: var(--tvv-brand-strong);
    padding: 8px 12px;
    font-size: 13px;
    box-shadow: 0 6px 14px rgba(20, 61, 89, 0.08);
    white-space: nowrap;
  }

  .tvv-nav a:first-child {
    border-left-width: 1px;
  }

  .tvv-nav a:last-child {
    border-radius: 999px;
  }

  .tvv-nav a.is-active {
    border-color: rgba(15, 122, 82, 0.42);
    background: linear-gradient(135deg, #c9f8e0, #e5fbff);
    color: #08334a;
    padding-left: 12px;
    box-shadow: 0 8px 18px rgba(15, 122, 82, 0.16);
  }

  .tvv-nav a.is-active::before {
    display: none;
  }

  .tvv-main {
    align-self: start;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 10px 14px 14px;
  }

  .tvv-library-side,
  .tvv-unit-row {
    border-radius: 12px;
  }

  .tvv-topbar {
    align-items: flex-start;
    flex-direction: row;
    margin-bottom: 16px;
    min-height: 76px;
    padding: 14px 72px 14px 14px;
  }

  .tvv-topbar h1 {
    font-size: 26px;
    line-height: 1.15;
  }

  .tvv-account-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    align-items: center;
    flex-direction: row;
  }

  .tvv-account-actions form,
  .tvv-account-actions details {
    min-width: 0;
  }

  .tvv-account summary,
  .tvv-primary-link,
  .tvv-secondary-link {
    justify-content: center;
    width: 100%;
  }

  .tvv-account summary {
    width: 42px;
    min-height: 42px;
    padding: 5px;
    border-radius: 50%;
  }

  .tvv-account summary strong {
    display: none;
  }

  .tvv-account summary span {
    width: 30px;
    height: 30px;
  }

  .tvv-account-actions > form {
    display: none;
  }

  .tvv-account div form:not(.tvv-password-form) {
    display: block;
  }

  .tvv-account div {
    right: 0;
    left: auto;
    z-index: 80;
    width: min(240px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }

  .tvv-library-side {
    max-height: none;
    overflow: visible;
    padding: 12px;
  }

  .tvv-library-side h2,
  .tvv-library-side p {
    display: none;
  }

  .tvv-filter-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .tvv-library-filter-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.84);
    color: #123d4f;
    padding: 9px 10px;
    box-shadow: 0 8px 18px rgba(20, 61, 89, 0.1);
  }

  .tvv-library-filter-summary span {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tvv-library-filter-summary strong {
    border-radius: 999px;
    background: linear-gradient(135deg, var(--tvv-brand), var(--tvv-green));
    color: #fff;
    font-size: 12px;
    padding: 7px 10px;
  }

  .tvv-library-filter-body {
    display: none;
    flex-direction: column;
    max-height: 58svh;
    margin-top: 10px;
    overflow: auto;
    padding-right: 2px;
  }

  .tvv-filter-toggle:checked ~ .tvv-library-filter-body {
    display: flex;
  }

  .tvv-selector-units {
    order: -1;
  }

  .tvv-selector-group {
    gap: 7px;
    margin-top: 14px;
    padding-top: 14px;
  }

  .tvv-selector-group a {
    min-height: 42px;
    padding: 9px 10px;
  }

  .tvv-selector-group a {
    align-items: flex-start;
  }

  .tvv-selector-group a span {
    max-width: 78px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tvv-search {
    grid-template-columns: 1fr;
    border-radius: 14px;
    padding: 8px;
  }

  .tvv-search input {
    border-color: var(--tvv-line);
    border-radius: 10px;
    background: #fff;
  }

  .tvv-dashboard-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(84px, 1fr);
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tvv-dashboard-grid::-webkit-scrollbar,
  .tvv-study-counts::-webkit-scrollbar,
  .tvv-setup-options::-webkit-scrollbar {
    display: none;
  }

  .tvv-stat-card {
    min-width: 0;
    padding: 10px;
  }

  .tvv-stat-card span {
    min-height: 28px;
    font-size: 10px;
    line-height: 1.2;
  }

  .tvv-stat-card strong {
    margin-top: 4px;
    font-size: 26px;
  }

  .tvv-study-counts {
    grid-template-columns: repeat(4, minmax(68px, 1fr));
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tvv-study-counts div {
    padding: 10px;
  }

  .tvv-study-counts dt {
    min-height: 30px;
    font-size: 11px;
    line-height: 1.25;
  }

  .tvv-study-counts dd {
    margin-top: 4px;
    font-size: 22px;
  }

  .tvv-setup-options {
    gap: 6px;
    padding: 6px;
  }

  .tvv-limit-picker {
    grid-template-columns: repeat(4, minmax(86px, 1fr));
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tvv-limit-picker::-webkit-scrollbar {
    display: none;
  }

  .tvv-limit-option > span {
    min-height: 46px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 1.15;
  }

  .tvv-limit-custom > span {
    padding: 7px;
  }

  .tvv-setup-start button {
    min-height: 42px;
    font-size: 13px;
  }

  .tvv-login,
  .tvv-intro-section,
  .tvv-library,
  .tvv-unit-row-head,
  .tvv-dashboard-columns,
  .tvv-teacher-grid,
  .tvv-admin-grid,
  .tvv-edit-student,
  .tvv-flashcard,
  .tvv-practice-layout,
  .tvv-practice-mode-grid,
  .tvv-written-answer {
    grid-template-columns: 1fr;
  }

  .tvv-practice-sidebar {
    position: static;
  }

  .tvv-unit-stats,
  .tvv-unit-actions {
    justify-content: flex-start;
  }

  .tvv-unit-actions,
  .tvv-unit-action-link,
  .tvv-search button {
    width: 100%;
  }

  .tvv-unit-action-link,
  .tvv-search button {
    justify-content: center;
  }

  .tvv-panel-head {
    display: grid;
    gap: 14px;
  }

  .tvv-panel-head form {
    display: grid;
    width: 100%;
    gap: 10px;
  }

  .tvv-review-limit {
    margin-bottom: 0;
  }

  .tvv-review-limit select,
  .tvv-submit-practice {
    width: 100%;
  }

  .tvv-word-popover {
    left: auto;
    right: 0;
  }

  .tvv-word-tag.is-open > .tvv-word-popover {
    opacity: 1;
    pointer-events: none;
    transform: translateY(0);
  }

  .tvv-card-front,
  .tvv-card-back {
    min-height: 260px;
    padding: 24px;
  }

  .tvv-card-front h2 {
    font-size: clamp(42px, 16vw, 68px);
  }

  .has-card-image .tvv-card-front {
    min-height: 360px;
    padding: 20px;
  }

  .has-card-image .tvv-card-front h2 {
    font-size: clamp(34px, 12vw, 52px);
  }

  .tvv-card-image {
    width: min(100%, 300px);
  }

  .tvv-card-image img {
    max-height: 170px;
  }

  .tvv-speech-button {
    width: 46px;
    min-height: 46px;
    font-size: 20px;
  }

  .tvv-memory-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .tvv-memory-actions form,
  .tvv-memory-actions button {
    min-width: 0;
    width: 100%;
  }

  .tvv-memory-actions button {
    min-height: 42px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 1.15;
  }

  .tvv-mode-tabs {
    align-items: stretch;
    flex-direction: column;
  }

  .tvv-mode-tabs a,
  .tvv-mode-tabs span {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .tvv-brand {
    padding-right: 10px;
    padding-left: 10px;
  }

  .tvv-nav {
    gap: 5px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .tvv-nav a {
    min-height: 38px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 12px;
  }

  .tvv-main {
    padding: 8px 8px calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .tvv-topbar {
    border-radius: 12px;
    min-height: 48px;
    margin-bottom: 8px;
    padding: 8px 54px 8px 10px;
  }

  .tvv-topbar .tvv-eyebrow {
    display: none;
  }

  .tvv-topbar h1 {
    font-size: 24px;
    line-height: 1.05;
  }

  .tvv-panel,
  .tvv-unit-row,
  .tvv-question,
  .tvv-assignment-card {
    padding: 14px;
  }

  .tvv-library-side {
    max-height: 38svh;
    padding: 14px;
  }

  .tvv-library-side h2 {
    font-size: 26px;
  }

  .tvv-dashboard-grid {
    grid-auto-columns: minmax(74px, 1fr);
    gap: 6px;
  }

  .tvv-stat-card {
    padding: 9px 7px;
  }

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

  .tvv-stat-card span {
    min-height: 28px;
    font-size: 9px;
  }

  .tvv-study-counts {
    grid-template-columns: repeat(4, minmax(64px, 1fr));
    gap: 5px;
  }

  .tvv-study-counts div {
    padding: 9px 7px;
  }

  .tvv-study-counts dt {
    font-size: 10px;
  }

  .tvv-study-counts dd {
    font-size: 21px;
  }

  .tvv-setup-options {
    gap: 8px;
  }

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

  .tvv-limit-option > span {
    font-size: 11px;
  }

  .tvv-panel-head h2 {
    font-size: 26px;
    line-height: 1.15;
  }

  .tvv-panel-head p {
    margin-bottom: 0;
  }

  .tvv-unit-title {
    gap: 10px;
  }

  .tvv-unit-title h2 {
    font-size: 20px;
    overflow-wrap: anywhere;
  }

  .tvv-word-tags {
    gap: 6px;
  }

  .tvv-word-trigger {
    font-size: 12px;
    line-height: 1.25;
    padding: 5px 8px;
  }

  .tvv-study {
    gap: 8px;
  }

  .tvv-study-head {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .tvv-study-return {
    min-height: 34px;
    justify-content: center;
    padding: 0 10px;
    white-space: nowrap;
  }

  .tvv-study-return-full {
    display: none;
  }

  .tvv-study-return-short {
    display: inline;
  }

  .tvv-study-progress {
    min-height: 34px;
    align-content: center;
    justify-self: stretch;
    padding: 6px 10px;
    font-size: 14px;
    line-height: 1.1;
    text-align: center;
  }

  .tvv-flashcard-nav {
    gap: 6px;
  }

  .tvv-flashcard-nav .tvv-secondary-link {
    min-height: 36px;
    border-radius: 10px;
    font-size: 15px;
    padding: 0 10px;
  }

  .tvv-card-front,
  .tvv-card-back {
    min-height: min(50svh, 280px);
    border-radius: 16px;
    padding: 14px;
  }

  .tvv-card-front h2 {
    margin: 2px 0;
    font-size: clamp(32px, 13vw, 54px);
    overflow-wrap: anywhere;
  }

  .has-card-image .tvv-card-front {
    min-height: min(53svh, 360px);
    gap: 6px;
  }

  .has-card-image .tvv-card-front h2 {
    font-size: clamp(30px, 10vw, 44px);
  }

  .tvv-card-image {
    width: min(100%, 240px);
  }

  .tvv-card-image img {
    max-height: 132px;
    border-radius: 12px;
  }

  .tvv-speech-button {
    width: 38px;
    min-height: 38px;
    font-size: 18px;
  }

  .tvv-speech-button svg {
    width: 21px;
    height: 21px;
  }

  .tvv-card-back strong {
    font-size: clamp(26px, 9vw, 38px);
    overflow-wrap: anywhere;
  }

  .tvv-card-front span,
  .tvv-card-front p,
  .tvv-card-back p,
  .tvv-card-back em {
    font-size: 16px;
  }

  .has-card-image .tvv-card-phonetic {
    font-size: 14px;
  }

  .tvv-card-example small {
    font-size: 13px;
  }

  .tvv-memory-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .tvv-memory-actions form,
  .tvv-complete-form button {
    width: 100%;
  }

  .tvv-memory-actions button {
    width: 100%;
    min-height: 40px;
    padding: 0 6px;
    font-size: 11px;
  }

  .tvv-practice-sidebar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
  }

  .tvv-practice-sidebar > strong {
    display: none;
  }

  .tvv-practice-sidebar a {
    flex: 0 0 auto;
    min-width: 118px;
  }

  .tvv-word-tag.is-open {
    display: grid;
    flex: 1 0 100%;
    width: 100%;
  }

  .tvv-word-tag.is-open > .tvv-word-trigger {
    width: fit-content;
  }

  .tvv-word-tag.is-open > .tvv-word-popover {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
    margin-top: 8px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}
.tvv-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.tvv-type-filter a,
.tvv-item-badge,
.tvv-question-type {
  border: 1px solid rgba(27, 45, 72, 0.14);
  border-radius: 999px;
  color: #26415f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.tvv-type-filter a {
  background: #ffffff;
  padding: 8px 11px;
  text-decoration: none;
}

.tvv-type-filter a.is-active,
.tvv-type-filter a:hover {
  background: #163b5c;
  border-color: #163b5c;
  color: #ffffff;
}

.tvv-item-badge {
  background: rgba(22, 59, 92, 0.08);
  display: inline-flex;
  margin-right: 6px;
  padding: 4px 5px;
}

.tvv-card-kicker,
.tvv-card-headword,
.tvv-card-pattern,
.tvv-usage-note,
.tvv-question-type {
  display: block;
}

.tvv-card-kicker {
  color: #607086;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.tvv-card-structure {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tvv-card-headword,
.tvv-card-pattern {
  color: #26415f;
  font-weight: 800;
}

.tvv-card-pattern {
  margin-top: 8px;
}

.tvv-usage-note {
  background: rgba(255, 193, 7, 0.15);
  border-left: 4px solid #d99b00;
  border-radius: 6px;
  color: #4d3a00;
  padding: 10px 12px;
}

.tvv-family-table {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.tvv-family-table div {
  align-items: center;
  background: rgba(22, 59, 92, 0.06);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(70px, 0.4fr) 1fr;
  padding: 8px 10px;
}

.tvv-family-table dt {
  color: #607086;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tvv-family-table dd {
  color: #1b2d48;
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
}

.tvv-question-type {
  background: rgba(22, 59, 92, 0.08);
  margin-bottom: 8px;
  padding: 5px 7px;
  width: fit-content;
}

.tvv-reward-result {
  width: fit-content;
  margin: 12px 0;
  border: 1px solid rgba(246, 164, 52, 0.44);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7d6, #fff);
  color: #9a4f05;
  font-size: 22px;
  font-weight: 900;
  padding: 8px 14px;
  box-shadow: 0 10px 24px rgba(246, 164, 52, 0.16);
}

@media (max-width: 640px) {
  .tvv-word-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tvv-section-study-link {
    min-height: 28px;
  }
}

/* Study setup, flashcard, practice, and collection picker refresh. */
.tvv-library.is-collection-picker {
  grid-template-columns: minmax(0, 1fr);
}

.tvv-collection-picker-head {
  display: grid;
  gap: 6px;
  max-width: 760px;
  border: 1px solid rgba(216, 229, 238, 0.9);
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 14px 32px rgba(20, 61, 89, 0.08);
}

.tvv-collection-picker-head h2 {
  margin: 0;
  color: var(--tvv-brand-strong);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.tvv-collection-picker-head p {
  margin: 0;
  color: var(--tvv-muted);
  font-weight: 700;
}

.tvv-collection-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 262px));
  gap: 24px;
  align-items: stretch;
}

.tvv-collection-card {
  position: relative;
  display: grid;
  min-height: 226px;
  align-content: start;
  gap: 10px;
  border: 0;
  border-radius: 16px 16px 24px 24px;
  color: #122033;
  overflow: hidden;
  padding: 24px 22px 26px;
  text-decoration: none;
  box-shadow: inset 0 -10px rgba(17, 25, 39, 0.12), 0 14px 28px rgba(20, 61, 89, 0.1);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.tvv-collection-card:hover,
.tvv-collection-card:focus-visible {
  box-shadow: inset 0 -10px rgba(17, 25, 39, 0.1), 0 18px 34px rgba(20, 61, 89, 0.14);
  transform: translateY(-2px);
}

.tvv-collection-card::after {
  content: ">";
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.tvv-collection-card.tone-1 {
  background: #ffc7ab;
}

.tvv-collection-card.tone-2 {
  background: #ffc45f;
}

.tvv-collection-card.tone-3 {
  background: #ffe06a;
}

.tvv-collection-card.tone-4 {
  background: #b6d28c;
}

.tvv-collection-card.collection-cambridge {
  background: linear-gradient(180deg, #ffc96b, #ffbb4f);
}

.tvv-collection-card.collection-global {
  background: linear-gradient(180deg, #b9d891, #a8c97e);
}

.tvv-collection-card.collection-ielts {
  background: linear-gradient(180deg, #ffc7ab, #ffbfa4);
}

.tvv-collection-card.collection-toefl {
  background: linear-gradient(180deg, #ffe46d, #ffd957);
}

.tvv-collection-card.collection-sat {
  background: linear-gradient(180deg, #b8d391, #a9c882);
}

.tvv-collection-logo {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: #0f3f5c;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
}

.collection-cambridge .tvv-collection-logo {
  background: #fff3cf;
  color: #8b1e35;
}

.collection-global .tvv-collection-logo {
  border-radius: 50%;
  background: #0ea5e9;
  color: #ffffff;
}

.tvv-collection-card strong {
  margin-top: 8px;
  color: #111827;
  font-size: 22px;
  line-height: 1.15;
}

.tvv-collection-card em {
  min-height: 40px;
  color: rgba(17, 24, 39, 0.66);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
}

.tvv-collection-card-meta,
.tvv-collection-card-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(17, 24, 39, 0.18);
  color: rgba(17, 24, 39, 0.74);
  font-size: 13px;
  font-weight: 800;
  padding-top: 9px;
}

.tvv-collection-card-stats {
  justify-content: space-between;
}

.tvv-collection-card-stats span {
  color: rgba(17, 24, 39, 0.76);
}

.tvv-library-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(216, 229, 238, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 10px 12px;
}

.tvv-library-breadcrumb span {
  color: var(--tvv-brand-strong);
  font-size: 13px;
  font-weight: 900;
}

.tvv-library-breadcrumb a {
  color: var(--tvv-green);
  font-size: 13px;
  font-weight: 900;
}

.tvv-search {
  align-items: center;
  border-radius: 10px;
  padding: 8px;
}

.tvv-search input,
.tvv-search button {
  min-height: 42px;
}

.tvv-search button {
  border-radius: 8px;
  padding: 0 18px;
}

.tvv-type-filter {
  align-items: center;
  margin: 0 0 8px;
}

.tvv-type-filter a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 8px;
  padding: 0 11px;
}

.tvv-limit-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.tvv-limit-choice-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tvv-limit-option > span {
  min-height: 44px;
  border-color: rgba(20, 61, 89, 0.14);
  background: #eef7f4;
  color: var(--tvv-brand);
  box-shadow: none;
}

.tvv-limit-option input[type="radio"]:checked + span {
  border-color: var(--tvv-green);
  background: #dff7ed;
  color: #075f3b;
  box-shadow: 0 0 0 3px rgba(15, 122, 82, 0.13);
}

.tvv-limit-current {
  display: grid;
  grid-template-columns: 1fr minmax(110px, 160px) 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(216, 229, 238, 0.92);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.tvv-limit-current span,
.tvv-limit-current em {
  color: var(--tvv-muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.tvv-limit-current span {
  justify-self: end;
}

.tvv-limit-current input {
  width: 100%;
  min-height: 50px;
  border-radius: 8px;
  color: var(--tvv-brand-strong);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.tvv-setup-options button {
  background: linear-gradient(135deg, var(--tvv-green), var(--tvv-mint));
}

.tvv-flashcard-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.tvv-secondary-link.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
  pointer-events: none;
}

.tvv-card-front h2 {
  margin-bottom: 2px;
  font-size: 48px;
  line-height: 1.05;
}

.tvv-card-front .tvv-card-phonetic {
  margin: 0 0 6px;
  color: var(--tvv-purple) !important;
  font-size: 22px;
}

.tvv-card-back {
  align-content: stretch;
  justify-items: stretch;
  gap: 12px;
  padding: 22px;
  max-height: 680px;
  overflow: auto;
}

.tvv-card-zone {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(216, 229, 238, 0.92);
  border-radius: 8px;
  padding: 14px;
}

.tvv-card-zone-primary {
  background: #eff8ff;
  border-color: #b9e6fe;
  justify-items: center;
  text-align: center;
}

.tvv-card-zone-meta {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.tvv-card-zone-example {
  background: #fff7ed;
  border-color: #fed7aa;
}

.tvv-card-back strong {
  font-size: 30px;
}

.tvv-card-meaning {
  max-width: 100%;
  color: #047857 !important;
  font-size: 22px !important;
  font-weight: 900;
  line-height: 1.35;
  white-space: pre-line;
}

.tvv-card-back p,
.tvv-card-back em {
  font-size: 16px;
}

.tvv-card-definition,
.tvv-card-synonyms,
.tvv-usage-note {
  width: 100%;
  margin: 0;
  border-left: 0;
  padding-left: 0;
}

.tvv-card-definition {
  color: #2d4058 !important;
  line-height: 1.45;
}

.tvv-card-definition span,
.tvv-card-synonyms span {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  color: var(--tvv-brand);
  font-size: 12px;
  font-weight: 900;
  margin-right: 8px;
  padding: 4px 7px;
}

.tvv-card-synonyms {
  color: var(--tvv-brand);
  font-weight: 800;
}

.tvv-card-example {
  max-height: 150px;
  overflow: auto;
}

.tvv-card-example p {
  color: #24364f;
  font-size: 16px;
  line-height: 1.5;
}

.tvv-card-example small {
  font-size: 14px;
}

.tvv-card-empty {
  color: var(--tvv-muted);
  margin: 0;
}

.tvv-practice-confirm {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  padding: 18px;
}

.tvv-practice-confirm[hidden] {
  display: none;
}

.tvv-practice-confirm-dialog {
  display: grid;
  width: min(100%, 520px);
  gap: 14px;
  border-radius: 12px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.tvv-practice-confirm-dialog h2,
.tvv-practice-confirm-dialog p {
  margin: 0;
}

.tvv-practice-confirm-dialog h2 {
  color: var(--tvv-brand-strong);
  font-size: 24px;
}

.tvv-practice-confirm-dialog p {
  color: var(--tvv-muted);
  font-weight: 800;
}

.tvv-practice-confirm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tvv-practice-confirm-list span {
  border-radius: 999px;
  background: var(--tvv-brand-soft);
  color: var(--tvv-brand);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 9px;
}

@media (max-width: 760px) {
  .tvv-collection-card-grid,
  .tvv-limit-choice-row,
  .tvv-limit-current {
    grid-template-columns: 1fr;
  }

  .tvv-limit-current span,
  .tvv-limit-current em {
    justify-self: center;
  }

  .tvv-flashcard-nav {
    justify-content: stretch;
  }

  .tvv-flashcard-nav .tvv-secondary-link {
    flex: 1;
    justify-content: center;
  }
}

.tvv-library-side {
  padding: 18px;
}

.tvv-library-side h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.tvv-library-filter-body {
  display: grid;
  gap: 14px;
}

.tvv-selector-group {
  margin-top: 0;
  padding: 12px;
}

.tvv-selector-group strong {
  font-size: 12px;
}

.tvv-selector-group a {
  min-height: 40px;
  padding: 9px 10px;
}

.tvv-selector-unit-list {
  max-height: 238px;
}

/* Sequential learning picker: Collection -> Section -> Unit. */
.tvv-library {
  grid-template-columns: minmax(0, 1fr);
}

.tvv-library-main {
  width: 100%;
}

.tvv-step-panel {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(216, 229, 238, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 18px;
  box-shadow: 0 12px 30px rgba(20, 61, 89, 0.08);
}

.tvv-step-head {
  display: grid;
  gap: 3px;
}

.tvv-step-head h2 {
  margin: 0;
  color: var(--tvv-brand-strong);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
}

.tvv-section-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.tvv-section-card {
  display: flex;
  min-height: 72px;
  align-items: center;
  border: 1px solid rgba(8, 116, 67, 0.18);
  border-left: 6px solid #087443;
  border-radius: 12px;
  background: linear-gradient(135deg, #effdf6, #ffffff);
  color: #0f3a2a;
  padding: 14px 16px;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(8, 116, 67, 0.08);
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease, transform 120ms ease;
}

.tvv-section-card strong {
  font-size: 20px;
  line-height: 1.15;
}

.tvv-section-card:hover,
.tvv-section-card:focus-visible,
.tvv-section-card.is-active {
  border-color: #075f3b;
  background: #087443;
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(8, 116, 67, 0.22);
  transform: translateY(-1px);
}

.tvv-unit-picker {
  border-color: rgba(181, 71, 8, 0.2);
  background: linear-gradient(135deg, rgba(254, 240, 199, 0.92), rgba(255, 247, 237, 0.9));
}

.tvv-step-unit-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.tvv-step-unit-list a {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(181, 71, 8, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #1d2939;
  padding: 11px 13px;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(111, 65, 16, 0.08);
}

.tvv-step-unit-list a strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.25;
}

.tvv-step-unit-list a span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff7ed;
  color: #7a2e0e;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
}

.tvv-step-unit-list a:hover,
.tvv-step-unit-list a:focus-visible,
.tvv-step-unit-list a.is-active {
  border-color: #b54708;
  background: #fdb022;
  color: #5f2505;
  box-shadow: 0 12px 24px rgba(181, 71, 8, 0.2);
}

.tvv-step-unit-list a.is-active span {
  background: #ffffff;
}

@media (max-width: 760px) {
  .tvv-library-main {
    gap: 12px;
  }

  .tvv-step-panel {
    border-radius: 12px;
    padding: 14px;
  }

  .tvv-section-card-grid,
  .tvv-step-unit-list {
    grid-template-columns: 1fr;
  }

  .tvv-step-unit-list {
    max-height: 46svh;
  }

  .tvv-library-breadcrumb {
    align-items: stretch;
    flex-direction: column;
  }

  .tvv-library-breadcrumb a {
    width: fit-content;
  }
}

@media (max-width: 520px) {
  .tvv-shell-page-study .tvv-brand {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .tvv-shell-page-study .tvv-brand .tvv-logo,
  .tvv-shell-page-study .tvv-brand span:not(.tvv-logo) {
    display: none;
  }

  .tvv-shell-page-study .tvv-brand strong {
    font-size: 18px;
  }

  .tvv-shell-page-study .tvv-nav {
    gap: 5px;
    margin-top: 0;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .tvv-shell-page-study .tvv-nav a {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .tvv-page-study {
    padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
  }

  .tvv-page-study .tvv-topbar {
    min-height: 42px;
    margin-bottom: 6px;
    padding: 7px 48px 7px 10px;
  }

  .tvv-page-study .tvv-topbar .tvv-eyebrow {
    display: none;
  }

  .tvv-page-study .tvv-topbar h1 {
    font-size: 22px;
    line-height: 1;
  }

  .tvv-page-study .tvv-study {
    gap: 7px;
  }

  .tvv-page-study .tvv-study-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    border-radius: 12px;
    padding: 7px;
  }

  .tvv-page-study .tvv-study-return,
  .tvv-page-study .tvv-study-progress,
  .tvv-page-study .tvv-flashcard-nav .tvv-secondary-link {
    min-height: 34px;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.1;
    padding: 0 9px;
  }

  .tvv-page-study .tvv-study-return-full {
    display: none;
  }

  .tvv-page-study .tvv-study-return-short {
    display: inline;
  }

  .tvv-page-study .tvv-study-progress {
    display: grid;
    align-content: center;
    justify-self: stretch;
    text-align: center;
  }

  .tvv-page-study .tvv-flashcard-nav {
    gap: 6px;
  }

  .tvv-page-study .tvv-card-front,
  .tvv-page-study .tvv-card-back {
    min-height: min(48svh, 270px);
    border-radius: 14px;
    padding: 13px;
  }

  .tvv-page-study .has-card-image .tvv-card-front {
    min-height: min(52svh, 348px);
    gap: 5px;
  }

  .tvv-page-study .tvv-card-front h2 {
    margin: 0;
    font-size: clamp(30px, 12vw, 50px);
    line-height: 1;
  }

  .tvv-page-study .has-card-image .tvv-card-front h2 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .tvv-page-study .tvv-card-front .tvv-card-phonetic,
  .tvv-page-study .has-card-image .tvv-card-phonetic {
    margin: 0;
    font-size: 14px;
    line-height: 1.15;
  }

  .tvv-page-study .tvv-card-image {
    width: min(100%, 236px);
  }

  .tvv-page-study .tvv-card-image img {
    max-height: 128px;
    border-radius: 10px;
  }

  .tvv-page-study .tvv-speech-button {
    width: 38px;
    min-height: 38px;
    margin-top: 2px;
  }

  .tvv-page-study .tvv-speech-button svg {
    width: 21px;
    height: 21px;
  }

  .tvv-page-study .tvv-flip-actions,
  .tvv-page-study .tvv-memory-actions {
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 20;
    margin-top: 0;
  }

.tvv-page-study .tvv-flip-actions .tvv-primary-link,
  .tvv-page-study .tvv-memory-actions button {
    min-height: 42px;
  }
}

.tvv-memory-actions a {
  align-items: center;
  border: none;
  border-radius: 14px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  text-decoration: none;
}

.tvv-preview-result {
  margin-top: 14px;
}

.tvv-print-page {
  display: grid;
  gap: 18px;
}

.tvv-print-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tvv-print-form label {
  display: grid;
  gap: 6px;
}

.tvv-print-form input {
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font: inherit;
  min-height: 42px;
  padding: 8px 10px;
  width: 110px;
}

.tvv-print-form input[type="checkbox"] {
  min-height: auto;
  padding: 0;
  width: auto;
}

.tvv-print-checks {
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  margin: 0;
  padding: 10px 12px 12px;
}

.tvv-print-checks legend {
  font-weight: 900;
  padding: 0 5px;
}

.tvv-print-checks label {
  align-items: center;
  display: flex;
  flex-direction: row;
  font-size: 13px;
}

.tvv-print-document {
  background: #ffffff;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.08);
}

.tvv-print-part {
  padding: 28px;
}

.tvv-print-part + .tvv-print-part {
  border-top: 1px dashed #98a2b3;
}

.tvv-print-head {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.tvv-print-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tvv-print-head h2,
.tvv-print-head p {
  margin: 0;
}

.tvv-print-head strong {
  color: #1849a9;
  font-size: 15px;
}

.tvv-print-table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

.tvv-print-table th,
.tvv-print-table td {
  border: 1px solid #d0d5dd;
  line-height: 1.35;
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.tvv-print-table th {
  background: #f2f4f7;
  font-weight: 900;
}

.tvv-print-table th:first-child,
.tvv-print-table td:first-child {
  text-align: center;
  width: 42px;
}

.tvv-print-section-title {
  color: #101828;
  font-size: 14px;
  margin: 18px 0 8px;
}

.tvv-print-exercise {
  break-inside: avoid;
  page-break-inside: avoid;
}

.tvv-print-question {
  border-top: 1px solid #eaecf0;
  display: grid;
  gap: 6px;
  padding: 6px 0;
}

.tvv-print-question p {
  margin: 0;
}

.tvv-print-choice-question {
  align-items: start;
  grid-template-columns: minmax(150px, 0.9fr) minmax(0, 3.1fr);
}

.tvv-print-options {
  display: grid;
  gap: 4px 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tvv-print-options span,
.tvv-print-written span {
  color: #344054;
  font-size: 12px;
}

.tvv-print-written p {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.tvv-print-written span {
  white-space: nowrap;
}

.tvv-print-answer-key {
  background: #fbfcff;
}

.tvv-answer-block {
  border-top: 1px solid #d0d5dd;
  padding: 10px 0;
}

.tvv-answer-block h3,
.tvv-answer-block p {
  margin: 0 0 6px;
}

.tvv-answer-block p {
  font-size: 12px;
  line-height: 1.45;
}

@media print {
  .tvv-sidebar,
  .tvv-topbar,
  .tvv-print-controls {
    display: none !important;
  }

  .tvv-shell,
  .tvv-main {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .tvv-print-document {
    border: 0;
    box-shadow: none;
  }

  .tvv-print-part {
    break-after: page;
    page-break-after: always;
    padding: 0;
  }

  .tvv-print-part:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .tvv-print-table {
    font-size: 11px;
  }

  .tvv-print-section-title {
    font-size: 12px;
    margin: 12px 0 6px;
  }

  .tvv-print-question {
    padding: 4px 0;
  }

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