* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f0f4f8;
  height: 100dvh;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: 0 0 30px rgba(0,0,0,0.1);
  height: 100dvh;
}

/* ── Header ── */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

header h1 { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.logo-icon { width: 28px; height: 28px; vertical-align: middle; }

.header-right { display: flex; gap: 6px; }

.icon-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 0.78rem;
  height: 36px;
  padding: 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: background 0.15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.35); }
a.icon-btn { text-decoration: none; }

/* ── Settings Panel ── */
.settings-panel {
  background: #f8f9ff;
  border-bottom: 1px solid #e0e4f0;
  padding: 12px 16px;
  flex-shrink: 0;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.settings-row:last-of-type { margin-bottom: 10px; }

.settings-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  width: 48px;
  flex-shrink: 0;
}

.settings-select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #d0d4e8;
  border-radius: 8px;
  font-size: 0.88rem;
  background: white;
  color: #333;
}

.diff-buttons { display: flex; gap: 6px; }

.diff-btn {
  padding: 5px 14px;
  border: 1.5px solid #c0c6e8;
  border-radius: 16px;
  background: white;
  color: #666;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}
.diff-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: transparent;
  color: white;
  font-weight: 600;
}

.btn-new-chat {
  width: 100%;
  padding: 8px;
  border: 1.5px dashed #b0b8d8;
  border-radius: 8px;
  background: transparent;
  color: #667eea;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-new-chat:hover { background: #eef0ff; }

/* ── Session info bar ── */
.session-info {
  background: #f0f2ff;
  border-bottom: 1px solid #dde1f5;
  padding: 5px 16px;
  font-size: 0.78rem;
  color: #6670aa;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.session-sep { opacity: 0.5; }

/* ── Chat area ── */
#chat-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  -webkit-overflow-scrolling: touch;
}

/* ── Messages ── */
.message {
  display: flex;
  flex-direction: column;
  max-width: 92%;
}
.message.user { align-self: flex-end; align-items: flex-end; }
.message.ai   { align-self: flex-start; align-items: flex-start; }

.message-label { font-size: 0.68rem; color: #999; margin-bottom: 3px; padding: 0 4px; }

.bubble {
  padding: 11px 14px;
  border-radius: 18px;
  line-height: 1.55;
  word-break: break-word;
}
.message.user .bubble {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-bottom-right-radius: 4px;
  font-size: 0.95rem;
}
.message.ai .bubble {
  background: #f1f3f5;
  color: #333;
  border-bottom-left-radius: 4px;
}

.ai-english-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.ai-english { font-size: 0.97rem; font-weight: 500; flex: 1; }

.replay-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.5;
  padding: 0;
  flex-shrink: 0;
  line-height: 1.4;
  transition: opacity 0.15s;
}
.replay-btn:hover { opacity: 1; }

.ai-translation {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #ddd;
  font-size: 0.83rem;
  color: #555;
}
.ai-translation::before { content: "🇯🇵 "; }

.change-marker {
  text-align: center;
  font-size: 0.75rem;
  color: #aaa;
  margin: 10px 0;
  padding: 4px 0;
  border-top: 1px dashed #e0e0e0;
  border-bottom: 1px dashed #e0e0e0;
}

.ai-correction {
  margin-top: 7px;
  padding: 7px 10px;
  background: #fff8e1;
  border-left: 3px solid #ffc107;
  border-radius: 0 8px 8px 0;
  font-size: 0.8rem;
  color: #6c4f00;
}
.ai-correction::before { content: "✏️ 文法チェック: "; font-weight: 600; }

.ai-tip {
  margin-top: 7px;
  padding: 7px 10px;
  background: #e8f4fd;
  border-left: 3px solid #2196f3;
  border-radius: 0 8px 8px 0;
  font-size: 0.8rem;
  color: #0a3d6b;
}
.ai-tip::before { content: "💡 表現メモ: "; font-weight: 600; }

/* Typing */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: #f1f3f5;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}
.typing-indicator span {
  width: 7px; height: 7px;
  background: #aaa;
  border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ── Input area ── */
#input-area {
  padding: 10px 12px;
  border-top: 1px solid #eee;
  background: white;
  flex-shrink: 0;
}

.voice-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: #e53935;
  padding-bottom: 7px;
}
.recording-dot {
  width: 8px; height: 8px;
  background: #e53935;
  border-radius: 50%;
  animation: blink 1s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.input-row { display: flex; gap: 7px; align-items: flex-end; }

#text-input {
  flex: 1;
  padding: 11px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
  resize: none;
  overflow: hidden;
  line-height: 1.45;
  max-height: 160px;
  overflow-y: auto;
}
#text-input:focus { border-color: #667eea; }

.btn {
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.9); }

