/* FEOS professional learning workspace */

:root {
  color-scheme: light;
  --navy-950: #07152e;
  --navy-900: #0b1d3a;
  --navy-800: #10294e;
  --navy-700: #173966;
  --blue-600: #2368d7;
  --blue-500: #3479e8;
  --blue-100: #e9f2ff;
  --gold-500: #f1b84b;
  --gold-100: #fff5d8;
  --green-600: #188866;
  --green-100: #e8f8f2;
  --red-600: #c84d5c;
  --ink-900: #14213d;
  --ink-700: #43506a;
  --ink-500: #6e7890;
  --line: #dfe6f0;
  --surface: #ffffff;
  --surface-soft: #f5f7fb;
  --surface-blue: #f2f7ff;
  --shadow-sm: 0 8px 24px rgba(18, 36, 69, 0.07);
  --shadow-md: 0 18px 48px rgba(18, 36, 69, 0.12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --sidebar-width: 250px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-soft);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink-900);
  background: var(--surface-soft);
  line-height: 1.5;
}

button,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(52, 121, 232, 0.32);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 26px 20px 22px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 5%, rgba(52, 121, 232, 0.3), transparent 30%),
    linear-gradient(180deg, var(--navy-950), #0a2143 62%, #0c2d55);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 38px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  color: var(--navy-950);
  background: linear-gradient(145deg, #ffe8a8, var(--gold-500));
  box-shadow: 0 10px 30px rgba(241, 184, 75, 0.25);
  font-size: 21px;
  font-weight: 900;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.07em;
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.primary-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 650;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.nav-item.active {
  color: #fff;
  background: rgba(52, 121, 232, 0.25);
  box-shadow: inset 3px 0 0 var(--gold-500);
}

.nav-item > span:first-child {
  display: grid;
  place-items: center;
  width: 24px;
  font-size: 18px;
}

.sidebar-spacer {
  flex: 1;
}

.learner-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.learner-avatar,
.header-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--blue-500), #6e56cf);
  font-weight: 800;
}

.learner-avatar {
  width: 38px;
  height: 38px;
}

.learner-card div:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.learner-card strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learner-card span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.main-content {
  min-width: 0;
  padding: 0 36px 32px;
}

.workspace-header {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.workspace-header h1 {
  margin: 2px 0 0;
  font-size: clamp(24px, 3vw, 33px);
  letter-spacing: -0.035em;
}

.workspace-kicker,
.section-kicker {
  margin: 0;
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.language-control select {
  min-height: 42px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-700);
  background: var(--surface);
  font-weight: 650;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-700);
  background: var(--surface);
  font-size: 19px;
}

.header-avatar {
  width: 42px;
  height: 42px;
}

.course-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, 0.75fr);
  min-height: 290px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 75% 20%, rgba(86, 145, 255, 0.34), transparent 33%),
    linear-gradient(120deg, var(--navy-950), #123b72 70%, #1d5994);
  box-shadow: var(--shadow-md);
}

.course-hero::after {
  position: absolute;
  right: -80px;
  bottom: -150px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  content: "";
}

.course-hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 42px;
}

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

.course-badge {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff8df;
  background: rgba(241, 184, 75, 0.15);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.course-badge.subtle {
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.07);
}

.course-hero h2 {
  max-width: 630px;
  margin: 20px 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.07;
  letter-spacing: -0.045em;
}

.course-hero p {
  max-width: 600px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
}

.hero-progress-row {
  display: grid;
  max-width: 570px;
  grid-template-columns: 155px minmax(120px, 1fr);
  align-items: end;
  gap: 20px;
  margin-top: 32px;
}

.hero-progress-row > div:first-child {
  display: flex;
  flex-direction: column;
}

.hero-progress-row span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.hero-progress-row strong {
  margin-top: 2px;
  font-size: 13px;
}

.hero-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.hero-progress-track span {
  display: block;
  width: 4%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-500), #fff0a4);
}

.course-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 270px;
}

.piano-illustration {
  position: relative;
  z-index: 2;
  width: min(82%, 350px);
  padding: 15px 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: linear-gradient(150deg, #07111f, #182a45);
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.34);
  transform: rotate(-4deg);
}

.piano-top {
  display: flex;
  height: 80px;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.33);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.25em;
}

.piano-keys {
  display: grid;
  height: 85px;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
}

