.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-primary);
  font: var(--type-caption);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    filter var(--transition-fast);
}

.btn--primary {
  background: var(--action-primary);
  color: #fff;
}
.btn--primary:hover {
  filter: brightness(0.95);
}
.btn--secondary {
  background: var(--bg-card);
  border-color: var(--line-strong);
}
.btn--secondary:hover {
  background: var(--bg-soft);
}
.btn--danger {
  background: var(--action-danger);
  color: #fff;
}
.btn--danger:hover {
  filter: brightness(0.93);
}
.btn--ghost {
  padding: 0 var(--space-3);
}
.btn--ghost:hover {
  background: var(--bg-soft);
}
.btn--ghost-danger {
  padding: 0 var(--space-3);
  color: var(--action-danger);
}
.btn--ghost-danger:hover {
  background: #fbe9e7;
}
.btn--sm {
  height: var(--control-height-compact);
  padding: 0 var(--space-4);
}
.btn--ghost.btn--sm,
.btn--ghost-danger.btn--sm {
  padding: 0 var(--space-2);
}
.btn--block {
  width: 100%;
}
.btn:disabled,
.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  pointer-events: none;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--control-height);
  height: var(--control-height);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-soft);
  color: var(--text-primary);
}
.icon-btn--sm {
  width: var(--control-height-compact);
  height: var(--control-height-compact);
}
.icon-btn--xs {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.icon-btn--outlined {
  border-color: var(--line-strong);
  background: var(--bg-card);
  color: var(--text-primary);
}
.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

form.button_to {
  display: inline-flex;
  margin: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.field > legend {
  margin-bottom: var(--space-2);
}
.field__label {
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}
.field__hint {
  color: var(--text-muted);
}
.field__error {
  color: var(--action-danger);
}
.field.has-error .input {
  border-color: var(--action-danger);
}

.input {
  width: 100%;
  height: var(--control-height);
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--bg-card);
  color: var(--text-primary);
  font: var(--type-caption);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.input::placeholder {
  color: var(--text-subtle);
}
.input:hover {
  border-color: #c6c6c0;
}
.input:focus {
  outline: none;
  border-color: var(--note-selected);
  box-shadow: var(--focus-ring);
}
.input:disabled {
  background: var(--bg-soft);
  color: var(--text-muted);
}
.input--sm {
  height: var(--control-height-compact);
}
textarea.input {
  height: auto;
  min-height: 96px;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
}
select.input {
  appearance: none;
  padding-right: var(--space-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%2366645f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}
.checkbox input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--note-selected);
}

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-control);
  background: #fbe9e7;
  color: var(--action-danger);
}
.inline-error {
  color: var(--action-danger);
}

.choice-group {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: var(--space-2);
}

.choice,
.voice-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.choice input,
.voice-option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.choice:hover,
.voice-option:hover {
  background: var(--bg-soft);
}
.choice:has(input:focus-visible),
.voice-option:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}

.choice:has(input:checked),
.choice.is-selected {
  background: var(--voice-alto-bg);
  border-color: var(--voice-alto);
  color: var(--voice-alto);
}

.voice-option--soprano {
  --voice: var(--voice-soprano);
  --voice-bg: var(--voice-soprano-bg);
}
.voice-option--alto {
  --voice: var(--voice-alto);
  --voice-bg: var(--voice-alto-bg);
}
.voice-option--tenor {
  --voice: var(--voice-tenor);
  --voice-bg: var(--voice-tenor-bg);
}
.voice-option--bass {
  --voice: var(--voice-bass);
  --voice-bg: var(--voice-bass-bg);
}

.voice-option:has(input:checked),
.voice-option.is-selected {
  background: var(--voice-bg);
  border-color: var(--voice);
  color: var(--voice);
}

.voice-option:has(input:disabled),
.voice-option.is-disabled,
.choice:has(input:disabled) {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-card);
}

.voice-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 32px;
  padding: 0 var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-round);
  background: var(--chip-bg, var(--bg-soft));
  color: var(--text-primary);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.voice-chip--soprano {
  --chip-bg: var(--voice-soprano-bg);
  --chip-fg: var(--voice-soprano);
}
.voice-chip--alto {
  --chip-bg: var(--voice-alto-bg);
  --chip-fg: var(--voice-alto);
}
.voice-chip--tenor {
  --chip-bg: var(--voice-tenor-bg);
  --chip-fg: var(--voice-tenor);
}
.voice-chip--bass {
  --chip-bg: var(--voice-bass-bg);
  --chip-fg: var(--voice-bass);
}
.voice-chip--none {
  --chip-bg: var(--bg-soft);
  --chip-fg: var(--text-muted);
  border-color: var(--line-strong);
}
.voice-chip--draggable {
  cursor: grab;
}

