:root {
  --bg: #f6f1ea;
  --bg-pattern: #fbf7f2;
  --panel: rgba(255, 253, 250, 0.82);
  --panel-border: #e9dfd3;
  --header: rgba(255, 252, 248, 0.88);
  --header-border: #ebdfd2;
  --ink: #443d35;
  --ink-strong: #141b2d;
  --muted: #7c7974;
  --button: #d36f3d;
  --button-dark: #b85c30;
  --button-light: #ea9569;
  --line: #ebe2d7;
  --surface: #fffdfa;
  --green: #2d8a52;
  --red: #b0423f;
  --amber: #b46c18;
  --surface-soft: rgba(255, 253, 250, 0.92);
  --surface-soft-strong: rgba(255, 253, 250, 0.98);
  --surface-glass: rgba(255, 252, 248, 0.72);
  --pill-border: rgba(233, 223, 211, 0.96);
  --sidebar-width: 288px;
  --sidebar-collapsed-width: 88px;
  --sidebar-bg: rgba(255, 252, 248, 0.72);
  --sidebar-divider: rgba(233, 223, 211, 0.9);
  --sidebar-button-bg: rgba(255, 253, 250, 0.92);
  --sidebar-button-hover-bg: rgba(255, 244, 237, 0.98);
  --sidebar-button-text: #544f48;
  --sidebar-button-active-text: #b85c30;
  --sidebar-muted: #8b847d;
  --status-ok: #0f7c45;
  --status-error: #b3413c;
  --shadow-soft: 0 12px 28px rgba(77, 54, 34, 0.08);
  --shadow-card: 0 10px 24px rgba(80, 80, 90, 0.05);
  --shadow-panel: 0 16px 36px rgba(77, 54, 34, 0.08);
  --surface-white: #fff;
  --border-input: #cad2db;
  --bg-card-alt: #d7dae2;
  --body-font: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141823;
  --bg-pattern: #1a1f2b;
  --panel: rgba(24, 29, 40, 0.88);
  --panel-border: #343b4d;
  --header: rgba(22, 27, 38, 0.84);
  --header-border: #384154;
  --ink: #ddd6cf;
  --ink-strong: #f4ede6;
  --muted: #9c978f;
  --button: #d07a4d;
  --button-dark: #b76335;
  --button-light: #e3996e;
  --line: #363d4d;
  --surface: #1d2431;
  --surface-soft: rgba(31, 38, 52, 0.92);
  --surface-soft-strong: rgba(37, 45, 60, 0.98);
  --surface-glass: rgba(19, 24, 35, 0.86);
  --pill-border: rgba(84, 93, 111, 0.58);
  --sidebar-bg: rgba(18, 23, 33, 0.88);
  --sidebar-divider: rgba(68, 78, 94, 0.72);
  --sidebar-button-bg: rgba(30, 37, 50, 0.94);
  --sidebar-button-hover-bg: rgba(43, 50, 66, 0.98);
  --sidebar-button-text: #dad3cc;
  --sidebar-button-active-text: #ffd1ac;
  --sidebar-muted: #aaa39b;
  --status-ok: #7ed7a4;
  --status-error: #ff9f97;
  --shadow-soft: 0 18px 36px rgba(0, 0, 0, 0.28);
  --shadow-panel: 0 24px 48px rgba(0, 0, 0, 0.34);
  --text-strong: #f4ede6;
  --text-body-dm: #ddd6cf;
  --text-muted-dm: #9c978f;
  --surface-white: #1d2431;
  --border-input: #363d4d;
  --shadow-card: var(--shadow-soft);
  --bg-card-alt: #1d2431;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 26%),
    radial-gradient(circle at top right, rgba(247, 226, 210, 0.6), transparent 20%),
    linear-gradient(180deg, var(--bg-pattern) 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: var(--body-font);
}

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

a {
  color: inherit;
}

.mock-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.shell-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 22px;
  height: 100vh;
  padding: 24px 18px 18px;
  border-right: 1px solid var(--sidebar-divider);
  background: var(--sidebar-bg);
  backdrop-filter: blur(18px);
}

.shell-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.shell-sidebar-backdrop {
  display: none;
}

.topbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 18px;
  padding: 22px 30px 0;
  background: transparent;
}

.sidebar-toggle {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--pill-border);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--sidebar-button-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    var(--shadow-soft);
  cursor: pointer;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.sidebar-toggle:hover {
  transform: translateY(-1px);
  background: var(--sidebar-button-hover-bg);
  color: var(--sidebar-button-active-text);
}

.sidebar-toggle__icon {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 20px;
  padding: 6px;
  margin: -6px;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.brand-lockup:hover {
  background: var(--surface-soft);
}

.brand-lockup:focus-visible {
  outline: none;
  background: var(--surface-soft-strong);
  box-shadow: 0 0 0 3px rgba(211, 111, 61, 0.18);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 1px solid var(--pill-border);
  background: var(--surface-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    var(--shadow-soft);
  color: var(--button-dark);
}

.brand-mark__icon {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-strong);
}

.brand-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
}

.sidebar-nav {
  min-height: 0;
}

.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.sidebar-stack--expanded {
  display: flex;
}

.sidebar-mini-stack {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 100%;
  width: 100%;
}

.sidebar-mini-group {
  display: grid;
  gap: 8px;
  width: 100%;
  justify-items: center;
}

.sidebar-mini-status,
.sidebar-mini-tab {
  width: 56px;
  min-height: 56px;
  border: 1px solid var(--pill-border);
  border-radius: 20px;
  background: var(--surface-soft);
  color: var(--sidebar-button-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    var(--shadow-soft);
}

.sidebar-mini-status {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  padding: 8px 6px;
}

.sidebar-mini-status__icon,
.sidebar-mini-tab__icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.sidebar-mini-status__icon svg,
.sidebar-mini-tab__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sidebar-mini-status__value {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink-strong);
}

.sidebar-mini-tab {
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.sidebar-mini-tab:hover,
.sidebar-mini-tab.is-active {
  transform: translateY(-1px);
  background: var(--sidebar-button-hover-bg);
  border-color: rgba(227, 174, 145, 0.82);
  color: var(--sidebar-button-active-text);
}

.sidebar-mini-tab--language {
  min-height: 42px;
  border-radius: 16px;
}

.sidebar-mini-tab__label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-strong, inherit);
}

.sidebar-mini-tab__icon {
  color: var(--text-strong, inherit);
}

.sidebar-mini-tab__icon--theme {
  font-size: 1rem;
}

.sidebar-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid var(--pill-border);
  background: var(--surface-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    var(--shadow-soft);
}

.sidebar-panel__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}

.sidebar-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sidebar-chip-group .language-chip,
.sidebar-chip-group .auth-user-pill {
  width: 100%;
  justify-content: flex-start;
}

.sidebar-panel .utility-status {
  width: 100%;
  justify-content: flex-start;
}

.sidebar-spacer {
  flex: 1 1 auto;
}

.sidebar-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--sidebar-button-bg);
  color: var(--sidebar-button-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    var(--shadow-soft);
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.sidebar-theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--sidebar-button-hover-bg);
}

.sidebar-theme-toggle__icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(209, 108, 61, 0.14);
  color: var(--button-dark);
  font-size: 0.95rem;
}

