.piano-atlas {
  --ink: #262626;
  --muted: #6b7280;
  --line: #dee2e6;
  --accent: #ffe54c;
  --atlas-background: #f7f7f7;
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  color: var(--ink);
  background: var(--atlas-background);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.3;
}
.piano-atlas *, .piano-atlas *::before, .piano-atlas *::after {
  box-sizing: border-box;
}
.piano-atlas button, .piano-atlas input {
  font: inherit;
}
.piano-atlas button {
  cursor: pointer;
  border: 0;
  color: inherit;
  background: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.piano-atlas button:focus-visible, .piano-atlas input:focus-visible, .piano-atlas a:focus-visible {
  outline: 2px solid var(--ink) !important;
  outline-offset: 3px;
}
.piano-atlas button:hover {
  color: #000;
}
.piano-atlas [hidden] {
  display: none !important;
}
.piano-atlas h1, .piano-atlas h2, .piano-atlas p {
  margin: 0;
}
.piano-atlas h1, .piano-atlas h2 {
  font-weight: 700;
  letter-spacing: normal;
}
.piano-atlas #piano-stage {
  position: absolute;
  inset: 0;
}
.piano-atlas #piano-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}
.piano-atlas .atlas-header {
  position: absolute;
  top: 24px;
  left: 32px;
  right: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  pointer-events: none;
  z-index: 3;
}
.piano-atlas .atlas-header > * {
  pointer-events: auto;
}
.piano-atlas .atlas-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}
.piano-atlas .atlas-brand h1 {
  font-size: 2rem;
  margin: 0 0 6px;
}
.piano-atlas .atlas-brand p {
  font-size: 0.875rem;
  color: var(--muted);
}
.piano-atlas .atlas-layout-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.piano-atlas .atlas-play {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-size: 18px;
}
.piano-atlas .atlas-play:hover {
  background: #f1f3f4;
}
.piano-atlas .atlas-modes {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
}
.piano-atlas .atlas-modes button {
  padding: 9px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}