.piano-keys i {
  position: relative;
  border-radius: 2px 2px 6px 6px;
  background: linear-gradient(#fff, #dce4ed);
}

.piano-keys i:nth-child(2)::before,
.piano-keys i:nth-child(3)::before,
.piano-keys i:nth-child(5)::before,
.piano-keys i:nth-child(6)::before,
.piano-keys i:nth-child(7)::before {
  position: absolute;
  z-index: 2;
  top: 0;
  left: -30%;
  width: 55%;
  height: 55px;
  border-radius: 0 0 4px 4px;
  background: #09121f;
  content: "";
}

.music-orbit {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--gold-500);
  background: rgba(4, 17, 37, 0.52);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.orbit-one {
  top: 36px;
  right: 42px;
  width: 56px;
  height: 56px;
  font-size: 25px;
}

.orbit-two {
  bottom: 35px;
  left: 26px;
  width: 44px;
  height: 44px;
  font-size: 19px;
}

.learning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 330px);
  gap: 24px;
  margin-top: 26px;
}

.learning-main,
.learning-rail {
  display: grid;
  align-content: start;
  gap: 22px;
}

.learning-main,
.lesson-workspace {
  min-width: 0;
}

.panel {
  border: 1px solid rgba(214, 224, 238, 0.86);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.curriculum-panel,
.lesson-workspace,
.teacher-panel,
.connection-panel,
.note-card {
  padding: 25px;
}

.panel-heading,
.lesson-heading,
.mini-panel-heading,
.connection-heading,
.simulation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading h2,
.lesson-heading h2,
.teacher-panel h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.panel-description {
  margin: 10px 0 20px;
  color: var(--ink-500);
  font-size: 14px;
}

.module-status,
.lesson-number,
.simulation-tag,
.ai-status,
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.module-status,
.lesson-number {
  color: var(--blue-600);
  background: var(--blue-100);
}

.lesson-library {
  display: grid;
  gap: 12px;
}

.lesson-choice-button {
  display: grid;
  width: 100%;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink-900);
  text-align: left;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.lesson-choice-button:hover {
  border-color: #b8cdf2;
  background: #fbfdff;
  box-shadow: 0 10px 26px rgba(35, 104, 215, 0.09);
  transform: translateY(-1px);
}

.lesson-choice-button.selected {
  border-color: rgba(35, 104, 215, 0.55);
  background: linear-gradient(90deg, var(--surface-blue), #fff);
  box-shadow: inset 4px 0 0 var(--blue-600);
}

.lesson-index {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  color: var(--blue-600);
  background: var(--blue-100);
  font-size: 12px;
  font-weight: 900;
}

.lesson-choice-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.lesson-meta {
  margin-bottom: 2px;
  color: var(--ink-500);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lesson-choice-content strong {
  font-size: 15px;
}

.lesson-choice-content small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-500);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 800;
}

.lesson-state b {
  font-size: 16px;
}

.teacher-stage {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 22px 0;
  padding: 20px;
  border: 1px solid #dce8f8;
  border-radius: 17px;
  background:
    radial-gradient(circle at 8% 50%, rgba(52, 121, 232, 0.11), transparent 25%),
    linear-gradient(100deg, #f6faff, #fff);
}

.teacher-stage.lesson-feedback-success {
  border-color: #86cda8;
  box-shadow: 0 0 0 3px rgba(51, 168, 108, 0.12);
}

.teacher-stage.lesson-feedback-retry {
  border-color: #e7ad55;
  background: #fff8e9;
  box-shadow: 0 0 0 3px rgba(231, 173, 85, 0.14);
}

.teacher-stage.lesson-feedback-success .teacher-face {
  background: #2fa86a;
}

.teacher-stage.lesson-feedback-retry .teacher-face {
  background: #d98b21;
}

.teacher-character {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
}

.teacher-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #dfeeff, #f4e8ff);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.55);
}

.teacher-face {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--blue-500), #7657d5);
  font-size: 24px;
}

.teacher-message span {
  color: var(--blue-600);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.teacher-message p {
  margin: 5px 0 0;
  color: var(--ink-700);
  font-size: 16px;
  font-weight: 560;
}

.lesson-progress-area {
  margin: 20px 0;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 700;
}

.lesson-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf4;
}

.lesson-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-600), #6b8df2);
  transition: width 280ms ease;
}

.lesson-actions,
.simulation-actions,
.connection-actions,
.teacher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.simulation-button,
.ask-teacher-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border-radius: 12px;
  font-weight: 800;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.primary-button,
.ask-teacher-button {
  border: 1px solid var(--blue-600);
  color: #fff;
  background: linear-gradient(145deg, var(--blue-500), var(--blue-600));
  box-shadow: 0 9px 20px rgba(35, 104, 215, 0.2);
}

.primary-button:hover:not(:disabled),
.ask-teacher-button:hover:not(:disabled) {
  box-shadow: 0 12px 26px rgba(35, 104, 215, 0.28);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink-700);
  background: #fff;
}

.secondary-button:hover:not(:disabled) {
  border-color: #bed0ec;
  background: var(--surface-blue);
}

.full-width {
  width: 100%;
}

