html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: Charcoal, Geneva, "Lucida Grande", "Trebuchet MS", sans-serif;
  font-size: 12px;
  overflow: hidden;
  background: #d4d4d4;
}

.shell {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.menu-bar {
  display: flex;
  align-items: center;
  gap: 0;
  height: 22px;
  padding: 0 8px 0 6px;
  flex: none;
  background: #ddd;
  color: #000;
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px #fff;
  position: relative;
  z-index: 100;
}

.menu-apple {
  display: block;
  flex: none;
  margin: 0 4px 0 2px;
}

.menu-app-slot {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 100%;
  flex: none;
}

.menu-app-slot > [role="menu"] {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2;
  min-width: 220px;
  margin: 0;
  padding: 2px 0;
  list-style: none;
}

.menu-app-slot.is-open > [role="menu"] {
  display: block;
}

.menu-app-slot [role="menu"] li {
  position: relative;
  white-space: nowrap;
  cursor: default;
}

.menu-app-slot [role="menu"] li:hover {
  background: var(--primary-2);
  box-shadow: inset 1px 0 var(--primary-3), inset -1px 0 #008;
  color: #fff;
}

.menu-topics {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-topics > li {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 0;
}

button.menu-title,
button.menu-title:active,
button.menu-title:focus,
button.menu-app,
button.menu-app:active,
button.menu-app:focus {
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #000;
  font-weight: normal;
  font-size: 12px;
}

button.menu-app,
button.menu-app:active,
button.menu-app:focus {
  font-weight: bold;
  padding: 0 8px;
}

.menu-topics > li.is-open > button.menu-title,
.menu-topics > li.is-open > button.menu-title:active,
.menu-topics > li > button.menu-title:focus-visible,
.menu-app-slot.is-open > button.menu-app,
.menu-app-slot.is-open > button.menu-app:active,
.menu-app-slot > button.menu-app:focus-visible {
  background: var(--primary-2);
  color: #fff;
  box-shadow: inset 1px 0 var(--primary-3), inset -1px 0 #008;
}

.menu-topics [role="menu"] {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2;
  min-width: 220px;
  margin: 0;
  padding: 2px 0;
  list-style: none;
}

.menu-topics > li.is-open > [role="menu"] {
  display: block;
}

.menu-topics [role="menu"] li {
  position: relative;
  white-space: nowrap;
  cursor: default;
}

.menu-topics [role="menu"] li:hover {
  background: var(--primary-2);
  box-shadow: inset 1px 0 var(--primary-3), inset -1px 0 #008;
  color: #fff;
}

.menu-count,
.menu-clock {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.menu-clock {
  margin-left: 12px;
}

.desktop {
  position: relative;
  flex: 1;
  min-height: 0;
  cursor: pointer;
  background-color: var(--desktop-bg);
  background-image:
    linear-gradient(0deg, rgba(0, 0, 0, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 2px 2px;
}

.stage {
  --icon-band: 96px;
  position: absolute;
  inset: 0;
}

.desktop-icons {
  position: absolute;
  z-index: 80;
  top: 8px;
  right: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.icon-row {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: 100%;
  pointer-events: none;
}

button.desktop-icon {
  pointer-events: auto;
  width: 86px;
  height: 82px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  margin: 0;
  padding: 2px 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #000;
  font-weight: normal;
  font-size: 11px;
  line-height: 1.15;
  cursor: pointer;
}

button.desktop-icon:active,
button.desktop-icon:focus {
  background: transparent;
  color: #000;
  box-shadow: none;
}

button.desktop-icon:focus-visible {
  outline: 1px dotted #fff;
  outline-offset: 1px;
}

.desktop-icon svg {
  display: block;
  width: 48px;
  height: 38px;
  flex: none;
}

.desktop-icon span {
  max-width: 80px;
  text-align: center;
  text-shadow: 0 1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff, 0 -1px 0 #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

button.desktop-icon.is-open span {
  background: #000;
  color: #fff;
  text-shadow: none;
  padding: 0 2px;
}

.presenter-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  margin: 0;
  transition: left 450ms ease, top 450ms ease, width 450ms ease, height 450ms ease, opacity 450ms ease;
}

.stage.is-dragging .presenter-window,
.presenter-window.no-anim {
  transition: none;
}

.presenter-window.active .title-bar,
.presenter-window:not(.active) .title-bar {
  cursor: grab;
}

.stage.is-dragging .presenter-window .title-bar {
  cursor: grabbing;
}

.presenter-window.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.presenter-window:not(.active) {
  overflow: hidden;
}

.presenter-window:not(.active) .slide-figure,
.presenter-window:not(.active) .slide-message,
.presenter-window:not(.active) .slide-points,
.presenter-window:not(.active) .slide-live,
.presenter-window:not(.active) .slide-split {
  display: none;
}

.presenter-window > .title-bar {
  flex: none;
  align-items: center;
  min-height: 18px;
  background: var(--window-frame-bg);
  color: #000;
}

.presenter-window > .title-bar > .title-bar-text::before,
.presenter-window > .title-bar > .title-bar-text::after {
  background-image:
    linear-gradient(0deg, #fff, #fff 1px, transparent 1px, transparent 1px),
    linear-gradient(0deg, transparent, transparent 1px, #777 1px, #777 1px);
  background-repeat: repeat-y;
  background-position-x: -1px, 1px;
  background-position-y: -1px, -1px;
  background-size: 100% 2px, 100% 2px;
}

.presenter-window > .title-bar > .title-bar-buttons {
  visibility: visible;
}

.presenter-window .title-bar-text {
  min-width: 0;
}

.title-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presenter-window > .window-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.slide-kicker {
  margin: 0;
  padding: 3px 8px 4px;
  flex: none;
  min-height: 22px;
  line-height: 15px;
  background: #dcdcdc;
  border-bottom: 1px solid #888;
  box-shadow: inset 0 1px #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slide-figure {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #fff;
}

.slide-figure.can-zoom {
  cursor: zoom-in;
  touch-action: none;
}

.slide-figure.is-zoomed {
  cursor: grab;
}

.slide-split {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #fff;
}

.slide-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.slide-caption {
  flex: none;
  margin: 0 0 4px;
  text-align: center;
}

.slide-pane .slide-figure {
  flex: 1;
}

.slide-scrub {
  position: absolute;
  z-index: 2;
  top: 6px;
  bottom: 6px;
  right: 6px;
  width: 12px;
  background: #d0d0d0;
  border: 1px solid #888;
  box-shadow: inset 1px 1px #fff;
  cursor: default;
}

.slide-scrub[hidden] {
  display: none;
}

.slide-scrub-thumb {
  position: absolute;
  left: 0;
  right: 0;
  min-height: 14px;
  background: #e4e4e4;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #888;
}

.slide-zoom {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  pointer-events: none;
}

.slide-figure img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.slide-message {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 28px 36px;
  font-size: 20px;
  line-height: 1.4;
  text-align: center;
}

.slide-points {
  flex: 1;
  margin: 0;
  padding: 28px 56px 28px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  font-size: 20px;
  line-height: 1.35;
}

.slide-live {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.slide-live a {
  flex: none;
  padding: 4px 8px;
  background: #dcdcdc;
  border-bottom: 1px solid #888;
  color: #00c;
  text-decoration: underline;
}

.slide-live iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.ticker {
  flex: none;
  height: 28px;
  margin: 6px 10px;
  background: #e8e8e8;
  overflow: hidden;
}

.ticker-viewport {
  overflow: hidden;
  height: 100%;
}

.ticker-track {
  display: inline-block;
  margin: 0;
  height: 100%;
  line-height: 26px;
  white-space: nowrap;
  padding-left: 100%;
}

.ticker-track.run {
  animation: marquee linear infinite;
}

.account-layer {
  position: absolute;
  z-index: 200;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.account-window {
  width: min(440px, 100%);
  max-height: 100%;
}

.account-window-wide {
  width: min(560px, 100%);
}

.account-window .window-body {
  overflow: auto;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 12px 12px 10px;
  font-size: 13px;
}

.account-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.account-form input {
  width: 100%;
  box-sizing: border-box;
  user-select: text;
}

.account-copy {
  margin: 0;
  line-height: 1.4;
  user-select: text;
}

.account-requirements {
  margin: 0;
  padding-left: 18px;
  line-height: 1.35;
  user-select: text;
}

.account-form a {
  color: #00c;
}

.account-error {
  min-height: 1.2em;
  margin: 0;
  color: #800;
}

.account-error:empty {
  display: none;
}

.account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.account-users {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-user {
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-user span {
  flex: 1;
  min-width: 0;
}

.menu-app-slot [role="menu"] li.menu-sep,
.menu-app-slot [role="menu"] li.menu-sep:hover {
  height: 2px;
  margin: 3px 4px;
  padding: 0;
  background: #888;
  box-shadow: 0 1px #fff;
  color: transparent;
  pointer-events: none;
}

.menu-app-slot [role="menu"] li.menu-user,
.menu-app-slot [role="menu"] li.menu-user:hover {
  padding: 2px 16px 4px;
  color: #555;
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.ticker:hover .ticker-track.run {
  animation-play-state: paused;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .presenter-window {
    transition: none;
  }

  .ticker {
    height: auto;
    max-height: 4.8em;
    overflow: auto;
  }

  .ticker-track,
  .ticker-track.run {
    animation: none;
    transform: none;
    padding-left: 8px;
    white-space: normal;
    line-height: 1.35;
    padding-top: 4px;
    padding-bottom: 4px;
  }
}
