.start-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #101116;
}

.start-panel {
  width: min(760px, 100%);
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.start-header {
  margin-bottom: 20px;
}

.start-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  line-height: 1.1;
}

.start-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.drop-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover,
.drop-zone.selected {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(32, 201, 151, 0.09);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
}

.drop-main {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.drop-sub {
  display: block;
  font-size: 0.92rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 16px;
}

.server-load-btn {
  padding: 0;
  color: var(--subtle);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.server-load-btn:hover {
  color: var(--muted);
}

.primary-btn {
  min-width: 120px;
  color: #06281f;
  background: var(--accent);
  border-color: transparent;
}

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

.presenter-screen {
  position: relative;
  display: none;
  width: 100vw;
  height: 100dvh;
  background: #000;
}

.presenter-screen.active {
  display: block;
}

.slide-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: crosshair;
  overflow: hidden;
  touch-action: none;
}

.slide-stage canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.menu-toggle-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--text);
  background: rgba(12, 13, 16, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.menu-toggle-btn:hover,
.menu-toggle-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.14);
}

.menu-toggle-btn svg {
  width: 20px;
  height: 20px;
}

.control-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  background: rgba(12, 13, 16, 0.84);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  transition: opacity 180ms ease;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager {
  padding: 0 4px;
}

.page-readout {
  min-width: 76px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

#page-current {
  color: var(--text);
  font-weight: 700;
}

.page-input {
  width: 86px;
  height: 38px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
}

.page-input:focus {
  border-color: var(--accent);
}

.connection-pill {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 20;
  padding: 7px 10px;
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(12, 13, 16, 0.76);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: opacity 180ms ease;
}

.connection-pill.connected {
  color: #d3fff2;
  border-color: rgba(32, 201, 151, 0.45);
}

.controls-idle .control-bar,
.controls-idle .connection-pill {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 720px) {
  .control-bar {
    top: 58px;
    left: 8px;
    right: 8px;
    flex-wrap: wrap;
    justify-content: center;
    transform: none;
  }

  .file-grid {
    grid-template-columns: 1fr;
  }

  .start-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}
