/* The classroom owns this frame. The exported game keeps its own layout. */
:root {
  --ink: #20354c;
  --green: #22776c;
  --line: #dce7ed;
  --muted: #688097;
}
body {
  background: radial-gradient(ellipse at 30% 0%, #214659, #091a2a 75%);
}
.education-shell {
  background: #f4f8fb;
}
button {
  border-radius: 10px;
}
.primary {
  background: #16756d;
  border-color: #16756d;
  box-shadow: 0 5px 14px #16756d20;
}
.primary:hover {
  background: #105e58;
}
.brand-icon {
  background: linear-gradient(145deg, #12465e, #238879);
  box-shadow: 0 4px 12px #183e3c20;
}
.ui-icon {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  flex-shrink: 0;
}
.workshop-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.workshop-nav button[aria-pressed="true"] {
  background: #173a53;
  box-shadow: 0 4px 12px #173a5325;
}
[data-sticker] {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.sticker-symbol {
  font-size: 25px;
  filter: drop-shadow(0 2px 2px #11234318);
}
.workshop-grid {
  box-shadow: 0 12px 24px #18365a20;
}
#workshop canvas {
  border: 1px solid #315170;
  box-shadow: 0 12px 30px #112d4922;
}
.workshop-heading h1 {
  color: #153b52;
}
.prompt-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 8px;
  flex-wrap: wrap;
}
.prompt-label-row label {
  margin: 0;
}
.workshop-heading h1::before {
  content: "";
  display: inline-block;
  width: 0.28em;
  height: 0.82em;
  border-radius: 4px;
  margin-right: 0.4em;
  background: #28a593;
}

@media (min-width: 960px) and (min-height: 500px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  body {
    display: grid;
    place-items: center;
  }
  .education-shell {
    width: min(100vw, calc(100dvh * 16 / 9));
    height: min(100dvh, calc(100vw * 9 / 16));
    container-type: size;
    display: grid;
    grid-template-rows: 8.54% minmax(0, 1fr) 3.2%;
    position: relative;
    border: 1px solid #ffffff26;
    box-shadow: 0 30px 90px #020b2144;
    overflow: clip;
    font-size: 1.18cqw;
  }
  .education-shell > header {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.65cqw 2.1cqw;
    gap: 1cqw;
    background: #fff;
    border-bottom: 1px solid #dce7ed;
  }
  .education-shell > #intro {
    position: absolute;
    inset: 0;
  }
  .brand {
    font-size: 1.16cqw;
    letter-spacing: 0.13cqw;
    gap: 0.75cqw;
  }
  .brand small {
    font-size: 0.78cqw;
    margin-top: 0.2cqw;
  }
  .brand-icon {
    width: 2.95cqw;
    height: 2.95cqw;
    line-height: 2.95cqw;
    font-size: 2.1cqw;
    border-radius: 0.8cqw;
  }
  .header-tools {
    gap: 0.6cqw;
  }
  .header-tools > span {
    display: block;
    font-size: 0.9cqw;
  }
  #studentTag {
    max-width: 35cqw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .header-tools button {
    min-height: 2.5cqw;
    padding: 0.4cqw 0.75cqw;
    font-size: 1cqw;
  }
  .education-shell > main {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
  }
  .education-shell > footer {
    width: 100%;
    max-width: none;
    padding: 0.35cqw 2.2cqw;
    margin: 0;
    font-size: 0.65cqw;
    border-color: #dce7ed;
    background: #eef4f7;
  }
  .education-shell button {
    font-size: 1.05cqw;
    min-height: 2.8cqw;
    padding: 0.5cqw 0.85cqw;
    border-radius: 0.65cqw;
  }
  .education-shell input:not([type="checkbox"]):not([type="range"]),
  .education-shell select {
    font-size: 1.15cqw;
    min-height: 2.9cqw;
    padding: 0.55cqw 0.75cqw;
    border-radius: 0.6cqw;
  }
  .education-shell textarea {
    min-height: 5cqw;
    padding: 0.6cqw 0.8cqw;
    font-size: 1.15cqw;
    line-height: 1.6;
    resize: none;
  }
  .education-shell label {
    font-size: 1.05cqw;
    margin: 0.65cqw 0 0.35cqw;
  }
  .education-shell .helper {
    font-size: 0.88cqw !important;
    line-height: 1.5;
    margin: 0.45cqw 0 !important;
  }
  .education-shell .ui-icon {
    width: 1.4cqw;
    height: 1.4cqw;
  }

  /* Workshop: heading, activity chooser, active panel, feedback and teacher help. */
  #workshop {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 1cqw 2.2cqw 0.7cqw;
    display: grid;
    grid-template-rows: 4cqw 3.2cqw minmax(0, 1fr) 1.7cqw 1.5cqw;
    gap: 0.6cqw;
    position: relative;
    background: radial-gradient(ellipse at 100% 0%, #dfeef480, transparent 60%);
  }
  .workshop-heading {
    gap: 1.5cqw;
  }
  .workshop-heading h1 {
    font-size: 2cqw;
    line-height: 1.2;
  }
  .workshop-heading p {
    font-size: 1.05cqw;
    margin: 0.4cqw 0 0;
    color: #6a8091;
  }
  .workshop-heading .primary {
    min-height: 3cqw;
    padding-inline: 1.2cqw;
  }
  .workshop-nav {
    margin: 0;
    gap: 0.65cqw;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .workshop-nav button {
    min-height: 0;
    border: 1px solid #d5e2e9;
    background: #edf3f7;
  }
  #workshop section {
    min-height: 0;
    padding: 1.2cqw;
    border-radius: 1cqw;
    border-color: #d6e3eb;
    box-shadow: 0 8px 20px #163a5306;
  }
  #workshop h2 {
    font-size: 1.5cqw;
    margin: 0 0 0.5cqw;
    line-height: 1.3;
  }
  #workshop p {
    line-height: 1.55;
    font-size: 1.05cqw;
    margin: 0.4cqw 0 0.65cqw;
  }
  .workshop-layout {
    height: 100%;
    gap: 1.3cqw;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.7fr);
    align-items: center;
  }
  .workshop-layout > div {
    min-width: 0;
    min-height: 0;
  }
  #workshop [data-panel="art"] .workshop-layout > div {
    align-self: start;
  }
  #workshop [data-art-help] {
    font-size: 1cqw;
    min-height: 3cqw;
    color: #688097;
  }
  #workshop canvas {
    width: min(100%, 50cqw);
    height: auto;
    max-height: none;
    aspect-ratio: 8 / 5;
    border-radius: 0.85cqw;
    justify-self: center;
  }
  #workshop [data-stickers] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4cqw;
    margin: 0.7cqw 0;
  }
  #workshop [data-stickers] button {
    display: flex;
    flex-direction: column;
    gap: 0.05cqw;
    font-size: 0.76cqw;
    min-height: 3.7cqw;
    padding: 0.25cqw 0.15cqw;
    background: #f5f8fb;
    border-color: #dfe8ee;
  }
  #workshop [data-stickers] button[aria-pressed="true"] {
    background: #e2f4ee;
    border-color: #2b9a86;
    color: #165c52;
    box-shadow: inset 0 0 0 1px #2b9a86;
  }
  .sticker-symbol {
    font-size: 1.65cqw;
    line-height: 1.15;
  }
  .workshop-tools {
    gap: 0.45cqw;
    margin: 0.55cqw 0;
  }
  #workshop .workshop-tools button {
    min-height: 2.5cqw;
    font-size: 0.95cqw;
  }
  #workshop [data-panel="route"] {
    position: relative;
    padding-left: 43%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  #workshop [data-panel="route"] .workshop-layout {
    display: block;
    height: auto;
  }
  #workshop .workshop-grid {
    position: absolute;
    left: 3cqw;
    top: 50%;
    transform: translateY(-50%);
    width: 23cqw;
    max-width: none;
  }
  #workshop .workshop-grid span {
    font-size: 2cqw;
  }
  #workshop [data-commands] {
    min-height: 2.7cqw;
    padding: 0.6cqw;
    border-radius: 0.6cqw;
    background: #eef4f8;
    font-size: 1.35cqw;
    letter-spacing: 0.3cqw;
    overflow-wrap: anywhere;
    max-width: 100%;
  }
  #workshop [data-direction] {
    width: 3.3cqw;
    height: 3.3cqw;
    font-size: 1.8cqw !important;
  }
  #workshop [data-panel="story"] > .workshop-layout {
    height: calc(100% - 4.3cqw);
    grid-template-columns: 1fr 1fr;
    gap: 2cqw;
    align-items: start;
  }
  #workshop [data-panel="story"] .workshop-layout > div:first-child {
    padding: 1cqw;
    border-radius: 0.8cqw;
    background: #eff6f8;
    height: 100%;
  }
  #workshop [data-panel="story"] .workshop-layout > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4cqw 0.8cqw;
  }
  #workshop [data-panel="story"] label[for="workshop-ship"] {
    grid-area: 1 / 1;
  }
  #workshop [data-panel="story"] #workshop-ship {
    grid-area: 2 / 1;
  }
  #workshop [data-panel="story"] label[for="workshop-color"] {
    grid-area: 1 / 2;
  }
  #workshop [data-panel="story"] #workshop-color {
    grid-area: 2 / 2;
  }
  #workshop [data-panel="story"] label[for="workshop-enemy"] {
    grid-area: 3 / 1;
  }
  #workshop [data-panel="story"] #workshop-enemy {
    grid-area: 4 / 1;
  }
  #workshop [data-panel="story"] label[for="workshop-difficulty"] {
    grid-area: 3 / 2;
  }
  #workshop [data-panel="story"] #workshop-difficulty {
    grid-area: 4 / 2;
  }
  #workshop [data-panel="story"] .workshop-check,
  #workshop [data-plan-background],
  #workshop [data-panel="story"] .helper {
    grid-column: 1 / -1;
  }
  #workshop .workshop-check {
    display: flex;
    align-items: center;
    gap: 0.6cqw;
  }
  #workshop textarea {
    min-height: 8cqw;
  }
  #workshop .workshop-status {
    margin: 0;
    font-size: 1cqw;
    min-height: 0;
  }
  #workshop > .helper {
    position: absolute;
    right: 2.2cqw;
    bottom: 0.5cqw;
    margin: 0 !important;
    font-size: 0.75cqw !important;
  }
  .workshop-teacher {
    padding: 0;
    border: 0;
    font-size: 0.95cqw;
    align-self: center;
  }
  .workshop-teacher[open] {
    position: absolute;
    z-index: 5;
    bottom: 2.2cqw;
    left: 2.2cqw;
    width: 65%;
    max-height: 70%;
    overflow: auto;
    padding: 1.3cqw;
    border: 1px solid #bacfdb;
    border-radius: 0.85cqw;
    background: white;
    box-shadow: 0 15px 50px #122e4940;
  }
  .workshop-teacher summary {
    font-size: 0.95cqw;
  }

  /* Seven-step classroom with one fixed working area. */
  #app {
    display: grid;
    grid-template-rows: 4.2cqw 3.4cqw minmax(0, 1fr) 1.3cqw;
    gap: 0.65cqw;
    padding: 1cqw 2.2cqw 0.6cqw;
  }
  .heading {
    position: relative;
    align-self: center;
    padding-right: 13cqw;
  }
  .heading .eyebrow {
    display: none;
  }
  .heading h1 {
    margin: 0 0 0.25cqw;
    font-size: 1.8cqw;
    letter-spacing: -0.04cqw;
  }
  .heading h1 span {
    margin-left: 0.8cqw;
    font-size: 0.85cqw;
    padding: 0.3cqw 0.5cqw;
    border-radius: 0.35cqw;
  }
  .heading p {
    font-size: 1cqw;
    margin: 0;
    line-height: 1.5;
  }
  .workshop-heading > div {
    position: relative;
  }
  .heading:has(> #toast.show) > p,
  .workshop-heading > div:has(> #toast.show) > p {
    visibility: hidden;
  }
  #toast {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    max-width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #176b59;
    font-size: 1cqw;
    line-height: 1.5;
    font-weight: 700;
  }
  #openWorkshop {
    position: absolute;
    right: 0;
    top: 0.5cqw;
  }
  #steps {
    margin: 0;
    padding: 0;
    gap: 0.45cqw;
    overflow: visible;
  }
  #steps button {
    min-height: 0;
    font-size: 0.95cqw;
    padding: 0.4cqw 0.7cqw;
    gap: 0.5cqw;
    border-color: #dce6ec;
  }
  #steps button b {
    width: 1.65cqw;
    height: 1.65cqw;
    font-size: 0.85cqw;
  }
  .workspace {
    min-height: 0;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 1.3cqw;
  }
  .lesson {
    height: 100%;
    min-height: 0;
    padding: 1.25cqw 1.5cqw;
    border-radius: 1cqw;
    overflow: auto;
    scrollbar-width: thin;
  }
  .step-number {
    font-size: 0.76cqw;
    letter-spacing: 0.12cqw;
  }
  .lesson h2 {
    margin: 0.5cqw 0;
    font-size: 1.7cqw;
    line-height: 1.4;
    letter-spacing: -0.03cqw;
  }
  .lesson p {
    margin: 0.5cqw 0 0.7cqw;
    font-size: 1.1cqw;
    line-height: 1.65;
  }
  .lesson .example {
    font-size: 1.02cqw;
    padding: 0.6cqw 0.8cqw;
    margin: 0.6cqw 0;
    line-height: 1.65;
    border-radius: 0.65cqw;
  }
  .example small {
    font-size: 0.75cqw;
    margin-bottom: 0.3cqw;
  }
  .lesson .wide {
    margin-top: 0.6cqw;
    min-height: 3cqw;
  }
  .lesson .tip {
    font-size: 0.9cqw;
    padding: 0.5cqw 0.7cqw;
    line-height: 1.6;
    border-radius: 0.5cqw;
  }
  .lesson .lesson-error {
    font-size: 0.95cqw;
    min-height: 0;
    margin: 0.4cqw 0;
  }
  .lesson .lesson-error:empty {
    display: none;
  }
  .prompt-label-row {
    flex-wrap: nowrap;
    gap: 0.6cqw;
    margin: 0.6cqw 0 0.35cqw;
  }
  .education-shell .prompt-label-row label {
    margin: 0;
  }
  .education-shell .prompt-label-row button {
    min-height: 2.4cqw;
    padding: 0.35cqw 0.65cqw;
    font-size: 0.9cqw;
    white-space: nowrap;
  }
  .workspace > aside {
    height: 100%;
    align-self: stretch;
    display: grid;
    grid-template-rows: 1.7cqw minmax(0, 1fr) 6.9cqw;
    gap: 0.5cqw;
    min-height: 0;
    min-width: 0;
  }
  .preview-heading {
    margin: 0;
    font-size: 0.95cqw;
  }
  .live-tag {
    font-size: 0.65cqw;
    letter-spacing: 0.1cqw;
  }
  #gameRoot {
    min-height: 0;
  }
  .education-shell .flight:not(:fullscreen) {
    display: grid;
    grid-template-rows: 2.6cqw 1.8cqw minmax(0, 1fr) 2.8cqw 1.8cqw;
    height: 100%;
    width: 100%;
    border-radius: 0.85cqw;
    font-size: 0.9cqw;
  }
  .education-shell .flight:not(:fullscreen) .flight-top,
  .education-shell .flight:not(:fullscreen) .flight-hud {
    padding: 0.3cqw 0.8cqw;
    font-size: 0.8cqw;
  }
  .education-shell .flight:not(:fullscreen) .flight-top small {
    font-size: 0.6cqw;
  }
  .education-shell .flight:not(:fullscreen) button {
    font-size: 0.78cqw;
    padding: 0.3cqw 0.5cqw;
    min-height: 0;
    border-radius: 0.45cqw;
  }
  .education-shell .flight:not(:fullscreen) .flight-arena {
    min-height: 0;
    display: grid;
    place-items: center;
  }
  .education-shell .flight:not(:fullscreen) canvas {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: auto;
    height: 100%;
    max-height: 100%;
    max-width: none;
  }
  .education-shell .flight:not(:fullscreen) .flight-overlay {
    padding: 1cqw;
  }
  .education-shell .flight:not(:fullscreen) .flight-overlay h2 {
    font-size: 1.7cqw;
    margin: 0.6cqw 0;
  }
  .education-shell .flight:not(:fullscreen) .flight-overlay p {
    font-size: 0.9cqw;
    margin: 0.6cqw 0;
  }
  .education-shell .flight:not(:fullscreen) .flight-primary {
    min-height: 2.6cqw;
    font-size: 1.05cqw;
    padding: 0.5cqw 1.2cqw;
  }
  .education-shell .flight:not(:fullscreen) .flight-eyebrow {
    font-size: 0.6cqw;
    letter-spacing: 0.1cqw;
  }
  .education-shell .flight:not(:fullscreen) .flight-actions {
    padding: 0.3cqw;
    gap: 0.3cqw;
    flex-wrap: nowrap;
  }
  .education-shell .flight:not(:fullscreen) .flight-actions button {
    min-width: 0;
  }
  .education-shell .flight:not(:fullscreen) .flight-callout {
    font-size: 1cqw;
  }
  .education-shell .flight:not(:fullscreen) .flight-settings {
    padding: 0.2cqw 0.7cqw;
    font-size: 0.78cqw;
  }
  .education-shell .flight:not(:fullscreen) .flight-settings summary {
    min-height: 0;
  }
  .education-shell .flight:not(:fullscreen):has(.flight-settings[open]) {
    position: relative;
  }
  .education-shell .flight:not(:fullscreen) .flight-settings[open] {
    position: absolute;
    z-index: 3;
    bottom: 0;
    left: 0;
    right: 0;
    background: #102138;
    border: 1px solid #4b657a;
    padding: 0.7cqw;
    border-radius: 0.7cqw;
  }
  .education-shell .flight-settings[open] p,
  .education-shell .flight-settings[open] label {
    font-size: 0.85cqw;
    margin: 0.3cqw 0;
    padding: 0.1cqw;
  }
  .education-shell .flight-settings[open] output {
    font-size: 0.8cqw;
  }
  .config-card {
    margin: 0;
    padding: 0.6cqw 0.85cqw;
    border-radius: 0.7cqw;
  }
  .config-card h3 {
    font-size: 0.95cqw;
    margin: 0 0 0.3cqw;
  }
  .config-card h3 span {
    display: none;
  }
  .config-card ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.1cqw 0.7cqw;
    font-size: 0.85cqw;
    padding-left: 1cqw;
    line-height: 1.6;
  }
  .config-card p {
    margin: 0.2cqw 0;
    font-size: 0.78cqw;
  }
  .bottom-note {
    margin: 0;
    padding: 0;
    font-size: 0.72cqw;
    line-height: 1.4;
  }
  .code-panel {
    margin-top: 1cqw;
    border-radius: 0.7cqw;
  }
  .code-top {
    padding: 0.6cqw 0.8cqw;
    font-size: 0.8cqw;
  }
  .code-window {
    height: 12cqw;
  }
  .code-line {
    font-size: 0.85cqw;
  }
  .progress-track {
    margin: 0.7cqw 0 0.4cqw;
    height: 0.5cqw;
  }
  .status-line {
    font-size: 0.9cqw;
  }
  .final-icon {
    font-size: 2cqw;
    line-height: 1.2;
  }
  .save-state {
    padding: 0.6cqw;
    font-size: 0.95cqw;
  }
  .final-actions {
    grid-template-columns: 1fr 1fr;
    gap: 0.45cqw;
    margin-top: 0.65cqw;
  }
  .lesson:has(.final-actions) > .final-icon {
    display: none;
  }
  .lesson:has(.final-actions) > p {
    font-size: 1cqw;
    line-height: 1.5;
  }
  .education-shell .flight:fullscreen button {
    font-size: 16px;
    min-height: 48px;
    padding: 10px 14px;
  }
  .education-shell .flight:fullscreen .flight-settings p,
  .education-shell .flight:fullscreen .flight-settings label {
    font-size: 16px;
    padding: 8px 0;
  }
}
@media (max-width: 959px), (max-height: 499px) {
  .education-shell {
    min-height: 100dvh;
  }
}