.simulation-panel {
  margin-top: 21px;
  padding: 18px;
  border: 1px dashed #c8d9ee;
  border-radius: 15px;
  background: #f9fbfe;
}

.simulation-heading {
  margin-bottom: 13px;
}

.simulation-heading > div {
  display: flex;
  flex-direction: column;
}

.simulation-heading strong {
  margin-top: 3px;
  font-size: 14px;
}

.simulation-tag {
  color: var(--ink-500);
  background: #eef2f7;
}

.simulation-button {
  border: 1px solid #cbd9ec;
  color: var(--navy-800);
  background: #fff;
}

.simulation-button:hover {
  border-color: var(--blue-500);
  color: var(--blue-600);
  background: var(--surface-blue);
}

.reward-panel {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 21px;
  padding: 17px;
  border: 1px solid #f1d78e;
  border-radius: 15px;
  background: linear-gradient(90deg, var(--gold-100), #fffdf7);
}

.reward-panel[hidden] {
  display: none;
}

.reward-star {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #f5c65f, #e39b20);
  box-shadow: 0 8px 20px rgba(227, 155, 32, 0.22);
  font-size: 23px;
}

.reward-panel > div:last-child {
  display: flex;
  flex-direction: column;
}

.reward-panel span {
  color: #9b6d18;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.reward-panel strong {
  margin-top: 2px;
}

.teacher-panel-heading {
  align-items: center;
}

.ai-status {
  color: var(--green-600);
  background: var(--green-100);
}

.ai-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 4px rgba(24, 136, 102, 0.12);
}

.teacher-composer {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.teacher-composer:focus-within {
  border-color: rgba(35, 104, 215, 0.58);
  box-shadow: 0 0 0 4px rgba(35, 104, 215, 0.08);
}

.teacher-composer textarea {
  display: block;
  width: 100%;
  min-height: 95px;
  resize: vertical;
  padding: 16px;
  border: 0;
  outline: 0;
  color: var(--ink-900);
  background: transparent;
  line-height: 1.55;
}

.teacher-composer textarea::placeholder {
  color: #98a3b6;
}

.teacher-actions {
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-top: 1px solid #edf1f6;
  background: #fbfcfe;
}

.privacy-hint {
  padding-left: 5px;
  color: var(--ink-500);
  font-size: 10px;
  font-weight: 700;
}

.ask-teacher-button {
  min-height: 39px;
  font-size: 12px;
}

.teacher-answer {
  min-height: 74px;
  margin-top: 15px;
  padding: 16px 17px;
  border: 1px solid #e1e8f2;
  border-radius: 14px;
  color: var(--ink-700);
  background: var(--surface-blue);
  white-space: pre-wrap;
}

.answer-placeholder {
  color: #8d98ab;
  font-size: 13px;
}

.connection-panel {
  position: relative;
  overflow: hidden;
}

.connection-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 90px;
  border-radius: 0 0 0 100%;
  background: rgba(35, 104, 215, 0.05);
  content: "";
}

.connection-heading {
  position: relative;
  z-index: 1;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.status-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  color: var(--blue-600);
  background: var(--blue-100);
  font-size: 20px;
}

.status-card.connected .status-icon {
  color: var(--green-600);
  background: var(--green-100);
}

.status-card.error .status-icon {
  color: var(--red-600);
  background: #fff0f2;
}

.connection-label {
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.connection-panel h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 18px;
}

.connection-panel p {
  position: relative;
  z-index: 1;
  margin: 8px 0 18px;
  color: var(--ink-500);
  font-size: 13px;
}

.connection-actions {
  position: relative;
  z-index: 1;
}

.mini-panel-heading {
  align-items: center;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-dot {
  padding: 5px 8px;
  color: var(--green-600);
  background: var(--green-100);
}

.note-name {
  margin-top: 16px;
  color: var(--navy-900);
  font-size: 48px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.04em;
}

.note-details {
  margin-top: 7px;
  color: var(--ink-500);
  font-size: 12px;
}

.diagnostic-panel {
  overflow: hidden;
}

.diagnostic-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px;
  cursor: pointer;
  list-style: none;
}

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

.diagnostic-panel summary > span:first-child {
  display: flex;
  flex-direction: column;
}

.diagnostic-panel summary b {
  font-size: 13px;
}

.diagnostic-panel summary small {
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 10px;
}

.capability-grid,
.event-log {
  margin: 0;
  border-top: 1px solid var(--line);
}

.capability-grid {
  display: grid;
  gap: 8px;
  padding: 15px 18px 18px;
}

.capability {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 11px;
}

.yes {
  color: var(--green-600);
}

.no {
  color: var(--red-600);
}

.log-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
}

