:root {
  --paper: #f4f1ea;
  --ink: #1c1a17;
  --muted: #71695e;
  --line: rgba(28, 26, 23, 0.14);
  --card: #fbf9f4;
  --accent: #c8552b;
  --accent-dark: #9f3d1d;
  --green: #3e7d5a;
  --blue: #2f5f73;
  --danger: #b23a2e;
  --shadow: 0 22px 60px rgba(28, 26, 23, 0.12);
  font-family: Inter, "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.student-bg {
  background:
    linear-gradient(90deg, rgba(200, 85, 43, 0.08), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(62, 125, 90, 0.14), transparent 30%),
    var(--paper);
}

.projector-bg {
  background: var(--paper);
  color: var(--ink);
}

.admin-bg {
  background: #eee8dc;
}

.entry-shell,
.activity-shell,
.admin-shell,
.projector-shell,
.preview-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.entry-shell {
  padding: 32px 0 48px;
}

.activity-shell {
  padding: 12px 0 24px;
}


.entry-hero {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.eyebrow,
.activity-nav span,
.section-head span,
.card-kicker,
.focus-meta {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.entry-hero h1 {
  margin-bottom: 6px;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1;
}

.entry-hero p,
.section-head p {
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 249, 244, 0.92);
  box-shadow: var(--shadow);
}

.menu-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.name-card {
  max-width: 720px;
  flex: 0 0 auto;
}

.identity-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 249, 244, 0.86);
  flex: 0 0 auto;
}

.identity-strip span {
  color: var(--muted);
  font-weight: 800;
}

.identity-strip strong {
  font-size: 18px;
}

.identity-strip button {
  margin-left: auto;
}

.menu-link {
  display: grid;
  gap: 4px;
  min-height: 100px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.menu-link span {
  color: var(--accent);
  font-weight: 900;
}

.menu-link strong {
  font-size: 20px;
}

.menu-link em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.4;
  font-size: 13px;
}

.menu-link.done {
  opacity: 0.45;
  border-color: #d0cbc0;
  background: #f0ede6;
}
.menu-link.done span,
.menu-link.done strong,
.menu-link.done em { color: #1C1A17; }

.activity-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  margin-bottom: 8px;
}

.activity-nav a,
.secondary,
.inline-next {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  font-weight: 800;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.form-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.section-head {
  display: grid;
  gap: 2px;
  flex: 0 0 auto;
}

.section-head h1,
.section-head h2 {
  margin-bottom: 0;
  font-size: clamp(20px, 3.5vw, 36px);
  line-height: 1.08;
}

label {
  display: grid;
  gap: 4px;
  font-weight: 800;
}

label span {
  color: var(--ink);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(28, 26, 23, 0.22);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
  outline: none;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 85, 43, 0.14);
}

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

.one-col {
  grid-template-columns: 1fr;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  font-weight: 800;
  line-height: 1.4;
  font-size: 14px;
}

.choice input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.large-choice {
  min-height: 56px;
  font-size: 15px;
}

.large-choice strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}

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

.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.primary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  font-size: 14px;
}

.primary:hover {
  background: var(--accent-dark);
}

.danger {
  background: var(--danger);
}

.primary:disabled {
  cursor: wait;
  opacity: 0.72;
}

.submit-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  color: var(--green);
  font-weight: 900;
  font-size: 14px;
  flex: 0 0 auto;
}

.submit-feedback.error {
  color: var(--danger);
}

.submit-feedback.info {
  color: var(--blue);
}

.badge-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.next-nav {
  margin-top: 16px;
  text-align: center;
}

.next-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 52px;
  padding: 0 32px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(200, 85, 43, 0.3);
}

