:root {
  color-scheme: light;
  --ink: #282828;
  --muted: rgba(40, 38, 34, .66);
  --line: rgba(40, 34, 24, .10);
  --line-strong: rgba(168, 134, 63, .32);
  --canvas: #F4EFE3;
  --surface: #FFFFFF;
  --surface-soft: #F7F1E6;
  --forest: #A8863F;
  --forest-2: #A8863F;
  --mint: rgba(168, 134, 63, .12);
  --lime: #DDCBA4;
  --amber: #BC7E29;
  --danger: #B85443;
  --shadow: 0 12px 34px rgb(40 34 24 / 8%);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: rgba(255, 255, 255, .94);
  --muted: rgba(255, 255, 255, .74);
  --line: rgba(221, 203, 164, .14);
  --line-strong: rgba(221, 203, 164, .28);
  --canvas: #201d19;
  --surface: #2b2823;
  --surface-soft: #332f28;
  --forest: #DDCBA4;
  --forest-2: #a1823f;
  --mint: rgba(221, 203, 164, .13);
  --shadow: 0 18px 48px rgb(0 0 0 / 28%);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.training-ribbon {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #152018;
  background: linear-gradient(90deg, #C2A868, #DDCBA4);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .095em;
  text-transform: uppercase;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #2b663e; box-shadow: 0 0 0 4px rgb(43 102 62 / 16%); }

.loading-screen, .error-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 48px;
  text-align: center;
  background: radial-gradient(circle at 50% 35%, #e5f2e9, var(--canvas) 43%);
}
.loading-screen img, .error-screen img { filter: drop-shadow(0 12px 18px rgb(23 60 47 / 22%)); }
.loading-screen div { display: grid; gap: 6px; }
.loading-screen strong { font-size: 21px; }
.loading-screen span, .error-screen p { color: var(--muted); }
.error-screen h1 { margin: 0; max-width: 560px; font-size: clamp(28px, 5vw, 44px); }
.error-screen p { max-width: 560px; line-height: 1.6; }

.academy-shell { min-height: 100vh; padding-top: 30px; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 30px auto 0 0;
  width: 232px;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  color: var(--ink);
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
  overflow: auto;
}
.brand { display: flex; align-items: center; gap: 12px; margin: 0 7px 28px; }
.brand img { border-radius: 13px; background: #fff; padding: 3px; }
.brand div { display: grid; }
.brand span { color: #afc8b8; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.brand strong { font-size: 22px; letter-spacing: -.02em; }

.progress-card { padding: 16px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 16px; background: rgb(255 255 255 / 7%); }
.progress-heading { display: flex; justify-content: space-between; font-size: 13px; }
.progress-heading strong { color: #d6e9a7; }
.progress-track { height: 7px; margin: 12px 0 9px; overflow: hidden; border-radius: 20px; background: rgb(255 255 255 / 12%); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9fc462, #d7e99a); transition: width .35s ease; }
.progress-card small { color: #afc8b8; font-size: 11px; }
.nav-label { margin: 28px 8px 10px; color: #8fa99a; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.chapter-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; counter-reset: chapter; }
.chapter-button {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  color: #cadaD0;
  background: transparent;
  text-align: left;
}
.chapter-button:hover:not(:disabled), .chapter-button.active { color: #fff; background: rgb(255 255 255 / 10%); }
.chapter-button:disabled { opacity: .45; cursor: not-allowed; }
.chapter-number { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 9px; font-size: 11px; font-weight: 800; }
.chapter-button.complete .chapter-number { color: #173c2f; background: #c4df8c; border-color: #c4df8c; }
.chapter-copy { display: grid; gap: 2px; }
.chapter-copy span { font-size: 12px; font-weight: 700; }
.chapter-copy small { color: #8fa99a; font-size: 10px; }
.chapter-state { font-size: 13px; }

.sidebar-footer { margin-top: auto; padding-top: 28px; }
.fictional-company { display: flex; align-items: center; gap: 10px; padding: 13px 9px; border-top: 1px solid rgb(255 255 255 / 10%); }
.company-mark { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; color: #244234; background: #d9e8dc; font-size: 11px; font-weight: 900; }
.fictional-company div { display: grid; gap: 2px; }
.fictional-company small { color: #8fa99a; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.fictional-company strong { font-size: 12px; }
.text-button { width: 100%; padding: 9px; border: 0; color: #94aa9d; background: transparent; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: #fff; }

.workspace { grid-column: 2; min-width: 0; }
.topbar { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 34px 19px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); }
.eyebrow { margin: 0 0 5px; color: #688073; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(25px, 3vw, 34px); font-weight: 500; letter-spacing: -.03em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.environment-time { display: grid; gap: 2px; padding-right: 5px; text-align: right; }
.environment-time span { color: var(--muted); font-size: 10px; }
.environment-time strong { font-size: 11px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); font-size: 19px; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: var(--forest-2); font-weight: 800; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; padding: 22px; }
.simulation-panel, .coach-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.simulation-panel { min-height: calc(100vh - 180px); overflow: hidden; }
.simulation-head { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #42a669; box-shadow: 0 0 0 4px rgb(66 166 105 / 12%); }
.status-badge { padding: 5px 9px; border-radius: 999px; color: #7b5328; background: #f8e7c6; font-size: 9px; }
.simulation { padding: 24px; }

.coach-panel { align-self: start; position: sticky; top: 51px; padding: 22px; }
.coach-title { display: flex; align-items: center; gap: 10px; }
.coach-title img { padding: 2px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.coach-title div { display: grid; }
.coach-title span { color: var(--muted); font-size: 10px; }
.coach-title strong { font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.coach-intro { margin: 20px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.objective-list { display: grid; gap: 9px; }
.objective { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 11px; border-radius: 12px; background: var(--surface-soft); }
.objective-check { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; color: transparent; background: var(--surface); font-size: 11px; }
.objective.complete { background: var(--mint); }
.objective.complete .objective-check { color: #fff; border-color: #438561; background: #438561; }
.objective p { margin: 3px 0 0; font-size: 12px; line-height: 1.4; }
.hint-box { margin-top: 15px; padding: 13px; border-left: 3px solid var(--amber); border-radius: 5px 12px 12px 5px; background: #fff6e7; color: #44351f; }
:root[data-theme="dark"] .hint-box { background: #3c3021; color: #f6dfbd; }
.hint-box span { font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.hint-box p { margin: 5px 0 0; font-size: 12px; line-height: 1.5; }
.safe-note { display: grid; grid-template-columns: 22px 1fr; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.safe-note span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #2c7650; background: var(--mint); font-size: 10px; font-weight: 900; }
.safe-note p { margin: 1px 0 0; font-size: 10px; line-height: 1.5; }

.button { min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 11px; font-size: 12px; font-weight: 750; }
.button.primary { color: #fff; background: var(--forest-2); }
.button.primary:hover { filter: brightness(1.08); }
.button.secondary { color: var(--ink); border-color: var(--line); background: var(--surface); }
.button.danger { color: #fff; background: var(--danger); }
.button.wide { width: 100%; margin-top: 14px; }
.button:disabled { opacity: .5; cursor: default; }

.scene-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 24px; }
.scene-heading h2 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.scene-heading p { max-width: 600px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.scene-tag { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; color: #315a43; background: var(--mint); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 13px; }
.demo-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.demo-card h3 { margin: 0 0 7px; font-size: 14px; }
.demo-card p { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 15px; border-radius: 11px; background: var(--mint); font-size: 17px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 41px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  outline: 0;
  background: var(--surface);
  font-size: 12px;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #5c9676; box-shadow: 0 0 0 3px rgb(92 150 118 / 12%); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .wide-field { grid-column: 1 / -1; }
.check-row { display: flex; gap: 15px; align-items: center; padding: 7px 0; }
.check-row label { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; }

.notification { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.notification-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--mint); }
.notification strong, .notification span { display: block; }
.notification strong { font-size: 12px; }
.notification span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.search-box { display: flex; gap: 8px; margin-bottom: 18px; }
.search-box input { flex: 1; min-width: 0; }
.app-card { position: relative; }
.favorite-button { position: absolute; top: 13px; right: 13px; border: 0; color: #a2aaa5; background: transparent; font-size: 20px; }
.favorite-button.on { color: #e0a72e; }

.chat-shell { border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.chat-head strong { font-size: 13px; }
.chat-messages { display: grid; gap: 13px; padding: 18px; }
.message { max-width: 75%; padding: 12px; border-radius: 4px 13px 13px 13px; background: var(--surface-soft); }
.message.mine { justify-self: end; border-radius: 13px 4px 13px 13px; color: #fff; background: var(--forest-2); }
.message small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 800; }
.message.mine small { color: #c8ded2; }
.message p { margin: 0; font-size: 12px; line-height: 1.5; }
.message-meta { display: flex; gap: 7px; align-items: center; margin-top: 8px; }
.reaction { padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 11px; }
.reply-form { display: flex; gap: 8px; padding: 13px; border-top: 1px solid var(--line); }
.reply-form input { flex: 1; min-width: 0; }

.split-scenes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.meeting-list { display: grid; gap: 10px; }
.meeting { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
.meeting-time { display: grid; place-items: center; min-height: 46px; border-radius: 10px; background: var(--surface-soft); font-size: 13px; font-weight: 800; }
.meeting strong { display: block; font-size: 12px; }
.meeting small { color: var(--muted); font-size: 10px; }
.conflict { color: #9b4d2c; background: #fff0e6; }

.completion { min-height: 460px; display: grid; place-content: center; justify-items: center; text-align: center; }
.completion-medal { display: grid; place-items: center; width: 94px; height: 94px; border: 8px solid #e8f0dd; border-radius: 50%; color: #fff; background: var(--forest-2); box-shadow: 0 18px 36px rgb(36 88 67 / 22%); font-size: 38px; }
.completion h2 { margin: 25px 0 8px; font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.completion p { max-width: 480px; color: var(--muted); line-height: 1.6; }

.toast { position: fixed; z-index: 200; right: 22px; bottom: 22px; max-width: 360px; padding: 13px 16px; border-radius: 12px; color: #fff; background: #183c2f; box-shadow: var(--shadow); font-size: 12px; transform: translateY(120px); opacity: 0; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #8d3834; }

dialog { max-width: 420px; padding: 0; border: 0; border-radius: 18px; color: var(--ink); background: var(--surface); box-shadow: 0 28px 80px rgb(0 0 0 / 25%); }
dialog::backdrop { background: rgb(12 24 18 / 55%); backdrop-filter: blur(3px); }
dialog form { padding: 28px; text-align: center; }
.dialog-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto; border-radius: 50%; background: var(--mint); font-size: 24px; }
dialog h2 { margin: 18px 0 8px; font-family: Georgia, serif; font-weight: 500; }
dialog p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: center; gap: 9px; margin-top: 22px; }

@media (max-width: 1050px) {
  .academy-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .sidebar { width: 230px; }
  .content-grid { grid-template-columns: 1fr; }
  .coach-panel { position: static; }
}

@media (max-width: 760px) {
  .training-ribbon { font-size: 8px; gap: 5px; }
  .academy-shell { display: block; }
  .sidebar { position: static; width: auto; max-height: none; padding: 18px; }
  .brand { margin-bottom: 14px; }
  .sidebar nav, .sidebar-footer { display: none; }
  .workspace { display: block; }
  .topbar { padding: 18px; }
  .environment-time { display: none; }
  .content-grid { padding: 12px; }
  .simulation { padding: 16px; }
  .split-scenes, .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide-field { grid-column: auto; }
  .message { max-width: 92%; }
}

/* Academy reprend volontairement la coquille de Gandalf : ces repères restent
   identiques entre l'environnement fictif et l'application réelle. */
.brand { gap: 10px; margin: 0; padding: 2px 8px 12px; }
.brand-mark { position: relative; width: 28px; height: 28px; display: grid; place-items: center; }
.brand-mark img { width: 42px; height: 42px; margin: -12px 0 0 -8px; border: 0; border-radius: 0; background: none; padding: 0; filter: drop-shadow(0 2px 5px rgb(40 34 24 / 35%)); }
.brand div { display: flex; align-items: baseline; gap: 6px; }
.brand strong { color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.brand span { color: var(--forest); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.shell-search { display: flex; align-items: center; gap: 8px; width: calc(100% - 4px); margin: 0 2px 12px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; color: color-mix(in srgb, var(--ink) 44%, transparent); background: var(--surface); font-size: 12px; text-align: left; }
.shell-search:hover { border-color: var(--line-strong); }
.shell-search kbd { margin-left: auto; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--forest); background: transparent; font: 9.5px ui-monospace, "SF Mono", monospace; }
.landmark-nav { display: grid; gap: 2px; }
.landmark-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; font-size: 13.5px; font-weight: 500; text-align: left; }
.landmark-item:hover:not(:disabled) { color: var(--ink); background: var(--mint); }
.landmark-item.active { color: var(--ink); background: var(--mint); border-color: var(--line-strong); font-weight: 700; }
.landmark-item:disabled { cursor: not-allowed; opacity: .42; }
.landmark-item small { margin-left: -6px; color: color-mix(in srgb, var(--ink) 44%, transparent); font-size: 9px; }
.nav-icon { width: 20px; color: var(--muted); text-align: center; }
.nav-gandalf { width: 28px; height: 28px; margin: -6px -2px -6px -6px; object-fit: contain; }
.nav-badge { display: grid; place-items: center; min-width: 18px; height: 18px; margin-left: auto; padding: 0 5px; border-radius: 9px; color: white; background: var(--danger); font: 800 10px ui-monospace, monospace; }
.shell-separator { position: relative; height: 1px; margin: 13px 14px; background: linear-gradient(90deg, transparent, var(--line-strong) 28%, var(--line-strong) 72%, transparent); }
.shell-separator::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 1px; background: var(--forest); transform: translate(-50%, -50%) rotate(45deg); }

.progress-card { padding: 13px; border-color: var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); }
.progress-heading strong { color: var(--forest); }
.progress-track { background: var(--surface-soft); }
.progress-track span { background: linear-gradient(90deg, #C2A868, #A8863F); }
.progress-card small { color: var(--muted); }
.nav-label { margin: 17px 8px 8px; color: color-mix(in srgb, var(--ink) 44%, transparent); }
.chapter-list { gap: 2px; }
.chapter-button { grid-template-columns: 28px 1fr auto; gap: 8px; padding: 7px 8px; color: var(--muted); border: 1px solid transparent; border-radius: 10px; }
.chapter-button:hover:not(:disabled), .chapter-button.active { color: var(--ink); background: var(--mint); border-color: var(--line-strong); }
.chapter-number { width: 27px; height: 27px; border-color: var(--line-strong); border-radius: 8px; color: var(--forest); }
.chapter-button.complete .chapter-number { color: #fff; border-color: #6E8A63; background: #6E8A63; }
.chapter-copy small { color: color-mix(in srgb, var(--ink) 44%, transparent); }
.sidebar-footer { padding-top: 18px; }
.fictional-company { padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.fictional-company small { color: color-mix(in srgb, var(--ink) 44%, transparent); }
.fictional-company strong { color: var(--ink); }
.company-mark { flex: none; width: 28px; height: 28px; color: var(--forest); background: var(--surface-soft); border: 1px solid var(--line-strong); }
.user-bell { position: relative; margin-left: auto; color: var(--muted); }
.user-bell i { position: absolute; top: -2px; right: -4px; width: 8px; height: 8px; border: 2px solid var(--surface); border-radius: 50%; background: var(--danger); }
.text-button { color: var(--muted); }
.text-button:hover { color: var(--ink); }

.topbar { min-height: 92px; padding: 18px 28px; background: color-mix(in srgb, var(--surface) 92%, transparent); }
.topbar h1, .scene-heading h2, .coach-title strong, .completion h2, dialog h2 { font-family: inherit; font-weight: 750; }
.eyebrow { color: var(--forest); }
.avatar { border-radius: 50%; background: linear-gradient(150deg, #C2A868, #A8863F); }
.button.primary { background: #A8863F; }
.objective.complete .objective-check { border-color: #6E8A63; background: #6E8A63; }
.scene-tag { color: var(--forest); }
.message.mine { background: #A8863F; }
.message.mine small { color: rgba(255,255,255,.75); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px var(--mint); }
.demo-card > input, .demo-card > select, .demo-card > textarea, .search-box input, .reply-form input { min-height: 41px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); outline: 0; background: var(--surface); font-size: 12px; }
.demo-card > textarea { width: 100%; min-height: 90px; resize: vertical; }
.coach-title img { border: 0; background: transparent; filter: drop-shadow(0 2px 5px rgb(40 34 24 / 25%)); }
.mobile-shell-topbar, .mobile-tabbar { display: none; }

@media (max-width: 1050px) and (min-width: 761px) {
  .academy-shell { grid-template-columns: 232px minmax(0, 1fr); }
  .sidebar { width: 232px; }
}

@media (max-width: 760px) {
  .academy-shell { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .mobile-shell-topbar { position: sticky; top: 30px; z-index: 80; display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
  .mobile-shell-topbar strong { font-size: 14px; }
  .mobile-academy-label { color: var(--forest); font-size: 9px; font-weight: 800; text-transform: uppercase; }
  .mobile-shell-topbar button { margin-left: auto; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); }
  .topbar { min-height: 82px; padding: 14px 16px; }
  .topbar h1 { font-size: 23px; }
  .mobile-tabbar { position: fixed; z-index: 95; inset: auto 0 0; display: flex; justify-content: space-around; min-height: 62px; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
  .mobile-tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border: 0; color: color-mix(in srgb, var(--ink) 44%, transparent); background: transparent; font-size: 9px; }
  .mobile-tabbar button span { font-size: 18px; }
  .mobile-tabbar button img { width: 25px; height: 25px; margin: -3px 0 -2px; object-fit: contain; }
  .mobile-tabbar button.active { color: var(--forest); font-weight: 700; }
  .mobile-tabbar button:disabled { opacity: .35; }
}
