:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d9dee8;
  --primary: #246bfe;
  --primary-dark: #164ec7;
  --good: #15803d;
  --bad: #b42318;
  --special: #a15c07;
  --bad-picture: #7c3aed;
  --bad-audio: #0e7490;
  --bad-color: #c2410c;
  --bad-material: #475569;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: #111827;
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 28px;
}

.brand {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.userbar {
  align-items: center;
  display: flex;
  gap: 14px;
}

.userbar form {
  margin: 0;
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.flash {
  background: #fff4df;
  border: 1px solid #f2c36b;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.auth-panel,
.panel,
.timeline-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  padding: 22px;
}

.auth-panel {
  margin: 50px auto;
  max-width: 420px;
}

h1,
h2 {
  margin: 0 0 16px;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  color: #344054;
  display: grid;
  font-size: 14px;
  gap: 7px;
}

input,
textarea {
  border: 1px solid #c9d1df;
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

button {
  background: var(--primary);
  border: 0;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 42px;
  padding: 0 16px;
}

button:hover {
  background: var(--primary-dark);
}

button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.muted,
.hint {
  color: var(--muted);
}

.dashboard,
.workbench {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.room-list {
  display: grid;
  gap: 12px;
}

.room-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 6px;
  padding: 16px;
}

.room-card:hover {
  border-color: var(--primary);
}

.room-card span {
  color: var(--muted);
  font-size: 14px;
}

.room-head {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.status {
  background: #eef4ff;
  border: 1px solid #bcd2ff;
  border-radius: 999px;
  color: #1849a9;
  font-weight: 700;
  padding: 8px 14px;
  white-space: nowrap;
}

.timeline-panel {
  margin-bottom: 18px;
}

.time-readout {
  font-size: 42px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  margin-bottom: 18px;
}

.timeline {
  background: #e6ebf3;
  border-radius: 999px;
  height: 28px;
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.timeline-draggable {
  cursor: pointer;
}

.timeline-fill {
  background: #9cc2ff;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 0;
}

.playhead {
  background: #111827;
  border-radius: 2px;
  height: 34px;
  left: 0;
  position: absolute;
  top: -3px;
  transform: translateX(-2px);
  width: 4px;
  z-index: 3;
}

.timeline-draggable .playhead {
  cursor: grab;
}

.markers {
  inset: 0;
  position: absolute;
}

.marker {
  border-radius: 50%;
  height: 14px;
  position: absolute;
  top: 7px;
  transform: translateX(-7px);
  width: 14px;
  z-index: 2;
}

.marker.good {
  background: var(--good);
}

.marker.bad {
  background: var(--bad);
}

.marker.special {
  background: var(--special);
}

.marker.bad-picture {
  background: var(--bad-picture);
}

.marker.bad-audio {
  background: var(--bad-audio);
}

.marker.bad-color {
  background: var(--bad-color);
}

.marker.bad-material {
  background: var(--bad-material);
}

.controls,
.annotation-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
}

.timeline-length-control {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.timeline-length-control input {
  min-height: 42px;
  width: 110px;
}

.annotation-actions button {
  flex: 1;
  min-width: 110px;
}

button.good {
  background: var(--good);
}

button.bad {
  background: var(--bad);
}

button.special {
  background: var(--special);
}

button#restartBtn {
  background: #4f46e5;
}

button.danger,
button.annotation-delete {
  background: #b42318;
}

button.bad-picture {
  background: var(--bad-picture);
}

button.bad-audio {
  background: var(--bad-audio);
}

button.bad-color {
  background: var(--bad-color);
}

button.bad-material {
  background: var(--bad-material);
}

.members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.members li {
  background: #f1f4f9;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
}

.annotation-list {
  display: grid;
  gap: 10px;
}

.annotation-item {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 90px 110px 1fr 120px auto;
  padding: 12px;
}

.annotation-delete {
  min-height: 34px;
  padding: 0 12px;
}

.annotation-kind {
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  padding: 6px 10px;
  text-align: center;
}

.annotation-kind.good {
  background: var(--good);
}

.annotation-kind.bad {
  background: var(--bad);
}

.annotation-kind.special {
  background: var(--special);
}

.annotation-kind.bad-picture {
  background: var(--bad-picture);
}

.annotation-kind.bad-audio {
  background: var(--bad-audio);
}

.annotation-kind.bad-color {
  background: var(--bad-color);
}

.annotation-kind.bad-material {
  background: var(--bad-material);
}

.annotation-note {
  color: #344054;
}

@media (max-width: 760px) {
  .topbar,
  .room-head,
  .userbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .page {
    padding: 18px;
  }

  .dashboard,
  .workbench {
    grid-template-columns: 1fr;
  }

  .time-readout {
    font-size: 34px;
  }

  .annotation-item {
    grid-template-columns: 1fr;
  }
}