.piano-atlas .atlas-modes button:hover {
  background: #f1f3f4;
}
.piano-atlas .atlas-modes button.is-active {
  background: var(--ink);
  color: white;
}
.piano-atlas .atlas-piano-select {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.piano-atlas .atlas-piano-select select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 28px 6px 10px;
  cursor: pointer;
}
.piano-atlas .atlas-piano-select select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.piano-atlas .atlas-search-wrap {
  display: flex;
  position: relative;
}
.piano-atlas .atlas-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #7f8588;
  border-radius: 999px;
  padding: 10px 14px;
  margin: 0;
}
.piano-atlas .atlas-search > span {
  font-size: 20px;
  line-height: 1;
}
.piano-atlas .atlas-search input {
  width: 150px;
  border: none;
  background: none;
  outline: none !important;
  font-size: 0.875rem;
  color: var(--ink);
}
.piano-atlas .atlas-search input::-moz-placeholder {
  color: var(--muted);
  opacity: 1;
}
.piano-atlas .atlas-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.piano-atlas .atlas-search kbd {
  background: #f1f3f4;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 1px 5px;
}
.piano-atlas .atlas-search:focus-within {
  border-color: var(--ink);
}
.piano-atlas .atlas-icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f3f4;
  font-size: 20px;
}
.piano-atlas .atlas-icon-button:hover {
  background: #e2e8f0;
}
.piano-atlas .atlas-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.piano-atlas .atlas-systems {
  position: absolute;
  left: 32px;
  top: 148px;
  width: 240px;
  padding: 18px 16px 12px;
  z-index: 2;
  max-height: calc(100% - 235px);
  overflow: auto;
}
.piano-atlas .panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.piano-atlas .panel-heading h2 {
  font-size: 1rem;
}
.piano-atlas .panel-heading > span {
  font-size: 0.75rem;
  color: var(--muted);
  background: #f1f3f4;
  padding: 3px 8px;
  border-radius: 0.25rem;
}
.piano-atlas #systems-toggle {
  display: none;
}
.piano-atlas .atlas-systems.is-collapsed .atlas-segment, .piano-atlas .atlas-systems.is-collapsed #system-list, .piano-atlas .atlas-systems.is-collapsed .systems-footer {
  display: none;
}
.piano-atlas .atlas-segment {
  display: flex;
  gap: 4px;
  margin: 14px 0 10px;
}
.piano-atlas .atlas-segment button {
  width: 50%;
  font-size: 0.875rem;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.piano-atlas .atlas-segment button:hover {
  background: #f1f3f4;
}
.piano-atlas .atlas-segment button.is-active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.piano-atlas .system-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 0;
  text-align: left;
  font-size: 0.875rem;
  gap: 8px;
}
.piano-atlas .system-row .system-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.piano-atlas .system-row .system-name {
  flex: 1;
}
.piano-atlas .system-row small {
  color: var(--muted);
  font-size: 0.75rem;
}
.piano-atlas .system-row .system-switch {
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: #b9bec7;
  position: relative;
  flex-shrink: 0;
}
.piano-atlas .system-row .system-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}
.piano-atlas .system-row[aria-checked=true] .system-switch {
  background: var(--ink);
}
.piano-atlas .system-row[aria-checked=true] .system-switch::after {
  transform: translateX(14px);
}
.piano-atlas .systems-footer {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}
.piano-atlas .systems-footer button {
  font-size: 0.75rem;
  text-decoration: underline;
  padding: 3px;
}
.piano-atlas .atlas-detail {
  position: absolute;
  right: 32px;
  top: 125px;
  width: 300px;
  padding: 22px;
  max-height: calc(100% - 180px);
  overflow: auto;
  z-index: 2;
}
.piano-atlas .atlas-detail h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 7px 0 14px;
}
.piano-atlas .atlas-detail > p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #4b4b4b;
}
.piano-atlas .atlas-detail dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin: 18px 0;
}
.piano-atlas .atlas-detail dt {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 700;
}
.piano-atlas .atlas-detail dd {
  font-size: 0.875rem;
  margin: 0;
}
.piano-atlas .detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}
.piano-atlas .detail-number {
  color: var(--muted);
  font-size: 0.75rem;
}
.piano-atlas .detail-related {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  margin-bottom: 18px;
}
.piano-atlas .detail-related button {
  font-size: 0.75rem;
  border: 1px solid #7f8588;
  border-radius: 999px;
  padding: 6px 10px;
  margin: 8px 4px 0 0;
}
.piano-atlas .detail-related button:hover {
  background: #f1f3f4;
}
.piano-atlas .atlas-primary {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 2rem;
  background: var(--ink);
  color: white;
  padding: 10px 16px;
  text-align: left;
  font-size: 1rem;
}
.piano-atlas .atlas-primary span {
  float: right;
}
.piano-atlas .atlas-primary:hover {
  background: #000;
  color: white;
}
.piano-atlas .atlas-secondary {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 2rem;
  background: white;
  color: var(--ink);
  padding: 10px 16px;
  text-align: left;
  font-size: 1rem;
}
.piano-atlas .atlas-secondary span {
  float: right;
}
.piano-atlas .atlas-secondary:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--ink);
}
.piano-atlas .atlas-text-button {
  display: block;
  width: 100%;
  margin: 8px auto;
  font-size: 0.875rem;
}
.piano-atlas .atlas-bottom {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  gap: 12px;
  z-index: 2;
}
.piano-atlas .atlas-explode {
  width: 290px;
  padding: 16px 18px 12px;
}
.piano-atlas .explode-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  gap: 12px;
}
.piano-atlas .explode-heading label {
  margin: 0;
}
.piano-atlas .explode-heading output {
  font-size: 1rem;
  font-weight: 700;
}
.piano-atlas .explode-heading output span {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 3px;
}
.piano-atlas input[type=range] {
  width: 100%;
  height: 4px;
  display: block;
  accent-color: var(--ink);
  margin: 16px 0 10px;
  cursor: pointer;
}
.piano-atlas .explode-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}
.piano-atlas .atlas-footer {
  position: absolute;
  bottom: 18px;
  left: 32px;
  right: 32px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
}
.piano-atlas .atlas-footer i {
  margin: 0 8px;
  font-style: normal;
}
.piano-atlas .atlas-footer a {
  color: inherit;
  text-decoration: none;
}
.piano-atlas .atlas-footer a:hover {
  text-decoration: underline;
}
.piano-atlas .atlas-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: white;
  font-size: 0.875rem;
  padding: 8px 12px;
  border-radius: 0.25rem;
  z-index: 4;
}
.piano-atlas .atlas-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.piano-atlas .atlas-labels button {
  position: absolute;
  pointer-events: auto;
  background: white;
  border: 1px solid #7f8588;
  border-radius: 0.25rem;
  padding: 5px 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.piano-atlas .atlas-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  max-height: 330px;
  overflow: auto;
  padding: 7px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  z-index: 5;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}