.btn-send {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}
.btn-mic { background: #f1f3f5; color: #333; }
.btn-mic.recording {
  background: #e53935;
  color: white;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(229,57,53,0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(229,57,53,0); }
}

.speech-preview {
  margin-top: 6px;
  padding: 5px 12px;
  background: #f0f4ff;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #4a5a9a;
}

/* ── TTS controls ── */
#tts-controls {
  padding: 6px 16px 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
}

.tts-loading {
  font-size: 0.75rem;
  color: #888;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── Welcome ── */
.welcome {
  text-align: center;
  padding: 24px 16px;
  color: #888;
}
.welcome h2 { font-size: 1.05rem; color: #555; margin-bottom: 6px; }
.welcome p  { font-size: 0.83rem; line-height: 1.6; }

.starter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  margin-top: 14px;
}
.starter-btn {
  padding: 7px 13px;
  background: #f1f3f5;
  border: 1px solid #ddd;
  border-radius: 16px;
  font-size: 0.8rem;
  cursor: pointer;
  color: #444;
  transition: background 0.15s;
}
.starter-btn:hover { background: #e4e6ea; }

/* ── History Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
}

.modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 700px;
  max-height: 75dvh;
  background: white;
  border-radius: 20px 20px 0 0;
  z-index: 101;
  overflow: hidden;
}

.modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 75dvh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.modal-header h2 { font-size: 1rem; color: #333; }
.modal-header .icon-btn {
  background: #f1f3f5;
  color: #555;
  font-size: 0.85rem;
  width: 30px;
  height: 30px;
}

#history-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
  -webkit-overflow-scrolling: touch;
}

.history-item {
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 10px;
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.history-date { font-size: 0.75rem; color: #999; }

.history-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: #f0f2ff;
  color: #667eea;
  border-radius: 10px;
  font-weight: 500;
}

.history-preview {
  font-size: 0.83rem;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.4;
}

.history-actions { display: flex; gap: 7px; }

.btn-history-load {
  padding: 5px 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
}
.btn-history-delete {
  padding: 5px 14px;
  background: #f8f8f8;
  color: #e53935;
  border: 1px solid #fdd;
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
}

.no-history {
  text-align: center;
  color: #aaa;
  font-size: 0.88rem;
  padding: 30px 0;
}

/* ── Usage badge ── */
.usage-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.2);
  color: white;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.35);
}
.badge-plan {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255,255,255,0.3);
  padding: 1px 6px;
  border-radius: 8px;
}
.badge-usage {
  font-size: 0.72rem;
  font-weight: 600;
}
.usage-badge.usage-low   { background: rgba(255,180,0,0.4); border-color: rgba(255,220,0,0.5); }
.usage-badge.usage-empty { background: rgba(229,57,53,0.5); border-color: rgba(255,100,80,0.5); }

/* ── Auth page ── */
.auth-body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

@media (max-width: 640px) {
  .auth-body {
    align-items: flex-start;
  }
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  text-align: center;
  color: white;
  margin-bottom: 24px;
}
.auth-logo h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-logo p  { font-size: 0.88rem; opacity: 0.85; }