.next-btn:hover {
  background: var(--accent-dark);
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.projector-shell {
  width: min(1440px, calc(100vw - 64px));
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  overflow: hidden;
}

.projector-header,
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.projector-header h1,
.admin-header h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

.admin-header .eyebrow {
  font-size: 11px;
}

.admin-actions .secondary,
.admin-actions .danger {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Card entrance: subtle bounce-up */
.proj-content .bar-stack,
.proj-content .upload-wall,
.proj-content .card-list,
.proj-content .projector-grid,
.proj-content .option-notes,
.proj-content > section {
  animation: cardEntrance 0.4s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Stagger: children enter one after another */
.proj-content .upload-card,
.proj-content .bar-row,
.proj-content .card-list article,
.proj-content .progress-row,
.proj-content .admin-row {
  animation: cardEntrance 0.35s cubic-bezier(.2,.7,.2,1) both;
}
.proj-content .upload-card:nth-child(1),
.proj-content .bar-row:nth-child(1),
.proj-content .card-list article:nth-child(1) { animation-delay: 0.02s; }
.proj-content .upload-card:nth-child(2),
.proj-content .bar-row:nth-child(2),
.proj-content .card-list article:nth-child(2) { animation-delay: 0.05s; }
.proj-content .upload-card:nth-child(3),
.proj-content .bar-row:nth-child(3),
.proj-content .card-list article:nth-child(3) { animation-delay: 0.08s; }
.proj-content .upload-card:nth-child(4),
.proj-content .bar-row:nth-child(4),
.proj-content .card-list article:nth-child(4) { animation-delay: 0.11s; }
.proj-content .upload-card:nth-child(5),
.proj-content .bar-row:nth-child(5),
.proj-content .card-list article:nth-child(5) { animation-delay: 0.14s; }
.proj-content .upload-card:nth-child(6),
.proj-content .bar-row:nth-child(6),
.proj-content .card-list article:nth-child(6) { animation-delay: 0.17s; }

/* Loading pulse for status bar */
@keyframes loadingPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.3; }
}


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

.projector-grid section,
.projector-focus {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
}

.projector-grid h2,
.projector-focus h2 {
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.08;
}

.projector-focus > p {
  max-width: 1060px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.4;
}

.bar-stack {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(200px, 0.6fr) 1fr 80px;
  align-items: center;
  gap: 18px;
  font-size: 24px;
}

.bar-label {
  line-height: 1.3;
}

.bar-track {
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #efe8db;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #c8552b;
}

.bar-row.correct .bar-track span {
  background: #3e7d5a;
}

.bar-row strong {
  font-size: 30px;
  text-align: right;
}

.scoreline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.scoreline span {
  padding: 10px 14px;
  border-radius: 999px;
  background: #efe8db;
  color: var(--ink);
  font-weight: 900;
}

.case-note {
  margin-top: 26px;
  padding: 20px;
  border-left: 6px solid #3e7d5a;
  background: rgba(62, 125, 90, 0.08);
}

.case-note strong {
  color: #2d6a4f;
}

.case-note p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 26px;
}

.option-notes {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.option-notes div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.option-notes div.correct {
  border-color: rgba(62, 125, 90, 0.4);
  background: rgba(62, 125, 90, 0.06);
}

.option-notes b,
.option-notes span {
  display: block;
  color: var(--ink);
}

.option-notes b {
  margin-bottom: 6px;
  font-size: 22px;
}

.option-notes span {
  font-size: 20px;
  line-height: 1.38;
}

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

.upload-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.upload-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.upload-thumb {
  width: 100%;
  height: 150px;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  margin-top: 6px;
}

.upload-thumb object {
  width: 200%;
  height: 200%;
  border: 0;
  transform: scale(0.5);
  transform-origin: 0 0;
  pointer-events: none;
}

.card-list article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.card-list p {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.4;
}

.card-list small,
.card-list a {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
}

.empty {
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 24px;
  text-align: center;
}

.admin-shell,
.preview-shell {
  width: min(1280px, calc(100vw - 40px));
  height: 100dvh;
  padding: 12px 16px;
  overflow-y: auto;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 0.6fr;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-grid .panel {
  padding: 10px 12px;
}

.admin-grid .panel .section-head h2 {
  font-size: 15px;
}

.admin-grid .panel .section-head p {
  font-size: 12px;
}

.admin-grid .panel .link-grid {
  margin-top: 8px;
}

.admin-grid .stat-grid {
  margin-top: 8px;
}

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

.link-grid a {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  font-weight: 800;
  font-size: 13px;
}

.link-grid a.done {
  opacity: 0.4;
  background: #f0ede6;
  border-color: #d0cbc0;
}
.link-grid a.done:before { content: '✓ '; }

.stat-grid {
  display: grid;
  gap: 8px;
}

.stat-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
}

.stat-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.stat-card strong {
  font-size: 32px;
}

.admin-rows {
  display: grid;
  gap: 8px;
}

.checklist-progress {
  display: grid;
  gap: 8px;
}

.progress-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
}

