/* ===== 全透明玻璃风格（完全一致） ===== */

:root {
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --card-shadow-hover: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
  --card-radius: 16px;
  --page-bg: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --accent-shadow: rgba(37, 99, 235, 0.08);
  --input-bg: #f8fafc;
  --input-bg-hover: #ffffff;
  --input-bg-focus: #ffffff;
  --input-border: #e2e8f0;
  --input-border-hover: #94a3b8;
  --input-border-focus: #2563eb;
  --input-radius: 10px;
  --record-border: #e5e7eb;
}

body.ci-page {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--page-bg);
  color: var(--text-primary);
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.ci-page::before {
  display: none;
}

.ci-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  position: relative;
  z-index: 1;
}

.ci-auth-shell {
  max-width: 520px;
  margin: 40px auto 0;
}

.ci-auth-card {
  padding: 28px;
}

.ci-auth-grid {
  margin-top: 18px;
}

.ci-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.ci-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.ci-brand-logo {
  display: none;
}

.ci-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.ci-brand-subtitle {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.ci-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ci-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

@keyframes ci-card-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ci-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 28px;
  margin-bottom: 16px;
  animation: ci-card-enter 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition:
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
}

.ci-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--card-shadow-hover);
}

.ci-card:nth-child(2) { animation-delay: 0.04s; }
.ci-card:nth-child(3) { animation-delay: 0.08s; }
.ci-card:nth-child(4) { animation-delay: 0.12s; }
.ci-card:nth-child(5) { animation-delay: 0.16s; }
.ci-card:nth-child(6) { animation-delay: 0.20s; }
.ci-card:nth-child(7) { animation-delay: 0.24s; }
.ci-card:nth-child(8) { animation-delay: 0.28s; }
.ci-card:nth-child(9) { animation-delay: 0.32s; }
.ci-card:nth-child(10) { animation-delay: 0.36s; }

