/* Classroom v2: one grid, one viewport, one layout owner. */
body.cpt-classroom-v2 #pdfStage,
body.cpt-classroom-v2 #v145CanvasHeader,
body.cpt-classroom-v2 #v410ClassroomFrame,
body.cpt-classroom-v2 .v152-aisle-controls,
body.cpt-classroom-v2 .v152-aisle-line,
body.cpt-classroom-v2 .v148-aisle-line {
  display: none !important;
}

/* Native layout rules used to force the legacy Details header back on. */
body.cpt-classroom-v2.v410-ipad-classroom #v410ClassroomFrame #v145CanvasHeader,
body.cpt-classroom-v2.v410-ipad-classroom #v145CanvasHeader,
body.cpt-classroom-v2.v416-iphone-classroom #v410ClassroomFrame #v145CanvasHeader,
body.cpt-classroom-v2.v416-iphone-classroom #v145CanvasHeader,
body.cpt-classroom-v2.v293-standalone-touch #v145CanvasHeader,
body.cpt-classroom-v2.v305-floating-controls #v145CanvasHeader {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.cpt-classroom-v2 #stageWrap {
  position: relative !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  touch-action: none !important;
  background: transparent !important;
}

body.cpt-classroom-v2.v410-ipad-classroom #stageWrap,
body.cpt-classroom-v2.v416-iphone-classroom #stageWrap {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
}

/* Clear the legacy native-phone height clamp without changing iPad or browser layout. */
body.cpt-classroom-v2.v392-native-iphone.v416-iphone-classroom #stageWrap {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
}

/* The legacy standalone iPad shell subtracts 120px via max-height. */
body.cpt-classroom-v2.v404-native-ipad #stageWrap {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
}

#cptClassroomRoot {
  --cpt-seat-w: 76px;
  --cpt-seat-h: 94px;
  --cpt-col-gap: 10px;
  --cpt-row-gap: 12px;
  --cpt-aisle-w: 58px;
  position: absolute;
  inset: 0;
  display: none;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: var(--ink, #1a1714);
  isolation: isolate;
}

#cptClassroomRoot.is-active {
  display: block;
}

.cpt-classroom-viewport {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.72), rgba(255,255,255,0) 52%),
    var(--v107-bg-classroom, #eaf2ff);
}

#cptClassroomRoot.is-edit .cpt-classroom-viewport {
  overflow: auto;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
}

#cptClassroomRoot.is-edit .cpt-classroom-viewport.is-panning {
  cursor: grabbing;
  user-select: none;
}

.cpt-classroom-pan-space {
  position: relative;
  box-sizing: border-box;
  min-width: 100%;
  min-height: 100%;
}

#cptClassroomRoot.is-edit .cpt-classroom-pan-space {
  display: grid;
  place-items: center;
  padding: clamp(96px, 14vh, 180px) clamp(110px, 16vw, 240px);
  width: max-content;
  min-width: 100%;
  height: max-content;
  min-height: 100%;
}

.cpt-classroom-board {
  position: relative;
  box-sizing: border-box;
  width: max-content;
  min-width: max-content;
  border: 1px solid rgba(49,95,147,.15);
  border-radius: 24px;
  padding: 22px 24px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,251,253,.95));
  box-shadow: 0 18px 44px rgba(17,24,39,.13);
  transform-origin: 50% 50%;
  will-change: transform;
}

#cptClassroomRoot.is-live .cpt-classroom-board {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
}

.cpt-classroom-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  margin: 0 0 18px;
  text-align: center;
  pointer-events: none;
}

#cptClassroomRoot.is-edit .cpt-classroom-details {
  margin-bottom: 22px;
}

.cpt-classroom-title {
  max-width: min(720px, 82vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink, #1a1714);
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.cpt-classroom-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px 13px;
  margin-top: 7px;
  color: var(--soft, #6b6560);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.cpt-classroom-meta span + span::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 10px 2px 0;
  border-radius: 50%;
  background: currentColor;
  opacity: .48;
}

.cpt-classroom-grid-wrap {
  position: relative;
  width: max-content;
  margin: 0 auto;
}

#cptClassroomRoot.is-edit .cpt-classroom-grid-wrap {
  margin-top: 14px;
  padding-top: 34px;
}

.cpt-classroom-grid {
  display: grid;
  grid-auto-rows: var(--cpt-seat-h);
  column-gap: 0;
  row-gap: var(--cpt-row-gap);
  width: max-content;
  touch-action: none;
}

.cpt-aisle-controls {
  position: absolute;
  top: -27px;
  left: 0;
  z-index: 8;
  display: none;
  grid-template-rows: 26px;
  width: 100%;
  height: 26px;
  pointer-events: none;
}

#cptClassroomRoot.is-edit .cpt-aisle-controls {
  display: grid;
  top: 0;
}

