:root {
  --ink: #1d2440;
  --muted: #5b647c;
  --paper: #fffdf7;
  --soft: #f4f8ff;
  --blue: #3266e3;
  --cyan: #1fb6c9;
  --green: #2ea86d;
  --yellow: #ffd36e;
  --orange: #ff9f43;
  --pink: #ff6f91;
  --purple: #7d5fff;
  --danger: #d94a4a;
  --shadow: 0 18px 45px rgba(32, 45, 74, 0.16);
  --radius: 26px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 211, 110, 0.5), transparent 30rem),
    radial-gradient(circle at top right, rgba(31, 182, 201, 0.35), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0%, #fffdf7 48%, #f7fbff 100%);
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; }

button { cursor: pointer; }

a { color: inherit; }

.hero {
  padding: 22px clamp(16px, 4vw, 46px) 50px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  z-index: -1;
}

.hero::before {
  width: 220px;
  height: 220px;
  background: rgba(255, 111, 145, 0.2);
  left: -80px;
  top: 90px;
}

.hero::after {
  width: 180px;
  height: 180px;
  background: rgba(50, 102, 227, 0.16);
  right: -50px;
  top: 120px;
}

.topbar {
  max-width: 1180px;
  margin: 0 auto 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 900;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: white;
  box-shadow: 0 8px 20px rgba(32, 45, 74, 0.12);
}

.teacher-link,
.primary-btn,
.secondary-btn,
.close-btn,
.action-btn,
.filter-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.teacher-link,
.secondary-btn,
.filter-btn {
  background: white;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(32, 45, 74, 0.1);
}

.primary-btn,
.action-btn {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 10px 22px rgba(50, 102, 227, 0.28);
}

.teacher-link:hover,
.primary-btn:hover,
.secondary-btn:hover,
.close-btn:hover,
.action-btn:hover,
.filter-btn:hover,
.activity-card:hover {
  transform: translateY(-2px);
}

.hero-card {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(30px, 6vw, 70px);
  border-radius: 38px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255,255,255,0.78)),
    repeating-linear-gradient(45deg, rgba(50,102,227,0.06), rgba(50,102,227,0.06) 12px, transparent 12px, transparent 24px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.75);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 900;
}

h1, h2, h3 { line-height: 1.06; margin: 0; }

h1 {
  max-width: 760px;
  font-size: clamp(2.45rem, 8vw, 5.6rem);
  letter-spacing: -0.06em;
}

h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.04em; }

h3 { font-size: 1.4rem; }

.hero-text {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px clamp(16px, 4vw, 46px) 18px;
}

.intro-section {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
}

.intro-section p {
  color: var(--muted);
  max-width: 700px;
  line-height: 1.6;
}

.level-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter-btn.active {
  color: white;
  background: var(--ink);
}

.activity-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 46px) 50px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.activity-card {
  text-align: left;
  min-height: 230px;
  border: 0;
  border-radius: var(--radius);
  padding: 24px;
  background: white;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(32, 45, 74, 0.12);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.activity-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -55px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 211, 110, 0.55);
}

.activity-card:nth-child(2n)::after { background: rgba(31, 182, 201, 0.26); }
.activity-card:nth-child(3n)::after { background: rgba(255, 111, 145, 0.25); }
.activity-card:nth-child(4n)::after { background: rgba(125, 95, 255, 0.18); }

.card-emoji { font-size: 2.8rem; margin-bottom: 14px; }

.card-level {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--soft);
  color: var(--blue);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.activity-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 10px 0 0;
  position: relative;
  z-index: 1;
}

.lab-panel {
  max-width: 1180px;
  margin: 0 auto 60px;
  padding: clamp(16px, 4vw, 32px);
  border-radius: 34px;
  background: white;
  box-shadow: var(--shadow);
}

.lab-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  border-bottom: 2px solid #eef3ff;
  padding-bottom: 22px;
  margin-bottom: 22px;
}

.lab-header p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.close-btn {
  background: #fff0f0;
  color: var(--danger);
}

.activity-stage {
  min-height: 320px;
}

.play-card {
  background: var(--soft);
  border-radius: 28px;
  padding: clamp(18px, 4vw, 32px);
  border: 2px solid #e7efff;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 900;
}

input, select, textarea {
  width: 100%;
  border: 2px solid #dfe8fb;
  border-radius: 16px;
  padding: 13px 15px;
  color: var(--ink);
  background: white;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(50, 102, 227, 0.12);
}

textarea { min-height: 110px; resize: vertical; }

/* Keep radio buttons and checkboxes compact.
   The general input rule above is for text fields, but it made
   multiple-choice radio buttons stretch across the whole answer card. */