.progress-row.ready {
  border-color: rgba(62, 125, 90, 0.46);
  box-shadow: inset 0 0 0 2px rgba(62, 125, 90, 0.1);
}

.progress-row header,
.progress-row footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.progress-row header strong {
  font-size: 14px;
}

.progress-row header span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-row header a {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: #fffdf8;
  font-weight: 900;
  font-size: 12px;
}

.progress-meter {
  height: 8px;
  margin: 8px 0 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #efe8db;
}

.progress-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #c8552b;
}

.progress-row.ready .progress-meter span {
  background: #3e7d5a;
}

.progress-row footer {
  flex-wrap: wrap;
  justify-content: flex-start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-row footer b {
  margin-left: auto;
  color: var(--ink);
}

.admin-shell > .panel {
  padding: 10px 12px;
  margin-bottom: 8px;
}

.admin-shell > .panel .section-head h2 {
  font-size: 16px;
}

.admin-shell > .panel .section-head p {
  font-size: 12px;
}

.admin-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
}

.admin-row header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.admin-row p {
  margin: 3px 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 12px;
}

.admin-row b {
  display: inline-block;
  min-width: 60px;
  color: var(--ink);
  font-size: 12px;
}

@media (max-width: 760px) {
  .entry-shell,
  .activity-shell,
  .admin-shell,
  .projector-shell,
  .preview-shell {
    width: min(100vw - 20px, 680px);
  }

  .menu-panel,
  .choice-grid,
  .sentence-grid,
  .admin-grid,
  .projector-grid,
  .card-list,
  .upload-wall,
  .projector-menu,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .projector-header,
  .admin-header {
    flex-direction: column;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bar-row strong {
    text-align: left;
  }
}

/* UI refresh: operational workshop interface */
:root {
  --paper: #f6f7fb;
  --ink: #18212f;
  --muted: #657085;
  --line: rgba(24, 33, 47, 0.13);
  --card: #ffffff;
  --surface-soft: #eef3f8;
  --accent: #d34f35;
  --accent-dark: #a93a29;
  --green: #21745f;
  --blue: #315f88;
  --danger: #b42318;
  --shadow: 0 18px 48px rgba(24, 33, 47, 0.11);
}

body {
  background: var(--paper);
}

.student-bg,
.admin-bg,
.projector-bg {
  background:
    linear-gradient(180deg, #ffffff 0, #f7f8fb 210px, #eef2f7 100%);
}

.entry-shell,
.activity-shell,
.admin-shell,
.preview-shell {
  width: min(1180px, calc(100vw - 32px));
}

.entry-shell {
  padding: 24px 0 40px;
}

.activity-shell {
  padding: 18px 0 32px;
}

.entry-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  margin-bottom: 14px;
}

.hero-copy,
.hero-status,
.phase-section,
.coach-panel,
.activity-card,
.identity-strip,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-status {
  padding: 22px 24px;
}

.entry-hero h1 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.03;
}

.entry-hero p,
.section-head p,
.coach-panel p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.hero-status {
  display: grid;
  align-content: start;
  gap: 12px;
}

.hero-status h2,
.phase-head h2,
.coach-panel h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.rule-list,
.coach-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-list li,
.coach-list li,
.callout {
  padding: 10px 12px;
  border: 1px solid rgba(49, 95, 136, 0.16);
  border-radius: 8px;
  background: #f7fafc;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.identity-strip {
  margin-bottom: 14px;
  padding: 12px 16px;
  background: #ffffff;
}

.identity-strip .identity-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.identity-strip span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identity-strip strong {
  font-size: 18px;
}

.timeline-board {
  display: grid;
  gap: 14px;
}

.phase-section {
  overflow: hidden;
  background: #ffffff;
}

.phase-head {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #f8fafc, #ffffff);
}

.phase-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.phase-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.menu-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  box-shadow: none;
  border: 0;
  background: transparent;
}

