:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #667085;
  --paper: #f7f4ef;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(31, 41, 51, 0.16);
  --accent: #28666e;
  --accent-2: #c8553d;
  --gold: #d6a53a;
  --shadow: 0 18px 60px rgba(31, 41, 51, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body.home-active,
body.product-active,
body.about-active,
body.agreement-active {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.app-active {
  overflow: hidden;
}

button,
strong,
h1,
h2,
p,
li,
span {
  letter-spacing: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: 100vh;
}

body.is-performance-mode .app-shell {
  grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr);
}

.app-shell.is-hidden {
  display: none;
}

.home-screen {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  place-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 28px;
  background:
    linear-gradient(rgba(17, 24, 39, 0.38), rgba(17, 24, 39, 0.52)),
    url("https://images.unsplash.com/photo-1520523839897-bd0b52f945a0?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.home-screen.is-hidden {
  display: none;
}

.home-content {
  width: min(1180px, 100%);
  color: #ffffff;
}

.home-nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, 100%);
  margin: 0 auto 42px;
  padding: 10px 0;
  color: #ffffff;
}

.home-nav strong {
  font-size: 15px;
  line-height: 1.2;
}

.home-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.home-nav a {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.65fr);
  gap: 34px;
  align-items: end;
  min-height: calc(100vh - 128px);
  padding-bottom: 36px;
}

.home-hero-copy {
  max-width: 760px;
}

