body {
  font-family: Arial, sans-serif;
  background-color: #f7f7f7;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 960px;
  margin: 30px auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2em;
  color: #222;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.controls label {
  font-weight: bold;
}

select,
button {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

button:disabled {
  background-color: #eee;
  color: #aaa;
  cursor: not-allowed;
}

.columns {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.column {
  flex: 1;
  background: #fafafa;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  max-height: 400px; /* 固定枠の高さ */
  overflow-y: auto;   /* 中身が多いときだけスクロール */
}

.column h2 {
  margin-top: 0;
  font-size: 16px;
  color: #333;
  flex-shrink: 0;
}

#originalText,
#translatedText {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 5px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-anchor: auto;  /* スクロール位置維持に備える */
}

/* Final (確定テキスト) */
.final {
  font-size: 1rem;
  color: #111;
  line-height: 1.5;
  margin: 0;
}

/* Partial (認識途中のテキスト) */
.partial {
  font-size: 0.95rem;
  font-style: italic;
  color: gray;
  opacity: 0.7;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0.3; }
  to { opacity: 0.7; }
}
