* { box-sizing: border-box; }
body { margin: 0; color: #172a32; background: #f7f9fa; font: 16px/1.5 system-ui, sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 1.8rem; margin-top: 0; }
h2 { font-size: 1.15rem; margin-bottom: 8px; }
label { font-weight: 600; }
textarea, #messageArea { display: block; width: 100%; padding: 16px; border: 1px solid #9aaeb7; border-radius: 6px; background: white; font: 1.4rem/1.6 monospace; }
#charset { margin-top: 8px; min-height: 120px; resize: vertical; }
#charsetHint { color: #52656e; font-size: .9rem; }
#messageArea { min-height: 180px; white-space: pre-wrap; overflow-wrap: anywhere; }
button { padding: 9px 14px; border: 1px solid #8a9da6; border-radius: 5px; background: white; color: inherit; font: inherit; cursor: pointer; margin: 3px 0; }
button:hover { background: #e9f0f3; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, #messageArea:focus-visible { outline: 3px solid #137eaa; outline-offset: 3px; }
.toolbar { align-items: center; flex-wrap: wrap; display: flex; gap: 8px; margin: 20px 0 8px; }
.toolbar button:first-child { background: #176681; color: white; border-color: #176681; }
details { border: 1px solid #c3d0d6; border-radius: 6px; padding: 12px 16px; background: white; }
summary { cursor: pointer; font-weight: 600; }
input[type=number] { width: 80px; padding: 6px; margin: 5px; font: inherit; }
input[type=range] { max-width: 100%; vertical-align: middle; }
input[type=file] { max-width: 100%; }
#practiceStatus:empty { display: none; }
#practiceStatus { color: #315865; }

#playPause { min-width: 112px; font-weight: 700; transition: background-color .15s, box-shadow .15s; }
#playPause[data-state="playing"], #playPause[data-state="waiting"] { background: #26713d; border-color: #26713d; box-shadow: 0 0 0 3px #d7eadc; }
#playPause[data-state="paused"] { background: #995a08; border-color: #995a08; box-shadow: 0 0 0 3px #f5e5cd; }
#playPause:enabled:active { transform: translateY(1px); }
#playbackStatus { font-weight: 600; padding: 4px 8px; }

.options-list { margin-top: 12px; }
.option-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 8px 16px; align-items: center; padding: 16px 0; border-top: 1px solid #e1e8ec; }
.option-label { font-weight: 600; }
.option-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.option-controls input[type=number] { width: 96px; min-height: 42px; margin: 0; padding: 8px 10px; border: 1px solid #9aaeb7; border-radius: 5px; color: inherit; background: white; }
.option-controls input[type=range] { flex: 1; width: 120px; min-width: 80px; margin: 0; accent-color: #176681; }
.option-controls button { min-height: 42px; margin: 0; }
.option-controls input[type=file] { width: 100%; min-width: 0; font: inherit; font-size: .9rem; }
.option-controls input[type=file]::file-selector-button { min-height: 42px; padding: 8px 12px; margin-right: 10px; border: 1px solid #8a9da6; border-radius: 5px; background: white; color: #172a32; font: inherit; cursor: pointer; }
.frequency-presets { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.frequency-presets button { font-size: .9rem; }
.option-hint { grid-column: 2; margin: 0; color: #52656e; font-size: .85rem; }
.navigation-count { width: 100%; color: #52656e; font-size: .85rem; }
@media (max-width: 560px) {
  .option-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .option-hint { grid-column: 1; }
}

#playPause:disabled { background: #e1e6e9; color: #687780; border-color: #c3cdd2; box-shadow: none; cursor: not-allowed; }
