#class-stopwatch {
  --stopwatch-background: #182633;
  position: fixed;
  z-index: 90;
  box-sizing: border-box;
  width: min(310px, calc(100vw - 16px));
  background: var(--stopwatch-background);
  color: #edf6fc;
  border: 1px solid #7791a4;
  border-radius: 10px;
  box-shadow: 0 6px 22px #08101999;
  font-size: 14px;
}
#class-stopwatch [hidden], #class-stopwatch[hidden] { display: none; }
.class-stopwatch-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #253e50;
  border-radius: 9px 9px 0 0;
}
.class-stopwatch-head strong { flex: 1; }
#class-stopwatch button {
  border: 1px solid #688496;
  background: #233a4d;
  color: #f2f8ff;
  padding: 6px 9px;
  border-radius: 5px;
  font: inherit;
  cursor: pointer;
}
#class-stopwatch button:focus-visible { outline: 2px solid #ffcf66; outline-offset: 2px; }
#class-stopwatch button:disabled { opacity: .5; cursor: default; }
#class-stopwatch .class-stopwatch-grip { cursor: grab; touch-action: none; padding: 3px 7px; }
#class-stopwatch .class-stopwatch-grip:active { cursor: grabbing; }
#class-stopwatch-body { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 0 12px; padding: 11px 12px 0; }
.class-stopwatch-timers, .class-stopwatch-breakdown { display: contents; }
.class-stopwatch-timers > :is(.class-stopwatch-actions, form, p) { grid-column: 1 / -1; padding-inline: 0; }
.class-stopwatch-roles, .class-stopwatch-time-label, .class-stopwatch-breakdown > :is(h2, ol) { display: none; }
.class-stopwatch-pie { position: relative; aspect-ratio: 1; border-radius: 50%; border: 1px solid #89aabb; }
#class-stopwatch-body > .class-stopwatch-pie { grid-column: 1; grid-row: 1 / span 2; }
.class-stopwatch-class-time { grid-column: 2; grid-row: 1; }
.class-stopwatch-task-time { grid-column: 2; grid-row: 2; }
.class-stopwatch-actions { grid-row: 3; }
#class-stopwatch-edit { grid-row: 4; }
.class-stopwatch-message { grid-row: 5; }
.class-stopwatch-slice-labels { display: none; }
.class-stopwatch-class-time, .class-stopwatch-task-time { display: grid; min-width: 0; gap: 2px; }
.class-stopwatch-remaining { color: #c3d8e6; font-variant-numeric: tabular-nums; }
.class-stopwatch-remaining::after { content: ' left in task'; }
.class-stopwatch-elapsed, .class-stopwatch-mini { font-variant-numeric: tabular-nums; font-weight: 800; color: #ffd166; }
.class-stopwatch-elapsed { font-size: 27px; line-height: 1; }
.class-stopwatch-class-time small, .class-stopwatch-task-time small { color: #c3d8e6; }
.class-stopwatch-topic { margin-top: 3px; }
.class-stopwatch-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 10px; }
#class-stopwatch [data-stopwatch="start"] { background: #ffb358; border-color: #ffb358; color: #182633; font-weight: 800; }
#class-stopwatch-edit { padding: 0 12px 10px; }
.class-stopwatch-fields { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; }
.class-stopwatch-fields label { display: grid; gap: 2px; font-size: .9em; }
.class-stopwatch-fields input { box-sizing: border-box; width: 4.1em; padding: 5px; border: 1px solid #7791a4; border-radius: 4px; background: #10202c; color: inherit; font: inherit; }
.class-stopwatch-message { margin: 0; padding: 0 12px 10px; color: #ffd166; }
#class-stopwatch.class-stopwatch-full {
  position: fixed;
  inset: 0 !important;
  z-index: 10000;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: auto;
  font-size: clamp(14px, 2vw, 20px);
}
#class-stopwatch.class-stopwatch-full:not([hidden]) { display: flex; flex-direction: column; }
#class-stopwatch.class-stopwatch-full .class-stopwatch-head { position: sticky; top: 0; z-index: 1; flex: none; padding: 10px clamp(12px, 3vw, 40px); border-radius: 0; }
#class-stopwatch.class-stopwatch-full :is(.class-stopwatch-grip, [data-stopwatch="collapse"]) { display: none; }
#class-stopwatch.class-stopwatch-full #class-stopwatch-body {
  width: 100%;
  flex: 1 0 auto;
  padding: clamp(20px, 3dvh, 36px) clamp(12px, 2vw, 36px);
  box-sizing: border-box;
  grid-template-columns: minmax(145px, .65fr) minmax(0, 1.55fr) minmax(300px, 2.8fr);
  grid-template-rows: 1fr auto;
  gap: 12px clamp(12px, 2vw, 32px);
}
#class-stopwatch.class-stopwatch-full #class-stopwatch-body > .class-stopwatch-pie {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: center;
  margin-top: clamp(20px, 8dvh, 88px);
  width: min(100%, 610px, max(210px, 64dvh));
  box-sizing: border-box;
  container-type: inline-size;
}
@media (min-width: 1200px) {
  #class-stopwatch.class-stopwatch-full #class-stopwatch-body > .class-stopwatch-pie {
    translate: -2.5vw 0;
  }
}
#class-stopwatch.class-stopwatch-full .class-stopwatch-roles {
  display: block;
  margin-bottom: 24px;
}
.class-stopwatch-logo {
  display: block;
  width: min(100%, clamp(96px, 16dvh, 160px));
  height: auto;
  margin-bottom: clamp(20px, 4dvh, 40px);
  border-radius: 50%;
}
#class-stopwatch :is(.class-stopwatch-roles, .class-stopwatch-breakdown) h2 { margin: 0 0 12px; font-size: 1.1em; }
.class-stopwatch-roles ul { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.class-stopwatch-roles li { display: flex; align-items: center; gap: 8px; }
.class-stopwatch-roles li span { width: .85em; height: .85em; border-radius: 50%; background: var(--role-color); }
#class-stopwatch.class-stopwatch-full .class-stopwatch-timers {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
#class-stopwatch.class-stopwatch-full .class-stopwatch-class-time { margin-top: auto; }
#class-stopwatch.class-stopwatch-full .class-stopwatch-class-time {
  padding: clamp(10px, 1.5vw, 20px);
  border: 1px solid #56758a;
  border-radius: 8px;
  background: #203648;
}
#class-stopwatch.class-stopwatch-full .class-stopwatch-time-label { display: block; font-weight: 700; }
#class-stopwatch.class-stopwatch-full .class-stopwatch-task-time { display: none; }
#class-stopwatch.class-stopwatch-full .class-stopwatch-actions { margin-top: 8px; }
#class-stopwatch.class-stopwatch-full .class-stopwatch-slice-labels { display: block; }
.class-stopwatch-slice-labels span {
  position: absolute;
  left: var(--slice-x);
  top: var(--slice-y);
  transform: translate(-50%, -50%) rotate(var(--slice-angle));
  color: #f8fcff;
  font-size: var(--slice-size);
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 3px #0b141e, 0 0 4px #0b141e;
  pointer-events: none;
}
.class-stopwatch-slice-labels .is-current { color: #ffd166; }
.class-stopwatch-popout body > :not(#class-stopwatch, #pitchSlideDialog[open], #pitchCameraDialog[open]),
.class-stopwatch-popout #class-stopwatch [data-stopwatch="popout"] { display: none !important; }
#class-stopwatch.class-stopwatch-full .class-stopwatch-elapsed { font-size: clamp(29px, 5vw, 52px); }
#class-stopwatch.class-stopwatch-full .class-stopwatch-topic { font-size: clamp(16px, 2.5vw, 28px); }
#class-stopwatch.class-stopwatch-full .class-stopwatch-breakdown {
  display: block;
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  align-self: start;
}
.class-stopwatch-session, .class-stopwatch-school { display: none; }
#class-stopwatch.class-stopwatch-full :is(.class-stopwatch-session, .class-stopwatch-school) {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffd166;
  font-weight: 700;
}
.class-stopwatch-session { margin-bottom: 12px; }
:is(.stopwatch-project-progress, .stopwatch-fun-videos) { display: none; }
#class-stopwatch.class-stopwatch-full :is(.stopwatch-project-progress, .stopwatch-fun-videos) {
  display: block;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #537488;
  border-radius: 6px;
  background: #203648;
}
:is(.stopwatch-project-progress, .stopwatch-fun-videos) > summary { color: #ffd166; cursor: pointer; font-weight: 700; }
.stopwatch-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  padding-top: 10px;
}
.stopwatch-video-grid iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.stopwatch-video-grid a { display: inline-block; margin-top: 6px; color: #a5dcff; }
.stopwatch-project-preview { padding: 10px 0; }
.stopwatch-project-preview h3, .stopwatch-project-preview p { margin: 0 0 8px; }
.stopwatch-project-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.stopwatch-project-step {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 8px;
  border-top: 3px solid var(--stage-color);
  background: #203648;
  overflow-wrap: anywhere;
}
.stopwatch-project-step[data-stage="0"] { --stage-color: #4eafff; }
.stopwatch-project-step[data-stage="1"] { --stage-color: #af85dd; }
.stopwatch-project-step[data-stage="2"] { --stage-color: #ffa64c; }
.stopwatch-project-step[data-stage="3"] { --stage-color: #52d785; }
.stopwatch-project-step[aria-current="step"] { outline: 2px solid #ffd166; }
.stopwatch-project-step b { color: #ffd166; }
.stopwatch-project-step .example-art { display: block; aspect-ratio: 4 / 3; min-height: 0; }
.stopwatch-project-dialog .stopwatch-project-preview { padding: 16px; overflow: auto; }
.stopwatch-project-dialog .stopwatch-project-steps { max-width: 1100px; margin-inline: auto; }
@media (max-width: 600px) {
  .stopwatch-project-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.class-stopwatch-school { grid-column: 3; justify-self: end; }
#class-stopwatch :is(.class-stopwatch-session, .class-stopwatch-school) select {
  min-width: 4em;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid #688496;
  border-radius: 4px;
  background: #233a4d;
  color: #f2f8ff;
  font: inherit;
}
#class-stopwatch.class-stopwatch-full .class-stopwatch-breakdown > h2 {
  display: block;
  font-size: clamp(20px, 1.65vw, 30px);
}
#class-stopwatch.class-stopwatch-full .class-stopwatch-breakdown > ol {
  display: grid;
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  font-size: clamp(18px, 1.45vw, 28px);
  max-height: 79dvh;
  overflow: auto;
  overscroll-behavior: contain;
}
.class-stopwatch-breakdown > ol > li {
  border-inline-start: 3px solid var(--task-color);
  background: #203648;
  min-width: 0;
}
.class-stopwatch-breakdown > ol > li[aria-current="step"] { background: #34566a; color: #ffd166; font-weight: 700; }
.class-stopwatch-breakdown > ol > li:not(:nth-child(5)) {
  border-inline-end: 2px solid #537488;
  border-block-end: 1px solid #162532;
}
.class-stopwatch-breakdown > ol > li:is(:first-child, :nth-child(6)) {
  border-block-start: 2px solid #537488;
  border-start-start-radius: 6px;
  border-start-end-radius: 6px;
}
.class-stopwatch-breakdown > ol > li:is(:nth-child(4), :last-child) {
  border-block-end: 2px solid #537488;
  border-end-start-radius: 6px;
  border-end-end-radius: 6px;
}
.class-stopwatch-breakdown > ol > li:nth-child(5) {
  margin-block: 8px;
  background: #101d28;
}
.class-stopwatch-breakdown > ol > li:nth-child(5)[aria-current="step"] {
  box-shadow: inset 0 0 0 1px #537488;
}
.class-stopwatch-breakdown > ol > li[aria-current="step"] summary {
  font-size: clamp(23px, 1.9vw, 36px);
}
.class-stopwatch-breakdown summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: clamp(7px, 1dvh, 12px) 12px;
  cursor: pointer;
}
.class-stopwatch-breakdown summary::-webkit-details-marker { display: none; }
.class-stopwatch-breakdown summary::before { content: '▸'; }
.class-stopwatch-breakdown details[open] > summary::before { content: '▾'; }
.class-stopwatch-breakdown summary small { color: #c3d8e6; }
.class-stopwatch-breakdown summary .class-stopwatch-task-duration { margin-inline-start: auto; }
.class-stopwatch-task-content {
  padding: 12px;
  background: #162532;
  color: #e6f3fb;
  font-size: 1rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.class-stopwatch-task-content:empty { display: none; }
.student-task-pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(195px, 27%)), 1fr)); gap: 12px; }
.student-task-pair { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.student-task-pair .student-media-card { width: 100%; max-width: none; margin: 0; }
.student-task-pair .timer-media-frame:not(:fullscreen):not(.timer-media-expanded) { aspect-ratio: 16 / 9; }
.student-task-pair .student-step-grid { flex: 1; grid-template-columns: minmax(0, 1fr); margin: 0; }
.class-stopwatch-task-content .btn { display: inline-block; margin-top: 8px; }
.stopwatch-presentation-students { padding: 12px; margin-bottom: 12px; background: #203648; border: 1px solid #56758a; }
.stopwatch-presentation-students select { max-width: 100%; padding: 6px; margin-inline-start: 6px; }
.stopwatch-presentation-result h4 { margin: 12px 0 4px; }
.stopwatch-slide-preview { margin-block: 12px; }
.stopwatch-presentation-feedback { margin-block: 12px 0; }
.stopwatch-presentation-feedback summary { padding-inline: 0; font-weight: 700; }
.stopwatch-presentation-feedback article { border-top: 1px solid #56758a; }
.stopwatch-presentation-feedback article p { white-space: pre-wrap; }
.stopwatch-attendance-preview {
  display: grid;
  gap: 8px;
  width: min(100%, 360px);
  box-sizing: border-box;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #56758a;
  border-radius: 6px;
  background: #203648;
  color: #f2f8ff;
  text-decoration: none;
}
.stopwatch-attendance-preview:hover, .stopwatch-attendance-preview:focus-visible { border-color: #ffd166; }
.stopwatch-attendance-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 0;
  border-block: 1px solid #56758a;
  color: #c3d8e6;
  font-size: .85em;
}
.stopwatch-attendance-preview-action { color: #ffd166; }
.stopwatch-attendance-dialog {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: #30343b;
  color: #f2f8ff;
}
.stopwatch-attendance-dialog[open] { display: flex; flex-direction: column; }
.stopwatch-attendance-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #253e50;
}
.stopwatch-attendance-dialog > iframe { flex: 1; min-height: 0; width: 100%; border: 0; }
.stopwatch-attendance-embedded :is(#topbar, #botbar) { display: none; }
.class-stopwatch-task-duration { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  #class-stopwatch.class-stopwatch-full #class-stopwatch-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  #class-stopwatch.class-stopwatch-full #class-stopwatch-body > :is(.class-stopwatch-timers, .class-stopwatch-pie, .class-stopwatch-breakdown, .class-stopwatch-school) {
    grid-column: 1;
    grid-row: auto;
  }
  #class-stopwatch.class-stopwatch-full .class-stopwatch-roles ul { display: flex; flex-wrap: wrap; }
}
