/* Tropical Studio · load after experience.css. Scoped, no assets or animation. */
.completion-sound {
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  min-width: 0;
  max-width: 100%;
}
.completion-sound > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  max-width: 100%;
  margin: 0;
  padding: .5rem .7rem;
  color: var(--ink-soft, #657189);
  background: var(--surface-subtle, #f8f9fc);
  border: 1px solid var(--line, #e5e9f1);
  border-radius: 12px;
  font-family: inherit;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: transform 170ms ease, opacity 170ms ease;
  -webkit-tap-highlight-color: transparent;
}
.completion-sound > .completion-sound__toggle[aria-pressed="true"] {
  color: var(--teal-dark, #06665f);
  background: var(--teal-soft, #e4f6f1);
  border-color: #cfe6d8;
}
.completion-sound > .completion-sound__probe {
  color: var(--teal-dark, #06665f);
  background: var(--surface, #fff);
}
.completion-sound > button:hover:not(:disabled) {
  color: var(--teal-dark, #06665f);
  border-color: #bddbd0;
}
.completion-sound > button:focus-visible {
  outline: 3px solid var(--teal, #087f77);
  outline-offset: 3px;
}
.completion-sound > button:active:not(:disabled) { transform: translateY(1px); }
.completion-sound > button:disabled { opacity: .5; cursor: not-allowed; }
.completion-sound > [hidden] { display: none !important; }
@media (max-width: 640px) {
  .completion-sound { gap: .25rem; }
  .completion-sound > button { min-height: 44px; padding: .45rem .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  .completion-sound > button { transition: none !important; }
  .completion-sound > button:active:not(:disabled) { transform: none !important; }
}
@media (forced-colors: active) {
  .completion-sound > .completion-sound__toggle[aria-pressed="true"] {
    border: 2px solid Highlight;
  }
}

/* The existing compact topbar only reserved space for two controls. */
@media (max-width: 640px) {
  body.has-app-shell .topbar { flex-wrap: wrap; height: auto; }
  body.has-app-shell .topbar-tools {
    order: 5;
    flex: 1 1 100%;
    max-width: none;
    justify-content: flex-start;
    overflow: visible;
  }
  body.has-app-shell #completion-sound-host { min-width: 0; flex: 1 1 auto; }
  body.has-app-shell .completion-sound { justify-content: flex-start; }
}
