.recording-screen {
  background: linear-gradient(165deg, #2C3639 0%, #1E2426 100%);
}

.recording-screen::before { display: none; }

.recording-header {
  background: transparent;
  border: none;
  position: relative;
}

.recording-nav {
  position: absolute;
  top: 54px;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  z-index: 18;
}

.recording-back-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255, 252, 248, 0.72);
  font-size: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s var(--ease-soft);
}

.recording-back-btn:active {
  color: rgba(255, 252, 248, 0.92);
}

.status-bar--light {
  --status-bar-image: url("../images/status-bar-white.svg");
}

.recording-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  text-align: center;
  color: var(--brand-on);
  padding-top: 40px;
  padding-bottom: 28px;
}

.recording-label {
  font-size: 15px;
  opacity: 0.85;
  margin: 0 0 4px;
}

.recording-hint {
  font-size: 13px;
  opacity: 0.55;
  margin: 0 0 40px;
  max-width: 280px;
  line-height: 1.5;
}

.recording-shell[data-recording-state="preparing"] .recording-hint {
  opacity: 0.75;
}

.recording-shell[data-recording-state="blocked"] .recording-hint {
  opacity: 0.9;
  color: #f5c6a8;
}

.recording-shell[data-recording-state="blocked"] .wave-ring {
  animation: none;
  border-color: rgba(245, 198, 168, 0.35);
  box-shadow: none;
}

.wave-ring.is-live {
  animation-duration: 2s;
}

.wave-ring {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 2px solid rgba(232, 168, 124, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  animation: breathe 3s ease-in-out infinite;
  box-shadow: 0 0 48px rgba(212, 165, 116, 0.25);
}

.wave-inner {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 112, 75, 0.5), rgba(196, 112, 75, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--brand-light);
}

.recording-timer {
  font-family: var(--font-family-data);
  font-size: 40px;
  letter-spacing: 0.06em;
  margin-bottom: 48px;
}

.recording-actions {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 300px;
}

.btn-pause {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 252, 248, 0.35);
  background: transparent;
  color: var(--brand-on);
  font-size: 14px;
  cursor: pointer;
}

.btn-pause:disabled,
.btn-pause[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-stop {
  flex: 1.2;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: var(--brand-on);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(196, 112, 75, 0.4);
}

.btn-stop.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

.home-indicator--light { background: rgba(255, 255, 255, 0.35); }

/* ── 上传已有语音（次要补充入口） ── */

.recording-alt {
  width: 100%;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.recording-upload-link {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 252, 248, 0.42);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 252, 248, 0.22);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease-soft);
}

.recording-upload-link:active {
  color: rgba(255, 252, 248, 0.58);
}

.recording-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.recording-upload-status {
  margin: 0;
  max-width: 280px;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
  color: rgba(255, 252, 248, 0.55);
}

.recording-upload-status.is-error {
  color: rgba(245, 198, 168, 0.85);
}

.recording-alt.is-busy .recording-upload-link {
  opacity: 0.5;
  pointer-events: none;
}

/* ── 退出确认 · 底部抽屉 ── */

.recording-exit-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.recording-exit-sheet:not(.hidden) {
  pointer-events: auto;
}

.recording-exit-sheet.hidden {
  display: none;
}

.recording-exit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 26, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.32s var(--ease-soft);
}

.recording-exit-sheet:not(.hidden) .recording-exit-backdrop {
  opacity: 1;
}

.recording-exit-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 8px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #fffdfb 0%, #fff8f1 100%);
  border: 1px solid rgba(212, 165, 116, 0.18);
  border-bottom: none;
  box-shadow:
    0 -8px 40px rgba(196, 112, 75, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transform: translateY(100%);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.recording-exit-sheet:not(.hidden) .recording-exit-panel {
  transform: translateY(0);
}

.recording-exit-handle {
  width: 36px;
  height: 4px;
  margin: 6px auto 18px;
  border-radius: 999px;
  background: rgba(212, 165, 116, 0.35);
}

.recording-exit-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.recording-exit-desc {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  color: var(--text-secondary);
}

.recording-exit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.recording-exit-cancel,
.recording-exit-confirm {
  height: 46px;
  border-radius: calc(var(--radius-md) + 2px);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.22s var(--ease-soft),
    opacity 0.22s var(--ease-soft),
    transform 0.16s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.recording-exit-cancel {
  border: 1px solid rgba(212, 165, 116, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-secondary);
}

.recording-exit-cancel:active {
  transform: scale(0.98);
}

.recording-exit-confirm {
  border: none;
  background: linear-gradient(145deg, #c4704b 0%, #b85f3a 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(196, 112, 75, 0.28);
}

.recording-exit-confirm:active {
  transform: scale(0.98);
}

body.recording-exit-open {
  overflow: hidden;
}