.ci-auth-row,
.ci-actions,
.ci-inline-tools,
.ci-record-tools {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ci-auth-row input {
  flex: 1;
  min-width: 220px;
}

.ci-message {
  margin-top: 14px;
  min-height: 20px;
  font-size: 14px;
  transition: color 0.25s ease;
}

.ci-message.is-error {
  color: #dc2626;
}

.ci-message.is-success {
  color: #059669;
}

.ci-access-code {
  margin-top: 18px;
  padding: 20px 24px;
  background: var(--page-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  text-align: center;
  animation: ci-card-enter 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ci-access-code-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ci-access-code-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.ci-access-code-value {
  display: inline-block;
  padding: 6px 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  font-family: "SF Mono", "Fira Code", "Courier New", monospace;
}

.ci-btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  background: var(--text-primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ci-btn-copy:hover {
  background: #1e293b;
}

.ci-btn-copy:active {
  transform: scale(0.97);
}

.ci-access-code-tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

@keyframes ci-heading-underline-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.ci-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}

.ci-section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 14px;
}

.ci-section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.ci-section-head h2::after {
  display: none;
}

.ci-section-head:hover h2::after {
  display: none;
}

@keyframes ci-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

@keyframes ci-field-flash {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); border-color: #ef4444; }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); border-color: #ef4444; }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); border-color: var(--card-border); }
}

.ci-field-flash {
  animation: ci-field-flash 1.2s ease;
}

/* ===== 彩虹邊框動畫（語音填表時） ===== */

@keyframes ci-rainbow-border-filling {
  0%   { border-color: #ef4444; box-shadow: 0 0 16px rgba(239, 68, 68, 0.3), 0 0 32px rgba(239, 68, 68, 0.1); }
  14%  { border-color: #f97316; box-shadow: 0 0 16px rgba(249, 115, 22, 0.3), 0 0 32px rgba(249, 115, 22, 0.1); }
  28%  { border-color: #eab308; box-shadow: 0 0 16px rgba(234, 179, 8, 0.3), 0 0 32px rgba(234, 179, 8, 0.1); }
  42%  { border-color: #22c55e; box-shadow: 0 0 16px rgba(34, 197, 94, 0.3), 0 0 32px rgba(34, 197, 94, 0.1); }
  57%  { border-color: #3b82f6; box-shadow: 0 0 16px rgba(59, 130, 246, 0.3), 0 0 32px rgba(59, 130, 246, 0.1); }
  71%  { border-color: #6366f1; box-shadow: 0 0 16px rgba(99, 102, 241, 0.3), 0 0 32px rgba(99, 102, 241, 0.1); }
  85%  { border-color: #a855f7; box-shadow: 0 0 16px rgba(168, 85, 247, 0.3), 0 0 32px rgba(168, 85, 247, 0.1); }
  100% { border-color: #ef4444; box-shadow: 0 0 16px rgba(239, 68, 68, 0.3), 0 0 32px rgba(239, 68, 68, 0.1); }
}

.ci-field-rainbow-filling input,
.ci-field-rainbow-filling select,
.ci-field-rainbow-filling textarea {
  animation: ci-rainbow-border-filling 2s linear infinite;
  background: rgba(255, 255, 255, 0.75) !important;
  border-width: 2px;
}

.ci-field-rainbow-filling label {
  color: #6366f1;
  font-weight: 700;
}

/* ===== 語音填寫完成後樣式 ===== */

.ci-field-voice-filled input,
.ci-field-voice-filled select,
.ci-field-voice-filled textarea {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
  background: rgba(240, 253, 244, 0.7) !important;
  transition: all 0.4s ease;
}

.ci-field-voice-skipped input,
.ci-field-voice-skipped select,
.ci-field-voice-skipped textarea {
  border-color: var(--card-border);
  box-shadow: none;
  background: var(--input-bg);
  transition: all 0.4s ease;
}

/* ===== 按鈕 ===== */

.ci-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ci-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ci-btn:hover::after {
  opacity: 1;
  transform: scale(1.5);
}

.ci-btn:active {
  transform: scale(0.97);
}

.ci-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.ci-btn:disabled::after {
  display: none;
}

.ci-btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.ci-btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.ci-btn-primary:active:not(:disabled) {
  transform: scale(0.97) translateY(0);
}

.ci-btn-secondary {
  background: rgba(255, 255, 255, 0.10);
  color: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
}

.ci-btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.40);
  box-shadow: 0 2px 12px rgba(31, 38, 135, 0.06);
}

.ci-btn-link {
  width: fit-content;
}

.ci-record-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ci-record-card {
  border: 1px solid var(--record-border);
  border-radius: var(--card-radius);
  padding: 16px;
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.ci-record-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.ci-record-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.ci-record-title {
  font-size: 18px;
  font-weight: 700;
}

.ci-record-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.ci-detail-item {
  padding: 12px 14px;
  background: var(--page-bg);
  border-radius: 12px;
  min-height: 52px;
}

.ci-detail-item strong {
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.ci-empty {
  padding: 20px;
  border-radius: var(--card-radius);
  background: var(--page-bg);
}

.ci-empty-title {
  font-size: 18px;
  font-weight: 700;
}

.ci-empty-text {
  margin-top: 8px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== SuperClaw 語音按鈕 ===== */

.ci-btn-voice {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  letter-spacing: 0.02em;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
  position: relative;
  overflow: visible;
}

.ci-btn-voice:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45);
  transform: translateY(-2px);
}

.ci-btn-voice:active {
  transform: scale(0.97);
}

.ci-btn-voice.is-active {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.15), 0 4px 16px rgba(220, 38, 38, 0.3);
  animation: ci-voice-pulse 1.5s ease-in-out infinite;
}

@keyframes ci-voice-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15), 0 4px 16px rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0), 0 4px 20px rgba(220, 38, 38, 0.4); }
}

@keyframes ci-waveform-bar {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

.ci-btn-voice-wave {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.ci-btn-voice.is-active .ci-btn-voice-wave {
  display: flex;
}

.ci-btn-voice.is-active .ci-btn-voice-icon {
  display: none;
}

.ci-btn-voice-wave span {
  display: block;
  width: 2px;
  background: #ffffff;
  border-radius: 1px;
  animation: ci-waveform-bar 0.8s ease-in-out infinite;
}

.ci-btn-voice-wave span:nth-child(2) { animation-delay: 0.1s; }
.ci-btn-voice-wave span:nth-child(3) { animation-delay: 0.2s; }
.ci-btn-voice-wave span:nth-child(4) { animation-delay: 0.3s; }
.ci-btn-voice-wave span:nth-child(5) { animation-delay: 0.4s; }

.ci-btn-voice:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== 語音狀態欄 ===== */

.ci-voice-status-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(20px);
  animation: ci-card-enter 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: sticky;
  top: 12px;
  z-index: 100;
}

.ci-voice-status-bar.is-active {
  display: flex;
}

.ci-voice-status-indicator {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  flex-shrink: 0;
}

.ci-voice-status-indicator span {
  display: block;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1px;
}

.ci-voice-status-indicator.is-idle span {
  background: rgba(255, 255, 255, 0.5);
  animation: none;
}

.ci-voice-status-indicator.is-active span {
  animation: ci-waveform-bar 0.8s ease-in-out infinite;
}

.ci-voice-status-indicator.is-active span:nth-child(2) { animation-delay: 0.1s; }
.ci-voice-status-indicator.is-active span:nth-child(3) { animation-delay: 0.2s; }
.ci-voice-status-indicator.is-active span:nth-child(4) { animation-delay: 0.3s; }
.ci-voice-status-indicator.is-active span:nth-child(5) { animation-delay: 0.4s; }

.ci-voice-status-text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.4;
  min-width: 0;
}

.ci-voice-status-field {
  font-weight: 700;
  color: #ffffff;
}

.ci-voice-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  flex-shrink: 0;
}

.ci-voice-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ci-voice-skip-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ci-voice-skip-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.ci-voice-stop-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid rgba(254, 202, 202, 0.4);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.2);
  color: #fecaca;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ci-voice-stop-btn:hover {
  background: rgba(220, 38, 38, 0.35);
  border-color: rgba(254, 202, 202, 0.6);
  color: #fef2f2;
}