.piano-atlas .atlas-search-results button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  border-radius: 0.4rem;
  font-size: 0.875rem;
}
.piano-atlas .atlas-search-results button:hover {
  background: #f1f3f4;
}
.piano-atlas .atlas-search-results button small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 3px;
}
.piano-atlas .atlas-search-results p {
  padding: 14px;
  font-size: 0.875rem;
}
.piano-atlas .atlas-loading, .piano-atlas .atlas-fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  text-align: center;
  border-radius: 12px;
}
.piano-atlas .atlas-loading span {
  display: block;
  height: 3px;
  background: var(--accent);
  margin-top: 12px;
  animation: atlas-load 1s infinite alternate;
}
@keyframes atlas-load {
  from {
    transform: scaleX(0.2);
  }
  to {
    transform: scaleX(1);
  }
}
@media (max-width: 1100px) {
  .piano-atlas .atlas-header {
    left: 20px;
    right: 20px;
  }
  .piano-atlas .atlas-layout-controls {
    position: absolute;
    left: 50%;
    top: 120px;
    transform: translateX(-50%);
  }
  .piano-atlas .atlas-systems {
    left: 20px;
    top: 200px;
    width: 225px;
  }
  .piano-atlas .atlas-detail {
    width: 280px;
    right: 20px;
    top: 200px;
  }
  .piano-atlas .atlas-footer {
    left: 20px;
    right: 20px;
  }
}
@media (max-width: 640px) {
  .piano-atlas #systems-toggle {
    display: block;
    font-size: 20px;
    padding: 0 6px;
    margin-left: auto;
  }
  .piano-atlas #system-count {
    display: none;
  }
  .piano-atlas .atlas-header {
    top: 18px;
    left: 12px;
    right: 12px;
    gap: 12px;
  }
  .piano-atlas .atlas-brand h1 {
    font-size: 1.625rem;
  }
  .piano-atlas .atlas-brand p {
    font-size: 0.75rem;
    max-width: 180px;
  }
  .piano-atlas .atlas-search {
    padding: 10px;
    gap: 5px;
  }
  .piano-atlas .atlas-search input {
    width: 100px;
    font-size: 0.8125rem;
  }
  .piano-atlas .atlas-search kbd {
    display: none;
  }
  .piano-atlas .atlas-search-results {
    width: 260px;
  }
  .piano-atlas .atlas-layout-controls {
    top: 120px;
  }
  .piano-atlas .atlas-modes button {
    padding: 9px 10px;
    font-size: 0.8125rem;
  }
  .piano-atlas .atlas-systems {
    top: 190px;
    left: 12px;
    width: 215px;
    padding: 12px;
    max-height: calc(100% - 320px);
  }
  .piano-atlas .atlas-systems.is-collapsed {
    width: 160px;
  }
  .piano-atlas .system-row {
    font-size: 0.8125rem;
    padding: 8px 0;
  }
  .piano-atlas .atlas-bottom {
    bottom: 48px;
    gap: 8px;
    max-width: calc(100% - 24px);
    width: 360px;
  }
  .piano-atlas .atlas-explode {
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 12px;
  }
  .piano-atlas .explode-heading {
    font-size: 0.8125rem;
    gap: 5px;
  }
  .piano-atlas .explode-footer {
    font-size: 0.6875rem;
  }
  .piano-atlas .atlas-detail {
    top: auto;
    bottom: 155px;
    right: 12px;
    width: calc(100% - 24px);
    max-height: 45%;
    padding: 18px;
    z-index: 4;
  }
  .piano-atlas .atlas-footer {
    bottom: 15px;
    left: 8px;
    right: 8px;
    justify-content: center;
    font-size: 0.625rem;
  }
  .piano-atlas .atlas-footer i {
    margin: 0 4px;
  }
  .piano-atlas .atlas-footer > span:last-child {
    display: none;
  }
  .piano-atlas .atlas-labels button {
    max-width: 82px;
    white-space: normal;
    font-size: 0.625rem;
    line-height: 1.2;
    padding: 4px;
  }
}