input[type="radio"],
input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--blue);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.feedback {
  min-height: 30px;
  font-weight: 900;
}

.feedback.good { color: var(--green); }
.feedback.bad { color: var(--danger); }

.drag-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.drag-pool,
.drop-zone,
.sort-zone {
  border: 3px dashed #c9d7f6;
  border-radius: 24px;
  padding: 18px;
  min-height: 220px;
  background: rgba(255,255,255,0.74);
}

.drop-zone.active,
.sort-zone.active { border-color: var(--blue); background: #f2f6ff; }

.drop-zone h3,
.sort-zone h3,
.drag-pool h3 { margin-bottom: 12px; }

.tile,
.word-tile,
.safety-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px;
  padding: 12px 15px;
  border-radius: 16px;
  background: white;
  border: 2px solid #e1e9fb;
  box-shadow: 0 8px 16px rgba(32, 45, 74, 0.08);
  font-weight: 900;
  user-select: none;
}

.tile { font-size: 1.1rem; }
.tile .big { font-size: 1.8rem; }

.tile[draggable="true"],
.word-tile[draggable="true"],
.safety-card[draggable="true"] { cursor: grab; }

.tile.used,
.word-tile.used,
.safety-card.used { opacity: 0.42; pointer-events: none; }

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

.device-card {
  background: white;
  border-radius: 24px;
  padding: 18px;
  border: 2px solid #e1e9fb;
  text-align: center;
}

.device-emoji { font-size: 4rem; display: block; }

.device-drop {
  margin-top: 14px;
  min-height: 58px;
  border: 3px dashed #c9d7f6;
  border-radius: 18px;
  padding: 8px;
}

.copy-box {
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 18px;
  padding: 18px;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.5;
}

.typing-target,
.search-query {
  background: var(--ink);
  color: white;
  border-radius: 20px;
  padding: 18px;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.5;
}

.live-typing {
  margin-top: 18px;
  font-size: 1.25rem;
  line-height: 1.7;
  background: white;
  padding: 16px;
  border-radius: 18px;
  border: 2px solid #e1e9fb;
}