.cpt-aisle-control {
  align-self: center;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(17,24,39,.17);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

.cpt-aisle-line {
  z-index: 0;
  align-self: stretch;
  justify-self: center;
  width: 0;
  border-left: 2px dashed rgba(49,95,147,.42);
  pointer-events: none;
}

#cptClassroomRoot.is-edit .cpt-aisle-line {
  border-left-color: rgba(91,108,255,.74);
}

#cptClassroomRoot.is-live .cpt-aisle-line {
  border-left-color: rgba(49,95,147,.26);
}

.cpt-aisle-control.is-add {
  border: 1px solid rgba(47,125,85,.34);
  color: #1f6b46;
}

.cpt-aisle-control.is-remove {
  border: 1px solid rgba(155,28,28,.28);
  color: #9b1c1c;
}

.cpt-aisle-control:hover,
.cpt-aisle-control:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(29,78,137,.13), 0 5px 14px rgba(17,24,39,.20);
}

.cpt-grid-cell {
  position: relative;
  box-sizing: border-box;
  width: var(--cpt-seat-w);
  height: var(--cpt-seat-h);
  min-width: 0;
  min-height: 0;
}

.cpt-empty-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1.5px dashed rgba(49,95,147,.22);
  border-radius: 13px;
  background: rgba(53,120,229,.025);
  color: rgba(29,78,137,.45);
  box-shadow: none;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  opacity: .76;
  cursor: pointer;
  touch-action: none;
  transition: background .14s ease, border-color .14s ease, color .14s ease, opacity .14s ease;
}

.cpt-empty-cell:hover,
.cpt-empty-cell:focus-visible,
.cpt-empty-cell.is-drop-target {
  border-color: rgba(47,125,85,.68);
  background: rgba(47,125,85,.10);
  color: #1f6b46;
  opacity: 1;
  outline: none;
}

#cptClassroomRoot.is-live .cpt-grid-cell.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.cpt-seat {
  position: relative !important;
  inset: auto !important;
  display: grid;
  grid-template-rows: minmax(0, 22px) minmax(24px, 1fr) 25px;
  row-gap: 2px;
  align-items: center;
  justify-items: center;
  box-sizing: border-box;
  width: 100% !important;
  height: 100% !important;
  padding: 7px 7px 6px;
  overflow: visible;
  border: 1px solid rgba(49,95,147,.17);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,250,253,.96));
  box-shadow: 0 7px 17px rgba(17,24,39,.075);
  color: var(--ink, #1a1714);
  cursor: pointer;
  touch-action: none;
  transform: none !important;
  transition: box-shadow .14s ease, border-color .14s ease, background .14s ease, opacity .14s ease;
}

#cptClassroomRoot.is-edit .cpt-seat {
  cursor: grab;
}

.cpt-seat:hover {
  border-color: rgba(49,95,147,.34);
  box-shadow: 0 10px 23px rgba(17,24,39,.12);
}

.cpt-seat.is-drag-source {
  opacity: .42;
  border-color: rgba(29,78,137,.52);
}

.cpt-seat.is-drop-target {
  border-color: rgba(47,125,85,.75);
  background: #f0fbf5;
  box-shadow: 0 0 0 4px rgba(47,125,85,.16), 0 12px 28px rgba(47,125,85,.16);
}

.cpt-seat.activePulse {
  animation: cpt-seat-pulse .24s ease;
}

@keyframes cpt-seat-pulse {
  50% { scale: 1.045; }
}

