/* ==========================================================================
   /var/www/maple-app/Util/5/timer.css
   재획 전용 타이머 전면 개편 - 심플 다크 UI, SVG 아이콘, 그래픽 사운드 피커
   ========================================================================== */

:root {
  --tm-surface: #151923;
  --tm-surface-hover: #1a202d;
  --tm-surface-deep: #0f131b;
  --tm-border: #252d3f;
  --tm-border-hover: #3b4761;
  --tm-text: #f1f5f9;
  --tm-muted: #94a3b8;
  --tm-primary: #f0883e;
  --tm-accent: #58a6ff;
  --tm-green: #34d399;
  --tm-purple: #c084fc;
  --tm-danger: #f87171;
}

.timer-container {
  max-width: 1180px;
}

/* 공통 SVG 규격 */
.tm-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.tm-svg-sm {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.tm-svg-xs {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ==========================================================================
   1. 상단 히어로 헤더
   ========================================================================== */
.tm-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #171c28 0%, #131722 100%);
  border: 1px solid var(--tm-border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 14px;
}

.tm-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tm-title-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(240, 136, 62, 0.12);
  border: 1px solid rgba(240, 136, 62, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tm-title-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.tm-title-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tm-title-heading h1 {
  font-size: 1.32rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin: 0;
}

.tm-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #1c2230;
  border: 1px solid #2e374b;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.tm-live-pill.is-active {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.38);
  color: #6ee7b7;
}

.tm-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
}

.tm-live-pill.is-active .tm-live-dot {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
  animation: tmPulseDot 1.4s infinite ease-in-out;
}

@keyframes tmPulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.tm-subtitle {
  font-size: 0.82rem;
  color: var(--tm-muted);
  margin: 4px 0 0 0;
}

.tm-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tm-action-btn {
  height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tm-action-btn:hover {
  transform: translateY(-1px);
}

.tm-action-btn.btn-pip-mini {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.34);
}

.tm-action-btn.btn-pip-mini:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(125, 211, 252, 0.6);
  color: #e0f2fe;
}

.tm-action-btn.btn-pip-ext {
  background: rgba(192, 132, 252, 0.14);
  color: #d8b4fe;
  border: 1px solid rgba(192, 132, 252, 0.36);
}

.tm-action-btn.btn-pip-ext:hover {
  background: rgba(192, 132, 252, 0.24);
  border-color: rgba(216, 180, 254, 0.65);
  color: #f3e8ff;
}

/* ==========================================================================
   2. 그래픽 사운드 컨트롤 도크
   ========================================================================== */
.tm-sound-dock {
  display: grid;
  grid-template-columns: minmax(250px, 1.25fr) minmax(240px, 1.15fr) auto;
  align-items: center;
  gap: 12px;
  background: var(--tm-surface);
  border: 1px solid var(--tm-border);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.tm-sound-picker-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--tm-surface-deep);
  border: 1px solid #262f42;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  min-width: 0;
}

.tm-sound-picker-trigger:hover {
  border-color: rgba(240, 136, 62, 0.55);
  background: #121723;
}

/* 5바 비주얼 이퀄라이저 */
.tm-eq-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(240, 136, 62, 0.12);
  border: 1px solid rgba(240, 136, 62, 0.28);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  padding: 8px 6px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.tm-eq-badge span {
  width: 2.5px;
  border-radius: 2px;
  background: var(--tm-primary);
  transition: height 0.18s ease;
}

.tm-eq-badge span:nth-child(1) { height: 42%; }
.tm-eq-badge span:nth-child(2) { height: 80%; }
.tm-eq-badge span:nth-child(3) { height: 55%; }
.tm-eq-badge span:nth-child(4) { height: 92%; }
.tm-eq-badge span:nth-child(5) { height: 48%; }

.tm-eq-badge.is-playing span {
  animation: tmEqBounce 0.48s infinite ease-in-out alternate;
}

.tm-eq-badge.is-playing span:nth-child(2) { animation-delay: 0.1s; }
.tm-eq-badge.is-playing span:nth-child(3) { animation-delay: 0.2s; }
.tm-eq-badge.is-playing span:nth-child(4) { animation-delay: 0.05s; }
.tm-eq-badge.is-playing span:nth-child(5) { animation-delay: 0.15s; }