.ci-voice-log {
  display: none;
}

/* ===== 表單鎖定（語音填表時禁用手動操作） ===== */

.ci-form-locked input,
.ci-form-locked select,
.ci-form-locked textarea,
.ci-form-locked button:not(.ci-voice-skip-btn):not(.ci-voice-stop-btn):not(#voiceGuidanceBtn) {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0.6;
  cursor: not-allowed;
}

.ci-form-locked .ci-field {
  pointer-events: none;
}

.ci-form-locked .ci-field-rainbow-filling select {
  pointer-events: auto;
  opacity: 1;
}

.ci-field-voice-expanded {
  z-index: 150;
  position: relative;
  pointer-events: auto;
}

.ci-field-voice-expanded select {
  overflow-y: auto;
  -webkit-appearance: none;
  appearance: none;
  background-image: none !important;
}

.ci-form-locked .ci-field-rainbow-filling input,
.ci-form-locked .ci-field-rainbow-filling textarea {
  pointer-events: none;
  opacity: 1;
}

/* ===== 虛擬游標 ===== */

.ci-vc-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.9) 0%, rgba(99,102,241,0.4) 40%, transparent 70%);
  box-shadow: 0 0 24px rgba(99,102,241,0.6), 0 0 48px rgba(139,92,246,0.25);
  pointer-events: none;
  z-index: 9999;
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1), top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  animation: ci-cursor-pulse 1.2s ease-in-out infinite;
}

@keyframes ci-cursor-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.ci-vc-ripple {
  position: fixed;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  border-radius: 50%;
  background: rgba(99,102,241,0.25);
  pointer-events: none;
  z-index: 9998;
  animation: ci-ripple-out 0.6s ease-out forwards;
}

@keyframes ci-ripple-out {
  0% { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.ci-vc-cursor-fast {
  transition: left 0.15s cubic-bezier(0.16, 1, 0.3, 1), top 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ci-text-sand-filling {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 25%, #fefce8 50%, #fef9c3 75%, #fefce8 100%) !important;
  background-size: 200% 200% !important;
  animation: ci-sand-flow 0.6s linear infinite !important;
  border-color: #eab308 !important;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15) !important;
}

@keyframes ci-sand-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.ci-text-sand-done {
  background: rgba(240, 253, 244, 0.7) !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15) !important;
  transition: all 0.3s ease;
}

.ci-text-erasing {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 50%, #fef2f2 100%) !important;
  background-size: 200% 200% !important;
  animation: ci-sand-flow 0.4s linear infinite !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.4);
  text-decoration-thickness: 1px;
}

/* ===== MiniMax M3 覆核面板 ===== */

.ci-review-panel {
  margin-top: 20px;
  padding: 20px 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  animation: ci-card-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ci-review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ci-review-icon {
  font-size: 18px;
}

.ci-review-body {
  font-size: 13px;
  line-height: 1.7;
}

.ci-review-note {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-style: italic;
}

.ci-review-section {
  margin-bottom: 12px;
}

.ci-review-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 6px;
}

.ci-review-item {
  padding: 7px 12px;
  border-radius: 10px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ci-review-correction {
  background: rgba(254, 242, 242, 0.6);
  border: 1px solid rgba(254, 202, 202, 0.5);
}

.ci-review-missing {
  background: rgba(240, 253, 244, 0.6);
  border: 1px solid rgba(187, 247, 208, 0.5);
}

.ci-review-field {
  font-weight: 600;
  color: var(--text-primary);
}

.ci-review-value {
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.6);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
}

.ci-review-reason {
  color: var(--text-secondary);
  font-size: 12px;
}

/* ===== 實時字幕 ===== */

.ci-live-subtitle {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.88) 40%);
  padding: 60px 24px 28px;
  animation: ciSubtitleIn 0.35s ease-out;
}

