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

body {
  font-family: 'Yu Gothic UI', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
  background: #f5f5f5;
  overflow-x: hidden;
}

.app {
  position: relative;
  width: 100%;
  max-width: 1889px;
  margin: 0 auto;
  container-type: inline-size;
}

.screen {
  position: relative;
  width: 100%;
  display: none;
}
.screen.active {
  display: block;
}

.screen-bg {
  width: 100%;
  display: block;
}

/* ─────────────────────────────────────────────
   7番目のタブ「音声アップロード」
   既存6タブはクリック無効化したため、関連 .th-* CSS は削除済み。
   ───────────────────────────────────────────── */
.tab-upload {
  position: absolute;
  background: transparent;
  border: none;
  font-family: 'Yu Gothic UI', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
  font-weight: 700;
  color: #333333;
  line-height: 1;
  padding: 0;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
  z-index: 10;
}
.layout-home .tab-upload {
  top: 3.3%;
  left: 35.2%;
  font-size: 0.6cqw;
}
.layout-large .tab-upload {
  top: 4.5%;
  left: 39.5%;
  font-size: 0.58cqw;
}

/* ─────────────────────────────────────────────
   アップロード画面：upload-card（音声アップロード本体UI）
   状態: input / processing / complete / error
   背景の 04_gijiroku.png の議事録作成フォームを白カードでマスクする
   ───────────────────────────────────────────── */
.upload-card {
  position: absolute;
  top: 10%;
  left: 27%;
  width: 46%;
  background: #ffffff;
  padding: 2cqw 3cqw 1.4cqw;
  border-radius: 0.5cqw;
  box-shadow: 0 0.15cqw 0.6cqw rgba(0, 0, 0, 0.06);
  text-align: center;
  z-index: 5;
}

.upload-title {
  font-size: 1.4cqw;
  font-weight: 700;
  color: #333;
  margin-bottom: 1cqw;
  letter-spacing: 0.02em;
}

.upload-desc {
  font-size: 0.72cqw;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.2cqw;
  font-weight: 400;
}