.auth-card {
  background: white;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.auth-tabs {
  display: flex;
  border-radius: 10px;
  background: #f1f3f5;
  padding: 3px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 0.88rem;
  color: #777;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}
.auth-tab.active {
  background: white;
  color: #667eea;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  font-weight: 700;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field label { font-size: 0.8rem; font-weight: 600; color: #555; }
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input {
  flex: 1;
  padding-right: 42px;
}
.pw-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.5;
  padding: 0;
  line-height: 1;
}
.pw-toggle:hover { opacity: 0.9; }

.auth-field input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.auth-field input:focus { border-color: #667eea; }

.auth-error {
  font-size: 0.82rem;
  color: #c00;
  background: #fff0f0;
  border: 1px solid #fcc;
  border-radius: 8px;
  padding: 8px 12px;
}

.auth-submit {
  padding: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.15s;
}
.auth-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.auth-note {
  font-size: 0.75rem;
  color: #aaa;
  text-align: center;
  margin-top: -4px;
}

/* ── Limit reached banner ── */
.limit-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fff3cd, #ffe8a1);
  border: 1.5px solid #ffc107;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 4px 0;
}
.limit-banner-icon { font-size: 1.6rem; flex-shrink: 0; }
.limit-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.limit-banner-text strong { font-size: 0.88rem; color: #5a3e00; }
.limit-banner-text span   { font-size: 0.78rem; color: #7a5500; }
.limit-banner-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* ── Plans page ── */
.plans-container {
  width: 100%;
  max-width: 640px;
  padding: 20px 16px 40px;
}

.plans-header {
  text-align: center;
  color: white;
  margin-bottom: 28px;
  position: relative;
}
.plans-back {
  position: absolute;
  left: 0;
  top: 4px;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  text-decoration: none;
}
.plans-back:hover { color: white; }
.plans-header h1 { font-size: 1.6rem; margin-bottom: 5px; }
.plans-header p  { font-size: 0.88rem; opacity: 0.85; }

.plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.plans-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 640px) {
  .plans-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .plans-grid { grid-template-columns: 1fr; }
}

.plan-card {
  background: white;
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan-card-featured {
  border: 2.5px solid #667eea;
  box-shadow: 0 12px 40px rgba(102,126,234,0.3);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  text-align: center;
}
.plan-price {
  font-size: 2rem;
  font-weight: 800;
  color: #667eea;
  text-align: center;
  line-height: 1;
}
.plan-price span { font-size: 0.9rem; font-weight: 500; color: #888; }

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.plan-features li       { font-size: 0.83rem; color: #444; }
.plan-features .plan-disabled { color: #bbb; }

.plan-btn {
  display: block;
  text-align: center;
  padding: 11px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.15s;
}
.plan-btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}
.plan-btn-secondary {
  background: #f1f3f5;
  color: #667eea;
}
.plan-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.plans-note {
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  margin-top: 20px;
}

/* ── AI Character ── */
#ai-character {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0 4px;
  cursor: pointer;
  user-select: none;
  animation: charFloat 3s ease-in-out infinite;
}
#ai-character:active { transform: scale(0.93); }

@keyframes charFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

.char-body {
  position: relative;
  width: 72px;
  height: 72px;
}

.char-ear {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c6fea, #a879e0);
  top: 0;
  z-index: 0;
}
.char-ear.left  { left: 4px; }
.char-ear.right { right: 4px; }

.char-face {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(160deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 14px rgba(102,126,234,0.45);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.char-eyes {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.char-eye {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  position: relative;
}
.char-eye::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background: #2a2050;
  border-radius: 50%;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
}
.char-eye::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  background: white;
  border-radius: 50%;
  top: 2px;
  right: 2px;
}

/* 通常時：笑顔 */
.char-mouth {
  width: 22px;
  height: 10px;
  border: 3px solid white;
  border-top: none;
  border-radius: 0 0 22px 22px;
  margin-bottom: 4px;
  transition: all 0.1s;
}

/* 話し中：口パク */
#ai-character.talking .char-mouth {
  width: 18px;
  height: 12px;
  background: #d44;
  border: none;
  border-radius: 50%;
  animation: mouthTalk 0.25s ease-in-out infinite alternate;
}
@keyframes mouthTalk {
  from { height: 6px;  border-radius: 50%; }
  to   { height: 14px; border-radius: 40%; }
}

/* 話し中：体も少しノリノリ */
#ai-character.talking {
  animation: charTalk 0.4s ease-in-out infinite alternate;
}
@keyframes charTalk {
  from { transform: translateY(0)    rotate(-2deg); }
  to   { transform: translateY(-3px) rotate(2deg);  }
}

.char-label {
  font-size: 0.72rem;
  color: #888;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ── Utilities ── */
.hidden { display: none !important; }

/* ── Mobile adjustments ── */
@media (max-width: 480px) {
  header h1 { font-size: 1.1rem; }
  .bubble { padding: 10px 12px; }
  .ai-english { font-size: 0.92rem; }
  #text-input { font-size: 16px; } /* prevent zoom on iOS */
}

/* ── Settings mobile links (hidden by default) ── */
.settings-mobile-links { display: none; }

.settings-link-item {
  flex: 1;
  padding: 7px 6px;
  background: #f1f3ff;
  border: 1px solid #d0d4f0;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #667eea;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s;
}
.settings-link-item:hover { background: #e4e8ff; }

/* ── スマホ自動レイアウト (540px以下) ── */
@media (max-width: 540px) {
  /* ヘッダー */
  header { padding: 10px 12px; }
  header h1 { font-size: 1.05rem; }
  .header-right { gap: 4px; }
  .btn-label { display: none; }
  .icon-btn { padding: 0 8px; min-width: 36px; justify-content: center; }

  /* ヘッダーからプラン・履歴・ログアウトを隠す */
  .plans-btn, #history-btn, #logout-btn { display: none !important; }

  /* 設定パネル内にプラン・履歴・ログアウトを表示 */
  .settings-mobile-links {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e4f0;
  }

  /* 設定パネルをコンパクトに */
  .settings-panel { padding: 8px 12px; }
  .settings-row { margin-bottom: 7px; }
  .settings-label { font-size: 0.75rem; width: 40px; }
  .settings-select { font-size: 0.82rem; padding: 5px 8px; }
  .diff-btn { padding: 4px 10px; font-size: 0.78rem; }
  .btn-new-chat { padding: 6px; font-size: 0.8rem; }

  /* チャット・入力エリア */
  #chat-area { padding: 10px; gap: 10px; }
  #input-area { padding: 8px 10px; }
  #tts-controls { padding: 4px 12px 8px; }
}