@keyframes tmEqBounce {
  0% { height: 22%; }
  100% { height: 100%; }
}

.tm-sound-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tm-sound-caption {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--tm-muted);
}

.tm-sound-current-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-sound-change-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #ff9f66;
  background: rgba(240, 136, 62, 0.12);
  border: 1px solid rgba(240, 136, 62, 0.28);
  padding: 4px 9px;
  border-radius: 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 그래픽 볼륨 슬라이더 */
.tm-volume-dock {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--tm-surface-deep);
  border: 1px solid #262f42;
  border-radius: 10px;
  padding: 9px 14px;
}

.tm-mute-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #19202e;
  border: 1px solid #2b354a;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tm-mute-btn:hover {
  border-color: var(--tm-primary);
  color: #ffffff;
}

.tm-mute-btn.is-muted {
  color: var(--tm-danger);
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.1);
}

.tm-volume-slider-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tm-volume-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--tm-muted);
  font-weight: 600;
}

.tm-volume-num {
  color: var(--tm-primary);
  font-family: Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 800;
}

.tm-range-track-wrap {
  position: relative;
  height: 8px;
  background: #202736;
  border-radius: 999px;
  display: flex;
  align-items: center;
}

.tm-range-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #f0883e, #fbbf24);
  border-radius: 999px;
  pointer-events: none;
}

.tm-range-track-wrap input[type="range"] {
  position: relative;
  z-index: 2;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 100%;
  background: transparent;
  outline: none;
  cursor: pointer;
  margin: 0;
}

.tm-range-track-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--tm-primary);
  box-shadow: 0 0 8px rgba(240, 136, 62, 0.65);
  transition: transform 0.12s ease;
}

.tm-range-track-wrap input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.tm-test-sound-btn {
  height: 52px;
  padding: 0 18px;
  border-radius: 10px;
  background: #1d2434;
  border: 1px solid #303b52;
  color: #e2e8f0;
  font-size: 0.84rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.tm-test-sound-btn:hover {
  background: #252e42;
  border-color: var(--tm-primary);
  color: #ffffff;
}

.tm-test-sound-btn.is-ringing {
  border-color: var(--tm-primary);
  background: rgba(240, 136, 62, 0.16);
  color: #ffbe8f;
}

/* ==========================================================================
   3. 필터 탭 + 일괄 제어 툴바
   ========================================================================== */
.tm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tm-filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tm-filter-tab {
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--tm-surface);
  border: 1px solid var(--tm-border);
  color: var(--tm-muted);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.tm-filter-tab:hover {
  border-color: var(--tm-border-hover);
  color: #e2e8f0;
}

.tm-filter-tab.active {
  background: rgba(240, 136, 62, 0.15);
  border-color: rgba(240, 136, 62, 0.55);
  color: #ff9f66;
}

.tm-tab-cnt {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: #1f2636;
  color: #cbd5e1;
}

.tm-filter-tab.active .tm-tab-cnt {
  background: rgba(240, 136, 62, 0.24);
  color: #ffd0b0;
}

.tm-tab-cnt.is-running.has-active {
  background: rgba(52, 211, 153, 0.22);
  color: #6ee7b7;
}

.tm-bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-bulk-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--tm-surface);
  border: 1px solid var(--tm-border);
  color: #cbd5e1;
  font-size: 0.79rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.tm-bulk-btn:hover:not(:disabled) {
  background: #1f2737;
  border-color: #465470;
  color: #ffffff;
}

.tm-bulk-btn.is-danger:hover:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.tm-bulk-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

/* ==========================================================================
   4. 타이머 카드 3열 그리드
   ========================================================================== */