.voice-chip__remove {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: calc(-1 * var(--space-2));
  padding: 0;
  border: 0;
  border-radius: var(--radius-round);
  background: transparent;
  color: var(--chip-fg, var(--text-muted));
  cursor: pointer;
}

.voice-chip__remove:hover {
  background: rgba(42, 35, 32, 0.08);
}

.voice-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-semibold);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.status-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-subtle);
}
.status-dot--progress {
  background: var(--status-progress);
}
.status-dot--done {
  background: var(--status-done);
}
.status-dot--error {
  background: var(--action-danger);
}
.status-dot--neutral {
  background: var(--text-subtle);
}
.status-dot--action {
  background: var(--action-primary);
}
.status--error {
  color: var(--action-danger);
}

.meter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-variant-numeric: tabular-nums;
}
.meter__track {
  position: relative;
  flex: none;
  width: 96px;
  height: 6px;
  border-radius: var(--radius-round);
  background: var(--bg-soft);
  overflow: hidden;
}
.meter__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--status-progress);
  transition: width 0.3s ease;
}
.meter--done .meter__fill {
  background: var(--status-done);
}
.meter--empty .meter__fill {
  display: none;
}
.meter--wide .meter__track {
  width: 240px;
}
.meter--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 48px;
  max-width: 560px;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5);
  border-radius: var(--radius-control);
  background: var(--toast-bg);
  color: #fff;
  box-shadow: var(--shadow-menu);
  animation: toast-in 180ms ease-out;
}

.toast--alert {
  background: var(--action-danger);
}
.toast__message {
  flex: 1;
}
.toast__action {
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-weight: var(--weight-bold);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
}
.toast__action form {
  display: inline;
}
.toast__close {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}
.toast__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.is-revealed:not(tr),
tr.is-revealed > td {
  animation: reveal-flash 2400ms ease-out;
}

@keyframes reveal-flash {
  0%,
  40% {
    background-color: var(--note-selected-bg);
  }
  100% {
    background-color: transparent;
  }
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--text-primary);
}
.breadcrumb__current {
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}
.breadcrumb .icon {
  color: var(--text-subtle);
}

.hint {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-hint);
  border-radius: var(--radius-control);
  background: var(--bg-hint);
}

.hint__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--choir-indigo);
  color: #fff;
}
.hint__text {
  flex: 1;
}
.hint__dismiss {
  flex: none;
  padding: var(--space-1) var(--space-2);
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-weight: var(--weight-semibold);
  cursor: pointer;
}
.hint__dismiss:hover {
  background: rgba(255, 255, 255, 0.6);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line-default);
  border-radius: var(--radius-card);
  padding: var(--space-6);
}
.card--flush {
  padding: 0;
  overflow: hidden;
}
.card--dashed {
  background: transparent;
  border: 1.5px dashed var(--line-strong);
}
.card__divider {
  height: 1px;
  margin: var(--space-4) 0;
  background: var(--line-default);
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-12) var(--space-6);
  text-align: center;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-control);
  background: var(--empty-icon-bg);
  color: var(--empty-icon-fg);
}
.empty__title {
  font: var(--type-title);
}
.empty__text {
  max-width: 560px;
  color: var(--text-muted);
}
.empty__actions {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-3);
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  padding: var(--space-4) var(--space-6);
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line-default);
}
.table th {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  color: var(--text-muted);
  font-weight: var(--weight-regular);
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover td {
  background: #fbfbfa;
}
.table__primary {
  font: var(--type-body);
  font-weight: var(--weight-semibold);
}
.table__secondary {
  color: var(--text-muted);
}
.table__actions {
  text-align: right;
  white-space: nowrap;
}
.table__actions > * + * {
  margin-left: var(--space-2);
}

.list-rows > * {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--line-default);
}
.list-rows > *:last-child {
  border-bottom: 0;
}

.tabbar {
  display: flex;
  gap: var(--space-8);
  border-bottom: 1px solid var(--line-default);
  margin-bottom: var(--space-6);
}

.tabbar__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.tabbar__tab:hover {
  color: var(--text-primary);
}
.tabbar__tab.is-active {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}
.tabbar__tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--action-primary);
}
.tabbar__count {
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
}

.dropdown {
  position: relative;
  display: inline-flex;
}

.menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 40;
  min-width: 296px;
  padding: var(--space-2);
  border: 1px solid var(--line-default);
  border-radius: var(--radius-control);
  background: var(--bg-card);
  box-shadow: var(--shadow-menu);
}

.menu--left {
  left: 0;
  right: auto;
}
.menu__header {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-3) var(--space-3);
}
.menu__title {
  font-weight: var(--weight-semibold);
}
.menu__subtitle {
  color: var(--text-muted);
}
.menu__separator {
  height: 1px;
  margin: var(--space-1) 0;
  background: var(--line-default);
}

.menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--control-height);
  padding: 0 var(--space-3);
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.menu__item .icon {
  color: var(--text-muted);
}
.menu__item:hover {
  background: var(--bg-soft);
}
.menu__item--danger,
.menu__item--danger .icon {
  color: var(--action-danger);
}
.menu form.button_to {
  display: block;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: var(--weight-semibold);
  cursor: pointer;
}

.choir-avatar {
  --size: 56px;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: calc(var(--size) * 0.25);
  background: var(--choir-color, var(--choir-indigo));
  color: #fff;
}

.choir-avatar--44 {
  --size: 44px;
}
.choir-avatar--40 {
  --size: 40px;
}
.choir-avatar--indigo {
  --choir-color: var(--choir-indigo);
}
.choir-avatar--clay {
  --choir-color: var(--choir-clay);
}
.choir-avatar--teal {
  --choir-color: var(--choir-teal);
}
.choir-avatar--sage {
  --choir-color: var(--choir-sage);
}
.choir-avatar--plum {
  --choir-color: var(--choir-plum);
}
.choir-avatar--sky {
  --choir-color: var(--choir-sky);
}
.choir-avatar--violet {
  --choir-color: var(--choir-violet);
}
.choir-avatar--graphite {
  --choir-color: var(--choir-graphite);
}

.picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.picker__option {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
}

.picker__option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.picker__option:hover {
  background: var(--bg-soft);
}
.picker__option:has(input:checked) {
  border: 2px solid var(--text-primary);
  background: var(--bg-soft);
}
.picker__option:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}
.picker__option--color {
  border: 0;
  background: var(--choir-color);
  color: #fff;
}
.picker__option--color:hover {
  background: var(--choir-color);
  filter: brightness(0.95);
}
.picker__option--color .icon {
  visibility: hidden;
}
.picker__option--color:has(input:checked) {
  border: 0;
  background: var(--choir-color);
}
.picker__option--color:has(input:checked) .icon {
  visibility: visible;
}

.voice-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line-default);
  border-radius: var(--radius-card);
}
.voice-panel__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 56px;
  padding: 0 var(--space-5);
  background: var(--panel-bg);
  color: var(--panel-fg);
  font: var(--type-body);
  font-weight: var(--weight-semibold);
}
.voice-panel__count {
  margin-left: auto;
  font: var(--type-caption);
  font-weight: var(--weight-medium);
}
.voice-panel__list {
  list-style: none;
  padding: var(--space-1) var(--space-5) var(--space-3);
}
.voice-panel__list > li {
  display: flex;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--line-default);
}
.voice-panel__list > li:last-child {
  border-bottom: 0;
}
.voice-panel__member {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.voice-panel__member:hover {
  color: var(--panel-fg);
}
.voice-panel--soprano {
  --panel-bg: var(--voice-soprano-bg);
  --panel-fg: var(--voice-soprano);
}
.voice-panel--alto {
  --panel-bg: var(--voice-alto-bg);
  --panel-fg: var(--voice-alto);
}
.voice-panel--tenor {
  --panel-bg: var(--voice-tenor-bg);
  --panel-fg: var(--voice-tenor);
}
.voice-panel--bass {
  --panel-bg: var(--voice-bass-bg);
  --panel-fg: var(--voice-bass);
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-8) var(--space-6);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-control);
  text-align: center;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast);
}

.dropzone.is-over {
  border-color: var(--note-selected);
  background: var(--note-selected-bg);
}
.dropzone__title {
  font-weight: var(--weight-semibold);
  margin-top: var(--space-2);
}
.dropzone__text {
  color: var(--text-muted);
}
.dropzone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.dropzone__actions {
  margin-top: var(--space-3);
}

.modal {
  width: min(var(--modal-width), calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: var(--space-8);
  border: 0;
  border-radius: var(--radius-card);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-modal);
}

