/* ===== 基本設定 ===== */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
  font-size: 18px;
}

/* ===== グローバルプレーヤー ===== */
.global-player {
  position: sticky;
  top: 70px;
  /* ヘッダーの高さ分下げる */
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.global-player-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.global-player-info {
  flex: 1;
  min-width: 0;
}

.global-slot-info {
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-player-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.global-player-loop {
  flex-shrink: 0;
}

.global-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  backdrop-filter: blur(10px);
}

.global-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.global-btn:active {
  transform: translateY(0);
}

.global-play-btn {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.global-play-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.global-pause-btn {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.global-pause-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.global-loop-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.global-loop-btn.active {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.global-loop-btn.active:hover {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.global-loop-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* モバイル対応 */
@media (max-width: 768px) {
  .global-player-content {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .global-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .global-slot-info {
    font-size: 0.8rem;
  }

  .global-player-controls {
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .global-player-content {
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .global-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .global-slot-info {
    font-size: 0.75rem;
  }
}

/* ===== ナビゲーション ===== */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.logo::before {
  content: "🎤";
  font-size: 1.5rem;
}

.logo:hover {
  transform: translateY(-2px);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

nav li {
  position: relative;
}

nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 25px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

nav a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

nav a:hover::before {
  left: 100%;
}

nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ナビゲーションアイコン */
nav a[href*="index"]::before {
  content: "📋";
  font-size: 1.1rem;
}

nav a[href*="profile"]::before {
  content: "👤";
  font-size: 1.1rem;
}

nav a[href*="login"]::before {
  content: "🔑";
  font-size: 1.1rem;
}

nav a[href*="register"]::before {
  content: "📝";
  font-size: 1.1rem;
}

nav a[href*="logout"]::before {
  content: "🚪";
  font-size: 1.1rem;
}

/* アクティブ状態 */
nav a.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* モバイルメニューボタン */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== フラッシュメッセージ ===== */
.flash-messages {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 1001;
  max-width: 400px;
}

.flash {
  padding: 1rem 1.5rem;
  margin-bottom: 0.1rem;
  /* 下部マージンをさらに削減 */
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease;
}

.flash.success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.flash.danger {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.flash.warning {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

.flash.info {
  background: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== メインコンテンツ ===== */
main {
  padding: 0.5rem 1rem 2rem 1rem;
  /* 上部パディングを0.5remに大幅削減 */
  min-height: calc(100vh - 140px);
  margin-top: 0 !important;
}

/* ===== フッター ===== */
footer {
  background: #343a40;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 1.5rem;
  margin-top: auto;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* ===== コンテナ ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5em 2em 2em 2em;
  /* 上部パディングを0.5emにさらに削減 */
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-top: 0 !important;
}

/* ===== フォームコンテナ ===== */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2em;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ===== 見出し ===== */
h1,
h2 {
  text-align: center;
  margin-top: 0.5em;
  margin-bottom: 1em;
  font-size: 2em;
}

h2 {
  font-size: 1.5em;
  color: #495057;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

/* ===== セクション ===== */
.section {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon {
  width: 20px;
  height: 20px;
  background: #007bff;
  border-radius: 50%;
  display: inline-block;
}

/* ===== プロフィール情報セクション ===== */
.profile-info-section {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.profile-info-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 0.5rem;
}

.profile-info-section p {
  color: #6c757d;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.profile-info-section summary {
  cursor: pointer;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.profile-info-section summary:hover {
  background: #f8f9fa;
  border-color: #007bff;
}

.profile-info-section summary h2 {
  margin: 0;
  display: inline;
  font-size: 1.25rem;
  color: #495057;
  border: none;
  padding: 0;
}

.profile-summary {
  float: right;
  color: #6c757d;
  font-size: 0.9rem;
  font-style: italic;
}

.profile-info-section[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

/* ===== フォームレイアウト ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #495057;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: #fff;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input[readonly] {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

/* ===== フル幅入力 ===== */
.form-full {
  grid-column: 1 / -1;
}

.form-full textarea {
  min-height: 120px;
  resize: vertical;
}

/* ===== 入力グループ ===== */
.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group input {
  flex: 1;
}

.input-group .btn {
  white-space: nowrap;
  padding: 0.75rem 1rem;
}

/* ===== チェックボックス ===== */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-check input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.form-check-label {
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

/* ===== ボタン ===== */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-width: 120px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #1e7e34;
}

.btn-info {
  background-color: #17a2b8;
  color: white;
}

.btn-info:hover {
  background-color: #138496;
}

.btn-warning {
  background-color: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background-color: #e0a800;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-outline-secondary {
  background-color: transparent;
  color: #6c757d;
  border: 2px solid #6c757d;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  color: white;
}

/* パステル系ボタン */
.btn-pastel-pink {
  background-color: #ffb3d9;
  color: #8b0040;
  border: 2px solid #ff80ab;
}

.btn-pastel-pink:hover {
  background-color: #ff80ab;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 128, 171, 0.3);
}

.btn-pastel-blue {
  background-color: #b3d9ff;
  color: #004080;
  border: 2px solid #80b3ff;
}

.btn-pastel-blue:hover {
  background-color: #80b3ff;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(128, 179, 255, 0.3);
}

.btn-pastel-green {
  background-color: #b3ffb3;
  color: #006600;
  border: 2px solid #80ff80;
}

.btn-pastel-green:hover {
  background-color: #80ff80;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(128, 255, 128, 0.3);
}

/* ===== ボタングループ ===== */
.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-group .btn {
  flex: 1;
  min-width: 150px;
}

/* ===== スロットカード ===== */
.speech-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.speech-slot {
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.speech-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-color: #007bff;
}

.speech-slot.empty {
  background: #f8f9fa;
  border-color: #dee2e6;
}

.speech-slot.playing {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

/* ===== スロットヘッダー ===== */
.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.slot-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #495057;
  font-weight: 600;
}

/* ===== 状態バッジ ===== */
.status {
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status.registered {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status.empty {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ===== スロットコンテンツ ===== */
.slot-content {
  margin-bottom: 1.5rem;
}

.speech-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #495057;
  margin-bottom: 1rem;
  min-height: 3rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.speech-slot.empty .speech-text {
  color: #6c757d;
  font-style: italic;
}

.audio-info {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.875rem;
  color: #6c757d;
}

.engine-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #e9ecef;
  color: #495057;
}

.engine-badge.google {
  background-color: #e3f2fd;
  color: #1976d2;
}

.engine-badge.voicevox {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.style-info {
  font-size: 0.75rem;
  color: #6c757d;
  font-style: italic;
}

/* ===== スロットアクション ===== */
.slot-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.slot-actions .btn {
  flex: 1;
  min-width: 80px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

.slot-actions .btn-primary {
  background-color: #007bff;
  color: white;
}

.slot-actions .btn-primary:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

.slot-actions .btn-secondary {
  background-color: #6c757d;
  color: white;
}

.slot-actions .btn-secondary:hover {
  background-color: #545b62;
  transform: translateY(-1px);
}

.slot-actions .btn-success {
  background-color: #28a745;
  color: white;
}

.slot-actions .btn-success:hover {
  background-color: #1e7e34;
  transform: translateY(-1px);
}

.slot-actions .btn-danger {
  background-color: #dc3545;
  color: white;
}

.slot-actions .btn-danger:hover {
  background-color: #c82333;
  transform: translateY(-1px);
}

/* ===== プレイヤーコントロール ===== */
.player-controls {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1rem;
  /* パディングを1.5remから1remに削減 */
  margin: 0 0 2rem 0;
  /* 上部マージンを0に設定 */
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.player-controls .btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.player-controls .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.player-controls label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.player-controls input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* ===== 再生キュー ===== */
.play-queue-display {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.play-queue-display h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: #495057;
}

#play-queue-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#play-queue-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #dee2e6;
  transition: all 0.2s ease;
}

#play-queue-list li.playing {
  background: #e3f2fd;
  border-left-color: #007bff;
  font-weight: 600;
}

#play-queue-list li:last-child {
  margin-bottom: 0;
}

.remove-from-queue-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remove-from-queue-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

/* ===== アクションボタン ===== */
.action-buttons {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #dee2e6;
}

.action-buttons .btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 0.5rem;
}

.action-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== オーディオ ===== */
audio {
  display: block;
  margin: 1.5em auto;
  width: 100%;
}

#audioControls,
.audio-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

#audioControls button,
.audio-controls button {
  flex: 1;
  min-width: 50px;
  font-size: 24px;
  padding: 10px;
  border-radius: 8px;
  background-color: #007bff;
  color: white;
  border: none;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

#audioControls button:hover,
.audio-controls button:hover {
  background-color: #0056b3;
}

#audioControls button.loop-on,
.audio-controls button.loop-on {
  background-color: #28a745;
  /* 緑色でONを示す */
}

/* ===== エラー／結果 ===== */
#error,
#result {
  margin-top: 1.2em;
  font-weight: bold;
  text-align: center;
}

#error {
  color: #d9534f;
}

#result {
  color: #28a745;
}

/* ===== ラベル横並び用 ===== */
.inline-group {
  display: flex;
  align-items: center;
  gap: 1em;
  grid-column: 1 / 3;
}

.inline-group label {
  margin: 0;
  white-space: nowrap;
}

/* ===== セレクトボックスの幅を調整（label直後に小さく配置） ===== */
.inline-group select.form-inline {
  width: 15em;
  max-width: 100%;
}

/* ===== messageエリアは全幅指定済。以下で確実に反映 ===== */
#generatedMessage {
  width: 100%;
}

/* ===== モバイル最適化 ===== */
@media (max-width: 768px) {
  nav {
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  nav ul.active {
    display: flex;
  }

  nav li {
    width: 100%;
  }

  nav a {
    width: 100%;
    justify-content: center;
    border-radius: 8px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .speech-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .speech-slot {
    padding: 1rem;
  }

  .slot-actions {
    flex-direction: column;
  }

  .slot-actions .btn {
    width: 100%;
  }

  .player-controls {
    flex-direction: column;
    gap: 0.75rem;
  }

  .player-controls .btn {
    width: 100%;
    max-width: 200px;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
  }

  .input-group {
    flex-direction: column;
  }

  .input-group .btn {
    width: 100%;
  }

  form {
    display: flex;
    flex-direction: column;
  }

  .form-full {
    grid-column: auto;
  }

  h1,
  h2 {
    font-size: 1.6em;
  }

  input,
  select,
  textarea {
    font-size: 1em;
    padding: 1em;
  }

  button {
    width: 100%;
    font-size: 1.1em;
  }

  body {
    padding: 0.5em;
    font-size: 17px;
  }

  .container,
  .form-container {
    padding: 1rem;
  }

  .flash-messages {
    position: static;
    max-width: none;
    margin-bottom: 1rem;
  }
}

/* グレーアウト用 */
select.disabled {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}