:root {
  color-scheme: light;
  font-family: Nunito, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #e8ece8;
  color: #17201e;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.app-shell.has-admin-panel {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.viewer-stage {
  display: block;
  min-width: 0;
  height: 100vh;
  min-height: 100vh;
  background: #fafafa;
  color: #17201e;
}

.eyebrow,
.subtle,
.viewer-status,
.notice,
.tile-list-item span,
.metadata-list dt,
.panel-heading span {
  color: #65736f;
}

.eyebrow {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

dt {
  font-family: Nunito, ui-sans-serif, system-ui, sans-serif;
}

h1 {
  margin-bottom: 4px;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 15px;
  letter-spacing: 0;
}

.subtle {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.text-button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #81918d;
  border-radius: 6px;
  background: #f8fbf8;
  color: #17201e;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.text-button:hover,
button:hover {
  background: #e8f0ed;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.viewer-frame {
  position: relative;
  min-width: 0;
  height: 100vh;
  min-height: 100vh;
  background: #fafafa;
}

.osd-viewer {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fafafa;
}

.osd-viewer .navigator {
  background: #fafafa !important;
}

.floating-lesson-control {
  position: absolute;
  z-index: 58;
  top: 3px;
  right: 8px;
  display: grid !important;
  width: min(350px, 50%);
  min-width: 0;
  justify-items: end;
  gap: 8px;
  margin: 0;
  pointer-events: none;
}

.floating-lesson-control[hidden] {
  display: none !important;
}

.floating-control-row {
  display: flex;
  max-width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.floating-control-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0 !important;
  border-color: rgba(15, 22, 21, 0.45);
  border-radius: 6px;
  background: rgba(248, 251, 248, 0.94);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  color: #17201e;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  pointer-events: auto;
  touch-action: manipulation;
  white-space: nowrap;
}

.floating-control-button:hover {
  background: #ffffff;
}

.floating-control-button:disabled {
  cursor: default;
  opacity: 0.52;
}

.floating-control-button-ai {
  font-size: 22px;
  font-weight: 600;
}

.floating-control-icon,
.floating-control-icon svg {
  display: block;
}

.floating-control-icon-slide {
  width: 27px;
  height: 18px;
}

.floating-control-icon-slide svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.slide-icon-glass {
  fill: #fbfcf8;
  stroke: currentColor;
  stroke-width: 1.45;
}

.slide-icon-label {
  fill: none;
  stroke: rgba(23, 32, 30, 0.64);
  stroke-width: 1.25;
  stroke-linecap: round;
}

.slide-icon-sample {
  fill: #f08bc3;
  stroke: #8c286c;
  stroke-width: 1;
}

.slide-icon-spot {
  fill: #a93688;
}

.slide-icon-spot-large {
  fill: #c95aa2;
}

.floating-control-button-current {
  width: auto;
  min-width: 0;
  padding: 0 9px !important;
  gap: 4px;
  font-size: 17px;
  font-weight: 600;
}

.floating-control-button-current {
  min-width: 60px;
}

.floating-lesson-panel {
  width: min(350px, 100%);
  max-height: min(70vh, calc(100vh - 112px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 11px 12px;
  border: 1px solid rgba(15, 22, 21, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(15, 22, 21, 0.18);
  color: #17201e;
  pointer-events: auto;
}

.floating-lesson-panel[hidden],
.floating-panel-section[hidden] {
  display: none !important;
}

.floating-panel-section {
  min-width: 0;
}

.floating-panel-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.floating-panel-heading h2,
.lesson-rich-text .floating-panel-heading h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.floating-panel-close {
  flex: 0 0 auto;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0 !important;
  border-color: rgba(15, 22, 21, 0.28);
  border-radius: 5px;
  background: rgba(248, 251, 248, 0.92);
  color: #17201e;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.floating-panel-close:hover {
  background: #ffffff;
}

.floating-lesson-content {
  min-width: 0;
}

.floating-viewer-status {
  margin-top: 10px;
}

.stage-title-bar {
  display: none;
}

.osd-stage-title {
  position: absolute;
  z-index: 45;
  top: 3px;
  right: 300px;
  left: 300px;
  display: flex !important;
  min-width: 0;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.osd-stage-title-text {
  display: block;
  max-width: 100%;
  height: 32px;
  padding: 3px 10px 4px;
  overflow: hidden;
  border: 1px solid rgba(15, 22, 21, 0.18);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(15, 22, 21, 0.16);
  color: #0f1b1a;
  font-size: 16px;
  font-weight: 500;
  line-height: 23px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.osd-viewer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 28px);
  margin: 3px;
  padding: 5px 11px 3px 4px;
  border: 1px solid rgba(15, 111, 120, 0.24);
  border-radius: 6px;
  background: rgba(248, 251, 248, 0.78);
  box-shadow: 0 2px 8px rgba(15, 22, 21, 0.14);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.osd-viewer-logo-image {
  display: block;
  width: min(130px, 34vw);
  height: auto;
  margin: 0 0 -3px -4px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.full-frame-body {
  min-width: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #fafafa;
}

.full-frame-shell {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #fafafa;
}

.app-shell.is-picker-mode {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.is-picker-mode .inspection-panel {
  display: none;
}

.lesson-stop-picker-bar {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100% - 36px));
  border: 1px solid rgba(23, 32, 30, 0.22);
  border-radius: 8px;
  background: rgba(248, 251, 248, 0.94);
  box-shadow: 0 8px 26px rgba(12, 24, 22, 0.18);
  padding: 10px;
  color: #17201e;
}

.lesson-stop-picker-button {
  background: #0f6f78;
  color: #ffffff;
  border-color: #0f6f78;
}

.lesson-stop-picker-button:hover {
  background: #0c5f67;
}

.lesson-stop-picker-status {
  color: #4d5d59;
  font-size: 13px;
  line-height: 1.3;
}

.lesson-stop-picker-status.is-error {
  color: #8d2424;
}

.lesson-stop-center-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lesson-stop-center-input {
  width: 190px;
  min-height: 38px;
  border: 1px solid rgba(15, 22, 21, 0.32);
  border-radius: 6px;
  background: #ffffff;
  color: #17201e;
  font: inherit;
  font-family: "Cascadia Mono", Consolas, Monaco, monospace;
  font-size: 13px;
  padding: 7px 9px;
}

.osd-scale-bar-control {
  position: relative;
  z-index: 25;
  margin: 0 0 16px 16px;
  pointer-events: none;
}

.osd-scale-bar-control.is-hidden {
  display: none !important;
}

.osd-scale-bar {
  display: inline-grid;
  grid-template-columns: max-content;
  gap: 6px;
  padding: 8px 10px 10px;
  border: 1px solid rgba(15, 22, 21, 0.28);
  border-radius: 5px;
  background: rgba(248, 251, 248, 0.88);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  color: #17201e;
}

.osd-scale-bar-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.osd-scale-bar-magnification,
.osd-scale-bar-label {
  font-family: Nunito, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  line-height: 14px;
  white-space: nowrap;
}

.osd-scale-bar-magnification:empty {
  display: none;
}

.osd-scale-bar-rule {
  box-sizing: border-box;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  justify-self: start;
}

.osd-control-bar {
  position: relative;
  z-index: 50;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 3px;
  padding: 4px;
  pointer-events: none;
}

.osd-control-bar,
.osd-control-bar *,
.floating-control-button,
.floating-control-button *,
.osd-tooltip-popover {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.osd-control-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.osd-control-row-secondary {
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: max-height 180ms ease, opacity 160ms ease, transform 180ms ease;
}

.osd-control-row-secondary.is-open {
  max-height: 520px;
  opacity: 1;
  overflow: visible;
  pointer-events: none;
  transform: translateY(0);
}

.osd-control-drawing-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.osd-control-image-adjustment-group {
  display: inline-flex;
  position: relative;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.osd-control-drawing-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-5px);
  transition: max-width 180ms ease, opacity 160ms ease, transform 180ms ease;
}

.osd-control-drawing-group.is-open .osd-control-drawing-buttons {
  max-width: 360px;
  opacity: 1;
  pointer-events: none;
  transform: translateX(0);
}

.osd-image-adjustment-panel {
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 40px;
  z-index: 2;
  width: min(232px, calc(100vw - 70px));
  max-width: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(15, 22, 21, 0.3);
  border-radius: 8px;
  background: rgba(248, 251, 248, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
  color: #17201e;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-5px);
  transition: max-width 180ms ease, max-height 180ms ease, opacity 160ms ease, padding 180ms ease,
    transform 180ms ease;
}

.osd-control-image-adjustment-group.is-open .osd-image-adjustment-panel {
  max-width: min(232px, calc(100vw - 70px));
  max-height: 92px;
  padding: 20px 8px 8px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.osd-image-adjustment-close {
  display: inline-flex;
  position: absolute;
  top: -8px;
  right: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #17201e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.osd-image-adjustment-close:hover,
.osd-image-adjustment-close:focus-visible {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(15, 22, 21, 0.2);
}

.osd-image-adjustment-row {
  display: grid;
  grid-template-columns: 24px minmax(96px, 1fr) 42px;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
}

.osd-image-adjustment-value {
  min-width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.osd-image-adjustment-row input[type="range"] {
  display: block;
  width: 100%;
  accent-color: #0f6f78;
}

.osd-image-adjustment-icon,
.osd-image-adjustment-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.osd-image-adjustment-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.osd-image-adjustment-icon-brightness {
  color: #d4aa00;
}

.osd-image-adjustment-icon-brightness svg circle {
  fill: currentColor;
}

.osd-image-adjustment-icon-contrast svg {
  color: #111817;
  fill: #ffffff;
}

.osd-image-adjustment-icon-contrast .osd-image-adjustment-contrast-fill {
  fill: #111817;
  stroke: none;
}

.osd-control-button {
  display: inline-flex !important;
  position: relative;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0 !important;
  border-color: rgba(15, 22, 21, 0.45);
  background: rgba(248, 251, 248, 0.94);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  color: #17201e;
  line-height: 1;
  overflow: hidden;
  pointer-events: auto;
  touch-action: manipulation;
  vertical-align: top;
}

.osd-control-button:hover {
  background: #ffffff;
}

.osd-control-button:disabled {
  cursor: default;
  opacity: 0.52;
}

.osd-control-icon,
.osd-control-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.osd-control-icon,
.osd-control-button-vision img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.osd-control-icon svg {
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.osd-control-button-copy .osd-control-icon,
.osd-control-button-copy .osd-control-icon svg {
  width: 19px;
  height: 19px;
}

.osd-control-button-protanopiaPreview .osd-control-icon,
.osd-control-button-protanopiaPreview .osd-control-icon svg {
  width: 22px;
  height: 22px;
}

.osd-control-button-imageAdjustment .osd-control-icon,
.osd-control-button-imageAdjustment .osd-control-icon svg {
  width: 22px;
  height: 22px;
}

.image-adjustment-button-icon {
  fill: none;
  stroke: currentColor;
}

.image-adjustment-button-rays {
  stroke: #caa000;
  stroke-width: 2;
  stroke-linecap: round;
}

.image-adjustment-button-disc {
  fill: #fff8c9;
  stroke: #111817;
  stroke-width: 1.9;
}

.image-adjustment-button-half {
  fill: #111817;
  stroke: none;
}

.protanopia-preview-icon .glasses-frame {
  fill: none;
  stroke: #111817;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.protanopia-preview-icon .lens-normal {
  fill: #8b28ff;
  stroke: #111817;
  stroke-width: 1.8;
}

.protanopia-preview-icon .lens-protan {
  fill: #c8ad43;
  stroke: #111817;
  stroke-width: 1.8;
}

.osd-control-button-vision {
  border-color: rgba(15, 22, 21, 0.45);
}

.osd-control-button-ruler[aria-pressed="true"],
.osd-control-button-drawFreehand[aria-pressed="true"],
.osd-control-button-drawCircle[aria-pressed="true"],
.osd-control-button-drawRectangle[aria-pressed="true"],
.osd-control-button-drawLine[aria-pressed="true"],
.osd-control-button-drawArrow[aria-pressed="true"],
.osd-control-button-drawLabel[aria-pressed="true"],
.osd-control-button-drawingTools[aria-expanded="true"],
.osd-control-button-imageAdjustment[aria-expanded="true"] {
  border-color: #0b5961;
  background: #0f6f78;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 2px 7px rgba(15, 111, 120, 0.42);
  color: #ffffff;
}

.osd-control-button-settings[aria-expanded="true"],
.osd-control-button-thumbnail[aria-pressed="true"],
.osd-control-button-vision[aria-pressed="true"] {
  border-color: #2f6f73;
  background: #e8f4f2;
  box-shadow: inset 0 0 0 2px rgba(47, 111, 115, 0.2), 0 1px 2px rgba(0, 0, 0, 0.22);
}

.osd-control-button-vision img {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  pointer-events: none;
}

.osd-drawing-layer {
  position: absolute;
  inset: 0;
  z-index: 28;
  overflow: hidden;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.osd-drawing-layer * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.osd-drawing-layer.is-active {
  cursor: crosshair;
  pointer-events: auto;
}

.osd-lesson-annotation-layer {
  z-index: 27;
}

.osd-drawing-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.osd-drawing-shape {
  fill: none;
  pointer-events: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.osd-drawing-shape-halo {
  stroke: rgba(248, 251, 248, 0.96);
  stroke-width: 7px;
}

.osd-drawing-shape-stroke {
  stroke: #0f766e;
  stroke-width: 3px;
}

.osd-drawing-shape-draft {
  opacity: 0.78;
}

.osd-drawing-labels,
.osd-drawing-editors {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.osd-drawing-label {
  position: absolute;
  box-sizing: border-box;
  max-width: 240px;
  padding: 3px 5px;
  overflow: hidden;
  border: 1px solid rgba(31, 41, 51, 0.55);
  border-radius: 3px;
  background: rgba(255, 250, 220, 0.92);
  color: #1f2933;
  font: 600 13px/18px Nunito, Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.osd-drawing-label-input {
  position: absolute;
  box-sizing: border-box;
  width: 160px;
  max-width: 240px;
  padding: 3px 5px;
  border: 1px solid rgba(31, 41, 51, 0.72);
  border-radius: 3px;
  outline: 2px solid rgba(15, 111, 120, 0.32);
  outline-offset: 1px;
  background: rgba(255, 250, 220, 0.96);
  color: #1f2933;
  font: 600 13px/18px Nunito, Arial, sans-serif;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
}

.osd-measurement-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.osd-measurement-layer * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.osd-measurement-layer.is-active {
  cursor: crosshair;
  pointer-events: auto;
}

.osd-measurement-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.osd-measurement-line,
.osd-measurement-line-halo,
.osd-measurement-label {
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.osd-measurement-layer.has-measurement .osd-measurement-line,
.osd-measurement-layer.has-measurement .osd-measurement-line-halo,
.osd-measurement-layer.has-measurement .osd-measurement-label {
  opacity: 1;
}

.osd-measurement-line-halo {
  stroke: rgba(248, 251, 248, 0.96);
  stroke-width: 6px;
  stroke-linecap: round;
}

.osd-measurement-line {
  stroke: #17201e;
  stroke-width: 2.5px;
  stroke-linecap: round;
}

.osd-measurement-label-bg {
  fill: rgba(248, 251, 248, 0.92);
  stroke: rgba(15, 22, 21, 0.32);
  stroke-width: 1px;
}

.osd-measurement-label-text {
  fill: #17201e;
  font-family: Nunito, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.copy-feedback-popover {
  position: fixed;
  z-index: 10050;
  max-width: min(220px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 1px solid rgba(15, 22, 21, 0.32);
  border-radius: 6px;
  background: rgba(248, 251, 248, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  color: #17201e;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.copy-feedback-popover.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.osd-tooltip-popover {
  position: fixed;
  z-index: 10040;
  width: max-content;
  max-width: min(260px, calc(100vw - 16px));
  padding: 6px 8px;
  border: 1px solid rgba(248, 251, 248, 0.18);
  border-radius: 5px;
  background: rgba(23, 32, 30, 0.94);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
  color: #f7fbf8;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.28;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
  overflow-wrap: break-word;
  text-align: center;
}

.osd-tooltip-popover[data-placement="right"] {
  text-align: left;
  transform: translateX(-2px);
}

.osd-tooltip-popover.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.osd-tooltip-popover[data-placement="right"].is-visible {
  transform: translateX(0);
}

.protanopia-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 8, 7, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.protanopia-preview-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.protanopia-preview-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(248, 251, 248, 0.18);
  border-radius: 8px;
  background: #111817;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  color: #f7fbf8;
}

.protanopia-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(248, 251, 248, 0.14);
}

.protanopia-preview-header h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.protanopia-preview-close {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-color: rgba(248, 251, 248, 0.28);
  background: rgba(248, 251, 248, 0.08);
  color: #f7fbf8;
}

.protanopia-preview-close:hover {
  background: rgba(248, 251, 248, 0.16);
}

.protanopia-preview-close svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.protanopia-preview-body {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: 12px;
  background: #070b0a;
}

.protanopia-preview-canvas {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 126px);
  object-fit: contain;
}

.protanopia-preview-loading {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #f7fbf8;
  font-size: 14px;
  font-weight: 700;
}

.protanopia-preview-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(248, 251, 248, 0.24);
  border-top-color: #f7fbf8;
  border-radius: 50%;
  animation: protanopia-preview-spin 800ms linear infinite;
}

.viewer-info-modal {
  position: fixed;
  inset: 0;
  z-index: 10035;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 8, 7, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.viewer-info-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.viewer-info-dialog {
  width: min(440px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid rgba(15, 22, 21, 0.24);
  border-radius: 8px;
  background: #f8fbf8;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  color: #17201e;
}

.viewer-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 22, 21, 0.14);
}

.viewer-info-header h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.viewer-info-close {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  background: rgba(248, 251, 248, 0.94);
}

.viewer-info-close svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.viewer-info-body {
  padding: 14px;
}

.viewer-info-list {
  display: grid;
  gap: 8px;
}

.viewer-info-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}

.viewer-info-label {
  color: #667674;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-transform: uppercase;
}

.viewer-info-value {
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.viewer-info-separator {
  height: 1px;
  margin: 14px 0 10px;
  border: 0;
  background: rgba(15, 22, 21, 0.14);
}

.viewer-info-developer-credit {
  margin: 0;
  color: #4d5d59;
  font-size: 13px;
  line-height: 1.45;
}

@keyframes protanopia-preview-spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-viewer {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  height: 100%;
  padding: 24px;
  color: #dce7e2;
  text-align: center;
}

.empty-viewer strong {
  font-size: 24px;
}

.empty-viewer span {
  color: #aebcb8;
}

.inspection-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  height: 100vh;
  padding: 18px;
  overflow: auto;
  border-left: 1px solid #cbd3cf;
  background: #f7faf7;
}

.tour-controls {
  display: grid;
  gap: 8px;
}

.tour-controls .eyebrow,
.tour-controls h2 {
  margin-bottom: 0;
}

.tour-actions {
  display: grid;
  grid-template-columns: minmax(72px, 0.95fr) minmax(100px, 1.15fr) minmax(58px, 0.78fr);
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.tour-actions > button {
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 14px;
}

.tour-actions button:disabled {
  cursor: default;
  opacity: 0.55;
}

.tour-current-button {
  min-width: 0;
  padding-right: 6px;
  padding-left: 6px;
  color: #34423e;
}

.lesson-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #cdd7d2;
  border-radius: 8px;
  background: #ffffff;
}

.return-link {
  width: fit-content;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 15px;
}

.lesson-heading h1 {
  margin-bottom: 6px;
  font-size: 24px;
  line-height: 1.15;
}

.lesson-content {
  min-width: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}

.lesson-content.is-fading {
  opacity: 0;
  transform: translateY(3px);
}

.lesson-rich-text h2 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0;
}

.lesson-rich-text h3 {
  margin: 14px 0 8px;
  font-size: 15px;
  letter-spacing: 0;
}

.lesson-rich-text p,
.lesson-rich-text ul,
.lesson-rich-text ol {
  margin: 0 0 10px;
  color: #2a3431;
  line-height: 1.48;
}

.lesson-rich-text p:last-child,
.lesson-rich-text ul:last-child,
.lesson-rich-text ol:last-child {
  margin-bottom: 0;
}

.lesson-rich-text ul,
.lesson-rich-text ol {
  padding-left: 20px;
}

.lesson-rich-text li {
  margin-bottom: 4px;
}

.lesson-rich-text a {
  color: #315f68;
  text-decoration-color: rgba(49, 95, 104, 0.45);
  text-underline-offset: 2px;
}

.lesson-rich-text sup,
.lesson-rich-text sub {
  font-size: 0.75em;
  line-height: 0;
}

.lesson-rich-text .def {
  color: inherit;
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: #8aa39f;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.lesson-rich-text .def:hover,
.lesson-rich-text .def:focus-visible,
.lesson-rich-text .def.is-definition-open {
  color: #173f45;
  text-decoration-color: #557776;
}

.lesson-rich-text .def:focus-visible {
  outline: 2px solid rgba(47, 111, 115, 0.28);
  outline-offset: 2px;
  border-radius: 3px;
}

.definition-popover {
  position: fixed;
  z-index: 10000;
  max-width: min(430px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid #94bdb6;
  border-radius: 6px;
  background: #e8f6f3;
  box-shadow: 0 12px 26px rgba(17, 24, 23, 0.22);
  color: #1d2c29;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.48;
}

.viewer-status {
  min-height: 20px;
  margin: 0;
  color: #65736f;
  font-size: 13px;
}

.viewer-status a {
  color: #4a626b;
  font: inherit;
  text-decoration-color: rgba(74, 98, 107, 0.45);
  text-underline-offset: 2px;
}

.search-form,
.detail-panel,
.tile-list-panel,
.error-panel {
  padding: 14px;
  border: 1px solid #cdd7d2;
  border-radius: 8px;
  background: #ffffff;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input[type="search"] {
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #aebbb6;
  border-radius: 6px;
  background: #fbfdfb;
  color: #17201e;
}

.notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d5dfdb;
  border-radius: 6px;
  background: #f1f5f3;
  font-size: 14px;
}

.notice.danger {
  border-color: #e2b5b5;
  background: #fff1f1;
  color: #8d2424;
}

.ai-helper-panel {
  display: grid;
  gap: 12px;
}

.ai-helper-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.ai-helper-form {
  display: grid;
  gap: 9px;
}

.ai-helper-input {
  width: 100%;
  min-width: 0;
  min-height: 86px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid #aebbb6;
  border-radius: 6px;
  background: #fbfdfb;
  color: #17201e;
  line-height: 1.4;
}

.ai-helper-input:focus-visible {
  outline: 2px solid rgba(47, 111, 115, 0.3);
  outline-offset: 2px;
}

.ai-helper-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ai-helper-actions button {
  min-width: 72px;
}

.ai-helper-actions button:disabled {
  cursor: default;
  opacity: 0.55;
}

.ai-helper-status {
  min-width: 0;
  color: #65736f;
  font-size: 13px;
  line-height: 1.35;
}

.ai-helper-status.is-error {
  color: #8d2424;
}

.ai-helper-thread {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ai-helper-message {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #dde5e1;
  border-radius: 6px;
  background: #f6faf8;
}

.ai-helper-message.is-user {
  background: #eef7f5;
}

.ai-helper-message-label {
  display: block;
  margin-bottom: 4px;
  color: #65736f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.ai-helper-message-body {
  color: #25302d;
  font-size: 14px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.ai-helper-message-body p {
  margin: 0 0 8px;
}

.ai-helper-message-body p:last-child {
  margin-bottom: 0;
}

.metadata-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.metadata-list dt {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metadata-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.image-center-control {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-copy-button {
  min-height: 26px;
  border: 1px solid #b9c6c1;
  border-radius: 5px;
  background: #f8fbf8;
  color: #17201e;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
}

.inline-copy-button:disabled {
  cursor: default;
  opacity: 0.54;
}

.inline-copy-status {
  color: #4d5d59;
  font-size: 12px;
}

.inline-copy-status.is-error {
  color: #8d2424;
}

.inline-code,
code {
  font-family: "Cascadia Mono", Consolas, Monaco, monospace;
  font-size: 0.88em;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2 {
  margin-bottom: 0;
}

.tile-list {
  display: grid;
  gap: 8px;
}

.tile-list-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #d8e0dc;
  border-radius: 8px;
  background: #f9fbf9;
  text-decoration: none;
}

.tile-list-item:hover {
  border-color: #6f8f8b;
  background: #eef5f3;
}

.tile-list-item.is-active {
  border-color: #2f6f73;
  background: #e8f4f2;
}

.tile-list-item strong,
.tile-list-item span,
.tile-list-item code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tile-list-item span {
  font-size: 13px;
}

.tile-list-item code {
  color: #5b3c4a;
}

.slidebank-shell {
  min-height: 100vh;
  padding: 28px;
  background: #eef2f0;
}

.slidebank-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: end;
  max-width: 1280px;
  margin: 0 auto 22px;
}

.slidebank-header h1 {
  max-width: 780px;
  margin-bottom: 8px;
  font-size: clamp(30px, 5vw, 54px);
}

.slidebank-intro {
  max-width: 720px;
  margin-bottom: 0;
  color: #3c4c48;
  font-size: 18px;
  line-height: 1.42;
}

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

.slidebank-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #c4d0cb;
  border-radius: 8px;
  background: #ffffff;
}

.slidebank-summary dt {
  margin-bottom: 4px;
  color: #65736f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.slidebank-summary dd {
  margin: 0;
  color: #17201e;
  font-size: 24px;
  font-weight: 800;
}

.slidebank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto;
}

.slidebank-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #c8d4cf;
  border-radius: 8px;
  background: #ffffff;
}

.slidebank-card-link {
  display: grid;
  grid-template-rows: auto minmax(96px, auto);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.slidebank-card-link:hover .slidebank-card-title {
  color: #174b52;
  text-decoration: underline;
  text-decoration-color: rgba(23, 75, 82, 0.45);
  text-underline-offset: 3px;
}

.slidebank-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dce7e2;
}

.slidebank-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slidebank-card-body {
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
}

.slidebank-card-title {
  min-width: 0;
  color: #17201e;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.slidebank-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #65736f;
  font-size: 12px;
}

.slidebank-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid #b29a43;
  border-radius: 999px;
  background: #fff5c4;
  color: #473c14;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
}

.slidebank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0 12px 12px;
  list-style: none;
}

.slidebank-tags li {
  min-width: 0;
  padding: 3px 7px;
  border-radius: 5px;
  background: #eef1f8;
  color: #334056;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.slidebank-notice {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid #d5dfdb;
  border-radius: 8px;
  background: #ffffff;
}

.slidebank-notice h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.slidebank-notice p:last-child {
  margin-bottom: 0;
}

.local-package-list {
  display: grid;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #c8d4cf;
  border-radius: 8px;
  background: #ffffff;
}

.local-package-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  border-top: 1px solid #e1e8e4;
}

.local-package-row:first-child {
  border-top: 0;
}

.local-package-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.local-package-title {
  min-width: 0;
  color: #17201e;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.local-package-title:hover {
  color: #174b52;
  text-decoration: underline;
  text-decoration-color: rgba(23, 75, 82, 0.45);
  text-underline-offset: 3px;
}

.local-package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.local-package-actions .text-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.error-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.error-panel {
  max-width: 560px;
}

@media (max-width: 1180px) {
  .viewer-frame.has-stage-title,
  .full-frame-shell.has-stage-title {
    display: flex;
    flex-direction: column;
  }

  .viewer-frame.has-stage-title .osd-viewer,
  .full-frame-shell.has-stage-title .osd-viewer {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  .stage-title-bar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border: 1px solid rgba(15, 22, 21, 0.18);
    background: rgba(255, 255, 255, 0.94);
    color: #0f1b1a;
    box-shadow: 0 1px 5px rgba(15, 22, 21, 0.1);
  }

  .stage-title-bar-text {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.18;
    text-align: center;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .osd-stage-title {
    display: none !important;
  }

  .floating-lesson-control {
    width: min(350px, 75vw);
  }
}

@media (max-width: 980px) {
  .app-shell.has-admin-panel {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .app-shell.has-admin-panel .viewer-stage {
    height: 70vh;
    min-height: 480px;
  }

  .app-shell.has-admin-panel .viewer-frame {
    height: 100%;
    min-height: 0;
  }

  .app-shell.has-admin-panel .inspection-panel {
    height: auto;
    overflow: visible;
    border-top: 1px solid #cbd3cf;
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .inspection-panel {
    padding: 14px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .slidebank-shell {
    padding: 18px;
  }

  .slidebank-header {
    grid-template-columns: 1fr;
  }

  .slidebank-summary {
    grid-template-columns: 1fr;
  }

  .local-package-row {
    grid-template-columns: 1fr;
  }

  .local-package-actions {
    justify-content: flex-start;
  }

  .metadata-list {
    grid-template-columns: 1fr;
  }

}