.cpt-seat-name {
  grid-row: 1;
  align-self: center;
  display: -webkit-box;
  width: 100%;
  max-height: 22px;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.08;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cpt-seat-initials {
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
}

.cpt-seat.is-number-only .cpt-seat-name {
  display: none;
}

.cpt-seat.is-number-only .cpt-seat-initials {
  grid-row: 2;
  font-size: 28px;
}

.cpt-seat.has-long-initials .cpt-seat-initials {
  font-size: 19px;
  letter-spacing: -.05em;
}

.cpt-seat .badge {
  grid-row: 3;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 25px;
  margin: 0;
  padding: 0 6px;
  border-radius: 999px;
  background: #f2a23a;
  color: #fff;
  box-shadow: 0 6px 13px rgba(242,162,58,.28);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.cpt-seat.zero .badge,
.cpt-seat.score-neutral .badge {
  background: #9ca3af;
  box-shadow: 0 6px 13px rgba(156,163,175,.20);
}

.cpt-seat.score-positive-1 .badge {
  background: #b9dcff;
  color: #16324f;
  box-shadow: 0 6px 13px rgba(86,150,218,.22);
}

.cpt-seat.score-positive-2 .badge {
  background: #5b9df5;
  box-shadow: 0 6px 13px rgba(55,118,216,.28);
}

.cpt-seat.score-positive-3 .badge {
  background: #2563d9;
  box-shadow: 0 6px 13px rgba(37,99,217,.32);
}

.cpt-seat.score-positive-4 .badge {
  background: #123868;
  box-shadow: 0 6px 13px rgba(18,56,104,.32);
}

.cpt-seat.score-positive-5 .badge {
  background: #000;
  box-shadow: 0 6px 13px rgba(0,0,0,.30);
}

.cpt-seat.score-negative-1 .badge {
  background: #fca5a5;
  color: #601313;
  box-shadow: 0 6px 13px rgba(220,80,80,.20);
}

.cpt-seat.score-negative-2 .badge {
  background: #dc4c4c;
  box-shadow: 0 6px 13px rgba(188,42,42,.28);
}

.cpt-seat.score-negative-3 .badge {
  background: #991b1b;
  box-shadow: 0 6px 13px rgba(120,18,18,.32);
}

.cpt-seat.score-negative-4 .badge {
  background: #6b1010;
  box-shadow: 0 6px 13px rgba(82,10,10,.34);
}

.cpt-seat.score-negative-5 .badge {
  background: #3b0707;
  box-shadow: 0 6px 13px rgba(45,4,4,.36);
}

.cpt-seat-remove {
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(155,28,28,.22);
  border-radius: 999px;
  background: #fff;
  color: #9b1c1c;
  box-shadow: 0 3px 10px rgba(17,24,39,.16);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

#cptClassroomRoot.is-edit .cpt-seat-remove {
  display: flex;
}

.cpt-seat-drag-ghost {
  position: fixed;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--ghost-w, 76px);
  height: var(--ghost-h, 94px);
  border: 2px solid rgba(29,78,137,.58);
  border-radius: 13px;
  background: #fff;
  color: #1a1714;
  box-shadow: 0 20px 44px rgba(17,24,39,.25);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-1deg);
}

@media (max-width: 700px) {
  #cptClassroomRoot {
    --cpt-seat-w: 62px;
    --cpt-seat-h: 80px;
    --cpt-col-gap: 8px;
    --cpt-row-gap: 9px;
    --cpt-aisle-w: 34px;
  }

  #cptClassroomRoot .cpt-classroom-details {
    display: none;
  }

  #cptClassroomRoot .cpt-classroom-board {
    padding: 18px;
    border-radius: 19px;
  }

  #cptClassroomRoot.is-edit .cpt-classroom-pan-space {
    padding: 82px 92px;
  }

  #cptClassroomRoot .cpt-seat {
    grid-template-rows: minmax(28px, 1fr) 23px;
    row-gap: 3px;
    padding: 6px 6px 5px;
  }

  #cptClassroomRoot .cpt-seat-name {
    display: none;
  }

  #cptClassroomRoot .cpt-seat-initials {
    grid-row: 1;
    display: flex;
    font-size: 23px;
  }

  #cptClassroomRoot .cpt-seat.is-number-only .cpt-seat-initials {
    font-size: 26px;
  }

  #cptClassroomRoot .cpt-seat.has-long-initials .cpt-seat-initials {
    font-size: 18px;
  }

  #cptClassroomRoot .cpt-seat .badge {
    grid-row: 2;
    display: inline-flex;
    min-width: 23px;
    height: 23px;
    margin: 0;
  }

}

/* Native iPhone can report a landscape CSS width above the phone breakpoint. */
body.v392-native-iphone #cptClassroomRoot {
  --cpt-seat-w: 62px;
  --cpt-seat-h: 80px;
  --cpt-col-gap: 8px;
  --cpt-row-gap: 9px;
  --cpt-aisle-w: 34px;
}

body.v392-native-iphone #cptClassroomRoot .cpt-classroom-details {
  display: none;
}

body.v392-native-iphone #cptClassroomRoot .cpt-classroom-board {
  padding: 18px;
  border-radius: 19px;
}

body.v392-native-iphone #cptClassroomRoot.is-edit .cpt-classroom-pan-space {
  padding: 82px 92px;
}

body.v392-native-iphone #cptClassroomRoot .cpt-seat {
  grid-template-rows: minmax(28px, 1fr) 23px;
  row-gap: 3px;
  padding: 6px 6px 5px;
}

body.v392-native-iphone #cptClassroomRoot .cpt-seat-name {
  display: none;
}

body.v392-native-iphone #cptClassroomRoot .cpt-seat-initials {
  grid-row: 1;
  display: flex;
  font-size: 23px;
}

body.v392-native-iphone #cptClassroomRoot .cpt-seat.is-number-only .cpt-seat-initials {
  font-size: 26px;
}

body.v392-native-iphone #cptClassroomRoot .cpt-seat.has-long-initials .cpt-seat-initials {
  font-size: 18px;
}

body.v392-native-iphone #cptClassroomRoot .cpt-seat .badge {
  grid-row: 2;
  display: inline-flex;
  min-width: 23px;
  height: 23px;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cpt-seat,
  .cpt-empty-cell,
  .cpt-aisle-control,
  .cpt-classroom-board {
    transition: none !important;
  }
}