@keyframes ciSubtitleIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ci-live-subtitle-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.ci-live-subtitle-label {
  color: rgba(148, 163, 184, 0.7);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.ci-live-subtitle-text {
  color: #ffffff;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ===== 模態框 ===== */

.ci-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ci-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ci-modal {
  position: relative;
  z-index: 1;
  width: min(92vw, 560px);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
  animation: ci-modal-enter 0.3s ease both;
}

@keyframes ci-modal-enter {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ci-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ci-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.ci-modal-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 22px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.ci-modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.ci-modal-body {
  padding: 20px 24px;
}

.ci-modal-body .ci-field {
  margin-bottom: 18px;
}

.ci-modal-body .ci-field:last-child {
  margin-bottom: 0;
}

.ci-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.ci-modal-wide {
  width: min(92vw, 720px);
}

.ci-privacy-body {
  max-height: 60vh;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-primary);
}

.ci-privacy-body h3 {
  margin: 20px 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.ci-privacy-body h3:first-child {
  margin-top: 0;
}

.ci-privacy-body p {
  margin: 6px 0;
}

.ci-privacy-body ul {
  margin: 6px 0;
  padding-left: 20px;
}

.ci-privacy-body ul li {
  margin: 3px 0;
}

.ci-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
  padding: 16px 0;
  animation: ci-cookie-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ci-cookie-enter {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ci-cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ci-cookie-text {
  flex: 1;
  min-width: 260px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.ci-cookie-text a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}

.ci-cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.ci-btn-sm {
  padding: 8px 20px;
  font-size: 13px;
  border-radius: 10px;
  min-width: 80px;
}

.ci-consent-wrap {
  margin-bottom: 16px;
  text-align: left;
}

.ci-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  user-select: none;
}

.ci-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.ci-consent-text {
  flex: 1;
}

.ci-consent-text a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}

/* ===== 輸入框樣式（玻璃效果） ===== */

.ci-field,
.ci-detail-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ci-field-span-2 {
  grid-column: span 2;
}

.ci-field label,
.ci-detail-item span {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.ci-field input,
.ci-field select,
.ci-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--input-border);
  border-radius: var(--input-radius);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text-primary);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  outline: none;
}

.ci-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.ci-field input::placeholder,
.ci-field textarea::placeholder {
  color: #94a3b8;
}

.ci-field input:hover,
.ci-field select:hover,
.ci-field textarea:hover {
  border-color: var(--input-border-hover);
  background: var(--input-bg-hover);
}

.ci-field input:focus,
.ci-field select:focus,
.ci-field textarea:focus {
  border-color: var(--input-border-focus);
  box-shadow:
    0 0 0 3px var(--accent-shadow),
    0 0 0 1px rgba(37, 99, 235, 0.2);
  background: var(--input-bg-focus);
}

.ci-field textarea {
  min-height: 96px;
  resize: vertical;
}

.ci-detail-item {
  padding: 12px 14px;
  background: var(--input-bg);
  border-radius: 12px;
  min-height: 52px;
}

.ci-section-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding-left: 12px;
}

.ci-section-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
  border-radius: 2px;
}

.ci-section-head {
  margin-top: 20px;
}

.ci-section-head:first-child {
  margin-top: 0;
}

/* ===== 進度條 ===== */

.ci-progress-wrap {
  margin-bottom: 18px;
}

.ci-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

@keyframes ci-progress-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.ci-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    #6366f1 0%,
    #8b5cf6 20%,
    #a78bfa 40%,
    #8b5cf6 60%,
    #6366f1 80%
  );
  background-size: 200% 100%;
  animation: ci-progress-shimmer 2s linear infinite;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 999px;
}

.ci-progress-tip {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.ci-grid,
.ci-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* ===== 響應式 ===== */

@media (max-width: 860px) {
  .ci-topbar,
  .ci-record-head,
  .ci-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .ci-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .ci-grid,
  .ci-detail-grid {
    grid-template-columns: 1fr;
  }

  .ci-field-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .ci-shell {
    padding: 16px 12px 28px;
  }

  .ci-card {
    padding: 16px;
    border-radius: 16px;
  }

  .ci-title {
    font-size: 24px;
  }

  .ci-subtitle {
    font-size: 13px;
    line-height: 1.5;
  }

  .ci-field input,
  .ci-field select,
  .ci-field textarea {
    padding: 11px 12px;
  }
}

.hidden {
  display: none !important;
}
