* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  color: #111;
  background: #fff;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px;
}
.brand { font-weight: 600; text-decoration: none; color: inherit; }
nav a { margin-left: 16px; color: #06c; text-decoration: none; }
main { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; }
select, textarea, button, input { font: inherit; }

.pair { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.pair select { flex: 1; padding: 10px; border: 1px solid #ccc; border-radius: 8px; background: #fff; }

textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  resize: vertical;
}
.actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; }

button {
  padding: 10px 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
button:disabled { opacity: .5; cursor: default; }
button.small { padding: 6px 10px; margin-top: 8px; }
#go { background: #06c; border-color: #06c; color: #fff; }
#mic { touch-action: none; }
#mic.rec { background: #ffe1e1; border-color: #c00; color: #c00; }

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #ddd;
  border-top-color: #06c;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error { color: #c00; margin: 12px 0 0; }

#result { margin-top: 16px; padding: 16px; background: #f5f5f5; border-radius: 8px; }
#transcript { color: #666; margin-bottom: 8px; white-space: pre-wrap; }
#translation { white-space: pre-wrap; }

#list li { list-style: none; border-bottom: 1px solid #eee; }
#list a { display: block; padding: 12px 0; text-decoration: none; color: inherit; }
#list .pairline { font-weight: 600; }
#list .meta { color: #777; font-size: .9em; }
#back { color: #06c; text-decoration: none; }
#pairTitle { font-size: 1.1em; margin: 12px 0; }
.turn { border-bottom: 1px solid #eee; padding: 10px 0; }
.turn-src { color: #777; margin-bottom: 4px; white-space: pre-wrap; }
.turn-out { white-space: pre-wrap; }