.home-kicker {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-content h1 {
  max-width: 780px;
  margin-bottom: 18px;
  color: #ffffff;
  font-size: clamp(42px, 8vw, 92px);
}

.home-tagline {
  max-width: 760px;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 900;
  line-height: 1.16;
}

.home-lead {
  max-width: 700px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  line-height: 1.75;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-hero-actions button {
  width: auto;
  min-width: 132px;
  min-height: 44px;
  padding: 0 18px;
}

.home-secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.home-author-card {
  display: grid;
  gap: 10px;
  align-self: end;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.home-author-card span,
.home-section-heading span,
.home-boundary span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-author-card strong {
  font-size: 22px;
  line-height: 1.2;
}

.home-author-card p {
  margin: 0;
  color: #344054;
  font-size: 14px;
  line-height: 1.58;
}

.home-profile {
  display: grid;
  gap: 7px;
  width: fit-content;
  max-width: min(760px, 100%);
  margin-bottom: 30px;
  padding-left: 16px;
  border-left: 4px solid var(--gold);
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(17, 24, 39, 0.38);
}

.home-profile strong {
  font-size: 20px;
  line-height: 1.2;
}

.home-profile span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.home-profile p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.language-switcher {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 6px;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.language-switcher.compact {
  align-self: flex-start;
  margin-bottom: 0;
  border-color: var(--line);
  background: #ffffff;
  backdrop-filter: none;
}

.language-switcher button,
.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 72px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.language-switcher.compact button,
.language-switcher.compact a {
  color: var(--muted);
}

.language-switcher button.is-active,
.language-switcher a.is-active {
  background: #ffffff;
  color: var(--ink);
}

.language-switcher.compact button.is-active,
.language-switcher.compact a.is-active {
  background: var(--accent);
  color: #ffffff;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1180px;
}

.home-section {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.home-section-heading {
  display: grid;
  gap: 8px;
  max-width: 780px;
}

.home-section h2,
.home-boundary h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
}

.home-module-grid,
.home-why-grid {
  display: grid;
  gap: 12px;
}

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

.home-why-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-module-grid article,
.home-why-grid article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(40, 102, 110, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.home-module-grid article > span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.home-module-grid strong,
.home-why-grid strong {
  font-size: 19px;
  line-height: 1.24;
}

.home-module-grid p,
.home-why-grid p,
.home-boundary p,
.home-boundary li {
  margin: 0;
  color: #344054;
  font-size: 14px;
  line-height: 1.6;
}

.home-boundary {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
  align-items: start;
}

.home-boundary ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.home-card {
  display: grid;
  align-content: end;
  gap: 10px;
  width: 100%;
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

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

.home-card strong {
  font-size: 28px;
  line-height: 1.15;
}

.product-info-screen,
.about-info-screen {
  display: grid;
  min-height: 100vh;
  overflow: auto;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(rgba(17, 24, 39, 0.42), rgba(17, 24, 39, 0.58)),
    url("https://images.unsplash.com/photo-1520523839897-bd0b52f945a0?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.product-info-screen.is-hidden,
.about-info-screen.is-hidden {
  display: none;
}

.product-info-card,
.about-info-card {
  display: grid;
  gap: 16px;
  width: min(980px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.product-info-card .home-kicker,
.about-info-card .home-kicker {
  margin: 0;
  color: var(--accent);
}

.product-info-card h1,
.about-info-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.product-info-lead,
.about-info-lead,
.product-detail p {
  margin: 0;
  color: #344054;
  font-size: 15px;
  line-height: 1.65;
}

.about-info-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.about-info-content section {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(40, 102, 110, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.about-info-content h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.about-info-content p {
  margin: 0;
  color: #344054;
  font-size: 14px;
  line-height: 1.62;
}

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

.product-info-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(40, 102, 110, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.product-info-grid span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.product-info-grid strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.product-info-grid p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.product-detail {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(214, 165, 58, 0.24);
  border-radius: 8px;
  background: #fff8e6;
}

.product-detail summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
  list-style: none;
}

.product-detail summary::-webkit-details-marker {
  display: none;
}

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

.product-info-actions button,
.inline-info-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  padding: 0 14px;
  font: inherit;
  font-weight: 900;
}

.product-info-actions button:last-child,
.inline-info-button {
  border: 1px solid rgba(40, 102, 110, 0.25);
  background: #ffffff;
  color: var(--accent);
}

.agreement-screen {
  display: grid;
  min-height: 100vh;
  overflow: auto;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(rgba(17, 24, 39, 0.42), rgba(17, 24, 39, 0.58)),
    url("https://images.unsplash.com/photo-1520523839897-bd0b52f945a0?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.agreement-screen.is-hidden {
  display: none;
}

.agreement-card {
  display: grid;
  gap: 16px;
  width: min(880px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.agreement-card .home-kicker {
  margin: 0;
  color: var(--accent);
}

.agreement-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.08;
}

.agreement-lead {
  margin: 0;
  color: #344054;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

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

.agreement-content div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.agreement-content strong {
  color: var(--accent);
  font-size: 13px;
}

.agreement-content p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.agreement-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(214, 165, 58, 0.36);
  border-radius: 8px;
  background: #fff8e6;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.agreement-check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
}

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

.agreement-actions button {
  width: auto;
  min-width: 130px;
  padding: 0 18px;
}

.agreement-actions button:disabled {
  cursor: not-allowed;
  background: #d0d5dd;
  color: #667085;
}

.home-button {
  width: 74px;
  min-height: 34px;
  align-self: flex-start;
  background: #667085;
  font-size: 14px;
}

.stage {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  background: #111827;
}

#camera,
#overlay,
#melodyCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#camera {
  transform: scaleX(-1);
}

#overlay {
  z-index: 2;
  pointer-events: none;
}

#melodyCanvas {
  z-index: 3;
  pointer-events: none;
}

.status-panel {
  position: absolute;
  z-index: 4;
  top: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: repeat(9, minmax(78px, 1fr));
  gap: 10px;
  width: min(1180px, calc(100% - 36px));
}

.status-panel > div,
.note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-panel > div {
  padding: 12px 14px;
  backdrop-filter: blur(16px);
}

.label,
.note span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-panel strong {
  display: block;
  min-height: 24px;
  font-size: 18px;
  line-height: 1.25;
}

.status-panel strong.is-hot {
  color: var(--accent-2);
}

.status-panel strong.is-soft {
  color: var(--accent);
}

.status-toggle {
  display: none;
}

.audio-unlock {
  position: absolute;
  z-index: 8;
  right: 18px;
  bottom: 18px;
  width: auto;
  min-width: 112px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(200, 85, 61, 0.94);
  box-shadow: 0 10px 28px rgba(31, 41, 51, 0.22);
  font-size: 14px;
}

.audio-unlock.is-hidden {
  display: none;
}

.start-panel {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.start-panel.is-hidden {
  display: none;
}

h1,
h2,
p,
ol {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.02;
}

.start-panel p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

button {
  width: 150px;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.teaching-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  max-height: 100vh;
  overflow-y: auto;
  padding: 32px 28px;
  border-left: 1px solid var(--line);
  background: #fffdf8;
  scrollbar-gutter: stable;
}

.teaching-panel::after {
  content: "";
  flex: 0 0 12px;
}

body.is-performance-mode .practice-only {
  display: none;
}

body.is-performance-mode .start-panel {
  display: none;
}

body.is-performance-mode .status-panel strong {
  font-size: 15px;
  line-height: 1.3;
}

body.is-performance-mode .status-panel {
  grid-template-columns: repeat(4, minmax(104px, 1fr));
  width: min(680px, calc(100% - 36px));
}

body.is-performance-mode .status-panel > div {
  padding: 10px 12px;
}

body.is-performance-mode .status-panel > div:nth-child(n + 5) {
  display: none;
}

.teaching-panel h2 {
  margin-bottom: 0;
  font-size: 28px;
}

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

.select-field span,
.toggle-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.calibration-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.calibration-panel button {
  width: 100%;
  min-height: 40px;
  font-size: 15px;
}

.calibration-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.music-game-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 2px solid rgba(44, 114, 122, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(47, 111, 115, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #f0faf7 100%);
  background-size: 12px 12px, auto;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.music-game-panel.is-hidden {
  display: none;
}

.music-game-header {
  display: grid;
  gap: 4px;
}

.music-game-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.music-game-header strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.music-game-header small {
  color: #536173;
  font-size: 13px;
  line-height: 1.35;
}

.game-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.game-mode-tabs button {
  min-height: 42px;
  padding: 0 12px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #edf6f4 100%);
  box-shadow: inset 0 -3px rgba(47, 111, 115, 0.13);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.game-mode-tabs button.is-active {
  border-color: rgba(47, 111, 115, 0.55);
  background: linear-gradient(180deg, #e9f5f3 0%, #d8eee9 100%);
  color: #245d61;
}

.game-level-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 34px;
}

.game-level-button {
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.game-level-button.is-active {
  border-color: #2f6f73;
  background: #2f6f73;
  color: #ffffff;
}

.game-level-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 2px solid rgba(47, 111, 115, 0.24);
  border-radius: 4px;
  background: rgba(47, 111, 115, 0.08);
  color: #245d61;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.game-mission-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(44, 114, 122, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.game-mission-card p {
  margin: 0;
  color: #344054;
  font-size: 14px;
  line-height: 1.55;
}

.game-mission-card p + p {
  padding-top: 8px;
  border-top: 1px solid rgba(44, 114, 122, 0.12);
}

.game-mission-card p:nth-child(2) {
  color: #245d61;
  font-weight: 760;
}

.music-challenge-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(44, 114, 122, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbfa 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.music-challenge-card.is-hidden {
  display: none;
}

.challenge-header {
  display: grid;
  gap: 4px;
}

.challenge-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.challenge-header strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.challenge-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef0;
}

.challenge-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.18s ease;
}

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

.challenge-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.challenge-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.challenge-grid strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#challengeHint {
  margin: 0;
  color: #344054;
  font-size: 14px;
  line-height: 1.55;
}

#challengeResetButton {
  width: 100%;
  min-height: 40px;
  background: #2f6f73;
  font-size: 15px;
}

@media (max-width: 520px) {
  .game-mode-tabs {
    grid-template-columns: 1fr;
  }

  .game-level-grid {
    min-height: 32px;
  }
}

.analysis-panel {
  display: none;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.analysis-panel.is-visible {
  display: grid;
}

.analysis-only {
  display: none !important;
}

body.is-performance-mode .analysis-only {
  display: grid !important;
}

.workspace-nav {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.workspace-nav button {
  min-height: 72px;
  padding: 10px;
  border: 1px solid rgba(40, 102, 110, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.workspace-nav button span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.workspace-nav button strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.is-hidden-control {
  display: none !important;
}

.workspace-overview,
.library-panel,
.score-task-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(40, 102, 110, 0.18);
  border-radius: 8px;
  background: #f7fbfa;
}

.workspace-overview span,
.library-panel summary span,
.score-task-panel summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.workspace-overview h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.18;
}

.workspace-overview p,
.library-note p,
.rights-confirm span {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

.workspace-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.library-panel summary,
.score-task-panel summary {
  display: grid;
  gap: 3px;
  cursor: pointer;
  list-style: none;
}

.library-panel summary::-webkit-details-marker,
.score-task-panel summary::-webkit-details-marker {
  display: none;
}

.library-panel summary small,
.score-task-panel summary small {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.library-panel[open] summary,
.score-task-panel[open] summary {
  margin-bottom: 2px;
}

.technical-details-panel {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(40, 102, 110, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.technical-details-panel summary {
  display: grid;
  gap: 3px;
  cursor: pointer;
  list-style: none;
}

.technical-details-panel summary::-webkit-details-marker {
  display: none;
}

.technical-details-panel summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.technical-details-panel summary small {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.technical-details-panel[open] summary {
  margin-bottom: 8px;
}

.library-grid {
  display: grid;
  gap: 10px;
}

.library-note,
.rights-confirm,
.upload-workflow-block {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.library-note strong {
  color: var(--ink);
  font-size: 13px;
}

.rights-confirm {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.rights-confirm input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
}

.upload-workflow-block {
  background: #fffdf8;
  container-type: inline-size;
}

.material-sections {
  display: grid;
  gap: 12px;
}

.material-section-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.motion-material-section {
  border-color: rgba(40, 102, 110, 0.18);
  background: #f8fbfa;
}

.sound-material-section {
  border-color: rgba(214, 165, 58, 0.22);
  background: #fffaf0;
}

.material-section-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.material-section-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.material-section-heading strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.22;
}

.material-section-heading p {
  margin: 0;
  color: #52606d;
  font-size: 13px;
  line-height: 1.55;
}

.sound-branch-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.sound-branch-card {
  background: rgba(255, 255, 255, 0.92);
}

.process-only {
  border-style: dashed;
  background: rgba(40, 102, 110, 0.04);
}

.process-note {
  margin-top: auto;
  padding: 9px 10px;
  border: 1px solid rgba(40, 102, 110, 0.16);
  border-radius: 8px;
  background: rgba(40, 102, 110, 0.08);
  color: #28666e;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.upload-entry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #ffffff;
  min-width: 0;
  overflow: hidden;
  writing-mode: horizontal-tb;
}

.upload-entry-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  writing-mode: horizontal-tb;
  white-space: normal;
}

.upload-entry-card > strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  writing-mode: horizontal-tb;
  white-space: normal;
  word-break: keep-all;
}

.upload-entry-card > p {
  margin: 0;
  color: #52606d;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: break-word;
  writing-mode: horizontal-tb;
  white-space: normal;
  word-break: normal;
}

.upload-entry-card > .file-field {
  margin-top: auto;
  align-self: stretch;
  min-width: 0;
  writing-mode: horizontal-tb;
}

.primary-upload-entry {
  border-color: rgba(40, 102, 110, 0.24);
  background: #f8fbfa;
}

.material-upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

@container (min-width: 760px) {
  .material-upload-grid {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 10px;
  }

  .material-sections {
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.6fr);
    align-items: stretch;
  }

  .sound-branch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .upload-entry-card {
    min-height: 188px;
  }
}

@container (max-width: 759px) {
  .material-sections,
  .sound-branch-grid {
    grid-template-columns: 1fr;
  }

  .material-section-card,
  .upload-entry-card {
    min-width: 0;
  }
}

.advanced-upload-panel {
  display: grid;
  gap: 10px;
}

@media (max-width: 920px) {
  .upload-entry-card > strong {
    font-size: 16px;
  }
}

.advanced-upload-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  list-style: none;
}

.advanced-upload-panel summary::-webkit-details-marker {
  display: none;
}

.advanced-upload-panel summary span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.advanced-upload-panel summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.advanced-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 10px;
}

.task-insight {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.task-insight span,
.teaching-interpretation span,
.analysis-summary span,
.analysis-focus span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-insight p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.workspace-nav-toggle,
.analysis-context-toggle,
.lesson-extra-details {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(40, 102, 110, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.task-insight > .analysis-context-toggle,
.lesson-extra-details {
  box-shadow: 0 8px 18px rgba(31, 41, 51, 0.04);
}

.workspace-nav-toggle > summary,
.analysis-context-toggle > summary,
.lesson-extra-details > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  min-width: 0;
}

.workspace-nav-toggle > summary::-webkit-details-marker,
.analysis-context-toggle > summary::-webkit-details-marker,
.lesson-extra-details > summary::-webkit-details-marker {
  display: none;
}

.workspace-nav-toggle > summary::after,
.analysis-context-toggle > summary::after,
.lesson-extra-details > summary::after {
  content: "展开";
  color: #28666e;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.workspace-nav-toggle[open] > summary::after,
.analysis-context-toggle[open] > summary::after,
.lesson-extra-details[open] > summary::after {
  content: "收起";
}

.workspace-nav-toggle summary span,
.analysis-context-toggle summary span,
.lesson-extra-details summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.workspace-nav-toggle summary strong,
.analysis-context-toggle summary strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lesson-extra-details summary small {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.workspace-nav-toggle[open] .workspace-nav {
  margin-top: 10px;
}

.analysis-context-body {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  min-width: 0;
}

.analysis-context-body p,
.lesson-extra-details li {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.lesson-extra-details ol {
  margin: 10px 0 0;
  padding-left: 20px;
}

.lesson-extra-details li + li {
  margin-top: 6px;
}

.backend-status {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(40, 102, 110, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.backend-status.is-ready {
  border-color: rgba(40, 102, 110, 0.42);
  background: rgba(40, 102, 110, 0.08);
}

.backend-status.is-warning {
  border-color: rgba(200, 85, 61, 0.34);
  background: rgba(200, 85, 61, 0.07);
}

.backend-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.backend-status p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.analysis-progress-main {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  padding: 14px 16px;
  border: 2px solid rgba(40, 102, 110, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #eef9f7);
  box-shadow: 0 14px 28px rgba(31, 41, 51, 0.08);
}

.analysis-progress-main.is-hidden {
  display: none;
}

.analysis-progress-main.is-ready {
  border-color: rgba(40, 102, 110, 0.45);
  background: rgba(40, 102, 110, 0.08);
}

.analysis-progress-main.is-warning {
  border-color: rgba(214, 165, 58, 0.52);
  background: rgba(214, 165, 58, 0.12);
}

.analysis-progress-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.analysis-progress-main-head span {
  color: #28666e;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.analysis-progress-main-head strong {
  flex: 0 0 auto;
  color: #1f2933;
  font-size: 14px;
  font-weight: 900;
}

.analysis-progress-main-track {
  position: relative;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(40, 102, 110, 0.14);
}

.analysis-progress-main-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #28666e, #d6a53a);
  transition: width 0.45s ease;
}

.analysis-progress-main p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.transcription-diagnostic {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  padding: 14px 16px;
  border: 2px solid rgba(31, 41, 51, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(31, 41, 51, 0.08);
}

.transcription-diagnostic.is-hidden {
  display: none;
}

.transcription-diagnostic.is-ready {
  border-color: rgba(40, 102, 110, 0.42);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(40, 102, 110, 0.07));
}

.transcription-diagnostic.is-warning {
  border-color: rgba(214, 165, 58, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(214, 165, 58, 0.13));
}

.transcription-diagnostic.is-loading {
  position: sticky;
  top: 12px;
  z-index: 20;
  border-color: rgba(40, 102, 110, 0.58);
  background: linear-gradient(180deg, #ffffff, #eef9f7);
}

.transcription-diagnostic span {
  color: #28666e;
  font-size: 14px;
  font-weight: 900;
}

.transcription-diagnostic p {
  margin: 0;
  color: #344054;
  font-size: 14px;
  line-height: 1.55;
}

.transcription-progress {
  display: grid;
  gap: 5px;
}

.transcription-progress-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(40, 102, 110, 0.14);
}

.transcription-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #28666e, #d6a53a);
  transition: width 0.45s ease;
}

.transcription-progress-text {
  color: #52606d;
  font-size: 13px;
  font-weight: 800;
}

.diagnostic-preview {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
}

.diagnostic-preview ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 4px 12px;
  margin: 0;
  padding-left: 18px;
}

.diagnostic-preview li {
  line-height: 1.35;
}

.speed-diagnostic {
  padding: 10px;
  border: 1px solid rgba(40, 102, 110, 0.16);
  border-radius: 8px;
  background: rgba(40, 102, 110, 0.06);
}

.speed-diagnostic ol {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding-left: 0;
  list-style: none;
}

.speed-diagnostic li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
}

.speed-diagnostic li strong {
  color: #28666e;
}

.diagnostic-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 8px;
  background: #28666e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.camera-guide {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(214, 165, 58, 0.28);
  border-radius: 8px;
  background: #fff8e6;
}

.camera-guide:not([open]) {
  display: block;
}

.camera-guide summary,
.feedback-panel summary,
.evidence-panel summary,
.music-feedback-panel summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.camera-guide summary::-webkit-details-marker,
.feedback-panel summary::-webkit-details-marker,
.evidence-panel summary::-webkit-details-marker,
.music-feedback-panel summary::-webkit-details-marker {
  display: none;
}

.camera-guide summary::after,
.feedback-panel summary::after,
.evidence-panel summary::after,
.music-feedback-panel summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(40, 102, 110, 0.12);
  color: #28666e;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.camera-guide[open] summary::after,
.feedback-panel[open] summary::after,
.evidence-panel[open] summary::after,
.music-feedback-panel[open] summary::after {
  content: "-";
}

.camera-guide summary span,
.feedback-panel summary span,
.evidence-panel summary span,
.music-feedback-panel summary span,
.camera-guide > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.camera-guide summary small,
.feedback-panel summary small,
.evidence-panel summary small,
.music-feedback-panel summary small {
  grid-column: 1 / 2;
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.camera-guide[open] summary {
  margin-bottom: 10px;
}

.camera-visual {
  display: grid;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.camera-visual p {
  margin: 0;
  padding: 0 10px 10px;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.capture-diagram {
  display: block;
  width: 100%;
  height: auto;
  min-height: 190px;
}

.diagram-room {
  fill: #f7fbfa;
  stroke: rgba(31, 41, 51, 0.16);
  stroke-width: 2;
}

.diagram-piano {
  fill: #263238;
  stroke: rgba(31, 41, 51, 0.22);
  stroke-width: 2;
}

.diagram-keys {
  fill: #ffffff;
}

.diagram-keyline {
  stroke: rgba(31, 41, 51, 0.24);
  stroke-width: 1;
}

.diagram-bench {
  fill: #c8553d;
  opacity: 0.78;
}

.diagram-person-head {
  fill: #d6a53a;
  stroke: #ffffff;
  stroke-width: 3;
}

.diagram-person-body,
.diagram-arm {
  fill: none;
  stroke: #28666e;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
}

.diagram-arm {
  stroke-width: 5;
}

.diagram-frame {
  fill: rgba(214, 165, 58, 0.08);
  stroke: rgba(214, 165, 58, 0.95);
  stroke-dasharray: 8 6;
  stroke-width: 3;
}

.diagram-camera {
  fill: #ffffff;
  stroke: #28666e;
  stroke-width: 3;
}

.diagram-lens {
  fill: #28666e;
}

.diagram-badge {
  fill: #ffffff;
  stroke: rgba(40, 102, 110, 0.9);
  stroke-width: 3;
}

.diagram-badge-text {
  fill: #28666e;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.diagram-tripod,
.diagram-view,
.diagram-sync {
  fill: none;
  stroke: #c8553d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.diagram-view {
  stroke: rgba(200, 85, 61, 0.72);
}

.diagram-view.dashed {
  stroke: rgba(40, 102, 110, 0.76);
  stroke-dasharray: 7 6;
}

.diagram-sync {
  stroke: #d6a53a;
  stroke-width: 4;
}

.diagram-label,
.diagram-small-text {
  fill: #1f2933;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.diagram-label {
  font-size: 17px;
}

.diagram-small-text {
  fill: #667085;
  font-size: 13px;
}

.capture-intro {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(10px);
}

.capture-intro.is-hidden {
  display: none;
}

.capture-intro-card {
  display: grid;
  gap: 14px;
  width: min(980px, 100%);
  max-height: min(92vh, 880px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.intro-heading {
  display: grid;
  gap: 6px;
}

.intro-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.intro-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.04;
}

.intro-heading p {
  margin: 0;
  color: #344054;
  font-size: 15px;
  line-height: 1.55;
}

.intro-visual .capture-diagram {
  min-height: 250px;
}

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

.intro-checklist div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.intro-checklist strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.intro-checklist p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

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

.intro-actions button {
  min-height: 42px;
}

.intro-actions button:last-child {
  background: #667085;
}

.guide-grid {
  display: grid;
  gap: 8px;
}

.guide-grid div {
  padding: 10px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.guide-grid strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.guide-grid p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

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

.file-field span,
.analysis-report span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.file-field input {
  width: 100%;
  min-height: 38px;
  font: inherit;
  font-size: 13px;
}

.file-field input[type="file"].is-custom-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.custom-file-ui {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.custom-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(44, 139, 148, 0.12);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.custom-file-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.analysis-actions button {
  width: 100%;
  min-height: 38px;
  font-size: 14px;
}

.analysis-actions button:last-child {
  background: #667085;
}

.analysis-report {
  display: grid;
  gap: 8px;
  max-height: 42vh;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(40, 102, 110, 0.24);
  border-radius: 8px;
  background: #f7fbfa;
}

.model-status {
  display: grid;
  grid-template-rows: auto minmax(35px, auto) auto;
  gap: 5px;
  min-height: 122px;
  padding: 10px 12px;
  border: 1px solid rgba(214, 165, 58, 0.34);
  border-radius: 8px;
  background: #fff8e6;
}

.model-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.model-status p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
  min-height: 35px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.model-status button {
  justify-self: start;
  align-self: end;
  min-height: 32px;
  padding: 7px 10px;
  background: #28666e;
  font-size: 12px;
}

.analysis-report p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.teaching-interpretation,
.analysis-summary,
.analysis-focus,
.evidence-summary,
.action-plan {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid rgba(40, 102, 110, 0.16);
  border-radius: 8px;
  background: #f7fbfa;
}

.analysis-summary {
  border-color: rgba(214, 165, 58, 0.3);
  background: #fff8e6;
}

.analysis-focus {
  border-color: rgba(200, 85, 61, 0.2);
  background: #fff7f2;
}

.evidence-summary {
  border-color: rgba(66, 88, 166, 0.18);
  background: #f6f8ff;
}

.analysis-tier {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid rgba(40, 102, 110, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.analysis-tier span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.analysis-tier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.analysis-tier-head strong {
  color: var(--ink);
  font-size: 16px;
}

.analysis-tier-head small {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(40, 102, 110, 0.1);
  color: #28666e;
  font-size: 12px;
  font-weight: 900;
}

.analysis-tier p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.wrong-note-card {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid rgba(102, 112, 133, 0.22);
  border-radius: 8px;
  background: #ffffff;
}

.wrong-note-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.wrong-note-card strong {
  color: #1f2933;
  font-size: 17px;
  line-height: 1.25;
}

.wrong-note-card p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.48;
}

.wrong-note-card.is-pass {
  border-color: rgba(40, 102, 110, 0.36);
  background: rgba(40, 102, 110, 0.08);
}

.wrong-note-card.is-issue {
  border-color: rgba(200, 85, 61, 0.44);
  background: rgba(200, 85, 61, 0.08);
}

.wrong-note-card.is-missing {
  border-color: rgba(102, 112, 133, 0.24);
  background: rgba(102, 112, 133, 0.07);
}

.core-teaching-report {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid rgba(40, 102, 110, 0.22);
  border-radius: 8px;
  background: #ffffff;
}

.core-teaching-report > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.core-teaching-report > p {
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.simple-performance-summary {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(40, 102, 110, 0.2);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.06);
}

.simple-performance-summary > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.simple-performance-summary > strong {
  color: #1f2933;
  font-size: 18px;
  line-height: 1.35;
}

.simple-performance-summary > p,
.simple-report-row p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.simple-report-list {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.simple-report-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(102, 112, 133, 0.14);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
  writing-mode: horizontal-tb !important;
}

.simple-report-row:first-child {
  border-top: 1px solid rgba(102, 112, 133, 0.14);
}

.simple-report-row > span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  align-self: flex-start;
  min-height: 26px;
  max-width: 100%;
  margin-bottom: 9px;
  padding: 4px 8px;
  border: 1px solid rgba(102, 112, 133, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: #1f2933;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  writing-mode: horizontal-tb;
  white-space: nowrap;
}

.simple-report-row > p,
.simple-report-row > div {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  writing-mode: horizontal-tb !important;
}

.simple-report-row > p + p {
  margin-top: 7px;
}

.simple-report-row b {
  display: inline;
  margin-right: 6px;
  color: #28666e;
}

.family-motion-checklist {
  display: grid;
  gap: 8px;
}

.family-motion-item {
  display: grid !important;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(102, 112, 133, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.family-motion-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.family-motion-item b {
  min-width: 68px;
  color: #1f2933;
}

.family-motion-item em {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(40, 102, 110, 0.1);
  color: #28666e;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.family-motion-item small {
  color: #607086;
  font-size: 12px;
  font-weight: 800;
}

.family-motion-item p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.family-motion-item .family-motion-reason,
.family-motion-item .family-motion-evidence,
.family-motion-item .family-motion-metric {
  color: #607086;
  font-size: 12px;
}

.family-motion-item .family-motion-evidence {
  color: #28666e;
}

.family-motion-item.is-review em {
  background: rgba(214, 165, 58, 0.18);
  color: #8a5d11;
}

.family-motion-item.is-watch em {
  background: rgba(66, 153, 225, 0.14);
  color: #1d5f93;
}

.family-motion-item.is-missing em {
  background: rgba(102, 112, 133, 0.14);
  color: #667085;
}

.family-motion-item span {
  min-width: 0;
  color: #344054;
}

.simple-issue-groups {
  display: grid;
  gap: 7px;
  min-width: 0;
  writing-mode: horizontal-tb !important;
}

.simple-issue-groups p {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  writing-mode: horizontal-tb !important;
}

.simple-issue-groups p > b {
  display: block;
  margin: 0 0 4px;
}

.simple-line-title {
  margin-bottom: 2px;
}

.simple-issue-section {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid rgba(102, 112, 133, 0.14);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.78);
  writing-mode: horizontal-tb !important;
}

.simple-issue-section h4 {
  margin: 0;
  color: #28666e;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  writing-mode: horizontal-tb !important;
}

.issue-measure-list {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.issue-measure-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  border-left: 3px solid rgba(40, 102, 110, 0.42);
  background: #ffffff;
  writing-mode: horizontal-tb !important;
}

.issue-measure-card > strong {
  color: #1f2933;
  font-size: 13px;
  line-height: 1.35;
}

.issue-measure-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.issue-measure-card li,
.issue-measure-card p,
.issue-list-more {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: normal;
  writing-mode: horizontal-tb !important;
}

.issue-list-more {
  color: #667085;
}

.is-major-list .issue-measure-card {
  border-left-color: rgba(200, 85, 61, 0.52);
  background: rgba(200, 85, 61, 0.06);
}

#analysisReport .simple-performance-summary,
#analysisReport .simple-report-list,
#analysisReport .simple-report-row,
#analysisReport .simple-report-row > div,
#analysisReport .simple-report-row > p,
#analysisReport .simple-issue-groups,
#analysisReport .simple-issue-groups p,
#analysisReport .simple-issue-section,
#analysisReport .issue-measure-list,
#analysisReport .issue-measure-card {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

#analysisReport .simple-report-row {
  display: grid !important;
  grid-template-columns: none !important;
  column-count: 1 !important;
}

#analysisReport .simple-report-row > span {
  display: inline-flex !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 0 10px !important;
  white-space: normal !important;
}

#analysisReport .simple-issue-groups {
  display: grid !important;
  gap: 8px;
}

#analysisReport .simple-issue-groups p {
  display: block !important;
  margin: 0 0 8px !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  white-space: normal !important;
  line-break: auto;
}

#analysisReport .simple-issue-groups p > b {
  display: block !important;
  margin: 0 0 4px !important;
}

.simple-line-title b {
  display: block;
  margin-right: 0;
  font-size: 14px;
  line-height: 1.45;
}

.practice-row p + p {
  margin-top: 4px;
}

.detail-report-panel {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(102, 112, 133, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.detail-report-panel > summary {
  cursor: pointer;
  color: #28666e;
  font-size: 14px;
  font-weight: 900;
}

.detail-report-panel > p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.report-condition-details p {
  margin-top: 4px;
}

.body-coordination-card .wrong-note-list p {
  line-height: 1.55;
}

.motion-cue-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.motion-cue-line span {
  flex: 1 1 260px;
  min-width: 0;
}

.motion-cue-button {
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  color: #0f766e;
  background: rgba(204, 251, 241, 0.72);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.motion-cue-button:hover,
.motion-cue-button:focus-visible {
  border-color: rgba(20, 184, 166, 0.54);
  background: rgba(153, 246, 228, 0.88);
  outline: none;
}

.wrong-note-list {
  display: grid;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(31, 41, 51, 0.12);
}

.issue-group-list {
  gap: 8px;
}

.issue-group {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(102, 112, 133, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.issue-group > strong {
  color: #1f2933;
  font-size: 13px;
  line-height: 1.25;
}

.issue-group p {
  overflow-wrap: anywhere;
}

.issue-group.is-major {
  border-color: rgba(200, 85, 61, 0.28);
  background: rgba(200, 85, 61, 0.08);
}

.issue-group.is-wrong {
  border-color: rgba(200, 85, 61, 0.2);
}

.issue-group.is-high-evidence {
  border-color: rgba(200, 85, 61, 0.28);
  background: rgba(200, 85, 61, 0.08);
}

.issue-group.is-medium-evidence {
  border-color: rgba(214, 165, 58, 0.3);
  background: rgba(214, 165, 58, 0.09);
}

.issue-group.is-low-evidence {
  border-color: rgba(102, 112, 133, 0.18);
  background: rgba(102, 112, 133, 0.06);
}

.issue-group.is-count {
  border-color: rgba(214, 165, 58, 0.28);
  background: rgba(214, 165, 58, 0.08);
}

.issue-group.is-rhythm {
  border-color: rgba(66, 88, 166, 0.22);
  background: rgba(66, 88, 166, 0.06);
}

.issue-group.is-route {
  border-color: rgba(29, 124, 134, 0.24);
  background: rgba(232, 250, 252, 0.72);
}

.analysis-tier-basic {
  border-color: rgba(66, 88, 166, 0.22);
  background: #f6f8ff;
}

.analysis-tier-enhanced {
  border-color: rgba(214, 165, 58, 0.3);
  background: #fff8e6;
}

.analysis-tier-complete {
  border-color: rgba(40, 102, 110, 0.32);
  background: #f2f8f7;
}

.action-plan {
  border-color: rgba(40, 102, 110, 0.26);
  background: #f2f8f7;
}

.action-plan > span {
  color: #28666e;
  font-size: 12px;
  font-weight: 900;
}

.action-plan > strong {
  color: #1f2933;
  font-size: 18px;
  line-height: 1.25;
}

.action-plan > p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

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

.family-check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.family-check-grid > div {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 104px;
  padding: 10px;
  border: 1px solid rgba(40, 102, 110, 0.14);
  border-radius: 8px;
  background: #f2f8f7;
}

.family-check-grid strong {
  color: var(--ink);
  font-size: 13px;
}

.family-check-grid p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

.motion-summary {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(214, 165, 58, 0.28);
  border-radius: 8px;
  background: #fff8e6;
}

.motion-summary strong {
  color: var(--ink);
  font-size: 14px;
}

.motion-summary p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.motion-readout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.motion-readout-grid > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 96px;
  padding: 10px;
  border: 1px solid rgba(214, 165, 58, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.motion-readout-grid > div strong {
  color: var(--ink);
  font-size: 13px;
}

.motion-readout-grid > div p {
  font-size: 12px;
}

.action-grid > div {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.action-grid strong {
  color: var(--ink);
  font-size: 13px;
}

.action-grid p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

.report-details {
  margin-top: 4px;
  padding: 10px;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.report-details summary {
  display: grid;
  gap: 2px;
  cursor: pointer;
  list-style: none;
}

.report-details summary::-webkit-details-marker {
  display: none;
}

.report-details summary span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.report-details summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-details[open] summary {
  margin-bottom: 8px;
}

.feedback-panel {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid rgba(40, 102, 110, 0.2);
  border-radius: 8px;
  background: #f7fbfa;
}

.music-feedback-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(214, 165, 58, 0.28);
  border-radius: 8px;
  background: #fffaf0;
}

.evidence-panel {
  border-color: rgba(66, 88, 166, 0.22);
  background: #f6f8ff;
}

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

.evidence-grid > div,
.evidence-rule {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.evidence-grid strong,
.evidence-rule strong {
  color: var(--ink);
  font-size: 13px;
}

.evidence-grid p,
.evidence-rule p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

.music-feedback-panel:not([open]) {
  display: block;
}

.music-feedback-panel.is-hidden {
  display: none;
}

.embodied-question.is-hidden {
  display: none;
}

.music-feedback-panel[open] summary {
  margin-bottom: 10px;
}

.feedback-panel:not([open]) {
  display: block;
}

.feedback-panel[open] summary {
  margin-bottom: 10px;
}

.feedback-panel.needs-attention {
  border-color: rgba(200, 85, 61, 0.38);
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(200, 85, 61, 0.12);
}

.feedback-panel.needs-attention summary span {
  color: var(--accent-2);
}

.optional-info {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.optional-info summary {
  cursor: pointer;
  list-style: none;
}

.optional-info summary::-webkit-details-marker {
  display: none;
}

.optional-info summary span {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.optional-info summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.optional-info[open] summary {
  margin-bottom: 10px;
}

.feedback-panel > span,
.music-feedback-panel > span,
.score-field span,
.note-field span,
.number-field span,
.measure-range-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.score-field,
.note-field,
.number-field,
.measure-range-field {
  display: grid;
  gap: 8px;
}

.measure-range-field {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.measure-range-field > span {
  grid-column: 1 / -1;
}

.measure-range-field label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-field input,
.number-field input,
.measure-range-field input,
.measure-range-field select,
.note-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.research-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.note-field textarea {
  min-height: 78px;
  resize: vertical;
  line-height: 1.45;
}

.score-field input:focus-visible,
.number-field input:focus-visible,
.measure-range-field input:focus-visible,
.measure-range-field select:focus-visible,
.note-field textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.mini-details {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.mini-details summary {
  cursor: pointer;
  color: #28666e;
  font-size: 12px;
  font-weight: 900;
}

.mini-details[open] summary {
  margin-bottom: 4px;
}

#datasetStatus,
#embodiedDatasetStatus {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auto-save-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(40, 102, 110, 0.18);
  border-radius: 8px;
  background: #f6faf9;
  color: var(--muted);
}

.auto-save-status span {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.auto-save-status p {
  margin: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.auto-save-status.has-samples {
  border-color: rgba(40, 102, 110, 0.34);
  background: #edf7f4;
  color: #28666e;
}

.analysis-summary {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid rgba(40, 102, 110, 0.18);
  border-radius: 8px;
  background: #f2f8f7;
}

.teaching-interpretation {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid rgba(214, 165, 58, 0.24);
  border-radius: 8px;
  background: #fff8e6;
}

.teaching-interpretation p {
  color: #344054;
}

.analysis-summary p {
  color: #1f2933;
}

#camera.is-upload {
  transform: none;
  object-fit: contain;
  background: #111827;
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 700;
}

select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

ol {
  display: grid;
  gap: 14px;
  margin-bottom: 0;
  padding-left: 22px;
  color: #344054;
  font-size: 16px;
  line-height: 1.55;
}

.note {
  padding: 16px;
  background: #f8efe7;
  box-shadow: none;
}

.note p {
  margin-bottom: 0;
  line-height: 1.6;
}

@media (min-width: 861px) and (max-width: 1180px) {
  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 0 16px;
  }

  .home-author-card {
    max-width: 720px;
  }

  .home-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.92fr);
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
  }

  body.is-performance-mode .app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.95fr);
  }

  .stage {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
  }

  .status-panel {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    width: min(360px, calc(100% - 28px));
    top: 14px;
    left: 14px;
    gap: 8px;
  }

  body.is-performance-mode .status-panel {
    grid-template-columns: repeat(2, minmax(104px, 1fr));
    width: min(300px, calc(100% - 28px));
  }

  body.is-performance-mode .status-panel > div:nth-child(n + 5) {
    display: none;
  }

  .status-panel > div {
    padding: 9px 10px;
  }

  .status-panel strong {
    min-height: 20px;
    font-size: 15px;
    line-height: 1.22;
  }

  .teaching-panel {
    padding: 22px 20px;
    gap: 14px;
  }

  .analysis-report {
    max-height: 34vh;
  }

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

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

  .music-challenge-card {
    padding: 12px;
  }

  body {
    overflow: hidden;
  }

  body.app-active {
    overflow: auto;
  }

  body.home-active,
  body.product-active,
  body.about-active,
  body.agreement-active {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell {
    display: block;
    grid-template-columns: 1fr;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
  }

  .home-screen {
    align-items: end;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
  }

  .home-nav {
    position: static;
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .home-nav-links {
    display: none;
  }

  .home-content {
    gap: 22px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 18px;
    padding: 20px 0 8px;
  }

  .home-content h1 {
    font-size: clamp(36px, 12vw, 56px);
  }

  .home-tagline {
    font-size: clamp(24px, 8vw, 34px);
  }

  .home-lead {
    font-size: 15px;
    line-height: 1.65;
  }

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

  .home-hero-actions button {
    width: 100%;
  }

  .home-author-card,
  .home-section {
    padding: 16px;
  }

  .home-module-grid,
  .home-why-grid,
  .home-boundary {
    grid-template-columns: 1fr;
  }

  .home-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agreement-screen {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
    padding: 14px;
  }

  .product-info-screen,
  .about-info-screen {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
    padding: 14px;
  }

  .agreement-card {
    max-height: calc(100vh - 28px);
    max-height: calc(100svh - 28px);
    max-height: calc(100dvh - 28px);
    padding: 18px;
  }

  .product-info-card,
  .about-info-card {
    max-height: calc(100vh - 28px);
    max-height: calc(100svh - 28px);
    max-height: calc(100dvh - 28px);
    padding: 18px;
  }

  .product-info-grid,
  .about-info-content {
    grid-template-columns: 1fr;
  }

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

  .product-info-actions button {
    width: 100%;
  }

  .agreement-content {
    grid-template-columns: 1fr;
  }

  .agreement-actions button {
    width: 100%;
  }

  .home-profile {
    margin-bottom: 16px;
  }

  .home-profile strong {
    font-size: 18px;
  }

  .home-profile span {
    font-size: 14px;
  }

  .home-card {
    min-height: 112px;
  }

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

  .stage {
    height: 54vh;
    height: 54svh;
    height: 54dvh;
    min-height: 340px;
    max-height: 560px;
    overflow: hidden;
  }

  .status-panel {
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 92px;
    overflow: hidden;
    padding: 0;
    pointer-events: none;
    scrollbar-width: none;
  }

  .status-panel::-webkit-scrollbar {
    display: none;
  }

  .status-panel > div {
    display: none !important;
    padding: 7px 8px;
    border-radius: 7px;
    box-shadow: 0 8px 26px rgba(31, 41, 51, 0.12);
  }

  .status-panel > div:nth-child(1),
  .status-panel > div:nth-child(2),
  .status-panel > div:nth-child(3),
  .status-panel > div:nth-child(5) {
    display: block !important;
  }

  .status-panel .label,
  .status-panel .note span {
    margin-bottom: 2px;
    font-size: 11px;
    line-height: 1.1;
  }

  .status-panel strong {
    min-height: 17px;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.18;
  }

  .start-panel {
    top: auto;
    bottom: 18px;
    width: calc(100% - 28px);
    max-height: calc(100% - 108px);
    overflow-y: auto;
    transform: translateX(-50%);
    padding: 18px;
  }

  .start-panel p {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.55;
  }

  .start-panel button,
  .home-button,
  .calibration-panel button,
  .analysis-actions button,
  .model-status button {
    min-height: 44px;
  }

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

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

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

  .family-check-grid {
    grid-template-columns: 1fr;
  }

  .motion-readout-grid {
    grid-template-columns: 1fr;
  }

  .teaching-panel {
    min-height: auto;
    max-height: none;
    overflow: visible;
    padding: 18px 16px 26px;
    gap: 14px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .teaching-panel h2 {
    font-size: 24px;
  }

  .analysis-report {
    max-height: none;
  }

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

  .capture-intro {
    align-items: start;
    padding: 14px;
  }

  .capture-intro-card {
    padding: 16px;
  }

  .intro-checklist {
    grid-template-columns: 1fr;
  }

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

  .intro-actions button {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .home-screen {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    height: auto;
    overflow-y: auto;
    padding: 16px;
  }

  .home-content h1 {
    margin-bottom: 12px;
    font-size: clamp(32px, 11vw, 52px);
  }

  .home-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-section h2,
  .home-boundary h2 {
    font-size: 26px;
  }

  .home-card {
    min-height: 96px;
    padding: 16px;
  }

  .home-card strong {
    font-size: 22px;
  }

  .language-switcher {
    width: 100%;
  }

  .language-switcher button,
  .language-switcher a {
    flex: 1;
  }

  .stage {
    height: 58vh;
    height: 58svh;
    height: 58dvh;
    min-height: 390px;
  }

  .status-panel > div {
    padding: 6px 7px;
  }

  .status-panel strong {
    font-size: 13px;
  }

  .capture-intro-card,
  .agreement-card,
  .product-info-card,
  .about-info-card {
    border-radius: 8px;
  }
}

body.device-mobile.app-active .app-shell {
  display: block;
}

body.home-active .app-shell,
body.product-active .app-shell,
body.about-active .app-shell,
body.agreement-active .app-shell,
body.app-active .home-screen,
body.app-active .product-info-screen,
body.app-active .about-info-screen,
body.app-active .agreement-screen,
body.home-active .agreement-screen,
body.home-active .product-info-screen,
body.home-active .about-info-screen,
body.product-active .home-screen,
body.product-active .about-info-screen,
body.product-active .agreement-screen,
body.about-active .home-screen,
body.about-active .product-info-screen,
body.about-active .agreement-screen,
body.agreement-active .home-screen,
body.agreement-active .product-info-screen,
body.agreement-active .about-info-screen,
.app-shell.is-hidden,
.home-screen.is-hidden,
.product-info-screen.is-hidden,
.about-info-screen.is-hidden,
.agreement-screen.is-hidden {
  display: none !important;
}

body.device-mobile .stage {
  height: 54vh;
  height: 54svh;
  height: 54dvh;
  min-height: 340px;
  max-height: 560px;
  overflow: hidden;
}

body.device-mobile .status-toggle {
  position: absolute;
  z-index: 8;
  top: 10px;
  left: 10px;
  display: inline-grid;
  place-items: center;
  width: auto;
  min-width: 76px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(31, 41, 51, 0.18);
  font-size: 13px;
  pointer-events: auto;
}

body.device-mobile .audio-unlock {
  right: 12px;
  bottom: 12px;
  min-height: 38px;
  font-size: 13px;
}

body.device-mobile .status-toggle::after {
  content: " +";
}

body.device-mobile.status-expanded .status-toggle::after {
  content: " -";
}

body.device-mobile .status-panel {
  position: absolute;
  z-index: 7;
  top: 54px !important;
  left: 10px !important;
  right: 10px !important;
  display: none !important;
  width: auto !important;
  max-width: none !important;
  max-height: min(42vh, 320px);
  max-height: min(42svh, 320px);
  max-height: min(42dvh, 320px);
  overflow-y: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
  padding: 0;
  pointer-events: auto;
}

body.device-mobile.status-expanded .status-panel {
  display: grid !important;
}

body.device-mobile .status-panel > div,
body.device-mobile.status-expanded .status-panel > div {
  display: block !important;
  min-width: 0;
  padding: 8px 9px;
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(31, 41, 51, 0.14);
}

body.device-mobile .status-panel .label {
  margin-bottom: 2px;
  font-size: 11px;
  line-height: 1.1;
}

body.device-mobile .status-panel strong {
  min-height: 17px;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.18;
}

body.device-mobile .teaching-panel {
  max-height: none;
  overflow: visible;
  padding: 14px 14px 26px;
}

body.device-mobile .measure-range-field {
  grid-template-columns: 1fr;
}

body.device-mobile .simple-performance-summary {
  padding: 12px;
}

body.device-mobile .simple-performance-summary > strong {
  font-size: 16px;
}

body.device-mobile .simple-report-row {
  display: flex !important;
  flex-direction: column !important;
}

body.device-mobile .simple-report-row > span {
  justify-content: flex-start;
  width: fit-content;
}

body.device-mobile .advanced-upload-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 720px) {
  .analysis-progress-main {
    padding: 12px;
    gap: 8px;
  }

  .analysis-progress-main-head {
    align-items: flex-start;
  }

  .analysis-progress-main-head span,
  .analysis-progress-main-head strong {
    font-size: 13px;
  }

  .analysis-progress-main p {
    font-size: 13px;
  }

  .transcription-diagnostic {
    padding: 12px;
    gap: 8px;
  }

  .transcription-diagnostic span {
    font-size: 13px;
  }

  .transcription-diagnostic p {
    font-size: 13px;
  }

  .simple-performance-summary {
    padding: 12px;
  }

  .simple-performance-summary > strong {
    font-size: 17px;
    line-height: 1.38;
  }

  .simple-report-row {
    display: block;
    padding: 12px 0;
  }

  .simple-report-row > span {
    width: fit-content;
    max-width: 100%;
    justify-content: flex-start;
  }

  .simple-issue-groups {
    gap: 8px;
  }

  .simple-issue-groups p {
    font-size: 13px;
    line-height: 1.58;
  }

  .auto-save-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .auto-save-status p {
    text-align: left;
  }
}

body.device-mobile .material-upload-grid {
  grid-template-columns: 1fr;
}

body.device-mobile .upload-entry-card {
  gap: 7px;
}

body.device-mobile .upload-entry-card > span,
body.device-mobile .upload-entry-card > strong,
body.device-mobile .upload-entry-card > p,
body.device-mobile .upload-entry-card > .file-field {
  writing-mode: horizontal-tb;
  min-width: 0;
}

body.device-mobile .advanced-upload-panel summary {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

body.device-mobile .start-panel {
  bottom: 16px;
  width: calc(100% - 28px);
  max-height: calc(100% - 76px);
}

body.device-tablet .status-toggle,
body.device-desktop .status-toggle {
  display: none;
}

/* Layout refresh: cleaner family-facing performance analysis workspace. */
body.is-performance-mode {
  --ink: #102033;
  --muted: #607086;
  --line: rgba(40, 78, 104, 0.16);
  --line-strong: rgba(32, 156, 170, 0.32);
  --paper: #f4f8fb;
  --panel: rgba(255, 255, 255, 0.78);
  --cyan: #1fb8c9;
  --cyan-dark: #0c7582;
  --green: #27a56b;
  --amber: #e3a93d;
  --red: #d96257;
  --layout-shadow: 0 22px 70px rgba(22, 52, 78, 0.13);
  background:
    linear-gradient(120deg, rgba(31, 184, 201, 0.09) 0%, transparent 32%),
    linear-gradient(240deg, rgba(49, 110, 230, 0.1) 0%, transparent 34%),
    linear-gradient(180deg, #fbfdff 0%, #edf4f7 100%);
}

body.is-performance-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 32, 51, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 51, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.18));
}

body.is-performance-mode .app-shell {
  grid-template-columns: minmax(560px, 1.08fr) minmax(520px, 0.92fr);
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

body.is-performance-mode .stage {
  min-height: calc(100vh - 36px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, #102f3d, #071923);
  box-shadow: var(--layout-shadow);
  overflow: hidden;
}

body.is-performance-mode #camera,
body.is-performance-mode #camera.is-upload {
  object-fit: contain;
  background: #071923;
}

body.is-performance-mode .camera-overlay,
body.is-performance-mode .stage::after {
  border-radius: 8px;
}

body.is-performance-mode .teaching-panel {
  max-height: calc(100vh - 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--layout-shadow);
  backdrop-filter: blur(18px);
  padding: 16px;
}

body.is-performance-mode .analysis-panel {
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.is-performance-mode .workspace-overview {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(9, 38, 58, 0.96), rgba(16, 103, 116, 0.92));
  color: #ffffff;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(6, 45, 56, 0.22);
}

body.is-performance-mode .workspace-overview span,
body.is-performance-mode .workspace-overview h2,
body.is-performance-mode .workspace-overview p {
  color: #ffffff;
}

body.is-performance-mode .workspace-overview span {
  opacity: 0.72;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

body.is-performance-mode .workspace-overview h2 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.08;
}

body.is-performance-mode .workspace-overview p {
  max-width: 680px;
  opacity: 0.86;
  font-size: 14px;
}

body.is-performance-mode .private-score-panel,
body.is-performance-mode .library-panel,
body.is-performance-mode .camera-guide,
body.is-performance-mode .upload-workflow-block,
body.is-performance-mode .analysis-progress-main,
body.is-performance-mode .analysis-report,
body.is-performance-mode .auto-save-status,
body.is-performance-mode .feedback-panel,
body.is-performance-mode .model-status,
body.is-performance-mode .teacher-review-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 34px rgba(22, 52, 78, 0.08);
  backdrop-filter: blur(14px);
}

body.is-performance-mode .private-score-panel,
body.is-performance-mode .library-panel,
body.is-performance-mode .camera-guide,
body.is-performance-mode .upload-workflow-block {
  padding: 13px;
}

body.is-performance-mode .private-score-panel summary span,
body.is-performance-mode .library-panel summary span,
body.is-performance-mode .camera-guide summary span,
body.is-performance-mode .upload-workflow-block h3,
body.is-performance-mode .upload-entry-card > strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

body.is-performance-mode .private-score-panel summary small,
body.is-performance-mode .library-panel summary small,
body.is-performance-mode .camera-guide summary small,
body.is-performance-mode .upload-workflow-block p,
body.is-performance-mode .upload-entry-card > p,
body.is-performance-mode .rights-confirm span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.46;
}

body.is-performance-mode .material-sections {
  grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.18fr);
  gap: 12px;
}

body.is-performance-mode .material-section,
body.is-performance-mode .upload-entry-card,
body.is-performance-mode .technical-details-panel,
body.is-performance-mode .backend-status,
body.is-performance-mode .task-insight,
body.is-performance-mode .file-field,
body.is-performance-mode .note-field,
body.is-performance-mode .select-field {
  border-color: var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

body.is-performance-mode .sound-branch-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.is-performance-mode .analysis-actions button,
body.is-performance-mode .inline-info-button,
body.is-performance-mode .upload-entry-card button,
body.is-performance-mode .file-field input::file-selector-button {
  border-radius: 8px;
}

body.is-performance-mode .analysis-actions button:first-child,
body.is-performance-mode #startAnalysis {
  background: linear-gradient(180deg, #31d2df, #15aebe);
  color: #06242a;
  box-shadow: 0 14px 36px rgba(21, 174, 190, 0.24);
}

body.is-performance-mode .analysis-report {
  padding: 14px;
}

body.is-performance-mode .simple-performance-summary {
  border-radius: 8px;
}

@media (max-width: 1180px) {
  body.is-performance-mode {
    overflow: auto;
  }

  body.is-performance-mode .app-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  body.is-performance-mode .stage {
    min-height: min(62vh, 620px);
  }

  body.is-performance-mode .teaching-panel {
    max-height: none;
  }
}

@media (max-width: 760px) {
  body.is-performance-mode .app-shell {
    padding: 10px;
    gap: 10px;
  }

  body.is-performance-mode .material-sections,
  body.is-performance-mode .sound-branch-grid {
    grid-template-columns: 1fr;
  }

  body.is-performance-mode .stage {
    min-height: 420px;
  }
}

/* v28: match the approved performance-analysis test layout more closely. */
body.is-performance-mode {
  overflow: auto;
}

body.is-performance-mode .app-shell {
  grid-template-columns: minmax(430px, 0.72fr) minmax(620px, 1.05fr);
  align-items: start;
  width: min(1420px, 100%);
  margin: 0 auto;
}

body.is-performance-mode .teaching-panel {
  order: 1;
  max-height: calc(100vh - 36px);
}

body.is-performance-mode .stage {
  order: 2;
  min-height: calc(100vh - 36px);
}

body.is-performance-mode .home-button {
  position: static;
  display: inline-flex;
  width: fit-content;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 16px;
  font-weight: 900;
  box-shadow: none;
}

body.is-performance-mode .language-switcher.compact,
body.is-performance-mode .teaching-panel > .select-field[for="frameworkMode"],
body.is-performance-mode .teaching-panel > .select-field[for="exerciseMode"],
body.is-performance-mode .workspace-nav-toggle.analysis-only {
  display: none !important;
}

body.is-performance-mode .analysis-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
}

body.is-performance-mode .workspace-overview {
  min-height: 138px;
}

body.is-performance-mode .workspace-overview h2 {
  margin: 0;
}

body.is-performance-mode .workspace-overview-actions {
  margin-top: 4px;
}

body.is-performance-mode .private-score-panel,
body.is-performance-mode .upload-workflow-block,
body.is-performance-mode .analysis-report {
  position: relative;
}

body.is-performance-mode .private-score-panel summary,
body.is-performance-mode .camera-guide summary,
body.is-performance-mode .library-panel summary,
body.is-performance-mode .feedback-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.is-performance-mode .private-score-panel summary span,
body.is-performance-mode .camera-guide summary span,
body.is-performance-mode .library-panel summary span,
body.is-performance-mode .feedback-panel summary span {
  font-size: 16px;
}

body.is-performance-mode .private-score-panel summary small,
body.is-performance-mode .camera-guide summary small,
body.is-performance-mode .library-panel summary small,
body.is-performance-mode .feedback-panel summary small {
  max-width: 48%;
  text-align: right;
}

body.is-performance-mode .rights-confirm {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(39, 165, 107, 0.16);
  border-radius: 8px;
  background: rgba(231, 247, 238, 0.58);
}

body.is-performance-mode .private-score-panel .file-field {
  border-color: var(--line-strong);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(233, 250, 252, 0.86));
}

body.is-performance-mode .measure-range-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  padding: 10px;
}

body.is-performance-mode .camera-guide {
  display: none;
}

body.is-performance-mode .upload-workflow-block {
  display: grid;
  gap: 12px;
}

body.is-performance-mode .material-sections {
  grid-template-columns: 1fr;
}

body.is-performance-mode .material-section-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px;
}

body.is-performance-mode .material-section-heading {
  display: grid;
  gap: 4px;
}

body.is-performance-mode .material-section-heading span,
body.is-performance-mode .upload-entry-card > span {
  width: fit-content;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(31, 184, 201, 0.2);
  border-radius: 999px;
  background: rgba(235, 249, 250, 0.9);
  color: var(--cyan-dark);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

body.is-performance-mode .material-section-heading strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.18;
}

body.is-performance-mode .material-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body.is-performance-mode .upload-entry-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 14px;
}

body.is-performance-mode .primary-upload-entry {
  grid-template-columns: minmax(0, 1fr);
  border-color: rgba(49, 110, 230, 0.18);
  background: rgba(237, 246, 255, 0.68);
}

body.is-performance-mode .sound-branch-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.is-performance-mode .sound-branch-card {
  min-height: 136px;
}

body.is-performance-mode .sound-branch-card.process-only {
  border-color: var(--line-strong);
  background: rgba(234, 251, 252, 0.78);
}

body.is-performance-mode .sound-branch-card:first-child {
  grid-column: 1 / -1;
  min-height: 96px;
}

body.is-performance-mode .analysis-actions {
  position: sticky;
  bottom: 0;
  z-index: 8;
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 252, 253, 0.92);
  padding: 10px;
  backdrop-filter: blur(18px);
}

body.is-performance-mode .analysis-actions button {
  flex: 1;
  min-height: 46px;
  font-size: 16px;
}

body.is-performance-mode .model-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
}

body.is-performance-mode .model-status span,
body.is-performance-mode .analysis-report > span,
body.is-performance-mode .auto-save-status > span {
  color: var(--cyan-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

body.is-performance-mode .model-status p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.is-performance-mode .model-status button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
}

body.is-performance-mode .analysis-report {
  min-height: 156px;
}

body.is-performance-mode .analysis-report p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.56;
}

body.is-performance-mode .feedback-panel,
body.is-performance-mode #basicInfoPanel,
body.is-performance-mode #teacherFeedbackPanel,
body.is-performance-mode #evidencePanel {
  padding: 12px;
}

body.is-performance-mode .feedback-panel:not([open]) {
  min-height: 0;
}

body.is-performance-mode .teaching-panel > h2,
body.is-performance-mode #lessonSteps,
body.is-performance-mode .teaching-panel > .note,
body.is-performance-mode #lessonExtraDetails {
  display: none !important;
}

body.is-performance-mode .status-panel {
  top: 16px;
  left: 16px;
  right: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.is-performance-mode .status-panel > div {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

body.is-performance-mode .start-panel {
  width: min(520px, calc(100% - 36px));
  border-radius: 8px;
  background: rgba(9, 38, 58, 0.82);
  color: #ffffff;
  backdrop-filter: blur(18px);
}

body.is-performance-mode .start-panel h1,
body.is-performance-mode .start-panel p {
  color: #ffffff;
}

@media (max-width: 1180px) {
  body.is-performance-mode .app-shell {
    grid-template-columns: 1fr;
  }

  body.is-performance-mode .teaching-panel,
  body.is-performance-mode .stage {
    order: initial;
    max-height: none;
  }
}

/* v29: real performance-analysis workspace layout, matching the approved test page. */
body.is-performance-mode {
  --tech-line: rgba(40, 78, 104, 0.16);
  --tech-line-strong: rgba(32, 156, 170, 0.32);
  --tech-panel: rgba(255, 255, 255, 0.78);
  --tech-cyan: #1fb8c9;
  --tech-cyan-dark: #0c7582;
  --tech-blue: #316ee6;
  --tech-shadow: 0 22px 70px rgba(22, 52, 78, 0.13);
  overflow: auto;
  background:
    linear-gradient(120deg, rgba(31, 184, 201, 0.09) 0%, transparent 32%),
    linear-gradient(240deg, rgba(49, 110, 230, 0.1) 0%, transparent 34%),
    linear-gradient(180deg, #fbfdff 0%, #edf4f7 100%);
}

body.is-performance-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(16, 32, 51, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 51, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.18));
}

body.is-performance-mode .app-shell.performance-workspace-active {
  display: block;
  min-height: 100vh;
  padding: 22px;
}

body.is-performance-mode .app-shell.performance-workspace-active > .teaching-panel {
  display: none !important;
}

body.is-performance-mode .capture-intro {
  display: none !important;
}

body.is-performance-mode .performance-workspace-shell {
  width: min(1420px, 100%);
  margin: 0 auto;
}

body.is-performance-mode .performance-workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  margin-bottom: 18px;
}

body.is-performance-mode .performance-workspace-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body.is-performance-mode .performance-brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid rgba(31, 184, 201, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(223, 247, 250, 0.86));
  color: var(--tech-cyan-dark);
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 0 26px rgba(31, 184, 201, 0.18);
}

body.is-performance-mode .performance-workspace-brand span:not(.performance-brand-mark) {
  color: var(--tech-cyan-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

body.is-performance-mode .performance-workspace-brand h1 {
  margin: 0;
  color: #102033;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.02;
}

body.is-performance-mode .performance-workspace-brand p {
  margin: 4px 0 0;
  color: #607086;
  font-size: 14px;
  font-weight: 800;
}

body.is-performance-mode .performance-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

body.is-performance-mode .performance-workspace-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

body.is-performance-mode .performance-workspace-actions .home-button,
body.is-performance-mode .performance-workspace-actions .language-switcher {
  position: static;
  margin: 0;
}

body.is-performance-mode .performance-workspace-actions .home-button {
  min-height: 42px;
  border-radius: 8px;
  background: rgba(224, 246, 248, 0.9);
  color: var(--tech-cyan-dark);
  box-shadow: none;
}

body.is-performance-mode .performance-overview-back {
  min-height: 42px;
  border: 1px solid rgba(40, 78, 104, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #0c7582;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 950;
  box-shadow: none;
  cursor: pointer;
}

body.is-performance-mode .performance-module-chooser {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

body.is-performance-mode .performance-module-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  min-height: 126px;
  padding: 16px;
  border: 1px solid rgba(40, 78, 104, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #102033;
  text-align: left;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 18px 38px rgba(24, 57, 82, 0.08);
  cursor: pointer;
}

body.is-performance-mode .performance-module-card span {
  width: fit-content;
  border-radius: 999px;
  background: rgba(224, 246, 248, 0.9);
  color: #0c7582;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 950;
}

body.is-performance-mode .performance-module-card strong {
  color: #102033;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.12;
}

body.is-performance-mode .performance-module-card p {
  margin: 0;
  color: #607086;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

body.is-performance-mode .performance-module-card.is-active {
  border-color: rgba(31, 184, 201, 0.58);
  background: linear-gradient(135deg, rgba(232, 251, 253, 0.98), rgba(255, 255, 255, 0.82));
  box-shadow: 0 0 0 3px rgba(31, 184, 201, 0.12), 0 20px 44px rgba(31, 184, 201, 0.12);
}

body.is-performance-mode .performance-module-link {
  background: linear-gradient(135deg, rgba(13, 57, 78, 0.96), rgba(18, 125, 137, 0.88));
}

body.is-performance-mode .performance-module-link span {
  background: rgba(255, 255, 255, 0.16);
  color: #dff9fb;
}

body.is-performance-mode .performance-module-link strong,
body.is-performance-mode .performance-module-link p {
  color: #ffffff;
}

body.is-performance-mode .performance-workspace-grid {
  display: grid;
  grid-template-columns: minmax(620px, 1.05fr) minmax(420px, 0.72fr);
  gap: 18px;
  align-items: start;
}

body.is-performance-mode .performance-workspace-grid[hidden] {
  display: none;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser {
  min-height: min(58vh, 560px);
  align-items: stretch;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card {
  min-height: 260px;
  padding: clamp(22px, 3vw, 34px);
  align-content: center;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card strong {
  font-size: clamp(28px, 3vw, 40px);
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card p {
  font-size: clamp(15px, 1.4vw, 18px);
}

body.is-performance-mode .performance-workspace-shell:not([data-performance-module="overview"]) .performance-module-chooser {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="sound"] .performance-video-card {
  display: none;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="motion"] .performance-score-card,
body.is-performance-mode .performance-workspace-shell[data-performance-module="motion"] .performance-sound-box,
body.is-performance-mode .performance-workspace-shell[data-performance-module="motion"] .performance-tech-details {
  display: none;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="motion"] .performance-video-card {
  min-height: 560px;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="motion"] .performance-video-preview {
  min-height: 460px;
}

html[lang="en"] body.is-performance-mode .performance-workspace-shell {
  width: min(1540px, 100%);
}

html[lang="en"] body.is-performance-mode .performance-workspace-grid {
  grid-template-columns: minmax(660px, 1.08fr) minmax(520px, 0.92fr);
  gap: 20px;
}

html[lang="en"] body.is-performance-mode .performance-workspace-shell:not([data-performance-module="overview"]) .performance-module-chooser {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

html[lang="en"] body.is-performance-mode .performance-module-card {
  min-height: 116px;
  padding: 14px;
}

html[lang="en"] body.is-performance-mode .performance-module-card strong {
  font-size: clamp(17px, 1.25vw, 22px);
}

html[lang="en"] body.is-performance-mode .performance-module-card p,
html[lang="en"] body.is-performance-mode .performance-panel-head p,
html[lang="en"] body.is-performance-mode .analysis-report p,
html[lang="en"] body.is-performance-mode .simple-report-row p,
html[lang="en"] body.is-performance-mode .detail-report-panel p {
  line-height: 1.32;
}

html[lang="en"] body.is-performance-mode .performance-panel-head {
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 12px;
}

html[lang="en"] body.is-performance-mode .performance-panel-head h2 {
  font-size: clamp(24px, 2.1vw, 30px);
}

html[lang="en"] body.is-performance-mode .performance-panel-head small {
  max-width: 220px;
  white-space: normal;
  text-align: center;
  line-height: 1.18;
}

html[lang="en"] body.is-performance-mode .performance-panel-body {
  padding: 16px 18px 18px;
}

html[lang="en"] body.is-performance-mode .performance-material-card,
html[lang="en"] body.is-performance-mode .performance-sound-box,
html[lang="en"] body.is-performance-mode .performance-video-card,
html[lang="en"] body.is-performance-mode .performance-status-row,
html[lang="en"] body.is-performance-mode .performance-tech-details {
  min-width: 0;
}

html[lang="en"] body.is-performance-mode .performance-material-copy strong,
html[lang="en"] body.is-performance-mode .performance-sound-option b,
html[lang="en"] body.is-performance-mode .performance-video-copy strong {
  overflow-wrap: anywhere;
  line-height: 1.15;
}

html[lang="en"] body.is-performance-mode .performance-tag,
html[lang="en"] body.is-performance-mode .performance-chip {
  white-space: normal;
  line-height: 1.1;
}

html[lang="en"] body.is-performance-mode .performance-result-panel {
  min-width: 0;
}

html[lang="en"] body.is-performance-mode .performance-result-panel .analysis-report {
  padding: 14px;
}

html[lang="en"] body.is-performance-mode .simple-report-row {
  gap: 8px;
}

body.is-performance-mode .performance-workspace-panel {
  min-width: 0;
  border: 1px solid var(--tech-line);
  border-radius: 8px;
  background: var(--tech-panel);
  box-shadow: var(--tech-shadow);
  backdrop-filter: blur(18px);
}

body.is-performance-mode .performance-result-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 44px);
  overflow: auto;
}

body.is-performance-mode .performance-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--tech-line);
}

body.is-performance-mode .performance-panel-head span {
  color: var(--tech-cyan-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

body.is-performance-mode .performance-panel-head h2 {
  margin: 4px 0 0;
  color: #102033;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.1;
}

body.is-performance-mode .performance-panel-head p {
  margin: 4px 0 0;
  color: #607086;
  font-size: 14px;
  line-height: 1.45;
}

body.is-performance-mode .performance-panel-head small {
  align-self: flex-start;
  white-space: nowrap;
  border: 1px solid rgba(39, 165, 107, 0.22);
  border-radius: 999px;
  background: rgba(231, 247, 238, 0.86);
  color: #1d7b48;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
}

body.is-performance-mode .performance-panel-body {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

body.is-performance-mode .performance-material-panel .analysis-panel {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.is-performance-mode .workspace-overview,
body.is-performance-mode .private-score-panel,
body.is-performance-mode .upload-workflow-block,
body.is-performance-mode .material-section-card,
body.is-performance-mode .analysis-report,
body.is-performance-mode .auto-save-status,
body.is-performance-mode #basicInfoPanel,
body.is-performance-mode #teacherFeedbackPanel,
body.is-performance-mode #evidencePanel,
body.is-performance-mode .performance-video-shell {
  border: 1px solid var(--tech-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

body.is-performance-mode .workspace-overview {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(233, 250, 252, 0.86));
  color: #102033;
  box-shadow: none;
}

body.is-performance-mode .workspace-overview span,
body.is-performance-mode .workspace-overview h2,
body.is-performance-mode .workspace-overview p {
  color: inherit;
}

body.is-performance-mode .workspace-overview h2 {
  margin: 0;
  font-size: 22px;
}

body.is-performance-mode .workspace-overview p {
  margin: 0;
  color: #607086;
  font-size: 13px;
}

body.is-performance-mode .private-score-panel,
body.is-performance-mode .upload-workflow-block {
  padding: 14px;
}

body.is-performance-mode .private-score-panel summary,
body.is-performance-mode .material-section-heading p,
body.is-performance-mode .camera-guide {
  display: none;
}

body.is-performance-mode .private-score-panel[open] > :not(summary) {
  display: grid;
  gap: 10px;
}

body.is-performance-mode .rights-confirm {
  margin: 0;
  padding: 10px;
}

body.is-performance-mode .file-field,
body.is-performance-mode .note-field,
body.is-performance-mode .measure-range-field,
body.is-performance-mode .upload-entry-card {
  border-radius: 8px;
}

body.is-performance-mode .material-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

body.is-performance-mode .material-section-card {
  padding: 14px;
}

body.is-performance-mode .sound-branch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.is-performance-mode .sound-branch-card:first-child {
  grid-column: 1 / -1;
}

body.is-performance-mode .performance-video-shell {
  display: grid;
  gap: 12px;
  padding: 14px;
}

body.is-performance-mode .performance-video-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

body.is-performance-mode .performance-video-head span {
  color: var(--tech-cyan-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

body.is-performance-mode .performance-video-head strong {
  display: block;
  color: #102033;
  font-size: 22px;
  line-height: 1.2;
}

body.is-performance-mode .performance-video-head small {
  color: #607086;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

body.is-performance-mode .performance-video-shell .stage {
  min-height: 430px;
  height: min(56vh, 540px);
  border: 1px solid rgba(40, 78, 104, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #102f3d, #071923);
  box-shadow: none;
}

body.is-performance-mode .performance-video-shell #camera,
body.is-performance-mode .performance-video-shell #camera.is-upload {
  object-fit: contain;
}

body.is-performance-mode .performance-video-shell .status-panel {
  top: 12px;
  left: 12px;
  right: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.is-performance-mode .analysis-actions {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: flex;
  gap: 10px;
  border: 1px solid var(--tech-line);
  border-radius: 8px;
  background: rgba(244, 252, 253, 0.94);
  padding: 10px;
  backdrop-filter: blur(18px);
}

body.is-performance-mode .analysis-actions button {
  flex: 1;
  min-height: 46px;
  border-radius: 8px;
  font-size: 16px;
}

body.is-performance-mode .performance-result-panel .analysis-report {
  min-height: 220px;
  padding: 16px;
}

body.is-performance-mode .performance-result-panel .analysis-report > span,
body.is-performance-mode .core-teaching-report > span,
body.is-performance-mode .action-plan > span,
body.is-performance-mode .wrong-note-card > span,
body.is-performance-mode .auto-save-status > span {
  color: var(--tech-cyan-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

body.is-performance-mode .core-teaching-report {
  display: grid;
  gap: 12px;
}

body.is-performance-mode .action-plan,
body.is-performance-mode .wrong-note-card,
body.is-performance-mode .body-coordination-card,
body.is-performance-mode .teaching-interpretation {
  border-radius: 8px;
}

body.is-performance-mode .wrong-note-card {
  padding: 14px;
  border: 1px solid var(--tech-line);
  background: rgba(255, 255, 255, 0.74);
}

body.is-performance-mode .wrong-note-card strong {
  color: #102033;
  font-size: 18px;
}

body.is-performance-mode .wrong-note-card p,
body.is-performance-mode .action-plan p,
body.is-performance-mode .issue-group p {
  color: #607086;
  font-size: 14px;
  line-height: 1.55;
}

body.is-performance-mode .issue-group {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

body.is-performance-mode .issue-group.is-high-evidence,
body.is-performance-mode .issue-group.is-major {
  border-color: rgba(217, 98, 87, 0.28);
  background: rgba(255, 244, 242, 0.78);
}

body.is-performance-mode .issue-group.is-medium-evidence,
body.is-performance-mode .issue-group.is-rhythm {
  border-color: rgba(227, 169, 61, 0.3);
  background: rgba(255, 249, 234, 0.78);
}

body.is-performance-mode .issue-group.is-route {
  border-color: rgba(29, 124, 134, 0.26);
  background: rgba(232, 250, 252, 0.78);
}

body.is-performance-mode .issue-group.is-low-evidence,
body.is-performance-mode .issue-group.is-secondary {
  border-color: rgba(49, 110, 230, 0.22);
  background: rgba(239, 246, 255, 0.74);
}

body.is-performance-mode .auto-save-status,
body.is-performance-mode #basicInfoPanel,
body.is-performance-mode #teacherFeedbackPanel,
body.is-performance-mode #evidencePanel {
  padding: 14px;
}

@media (max-width: 1120px) {
  body.is-performance-mode .performance-workspace-grid {
    grid-template-columns: 1fr;
  }

  body.is-performance-mode .performance-result-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  body.is-performance-mode .app-shell.performance-workspace-active {
    padding: 14px;
  }

  body.is-performance-mode .performance-workspace-topbar,
  body.is-performance-mode .performance-panel-head,
  body.is-performance-mode .performance-video-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body.is-performance-mode .performance-panel-head small,
  body.is-performance-mode .performance-video-head small {
    text-align: left;
  }

  body.is-performance-mode .sound-branch-grid {
    grid-template-columns: 1fr;
  }

  body.is-performance-mode .performance-video-shell .stage {
    min-height: 320px;
    height: 52vh;
  }
}

/* v30: copy the approved performance-analysis test-page structure into the live app. */
body.is-performance-mode .performance-workspace-shell {
  width: min(1420px, 100%);
  padding: 0;
}

body.is-performance-mode .performance-workspace-grid {
  grid-template-columns: minmax(620px, 1.05fr) minmax(420px, 0.72fr);
  margin-top: 20px;
}

body.is-performance-mode .performance-setup-body {
  display: grid;
  gap: 12px;
}

body.is-performance-mode .performance-material-card,
body.is-performance-mode .performance-sound-box,
body.is-performance-mode .performance-video-card,
body.is-performance-mode .performance-status-row,
body.is-performance-mode .performance-tech-details {
  border: 1px solid rgba(40, 78, 104, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.is-performance-mode .performance-material-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(210px, 0.58fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
}

body.is-performance-mode .performance-material-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #e9f9fb, #d9f1f5);
  color: #0c7582;
  font-size: 23px;
  font-weight: 950;
}

body.is-performance-mode .performance-material-copy,
body.is-performance-mode .performance-video-copy > div,
body.is-performance-mode .performance-sound-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body.is-performance-mode .performance-tag {
  width: fit-content;
  border-radius: 999px;
  background: rgba(224, 246, 248, 0.9);
  color: #0c7582;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 950;
}

body.is-performance-mode .performance-material-copy strong,
body.is-performance-mode .performance-sound-head strong,
body.is-performance-mode .performance-video-copy strong {
  color: #102033;
  font-size: 20px;
  line-height: 1.15;
}

body.is-performance-mode .performance-material-copy p,
body.is-performance-mode .performance-sound-option p,
body.is-performance-mode .performance-video-copy p {
  margin: 0;
  color: #607086;
  font-size: 13px;
  line-height: 1.45;
}

body.is-performance-mode .performance-upload-slot {
  display: grid;
  gap: 10px;
  min-width: 0;
}

body.is-performance-mode .performance-upload-slot .file-field,
body.is-performance-mode .performance-upload-slot .rights-confirm,
body.is-performance-mode .performance-model-slot .model-status {
  margin: 0;
  border: 1px solid rgba(40, 78, 104, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  padding: 10px;
  box-shadow: none;
}

body.is-performance-mode .performance-upload-slot .file-field span,
body.is-performance-mode .performance-upload-slot .rights-confirm span {
  color: #4e6075;
  font-size: 12px;
  line-height: 1.35;
}

body.is-performance-mode .performance-upload-slot input[type="file"] {
  width: 100%;
  max-width: 100%;
  color: #102033;
  font-size: 13px;
}

body.is-performance-mode .performance-score-card .rights-confirm {
  grid-column: 1 / -1;
}

body.is-performance-mode .performance-score-card .performance-upload-slot .rights-confirm {
  grid-column: auto;
  border-color: rgba(39, 165, 107, 0.2);
  background: rgba(231, 247, 238, 0.72);
}

body.is-performance-mode .performance-range-slot {
  grid-column: 1 / -1;
  display: grid;
  min-width: 0;
}

body.is-performance-mode .performance-range-slot .measure-range-field {
  margin: 0;
  border: 1px solid rgba(40, 78, 104, 0.14);
  border-radius: 8px;
  background: rgba(247, 252, 253, 0.86);
  padding: 12px;
  box-shadow: none;
}

body.is-performance-mode .performance-range-slot .measure-range-field > span {
  color: #0c7582;
  font-size: 13px;
  font-weight: 950;
}

body.is-performance-mode .performance-sound-box {
  display: grid;
  gap: 12px;
  padding: 14px;
}

body.is-performance-mode .performance-sound-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

body.is-performance-mode .performance-sound-head small {
  color: #607086;
  font-size: 13px;
  font-weight: 800;
}

body.is-performance-mode .performance-sound-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.is-performance-mode .performance-sound-option {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid rgba(40, 78, 104, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  padding: 13px;
}

body.is-performance-mode .performance-sound-option.is-main {
  border-color: rgba(31, 184, 201, 0.32);
  background: linear-gradient(135deg, rgba(232, 251, 253, 0.94), rgba(255, 255, 255, 0.74));
}

body.is-performance-mode .performance-sound-option b {
  color: #102033;
  font-size: 17px;
}

body.is-performance-mode .performance-video-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

body.is-performance-mode .performance-video-copy {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

body.is-performance-mode .performance-video-preview {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid rgba(40, 78, 104, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 28%, rgba(31, 184, 201, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(10, 45, 66, 0.96), rgba(7, 25, 35, 0.96));
}

body.is-performance-mode .performance-video-preview .stage {
  width: 100%;
  min-height: 430px;
  height: min(56vh, 540px);
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

body.is-performance-mode .performance-video-preview #camera,
body.is-performance-mode .performance-video-preview #camera.is-upload {
  object-fit: contain;
}

body.is-performance-mode .performance-video-preview .status-panel {
  top: 12px;
  left: 12px;
  right: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.is-performance-mode .performance-video-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #dff9ff 0%, #7dd9ec 46%, #349ad7 100%);
}

body.is-performance-mode .performance-pose-person {
  position: absolute;
  left: 34%;
  top: 34%;
  width: 90px;
  height: 138px;
  border-radius: 44px 44px 26px 26px;
  background: linear-gradient(180deg, #ffd28b 0 34%, #2e93e0 35% 72%, #1e5ead 73%);
  box-shadow: 0 18px 0 rgba(16, 32, 51, 0.14);
}

body.is-performance-mode .performance-pose-person::before {
  content: "";
  position: absolute;
  left: 22px;
  top: -42px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffd28b;
}

body.is-performance-mode .performance-tracking-line {
  position: absolute;
  width: 180px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 214, 76, 0.82);
  box-shadow: 0 0 24px rgba(255, 214, 76, 0.44);
}

body.is-performance-mode .performance-tracking-line.left {
  left: 24%;
  top: 38%;
  transform: rotate(-8deg);
}

body.is-performance-mode .performance-tracking-line.right {
  right: 22%;
  top: 40%;
  transform: rotate(6deg);
}

body.is-performance-mode .performance-tracking-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: #49ef9f;
  box-shadow: 0 0 24px rgba(73, 239, 159, 0.78);
}

body.is-performance-mode .performance-tracking-dot.wrist-left {
  left: 29%;
  top: 36%;
}

body.is-performance-mode .performance-tracking-dot.wrist-right {
  right: 28%;
  top: 39%;
}

body.is-performance-mode .performance-analysis-hud {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  gap: 6px;
  min-width: 260px;
  border-radius: 8px;
  background: rgba(13, 52, 68, 0.82);
  color: #fff;
  padding: 14px;
}

body.is-performance-mode .performance-analysis-hud strong {
  font-size: 16px;
}

body.is-performance-mode .performance-analysis-hud span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

body.is-performance-mode .performance-scan-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

body.is-performance-mode .performance-scan-bar::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3fd7e4, #7effbb);
  animation: progressPulse 1.8s ease-in-out infinite alternate;
}

@keyframes progressPulse {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(138%);
  }
}

body.is-performance-mode .performance-video-caption-row {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

body.is-performance-mode .performance-video-caption-row span {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

body.is-performance-mode .performance-model-slot:empty {
  display: none;
}

body.is-performance-mode .performance-model-slot .model-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

body.is-performance-mode .performance-model-slot .model-status span {
  color: #0c7582;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

body.is-performance-mode .performance-model-slot .model-status p {
  margin: 0;
  color: #607086;
  font-size: 13px;
  line-height: 1.4;
}

body.is-performance-mode .performance-model-slot .model-status button {
  grid-row: 1 / span 2;
  grid-column: 2;
}

body.is-performance-mode .performance-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

body.is-performance-mode .performance-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.is-performance-mode .performance-chip {
  border-radius: 999px;
  background: rgba(224, 246, 248, 0.86);
  color: #0c7582;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 950;
}

body.is-performance-mode .performance-action-slot {
  display: flex;
  gap: 10px;
  min-width: min(320px, 100%);
}

body.is-performance-mode .performance-action-slot button {
  flex: 1;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
}

body.is-performance-mode .performance-action-slot #analyzeButton {
  background: linear-gradient(180deg, #31d2df, #15aebe);
  color: #06242a;
  box-shadow: 0 14px 36px rgba(21, 174, 190, 0.24);
}

body.is-performance-mode .performance-action-slot #resetAnalysisButton {
  border: 1px solid rgba(40, 78, 104, 0.16);
  background: rgba(255, 255, 255, 0.62);
  color: #102033;
}

body.is-performance-mode .performance-tech-details {
  padding: 12px;
}

body.is-performance-mode .performance-tech-details summary {
  cursor: pointer;
  color: #0c7582;
  font-weight: 950;
}

body.is-performance-mode .performance-tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

body.is-performance-mode .performance-tech-grid > div {
  min-width: 0;
}

body.is-performance-mode .performance-tech-grid .note-field,
body.is-performance-mode .performance-tech-grid .measure-range-field,
body.is-performance-mode .performance-tech-grid .file-field,
body.is-performance-mode .performance-tech-grid .backend-status,
body.is-performance-mode .performance-tech-grid .technical-details-panel,
body.is-performance-mode .performance-tech-grid .camera-guide {
  margin: 0;
  border: 1px solid rgba(40, 78, 104, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  padding: 10px;
  box-shadow: none;
}

body.is-performance-mode .performance-result-panel .performance-panel-body {
  gap: 12px;
}

body.is-performance-mode .performance-result-panel .analysis-progress-main,
body.is-performance-mode .performance-result-panel .analysis-report,
body.is-performance-mode .performance-result-panel .auto-save-status,
body.is-performance-mode .performance-result-panel #evidencePanel,
body.is-performance-mode .performance-result-panel #basicInfoPanel,
body.is-performance-mode .performance-result-panel #teacherFeedbackPanel {
  border: 1px solid rgba(40, 78, 104, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: none;
}

body.is-performance-mode .performance-result-panel .analysis-report {
  min-height: 260px;
}

body.is-performance-mode .performance-result-panel .analysis-report > span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: rgba(224, 246, 248, 0.86);
  padding: 7px 11px;
}

@media (max-width: 1120px) {
  body.is-performance-mode .performance-workspace-grid {
    grid-template-columns: 1fr;
  }

  body.is-performance-mode .performance-result-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  body.is-performance-mode .performance-material-card,
  body.is-performance-mode .performance-sound-options,
  body.is-performance-mode .performance-tech-grid {
    grid-template-columns: 1fr;
  }

  body.is-performance-mode .performance-video-copy,
  body.is-performance-mode .performance-sound-head,
  body.is-performance-mode .performance-status-row {
    align-items: stretch;
    flex-direction: column;
  }

  body.is-performance-mode .performance-action-slot,
  body.is-performance-mode .performance-action-slot button {
    width: 100%;
  }

  body.is-performance-mode .performance-video-preview,
  body.is-performance-mode .performance-video-preview .stage {
    min-height: 320px;
    height: 52vh;
  }
}

/* v46: Performance Analysis is now split into Sound, Motion, and Live MIDI modules. */
body.is-performance-mode .performance-workspace-grid[hidden] {
  display: none;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser {
  min-height: min(58vh, 560px);
  align-items: stretch;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card {
  min-height: 260px;
  padding: clamp(22px, 3vw, 34px);
  align-content: center;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card strong {
  font-size: clamp(28px, 3vw, 40px);
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card p {
  font-size: clamp(15px, 1.4vw, 18px);
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="sound"] .performance-video-card {
  display: none;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="motion"] .performance-score-card,
body.is-performance-mode .performance-workspace-shell[data-performance-module="motion"] .performance-sound-box,
body.is-performance-mode .performance-workspace-shell[data-performance-module="motion"] .performance-tech-details {
  display: none;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="motion"] .performance-video-card {
  display: grid;
  min-height: 560px;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="motion"] .performance-video-preview {
  min-height: 460px;
}

@media (max-width: 980px) {
  body.is-performance-mode .performance-module-chooser {
    grid-template-columns: 1fr;
  }

  body.is-performance-mode .performance-module-card {
    min-height: auto;
  }
}

/* v48: keep the Performance Analysis landing cards equal and readable. */
body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: clamp(16px, 2vw, 24px);
  min-height: auto;
  margin-top: clamp(10px, 2vw, 22px);
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card {
  width: 100%;
  min-width: 0;
  min-height: clamp(240px, 31vh, 340px);
  justify-self: stretch;
  align-self: stretch;
  align-content: center;
  justify-items: start;
  padding: clamp(24px, 3vw, 38px);
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

body.is-performance-mode .performance-module-test-link {
  background: linear-gradient(135deg, rgba(21, 122, 134, 0.96), rgba(31, 122, 246, 0.84));
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card strong {
  max-width: 100%;
  font-size: clamp(30px, 2.7vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
  white-space: normal;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card p {
  max-width: 24em;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card span {
  font-size: 13px;
}

@media (max-width: 1180px) {
  body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card {
    min-height: 190px;
  }
}

@media (max-width: 760px) {
  body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser,
  body.is-performance-mode .performance-module-chooser,
  body.is-performance-mode .performance-workspace-shell:not([data-performance-module="overview"]) .performance-module-chooser {
    grid-template-columns: 1fr;
  }
}

/* v58: keep the Performance Analysis chooser balanced on desktop, iPad, and WeChat browsers. */
body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser {
  width: min(1120px, 100%);
  margin: clamp(16px, 3vw, 28px) auto 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  grid-auto-rows: 1fr;
  gap: clamp(14px, 2vw, 22px);
  min-height: 0;
  align-items: stretch;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card {
  min-height: clamp(190px, 24vh, 260px);
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  justify-items: start;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
  overflow: hidden;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card strong {
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.05;
  max-width: 9em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card p {
  max-width: 22em;
  font-size: clamp(15px, 1.45vw, 19px);
  line-height: 1.55;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card span {
  font-size: 13px;
  line-height: 1;
}

@media (max-width: 900px) {
  body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card {
    min-height: 172px;
    padding: 20px;
  }

  body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-card strong {
    font-size: clamp(26px, 5vw, 38px);
  }
}

@media (max-width: 620px) {
  body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser {
    grid-template-columns: 1fr;
  }
}

/* v86: once a Performance Analysis submodule is open, keep only the return controls. */
body.is-performance-mode .performance-workspace-shell:not([data-performance-module="overview"]) .performance-module-chooser {
  display: none;
}

/* v101: Performance Analysis is organized as three parent categories with two child paths each. */
body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser {
  width: min(1280px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
}

body.is-performance-mode .performance-module-group {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-width: 0;
  min-height: clamp(410px, 54vh, 560px);
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid rgba(40, 78, 104, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 253, 254, 0.64)),
    rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 18px 44px rgba(24, 57, 82, 0.08);
}

body.is-performance-mode .performance-module-group-head {
  display: grid;
  gap: 8px;
}

body.is-performance-mode .performance-module-group-head span {
  width: fit-content;
  border-radius: 999px;
  background: rgba(224, 246, 248, 0.92);
  color: #0c7582;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 950;
}

body.is-performance-mode .performance-module-group-head strong {
  color: #102033;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.15;
}

body.is-performance-mode .performance-module-group-head p {
  margin: 0;
  color: #607086;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

body.is-performance-mode .performance-submodule-list {
  display: grid;
  gap: 12px;
  align-content: stretch;
}

body.is-performance-mode .performance-submodule-card,
body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-submodule-card {
  min-height: 0;
  padding: clamp(16px, 1.8vw, 22px);
  align-content: start;
  grid-template-rows: auto auto 1fr;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-submodule-card strong {
  font-size: clamp(22px, 2.3vw, 34px);
  max-width: 100%;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-submodule-card p {
  max-width: 22em;
  font-size: clamp(14px, 1.1vw, 16px);
}

body.is-performance-mode .performance-module-card-disabled {
  cursor: default;
  opacity: 0.72;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.56);
}

body.is-performance-mode .performance-module-card-disabled span {
  background: rgba(236, 242, 247, 0.92);
  color: #607086;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="sound-midi"] .performance-video-card,
body.is-performance-mode .performance-workspace-shell[data-performance-module="sound-basic-pitch"] .performance-video-card {
  display: none;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="sound-midi"] .performance-basic-pitch-option,
body.is-performance-mode .performance-workspace-shell[data-performance-module="sound-basic-pitch"] .performance-midi-option {
  display: none;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="sound-midi"] .performance-sound-options,
body.is-performance-mode .performance-workspace-shell[data-performance-module="sound-basic-pitch"] .performance-sound-options {
  grid-template-columns: 1fr;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="motion-video"] .performance-score-card,
body.is-performance-mode .performance-workspace-shell[data-performance-module="motion-video"] .performance-sound-box,
body.is-performance-mode .performance-workspace-shell[data-performance-module="motion-video"] .performance-tech-details {
  display: none;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="motion-video"] .performance-video-card {
  display: grid;
  min-height: 560px;
}

body.is-performance-mode .performance-workspace-shell[data-performance-module="motion-video"] .performance-video-preview {
  min-height: 460px;
}

@media (max-width: 1100px) {
  body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body.is-performance-mode .performance-workspace-shell[data-performance-module="overview"] .performance-module-chooser {
    grid-template-columns: 1fr;
  }

  body.is-performance-mode .performance-module-group {
    min-height: 0;
  }
}