/* ── input 状態 ── */
.upload-dropzone {
  border: 0.15cqw dashed #c5c5c5;
  border-radius: 0.4cqw;
  padding: 1.4cqw 1cqw;
  margin-bottom: 1cqw;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-height: 6cqw;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-dropzone:hover {
  border-color: #2196f3;
  background: #f0f7ff;
}
.upload-dropzone.dragover {
  border-color: #2196f3;
  background: #e3f2fd;
}

.dz-icon {
  font-size: 1.6cqw;
  color: #2196f3;
  margin-bottom: 0.4cqw;
  line-height: 1;
}
.dz-icon-success {
  color: #4caf50;
}
.dz-text {
  font-size: 0.72cqw;
  color: #666;
  line-height: 1.7;
  margin-bottom: 0.3cqw;
}
.dz-pick {
  color: #2196f3;
  font-weight: 700;
  text-decoration: underline;
}
.dz-formats {
  font-size: 0.55cqw;
  color: #999;
  font-weight: 400;
}
.dz-filename {
  font-size: 0.78cqw;
  color: #333;
  font-weight: 700;
  margin-bottom: 0.2cqw;
  word-break: break-all;
}
.dz-filesize {
  font-size: 0.6cqw;
  color: #888;
  margin-bottom: 0.6cqw;
}
.dz-clear {
  background: transparent;
  border: 0.06cqw solid #c5c5c5;
  color: #666;
  padding: 0.3cqw 1cqw;
  border-radius: 1cqw;
  font-size: 0.6cqw;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.dz-clear:hover {
  border-color: #d32f2f;
  color: #d32f2f;
}

/* 設定セレクタ（入力言語・翻訳先） */
.upload-settings {
  display: flex;
  gap: 1cqw;
  margin-bottom: 1cqw;
}
.upload-setting {
  flex: 1;
  text-align: left;
}
.upload-setting label {
  display: block;
  font-size: 0.62cqw;
  color: #666;
  margin-bottom: 0.25cqw;
  font-weight: 700;
}
.upload-setting select {
  width: 100%;
  padding: 0.45cqw 0.6cqw;
  font-size: 0.7cqw;
  border: 0.06cqw solid #ddd;
  border-radius: 0.25cqw;
  background: #fff;
  font-family: inherit;
  color: #333;
  cursor: pointer;
}
.upload-setting select:focus {
  outline: none;
  border-color: #2196f3;
}

/* ダーク pill ボタン（既存「決定」「参加」と同系統） */
.upload-start-btn {
  background: #3f3f3f;
  color: #fff;
  border: none;
  padding: 0.65cqw 2.4cqw;
  border-radius: 2cqw;
  font-size: 0.78cqw;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.05em;
  transition: background 0.15s;
}
.upload-start-btn:hover:not(:disabled) {
  background: #555;
}
.upload-start-btn:disabled {
  background: #c5c5c5;
  cursor: not-allowed;
}

/* ── processing 状態 ── */
.spinner {
  width: 2.5cqw;
  height: 2.5cqw;
  border: 0.25cqw solid #e0e0e0;
  border-top-color: #2196f3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1cqw;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-text {
  font-size: 0.85cqw;
  color: #333;
  font-weight: 700;
  margin-bottom: 0.8cqw;
}

.progress-bar {
  width: 100%;
  height: 0.4cqw;
  background: #e8e8e8;
  border-radius: 0.4cqw;
  overflow: hidden;
  margin-bottom: 0.5cqw;
}
.progress-fill {
  height: 100%;
  background: #2196f3;
  width: 0%;
  transition: width 0.3s ease-out;
}
.progress-step {
  font-size: 0.6cqw;
  color: #888;
}

/* ── complete 状態 ── */
.complete-icon {
  font-size: 3cqw;
  color: #4caf50;
  line-height: 1;
  margin-bottom: 0.6cqw;
}
.complete-message {
  font-size: 0.95cqw;
  color: #333;
  font-weight: 700;
  margin-bottom: 0.4cqw;
}
.complete-detail {
  font-size: 0.65cqw;
  color: #888;
  margin-bottom: 1.2cqw;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6cqw;
  margin-bottom: 1cqw;
}
.download-btn {
  display: inline-block;
  background: #2196f3;
  color: #fff;
  text-decoration: none;
  padding: 0.65cqw 2cqw;
  border-radius: 2cqw;
  font-size: 0.75cqw;
  font-weight: 700;
  font-family: inherit;
  margin: 0 auto;
  transition: background 0.15s;
  letter-spacing: 0.03em;
}
.download-btn:hover {
  background: #1976d2;
}

.restart-btn {
  background: transparent;
  border: 0.08cqw solid #2196f3;
  color: #2196f3;
  padding: 0.5cqw 1.6cqw;
  border-radius: 1.6cqw;
  font-size: 0.7cqw;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.4cqw;
  transition: background 0.15s, color 0.15s;
}
.restart-btn:hover {
  background: #2196f3;
  color: #fff;
}

/* ── error 状態 ── */
.error-icon {
  font-size: 3cqw;
  color: #f44336;
  line-height: 1;
  margin-bottom: 0.6cqw;
}
.error-message {
  font-size: 0.78cqw;
  color: #d32f2f;
  margin-bottom: 1cqw;
  word-break: break-word;
}

/* ── 共通: ホームに戻るボタン ── */
.back-btn {
  background: transparent;
  border: 0.06cqw solid #ddd;
  color: #666;
  padding: 0.4cqw 1.2cqw;
  border-radius: 0.3cqw;
  font-size: 0.65cqw;
  cursor: pointer;
  font-family: inherit;
  font-weight: 400;
  transition: background 0.15s;
  margin-top: 1cqw;
}
.back-btn:hover {
  background: #f0f0f0;
}
