:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #18372a;
  background: #f4f5ef;
  font-synthesis: none;
  --green: #24583f;
  --muted: #718176;
  --line: #dce3d8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 820px;
  margin: auto;
  padding: 25px 22px 45px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}
a {
  color: var(--green);
}
.brand {
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -1px;
  text-decoration: none;
}
.brand-dot {
  color: #b98650;
}
.connection {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.connection > span {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #a9b3aa;
}
.intro {
  padding: 36px 0 25px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 650;
  color: var(--muted);
  margin: 0 0 10px;
}
h1 {
  font-family: Georgia, serif;
  font-size: clamp(40px, 7vw, 60px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1.8px;
  margin: 0 0 12px;
}
.intro > p:last-child {
  font-size: 16px;
  line-height: 1.6;
  color: #617266;
  max-width: 480px;
  margin: 0;
}
.card {
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 27px 28px;
  margin: 16px 0;
}
.section-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 21px;
}
.section-heading h2 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.5px;
  margin: 0;
}
.step {
  font-size: 11px;
  color: #809586;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #728072;
  background: #edf0e6;
  border: 1px solid #e0e6d7;
  border-radius: 20px;
  padding: 4px 8px;
  font-weight: 500;
  vertical-align: middle;
}
.section-heading > .badge {
  margin-left: auto;
}
.choose-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.upload,
.library-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 145px;
  border: 1px solid #d6dfd2;
  border-radius: 15px;
  background: #f1f5eb;
  padding: 21px;
  text-align: left;
  cursor: pointer;
  color: #18372a;
  font: inherit;
  gap: 7px;
  overflow: hidden;
}
.library-choice {
  background: transparent;
}
.upload:hover,
.library-choice:hover {
  border-color: #6e967a;
  background: #edf3e6;
}
.upload:focus-within {
  outline: 3px solid #80a78d;
  outline-offset: 3px;
}
.upload strong,
.library-choice strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.option-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 6px;
}
.option-hint {
  font-size: 12px;
  color: var(--muted);
}
.upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.choice-note {
  font-size: 12px;
  color: var(--muted);
  margin: 15px 0 0;
}
button,
.button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #96b49b;
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
.secondary {
  background: #eaf0e3;
  color: #31543d;
}
.text-button {
  background: transparent;
  padding: 0;
  color: var(--green);
  font-size: 12px;
  text-decoration: underline;
}
.processing {
  background: #f1f5eb;
  border-radius: 12px;
  padding: 17px;
  margin-top: 18px;
}
.processing-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.processing p {
  font-size: 12px;
  line-height: 1.6;
  color: #627668;
  margin: 8px 0;
}
progress {
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  accent-color: var(--green);
  background: #dfe8da;
}
progress::-webkit-progress-bar {
  background: #dfe8da;
}
progress::-webkit-progress-value {
  background: var(--green);
}
.notice {
  font-size: 13px;
  line-height: 1.6;
  background: #fff2d9;
  color: #7c5a28;
  border-radius: 12px;
  padding: 14px;
  margin-top: 16px;
}
.notice p {
  margin: 0 0 8px;
}
.notice p:last-child {
  margin-bottom: 0;
}
.empty-state {
  text-align: center;
  padding: 11px 0 19px;
  color: #92a08f;
}
.empty-icon {
  font-family: Georgia, serif;
  font-size: 39px;
}
.empty-state p {
  font-size: 13px;
  margin: 8px 0 0;
}
.piece-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  justify-content: space-between;
}
.piece-heading h3 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.4px;
  overflow-wrap: anywhere;
}
.hint {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 6px 0;
}
.download-link {
  font-size: 11px;
  white-space: nowrap;
  margin-top: 5px;
  text-decoration: none;
  border-bottom: 1px solid #bccaba;
  padding-bottom: 2px;
}
.disabled {
  pointer-events: none;
  opacity: 0.4;
}
.playback-controls {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 19px 0 13px;
}
.playback-controls button {
  font-size: 12px;
  padding: 11px 15px;
}
#playTime {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
#playhead {
  width: 100%;
  margin: 2px 0 16px;
  accent-color: var(--green);
  height: 4px;
  cursor: pointer;
}
.keyboard-scroll {
  overflow-x: auto;
  padding-bottom: 9px;
  scrollbar-width: thin;
  scrollbar-color: #a5b6a5 transparent;
}
#keyboard {
  position: relative;
  height: 124px;
  min-width: 930px;
  background: #1e3328;
  border: 1px solid #344b3d;
  border-radius: 5px;
  overflow: hidden;
}
.piano-key {
  position: absolute;
  top: 0;
  height: 100%;
  border: 1px solid #c7ccbf;
  border-radius: 0 0 3px 3px;
}
.piano-key.white {
  background: #fffef6;
  z-index: 1;
}
.piano-key.black {
  background: #26382d;
  height: 62%;
  z-index: 2;
  border-color: #172c20;
}
.piano-key.pressed {
  background: #6ba986;
  border-color: #4f8b69;
}
.piano-key span {
  position: absolute;
  bottom: 5px;
  width: 100%;
  text-align: center;
  font-size: 9px;
  color: #8b9887;
}
.preview-caption {
  margin-top: 8px;
  font-size: 10px;
}
.send-card > p {
  font-size: 13px;
  color: #6e7d70;
  line-height: 1.6;
  margin: 0 0 16px;
}
.send-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  text-align: left;
  padding: 15px 18px;
}
.send-card .demo-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: #899584;
}
.send-card .send-status {
  margin: 13px 0 0;
  font-size: 13px;
  color: var(--green);
}
.send-status:empty {
  display: none;
}
footer {
  padding: 12px 5px;
  text-align: center;
  color: #8b9887;
  font-size: 11px;
}
footer > p {
  margin: 0 0 15px;
}
details {
  text-align: left;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
summary {
  cursor: pointer;
  list-style: none;
  text-align: center;
  font-size: 11px;
}
details[open] summary {
  margin-bottom: 20px;
}
pre {
  font-size: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 250px;
  overflow: auto;
  background: #eaf0e4;
  padding: 14px;
  border-radius: 10px;
}
.toggle {
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.page-result {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}
dialog {
  width: min(540px, calc(100% - 32px));
  max-height: 85vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 27px;
  background: #fffef9;
  color: #18372a;
  box-shadow: 0 20px 70px #13281d33;
}
dialog::backdrop {
  background: #1b33295c;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 400;
  letter-spacing: -0.7px;
  margin: 0 0 12px;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.close-button {
  background: #edf1e6;
  color: #516c56;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 23px;
  font-weight: 400;
  flex-shrink: 0;
}
.library-items {
  margin-top: 20px;
}
.library-item {
  border-top: 1px solid var(--line);
  padding: 17px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.library-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}
.library-item p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.library-item button {
  font-size: 12px;
  padding: 9px 14px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 540px) {
  main {
    padding: 18px 16px 30px;
  }
  .card {
    padding: 22px 19px;
    border-radius: 18px;
  }
  .intro {
    padding: 28px 2px 21px;
  }
  .choose-options {
    gap: 10px;
  }
  .upload,
  .library-choice {
    padding: 17px 13px;
    min-height: 142px;
  }
  .upload strong,
  .library-choice strong {
    font-size: 14px;
  }
  .option-hint {
    font-size: 11px;
  }
  .library-choice .badge {
    display: block;
    width: fit-content;
    margin-top: 5px;
  }
  .piece-heading {
    flex-wrap: wrap;
    gap: 5px;
  }
  .download-link {
    margin: 0 0 8px;
  }
  .connection {
    font-size: 10px;
  }
  .section-heading h2 {
    font-size: 19px;
  }
  dialog {
    padding: 23px;
  }
  .dialog-actions button {
    padding: 12px 14px;
    font-size: 12px;
  }
}
