.cast-control {
  max-width: 48rem;
}
.cast-code-form { margin-top:2rem; }
.cast-code-boxes { display:flex; gap:clamp(.7rem,3vw,2rem); justify-content:center; margin-bottom:1.8rem; }
.cast-code-boxes input { width:clamp(3.4rem,8vw,7rem); height:clamp(4rem,9vw,7.5rem); border:3px solid transparent; border-radius:.7rem; background:#fff; color:#182541; text-align:center; font:600 clamp(2rem,5vw,4rem) system-ui; outline:none; }
.cast-code-boxes input:focus { border-color:#ffc000; box-shadow:0 0 22px #ffc00088; }
.cast-code-form button, .cast-slide-toolbar button { border:1px solid #ffffff55; background:#ffffff16; padding:.7rem 1.2rem; border-radius:.5rem; color:inherit; font:inherit; cursor:pointer; }
.cast-code-form button:disabled { opacity:.5; cursor:wait; }
.cast-slide-toolbar { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:1rem; padding:1rem 0; }
.cast-slide-toolbar small { color:#a9c6d5; font-size:.8rem; }
.cast-slide-toolbar { position:fixed; right:1rem; bottom:1rem; z-index:20; padding:.5rem; border-radius:.65rem; color:#23465e; background:#fff; box-shadow:0 4px 24px #06131e44; }
.cast-slide-toolbar button { background:#eef6fb; border-color:#d7e7f2; }
.cast-slide-toolbar small { display:none; }
@media(max-width:720px){.cast-slide-toolbar{left:1rem;right:1rem;bottom:5.5rem}}
.cast-display:has([data-pc-connect]) { background:radial-gradient(ellipse at 50% 100%,#242648,transparent 65%),#1b1b38; }
.cast-screen-waiting:has([data-pc-connect]) { display:flex; justify-content:center; text-align:center; min-height:70vh; }
.cast-screen-waiting:has([data-pc-connect]) h1 { font-size:clamp(1.6rem,4vw,3.5rem); }
.cast-screen-waiting:has([data-pc-connect]) p { font-size:clamp(.95rem,1.6vw,1.25rem); }

.academy-mobile { max-width: 56rem; }
.academy-mobile > .panel + .panel, .cast-control + .cast-control { margin-top: 1rem; }
@media (max-width: 720px) {
  .academy-workbench-nav { display: none; }
  .academy-bar { flex-wrap: nowrap; gap: .5rem; }
  .academy-bar .site-nav { flex-wrap: nowrap; gap: .75rem; }
  .academy-bar .site-nav a { white-space: nowrap; }
  .academy-actions .button { flex: 1 1 auto; }
}
.academy-kicker { color: #087f83; font-weight: 700; }
.academy-intro { background: linear-gradient(120deg, #e5f6f4, #f6fbff); }
.academy-actions { display: flex; gap: .65rem; flex-wrap: wrap; margin-block: 1rem; }
.academy-course { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; color: inherit; border-bottom: 1px solid #dce8ed; text-decoration: none; }
.academy-course > span:nth-child(2) { flex: 1; min-width: 0; }
.academy-course small, .academy-resource small { display: block; color: #617582; margin-top: .35rem; }
.academy-course-icon { padding: .6rem .9rem; border-radius: .8rem; background: #e1f3f1; color: #087f83; font-weight: 700; }
.academy-resource { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid #dce8ed; }
.academy-resource > span { overflow-wrap: anywhere; min-width: 0; }
.academy-resource button { flex: none; }
.academy-picker { border-top: 1px solid #dce8ed; padding-block: 1rem; margin-top: 1rem; }
.academy-picker summary { cursor: pointer; font-weight: 700; margin-bottom: .6rem; min-height: 2rem; }
.academy-whiteboard { display: block; width: 100%; border: 1px solid #c7dce0; background: #fff; touch-action: none; aspect-ratio: 16/9; }
.cast-code { letter-spacing: .3em; font-size: clamp(2.2rem, 5vw, 4.5rem) !important; font-variant-numeric: tabular-nums; color: #fff !important; }
.cast-stage { margin-top: 1rem; border-radius: .8rem; background: #fff; color: #183846; padding: 1rem; }
.cast-stage h2 { font-size: clamp(1.1rem, 2vw, 2rem); margin: 0 0 1rem; }
.cast-stage img, .cast-stage video, .cast-stage canvas { display: block; max-width: 100%; max-height: 75vh; margin: auto; object-fit: contain; }
.cast-stage [data-text] { padding: clamp(1rem, 3vw, 3rem); font-size: clamp(1.3rem, 2.6vw, 2.8rem); white-space: pre-wrap; line-height: 1.7; overflow-wrap: anywhere; }
.cast-stage p { font-size: 1rem; }
.cast-stage p:empty { display: none; }
.cast-stage [data-page-number] { margin:.5rem 0 0; text-align:center; }
.cast-display:has(.cast-stage:not([hidden])) { padding: clamp(.75rem, 2vw, 2rem); }
.cast-display:has(.cast-stage:not([hidden])) .cast-stage h2 { margin-bottom: .5rem; }
.cast-display:has(.cast-stage:not([hidden])) .cast-screen-content { padding-bottom: 1rem; }
.cast-screen-content:has(.cast-stage:not([hidden])) { padding-top: 1rem; }
.cast-screen-content:has(.cast-stage:not([hidden])) > h1 { font-size: 1.5rem; }
.cast-screen-content:has(.cast-stage:not([hidden])) > p { font-size: 1rem; }

.cast-form {
  display: grid;
  justify-items: start;
  gap: .75rem;
  margin-top: 1rem;
}

.cast-form > div {
  width: 100%;
}

.cast-selection {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.75rem;
  margin-block: 1rem;
}

.cast-selection dd {
  margin: .2rem 0 0;
  font-weight: 650;
}

.cast-display {
  box-sizing: border-box;
  min-height: 100vh;
  margin: 0;
  padding: clamp(1.25rem, 4vw, 4rem);
  color: #e7f5f5;
  background: radial-gradient(ellipse at 80% 3%, #154c50, transparent 58%), #09242a;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

.cast-display *,
.cast-display *::before,
.cast-display *::after {
  box-sizing: inherit;
}

.cast-display [hidden] {
  display: none;
}

.cast-display a {
  color: #ceeeee;
}

.cast-display-bar {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px solid #62939766;
  padding-bottom: .75rem;
}

.cast-display-brand {
  color: #ceeeee;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 700;
}

.cast-display-bar button {
  border: 1px solid #81bcbe;
  border-radius: .5rem;
  min-height: 2.75rem;
  padding: .4rem .85rem;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.cast-display :focus-visible {
  outline: 3px solid #a8e2dd;
  outline-offset: 4px;
}

.cast-screen-waiting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 23rem);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  min-height: 60vh;
  padding: clamp(1rem, 4vw, 3rem) 0;
}

.cast-screen-waiting p, .cast-screen-content > p {
  color: #add6d7;
  font-size: clamp(1.15rem, 2vw, 2rem);
  line-height: 1.6;
}

.cast-display h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 6rem);
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.cast-screen-waiting img {
  display: block;
  background: white;
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

.cast-screen-content {
  min-height: 60vh;
  padding: clamp(1rem, 6vw, 5rem) 0;
}

.cast-screen-content > p {
  margin-top: 0;
}

.cast-screen-message {
  margin-top: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #62939788;
  border-radius: .75rem;
  background: #10383c;
  font-size: clamp(1.2rem, 3vw, 3rem);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cast-display-status {
  color: #add6d7;
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .cast-screen-waiting {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    justify-items: start;
  }

  .cast-screen-waiting a {
    width: min(100%, 17rem);
  }
}