.modal--wide {
  --modal-width: 720px;
}
.modal::backdrop {
  background: var(--backdrop);
}
.modal[open] {
  animation: modal-in 160ms ease-out;
}
.modal__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.modal__title {
  font: var(--type-title);
  font-size: 24px;
  line-height: 32px;
  flex: 1;
}
.modal__lead {
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}
.modal__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.modal__footer-start {
  margin-right: auto;
}
.modal__footer-start:is(.btn--ghost, .btn--ghost-danger),
.modal__footer-start > [data-controller~="modal"] > :is(.btn--ghost, .btn--ghost-danger) {
  margin-left: calc(-1 * var(--space-3));
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(var(--drawer-width), 100vw);
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: var(--space-8);
  border: 0;
  background: var(--bg-card);
  color: var(--text-primary);
  overflow-y: auto;
}

.drawer::backdrop {
  background: rgba(42, 35, 32, 0.92);
}
.drawer[open] {
  animation: drawer-in 200ms ease-out;
}
.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.drawer__title {
  font: var(--type-title);
  font-size: 24px;
  line-height: 32px;
}
.drawer__lead {
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}
.drawer__footer {
  margin-top: var(--space-6);
  color: var(--text-muted);
}
.drawer__footer a {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

@keyframes drawer-in {
  from {
    transform: translateX(32px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.accordion__item {
  border: 1px solid var(--line-default);
  border-radius: var(--radius-control);
  background: var(--bg-card);
}
.accordion__summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-3) var(--space-4);
  list-style: none;
  cursor: pointer;
  font-weight: var(--weight-medium);
}
.accordion__summary::-webkit-details-marker {
  display: none;
}
.accordion__summary .icon {
  margin-left: auto;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}
.accordion__item[open] .accordion__summary .icon {
  transform: rotate(90deg);
}
.accordion__body {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--text-muted);
}
.accordion__body ol {
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-round);
  background: var(--bg-soft);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
}
.counter--warning {
  background: var(--bg-warning);
  color: var(--text-warning);
}

.hint--cross {
  align-items: flex-start;
  padding: 14px var(--space-4);
  border-radius: var(--radius-card);
}
.hint--cross .hint__text {
  align-self: center;
}
.hint__close {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--control-height);
  height: var(--control-height);
  margin: -12px -12px -12px -8px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.hint__close:hover {
  color: var(--text-primary);
}
.hint__link {
  padding: 0;
  border: 0;
  background: none;
  font-weight: var(--weight-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.voice-chip--iconic {
  gap: 6px;
  color: var(--chip-fg, var(--text-primary));
}
.chip-muted {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-round);
  background: var(--bg-soft);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.avatar--lg {
  width: 80px;
  height: 80px;
  font-size: 32px;
  cursor: default;
}

.status-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-hint);
  color: var(--choir-indigo);
}
.status-icon--done {
  background: var(--voice-tenor-bg);
  color: var(--voice-tenor);
}
.status-icon--warning {
  background: var(--bg-warning);
  color: var(--text-warning);
}
.status-icon--muted {
  background: var(--bg-soft);
  color: var(--text-muted);
}

.choir-avatar--36 {
  --size: 36px;
}

.segmented {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: var(--space-1);
  padding: var(--space-1);
  border-radius: var(--radius-control);
  background: var(--bg-soft);
}
.segmented__option {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--control-height);
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: var(--weight-semibold);
  cursor: pointer;
}
.segmented__option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.segmented__option:has(input:checked) {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(42, 35, 32, 0.12);
}
.segmented__option:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}

.steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.steps > li {
  counter-increment: step;
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  font: var(--type-caption);
  font-weight: var(--weight-semibold);
}

@keyframes sheet-in {
  from {
    transform: translateY(32px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .modal--sheet {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - var(--space-12));
    margin: auto 0 0;
    padding: var(--space-8) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    font: var(--type-body);
  }
  .modal--sheet::before {
    content: "";
    position: absolute;
    top: 10px;
    left: calc(50% - 20px);
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--line-strong);
  }
  .modal--sheet[open] {
    animation: sheet-in 200ms ease-out;
  }
  .modal--sheet .modal__title {
    font-size: 22px;
    line-height: 28px;
    font-weight: var(--weight-bold);
  }
  .modal--sheet .modal__footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .modal--sheet .modal__footer form.button_to {
    display: flex;
  }
  .modal--sheet .modal__footer .btn {
    width: 100%;
  }
  .modal--sheet :is(.btn, .input) {
    height: var(--control-height-large);
    font-size: 18px;
  }

  .toasts {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
    align-items: stretch;
  }
}
