body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; margin: 0; padding: 0; background: #f6f8fa; color: #111; }
.container { max-width: 1000px; margin: 0 auto; padding: 20px; }
h1 { margin: 0 0 16px; }
.controls .row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.status { font-size: 12px; color: #444; margin-top: 4px; min-height: 18px; }
button { padding: 8px 12px; border: 1px solid #d0d7de; border-radius: 6px; background: #fff; cursor: pointer; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
#waveform { background: #fff; border: 1px solid #d0d7de; border-radius: 6px; margin-top: 8px; }
#timeline { font-size: 12px; color: #555; }
.lyrics { font-size: 20px; margin-top: 12px; background: #fff; padding: 12px; border: 1px solid #d0d7de; border-radius: 6px; min-height: 52px; line-height: 1.8; }
.lyric-char { transition: color 0.15s ease; cursor: pointer; }
.lyric-char.played { color: #d00000; font-weight: 600; }
.images { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.images img { width: 100%; height: auto; border: 1px solid #d0d7de; border-radius: 6px; background: #fff; }
.gallery { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
.gallery img { width: 100%; height: auto; border: 1px solid #d0d7de; border-radius: 6px; background: #fff; }

/* Pitch chart */
.pitch-box { position: relative; background:#fff; border:1px solid #d0d7de; border-radius:6px; margin-top:8px; padding:4px 0 4px 0; }
#pitchCanvas { width:100%; display:block; }
#pitchConfCanvas { width:100%; display:block; }
.pitch-cursor { position:absolute; top:0; bottom:0; width:2px; background:#ff0059; pointer-events:none; transform:translateX(-1px); opacity:0.85; }

/* Debug timetable */
.debug { margin-top: 32px; }
.debug details { background: #fff; border: 1px solid #d0d7de; border-radius: 6px; padding: 12px; }
.debug summary { cursor: pointer; font-weight: 600; }
.debug table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
.debug th, .debug td { border: 1px solid #e1e4e8; padding: 4px 6px; text-align: right; }
.debug th { background: #f0f3f6; text-align: center; }
.debug caption { text-align: left; font-weight: 600; margin: 16px 0 4px; font-size: 13px; }
.debug-controls { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; margin-top: 8px; }
.debug-controls label { display: flex; align-items: center; gap: 4px; }
.debug td.label, .debug th.label { text-align: left; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

/* Raw core JSON */
.raw-core { margin-top:32px; }
.raw-core details { background:#fff; border:1px solid #d0d7de; border-radius:6px; padding:12px; }
.raw-pre { max-height:320px; overflow:auto; background:#0d1117; color:#e6edf3; padding:12px; font-size:12px; line-height:1.4; border-radius:6px; border:1px solid #30363d; }
.raw-core-controls { display:flex; gap:12px; align-items:center; margin:8px 0 8px; flex-wrap:wrap; }
.raw-core button { font-size:12px; padding:4px 8px; }

/* STT words table */
.stt-words-box { margin-top:8px; background:#fff; border:1px solid #d0d7de; border-radius:6px; padding:8px; max-height:260px; overflow:auto; }
.stt-words-table { width:100%; border-collapse:collapse; font-size:12px; }
.stt-words-table th { position:sticky; top:0; background:#f0f3f6; border:1px solid #e1e4e8; padding:4px 6px; }
.stt-words-table td { border:1px solid #e1e4e8; padding:4px 6px; text-align:right; }
.stt-words-table td:first-child, .stt-words-table th:first-child { text-align:left; }
.stt-words-table tbody tr:hover { background:#fffbe6; }
.stt-prob-low { color:#b60205; font-weight:600; }
.stt-prob-mid { color:#d47500; }
.stt-prob-high { color:#22863a; }

/* 반응형: 작은 화면에서는 버튼들을 세로로 쌓기 */
@media (max-width: 640px) {
	.controls .row { flex-direction: column; align-items: stretch; }
	.controls .row > * { width: 100%; }
	#fileInput { width: 100%; }
	button { width: 100%; }
}
