@font-face {
  font-family: LocalSans;
  src: local('Avenir Next'), local('Avenir'), local('Segoe UI');
  font-display: swap;
}
:root {
  --bg: #202923;
  --paper: #2a352d;
  --ink: #e3e9dc;
  --muted: #a8b29f;
  --line: #424e40;
  --green: #adc591;
  --mint: #394832;
  --lime: #bbce9d;
  --purple: #50455b;
  --purple-ink: #d0b7e2;
  --shadow: 0 12px 40px #00000016;
  font-family:
    LocalSans,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #b1c895;
  outline-offset: 3px;
}
button {
  border: 0;
}
button svg,
[data-icon] > svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.app-header {
  height: 86px;
  margin: 0 44px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 31px;
  font-weight: 650;
  letter-spacing: -1.6px;
}
.brand > svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.6;
}
.brand-dot {
  color: #b2c78e;
}
.brand-caption {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.3px;
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.save-state {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.save-state i {
  width: 6px;
  height: 6px;
  background: #afc68c;
  border-radius: 50%;
}
.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-button:hover {
  background: #354132;
}
.icon-button[aria-pressed='false'] {
  color: #78886e;
}
.icon-button svg {
  width: 20px;
  height: 20px;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 32px 44px 0;
}
.project-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 16px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 600;
  color: var(--muted);
}
.project-title {
  padding: 5px 0 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  text-align: left;
}
.project-title > span:first-child {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.9px;
  overflow-wrap: anywhere;
}
.project-title [data-icon] {
  color: #b5bea9;
  display: flex;
}
.project-title svg {
  width: 16px;
  height: 16px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: transparent;
  font-size: 12px;
  padding: 10px 0;
}
.text-button:hover {
  color: var(--green);
}
.demo-button {
  color: var(--green);
  border-bottom: 1px solid #52624c;
  padding: 9px 0;
}
.demo-button svg {
  width: 17px;
  height: 17px;
}
.workspace {
  display: grid;
  grid-template-columns: 190px minmax(360px, 1fr) 252px;
  gap: 22px;
  align-items: start;
}
.roster-panel {
  padding: 18px 0 0;
}
.panel-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}
h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.count {
  font-size: 10px;
  background: #354131;
  min-width: 23px;
  height: 23px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.panel-description {
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
  margin: 14px 0 22px;
}
.roster-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.roster-item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  background: transparent;
  min-height: 43px;
  padding: 6px 10px 6px 0;
  text-align: left;
  border-radius: 10px;
}
.roster-item:hover {
  background: #354432;
}
.roster-item .person-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  background: #3a4833;
  color: var(--green);
  font-size: 10px;
  flex-shrink: 0;
}
.roster-item.soloist .person-badge {
  background: var(--purple);
  color: var(--purple-ink);
}
.roster-name {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roster-star {
  margin-left: auto;
  color: var(--purple-ink);
  font-size: 13px;
}
.roster-empty {
  padding: 34px 0;
  color: #a2ae96;
}
.roster-empty svg {
  width: 30px;
  height: 30px;
  stroke-width: 1;
}
.roster-empty p {
  font-size: 12px;
  line-height: 1.7;
}
.roster-footnote {
  display: flex;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 26px;
}
.tiny-star {
  color: var(--purple-ink);
  font-size: 18px;
}
.stage-panel {
  min-width: 0;
}
.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 13px;
}
.segmented {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: #303b2d;
  border-radius: 12px;
}
.segmented button {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 9px;
  font-size: 12px;
  padding: 9px 13px;
  color: var(--muted);
}
.segmented button.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 6px #00000022;
}
.segmented svg {
  width: 16px;
  height: 16px;
}
.stage-actions {
  display: flex;
  gap: 2px;
}
.mobile-roster-button {
  display: none;
}
.canvas-wrap {
  position: relative;
  background: #263127;
  border: 1px solid #4b5a44;
  border-radius: 17px;
  padding: 34px 14px 38px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stage-edge {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  color: #a1af94;
  font-size: 8px;
  letter-spacing: 1.7px;
  pointer-events: none;
}
.stage-edge span {
  width: 38px;
  height: 1px;
  background: #4d5d44;
}
.back-edge {
  top: 16px;
}
.front-edge {
  bottom: 16px;
  color: #b3c49e;
}
.front-edge span {
  width: 60px;
  background: #8b9f7b;
}
.canvas-wrap > svg {
  width: 100%;
  display: block;
  aspect-ratio: 1000/720;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.center-guide {
  stroke: #46533e;
  stroke-width: 1;
  stroke-dasharray: 4 10;
  opacity: 0.5;
  pointer-events: none;
}
.stage-note {
  position: absolute;
  bottom: 43px;
  right: 24px;
  font-size: 7px;
  letter-spacing: 1.3px;
  color: #7d8b72;
  pointer-events: none;
}
.canvas-empty {
  position: absolute;
  inset: 30px 20px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.sketch {
  width: 144px;
  height: 94px;
  margin-bottom: 15px;
  fill: none;
  stroke: #b4c995;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sketch-arrow {
  stroke: #788c67;
}
.canvas-empty h2 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.4px;
}
.canvas-empty p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
  margin: 10px 0;
}
.canvas-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  min-height: 47px;
}
.legend {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5a5df;
}
.dancer {
  cursor: pointer;
  outline: none;
}
.dancer .body {
  fill: #405539;
  stroke: #a0b989;
  stroke-width: 2;
  transition: fill 0.15s;
}
.dancer.soloist .body {
  fill: #574863;
  stroke: #c6a7df;
}
.dancer.selected .body {
  stroke: var(--ink);
  stroke-width: 3;
}
.dancer .inner-label {
  font-size: 20px;
  fill: #edf4e2;
  font-weight: 500;
  pointer-events: none;
}
.dancer.soloist .inner-label {
  fill: #e6d2f6;
}
.dancer .name-label {
  font-size: 19px;
  fill: #dce6cf;
  paint-order: stroke;
  stroke: #263127;
  stroke-width: 5px;
  stroke-linejoin: round;
  pointer-events: none;
}
.dancer .star-label {
  font-size: 20px;
  fill: #d5b6ee;
  paint-order: stroke;
  stroke: #263127;
  stroke-width: 4px;
  pointer-events: none;
}
.route-line {
  fill: none;
  stroke: #9daf85;
  stroke-width: 2;
  stroke-dasharray: 6 7;
  opacity: 0.6;
  pointer-events: none;
}
.route-line.soloist {
  stroke: #b5a0cb;
}
.ghost-dot {
  fill: none;
  stroke: #829273;
  stroke-width: 1.5;
  opacity: 0.45;
  pointer-events: none;
}
#inkPath {
  fill: none;
  stroke: #b4cc91;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.playback {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 0 16px;
}
.play-button {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  flex-shrink: 0;
}
.playback-track {
  flex: 1;
}
.playback-track > div {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 3px;
}
input[type='range'] {
  width: 100%;
  accent-color: var(--green);
  height: 22px;
  margin: 0;
  cursor: pointer;
}
.timeline-area {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 9px;
}
.timeline-heading {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin-bottom: 13px;
}
.timeline-heading > span:last-child {
  letter-spacing: 0;
}
.timeline {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 6px;
}
.frame-card {
  flex: 0 0 115px;
  background: #2b372c;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  text-align: left;
}
.frame-card.active {
  border-color: #a4bd88;
  background: #394b31;
}
.frame-card > svg {
  display: block;
  width: 100%;
  height: 52px;
}
.frame-card > span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  color: #b0bca2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.frame-number {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #405235;
  font-size: 8px;
  flex-shrink: 0;
}
.frame-add {
  flex: 0 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px dashed #617253;
  border-radius: 11px;
  color: #a8b99a;
  font-size: 9px;
  min-height: 91px;
}
.frame-add svg {
  width: 18px;
  height: 18px;
}
.ideas-panel {
  padding: 21px 0 0 5px;
}
.ideas-header h2 {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.8px;
  margin: 10px 0;
}
.ideas-header p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 23px;
}
.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 15px;
  background: var(--green);
  color: #1c281f;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 500;
  transition: background 0.15s;
}
.primary-button:hover {
  background: #bfd2a4;
}
.primary-button svg {
  width: 17px;
  height: 17px;
}
.ideas-panel > .primary-button {
  width: 100%;
}
.ideas-tip {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin: 10px 2px 0;
}
.ideas-empty {
  border-top: 1px solid var(--line);
  text-align: center;
  margin-top: 28px;
  padding: 36px 3px;
}
.formation-illustration {
  position: relative;
  height: 72px;
  width: 116px;
  margin: 0 auto 18px;
}
.formation-illustration i {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid #697f58;
  background: #374930;
  border-radius: 50%;
}
.formation-illustration i:nth-child(1) {
  left: 52px;
  top: 0;
}
.formation-illustration i:nth-child(2) {
  left: 30px;
  top: 23px;
}
.formation-illustration i:nth-child(3) {
  left: 74px;
  top: 23px;
}
.formation-illustration i:nth-child(4) {
  left: 8px;
  top: 46px;
}
.formation-illustration i:nth-child(5) {
  left: 52px;
  top: 46px;
  background: var(--purple);
  border-color: #af97c5;
}
.formation-illustration i:nth-child(6) {
  left: 96px;
  top: 46px;
}
.formation-illustration i:nth-child(7) {
  left: 52px;
  top: 68px;
  width: 4px;
  height: 4px;
  opacity: 0.4;
}
.ideas-empty p {
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.3px;
  margin: 0 0 10px;
}
.ideas-empty > span {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}
.candidate-list {
  display: grid;
  gap: 8px;
  margin-top: 17px;
}
.candidate-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #2c382b;
  text-align: left;
  padding: 10px;
}
.candidate-card:hover {
  border-color: #879e70;
}
.candidate-card.active {
  background: #394b30;
  border-color: #aac889;
}
.candidate-card > svg {
  width: 65px;
  height: 48px;
  flex-shrink: 0;
}
.candidate-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.candidate-info b {
  font-size: 11px;
  font-weight: 500;
}
.candidate-info small {
  font-size: 9px;
  line-height: 1.5;
  color: var(--muted);
}
.candidate-info .warning {
  color: #e2b383;
}
.candidate-actions {
  margin-top: 15px;
}
.accept-button {
  width: 100%;
  background: #b2c98e;
  color: #22321e;
}
.accept-button:hover {
  background: #c6d8a7;
}
.cancel-preview {
  display: flex;
  margin: auto;
  color: var(--muted);
  font-size: 10px;
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0 23px;
  font-size: 9px;
  color: #9ca98f;
}
.workspace-footer > span:first-child {
  font-style: italic;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 21px;
  padding: 25px;
  background: var(--paper);
  color: var(--ink);
  width: min(410px, calc(100% - 30px));
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 30px 90px #00000044;
}
dialog::backdrop {
  background: #10190dcc;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 23px;
}
.dialog-heading h2 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.dialog-heading .icon-button {
  margin-right: -10px;
}
.field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.text-input {
  width: 100%;
  border: 1px solid #637657;
  border-radius: 10px;
  background: var(--paper);
  padding: 13px;
  font-size: 16px;
  color: var(--ink);
}
.soloist-option {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 0;
  cursor: pointer;
}
.soloist-option input {
  width: 18px;
  height: 18px;
  accent-color: #b99bd2;
}
.soloist-option-icon {
  color: #c7a5e1;
  font-size: 24px;
}
.soloist-option b {
  font-size: 13px;
  font-weight: 500;
  display: block;
}
.soloist-option small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 14px;
}
.dialog-actions .primary-button {
  min-width: 120px;
}
.danger-button {
  background: transparent;
  color: #e4a38a;
  font-size: 12px;
  padding: 10px 0;
}
.dialog-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin: 22px 0 0;
}
.menu-item {
  display: flex;
  width: 100%;
  text-align: left;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.menu-item small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.menu-item > span:first-child {
  display: flex;
  color: #a7bd8a;
}
.saved-projects {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}
.saved-projects button {
  display: flex;
  justify-content: space-between;
  text-align: left;
  font-size: 11px;
  padding: 12px;
  background: #35442e;
  border-radius: 9px;
  gap: 12px;
  overflow-wrap: anywhere;
}
.saved-projects small {
  color: var(--muted);
  white-space: nowrap;
}
.full-width {
  width: 100%;
  margin-top: 20px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: max(25px, env(safe-area-inset-bottom));
  transform: translate(-50%, 15px);
  background: #b1c591;
  color: #1c281f;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 0 8px 30px #00000044;
  max-width: calc(100vw - 30px);
  width: max-content;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1500px) {
  .workspace {
    grid-template-columns: 220px minmax(500px, 1fr) 280px;
    gap: 34px;
  }
  .canvas-wrap {
    padding: 38px 20px 43px;
  }
  .canvas-wrap > svg {
    max-height: 560px;
  }
  .ideas-panel {
    padding-top: 25px;
  }
  .primary-button {
    font-size: 12px;
  }
  .roster-item {
    min-height: 46px;
  }
}
@media (max-width: 1150px) {
  .app-header {
    margin: 0 25px;
  }
  main {
    padding: 27px 25px 0;
  }
  .workspace {
    grid-template-columns: 145px minmax(330px, 1fr) 220px;
    gap: 15px;
  }
  .ideas-panel {
    padding-left: 0;
  }
  .ideas-header h2 {
    font-size: 23px;
  }
  .primary-button {
    padding: 12px 9px;
    font-size: 10px;
  }
  .legend {
    display: none;
  }
  .segmented button {
    padding: 9px 10px;
  }
  .roster-name {
    font-size: 11px;
  }
}
@media (max-width: 950px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 23px;
  }
  .roster-panel {
    display: none;
  }
  .mobile-roster-button {
    display: inline-flex;
  }
  .brand-caption {
    display: none;
  }
  .project-heading {
    margin-bottom: 24px;
  }
  .ideas-panel {
    padding-top: 15px;
  }
  .workspace-footer {
    font-size: 8px;
  }
  .canvas-caption {
    font-size: 10px;
  }
  .stage-actions .icon-button {
    width: 35px;
  }
}
@media (max-width: 650px) {
  .app-header {
    height: 69px;
    margin: 0 19px;
    padding-top: env(safe-area-inset-top);
    gap: 10px;
  }
  .brand {
    font-size: 27px;
    gap: 9px;
  }
  .brand > svg {
    width: 29px;
    height: 29px;
  }
  .header-actions {
    gap: 10px;
  }
  .save-state {
    font-size: 9px;
    gap: 5px;
  }
  .icon-button {
    width: 36px;
    height: 36px;
  }
  main {
    padding: 23px 15px 0;
  }
  .project-heading {
    margin-bottom: 22px;
    align-items: flex-start;
    gap: 8px;
    padding: 0 4px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  .project-title {
    gap: 9px;
    padding-top: 5px;
  }
  .project-title > span:first-child {
    font-size: 24px;
    letter-spacing: -0.6px;
  }
  .project-title svg {
    width: 13px;
    height: 13px;
  }
  .demo-button {
    font-size: 9px;
    gap: 5px;
    max-width: 128px;
    text-align: left;
    margin-top: 10px;
    line-height: 1.5;
  }
  .demo-button svg {
    width: 14px;
    height: 14px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 25px;
  }
  .stage-panel {
    width: 100%;
  }
  .stage-toolbar {
    margin-bottom: 10px;
    gap: 5px;
    padding: 0 2px;
  }
  .segmented {
    padding: 3px;
    border-radius: 11px;
    gap: 0;
  }
  .segmented button {
    font-size: 11px;
    gap: 6px;
    padding: 9px 10px;
  }
  .segmented svg {
    width: 15px;
    height: 15px;
  }
  .stage-actions {
    gap: 0;
  }
  .stage-actions .icon-button {
    width: 33px;
  }
  .stage-actions svg {
    width: 18px;
    height: 18px;
  }
  .canvas-wrap {
    border-radius: 15px;
    padding: 31px 8px 35px;
  }
  .stage-edge {
    font-size: 6px;
    letter-spacing: 1.4px;
    gap: 10px;
  }
  .back-edge {
    top: 14px;
  }
  .front-edge {
    bottom: 14px;
  }
  .stage-edge span {
    width: 32px;
  }
  .front-edge span {
    width: 41px;
  }
  .stage-note {
    font-size: 5px;
    right: 14px;
    bottom: 35px;
  }
  .canvas-empty h2 {
    font-size: 17px;
  }
  .canvas-empty p {
    font-size: 11px;
    line-height: 1.6;
  }
  .sketch {
    width: 108px;
    height: 68px;
    margin-bottom: 10px;
  }
  .canvas-caption {
    font-size: 9px;
    padding: 10px 2px;
    min-height: 38px;
  }
  .timeline-area {
    padding-top: 14px;
    margin-top: 7px;
  }
  .timeline-heading {
    font-size: 8px;
    letter-spacing: 1px;
    margin-bottom: 10px;
  }
  .frame-card {
    flex-basis: 103px;
  }
  .frame-card > svg {
    height: 44px;
  }
  .frame-add {
    min-height: 80px;
    flex-basis: 72px;
  }
  .timeline {
    gap: 8px;
  }
  .ideas-panel {
    border-top: 1px solid var(--line);
    padding: 22px 4px 0;
    width: 100%;
  }
  .ideas-header h2 {
    font-size: 25px;
    margin: 7px 0;
  }
  .ideas-header p {
    font-size: 11px;
    margin: 8px 0 17px;
  }
  .ideas-header p br {
    display: none;
  }
  .ideas-panel > .primary-button {
    font-size: 12px;
    min-height: 47px;
  }
  .ideas-tip {
    font-size: 10px;
    margin-top: 8px;
  }
  .ideas-empty {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 18px;
    padding: 24px 0;
    margin-top: 20px;
  }
  .formation-illustration {
    flex-shrink: 0;
    transform: scale(0.7);
    margin: 0;
    width: 90px;
    transform-origin: center;
  }
  .ideas-empty p {
    font-size: 15px;
    margin: 0;
  }
  .ideas-empty > span {
    display: none;
  }
  .candidate-list {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .candidate-card {
    gap: 7px;
    padding: 10px 7px;
    min-height: 88px;
    flex-direction: column;
    align-items: flex-start;
  }
  .candidate-card > svg {
    width: 100%;
    height: 46px;
  }
  .candidate-info {
    padding: 0 4px;
  }
  .candidate-info b {
    font-size: 11px;
  }
  .candidate-info small {
    font-size: 9px;
  }
  .candidate-actions {
    position: sticky;
    bottom: 10px;
    background: #202923f2;
    padding: 10px 0 0;
    z-index: 2;
    border-radius: 12px;
  }
  .accept-button {
    font-size: 12px;
    min-height: 46px;
    box-shadow: 0 6px 20px #00000033;
  }
  .cancel-preview {
    padding: 10px;
    font-size: 11px;
  }
  .workspace-footer {
    padding: 24px 4px max(22px, env(safe-area-inset-bottom));
    flex-direction: column;
    gap: 9px;
    font-size: 8px;
  }
  .workspace-footer > span:first-child {
    display: none;
  }
  .playback {
    padding-top: 4px;
    padding-bottom: 10px;
  }
  .roster-item {
    min-height: 48px;
  }
  .roster-name {
    font-size: 13px;
  }
  .dancer .name-label {
    font-size: 23px;
  }
  .dancer .inner-label {
    font-size: 25px;
  }
  .dancer .star-label {
    font-size: 23px;
  }
  dialog {
    padding: 21px;
    border-radius: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 650px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .ideas-panel > .primary-button {
    position: fixed;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 15px;
    right: 15px;
    width: calc(100% - 30px);
    z-index: 5;
    min-height: 49px;
    font-size: 12px;
    box-shadow:
      0 4px 0 10px var(--bg),
      0 0 25px 10px var(--bg);
  }
  .previewing .ideas-panel > .primary-button {
    position: static;
    width: 100%;
    box-shadow: none;
    min-height: 44px;
  }
  .previewing .candidate-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 15px 15px 0 0;
    padding: 12px 15px max(4px, env(safe-area-inset-bottom));
    z-index: 6;
    background: #202923;
    box-shadow: 0 -8px 25px #00000044;
  }
  .previewing {
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }
  .canvas-wrap {
    scroll-margin-top: 12px;
  }
  .candidate-list {
    scroll-margin-top: 18px;
  }
  .dancer .name-label {
    font-size: 29px;
  }
}

/* Manual destination editing and custom slot assignment. */
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #303d2d;
  color: var(--ink);
  font-size: 11px;
}
.secondary-button:hover {
  background: #3d4e35;
}
.ideas-panel > .secondary-button {
  width: 100%;
  margin-top: 9px;
}
.draft-controls,
.custom-controls {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #2a372a;
  font-size: 11px;
  line-height: 1.7;
}
.custom-controls p {
  margin: 0;
  color: var(--muted);
}
.stage-warning,
.warning {
  color: #e6bc8a;
  font-size: 11px;
  line-height: 1.6;
}
.stage-warning {
  margin: 0 0 8px;
}
.pin-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 24px;
  font-size: 13px;
}
.pin-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.swap-controls {
  display: flex;
  gap: 8px;
}
.swap-controls select {
  min-width: 0;
  flex: 1;
}
select.text-input {
  background: #303e2e;
  color: var(--ink);
}
.slot-body {
  fill: #35482f;
  stroke: #a3bd88;
  stroke-width: 2;
  stroke-dasharray: 6 5;
}
.destination-slot.assigned .slot-body {
  fill: #454064;
  stroke: #baa5db;
  stroke-dasharray: none;
}
.destination-slot {
  cursor: pointer;
}
.destination-slot .inner-label {
  font-size: 24px;
  fill: #e3ecd8;
}
.destination-slot .name-label {
  font-size: 25px;
  fill: #e3ecd8;
  paint-order: stroke;
  stroke: #263127;
  stroke-width: 5px;
}
.pin-label {
  font-size: 26px;
  fill: #d1dfbb;
  paint-order: stroke;
  stroke: #263127;
  stroke-width: 4px;
}
.roster-pin {
  margin-left: 4px;
  color: #c0d3a8;
  font-size: 14px;
}
.soloist-option-icon {
  color: #d0b1eb;
}
.save-state {
  min-height: 20px;
}
.ideas-header p {
  max-width: 230px;
}
body {
  color-scheme: dark;
}
.canvas-empty p {
  max-width: 240px;
}
@media (max-width: 650px) {
  .stage-actions .icon-button {
    width: 29px;
  }
  .segmented button {
    padding: 9px 8px;
  }
  .stage-toolbar {
    gap: 2px;
  }
  .drawing-layout {
    padding-bottom: calc(165px + env(safe-area-inset-bottom));
  }
  .drawing-layout .ideas-panel > .primary-button {
    position: static;
    box-shadow: none;
    width: 100%;
  }
  .drawing-layout .custom-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 6;
    margin: 0;
    padding: 12px 15px max(4px, env(safe-area-inset-bottom));
    border-radius: 15px 15px 0 0;
    gap: 5px;
    background: var(--bg);
  }
  .drawing-layout .custom-controls p {
    display: none;
  }
  .drawing-layout .custom-controls .primary-button {
    font-size: 12px;
    min-height: 45px;
  }
  .drawing-layout .custom-controls > b {
    font-weight: 500;
    font-size: 11px;
  }
  .draft-controls {
    padding: 12px;
  }
  .pin-label {
    font-size: 31px;
  }
  .destination-slot .name-label {
    font-size: 29px;
  }
}
