/* ===== 정렬 보정: view_utmenu 안에서 35px 라인 맞춤 ===== */
.view_utmenu .ut_tts{
  height: 35px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.view_utwrap{
  display: inline-flex;
  align-items: center;
  height: 35px;
  margin: 0;
  float: none;
}

/* ===== 기본(본문): 플레이어 래퍼는 완전 무외곽 ===== */
.tts-player{
  height: 35px;
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;

  user-select: none;
}

.tts-player:not(.is-activated) .tts-line{
  display: none;
}

/* 좌측: 시간 + 상태바 (무외곽) */
.tts-line{
  height: 35px;
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 0;
  border: 0;
  background: transparent;
}

.tts-time{
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: rgba(0,0,0,0.85);
  font-variant-numeric: tabular-nums;
}

/* 상태바(range) */
.tts-seek{
  -webkit-appearance: none;
  appearance: none;

  width: 80px;
  height: 6px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;

  background: linear-gradient(
    to right,
    rgba(0,0,0,0.70) 0%,
    rgba(0,0,0,0.70) var(--tts-progress, 0%),
    rgba(0,0,0,0.18) var(--tts-progress, 0%),
    rgba(0,0,0,0.18) 100%
  );
}

.tts-seek::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;

  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0,0,0,0.88);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.20);
}

.tts-seek::-moz-range-thumb{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0,0,0,0.88);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.20);
}

.tts-seek::-moz-range-track{
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.tts-seek:focus{ outline: none; }
.tts-seek:focus-visible{
  outline: 2px solid rgba(0,0,0,0.18);
  outline-offset: 2px;
}

/* 우측: 플레이 버튼(기본은 버튼만 외곽선) */
.tts-btn{
  width: 35px;
  height: 35px;
  padding: 0;

  border: 1px solid rgba(0,0,0,0.16);
  border-radius: 0;
  background: #fff;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.tts-btn:hover{ background: rgba(0,0,0,0.04); }
.tts-btn:active{ background: rgba(0,0,0,0.08); }

.tts-btn .tts-svg{
  width: 18px;
  height: 18px;
  display: block;
  fill: #123728;
}

.tts-btn:hover .tts-svg{
  fill: #0e2d1f;
}

/* 좁은 화면 */
@media (max-width: 480px){
  .tts-seek{ width: 92px; }
}

/* ===== Floating: 상단 중앙 ===== */
#ttsFloating{
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: none;
}

#ttsFloating.is-show{
  display: block;
}

/* 플로팅 전용: 통합 박스(라운딩) */
#ttsFloating .tts-player{
  /* 하나의 외곽선 박스 */
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 15px;      /* ✅ 플로팅 라운딩 */
  overflow: hidden;         /* hover 배경 등이 라운딩 밖으로 안 나가게 */

  background: #fff;         /* 본문 비침 방지 */
  padding: 0;
  gap: 0;

  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  
  height: 45px;              /* ✅ 플로팅 전체 높이 */
  align-items: center;
}

/* 플로팅에서는 좌측 영역에 패딩 */
#ttsFloating .tts-line{
  padding: 0 10px;
  height: 45px;
  align-items: center;
  display: inline-flex;
}

/* 플로팅에서는 버튼 외곽선 제거 + 구분선만 */
#ttsFloating .tts-btn{
  border: 0; /* ✅ 버튼 외곽선 없음 */
  border-left: 1px solid rgba(0,0,0,0.14);
  background: transparent;
  width: 45px;
  height: 45px;
}

#ttsFloating .tts-btn:hover{ background: rgba(0,0,0,0.03); }
#ttsFloating .tts-btn:active{ background: rgba(0,0,0,0.06); }

/* 모바일: 중앙 고정 대신 좌우 여백 */
@media (max-width: 480px){
  #ttsFloating{
    left: 12px;
    right: 12px;
    transform: none;
  }
  #ttsFloating .tts-player{
    width: 100%;
  }
}