.timer-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.timer-hero-card {
  background: linear-gradient(180deg, #171c28 0%, #141822 100%);
  border: 1px solid var(--tm-border);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  min-height: 244px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.timer-hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: transparent;
  transition: background 0.2s ease;
}

.timer-hero-card:hover {
  border-color: var(--tm-border-hover);
  background: linear-gradient(180deg, #1b2130 0%, #161b26 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

/* 동작 중 상태 */
.timer-hero-card.running {
  border-color: rgba(240, 136, 62, 0.65);
  box-shadow: 0 0 0 1px rgba(240, 136, 62, 0.2), 0 10px 26px rgba(240, 136, 62, 0.14);
}
.timer-hero-card.running::before { background: var(--tm-primary); }
.timer-hero-card.theme-union.running { border-color: rgba(88, 166, 255, 0.65); box-shadow: 0 10px 26px rgba(88, 166, 255, 0.14); }
.timer-hero-card.theme-union.running::before { background: var(--tm-accent); }
.timer-hero-card.theme-half.running { border-color: rgba(52, 211, 153, 0.65); box-shadow: 0 10px 26px rgba(52, 211, 153, 0.14); }
.timer-hero-card.theme-half.running::before { background: var(--tm-green); }
.timer-hero-card.theme-two.running,
.timer-hero-card.theme-janus.running { border-color: rgba(192, 132, 252, 0.65); box-shadow: 0 10px 26px rgba(192, 132, 252, 0.16); }
.timer-hero-card.theme-two.running::before,
.timer-hero-card.theme-janus.running::before { background: var(--tm-purple); }

.timer-hero-card.running .hero-time {
  color: #fde047;
}

/* 종료 알림 깜빡임 */
.timer-hero-card.ended {
  border-color: var(--tm-danger) !important;
  animation: tmEndedPulse 0.65s infinite alternate;
}

@keyframes tmEndedPulse {
  from { box-shadow: 0 0 8px rgba(248, 113, 113, 0.45); }
  to { box-shadow: 0 0 24px rgba(248, 113, 113, 0.85); }
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  max-width: calc(100% - 76px);
}

.hero-badge span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-icon-img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.badge-rune { background: rgba(240, 136, 62, 0.15); color: #ff9f66; border: 1px solid rgba(240, 136, 62, 0.28); }
.badge-union { background: rgba(88, 166, 255, 0.15); color: #7cc0ff; border: 1px solid rgba(88, 166, 255, 0.28); }
.badge-half { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.28); }
.badge-two { background: rgba(167, 139, 250, 0.16); color: #c4b5fd; border: 1px solid rgba(167, 139, 250, 0.3); }
.badge-custom { background: rgba(251, 146, 60, 0.16); color: #fdba74; border: 1px solid rgba(251, 146, 60, 0.3); }
.badge-janus { background: rgba(192, 132, 252, 0.15); color: #d8b4fe; border: 1px solid rgba(192, 132, 252, 0.32); }

.hero-btn-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.hero-ctrl-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #1e2535;
  border: 1px solid #2e384e;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.hero-ctrl-btn:hover {
  background: #293347;
  border-color: #4b5a78;
  color: #ffffff;
}

.timer-hero-card.running .hero-ctrl-btn.btn-toggle-state {
  background: rgba(240, 136, 62, 0.18);
  border-color: rgba(240, 136, 62, 0.45);
  color: #ffab70;
}

.hero-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 0 12px 0;
}

.hero-center.is-custom {
  padding: 8px 0 10px 0;
}

.hero-time {
  font-size: 2.7rem;
  font-weight: 900;
  font-family: Consolas, "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
  letter-spacing: 1px;
  line-height: 1.1;
}

.hero-status {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tm-muted);
  margin-top: 6px;
}

.timer-hero-card.running .hero-status {
  color: #6ee7b7;
}

/* 자유 타이머 설정 컨트롤 */
.custom-timer-ctrls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  width: 100%;
}

.custom-input-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--tm-muted);
}

.custom-input-group input {
  width: 48px;
  height: 28px;
  background: var(--tm-surface-deep);
  border: 1px solid #2c364b;
  color: #ffffff;
  border-radius: 6px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
}

.custom-input-group input:focus {
  border-color: var(--tm-primary);
}

.ctrl-unit {
  font-weight: 700;
}

.btn-custom-set {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(240, 136, 62, 0.16);
  border: 1px solid rgba(240, 136, 62, 0.4);
  color: #ffab70;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-custom-set:hover {
  background: rgba(240, 136, 62, 0.28);
  color: #ffffff;
}

.custom-quick-chips {
  display: flex;
  align-items: center;
  gap: 5px;
}

.custom-quick-chips button {
  padding: 2px 8px;
  border-radius: 999px;
  background: #1b2231;
  border: 1px solid #2b354b;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-quick-chips button:hover {
  border-color: var(--tm-primary);
  color: #ffffff;
}

/* 프로그레스 게이지 */
.hero-progress {
  width: 100%;
  height: 5px;
  background: #212838;
  border-radius: 999px;
  overflow: hidden;
  margin-top: auto;
}

.hero-progress-bar {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f0883e, #fbbf24);
  transition: width 0.35s linear;
}

.hero-progress-bar.bar-union { background: linear-gradient(90deg, #3b82f6, #38bdf8); }
.hero-progress-bar.bar-half { background: linear-gradient(90deg, #10b981, #34d399); }
.hero-progress-bar.bar-two { background: linear-gradient(90deg, #8b5cf6, #c4b5fd); }
.hero-progress-bar.bar-custom { background: linear-gradient(90deg, #f97316, #fdba74); }
.hero-progress-bar.bar-janus { background: linear-gradient(90deg, #9333ea, #d8b4fe); }

/* 카드 하단 그래픽 사운드 칩 바 */
.tm-card-sound-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
}

.tm-card-sound-pick {
  flex: 1;
  min-width: 0;
  height: 32px;
  background: var(--tm-surface-deep);
  border: 1px solid #242d3f;
  border-radius: 8px;
  padding: 0 10px;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.tm-card-sound-pick:hover {
  border-color: rgba(240, 136, 62, 0.55);
  background: #141925;
  color: #ffffff;
}

.tm-card-sound-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-card-sound-play {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--tm-surface-deep);
  border: 1px solid #242d3f;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.tm-card-sound-play:hover {
  border-color: var(--tm-primary);
  color: var(--tm-primary);
  background: rgba(240, 136, 62, 0.1);
}

/* 빈 상태 */
.tm-empty-state {
  text-align: center;
  padding: 46px 20px;
  background: var(--tm-surface);
  border: 1px dashed #2e384e;
  border-radius: 14px;
  margin-top: 4px;
}

.tm-empty-svg {
  width: 40px;
  height: 40px;
  color: #64748b;
  margin-bottom: 10px;
}

.tm-empty-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #e2e8f0;
  margin: 0 0 6px 0;
}

.tm-empty-desc {
  font-size: 0.82rem;
  color: var(--tm-muted);
  margin: 0 0 16px 0;
}

.tm-empty-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  background: rgba(240, 136, 62, 0.16);
  border: 1px solid rgba(240, 136, 62, 0.45);
  color: #ffab70;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   5. 원클릭 동시 가동 프리셋 (2열 나란히)
   ========================================================================== */
.tm-sync-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.tm-sync-card {
  background: var(--tm-surface);
  border: 1px solid var(--tm-border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.tm-sync-card:hover {
  transform: translateY(-1px);
}

.tm-sync-card.sync-union {
  border-color: rgba(88, 166, 255, 0.28);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.06) 0%, #151923 65%);
}

.tm-sync-card.sync-maple {
  border-color: rgba(240, 136, 62, 0.3);
  background: linear-gradient(135deg, rgba(240, 136, 62, 0.07) 0%, #151923 65%);
}

.tm-sync-info h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 5px 0;
}

.tm-sync-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tm-sync-icon.is-union {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.tm-sync-icon.is-maple {
  background: rgba(240, 136, 62, 0.15);
  border: 1px solid rgba(240, 136, 62, 0.3);
}

.tm-sync-info p {
  font-size: 0.8rem;
  color: var(--tm-muted);
  margin: 0;
  line-height: 1.45;
  word-break: keep-all;
}

.tm-sync-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.tm-sync-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-sync-union {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.42);
}

.btn-sync-maple {
  background: linear-gradient(135deg, #f0883e, #d97706);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(240, 136, 62, 0.28);
}

/* ==========================================================================
   6. 그래픽 사운드 스튜디오 모달
   ========================================================================== */
.tm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 17, 0.76);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.tm-modal-dialog {
  width: 100%;
  max-width: 780px;
  max-height: 86vh;
  background: #141925;
  border: 1px solid #2d374e;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: tmModalIn 0.18s ease-out;
}

@keyframes tmModalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #232b3e;
}

.tm-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tm-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(240, 136, 62, 0.15);
  border: 1px solid rgba(240, 136, 62, 0.35);
  color: var(--tm-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tm-modal-title-group h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.tm-modal-title-group p {
  font-size: 0.78rem;
  color: var(--tm-muted);
  margin: 3px 0 0 0;
}

.tm-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #1d2434;
  border: 1px solid #2d374e;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tm-modal-close:hover {
  color: #ffffff;
  border-color: #4b5a78;
}

.tm-modal-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 22px;
  background: #10141e;
  border-bottom: 1px solid #20283a;
}

.tm-tone-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tm-tone-chip {
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #171d2b;
  border: 1px solid #273147;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tm-tone-chip:hover {
  color: #e2e8f0;
  border-color: #3f4d6b;
}

.tm-tone-chip.active {
  background: rgba(240, 136, 62, 0.16);
  border-color: rgba(240, 136, 62, 0.55);
  color: #ffab70;
}

.tm-apply-all-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.36);
  color: #6ee7b7;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tm-apply-all-btn:hover {
  background: rgba(52, 211, 153, 0.24);
  color: #ecfdf5;
}

.tm-sound-grid {
  padding: 18px 22px 22px 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  overflow-y: auto;
}

.tm-sound-grid::-webkit-scrollbar {
  width: 6px;
}

.tm-sound-grid::-webkit-scrollbar-thumb {
  background: #2b3449;
  border-radius: 3px;
}

.tm-sound-card {
  background: #19202e;
  border: 1px solid #283247;
  border-radius: 12px;
  padding: 12px 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.16s ease;
  text-align: left;
}

.tm-sound-card:hover {
  border-color: #465574;
  background: #1e2637;
  transform: translateY(-1px);
}

.tm-sound-card.is-selected {
  border-color: var(--tm-primary);
  background: rgba(240, 136, 62, 0.1);
  box-shadow: 0 0 0 1px rgba(240, 136, 62, 0.25);
}

.tm-sound-card.is-playing {
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.28);
}

.tm-sc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tm-sc-tone {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.tone-soft { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; }
.tone-bright { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }
.tone-strong { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }

.tm-sc-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #232c3f;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tm-sound-card.is-selected .tm-sc-check {
  background: var(--tm-primary);
  color: #0f131b;
}

.tm-sc-wave-box {
  height: 36px;
  background: #10141f;
  border: 1px solid #222b3e;
  border-radius: 8px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.tm-sound-card:hover .tm-sc-wave-box {
  color: #94a3b8;
}

.tm-sound-card.is-selected .tm-sc-wave-box {
  color: var(--tm-primary);
  border-color: rgba(240, 136, 62, 0.3);
}

.tm-sound-card.is-playing .tm-sc-wave-box {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
}

.tm-sc-wave-box svg {
  width: 100%;
  height: 24px;
}

.tm-sc-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #f8fafc;
}

.tm-sc-desc {
  font-size: 0.73rem;
  color: var(--tm-muted);
  line-height: 1.35;
}

/* ==========================================================================
   7. 반응형 (태블릿 / 모바일)
   ========================================================================== */
@media (max-width: 980px) {
  .tm-sound-dock {
    grid-template-columns: 1fr 1fr;
  }
  .tm-test-sound-btn {
    grid-column: 1 / -1;
    height: 42px;
  }
  .timer-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tm-sync-grid {
    grid-template-columns: 1fr;
  }
  .tm-sound-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .tm-header-card {
    flex-direction: column;
    align-items: stretch;
    padding: 15px 16px;
  }
  .tm-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .tm-sound-dock {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .tm-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .tm-bulk-actions {
    justify-content: flex-end;
  }
  .timer-page-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .timer-hero-card {
    min-height: 215px;
    padding: 16px;
  }
  .hero-time {
    font-size: 2.35rem;
  }
  .tm-sync-card {
    flex-direction: column;
    align-items: stretch;
  }
  .tm-sync-btn {
    width: 100%;
  }
  .tm-sound-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }
}

/* ==========================================================================
   8. 애드센스 공백 방지 유틸 (기존 유지)
   ========================================================================== */
.google-auto-placed,
ins.adsbygoogle[data-ad-status="unfilled"],
ins.adsbygoogle[data-ad-status="unfilled"] iframe {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}