.correct-char { color: var(--green); font-weight: 900; }
.wrong-char { color: var(--danger); font-weight: 900; text-decoration: underline; }
.pending-char { color: #9aa4bb; }

.sort-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.safe-zone { border-color: rgba(46,168,109,0.55); }
.unsafe-zone { border-color: rgba(217,74,74,0.55); }

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.result-card {
  border: 2px solid #e1e9fb;
  border-radius: 20px;
  background: white;
  padding: 16px;
}

/* Multiple-choice search result cards need their radio buttons in a clear,
   predictable place. Without this, the radio sits awkwardly above the title
   because the title is a block element. */
label.result-card {
  cursor: pointer;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
}

label.result-card > input[type="radio"] {
  grid-row: 1 / span 2;
  margin-top: 6px;
}

.result-card h3 { color: var(--blue); margin-bottom: 6px; }
.result-card p { color: var(--muted); line-height: 1.45; }

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

.shortcut-row {
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  align-items: center;
}

kbd {
  background: var(--ink);
  color: white;
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: inset 0 -3px rgba(255,255,255,0.16);
  font-weight: 900;
}

.student-card-preview {
  margin-top: 18px;
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 12px 26px rgba(31, 182, 201, 0.25);
  max-width: 460px;
}

.student-card-preview h3 { font-size: 1.9rem; margin-bottom: 8px; }
.student-card-preview p { margin: 7px 0; font-weight: 800; }

.slide-preview {
  margin-top: 18px;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: white;
  border: 7px solid #dfe8fb;
  padding: clamp(18px, 4vw, 36px);
  box-shadow: 0 12px 26px rgba(32, 45, 74, 0.12);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: center;
}

.slide-preview.theme-blue { border-color: #9bb7ff; }
.slide-preview.theme-green { border-color: #98e2bd; }
.slide-preview.theme-pink { border-color: #ffc1d0; }
.slide-preview.theme-yellow { border-color: #ffe19b; }

.slide-preview h3 { font-size: clamp(1.8rem, 5vw, 3.6rem); }
.slide-preview ul { font-size: clamp(1rem, 2.3vw, 1.5rem); line-height: 1.55; }
.slide-picture { font-size: clamp(4rem, 14vw, 10rem); text-align: center; }

.notice {
  background: #fff8df;
  border: 2px solid #ffe39b;
  border-radius: 20px;
  padding: 14px 16px;
  margin-bottom: 18px;
  line-height: 1.5;
  font-weight: 800;
}

/* Add a little breathing space below instruction banners before the activity content. */
.notice + * {
  margin-top: 0;
}

footer {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.hidden { display: none !important; }

@media (max-width: 1000px) {
  .activity-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-section { align-items: start; flex-direction: column; }
  .level-filter { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .activity-grid,
  .form-grid,
  .drag-layout,
  .sort-board,
  .match-board,
  .shortcut-grid,
  .slide-preview {
    grid-template-columns: 1fr;
  }

  .slide-preview { aspect-ratio: auto; }

  .topbar { align-items: flex-start; }
  .teacher-link { padding: 10px 13px; }
  .lab-header { flex-direction: column; }
  .close-btn { align-self: flex-start; }
  .shortcut-row { grid-template-columns: 1fr; }
}


.activity-card.upper {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.98), rgba(246, 249, 255, 0.9)),
    radial-gradient(circle at top right, rgba(125,95,255,0.12), transparent 10rem);
  border-color: #dfe7ff;
}

.choice-list,
.choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

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

.choice-pill,
.password-choice,
.url-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.password-choice {
  justify-content: flex-start;
}

.password-choice kbd {
  margin-left: 2px;
}

.email-window,
.browser-mock,
.source-card,
.entry-card,
.total-box,
.shop-item {
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 22px;
  padding: 18px;
}

.email-window {
  display: grid;
  gap: 14px;
  box-shadow: 0 12px 26px rgba(32, 45, 74, 0.1);
}

.email-bar,
.browser-top {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #eef3ff;
  color: var(--muted);
  font-weight: 900;
}

.email-bar span,
.browser-top span {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 99px;
  background: #dce6fb;
}

.browser-top div {
  margin-left: 8px;
}

.mini-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.mini-rules div {
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 16px;
  padding: 12px;
  font-weight: 800;
}

.url-mission {
  padding: 16px 0;
  border-bottom: 2px solid #eef3ff;
}

.url-mission:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.url-option {
  margin-top: 10px;
  overflow-wrap: anywhere;
}

code {
  background: #f4f7ff;
  padding: 3px 6px;
  border-radius: 8px;
  color: #28365f;
}

.data-layout,
.source-grid,
.shop-grid,
.folder-board {
  display: grid;
  gap: 18px;
}

.data-layout {
  grid-template-columns: 0.8fr 1.2fr;
}

.source-grid,
.shop-grid,
.folder-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.source-card h3,
.entry-card h3,
.shop-item h3 {
  margin-bottom: 8px;
}

.source-card p,
.shop-item p {
  color: var(--muted);
  line-height: 1.5;
}

.total-box {
  margin-top: 18px;
  font-size: 1.35rem;
  font-weight: 900;
}

.shop-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.shop-item input[type="number"] {
  max-width: 90px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  margin: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: white;
  border: 2px solid #e1e9fb;
  box-shadow: 0 8px 16px rgba(32, 45, 74, 0.08);
  font-weight: 900;
  user-select: none;
  cursor: grab;
}

.file-chip.used {
  opacity: 0.52;
  pointer-events: none;
}

.folder-zone {
  border: 3px dashed #c9d7f6;
  border-radius: 24px;
  padding: 18px;
  min-height: 180px;
  background: rgba(255,255,255,0.74);
}

.folder-zone.active {
  border-color: var(--blue);
  background: #f2f6ff;
}

@media (max-width: 1000px) {
  .source-grid,
  .shop-grid,
  .folder-board,
  .mini-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .data-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .choice-grid,
  .source-grid,
  .shop-grid,
  .folder-board,
  .mini-rules {
    grid-template-columns: 1fr;
  }
}

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

.click-object {
  min-height: 130px;
  border: 2px solid #e1e9fb;
  border-radius: 22px;
  background: white;
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(32, 45, 74, 0.08);
}

.click-object span { font-size: 3.3rem; }
.click-object small { color: var(--muted); font-weight: 800; }
.click-object.found { border-color: rgba(46,168,109,0.7); background: #f0fff7; }
.click-object.wrong-flash { border-color: rgba(217,74,74,0.7); background: #fff1f1; }

.catch-arena {
  position: relative;
  min-height: 360px;
  border: 3px dashed #c9d7f6;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,211,110,0.35), transparent 9rem),
    radial-gradient(circle at 80% 70%, rgba(31,182,201,0.22), transparent 10rem),
    rgba(255,255,255,0.78);
  overflow: hidden;
}

.moving-target {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 999px;
  background: white;
  font-size: 2.1rem;
  box-shadow: 0 12px 26px rgba(32, 45, 74, 0.18);
}

.word-bank {
  min-height: auto;
  margin-bottom: 18px;
}

.sentence-slots,
.timetable-grid,
.picture-scene,
.popup-grid,
.robot-layout {
  display: grid;
  gap: 14px;
}

.sentence-slots {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.sentence-slot,
.label-drop,
.time-slot {
  border: 3px dashed #c9d7f6;
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
  min-height: 64px;
  padding: 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.sentence-slot.active,
.label-drop.active,
.time-slot.active { border-color: var(--blue); background: #f2f6ff; }

.picture-scene {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.scene-object {
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 24px;
  padding: 16px;
  text-align: center;
}

.scene-object > span {
  display: block;
  font-size: 3.8rem;
  margin-bottom: 10px;
}

.timetable-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.time-slot {
  min-height: 120px;
  align-content: start;
  place-items: stretch;
  text-align: center;
}

.time-slot strong { color: var(--ink); }
.time-slot .word-tile { justify-content: center; margin: 12px 0 0; }

.scroll-box {
  max-height: 210px;
  overflow-y: auto;
  border: 2px solid #e1e9fb;
  border-radius: 22px;
  background: white;
  padding: 18px;
  line-height: 1.65;
}

.key-target {
  background: var(--ink);
  color: white;
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 900;
}

.key-catcher {
  margin-top: 18px;
  text-align: center;
  font-weight: 900;
}

.fix-list {
  display: grid;
  gap: 14px;
}

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

.fake-popup {
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 24px rgba(32, 45, 74, 0.09);
}

.popup-title {
  display: inline-block;
  background: #fff0f0;
  color: var(--danger);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  margin-bottom: 10px;
}

.robot-layout {
  grid-template-columns: 1fr 0.9fr;
  align-items: start;
}

.robot-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 24px;
  padding: 12px;
}

.robot-cell {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f4f8ff;
  border: 1px solid #dfe8fb;
  font-size: clamp(1.2rem, 4vw, 2.1rem);
  font-weight: 900;
}

.robot-side {
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 24px;
  padding: 18px;
}

.robot-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.command-list {
  min-height: 76px;
  border: 2px solid #e1e9fb;
  border-radius: 18px;
  padding: 14px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 1000px) {
  .click-grid,
  .picture-scene,
  .timetable-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sentence-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .robot-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .click-grid,
  .picture-scene,
  .timetable-grid,
  .popup-grid,
  .sentence-slots {
    grid-template-columns: 1fr;
  }
}

/* Extra upper-primary computer skills activities */
.edit-list {
  display: grid;
  gap: 14px;
}

.select-panel {
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 22px;
  padding: clamp(18px, 4vw, 30px);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.6;
  user-select: text;
}

.important-note p {
  font-size: 1.12rem;
  line-height: 1.7;
}

.ad-card select {
  margin-top: 8px;
}

.upload-box {
  background: white;
  border: 3px dashed #c9d7f6;
  border-radius: 26px;
  padding: 24px;
  text-align: center;
  margin-bottom: 18px;
}

.upload-icon {
  font-size: 3.5rem;
  margin-bottom: 6px;
}

.file-choice-grid,
.filetype-grid,
.window-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.file-choice {
  display: flex;
  gap: 10px;
  align-items: center;
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 18px;
  padding: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.filetype-card {
  display: grid;
  gap: 12px;
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 20px;
  padding: 18px;
}

.filetype-card kbd {
  justify-self: start;
  font-size: 1.15rem;
}

.fake-window {
  background: white;
  border: 2px solid #e1e9fb;
  border-radius: 18px;
  overflow: hidden;
  min-height: 170px;
}

.fake-window.maximized {
  border-color: var(--blue);
  box-shadow: 0 12px 26px rgba(50,102,227,0.18);
}

.fake-window.minimized .fake-window-body {
  display: none;
}

.fake-window.minimized {
  min-height: auto;
}

.fake-window.closed-window {
  opacity: 0.45;
}

.fake-window.closed-window .fake-window-body {
  display: none;
}

.fake-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #f4f7ff;
  border-bottom: 2px solid #e1e9fb;
  padding: 12px 14px;
}

.window-actions {
  display: flex;
  gap: 6px;
}

.window-actions button {
  width: 32px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: white;
  box-shadow: 0 4px 12px rgba(32, 45, 74, 0.1);
  font-weight: 900;
}

.fake-window-body {
  padding: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.spreadsheet-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

.fake-sheet {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(32, 45, 74, 0.08);
}

.fake-sheet th,
.fake-sheet td {
  border: 2px solid #e1e9fb;
  padding: 10px;
  text-align: left;
}

.fake-sheet th {
  background: #f4f7ff;
  font-weight: 900;
  color: var(--ink);
}

.fake-sheet td input {
  border-radius: 10px;
  padding: 10px;
}

@media (max-width: 1000px) {
  .file-choice-grid,
  .filetype-grid,
  .window-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .file-choice-grid,
  .filetype-grid,
  .window-grid {
    grid-template-columns: 1fr;
  }
}