body[data-sidebar-collapsed="true"] .mock-shell {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

body[data-sidebar-collapsed="true"] .shell-sidebar {
  justify-items: center;
  padding-inline: 12px;
}

body[data-sidebar-collapsed="true"] .brand-lockup {
  justify-content: center;
  margin: 0;
  padding: 0;
}

body[data-sidebar-collapsed="true"] .brand-copy {
  display: none;
}

body[data-sidebar-collapsed="true"] .sidebar-stack--expanded {
  display: none;
}

body[data-sidebar-collapsed="true"] .sidebar-mini-stack {
  display: flex;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 1rem;
}

.topbar-label {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--surface-soft);
  color: var(--button);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    var(--shadow-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-product {
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-strong);
}

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

.topbar-actions:empty {
  display: none;
}

.topbar-link {
  text-decoration: none;
  font-weight: 700;
  color: var(--ink-strong);
}

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

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

.utility-status,
.auth-user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--surface-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    var(--shadow-soft);
  color: var(--sidebar-button-text);
  font-size: 0.88rem;
}

.utility-status--ok {
  color: var(--status-ok);
}

.utility-status--error {
  color: var(--status-error);
}

.language-switcher-label {
  color: var(--muted);
  font-size: 0.94rem;
}

.language-chip {
  border: 1px solid var(--pill-border);
  background: var(--sidebar-button-bg);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--sidebar-button-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    var(--shadow-soft);
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.language-chip.is-active,
.language-chip:hover {
  transform: translateY(-1px);
  background: var(--sidebar-button-hover-bg);
  border-color: rgba(227, 174, 145, 0.82);
  color: var(--sidebar-button-active-text);
}

.page-frame {
  margin: 0;
  padding: 18px 30px 32px;
}

.workspace-card {
  display: grid;
  gap: 16px;
  background: transparent;
}

.page-header,
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border: 1px solid var(--header-border);
  border-radius: 24px;
  background: var(--header);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 16px 36px rgba(77, 54, 34, 0.08);
  backdrop-filter: blur(18px);
}

.page-footer {
  margin-top: 4px;
}

.page-body {
  min-height: 720px;
  padding: 0;
  background: transparent;
}

.page-header:empty,
.page-footer:empty {
  display: none;
}

body[data-mock-view="selection"] .page-frame {
  padding-top: 10px;
}

body[data-mock-view="selection"] .workspace-card {
  gap: 0;
}

body[data-mock-view="selection"] .page-body {
  min-height: auto;
}

.page-title {
  font-size: clamp(1.35rem, 2vw, 1.92rem);
  font-weight: 700;
  color: var(--ink-strong);
}

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

.timer-badge,
.status-badge,
.coverage-badge,
.part-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(95, 105, 118, 0.2);
  font-size: 0.94rem;
}

.part-chip--translation {
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.part-chip--translation:hover,
.part-chip--translation.is-active {
  background: rgba(15, 103, 200, 0.12);
  border-color: rgba(15, 103, 200, 0.35);
  color: var(--button-dark);
}

.part-chip--translation.is-loading {
  opacity: 0.75;
}

.timer-badge strong {
  font-size: 1.12rem;
  color: var(--text-strong, #1d2127);
}

.timer-badge--critical strong {
  color: #d42929;
}

.screen {
  padding: 28px 30px;
}

body[data-mock-view="selection"] .screen {
  padding: 0;
}

.u-mt-14 {
  margin-top: 14px;
}

.u-mt-16 {
  margin-top: 16px;
}

.u-mt-18 {
  margin-top: 18px;
}

.u-mt-20 {
  margin-top: 20px;
}

.u-mt-22 {
  margin-top: 22px;
}

.option-copy {
  display: grid;
  gap: 4px;
}

.option-copy-primary {
  color: var(--text-strong, var(--ink));
}

.option-copy-translation {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.question-copy {
  display: grid;
  gap: 6px;
}

.question-copy-primary {
  color: var(--text-strong, inherit);
}

.question-copy-translation {
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--muted);
}

.instruction-copy {
  display: grid;
  gap: 4px;
}

.instruction-copy-primary {
  color: inherit;
}

.instruction-copy-translation {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.selection-grid {
  display: grid;
  gap: 18px;
}

.selection-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  margin-bottom: 22px;
}

.intro-card,
.stat-card,
.test-card,
.part-panel,
.question-card,
.result-card,
.instruction-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.intro-card,
.result-card,
.instruction-card,
.stat-card {
  padding: 22px;
}

.selection-headline {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
  color: var(--text-strong, #4b4f55);
}

.selection-copy {
  margin: 14px 0 0;
  line-height: 1.75;
  color: var(--muted);
}

.stat-stack {
  display: grid;
  gap: 16px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-strong, #353c45);
}

.test-list {
  display: grid;
  gap: 16px;
}

.test-card {
  padding: 18px 20px;
}

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

.test-title {
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-strong, #454b52);
}

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

.test-actions,
.header-actions,
.footer-actions,
.results-actions,
.question-actions,
.score-line,
.audio-stats,
.coverage-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.header-part-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.header-part-nav .part-chip {
  background: rgba(255, 255, 255, 0.9);
}

.control-button {
  border: 1px solid var(--button-dark);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--button-light) 0%, var(--button) 100%);
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  min-width: 112px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 12px 24px rgba(211, 111, 61, 0.2);
}

.control-button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.control-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: none;
}

.control-button.is-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #f8f3ed 100%);
  color: #6f4f39;
  border-color: #dcccbc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 24px rgba(77, 54, 34, 0.08);
}

.control-button.is-danger {
  border-color: #964543;
  background: linear-gradient(180deg, #cd5d57 0%, #b3413c 100%);
}

.control-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-button {
  color: var(--ink-strong);
  text-decoration: none;
  font-weight: 700;
}

.intro-layout,
.exam-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  min-height: 720px;
}

.pane {
  min-width: 0;
}

.pane-left {
  border-right: 1px solid var(--panel-border);
  background: #f7f7f8;
}

.pane-right {
  background: #edf4f6;
}

.pane-scroll {
  height: 100%;
  max-height: 720px;
  overflow: auto;
  padding: 28px 32px;
}

.pane-scroll--flush {
  padding: 0;
}

