:root {
  color-scheme: light;
  --paper: #f1f4f3;
  --surface: #fff;
  --soft: #f5f6f0;
  --ink: #161b18;
  --muted: #5c645d;
  --line: #e0e3d9;
  --lime: #def578;
  --lime-light: #eef6d0;
  --forest: #29462f;
  --error: #8d3331;
  --night: #111e2e;
  --radius: 19px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 300px;
  min-height: 100vh;
  background: var(--paper);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #2c6a42; outline-offset: 3px; }
h1, h2, h3, p, ul { margin: 0; }
a { color: inherit; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: middle; }
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 10; transform: translateY(-150%); border-radius: 8px; background: white; padding: 12px; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); overflow: hidden; white-space: nowrap; border: 0; }
.loading-screen { min-height: 100dvh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.brand-dot { display: inline-block; width: 12px; height: 12px; background: var(--forest); border-radius: 50%; box-shadow: 0 0 0 5px var(--lime-light); }
.app-shell { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; align-self: start; top: 0; min-height: 100dvh; display: flex; flex-direction: column; padding: 25px 17px 17px; z-index: 2; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 0 44px 7px; padding: 0; color: var(--ink); background: none; border: 0; text-align: left; letter-spacing: -.45px; font-size: 17px; font-weight: 780; line-height: 1.08; }
.brand-mark { display: grid; width: 39px; height: 39px; place-items: center; color: currentColor; }
.brand-mark .icon { width: 22px; height: 22px; }
.brand small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); font-weight: 580; letter-spacing: .03em; }
.nav-label { margin: 0 0 9px 10px; color: #626a60; font-size: 10px; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-button { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 43px; padding: 0 10px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--muted); font-size: 13px; font-weight: 680; text-align: left; }
.nav-button:hover { color: var(--ink); background: var(--soft); }
.nav-button[aria-current="page"] { color: var(--ink); font-weight: 770; }
.nav-button[aria-current="page"]::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #486753; }
.sidebar-bottom { margin-top: auto; padding-top: 32px; }
.identity { display: flex; gap: 9px; align-items: center; min-width: 0; padding: 10px 7px; border-top: 1px solid var(--line); }
.avatar { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #dfe7d3; color: #324b37; font-weight: 760; }
.avatar.demo { background: var(--lime-light); }
.identity-text { min-width: 0; flex: 1 1 auto; line-height: 1.2; }
.identity-text strong, .identity-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-text strong { font-size: 12px; }
.identity-text small { margin-top: 4px; font-size: 10px; color: var(--muted); }
.icon-button { display: inline-grid; width: 36px; height: 36px; place-items: center; border: 0; background: transparent; color: var(--ink); }
.icon-button:hover { color: #397455; }
.identity .icon-button { width: 30px; height: 30px; border: 0; background: transparent; }
.main-area { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 12px clamp(18px, 3vw, 44px); background: #f1f4f3e8; backdrop-filter: blur(14px); }
.breadcrumb, .top-actions { display: flex; gap: 10px; align-items: center; }
.breadcrumb { min-width: 0; color: var(--muted); font-size: 12px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb strong { color: var(--ink); font-weight: 680; }
.crumb-arrow { color: #778076; }
.mode-badge, .tag, .quota-badge, .submission-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 28px; padding: 4px 0; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.mode-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #517b53; }
.mode-badge.live::before { box-shadow: 0 0 0 3px #d3e7cf; }
.top-actions .button { min-height: 34px; font-size: 12px; }
.content { width: min(100%, 1510px); margin: 0 auto; padding: 28px clamp(18px, 3vw, 44px) 36px; }
.app-shell.cinema {
  display: block;
  color-scheme: dark;
  --ink: #edf4fc;
  --muted: #b8c6d5;
  --forest: #c5e1fb;
  --surface: transparent;
  --soft: #ffffff12;
  --line: #b6cee63a;
  color: var(--ink);
  background: #111a27;
}
.cinema :focus-visible { outline-color: #dceeff; }
.cinema .section-label, .cinema .field { color: var(--muted); }
.cinema .input::placeholder { color: #a2b4c8; }
.cinema .button.dark { color: #111a27; background: #d9e9f8; }
.cinema .button.dark:hover { background: #f2f7fc; }
.cinema .studio-topbar {
  min-height: 72px;
  padding-inline: clamp(18px, 5.1vw, 86px);
  background: #111a27e8;
}
.studio-topbar .brand { margin: 0; white-space: nowrap; }
.studio-topbar .brand-mark { color: #c5e1fb; }
.studio-topbar .top-actions { gap: 7px; }
.studio-content { padding: 0 0 65px; width: 100%; }
.studio-scene {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(480px, 74vh, 740px);
  overflow: hidden;
  padding: clamp(30px, 6vw, 94px);
  color: #f2f6fb;
  background: #111a27;
  --parallax-x: 0px;
  --parallax-y: 0px;
  --parallax-scroll: 0px;
  --glass-pitch: 0deg;
  --glass-yaw: 0deg;
  --glass-roll: 0deg;
}
.studio-art {
  position: absolute;
  inset: -7% -9%;
  width: 118%;
  height: 114%;
  object-fit: cover;
  object-position: 62% 50%;
  pointer-events: none;
  transform-origin: 73% 48%;
  transform: perspective(1150px)
    translate3d(calc(var(--parallax-x) * .24), calc(var(--parallax-y) * .3 + var(--parallax-scroll) * .55), 0)
    rotateX(var(--glass-pitch)) rotateY(var(--glass-yaw)) rotateZ(var(--glass-roll));
  transition: transform 550ms cubic-bezier(.23,.72,.25,1);
}
.studio-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, #111a27 0%, #111a2787 12%, transparent 38%),
    linear-gradient(180deg, #111a27 0%, transparent 22%),
    linear-gradient(90deg, #111a27e8 0%, #111a279e 28%, #111a2740 47%, transparent 69%);
}
.studio-copy { position: relative; z-index: 1; width: min(52%, 690px); }
.studio-copy h1 { font-size: clamp(51px, 9.6vw, 146px); line-height: .87; font-weight: 770; letter-spacing: -.094em; }
.studio-copy h1 em { font-style: normal; color: #c1dcf7; }
.studio-copy p { max-width: 32ch; color: #d0dce9; margin-top: clamp(19px, 2.8vw, 35px); font-size: clamp(14px, 1.65vw, 24px); line-height: 1.45; }
.studio-copy .studio-cta {
  justify-self: start;
  margin-top: clamp(20px, 3.2vw, 38px);
  padding: 10px 0;
  min-height: 48px;
  border-radius: 0;
  border-bottom: 1px solid #b8d5f283;
  background: transparent;
  color: #e3f0ff;
}
.studio-copy .studio-cta:hover { color: #fff; border-bottom-color: #fff; }
.studio-copy .studio-cta:focus-visible { outline-color: #e3f0ff; }
.launch-section { scroll-margin-top: 88px; margin: clamp(38px, 6vw, 100px) auto 0; }
.studio-content .launch-section, .studio-content .landing-steps { width: min(88%, 1300px); margin-left: auto; margin-right: auto; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-size: 13px; font-weight: 740; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); text-decoration: none; line-height: 1.2; }
.button:hover { text-decoration: underline; text-underline-offset: 3px; }
.button.primary { background: #e5efd9; }
.button.primary:hover { background: #dae9ca; }
.button.dark { color: var(--lime); background: var(--ink); border-color: var(--ink); }
.button.dark:hover { background: #2c372e; }
.button.ghost { background: transparent; }
.button.danger { color: var(--error); }
.button.small { min-height: 33px; padding-inline: 10px; font-size: 12px; }
.button .icon { width: 16px; height: 16px; fill: none; background: transparent; }
.section-label { display: flex; align-items: center; gap: 8px; color: #405047; font-size: 11px; font-weight: 775; line-height: 1.3; text-transform: uppercase; letter-spacing: .1em; }
.section-label .icon { width: 16px; height: 16px; color: var(--forest); }
.page-title { margin: 5px 0 6px; font-size: clamp(31px, 4vw, 57px); font-weight: 780; letter-spacing: -.067em; line-height: .99; }
.page-lead { color: var(--muted); line-height: 1.55; font-size: 14px; }
.welcome { padding-top: clamp(45px, 6vw, 84px); }
.landing { display: grid; grid-template-columns: minmax(260px, .87fr) minmax(0, 1.13fr); align-items: center; gap: clamp(21px, 3.7vw, 62px); }
.landing-copy { container-type: inline-size; }
.landing-copy .page-title { margin: 15px 0 20px; font-size: clamp(32px, 16.7cqi, 86px); letter-spacing: -.069em; line-height: .99; overflow-wrap: anywhere; text-wrap: pretty; }
.landing-copy .page-title em { color: #205344; font-style: normal; }
.landing-copy .page-lead { max-width: 360px; margin-bottom: 24px; font-size: 15px; }
.hero-preview { min-width: 0; }
.hero-preview .preview-frame { aspect-ratio: 4 / 3; min-height: 275px; }
.hero-preview-bar { display: flex; align-items: center; gap: 8px; min-height: 37px; padding: 0 5px 9px; color: var(--muted); font-size: 11px; font-weight: 690; }
.hero-preview-bar > .tag { margin-left: auto; padding: 2px 8px; min-height: 23px; }
.login-form { display: grid; gap: 10px; max-width: 430px; padding: 0; }
.segmented { display: flex; gap: 3px; padding: 3px; width: fit-content; max-width: 100%; background: transparent; }
.segmented button { min-height: 32px; padding: 5px 12px; color: var(--muted); font-size: 12px; font-weight: 720; border: 1px solid transparent; border-radius: 6px; background: transparent; }
.segmented button[aria-pressed="true"] { color: var(--ink); border-radius: 0; border-bottom-color: currentColor; }
.inline-fields { display: flex; gap: 7px; align-items: stretch; }
.inline-fields .input { flex: 1 1 0; min-width: 0; }
.input { width: 100%; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 39px; padding: 8px 2px; }
.input::placeholder { color: #697366; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; color: var(--ink); font-size: 12px; font-weight: 680; }
.login-footer { color: var(--muted); font-size: 12px; line-height: 1.4; }
.text-button { display: inline-flex; gap: 5px; align-items: center; padding: 2px 0; background: transparent; border: 0; color: var(--forest); font-weight: 740; text-align: left; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.landing-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: clamp(34px, 4.7vw, 64px); }
.landing-step { display: flex; align-items: flex-start; gap: 12px; padding: 15px 0; }
.landing-step strong { display: block; font-size: 13px; }
.landing-step p { color: var(--muted); margin-top: 5px; line-height: 1.43; font-size: 12px; }
.step-glyph { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; color: var(--forest); }
.notice { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 16px; border: 1px solid #d8e2d0; border-radius: 10px; padding: 10px 13px; color: #2f5136; background: #f1f8e8; line-height: 1.4; font-size: 12px; }
.notice.error { color: var(--error); border-color: #ecd3d0; background: #fff3f0; }
.notice .icon { width: 16px; height: 16px; }
.workspace-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.workspace-head .page-title { font-size: clamp(34px, 4.4vw, 60px); }
.workspace-head .page-lead { max-width: 52ch; }
.workspace-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding-bottom: 1px; }
.work-grid { display: grid; grid-template-columns: minmax(268px, 0.82fr) minmax(0, 1.38fr); gap: 14px; align-items: stretch; }
.panel { min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 13px 0; }
.panel-head strong { font-size: 13px; }
.panel-head .tag, .panel-head .quota-badge { margin-left: auto; }
.panel-symbol { display: grid; width: 30px; height: 30px; place-items: center; flex: 0 0 auto; color: var(--forest); }
.panel-symbol .icon { width: 15px; height: 15px; }
.chat-panel { display: flex; flex-direction: column; }
.active-step { margin: 5px 0 0; padding: 4px 0 12px; }
.step-kicker { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 5px; color: #536152; font-size: 10px; font-weight: 740; }
.active-step strong { display: block; font-size: 13px; }
.active-step p { margin-top: 5px; color: #536152; font-size: 11.5px; line-height: 1.4; }
.step-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 9px; font-size: 11px; }
.dialog { flex: 1 1 auto; min-height: 145px; max-height: 272px; padding: 15px 13px 8px; overflow: auto; scrollbar-width: thin; }
.message { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 11px; }
.message:last-child { margin-bottom: 0; }
.message-icon { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; color: var(--forest); }
.message-icon .icon { width: 14px; height: 14px; }
.message-data { min-width: 0; }
.message-name { display: inline-block; margin: 0 0 4px 1px; color: #5a675b; font-size: 10px; font-weight: 720; }
.bubble { width: fit-content; border-radius: 5px; background: #e9efeb; padding: 8px 10px; color: #26312a; font-size: 12px; line-height: 1.47; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user { justify-content: end; }
.message.user .bubble { background: #e3eddb; }
.quick-prompts { display: flex; gap: 5px; padding: 5px 13px 8px; overflow: auto; scrollbar-width: thin; }
.quick-prompts button { white-space: nowrap; color: #405746; background: transparent; min-height: 29px; padding: 4px 7px; border: 0; font-size: 10.5px; font-weight: 640; }
.quick-prompts button:hover { text-decoration: underline; text-underline-offset: 3px; }
.chat-footer { padding: 0 13px 11px; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px; border-bottom: 1px solid #c8d3cb; padding: 5px; }
.composer:focus-within { border-color: #487e53; }
.composer textarea { min-width: 0; min-height: 35px; max-height: 128px; width: 100%; border: 0; padding: 9px 4px 6px 7px; color: var(--ink); background: transparent; font-size: 12px; line-height: 1.35; resize: vertical; }
.composer textarea:focus-visible { outline: 0; }
.send { width: 35px; height: 35px; color: var(--forest); }
.chat-help { margin: 7px 0 1px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.project-panel { display: flex; flex-direction: column; overflow: hidden; }
.project-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 57px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; align-items: center; gap: 4px; align-self: center; min-width: 0; }
.tabs button { padding: 6px 9px; min-height: 33px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; white-space: nowrap; font-size: 11px; font-weight: 710; }
.tabs button[aria-pressed="true"] { color: var(--ink); border-radius: 0; border-bottom-color: currentColor; }
.tabs button:hover { color: var(--ink); }
.tabs .icon { width: 15px; height: 15px; }
.project-tools { display: flex; flex: 0 0 auto; gap: 5px; }
.project-tools .icon-button { width: 33px; height: 33px; }
.project-tools .icon { width: 15px; height: 15px; }
.stage-area { padding: 11px 0; }
.preview-frame { display: block; width: 100%; min-height: 310px; aspect-ratio: 16 / 10; border: 0; border-radius: 3px; background: var(--night); }
.preview-notes { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 1px 1px; color: var(--muted); font-size: 10.5px; }
.preview-notes span { display: flex; align-items: center; gap: 6px; }
.preview-notes .icon { height: 13px; width: 13px; }
kbd { display: inline-grid; min-width: 18px; min-height: 18px; place-items: center; padding-inline: 3px; background: transparent; font-family: inherit; font-weight: 720; color: #435443; }
.code-pane, .version-pane { padding: 15px; }
.code-editor { margin: 0; min-height: 145px; max-height: 270px; overflow: auto; padding: 12px; border-radius: 10px; color: #e4eddf; background: var(--night); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 11px; line-height: 1.55; tab-size: 2; }
.code-caption { margin: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.config-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 13px 0; gap: 10px; }
.field.span-all { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.check input { width: 17px; min-height: 17px; accent-color: var(--forest); margin: 0; }
.version-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.version-row:last-child { border-bottom: 0; }
.version-row div { margin-right: auto; min-width: 0; }
.version-row strong, .version-row small { display: block; }
.version-row strong { font-size: 12px; }
.version-row small { color: var(--muted); margin-top: 4px; font-size: 10px; }
.teacher-grid { margin-top: 18px; display: grid; gap: 13px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 16px; min-height: 98px; }
.stat strong { display: block; margin-top: 8px; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -.055em; line-height: 1.1; }
.stat p { color: var(--muted); font-size: 12px; font-weight: 630; }
.stat small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.teacher-columns { display: grid; grid-template-columns: minmax(250px, .68fr) minmax(0, 1.32fr); align-items: start; gap: 13px; margin-top: 13px; }
.teacher-form { padding: 14px 15px 16px; display: grid; gap: 11px; }
.teacher-form .button { width: fit-content; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0 1px; font-size: 12px; color: #39473b; }
.toggle input { width: 19px; height: 19px; accent-color: var(--forest); }
.invite-form { padding: 13px 14px; }
.invitation { margin: 1px 14px 13px; border: 1px solid #dce6cf; border-radius: 9px; background: #f2f7e8; padding: 11px; color: var(--forest); font-size: 12px; flex-wrap: wrap; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.invitation code { font-size: 12px; color: #1c442c; user-select: all; }
.table-scroll { overflow-x: auto; }
.students { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
.students th { padding: 9px 8px; font-size: 10px; color: var(--muted); background: transparent; white-space: nowrap; }
.students th:first-child, .students td:first-child { padding-left: 14px; }
.students th:last-child, .students td:last-child { padding-right: 14px; }
.students td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.students tr:last-child td { border-bottom: 0; }
.students .badge-cell { min-width: 85px; }
.students .quota-input { width: 72px; min-height: 30px; padding: 4px 6px; }
.student-name { font-weight: 730; }
.student-detail { white-space: nowrap; }
.teacher-project { margin-top: 14px; }
.teacher-project .work-grid { padding: 11px; }
.teacher-project-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.teacher-project .active-step { display: none; }
.empty-copy { padding: 20px 14px; line-height: 1.45; font-size: 12px; color: var(--muted); }
.guide-grid { display: grid; gap: 13px; margin-top: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-item { padding: 17px; }
.guide-item h2 { margin: 5px 0 6px; font-size: 19px; letter-spacing: -.035em; }
.guide-item p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.guide-prompt { padding: 9px 11px; margin: 10px 0; border-left: 2px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-item .button { margin-top: 10px; }
.safety-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 14px; }
.alert-list { margin: 0; padding: 0; list-style: none; }
.alert-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.alert-row:last-child { border-bottom: 0; }
.alert-row.unread { background: #fff8e8; }
.alert-row p, .compact-copy { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.alert-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.alert-counter { min-width: 18px; padding: 2px 4px; border-radius: 8px; background: #fbe3b1; text-align: center; }
#teacher-warning .notice { justify-content: space-between; align-items: center; }
.fullscreen-preview { position: fixed; inset: 0; z-index: 50; background: #0d1624ef; display: grid; place-items: center; padding: min(4vw, 35px); }
.fullscreen-preview .modal-content { width: min(100%, 1180px); }
.fullscreen-preview .preview-frame { max-height: calc(100dvh - 82px); width: 100%; }
.fullscreen-preview .modal-bar { display: flex; justify-content: flex-end; margin-bottom: 7px; }
@media (max-width: 1130px) {
  .app-shell { grid-template-columns: 192px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .content, .topbar { padding-inline: 21px; }
  .preview-frame { min-height: 260px; }
}
@media (max-width: 930px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: 0; padding: 12px 18px; flex-direction: row; align-items: center; gap: 12px; border-right: 0; }
  .brand { margin: 0; flex: 0 0 auto; }
  .nav-label { display: none; }
  .nav-list { display: flex; gap: 4px; }
  .nav-button { white-space: nowrap; width: auto; min-height: 37px; }
  .nav-button[aria-current="page"]::after { display: none; }
  .sidebar-bottom { margin-left: auto; padding-top: 0; }
  .identity { border: 0; padding: 3px 0; }
  .identity-text { display: none; }
  .topbar { min-height: 54px; }
  .welcome { padding-top: 31px; }
}
@media (max-width: 660px) {
  .sidebar { flex-wrap: wrap; gap: 8px; padding: 10px 13px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
  .brand small { font-size: 9px; }
  .sidebar nav { order: 3; width: 100%; }
  .nav-list { overflow: auto; }
  .nav-button { padding-inline: 8px; font-size: 11px; min-height: 33px; }
  .nav-button .icon { width: 15px; height: 15px; }
  .topbar, .content { padding-inline: 14px; }
  .topbar { min-height: 45px; gap: 7px; padding-block: 8px; }
  .cinema .studio-topbar { min-height: 55px; padding-inline: 13px; }
  .studio-topbar .brand { gap: 6px; font-size: 13px; }
  .studio-topbar .brand-mark { width: 30px; height: 30px; }
  .studio-topbar .top-actions .button { white-space: nowrap; }
  .studio-content { padding-bottom: 40px; }
  .studio-scene { min-height: min(650px, max(525px, 79svh)); align-items: stretch; padding: 30px 23px 25px; }
  .studio-art { object-position: 64% 50%; inset: 4% -10%; height: 92%; width: 120%; transform-origin: 60% 51%; }
  .studio-scene::after {
    background: linear-gradient(180deg, #111a27 0%, #111a2783 26%, transparent 48%, #111a2734 63%, #111a27 94%);
  }
  .studio-copy { display: flex; flex-direction: column; width: 100%; }
  .studio-copy h1 { font-size: clamp(43px, 12.4vw, 76px); }
  .studio-copy p { margin-top: auto; margin-bottom: 1px; }
  .studio-copy .studio-cta { align-self: flex-start; min-height: 41px; margin-top: 12px; }
  .launch-section { scroll-margin-top: 69px; }
  .breadcrumb { font-size: 11px; gap: 5px; }
  .top-actions { gap: 5px; }
  .topbar .button .icon { display: none; }
  .topbar .button { min-height: 29px; padding-inline: 7px; font-size: 10.5px; }
  .mode-badge { min-height: 24px; padding: 3px 7px; font-size: 10px; }
  .content:not(.studio-content) { padding-top: 20px; }
  .landing, .work-grid, .teacher-columns, .guide-grid, .safety-grid { grid-template-columns: minmax(0, 1fr); }
  .alert-row { align-items: flex-start; flex-direction: column; }
  .landing { gap: 23px; }
  .landing-copy .page-lead { margin-bottom: 15px; }
  .hero-preview .preview-frame { aspect-ratio: 16 / 11; min-height: 185px; }
  .landing-steps { grid-template-columns: 1fr; }
  .landing-step { padding-top: 12px; }
  .workspace-head { align-items: flex-start; flex-direction: column; }
  .workspace-head .page-title { font-size: clamp(36px, 9vw, 55px); }
  .workspace-actions { flex-wrap: wrap; }
  .student-work > .project-panel { order: -1; }
  .teacher-grid { gap: 7px; }
  .stat { padding: 9px; min-height: 76px; }
  .stat strong { font-size: clamp(14px, 4vw, 27px); }
  .stat p, .stat small { font-size: 9px; }
  .preview-frame { min-height: 200px; }
  .project-tools { gap: 3px; }
  .project-tools .icon-button { width: 29px; height: 30px; }
  .tabs button { padding-inline: 6px; }
  .tabs .icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-art { transform: none; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01s !important; transition-duration: .01s !important; }
}
