:root {
  color-scheme: light;
  --ink: #172b2a;
  --muted: #687875;
  --line: #dfe8e5;
  --paper: #f6f8f5;
  --white: #ffffff;
  --green: #176858;
  --green-dark: #124f45;
  --mint: #eaf5f0;
  --soft: #f3f7f5;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
button, input { font: inherit; }
.site-header {
  width: min(1120px, calc(100% - 48px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: white; background: var(--green); font-size: 19px; line-height: 1; }
.privacy-pill, .local-chip { display: inline-flex; align-items: center; gap: 8px; color: #537068; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.privacy-dot { width: 7px; height: 7px; border-radius: 50%; background: #55a582; }
main { width: min(1000px, calc(100% - 48px)); margin: 22px auto 64px; }
.workspace { display: flex; justify-content: center; }
.tool-card {
  width: min(100%, 760px);
  padding: 34px;
  border: 1px solid #e4ebe8;
  border-radius: 19px;
  background: var(--white);
  box-shadow: 0 12px 40px rgba(25, 58, 50, .055);
}
.tool-heading, .result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 0; font-size: clamp(27px, 4vw, 35px); line-height: 1.12; letter-spacing: -.045em; }
.local-chip { padding: 7px 10px; border: 1px solid #deebe5; border-radius: 999px; background: #f7fbf8; font-size: 9px; letter-spacing: .1em; }
.drop-zone {
  position: relative;
  display: flex;
  min-height: 232px;
  margin-top: 27px;
  padding: 25px 18px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #b7cbc3;
  border-radius: 14px;
  background: #fbfdfb;
  cursor: pointer;
  text-align: center;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.drop-zone:hover, .drop-zone:focus-within, .drop-zone.is-over { border-color: var(--green); background: #f4faf6; }
.drop-zone.is-over { transform: scale(.995); }
.drop-zone input { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.upload-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 11px; border-radius: 14px; color: var(--green); background: var(--mint); }
.upload-icon svg { width: 23px; height: 23px; }
.drop-title { font-size: 16px; font-weight: 730; }
.drop-hint { margin-top: 2px; color: var(--muted); font-size: 13px; }
.format-hint { margin-top: 16px; color: #87938f; font-size: 10px; font-weight: 720; letter-spacing: .045em; }
.file-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfb; }
.file-symbol { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; color: var(--green); background: var(--mint); font-size: 18px; }
.file-details { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.file-details strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.file-details small { color: var(--muted); font-size: 11px; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 9px; color: #64746f; background: transparent; cursor: pointer; font-size: 24px; line-height: 1; }
.icon-button:hover { background: #eef3f0; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.privacy-note { margin: 0; color: var(--muted); font-size: 11px; }
.privacy-note span { margin-right: 4px; color: var(--green); font-weight: 800; }
.primary-button, .download-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--green);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, opacity .16s ease;
}
.primary-button:hover:not(:disabled), .download-button:hover { background: var(--green-dark); }
.primary-button:disabled { opacity: .43; cursor: not-allowed; }
.primary-button:focus-visible, .download-button:focus-visible, .icon-button:focus-visible, summary:focus-visible { outline: 3px solid #9acdb8; outline-offset: 3px; }
.status { display: flex; align-items: center; gap: 9px; margin-top: 14px; color: #4f6860; font-size: 12px; }
.status[hidden], .result[hidden], .file-row[hidden] { display: none; }
.status-indicator { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #67a989; }
.status.is-error { color: #9a453e; }
.status.is-error .status-indicator { background: #bd5c53; }
.status.is-working .status-indicator { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.result { margin-top: 27px; padding-top: 24px; border-top: 1px solid var(--line); }
.result h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.download-button { min-height: 40px; padding: 0 14px; font-size: 11px; }
.result-meta { margin: 13px 0 15px; color: var(--muted); font-size: 11px; }
.roll-wrap { width: 100%; overflow: hidden; border: 1px solid #e3ebe7; border-radius: 11px; background: #fcfdfc; }
#pianoRoll { display: block; width: 100%; height: 238px; }
.note-list-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 20px 0 8px; }
.note-list-header h3 { margin: 0; font-size: 13px; }
.note-list-header span { color: var(--muted); font-size: 11px; }
.table-wrap { max-height: 238px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; }
th, td { padding: 9px 12px; border-bottom: 1px solid #edf1ef; }
th { position: sticky; top: 0; color: #62736e; background: #f6f9f7; font-size: 10px; font-weight: 750; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { color: #8a9691; }
td:nth-child(2) { color: var(--green-dark); font-weight: 750; }
.result-footnote { margin: 11px 0 0; color: #7b8984; font-size: 10px; }
.details { width: min(100%, 760px); margin: 34px auto 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.detail-card, .faq { padding: 22px; border: 1px solid #e4ebe8; border-radius: 15px; background: rgba(255,255,255,.8); }
.detail-card h2, .faq h2 { margin: 0 0 14px; font-size: 18px; letter-spacing: -.025em; }
.detail-card p { margin: 0 0 11px; color: var(--muted); font-size: 12px; }
.detail-card p:last-child { margin-bottom: 0; }
.steps { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 11px; align-items: flex-start; }
.steps li > span { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--green); background: var(--mint); font-size: 9px; font-weight: 800; }
.steps p { margin: 0; font-size: 11px; }
.steps strong { color: var(--ink); font-size: 12px; }
.unsupported strong { color: #5c5140; }
.limit-note { padding-top: 10px; border-top: 1px solid var(--line); }
.limit-note strong { color: var(--ink); }
.expectations { margin-top: 14px; }
.faq { margin-top: 14px; }
.faq details { border-top: 1px solid var(--line); }
.faq summary { padding: 12px 0; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.faq details p { margin: -3px 0 12px; color: var(--muted); font-size: 11px; }
footer { width: min(1000px, calc(100% - 48px)); margin: 0 auto; padding: 20px 0 28px; display: flex; justify-content: space-between; gap: 16px; color: #8a9691; font-size: 10px; letter-spacing: .02em; }
footer span:first-child { font-weight: 800; letter-spacing: .1em; }
@media (max-width: 640px) {
  .site-header { width: calc(100% - 32px); min-height: 60px; }
  main { width: calc(100% - 28px); margin: 10px auto 42px; }
  .tool-card { padding: 21px 16px; border-radius: 15px; }
  .tool-heading { gap: 8px; }
  .local-chip { padding: 6px 8px; font-size: 8px; white-space: nowrap; }
  .drop-zone { min-height: 210px; margin-top: 21px; padding: 20px 12px; }
  .action-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .privacy-note { order: 2; font-size: 10px; }
  .primary-button { width: 100%; min-height: 48px; }
  .result-heading { align-items: flex-start; flex-direction: column; }
  .download-button { width: 100%; }
  .result h2 { font-size: 20px; }
  #pianoRoll { height: 195px; }
  th, td { padding: 8px 9px; }
  .detail-grid { grid-template-columns: 1fr; gap: 12px; }
  .details { margin-top: 24px; }
  .detail-card, .faq { padding: 18px 16px; }
  footer { width: calc(100% - 32px); flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
