body {
  font-family: Arial, "Noto Sans KR", sans-serif;
  background: #f8fafc !important;
}

/* PC: 카드 너비는 main-inner(1200px)까지 — 이전과 동일. 모바일만 살짝 좁혀 가독성 */
.center-shell {
  width: 100%;
}

@media (max-width: 767.98px) {
  .center-shell {
    max-width: 720px;
    margin-inline: auto;
  }
}

/* 녹음 안내: 의도한 위치에서만 줄바꿈 */
.helper-text {
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

.helper-text-line {
  display: block;
}

.helper-text-line + .helper-text-line {
  margin-top: 0.4rem;
}

.upload-format-note {
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 목록 탭: 안내 문구와 보관 안내를 붙이고, 상태 줄만 위쪽 여백 */
.sound-list-retention-note {
  margin-top: 0;
  line-height: 1.5;
}

.sound-list-status-line {
  margin-top: 0.65rem;
}

.btn-submit-sound {
  font-weight: 600;
  min-height: 48px;
  border-radius: 12px;
}

.register-guide-modal-body section h6 {
  color: var(--lumen-primary-dark, #1e3a5f);
  font-size: 0.95rem;
}

.register-guide-modal-body ol li,
.register-guide-modal-body ul li {
  line-height: 1.55;
}

/* ===== tabs (Lumen 테마) ===== */
.sound-tabs .nav-link {
  color: var(--lumen-primary-dark);
}

.sound-tabs .nav-link.active {
  background: var(--lumen-bg-subtle);
  border-color: var(--lumen-teal) rgba(6, 182, 212, 0.3) #fff;
  color: var(--lumen-primary);
  font-weight: 700;
}

.main-card {
  border: 1px solid rgba(6, 182, 212, 0.2) !important;
  border-radius: 16px;
}

/* ===== record area (Lumen 테마) ===== */
.record-shell {
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 24px;
  padding: 24px;
  background: var(--lumen-bg-subtle);
}

/* 녹음 인디케이터: 펄스 링 애니메이션 */
.rec-indicator-wrap {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-indicator {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-core {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.25);
  transition: background 0.2s;
}

.rec-indicator-wrap.recording .rec-core {
  background: var(--lumen-orange);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.4);
}

.rec-pulse {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(6, 182, 212, 0.2);
  opacity: 0;
  animation: none;
}

.rec-indicator-wrap.recording .rec-pulse {
  border-color: var(--lumen-orange);
  opacity: 0.6;
  animation: rec-pulse-ring 1.8s ease-out infinite;
}

.rec-pulse-2 { animation-delay: 0.6s; }
.rec-pulse-3 { animation-delay: 1.2s; }

@keyframes rec-pulse-ring {
  0% {
    transform: scale(0.3);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.timer-pill {
  min-width: 72px;
  padding: 6px 12px;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 999px;
  background: #fff;
  text-align: center;
  font-size: 13px;
  color: var(--lumen-primary-dark);
}

/* ===== status ===== */
.status {
  min-height: 20px;
}

.status.ok {
  color: var(--lumen-teal);
}

.status.err {
  color: #dc3545;
}

/* 내가 등록한 소리 목록 */
.sound-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sound-row {
  background: var(--lumen-bg-subtle);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 20px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 20px;
  row-gap: 12px;
  align-items: center;
}

.sound-left {
  min-width: 0;
  display: contents;
}

.sound-title-line {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
  min-width: 0;
}

.sound-name {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
  font-size: 18px;
  color: #111827;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
}

.sound-date {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  font-size: 13px;
  color: #374151;
  line-height: 1.2;
}

.sound-right {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.sound-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

.sound-badge.daily {
  background: var(--lumen-teal) !important;
  color: #fff !important;
}

.sound-badge.danger {
  background: var(--lumen-orange) !important;
  color: #fff !important;
}

.sound-badge.caution {
  background: #f59e0b !important;
  color: #fff !important;
}

.icon-btn.play-toggle-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  opacity: 1;
}

.icon-btn.play-toggle-btn:hover {
  background: rgba(6, 182, 212, 0.08);
  border-color: var(--lumen-teal);
}

.icon-btn.play-toggle-btn.is-playing {
  border-color: var(--lumen-orange);
  color: var(--lumen-orange);
}

.icon-btn.delete-sound-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  opacity: 1;
  color: #dc3545;
}

.icon-btn.delete-sound-btn:hover {
  background: rgba(239, 68, 68, 0.06);
  border-color: #dc3545;
}

@media (max-width: 400px) {
  .sound-tabs .nav-link {
    font-size: 0.78rem;
    padding: 0.5rem 0.55rem;
    white-space: nowrap;
  }
  .main-card .card-body {
    padding: 1.1rem 1rem !important;
  }
}

/* 모바일·좁은 태블릿: 녹음 영역 비율·터치 영역 */
@media (max-width: 767.98px) {
  .sound-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.25rem;
    padding-bottom: 2px;
  }

  .sound-tabs::-webkit-scrollbar {
    display: none;
  }

  .sound-tabs .nav-item {
    flex: 0 0 auto;
  }

  .sound-tabs .nav-link {
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
    white-space: nowrap;
  }

  .record-shell {
    padding: 1rem 1.05rem;
    border-radius: 18px;
  }

  .helper-text {
    max-width: 100%;
    font-size: 0.875rem;
    padding-inline: 0.15rem;
  }

  .rec-indicator-wrap {
    min-height: 88px;
    margin-bottom: 0.75rem !important;
  }

  .rec-indicator {
    width: 56px;
    height: 56px;
  }

  .rec-pulse {
    width: 56px;
    height: 56px;
  }

  .record-controls {
    width: 100%;
    max-width: 100%;
    gap: 0.5rem !important;
  }

  .btn-record {
    min-height: 44px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    font-size: 0.9rem;
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
  }

  .record-controls .timer-pill {
    flex: 1 1 100%;
    max-width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
  }

  #audioPreview:not([hidden]) {
    margin-top: 0.75rem !important;
  }
}

@media (min-width: 768px) {
  .record-controls .btn-record {
    flex: 0 0 auto;
  }

  .record-controls .timer-pill {
    flex: 0 0 auto;
  }
}

@media (max-width: 768px) {
  .sound-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .sound-title-line {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .sound-right {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }

  .sound-date {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
  }
}