.instruction-list {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.instruction-list li {
  position: relative;
  padding-left: 36px;
  line-height: 1.7;
  font-size: 1.05rem;
  color: #345f8b;
}

.instruction-list li::before {
  content: "i";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(54, 95, 143, 0.14);
  color: #2e5f92;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.part-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.part-chip {
  cursor: pointer;
  color: var(--ink);
}

.part-chip.is-active {
  background: rgba(15, 103, 200, 0.12);
  border-color: rgba(15, 103, 200, 0.36);
  color: var(--button-dark);
}

.part-header {
  margin-bottom: 18px;
}

.part-title {
  margin: 0;
  font-size: 1.9rem;
  color: var(--text-strong, #4a4f56);
}

.part-description {
  margin: 10px 0 0;
  line-height: 1.75;
  color: var(--muted);
}

.source-text {
  margin-top: 20px;
  padding: 0 6px 6px 0;
  line-height: 1.78;
  font-size: 1.02rem;
  color: var(--text-strong, #444c54);
}

.source-paragraph {
  margin: 0 0 22px;
}

.source-paragraph--translation {
  margin-top: -12px;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.8;
}

.source-paragraph:last-child {
  margin-bottom: 0;
}

.source-word {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 4px;
  text-decoration: underline;
  text-decoration-color: rgba(15, 103, 200, 0.25);
  text-underline-offset: 0.18em;
}

.source-word:hover,
.source-word:focus-visible {
  color: var(--button-dark);
  text-decoration-color: rgba(15, 103, 200, 0.78);
  outline: none;
}

.reading-source {
  display: grid;
  gap: 20px;
}

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

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

.reading-page {
  margin: 0;
  background: var(--surface-white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(80, 80, 90, 0.05);
}

.reading-page-frame {
  overflow: auto;
  max-height: 640px;
  background: var(--surface-white);
  scrollbar-gutter: stable both-edges;
}

.reading-page-frame.is-pan {
  cursor: grab;
}

.reading-page-frame.is-pan.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.reading-page-image {
  display: block;
  height: auto;
}

.reading-page-image--fit {
  width: 100%;
  max-width: 100%;
}

.reading-page-image--pan {
  width: auto;
  min-width: 100%;
  max-width: none;
}

.reading-source-copy .source-text {
  margin-top: 0;
  padding: 24px 26px;
}

.audio-panel {
  display: grid;
  gap: 18px;
}

.audio-card {
  padding: 20px 22px;
  background: var(--surface-white);
  border: 1px solid var(--line);
}

.audio-title {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text-strong, #365d8a);
}

.listening-shared-audio {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.progress-track {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  height: 10px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  border: 0;
  background: #dde4ea;
}

.progress-track::-webkit-progress-bar {
  border-radius: 999px;
  background: #dde4ea;
}

.progress-track::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #1d6fcd 0%, #55a4f3 100%);
}

.progress-track::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #1d6fcd 0%, #55a4f3 100%);
}

.audio-note,
.small-note,
.coverage-copy,
.summary-copy {
  line-height: 1.7;
  color: var(--muted);
}

.listening-part1 {
  min-height: 720px;
}

.listening-part1--single {
  padding: 28px 32px;
}

.listening-stage-sheet {
  min-height: 664px;
  padding: 28px 26px 26px;
  background: var(--surface-white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(80, 80, 90, 0.05);
}

.listening-stage-copy {
  margin-top: 28px;
}

.listening-stage-lead {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  line-height: 1.35;
  color: var(--text-strong, #4a4f56);
  font-weight: 700;
}

.listening-stage-hero {
  position: relative;
  margin: 34px auto 0;
  width: min(100%, 820px);
  aspect-ratio: 16 / 9;
  border: 1px solid #d4d8de;
  background:
    linear-gradient(120deg, rgba(22, 100, 188, 0.18), transparent 36%),
    linear-gradient(160deg, rgba(255, 205, 86, 0.24), transparent 42%),
    linear-gradient(180deg, #f7f9fc 0%, #edf1f7 100%);
  overflow: hidden;
}

.listening-stage-hero-panel {
  position: absolute;
  left: 12%;
  bottom: 14%;
  width: 46%;
  height: 28%;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(38, 118, 206, 0.86) 0%, rgba(27, 98, 176, 0.9) 100%);
  box-shadow: 18px 18px 32px rgba(15, 31, 64, 0.12);
}

.listening-stage-hero-panel::before,
.listening-stage-hero-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.listening-stage-hero-panel::before {
  inset: 22% auto auto 12%;
  width: 18%;
  height: 44%;
}

.listening-stage-hero-panel::after {
  inset: auto 10% 18% auto;
  width: 36%;
  height: 14%;
}

.listening-stage-route {
  position: absolute;
  top: 14%;
  right: 14%;
  display: grid;
  gap: 14px;
}

.listening-stage-route span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0f67c8;
  box-shadow: 0 0 0 8px rgba(15, 103, 200, 0.12);
}

.listening-stage-hero-copy {
  position: absolute;
  right: 14%;
  bottom: 16%;
  font-size: 1.1rem;
  color: #305a86;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.listening-audio-stage {
  display: grid;
  place-items: center;
  min-height: 560px;
}

.listening-stage-sheet--questions {
  background: #edf4f6;
}

.listening-conversation-card,
.listening-question-left {
  display: grid;
  gap: 28px;
  justify-items: center;
}

.listening-video-shell {
  display: grid;
  gap: 18px;
  justify-items: center;
  width: min(100%, 760px);
}

.listening-video-player {
  display: block;
  width: min(100%, 760px);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid #d4d8de;
}

.official-screen-copy {
  display: grid;
  gap: 14px;
}

.official-screen-copy p {
  margin: 0;
  line-height: 1.7;
  color: var(--text-strong, inherit);
}

.official-screen-paragraph--translation,
.listening-stage-lead--translation {
  color: var(--muted);
}

.official-screen-counter {
  margin-top: 20px;
}

.official-screen-audio {
  display: block;
  width: 100%;
}

.official-screen-images {
  display: grid;
  gap: 16px;
}

.listening-conversation-status-card,
.listening-question-info-card,
.listening-transition-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  width: min(100%, 650px);
  padding: 24px 28px;
  border-radius: 18px;
  background: var(--bg-card-alt);
}

.listening-conversation-icon,
.listening-question-info-icon {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  color: #9a9ca1;
  font-size: 2.15rem;
  font-weight: 800;
}

.listening-conversation-copy {
  display: grid;
  gap: 16px;
}

.listening-conversation-section {
  font-size: 0.95rem;
  color: var(--text-strong, #5b6571);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.listening-conversation-label,
.listening-question-info-copy {
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
  color: var(--text-strong, #111317);
  font-weight: 700;
}

.listening-conversation-track {
  height: 14px;
  max-width: 420px;
}

.listening-mini-player {
  display: grid;
  gap: 16px;
  width: min(100%, 560px);
}

.listening-mini-player-row {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 260px) auto auto;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.listening-mini-player-toggle {
  min-width: 132px;
  width: auto;
}

.listening-mini-player-icon {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-strong, #111317);
  letter-spacing: 0.04em;
}

.listening-mini-player-time {
  font-size: 1.05rem;
  color: var(--text-strong, #2e3338);
  white-space: nowrap;
}

.listening-mini-player-track {
  height: 8px;
  min-width: 100px;
  border-radius: 999px;
  background: #111317;
  overflow: hidden;
}

.listening-mini-player-track-fill {
  height: 100%;
  background: #4e535a;
  width: 0;
}

.listening-audio-seek {
  width: 100%;
}

.listening-mini-player-note {
  padding: 18px 24px;
  border: 4px solid #111317;
  background: #fff;
  font-size: 1rem;
  color: var(--text-muted-dm, #555b63);
}

.listening-reference-panel {
  width: min(100%, 560px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.listening-reference-panel--wide {
  width: min(100%, 650px);
}

.listening-reference-panel__summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-strong, #36414e);
  list-style: none;
}

.listening-reference-panel__summary::-webkit-details-marker {
  display: none;
}

.listening-reference-panel__summary::after {
  content: " +";
  color: var(--muted);
}

.listening-reference-panel[open] .listening-reference-panel__summary::after {
  content: " -";
}

.listening-reference-panel__body {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.listening-reference-panel__section + .listening-reference-panel__section {
  border-top: 1px solid rgba(125, 138, 152, 0.18);
}

.listening-reference-panel__section {
  padding: 14px 16px;
}

.listening-reference-panel__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.listening-reference-panel__text {
  margin-top: 6px;
  line-height: 1.75;
  color: var(--text-strong, #39434e);
  white-space: pre-wrap;
}

.listening-question-count {
  margin-bottom: 22px;
  font-size: 1.05rem;
  color: var(--text-strong, #4e535a);
  font-weight: 700;
}

.listening-question-answer-panel {
  margin-top: 28px;
  padding: 22px 0 6px;
}

.listening-official-questions {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}

.listening-official-question {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.listening-official-question-number {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-strong, #39434e);
  font-weight: 700;
}

.listening-official-question-body {
  display: grid;
  gap: 8px;
}

.listening-official-question-prompt {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-strong, #39434e);
}

.listening-official-question-answer {
  max-width: 860px;
}

.choice-list--official,
.choice-list--official-image {
  gap: 0;
  margin-top: 18px;
}

.choice-item--official,
.choice-item--official-image {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px dotted #c9d3db;
  background: transparent;
}

.choice-item--official:last-child,
.choice-item--official-image:last-child {
  border-bottom: 0;
}

.choice-item--official input,
.choice-item--official-image input {
  margin-top: 8px;
}

.choice-item--official span {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-strong, #48515a);
}

.choice-item--official.is-selected,
.choice-item--official-image.is-selected {
  background: transparent;
  border-color: #95bfed;
}

.listening-official-image {
  display: block;
  width: min(100%, 270px);
  height: auto;
  border: 1px solid #d8e0e7;
  background: var(--surface-white);
}

.text-answer--official {
  width: 100%;
  min-height: 54px;
}

.question-list {
  display: grid;
  gap: 16px;
}

.reading-question-stack {
  display: grid;
  gap: 22px;
}

.reading-block {
  display: grid;
  gap: 14px;
}

.instruction-banner {
  position: relative;
  padding-left: 42px;
  font-size: 1.1rem;
  line-height: 1.55;
  color: #235f95;
  font-weight: 700;
}

.instruction-banner::before {
  content: "i";
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(54, 95, 143, 0.14);
  color: #2e5f92;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.statement-panel,
.template-card {
  padding: 24px 26px;
  background: #f7fcfe;
  border: 1px solid #2c3033;
  border-radius: 6px;
}

.statement-panel--paragraph {
  background: #f8fdff;
}

.statement-row {
  display: grid;
  grid-template-columns: auto 1fr minmax(160px, 220px);
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #d6dde4;
}

.statement-row:first-child {
  padding-top: 0;
}

.statement-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.statement-row--paragraph {
  grid-template-columns: minmax(148px, 188px) 1fr;
  align-items: start;
}

.statement-number {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong, #3f4851);
}

.statement-copy,
.statement-inline-label {
  line-height: 1.72;
  color: var(--text-strong, #434b54);
  font-size: 1.02rem;
}

.statement-inline-control {
  display: inline-flex;
  min-width: 0;
}

.answer-select {
  min-width: 180px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-input);
  background: var(--surface-white);
  color: var(--text-body-dm, #2b3642);
}

.answer-select.is-compact {
  min-width: 170px;
  width: 170px;
}

.template-card {
  background: #f6fbfd;
}

.template-card--comment {
  background: #f7fbfd;
}

.template-copy {
  display: grid;
  gap: 8px;
}

.template-paragraph {
  margin: 0 0 18px;
  line-height: 1.9;
  color: var(--text-strong, #4a4f56);
  font-size: 1.02rem;
}

.template-paragraph:last-child {
  margin-bottom: 0;
}

.template-paragraph--translation {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.inline-answer {
  display: inline;
  vertical-align: baseline;
  min-width: 0;
  max-width: none;
  margin: 0 0.22em;
}

.inline-answer .answer-select,
.inline-answer .text-answer {
  width: 100%;
}

.inline-answer-inline-shell {
  display: inline;
  white-space: normal;
}

.inline-answer-number {
  display: inline;
  margin-right: 0.18em;
  color: var(--text-body-dm, #4a4f56);
  font-weight: 600;
}

.inline-answer-dropdown {
  position: relative;
  display: inline;
  width: auto;
  min-width: 0;
  max-width: none;
  vertical-align: baseline;
}

.inline-answer-dropdown:focus-within {
  z-index: 4;
}

.inline-answer-dropdown__summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: auto;
  padding: 0 10px;
  border: 1px solid var(--border-input);
  border-radius: 10px;
  background: var(--surface-white);
  color: var(--text-body-dm, #2b3642);
  cursor: pointer;
  vertical-align: baseline;
  min-height: 1.9em;
  appearance: none;
  font: inherit;
  line-height: inherit;
  text-align: left;
  white-space: normal;
}

.inline-answer-dropdown__summary:focus-visible {
  outline: 2px solid rgba(15, 103, 200, 0.28);
  outline-offset: 2px;
}

.inline-answer-dropdown__summary-value {
  display: inline;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.inline-answer-dropdown.has-value .inline-answer-dropdown__summary {
  display: inline;
  align-items: baseline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0b6a4d;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(15, 103, 200, 0.26);
  text-underline-offset: 0.18em;
}

.inline-answer-dropdown.has-value .inline-answer-dropdown__summary-value {
  display: inline;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.inline-answer-dropdown__summary-value .option-copy,
.inline-answer-dropdown__option .option-copy {
  display: grid;
  gap: 2px;
}

.inline-answer-dropdown__summary-icon {
  display: inline-block;
  flex: none;
  margin-top: 0;
  margin-left: 8px;
  color: var(--text-muted-dm, #7b8794);
  vertical-align: baseline;
}

.inline-answer-dropdown.is-empty .inline-answer-dropdown__summary-icon {
  color: #0f67c8;
}

.inline-answer-dropdown.has-value .inline-answer-dropdown__summary-icon {
  display: none;
}

.inline-answer-dropdown__placeholder {
  color: var(--text-muted-dm, #7b8794);
}

.inline-answer-dropdown__selected-copy {
  display: inline;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.inline-answer-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  width: max-content;
  min-width: min(18rem, calc(100vw - 32px));
  max-width: min(32rem, calc(100vw - 32px));
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border-input);
  border-radius: 16px;
  background: var(--surface-white);
  box-shadow: 0 18px 44px rgba(25, 39, 52, 0.16);
}

.inline-answer-dropdown:focus-within .inline-answer-dropdown__menu {
  display: block;
}

.inline-answer-dropdown__option {
  width: 100%;
  display: block;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-body-dm, #2b3642);
  text-align: left;
  cursor: pointer;
}

.inline-answer-dropdown__option:hover,
.inline-answer-dropdown__option:focus-visible {
  background: rgba(15, 103, 200, 0.08);
  outline: none;
}

.inline-answer-dropdown__option.is-selected {
  background: rgba(15, 103, 200, 0.12);
  color: #0f67c8;
}

.inline-answer-dropdown__option-copy {
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.inline-answer--missing {
  min-width: 140px;
  border-bottom: 1px dotted #7d8a98;
  height: 28px;
}

.inline-answer--placeholder {
  min-width: 96px;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px dashed rgba(125, 138, 152, 0.8);
  color: var(--muted);
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
}

.question-card {
  padding: 18px 18px 16px;
}

.question-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.question-number {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-strong, #36414e);
}

.question-prompt {
  margin: 0;
  line-height: 1.7;
  color: var(--text-strong, #39414a);
}

.manual-tag,
.auto-tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.auto-tag {
  background: rgba(45, 138, 82, 0.12);
  color: var(--green);
}

.manual-tag {
  background: rgba(180, 108, 24, 0.12);
  color: var(--amber);
}

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

.choice-item {
  display: flex;
  gap: 10px;
  align-items: start;
  padding: 12px 12px 12px 14px;
  background: #fafafa;
  border: 1px solid #d7dce2;
  cursor: pointer;
}

.choice-item.is-selected {
  border-color: rgba(15, 103, 200, 0.55);
  background: rgba(15, 103, 200, 0.08);
}

.choice-item input {
  margin-top: 3px;
}

.choice-list--image {
  gap: 14px;
}

.choice-item--image {
  align-items: center;
  padding: 10px 12px;
  background: #f8fbfd;
}

.image-choice-body {
  display: grid;
  gap: 10px;
  width: 100%;
}

.image-choice-label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-strong, #315b87);
}

.image-choice-preview {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  border: 1px solid #d1d8e0;
  background: var(--surface-white);
}

.text-answer {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border-input);
  background: var(--surface-white);
}

.text-answer.is-compact {
  min-width: 160px;
  width: 160px;
  min-height: 40px;
  padding: 8px 10px;
}

.writing-source-panel {
  height: 100%;
}

.writing-pane-scroll {
  padding: 0;
}

.writing-source-text {
  margin-top: 0;
  padding: 26px 28px;
}

.writing-source-title {
  margin: 0 0 24px;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--text-strong, #4b5158);
}

.writing-stack {
  display: grid;
  gap: 18px;
}

.writing-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid #d4dbe2;
  box-shadow: 0 10px 24px rgba(80, 80, 90, 0.05);
}

.writing-bullet-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 26px;
  line-height: 1.7;
  color: var(--text-strong, #444d57);
}

.writing-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.writing-word-count {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(95, 105, 118, 0.2);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-strong, inherit);
}

.writing-word-count.is-good {
  color: var(--green);
}

.writing-word-count.is-low {
  color: var(--amber);
}

.writing-word-count.is-high {
  color: var(--red);
}

.writing-textarea {
  min-height: 330px;
  resize: vertical;
  line-height: 1.7;
}

.choice-list--survey {
  margin-top: 18px;
}

.choice-item--survey {
  background: rgba(255, 255, 255, 0.74);
}

.writing-note {
  margin: 14px 0 0;
  color: var(--text-body-dm, var(--muted));
  line-height: 1.7;
}

.field-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--text-strong, #4a5058);
  font-size: 0.94rem;
  font-weight: 700;
}

.speaking-source-panel {
  height: 100%;
}

.speaking-pane-scroll {
  padding: 0;
}

.speaking-source-text {
  margin-top: 0;
  padding: 8px 28px 0;
}

.speaking-source-text .source-paragraph,
.writing-source-text .source-paragraph {
  color: var(--text-body-dm, inherit);
}

.speaking-prompt-paragraph {
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--ink-strong, #1a2332);
}

.speaking-visual {
  margin: 18px 28px 0;
  border: 1px solid #d4dbe2;
  background: #fff;
  overflow: hidden;
}

.speaking-visual-image {
  display: block;
  width: 100%;
  height: auto;
}

.speaking-stack {
  display: grid;
  gap: 18px;
}

.speaking-status-card {
  min-height: 420px;
}

.speaking-timer-panel {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 26px 28px;
  margin-top: 10px;
  border-radius: 16px;
  background: #d7dae2;
}

.speaking-timer-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  color: #7b7f87;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.speaking-timer-copy {
  display: grid;
  gap: 8px;
}

.speaking-timer-label {
  font-size: 1.05rem;
  color: var(--text-strong, #444a52);
}

.speaking-timer-value {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 800;
  color: #0f67c8;
  line-height: 1;
}

.speaking-playback {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.speaking-audio-player {
  display: grid;
  gap: 12px;
}

.speaking-audio-player audio {
  display: none;
}

.speaking-audio-controls {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.speaking-audio-toggle {
  min-width: 120px;
  justify-content: center;
}

.speaking-audio-seek {
  width: 100%;
  accent-color: #0f67c8;
}

.speaking-audio-time {
  min-width: 92px;
  display: inline-flex;
  justify-content: flex-end;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--text-strong, #444a52);
}

.speaking-audio-player--result {
  margin-top: 4px;
}

.speaking-playback--result {
  margin-top: 14px;
}

.speaking-device-check-layout .pane-right {
  background: #eef4f8;
}

.speaking-device-card {
  display: grid;
  gap: 14px;
}

.speaking-device-select {
  min-height: 48px;
}

.speaking-device-meter {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid #d1d8e0;
  background: rgba(214, 221, 230, 0.7);
}

.speaking-device-meter::-webkit-progress-bar {
  border-radius: 999px;
  background: rgba(214, 221, 230, 0.7);
}

.speaking-device-meter::-webkit-progress-value {
  border-radius: inherit;
  background: linear-gradient(90deg, #5ea4e6 0%, #f0b160 52%, #e07a5f 100%);
  transition: width 90ms linear;
}

.speaking-device-meter::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, #5ea4e6 0%, #f0b160 52%, #e07a5f 100%);
}

.speaking-device-error {
  color: #b04c49;
}

.writing-result-body {
  white-space: normal;
}

.score-board {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(360px, 1.25fr);
  gap: 20px;
}

.score-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
}

.score-value {
  font-size: clamp(2.3rem, 4vw, 4rem);
  font-weight: 800;
  color: #2e5e90;
}

.results-grid {
  display: grid;
  gap: 14px;
}

.result-card {
  padding: 18px 20px;
}

.status-pill.is-correct {
  background: rgba(45, 138, 82, 0.12);
  color: var(--green);
}

.status-pill.is-wrong {
  background: rgba(176, 66, 63, 0.12);
  color: var(--red);
}

.status-pill.is-unanswered {
  background: rgba(124, 121, 116, 0.14);
  color: var(--muted);
}

.status-pill.is-manual {
  background: rgba(180, 108, 24, 0.12);
  color: var(--amber);
}

.result-answer {
  line-height: 1.7;
  margin-top: 8px;
  color: var(--text-strong, inherit);
}

.result-card--explanation {
  display: grid;
  gap: 4px;
}

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

.listening-explanation__section {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.listening-explanation__section--secondary {
  background: rgba(250, 246, 241, 0.86);
}

.listening-explanation__title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.listening-explanation__body {
  margin-top: 6px;
  line-height: 1.7;
  color: var(--text-strong, inherit);
}

.ai-result-card {
  background: linear-gradient(180deg, #fcfeff 0%, #f4f8fc 100%);
}

.ai-criteria-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ai-criterion {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #d9e1e9;
}

.ai-feedback-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.ai-feedback-list li + li {
  margin-top: 6px;
}

.answer-label {
  display: inline-block;
  min-width: 72px;
  font-weight: 700;
  color: var(--text-strong, #4c5968);
}


.empty-state {
  padding: 60px 30px;
  text-align: center;
  color: var(--muted);
}

#overlayRoot {
  position: relative;
  z-index: 20;
}

.dictionary-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 36, 43, 0.46);
  display: grid;
  place-items: center;
  padding: 28px;
}

.dictionary-modal {
  width: min(1040px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: rgba(250, 249, 254, 0.98);
  border: 1px solid rgba(161, 170, 183, 0.42);
  box-shadow: 0 24px 60px rgba(28, 32, 38, 0.22);
  border-radius: 28px;
  padding: 28px 30px 30px;
  position: relative;
}

.dictionary-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  background: transparent;
  color: #868e99;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal {
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: rgba(250, 249, 254, 0.98);
  border: 1px solid rgba(161, 170, 183, 0.42);
  box-shadow: 0 24px 60px rgba(28, 32, 38, 0.22);
  border-radius: 28px;
  padding: 28px 30px 30px;
  position: relative;
}

.admin-modal {
  width: min(760px, calc(100vw - 40px));
}

.auth-modal-header {
  display: grid;
  gap: 8px;
  padding-right: 28px;
}

.auth-modal-title {
  margin: 0;
  font-size: 1.8rem;
  color: var(--text-strong, #171c24);
}

.auth-modal-note {
  margin: 0;
  color: var(--text-body-dm, #6d7380);
  line-height: 1.6;
}

.auth-feedback {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.6;
}

.auth-feedback--error {
  background: rgba(198, 65, 58, 0.1);
  color: #9b2f2a;
}

.auth-feedback--notice {
  background: rgba(15, 103, 200, 0.1);
  color: #235383;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field span {
  color: var(--text-strong, #49515b);
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  border: 1px solid #c9d3db;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: rgba(255, 255, 255, 0.96);
}

.auth-submit {
  margin-top: 6px;
}

.auth-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.auth-status-block {
  margin-top: 18px;
  color: var(--text-body-dm, #4b5562);
  line-height: 1.7;
}

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

.admin-created-block {
  margin-top: 22px;
}

.admin-section-title {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--text-strong, #2d3642);
}

.admin-code-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 103, 200, 0.18);
  background: rgba(15, 103, 200, 0.08);
  color: #0b4f97;
  font-size: 0.92rem;
}

.admin-invite-list {
  display: grid;
  gap: 12px;
}

.admin-invite-card {
  border: 1px solid rgba(161, 170, 183, 0.32);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px 16px;
}

.admin-invite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-invite-code {
  color: var(--text-strong, #0a365f);
  font-size: 0.98rem;
}

.admin-invite-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid rgba(95, 105, 118, 0.18);
  background: rgba(255, 255, 255, 0.92);
}

.admin-invite-status.is-open {
  color: #0f7c45;
}

.admin-invite-status.is-used {
  color: #8a4b12;
}

.admin-invite-meta {
  margin-top: 8px;
  color: var(--text-body-dm, #637080);
  font-size: 0.92rem;
}

.admin-invite-note {
  margin-top: 10px;
  color: var(--text-strong, #36404c);
  line-height: 1.5;
}

.dictionary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-right: 36px;
}

.dictionary-kicker {
  color: var(--text-body-dm, #7e7a95);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.dictionary-word {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  color: var(--text-strong, #171c24);
}

.dictionary-part-of-speech {
  margin-top: 10px;
  color: var(--text-body-dm, #6d7380);
  font-size: 1.05rem;
}

.dictionary-tip {
  max-width: 260px;
  color: var(--text-body-dm, #6d7380);
  line-height: 1.6;
  text-align: right;
}

.dictionary-header-side {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.dictionary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dictionary-action-button {
  border: 1px solid rgba(227, 174, 145, 0.82);
  border-radius: 999px;
  background: rgba(255, 244, 237, 0.96);
  color: #b35d34;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.dictionary-action-button.is-active {
  background: linear-gradient(135deg, #d16c3d 0%, #e48b5f 100%);
  border-color: rgba(209, 108, 61, 0.92);
  color: #fff;
}

.dictionary-action-button.is-mastered {
  background: rgba(227, 246, 234, 0.96);
  border-color: rgba(173, 222, 191, 0.92);
  color: #1b6a44;
}

.dictionary-action-button:disabled {
  opacity: 0.65;
  cursor: default;
}

.dictionary-favorite-feedback {
  color: var(--text-body-dm, #b35d34);
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: right;
}

.dictionary-body {
  margin-top: 22px;
  display: grid;
  gap: 20px;
}

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

.dictionary-section {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(205, 210, 223, 0.72);
  border-radius: 22px;
  padding: 20px 22px;
}

.dictionary-section h3 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  color: var(--text-strong, #353d4b);
}

.dictionary-pronunciations,
.dictionary-definition-list,
.dictionary-form-list,
.dictionary-note-list {
  display: grid;
  gap: 12px;
}

.dictionary-pronunciation-row,
.dictionary-definition-item,
.dictionary-form-item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dictionary-pronunciation-label,
.dictionary-definition-pos {
  min-width: 52px;
  font-weight: 700;
  color: #6e68da;
}

.dictionary-pronunciation-ipa {
  font-size: 1.08rem;
  color: var(--text-strong, #20252d);
}

.dictionary-audio-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #6a62ec 0%, #7c8cff 100%);
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
}

.dictionary-example,
.dictionary-phrase {
  padding: 14px 0;
  border-top: 1px dashed rgba(187, 193, 208, 0.85);
}

.dictionary-example:first-child,
.dictionary-phrase:first-child {
  border-top: 0;
  padding-top: 0;
}

.dictionary-example-source {
  color: var(--text-strong, #222833);
  line-height: 1.6;
}

.dictionary-example-translation {
  margin-top: 6px;
  color: var(--text-body-dm, #647086);
  line-height: 1.7;
}

.dictionary-muted,
.dictionary-empty {
  color: var(--text-body-dm, #707788);
  line-height: 1.7;
}

.dictionary-empty {
  padding: 26px 6px 6px;
}

.dictionary-note-list {
  margin: 0;
  padding-left: 20px;
}

.footer-note {
  color: var(--muted);
  line-height: 1.7;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 24%),
    radial-gradient(circle at top right, rgba(208, 122, 77, 0.12), transparent 22%),
    linear-gradient(180deg, var(--bg-pattern) 0%, var(--bg) 100%);
}

html[data-theme="dark"] .page-header,
html[data-theme="dark"] .page-footer,
html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .topbar-label,
html[data-theme="dark"] .utility-status,
html[data-theme="dark"] .auth-user-pill,
html[data-theme="dark"] .language-chip,
html[data-theme="dark"] .sidebar-panel,
html[data-theme="dark"] .sidebar-theme-toggle,
html[data-theme="dark"] .sidebar-mini-status,
html[data-theme="dark"] .sidebar-mini-tab {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    var(--shadow-panel);
}

html[data-theme="dark"] .timer-badge,
html[data-theme="dark"] .status-badge,
html[data-theme="dark"] .coverage-badge,
html[data-theme="dark"] .part-chip {
  background: var(--surface-soft);
  border-color: var(--pill-border);
  color: var(--ink);
}

html[data-theme="dark"] .empty-state {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .control-button.is-secondary {
  background: linear-gradient(180deg, #2a3241 0%, #212837 100%);
  color: #f1c8a8;
  border-color: #485061;
}

html[data-theme="dark"] .sidebar-toggle,
html[data-theme="dark"] .pane-left,
html[data-theme="dark"] .pane-right,
html[data-theme="dark"] .listening-stage-sheet--questions,
html[data-theme="dark"] .statement-panel,
html[data-theme="dark"] .template-card,
html[data-theme="dark"] .template-card--comment,
html[data-theme="dark"] .inline-answer--placeholder,
html[data-theme="dark"] .listening-mini-player-note,
html[data-theme="dark"] .listening-official-image,
html[data-theme="dark"] .image-choice-preview {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .pane-left {
  background: rgba(20, 25, 35, 0.92);
}

html[data-theme="dark"] .pane-right,
html[data-theme="dark"] .listening-stage-sheet--questions {
  background: rgba(24, 31, 43, 0.94);
}

html[data-theme="dark"] .listening-reference-panel {
  background: rgba(24, 31, 43, 0.94);
  border-color: var(--line);
}

html[data-theme="dark"] .listening-reference-panel__summary,
html[data-theme="dark"] .listening-reference-panel__text {
  color: var(--ink);
}

html[data-theme="dark"] .listening-reference-panel__label,
html[data-theme="dark"] .listening-reference-panel__summary::after {
  color: var(--muted);
}

html[data-theme="dark"] .listening-mini-player-note {
  color: var(--muted);
}

html[data-theme="dark"] .inline-answer-dropdown.has-value .inline-answer-dropdown__summary {
  color: #7ee0a8;
  text-decoration-color: rgba(126, 224, 168, 0.35);
}

html[data-theme="dark"] .instruction-banner,
html[data-theme="dark"] .instruction-list li {
  color: #8fc0f3;
}

html[data-theme="dark"] .instruction-banner::before,
html[data-theme="dark"] .instruction-list li::before {
  background: rgba(81, 132, 196, 0.16);
  color: #b9d9ff;
}

html[data-theme="dark"] .choice-item,
html[data-theme="dark"] .choice-item--image {
  background: rgba(29, 36, 49, 0.88);
  border-color: #465066;
  color: var(--ink);
}

html[data-theme="dark"] .choice-item.is-selected,
html[data-theme="dark"] .choice-item--image.is-selected {
  background: rgba(39, 88, 148, 0.22);
  border-color: rgba(112, 165, 229, 0.7);
}

html[data-theme="dark"] .inline-answer-dropdown__option:hover,
html[data-theme="dark"] .inline-answer-dropdown__option:focus-visible {
  background: rgba(39, 88, 148, 0.18);
}

html[data-theme="dark"] .inline-answer-dropdown__option.is-selected {
  background: rgba(39, 88, 148, 0.26);
  color: #9dc7ff;
}

html[data-theme="dark"] .choice-item--official,
html[data-theme="dark"] .choice-item--official-image {
  border-color: rgba(88, 102, 125, 0.78);
}

html[data-theme="dark"] .choice-item--official.is-selected,
html[data-theme="dark"] .choice-item--official-image.is-selected {
  border-color: #79a9dc;
}

html[data-theme="dark"] .listening-mini-player-track {
  background: rgba(255, 255, 255, 0.16);
}

html[data-theme="dark"] .listening-mini-player-track-fill,
html[data-theme="dark"] .progress-track::-webkit-progress-value,
html[data-theme="dark"] .progress-track::-moz-progress-bar {
  background: linear-gradient(90deg, #7fb1e7 0%, #d88b61 100%);
}

html[data-theme="dark"] .progress-track,
html[data-theme="dark"] .progress-track::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .listening-stage-hero {
  border-color: #435067;
  background:
    linear-gradient(120deg, rgba(87, 133, 194, 0.22), transparent 36%),
    linear-gradient(160deg, rgba(215, 136, 97, 0.22), transparent 42%),
    linear-gradient(180deg, #202938 0%, #161d29 100%);
}

html[data-theme="dark"] .listening-stage-hero-panel {
  background: linear-gradient(180deg, rgba(90, 140, 212, 0.88) 0%, rgba(55, 100, 168, 0.92) 100%);
}

html[data-theme="dark"] .listening-stage-route span {
  background: #9cc5f0;
  box-shadow: 0 0 0 8px rgba(105, 157, 219, 0.12);
}

html[data-theme="dark"] .listening-stage-hero-copy {
  color: #d6e8fb;
}

html[data-theme="dark"] .source-word:hover,
html[data-theme="dark"] .source-word:focus-visible {
  color: #ffd1ac;
}

html[data-theme="dark"] .writing-card,
html[data-theme="dark"] .score-card,
html[data-theme="dark"] .ai-result-card,
html[data-theme="dark"] .ai-criterion,
html[data-theme="dark"] .speaking-visual,
html[data-theme="dark"] .speaking-audio-player {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .score-card {
  background:
    linear-gradient(145deg, rgba(91, 139, 201, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(26, 34, 47, 0.98) 0%, rgba(19, 25, 36, 0.98) 100%);
}

html[data-theme="dark"] .ai-result-card {
  background:
    linear-gradient(140deg, rgba(215, 136, 97, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(28, 36, 49, 0.98) 0%, rgba(20, 27, 38, 0.98) 100%);
}

html[data-theme="dark"] .speaking-timer-panel {
  background:
    linear-gradient(120deg, rgba(90, 140, 212, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(36, 45, 61, 0.96) 0%, rgba(26, 33, 46, 0.96) 100%);
  border: 1px solid #485369;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .speaking-timer-icon {
  background: rgba(255, 255, 255, 0.07);
  color: #f4cfb1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .writing-word-count {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(124, 142, 167, 0.32);
}

html[data-theme="dark"] .writing-word-count.is-good {
  color: #7ee0a8;
}

html[data-theme="dark"] .writing-word-count.is-low {
  color: #f0be67;
}

html[data-theme="dark"] .writing-word-count.is-high {
  color: #ff9a94;
}

html[data-theme="dark"] .writing-textarea::placeholder,
html[data-theme="dark"] .text-answer::placeholder {
  color: rgba(224, 231, 240, 0.52);
}

html[data-theme="dark"] .choice-item--survey {
  background: rgba(29, 36, 49, 0.9);
  border-color: #465066;
}

html[data-theme="dark"] .choice-item--survey.is-selected {
  background: rgba(39, 88, 148, 0.22);
  border-color: rgba(112, 165, 229, 0.7);
}

html[data-theme="dark"] .speaking-visual {
  background: rgba(15, 20, 29, 0.94);
}

html[data-theme="dark"] .speaking-device-check-layout .pane-right {
  background: rgba(18, 25, 38, 0.98);
}

html[data-theme="dark"] .speaking-device-meter {
  border-color: rgba(124, 142, 167, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .speaking-device-meter::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .speaking-device-meter::-webkit-progress-value,
html[data-theme="dark"] .speaking-device-meter::-moz-progress-bar {
  background: linear-gradient(90deg, #7fb1e7 0%, #d88b61 100%);
}

html[data-theme="dark"] .speaking-device-error {
  color: #ffaea7;
}

html[data-theme="dark"] .speaking-audio-seek {
  accent-color: #7fb1e7;
}

html[data-theme="dark"] .score-value,
html[data-theme="dark"] .speaking-timer-value {
  color: #9ec8f4;
}

html[data-theme="dark"] .result-answer .answer-label {
  color: #f1c8a8;
}

html[data-theme="dark"] .status-pill.is-unanswered {
  background: rgba(156, 151, 143, 0.16);
  color: #cfc7bf;
}

html[data-theme="dark"] .listening-explanation__section {
  background: rgba(25, 33, 46, 0.9);
  border-color: #3a465a;
}

html[data-theme="dark"] .listening-explanation__section--secondary {
  background: rgba(31, 39, 54, 0.96);
}

html[data-theme="dark"] .listening-explanation__title {
  color: #b8b1aa;
}

html[data-theme="dark"] .dictionary-overlay {
  background: rgba(6, 10, 18, 0.76);
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] .dictionary-modal,
html[data-theme="dark"] .auth-modal {
  background:
    linear-gradient(140deg, rgba(88, 135, 198, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(25, 33, 46, 0.98) 0%, rgba(17, 23, 34, 0.98) 100%);
  border-color: var(--line);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.46);
}

html[data-theme="dark"] .dictionary-close {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(124, 142, 167, 0.28);
  border-radius: 999px;
}

html[data-theme="dark"] .dictionary-close:hover,
html[data-theme="dark"] .dictionary-close:focus-visible {
  color: var(--ink-strong);
  background: rgba(255, 255, 255, 0.09);
}

html[data-theme="dark"] .auth-field input {
  background: rgba(19, 25, 36, 0.92);
  border-color: rgba(95, 109, 132, 0.7);
  color: var(--ink-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .auth-field input::placeholder {
  color: rgba(224, 231, 240, 0.44);
}

html[data-theme="dark"] .auth-feedback--error {
  background: rgba(198, 65, 58, 0.16);
  color: #ffb8b1;
  border: 1px solid rgba(198, 65, 58, 0.24);
}

html[data-theme="dark"] .auth-feedback--notice {
  background: rgba(60, 122, 210, 0.16);
  color: #c8e2ff;
  border: 1px solid rgba(60, 122, 210, 0.26);
}

html[data-theme="dark"] .admin-code-pill {
  border-color: rgba(110, 167, 235, 0.26);
  background: rgba(54, 100, 168, 0.22);
  color: #cfe4ff;
}

html[data-theme="dark"] .admin-invite-card,
html[data-theme="dark"] .dictionary-section {
  background: rgba(20, 27, 39, 0.86);
  border-color: rgba(83, 97, 121, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .admin-invite-status {
  border-color: rgba(95, 109, 132, 0.46);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

html[data-theme="dark"] .admin-invite-status.is-open {
  color: #8fe0b2;
}

html[data-theme="dark"] .admin-invite-status.is-used {
  color: #f0c17b;
}

html[data-theme="dark"] .dictionary-action-button {
  border-color: rgba(232, 170, 133, 0.42);
  background: rgba(82, 54, 40, 0.28);
  color: #ffd2b4;
}

html[data-theme="dark"] .dictionary-action-button.is-active {
  background: linear-gradient(135deg, #d16c3d 0%, #e48b5f 100%);
  border-color: rgba(228, 139, 95, 0.9);
  color: #fff;
}

html[data-theme="dark"] .dictionary-action-button.is-mastered {
  background: rgba(24, 92, 58, 0.3);
  border-color: rgba(85, 172, 122, 0.38);
  color: #a8e4be;
}

html[data-theme="dark"] .dictionary-pronunciation-label,
html[data-theme="dark"] .dictionary-definition-pos {
  color: #9fc8ff;
}

html[data-theme="dark"] .dictionary-audio-button {
  box-shadow: 0 12px 24px rgba(74, 87, 197, 0.24);
}

html[data-theme="dark"] .dictionary-example,
html[data-theme="dark"] .dictionary-phrase {
  border-top-color: rgba(83, 97, 121, 0.78);
}

@media (max-width: 1080px) {
  .mock-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .page-frame {
    padding-inline: 24px;
  }

  .selection-intro,
  .intro-layout,
  .exam-layout,
  .score-board {
    grid-template-columns: 1fr;
  }

  .pane-left {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .pane-scroll {
    max-height: none;
  }

  .diagram-toolbar {
    align-items: start;
  }

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

  .reading-page-image--fit,
  .reading-page-image--pan {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .statement-row,
  .statement-row--paragraph {
    grid-template-columns: 1fr;
  }

  .statement-inline-control,
  .inline-answer {
    width: 100%;
    margin: 10px 0 0;
  }

  .template-copy .inline-answer {
    display: inline;
    width: auto;
    margin: 0 0.2em;
  }

  .inline-answer-dropdown,
  .inline-answer-dropdown__menu {
    width: 100%;
    max-width: 100%;
  }

  .template-copy .inline-answer-dropdown {
    display: inline;
    width: auto;
    max-width: none;
  }

  .template-copy .inline-answer-dropdown__menu {
    width: min(24rem, calc(100vw - 32px));
    min-width: min(18rem, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
  }

  .answer-select,
  .answer-select.is-compact,
  .text-answer.is-compact {
    width: 100%;
    min-width: 0;
  }

  .image-choice-preview {
    max-width: 100%;
  }

  .listening-conversation-status-card,
  .listening-question-info-card,
  .listening-transition-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .listening-mini-player-row {
    grid-template-columns: auto auto minmax(180px, 240px) auto auto;
  }
}

@media (max-width: 720px) {
  .mock-shell {
    grid-template-columns: 1fr;
  }

  .shell-main {
    order: 1;
  }

  .shell-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 48;
    width: min(86vw, 320px);
    height: 100dvh;
    margin-top: 0;
    padding: 18px 14px 14px;
    border-top: 0;
    border-right: 1px solid var(--sidebar-divider);
    border-bottom: 0;
    background: var(--sidebar-bg);
    backdrop-filter: blur(18px);
    overflow-y: auto;
    transform: translateX(calc(-100% - 24px));
    transition: transform 180ms ease, box-shadow 180ms ease;
    box-shadow: none;
  }

  .shell-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 44;
    border: 0;
    background: rgba(20, 24, 35, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body[data-sidebar-drawer-open="true"] .shell-sidebar {
    transform: translateX(0);
    box-shadow: 0 22px 44px rgba(20, 24, 35, 0.18);
  }

  body[data-sidebar-drawer-open="true"] .shell-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-stack {
    height: auto;
  }

  .brand-lockup {
    margin-bottom: 4px;
  }

  .brand-copy {
    display: block;
  }

  .sidebar-stack--expanded {
    display: flex;
  }

  .sidebar-mini-stack {
    display: none;
  }

  body[data-sidebar-drawer-open="true"] {
    overflow: hidden;
  }

  body[data-sidebar-collapsed="true"] .mock-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-nav {
    min-height: 0;
  }

  .sidebar-stack {
    height: auto;
  }

  .topbar {
    padding: 16px 12px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-mark__icon {
    width: 24px;
    height: 24px;
  }

  .page-frame {
    padding: 14px 12px 18px;
  }

  .topbar-actions,
  .topbar-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .dictionary-overlay {
    padding: 12px;
  }

  .dictionary-modal {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 22px;
    padding: 22px 18px 18px;
  }

  .auth-modal {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 22px;
    padding: 22px 18px 18px;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .dictionary-header {
    flex-direction: column;
    padding-right: 28px;
  }

  .dictionary-tip {
    max-width: none;
    text-align: left;
  }

  .dictionary-header-side {
    justify-items: start;
  }

  .dictionary-actions {
    justify-content: flex-start;
  }

  .dictionary-favorite-feedback {
    text-align: left;
  }

  .page-header,
  .page-footer,
  .screen,
  .pane-scroll {
    padding-left: 16px;
    padding-right: 16px;
  }

  .control-button {
    width: 100%;
  }

  .test-actions,
  .header-actions,
  .footer-actions,
  .results-actions {
    width: 100%;
  }

  .listening-part1--single {
    padding: 16px;
  }

  .listening-stage-sheet {
    padding: 20px 18px 18px;
  }

  .listening-stage-hero {
    aspect-ratio: 4 / 3;
  }

  .listening-mini-player-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .listening-audio-seek,
  .listening-mini-player-toggle {
    width: 100%;
  }
}