.text-button {
  border: 0;
  color: var(--blue-600);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.event-log {
  max-height: 230px;
  overflow: auto;
  padding: 12px 18px 18px 36px;
  color: var(--ink-500);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.event-log li + li {
  margin-top: 7px;
}

.learning-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 17px;
  border: 1px solid #f0d893;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff9e8, #fffdf8);
}

.tip-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #8c6319;
  background: #f8d875;
  font-family: Georgia, serif;
  font-weight: 900;
}

.learning-tip strong {
  font-size: 12px;
}

.learning-tip p {
  margin: 3px 0 0;
  color: #7d6a43;
  font-size: 11px;
}

.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 3px 0;
  color: var(--ink-500);
  font-size: 10px;
}

.workspace-footer p {
  margin: 0;
}

@media (max-width: 1120px) {
  :root {
    --sidebar-width: 210px;
  }

  .main-content {
    padding-right: 24px;
    padding-left: 24px;
  }

  .learning-layout {
    grid-template-columns: minmax(0, 1fr) 285px;
  }

  .course-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  }
}

@media (max-width: 900px) {
  .feos-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 13px 18px;
  }

  .brand {
    margin: 0;
  }

  .brand-copy small {
    display: none;
  }

  .primary-nav {
    display: flex;
    margin-left: auto;
  }

  .nav-item {
    padding: 10px;
  }

  .nav-item span:last-child {
    display: none;
  }

  .sidebar-spacer,
  .learner-card {
    display: none;
  }

  .main-content {
    padding: 0 20px 28px;
  }

  .learning-layout {
    grid-template-columns: 1fr;
  }

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

  .learning-tip {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .workspace-header {
    min-height: 76px;
  }

  .workspace-header h1 {
    font-size: 24px;
  }

  .icon-button {
    display: none;
  }

  .language-control select {
    width: 130px;
  }

  .course-hero {
    display: block;
    min-height: auto;
  }

  .course-hero-content {
    padding: 30px 25px;
  }

  .course-hero h2 {
    font-size: 34px;
  }

  .course-visual {
    min-height: 210px;
    padding-bottom: 25px;
  }

  .piano-illustration {
    width: min(78%, 350px);
  }

  .hero-progress-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .learning-rail {
    grid-template-columns: 1fr;
  }

  .lesson-choice-button {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .lesson-state {
    display: none;
  }

  .lesson-choice-content small {
    white-space: normal;
  }

  .teacher-stage {
    grid-template-columns: 60px minmax(0, 1fr);
    padding: 16px;
  }

  .teacher-character {
    width: 55px;
    height: 55px;
  }

  .teacher-face {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .workspace-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 470px) {
  .main-content {
    padding-right: 13px;
    padding-left: 13px;
  }

  .brand-copy {
    display: none;
  }

  .primary-nav {
    width: 100%;
    justify-content: flex-end;
  }

  .curriculum-panel,
  .lesson-workspace,
  .teacher-panel,
  .connection-panel,
  .note-card {
    padding: 19px;
  }

  .course-hero-content {
    padding: 25px 20px;
  }

  .course-hero h2 {
    font-size: 29px;
  }

  .lesson-actions,
  .simulation-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .lesson-actions button,
  .simulation-actions button {
    width: 100%;
  }

  .teacher-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .privacy-hint {
    display: none;
  }

  .ask-teacher-button {
    width: 100%;
  }

  .panel-heading,
  .lesson-heading {
    align-items: flex-start;
  }
}
.lesson-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.lesson-navigation > span {
  color: var(--muted-text, #66738f);
  font-weight: 700;
  text-align: center;
}

@media (max-width: 640px) {
  .lesson-navigation { flex-wrap: wrap; }
  .lesson-navigation > span { order: -1; width: 100%; }
}

/* FEOS module-aware Piano Adventure navigation */

.module-library {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.module-choice-button {
  display: grid;
  grid-template-columns:
    52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink-900);
  background:
    linear-gradient(
      145deg,
      #ffffff,
      var(--surface-blue)
    );
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.module-choice-button:hover,
.module-choice-button:focus-visible {
  border-color: var(--blue-600);
  box-shadow:
    0 14px 34px
    rgba(35, 104, 215, 0.14);
  transform: translateY(-2px);
}

.module-choice-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  color: var(--blue-600);
  background: var(--blue-100);
  font-weight: 900;
}

.module-choice-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.module-choice-content strong {
  font-size: 18px;
}

.module-choice-content small {
  color: var(--ink-500);
  line-height: 1.5;
}

.module-choice-progress {
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 800;
}

.module-choice-action {
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.panel-heading-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

  .module-choice-button {
    grid-template-columns:
      44px minmax(0, 1fr);
  }

  .module-choice-number {
    width: 44px;
    height: 44px;
  }

  .module-choice-action {
    grid-column: 2;
  }

  .panel-heading-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }
}