.menu-link {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.menu-link:hover {
  transform: translateY(-1px);
  border-color: rgba(211, 79, 53, 0.38);
  box-shadow: 0 12px 28px rgba(24, 33, 47, 0.08);
}

.step-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 32px;
  border-radius: 8px;
  background: rgba(211, 79, 53, 0.09);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.step-copy {
  min-width: 0;
}

.step-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.25;
}

.step-copy em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.menu-link.done {
  opacity: 1;
  border-color: rgba(33, 116, 95, 0.35);
  background: #f6fbf8;
}

.menu-link.done::after {
  content: "已完成";
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(33, 116, 95, 0.12);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.activity-nav {
  margin-bottom: 12px;
}

.activity-nav a,
.secondary,
.inline-next {
  min-height: 40px;
  border-radius: 8px;
  background: #ffffff;
}

.activity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.activity-card {
  min-height: calc(100dvh - 104px);
}

.coach-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  position: sticky;
  top: 16px;
}

.coach-panel .eyebrow {
  font-size: 12px;
}

.callout {
  border-color: rgba(211, 79, 53, 0.2);
  background: rgba(211, 79, 53, 0.06);
  color: var(--accent-dark);
  font-weight: 800;
}

.question-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eaf1;
}

.question-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--green));
}

.form-stack {
  gap: 14px;
  padding: 18px 20px;
}

.section-head {
  gap: 6px;
}

.section-head h1,
.section-head h2 {
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.08;
}

.microcopy {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: rgba(49, 95, 136, 0.07);
  color: var(--ink) !important;
  font-weight: 750;
}

.choice-grid {
  gap: 10px;
}

.choice {
  align-items: center;
  min-height: 54px;
  padding: 13px 14px;
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.choice:hover,
.choice:has(input:checked) {
  border-color: rgba(211, 79, 53, 0.5);
  background: rgba(211, 79, 53, 0.05);
  box-shadow: inset 0 0 0 1px rgba(211, 79, 53, 0.16);
}

.large-choice strong {
  background: var(--ink);
}

input,
select,
textarea {
  min-height: 42px;
  border-radius: 8px;
  background: #ffffff;
}

.primary,
.danger {
  min-height: 44px;
  border-radius: 8px;
}

.button-row {
  justify-content: flex-end;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tool-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.tool-card:hover,
.tool-card.selected,
.tool-card:has(input:checked) {
  border-color: rgba(211, 79, 53, 0.5);
  background: rgba(211, 79, 53, 0.05);
  box-shadow: inset 0 0 0 1px rgba(211, 79, 53, 0.16);
}

.tool-card input {
  display: none;
}

.tool-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.tool-card .name {
  font-size: 15px;
  font-weight: 900;
}

.tool-card .desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.preview-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.preview-strip .file-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}

.preview-strip .file-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 30px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.prompt-card {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.prompt-card .card-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #f8fafc, #ffffff);
}

.prompt-card .card-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prompt-card .card-head h3 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.prompt-card .prompt-body {
  flex: 1;
  max-height: 380px;
  overflow: auto;
  padding: 14px 16px;
  background: #f7fafc;
  color: #273244;
  font-family: "Cascadia Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-card .card-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  text-align: right;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(211, 79, 53, 0.5);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.copy-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

.copy-btn.copied {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.template-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(24, 33, 47, 0.12);
}

.mock-browser {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.mock-browser .dots {
  display: flex;
  gap: 5px;
}

.mock-browser .dots span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #cbd5e1;
}

.mock-browser .dots span:nth-child(1) {
  background: #ef766d;
}

.mock-browser .dots span:nth-child(2) {
  background: #e2b84b;
}

.mock-browser .dots span:nth-child(3) {
  background: #45b36b;
}

.mock-browser .url-bar {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 4px 8px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-preview {
  position: relative;
  height: 210px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.mock-preview object {
  width: 200%;
  height: 200%;
  border: 0;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: 0 0;
}

.template-card .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px 16px;
}

.template-card .card-body h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.template-card .card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.template-card .feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.template-card .feature-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(49, 95, 136, 0.09);
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.template-card .card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.template-card .card-actions a {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.template-card .card-actions .open-btn {
  border: 0;
  background: var(--accent);
  color: #ffffff;
}

.template-card .card-actions .open-btn:hover {
  background: var(--accent-dark);
}

.completed-card {
  position: static;
  max-width: 560px;
  margin: 18vh auto 0;
}

.playground-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.playground-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.playground-card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #f8fafc, #ffffff);
}

.playground-card .card-head h3 {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.try-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(211, 79, 53, 0.5);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
}

.try-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

.preview-box {
  position: relative;
  height: 230px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.preview-box object {
  width: 200%;
  height: 200%;
  border: 0;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: 0 0;
}

.click-shim {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(24, 33, 47, 0.04);
  color: var(--accent);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  opacity: 0;
  text-align: center;
  transition: opacity 0.16s ease;
}

.preview-box:hover .click-shim {
  opacity: 1;
}

.playground-card .card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.playground-card .feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.playground-card .feature-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(49, 95, 136, 0.09);
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 33, 47, 0.86);
}

.fullscreen-overlay.active {
  display: flex;
}

.fullscreen-overlay iframe {
  width: min(1120px, 92vw);
  height: min(760px, 88vh);
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.38);
}

.fullscreen-overlay .close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-size: 24px;
}

.admin-shell {
  width: min(1320px, calc(100vw - 32px));
  height: 100dvh;
  padding: 16px 0 28px;
  overflow-y: auto;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 12px 0;
  margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(247, 248, 251, 0.98), rgba(247, 248, 251, 0.82));
  backdrop-filter: blur(10px);
}

.admin-header h1 {
  font-size: 28px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-card {
  padding: 16px;
}

.admin-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: 12px;
  margin-bottom: 12px;
}

.admin-grid-wide {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

.admin-stats {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 10px;
}

.admin-stats .big-num {
  color: var(--accent);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}

.admin-stats .big-num small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 15px;
}

.current-time {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(49, 95, 136, 0.09);
  color: var(--blue);
  font-weight: 900;
}

.participant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.participant-chip.done {
  border-color: rgba(33, 116, 95, 0.35);
  background: #f2faf6;
  color: var(--green);
}

.link-grid {
  margin-top: 12px;
}

.link-grid a {
  min-height: 46px;
  padding: 12px;
  border-radius: 8px;
  background: #ffffff;
  line-height: 1.35;
}

.progress-row {
  border-radius: 8px;
  background: #ffffff;
}

.progress-row header strong {
  font-size: 15px;
}

.progress-row header a {
  border-radius: 8px;
  background: var(--blue);
}

.progress-row.ready header a {
  background: var(--green);
}

.progress-meter {
  height: 10px;
  background: #e4eaf1;
}

.projector-shell {
  width: min(1480px, calc(100vw - 48px));
  height: 100dvh;
  padding: 22px 0;
}

.projector-header {
  align-items: flex-start;
  padding: 14px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.projector-header h1 {
  margin: 4px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
}

.projector-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pause-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 850;
}

.pause-btn:hover {
  border-color: rgba(49, 95, 136, 0.32);
  background: #f7fafc;
}

.pause-btn.paused {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.proj-content {
  padding-bottom: 18px;
}

.projector-grid section,
.projector-focus,
.card-list article,
.upload-card,
.option-notes div {
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(24, 33, 47, 0.08);
}

.projector-grid h2,
.projector-focus h2 {
  margin-bottom: 12px;
}

.projector-focus > p {
  color: var(--muted);
}

.empty {
  background: #ffffff;
}

@media (max-width: 860px) {
  .entry-hero,
  .activity-layout {
    grid-template-columns: 1fr;
  }

  .coach-panel {
    position: static;
    order: -1;
  }

  .activity-card {
    min-height: auto;
  }

  .menu-panel,
  .tool-grid,
  .playground-grid,
  .sentence-grid,
  .admin-grid,
  .admin-grid-wide {
    grid-template-columns: 1fr;
  }

  .entry-shell,
  .activity-shell,
  .admin-shell,
  .projector-shell,
  .preview-shell {
    width: min(100vw - 20px, 680px);
  }

  .hero-copy,
  .hero-status,
  .phase-head,
  .form-stack,
  .coach-panel {
    padding: 16px;
  }

  .menu-link {
    min-height: 96px;
  }
}
